weapp-tailwindcss 5.5.6 → 5.5.8

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 (276) hide show
  1. package/dist/{auto-DtU6f3X6.cjs → auto-B1OyRrE8.cjs} +1 -1
  2. package/dist/{auto-2dg_uhEJ.js → auto-ENr4xzzw.js} +1 -1
  3. package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +1 -1
  4. package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -1
  5. package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
  6. package/dist/bundlers/shared/css-source-trace.d.ts +2 -5
  7. package/dist/bundlers/shared/final-css-cleanup.d.ts +1 -1
  8. package/dist/bundlers/shared/framework-css-composition.d.ts +1 -1
  9. package/dist/bundlers/shared/framework-postcss.d.ts +1 -25
  10. package/dist/bundlers/shared/framework-user-css.d.ts +1 -4
  11. package/dist/bundlers/shared/generated-css-marker.d.ts +1 -10
  12. package/dist/bundlers/shared/generator-css/candidates.d.ts +1 -2
  13. package/dist/bundlers/shared/generator-css/class-selectors.d.ts +1 -3
  14. package/dist/bundlers/shared/generator-css/config-directive.d.ts +1 -2
  15. package/dist/bundlers/shared/generator-css/directives/fallback.d.ts +1 -11
  16. package/dist/bundlers/shared/generator-css/directives.d.ts +1 -25
  17. package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +1 -19
  18. package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +1 -23
  19. package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +1 -30
  20. package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +1 -2
  21. package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +1 -4
  22. package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +1 -12
  23. package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -2
  24. package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -1
  25. package/dist/bundlers/shared/generator-css/local-imports.d.ts +1 -1
  26. package/dist/bundlers/shared/generator-css/markers.d.ts +1 -28
  27. package/dist/bundlers/shared/generator-css/output-import-shell.d.ts +1 -8
  28. package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +1 -60
  29. package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +1 -3
  30. package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +1 -3
  31. package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +1 -3
  32. package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +1 -3
  33. package/dist/bundlers/shared/generator-css/pipeline.d.ts +1 -2
  34. package/dist/bundlers/shared/generator-css/result-helpers.d.ts +1 -6
  35. package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -1
  36. package/dist/bundlers/shared/generator-css/source-files.d.ts +1 -21
  37. package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +1 -13
  38. package/dist/bundlers/shared/generator-css/source-resolver/config.d.ts +1 -7
  39. package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +1 -33
  40. package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -3
  41. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -28
  42. package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -14
  43. package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +1 -4
  44. package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +1 -5
  45. package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +1 -16
  46. package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +1 -3
  47. package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +1 -5
  48. package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +1 -22
  49. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -7
  50. package/dist/bundlers/shared/generator-css/types.d.ts +1 -64
  51. package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -10
  52. package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +1 -3
  53. package/dist/bundlers/shared/generator-css/user-css/compile-functions.d.ts +1 -4
  54. package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +1 -6
  55. package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +1 -15
  56. package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +1 -13
  57. package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +1 -15
  58. package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -5
  59. package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +1 -10
  60. package/dist/bundlers/shared/generator-css/validate.d.ts +1 -7
  61. package/dist/bundlers/shared/generator-css.d.ts +1 -9
  62. package/dist/bundlers/shared/run-tasks.d.ts +1 -3
  63. package/dist/bundlers/shared/runtime-class-set.d.ts +1 -1
  64. package/dist/bundlers/shared/source-candidates/collector.d.ts +1 -8
  65. package/dist/bundlers/shared/source-candidates/scan-root.d.ts +1 -12
  66. package/dist/bundlers/shared/source-candidates/script.d.ts +1 -1
  67. package/dist/bundlers/shared/source-candidates/snapshot.d.ts +1 -19
  68. package/dist/bundlers/shared/source-candidates/source-priority.d.ts +1 -1
  69. package/dist/bundlers/shared/source-candidates/store.d.ts +1 -2
  70. package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -75
  71. package/dist/bundlers/shared/source-candidates/views.d.ts +1 -12
  72. package/dist/bundlers/shared/source-candidates.d.ts +1 -4
  73. package/dist/bundlers/shared/source-scan/css-entries.d.ts +1 -18
  74. package/dist/bundlers/shared/source-scan/dependencies.d.ts +1 -2
  75. package/dist/bundlers/shared/source-scan.d.ts +1 -16
  76. package/dist/bundlers/shared/static-config-content.d.ts +1 -5
  77. package/dist/bundlers/shared/style-handler-options.d.ts +1 -7
  78. package/dist/bundlers/shared/style-requests.d.ts +1 -5
  79. package/dist/bundlers/shared/v4-generation-core.d.ts +1 -20
  80. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
  81. package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +2 -2
  82. package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +1 -1
  83. package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -12
  84. package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +1 -4
  85. package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +4 -7
  86. package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -13
  87. package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +2 -2
  88. package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -1
  89. package/dist/bundlers/vite/source-candidates.d.ts +1 -1
  90. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +1 -1
  91. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +2 -7
  92. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +4 -8
  93. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +3 -3
  94. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -1
  95. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +2 -7
  96. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +1 -1
  97. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +1 -1
  98. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -1
  99. package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +6 -0
  100. package/dist/cache/index.d.ts +4 -4
  101. package/dist/cache/source.d.ts +29 -0
  102. package/dist/{cache-CBJFB1HN.cjs → cache-CzvIGfwS.cjs} +1 -0
  103. package/dist/compiler/composition.d.ts +1 -1
  104. package/dist/compiler/runtime-affecting-signature/js.d.ts +1 -0
  105. package/dist/compiler/semantic-css.d.ts +1 -1
  106. package/dist/compiler/types.d.ts +1 -1
  107. package/dist/{compiler-D3GBwxoa.js → compiler-CThodfGH.js} +3098 -3067
  108. package/dist/{compiler-C8FqI-P3.cjs → compiler-DbwS3329.cjs} +20979 -20870
  109. package/dist/core/compiler/generation-cache.d.ts +4 -2
  110. package/dist/core/compiler/types.d.ts +1 -1
  111. package/dist/core.cjs +7 -7
  112. package/dist/core.d.ts +2 -2
  113. package/dist/core.js +2 -2
  114. package/dist/css-cleanup-B6FUJC3z.cjs +1 -0
  115. package/dist/{css-imports-XvtI1zCY.cjs → css-imports-R_RDMjPz.cjs} +7 -21
  116. package/dist/css-macro/auto.d.ts +1 -1
  117. package/dist/css-macro/postcss.cjs +1 -1
  118. package/dist/css-macro.cjs +2 -2
  119. package/dist/css-macro.js +1 -1
  120. package/dist/final-css-cleanup-B6FUJC3z.cjs +1 -0
  121. package/dist/{final-css-cleanup-u_sI2p56.js → final-css-cleanup-BOzhuhGz.js} +3 -2
  122. package/dist/framework.cjs +1 -1
  123. package/dist/{v4-generation-core-Cz1D7wm1.cjs → generated-css-marker-B0RyziOH.cjs} +638 -1546
  124. package/dist/generation/candidates.d.ts +1 -0
  125. package/dist/generation/class-selectors.d.ts +4 -0
  126. package/dist/generation/config-directive.d.ts +1 -0
  127. package/dist/generation/directives/fallback.d.ts +1 -0
  128. package/dist/generation/directives.d.ts +1 -0
  129. package/dist/generation/framework-css-composition.d.ts +1 -0
  130. package/dist/generation/framework-postcss.d.ts +25 -0
  131. package/dist/generation/framework-user-css.d.ts +5 -0
  132. package/dist/generation/generation-helpers/preflight.d.ts +19 -0
  133. package/dist/generation/generation-helpers/results.d.ts +23 -0
  134. package/dist/generation/generation-helpers/runtime-isolation.d.ts +30 -0
  135. package/dist/generation/generation-helpers/source-order.d.ts +1 -0
  136. package/dist/generation/generation-helpers.d.ts +4 -0
  137. package/dist/generation/index.d.ts +9 -0
  138. package/dist/generation/legacy-compat.d.ts +12 -0
  139. package/dist/generation/legacy-selectors.d.ts +1 -0
  140. package/dist/generation/legacy-units.d.ts +1 -0
  141. package/dist/generation/local-imports.d.ts +1 -0
  142. package/dist/generation/markers.d.ts +1 -0
  143. package/dist/generation/output-import-shell.d.ts +1 -0
  144. package/dist/generation/pipeline/context.d.ts +60 -0
  145. package/dist/generation/pipeline/deferred-output.d.ts +3 -0
  146. package/dist/generation/pipeline/execution.d.ts +3 -0
  147. package/dist/generation/pipeline/fallback-output.d.ts +3 -0
  148. package/dist/generation/pipeline/ordered-output.d.ts +3 -0
  149. package/dist/generation/pipeline/preparation.d.ts +19 -0
  150. package/dist/generation/pipeline.d.ts +2 -0
  151. package/dist/generation/result-helpers.d.ts +6 -0
  152. package/dist/generation/scoped-rules.d.ts +1 -0
  153. package/dist/generation/service.d.ts +20 -0
  154. package/dist/generation/source-files.d.ts +21 -0
  155. package/dist/generation/source-resolver/apply-reference.d.ts +10 -0
  156. package/dist/generation/source-resolver/config.d.ts +7 -0
  157. package/dist/generation/source-resolver/configuration.d.ts +33 -0
  158. package/dist/generation/source-resolver/matching.d.ts +3 -0
  159. package/dist/generation/source-resolver/metadata.d.ts +28 -0
  160. package/dist/generation/source-resolver/postcss-source.d.ts +14 -0
  161. package/dist/generation/source-resolver/resolve-source.d.ts +4 -0
  162. package/dist/generation/source-resolver/resolve-sources.d.ts +5 -0
  163. package/dist/generation/source-resolver/single-source.d.ts +16 -0
  164. package/dist/generation/source-resolver/source-entries.d.ts +3 -0
  165. package/dist/generation/source-resolver/source-matching.d.ts +5 -0
  166. package/dist/generation/source-resolver/types.d.ts +22 -0
  167. package/dist/generation/source-resolver.d.ts +7 -0
  168. package/dist/generation/style-options.d.ts +8 -0
  169. package/dist/generation/style-requests.d.ts +5 -0
  170. package/dist/generation/types.d.ts +65 -0
  171. package/dist/generation/user-css/apply-only.d.ts +5 -0
  172. package/dist/generation/user-css/at-rules.d.ts +1 -0
  173. package/dist/generation/user-css/compile-functions.d.ts +3 -0
  174. package/dist/generation/user-css/generated-cleanup.d.ts +1 -0
  175. package/dist/generation/user-css/source-fragments.d.ts +1 -0
  176. package/dist/generation/user-css/transform.d.ts +1 -0
  177. package/dist/generation/user-css/user-layers.d.ts +1 -0
  178. package/dist/generation/user-css.d.ts +5 -0
  179. package/dist/generation/user-layer-order.d.ts +1 -0
  180. package/dist/generation/validate.d.ts +7 -0
  181. package/dist/generator-CxauQbx3.cjs +1868 -0
  182. package/dist/generator-oKZ5mCJ5.js +1637 -0
  183. package/dist/generator.cjs +10 -4
  184. package/dist/generator.js +1 -1
  185. package/dist/{gulp-BExe5RBF.cjs → gulp-CngHA9cU.cjs} +27 -26
  186. package/dist/{gulp-BhkIIk7J.js → gulp-DhddVxGA.js} +6 -5
  187. package/dist/gulp.cjs +1 -1
  188. package/dist/gulp.js +1 -1
  189. package/dist/{hmr-timing-CoiJIqDu.cjs → hmr-timing-Dc4c1VRg.cjs} +13 -13
  190. package/dist/{hmr-timing-B9Yt86-U.js → hmr-timing-xPpat-km.js} +518 -1360
  191. package/dist/index.cjs +7 -7
  192. package/dist/index.d.ts +1 -1
  193. package/dist/index.js +5 -5
  194. package/dist/js/ModuleGraph.d.ts +3 -1
  195. package/dist/js/babel/analyze.d.ts +6 -0
  196. package/dist/js/babel.d.ts +1 -2
  197. package/dist/js/fast-path/analysis.d.ts +14 -0
  198. package/dist/js/fast-path/oxc.d.ts +1 -1
  199. package/dist/js/oxc-parser.d.ts +4 -0
  200. package/dist/pipeline-helpers-EUud9R2K.cjs +516 -0
  201. package/dist/postcss-html-transform.cjs +1 -1
  202. package/dist/postcss.cjs +3 -2
  203. package/dist/postcss.d.ts +1 -1
  204. package/dist/postcss.js +3 -2
  205. package/dist/presets.cjs +3 -3
  206. package/dist/presets.js +2 -2
  207. package/dist/project-sources/candidates/collector.d.ts +8 -0
  208. package/dist/project-sources/candidates/scan-root.d.ts +12 -0
  209. package/dist/project-sources/candidates/script.d.ts +1 -0
  210. package/dist/project-sources/candidates/snapshot.d.ts +19 -0
  211. package/dist/project-sources/candidates/source-priority.d.ts +1 -0
  212. package/dist/project-sources/candidates/store.d.ts +2 -0
  213. package/dist/project-sources/candidates/types-and-cache.d.ts +75 -0
  214. package/dist/project-sources/candidates/views.d.ts +12 -0
  215. package/dist/project-sources/candidates.d.ts +4 -0
  216. package/dist/project-sources/css-entries.d.ts +18 -0
  217. package/dist/project-sources/dependencies.d.ts +2 -0
  218. package/dist/project-sources/index.d.ts +16 -0
  219. package/dist/project-sources/static-config-content.d.ts +5 -0
  220. package/dist/reset.cjs +1 -1
  221. package/dist/{rolldown-runtime-Ctb5zv51.cjs → rolldown-runtime-fg3euq-1.cjs} +7 -0
  222. package/dist/rspack.cjs +4 -4
  223. package/dist/rspack.js +2 -2
  224. package/dist/{runtime-state-XYSycuGu.cjs → runtime-state-BOzuVoKl.cjs} +1 -1
  225. package/dist/{scoped-generator-B6Y1bxzM.js → scoped-generator-DlQrVbuC.js} +7 -6
  226. package/dist/{scoped-generator-BUBls_oM.cjs → scoped-generator-lbTwL6mD.cjs} +9 -9
  227. package/dist/{source-candidate-scan-signature-DNuGKTqf.js → source-candidate-scan-signature-BjVQYL-C.js} +3 -3
  228. package/dist/{source-candidate-scan-signature-BtJZp28T.cjs → source-candidate-scan-signature-nG-rg809.cjs} +4 -4
  229. package/dist/style-injector/internal.d.ts +35 -35
  230. package/dist/style-injector/options.d.ts +1 -1
  231. package/dist/tailwindcss/miniprogram.d.ts +1 -1
  232. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -1
  233. package/dist/tailwindcss/source-scan/inline-source.d.ts +1 -7
  234. package/dist/tailwindcss/source-scan.d.ts +3 -32
  235. package/dist/tailwindcss/v4/css-sources.d.ts +1 -1
  236. package/dist/tailwindcss/v4/preflight.d.ts +1 -3
  237. package/dist/tailwindcss/v4/rpx-theme-warning.d.ts +4 -0
  238. package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
  239. package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +2 -3
  240. package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +1 -1
  241. package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +1 -6
  242. package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +5 -2
  243. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +3 -7
  244. package/dist/tailwindcss/v4-engine/source.d.ts +1 -1
  245. package/dist/tailwindcss/v4-engine/types.d.ts +3 -1
  246. package/dist/{tailwindcss-CBYjzRmV.cjs → tailwindcss-U3KIUegn.cjs} +65 -264
  247. package/dist/{tailwindcss-B_4E52WF.js → tailwindcss-kSd0ykiX.js} +71 -243
  248. package/dist/{transform-CkEnJYIP.js → transform-BAon9ykq.js} +25 -16
  249. package/dist/{transform-FkqbTBJR.cjs → transform-DVg4q8hh.cjs} +32 -23
  250. package/dist/types/index.d.ts +2 -2
  251. package/dist/types/user-defined-options/general.d.ts +1 -1
  252. package/dist/uni-app-x/border-preflight.d.ts +1 -1
  253. package/dist/uni-app-x/component-local-style.d.ts +3 -1
  254. package/dist/uni-app-x/vite/style-result.d.ts +1 -1
  255. package/dist/utils/run-tasks.d.ts +3 -0
  256. package/dist/vite/web.cjs +1 -1
  257. package/dist/vite/web.js +1 -1
  258. package/dist/{vite-lP35OguX.js → vite-D-RGkmOE.js} +62 -674
  259. package/dist/{vite-DxuKPZlp.cjs → vite-IX83wh_L.cjs} +217 -828
  260. package/dist/vite.cjs +1 -1
  261. package/dist/vite.js +1 -1
  262. package/dist/{watch-dependencies-GbC14Rlt.cjs → watch-dependencies-C1so1whD.cjs} +14 -1
  263. package/dist/weapp-tw-css-generation-loader.cjs +4 -3
  264. package/dist/weapp-tw-css-import-rewrite-loader.cjs +33 -28
  265. package/dist/weapp-tw-runtime-classset-loader.cjs +5 -18
  266. package/dist/{web-Dfz_jpNj.js → web--kA4HUTm.js} +16 -115
  267. package/dist/{web-DhDxhlkq.cjs → web-DHfZ_KC9.cjs} +83 -192
  268. package/dist/{webpack-R2Sbggiy.cjs → webpack-BetjemzT.cjs} +87 -87
  269. package/dist/{webpack-D6jp1o3m.js → webpack-Bhkd27Rs.js} +28 -441
  270. package/dist/webpack.cjs +1 -1
  271. package/dist/webpack.js +1 -1
  272. package/package.json +12 -7
  273. package/dist/final-css-cleanup-CDTmVAye.cjs +0 -1
  274. package/dist/generator-Bvr4WmuF.cjs +0 -3891
  275. package/dist/generator-C0BJjyLM.js +0 -3343
  276. package/dist/pipeline-helpers-BOjTEmMi.cjs +0 -971
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_framework = require("./framework.cjs");
3
- const require_generator = require("./generator-Bvr4WmuF.cjs");
4
- const require_gulp = require("./gulp-BExe5RBF.cjs");
3
+ const require_generator = require("./generator-CxauQbx3.cjs");
4
+ const require_gulp = require("./gulp-CngHA9cU.cjs");
5
5
  const require_postcss = require("./postcss.cjs");
