weapp-tailwindcss 5.5.5 → 5.5.7

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 (323) 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 +5 -4
  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 -2
  8. package/dist/bundlers/shared/framework-css-composition.d.ts +1 -0
  9. package/dist/bundlers/shared/framework-postcss.d.ts +1 -24
  10. package/dist/bundlers/shared/framework-user-css.d.ts +1 -3
  11. package/dist/bundlers/shared/generated-css-marker.d.ts +1 -9
  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 -25
  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 -9
  23. package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -5
  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 -58
  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 -61
  51. package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -9
  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 -0
  54. package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +1 -4
  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 -10
  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 -0
  78. package/dist/bundlers/shared/style-requests.d.ts +1 -5
  79. package/dist/bundlers/shared/v4-generation-core.d.ts +1 -21
  80. package/dist/bundlers/vite/css-finalizer/css-calc.d.ts +3 -0
  81. package/dist/bundlers/vite/css-finalizer/final-assets.d.ts +3 -0
  82. package/dist/bundlers/vite/css-handler-options.d.ts +1 -1
  83. package/dist/bundlers/vite/frameworks/generic/web.d.ts +2 -1
  84. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
  85. package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +1 -0
  86. package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +2 -2
  87. package/dist/bundlers/vite/generate-bundle/finalize/sync-processed-css.d.ts +4 -0
  88. package/dist/bundlers/vite/generate-bundle/framework-style-memory.d.ts +4 -0
  89. package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +7 -0
  90. package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -0
  91. package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +1 -1
  92. package/dist/bundlers/vite/generate-bundle/runtime.d.ts +3 -1
  93. package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +1 -1
  94. package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +2 -2
  95. package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
  96. package/dist/bundlers/vite/generate-bundle/web-css-module.d.ts +1 -0
  97. package/dist/bundlers/vite/plugin-hook.d.ts +3 -0
  98. package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +1 -1
  99. package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -10
  100. package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +1 -4
  101. package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +4 -7
  102. package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -13
  103. package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +3 -1
  104. package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +3 -2
  105. package/dist/bundlers/vite/shared/framework-runtime-configuration.d.ts +3 -0
  106. package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +9 -0
  107. package/dist/bundlers/vite/shared/framework-runtime-utils.d.ts +6 -5
  108. package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +3 -3
  109. package/dist/bundlers/vite/shared/framework-strategy.d.ts +3 -1
  110. package/dist/bundlers/vite/shared/hmr-source.d.ts +2 -0
  111. package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -1
  112. package/dist/bundlers/vite/source-candidates.d.ts +1 -1
  113. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +1 -1
  114. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +2 -7
  115. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +4 -8
  116. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +3 -3
  117. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -1
  118. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +2 -7
  119. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +2 -1
  120. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +1 -1
  121. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +1 -1
  122. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
  123. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -1
  124. package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +6 -0
  125. package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +1 -1
  126. package/dist/cache/index.d.ts +4 -4
  127. package/dist/cache/source.d.ts +29 -0
  128. package/dist/{cache-CBJFB1HN.cjs → cache-CzvIGfwS.cjs} +1 -0
  129. package/dist/compiler/composition.d.ts +1 -1
  130. package/dist/compiler/index.d.ts +2 -0
  131. package/dist/compiler/runtime-affecting-signature/js.d.ts +1 -0
  132. package/dist/compiler/semantic-css.d.ts +1 -1
  133. package/dist/compiler/types.d.ts +1 -1
  134. package/dist/{compiler-D_vxtEdw.js → compiler-CThodfGH.js} +3105 -3065
  135. package/dist/{compiler-Cc0JXfbw.cjs → compiler-DkGY5Nmh.cjs} +22414 -45557
  136. package/dist/core/compiler/generation-cache.d.ts +4 -2
  137. package/dist/core/compiler/transforms.d.ts +1 -1
  138. package/dist/core/compiler/types.d.ts +1 -1
  139. package/dist/core.cjs +10 -10
  140. package/dist/core.d.ts +2 -2
  141. package/dist/core.js +5 -5
  142. package/dist/css-cleanup-B6FUJC3z.cjs +1 -0
  143. package/dist/{css-imports-FRZwX4P6.cjs → css-imports-R_RDMjPz.cjs} +7 -22
  144. package/dist/css-macro/auto.d.ts +1 -1
  145. package/dist/css-macro/postcss.cjs +1 -1
  146. package/dist/css-macro.cjs +3 -3
  147. package/dist/css-macro.js +2 -2
  148. package/dist/{defaults-CKx-4LcW.js → defaults-AQuvJS-h.js} +4 -2
  149. package/dist/{defaults-CiGsr8Xq.cjs → defaults-CyX5iO9y.cjs} +4 -2
  150. package/dist/defaults.cjs +1 -1
  151. package/dist/defaults.js +1 -1
  152. package/dist/final-css-cleanup-B6FUJC3z.cjs +1 -0
  153. package/dist/{final-css-cleanup-B0HUBtiE.js → final-css-cleanup-BOzhuhGz.js} +3 -127
  154. package/dist/framework/index.d.ts +1 -1
  155. package/dist/framework/platform.d.ts +2 -2
  156. package/dist/framework.cjs +1 -1
  157. package/dist/{v4-generation-core-DJBWZ_D0.cjs → generated-css-marker-jMNbQHpy.cjs} +717 -1730
  158. package/dist/generation/candidates.d.ts +1 -0
  159. package/dist/generation/class-selectors.d.ts +4 -0
  160. package/dist/generation/config-directive.d.ts +1 -0
  161. package/dist/generation/directives/fallback.d.ts +1 -0
  162. package/dist/generation/directives.d.ts +1 -0
  163. package/dist/generation/framework-css-composition.d.ts +1 -0
  164. package/dist/generation/framework-postcss.d.ts +25 -0
  165. package/dist/generation/framework-user-css.d.ts +5 -0
  166. package/dist/generation/generation-helpers/preflight.d.ts +19 -0
  167. package/dist/generation/generation-helpers/results.d.ts +23 -0
  168. package/dist/generation/generation-helpers/runtime-isolation.d.ts +30 -0
  169. package/dist/generation/generation-helpers/source-order.d.ts +1 -0
  170. package/dist/generation/generation-helpers.d.ts +4 -0
  171. package/dist/generation/index.d.ts +9 -0
  172. package/dist/generation/legacy-compat.d.ts +12 -0
  173. package/dist/generation/legacy-selectors.d.ts +1 -0
  174. package/dist/generation/legacy-units.d.ts +1 -0
  175. package/dist/generation/local-imports.d.ts +1 -0
  176. package/dist/generation/markers.d.ts +1 -0
  177. package/dist/generation/output-import-shell.d.ts +1 -0
  178. package/dist/generation/pipeline/context.d.ts +60 -0
  179. package/dist/generation/pipeline/deferred-output.d.ts +3 -0
  180. package/dist/generation/pipeline/execution.d.ts +3 -0
  181. package/dist/generation/pipeline/fallback-output.d.ts +3 -0
  182. package/dist/generation/pipeline/ordered-output.d.ts +3 -0
  183. package/dist/generation/pipeline/preparation.d.ts +19 -0
  184. package/dist/generation/pipeline.d.ts +2 -0
  185. package/dist/generation/result-helpers.d.ts +6 -0
  186. package/dist/generation/scoped-rules.d.ts +1 -0
  187. package/dist/generation/service.d.ts +20 -0
  188. package/dist/generation/source-files.d.ts +21 -0
  189. package/dist/generation/source-resolver/apply-reference.d.ts +10 -0
  190. package/dist/generation/source-resolver/config.d.ts +7 -0
  191. package/dist/generation/source-resolver/configuration.d.ts +33 -0
  192. package/dist/generation/source-resolver/matching.d.ts +3 -0
  193. package/dist/generation/source-resolver/metadata.d.ts +28 -0
  194. package/dist/generation/source-resolver/postcss-source.d.ts +14 -0
  195. package/dist/generation/source-resolver/resolve-source.d.ts +4 -0
  196. package/dist/generation/source-resolver/resolve-sources.d.ts +5 -0
  197. package/dist/generation/source-resolver/single-source.d.ts +16 -0
  198. package/dist/generation/source-resolver/source-entries.d.ts +3 -0
  199. package/dist/generation/source-resolver/source-matching.d.ts +5 -0
  200. package/dist/generation/source-resolver/types.d.ts +22 -0
  201. package/dist/generation/source-resolver.d.ts +7 -0
  202. package/dist/generation/style-options.d.ts +8 -0
  203. package/dist/generation/style-requests.d.ts +5 -0
  204. package/dist/generation/types.d.ts +65 -0
  205. package/dist/generation/user-css/apply-only.d.ts +5 -0
  206. package/dist/generation/user-css/at-rules.d.ts +1 -0
  207. package/dist/generation/user-css/compile-functions.d.ts +3 -0
  208. package/dist/generation/user-css/generated-cleanup.d.ts +1 -0
  209. package/dist/generation/user-css/source-fragments.d.ts +1 -0
  210. package/dist/generation/user-css/transform.d.ts +1 -0
  211. package/dist/generation/user-css/user-layers.d.ts +1 -0
  212. package/dist/generation/user-css.d.ts +5 -0
  213. package/dist/generation/user-layer-order.d.ts +1 -0
  214. package/dist/generation/validate.d.ts +7 -0
  215. package/dist/generator-CxauQbx3.cjs +1868 -0
  216. package/dist/generator-oKZ5mCJ5.js +1637 -0
  217. package/dist/generator.cjs +10 -4
  218. package/dist/generator.js +1 -1
  219. package/dist/{gulp-Dnt8VL8D.cjs → gulp-CVvBpIlq.cjs} +27 -26
  220. package/dist/{gulp-B1mPTMqw.js → gulp-DhddVxGA.js} +6 -5
  221. package/dist/gulp.cjs +1 -1
  222. package/dist/gulp.js +1 -1
  223. package/dist/{hmr-timing-qpX410qU.cjs → hmr-timing-DfMbbZ1E.cjs} +13 -13
  224. package/dist/{hmr-timing-wAt0LavM.js → hmr-timing-xPpat-km.js} +601 -1548
  225. package/dist/index.cjs +7 -7
  226. package/dist/index.d.ts +1 -1
  227. package/dist/index.js +5 -5
  228. package/dist/js/ModuleGraph.d.ts +3 -1
  229. package/dist/js/NodePathWalker.d.ts +1 -1
  230. package/dist/js/babel/analyze.d.ts +6 -0
  231. package/dist/js/babel.d.ts +1 -2
  232. package/dist/js/fast-path/analysis.d.ts +14 -0
  233. package/dist/js/fast-path/oxc.d.ts +1 -1
  234. package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
  235. package/dist/js/node-path-walker/import-tokens.d.ts +1 -1
  236. package/dist/js/oxc-parser.d.ts +4 -0
  237. package/dist/pipeline-helpers-zMPmp5F3.cjs +516 -0
  238. package/dist/postcss-html-transform.cjs +1 -1
  239. package/dist/postcss.cjs +3 -2
  240. package/dist/postcss.d.ts +1 -1
  241. package/dist/postcss.js +3 -2
  242. package/dist/presets.cjs +3 -3
  243. package/dist/presets.js +2 -2
  244. package/dist/project-sources/candidates/collector.d.ts +8 -0
  245. package/dist/project-sources/candidates/scan-root.d.ts +12 -0
  246. package/dist/project-sources/candidates/script.d.ts +1 -0
  247. package/dist/project-sources/candidates/snapshot.d.ts +19 -0
  248. package/dist/project-sources/candidates/source-priority.d.ts +1 -0
  249. package/dist/project-sources/candidates/store.d.ts +2 -0
  250. package/dist/project-sources/candidates/types-and-cache.d.ts +75 -0
  251. package/dist/project-sources/candidates/views.d.ts +12 -0
  252. package/dist/project-sources/candidates.d.ts +4 -0
  253. package/dist/project-sources/css-entries.d.ts +18 -0
  254. package/dist/project-sources/dependencies.d.ts +2 -0
  255. package/dist/project-sources/index.d.ts +16 -0
  256. package/dist/project-sources/static-config-content.d.ts +5 -0
  257. package/dist/reset.cjs +1 -1
  258. package/dist/{rolldown-runtime-Ctb5zv51.cjs → rolldown-runtime-fg3euq-1.cjs} +7 -0
  259. package/dist/rspack.cjs +4 -4
  260. package/dist/rspack.js +2 -2
  261. package/dist/{runtime-state-XYSycuGu.cjs → runtime-state-BOzuVoKl.cjs} +1 -1
  262. package/dist/{scoped-generator-CtetE5rm.cjs → scoped-generator-BIZ7N_J-.cjs} +51 -36
  263. package/dist/{scoped-generator-BqxVxNp9.js → scoped-generator-DlQrVbuC.js} +49 -33
  264. package/dist/{source-candidate-scan-signature-Lm32zKVA.js → source-candidate-scan-signature-BjVQYL-C.js} +22 -5
  265. package/dist/{source-candidate-scan-signature-BDGB9nKZ.cjs → source-candidate-scan-signature-nG-rg809.cjs} +34 -5
  266. package/dist/style-injector/internal.d.ts +118 -8
  267. package/dist/style-injector/options.d.ts +6 -2
  268. package/dist/tailwindcss/miniprogram.d.ts +1 -1
  269. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -1
  270. package/dist/tailwindcss/runtime-options.d.ts +5 -0
  271. package/dist/tailwindcss/source-scan/inline-source.d.ts +1 -7
  272. package/dist/tailwindcss/source-scan.d.ts +3 -32
  273. package/dist/tailwindcss/v4/css-sources.d.ts +1 -1
  274. package/dist/tailwindcss/v4/preflight.d.ts +1 -4
  275. package/dist/tailwindcss/v4/rpx-theme-warning.d.ts +4 -0
  276. package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
  277. package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +2 -3
  278. package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +1 -1
  279. package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +1 -6
  280. package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +5 -2
  281. package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +1 -3
  282. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +3 -7
  283. package/dist/tailwindcss/v4-engine/source.d.ts +1 -1
  284. package/dist/tailwindcss/v4-engine/types.d.ts +3 -1
  285. package/dist/{tailwindcss-9e6ZuYgS.cjs → tailwindcss-U3KIUegn.cjs} +66 -271
  286. package/dist/{tailwindcss-DTV9MoJT.js → tailwindcss-kSd0ykiX.js} +73 -251
  287. package/dist/{transform-BbbZvFQq.js → transform-BAon9ykq.js} +35 -20
  288. package/dist/{transform-D21f8Dm8.cjs → transform-D2KFdA3C.cjs} +41 -26
  289. package/dist/types/index.d.ts +4 -3
  290. package/dist/types/user-defined-options/general.d.ts +1 -1
  291. package/dist/uni-app-x/border-preflight.d.ts +1 -2
  292. package/dist/uni-app-x/component-local-style.d.ts +4 -1
  293. package/dist/uni-app-x/transform.d.ts +4 -2
  294. package/dist/uni-app-x/vite/author-apply.d.ts +3 -1
  295. package/dist/uni-app-x/vite/native-hmr.d.ts +1 -1
  296. package/dist/uni-app-x/vite/style-result.d.ts +5 -0
  297. package/dist/utils/run-tasks.d.ts +3 -0
  298. package/dist/vite/web.cjs +1 -1
  299. package/dist/vite/web.js +1 -1
  300. package/dist/{vite-CaH7WjX6.cjs → vite-BxW0qd7J.cjs} +677 -1315
  301. package/dist/{vite-CuYntLZP.js → vite-D-RGkmOE.js} +541 -1173
  302. package/dist/vite-web.d.ts +1 -1
  303. package/dist/vite.cjs +1 -1
  304. package/dist/vite.js +1 -1
  305. package/dist/{watch-dependencies-GbC14Rlt.cjs → watch-dependencies-C1so1whD.cjs} +14 -1
  306. package/dist/weapp-tw-css-generation-loader.cjs +4 -3
  307. package/dist/weapp-tw-css-import-rewrite-loader.cjs +34 -29
  308. package/dist/weapp-tw-runtime-classset-loader.cjs +5 -18
  309. package/dist/{web-CdXkY_VO.js → web--kA4HUTm.js} +149 -211
  310. package/dist/{web-CYs2Kcaa.cjs → web-Y-H6I1k6.cjs} +226 -286
  311. package/dist/{webpack-BnCSOUuu.js → webpack-BB-kw4Qr.js} +38 -450
  312. package/dist/{webpack-BQNnpQPC.cjs → webpack-DxrWatNB.cjs} +97 -97
  313. package/dist/webpack.cjs +1 -1
  314. package/dist/webpack.js +1 -1
  315. package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
  316. package/dist/wxml/utils/custom-template.d.ts +1 -1
  317. package/package.json +16 -13
  318. package/dist/final-css-cleanup-DSjczga3.cjs +0 -138
  319. package/dist/generator-BdSIvFEO.cjs +0 -3905
  320. package/dist/generator-CAOx1Sqm.js +0 -3357
  321. package/dist/pipeline-helpers-BHagysZY.cjs +0 -971
  322. package/dist/tailwindcss/v4-engine/css-import.d.ts +0 -14
  323. package/dist/uni-app-x/style-asset/source-parser.d.ts +0 -2
