weapp-tailwindcss 5.5.6 → 5.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. package/dist/{auto-DtU6f3X6.cjs → auto-B1OyRrE8.cjs} +1 -1
  2. package/dist/{auto-2dg_uhEJ.js → auto-ENr4xzzw.js} +1 -1
  3. package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +1 -1
  4. package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -1
  5. package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
  6. package/dist/bundlers/shared/css-source-trace.d.ts +2 -5
  7. package/dist/bundlers/shared/final-css-cleanup.d.ts +1 -1
  8. package/dist/bundlers/shared/framework-css-composition.d.ts +1 -1
  9. package/dist/bundlers/shared/framework-postcss.d.ts +1 -25
  10. package/dist/bundlers/shared/framework-user-css.d.ts +1 -4
  11. package/dist/bundlers/shared/generated-css-marker.d.ts +1 -10
  12. package/dist/bundlers/shared/generator-css/candidates.d.ts +1 -2
  13. package/dist/bundlers/shared/generator-css/class-selectors.d.ts +1 -3
  14. package/dist/bundlers/shared/generator-css/config-directive.d.ts +1 -2
  15. package/dist/bundlers/shared/generator-css/directives/fallback.d.ts +1 -11
  16. package/dist/bundlers/shared/generator-css/directives.d.ts +1 -25
  17. package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +1 -19
  18. package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +1 -23
  19. package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +1 -30
  20. package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +1 -2
  21. package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +1 -4
  22. package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +1 -12
  23. package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -2
  24. package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -1
  25. package/dist/bundlers/shared/generator-css/local-imports.d.ts +1 -1
  26. package/dist/bundlers/shared/generator-css/markers.d.ts +1 -28
  27. package/dist/bundlers/shared/generator-css/output-import-shell.d.ts +1 -8
  28. package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +1 -60
  29. package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +1 -3
  30. package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +1 -3
  31. package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +1 -3
  32. package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +1 -3
  33. package/dist/bundlers/shared/generator-css/pipeline.d.ts +1 -2
  34. package/dist/bundlers/shared/generator-css/result-helpers.d.ts +1 -6
  35. package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -1
  36. package/dist/bundlers/shared/generator-css/source-files.d.ts +1 -21
  37. package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +1 -13
  38. package/dist/bundlers/shared/generator-css/source-resolver/config.d.ts +1 -7
  39. package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +1 -33
  40. package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -3
  41. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -28
  42. package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -14
  43. package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +1 -4
  44. package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +1 -5
  45. package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +1 -16
  46. package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +1 -3
  47. package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +1 -5
  48. package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +1 -22
  49. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -7
  50. package/dist/bundlers/shared/generator-css/types.d.ts +1 -64
  51. package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -10
  52. package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +1 -3
  53. package/dist/bundlers/shared/generator-css/user-css/compile-functions.d.ts +1 -4
  54. package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +1 -6
  55. package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +1 -15
  56. package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +1 -13
  57. package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +1 -15
  58. package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -5
  59. package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +1 -10
  60. package/dist/bundlers/shared/generator-css/validate.d.ts +1 -7
  61. package/dist/bundlers/shared/generator-css.d.ts +1 -9
  62. package/dist/bundlers/shared/run-tasks.d.ts +1 -3
  63. package/dist/bundlers/shared/runtime-class-set.d.ts +1 -1
  64. package/dist/bundlers/shared/source-candidates/collector.d.ts +1 -8
  65. package/dist/bundlers/shared/source-candidates/scan-root.d.ts +1 -12
  66. package/dist/bundlers/shared/source-candidates/script.d.ts +1 -1
  67. package/dist/bundlers/shared/source-candidates/snapshot.d.ts +1 -19
  68. package/dist/bundlers/shared/source-candidates/source-priority.d.ts +1 -1
  69. package/dist/bundlers/shared/source-candidates/store.d.ts +1 -2
  70. package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -75
  71. package/dist/bundlers/shared/source-candidates/views.d.ts +1 -12
  72. package/dist/bundlers/shared/source-candidates.d.ts +1 -4
  73. package/dist/bundlers/shared/source-scan/css-entries.d.ts +1 -18
  74. package/dist/bundlers/shared/source-scan/dependencies.d.ts +1 -2
  75. package/dist/bundlers/shared/source-scan.d.ts +1 -16
  76. package/dist/bundlers/shared/static-config-content.d.ts +1 -5
  77. package/dist/bundlers/shared/style-handler-options.d.ts +1 -7
  78. package/dist/bundlers/shared/style-requests.d.ts +1 -5
  79. package/dist/bundlers/shared/v4-generation-core.d.ts +1 -20
  80. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
  81. package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +2 -2
  82. package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +1 -1
  83. package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -12
  84. package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +1 -4
  85. package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +4 -7
  86. package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -13
  87. package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +2 -2
  88. package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -1
  89. package/dist/bundlers/vite/source-candidates.d.ts +1 -1
  90. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +1 -1
  91. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +2 -7
  92. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +4 -8
  93. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +3 -3
  94. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -1
  95. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +2 -7
  96. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +1 -1
  97. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +1 -1
  98. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -1
  99. package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +6 -0
  100. package/dist/cache/index.d.ts +4 -4
  101. package/dist/cache/source.d.ts +29 -0
  102. package/dist/{cache-CBJFB1HN.cjs → cache-CzvIGfwS.cjs} +1 -0
  103. package/dist/compiler/composition.d.ts +1 -1
  104. package/dist/compiler/runtime-affecting-signature/js.d.ts +1 -0
  105. package/dist/compiler/semantic-css.d.ts +1 -1
  106. package/dist/compiler/types.d.ts +1 -1
  107. package/dist/{compiler-D3GBwxoa.js → compiler-CThodfGH.js} +3098 -3067
  108. package/dist/{compiler-C8FqI-P3.cjs → compiler-DbwS3329.cjs} +20979 -20870
  109. package/dist/core/compiler/generation-cache.d.ts +4 -2
  110. package/dist/core/compiler/types.d.ts +1 -1
  111. package/dist/core.cjs +7 -7
  112. package/dist/core.d.ts +2 -2
  113. package/dist/core.js +2 -2
  114. package/dist/css-cleanup-B6FUJC3z.cjs +1 -0
  115. package/dist/{css-imports-XvtI1zCY.cjs → css-imports-R_RDMjPz.cjs} +7 -21
  116. package/dist/css-macro/auto.d.ts +1 -1
  117. package/dist/css-macro/postcss.cjs +1 -1
  118. package/dist/css-macro.cjs +2 -2
  119. package/dist/css-macro.js +1 -1
  120. package/dist/final-css-cleanup-B6FUJC3z.cjs +1 -0
  121. package/dist/{final-css-cleanup-u_sI2p56.js → final-css-cleanup-BOzhuhGz.js} +3 -2
  122. package/dist/framework.cjs +1 -1
  123. package/dist/{v4-generation-core-Cz1D7wm1.cjs → generated-css-marker-B0RyziOH.cjs} +638 -1546
  124. package/dist/generation/candidates.d.ts +1 -0
  125. package/dist/generation/class-selectors.d.ts +4 -0
  126. package/dist/generation/config-directive.d.ts +1 -0
  127. package/dist/generation/directives/fallback.d.ts +1 -0
  128. package/dist/generation/directives.d.ts +1 -0
  129. package/dist/generation/framework-css-composition.d.ts +1 -0
  130. package/dist/generation/framework-postcss.d.ts +25 -0
  131. package/dist/generation/framework-user-css.d.ts +5 -0
  132. package/dist/generation/generation-helpers/preflight.d.ts +19 -0
  133. package/dist/generation/generation-helpers/results.d.ts +23 -0
  134. package/dist/generation/generation-helpers/runtime-isolation.d.ts +30 -0
  135. package/dist/generation/generation-helpers/source-order.d.ts +1 -0
  136. package/dist/generation/generation-helpers.d.ts +4 -0
  137. package/dist/generation/index.d.ts +9 -0
  138. package/dist/generation/legacy-compat.d.ts +12 -0
  139. package/dist/generation/legacy-selectors.d.ts +1 -0
  140. package/dist/generation/legacy-units.d.ts +1 -0
  141. package/dist/generation/local-imports.d.ts +1 -0
  142. package/dist/generation/markers.d.ts +1 -0
  143. package/dist/generation/output-import-shell.d.ts +1 -0
  144. package/dist/generation/pipeline/context.d.ts +60 -0
  145. package/dist/generation/pipeline/deferred-output.d.ts +3 -0
  146. package/dist/generation/pipeline/execution.d.ts +3 -0
  147. package/dist/generation/pipeline/fallback-output.d.ts +3 -0
  148. package/dist/generation/pipeline/ordered-output.d.ts +3 -0
  149. package/dist/generation/pipeline/preparation.d.ts +19 -0
  150. package/dist/generation/pipeline.d.ts +2 -0
  151. package/dist/generation/result-helpers.d.ts +6 -0
  152. package/dist/generation/scoped-rules.d.ts +1 -0
  153. package/dist/generation/service.d.ts +20 -0
  154. package/dist/generation/source-files.d.ts +21 -0
  155. package/dist/generation/source-resolver/apply-reference.d.ts +10 -0
  156. package/dist/generation/source-resolver/config.d.ts +7 -0
  157. package/dist/generation/source-resolver/configuration.d.ts +33 -0
  158. package/dist/generation/source-resolver/matching.d.ts +3 -0
  159. package/dist/generation/source-resolver/metadata.d.ts +28 -0
  160. package/dist/generation/source-resolver/postcss-source.d.ts +14 -0
  161. package/dist/generation/source-resolver/resolve-source.d.ts +4 -0
  162. package/dist/generation/source-resolver/resolve-sources.d.ts +5 -0
  163. package/dist/generation/source-resolver/single-source.d.ts +16 -0
  164. package/dist/generation/source-resolver/source-entries.d.ts +3 -0
  165. package/dist/generation/source-resolver/source-matching.d.ts +5 -0
  166. package/dist/generation/source-resolver/types.d.ts +22 -0
  167. package/dist/generation/source-resolver.d.ts +7 -0
  168. package/dist/generation/style-options.d.ts +8 -0
  169. package/dist/generation/style-requests.d.ts +5 -0
  170. package/dist/generation/types.d.ts +65 -0
  171. package/dist/generation/user-css/apply-only.d.ts +5 -0
  172. package/dist/generation/user-css/at-rules.d.ts +1 -0
  173. package/dist/generation/user-css/compile-functions.d.ts +3 -0
  174. package/dist/generation/user-css/generated-cleanup.d.ts +1 -0
  175. package/dist/generation/user-css/source-fragments.d.ts +1 -0
  176. package/dist/generation/user-css/transform.d.ts +1 -0
  177. package/dist/generation/user-css/user-layers.d.ts +1 -0
  178. package/dist/generation/user-css.d.ts +5 -0
  179. package/dist/generation/user-layer-order.d.ts +1 -0
  180. package/dist/generation/validate.d.ts +7 -0
  181. package/dist/generator-CxauQbx3.cjs +1868 -0
  182. package/dist/generator-oKZ5mCJ5.js +1637 -0
  183. package/dist/generator.cjs +10 -4
  184. package/dist/generator.js +1 -1
  185. package/dist/{gulp-BExe5RBF.cjs → gulp-CngHA9cU.cjs} +27 -26
  186. package/dist/{gulp-BhkIIk7J.js → gulp-DhddVxGA.js} +6 -5
  187. package/dist/gulp.cjs +1 -1
  188. package/dist/gulp.js +1 -1
  189. package/dist/{hmr-timing-CoiJIqDu.cjs → hmr-timing-Dc4c1VRg.cjs} +13 -13
  190. package/dist/{hmr-timing-B9Yt86-U.js → hmr-timing-xPpat-km.js} +518 -1360
  191. package/dist/index.cjs +7 -7
  192. package/dist/index.d.ts +1 -1
  193. package/dist/index.js +5 -5
  194. package/dist/js/ModuleGraph.d.ts +3 -1
  195. package/dist/js/babel/analyze.d.ts +6 -0
  196. package/dist/js/babel.d.ts +1 -2
  197. package/dist/js/fast-path/analysis.d.ts +14 -0
  198. package/dist/js/fast-path/oxc.d.ts +1 -1
  199. package/dist/js/oxc-parser.d.ts +4 -0
  200. package/dist/pipeline-helpers-EUud9R2K.cjs +516 -0
  201. package/dist/postcss-html-transform.cjs +1 -1
  202. package/dist/postcss.cjs +3 -2
  203. package/dist/postcss.d.ts +1 -1
  204. package/dist/postcss.js +3 -2
  205. package/dist/presets.cjs +3 -3
  206. package/dist/presets.js +2 -2
  207. package/dist/project-sources/candidates/collector.d.ts +8 -0
  208. package/dist/project-sources/candidates/scan-root.d.ts +12 -0
  209. package/dist/project-sources/candidates/script.d.ts +1 -0
  210. package/dist/project-sources/candidates/snapshot.d.ts +19 -0
  211. package/dist/project-sources/candidates/source-priority.d.ts +1 -0
  212. package/dist/project-sources/candidates/store.d.ts +2 -0
  213. package/dist/project-sources/candidates/types-and-cache.d.ts +75 -0
  214. package/dist/project-sources/candidates/views.d.ts +12 -0
  215. package/dist/project-sources/candidates.d.ts +4 -0
  216. package/dist/project-sources/css-entries.d.ts +18 -0
  217. package/dist/project-sources/dependencies.d.ts +2 -0
  218. package/dist/project-sources/index.d.ts +16 -0
  219. package/dist/project-sources/static-config-content.d.ts +5 -0
  220. package/dist/reset.cjs +1 -1
  221. package/dist/{rolldown-runtime-Ctb5zv51.cjs → rolldown-runtime-fg3euq-1.cjs} +7 -0
  222. package/dist/rspack.cjs +4 -4
  223. package/dist/rspack.js +2 -2
  224. package/dist/{runtime-state-XYSycuGu.cjs → runtime-state-BOzuVoKl.cjs} +1 -1
  225. package/dist/{scoped-generator-B6Y1bxzM.js → scoped-generator-DlQrVbuC.js} +7 -6
  226. package/dist/{scoped-generator-BUBls_oM.cjs → scoped-generator-lbTwL6mD.cjs} +9 -9
  227. package/dist/{source-candidate-scan-signature-DNuGKTqf.js → source-candidate-scan-signature-BjVQYL-C.js} +3 -3
  228. package/dist/{source-candidate-scan-signature-BtJZp28T.cjs → source-candidate-scan-signature-nG-rg809.cjs} +4 -4
  229. package/dist/style-injector/internal.d.ts +35 -35
  230. package/dist/style-injector/options.d.ts +1 -1
  231. package/dist/tailwindcss/miniprogram.d.ts +1 -1
  232. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -1
  233. package/dist/tailwindcss/source-scan/inline-source.d.ts +1 -7
  234. package/dist/tailwindcss/source-scan.d.ts +3 -32
  235. package/dist/tailwindcss/v4/css-sources.d.ts +1 -1
  236. package/dist/tailwindcss/v4/preflight.d.ts +1 -3
  237. package/dist/tailwindcss/v4/rpx-theme-warning.d.ts +4 -0
  238. package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
  239. package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +2 -3
  240. package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +1 -1
  241. package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +1 -6
  242. package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +5 -2
  243. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +3 -7
  244. package/dist/tailwindcss/v4-engine/source.d.ts +1 -1
  245. package/dist/tailwindcss/v4-engine/types.d.ts +3 -1
  246. package/dist/{tailwindcss-CBYjzRmV.cjs → tailwindcss-U3KIUegn.cjs} +65 -264
  247. package/dist/{tailwindcss-B_4E52WF.js → tailwindcss-kSd0ykiX.js} +71 -243
  248. package/dist/{transform-CkEnJYIP.js → transform-BAon9ykq.js} +25 -16
  249. package/dist/{transform-FkqbTBJR.cjs → transform-DVg4q8hh.cjs} +32 -23
  250. package/dist/types/index.d.ts +2 -2
  251. package/dist/types/user-defined-options/general.d.ts +1 -1
  252. package/dist/uni-app-x/border-preflight.d.ts +1 -1
  253. package/dist/uni-app-x/component-local-style.d.ts +3 -1
  254. package/dist/uni-app-x/vite/style-result.d.ts +1 -1
  255. package/dist/utils/run-tasks.d.ts +3 -0
  256. package/dist/vite/web.cjs +1 -1
  257. package/dist/vite/web.js +1 -1
  258. package/dist/{vite-lP35OguX.js → vite-D-RGkmOE.js} +62 -674
  259. package/dist/{vite-DxuKPZlp.cjs → vite-IX83wh_L.cjs} +217 -828
  260. package/dist/vite.cjs +1 -1
  261. package/dist/vite.js +1 -1
  262. package/dist/{watch-dependencies-GbC14Rlt.cjs → watch-dependencies-C1so1whD.cjs} +14 -1
  263. package/dist/weapp-tw-css-generation-loader.cjs +4 -3
  264. package/dist/weapp-tw-css-import-rewrite-loader.cjs +33 -28
  265. package/dist/weapp-tw-runtime-classset-loader.cjs +5 -18
  266. package/dist/{web-Dfz_jpNj.js → web--kA4HUTm.js} +16 -115
  267. package/dist/{web-DhDxhlkq.cjs → web-DHfZ_KC9.cjs} +83 -192
  268. package/dist/{webpack-R2Sbggiy.cjs → webpack-BetjemzT.cjs} +87 -87
  269. package/dist/{webpack-D6jp1o3m.js → webpack-Bhkd27Rs.js} +28 -441
  270. package/dist/webpack.cjs +1 -1
  271. package/dist/webpack.js +1 -1
  272. package/package.json +12 -7
  273. package/dist/final-css-cleanup-CDTmVAye.cjs +0 -1
  274. package/dist/generator-Bvr4WmuF.cjs +0 -3891
  275. package/dist/generator-C0BJjyLM.js +0 -3343
  276. package/dist/pipeline-helpers-BOjTEmMi.cjs +0 -971
