weapp-tailwindcss 5.1.16 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (442) hide show
  1. package/README.en.md +6 -0
  2. package/README.md +6 -0
  3. package/bin/{weapp-tailwindcss.js → weapp-tailwindcss.cjs} +1 -1
  4. package/dist/bundlers/framework-selector.d.ts +2 -2
  5. package/dist/bundlers/gulp/asset-emission-plan.d.ts +10 -0
  6. package/dist/bundlers/gulp/frameworks/native/index.d.ts +10 -3
  7. package/dist/bundlers/gulp/index.d.ts +10 -3
  8. package/dist/bundlers/gulp/module-graph.d.ts +1 -1
  9. package/dist/bundlers/gulp/runtime-snapshot.d.ts +4 -2
  10. package/dist/bundlers/gulp/shared/create-native-framework-plugins/cache-state.d.ts +4 -4
  11. package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +5 -3
  12. package/dist/bundlers/gulp/shared/create-native-framework-plugins.d.ts +9 -2
  13. package/dist/bundlers/rspack/index.d.ts +2 -2
  14. package/dist/bundlers/shared/cache.d.ts +1 -1
  15. package/dist/bundlers/shared/css-imports.d.ts +1 -1
  16. package/dist/bundlers/shared/css-source-trace.d.ts +2 -2
  17. package/dist/bundlers/shared/framework-postcss.d.ts +9 -2
  18. package/dist/bundlers/shared/generator-css/candidates.d.ts +2 -0
  19. package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +4 -3
  20. package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +3 -3
  21. package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +4 -4
  22. package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +4 -4
  23. package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +2 -2
  24. package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +58 -0
  25. package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +3 -14
  26. package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +3 -12
  27. package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +3 -12
  28. package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +3 -25
  29. package/dist/bundlers/shared/generator-css/pipeline.d.ts +1 -1
  30. package/dist/bundlers/shared/generator-css/result-helpers.d.ts +2 -2
  31. package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +3 -4
  32. package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -1
  33. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +13 -5
  34. package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -1
  35. package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +3 -3
  36. package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +4 -3
  37. package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +9 -9
  38. package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +3 -3
  39. package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +4 -4
  40. package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +4 -4
  41. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +7 -6
  42. package/dist/bundlers/shared/generator-css/types.d.ts +12 -3
  43. package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +1 -1
  44. package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -5
  45. package/dist/bundlers/shared/generator-css/validate.d.ts +1 -1
  46. package/dist/bundlers/shared/generator-css.d.ts +9 -9
  47. package/dist/bundlers/shared/runtime-class-set/entries.d.ts +4 -0
  48. package/dist/bundlers/shared/runtime-class-set/escaped-candidates.d.ts +9 -0
  49. package/dist/bundlers/shared/runtime-class-set.d.ts +30 -0
  50. package/dist/bundlers/shared/runtime-entry-type.d.ts +8 -0
  51. package/dist/bundlers/shared/runtime-signatures.d.ts +8 -0
  52. package/dist/bundlers/shared/source-candidate-scan-signature.d.ts +13 -0
  53. package/dist/bundlers/{vite → shared}/source-candidates/collector.d.ts +1 -1
  54. package/dist/bundlers/shared/source-candidates/scan-root.d.ts +10 -0
  55. package/dist/bundlers/{vite → shared}/source-candidates/script.d.ts +1 -1
  56. package/dist/bundlers/{vite → shared}/source-candidates/store.d.ts +1 -1
  57. package/dist/bundlers/{vite → shared}/source-candidates/types-and-cache.d.ts +3 -3
  58. package/dist/bundlers/shared/source-candidates.d.ts +4 -0
  59. package/dist/bundlers/shared/source-scan/css-entries.d.ts +18 -0
  60. package/dist/bundlers/shared/source-scan.d.ts +16 -0
  61. package/dist/bundlers/shared/static-config-content.d.ts +5 -0
  62. package/dist/bundlers/shared/v4-generation-core.d.ts +8 -3
  63. package/dist/bundlers/vite/bundle-entries.d.ts +1 -1
  64. package/dist/bundlers/vite/bundle-state.d.ts +11 -38
  65. package/dist/bundlers/vite/css-asset-identity.d.ts +11 -0
  66. package/dist/bundlers/vite/css-finalizer/options.d.ts +3 -3
  67. package/dist/bundlers/vite/css-finalizer/plugin.d.ts +1 -1
  68. package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
  69. package/dist/bundlers/vite/css-memory.d.ts +1 -2
  70. package/dist/bundlers/vite/frameworks/generic/index.d.ts +2 -2
  71. package/dist/bundlers/vite/frameworks/taro/index.d.ts +2 -2
  72. package/dist/bundlers/vite/frameworks/uni-app/index.d.ts +3 -3
  73. package/dist/bundlers/vite/frameworks/uni-app-x/index.d.ts +3 -3
  74. package/dist/bundlers/vite/frameworks/weapp-vite/index.d.ts +2 -2
  75. package/dist/bundlers/vite/generate-bundle/asset-emission-plan.d.ts +8 -0
  76. package/dist/bundlers/vite/generate-bundle/bundle-markup-candidates.d.ts +4 -4
  77. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
  78. package/dist/bundlers/vite/generate-bundle/css-assets.d.ts +1 -1
  79. package/dist/bundlers/vite/generate-bundle/css-cache-task.d.ts +34 -0
  80. package/dist/bundlers/vite/generate-bundle/css-composition-plan.d.ts +58 -0
  81. package/dist/bundlers/vite/generate-bundle/css-config-directives.d.ts +1 -1
  82. package/dist/bundlers/vite/generate-bundle/css-entry-processing.d.ts +1 -0
  83. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +1 -1
  84. package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +21 -2
  85. package/dist/bundlers/vite/generate-bundle/css-output.d.ts +1 -1
  86. package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +1 -1
  87. package/dist/bundlers/vite/generate-bundle/css-source-plan.d.ts +19 -0
  88. package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +61 -0
  89. package/dist/bundlers/vite/generate-bundle/css-transform-result.d.ts +23 -0
  90. package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +42 -0
  91. package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +2 -2
  92. package/dist/bundlers/vite/generate-bundle/finalize/bundle.d.ts +1 -1
  93. package/dist/bundlers/vite/generate-bundle/finalize/root-import-shell.d.ts +5 -5
  94. package/dist/bundlers/vite/generate-bundle/finalize.d.ts +2 -2
  95. package/dist/bundlers/vite/generate-bundle/html-processing.d.ts +2 -2
  96. package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +1 -1
  97. package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +2 -1
  98. package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +2 -2
  99. package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +6 -5
  100. package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +1 -1
  101. package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +1 -1
  102. package/dist/bundlers/vite/generate-bundle/remembered-css-plan.d.ts +35 -0
  103. package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +5 -6
  104. package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +2 -2
  105. package/dist/bundlers/vite/generate-bundle/root-style-output.d.ts +20 -0
  106. package/dist/bundlers/vite/generate-bundle/runtime-configured-css.d.ts +54 -0
  107. package/dist/bundlers/vite/generate-bundle/runtime-linked-css.d.ts +1 -1
  108. package/dist/bundlers/vite/generate-bundle/runtime-linked-source-memory.d.ts +3 -3
  109. package/dist/bundlers/vite/{generate-bundle-runtime.d.ts → generate-bundle/runtime.d.ts} +4 -4
  110. package/dist/bundlers/vite/generate-bundle/scoped-generator.d.ts +2 -2
  111. package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +2 -2
  112. package/dist/bundlers/vite/generate-bundle/signatures.d.ts +1 -8
  113. package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +3 -3
  114. package/dist/bundlers/vite/generate-bundle/source-candidate-source.d.ts +5 -0
  115. package/dist/bundlers/vite/generate-bundle/subpackages.d.ts +2 -2
  116. package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +14 -1
  117. package/dist/bundlers/vite/generate-bundle/transform-filter.d.ts +1 -1
  118. package/dist/bundlers/vite/generate-bundle/transform-scheduling.d.ts +1 -0
  119. package/dist/bundlers/vite/generate-bundle/types.d.ts +8 -7
  120. package/dist/bundlers/vite/generate-bundle/uni-app-x-postprocess.d.ts +3 -2
  121. package/dist/bundlers/vite/generate-bundle/validate-runtime-candidates.d.ts +22 -0
  122. package/dist/bundlers/vite/generate-bundle.d.ts +6 -6
  123. package/dist/bundlers/vite/incremental-runtime-class-set/entries.d.ts +1 -4
  124. package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -3
  125. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +2 -30
  126. package/dist/bundlers/vite/index.d.ts +3 -3
  127. package/dist/bundlers/vite/js-precheck.d.ts +1 -1
  128. package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +2 -1
  129. package/dist/bundlers/vite/processed-css-assets/collector.d.ts +1 -1
  130. package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -1
  131. package/dist/bundlers/vite/processed-css-assets/empty-at-rule.d.ts +1 -0
  132. package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +4 -4
  133. package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +5 -5
  134. package/dist/bundlers/vite/processed-css-assets.d.ts +4 -4
  135. package/dist/bundlers/vite/resolve-app-type.d.ts +1 -1
  136. package/dist/bundlers/vite/rewrite-css-imports.d.ts +3 -2
  137. package/dist/bundlers/vite/runtime-affecting-signature.d.ts +1 -2
  138. package/dist/bundlers/vite/runtime-candidate-entry.d.ts +9 -0
  139. package/dist/bundlers/vite/runtime-class-set.d.ts +4 -4
  140. package/dist/bundlers/vite/serve-css-generation.d.ts +2 -1
  141. package/dist/bundlers/vite/serve-js-transform.d.ts +1 -1
  142. package/dist/bundlers/vite/serve-root-import-shell.d.ts +1 -1
  143. package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +7 -7
  144. package/dist/bundlers/vite/shared/framework-hmr-candidate-state.d.ts +45 -0
  145. package/dist/bundlers/vite/shared/framework-post-plugin.d.ts +2 -0
  146. package/dist/bundlers/vite/shared/framework-processed-css-registry.d.ts +22 -0
  147. package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +1 -0
  148. package/dist/bundlers/vite/shared/framework-source-candidates-plugin.d.ts +2 -0
  149. package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +38 -0
  150. package/dist/bundlers/vite/shared/framework-strategy.d.ts +4 -4
  151. package/dist/bundlers/vite/source-candidate-scan-signature.d.ts +2 -13
  152. package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -10
  153. package/dist/bundlers/vite/source-candidates.d.ts +1 -4
  154. package/dist/bundlers/vite/source-output-relations.d.ts +24 -0
  155. package/dist/bundlers/vite/source-scan/css-entries.d.ts +2 -18
  156. package/dist/bundlers/vite/source-scan.d.ts +2 -16
  157. package/dist/bundlers/vite/static-config-content.d.ts +1 -5
  158. package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
  159. package/dist/bundlers/vite/web-css-compat.d.ts +1 -1
  160. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/asset-emission-plan.d.ts +18 -0
  161. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/css-source-resolvers.d.ts +2 -2
  162. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/finalize-assets.d.ts +1 -1
  163. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-task.d.ts +1 -1
  164. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +11 -41
  165. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/html-js-tasks.d.ts +1 -1
  166. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/js-module-graph.d.ts +4 -10
  167. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +4 -4
  168. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/memory-trace.d.ts +3 -3
  169. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +6 -6
  170. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/resources.d.ts +2 -2
  171. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +4 -4
  172. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +1 -1
  173. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +9 -9
  174. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +3 -3
  175. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-refresh.d.ts +3 -3
  176. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +2 -2
  177. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +4 -4
  178. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +2 -2
  179. package/dist/bundlers/webpack/frameworks/generic/index.d.ts +2 -2
  180. package/dist/bundlers/webpack/frameworks/index.d.ts +7 -7
  181. package/dist/bundlers/webpack/frameworks/mpx/index.d.ts +2 -2
  182. package/dist/bundlers/webpack/frameworks/taro/index.d.ts +2 -2
  183. package/dist/bundlers/webpack/frameworks/uni-app/index.d.ts +2 -2
  184. package/dist/bundlers/webpack/frameworks/weapp-vite/index.d.ts +2 -2
  185. package/dist/bundlers/webpack/index.d.ts +1 -1
  186. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +2 -2
  187. package/dist/bundlers/webpack/loaders/weapp-tw-css-generation-loader.d.ts +1 -1
  188. package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +1 -1
  189. package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +1 -1
  190. package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +4 -4
  191. package/dist/bundlers/webpack/shared/create-framework-plugin.d.ts +3 -3
  192. package/dist/cli/context.d.ts +2 -2
  193. package/dist/cli/doctor.d.ts +1 -1
  194. package/dist/cli/helpers/options.d.ts +3 -3
  195. package/dist/cli/helpers.d.ts +1 -1
  196. package/dist/cli.cjs +37012 -0
  197. package/dist/cli.js +141 -168
  198. package/dist/compiler/artifact.d.ts +14 -0
  199. package/dist/compiler/candidate-index.d.ts +10 -0
  200. package/dist/compiler/compilation-change-coordinator.d.ts +28 -0
  201. package/dist/compiler/compilation-dependency-state.d.ts +16 -0
  202. package/dist/compiler/compilation-scope-graph.d.ts +31 -0
  203. package/dist/compiler/compilation-session-pool.d.ts +54 -0
  204. package/dist/compiler/compiler-owner-state.d.ts +3 -0
  205. package/dist/compiler/composition.d.ts +8 -0
  206. package/dist/compiler/emission-plan.d.ts +26 -0
  207. package/dist/compiler/index.d.ts +23 -0
  208. package/dist/compiler/invalidation.d.ts +3 -0
  209. package/dist/compiler/mode.d.ts +3 -0
  210. package/dist/compiler/owner-lifecycle.d.ts +1 -0
  211. package/dist/compiler/platform-adapter.d.ts +9 -0
  212. package/dist/compiler/runtime-affecting-signature.d.ts +2 -0
  213. package/dist/compiler/runtime-build-state.d.ts +6 -0
  214. package/dist/compiler/runtime-snapshot.d.ts +53 -0
  215. package/dist/compiler/scope-planner.d.ts +6 -0
  216. package/dist/compiler/semantic-css.d.ts +66 -0
  217. package/dist/compiler/session.d.ts +13 -0
  218. package/dist/compiler/shadow-gate.d.ts +26 -0
  219. package/dist/compiler/shadow-report-session.d.ts +37 -0
  220. package/dist/compiler/shadow-report.d.ts +15 -0
  221. package/dist/compiler/source-graph.d.ts +32 -0
  222. package/dist/compiler/tailwind-generation-session-pool.d.ts +22 -0
  223. package/dist/compiler/types.d.ts +95 -0
  224. package/dist/constants.d.ts +2 -2
  225. package/dist/context/compiler-context-cache.d.ts +1 -1
  226. package/dist/context/custom-attributes.d.ts +1 -1
  227. package/dist/context/handlers.d.ts +3 -3
  228. package/dist/context/index.d.ts +1 -1
  229. package/dist/context/runtime-package-replacements.d.ts +1 -1
  230. package/dist/context/style-options.d.ts +1 -1
  231. package/dist/context/tailwindcss.d.ts +3 -3
  232. package/dist/{context-BtLIID4m.js → context-OqD_eBxQ.cjs} +31 -93
  233. package/dist/{context-JzwzSX36.mjs → context-YAvTyPV2.js} +25 -12
  234. package/dist/{core.mjs → core.cjs} +13 -12
  235. package/dist/core.d.ts +2 -2
  236. package/dist/core.js +12 -13
  237. package/dist/css-imports-DfNC3e6a.cjs +43 -0
  238. package/dist/css-loader-runtime-CSv0lKqV.cjs +11 -0
  239. package/dist/css-macro/postcss.cjs +19 -0
  240. package/dist/css-macro/postcss.js +2 -19
  241. package/dist/{css-macro.mjs → css-macro.cjs} +11 -8
  242. package/dist/css-macro.d.ts +2 -2
  243. package/dist/css-macro.js +8 -11
  244. package/dist/{defaults.mjs → defaults.cjs} +16 -11
  245. package/dist/defaults.d.ts +1 -1
  246. package/dist/defaults.js +11 -16
  247. package/dist/{escape.mjs → escape.cjs} +18 -4
  248. package/dist/escape.js +4 -18
  249. package/dist/framework/platform.d.ts +1 -1
  250. package/dist/{framework.mjs → framework.cjs} +47 -25
  251. package/dist/framework.d.ts +1 -1
  252. package/dist/framework.js +25 -47
  253. package/dist/generator/index.d.ts +6 -6
  254. package/dist/generator/options.d.ts +3 -3
  255. package/dist/generator/types.d.ts +2 -2
  256. package/dist/{generator-B91GhUJQ.js → generator-BE34PYSC.cjs} +175 -38
  257. package/dist/{generator-Bv7myuhY.mjs → generator-DYeAa2-5.js} +160 -35
  258. package/dist/generator.cjs +12 -0
  259. package/dist/generator.d.ts +1 -1
  260. package/dist/generator.js +2 -12
  261. package/dist/{gulp-CKSklPlH.mjs → gulp-CxIXGmft.js} +141 -90
  262. package/dist/{gulp-Q1wITegn.js → gulp-DCRItId9.cjs} +157 -103
  263. package/dist/gulp.cjs +5 -0
  264. package/dist/gulp.d.ts +4 -4
  265. package/dist/gulp.js +2 -5
  266. package/dist/hmr-timing-BeJU2tmK.cjs +555 -0
  267. package/dist/{hmr-timing-BXg7nI8N.mjs → hmr-timing-Doqs3Z6q.js} +3824 -1988
  268. package/dist/index.cjs +45 -0
  269. package/dist/index.d.ts +9 -9
  270. package/dist/index.js +9 -45
  271. package/dist/js/JsTokenUpdater.d.ts +1 -1
  272. package/dist/js/ModuleGraph.d.ts +3 -3
  273. package/dist/js/NodePathWalker.d.ts +2 -2
  274. package/dist/js/babel/process.d.ts +2 -2
  275. package/dist/js/babel.d.ts +8 -8
  276. package/dist/js/evalTransforms.d.ts +2 -2
  277. package/dist/js/fast-path/oxc.d.ts +1 -1
  278. package/dist/js/handlers.d.ts +2 -2
  279. package/dist/js/index.d.ts +3 -3
  280. package/dist/js/literal-transform.d.ts +1 -1
  281. package/dist/js/module-graph/ignored-exports.d.ts +4 -4
  282. package/dist/js/module-graph/types.d.ts +2 -2
  283. package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
  284. package/dist/js/precheck.d.ts +1 -1
  285. package/dist/js/replacement-cache.d.ts +1 -1
  286. package/dist/js/sourceAnalysis.d.ts +3 -3
  287. package/dist/js/taggedTemplateIgnore.d.ts +1 -1
  288. package/dist/object-Bvy6-w9r.js +47 -0
  289. package/dist/object-C_Vr6_S5.cjs +58 -0
  290. package/dist/options-hVsoTfwL.cjs +775 -0
  291. package/dist/pipeline-helpers-DbwUW5Er.cjs +955 -0
  292. package/dist/postcss-html-transform.cjs +7 -0
  293. package/dist/postcss-html-transform.js +3 -5
  294. package/dist/postcss.cjs +15 -0
  295. package/dist/postcss.js +7 -11
  296. package/dist/presets/hbuilderx.d.ts +2 -2
  297. package/dist/presets/index.d.ts +4 -4
  298. package/dist/presets/shared.d.ts +1 -1
  299. package/dist/presets/taro.d.ts +2 -2
  300. package/dist/presets/uni-app-x.d.ts +1 -1
  301. package/dist/presets/uni-app.d.ts +2 -2
  302. package/dist/{presets.mjs → presets.cjs} +37 -24
  303. package/dist/presets.d.ts +1 -1
  304. package/dist/presets.js +24 -36
  305. package/dist/reset.cjs +19 -0
  306. package/dist/reset.d.ts +2 -2
  307. package/dist/reset.js +2 -19
  308. package/dist/{rolldown-runtime-emK7D4bc.js → rolldown-runtime-CVvi-lCc.cjs} +15 -0
  309. package/dist/{rspack.mjs → rspack.cjs} +10 -4
  310. package/dist/rspack.d.ts +3 -3
  311. package/dist/rspack.js +4 -10
  312. package/dist/runtime-branch/create-branch.d.ts +1 -1
  313. package/dist/runtime-branch/generator-target-env.d.ts +2 -1
  314. package/dist/runtime-branch/index.d.ts +2 -2
  315. package/dist/runtime-branch/mini-program.d.ts +1 -1
  316. package/dist/runtime-branch/native-app.d.ts +1 -1
  317. package/dist/runtime-branch/platform.d.ts +2 -2
  318. package/dist/runtime-branch/tailwind-version.d.ts +1 -1
  319. package/dist/runtime-branch/types.d.ts +2 -2
  320. package/dist/runtime-branch/web.d.ts +1 -1
  321. package/dist/runtime-branch.d.ts +1 -1
  322. package/dist/runtime-registry-Y7NrD2WH.cjs +31 -0
  323. package/dist/shared/classname-transform.d.ts +1 -1
  324. package/dist/shared/mpx.d.ts +1 -1
  325. package/dist/source-candidate-scan-signature-BMBzTdhD.js +421 -0
  326. package/dist/source-candidate-scan-signature-CzrG7nGp.cjs +555 -0
  327. package/dist/style-injector/internal.d.ts +6 -6
  328. package/dist/style-options-B_ppaVIg.cjs +77 -0
  329. package/dist/tailwindcss/candidates.d.ts +2 -2
  330. package/dist/tailwindcss/index.d.ts +1 -1
  331. package/dist/tailwindcss/runtime/cache.d.ts +1 -1
  332. package/dist/tailwindcss/runtime-factory.d.ts +2 -2
  333. package/dist/tailwindcss/runtime-options.d.ts +1 -1
  334. package/dist/tailwindcss/runtime-types.d.ts +2 -2
  335. package/dist/tailwindcss/runtime.d.ts +2 -2
  336. package/dist/tailwindcss/source-scan.d.ts +2 -2
  337. package/dist/tailwindcss/targets.d.ts +1 -1
  338. package/dist/tailwindcss/v4/config.d.ts +1 -1
  339. package/dist/tailwindcss/v4/css-sources.d.ts +2 -1
  340. package/dist/tailwindcss/v4/index.d.ts +2 -2
  341. package/dist/tailwindcss/v4/multi-runtime.d.ts +1 -1
  342. package/dist/tailwindcss/v4/runtime-factory.d.ts +5 -5
  343. package/dist/tailwindcss/v4/runtime-options.d.ts +1 -1
  344. package/dist/tailwindcss/v4-engine/css-macro-source.d.ts +1 -1
  345. package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
  346. package/dist/tailwindcss/v4-engine/generator/engine.d.ts +1 -1
  347. package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +4 -5
  348. package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +17 -0
  349. package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +2 -1
  350. package/dist/tailwindcss/v4-engine/generator.d.ts +2 -2
  351. package/dist/tailwindcss/v4-engine/index.d.ts +5 -5
  352. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +2 -2
  353. package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
  354. package/dist/tailwindcss/v4-engine/types.d.ts +1 -0
  355. package/dist/{tailwindcss-BTcXX8Ka.mjs → tailwindcss-CTpCc_nd.js} +22 -22
  356. package/dist/{tailwindcss-B4phC0kB.js → tailwindcss-DcpiKvmJ.cjs} +9 -769
  357. package/dist/transform-BUEyOCT7.cjs +341 -0
  358. package/dist/transform-BbaPIji9.js +342 -0
  359. package/dist/typedoc.export.d.ts +4 -4
  360. package/dist/types/index.d.ts +7 -7
  361. package/dist/types/shared.d.ts +1 -1
  362. package/dist/types/typedoc-tailwindcss-runtime.d.ts +3 -3
  363. package/dist/types/user-defined-options/general.d.ts +5 -5
  364. package/dist/types/user-defined-options/important.d.ts +2 -2
  365. package/dist/types/user-defined-options/index.d.ts +9 -9
  366. package/dist/types/user-defined-options/matcher.d.ts +2 -2
  367. package/dist/types.cjs +0 -0
  368. package/dist/types.d.ts +1 -1
  369. package/dist/types.js +1 -0
  370. package/dist/uni-app-x/harmony.d.ts +1 -0
  371. package/dist/uni-app-x/index.d.ts +2 -2
  372. package/dist/uni-app-x/options.d.ts +1 -1
  373. package/dist/uni-app-x/style-asset/harmony-apply.d.ts +1 -0
  374. package/dist/uni-app-x/style-asset/style-value.d.ts +3 -0
  375. package/dist/uni-app-x/style-asset.d.ts +5 -4
  376. package/dist/uni-app-x/transform.d.ts +1 -1
  377. package/dist/uni-app-x/vite/harmony-apply.d.ts +19 -0
  378. package/dist/uni-app-x/vite/native-target.d.ts +2 -0
  379. package/dist/uni-app-x/vite.d.ts +5 -2
  380. package/dist/unocss/index.d.ts +1 -1
  381. package/dist/utils/disabled.d.ts +1 -1
  382. package/dist/utils/index.d.ts +3 -3
  383. package/dist/{hmr-timing-CMPaWn9P.js → v4-generation-core-BrCR6ic8.cjs} +3468 -2059
  384. package/dist/{vite-DhVnXvAQ.js → vite-Bu6MB9Zo.cjs} +6156 -4670
  385. package/dist/{vite-BwQWl9ft.mjs → vite-TMGwWcx9.js} +5967 -4456
  386. package/dist/vite.cjs +4 -0
  387. package/dist/vite.d.ts +3 -3
  388. package/dist/vite.js +2 -4
  389. package/dist/watch-dependencies-BZGubvuJ.cjs +40 -0
  390. package/dist/{weapp-tw-css-generation-loader.js → weapp-tw-css-generation-loader.cjs} +3 -2
  391. package/dist/weapp-tw-css-import-rewrite-loader.cjs +201 -0
  392. package/dist/{weapp-tw-runtime-classset-loader.js → weapp-tw-runtime-classset-loader.cjs} +9 -11
  393. package/dist/{webpack-kh78iMSS.js → webpack-CiI-1n9L.cjs} +208 -954
  394. package/dist/{webpack-Bo1QrFPf.mjs → webpack-Dnh2KQbg.js} +105 -101
  395. package/dist/webpack.cjs +5 -0
  396. package/dist/webpack.d.ts +2 -2
  397. package/dist/webpack.js +2 -5
  398. package/dist/wxml/Tokenizer.d.ts +2 -2
  399. package/dist/wxml/custom-attributes.d.ts +1 -1
  400. package/dist/wxml/index.d.ts +2 -2
  401. package/dist/wxml/shared.d.ts +1 -1
  402. package/dist/wxml/utils/codegen/legacy-rewriter.d.ts +1 -1
  403. package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
  404. package/dist/wxml/utils/codegen.d.ts +1 -1
  405. package/dist/wxml/utils/custom-template.d.ts +2 -2
  406. package/dist/wxml/utils/fragment-helpers.d.ts +2 -2
  407. package/dist/wxml/utils/fragment-updater.d.ts +2 -2
  408. package/dist/wxml/utils/template-fragments.d.ts +2 -2
  409. package/dist/wxml/utils.d.ts +5 -5
  410. package/dist/wxml-DSMNuUaP.cjs +38609 -0
  411. package/dist/{cli.mjs → wxml-IBzZSaQC.js} +237 -714
  412. package/package.json +56 -53
  413. package/dist/css-macro/postcss.mjs +0 -2
  414. package/dist/generator.mjs +0 -2
  415. package/dist/gulp.mjs +0 -2
  416. package/dist/index.mjs +0 -9
  417. package/dist/object-BJSWl-E5.mjs +0 -9
  418. package/dist/object-COs_Mw6p.js +0 -14
  419. package/dist/postcss-html-transform.mjs +0 -5
  420. package/dist/postcss.mjs +0 -11
  421. package/dist/reset.mjs +0 -2
  422. package/dist/source-candidate-scan-signature-BKZZk_e6.js +0 -1078
  423. package/dist/source-candidate-scan-signature-CtK-mB_C.mjs +0 -854
  424. package/dist/transform-B_KM9sLX.mjs +0 -14930
  425. package/dist/transform-CcYptivi.js +0 -14927
  426. package/dist/types.mjs +0 -1
  427. package/dist/vite.mjs +0 -2
  428. package/dist/watch-dependencies-bpG6kmAf.js +0 -80
  429. package/dist/weapp-tw-css-import-rewrite-loader-B0tVkJLH.js +0 -10524
  430. package/dist/weapp-tw-css-import-rewrite-loader.js +0 -10
  431. package/dist/webpack.mjs +0 -2
  432. package/dist/wxml-Ce10eREX.js +0 -3979
  433. package/dist/wxml-DdGdeqaH.mjs +0 -3861
  434. /package/dist/{auto-2dg_uhEJ.mjs → auto-2dg_uhEJ.js} +0 -0
  435. /package/dist/{auto-DtU6f3X6.js → auto-DtU6f3X6.cjs} +0 -0
  436. /package/dist/bundlers/{vite → shared}/source-scan/dependencies.d.ts +0 -0
  437. /package/dist/{cache-options-DavPxrhC.js → cache-options-DavPxrhC.cjs} +0 -0
  438. /package/dist/{cache-options-DwBtLwQe.mjs → cache-options-DwBtLwQe.js} +0 -0
  439. /package/dist/{logger-BNzxZbZj.mjs → logger-BNzxZbZj.js} +0 -0
  440. /package/dist/{logger-TlKT3xmR.js → logger-TlKT3xmR.cjs} +0 -0
  441. /package/dist/{utils-CuKLf1Zv.js → utils-CuKLf1Zv.cjs} +0 -0
  442. /package/dist/{utils-MVwpU07P.mjs → utils-MVwpU07P.js} +0 -0