6
- const require_vite = require("./vite-DxuKPZlp.cjs");
7
- const require_webpack = require("./webpack-R2Sbggiy.cjs");
6
+ const require_vite = require("./vite-IX83wh_L.cjs");
7
+ const require_webpack = require("./webpack-BetjemzT.cjs");
8
8
  require("./webpack.cjs");
9
- let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
9
+ let _weapp_tailwindcss_postcss_transform = require("@weapp-tailwindcss/postcss/transform");
10
10
  exports.WeappTailwindcss = require_vite.WeappTailwindcss;
11
11
  exports.createPlugins = require_gulp.createPlugins;
12
12
  exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
@@ -32,13 +32,13 @@ exports.resolveUniUtsPlatform = require_framework.resolveUniUtsPlatform;
32
32
  Object.defineProperty(exports, "unitConversionComposeRules", {
33
33
  enumerable: true,
34
34
  get: function() {
35
- return _weapp_tailwindcss_postcss.unitConversionComposeRules;
35
+ return _weapp_tailwindcss_postcss_transform.unitConversionComposeRules;
36
36
  }
37
37
  });
38
38
  Object.defineProperty(exports, "unitConversionPresets", {
39
39
  enumerable: true,
40
40
  get: function() {
41
- return _weapp_tailwindcss_postcss.unitConversionPresets;
41
+ return _weapp_tailwindcss_postcss_transform.unitConversionPresets;
42
42
  }
43
43
  });