@@ -1,69 +1,36 @@
1
+ import { _ as resolveTailwindV4CssSourceBase, g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions, l as getRuntimeClassSetSignature, m as resolveTailwindV4CssDependencies, p as discoverTailwindV4CssEntries, r as isUniAppXEnabled, v as source_scan_exports } from "./tailwindcss-kSd0ykiX.js";
1
2
  import { resolveImplicitAppTypeFromViteRoot } from "./framework.js";
2
- import { $ as hasTailwindApplyDirective, Dt as isFileMatchedByTailwindSourceEntries, H as stripMiniProgramCssSpecificityPlaceholders, K as normalizeEmptyTailwindCustomVariants, Mt as resolveTailwindV4CssSourceBase, Rt as getTailwindV4IncrementalGenerateCacheStats, T as omitUndefined, X as splitUserCssLayerBlocks, Y as hasUserCssLayerBlocks, _ as upsertTailwindV4CssSource, a as resolveGeneratorRuntimeBranch, at as normalizeTailwindSourceForGenerator, b as isTailwindV4CssEntry, c as shouldUseNativeAppCssBranch, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, k as resolveTailwindcssOptions, l as resolveUniUtsPlatform, m as filterTailwindV4CssSourceRoots, nt as hasTailwindSourceDirectives, ot as parseImportRequest, pt as hasTailwindGeneratedCssMarkers, rt as normalizeTailwindConfigDirectives, s as shouldUseMiniProgramCssBranch, st as removeTailwindSourceDirectives, tt as hasTailwindRootDirectives, x as normalizeCssEntries, z as hasMiniProgramCssSpecificityPlaceholders, zt as filterUnsupportedMiniProgramTailwindV4Candidates } from "./generator-C0BJjyLM.js";
3
- import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions, l as getRuntimeClassSetSignature, m as resolveTailwindV4CssDependencies, p as discoverTailwindV4CssEntries, r as isUniAppXEnabled } from "./tailwindcss-B_4E52WF.js";
3
+ import { L as getTailwindV4IncrementalGenerateCacheStats, R as filterUnsupportedMiniProgramTailwindV4Candidates, T as omitUndefined, _ as upsertTailwindV4CssSource, a as resolveGeneratorRuntimeBranch, b as isTailwindV4CssEntry, c as shouldUseNativeAppCssBranch, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, k as resolveTailwindcssOptions, l as resolveUniUtsPlatform, m as filterTailwindV4CssSourceRoots, s as shouldUseMiniProgramCssBranch, x as normalizeCssEntries } from "./generator-oKZ5mCJ5.js";
4
4
  import "./utils-MVwpU07P.js";