@@ -0,0 +1,16 @@
1
+ import type { CompilationDependencyChange } from './compilation-scope-graph.js';
2
+ import type { CompilationResult, SourceScope } from './types.js';
3
+ export interface CompilationDependencyScopeEntry {
4
+ latest?: Pick<CompilationResult, 'graphNodes'> | undefined;
5
+ scope: SourceScope;
6
+ }
7
+ export declare class CompilationDependencyState {
8
+ private readonly revisions;
9
+ getAffectedScopes(entries: Iterable<CompilationDependencyScopeEntry>, changes: Iterable<CompilationDependencyChange>): Set<string>;
10
+ getAffectedScopeChanges(entries: Iterable<CompilationDependencyScopeEntry>, changes: Iterable<CompilationDependencyChange>): Map<string, CompilationDependencyChange[]>;
11
+ record(entries: Iterable<CompilationDependencyScopeEntry>, changes: Iterable<CompilationDependencyChange>): Set<string>;
12
+ recordScopes(scopeIds: Iterable<string>): void;
13
+ getRevision(scopeId: string): number;
14
+ delete(scopeId: string): void;
15
+ clear(): void;
16
+ }
@@ -0,0 +1,31 @@
1
+ import type { CompilationChange, CompilationGraphSnapshot, CompilationSnapshot, SourceKind, SourceScope } from './types.js';
2
+ export interface CompilationScopeDependency {
3
+ id: string;
4
+ kind: SourceKind;
5
+ }
6
+ export interface CompilationDependencyChange {
7
+ id: string;
8
+ type: 'dependency-changed' | 'config-changed';
9
+ }
10
+ export interface CompilationScopeGraphSource {
11
+ id: string;
12
+ kind: SourceKind;
13
+ content?: string | undefined;
14
+ dependencies?: CompilationScopeDependency[] | undefined;
15
+ }
16
+ export interface CompilationScopeSnapshotSource extends CompilationScopeGraphSource {
17
+ candidates: Iterable<string>;
18
+ }
19
+ export interface CreateCompilationScopeSnapshotOptions {
20
+ changes?: CompilationChange[] | undefined;
21
+ preserveDeletedCss?: boolean | undefined;
22
+ validatedClassSet?: Iterable<string> | undefined;
23
+ }
24
+ export declare function sourceNodeId(sourceId: string): string;
25
+ export declare function dependencyNodeId(dependencyId: string): string;
26
+ export declare function createCompilationDependencyChanges(dependencyIds: Iterable<string>, type?: CompilationDependencyChange['type']): CompilationDependencyChange[];
27
+ export declare function mergeCompilationDependencyChanges(...groups: Array<Iterable<CompilationDependencyChange> | undefined>): CompilationDependencyChange[];
28
+ export declare function mergeCompilationScopeDependencies(...groups: Array<Iterable<CompilationScopeDependency> | undefined>): CompilationScopeDependency[];
29
+ export declare function dependencySignature(source: CompilationScopeGraphSource): string;
30
+ export declare function createCompilationScopeGraph(scope: SourceScope, outputId: string, sources: Iterable<CompilationScopeGraphSource>): CompilationGraphSnapshot;
31
+ export declare function createCompilationScopeSnapshot(scope: SourceScope, outputId: string, sources: Iterable<CompilationScopeSnapshotSource>, options?: CreateCompilationScopeSnapshotOptions): CompilationSnapshot;
@@ -0,0 +1,54 @@
1
+ import type { CompilationDependencyChange, CompilationScopeDependency, CompilationScopeGraphSource } from './compilation-scope-graph.js';
2
+ import type { CompilationResult, SourceKind, SourceScope } from './types.js';
3
+ export interface CompilationScopeSource extends CompilationScopeGraphSource {
4
+ id: string;
5
+ kind: SourceKind;
6
+ candidates: Iterable<string>;
7
+ }
8
+ export interface CompilationScopeGenerationResult {
9
+ classSet: Iterable<string>;
10
+ dependenciesBySource?: Iterable<readonly [string, Iterable<CompilationScopeDependency>]> | undefined;
11
+ }
12
+ export interface CompilationScopeRequest {
13
+ scope: SourceScope;
14
+ outputId: string;
15
+ sources: CompilationScopeSource[];
16
+ changes?: CompilationDependencyChange[] | undefined;
17
+ preserveDeletedCss?: boolean | undefined;
18
+ }
19
+ export interface CompilationScopeState extends Omit<CompilationResult, 'candidatesBySource'> {
20
+ candidatesBySource: Map<string, Set<string>>;
21
+ }
22
+ export type CompilationScopeExecution<T> = {
23
+ committed: true;
24
+ compilation: CompilationScopeState;
25
+ value: T;
26
+ } | {
27
+ committed: false;
28
+ compilation: CompilationScopeState;
29
+ value?: never;
30
+ };
31
+ export declare class CompilationSessionPool {
32
+ private readonly dependencyState;
33
+ private readonly entries;
34
+ private disposed;
35
+ run<T extends CompilationScopeGenerationResult | undefined>(request: CompilationScopeRequest, compile: (compilation: CompilationScopeState) => Promise<T>): Promise<CompilationScopeExecution<T>>;
36
+ invalidateScope(scopeId: string): void;
37
+ dispose(): Promise<void>;
38
+ get size(): number;
39
+ getAffectedScopes(changes: Iterable<CompilationDependencyChange>): Set<string>;
40
+ getAffectedScopeChanges(changes: Iterable<CompilationDependencyChange>): Map<string, CompilationDependencyChange[]>;
41
+ recordDependencyChanges(changes: Iterable<CompilationDependencyChange>): Set<string>;
42
+ recordAffectedScopes(scopeIds: Iterable<string>): void;
43
+ getScopeDependencyRevision(scopeId: string): number;
44
+ private getEntry;
45
+ private disposeEntry;
46
+ private runEntry;
47
+ private prepareEntry;
48
+ private createGraphSources;
49
+ private normalizeGeneratedDependencies;
50
+ private enqueue;
51
+ private toScopeState;
52
+ }
53
+ export declare function getCompilationSessionPool(owner: object): CompilationSessionPool;
54
+ export declare function disposeCompilationSessionPool(owner: object): Promise<void>;
@@ -0,0 +1,3 @@
1
+ export declare function ensureCompilerOwnerActive(owner: object): void;
2
+ export declare function runCompilerOwnerActivity<T>(owner: object, activity: () => T | Promise<T>): Promise<Awaited<T>>;
3
+ export declare function runCompilerOwnerDisposal(owner: object, dispose: () => Promise<void>): Promise<void>;
@@ -0,0 +1,8 @@
1
+ import type { CssFragment, GenerationArtifact } from './types.js';
2
+ import { postcss } from '@weapp-tailwindcss/postcss';
3
+ export declare function orderCssFragments(fragments: Iterable<CssFragment>): CssFragment[];
4
+ export declare function composeGenerationArtifact(artifact: GenerationArtifact): {
5
+ artifact: GenerationArtifact;
6
+ root: postcss.Root;
7
+ css: string;
8
+ };
@@ -0,0 +1,26 @@
1
+ import type { GenerationArtifact } from './types.js';
2
+ export interface AssetEmission {
3
+ assetId: string;
4
+ artifact: GenerationArtifact;
5
+ }
6
+ export interface AssetWriteOperation<Source = string> {
7
+ assetId: string;
8
+ kind: 'write';
9
+ source: Source;
10
+ }
11
+ export interface AssetDeleteOperation {
12
+ assetId: string;
13
+ kind: 'delete';
14
+ }
15
+ export type AssetEmissionOperation<Source = string> = AssetWriteOperation<Source> | AssetDeleteOperation;
16
+ export declare class AssetEmissionPlan<Source = string> {
17
+ private readonly emissions;
18
+ private readonly assetOperations;
19
+ upsert(assetId: string, artifact: GenerationArtifact): void;
20
+ get(assetId: string): GenerationArtifact | undefined;
21
+ entries(): AssetEmission[];
22
+ write(assetId: string, source: Source): void;
23
+ remove(assetId: string): void;
24
+ operations(): AssetEmissionOperation<Source>[];
25
+ clear(): void;
26
+ }
@@ -0,0 +1,23 @@
1
+ export * from './artifact.js';
2
+ export * from './candidate-index.js';
3
+ export * from './compilation-change-coordinator.js';
4
+ export * from './compilation-scope-graph.js';
5
+ export * from './compilation-session-pool.js';
6
+ export * from './composition.js';
7
+ export * from './emission-plan.js';
8
+ export * from './invalidation.js';
9
+ export * from './mode.js';
10
+ export * from './owner-lifecycle.js';
11
+ export * from './platform-adapter.js';
12
+ export * from './runtime-affecting-signature.js';
13
+ export * from './runtime-build-state.js';
14
+ export * from './runtime-snapshot.js';
15
+ export * from './scope-planner.js';
16
+ export * from './semantic-css.js';
17
+ export * from './session.js';
18
+ export * from './shadow-gate.js';
19
+ export * from './shadow-report.js';
20
+ export * from './shadow-report-session.js';
21
+ export * from './source-graph.js';
22
+ export * from './tailwind-generation-session-pool.js';
23
+ export type * from './types.js';
@@ -0,0 +1,3 @@
1
+ import type { SourceGraph } from './source-graph.js';
2
+ import type { CompilationChange } from './types.js';
3
+ export declare function resolveInvalidatedScopes(graph: SourceGraph, changes: Iterable<CompilationChange>): Set<string>;
@@ -0,0 +1,3 @@
1
+ import type { CompilerMode } from './types.js';
2
+ export declare const COMPILER_MODE_ENV = "WEAPP_TAILWINDCSS_COMPILER";
3
+ export declare function resolveCompilerMode(env?: NodeJS.ProcessEnv): CompilerMode;
@@ -0,0 +1 @@
1
+ export declare function disposeCompilerOwner(owner: object): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import type { IStyleHandlerOptions, StyleHandler } from '@weapp-tailwindcss/postcss/types';
2
+ import type { PlatformAdapter } from './types.js';
3
+ export interface CreateStylePlatformAdapterOptions {
4
+ id: PlatformAdapter['id'];
5
+ styleHandler: StyleHandler;
6
+ styleOptions?: Partial<IStyleHandlerOptions> | undefined;
7
+ }
8
+ export declare function createPassthroughPlatformAdapter(id: PlatformAdapter['id']): PlatformAdapter;
9
+ export declare function createStylePlatformAdapter(options: CreateStylePlatformAdapterOptions): PlatformAdapter;
@@ -0,0 +1,2 @@
1
+ import type { RuntimeEntryType } from './runtime-snapshot.js';
2
+ export declare function createRuntimeAffectingSourceSignature(source: string, type: RuntimeEntryType): string;
@@ -0,0 +1,6 @@
1
+ import type { RuntimeCompilationBuildState, RuntimeCompilationSnapshot, UpdateRuntimeCompilationBuildStateOptions } from './runtime-snapshot.js';
2
+ export declare function createRuntimeCompilationBuildState(): RuntimeCompilationBuildState;
3
+ export declare function updateRuntimeCompilationBuildState(state: RuntimeCompilationBuildState, snapshot: RuntimeCompilationSnapshot, linkedByEntry: Map<string, Set<string>>, options?: UpdateRuntimeCompilationBuildStateOptions): void;
4
+ export declare function removeRuntimeCompilationBuildStateFiles(state: RuntimeCompilationBuildState, files: Iterable<string>): void;
5
+ export declare function resetRuntimeCompilationBuildState(state: RuntimeCompilationBuildState): void;
6
+ export declare function createRuntimeCompilationAffectingSignature(snapshot: RuntimeCompilationSnapshot, computeHash: (source: string) => string): string;
@@ -0,0 +1,53 @@
1
+ export type RuntimeEntryType = 'html' | 'js' | 'css' | 'other';
2
+ export interface RuntimeSnapshotEntry {
3
+ file: string;
4
+ source: string;
5
+ type: RuntimeEntryType;
6
+ runtimeCandidate?: boolean | undefined;
7
+ }
8
+ export interface RuntimeProcessFileSets {
9
+ html: Set<string>;
10
+ js: Set<string>;
11
+ css: Set<string>;
12
+ }
13
+ export interface RuntimeCompilationSnapshot<Entry extends RuntimeSnapshotEntry = RuntimeSnapshotEntry> {
14
+ entries: Entry[];
15
+ sourceHashByFile: Map<string, string>;
16
+ runtimeAffectingSignatureByFile: Map<string, string>;
17
+ runtimeAffectingHashByFile: Map<string, string>;
18
+ hasOmittedKnownFiles: boolean;
19
+ removedFiles: Set<string>;
20
+ changedByType: Record<RuntimeEntryType, Set<string>>;
21
+ runtimeAffectingChangedByType: Record<RuntimeEntryType, Set<string>>;
22
+ processFiles: RuntimeProcessFileSets;
23
+ linkedImpactsByEntry: Map<string, Set<string>>;
24
+ }
25
+ export interface RuntimeCompilationBuildState {
26
+ iteration: number;
27
+ sourceHashByFile: Map<string, string>;
28
+ runtimeAffectingSignatureByFile: Map<string, string>;
29
+ runtimeAffectingHashByFile: Map<string, string>;
30
+ linkedByEntry: Map<string, Set<string>>;
31
+ dependentsByLinkedFile: Map<string, Set<string>>;
32
+ bundleMarkupCandidatesByFile: Map<string, Set<string>>;
33
+ generatorCandidateSignature?: string | undefined;
34
+ }
35
+ export interface CreateRuntimeCompilationSnapshotOptions {
36
+ changedFiles?: Iterable<string> | undefined;
37
+ runtimeAffectingChangedFiles?: Iterable<string> | undefined;
38
+ processFiles?: Iterable<string> | undefined;
39
+ hasOmittedKnownFiles?: boolean | undefined;
40
+ removedFiles?: Iterable<string> | undefined;
41
+ }
42
+ export interface BuildRuntimeCompilationSnapshotOptions {
43
+ computeHash: (source: string) => string;
44
+ createRuntimeAffectingSignature: (source: string, type: RuntimeEntryType) => string;
45
+ forceAll?: boolean | undefined;
46
+ hasOmittedKnownFiles?: boolean | undefined;
47
+ removedFiles?: Iterable<string> | undefined;
48
+ }
49
+ export interface UpdateRuntimeCompilationBuildStateOptions {
50
+ incremental?: boolean | undefined;
51
+ }
52
+ export declare function createRuntimeCompilationSnapshot<Entry extends RuntimeSnapshotEntry>(entries: Entry[], options?: CreateRuntimeCompilationSnapshotOptions): RuntimeCompilationSnapshot<Entry>;
53
+ export declare function buildRuntimeCompilationSnapshot<Entry extends RuntimeSnapshotEntry>(entries: Entry[], state: RuntimeCompilationBuildState, options: BuildRuntimeCompilationSnapshotOptions): RuntimeCompilationSnapshot<Entry>;
@@ -0,0 +1,6 @@
1
+ import type { SourceGraphNode, SourceScope } from './types.js';
2
+ export interface SourceScopePlan {
3
+ scope: SourceScope;
4
+ nodes: SourceGraphNode[];
5
+ }
6
+ export declare function planSourceScopes(nodes: Iterable<SourceGraphNode>): SourceScopePlan[];
@@ -0,0 +1,66 @@
1
+ import type { Root } from 'postcss';
2
+ import type { GenerationArtifact } from './types.js';
3
+ export interface SemanticCssDeclaration {
4
+ type: 'declaration';
5
+ property: string;
6
+ value: string;
7
+ important: boolean;
8
+ }
9
+ export interface SemanticCssRule {
10
+ type: 'rule';
11
+ selector: string;
12
+ nodes: SemanticCssNode[];
13
+ }
14
+ export interface SemanticCssAtRule {
15
+ type: 'at-rule';
16
+ name: string;
17
+ params: string;
18
+ nodes: SemanticCssNode[];
19
+ }
20
+ export type SemanticCssNode = SemanticCssDeclaration | SemanticCssRule | SemanticCssAtRule;
21
+ export interface ArtifactSemanticFragment {
22
+ id: string;
23
+ kind: GenerationArtifact['fragments'][number]['kind'];
24
+ order: number;
25
+ scope: GenerationArtifact['fragments'][number]['scope'];
26
+ sourceId: string;
27
+ stage: GenerationArtifact['fragments'][number]['stage'];
28
+ root: SemanticCssNode[];
29
+ }
30
+ export interface ArtifactSemanticSnapshot {
31
+ present: boolean;
32
+ fragments: ArtifactSemanticFragment[];
33
+ classSet: string[];
34
+ rawCandidates: string[];
35
+ dependencies: string[];
36
+ sourceEntries: string[];
37
+ }
38
+ export interface ArtifactSemanticDifference {
39
+ kind: 'added' | 'removed' | 'changed';
40
+ path: string;
41
+ left?: unknown;
42
+ right?: unknown;
43
+ }
44
+ export interface ArtifactSemanticSummary {
45
+ present: boolean;
46
+ fragments: number;
47
+ classes: number;
48
+ rawCandidates: number;
49
+ dependencies: number;
50
+ sourceEntries: number;
51
+ }
52
+ export interface ArtifactSemanticComparison {
53
+ equal: boolean;
54
+ differences: ArtifactSemanticDifference[];
55
+ truncated: boolean;
56
+ left: ArtifactSemanticSummary;
57
+ right: ArtifactSemanticSummary;
58
+ }
59
+ export interface CompareArtifactSemanticsOptions {
60
+ maxDifferences?: number | undefined;
61
+ }
62
+ export declare function normalizeCssRoot(root: Root): SemanticCssNode[];
63
+ export declare function createArtifactSemanticSnapshot(artifact: GenerationArtifact | undefined): ArtifactSemanticSnapshot;
64
+ export declare function createArtifactSemanticSignature(artifact: GenerationArtifact): string;
65
+ export declare function compareArtifactSemantics(left: GenerationArtifact | undefined, right: GenerationArtifact | undefined, options?: CompareArtifactSemanticsOptions): ArtifactSemanticComparison;
66
+ export declare function areArtifactsSemanticallyEqual(left: GenerationArtifact, right: GenerationArtifact): boolean;
@@ -0,0 +1,13 @@
1
+ import type { CompilationGraphSnapshot, CompilationResult, CompilationSession, CompilationSnapshot } from './types.js';
2
+ export declare class DefaultCompilationSession implements CompilationSession {
3
+ private readonly candidateIndex;
4
+ private readonly graph;
5
+ private readonly retainedCandidates;
6
+ private validatedClassSet;
7
+ private invalidatedScopes;
8
+ private revision;
9
+ update(snapshot: CompilationSnapshot): CompilationResult;
10
+ commitValidation(revision: number, validatedClassSet: Iterable<string>, graph?: CompilationGraphSnapshot): CompilationResult;
11
+ private createResult;
12
+ dispose(): void;
13
+ }
@@ -0,0 +1,26 @@
1
+ import type { CompilerShadowRunSnapshot } from './shadow-report-session.js';
2
+ export declare const COMPILER_SHADOW_GATE_ENV = "WEAPP_TAILWINDCSS_COMPILER_SHADOW_GATE";
3
+ export type CompilerShadowGateMode = 'off' | 'report' | 'error';
4
+ export type CompilerShadowGateIssue = 'semantic-mismatch' | 'truncated-report' | 'dropped-report';
5
+ export interface CompilerShadowGateResult {
6
+ mode: CompilerShadowGateMode;
7
+ passed: boolean;
8
+ issues: CompilerShadowGateIssue[];
9
+ snapshot: CompilerShadowRunSnapshot;
10
+ }
11
+ export interface CompilerShadowGatePayload {
12
+ mode: CompilerShadowGateMode;
13
+ passed: boolean;
14
+ issues: CompilerShadowGateIssue[];
15
+ revision: number;
16
+ summary: CompilerShadowRunSnapshot['summary'];
17
+ }
18
+ export interface FinalizeCompilerShadowRunOptions {
19
+ emit?: ((payload: CompilerShadowGatePayload) => void) | undefined;
20
+ env?: NodeJS.ProcessEnv | undefined;
21
+ revision?: number | undefined;
22
+ }
23
+ export declare function resolveCompilerShadowGateMode(env?: NodeJS.ProcessEnv): CompilerShadowGateMode;
24
+ export declare function evaluateCompilerShadowGate(snapshot: CompilerShadowRunSnapshot, mode?: CompilerShadowGateMode): CompilerShadowGateResult;
25
+ export declare function emitCompilerShadowGateResult(payload: CompilerShadowGatePayload): void;
26
+ export declare function finalizeCompilerShadowRun(owner: object, options?: FinalizeCompilerShadowRunOptions): CompilerShadowGateResult | undefined;
@@ -0,0 +1,37 @@
1
+ import type { CompilerShadowReport } from './shadow-report.js';
2
+ export interface CompilerShadowRunSummary {
3
+ total: number;
4
+ matched: number;
5
+ mismatched: number;
6
+ truncated: number;
7
+ dropped: number;
8
+ }
9
+ export interface CompilerShadowRunSnapshot {
10
+ revision: number;
11
+ completed: boolean;
12
+ reports: CompilerShadowReport[];
13
+ summary: CompilerShadowRunSummary;
14
+ }
15
+ export declare class CompilerShadowReportSession {
16
+ private readonly maxReports;
17
+ private readonly reportsByScope;
18
+ private revision;
19
+ private dropped;
20
+ private completed;
21
+ private disposed;
22
+ constructor(maxReports?: number);
23
+ beginRun(): number;
24
+ record(report: CompilerShadowReport, revision?: number): boolean;
25
+ getRevision(): number;
26
+ completeRun(revision?: number): CompilerShadowRunSnapshot | undefined;
27
+ snapshot(): CompilerShadowRunSnapshot;
28
+ dispose(): void;
29
+ private ensureActive;
30
+ }
31
+ export declare function getCompilerShadowReportSession(owner: object): CompilerShadowReportSession;
32
+ export declare function beginCompilerShadowRun(owner: object): number;
33
+ export declare function getCompilerShadowRunRevision(owner: object): number;
34
+ export declare function recordCompilerShadowReport(owner: object, report: CompilerShadowReport, revision?: number | undefined): boolean;
35
+ export declare function getCompilerShadowRunSnapshot(owner: object): CompilerShadowRunSnapshot;
36
+ export declare function completeCompilerShadowReportRun(owner: object, revision?: number | undefined): CompilerShadowRunSnapshot | undefined;
37
+ export declare function disposeCompilerShadowReportSession(owner: object): void;
@@ -0,0 +1,15 @@
1
+ import type { ArtifactSemanticDifference, ArtifactSemanticSummary, CompareArtifactSemanticsOptions } from './semantic-css.js';
2
+ import type { GenerationArtifact } from './types.js';
3
+ export interface CompilerShadowReport {
4
+ file: string;
5
+ scopeId: string;
6
+ equal: boolean;
7
+ differences: ArtifactSemanticDifference[];
8
+ truncated: boolean;
9
+ legacy: ArtifactSemanticSummary;
10
+ graph: ArtifactSemanticSummary;
11
+ }
12
+ export interface CreateCompilerShadowReportOptions extends CompareArtifactSemanticsOptions {
13
+ scopeId?: string | undefined;
14
+ }
15
+ export declare function createCompilerShadowReport(file: string, legacy: GenerationArtifact | undefined, graph: GenerationArtifact | undefined, options?: CreateCompilerShadowReportOptions): CompilerShadowReport;
@@ -0,0 +1,32 @@
1
+ import type { SourceGraphEdge, SourceGraphNode } from './types.js';
2
+ export declare class SourceGraph {
3
+ private readonly edges;
4
+ private readonly nodes;
5
+ replace(nodes: Iterable<SourceGraphNode>, edges: Iterable<SourceGraphEdge>): void;
6
+ getNode(id: string): {
7
+ scope: {
8
+ id: string;
9
+ kind: import("./types.js").SourceScopeKind;
10
+ };
11
+ id: string;
12
+ kind: import("./types.js").SourceKind;
13
+ content?: string | undefined;
14
+ } | undefined;
15
+ getNodes(): {
16
+ scope: {
17
+ id: string;
18
+ kind: import("./types.js").SourceScopeKind;
19
+ };
20
+ id: string;
21
+ kind: import("./types.js").SourceKind;
22
+ content?: string | undefined;
23
+ }[];
24
+ getEdges(): {
25
+ from: string;
26
+ to: string;
27
+ kind: import("./types.js").SourceEdgeKind;
28
+ }[];
29
+ getDependents(id: string): string[];
30
+ clear(): void;
31
+ private edgeKey;
32
+ }
@@ -0,0 +1,22 @@
1
+ import type { TailwindResolvedSource, WeappTailwindcssGenerateOptions, WeappTailwindcssGenerateResult } from '../generator/index.js';
2
+ export type TailwindGenerationPoolChange = {
3
+ type: 'all';
4
+ } | {
5
+ type: 'dependencies';
6
+ paths?: Iterable<string> | undefined;
7
+ } | {
8
+ type: 'source';
9
+ source: TailwindResolvedSource;
10
+ };
11
+ export declare class TailwindGenerationSessionPool {
12
+ private readonly generators;
13
+ private disposed;
14
+ generate(source: TailwindResolvedSource, options?: WeappTailwindcssGenerateOptions): Promise<WeappTailwindcssGenerateResult>;
15
+ validateCandidates(source: TailwindResolvedSource, candidates: Iterable<string>): Promise<Set<string>>;
16
+ invalidate(change: TailwindGenerationPoolChange): void;
17
+ dispose(): void;
18
+ get size(): number;
19
+ private getGenerator;
20
+ }
21
+ export declare function getTailwindGenerationSessionPool(owner: object): TailwindGenerationSessionPool;
22
+ export declare function disposeTailwindGenerationSessionPool(owner: object): void;
@@ -0,0 +1,95 @@
1
+ import type { Root } from 'postcss';
2
+ export type CompilerMode = 'legacy' | 'shadow' | 'graph';
3
+ export type CssFragmentKind = 'tailwind' | 'theme' | 'preflight' | 'user' | 'import';
4
+ export type CssStage = 'raw' | 'framework-processed' | 'adapted';
5
+ export type SourceKind = 'css' | 'template' | 'script' | 'config' | 'asset';
6
+ export type SourceScopeKind = 'global' | 'subpackage' | 'component';
7
+ export type SourceEdgeKind = 'imports' | 'candidate-source' | 'depends-on' | 'emits-to';
8
+ export interface SourceScope {
9
+ id: string;
10
+ kind: SourceScopeKind;
11
+ }
12
+ export interface SourceGraphNode {
13
+ id: string;
14
+ kind: SourceKind;
15
+ scope: SourceScope;
16
+ content?: string | undefined;
17
+ }
18
+ export interface SourceGraphEdge {
19
+ from: string;
20
+ to: string;
21
+ kind: SourceEdgeKind;
22
+ }
23
+ export interface CssFragment {
24
+ id: string;
25
+ kind: CssFragmentKind;
26
+ root: Root;
27
+ sourceId: string;
28
+ scope: SourceScope;
29
+ order: number;
30
+ stage: CssStage;
31
+ }
32
+ export interface GenerationArtifact {
33
+ fragments: CssFragment[];
34
+ classSet: Set<string>;
35
+ rawCandidates: Set<string>;
36
+ dependencies: string[];
37
+ sourceEntries: string[];
38
+ revision?: number | undefined;
39
+ }
40
+ export interface CandidateChange {
41
+ sourceId: string;
42
+ addedCandidates: Set<string>;
43
+ removedCandidates: Set<string>;
44
+ }
45
+ export type CompilationChange = CandidateChange | {
46
+ sourceId: string;
47
+ type: 'source-removed';
48
+ } | {
49
+ sourceId: string;
50
+ type: 'dependency-changed';
51
+ } | {
52
+ sourceId: string;
53
+ type: 'config-changed';
54
+ };
55
+ export interface CompilationGraphSnapshot {
56
+ nodes: SourceGraphNode[];
57
+ edges: SourceGraphEdge[];
58
+ }
59
+ export interface CompilationSnapshot extends CompilationGraphSnapshot {
60
+ candidatesBySource?: Iterable<readonly [string, Iterable<string>]> | undefined;
61
+ changes?: CompilationChange[] | undefined;
62
+ preserveDeletedCss?: boolean | undefined;
63
+ validatedClassSet?: Iterable<string> | undefined;
64
+ }
65
+ export interface CompilationResult {
66
+ revision: number;
67
+ candidates: Set<string>;
68
+ candidatesBySource: Map<string, Set<string>>;
69
+ validatedClassSet: Set<string>;
70
+ invalidatedScopes: Set<string>;
71
+ graphEdges: SourceGraphEdge[];
72
+ graphNodes: SourceGraphNode[];
73
+ }
74
+ export interface CompilationSession {
75
+ update: (snapshot: CompilationSnapshot) => CompilationResult | Promise<CompilationResult>;
76
+ commitValidation: (revision: number, validatedClassSet: Iterable<string>, graph?: CompilationGraphSnapshot | undefined) => CompilationResult | Promise<CompilationResult>;
77
+ dispose: () => void;
78
+ }
79
+ export interface PlatformGenerationRequest {
80
+ sourceId: string;
81
+ scope: SourceScope;
82
+ css: string;
83
+ candidates: Set<string>;
84
+ }
85
+ export interface PreparedPlatformGenerationRequest extends PlatformGenerationRequest {
86
+ restoreCandidates?: ReadonlyMap<string, string> | undefined;
87
+ }
88
+ export interface PlatformAdapterContext {
89
+ stage: CssStage;
90
+ }
91
+ export interface PlatformAdapter {
92
+ id: 'web' | 'mini-program' | 'native-app';
93
+ prepare: (request: PlatformGenerationRequest) => PreparedPlatformGenerationRequest;
94
+ transform: (artifact: GenerationArtifact, context: PlatformAdapterContext) => Promise<GenerationArtifact>;
95
+ }
@@ -2,8 +2,8 @@ export declare const runtimeAopLoader = "weapp-tw-runtime-aop-loader";
2
2
  export declare const WeappTailwindcssWebpackPluginOptimizeChunkAssetsHooks = "WeappTailwindcssWebpackPluginOptimizeChunkAssetsHooks";
