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
@@ -0,0 +1,75 @@
1
+ import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan.js';
2
+ import type { ICustomAttributesEntities } from '../../types/index.js';
3
+ import type { IArbitraryValues } from '../../types/shared.js';
4
+ import { LRUCache } from 'lru-cache';
5
+ export interface SourceCandidateStore {
6
+ syncSource: (id: string, source: string) => Promise<void>;
7
+ sync: (id: string, source: string) => Promise<void>;
8
+ syncCss: (id: string, source: string) => Promise<void>;
9
+ syncModuleSource: (id: string, source: string, extension?: string) => Promise<Set<string>>;
10
+ merge: (id: string, source: string) => Promise<void>;
11
+ syncFile: (id: string) => Promise<void>;
12
+ syncCurrentSource: (id: string, source: string) => Promise<SourceCandidateChange>;
13
+ syncCurrentFile: (id: string) => Promise<SourceCandidateChange>;
14
+ resolveScanFiles: (options: ScanSourceCandidateRootOptions) => Promise<string[]>;
15
+ scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
16
+ syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
17
+ remove: (id: string) => SourceCandidateChange;
18
+ source: (id: string) => string | undefined;
19
+ sources: () => IterableIterator<[string, string]>;
20
+ values: () => Set<string>;
21
+ valuesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>;
22
+ sourcesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>;
23
+ snapshot: () => SourceCandidateCollectorSnapshot;
24
+ restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
25
+ clearScan: () => void;
26
+ resetScan: () => void;
27
+ clear: () => void;
28
+ getRevision: () => number;
29
+ }
30
+ export interface SourceCandidateCollector extends SourceCandidateStore {
31
+ }
32
+ export interface SourceCandidateChange {
33
+ addedCandidates: Set<string>;
34
+ removedCandidates: Set<string>;
35
+ }
36
+ export interface SourceCandidateCollectorSnapshot {
37
+ candidatesById: Array<[string, string[]]>;
38
+ cssCandidatesById?: Array<[string, string[]]> | undefined;
39
+ cssSourceById?: Array<[string, string]> | undefined;
40
+ moduleCandidatesById?: Array<[string, string[]]> | undefined;
41
+ moduleSourceById?: Array<[string, string]> | undefined;
42
+ scanCandidatesById?: Array<[string, string[]]> | undefined;
43
+ scanSourceById?: Array<[string, string]> | undefined;
44
+ sourceById?: Array<[string, string]> | undefined;
45
+ transformCandidatesById?: Array<[string, string[]]> | undefined;
46
+ transformSourceById?: Array<[string, string]> | undefined;
47
+ inlineExcludedCandidates: string[];
48
+ inlineIncludedCandidates: string[];
49
+ }
50
+ export interface SourceCandidateFilterOptions {
51
+ excludeEntries?: TailwindSourceEntry[] | undefined;
52
+ }
53
+ export interface ScanSourceCandidateRootOptions {
54
+ root: string;
55
+ outDir?: string | undefined;
56
+ entries?: TailwindSourceEntry[] | undefined;
57
+ explicit?: boolean | undefined;
58
+ onFilesResolved?: ((files: string[]) => void) | undefined;
59
+ }
60
+ export interface SourceCandidateCollectorOptions {
61
+ bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
62
+ customAttributesEntities?: ICustomAttributesEntities | undefined;
63
+ disabledDefaultTemplateHandler?: boolean | undefined;
64
+ extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
65
+ }
66
+ export declare const SOURCE_CANDIDATE_CONTENT_CACHE_MAX = 128;
67
+ export declare const sourceCandidateContentCache: LRUCache<string, string[], unknown>;
68
+ export declare function cleanUrl(id: string): string;
69
+ export declare function resolveSourceCandidateExtension(id: string): string;
70
+ export declare function createSourceCandidateContentCacheKey(extension: string, source: string, bareArbitraryValues: IArbitraryValues['bareArbitraryValues'] | undefined, customAttributesEntities: ICustomAttributesEntities | undefined, disabledDefaultTemplateHandler: boolean | undefined, extractor: SourceCandidateCollectorOptions['extractor']): string;
71
+ export declare function extractCandidates(source: string, extension: string, options: SourceCandidateCollectorOptions): Promise<Set<string>>;
72
+ export declare function isSourceCandidateRequest(id: string): boolean;
73
+ export declare function removeCandidateSet(candidateCount: Map<string, number>, candidates: Set<string>): void;
74
+ export declare function addCandidateSet(candidateCount: Map<string, number>, candidates: Set<string>): void;
75
+ export declare function diffCandidateSets(previous: Set<string>, next: Set<string>): SourceCandidateChange;
@@ -0,0 +1,12 @@
1
+ import type { TailwindSourceEntry } from '../../tailwindcss/source-scan.js';
2
+ type CandidateMap = Map<string, Set<string>>;
3
+ interface CandidateViewOptions {
4
+ candidatesById: CandidateMap;
5
+ moduleCandidatesById: CandidateMap;
6
+ candidateCount: Map<string, number>;
7
+ inlineIncludedCandidates: Set<string>;
8
+ inlineExcludedCandidates: Set<string>;
9
+ }
10
+ export declare function collectCandidateValues(view: CandidateViewOptions, entries?: TailwindSourceEntry[], excludeEntries?: TailwindSourceEntry[]): Set<string>;
11
+ export declare function collectCandidateSources(view: CandidateViewOptions, entries?: TailwindSourceEntry[], excludeEntries?: TailwindSourceEntry[]): Map<string, Set<string>>;
12
+ export {};
@@ -0,0 +1,4 @@
1
+ export { clearSourceCandidateContentCacheForTest, createSourceCandidateCollector, getSourceCandidateContentCacheStatsForTest } from './candidates/collector.js';
2
+ export { createSourceCandidateStore } from './candidates/store.js';
3
+ export { isSourceCandidateRequest } from './candidates/types-and-cache.js';
4
+ export type { SourceCandidateChange, SourceCandidateCollector, SourceCandidateCollectorOptions, SourceCandidateCollectorSnapshot, SourceCandidateFilterOptions, SourceCandidateStore } from './candidates/types-and-cache.js';
@@ -0,0 +1,18 @@
1
+ import type { TailwindV4CssSource } from '@weapp-tailwindcss/engine';
2
+ import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../tailwindcss/source-scan.js';
3
+ import type { UserDefinedOptions } from '../types/index.js';
4
+ export interface ResolvedTailwindV4CssEntries {
5
+ entries: TailwindSourceEntry[];
6
+ explicit: boolean;
7
+ includesPreflight: boolean;
8
+ inlineCandidates: TailwindInlineSourceCandidates;
9
+ dependencies: string[];
10
+ }
11
+ export declare function mergeTailwindInlineSourceCandidates(allInlineCandidates: Array<TailwindInlineSourceCandidates | undefined>): TailwindInlineSourceCandidates | undefined;
12
+ export declare function resolveTailwindV4EntriesFromCss(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
13
+ export declare function resolveTailwindV4CssDependencies(css: string, base: string): Promise<string[]>;
14
+ export declare function collectExistingCssEntries(options: UserDefinedOptions): string[];
15
+ export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
16
+ export declare function resolveTailwindConfigEntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
17
+ export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
18
+ export declare function collectConfiguredCssSources(options: UserDefinedOptions): TailwindV4CssSource[];
@@ -0,0 +1,2 @@
1
+ export declare function addSourceScanDependency(dependencies: Set<string>, file: string | undefined): void;
2
+ export declare function addSourceScanDependencies(dependencies: Set<string>, files: string[] | undefined): void;
@@ -0,0 +1,16 @@
1
+ import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../tailwindcss/source-scan.js';
2
+ import type { TailwindcssRuntimeLike, UserDefinedOptions } from '../types/index.js';
3
+ export { discoverTailwindV4CssEntries, resolveTailwindConfigEntriesFromCssCached, resolveTailwindV4CssDependencies, resolveTailwindV4EntriesFromCss, resolveTailwindV4EntriesFromCssCached, } from './css-entries.js';
4
+ export type { ResolvedTailwindV4CssEntries } from './css-entries.js';
5
+ export interface ResolvedSourceScan {
6
+ dependencies?: string[] | undefined;
7
+ entries?: TailwindSourceEntry[] | undefined;
8
+ explicit?: boolean | undefined;
9
+ inlineCandidates?: TailwindInlineSourceCandidates | undefined;
10
+ }
11
+ export interface ResolveSourceScanOptions {
12
+ root?: string | undefined;
13
+ outDir?: string | undefined;
14
+ }
15
+ export declare function resolveSourceScanEntries(options: UserDefinedOptions, runtime: TailwindcssRuntimeLike, scanOptions?: ResolveSourceScanOptions): Promise<ResolvedSourceScan | undefined>;
16
+ export declare function createSourceScanMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
@@ -0,0 +1,5 @@
1
+ type StaticContentValue = string | StaticContentValue[] | {
2
+ files: StaticContentValue;
3
+ };
4
+ export declare function readStaticConfigContent(configPath: string): StaticContentValue | undefined;
5
+ export {};
package/dist/reset.cjs CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
5
+ const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
6
6
  let _weapp_tailwindcss_reset = require("@weapp-tailwindcss/reset");
7
7
  _weapp_tailwindcss_reset = require_rolldown_runtime.__toESM(_weapp_tailwindcss_reset, 1);
8
8
  Object.defineProperty(exports, "default", {
@@ -25,6 +25,7 @@ var __copyProps = (to, from, except, desc) => {
25
25
  }
26
26
  return to;
27
27
  };
28
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
28
29
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
29
30
  value: mod,
30
31
  enumerable: true
@@ -42,6 +43,12 @@ Object.defineProperty(exports, "__exportAll", {
42
43
  return __exportAll;
43
44
  }
44
45
  });
46
+ Object.defineProperty(exports, "__reExport", {
47
+ enumerable: true,
48
+ get: function() {
49
+ return __reExport;
50
+ }
51
+ });
45
52
  Object.defineProperty(exports, "__toESM", {
46
53
  enumerable: true,
47
54
  get: function() {
package/dist/rspack.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
3
- const require_v4_generation_core = require("./v4-generation-core-DJBWZ_D0.cjs");
4
- const require_webpack = require("./webpack-BQNnpQPC.cjs");
2
+ const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
3
+ const require_generated_css_marker = require("./generated-css-marker-jMNbQHpy.cjs");
4
+ const require_webpack = require("./webpack-DxrWatNB.cjs");
5
5
  let node_path = require("node:path");
6
6
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
7
7
  //#region src/bundlers/rspack/rule-match.ts
@@ -87,7 +87,7 @@ function matchesAnyStringCondition(condition, inputs) {
87
87
  }
88
88
  function matchesStyleResourceCondition(condition) {
89
89
  if (typeof condition === "function") return;
90
- if (typeof condition === "string" && require_v4_generation_core.isSourceStyleRequest(condition)) return true;
90
+ if (typeof condition === "string" && require_generated_css_marker.isSourceStyleRequest(condition)) return true;
91
91
  const matched = matchesAnyStringCondition(condition, STYLE_RULE_PROBES);
92
92
  return typeof condition === "string" && matched === false ? void 0 : matched;
93
93
  }
package/dist/rspack.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as isSourceStyleRequest } from "./hmr-timing-wAt0LavM.js";
2
- import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-BnCSOUuu.js";
1
+ import { V as isSourceStyleRequest } from "./hmr-timing-xPpat-km.js";
2
+ import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-BB-kw4Qr.js";
3
3
  import path from "node:path";
4
4
  //#region src/bundlers/rspack/rule-match.ts
5
5
  const STYLE_RULE_PROBES = [
@@ -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 node_path = require("node:path");
3
3
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
4
4
  let node_process = require("node:process");
@@ -1,9 +1,10 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
2
2
  const require_framework = require("./framework.cjs");
3
- require("./auto-DtU6f3X6.cjs");
4
- const require_tailwindcss = require("./tailwindcss-9e6ZuYgS.cjs");
5
- const require_v4_generation_core = require("./v4-generation-core-DJBWZ_D0.cjs");
6
- const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-BDGB9nKZ.cjs");
3
+ const require_generator = require("./generator-CxauQbx3.cjs");
4
+ require("./auto-B1OyRrE8.cjs");
5
+ const require_tailwindcss = require("./tailwindcss-U3KIUegn.cjs");
6
+ const require_generated_css_marker = require("./generated-css-marker-jMNbQHpy.cjs");
7
+ const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-nG-rg809.cjs");
7
8
  let node_path = require("node:path");
8
9
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
9
10
  let weapp_style_injector_vite = require("weapp-style-injector/vite");
@@ -13,7 +14,7 @@ let weapp_style_injector_webpack = require("weapp-style-injector/webpack");
13
14
  let weapp_style_injector_webpack_mpx = require("weapp-style-injector/webpack/mpx");
14
15
  let weapp_style_injector_webpack_taro = require("weapp-style-injector/webpack/taro");
15
16
  let weapp_style_injector_webpack_uni_app = require("weapp-style-injector/webpack/uni-app");
16
- let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
17
+ let _weapp_tailwindcss_postcss_transform = require("@weapp-tailwindcss/postcss/transform");
17
18
  //#region src/bundlers/framework-selector.ts
18
19
  function resolveBundlerAppType(options) {
19
20
  if (options.appType) return options.appType;
@@ -79,7 +80,7 @@ function resolveWebpackFrameworkProfile(options) {
79
80
  //#endregion
80
81
  //#region src/style-injector/internal.ts
81
82
  function toPluginArray(pluginOrPlugins) {
82
- return Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins];
83
+ return pluginOrPlugins ? Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins] : [];
83
84
  }
84
85
  function normalizeWebpackStyleInjectorOptions(options) {
85
86
  const normalized = require_source_candidate_scan_signature.normalizeStyleInjectorOptions(options);
@@ -98,29 +99,36 @@ function normalizeWebpackStyleInjectorOptions(options) {
98
99
  };
99
100
  return webpackOptions;
100
101
  }
101
- function getTransformHandler(hook) {
102
- if (typeof hook === "function") return hook;
103
- if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
104
- }
105
- function getGenerateBundleHandler(hook) {
106
- if (typeof hook === "function") return hook;
107
- if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
108
- }
109
102
  const viteStyleInjectorDelegates = {
110
103
  generic: ((options) => [(0, weapp_style_injector_vite.weappStyleInjector)(options)]),
111
- taro: ((options) => toPluginArray((0, weapp_style_injector_vite_taro.StyleInjector)(options))),
112
- uniApp: ((options) => toPluginArray((0, weapp_style_injector_vite_uni_app.StyleInjector)(options)))
104
+ taro: ((options) => toPluginArray((0, weapp_style_injector_vite_taro.StyleInjector)(require_generator.omitUndefined({
105
+ ...options,
106
+ subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
107
+ })))),
108
+ uniApp: ((options) => toPluginArray((0, weapp_style_injector_vite_uni_app.StyleInjector)(require_generator.omitUndefined({
109
+ ...options,
110
+ subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
111
+ }))))
113
112
  };
114
113
  const webpackStyleInjectorDelegates = {
115
- generic: ((options) => (0, weapp_style_injector_webpack.weappStyleInjectorWebpack)(options)),
116
- mpx: ((options) => (0, weapp_style_injector_webpack_mpx.StyleInjector)(options)),
117
- taro: ((options) => (0, weapp_style_injector_webpack_taro.StyleInjector)(options)),
118
- uniApp: ((options) => (0, weapp_style_injector_webpack_uni_app.StyleInjector)(options))
114
+ generic: ((options) => (0, weapp_style_injector_webpack.weappStyleInjectorWebpack)(require_generator.omitUndefined(options))),
115
+ mpx: ((options) => (0, weapp_style_injector_webpack_mpx.StyleInjector)(require_generator.omitUndefined({
116
+ ...options,
117
+ subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "appPath")
118
+ }))),
119
+ taro: ((options) => (0, weapp_style_injector_webpack_taro.StyleInjector)(require_generator.omitUndefined({
120
+ ...options,
121
+ subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
122
+ }))),
123
+ uniApp: ((options) => (0, weapp_style_injector_webpack_uni_app.StyleInjector)(require_generator.omitUndefined({
124
+ ...options,
125
+ subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
126
+ })))
119
127
  };
120
128
  function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
121
129
  const normalized = require_source_candidate_scan_signature.normalizeStyleInjectorOptions(options);
122
130
  if (!normalized) return [];
123
- let config;
131
+ let configuration;
124
132
  let delegates;
125
133
  let delegatesConfigured = false;
126
134
  let delegatesBuildStarted = false;
@@ -130,31 +138,35 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
130
138
  return delegates;
131
139
  };
132
140
  const configureDelegates = async () => {
133
- if (delegatesConfigured || !config) return;
141
+ if (delegatesConfigured || !configuration) return;
134
142
  delegatesConfigured = true;
135
- for (const plugin of resolveDelegates()) if (typeof plugin.configResolved === "function") await plugin.configResolved(config);
143
+ for (const plugin of resolveDelegates()) await require_source_candidate_scan_signature.getViteHookHandler(plugin.configResolved)?.call(configuration.context, configuration.config);
136
144
  };
137
- const startDelegates = async (context) => {
145
+ const startDelegates = async (context, buildOptions) => {
138
146
  if (delegatesBuildStarted) return;
139
147
  await configureDelegates();
140
148
  delegatesBuildStarted = true;
141
- for (const plugin of resolveDelegates()) if (typeof plugin.buildStart === "function") await plugin.buildStart.call(context, {});
149
+ for (const plugin of resolveDelegates()) await require_source_candidate_scan_signature.getViteHookHandler(plugin.buildStart)?.call(context, buildOptions);
142
150
  };
143
151
  return [{
144
152
  name: "weapp-tailwindcss:style-injector-pre",
145
153
  apply: "build",
146
154
  enforce: "pre",
147
155
  configResolved(resolvedConfig) {
148
- config = resolvedConfig;
156
+ configuration = {
157
+ config: resolvedConfig,
158
+ context: this
159
+ };
149
160
  },
150
- async buildStart() {
151
- await startDelegates(this);
161
+ async buildStart(buildOptions) {
162
+ await startDelegates(this, buildOptions);
152
163
  },
153
164
  async load(id, options) {
154
165
  await configureDelegates();
155
166
  for (const plugin of resolveDelegates()) {
156
- if (typeof plugin.load !== "function") continue;
157
- const result = await plugin.load.call(this, id, options);
167
+ const handler = require_source_candidate_scan_signature.getViteHookHandler(plugin.load);
168
+ if (!handler) continue;
169
+ const result = await handler.call(this, id, options);
158
170
  if (result != null) return result;
159
171
  }
160
172
  },
@@ -163,7 +175,7 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
163
175
  let currentCode = code;
164
176
  let changed = false;
165
177
  for (const plugin of resolveDelegates()) {
166
- const handler = getTransformHandler(plugin.transform);
178
+ const handler = require_source_candidate_scan_signature.getViteHookHandler(plugin.transform);
167
179
  if (!handler) continue;
168
180
  const result = await handler.call(this, currentCode, id, options);
169
181
  if (!result) continue;
@@ -185,12 +197,15 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
185
197
  apply: "build",
186
198
  enforce: "post",
187
199
  configResolved(resolvedConfig) {
188
- config = resolvedConfig;
200
+ configuration = {
201
+ config: resolvedConfig,
202
+ context: this
203
+ };
189
204
  },
190
205
  async generateBundle(outputOptions, bundle, isWrite) {
191
206
  await configureDelegates();
192
207
  for (const plugin of resolveDelegates()) {
193
- const handler = getGenerateBundleHandler(plugin.generateBundle);
208
+ const handler = require_source_candidate_scan_signature.getViteHookHandler(plugin.generateBundle);
194
209
  if (!handler) continue;
195
210
  await handler.call(this, outputOptions, bundle, isWrite);
196
211
  }
@@ -215,7 +230,7 @@ const CSS_REQUEST_RE = /\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\?
215
230
  const HTML_REQUEST_RE = /\.html?(?:$|\?)/;
216
231
  function classifyRuntimeEntry(file, matchers) {
217
232
  if (matchers.htmlMatcher(file) || HTML_REQUEST_RE.test(file)) return "html";
218
- if (matchers.cssMatcher(file) || CSS_REQUEST_RE.test(file) || require_v4_generation_core.isSourceStyleRequest(file)) return "css";
233
+ if (matchers.cssMatcher(file) || CSS_REQUEST_RE.test(file) || require_generated_css_marker.isSourceStyleRequest(file)) return "css";
219
234
  if (matchers.jsMatcher(file) || matchers.wxsMatcher(file)) return "js";
220
235
  return "other";
221
236
  }
@@ -325,7 +340,7 @@ async function createScopedGeneratorRuntime(options) {
325
340
  const explicitCandidates = getSourceCandidatesForEntries(entries);
326
341
  const outputCandidates = scopedSourceCandidateGetter?.(void 0);
327
342
  const scopedCandidates = outputCandidates ? explicitCandidates.size === 0 && canFallbackToOutputCandidates(rawSource, entries) ? outputCandidates : intersectCandidates(explicitCandidates, outputCandidates) : explicitCandidates;
328
- return (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4CustomVariantConditionalComments)(rawSource) ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
343
+ return (0, _weapp_tailwindcss_postcss_transform.hasCssMacroTailwindV4CustomVariantConditionalComments)(rawSource) ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
329
344
  }
330
345
  }
331
346
  const scopedCandidates = scopedSourceCandidateGetter?.(void 0);
@@ -1,9 +1,11 @@
1
+ import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-kSd0ykiX.js";
1
2
  import { detectAppType } from "./framework.js";
2
- import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-2dg_uhEJ.js";
3
- import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-DTV9MoJT.js";
4
- import { C as isSourceStyleRequest } from "./hmr-timing-wAt0LavM.js";
5
- import { o as normalizeStyleInjectorOptions } from "./source-candidate-scan-signature-Lm32zKVA.js";
3
+ import { T as omitUndefined } from "./generator-oKZ5mCJ5.js";
4
+ import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-ENr4xzzw.js";
5
+ import { V as isSourceStyleRequest } from "./hmr-timing-xPpat-km.js";
6
+ import { c as getViteHookHandler, o as normalizeStyleInjectorOptions, s as resolveStyleInjectorSubPackages } from "./source-candidate-scan-signature-BjVQYL-C.js";
6
7
  import path from "node:path";
8
+ import { finalizeMiniProgramCss as finalizeMiniProgramCss$1, hasMiniProgramCssSpecificityPlaceholders, pruneMiniProgramGeneratedCss, stripMiniProgramCssSpecificityPlaceholders } from "@weapp-tailwindcss/postcss/transform";
7
9
  import { weappStyleInjector } from "weapp-style-injector/vite";
8
10
  import { StyleInjector } from "weapp-style-injector/vite/taro";
9
11
  import { StyleInjector as StyleInjector$1 } from "weapp-style-injector/vite/uni-app";
@@ -76,7 +78,7 @@ function resolveWebpackFrameworkProfile(options) {
76
78
  //#endregion
77
79
  //#region src/style-injector/internal.ts
78
80
  function toPluginArray(pluginOrPlugins) {
79
- return Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins];
81
+ return pluginOrPlugins ? Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins] : [];
80
82
  }
81
83
  function normalizeWebpackStyleInjectorOptions(options) {
82
84
  const normalized = normalizeStyleInjectorOptions(options);
@@ -95,29 +97,36 @@ function normalizeWebpackStyleInjectorOptions(options) {
95
97
  };
96
98
  return webpackOptions;
97
99
  }
98
- function getTransformHandler(hook) {
99
- if (typeof hook === "function") return hook;
100
- if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
101
- }
102
- function getGenerateBundleHandler(hook) {
103
- if (typeof hook === "function") return hook;
104
- if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
105
- }
106
100
  const viteStyleInjectorDelegates = {
107
101
  generic: ((options) => [weappStyleInjector(options)]),
108
- taro: ((options) => toPluginArray(StyleInjector(options))),
109
- uniApp: ((options) => toPluginArray(StyleInjector$1(options)))
102
+ taro: ((options) => toPluginArray(StyleInjector(omitUndefined({
103
+ ...options,
104
+ subPackages: resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
105
+ })))),
106
+ uniApp: ((options) => toPluginArray(StyleInjector$1(omitUndefined({
107
+ ...options,
108
+ subPackages: resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
109
+ }))))
110
110
  };
111
111
  const webpackStyleInjectorDelegates = {
112
- generic: ((options) => weappStyleInjectorWebpack(options)),
113
- mpx: ((options) => StyleInjector$2(options)),
114
- taro: ((options) => StyleInjector$3(options)),
115
- uniApp: ((options) => StyleInjector$4(options))
112
+ generic: ((options) => weappStyleInjectorWebpack(omitUndefined(options))),
113
+ mpx: ((options) => StyleInjector$2(omitUndefined({
114
+ ...options,
115
+ subPackages: resolveStyleInjectorSubPackages(options.subPackages, "appPath")
116
+ }))),
117
+ taro: ((options) => StyleInjector$3(omitUndefined({
118
+ ...options,
119
+ subPackages: resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
120
+ }))),
121
+ uniApp: ((options) => StyleInjector$4(omitUndefined({
122
+ ...options,
123
+ subPackages: resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
124
+ })))
116
125
  };
117
126
  function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
118
127
  const normalized = normalizeStyleInjectorOptions(options);
119
128
  if (!normalized) return [];
120
- let config;
129
+ let configuration;
121
130
  let delegates;
122
131
  let delegatesConfigured = false;
123
132
  let delegatesBuildStarted = false;
@@ -127,31 +136,35 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
127
136
  return delegates;
128
137
  };
129
138
  const configureDelegates = async () => {
130
- if (delegatesConfigured || !config) return;
139
+ if (delegatesConfigured || !configuration) return;
131
140
  delegatesConfigured = true;
132
- for (const plugin of resolveDelegates()) if (typeof plugin.configResolved === "function") await plugin.configResolved(config);
141
+ for (const plugin of resolveDelegates()) await getViteHookHandler(plugin.configResolved)?.call(configuration.context, configuration.config);
133
142
  };
134
- const startDelegates = async (context) => {
143
+ const startDelegates = async (context, buildOptions) => {
135
144
  if (delegatesBuildStarted) return;
136
145
  await configureDelegates();
137
146
  delegatesBuildStarted = true;
138
- for (const plugin of resolveDelegates()) if (typeof plugin.buildStart === "function") await plugin.buildStart.call(context, {});
147
+ for (const plugin of resolveDelegates()) await getViteHookHandler(plugin.buildStart)?.call(context, buildOptions);
139
148
  };
140
149
  return [{
141
150
  name: "weapp-tailwindcss:style-injector-pre",
142
151
  apply: "build",
143
152
  enforce: "pre",
144
153
  configResolved(resolvedConfig) {
145
- config = resolvedConfig;
154
+ configuration = {
155
+ config: resolvedConfig,
156
+ context: this
157
+ };
146
158
  },
147
- async buildStart() {
148
- await startDelegates(this);
159
+ async buildStart(buildOptions) {
160
+ await startDelegates(this, buildOptions);
149
161
  },
150
162
  async load(id, options) {
151
163
  await configureDelegates();
152
164
  for (const plugin of resolveDelegates()) {
153
- if (typeof plugin.load !== "function") continue;
154
- const result = await plugin.load.call(this, id, options);
165
+ const handler = getViteHookHandler(plugin.load);
166
+ if (!handler) continue;
167
+ const result = await handler.call(this, id, options);
155
168
  if (result != null) return result;
156
169
  }
157
170
  },
@@ -160,7 +173,7 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
160
173
  let currentCode = code;
161
174
  let changed = false;
162
175
  for (const plugin of resolveDelegates()) {
163
- const handler = getTransformHandler(plugin.transform);
176
+ const handler = getViteHookHandler(plugin.transform);
164
177
  if (!handler) continue;
165
178
  const result = await handler.call(this, currentCode, id, options);
166
179
  if (!result) continue;
@@ -182,12 +195,15 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
182
195
  apply: "build",
183
196
  enforce: "post",
184
197
  configResolved(resolvedConfig) {
185
- config = resolvedConfig;
198
+ configuration = {
199
+ config: resolvedConfig,
200
+ context: this
201
+ };
186
202
  },
187
203
  async generateBundle(outputOptions, bundle, isWrite) {
188
204
  await configureDelegates();
189
205
  for (const plugin of resolveDelegates()) {
190
- const handler = getGenerateBundleHandler(plugin.generateBundle);
206
+ const handler = getViteHookHandler(plugin.generateBundle);
191
207
  if (!handler) continue;
192
208
  await handler.call(this, outputOptions, bundle, isWrite);
193
209
  }
@@ -331,4 +347,4 @@ async function createScopedGeneratorRuntime(options) {
331
347
  return fallbackRuntime;
332
348
  }
333
349
  //#endregion
334
- export { resolveWebpackFrameworkProfile as _, createJsHashSalt as a, hasRuntimeAffectingSourceChanges as c, resolvePluginDisabledState as d, createBuiltinViteStyleInjectorPlugins as f, resolveViteFrameworkProfile as g, webpackStyleInjectorDelegates as h, createCandidateSignature as i, summarizeStringDiff as l, viteStyleInjectorDelegates as m, createScopedGeneratorRuntime as n, createLinkedImpactSignature as o, createBuiltinWebpackStyleInjectorPlugin as p, createScopedGeneratorSourceTraceMap as r, getSnapshotHash as s, createScopedGeneratorCandidateSignature as t, classifyRuntimeEntry as u };
350
+ export { createBuiltinWebpackStyleInjectorPlugin as _, hasMiniProgramCssSpecificityPlaceholders as a, resolveViteFrameworkProfile as b, createCandidateSignature as c, getSnapshotHash as d, hasRuntimeAffectingSourceChanges as f, createBuiltinViteStyleInjectorPlugins as g, resolvePluginDisabledState as h, finalizeMiniProgramCss$1 as i, createJsHashSalt as l, classifyRuntimeEntry as m, createScopedGeneratorRuntime as n, pruneMiniProgramGeneratedCss as o, summarizeStringDiff as p, createScopedGeneratorSourceTraceMap as r, stripMiniProgramCssSpecificityPlaceholders as s, createScopedGeneratorCandidateSignature as t, createLinkedImpactSignature as u, viteStyleInjectorDelegates as v, resolveWebpackFrameworkProfile as x, webpackStyleInjectorDelegates as y };
@@ -1,12 +1,29 @@
1
- import { jt as toPosixPath } from "./generator-CAOx1Sqm.js";
2
- import "./tailwindcss-DTV9MoJT.js";
1
+ import { v as source_scan_exports } from "./tailwindcss-kSd0ykiX.js";
2
+ import { T as omitUndefined } from "./generator-oKZ5mCJ5.js";
3
3
  import { createRequire } from "node:module";
4
4
  import path from "node:path";
5
+ //#region src/bundlers/vite/plugin-hook.ts
6
+ /** 保留具体 hook 的参数及 this 类型,兼容函数和对象形式。 */
7
+ function getViteHookHandler(hook) {
8
+ return typeof hook === "function" ? hook : hook?.handler;
9
+ }
10
+ //#endregion
5
11
  //#region src/style-injector/options.ts
6
12
  function normalizeStyleInjectorOptions(options) {
7
13
  if (options === true) return {};
8
14
  if (!options) return;
9
- return options;
15
+ return omitUndefined(options);
16
+ }
17
+ /** 在框架入口校验分包配置,避免把另一框架的配置静默交给预设。 */
18
+ function resolveStyleInjectorSubPackages(subPackages, key) {
19
+ if (subPackages === void 0) return;
20
+ return (Array.isArray(subPackages) ? subPackages : [subPackages]).map((entry) => {
21
+ if (hasSubPackagePath(entry, key)) return entry;
22
+ throw new TypeError(`[weapp-style-injector] subPackages must provide ${key} for the selected framework.`);
23
+ });
24
+ }
25
+ function hasSubPackagePath(entry, key) {
26
+ return key in entry && typeof Reflect.get(entry, key) === "string";
10
27
  }
11
28
  //#endregion
12
29
  //#region src/bundlers/shared/module-graph.ts
@@ -62,7 +79,7 @@ function resolvePackageDir(name) {
62
79
  //#endregion
63
80
  //#region src/bundlers/shared/source-candidate-scan-signature.ts
64
81
  function normalizeSignaturePath(value) {
65
- return toPosixPath(path.resolve(value));
82
+ return (0, source_scan_exports.toPosixPath)(path.resolve(value));
66
83
  }
67
84
  function serializeInlineCandidates(inlineCandidates) {
68
85
  return {
@@ -89,4 +106,4 @@ function createSourceCandidateScanSignature(input) {
89
106
  });
90
107
  }
91
108
  //#endregion
92
- export { toAbsoluteOutputPath as a, resolveOutputSpecifier as i, resolvePackageDir as n, normalizeStyleInjectorOptions as o, normalizeOutputPathKey as r, createSourceCandidateScanSignature as t };
109
+ export { toAbsoluteOutputPath as a, getViteHookHandler as c, resolveOutputSpecifier as i, resolvePackageDir as n, normalizeStyleInjectorOptions as o, normalizeOutputPathKey as r, resolveStyleInjectorSubPackages as s, createSourceCandidateScanSignature as t };