5
- import { A as annotateCssSourceTrace, B as finalizeCompilerShadowRun, C as isSourceStyleRequest, D as hasBundlerGeneratedCssMarker, E as createBundlerGeneratedCssMarker, L as isPureLocalCssImportWrapper, M as createCssTokenSourceMap, N as isCssSourceTraceEnabled, O as parseBundlerGeneratedCssMarkerBlocks, S as isSourcePreprocessorRequest, T as createBundlerGeneratedCssEndMarker, U as isSourceCandidateRequest, V as createSourceCandidateCollector, W as extractCandidatesFromSource, a as collectGeneratedRawSourceCandidatesFromCss, d as normalizeMiniProgramImportShell, f as scoreTailwindV4CssSourceFileMatch, h as mergeMarkedUserLayerComponentsCss, i as validateCandidatesByGenerator, j as createCssSourceTraceCacheSignature, k as stripBundlerGeneratedCssMarkers, l as runWithConcurrency, m as extractMarkedUserLayerComponentsCss, r as generateTailwindV4Css, t as createHmrTimingRecorder, u as normalizeMiniProgramGeneratorCssSource } from "./hmr-timing-B9Yt86-U.js";
6
- import { E as normalizeFrameworkStylePlatform, K as createDebug, L as createCompilationDependencyChanges, N as recordCompilationDependencyChanges, O as AssetEmissionPlan, a as beginCompilerShadowRun, b as logTailwindcssTarget, f as getCompilerContext, g as vitePluginName, i as disposeCompilerOwner, n as createRuntimeAffectingSourceSignature, v as shouldSkipJsTransform, x as logRuntimeTailwindcssVersion, y as toCustomAttributesEntities } from "./compiler-D3GBwxoa.js";
7
- import { i as buildRuntimeCompilationSnapshot, l as updateRuntimeCompilationBuildState, n as hasEmptyCssBlockCandidate, o as createRuntimeCompilationBuildState, r as processCachedTask, t as finalizeMiniProgramCssStructure } from "./final-css-cleanup-u_sI2p56.js";
8
- import { a as createJsHashSalt, c as hasRuntimeAffectingSourceChanges, d as resolvePluginDisabledState, f as createBuiltinViteStyleInjectorPlugins, g as resolveViteFrameworkProfile, i as createCandidateSignature, l as summarizeStringDiff, m as viteStyleInjectorDelegates, n as createScopedGeneratorRuntime, o as createLinkedImpactSignature, r as createScopedGeneratorSourceTraceMap, s as getSnapshotHash, t as createScopedGeneratorCandidateSignature, u as classifyRuntimeEntry } from "./scoped-generator-B6Y1bxzM.js";
9
- import { $ as resolveSourceStyleSourceFromOutputFile, A as finalizeWebCss, At as cleanUrl$1, B as sendSupplementalCssHotUpdates, Bt as isMiniProgramStyleOutputFile, C as tryFinalizeGenericWebCss, Ct as canProcessViteSourceStyleAsCss, D as finalizeWebCssCalc, Dt as resolveViteCssOutputFile, E as shouldSkipGenericWebProductionSourceCandidates, Et as resolveReplayCssOutputFile, F as mergeHotModulesByIdentity, Ft as resolveViteCssPipelineRequestFile, G as collectChunkModuleIds$3, Gt as withViteSourceOutputRelationOwner, H as parseVueRequest, Ht as createViteCssAssetIdentityResolver, I as resolveHotSourceModules, It as slash, J as hasTailwindGenerationSource, K as extractSfcStyleBlocks, Kt as createGenericWebViteCapabilityProfile, L as resolveHotSourceModulesByIds, Lt as createCssHandlerOptionsCache, M as registerGeneratorDependencies$1, Mt as isCSSRequest, N as shouldGenerateCssByGenerator, Nt as isHTMLRequest, O as collectViteProcessedCssSources, Ot as resolveViteCssPipelineOutputFile, P as hasSelfAcceptingNonStyleHotModule, Pt as normalizePath, Q as resolveSfcStyleSourceFromOutputFile, R as resolveHotTailwindCssModules, Rt as resolveViteCssHandlerExtraOptions, S as createViteWebCssFinalizerOutputPlugin, St as SOURCE_STYLE_OUTPUT_EXT_RE, T as createGenericWebProductionSourceCandidatesApply, Tt as resolveMiniProgramStyleOutputExtension, U as resolveViteWebCssCompatOptions, Ut as createViteSourceOutputRelationOwner, V as resolveViteModuleIdentity, Vt as isRootStyleOutputFile, W as shouldApplyViteWebCssCompat, Wt as getActiveViteSourceOutputRelationOwner, X as normalizeSfcSourceFileForCompare, Y as isSfcStyleSourceFile, Z as resolveSfcStyleRequestFromKnownSource, _ as normalizeVitePersistentCacheKey, _t as removeDuplicateUnlinkedRootCssAssetsReferencedByHtml, a as readViteHmrSource, at as collectMatchingGeneratedCssMarkerFiles, b as shouldCollectTransformedSourceCandidates, bt as posix, c as createViteHmrCssModuleVersionFilterPlugin, ct as dedupeViteCssResults, d as createFrameworkCssGenerationQueue, dt as isMatchingGeneratedCssMarkerFile, et as hasMatchingStyleFileBase, f as createViteCssGenerationPlugins, ft as isStyleImportRequest, g as isMissingInternalCssSource, gt as readAssetSource$2, h as hasVitePipelineTailwindGenerationDirective, ht as normalizeMarkerOutputFile, i as syncFrameworkSourceCandidatesForHotUpdate, it as collectImportedStyleFiles, j as inferPlatformFromViteOutDir$1, jt as formatPostcssSourceMap, k as createCssHandlerOptions, kt as resolveViteCssPipelineOutputFileFromSourceFile, l as createViteHmrCssModuleVersionTracker, lt as getAssetFile$1, m as createRewriteCssImportsPlugins, mt as normalizeInjectableCssForTargetWithImports, n as createFrameworkTailwindRootCss, nt as appendCss$1, o as createFrameworkProcessedCssRegistry, ot as collectRootStyleBundleCssSources, p as createViteRuntimeClassSet, pt as normalizeInjectableCssForTarget, q as hasSfcStyleSources, qt as frameworkViteCapabilityProfile, r as createFrameworkSourceScanSession, rt as clearAssetSource, s as createFrameworkPostPlugin, st as createCssAssetPipelineContext, t as createGenericWebVitePlugins, tt as isMatchingCssSourceFile, u as createViteHmrCandidateState, ut as hasNonCommentCss, v as summarizeStringCache, vt as removeTailwindEntryDirectivesFromCss, w as createGenericWebProductionBundleHooks, wt as normalizeCssSourceForCompare, x as touchMapEntry, xt as CSS_SOURCE_OUTPUT_EXT_RE, y as createViteCssMemory, yt as resolveViteProcessedCssAssetSource, z as sendFullReloadForUnresolvedHotUpdate, zt as isCssOutputFile } from "./web-Dfz_jpNj.js";
10
- import { a as toAbsoluteOutputPath, i as resolveOutputSpecifier, n as resolvePackageDir, r as normalizeOutputPathKey } from "./source-candidate-scan-signature-DNuGKTqf.js";
5
+ import { D as logTailwindcssTarget, E as toCustomAttributesEntities, G as createCompilationDependencyChanges, I as AssetEmissionPlan, N as createDebug, O as logRuntimeTailwindcssVersion, P as normalizeFrameworkStylePlatform, V as recordCompilationDependencyChanges, a as beginCompilerShadowRun, f as getCompilerContext, g as vitePluginName, i as disposeCompilerOwner, n as createRuntimeAffectingSourceSignature, y as shouldSkipJsTransform } from "./compiler-CThodfGH.js";
6
+ import { B as isSourcePreprocessorRequest, C as extractMarkedUserLayerComponentsCss, E as splitUserCssLayerBlocks, K as isPureLocalCssImportWrapper, L as hasTailwindGeneratedCssMarkers, M as normalizeEmptyTailwindCustomVariants$1, Q as extractCandidatesFromSource, T as hasUserCssLayerBlocks, V as isSourceStyleRequest, Y as createSourceCandidateCollector, Z as isSourceCandidateRequest, a as hasBundlerGeneratedCssMarker, at as hasTailwindSourceDirectives, b as normalizeMiniProgramImportShell, c as annotateCssSourceTrace, ct as parseImportRequest, d as isCssSourceTraceEnabled, dt as finalizeCompilerShadowRun, f as generateTailwindV4Css, i as createBundlerGeneratedCssMarker, it as hasTailwindRootDirectives, l as createCssSourceTraceCacheSignature, lt as removeTailwindSourceDirectives, m as collectGeneratedRawSourceCandidatesFromCss, nt as hasTailwindApplyDirective, o as parseBundlerGeneratedCssMarkerBlocks, ot as normalizeTailwindConfigDirectives$1, p as validateCandidatesByGenerator, r as createBundlerGeneratedCssEndMarker, s as stripBundlerGeneratedCssMarkers, st as normalizeTailwindSourceForGenerator, t as createHmrTimingRecorder, u as createCssTokenSourceMap, v as runWithConcurrency, w as mergeMarkedUserLayerComponentsCss, x as scoreTailwindV4CssSourceFileMatch, y as normalizeMiniProgramGeneratorCssSource } from "./hmr-timing-xPpat-km.js";
7
+ import { a as createRuntimeCompilationBuildState, c as updateRuntimeCompilationBuildState, n as processCachedTask, r as buildRuntimeCompilationSnapshot, t as finalizeMiniProgramCssStructure } from "./final-css-cleanup-BOzhuhGz.js";
8
+ import { a as hasMiniProgramCssSpecificityPlaceholders, b as resolveViteFrameworkProfile, c as createCandidateSignature, d as getSnapshotHash, f as hasRuntimeAffectingSourceChanges, g as createBuiltinViteStyleInjectorPlugins, h as resolvePluginDisabledState, l as createJsHashSalt, m as classifyRuntimeEntry, n as createScopedGeneratorRuntime, p as summarizeStringDiff, r as createScopedGeneratorSourceTraceMap, s as stripMiniProgramCssSpecificityPlaceholders, t as createScopedGeneratorCandidateSignature, u as createLinkedImpactSignature, v as viteStyleInjectorDelegates } from "./scoped-generator-DlQrVbuC.js";
9
+ import { $ as resolveSourceStyleSourceFromOutputFile, A as finalizeWebCss, At as formatPostcssSourceMap, B as sendSupplementalCssHotUpdates, Bt as isRootStyleOutputFile, C as tryFinalizeGenericWebCss, Ct as normalizeCssSourceForCompare, D as finalizeWebCssCalc, Dt as resolveViteCssPipelineOutputFile, E as shouldSkipGenericWebProductionSourceCandidates, Et as resolveViteCssOutputFile, F as mergeHotModulesByIdentity, Ft as slash, G as collectChunkModuleIds$3, Gt as createGenericWebViteCapabilityProfile, H as parseVueRequest, Ht as createViteSourceOutputRelationOwner, I as resolveHotSourceModules, It as createCssHandlerOptionsCache, J as hasTailwindGenerationSource, K as extractSfcStyleBlocks, Kt as frameworkViteCapabilityProfile, L as resolveHotSourceModulesByIds, Lt as resolveViteCssHandlerExtraOptions, M as registerGeneratorDependencies$1, Mt as isHTMLRequest, N as shouldGenerateCssByGenerator, Nt as normalizePath, O as collectViteProcessedCssSources, Ot as resolveViteCssPipelineOutputFileFromSourceFile, P as hasSelfAcceptingNonStyleHotModule, Pt as resolveViteCssPipelineRequestFile, Q as resolveSfcStyleSourceFromOutputFile, R as resolveHotTailwindCssModules, Rt as isCssOutputFile, S as createViteWebCssFinalizerOutputPlugin, St as canProcessViteSourceStyleAsCss, T as createGenericWebProductionSourceCandidatesApply, Tt as resolveReplayCssOutputFile, U as resolveViteWebCssCompatOptions, Ut as getActiveViteSourceOutputRelationOwner, V as resolveViteModuleIdentity, Vt as createViteCssAssetIdentityResolver, W as shouldApplyViteWebCssCompat, Wt as withViteSourceOutputRelationOwner, X as normalizeSfcSourceFileForCompare, Y as isSfcStyleSourceFile, Z as resolveSfcStyleRequestFromKnownSource, _ as normalizeVitePersistentCacheKey, _t as removeTailwindEntryDirectivesFromCss, a as readViteHmrSource, at as collectMatchingGeneratedCssMarkerFiles, b as shouldCollectTransformedSourceCandidates, bt as CSS_SOURCE_OUTPUT_EXT_RE, c as createViteHmrCssModuleVersionFilterPlugin, ct as dedupeViteCssResults, d as createFrameworkCssGenerationQueue, dt as isMatchingGeneratedCssMarkerFile, et as hasMatchingStyleFileBase, f as createViteCssGenerationPlugins, ft as normalizeInjectableCssForTarget, g as isMissingInternalCssSource, gt as removeDuplicateUnlinkedRootCssAssetsReferencedByHtml, h as hasVitePipelineTailwindGenerationDirective, ht as readAssetSource$2, i as syncFrameworkSourceCandidatesForHotUpdate, it as collectImportedStyleFiles, j as inferPlatformFromViteOutDir$1, jt as isCSSRequest, k as createCssHandlerOptions, kt as cleanUrl$1, l as createViteHmrCssModuleVersionTracker, lt as getAssetFile$1, m as createRewriteCssImportsPlugins, mt as normalizeMarkerOutputFile, n as createFrameworkTailwindRootCss, nt as appendCss$1, o as createFrameworkProcessedCssRegistry, ot as collectRootStyleBundleCssSources, p as createViteRuntimeClassSet, pt as normalizeInjectableCssForTargetWithImports, q as hasSfcStyleSources, r as createFrameworkSourceScanSession, rt as clearAssetSource, s as createFrameworkPostPlugin, st as createCssAssetPipelineContext, t as createGenericWebVitePlugins, tt as isMatchingCssSourceFile, u as createViteHmrCandidateState, ut as hasNonCommentCss, v as summarizeStringCache, vt as resolveViteProcessedCssAssetSource, w as createGenericWebProductionBundleHooks, wt as resolveMiniProgramStyleOutputExtension, x as touchMapEntry, xt as SOURCE_STYLE_OUTPUT_EXT_RE, y as createViteCssMemory, yt as posix, z as sendFullReloadForUnresolvedHotUpdate, zt as isMiniProgramStyleOutputFile } from "./web--kA4HUTm.js";
10
+ import { a as toAbsoluteOutputPath, i as resolveOutputSpecifier, n as resolvePackageDir, r as normalizeOutputPathKey } from "./source-candidate-scan-signature-BjVQYL-C.js";
11
11
  import { t as logger$1 } from "./logger-BNzxZbZj.js";
12
12
  import fs, { existsSync, readFileSync } from "node:fs";
13
13
  import path from "node:path";
14
14
  import process from "node:process";