3
3
  export declare const pluginName = "weapp-tailwindcss";
4
4
  export declare const vitePluginName = "weapp-tailwindcss:adaptor";
5
- export declare const WEAPP_TW_REQUIRED_NODE_VERSION = "20.19.0";
6
- export declare const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^20.19.0 || >=22.12.0";
5
+ export declare const WEAPP_TW_REQUIRED_NODE_VERSION = "22.18.0";
6
+ export declare const WEAPP_TW_REQUIRED_NODE_VERSION_RANGE = "^22.18.0 || >=24.11.0";
7
7
  export declare const WEAPP_TW_VERSION: string;
8
8
  export declare const DEFAULT_RUNTIME_PACKAGE_REPLACEMENTS: {
9
9
  readonly 'tailwind-merge': "@weapp-tailwindcss/merge";
@@ -1,3 +1,3 @@
1
- import type { InternalUserDefinedOptions, UserDefinedOptions } from '../types';
1
+ import type { InternalUserDefinedOptions, UserDefinedOptions } from '../types/index.js';
2
2
  export declare function createCompilerContextCacheKey(opts?: UserDefinedOptions): string | undefined;
3
3
  export declare function withCompilerContextCache(opts: UserDefinedOptions | undefined, factory: () => InternalUserDefinedOptions): InternalUserDefinedOptions;
@@ -1,2 +1,2 @@
1
- import type { ICustomAttributes, ICustomAttributesEntities } from '../types';
1
+ import type { ICustomAttributes, ICustomAttributesEntities } from '../types/index.js';
2
2
  export declare function toCustomAttributesEntities(customAttributes?: ICustomAttributes): ICustomAttributesEntities;
@@ -1,6 +1,6 @@
1
- import type { ICustomAttributesEntities, InternalUserDefinedOptions } from '../types';
1
+ import type { ICustomAttributesEntities, InternalUserDefinedOptions } from '../types/index.js';
2
2
  export declare function createHandlersFromContext(ctx: InternalUserDefinedOptions, customAttributesEntities: ICustomAttributesEntities, cssCalcOptions: InternalUserDefinedOptions['cssCalc'], tailwindcssMajorVersion?: number): {
3
3
  styleHandler: import("@weapp-tailwindcss/postcss").StyleHandler;
4
- jsHandler: import("@/types").JsHandler;
5
- templateHandler: (rawSource: string, opt?: Pick<import("@/types").ITemplateHandlerOptions, "runtimeSet">) => Promise<string>;
4
+ jsHandler: import("../types/index.js").JsHandler;
5
+ templateHandler: (rawSource: string, opt?: Pick<import("../types/index.js").ITemplateHandlerOptions, "runtimeSet">) => Promise<string>;
6
6
  };
@@ -1,4 +1,4 @@
1
- import type { InternalUserDefinedOptions, TailwindcssRuntimeLike, UserDefinedOptions } from '../types';
1
+ import type { InternalUserDefinedOptions, TailwindcssRuntimeLike, UserDefinedOptions } from '../types/index.js';
2
2
  interface ClearTailwindcssRuntimeCacheOptions {
3
3
  removeDirectory?: boolean;
4
4
  }
@@ -1,2 +1,2 @@
1
- import type { InternalUserDefinedOptions } from '../types';
1
+ import type { InternalUserDefinedOptions } from '../types/index.js';
2
2
  export declare function resolveRuntimePackageReplacements(option: InternalUserDefinedOptions['replaceRuntimePackages']): Record<string, string> | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
2
- import type { InternalUserDefinedOptions } from '../types';
2
+ import type { InternalUserDefinedOptions } from '../types/index.js';
3
3
  export type ResolvedStyleOptions = Partial<IStyleHandlerOptions> & {
4
4
  appType?: InternalUserDefinedOptions['appType'] | undefined;
5
5
  };