@@ -1,182 +1,63 @@
1
- import { At as resolveTailwindV4CssSourceBase, C as findWorkspacePackageDir, Ct as expandTailwindSourceEntries, D as normalizeTailwindcssRuntimeOptions, Dt as parseConfigParam, E as normalizeExtendLengthUnits, Et as normalizeLegacyContentEntries, Lt as resolveCssMacroTailwindV4Source, O as resolveTailwindcssOptions, Ot as resolveCssSourceEntries, S as findNearestPackageRoot, St as FULL_SOURCE_SCAN_PATTERN, T as omitUndefined, Vt as loadTailwindV4DesignSystem, b as isTailwindV4CssEntry, d as resolveTailwindV4SourceFromRuntime, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, k as normalizeStringListOption, m as filterTailwindV4CssSourceRoots, p as resolveTailwindV4SourceOptionsFromRuntime, v as groupCssEntriesByBase, w as findWorkspaceRoot, x as normalizeCssEntries, y as guessBasedirFromEntries } from "./generator-CAOx1Sqm.js";
1
+ import { A as normalizeStringListOption, B as loadTailwindV4DesignSystem, C as findWorkspacePackageDir, D as normalizeTailwindcssRuntimeOptions, E as normalizeExtendLengthUnits, I as resolveCssMacroTailwindV4Source, O as resolveRuntimeBareArbitraryValues, S as findNearestPackageRoot, T as omitUndefined, b as isTailwindV4CssEntry, d as resolveTailwindV4SourceFromRuntime, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, k as resolveTailwindcssOptions, m as filterTailwindV4CssSourceRoots, p as resolveTailwindV4SourceOptionsFromRuntime, v as groupCssEntriesByBase, w as findWorkspaceRoot, x as normalizeCssEntries, y as guessBasedirFromEntries } from "./generator-oKZ5mCJ5.js";
2
2
  import { n as defuOverrideArray$1 } from "./utils-MVwpU07P.js";