15
- import { splitCandidateTokens } from "@tailwindcss-mangle/engine";
16
- import { UNI_APP_X_BORDER_PREFLIGHT_CLASS, collectCssApplyUtilities, compileCssMacroConditionalComments, containsCssAfterMinify, createCssRuleMatcher, createUniAppXBorderPreflight, cssToClassStyleValue, expandCssApplySourcesToStyleValue, filterExistingCssRules, hoistUniAppXBorderPreflight, isMiniProgramLocalCssImportRequest, isTailwindRuntimePropertyRule, mergeCoveredCssRuleDeclarations, mergeMiniProgramPreflightRuleDeclarations, mergeMiniProgramThemeScopeRuleDeclarations, normalizeTailwindcssV4InfinityCalcCss, normalizeUniAppXImportantApplyForSass, parseCssImportSpecifier, parseTailwindCssDirectiveRequest, parseUniAppXStyleSource, postcss, quoteCssImportSpecifier, removeUnusedMiniProgramContentInit, restoreUniAppXImportantApplyMarker, retainUniAppXAuthorApplyCss, transformWebCssCompat, transformWebCssSafeSelectors, unwrapUnsupportedCascadeLayers } from "@weapp-tailwindcss/postcss";
15
+ import { splitCandidateTokens } from "@weapp-tailwindcss/engine";
16
+ import { UNI_APP_X_BORDER_PREFLIGHT_CLASS, analyzeTailwindV4Source, collectCssApplyUtilities, collectCssReferenceDirectives, collectRootScopedComparableCssCoverage, compileCssMacroConditionalComments, containsCssAfterMinify, createCssRuleMatcher, createUniAppXBorderPreflight, createUniAppXHarmonyApplyCssExpander, createUniAppXHarmonyApplyGeneratorSource, cssToClassStyleValue, expandCssApplySourcesToStyleValue, filterExistingCssRules, hasCssLocationDependencies, hasVueScopedAttr, hoistUniAppXBorderPreflight, isCssImportOnly, mergeCoveredCssRuleDeclarations, mergeMiniProgramPreflightRuleDeclarations, mergeMiniProgramThemeScopeRuleDeclarations, normalizeTailwindcssV4InfinityCalcCss, normalizeUniAppXImportantApplyForSass, normalizeUniAppXStyleProperty, normalizeUniAppXStyleValue, parseCssImportSpecifier, parseTailwindCssDirectiveRequest, postcss, quoteCssImportSpecifier, removeCommentOnlyAtRules, removeCssCoveredByRootStyleSources, removeCssRulesCoveredBySources, removeCssRulesCoveredBySources as removeCssRulesCoveredBySources$1, removeScopedTailwindPreflightCss, replaceViteGeneratedCssModule, restoreProcessedCssImports, restoreUniAppXImportantApplyMarker, retainUniAppXAuthorApplyCss, rewriteCssConfigRequests, rewriteUniAppXStyleReferences, transformWebCssCompat, transformWebCssSafeSelectors, unwrapUnsupportedCascadeLayers } from "@weapp-tailwindcss/postcss/transform";
17
17
  import { LRUCache } from "lru-cache";
18
- import { readFile } from "node:fs/promises";
19
- import micromatch from "micromatch";
20
18
  import { cleanUrl, ensurePosix } from "@weapp-tailwindcss/shared";
21
19
  import { Buffer } from "node:buffer";
20
+ import { readFile } from "node:fs/promises";
22
21
  import { logger } from "@weapp-tailwindcss/logger";
23
22
  import { AsyncLocalStorage } from "node:async_hooks";
23
+ import micromatch from "micromatch";
24
24
  import { NodeTypes } from "@vue/compiler-dom";
25
25
  import { parse as parse$1 } from "comment-json";
26
26
  //#region src/uni-app-x/style-asset/harmony-apply.ts
27
27
  const SFC_STYLE_BLOCK_RE$1 = /(<style\b[^>]*>)([\s\S]*?)(<\/style>)/gi;