44
44
  exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
package/dist/index.d.ts CHANGED
@@ -7,4 +7,4 @@ export type { WeappTailwindcssPostcssPluginOptions } from './postcss.js';
7
7
  export type * from './types/index.js';
8
8
  export { WeappTailwindcss } from './vite.js';
9
9
  export { weappTailwindcssPackageDir } from './webpack.js';
10
- export { unitConversionComposeRules, unitConversionPresets, } from '@weapp-tailwindcss/postcss';
10
+ export { unitConversionComposeRules, unitConversionPresets, } from '@weapp-tailwindcss/postcss/transform';
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.js";
2
- import { t as createWeappTailwindcssGenerator } from "./generator-C0BJjyLM.js";
3
- import { t as createPlugins } from "./gulp-BhkIIk7J.js";
2
+ import { t as createWeappTailwindcssGenerator } from "./generator-oKZ5mCJ5.js";
3
+ import { t as createPlugins } from "./gulp-DhddVxGA.js";
4
4
  import weappTailwindcssPostcssPlugin from "./postcss.js";
5
- import { t as WeappTailwindcss } from "./vite-lP35OguX.js";
6
- import { n as weappTailwindcssPackageDir } from "./webpack-D6jp1o3m.js";
5
+ import { t as WeappTailwindcss } from "./vite-D-RGkmOE.js";
6
+ import { n as weappTailwindcssPackageDir } from "./webpack-Bhkd27Rs.js";
7
7
  import "./webpack.js";
8
- import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
8
+ import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss/transform";
9
9
  export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
@@ -1,7 +1,9 @@
1
1
  import type { JsModuleGraphOptions, LinkedJsModuleResult } from '../types/index.js';
2
+ import type { EvalHandler } from './evalTransforms.js';
2
3
  import type { ModuleGraphEntry } from './module-graph/types.js';
3
4
  export type { ModuleGraphEntry } from './module-graph/types.js';