3
3
  import { createRequire } from "node:module";
4
4
  import { existsSync, readFileSync, statSync } from "node:fs";
5
5
  import path from "node:path";
6
6
  import process from "node:process";
7
- import { extractProjectCandidatesWithPositions, resolveValidTailwindV4Candidates } from "@tailwindcss-mangle/engine";
8
- import { postcss } from "@weapp-tailwindcss/postcss";
9
- import { stat } from "node:fs/promises";
7
+ import { extractProjectCandidatesWithPositions, resolveValidTailwindV4Candidates } from "@weapp-tailwindcss/engine";
8
+ import { analyzeTailwindV4EntrySource, collectRuntimeApplyCandidates } from "@weapp-tailwindcss/postcss/transform";
10
9
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
10
+ import { collectCssInlineSourceCandidates, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, parseConfigParam, parseSourceFileParam, resolveCssSourceEntries } from "@weapp-tailwindcss/postcss/syntax";
11
+ import { stat } from "node:fs/promises";
12
+ import { logger } from "@weapp-tailwindcss/logger";
11
13
  import fg from "fast-glob";
12
14
  import { loadConfig } from "tailwindcss-config";
13
- import { logger } from "@weapp-tailwindcss/logger";
14
15
  import { fileURLToPath } from "node:url";