28
- function createGeneratedRuleMap(css) {
29
- let root;
30
- try {
31
- root = postcss.parse(css);
32
- } catch {
33
- return;
34
- }
35
- const rules = /* @__PURE__ */ new Map();
36
- root.walkRules((rule) => {
37
- if (rule.nodes && rule.nodes.length > 0) rules.set(rule.selector.trim(), rule.nodes.map((node) => node.clone()));
38
- });
39
- return rules.size > 0 ? rules : void 0;
40
- }
41
28
  function expandUniAppXHarmonyApplyStyles(source, generatedCss) {
42
29
  if (!source.includes("@apply")) return source;
43
- const generatedRules = createGeneratedRuleMap(generatedCss);
44
- if (!generatedRules) return source;
45
- return source.replace(SFC_STYLE_BLOCK_RE$1, (block, open, styleSource, close) => {
46
- if (!styleSource.includes("@apply")) return block;
47
- let root;
48
- try {
49
- root = parseUniAppXStyleSource(styleSource);
50
- } catch {
51
- return block;
52
- }
53
- let changed = false;
54
- root.walkRules((rule) => {
55
- if (!(rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply") === true)) return;
56
- const generatedNodes = generatedRules.get(rule.selector.trim());
57
- if (!generatedNodes) return;
58
- rule.removeAll();
59
- rule.append(generatedNodes.map((node) => node.clone()));
60
- changed = true;
61
- });
62
- if (!changed) return block;
63
- if (!root.toString().includes("@apply")) root.walkAtRules("reference", (rule) => {
64
- rule.remove();
65
- });
66
- return `${open}${root.toString()}${close}`;
30
+ const expand = createUniAppXHarmonyApplyCssExpander(generatedCss);
31
+ if (!expand) return source;
32
+ return source.replace(SFC_STYLE_BLOCK_RE$1, (_block, open, styleSource, close) => {
33
+ return `${open}${expand(styleSource)}${close}`;
67
34
  });
68
35
  }
69
36
  //#endregion
@@ -96,7 +63,6 @@ const STYLE_ENTRY_RE = /\[\s*("((?:\\.|[^"\\])+)")\s*,\s*(_pS\(_uM\(\[[\s\S]*?\]
96
63
  const STRING_LITERAL_RE = /(['"`])((?:\\.|(?!\1)[\s\S])*?)\1/g;
97
64
  const SFC_STYLE_BLOCK_RE = /<style\b[^>]*>([\s\S]*?)<\/style>/gi;
98
65
  const STYLE_EXPORT_PREFIX_RE = /^\s*export\s+default\s+/;
99
- const STRING_STYLE_PROPERTIES = /* @__PURE__ */ new Set(["lineHeight"]);
100
66
  function cloneStyleEntry(entry) {
101
67
  return Object.fromEntries(Object.entries(entry).map(([state, declarations]) => [state, { ...declarations }]));
102
68
  }
@@ -111,18 +77,6 @@ function mergeStyleEntry(local, generated) {
111
77
  function cloneStyleValue(style) {
112
78
  return Object.fromEntries(Object.entries(style).map(([className, entry]) => [className, cloneStyleEntry(entry)]));
113
79
  }
114
- function toCamelCase(prop) {
115
- return prop.replace(/-([a-z])/g, (_, char) => char.toUpperCase());
116
- }
117
- function normalizeValue(prop, value) {
118
- const trimmed = value.trim();
119
- if (!STRING_STYLE_PROPERTIES.has(toCamelCase(prop)) && /^-?\d+(?:\.\d+)?px$/.test(trimmed)) return Number(trimmed.slice(0, -2));
120
- return trimmed.replace(/\s*,\s*/g, ",");
121
- }
122
- function normalizeStyleValue(prop, value) {
123
- if (typeof value === "number") return STRING_STYLE_PROPERTIES.has(toCamelCase(prop)) ? String(value) : value;
124
- return normalizeValue(prop, value);
125
- }
126
80
  function parseStyleExport(source) {
127
81
  const json = source.replace(STYLE_EXPORT_PREFIX_RE, "").trim();
128
82
  if (!json) return;
@@ -153,7 +107,7 @@ function styleExportToUtsMap(styleExport) {
153
107
  const declarations = styleStates[""];
154
108
  if (!declarations || Object.keys(declarations).length === 0) continue;
155
109
  const declarationEntries = Object.entries(declarations).map(([prop, value]) => {
156
- return `[${JSON.stringify(toCamelCase(prop))}, ${JSON.stringify(normalizeStyleValue(prop, value))}]`;
110
+ return `[${JSON.stringify(normalizeUniAppXStyleProperty(prop))}, ${JSON.stringify(normalizeUniAppXStyleValue(prop, value))}]`;
157
111
  });
158
112
  if (declarationEntries.length === 0) continue;
159
113
  classEntries.push(`[${JSON.stringify(className)}, _pS(_uM([${declarationEntries.join(", ")}]))]`);
@@ -223,24 +177,8 @@ function createStyleValueFromApplySources(sources, utilityStyles) {
223
177
  return Object.keys(result).length > 0 ? result : void 0;
224
178
  }
225
179
  function resolveReferencePaths(styleSource, sourceId) {
226
- let root;
227
- try {
228
- root = parseUniAppXStyleSource(styleSource);
229
- } catch {
230
- return styleSource;
231
- }
232
- if (!sourceId || !styleSource.includes("@reference")) return root.toString();
233
- const cleanSourceId = sourceId.replace(/\?.*$/, "");
234
- root.walkAtRules("reference", (rule) => {
235
- const quote = rule.params[0];
236
- if (quote !== "\"" && quote !== "'") return;
237
- const closingQuoteIndex = rule.params.indexOf(quote, 1);
238
- if (closingQuoteIndex <= 1) return;
239
- const referencePath = rule.params.slice(1, closingQuoteIndex);
240
- if (!referencePath.startsWith(".")) return;
241
- rule.params = `${quote}${resolveStyleReferencePath(cleanSourceId, referencePath)}${quote}${rule.params.slice(closingQuoteIndex + 1)}`;
242
- });
243
- return root.toString();
180
+ const cleanSourceId = sourceId?.replace(/\?.*$/, "");
181
+ return rewriteUniAppXStyleReferences(styleSource, sourceId ? (reference) => resolveStyleReferencePath(cleanSourceId, reference) : void 0);
244
182
  }
245
183
  function collectUniAppXHarmonyApplyStyleSourcesFromSource(source, sourceId) {
246
184
  return (source.includes("<style") ? [...source.matchAll(SFC_STYLE_BLOCK_RE)].map((styleBlock) => styleBlock[1] ?? "") : [source]).map((styleSource) => resolveReferencePaths(styleSource.trim(), sourceId)).filter((styleSource) => styleSource.length > 0 && styleSource.includes("@apply"));
@@ -460,19 +398,8 @@ function resolveSourceMapFiles(file) {
460
398
  ].filter((item) => typeof item === "string");
461
399
  }
462
400
  const UNI_APP_X_STYLE_PLACEHOLDER_VERSION = "uni-app-x-style-placeholder-v3";
463
- function createUniAppXHarmonyApplyGeneratorSource(applyStyleSources, _applyUtilities) {
464
- return applyStyleSources.map((source) => {
465
- let root;
466
- try {
467
- root = parseUniAppXStyleSource(source);
468
- } catch {
469
- return source;
470
- }
471
- root.walkAtRules("reference", (rule) => {
472
- if (rule.params.match(/^(['"])(.+?)\1/)?.[2]?.startsWith(".")) rule.remove();
473
- });
474
- return root.toString();
475
- }).join("\n");
401
+ function createUniAppXHarmonyApplyGeneratorSource$1(applyStyleSources, _applyUtilities) {
402
+ return createUniAppXHarmonyApplyGeneratorSource(applyStyleSources);
476
403
  }
477
404
  function collectUniAppXHarmonyApplyUtilities(bundle) {
478
405
  const utilities = /* @__PURE__ */ new Set();
@@ -948,56 +875,8 @@ function createFrameworkStyleMemory(targetByFile) {
948
875
  }
949
876
  //#endregion
950
877
  //#region src/bundlers/vite/processed-css-assets/cleanup.ts
951
- function collectCssImportAtRuleCss(css) {
952
- if (!css.includes("@import")) return [];
953
- const fallbackImports = [...css.matchAll(/@import\s[^;]+;?/g)].map((match) => match[0]);
954
- if (fallbackImports.length > 0) return fallbackImports;
955
- try {
956
- const root = postcss.parse(css);
957
- const imports = [];
958
- root.each((node) => {
959
- if (node.type === "atrule" && node.name === "import") imports.push(node.toString());
960
- });
961
- return imports;
962
- } catch {
963
- return [];
964
- }
965
- }
966
- function parseCssImportRequest(importCss) {
967
- const trimmed = importCss.trim();
968
- if (!trimmed.startsWith("@import")) return;
969
- const params = trimmed.slice(7).trim().replace(/;$/, "").trim();
970
- return parseTailwindCssDirectiveRequest(params);
971
- }
972
- function shouldRestoreCssImportAtRule(importCss, file) {
973
- if (file === void 0 || !isMiniProgramStyleOutputFile(file)) return true;
974
- const request = parseCssImportRequest(importCss);
975
- if (request === void 0) return false;
976
- if (isMiniProgramLocalCssImportRequest(request)) return true;
977
- return isStyleImportRequest(request) && !request.includes("/");
978
- }
979
878
  function restoreCssImportAtRules(source, filtered, file) {
980
- const imports = collectCssImportAtRuleCss(source).filter((importCss) => shouldRestoreCssImportAtRule(importCss, file));
981
- if (imports.length === 0) return filtered;
982
- const missingImports = imports.filter((importCss) => !filtered.includes(importCss));
983
- if (missingImports.length === 0) return filtered;
984
- return appendCss$1(missingImports.join("\n"), filtered);
985
- }
986
- function removeCommentOnlyAtRules(css) {
987
- if (!hasEmptyCssBlockCandidate(css)) return css;
988
- try {
989
- const root = postcss.parse(css);
990
- let changed = false;
991
- root.walkAtRules((atRule) => {
992
- if (!atRule.nodes || atRule.nodes.length === 0) return;
993
- if (atRule.nodes.some((node) => node.type !== "comment")) return;
994
- atRule.remove();
995
- changed = true;
996
- });
997
- return changed ? root.toString() : css;
998
- } catch {
999
- return css;
1000
- }
879
+ return restoreProcessedCssImports(source, filtered, file !== void 0 && isMiniProgramStyleOutputFile(file));
1001
880
  }
1002
881
  function collectImportedBundleCssSources(bundle, importedStyleFiles) {
1003
882
  if (importedStyleFiles.size === 0) return [];
@@ -1074,16 +953,7 @@ function findBundleAssetByOutputFile(bundle, file) {
1074
953
  function isCssImportOnlyBundleAsset(bundle, file, css) {
1075
954
  const importedStyleFiles = collectImportedStyleFiles(css, file);
1076
955
  if (importedStyleFiles.size === 0) return false;
1077
- let hasNonImportNode = false;
1078
- try {
1079
- postcss.parse(css).each((node) => {
1080
- if (node.type === "comment") return;
1081
- if (node.type !== "atrule" || node.name !== "import") hasNonImportNode = true;
1082
- });
1083
- } catch {
1084
- return false;
1085
- }
1086
- if (hasNonImportNode) return false;
956
+ if (!isCssImportOnly(css)) return false;
1087
957
  return collectImportedBundleCssSources(bundle, importedStyleFiles).length > 0;
1088
958
  }
1089
959
  function isCoveredViteGeneratedSourceAsset(file, existingAssetFiles, resolveViteProcessedCssOutputFile) {
@@ -1178,218 +1048,7 @@ function collectMiniProgramSubpackageSourceEntries(snapshot, subpackageRoots, so
1178
1048
  return sourceEntries;
1179
1049
  }
1180
1050
  //#endregion
1181
- //#region src/bundlers/vite/processed-css-assets/scoped-tailwind-noise.ts
1182
- const VUE_SCOPED_ATTR_RE = /\[data-v-[^\]]+\]/gi;
1183
- const VUE_SCOPED_CLASS_RE = /\.data-v-[\w-]+/gi;
1184
- const SCOPED_UNIVERSAL_PREFLIGHT_SELECTORS = /* @__PURE__ */ new Set([
1185
- "*",
1186
- ":after",
1187
- ":before",
1188
- "::after",
1189
- "::before",
1190
- "::backdrop",
1191
- "::file-selector-button"
1192
- ]);
1193
- const MINI_PROGRAM_PREFLIGHT_SELECTORS = /* @__PURE__ */ new Set([
1194
- "view",
1195
- "text",
1196
- "::after",
1197
- "::before"
1198
- ]);
1199
- const UNI_APP_WEB_PREFLIGHT_SELECTORS = /* @__PURE__ */ new Set([
1200
- "uni-view",
1201
- "uni-text",
1202
- ":after",
1203
- ":before",
1204
- "::after",
1205
- "::before"
1206
- ]);
1207
- const MINI_PROGRAM_PREFLIGHT_DECLARATIONS = /* @__PURE__ */ new Set([
1208
- "box-sizing",
1209
- "margin",
1210
- "padding",
1211
- "border"
1212
- ]);
1213
- const TAILWIND_PREFLIGHT_DECLARATIONS = /* @__PURE__ */ new Set([
1214
- "-moz-tab-size:4",
1215
- "-webkit-appearance:none",
1216
- "-webkit-appearance:button",
1217
- "-webkit-tap-highlight-color:transparent",
1218
- "-webkit-text-decoration:inherit",
1219
- "-webkit-text-decoration:underline dotted",
1220
- "-webkit-text-size-adjust:100%",
1221
- "-o-tab-size:4",
1222
- "appearance:button",
1223
- "background-color:transparent",
1224
- "border-collapse:collapse",
1225
- "border-color:inherit",
1226
- "border-radius:0",
1227
- "border-top-width:1px",
1228
- "bottom:-.25em",
1229
- "color:inherit",
1230
- "display:block",
1231
- "display:inline-flex",
1232
- "display:list-item",
1233
- "font:inherit",
1234
- "font-family:inherit",
1235
- "font-feature-settings:inherit",
1236
- "font-size:1em",
1237
- "font-size:75%",
1238
- "font-size:80%",
1239
- "font-size:inherit",
1240
- "font-variation-settings:inherit",
1241
- "font-weight:bolder",
1242
- "font-weight:inherit",
1243
- "height:0",
1244
- "height:auto",
1245
- "letter-spacing:inherit",
1246
- "line-height:1",
1247
- "line-height:1.5",
1248
- "line-height:0",
1249
- "line-height:inherit",
1250
- "list-style:none",
1251
- "margin-inline-end:4px",
1252
- "max-width:100%",
1253
- "min-height:1lh",
1254
- "opacity:1",
1255
- "outline:auto",
1256
- "padding:0",
1257
- "padding-block:0",
1258
- "position:relative",
1259
- "resize:vertical",
1260
- "tab-size:4",
1261
- "text-align:inherit",
1262
- "text-decoration:inherit",
1263
- "text-decoration:underline dotted",
1264
- "text-indent:0",
1265
- "text-transform:none",
1266
- "top:-.5em",
1267
- "vertical-align:baseline",
1268
- "vertical-align:middle"
1269
- ]);
1270
- function hasVueScopedAttr(value) {
1271
- VUE_SCOPED_ATTR_RE.lastIndex = 0;
1272
- VUE_SCOPED_CLASS_RE.lastIndex = 0;
1273
- const matched = VUE_SCOPED_ATTR_RE.test(value) || VUE_SCOPED_CLASS_RE.test(value);
1274
- VUE_SCOPED_ATTR_RE.lastIndex = 0;
1275
- VUE_SCOPED_CLASS_RE.lastIndex = 0;
1276
- return matched;
1277
- }
1278
- function normalizeCssSignatureValue(value) {
1279
- return value.replace(VUE_SCOPED_ATTR_RE, "").replace(VUE_SCOPED_CLASS_RE, "").replace(/\s+/g, " ").replace(/\s*([>+~])\s*/g, "$1").replace(/\(\s+/g, "(").replace(/\s+\)/g, ")").trim();
1280
- }
1281
- function hasClassSelector(selector) {
1282
- return /(?:^|[^\\])\.[_a-z\u00A0-\uFFFF-]/i.test(normalizeCssSignatureValue(selector));
1283
- }
1284
- function isLikelyTailwindGlobalSelector(selector) {
1285
- const normalized = normalizeCssSignatureValue(selector);
1286
- return normalized === "*" || normalized.startsWith("::") || normalized.startsWith(":root") || normalized.startsWith(":host") || /^(?:html|body|hr|abbr|h1|h2|h3|h4|h5|h6|a|b|strong|code|kbd|samp|pre|small|sub|sup|table|button|input|select|optgroup|textarea|summary|blockquote|dl|dd|fieldset|legend|ol|ul|menu|dialog|progress|video|audio|canvas|embed|iframe|img|object|svg|details|template|[uo]ni-progress)(?:$|[:,[\s>+~.#])/.test(normalized);
1287
- }
1288
- function isTailwindPreflightDeclaration(decl) {
1289
- const prop = decl.prop.trim().toLowerCase();
1290
- const value = normalizeCssSignatureValue(decl.value.trim().toLowerCase());
1291
- if (prop.startsWith("--tw-")) return true;
1292
- if (prop === "color" && value.startsWith("color-mix(") && value.includes("currentcolor") && value.includes("transparent")) return true;
1293
- if (prop === "color" && value === "currentcolor") return true;
1294
- if (prop === "font-family" && value.startsWith("var(--default-font-family") || prop === "font-feature-settings" && value.startsWith("var(--default-font-feature-settings") || prop === "font-variation-settings" && value.startsWith("var(--default-font-variation-settings")) return true;
1295
- return TAILWIND_PREFLIGHT_DECLARATIONS.has(`${prop}:${value}`);
1296
- }
1297
- function getRuleDeclarations(rule) {
1298
- return rule.nodes?.filter((node) => node.type === "decl") ?? [];
1299
- }
1300
- function isScopedTailwindThemeCarrierRule(rule) {
1301
- const selectors = rule.selectors ?? [rule.selector];
1302
- const declarations = getRuleDeclarations(rule);
1303
- return selectors.length > 0 && selectors.every((selector) => {
1304
- const normalized = normalizeCssSignatureValue(selector);
1305
- return hasVueScopedAttr(selector) && (normalized.startsWith(":root") || normalized.startsWith(":host"));
1306
- }) && declarations.length > 0 && declarations.every((decl) => decl.prop.startsWith("--"));
1307
- }
1308
- function isScopedUniversalTailwindPreflightRule(rule) {
1309
- const selectors = rule.selectors ?? [rule.selector];
1310
- const declarations = getRuleDeclarations(rule);
1311
- return selectors.length > 0 && selectors.every((selector) => hasVueScopedAttr(selector) && SCOPED_UNIVERSAL_PREFLIGHT_SELECTORS.has(normalizeCssSignatureValue(selector))) && declarations.length > 0 && declarations.every((decl) => decl.prop.startsWith("--tw-") || MINI_PROGRAM_PREFLIGHT_DECLARATIONS.has(decl.prop));
1312
- }
1313
- function isScopedUniAppWebTailwindPreflightRule(rule) {
1314
- const selectors = rule.selectors ?? [rule.selector];
1315
- const declarations = getRuleDeclarations(rule);
1316
- return selectors.length > 0 && selectors.every((selector) => hasVueScopedAttr(selector) && UNI_APP_WEB_PREFLIGHT_SELECTORS.has(normalizeCssSignatureValue(selector))) && declarations.length > 0 && declarations.every((decl) => decl.prop.startsWith("--tw-") || MINI_PROGRAM_PREFLIGHT_DECLARATIONS.has(decl.prop));
1317
- }
1318
- function isLikelyTailwindGlobalRule(rule) {
1319
- const selectors = rule.selectors ?? [rule.selector];
1320
- const declarations = getRuleDeclarations(rule);
1321
- return isScopedTailwindThemeCarrierRule(rule) || isScopedUniversalTailwindPreflightRule(rule) || isScopedUniAppWebTailwindPreflightRule(rule) || selectors.every((selector) => !hasClassSelector(selector) && isLikelyTailwindGlobalSelector(selector)) && declarations.length > 0 && declarations.every(isTailwindPreflightDeclaration);
1322
- }
1323
- function isLikelyTailwindPropertyAtRule(atRule) {
1324
- return atRule.name.toLowerCase() === "property" && normalizeCssSignatureValue(atRule.params).startsWith("--tw-");
1325
- }
1326
- function isLikelyTailwindLayerOrderAtRule(atRule) {
1327
- if (atRule.name.toLowerCase() !== "layer" || atRule.nodes !== void 0) return false;
1328
- const params = normalizeCssSignatureValue(atRule.params).replace(/\s+/g, "");
1329
- return params === "properties" || params === "theme" || params === "base" || params === "theme,base,components,utilities";
1330
- }
1331
- function isUnscopedMiniProgramTailwindPreflightRule(rule) {
1332
- const selectors = rule.selectors ?? [rule.selector];
1333
- if (selectors.length === 0 || !selectors.every((selector) => {
1334
- const normalized = normalizeCssSignatureValue(selector);
1335
- return !hasVueScopedAttr(selector) && MINI_PROGRAM_PREFLIGHT_SELECTORS.has(normalized);
1336
- })) return false;
1337
- const declarations = getRuleDeclarations(rule);
1338
- return declarations.length > 0 && declarations.every((decl) => decl.prop.startsWith("--tw-") || MINI_PROGRAM_PREFLIGHT_DECLARATIONS.has(decl.prop));
1339
- }
1340
- function isScopedMiniProgramTailwindContentInitRule(rule) {
1341
- const selectors = rule.selectors ?? [rule.selector];
1342
- if (selectors.length === 0 || !selectors.every((selector) => {
1343
- const normalized = normalizeCssSignatureValue(selector);
1344
- return hasVueScopedAttr(selector) && MINI_PROGRAM_PREFLIGHT_SELECTORS.has(normalized);
1345
- })) return false;
1346
- const declarations = getRuleDeclarations(rule);
1347
- return declarations.length > 0 && declarations.every((decl) => decl.prop === "--tw-content");
1348
- }
1349
- //#endregion
1350
1051
  //#region src/bundlers/vite/processed-css-assets/coverage.ts
1351
- function createDeclarationSignature(rule) {
1352
- return createDeclarationKeys(rule).sort().join(";");
1353
- }
1354
- function createRuleCoverageKey(selector, declarations) {
1355
- return `${normalizeCssSignatureValue(selector)}\0${declarations}`;
1356
- }
1357
- function createDeclarationKeys(rule) {
1358
- return (rule.nodes ?? []).filter((node) => node.type === "decl").map((node) => `${node.prop}:${normalizeCssSignatureValue(node.value)}${node.important ? "!important" : ""}`);
1359
- }
1360
- function createAtRuleCoverageKey(atRule) {
1361
- return `${atRule.name}\0${normalizeCssSignatureValue(atRule.params)}\0${normalizeCssSignatureValue(atRule.toString())}`;
1362
- }
1363
- function collectRootScopedComparableCssCoverage(cssSources) {
1364
- const rules = /* @__PURE__ */ new Set();
1365
- const atRules = /* @__PURE__ */ new Set();
1366
- const declarationsBySelector = /* @__PURE__ */ new Map();
1367
- const normalizedRuleCss = /* @__PURE__ */ new Set();
1368
- for (const source of cssSources) try {
1369
- const root = postcss.parse(source);
1370
- root.walkRules((rule) => {
1371
- normalizedRuleCss.add(normalizeCssSignatureValue(rule.toString()));
1372
- const declarations = createDeclarationSignature(rule);
1373
- if (declarations.length === 0) return;
1374
- for (const selector of rule.selectors ?? [rule.selector]) {
1375
- const normalizedSelector = normalizeCssSignatureValue(selector);
1376
- rules.add(`${normalizedSelector}\0${declarations}`);
1377
- const selectorDeclarations = declarationsBySelector.get(normalizedSelector) ?? /* @__PURE__ */ new Set();
1378
- for (const declaration of createDeclarationKeys(rule)) selectorDeclarations.add(declaration);
1379
- declarationsBySelector.set(normalizedSelector, selectorDeclarations);
1380
- }
1381
- });
1382
- root.walkAtRules((atRule) => {
1383
- atRules.add(createAtRuleCoverageKey(atRule));
1384
- });
1385
- } catch {}
1386
- return {
1387
- rules,
1388
- atRules,
1389
- declarationsBySelector,
1390
- normalizedRuleCss
1391
- };
1392
- }
1393
1052
  function prepareImportedCssCoverage(importedCssSources) {
1394
1053
  const sources = importedCssSources.map((source) => stripBundlerGeneratedCssMarkers(source).trim()).filter(Boolean);
1395
1054
  if (sources.length === 0) return;
@@ -1398,56 +1057,6 @@ function prepareImportedCssCoverage(importedCssSources) {
1398
1057
  sources
1399
1058
  };
1400
1059
  }
1401
- function isRuleCoveredByRootCss(rule, coverage) {
1402
- const declarations = createDeclarationSignature(rule);
1403
- if (declarations.length === 0) return false;
1404
- const selectors = rule.selectors ?? [rule.selector];
1405
- if (selectors.every((selector) => coverage.rules.has(createRuleCoverageKey(selector, declarations)))) return true;
1406
- const declarationKeys = createDeclarationKeys(rule);
1407
- return declarationKeys.length > 0 && selectors.every((selector) => {
1408
- const rootDeclarations = coverage.declarationsBySelector.get(normalizeCssSignatureValue(selector));
1409
- return rootDeclarations != null && declarationKeys.every((declaration) => rootDeclarations.has(declaration));
1410
- });
1411
- }
1412
- function removeScopedCssCoveredByRootStyleSources(css, rootSources, preserveRuntimeProperties = false) {
1413
- if (!hasVueScopedAttr(css)) return css;
1414
- const hasScopedTailwindGeneratedCss = /tailwindcss v\d/i.test(css);
1415
- const coverage = collectRootScopedComparableCssCoverage(rootSources);
1416
- try {
1417
- const root = postcss.parse(css);
1418
- let changed = false;
1419
- root.walkComments((comment) => {
1420
- if (/tailwindcss v\d/i.test(comment.text)) {
1421
- comment.remove();
1422
- changed = true;
1423
- }
1424
- });
1425
- root.walkRules((rule) => {
1426
- if (preserveRuntimeProperties && isTailwindRuntimePropertyRule(rule)) return;
1427
- if (isRuleCoveredByRootCss(rule, coverage) || hasScopedTailwindGeneratedCss && isLikelyTailwindGlobalRule(rule) || isUnscopedMiniProgramTailwindPreflightRule(rule) || isScopedMiniProgramTailwindContentInitRule(rule) || isScopedUniAppWebTailwindPreflightRule(rule) || isScopedUniversalTailwindPreflightRule(rule)) {
1428
- rule.remove();
1429
- changed = true;
1430
- }
1431
- });
1432
- root.walkAtRules((atRule) => {
1433
- if (coverage.atRules.has(createAtRuleCoverageKey(atRule)) || !preserveRuntimeProperties && isLikelyTailwindPropertyAtRule(atRule) || isLikelyTailwindLayerOrderAtRule(atRule)) {
1434
- atRule.remove();
1435
- changed = true;
1436
- return;
1437
- }
1438
- if (atRule.nodes !== void 0 && atRule.nodes.length === 0) {
1439
- atRule.remove();
1440
- changed = true;
1441
- }
1442
- });
1443
- return changed ? removeDanglingCssSourceTraceComments(root.toString()).trim() : css;
1444
- } catch {
1445
- return css;
1446
- }
1447
- }
1448
- function removeScopedTailwindPreflightCss(css, options) {
1449
- return removeScopedCssCoveredByRootStyleSources(css, [], options?.preserveRuntimeProperties);
1450
- }
1451
1060
  function collectSingleViteGeneratedCssMarkerFile(rawSource) {
1452
1061
  const blocks = parseBundlerGeneratedCssMarkerBlocks(rawSource).filter((block) => block.bundler === "vite");
1453
1062
  if (blocks.length !== 1) return;
@@ -1461,68 +1070,7 @@ function shouldFilterRootGeneratedCssMarkerForScopedAsset(targetFile, markerFile
1461
1070
  return !isMatchingGeneratedCssMarkerFile(targetFile, markerFile, resolveViteProcessedCssOutputFile);
1462
1071
  }
1463
1072
  function removeCssCoveredByRootStyleBundleSources(bundle, file, css) {
1464
- const rootSources = collectRootStyleBundleCssSources(bundle, file);
1465
- if (css.trim().length === 0) return css;
1466
- const hasScopedCss = hasVueScopedAttr(css);
1467
- const hasScopedTailwindGeneratedCss = hasScopedCss && /tailwindcss v\d/i.test(css);
1468
- if (rootSources.length === 0 && !hasScopedCss) return css;
1469
- const coverage = collectRootScopedComparableCssCoverage(rootSources);
1470
- let nextCss = css;
1471
- try {
1472
- const root = postcss.parse(css);
1473
- let changed = false;
1474
- root.walkRules((rule) => {
1475
- if (coverage.normalizedRuleCss.has(normalizeCssSignatureValue(rule.toString())) || hasScopedCss && (isRuleCoveredByRootCss(rule, coverage) || hasScopedTailwindGeneratedCss && isLikelyTailwindGlobalRule(rule) || isUnscopedMiniProgramTailwindPreflightRule(rule) || isScopedMiniProgramTailwindContentInitRule(rule) || isScopedUniAppWebTailwindPreflightRule(rule) || isScopedUniversalTailwindPreflightRule(rule))) {
1476
- rule.remove();
1477
- changed = true;
1478
- }
1479
- });
1480
- if (hasScopedCss) root.walkAtRules((atRule) => {
1481
- if (coverage.atRules.has(createAtRuleCoverageKey(atRule)) || isLikelyTailwindPropertyAtRule(atRule) || isLikelyTailwindLayerOrderAtRule(atRule)) {
1482
- atRule.remove();
1483
- changed = true;
1484
- return;
1485
- }
1486
- if (atRule.nodes !== void 0 && atRule.nodes.length === 0) {
1487
- atRule.remove();
1488
- changed = true;
1489
- }
1490
- });
1491
- root.walkComments((comment) => {
1492
- if (hasScopedCss && /tailwindcss v\d/i.test(comment.text)) {
1493
- comment.remove();
1494
- changed = true;
1495
- return;
1496
- }
1497
- if (!comment.text.trim().startsWith("tokens:")) return;
1498
- const next = comment.next();
1499
- if (next?.type === "rule" || next?.type === "atrule") return;
1500
- comment.remove();
1501
- changed = true;
1502
- });
1503
- if (changed) {
1504
- removeUnusedMiniProgramContentInit(root);
1505
- nextCss = root.toString().trim();
1506
- }
1507
- } catch {}
1508
- return hasNonCommentCss(nextCss) ? nextCss : "";
1509
- }
1510
- function removeDanglingCssSourceTraceComments(css) {
1511
- if (!css.includes("/* tokens:")) return css;
1512
- try {
1513
- const root = postcss.parse(css);
1514
- let changed = false;
1515
- root.each((node) => {
1516
- if (node.type !== "comment" || !node.text.trim().startsWith("tokens:")) return;
1517
- const next = node.next();
1518
- if (next?.type === "rule" || next?.type === "atrule") return;
1519
- node.remove();
1520
- changed = true;
1521
- });
1522
- return changed ? root.toString().trim() : css;
1523
- } catch {
1524
- return css;
1525
- }
1073
+ return removeCssCoveredByRootStyleSources(css, collectRootStyleBundleCssSources(bundle, file));
1526
1074
  }
1527
1075
  function removeCssCoveredByRootStyleAssets(bundle, options) {
1528
1076
  let updated = 0;
@@ -1671,23 +1219,6 @@ function removeCssCoveredByImportedViteResults(css, importedCssSources, prepared
1671
1219
  if (!prepared) return css;
1672
1220
  return restoreCssImportAtRules(css, removeCssRulesCoveredBySources(css, prepared.sources, { exactOnly: true }, prepared.coverage));
1673
1221
  }
1674
- function removeCssRulesCoveredBySources(css, sources, options = {}, preparedCoverage) {
1675
- if (sources.length === 0 || css.trim().length === 0) return css;
1676
- const coverage = preparedCoverage ?? collectRootScopedComparableCssCoverage(sources);
1677
- if (coverage.rules.size === 0 && coverage.declarationsBySelector.size === 0 && coverage.normalizedRuleCss.size === 0) return css;
1678
- try {
1679
- const root = postcss.parse(css);
1680
- let changed = false;
1681
- root.walkRules((rule) => {
1682
- if (!coverage.normalizedRuleCss.has(normalizeCssSignatureValue(rule.toString())) && (options.exactOnly === true || !isRuleCoveredByRootCss(rule, coverage))) return;
1683
- rule.remove();
1684
- changed = true;
1685
- });
1686
- return changed ? root.toString() : css;
1687
- } catch {
1688
- return css;
1689
- }
1690
- }
1691
1222
  //#endregion
1692
1223
  //#region src/bundlers/vite/processed-css-assets/collector.ts
1693
1224
  function collectViteProcessedCssAssetResults(bundle, options) {
@@ -1870,7 +1401,7 @@ function injectViteProcessedCssIntoMainCssAssets(bundle, options) {
1870
1401
  }
1871
1402
  const finalImportedCssSources = collectImportedBundleCssSources(bundle, collectImportedStyleFiles(originalSource, file));
1872
1403
  const finalImportedCssCoverage = prepareImportedCssCoverage(finalImportedCssSources);
1873
- nextCss = measure("finalizeTarget", () => transformCss(removeCommentOnlyAtRules(restoreCssImportAtRules(originalSource, removeCssRulesCoveredBySources(nextCss, finalImportedCssSources, { exactOnly: true }, finalImportedCssCoverage?.coverage).trim(), file)), file));
1404
+ nextCss = measure("finalizeTarget", () => transformCss(removeCommentOnlyAtRules(restoreCssImportAtRules(originalSource, removeCssRulesCoveredBySources$1(nextCss, finalImportedCssSources, { exactOnly: true }, finalImportedCssCoverage?.coverage).trim(), file)), file));
1874
1405
  if (nextCss.trim() === originalSource.trim()) nextCss = originalSource;
1875
1406
  if (nextCss !== originalSource) {
1876
1407
  output.source = nextCss;
@@ -2066,8 +1597,8 @@ async function collectBundleMarkupCandidates(options) {
2066
1597
  const valuesForEntries = (entries, filterOptions = {}) => {
2067
1598
  const values = /* @__PURE__ */ new Set();
2068
1599
  for (const { sourceFile: file, candidates } of candidatesByFile.values()) {
2069
- if (entries !== void 0 && !isFileMatchedByTailwindSourceEntries(file, entries)) continue;
2070
- if (filterOptions.excludeEntries?.length && isFileMatchedByTailwindSourceEntries(file, filterOptions.excludeEntries)) continue;
1600
+ if (entries !== void 0 && !(0, source_scan_exports.isFileMatchedByTailwindSourceEntries)(file, entries)) continue;
1601
+ if (filterOptions.excludeEntries?.length && (0, source_scan_exports.isFileMatchedByTailwindSourceEntries)(file, filterOptions.excludeEntries)) continue;
2071
1602
  for (const candidate of candidates) values.add(candidate);
2072
1603
  }
2073
1604
  return values;
@@ -2467,13 +1998,12 @@ function collectCssConfigBaseCandidates(source, file, outputRoot, opts) {
2467
1998
  function normalizeRelativeCssConfigDirectives(source, file, outputRoot, opts) {
2468
1999
  if (!source.includes("@config")) return source;
2469
2000
  const baseCandidates = collectCssConfigBaseCandidates(source, file, outputRoot, opts);
2470
- return source.replace(/@config\s+(["'])(.+?)\1\s*;?/g, (full, quote, request) => {
2471
- if (path.isAbsolute(request) || isPackageJsonImportRequest(request)) return full;
2001
+ return rewriteCssConfigRequests(source, (request) => {
2002
+ if (path.isAbsolute(request) || isPackageJsonImportRequest(request)) return;
2472
2003
  for (const base of baseCandidates) {
2473
2004
  const configFile = path.resolve(base, request);
2474
- if (existsSync(configFile)) return `@config ${quote}${slash(configFile)}${quote};`;
2005
+ if (existsSync(configFile)) return slash(configFile);
2475
2006
  }
2476
- return full;
2477
2007
  });
2478
2008
  }
2479
2009
  //#endregion
@@ -3074,24 +2604,8 @@ function applyCssResultToBundle(options) {
3074
2604
  }
3075
2605
  //#endregion
3076
2606
  //#region src/bundlers/vite/generate-bundle/css-share-scope.ts
3077
- const CSS_URL_FUNCTION_RE = /url\((?:"([^"]*)"|'([^']*)'|([^)]*))\)/gi;
3078
- const CSS_PATH_INDEPENDENT_URL_RE = /^(?:[a-z][a-z\d+.-]*:|\/\/|\/|#)/i;
3079
- const CSS_IMPORT_RE = /@import\b/i;
3080
- function isPathIndependentCssUrl(value) {
3081
- const normalized = value.trim();
3082
- return normalized.length > 0 && CSS_PATH_INDEPENDENT_URL_RE.test(normalized);
3083
- }
3084
- function hasPathDependentCssUrl(rawSource) {
3085
- CSS_URL_FUNCTION_RE.lastIndex = 0;
3086
- let match = CSS_URL_FUNCTION_RE.exec(rawSource);
3087
- while (match !== null) {
3088
- if (!isPathIndependentCssUrl(match[1] ?? match[2] ?? match[3] ?? "")) return true;
3089
- match = CSS_URL_FUNCTION_RE.exec(rawSource);
3090
- }
3091
- return false;
3092
- }
3093
2607
  function createCssTransformShareScope(file, rawSource) {
3094
- if (CSS_IMPORT_RE.test(rawSource) || hasPathDependentCssUrl(rawSource)) return `dir:${normalizeOutputPathKey(path.dirname(file))}`;
2608
+ if (hasCssLocationDependencies(rawSource)) return `dir:${normalizeOutputPathKey(path.dirname(file))}`;
3095
2609
  return "global";
3096
2610
  }
3097
2611
  function createCssTransformShareScopeKey(opts, file, rawSource) {
@@ -3165,141 +2679,32 @@ async function resolveRememberedCssSourcePlan(options) {
3165
2679
  }
3166
2680
  //#endregion
3167
2681
  //#region src/bundlers/vite/generate-bundle/tailwind-v4-css-source.ts
3168
- function createStableTextSignature(input) {
3169
- let hash = 2166136261;
3170
- for (let i = 0; i < input.length; i++) {
3171
- hash ^= input.charCodeAt(i);
3172
- hash = Math.imul(hash, 16777619);
3173
- }
3174
- return (hash >>> 0).toString(36);
3175
- }
3176
- function parseQuotedRequest(params) {
3177
- const input = params.trim();
3178
- const quote = input[0];
3179
- if (quote !== "\"" && quote !== "'") return;
3180
- let escaped = false;
3181
- for (let index = 1; index < input.length; index++) {
3182
- const char = input[index];
3183
- if (escaped) {
3184
- escaped = false;
3185
- continue;
3186
- }
3187
- if (char === "\\") {
3188
- escaped = true;
3189
- continue;
3190
- }
3191
- if (char === quote) return input.slice(1, index);
3192
- }
3193
- }
3194
- function parseSourceParams(params) {
3195
- let input = params.trim();
3196
- let negated = false;
3197
- if (input.startsWith("not ")) {
3198
- negated = true;
3199
- input = input.slice(4).trim();
3200
- }
3201
- if (input.startsWith("inline(") && input.endsWith(")")) return {
3202
- prefix: negated ? "source:inline:not" : "source:inline",
3203
- value: input.slice(7, -1).trim()
3204
- };
3205
- const request = parseQuotedRequest(input);
3206
- if (!request) return;
3207
- return {
3208
- prefix: negated ? "source:not" : "source",
3209
- value: request
3210
- };
3211
- }
3212
- function parseTailwindImportSource(params) {
3213
- if (parseQuotedRequest(params) !== "tailwindcss") return;
3214
- return /\bsource\(([^)]*)\)/.exec(params)?.[1]?.trim();
3215
- }
3216
- function hasExplicitTailwindV4Directive(source) {
3217
- try {
3218
- let found = false;
3219
- postcss.parse(source).walkAtRules((rule) => {
3220
- if (rule.name === "config" || rule.name === "source" || rule.name === "plugin" || rule.name === "custom-variant" || rule.name === "theme" || rule.name === "utility" || rule.name === "variant" || rule.name === "apply") {
3221
- found = true;
3222
- return false;
3223
- }
3224
- });
3225
- return found;
3226
- } catch {
3227
- return false;
3228
- }
3229
- }
3230
2682
  function collectTailwindV4SourceFingerprint(source) {
3231
- const tokens = /* @__PURE__ */ new Set();
3232
- const add = (prefix, value) => {
3233
- tokens.add(`${prefix}:${value.trim()}`);
3234
- };
3235
- try {
3236
- const root = postcss.parse(source);
3237
- root.walkAtRules((rule) => {
3238
- if (rule.name === "import") {
3239
- const sourceMode = parseTailwindImportSource(rule.params);
3240
- if (sourceMode) add("import-source", sourceMode);
3241
- return;
3242
- }
3243
- if (rule.name === "config") {
3244
- const configRequest = parseQuotedRequest(rule.params);
3245
- if (configRequest) {
3246
- add("config", path.basename(configRequest));
3247
- add("config-request", configRequest.replace(/\\/g, "/"));
3248
- }
3249
- return;
3250
- }
3251
- if (rule.name === "source") {
3252
- const parsed = parseSourceParams(rule.params);
3253
- if (parsed) add(parsed.prefix, parsed.value);
3254
- return;
3255
- }
3256
- if (rule.name === "plugin") {
3257
- const request = parseQuotedRequest(rule.params);
3258
- if (!request) return;
3259
- add("plugin", request);
3260
- add("plugin-request", request.replace(/\\/g, "/"));
3261
- if (rule.nodes?.length) {
3262
- add("plugin-options", `${request}:${createStableTextSignature(rule.toString())}`);
3263
- rule.walkDecls((decl) => {
3264
- add("plugin-option", `${request}:${decl.prop}:${decl.value}`);
3265
- });
3266
- }
3267
- return;
3268
- }
3269
- if (rule.name === "custom-variant") {
3270
- const [name] = rule.params.trim().split(/\s+/, 1);
3271
- if (name) add("custom-variant", name);
3272
- return;
3273
- }
3274
- if (rule.name === "theme" || rule.name === "utility" || rule.name === "variant" || rule.name === "layer") {
3275
- const [name] = rule.params.trim().split(/\s+/, 1);
3276
- if (name) add("directive", name);
3277
- }
3278
- });
3279
- root.walkDecls((decl) => {
3280
- if (decl.prop.startsWith("--")) add("theme-token", decl.prop);
3281
- });
3282
- root.walkRules((rule) => {
3283
- for (const selector of rule.selectors ?? []) {
3284
- const match = /\.([_a-z][\w-]*)/i.exec(selector);
3285
- if (match?.[1]) add("selector", match[1]);
3286
- }
3287
- });
3288
- } catch {}
3289
- return tokens;
2683
+ return analyzeTailwindV4Source(source, path.basename).getFingerprint();
2684
+ }
2685
+ function scoreSourceFingerprints(rawTokens, entryTokens) {
2686
+ let score = 0;
2687
+ for (const token of entryTokens) if (rawTokens.has(token)) score += token.startsWith("config:") ? 100 : 1;
2688
+ return score;
3290
2689
  }
3291
2690
  function scoreConfiguredTailwindV4SourceForRawSource(rawSource, entrySource) {
3292
2691
  if (!rawSource) return 0;
3293
2692
  const rawTokens = collectTailwindV4SourceFingerprint(rawSource);
3294
2693
  if (rawTokens.size === 0) return 0;
3295
- const entryTokens = collectTailwindV4SourceFingerprint(entrySource);
3296
- let score = 0;
3297
- for (const token of entryTokens) if (rawTokens.has(token)) score += token.startsWith("config:") ? 100 : 1;
3298
- return score;
2694
+ return scoreSourceFingerprints(rawTokens, collectTailwindV4SourceFingerprint(entrySource));
3299
2695
  }
3300
2696
  function selectTailwindV4GenerationCssSourceForOutput(outputFile, entries, rawSource, options = {}) {
3301
2697
  const generationSources = entries.filter((entry) => hasTailwindGenerationSource(entry.source));
3302
2698
  if (generationSources.length <= 1) return generationSources[0];
2699
+ const analyses = /* @__PURE__ */ new Map();
2700
+ const analyze = (source) => {
2701
+ let analysis = analyses.get(source);
2702
+ if (!analysis) {
2703
+ analysis = analyzeTailwindV4Source(source, path.basename);
2704
+ analyses.set(source, analysis);
2705
+ }
2706
+ return analysis;
2707
+ };
3303
2708
  const canMatchByOutputPath = Boolean(options.cwd || options.outputRoot || options.projectRoot);
3304
2709
  const selectByOutputPath = (candidates, shouldUseScore = (score) => score > 0) => {
3305
2710
  if (!canMatchByOutputPath) return;
@@ -3316,15 +2721,18 @@ function selectTailwindV4GenerationCssSourceForOutput(outputFile, entries, rawSo
3316
2721
  return bestSources.length === 1 ? bestSources[0]?.entry : void 0;
3317
2722
  };
3318
2723
  const selectByRawSourceFingerprint = (candidates) => {
2724
+ if (!rawSource) return;
2725
+ const rawTokens = analyze(rawSource).getFingerprint();
2726
+ if (rawTokens.size === 0) return;
3319
2727
  const scoredSources = candidates.map((entry) => ({
3320
2728
  entry,
3321
- score: scoreConfiguredTailwindV4SourceForRawSource(rawSource, entry.source)
2729
+ score: scoreSourceFingerprints(rawTokens, analyze(entry.source).getFingerprint())
3322
2730
  })).filter((item) => item.score > 0).sort((a, b) => b.score - a.score);
3323
2731
  const bestScore = scoredSources[0]?.score;
3324
2732
  const bestSources = bestScore ? scoredSources.filter((item) => item.score === bestScore) : [];
3325
2733
  return bestSources.length === 1 ? bestSources[0]?.entry : void 0;
3326
2734
  };
3327
- const explicitSources = generationSources.filter((entry) => hasExplicitTailwindV4Directive(entry.source));
2735
+ const explicitSources = generationSources.filter((entry) => analyze(entry.source).hasExplicitDirectives);
3328
2736
  const candidates = explicitSources.length === 1 ? explicitSources : generationSources;
3329
2737
  const directoryIndexOutputPathMatched = selectByOutputPath(candidates, (score) => score >= 25e3 && score < 5e4);
3330
2738
  if (directoryIndexOutputPathMatched) return directoryIndexOutputPathMatched;
@@ -3524,24 +2932,9 @@ function applyViteCssTransformTaskResult(options) {
3524
2932
  }
3525
2933
  //#endregion
3526
2934
  //#region src/bundlers/vite/generate-bundle/web-css-module.ts
3527
- /** 仅替换 transform 阶段标记的模块区间,保留 bundler 合并的前后样式及其层叠顺序。 */
3528
2935
  function replaceWebCssModule(source, sourceFile, generated) {
3529
- const markers = [...source.matchAll(/\/\*!?\s*weapp-tailwindcss vite-generated-css(-end)?\s*:\s*([^\s*]+)\s*\*\//gi)];
3530
2936
  const sourceKey = normalizeOutputPathKey(sourceFile.replace(/[?#].*$/, ""));
3531
- let cursor = 0;
3532
- let result = "";
3533
- let replaced = false;
3534
- for (let index = 0; index < markers.length; index++) {
3535
- const start = markers[index];
3536
- const end = markers[index + 1];
3537
- if (start[1] || !end?.[1] || start[2] !== end[2]) continue;
3538
- if (normalizeOutputPathKey(decodeURIComponent(start[2])) !== sourceKey) continue;
3539
- result += source.slice(cursor, start.index) + generated;
3540
- cursor = end.index + end[0].length;
3541
- replaced = true;
3542
- index++;
3543
- }
3544
- return replaced ? result + source.slice(cursor) : void 0;
2937
+ return replaceViteGeneratedCssModule(source, generated, (file) => normalizeOutputPathKey(file) === sourceKey);
3545
2938
  }
3546
2939
  //#endregion
3547
2940
  //#region src/bundlers/vite/generate-bundle/css-transform-task.ts
@@ -3868,7 +3261,7 @@ async function handleUniAppXPostCssTasks(options) {
3868
3261
  opts,
3869
3262
  runtimeState,
3870
3263
  runtime: /* @__PURE__ */ new Set(),
3871
- rawSource: createUniAppXHarmonyApplyGeneratorSource(applyStyleSources, applyUtilities),
3264
+ rawSource: createUniAppXHarmonyApplyGeneratorSource$1(applyStyleSources, applyUtilities),
3872
3265
  file: outputFile,
3873
3266
  outputFile,
3874
3267
  cssHandlerOptions,
@@ -4472,12 +3865,7 @@ function createUniAppXHarmonyApplyExpander(options) {
4472
3865
  const references = authoritative ? /* @__PURE__ */ new Set() : new Set(referenceBySourceId.get(sourceKey));
4473
3866
  for (const source of sources) {
4474
3867
  styleSources.add(source);
4475
- try {
4476
- postcss.parse(source).walkAtRules("reference", (rule) => {
4477
- const reference = rule.toString();
4478
- references.add(reference.endsWith(";") ? reference : `${reference};`);
4479
- });
4480
- } catch {}
3868
+ for (const reference of collectCssReferenceDirectives(source)) references.add(reference);
4481
3869
  for (const utility of collectUniAppXHarmonyApplyUtilitiesFromSources([source])) utilities.add(utility);
4482
3870
  }
4483
3871
  if (references.size > 0) referenceBySourceId.set(sourceKey, references);
@@ -4495,7 +3883,7 @@ function createUniAppXHarmonyApplyExpander(options) {
4495
3883
  const sourceUtilities = collectUniAppXHarmonyApplyUtilitiesFromSources(sources);
4496
3884
  if (sources.length === 0 || sourceUtilities.size === 0) return code;
4497
3885
  const cssFile = path.resolve(options.getResolvedConfig()?.root ?? process.cwd(), `uni-app-x-harmony-apply-${createStableHash(normalizePath(cleanUrl$1(id)))}.css`);
4498
- const generatorSource = createUniAppXHarmonyApplyGeneratorSource(sources, sourceUtilities);
3886
+ const generatorSource = createUniAppXHarmonyApplyGeneratorSource$1(sources, sourceUtilities);
4499
3887
  const generatedCss = await options.generateCss?.(cssFile, generatorSource, {
4500
3888
  ...hookContext.addWatchFile ? { addWatchFile: hookContext.addWatchFile.bind(hookContext) } : {},
4501
3889
  disableSourceScan: true,
@@ -4780,7 +4168,7 @@ function createUniAppXAssetTask(file, originalSource, outDir, options) {
4780
4168
  //#region src/uni-app-x/vite.ts
4781
4169
  let transformUVuePromise;
4782
4170
  function loadTransformUVue() {
4783
- transformUVuePromise ?? (transformUVuePromise = import("./transform-CkEnJYIP.js").then((mod) => mod.transformUVue));
4171
+ transformUVuePromise ?? (transformUVuePromise = import("./transform-BAon9ykq.js").then((mod) => mod.transformUVue));
4784
4172
  return transformUVuePromise;
4785
4173
  }
4786
4174
  const UVUE_NVUE_QUERY_RE = /\.(?:uvue|nvue)(?:\?.*)?$/;
@@ -5047,7 +4435,7 @@ function createUniAppXPlugins(options) {
5047
4435
  const applyUtilities = /* @__PURE__ */ new Set([...harmonyApply.utilities, ...collectUniAppXHarmonyApplyUtilities(bundle)]);
5048
4436
  if (applyStyleSources.length > 0 && applyUtilities.size > 0) {
5049
4437
  const harmonyApplyCssFile = path.resolve(getResolvedConfig()?.root ?? process.cwd(), "uni-app-x-harmony-apply.css");
5050
- const generatedCss = await generateCss?.(harmonyApplyCssFile, createUniAppXHarmonyApplyGeneratorSource(applyStyleSources, applyUtilities), {
4438
+ const generatedCss = await generateCss?.(harmonyApplyCssFile, createUniAppXHarmonyApplyGeneratorSource$1(applyStyleSources, applyUtilities), {
5051
4439
  addWatchFile: this?.addWatchFile?.bind(this),
5052
4440
  disableSourceScan: true,
5053
4441
  sourceCandidates: [],
@@ -6900,7 +6288,7 @@ function createViteCssFinalizerOutputPlugin(context) {
6900
6288
  opts,
6901
6289
  runtimeState,
6902
6290
  runtime: /* @__PURE__ */ new Set(),
6903
- rawSource: createUniAppXHarmonyApplyGeneratorSource(applyStyleSources, applyUtilities),
6291
+ rawSource: createUniAppXHarmonyApplyGeneratorSource$1(applyStyleSources, applyUtilities),
6904
6292
  file: "uni-app-x-harmony-apply.css",
6905
6293
  outputFile: "uni-app-x-harmony-apply.css",
6906
6294
  cssHandlerOptions: harmonyCssHandlerOptions,
@@ -7642,7 +7030,7 @@ function createViteFrameworkPlugins$1(options = {}, frameworkBranch) {
7642
7030
  if (isMissingInternalCssSource(file, weappTailwindcssPackageDir)) return;
7643
7031
  const sourceFile = path.normalize(file);
7644
7032
  const sourceBase = path.dirname(sourceFile);
7645
- const sourceCss = normalizeTailwindSourceForGenerator(normalizeTailwindConfigDirectives(css, sourceBase), { importFallback: true });
7033
+ const sourceCss = normalizeTailwindSourceForGenerator(normalizeTailwindConfigDirectives$1(css, sourceBase), { importFallback: true });
7646
7034
  if (autoCssSourceContent.get(sourceFile) === sourceCss) return;
7647
7035
  autoCssSourceContent.set(sourceFile, sourceCss);
7648
7036
  await syncTailwindCssSourceCandidates(sourceFile, sourceCss);
@@ -7683,7 +7071,7 @@ function createViteFrameworkPlugins$1(options = {}, frameworkBranch) {
7683
7071
  for (const cssEntry of cssEntries) {
7684
7072
  const sourceFile = path.resolve(cssEntry);
7685
7073
  const sourceBase = path.dirname(sourceFile);
7686
- const sourceCss = normalizeTailwindSourceForGenerator(normalizeTailwindConfigDirectives(await readFile(sourceFile, "utf8"), sourceBase), { importFallback: true });
7074
+ const sourceCss = normalizeTailwindSourceForGenerator(normalizeTailwindConfigDirectives$1(await readFile(sourceFile, "utf8"), sourceBase), { importFallback: true });
7687
7075
  if (autoCssSourceContent.get(sourceFile) === sourceCss) continue;
7688
7076
  autoCssSourceContent.set(sourceFile, sourceCss);
7689
7077
  await syncTailwindCssSourceCandidates(sourceFile, sourceCss);
@@ -7876,7 +7264,7 @@ function createViteFrameworkPlugins$1(options = {}, frameworkBranch) {
7876
7264
  const inferredSfcStyleRequest = isSfcStyleSourceFile(file) ? resolveSfcStyleRequestFromKnownSource(file, cssMemory.getKnownSfcSource(file), code) : file;
7877
7265
  const requestFile = isCSSRequest(id) ? inferredSfcStyleRequest === file ? resolveViteCssPipelineRequestFile(id) : inferredSfcStyleRequest : inferredSfcStyleRequest;
7878
7266
  if (!isCSSRequest(requestFile) || opts.htmlMatcher(file) || isHTMLRequest(file)) return;
7879
- const generatorCode = normalizeEmptyTailwindCustomVariants(code);
7267
+ const generatorCode = normalizeEmptyTailwindCustomVariants$1(code);
7880
7268
  const rootDir = resolvedConfig?.root ? path.resolve(resolvedConfig.root) : process.cwd();
7881
7269
  const currentGeneratorOptions = resolveCurrentGeneratorOptions();
7882
7270
  const currentGeneratorBranch = resolveCurrentGeneratorBranch();