4
5
  export declare class JsModuleGraph {
6
+ private readonly evalHandler;
5
7
  private readonly modules;
6
8
  private readonly queue;
7
9
  private readonly resolve;
@@ -12,7 +14,7 @@ export declare class JsModuleGraph {
12
14
  private readonly parserOptions?;
13
15
  private readonly rootFilename;
14
16
  private readonly ignoredExports;
15
- constructor(entry: ModuleGraphEntry, graphOptions: JsModuleGraphOptions);
17
+ constructor(entry: ModuleGraphEntry, graphOptions: JsModuleGraphOptions, evalHandler: EvalHandler);
16
18
  build(): Record<string, LinkedJsModuleResult> | undefined;
17
19
  private collectDependencies;
18
20
  }
@@ -0,0 +1,6 @@
1
+ import type { ParseResult } from '@babel/parser';
2
+ import type { File } from '@babel/types';
3
+ import type { IJsHandlerOptions } from '../../types/index.js';
4
+ import type { EvalHandler } from '../evalTransforms.js';
5
+ import type { SourceAnalysis } from '../sourceAnalysis.js';
6
+ export declare function analyzeSource(ast: ParseResult<File>, options: IJsHandlerOptions, handler: EvalHandler, collectModuleMetadata?: boolean): SourceAnalysis;
@@ -2,10 +2,9 @@ import type { ParseResult } from '@babel/parser';
2
2
  import type { File } from '@babel/types';
3
3
  import type { IJsHandlerOptions, JsHandlerResult } from '../types/index.js';
4
4
  import type { EvalHandler } from './evalTransforms.js';
5
- import type { SourceAnalysis } from './sourceAnalysis.js';
6
5
  import { babelParse } from './babel/parse.js';
7
6
  import { processUpdatedSource } from './babel/process.js';
8
- export declare function analyzeSource(ast: ParseResult<File>, options: IJsHandlerOptions, handler?: EvalHandler, collectModuleMetadata?: boolean): SourceAnalysis;
7
+ export declare function analyzeSource(ast: ParseResult<File>, options: IJsHandlerOptions, handler?: EvalHandler, collectModuleMetadata?: boolean): import("./sourceAnalysis.js").SourceAnalysis;
9
8
  export declare function jsHandler(rawSource: string, options: IJsHandlerOptions): JsHandlerResult;
10
9
  export { babelParse, processUpdatedSource };
11
10
  export { genCacheKey, parseCache } from './babel/parse.js';
@@ -0,0 +1,14 @@
1
+ import type { IJsHandlerOptions } from '../../types/index.js';
2
+ export interface LiteralSpan {
3
+ kind: 'string' | 'template';
4
+ start: number;
5
+ end: number;
6
+ value: string;
7
+ }
8
+ interface SourceAnalysis {
9
+ literals: LiteralSpan[];
10
+ hasModuleDeclarations: boolean;
11
+ hasTaggedTemplate: boolean;
12
+ }
13
+ export declare function getOxcSourceAnalysis(rawSource: string, options: IJsHandlerOptions): SourceAnalysis | undefined;
14
+ export {};
@@ -1,4 +1,4 @@
1
1
  import type { IJsHandlerOptions, JsHandlerResult } from '../../types/index.js';
2
- export declare function isOxcParserRuntimeSupported(version?: string): boolean;
2
+ export { isOxcParserRuntimeSupported } from '../oxc-parser.js';
3
3
  export declare function canUseOxcJsFastPath(options: IJsHandlerOptions): boolean;
4
4
  export declare function oxcJsHandler(rawSource: string, options: IJsHandlerOptions): JsHandlerResult | undefined;
@@ -0,0 +1,4 @@
1
+ type OxcParser = Pick<typeof import('oxc-parser'), 'parseSync'>;
2
+ export declare function isOxcParserRuntimeSupported(version?: string): boolean;
3
+ export declare function loadOxcParser(): OxcParser | undefined;
4
+ export {};
@@ -0,0 +1,516 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
2
+ const require_generator = require("./generator-CxauQbx3.cjs");
3
+ const require_compiler = require("./compiler-DbwS3329.cjs");
4
+ const require_defaults = require("./defaults-CyX5iO9y.cjs");
5
+ const require_generated_css_marker = require("./generated-css-marker-B0RyziOH.cjs");
6
+ require("./final-css-cleanup-B6FUJC3z.cjs");
7
+ require("./css-cleanup-B6FUJC3z.cjs");
8
+ let node_path = require("node:path");
9
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
10
+ let node_process = require("node:process");
11
+ node_process = require_rolldown_runtime.__toESM(node_process, 1);
12
+ let _weapp_tailwindcss_postcss_transform = require("@weapp-tailwindcss/postcss/transform");
13
+ let _weapp_core_escape = require("@weapp-core/escape");
14
+ //#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/runtime-candidates.ts
15
+ function isRuntimeTransformCandidate(candidate) {
16
+ return candidate.length > 0 && !candidate.includes("=") && !candidate.includes("<") && !candidate.includes(">") && !candidate.includes("${");
17
+ }
18
+ //#endregion
19
+ //#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.ts
20
+ function collectGeneratedCssRuntimeCandidates(source) {
21
+ const candidates = (0, _weapp_tailwindcss_postcss_transform.collectGeneratedCssClassCandidates)(source);
22
+ for (const candidate of candidates) if (!isRuntimeTransformCandidate(candidate)) candidates.delete(candidate);
23
+ return candidates;
24
+ }
25
+ function resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) {
26
+ return styleOptions.cssPreflight ?? compilerOptions.cssPreflight ?? require_defaults.getDefaultCssPreflight();
27
+ }
28
+ function resolveExistingWebpackCssPreflight(compilerOptions, styleOptions, source) {
29
+ return (0, _weapp_tailwindcss_postcss_transform.hasMiniProgramPreflightSelector)(source) ? resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) : void 0;
30
+ }
31
+ function collectRuntimeTokenSignatureParts(source) {
32
+ return source.match(/[\w-]+_[A-Z][\w-]*/gi) ?? [];
33
+ }
34
+ function hasMissingRuntimeCandidates(classSet, candidates) {
35
+ if (!classSet || !candidates?.size) return false;
36
+ for (const candidate of candidates) if (isRuntimeTransformCandidate(candidate) && !classSet.has(candidate)) return true;
37
+ return false;
38
+ }
39
+ function hasStaleRuntimeCandidates(classSet, candidates) {
40
+ if (!classSet || !candidates) return false;
41
+ for (const candidate of classSet) if (isRuntimeTransformCandidate(candidate) && !candidates.has(candidate)) return true;
42
+ return false;
43
+ }
44
+ function resolveGeneratedCssRuntimeCandidates(source, fallbackClassSet) {
45
+ const classSet = collectGeneratedCssRuntimeCandidates(source);
46
+ if (classSet.size > 0 || fallbackClassSet === void 0) return classSet;
47
+ return fallbackClassSet;
48
+ }
49
+ function getRuntimeClassSetSync(tailwindRuntime) {
50
+ if (typeof tailwindRuntime.getClassSetSync !== "function") return /* @__PURE__ */ new Set();
51
+ try {
52
+ return new Set(tailwindRuntime.getClassSetSync() ?? []);
53
+ } catch {
54
+ return /* @__PURE__ */ new Set();
55
+ }
56
+ }
57
+ function toMb(bytes) {
58
+ return Math.round(bytes / 1024 / 1024);
59
+ }
60
+ function pruneMapToMaxSize(map, maxSize) {
61
+ while (map.size > maxSize) {
62
+ const oldestKey = map.keys().next().value;
63
+ if (oldestKey === void 0) break;
64
+ map.delete(oldestKey);
65
+ }
66
+ }
67
+ function pruneWebpackCssHandlerOptionCaches(cssHandlerOptionsCache, cssUserHandlerOptionsCache, activeCssFiles) {
68
+ const activeSuffixes = [...activeCssFiles].map((file) => `:${file}`);
69
+ for (const key of cssHandlerOptionsCache.keys()) if (!activeSuffixes.some((suffix) => key.endsWith(suffix))) cssHandlerOptionsCache.delete(key);
70
+ for (const key of cssUserHandlerOptionsCache.keys()) if (!activeSuffixes.some((suffix) => key.endsWith(suffix))) cssUserHandlerOptionsCache.delete(key);
71
+ pruneMapToMaxSize(cssHandlerOptionsCache, 128);
72
+ pruneMapToMaxSize(cssUserHandlerOptionsCache, 128);
73
+ }
74
+ //#endregion
75
+ //#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/memory-trace.ts
76
+ function resolveWebpackMemoryDebugStats(context) {
77
+ if (node_process.default.env["WEAPP_TW_HMR_MEMORY_DEBUG"] !== "1") return;
78
+ const memory = node_process.default.memoryUsage();
79
+ const processCacheInstanceSize = context.cache.instance.size;
80
+ const processCacheHashMapSize = context.cache.hashMap.size;
81
+ return {
82
+ phase: context.phase,
83
+ process: {
84
+ rssMb: toMb(memory.rss),
85
+ heapTotalMb: toMb(memory.heapTotal),
86
+ heapUsedMb: toMb(memory.heapUsed),
87
+ externalMb: toMb(memory.external),
88
+ arrayBuffersMb: toMb(memory.arrayBuffers)
89
+ },
90
+ assets: {
91
+ active: context.activeAssetFiles,
92
+ activeCss: context.activeCssFiles
93
+ },
94
+ processCache: {
95
+ instance: processCacheInstanceSize,
96
+ hashMap: processCacheHashMapSize,
97
+ activeCacheKeys: context.activeProcessCacheKeys.size,
98
+ activeHashKeys: context.activeProcessHashKeys.size,
99
+ staleCacheKeys: Math.max(0, processCacheInstanceSize - context.activeProcessCacheKeys.size),
100
+ staleHashKeys: Math.max(0, processCacheHashMapSize - context.activeProcessHashKeys.size),
101
+ pruned: true,
102
+ pruneSkipped: false
103
+ },
104
+ webpackCss: {
105
+ handlerOptions: context.cssHandlerOptionsCache.size,
106
+ userHandlerOptions: context.cssUserHandlerOptionsCache.size,
107
+ maxHandlerOptions: 128
108
+ },
109
+ sourceCandidateScan: context.sourceCandidateScan,
110
+ tailwind: { v4: require_generator.getTailwindV4IncrementalGenerateCacheStats() }
111
+ };
112
+ }
113
+ function shouldInjectWebpackCssTracePreflight(_appType, cssHandlerOptions) {
114
+ if (includesTailwindPreflightImport(cssHandlerOptions.sourceOptions?.sourceCss)) return true;
115
+ return cssHandlerOptions.isMainChunk !== false;
116
+ }
117
+ function includesTailwindPreflightImport(source) {
118
+ if (!source) return false;
119
+ try {
120
+ let includesPreflight = false;
121
+ _weapp_tailwindcss_postcss_transform.postcss.parse(source).walkAtRules((rule) => {
122
+ if (rule.name === "tailwind") {
123
+ includesPreflight || (includesPreflight = rule.params.trim() === "base");
124
+ return;
125
+ }
126
+ if (rule.name !== "import") return;
127
+ const request = (0, _weapp_tailwindcss_postcss_transform.parseImportRequest)(rule.params)?.replaceAll("\\", "/");
128
+ includesPreflight || (includesPreflight = request === "tailwindcss" || request === "tailwindcss/preflight.css" || request?.endsWith("/tailwindcss/index.css") === true || request?.endsWith("/tailwindcss/preflight.css") === true);
129
+ });
130
+ return includesPreflight;
131
+ } catch {
132
+ return false;
133
+ }
134
+ }
135
+ function finalizeMiniProgramUserCssAssetSource(source, compilerOptions, isWebGeneratorTarget, options = {}) {
136
+ const styleOptions = require_compiler.resolveStyleOptionsFromContext(compilerOptions);
137
+ if (isWebGeneratorTarget) return source;
138
+ const finalized = (0, _weapp_tailwindcss_postcss_transform.finalizeMiniProgramCss)((0, _weapp_tailwindcss_postcss_transform.removeMiniProgramInteractiveSelectors)(source, {
139
+ active: styleOptions.cssRemoveActivePseudoClass ?? true,
140
+ hover: styleOptions.cssRemoveHoverPseudoClass ?? true
141
+ }), {
142
+ cssPreflight: options.cssPreflight === false ? false : !require_generated_css_marker.hasMiniProgramTailwindV4PreflightReset(source) ? resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) : void 0,
143
+ isTailwindcssV4: true,
144
+ tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
145
+ });
146
+ const output = (0, _weapp_tailwindcss_postcss_transform.removeTailwindV4StandaloneHostPreflightRule)(finalized);
147
+ return (0, _weapp_tailwindcss_postcss_transform.stripMiniProgramCssSpecificityPlaceholders)(output);
148
+ }
149
+ function shouldFallbackToWebpackUserCssOnGeneratorError(options) {
150
+ return !(0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(options.generatorRawSource, { importFallback: true }) && !(0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(options.generatorRawSource, { importFallback: true }) && !(0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(options.generatorRawSource) && !options.hasExplicitTailwindV4SourceCss && options.configuredMainCssEntryFilesLength === 0;
151
+ }
152
+ //#endregion
153
+ //#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.ts
154
+ function finalizeTracedWebpackCssAsset(css, cssHandlerOptions, options) {
155
+ if (options.finalized === true) return options.annotateCss(css);
156
+ if (options.isWebGeneratorTarget || !require_generated_css_marker.isCssSourceTraceEnabled(options.compilerOptions)) return options.annotateCss(css);
157
+ const finalized = finalizeMiniProgramUserCssAssetSource(css, options.compilerOptions, options.isWebGeneratorTarget, { cssPreflight: shouldInjectWebpackCssTracePreflight(options.compilerOptions.appType, cssHandlerOptions) });
158
+ return options.annotateCss(finalized);
159
+ }
160
+ function finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTarget, options = {}) {
161
+ const styleOptions = require_compiler.resolveStyleOptionsFromContext(compilerOptions);
162
+ if (isWebGeneratorTarget) {
163
+ if (options.generatedCss === true) return (0, _weapp_tailwindcss_postcss_transform.stripTrailingLineWhitespace)((0, _weapp_tailwindcss_postcss_transform.stripUnmatchedTailwindSourceMediaCloseFragments)((0, _weapp_tailwindcss_postcss_transform.stripTailwindSourceMediaFragments)((0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(source))));
164
+ const finalized = (0, _weapp_tailwindcss_postcss_transform.removeTailwindSourceDirectives)((0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(source), { importFallback: true });
165
+ return (0, _weapp_tailwindcss_postcss_transform.stripTrailingLineWhitespace)((0, _weapp_tailwindcss_postcss_transform.stripUnmatchedTailwindSourceMediaCloseFragments)((0, _weapp_tailwindcss_postcss_transform.stripTailwindSourceMediaFragments)((0, _weapp_tailwindcss_postcss_transform.removeTailwindV4GeneratorAtRules)(finalized))));
166
+ }
167
+ let finalized = (0, _weapp_tailwindcss_postcss_transform.removeTailwindSourceDirectives)((0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(source), { importFallback: true });
168
+ if (options.generatedCss !== true) {
169
+ finalized = (0, _weapp_tailwindcss_postcss_transform.finalizeMiniProgramCss)(finalized, {
170
+ cssPreflight: false,
171
+ isTailwindcssV4: true,
172
+ tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
173
+ });
174
+ finalized = (0, _weapp_tailwindcss_postcss_transform.dedupeMiniProgramPreflightSelectorRules)(finalized);
175
+ return (0, _weapp_tailwindcss_postcss_transform.stripMiniProgramCssSpecificityPlaceholders)((0, _weapp_tailwindcss_postcss_transform.removeMiniProgramInteractiveSelectors)(finalized, {
176
+ active: styleOptions.cssRemoveActivePseudoClass ?? true,
177
+ hover: styleOptions.cssRemoveHoverPseudoClass ?? true
178
+ }));
179
+ }
180
+ try {
181
+ finalized = (0, _weapp_tailwindcss_postcss_transform.pruneMiniProgramGeneratedCss)(finalized, { preservePreflight: options.cssPreflight !== false });
182
+ } catch {}
183
+ const shouldRemoveExistingPreflight = options.cssPreflight === false && options.preserveExistingPreflight === false;
184
+ if (shouldRemoveExistingPreflight) finalized = (0, _weapp_tailwindcss_postcss_transform.removeMiniProgramPreflightSelectorRule)(finalized);
185
+ const hasExistingMiniProgramPreflight = options.preserveExistingPreflight !== false && (0, _weapp_tailwindcss_postcss_transform.hasMiniProgramPreflightSelector)(source);
186
+ finalized = (0, _weapp_tailwindcss_postcss_transform.finalizeMiniProgramCss)(finalized, {
187
+ cssPreflight: options.cssPreflight === false && !hasExistingMiniProgramPreflight ? false : !require_generated_css_marker.hasMiniProgramTailwindV4PreflightReset(finalized) ? resolveExistingWebpackCssPreflight(compilerOptions, styleOptions, source) : void 0,
188
+ isTailwindcssV4: true,
189
+ tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
190
+ });
191
+ finalized = (0, _weapp_tailwindcss_postcss_transform.ensureWebpackMiniProgramTwContentInit)(finalized);
192
+ if (shouldRemoveExistingPreflight) finalized = (0, _weapp_tailwindcss_postcss_transform.removeMiniProgramPreflightSelectorRule)(finalized);
193
+ else finalized = (0, _weapp_tailwindcss_postcss_transform.dedupeMiniProgramPreflightSelectorRules)(finalized);
194
+ return (0, _weapp_tailwindcss_postcss_transform.stripMiniProgramCssSpecificityPlaceholders)((0, _weapp_tailwindcss_postcss_transform.removeMiniProgramInteractiveSelectors)(finalized, {
195
+ active: styleOptions.cssRemoveActivePseudoClass ?? true,
196
+ hover: styleOptions.cssRemoveHoverPseudoClass ?? true
197
+ }));
198
+ }
199
+ function finalizeWebpackCssAssetOutputSource(source, compilerOptions, isWebGeneratorTarget) {
200
+ if (isWebGeneratorTarget) return source;
201
+ const styleOptions = require_compiler.resolveStyleOptionsFromContext(compilerOptions);
202
+ const finalized = (0, _weapp_tailwindcss_postcss_transform.stripMiniProgramCssSpecificityPlaceholders)((0, _weapp_tailwindcss_postcss_transform.removeMiniProgramInteractiveSelectors)((0, _weapp_tailwindcss_postcss_transform.dedupeCoveredCssRules)((0, _weapp_tailwindcss_postcss_transform.dedupeMiniProgramPreflightSelectorRules)(source)), {
203
+ active: styleOptions.cssRemoveActivePseudoClass ?? true,
204
+ hover: styleOptions.cssRemoveHoverPseudoClass ?? true
205
+ }));
206
+ return (0, _weapp_tailwindcss_postcss_transform.finalizeMiniProgramCssStructure)(finalized);
207
+ }
208
+ function collectWebpackJsRuntimeCandidatesFromAssets(options) {
209
+ if (options.isWebGeneratorTarget) return;
210
+ const candidates = /* @__PURE__ */ new Set();
211
+ for (const file of options.jsAssets) {
212
+ const sourceLike = options.getAssetSource(file);
213
+ if (sourceLike === void 0) continue;
214
+ const source = stringifyWebpackSourceLike(sourceLike);
215
+ for (const candidate of require_generated_css_marker.collectStrictEscapedRuntimeCandidates(source, _weapp_core_escape.MappingChars2String, options.escapeFragments)) if (isRuntimeTransformCandidate(candidate)) candidates.add(candidate);
216
+ }
217
+ return candidates;
218
+ }
219
+ function collectWebpackJsRuntimeTokenSignature(options) {
220
+ if (options.isWebGeneratorTarget) return "";
221
+ const tokens = [];
222
+ for (const file of options.jsAssets) {
223
+ const sourceLike = options.getAssetSource(file);
224
+ if (sourceLike === void 0) continue;
225
+ tokens.push(...collectRuntimeTokenSignatureParts(stringifyWebpackSourceLike(sourceLike)));
226
+ }
227
+ return tokens.sort().join("\n");
228
+ }
229
+ function addRuntimeTransformCandidates(target, candidates) {
230
+ if (!candidates?.size) return;
231
+ for (const candidate of candidates) if (isRuntimeTransformCandidate(candidate)) target.add(candidate);
232
+ }
233
+ function createWebpackCssSourceTraceTokenSources(compilerOptions, webpackSourceCandidates) {
234
+ if (!require_generated_css_marker.isCssSourceTraceEnabled(compilerOptions) || !webpackSourceCandidates) return;
235
+ return require_generated_css_marker.createCssTokenSourceMap(webpackSourceCandidates.tokenSources, compilerOptions);
236
+ }
237
+ function stringifyOptionalWebpackSourceValue(value) {
238
+ return typeof value === "string" ? value : value?.toString() ?? "";
239
+ }
240
+ function stringifyWebpackSourceLike(source) {
241
+ if (typeof source === "string") return source;
242
+ const value = source.source();
243
+ return typeof value === "string" ? value : value.toString();
244
+ }
245
+ //#endregion
246
+ //#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.ts
247
+ function resolveWebpackGeneratorRawSource(rawSource, cssHandlerOptions) {
248
+ const sourceCss = cssHandlerOptions.sourceOptions?.sourceCss;
249
+ if (sourceCss && ((0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(sourceCss, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(sourceCss, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(sourceCss) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCss)(sourceCss) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCssMarkers)(sourceCss))) return sourceCss;
250
+ return rawSource;
251
+ }
252
+ function shouldConsumeWebpackLoaderGeneratedCss(options) {
253
+ if (!options.shouldRegenerateExplicitTailwindV4CssSource) return true;
254
+ if (options.watchMode === true && options.loaderGeneratedClassSet && options.sourceCandidates && hasStaleRuntimeCandidates(options.loaderGeneratedClassSet, options.sourceCandidates)) return false;
255
+ if (options.hasBundlerGeneratedCssMarker) return true;
256
+ if (options.watchMode === true && options.loaderGeneratedClassSet && options.sourceCandidates && hasMissingRuntimeCandidates(options.loaderGeneratedClassSet, options.sourceCandidates)) return false;
257
+ return Boolean(options.allowMarkerlessRegistryMatch && options.loaderGeneratedClassSet && options.sourceCandidates && !hasMissingRuntimeCandidates(options.loaderGeneratedClassSet, options.sourceCandidates) && !hasStaleRuntimeCandidates(options.loaderGeneratedClassSet, options.sourceCandidates));
258
+ }
259
+ function hasDeferredWebpackGeneratedCss(source, generatedClassSets) {
260
+ const selectors = (0, _weapp_tailwindcss_postcss_transform.collectRawSourceClassSelectors)(source);
261
+ for (const classSet of generatedClassSets) for (const candidate of classSet) if (selectors.has(candidate)) return true;
262
+ return false;
263
+ }
264
+ function hasUsableWebpackGeneratorCssSources(cssSources) {
265
+ return Array.isArray(cssSources) && cssSources.some((source) => typeof source?.css === "string" && source.css.length > 0);
266
+ }
267
+ function normalizeWebpackGeneratorCssSources(cssSources) {
268
+ if (!Array.isArray(cssSources)) return;
269
+ const normalized = cssSources.filter((source) => typeof source?.css === "string" && source.css.length > 0);
270
+ return normalized.length > 0 ? normalized : void 0;
271
+ }
272
+ function scopeWebpackGeneratorOptionsToCssSource(compilerOptions, sourceFile, options = {}) {
273
+ const withoutCssEntries = () => ({
274
+ ...compilerOptions,
275
+ ...compilerOptions.cssEntries?.length ? { cssEntries: [] } : {},
276
+ tailwindcss: {
277
+ ...compilerOptions.tailwindcss,
278
+ v4: {
279
+ ...compilerOptions.tailwindcss?.v4,
280
+ ...compilerOptions.tailwindcss?.v4?.cssEntries?.length || compilerOptions.cssEntries?.length ? { cssEntries: [] } : {}
281
+ }
282
+ }
283
+ });
284
+ if (!sourceFile) {
285
+ if (options.disableUnmatchedCssEntries !== true) return compilerOptions;
286
+ if (!compilerOptions.cssEntries?.length && !compilerOptions.tailwindcss?.v4?.cssEntries?.length) return compilerOptions;
287
+ return withoutCssEntries();
288
+ }
289
+ const resolvedSourceFile = node_path.default.resolve(sourceFile);
290
+ if (options.disableUnmatchedCssEntries === true) {
291
+ const configuredEntries = [...compilerOptions.cssEntries ?? [], ...compilerOptions.tailwindcss?.v4?.cssEntries ?? []];
292
+ if (configuredEntries.length > 0 && !configuredEntries.some((entry) => node_path.default.resolve(entry) === resolvedSourceFile)) return withoutCssEntries();
293
+ }
294
+ const cssEntries = compilerOptions.cssEntries?.filter((entry) => node_path.default.resolve(entry) === resolvedSourceFile);
295
+ const runtimeCssEntries = compilerOptions.tailwindcss?.v4?.cssEntries?.filter((entry) => node_path.default.resolve(entry) === resolvedSourceFile);
296
+ const hasScopedCssEntries = Boolean(cssEntries?.length);
297
+ const hasScopedRuntimeCssEntries = Boolean(runtimeCssEntries?.length);
298
+ if (!hasScopedCssEntries && !hasScopedRuntimeCssEntries) return compilerOptions;
299
+ return {
300
+ ...compilerOptions,
301
+ ...hasScopedCssEntries ? { cssEntries } : {},
302
+ tailwindcss: {
303
+ ...compilerOptions.tailwindcss,
304
+ v4: {
305
+ ...compilerOptions.tailwindcss?.v4,
306
+ ...hasScopedRuntimeCssEntries ? { cssEntries: runtimeCssEntries } : hasScopedCssEntries ? { cssEntries } : {}
307
+ }
308
+ }
309
+ };
310
+ }
311
+ function hasProcessedCssAssetUrl(css) {
312
+ return /url\(\s*["']?data:/i.test(css);
313
+ }
314
+ function shouldUseWebpackAssetAsGeneratorUserCss(rawSource, generatorRawSource, options = {}) {
315
+ const rawMarkers = (0, _weapp_tailwindcss_postcss_transform.collectWebpackAssetUserCssMarkers)(rawSource);
316
+ return rawSource !== generatorRawSource && (options.processed === true || !rawSource.includes("data:")) && !(0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(rawSource, { importFallback: true }) && !(0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(rawSource, { importFallback: true }) && !(0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(rawSource) && rawMarkers.size > 0 && !(0, _weapp_tailwindcss_postcss_transform.isOnlyWebpackTailwindGeneratedPreflightCss)(rawSource) && (!(0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCssMarkers)(rawSource) || (0, _weapp_tailwindcss_postcss_transform.hasAdditionalWebpackAssetUserCssMarkers)(rawSource, generatorRawSource));
317
+ }
318
+ //#endregion
319
+ //#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.ts
320
+ function createWebpackGeneratorCssSource(file, css) {
321
+ if (!file || !css || !(0, _weapp_tailwindcss_postcss_transform.hasWebpackTailwindSourceDirectives)(css)) return;
322
+ return {
323
+ file,
324
+ base: node_path.default.dirname(file),
325
+ css,
326
+ dependencies: [file]
327
+ };
328
+ }
329
+ function createWebpackUserCssSourceAppend(sources, generatorRawSource, currentSourceFile, shouldIncludeSource) {
330
+ const matchedSources = [];
331
+ const seen = /* @__PURE__ */ new Set();
332
+ for (const source of sources) {
333
+ const css = source.css;
334
+ if (!css || seen.has(css)) continue;
335
+ if (shouldIncludeSource && !shouldIncludeSource(source.file)) continue;
336
+ seen.add(css);
337
+ if ((source.processed === true || !css.includes("data:")) && (0, _weapp_tailwindcss_postcss_transform.hasAdditionalWebpackAssetUserCssMarkers)(css, generatorRawSource)) matchedSources.push({
338
+ css,
339
+ file: source.file,
340
+ processed: source.processed === true
341
+ });
342
+ }
343
+ const currentFile = currentSourceFile ? node_path.default.resolve(currentSourceFile) : void 0;
344
+ const parts = matchedSources.sort((a, b) => {
345
+ const aCurrent = currentFile !== void 0 && node_path.default.resolve(a.file) === currentFile;
346
+ if (aCurrent !== (currentFile !== void 0 && node_path.default.resolve(b.file) === currentFile)) return aCurrent ? -1 : 1;
347
+ return a.file.localeCompare(b.file);
348
+ }).map((source) => source.css);
349
+ return parts.length > 0 ? {
350
+ css: parts.join("\n"),
351
+ processed: matchedSources.every((source) => source.processed)
352
+ } : void 0;
353
+ }
354
+ //#endregion
355
+ Object.defineProperty(exports, "addRuntimeTransformCandidates", {
356
+ enumerable: true,
357
+ get: function() {
358
+ return addRuntimeTransformCandidates;
359
+ }
360
+ });
361
+ Object.defineProperty(exports, "collectGeneratedCssRuntimeCandidates", {
362
+ enumerable: true,
363
+ get: function() {
364
+ return collectGeneratedCssRuntimeCandidates;
365
+ }
366
+ });
367
+ Object.defineProperty(exports, "collectWebpackJsRuntimeCandidatesFromAssets", {
368
+ enumerable: true,
369
+ get: function() {
370
+ return collectWebpackJsRuntimeCandidatesFromAssets;
371
+ }
372
+ });
373
+ Object.defineProperty(exports, "collectWebpackJsRuntimeTokenSignature", {
374
+ enumerable: true,
375
+ get: function() {
376
+ return collectWebpackJsRuntimeTokenSignature;
377
+ }
378
+ });
379
+ Object.defineProperty(exports, "createWebpackCssSourceTraceTokenSources", {
380
+ enumerable: true,
381
+ get: function() {
382
+ return createWebpackCssSourceTraceTokenSources;
383
+ }
384
+ });
385
+ Object.defineProperty(exports, "createWebpackGeneratorCssSource", {
386
+ enumerable: true,
387
+ get: function() {
388
+ return createWebpackGeneratorCssSource;
389
+ }
390
+ });
391
+ Object.defineProperty(exports, "createWebpackUserCssSourceAppend", {
392
+ enumerable: true,
393
+ get: function() {
394
+ return createWebpackUserCssSourceAppend;
395
+ }
396
+ });
397
+ Object.defineProperty(exports, "finalizeTracedWebpackCssAsset", {
398
+ enumerable: true,
399
+ get: function() {
400
+ return finalizeTracedWebpackCssAsset;
401
+ }
402
+ });
403
+ Object.defineProperty(exports, "finalizeWebpackCssAssetOutputSource", {
404
+ enumerable: true,
405
+ get: function() {
406
+ return finalizeWebpackCssAssetOutputSource;
407
+ }
408
+ });
409
+ Object.defineProperty(exports, "finalizeWebpackCssAssetSource", {
410
+ enumerable: true,
411
+ get: function() {
412
+ return finalizeWebpackCssAssetSource;
413
+ }
414
+ });
415
+ Object.defineProperty(exports, "getRuntimeClassSetSync", {
416
+ enumerable: true,
417
+ get: function() {
418
+ return getRuntimeClassSetSync;
419
+ }
420
+ });
421
+ Object.defineProperty(exports, "hasDeferredWebpackGeneratedCss", {
422
+ enumerable: true,
423
+ get: function() {
424
+ return hasDeferredWebpackGeneratedCss;
425
+ }
426
+ });
427
+ Object.defineProperty(exports, "hasMissingRuntimeCandidates", {
428
+ enumerable: true,
429
+ get: function() {
430
+ return hasMissingRuntimeCandidates;
431
+ }
432
+ });
433
+ Object.defineProperty(exports, "hasProcessedCssAssetUrl", {
434
+ enumerable: true,
435
+ get: function() {
436
+ return hasProcessedCssAssetUrl;
437
+ }
438
+ });
439
+ Object.defineProperty(exports, "hasUsableWebpackGeneratorCssSources", {
440
+ enumerable: true,
441
+ get: function() {
442
+ return hasUsableWebpackGeneratorCssSources;
443
+ }
444
+ });
445
+ Object.defineProperty(exports, "isRuntimeTransformCandidate", {
446
+ enumerable: true,
447
+ get: function() {
448
+ return isRuntimeTransformCandidate;
449
+ }
450
+ });
451
+ Object.defineProperty(exports, "normalizeWebpackGeneratorCssSources", {
452
+ enumerable: true,
453
+ get: function() {
454
+ return normalizeWebpackGeneratorCssSources;
455
+ }
456
+ });
457
+ Object.defineProperty(exports, "pruneWebpackCssHandlerOptionCaches", {
458
+ enumerable: true,
459
+ get: function() {
460
+ return pruneWebpackCssHandlerOptionCaches;
461
+ }
462
+ });
463
+ Object.defineProperty(exports, "resolveGeneratedCssRuntimeCandidates", {
464
+ enumerable: true,
465
+ get: function() {
466
+ return resolveGeneratedCssRuntimeCandidates;
467
+ }
468
+ });
469
+ Object.defineProperty(exports, "resolveWebpackGeneratorRawSource", {
470
+ enumerable: true,
471
+ get: function() {
472
+ return resolveWebpackGeneratorRawSource;
473
+ }
474
+ });
475
+ Object.defineProperty(exports, "resolveWebpackMemoryDebugStats", {
476
+ enumerable: true,
477
+ get: function() {
478
+ return resolveWebpackMemoryDebugStats;
479
+ }
480
+ });
481
+ Object.defineProperty(exports, "scopeWebpackGeneratorOptionsToCssSource", {
482
+ enumerable: true,
483
+ get: function() {
484
+ return scopeWebpackGeneratorOptionsToCssSource;
485
+ }
486
+ });
487
+ Object.defineProperty(exports, "shouldConsumeWebpackLoaderGeneratedCss", {
488
+ enumerable: true,
489
+ get: function() {
490
+ return shouldConsumeWebpackLoaderGeneratedCss;
491
+ }
492
+ });
493
+ Object.defineProperty(exports, "shouldFallbackToWebpackUserCssOnGeneratorError", {
494
+ enumerable: true,
495
+ get: function() {
496
+ return shouldFallbackToWebpackUserCssOnGeneratorError;
497
+ }
498
+ });
499
+ Object.defineProperty(exports, "shouldUseWebpackAssetAsGeneratorUserCss", {
500
+ enumerable: true,
501
+ get: function() {
502
+ return shouldUseWebpackAssetAsGeneratorUserCss;
503
+ }
504
+ });
505
+ Object.defineProperty(exports, "stringifyOptionalWebpackSourceValue", {
506
+ enumerable: true,
507
+ get: function() {
508
+ return stringifyOptionalWebpackSourceValue;
509
+ }
510
+ });
511
+ Object.defineProperty(exports, "stringifyWebpackSourceLike", {
512
+ enumerable: true,
513
+ get: function() {
514
+ return stringifyWebpackSourceLike;
515
+ }
516
+ });
@@ -1,4 +1,4 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
2
2
  let _weapp_tailwindcss_postcss_html_transform = require("@weapp-tailwindcss/postcss/html-transform");
3
3
  _weapp_tailwindcss_postcss_html_transform = require_rolldown_runtime.__toESM(_weapp_tailwindcss_postcss_html_transform, 1);
4
4
  //#region src/postcss-html-transform.ts
package/dist/postcss.cjs CHANGED
@@ -2,8 +2,9 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_generator = require("./generator-Bvr4WmuF.cjs");
6
- const weappTailwindcssPostcssPlugin = (0, require("@weapp-tailwindcss/postcss").createWeappTailwindcssPostcssPlugin)({
5
+ const require_generator = require("./generator-CxauQbx3.cjs");
6
+ const weappTailwindcssPostcssPlugin = (0, require("@weapp-tailwindcss/postcss/plugin").createWeappTailwindcssPostcssPlugin)({
7
+ compiledSourceScan: true,
7
8
  createGenerator: (source) => {
8
9
  return require_generator.createWeappTailwindcssGenerator(source);
9
10
  },