15
- //#region src/tailwindcss/source-scan/inline-source.ts
16
- const NUMERICAL_RANGE_RE = /^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;
17
- function segmentTopLevel(input, separator, options = {}) {
18
- const parts = [];
19
- const stack = [];
20
- let lastPos = 0;
21
- let quote;
22
- for (let index = 0; index < input.length; index++) {
23
- const char = input[index];
24
- if (char === "\\") {
25
- index += 1;
26
- continue;
27
- }
28
- if (quote) {
29
- if (char === quote) quote = void 0;
30
- continue;
31
- }
32
- if (char === "\"" || char === "'") {
33
- quote = char;
34
- continue;
35
- }
36
- if (char === "(") {
37
- stack.push(")");
38
- continue;
39
- }
40
- if (char === "[") {
41
- stack.push("]");
42
- continue;
43
- }
44
- if (char === "{") {
45
- stack.push("}");
46
- continue;
47
- }
48
- if (stack.length > 0 && char === stack[stack.length - 1]) {
49
- stack.pop();
50
- continue;
51
- }
52
- if (stack.length === 0 && char === separator) {
53
- const part = input.slice(lastPos, index);
54
- if (part || options.keepEmpty) parts.push(part);
55
- lastPos = index + 1;
56
- }
57
- }
58
- const part = input.slice(lastPos);
59
- if (part || options.keepEmpty) parts.push(part);
60
- return parts;
61
- }
62
- function isSequence(value) {
63
- return NUMERICAL_RANGE_RE.test(value);
64
- }
65
- function expandSequence(value) {
66
- const match = value.match(NUMERICAL_RANGE_RE);
67
- if (!match) return [value];
68
- const [, start, end, stepValue] = match;
69
- if (start === void 0 || end === void 0) return [value];
70
- let step = stepValue ? Number.parseInt(stepValue, 10) : void 0;
71
- const startNumber = Number.parseInt(start, 10);
72
- const endNumber = Number.parseInt(end, 10);
73
- const increasing = startNumber < endNumber;
74
- if (step === void 0) step = increasing ? 1 : -1;
75
- if (step === 0) return [];
76
- if (increasing && step < 0) step = -step;
77
- if (!increasing && step > 0) step = -step;
78
- const result = [];
79
- for (let value = startNumber; increasing ? value <= endNumber : value >= endNumber; value += step) result.push(String(value));
80
- return result;
81
- }
82
- function expandInlineSourceCandidatePattern(pattern) {
83
- const index = pattern.indexOf("{");
84
- if (index === -1) return [pattern];
85
- const prefix = pattern.slice(0, index);
86
- const rest = pattern.slice(index);
87
- let depth = 0;
88
- let endIndex = -1;
89
- for (let index = 0; index < rest.length; index++) {
90
- const char = rest[index];
91
- if (char === "{") depth += 1;
92
- else if (char === "}") {
93
- depth -= 1;
94
- if (depth === 0) {
95
- endIndex = index;
96
- break;
97
- }
98
- }
99
- }
100
- if (endIndex === -1) return [pattern];
101
- const inner = rest.slice(1, endIndex);
102
- const suffix = rest.slice(endIndex + 1);
103
- const parts = (isSequence(inner) ? expandSequence(inner) : segmentTopLevel(inner, ",", { keepEmpty: true })).flatMap((part) => expandInlineSourceCandidatePattern(part));
104
- return expandInlineSourceCandidatePattern(suffix).flatMap((suffix) => parts.map((part) => `${prefix}${part}${suffix}`));
105
- }
106
- function parseSourceInlineParam(params) {
107
- let value = params.trim();
108
- const negated = value.startsWith("not ");
109
- if (negated) value = value.slice(4).trim();
110
- if (!value.startsWith("inline(") || !value.endsWith(")")) return;
111
- const inlineValue = value.slice(7, -1).trim();
112
- const match = /^(['"])([\s\S]*)\1$/.exec(inlineValue);
113
- if (!match) return;
114
- const source = match[2];
115
- if (source === void 0) return;
116
- return {
117
- negated,
118
- source
119
- };
120
- }
121
- function collectCssInlineSourceCandidates(root) {
122
- const included = /* @__PURE__ */ new Set();
123
- const excluded = /* @__PURE__ */ new Set();
124
- root.walkAtRules("source", (rule) => {
125
- const parsed = parseSourceInlineParam(rule.params);
126
- if (!parsed) return;
127
- const target = parsed.negated ? excluded : included;
128
- for (const source of segmentTopLevel(parsed.source, " ")) {
129
- const trimmed = source.trim();
130
- if (!trimmed) continue;
131
- for (const candidate of expandInlineSourceCandidatePattern(trimmed)) {
132
- const normalized = candidate.trim();
133
- if (normalized) target.add(normalized);
134
- }
135
- }
16
+ //#region \0rolldown/runtime.js
17
+ var __defProp = Object.defineProperty;
18
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
19
+ var __getOwnPropNames = Object.getOwnPropertyNames;
20
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
21
+ var __exportAll = (all, no_symbols) => {
22
+ let target = {};
23
+ for (var name in all) __defProp(target, name, {
24
+ get: all[name],
25
+ enumerable: true
136
26
  });
137
- for (const candidate of excluded) included.delete(candidate);
138
- return {
139
- included,
140
- excluded
141
- };
142
- }
143
- //#endregion
144
- //#region src/tailwindcss/v4/preflight.ts
145
- function parseCssImportSpecifier(params) {
146
- const value = params.trim();
147
- const quoted = /^(['"])(.*?)\1/.exec(value);
148
- if (quoted) return quoted[2];
149
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
150
- return url?.[2] ?? url?.[3];
151
- }
152
- function normalizeTailwindImportSpecifier(params) {
153
- return parseCssImportSpecifier(params)?.replaceAll("\\", "/");
154
- }
155
- function isTailwindV4CssImportParam(params) {
156
- const specifier = normalizeTailwindImportSpecifier(params);
157
- return specifier === "tailwindcss" || specifier === "tailwindcss4" || specifier?.startsWith("tailwindcss/") === true || specifier?.startsWith("tailwindcss4/") === true || specifier?.endsWith("/tailwindcss/index.css") === true;
158
- }
159
- function isTailwindV4PreflightImportParam(params) {
160
- const specifier = normalizeTailwindImportSpecifier(params);
161
- return specifier === "tailwindcss" || specifier === "tailwindcss4" || specifier === "tailwindcss/preflight" || specifier === "tailwindcss/preflight.css" || specifier === "tailwindcss4/preflight" || specifier === "tailwindcss4/preflight.css" || specifier?.endsWith("/tailwindcss/index.css") === true || specifier?.endsWith("/tailwindcss/preflight.css") === true;
162
- }
163
- function includesTailwindV4PreflightDirective(css) {
164
- try {
165
- const root = postcss.parse(css);
166
- let includesPreflight = false;
167
- root.walkAtRules("import", (rule) => {
168
- includesPreflight || (includesPreflight = isTailwindV4PreflightImportParam(rule.params));
169
- });
170
- root.walkAtRules("tailwind", (rule) => {
171
- includesPreflight || (includesPreflight = rule.params.trim() === "base");
27
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
28
+ return target;
29
+ };
30
+ var __copyProps = (to, from, except, desc) => {
31
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
32
+ key = keys[i];
33
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
34
+ get: ((k) => from[k]).bind(null, key),
35
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
172
36
  });
173
- return includesPreflight;
174
- } catch {
175
- return /@import\s+(?:url\(\s*)?["']?tailwindcss4?(?:\/(?:preflight(?:\.css)?|index\.css))?["')\s;]/.test(css) || /@tailwind\s+base\b/.test(css);
176
37
  }
38
+ return to;
39
+ };
40
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
41
+ //#endregion
42
+ //#region src/tailwindcss/source-scan.ts
43
+ var source_scan_exports = /* @__PURE__ */ __exportAll({
44
+ collectCssInlineSourceCandidates: () => collectCssInlineSourceCandidates,
45
+ expandInlineSourceCandidatePattern: () => expandInlineSourceCandidatePattern,
46
+ expandTailwindSourceEntries: () => expandTailwindSourceEntries,
47
+ parseConfigParam: () => parseConfigParam,
48
+ parseSourceFileParam: () => parseSourceFileParam,
49
+ resolveCssSourceEntries: () => resolveCssSourceEntries,
50
+ resolveTailwindV4CssSourceBase: () => resolveTailwindV4CssSourceBase
51
+ });
52
+ import * as import__weapp_tailwindcss_source_scan from "@weapp-tailwindcss/source-scan";
53
+ __reExport(source_scan_exports, import__weapp_tailwindcss_source_scan);
54
+ function resolveTailwindV4CssSourceBase(source, fallbackBase) {
55
+ if (typeof source.base === "string" && source.base.length > 0) return source.base;
56
+ if (typeof source.file === "string" && source.file.length > 0) return path.dirname(source.file);
57
+ return fallbackBase;
177
58
  }
178
59
  //#endregion
179
- //#region src/bundlers/shared/static-config-content.ts
60
+ //#region src/project-sources/static-config-content.ts
180
61
  function skipWhitespaceAndComments(source, start) {
181
62
  let index = start;
182
63
  while (index < source.length) {
@@ -346,18 +227,10 @@ function readStaticConfigContent(configPath) {
346
227
  return parseStaticContentValue(source, contentProperty.start)?.value;
347
228
  }
348
229
  //#endregion
349
- //#region src/bundlers/shared/source-scan/css-entries.ts
350
- const SOURCE_CANDIDATE_PATTERN = FULL_SOURCE_SCAN_PATTERN;
230
+ //#region src/project-sources/css-entries.ts
231
+ const SOURCE_CANDIDATE_PATTERN = source_scan_exports.FULL_SOURCE_SCAN_PATTERN;
351
232
  const TAILWIND_CSS_ENTRY_PATTERN = "**/*.css";
352
233
  const tailwindV4CssEntriesCache = /* @__PURE__ */ new Map();
353
- function parseImportSourceParam(params) {
354
- const match = /\bsource\(\s*(none|(['"])(.*?)\2)\s*\)/.exec(params);
355
- if (!match) return;
356
- return {
357
- none: match[1] === "none",
358
- sourcePath: match[3]
359
- };
360
- }
361
234
  function resolveSourceBase(base, sourcePath) {
362
235
  return path.isAbsolute(sourcePath) ? sourcePath : path.resolve(base, sourcePath);
363
236
  }
@@ -372,9 +245,9 @@ function createCssEntriesCacheKey(css, base, dependencies) {
372
245
  dependencies
373
246
  });
374
247
  }
375
- async function statConfigDependency(file) {
248
+ function statConfigDependency(file) {
376
249
  try {
377
- const stats = await stat(file);
250
+ const stats = statSync(file);
378
251
  return {
379
252
  file,
380
253
  mtimeMs: stats.mtimeMs,
@@ -388,13 +261,8 @@ async function statConfigDependency(file) {
388
261
  };
389
262
  }
390
263
  }
391
- async function collectConfigDependencySignatures(root, base) {
392
- const configPaths = /* @__PURE__ */ new Set();
393
- root.walkAtRules("config", (rule) => {
394
- const configPath = parseConfigParam(rule.params);
395
- if (configPath) configPaths.add(resolveConfigPath(base, configPath));
396
- });
397
- return Promise.all([...configPaths].sort().map(statConfigDependency));
264
+ function collectConfigDependencySignatures(requests, base) {
265
+ return [...new Set(requests.map((request) => resolveConfigPath(base, request)))].sort().map(statConfigDependency);
398
266
  }
399
267
  function mergeTailwindInlineSourceCandidates(allInlineCandidates) {
400
268
  const merged = {
@@ -411,17 +279,13 @@ function mergeTailwindInlineSourceCandidates(allInlineCandidates) {
411
279
  }
412
280
  return merged.included.size > 0 || merged.excluded.size > 0 ? merged : void 0;
413
281
  }
414
- async function resolveConfigContentEntries(root, base) {
415
- const configPaths = /* @__PURE__ */ new Set();
416
- root.walkAtRules("config", (rule) => {
417
- const configPath = parseConfigParam(rule.params);
418
- if (configPath) configPaths.add(resolveConfigPath(base, configPath));
419
- });
282
+ async function resolveConfigContentEntries(requests, base) {
283
+ const configPaths = new Set(requests.map((request) => resolveConfigPath(base, request)));
420
284
  const entries = [];
421
285
  for (const configPath of configPaths) {
422
286
  const staticContent = readStaticConfigContent(configPath);
423
287
  if (staticContent !== void 0) {
424
- entries.push(...normalizeLegacyContentEntries(staticContent, path.dirname(configPath), { relativeBase: path.dirname(configPath) }));
288
+ entries.push(...(0, source_scan_exports.normalizeLegacyContentEntries)(staticContent, path.dirname(configPath), { relativeBase: path.dirname(configPath) }));
425
289
  continue;
426
290
  }
427
291
  try {
@@ -429,7 +293,7 @@ async function resolveConfigContentEntries(root, base) {
429
293
  config: configPath,
430
294
  cwd: path.dirname(configPath)
431
295
  });
432
- entries.push(...normalizeLegacyContentEntries(loaded?.config.content, path.dirname(configPath), { relativeBase: path.dirname(configPath) }));
296
+ entries.push(...(0, source_scan_exports.normalizeLegacyContentEntries)(loaded?.config.content, path.dirname(configPath), { relativeBase: path.dirname(configPath) }));
433
297
  } catch {}
434
298
  }
435
299
  return {
@@ -438,31 +302,15 @@ async function resolveConfigContentEntries(root, base) {
438
302
  };
439
303
  }
440
304
  async function resolveTailwindV4EntriesFromCss(css, base) {
441
- let root;
442
- try {
443
- root = postcss.parse(css);
444
- } catch {
445
- return;
446
- }
447
- let importSourceBase;
448
- let hasSourceNone = false;
449
- let hasTailwindCssImport = false;
450
- let includesPreflight = false;
451
- const [sourceEntries, configEntries] = await Promise.all([resolveCssSourceEntries(root, base, SOURCE_CANDIDATE_PATTERN), resolveConfigContentEntries(root, base)]);
305
+ const analysis = analyzeTailwindV4EntrySource(css);
306
+ return analysis ? resolveTailwindV4EntriesFromAnalysis(analysis, base) : void 0;
307
+ }
308
+ async function resolveTailwindV4EntriesFromAnalysis(analysis, base) {
309
+ const { hasSourceNone, hasTailwindCssImport, includesPreflight, inlineCandidates, sourceRequests, importSourcePath } = analysis.getSourceDirectives();
310
+ const importSourceBase = importSourcePath ? resolveSourceBase(base, importSourcePath) : void 0;
311
+ const [sourceEntries, configEntries] = await Promise.all([Promise.all(sourceRequests.map((request) => (0, source_scan_exports.resolveTailwindSourceEntry)(request.sourcePath, base, request.negated, SOURCE_CANDIDATE_PATTERN))), resolveConfigContentEntries(analysis.configRequests, base)]);
452
312
  const entries = [...configEntries.entries, ...sourceEntries];
453
313
  const hasPositiveEntries = entries.some((entry) => !entry.negated);
454
- const inlineCandidates = collectCssInlineSourceCandidates(root);
455
- root.walkAtRules("import", (rule) => {
456
- if (!isTailwindV4CssImportParam(rule.params)) return;
457
- hasTailwindCssImport = true;
458
- includesPreflight || (includesPreflight = isTailwindV4PreflightImportParam(rule.params));
459
- const sourceParam = parseImportSourceParam(rule.params);
460
- if (sourceParam?.none) hasSourceNone = true;
461
- if (sourceParam?.sourcePath) importSourceBase = resolveSourceBase(base, sourceParam.sourcePath);
462
- });
463
- root.walkAtRules("tailwind", (rule) => {
464
- includesPreflight || (includesPreflight = rule.params.trim() === "base");
465
- });
466
314
  if (importSourceBase) return {
467
315
  entries: [{
468
316
  base: importSourceBase,
@@ -521,16 +369,12 @@ async function pathExistsAsFile(file) {
521
369
  }
522
370
  }
523
371
  async function resolveTailwindV4EntriesFromCssCached(css, base) {
524
- let root;
525
- try {
526
- root = postcss.parse(css);
527
- } catch {
528
- return;
529
- }
530
- const cacheKey = createCssEntriesCacheKey(css, base, await collectConfigDependencySignatures(root, base));
372
+ const analysis = analyzeTailwindV4EntrySource(css);
373
+ if (!analysis) return;
374
+ const cacheKey = createCssEntriesCacheKey(css, base, collectConfigDependencySignatures(analysis.configRequests, base));
531
375
  const cached = tailwindV4CssEntriesCache.get(cacheKey);
532
376
  if (cached) return cached;
533
- const task = resolveTailwindV4EntriesFromCss(css, base).catch((error) => {
377
+ const task = resolveTailwindV4EntriesFromAnalysis(analysis, base).catch((error) => {
534
378
  tailwindV4CssEntriesCache.delete(cacheKey);
535
379
  throw error;
536
380
  });
@@ -568,7 +412,7 @@ function collectConfiguredCssSources(options) {
568
412
  return filterTailwindV4CssSourceRoots([...options.tailwindcss?.v4?.cssSources ?? [], ...options.tailwindcssRuntimeOptions?.tailwindcss?.v4?.cssSources ?? []]) ?? [];
569
413
  }
570
414
  //#endregion
571
- //#region src/bundlers/shared/source-scan/dependencies.ts
415
+ //#region src/project-sources/dependencies.ts
572
416
  function addSourceScanDependency(dependencies, file) {
573
417
  if (typeof file === "string" && file.length > 0) dependencies.add(path.resolve(file));
574
418
  }
@@ -576,7 +420,7 @@ function addSourceScanDependencies(dependencies, files) {
576
420
  for (const file of files ?? []) addSourceScanDependency(dependencies, file);
577
421
  }
578
422
  //#endregion
579
- //#region src/bundlers/shared/source-scan.ts
423
+ //#region src/project-sources/index.ts
580
424
  function createResolvedSourceScan(input, dependencies) {
581
425
  return {
582
426
  ...input,
@@ -1104,44 +948,22 @@ function createEngineTailwindcssRuntime(options) {
1104
948
  if (typeof options.filter !== "function") return classSet;
1105
949
  return new Set([...classSet].filter((className) => options.filter?.(className) !== false));
1106
950
  }
1107
- function hasTailwindV4ApplyContext(css) {
1108
- if (!css.includes("@apply")) return false;
1109
- try {
1110
- const root = postcss.parse(css);
1111
- let hasContext = false;
1112
- root.walkAtRules((rule) => {
1113
- if (rule.name === "reference" || rule.name === "import" || rule.name === "tailwind" && rule.params.trim() === "utilities") hasContext = true;
1114
- });
1115
- return hasContext;
1116
- } catch {
1117
- return false;
1118
- }
1119
- }
1120
951
  async function collectClassSet() {
1121
952
  const report = await collectContentTokens();
1122
953
  const rawCandidates = new Set(report.entries.map((entry) => {
1123
954
  return typeof entry === "string" ? entry : entry.rawCandidate;
1124
955
  }).filter((entry) => typeof entry === "string" && entry.length > 0));
1125
956
  const source = resolveCssMacroTailwindV4Source(await resolveTailwindV4SourceFromRuntime(runtime));
957
+ const bareArbitraryValues = resolveRuntimeBareArbitraryValues(runtime.options);
1126
958
  const designSystem = await loadTailwindV4DesignSystem(source);
1127
- const candidates = new Set(resolveValidTailwindV4Candidates(designSystem, rawCandidates, { ...source.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: source.bareArbitraryValues } }));
959
+ const candidates = new Set(resolveValidTailwindV4Candidates(designSystem, rawCandidates, { ...bareArbitraryValues === void 0 ? {} : { bareArbitraryValues } }));
1128
960
  await collectTailwindV4CssCandidates(candidates);
1129
961
  return applyClassSetFilter(candidates);
1130
962
  }
1131
963
  async function collectTailwindV4CssCandidates(candidates) {
1132
964
  const source = resolveCssMacroTailwindV4Source(await resolveTailwindV4SourceFromRuntime(runtime));
1133
965
  const cssList = [source.css, ...(source.cssSources ?? []).map((cssSource) => cssSource.css).filter((css) => typeof css === "string")];
1134
- for (const css of cssList) {
1135
- if (!hasTailwindV4ApplyContext(css)) continue;
1136
- try {
1137
- postcss.parse(css).walkAtRules("apply", (rule) => {
1138
- for (const candidate of rule.params.split(/\s+/)) {
1139
- const normalized = candidate.replace(/!important$/, "").trim();
1140
- if (normalized) candidates.add(normalized);
1141
- }
1142
- });
1143
- } catch {}
1144
- }
966
+ for (const css of cssList) for (const candidate of collectRuntimeApplyCandidates(css)) candidates.add(candidate);
1145
967
  }
1146
968
  async function collectContentTokens() {
1147
969
  const source = resolveCssMacroTailwindV4Source(await resolveTailwindV4SourceFromRuntime(runtime));
@@ -1606,4 +1428,4 @@ function createTailwindcssRuntimeFromContext(ctx) {
1606
1428
  return createTailwindcssRuntimeForBase(resolvedTailwindcssBasedir, normalizedCssEntries ?? rawCssEntries, runtimeOptions);
1607
1429
  }
1608
1430
  //#endregion
1609
- export { includesTailwindV4PreflightDirective as _, findTailwindConfig as a, getRuntimeClassSetCacheEntry as c, invalidateRuntimeClassSet as d, resolveSourceScanEntries as f, resolveTailwindV4EntriesFromCssCached as g, resolveTailwindV4EntriesFromCss as h, resolveUniAppXOptions as i, getRuntimeClassSetSignature as l, resolveTailwindV4CssDependencies as m, resolveTailwindcssBasedir as n, applyV4CssCalcDefaults as o, discoverTailwindV4CssEntries as p, isUniAppXEnabled as r, warnMissingCssEntries as s, createTailwindcssRuntimeFromContext as t, getRuntimeClassSetSignatureWithSources as u, collectCssInlineSourceCandidates as v };
1431
+ export { resolveTailwindV4CssSourceBase as _, findTailwindConfig as a, getRuntimeClassSetCacheEntry as c, invalidateRuntimeClassSet as d, resolveSourceScanEntries as f, resolveTailwindV4EntriesFromCssCached as g, resolveTailwindV4EntriesFromCss as h, resolveUniAppXOptions as i, getRuntimeClassSetSignature as l, resolveTailwindV4CssDependencies as m, resolveTailwindcssBasedir as n, applyV4CssCalcDefaults as o, discoverTailwindV4CssEntries as p, isUniAppXEnabled as r, warnMissingCssEntries as s, createTailwindcssRuntimeFromContext as t, getRuntimeClassSetSignatureWithSources as u, source_scan_exports as v };
@@ -1,8 +1,8 @@
1
- import { Mt as _defineProperty } from "./generator-CAOx1Sqm.js";
2
- import { G as replaceWxml, H as analyzeSource, J as traverse$1, U as JsTokenUpdater, V as createAttributeMatcher, W as isClassContextLiteralPath, _ as generateCode, q as babelParse } from "./compiler-D_vxtEdw.js";
3
- import { a as shouldEnablePageLocalStyle, i as shouldEnableComponentLocalStyle, n as injectBorderPreflightClass, o as isUniAppXStyleSourceEmpty, r as shouldInjectBorderPreflight } from "./vite-CuYntLZP.js";
4
- import { splitCandidateTokens } from "@tailwindcss-mangle/engine";
5
- import { UNI_APP_X_IMPORTANT_APPLY_MARKER, normalizeUniAppXImportantApplyForSass } from "@weapp-tailwindcss/postcss";
1
+ import { N as _defineProperty } from "./generator-oKZ5mCJ5.js";
2
+ import { C as babelParse, S as replaceWxml, T as traverse$1, _ as generateCode, b as analyzeSource, v as createAttributeMatcher, w as JsTokenUpdater, x as isClassContextLiteralPath } from "./compiler-CThodfGH.js";
3
+ import { a as shouldEnablePageLocalStyle, i as shouldEnableComponentLocalStyle, n as injectBorderPreflightClass, r as shouldInjectBorderPreflight } from "./vite-D-RGkmOE.js";
4
+ import { splitCandidateTokens } from "@weapp-tailwindcss/engine";
5
+ import { UNI_APP_X_IMPORTANT_APPLY_MARKER, isUniAppXStyleSourceEmpty, normalizeUniAppXImportantApplyForSass } from "@weapp-tailwindcss/postcss/transform";
6
6
  import MagicString from "magic-string";
7
7
  import { NodeTypes, parse } from "@vue/compiler-dom";
8
8
  //#region src/uni-app-x/component-local-style-binding.ts
@@ -174,21 +174,27 @@ function hasTopLevelVariant(candidate) {
174
174
  return false;
175
175
  }
176
176
  var UniAppXComponentLocalStyleCollector = class {
177
- constructor(fileId, runtimeSet) {
177
+ constructor(fileId, runtimeSet, includeVariants = false, preserveClassNames = false) {
178
178
  this.fileId = fileId;
179
179
  this.runtimeSet = runtimeSet;
180
+ this.includeVariants = includeVariants;
181
+ this.preserveClassNames = preserveClassNames;
180
182
  _defineProperty(this, "aliasByUtility", /* @__PURE__ */ new Map());
181
183
  _defineProperty(this, "aliasByLookup", /* @__PURE__ */ new Map());
182
184
  _defineProperty(this, "classBindingNames", /* @__PURE__ */ new Set());
183
185
  _defineProperty(this, "deepUtilities", /* @__PURE__ */ new Set());
184
186
  }
187
+ runtimeClassName(utility) {
188
+ return this.preserveClassNames ? utility : replaceWxml(utility);
189
+ }
185
190
  ensureAlias(utility) {
186
191
  const cached = this.aliasByUtility.get(utility);
187
192
  if (cached) return cached;
188
193
  const alias = createAlias(this.fileId, utility, this.aliasByUtility.size);
189
194
  this.aliasByUtility.set(utility, alias);
190
- this.aliasByLookup.set(utility, alias);
191
- this.aliasByLookup.set(replaceWxml(utility), alias);
195
+ const replacement = hasTopLevelVariant(utility) ? `${this.runtimeClassName(utility)} ${alias}` : alias;
196
+ this.aliasByLookup.set(utility, replacement);
197
+ this.aliasByLookup.set(replaceWxml(utility), replacement);
192
198
  return alias;
193
199
  }
194
200
  rewriteLiteral(literal) {
@@ -197,7 +203,11 @@ var UniAppXComponentLocalStyleCollector = class {
197
203
  let rewritten = literal;
198
204
  for (const candidate of candidates) {
199
205
  if (!isRuntimeCandidate(candidate, this.runtimeSet)) continue;
200
- rewritten = rewritten.replace(candidate, hasTopLevelVariant(candidate) ? replaceWxml(candidate) : this.ensureAlias(candidate));
206
+ if (!this.includeVariants && hasTopLevelVariant(candidate)) rewritten = rewritten.replace(candidate, this.runtimeClassName(candidate));
207
+ else {
208
+ this.ensureAlias(candidate);
209
+ rewritten = rewritten.replace(candidate, this.aliasByLookup.get(candidate));
210
+ }
201
211
  }
202
212
  return rewritten;
203
213
  }
@@ -224,7 +234,7 @@ var UniAppXComponentLocalStyleCollector = class {
224
234
  const classContext = options.wrapExpression || isClassContextLiteralPath(path) || isClassBindingLiteralPath(path, classBindingRoots);
225
235
  for (const candidate of candidates) {
226
236
  if (!candidate || !classContext || !isRuntimeCandidate(candidate, this.runtimeSet)) continue;
227
- if (!hasTopLevelVariant(candidate)) {
237
+ if (this.includeVariants || !hasTopLevelVariant(candidate)) {
228
238
  this.ensureAlias(candidate);
229
239
  if (options.deep) this.deepUtilities.add(candidate);
230
240
  }
@@ -308,11 +318,14 @@ function traverse(node, visitor) {
308
318
  for (const child of node.children) if (child && typeof child === "object" && "type" in child) traverse(child, visitor);
309
319
  }
310
320
  }
311
- function updateStaticAttribute(ms, prop, offset, content = prop.value?.content) {
321
+ function updateStaticAttribute(ms, prop, offset, preserveClassNames) {
312
322
  if (!prop.value) return;
313
323
  const start = offset + prop.value.loc.start.offset + 1;
314
324
  const end = offset + prop.value.loc.end.offset - 1;
315
- if (start < end) ms.update(start, end, replaceWxml(content ?? ""));
325
+ if (start < end) {
326
+ const content = prop.value.content;
327
+ ms.update(start, end, preserveClassNames ? content : replaceWxml(content));
328
+ }
316
329
  }
317
330
  function updateStaticAttributeWithLocalStyle(ms, prop, offset, collector, deep, content = prop.value?.content) {
318
331
  if (!prop.value) return;
@@ -439,6 +452,8 @@ function parseSfc(code) {
439
452
  function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
440
453
  if (!UVUE_NVUE_RE.test(id)) return;
441
454
  const { customAttributesEntities, disabledDefaultTemplateHandler = false } = options;
455
+ const isWeb = Boolean(options.onWebLocalStyleRules);
456
+ const jsRuntimeSet = isWeb ? /* @__PURE__ */ new Set() : runtimeSet;
442
457
  const matchCustomAttribute = createAttributeMatcher(customAttributesEntities);
443
458
  const ms = new MagicString(code);
444
459
  const descriptor = parseSfc(code);
@@ -446,7 +461,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
446
461
  const normalized = normalizeUniAppXImportantApplyForSass(style.content);
447
462
  if (normalized !== style.content) ms.update(style.start, style.end, normalized);
448
463
  }
449
- const localStyleCollector = shouldEnableLocalStyle(id, options) ? new UniAppXComponentLocalStyleCollector(id, runtimeSet) : void 0;
464
+ const localStyleCollector = shouldEnableLocalStyle(id, options) ? new UniAppXComponentLocalStyleCollector(id, runtimeSet, options.localStyleVariants, isWeb) : void 0;
450
465
  if (descriptor.errors.length === 0) {
451
466
  if (descriptor.template?.ast) {
452
467
  const templateOffset = descriptor.template.start;
@@ -457,14 +472,14 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
457
472
  const { shouldHandle, shouldHandleCustom, shouldHandleDefault } = shouldHandleAttribute(tag, prop.name, disabledDefaultTemplateHandler, matchCustomAttribute);
458
473
  if (!shouldHandle) continue;
459
474
  if (localStyleCollector) updateStaticAttributeWithLocalStyle(ms, prop, templateOffset, localStyleCollector, options.webCustomAttributeDeep === true && shouldHandleCustom);
460
- else updateStaticAttribute(ms, prop, templateOffset);
475
+ else updateStaticAttribute(ms, prop, templateOffset, isWeb);
461
476
  if (shouldHandleDefault) continue;
462
477
  } else if (prop.type === NodeTypes.DIRECTIVE && prop.name === "bind" && prop.arg?.type === NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic) {
463
478
  const attrName = prop.arg.content;
464
479
  const { shouldHandle, shouldHandleCustom } = shouldHandleAttribute(tag, attrName, disabledDefaultTemplateHandler, matchCustomAttribute);
465
480
  if (!shouldHandle) continue;
466
- if (localStyleCollector) updateDirectiveExpressionWithLocalStyle(ms, prop, templateOffset, jsHandler, localStyleCollector, options.webCustomAttributeDeep === true && shouldHandleCustom, runtimeSet);
467
- else updateDirectiveExpression(ms, prop, templateOffset, jsHandler, runtimeSet);
481
+ if (localStyleCollector) updateDirectiveExpressionWithLocalStyle(ms, prop, templateOffset, jsHandler, localStyleCollector, options.webCustomAttributeDeep === true && shouldHandleCustom, jsRuntimeSet);
482
+ else updateDirectiveExpression(ms, prop, templateOffset, jsHandler, jsRuntimeSet);
468
483
  }
469
484
  if (options.borderPreflight && shouldInjectBorderPreflight(node, options.borderPreflightRange)) injectBorderPreflightClass(ms, node, templateOffset);
470
485
  });
@@ -472,19 +487,19 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
472
487
  }
473
488
  if (descriptor.script && descriptor.script.start < descriptor.script.end) {
474
489
  localStyleCollector?.collectRuntimeClasses(descriptor.script.content);
475
- const { code } = jsHandler(descriptor.script.content, runtimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
490
+ const { code } = jsHandler(descriptor.script.content, jsRuntimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
476
491
  ms.update(descriptor.script.start, descriptor.script.end, localStyleCollector ? localStyleCollector.rewriteTransformedCode(code) : code);
477
492
  }
478
493
  if (descriptor.scriptSetup && descriptor.scriptSetup.start < descriptor.scriptSetup.end) {
479
494
  localStyleCollector?.collectRuntimeClasses(descriptor.scriptSetup.content);
480
- const { code } = jsHandler(descriptor.scriptSetup.content, runtimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
495
+ const { code } = jsHandler(descriptor.scriptSetup.content, jsRuntimeSet ?? /* @__PURE__ */ new Set(), defaultCreateJsHandlerOptions);
481
496
  ms.update(descriptor.scriptSetup.start, descriptor.scriptSetup.end, localStyleCollector ? localStyleCollector.rewriteTransformedCode(code) : code);
482
497
  }
483
- const scopedStyle = descriptor.styles.findLast((style) => STYLE_SCOPED_RE.test(style.attrs) && (!options.onWebLocalStyleRules || !isUniAppXStyleSourceEmpty(style.content)));
498
+ const scopedStyle = [...descriptor.styles].reverse().find((style) => STYLE_SCOPED_RE.test(style.attrs) && (!options.onWebLocalStyleRules || !isUniAppXStyleSourceEmpty(style.content)));
484
499
  if (localStyleCollector && options.onWebLocalStyleRules && descriptor.template) options.onWebLocalStyleRules(localStyleCollector.hasStyles() ? localStyleCollector.toStyleRules({ web: true }) : "");
485
500
  if (localStyleCollector?.hasStyles() && scopedStyle && !options.onWebLocalStyleRules) {
486
501
  const separator = scopedStyle.content.endsWith("\n") ? "" : "\n";
487
- ms.appendLeft(scopedStyle.end, `${separator}${localStyleCollector.toStyleRules({ native: options.native })}`);
502
+ ms.appendLeft(scopedStyle.end, `${separator}${localStyleCollector.toStyleRules({ native: options.native === true })}`);
488
503
  } else if (localStyleCollector?.hasStyles() && !scopedStyle) ms.append(`\n${localStyleCollector.toStyleBlock({
489
504
  native: options.native || Boolean(options.onWebLocalStyleRules),
490
505
  web: Boolean(options.onWebLocalStyleRules)