weapp-tailwindcss 5.0.0-next.2 → 5.0.0-next.21

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 (221) hide show
  1. package/README.md +6 -7
  2. package/bin/weapp-tailwindcss.js +1 -21
  3. package/dist/bundle-state-BnV8o2Yn.js +530 -0
  4. package/dist/bundle-state-CLnuf2CW.mjs +414 -0
  5. package/dist/bundlers/shared/cache.d.ts +6 -6
  6. package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -0
  7. package/dist/bundlers/shared/css-cleanup.d.ts +1 -4
  8. package/dist/bundlers/shared/css-imports.d.ts +3 -3
  9. package/dist/bundlers/shared/generated-css-marker.d.ts +3 -0
  10. package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
  11. package/dist/bundlers/shared/generator-css/directives.d.ts +20 -0
  12. package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
  13. package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
  14. package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
  15. package/dist/bundlers/shared/generator-css/markers.d.ts +28 -0
  16. package/dist/bundlers/shared/generator-css/source-files.d.ts +14 -0
  17. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +24 -0
  18. package/dist/bundlers/shared/generator-css.d.ts +16 -22
  19. package/dist/bundlers/shared/hmr-timing.d.ts +22 -0
  20. package/dist/bundlers/shared/style-requests.d.ts +2 -0
  21. package/dist/bundlers/vite/bundle-state.d.ts +1 -0
  22. package/dist/bundlers/vite/css-finalizer.d.ts +7 -1
  23. package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
  24. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +24 -0
  25. package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +4 -0
  26. package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
  27. package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
  28. package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
  29. package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
  30. package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
  31. package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
  32. package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
  33. package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
  34. package/dist/bundlers/vite/generate-bundle.d.ts +14 -2
  35. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
  36. package/dist/bundlers/vite/index.d.ts +1 -1
  37. package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
  38. package/dist/bundlers/vite/postcss-config.d.ts +6 -0
  39. package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
  40. package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -3
  41. package/dist/bundlers/vite/runtime-class-set.d.ts +25 -0
  42. package/dist/bundlers/vite/source-candidates.d.ts +16 -1
  43. package/dist/bundlers/vite/source-scan.d.ts +26 -0
  44. package/dist/bundlers/vite/static-config-content.d.ts +5 -0
  45. package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
  46. package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +6 -0
  47. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +6 -2
  48. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +9 -3
  49. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -0
  50. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +31 -0
  51. package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -6
  52. package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
  53. package/dist/cache/index.d.ts +6 -6
  54. package/dist/cli/context.d.ts +1 -14
  55. package/dist/cli/doctor/types.d.ts +11 -11
  56. package/dist/cli/helpers.d.ts +1 -2
  57. package/dist/cli/mount-options.d.ts +2 -0
  58. package/dist/cli/types.d.ts +0 -2
  59. package/dist/cli/vscode-entry.d.ts +3 -3
  60. package/dist/cli.js +605 -611
  61. package/dist/cli.mjs +614 -620
  62. package/dist/constants.d.ts +1 -2
  63. package/dist/core.js +13 -20
  64. package/dist/core.mjs +8 -14
  65. package/dist/css-macro/postcss.js +3 -2
  66. package/dist/css-macro/postcss.mjs +3 -2
  67. package/dist/css-macro.d.ts +1 -0
  68. package/dist/css-macro.js +2 -2
  69. package/dist/css-macro.mjs +2 -2
  70. package/dist/defaults-B1igPF_e.mjs +150 -0
  71. package/dist/defaults-IHhYxNeU.js +193 -0
  72. package/dist/defaults.d.ts +15 -1
  73. package/dist/defaults.js +6 -131
  74. package/dist/defaults.mjs +2 -129
  75. package/dist/escape.js +10 -2
  76. package/dist/escape.mjs +10 -2
  77. package/dist/generator/index.d.ts +1 -1
  78. package/dist/generator/options.d.ts +9 -8
  79. package/dist/generator/types.d.ts +3 -3
  80. package/dist/generator-B4RNgMLx.js +55 -0
  81. package/dist/generator-DvyhmC76.mjs +32 -0
  82. package/dist/generator.js +12 -11
  83. package/dist/generator.mjs +2 -1
  84. package/dist/gulp.js +185 -47
  85. package/dist/gulp.mjs +179 -41
  86. package/dist/incremental-runtime-class-set-C7Q7fC5u.mjs +1863 -0
  87. package/dist/incremental-runtime-class-set-DZsbM0-a.js +1926 -0
  88. package/dist/index.d.ts +1 -1
  89. package/dist/index.js +6 -6
  90. package/dist/index.mjs +5 -5
  91. package/dist/js/babel/cache-options.d.ts +3 -0
  92. package/dist/js/babel/parse.d.ts +7 -4
  93. package/dist/js/index.d.ts +1 -0
  94. package/dist/js/literal-transform.d.ts +2 -0
  95. package/dist/js/precheck.d.ts +2 -2
  96. package/dist/logger-CZUxvJJD.mjs +2 -0
  97. package/dist/logger-EVNB9z7i.js +1 -0
  98. package/dist/postcss/config-directive.d.ts +1 -0
  99. package/dist/postcss/context.d.ts +9 -0
  100. package/dist/postcss/source-files.d.ts +8 -0
  101. package/dist/postcss/tailwind-version.d.ts +3 -0
  102. package/dist/postcss-CFa6-qO9.js +237 -0
  103. package/dist/postcss-Drpy7j-g.mjs +228 -0
  104. package/dist/postcss.d.ts +2 -2
  105. package/dist/postcss.js +3 -276
  106. package/dist/postcss.mjs +1 -269
  107. package/dist/{recorder-gYSNLfOP.js → precheck-8pQbjqpq.js} +218 -314
  108. package/dist/{recorder-zsgatmkB.mjs → precheck-D1O5AWzy.mjs} +186 -281
  109. package/dist/presets.js +13 -11
  110. package/dist/presets.mjs +11 -9
  111. package/dist/reset.d.ts +1 -0
  112. package/dist/runtime-registry-CdCV3Opt.js +5496 -0
  113. package/dist/shared/mpx.d.ts +1 -0
  114. package/dist/source-candidates-CUTNdsiz.js +222 -0
  115. package/dist/source-candidates-CnD4vyic.mjs +209 -0
  116. package/dist/tailwindcss/miniprogram.d.ts +1 -1
  117. package/dist/tailwindcss/patcher-options.d.ts +3 -51
  118. package/dist/tailwindcss/patcher.d.ts +1 -2
  119. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
  120. package/dist/tailwindcss/runtime/cache.d.ts +4 -3
  121. package/dist/tailwindcss/runtime-patch.d.ts +5 -0
  122. package/dist/tailwindcss/runtime.d.ts +11 -12
  123. package/dist/tailwindcss/source-scan.d.ts +35 -0
  124. package/dist/tailwindcss/targets.d.ts +1 -5
  125. package/dist/tailwindcss/v3-engine/types.d.ts +17 -14
  126. package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
  127. package/dist/tailwindcss/v4/css-sources.d.ts +5 -0
  128. package/dist/tailwindcss/v4/patcher-options.d.ts +1 -23
  129. package/dist/tailwindcss/v4/patcher.d.ts +1 -0
  130. package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
  131. package/dist/tailwindcss/v4-engine/types.d.ts +17 -5
  132. package/dist/tailwindcss/version.d.ts +4 -0
  133. package/dist/tailwindcss-B_JAdOQf.mjs +600 -0
  134. package/dist/tailwindcss-whZE3HpL.js +651 -0
  135. package/dist/typedoc.export.d.ts +0 -2
  136. package/dist/types/index.d.ts +51 -48
  137. package/dist/types/shared.d.ts +3 -0
  138. package/dist/types/user-defined-options/general.d.ts +23 -23
  139. package/dist/types/user-defined-options/important.d.ts +31 -28
  140. package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
  141. package/dist/types/user-defined-options/matcher.d.ts +6 -6
  142. package/dist/uni-app-x/vite.d.ts +1 -1
  143. package/dist/utils/disabled.d.ts +2 -3
  144. package/dist/utils/object.d.ts +9 -0
  145. package/dist/{utils-DmC9_In3.js → utils-4ODFyoqD.js} +1 -1
  146. package/dist/{utils-7DUGTFED.mjs → utils-CGBVVNm6.mjs} +1 -1
  147. package/dist/v3-engine-CCwvhRrQ.js +3473 -0
  148. package/dist/v3-engine-DyIcbpZm.mjs +3190 -0
  149. package/dist/{vite-CrlzCNqz.mjs → vite-B8IiXgVD.mjs} +1256 -1088
  150. package/dist/vite-BcnwgJMt.js +2368 -0
  151. package/dist/vite.d.ts +1 -2
  152. package/dist/vite.js +3 -4
  153. package/dist/vite.mjs +2 -2
  154. package/dist/weapp-tw-css-import-rewrite-loader.js +4533 -16
  155. package/dist/weapp-tw-runtime-classset-loader.js +33 -7
  156. package/dist/webpack-C4zI624R.js +846 -0
  157. package/dist/webpack-DTkshAtp.mjs +836 -0
  158. package/dist/webpack.js +1 -1
  159. package/dist/webpack.mjs +1 -1
  160. package/package.json +27 -37
  161. package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
  162. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-assets.d.ts +0 -14
  163. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-loaders.d.ts +0 -15
  164. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +0 -9
  165. package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
  166. package/dist/cli/config.d.ts +0 -5
  167. package/dist/cli/helpers/patch-cwd.d.ts +0 -1
  168. package/dist/cli/mount-options/patch-status.d.ts +0 -2
  169. package/dist/cli/patch-options.d.ts +0 -6
  170. package/dist/cli/tokens.d.ts +0 -4
  171. package/dist/cli/workspace/package-dirs.d.ts +0 -3
  172. package/dist/cli/workspace/patch-package.d.ts +0 -3
  173. package/dist/cli/workspace/patch-utils.d.ts +0 -3
  174. package/dist/cli/workspace/types.d.ts +0 -11
  175. package/dist/cli/workspace/workspace-globs.d.ts +0 -2
  176. package/dist/cli/workspace/workspace-io.d.ts +0 -1
  177. package/dist/cli/workspace/workspace-lock.d.ts +0 -1
  178. package/dist/cli/workspace.d.ts +0 -2
  179. package/dist/css-imports-BbrbluP9.js +0 -177
  180. package/dist/css-imports-CSdPq_Sc.mjs +0 -128
  181. package/dist/experimental/index.d.ts +0 -2
  182. package/dist/experimental/oxc/ast-utils.d.ts +0 -30
  183. package/dist/experimental/oxc/index.d.ts +0 -2
  184. package/dist/experimental/oxc/module-specifiers.d.ts +0 -2
  185. package/dist/experimental/shared/cache.d.ts +0 -3
  186. package/dist/experimental/shared/transform.d.ts +0 -3
  187. package/dist/experimental/shared.d.ts +0 -8
  188. package/dist/experimental/swc/ast-utils.d.ts +0 -30
  189. package/dist/experimental/swc/index.d.ts +0 -2
  190. package/dist/experimental/swc/module-specifiers.d.ts +0 -2
  191. package/dist/generator-Y-Ikv4Fu.mjs +0 -1177
  192. package/dist/generator-css-B5ejWUMv.mjs +0 -1098
  193. package/dist/generator-css-D3OdPRiS.js +0 -1125
  194. package/dist/generator-mmhXzZnv.js +0 -1276
  195. package/dist/js/syntax.d.ts +0 -10
  196. package/dist/lightningcss/index.d.ts +0 -8
  197. package/dist/lightningcss/style-handler/options.d.ts +0 -3
  198. package/dist/lightningcss/style-handler/selector-transform.d.ts +0 -10
  199. package/dist/lightningcss/style-handler/selector-utils.d.ts +0 -10
  200. package/dist/lightningcss/style-handler.d.ts +0 -17
  201. package/dist/loader-anchors-CNkWT8hx.js +0 -273
  202. package/dist/loader-anchors-TrU7EUr7.mjs +0 -205
  203. package/dist/logger-BZ45DZJT.js +0 -1003
  204. package/dist/logger-BoVx1Dbt.mjs +0 -935
  205. package/dist/patcher-options-6gJN2EXy.js +0 -115
  206. package/dist/patcher-options-DQfR5xxT.mjs +0 -92
  207. package/dist/tailwindcss/recorder.d.ts +0 -13
  208. package/dist/tailwindcss/targets/paths.d.ts +0 -13
  209. package/dist/tailwindcss/targets/record-io.d.ts +0 -5
  210. package/dist/tailwindcss/targets/recorder.d.ts +0 -3
  211. package/dist/tailwindcss/targets/types.d.ts +0 -35
  212. package/dist/types/disabled-options.d.ts +0 -4
  213. package/dist/vite-BC9U7ahn.js +0 -2199
  214. package/dist/webpack-Bu6M-Hbw.mjs +0 -441
  215. package/dist/webpack-DD7A6V0u.js +0 -456
  216. package/dist/webpack4.d.ts +0 -4
  217. package/dist/webpack4.js +0 -387
  218. package/dist/webpack4.mjs +0 -379
  219. package/scripts/postinstall.mjs +0 -59
  220. /package/dist/{constants-B-_T5UnW.mjs → constants-BG12WAKw.mjs} +0 -0
  221. /package/dist/{constants-p1dyh1x1.js → constants-BeeyfJ9k.js} +0 -0
@@ -0,0 +1,600 @@
1
+ import { G as omitUndefined, H as readInstalledPackageMajorVersion, J as findWorkspaceRoot, K as findNearestPackageRoot, V as createTailwindcssPatcher, f as runtimeSignaturePatchersSymbol, q as findWorkspacePackageDir } from "./v3-engine-DyIcbpZm.mjs";
2
+ import { n as defuOverrideArray } from "./utils-CGBVVNm6.mjs";
3
+ import { createRequire } from "node:module";
4
+ import { existsSync, readFileSync } from "node:fs";
5
+ import path from "node:path";
6
+ import process from "node:process";
7
+ import { logger } from "@weapp-tailwindcss/logger";
8
+ import { fileURLToPath } from "node:url";
9
+ //#region src/tailwindcss/v4/css-sources.ts
10
+ function hasCssEntriesValue(value) {
11
+ if (typeof value === "string") return value.trim().length > 0;
12
+ return Array.isArray(value) && value.some((entry) => typeof entry === "string" && entry.trim().length > 0);
13
+ }
14
+ function hasCssSourcesValue(value) {
15
+ return Array.isArray(value) && value.some((source) => {
16
+ return typeof source === "object" && source !== null && typeof source.css === "string" && source.css.trim().length > 0;
17
+ });
18
+ }
19
+ function hasConfiguredTailwindV4CssRoots(options) {
20
+ return hasCssEntriesValue(options.cssEntries) || hasCssEntriesValue(options.tailwindcss?.v4?.cssEntries) || hasCssEntriesValue(options.tailwindcssPatcherOptions?.tailwindcss?.v4?.cssEntries) || hasCssSourcesValue(options.tailwindcss?.v4?.cssSources) || hasCssSourcesValue(options.tailwindcssPatcherOptions?.tailwindcss?.v4?.cssSources);
21
+ }
22
+ function normalizeCssSourceFile(file) {
23
+ if (!file) return;
24
+ return path.isAbsolute(file) ? path.normalize(file) : file;
25
+ }
26
+ function normalizeCssSourceBase(base) {
27
+ if (!base) return;
28
+ return path.resolve(base);
29
+ }
30
+ function normalizeDependencies(dependencies) {
31
+ return dependencies?.map(normalizeCssSourceFile).filter((dependency) => typeof dependency === "string" && dependency.length > 0);
32
+ }
33
+ function isSameCssSource(a, b) {
34
+ return a.css === b.css && normalizeCssSourceBase(a.base) === normalizeCssSourceBase(b.base) && normalizeCssSourceFile(a.file) === normalizeCssSourceFile(b.file) && JSON.stringify(normalizeDependencies(a.dependencies)) === JSON.stringify(normalizeDependencies(b.dependencies));
35
+ }
36
+ function upsertTailwindV4CssSource(opts, source) {
37
+ const normalizedSource = omitUndefined({
38
+ ...source,
39
+ ...source.base === void 0 ? {} : { base: normalizeCssSourceBase(source.base) },
40
+ ...source.file === void 0 ? {} : { file: normalizeCssSourceFile(source.file) },
41
+ ...source.dependencies === void 0 ? {} : { dependencies: normalizeDependencies(source.dependencies) }
42
+ });
43
+ const tailwindcss = opts.tailwindcss ?? {};
44
+ const v4 = tailwindcss.v4 ?? {};
45
+ const cssSources = [...v4.cssSources ?? []];
46
+ const sourceFile = normalizeCssSourceFile(normalizedSource.file);
47
+ const existingIndex = cssSources.findIndex((candidate) => normalizeCssSourceFile(candidate.file) === sourceFile);
48
+ if (existingIndex >= 0) {
49
+ const existing = cssSources[existingIndex];
50
+ if (!existing) {
51
+ cssSources[existingIndex] = normalizedSource;
52
+ return true;
53
+ }
54
+ const nextSource = {
55
+ ...existing,
56
+ ...normalizedSource
57
+ };
58
+ if (isSameCssSource(existing, nextSource)) return false;
59
+ cssSources[existingIndex] = nextSource;
60
+ } else cssSources.push(normalizedSource);
61
+ opts.tailwindcss = {
62
+ ...tailwindcss,
63
+ v4: {
64
+ ...v4,
65
+ cssSources
66
+ }
67
+ };
68
+ return true;
69
+ }
70
+ //#endregion
71
+ //#region src/tailwindcss/v4/config.ts
72
+ const DEFAULT_CSS_CALC_CUSTOM_PROPERTIES = [];
73
+ function includesToken(list, token) {
74
+ return list.some((candidate) => {
75
+ if (typeof token === "string") {
76
+ if (typeof candidate === "string") return candidate === token;
77
+ candidate.lastIndex = 0;
78
+ return candidate.test(token);
79
+ }
80
+ if (typeof candidate === "string") {
81
+ token.lastIndex = 0;
82
+ return token.test(candidate);
83
+ }
84
+ return candidate.source === token.source && candidate.flags === token.flags;
85
+ });
86
+ }
87
+ function ensureDefaultsIncluded(value) {
88
+ if (value === true) return { includeCustomProperties: [...DEFAULT_CSS_CALC_CUSTOM_PROPERTIES] };
89
+ if (Array.isArray(value)) {
90
+ if (!DEFAULT_CSS_CALC_CUSTOM_PROPERTIES.length) return value;
91
+ const missing = DEFAULT_CSS_CALC_CUSTOM_PROPERTIES.filter((token) => !includesToken(value, token));
92
+ return missing.length > 0 ? [...value, ...missing] : value;
93
+ }
94
+ if (value && typeof value === "object") {
95
+ const include = value.includeCustomProperties;
96
+ if (!Array.isArray(include)) return {
97
+ ...value,
98
+ includeCustomProperties: [...DEFAULT_CSS_CALC_CUSTOM_PROPERTIES]
99
+ };
100
+ if (!DEFAULT_CSS_CALC_CUSTOM_PROPERTIES.length) return value;
101
+ const missing = DEFAULT_CSS_CALC_CUSTOM_PROPERTIES.filter((token) => !includesToken(include, token));
102
+ return missing.length > 0 ? {
103
+ ...value,
104
+ includeCustomProperties: [...include, ...missing]
105
+ } : value;
106
+ }
107
+ return value;
108
+ }
109
+ function normalizeCssEntriesConfig(entries) {
110
+ if (!entries) return;
111
+ if (typeof entries === "string") {
112
+ const trimmed = entries.trim();
113
+ return trimmed ? [trimmed] : void 0;
114
+ }
115
+ if (!Array.isArray(entries)) return;
116
+ const normalized = entries.map((entry) => typeof entry === "string" ? entry.trim() : "").filter((entry) => entry.length > 0);
117
+ return normalized.length > 0 ? normalized : void 0;
118
+ }
119
+ function hasConfiguredCssEntries(ctx) {
120
+ if (normalizeCssEntriesConfig(ctx.cssEntries)) return true;
121
+ if (normalizeCssEntriesConfig(ctx.tailwindcss?.v4?.cssEntries)) return true;
122
+ const patcherOptions = ctx.tailwindcssPatcherOptions;
123
+ if (patcherOptions) {
124
+ if (normalizeCssEntriesConfig(patcherOptions.tailwindcss?.v4?.cssEntries)) return true;
125
+ }
126
+ return false;
127
+ }
128
+ let hasWarnedMissingCssEntries = false;
129
+ function warnMissingCssEntries(ctx, patcher) {
130
+ if (hasWarnedMissingCssEntries) return;
131
+ if (patcher?.majorVersion !== 4) return;
132
+ if (hasConfiguredCssEntries(ctx) || hasConfiguredTailwindV4CssRoots(ctx)) return;
133
+ hasWarnedMissingCssEntries = true;
134
+ logger.warn("[tailwindcss@4] 未检测到 cssEntries 配置。请传入包含 tailwindcss 引用的 CSS 绝对路径,例如 cssEntries: [\"/absolute/path/to/src/app.css\"],否则 tailwindcss 生成的类名不会参与转译。");
135
+ }
136
+ function applyV4CssCalcDefaults(cssCalc, patcher) {
137
+ const cssCalcOptions = cssCalc ?? patcher?.majorVersion === 4;
138
+ if (patcher?.majorVersion === 4 && cssCalcOptions) return ensureDefaultsIncluded(cssCalcOptions);
139
+ return cssCalcOptions;
140
+ }
141
+ //#endregion
142
+ //#region src/tailwindcss/v4/multi-patcher.ts
143
+ function createMultiTailwindcssPatcher(patchers) {
144
+ if (patchers.length <= 1) {
145
+ const [patcher] = patchers;
146
+ if (!patcher) throw new Error("createMultiTailwindcssPatcher requires at least one patcher.");
147
+ return patcher;
148
+ }
149
+ const first = patchers[0];
150
+ const firstWithoutPatch = { ...first };
151
+ delete firstWithoutPatch.patch;
152
+ const multiPatcher = {
153
+ ...firstWithoutPatch,
154
+ packageInfo: first?.packageInfo,
155
+ majorVersion: first?.majorVersion,
156
+ options: first?.options,
157
+ async getClassSet() {
158
+ const aggregated = /* @__PURE__ */ new Set();
159
+ for (const patcher of patchers) {
160
+ const current = await patcher.getClassSet();
161
+ for (const className of current) aggregated.add(className);
162
+ }
163
+ return aggregated;
164
+ },
165
+ async extract(options) {
166
+ const aggregatedSet = /* @__PURE__ */ new Set();
167
+ const aggregatedList = [];
168
+ let filename;
169
+ for (const patcher of patchers) {
170
+ const result = await patcher.extract(options);
171
+ if (!result) continue;
172
+ if (filename === void 0 && result.filename) filename = result.filename;
173
+ if (result.classList) for (const className of result.classList) {
174
+ if (!aggregatedSet.has(className)) aggregatedList.push(className);
175
+ aggregatedSet.add(className);
176
+ }
177
+ if (result.classSet) for (const className of result.classSet) aggregatedSet.add(className);
178
+ }
179
+ return omitUndefined({
180
+ classList: aggregatedList,
181
+ classSet: aggregatedSet,
182
+ filename
183
+ });
184
+ }
185
+ };
186
+ if (patchers.every((patcher) => typeof patcher.getClassSetSync === "function")) multiPatcher.getClassSetSync = () => {
187
+ const aggregated = /* @__PURE__ */ new Set();
188
+ for (const patcher of patchers) {
189
+ const current = patcher.getClassSetSync?.();
190
+ if (!current) continue;
191
+ for (const className of current) aggregated.add(className);
192
+ }
193
+ return aggregated;
194
+ };
195
+ Object.defineProperty(multiPatcher, runtimeSignaturePatchersSymbol, {
196
+ value: [...patchers],
197
+ configurable: true
198
+ });
199
+ return multiPatcher;
200
+ }
201
+ //#endregion
202
+ //#region src/tailwindcss/v4/patcher-options.ts
203
+ function overrideTailwindcssPatcherOptionsForBase(options, baseDir, cssEntries) {
204
+ const hasCssEntries = cssEntries.length > 0;
205
+ if (!options) return options;
206
+ const modernTailwind = options.tailwindcss;
207
+ if (!modernTailwind) return options;
208
+ return {
209
+ ...options,
210
+ tailwindcss: {
211
+ ...modernTailwind,
212
+ v4: {
213
+ ...modernTailwind.v4 ?? {},
214
+ ...hasCssEntries ? {} : { base: modernTailwind.v4?.base ?? baseDir },
215
+ cssEntries: hasCssEntries ? cssEntries : modernTailwind.v4?.cssEntries ?? cssEntries
216
+ }
217
+ }
218
+ };
219
+ }
220
+ //#endregion
221
+ //#region src/tailwindcss/v4/css-entries.ts
222
+ function guessBasedirFromEntries(entries) {
223
+ if (!entries) return;
224
+ for (const entry of entries) {
225
+ if (typeof entry !== "string") continue;
226
+ const trimmed = entry.trim();
227
+ if (!trimmed || !path.isAbsolute(trimmed)) continue;
228
+ const entryDir = path.dirname(trimmed);
229
+ const resolved = findNearestPackageRoot(entryDir) ?? entryDir;
230
+ if (resolved) return resolved;
231
+ }
232
+ }
233
+ function normalizeCssEntries(entries, anchor) {
234
+ if (!entries || entries.length === 0) return;
235
+ const normalized = /* @__PURE__ */ new Set();
236
+ for (const entry of entries) {
237
+ if (typeof entry !== "string") continue;
238
+ const trimmed = entry.trim();
239
+ if (trimmed.length === 0) continue;
240
+ const resolved = path.isAbsolute(trimmed) ? path.normalize(trimmed) : path.normalize(path.resolve(anchor, trimmed));
241
+ normalized.add(resolved);
242
+ }
243
+ return normalized.size > 0 ? [...normalized] : void 0;
244
+ }
245
+ function isSubPath(parent, child) {
246
+ if (!parent || !child) return false;
247
+ const relative = path.relative(parent, child);
248
+ return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
249
+ }
250
+ function resolveCssEntryBase(entryDir, options) {
251
+ const normalizedDir = path.normalize(entryDir);
252
+ const { preferredBaseDir, workspaceRoot } = options;
253
+ if (preferredBaseDir && isSubPath(preferredBaseDir, normalizedDir)) return preferredBaseDir;
254
+ if (workspaceRoot && isSubPath(workspaceRoot, normalizedDir)) return workspaceRoot;
255
+ const packageRoot = findNearestPackageRoot(normalizedDir);
256
+ if (packageRoot) return path.normalize(packageRoot);
257
+ return normalizedDir;
258
+ }
259
+ function groupCssEntriesByBase(entries, options = {}) {
260
+ const normalizedOptions = {
261
+ preferredBaseDir: options.preferredBaseDir ? path.normalize(options.preferredBaseDir) : void 0,
262
+ workspaceRoot: options.workspaceRoot ? path.normalize(options.workspaceRoot) : void 0
263
+ };
264
+ const groups = /* @__PURE__ */ new Map();
265
+ for (const entry of entries) {
266
+ const baseDir = resolveCssEntryBase(path.dirname(entry), normalizedOptions);
267
+ const bucket = groups.get(baseDir);
268
+ if (bucket) bucket.push(entry);
269
+ else groups.set(baseDir, [entry]);
270
+ }
271
+ return groups;
272
+ }
273
+ //#endregion
274
+ //#region src/tailwindcss/v4/patcher.ts
275
+ const CONFIGURED_TAILWIND_VERSION_RE = /Configured tailwindcss\.version=\d+/u;
276
+ const RESOLVED_TAILWIND_VERSION_RE = /resolved package ".+" is version /u;
277
+ function isTailwindcss4Package(packageName) {
278
+ return Boolean(packageName && (packageName === "tailwindcss4" || packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4")));
279
+ }
280
+ function resolveExplicitTailwindVersion(configuredVersion, configuredPackageName) {
281
+ if (typeof configuredVersion === "number") return configuredVersion;
282
+ if (configuredPackageName === "tailwindcss") return 3;
283
+ if (isTailwindcss4Package(configuredPackageName)) return 4;
284
+ }
285
+ function hasOwnV4Signal(value) {
286
+ return typeof value === "object" && value !== null && "v4" in value;
287
+ }
288
+ function isTailwindVersionMismatchError(error) {
289
+ return error instanceof Error && CONFIGURED_TAILWIND_VERSION_RE.test(error.message) && RESOLVED_TAILWIND_VERSION_RE.test(error.message);
290
+ }
291
+ function createPatcherForBase(baseDir, cssEntries, options) {
292
+ const { tailwindcss, tailwindcssPatcherOptions, supportCustomLengthUnitsPatch, bareArbitraryValues } = options;
293
+ const hasCssEntries = Boolean(cssEntries?.length);
294
+ const configuredV4Options = tailwindcss?.v4 ?? tailwindcssPatcherOptions?.tailwindcss?.v4;
295
+ const hasCssSources = Boolean(configuredV4Options?.cssSources?.length);
296
+ const defaultTailwindcssConfig = {
297
+ cwd: baseDir,
298
+ v2: { cwd: baseDir },
299
+ v3: { cwd: baseDir },
300
+ v4: hasCssEntries ? omitUndefined({ cssEntries }) : omitUndefined({
301
+ base: baseDir,
302
+ cssEntries
303
+ })
304
+ };
305
+ const mergedTailwindOptions = defuOverrideArray(tailwindcss ?? {}, defaultTailwindcssConfig);
306
+ if (!mergedTailwindOptions.v4) mergedTailwindOptions.v4 = hasCssEntries ? { cssEntries: cssEntries ?? [] } : {
307
+ base: baseDir,
308
+ cssEntries: cssEntries ?? []
309
+ };
310
+ else {
311
+ if (!hasCssEntries && !mergedTailwindOptions.v4.base) mergedTailwindOptions.v4.base = baseDir;
312
+ if (hasCssEntries) {
313
+ if (cssEntries?.length) mergedTailwindOptions.v4.cssEntries = cssEntries;
314
+ else if (!mergedTailwindOptions.v4.cssEntries) mergedTailwindOptions.v4.cssEntries = [];
315
+ } else if (!mergedTailwindOptions.v4.cssEntries) mergedTailwindOptions.v4.cssEntries = cssEntries ?? [];
316
+ }
317
+ if (bareArbitraryValues !== void 0 && bareArbitraryValues !== false) mergedTailwindOptions.v4.bareArbitraryValues = bareArbitraryValues;
318
+ const patchedOptions = overrideTailwindcssPatcherOptionsForBase(tailwindcssPatcherOptions, baseDir, cssEntries ?? []);
319
+ const configuredPackageName = tailwindcss?.packageName || tailwindcssPatcherOptions?.tailwindcss?.packageName;
320
+ const explicitTailwindVersion = resolveExplicitTailwindVersion(tailwindcss?.version || tailwindcssPatcherOptions?.tailwindcss?.version || mergedTailwindOptions.version, configuredPackageName);
321
+ const hasExplicitV4Signals = hasCssEntries || hasCssSources || hasOwnV4Signal(tailwindcss) || hasOwnV4Signal(tailwindcssPatcherOptions?.tailwindcss);
322
+ const packageNameForVersionDetection = configuredPackageName ?? mergedTailwindOptions.packageName ?? "tailwindcss";
323
+ const installedTailwindVersion = readInstalledPackageMajorVersion(packageNameForVersionDetection, baseDir);
324
+ const resolvedTailwindVersion = installedTailwindVersion ?? explicitTailwindVersion;
325
+ const supportedResolvedTailwindVersion = resolvedTailwindVersion === 2 || resolvedTailwindVersion === 3 || resolvedTailwindVersion === 4 ? resolvedTailwindVersion : void 0;
326
+ const shouldPatchV4PostcssPackage = (resolvedTailwindVersion === 4 && (installedTailwindVersion === 4 || explicitTailwindVersion === 4 || hasExplicitV4Signals && isTailwindcss4Package(packageNameForVersionDetection)) || resolvedTailwindVersion === void 0 && (hasCssEntries || hasCssSources || hasOwnV4Signal(tailwindcss) || hasOwnV4Signal(tailwindcssPatcherOptions?.tailwindcss))) && !Boolean(configuredPackageName);
327
+ const packageCandidates = /* @__PURE__ */ new Set();
328
+ if (shouldPatchV4PostcssPackage) packageCandidates.add("@tailwindcss/postcss");
329
+ packageCandidates.add(mergedTailwindOptions.packageName ?? configuredPackageName ?? "tailwindcss");
330
+ const patchers = [];
331
+ const packageCandidateList = [...packageCandidates];
332
+ let firstVersionMismatchError;
333
+ for (const packageName of packageCandidateList) {
334
+ const tailwindOptionsForPackage = {
335
+ ...mergedTailwindOptions,
336
+ packageName
337
+ };
338
+ if (supportedResolvedTailwindVersion) tailwindOptionsForPackage.version = supportedResolvedTailwindVersion;
339
+ try {
340
+ patchers.push(createTailwindcssPatcher(omitUndefined({
341
+ basedir: baseDir,
342
+ supportCustomLengthUnitsPatch: supportCustomLengthUnitsPatch ?? true,
343
+ tailwindcss: tailwindOptionsForPackage,
344
+ tailwindcssPatcherOptions: patchedOptions
345
+ })));
346
+ } catch (error) {
347
+ if (packageCandidateList.length > 1 && isTailwindVersionMismatchError(error)) {
348
+ firstVersionMismatchError ?? (firstVersionMismatchError = error);
349
+ logger.warn("skip incompatible Tailwind package candidate \"%s\" for v4 patcher: %s", packageName, error.message);
350
+ continue;
351
+ }
352
+ throw error;
353
+ }
354
+ }
355
+ if (patchers.length === 0 && firstVersionMismatchError) throw firstVersionMismatchError;
356
+ const [singlePatcher] = patchers;
357
+ return patchers.length === 1 && singlePatcher ? singlePatcher : createMultiTailwindcssPatcher(patchers);
358
+ }
359
+ function tryCreateMultiTailwindcssPatcher(groups, options) {
360
+ if (groups.size <= 1) return;
361
+ logger.debug("detected multiple Tailwind CSS entry bases: %O", [...groups.keys()]);
362
+ const patchers = [];
363
+ for (const [baseDir, entries] of groups) {
364
+ const patcher = createPatcherForBase(baseDir, entries, options);
365
+ if (patcher) patchers.push(patcher);
366
+ }
367
+ return createMultiTailwindcssPatcher(patchers);
368
+ }
369
+ //#endregion
370
+ //#region src/uni-app-x/options.ts
371
+ function resolveComponentLocalStyles(option) {
372
+ if (option === false) return {
373
+ enabled: false,
374
+ onlyWhenStyleIsolationVersion2: true
375
+ };
376
+ if (option === true || option === void 0) return {
377
+ enabled: false,
378
+ onlyWhenStyleIsolationVersion2: true
379
+ };
380
+ const componentLocalStyles = option.componentLocalStyles;
381
+ if (componentLocalStyles === false) return {
382
+ enabled: false,
383
+ onlyWhenStyleIsolationVersion2: true
384
+ };
385
+ if (componentLocalStyles === true || componentLocalStyles === void 0) return {
386
+ enabled: true,
387
+ onlyWhenStyleIsolationVersion2: true
388
+ };
389
+ return {
390
+ enabled: componentLocalStyles.enabled !== false,
391
+ onlyWhenStyleIsolationVersion2: componentLocalStyles.onlyWhenStyleIsolationVersion2 !== false
392
+ };
393
+ }
394
+ function resolveUniAppXOptions(option) {
395
+ if (typeof option === "object" && option) return {
396
+ enabled: option.enabled !== false,
397
+ componentLocalStyles: resolveComponentLocalStyles(option),
398
+ uvueUnsupported: option.uvueUnsupported ?? "warn"
399
+ };
400
+ return {
401
+ enabled: Boolean(option),
402
+ componentLocalStyles: resolveComponentLocalStyles(option),
403
+ uvueUnsupported: "warn"
404
+ };
405
+ }
406
+ function isUniAppXEnabled(option) {
407
+ return resolveUniAppXOptions(option).enabled;
408
+ }
409
+ //#endregion
410
+ //#region src/context/tailwindcss/basedir.ts
411
+ const ENV_BASEDIR_KEYS = [
412
+ "WEAPP_TAILWINDCSS_BASEDIR",
413
+ "WEAPP_TAILWINDCSS_BASE_DIR",
414
+ "TAILWINDCSS_BASEDIR",
415
+ "TAILWINDCSS_BASE_DIR",
416
+ "UNI_INPUT_DIR",
417
+ "UNI_INPUT_ROOT",
418
+ "UNI_CLI_ROOT",
419
+ "UNI_APP_INPUT_DIR",
420
+ "INIT_CWD",
421
+ "PWD"
422
+ ];
423
+ const GENERIC_ENV_BASEDIR_KEYS = new Set(["INIT_CWD", "PWD"]);
424
+ function pickEnvBasedir() {
425
+ for (const key of ENV_BASEDIR_KEYS) {
426
+ const value = process.env[key];
427
+ if (value && path.isAbsolute(value)) return {
428
+ key,
429
+ value
430
+ };
431
+ }
432
+ }
433
+ function pickPackageEnvBasedir() {
434
+ const packageJsonPath = process.env["npm_package_json"];
435
+ if (packageJsonPath) {
436
+ const packageDir = path.dirname(packageJsonPath);
437
+ if (packageDir && path.isAbsolute(packageDir)) return packageDir;
438
+ }
439
+ const localPrefix = process.env["npm_config_local_prefix"];
440
+ if (localPrefix && path.isAbsolute(localPrefix)) return localPrefix;
441
+ }
442
+ const STACK_PAREN_RE = /\(([^)]+)\)/u;
443
+ const STACK_AT_RE = /at\s+(\S.*)$/u;
444
+ function detectCallerBasedir() {
445
+ const stack = (/* @__PURE__ */ new Error("resolveTailwindcssBasedir stack probe")).stack;
446
+ if (!stack) return;
447
+ if (process.env["WEAPP_TW_DEBUG_STACK"] === "1") logger.debug("caller stack: %s", stack);
448
+ const lines = stack.split("\n");
449
+ for (const line of lines) {
450
+ const location = (line.match(STACK_PAREN_RE) ?? line.match(STACK_AT_RE))?.[1];
451
+ if (!location) continue;
452
+ let filePath = location;
453
+ if (filePath.startsWith("file://")) try {
454
+ filePath = fileURLToPath(filePath);
455
+ } catch {
456
+ continue;
457
+ }
458
+ const [candidate = ""] = filePath.split(":");
459
+ const resolvedPath = path.isAbsolute(filePath) ? filePath : candidate;
460
+ if (!path.isAbsolute(resolvedPath)) continue;
461
+ if (resolvedPath.includes("node_modules") && resolvedPath.includes("weapp-tailwindcss")) continue;
462
+ try {
463
+ return path.dirname(resolvedPath);
464
+ } catch {
465
+ continue;
466
+ }
467
+ }
468
+ }
469
+ function resolveTailwindcssBasedir(basedir, fallback) {
470
+ const envBasedirResult = pickEnvBasedir();
471
+ const envBasedir = envBasedirResult?.value;
472
+ const envBasedirKey = envBasedirResult?.key;
473
+ const envBasedirIsGeneric = envBasedirKey ? GENERIC_ENV_BASEDIR_KEYS.has(envBasedirKey) : false;
474
+ const packageEnvBasedir = pickPackageEnvBasedir();
475
+ const callerBasedir = !envBasedir || envBasedirIsGeneric ? detectCallerBasedir() : void 0;
476
+ const cwd = process.cwd();
477
+ const anchor = envBasedir ?? packageEnvBasedir ?? fallback ?? callerBasedir ?? cwd;
478
+ const resolveRelative = (value) => path.isAbsolute(value) ? path.normalize(value) : path.normalize(path.resolve(anchor, value));
479
+ if (process.env["WEAPP_TW_DEBUG_STACK"] === "1") logger.debug("resolveTailwindcssBasedir anchor %O", {
480
+ basedir,
481
+ envBasedir,
482
+ envBasedirKey,
483
+ envBasedirIsGeneric,
484
+ packageEnvBasedir,
485
+ fallback,
486
+ callerBasedir,
487
+ npm_package_json: process.env["npm_package_json"],
488
+ cwd,
489
+ anchor
490
+ });
491
+ if (basedir && basedir.trim().length > 0) return resolveRelative(basedir);
492
+ if (envBasedir && !envBasedirIsGeneric) return path.normalize(envBasedir);
493
+ if (fallback && fallback.trim().length > 0) return resolveRelative(fallback);
494
+ if (packageEnvBasedir) return path.normalize(packageEnvBasedir);
495
+ if (callerBasedir) {
496
+ const normalizedCaller = path.normalize(callerBasedir);
497
+ const librarySegment = `${path.sep}weapp-tailwindcss${path.sep}`;
498
+ if (!normalizedCaller.includes(librarySegment)) return normalizedCaller;
499
+ }
500
+ const packageName = process.env["PNPM_PACKAGE_NAME"];
501
+ if (packageName) try {
502
+ const packageJsonPath = createRequire(path.join(anchor, "__resolve_tailwindcss_basedir__.cjs")).resolve(`${packageName}/package.json`);
503
+ if (process.env["WEAPP_TW_DEBUG_STACK"] === "1") logger.debug("package basedir resolved from PNPM_PACKAGE_NAME: %s", packageJsonPath);
504
+ return path.normalize(path.dirname(packageJsonPath));
505
+ } catch {
506
+ if (process.env["WEAPP_TW_DEBUG_STACK"] === "1") logger.debug("failed to resolve package json for %s", packageName);
507
+ const workspaceRoot = findWorkspaceRoot(anchor);
508
+ if (workspaceRoot) {
509
+ const packageDir = findWorkspacePackageDir(workspaceRoot, packageName);
510
+ if (packageDir) return packageDir;
511
+ }
512
+ }
513
+ if (envBasedir) return path.normalize(envBasedir);
514
+ return path.normalize(cwd);
515
+ }
516
+ //#endregion
517
+ //#region src/context/tailwindcss/rax.ts
518
+ function isRaxWorkspace(appType, baseDir) {
519
+ if (appType === "rax") return true;
520
+ try {
521
+ const pkgPath = path.join(baseDir, "package.json");
522
+ if (!existsSync(pkgPath)) return false;
523
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
524
+ const deps = {
525
+ ...pkg["dependencies"] ?? {},
526
+ ...pkg["devDependencies"] ?? {}
527
+ };
528
+ if (deps["rax-app"] || deps.rax) return true;
529
+ } catch {
530
+ return false;
531
+ }
532
+ return false;
533
+ }
534
+ function collectRaxStyleEntries(baseDir) {
535
+ const STYLE_CANDIDATES = [
536
+ "src/global.css",
537
+ "src/global.scss",
538
+ "src/global.less",
539
+ "src/global.sass",
540
+ "src/global.styl",
541
+ "src/global.stylus"
542
+ ];
543
+ const discovered = [];
544
+ for (const relative of STYLE_CANDIDATES) {
545
+ const candidate = path.resolve(baseDir, relative);
546
+ if (existsSync(candidate)) discovered.push(path.normalize(candidate));
547
+ }
548
+ return discovered;
549
+ }
550
+ function detectImplicitCssEntries(appType, baseDir) {
551
+ const baseCandidates = /* @__PURE__ */ new Set();
552
+ baseCandidates.add(path.normalize(baseDir));
553
+ const envCandidates = [
554
+ process.cwd(),
555
+ process.env["INIT_CWD"],
556
+ process.env["PWD"]
557
+ ];
558
+ for (const candidate of envCandidates) if (candidate) baseCandidates.add(path.normalize(candidate));
559
+ for (const candidateBase of baseCandidates) {
560
+ if (!isRaxWorkspace(appType, candidateBase)) continue;
561
+ const entries = collectRaxStyleEntries(candidateBase);
562
+ if (entries.length) return entries;
563
+ }
564
+ }
565
+ //#endregion
566
+ //#region src/context/tailwindcss.ts
567
+ function createTailwindcssPatcherFromContext(ctx) {
568
+ const { tailwindcssBasedir, supportCustomLengthUnitsPatch, tailwindcss, tailwindcssPatcherOptions, cssEntries: rawCssEntries, appType, arbitraryValues } = ctx;
569
+ const absoluteCssEntryBasedir = guessBasedirFromEntries(rawCssEntries);
570
+ const resolvedTailwindcssBasedir = resolveTailwindcssBasedir(tailwindcssBasedir, absoluteCssEntryBasedir);
571
+ ctx.tailwindcssBasedir = resolvedTailwindcssBasedir;
572
+ logger.debug("tailwindcss basedir resolved: %s", resolvedTailwindcssBasedir);
573
+ let normalizedCssEntries = normalizeCssEntries(rawCssEntries, resolvedTailwindcssBasedir);
574
+ if (!normalizedCssEntries) normalizedCssEntries = detectImplicitCssEntries(ctx.appType, resolvedTailwindcssBasedir);
575
+ if (normalizedCssEntries) ctx.cssEntries = normalizedCssEntries;
576
+ const patcherOptions = {
577
+ tailwindcss,
578
+ tailwindcssPatcherOptions,
579
+ supportCustomLengthUnitsPatch,
580
+ appType,
581
+ bareArbitraryValues: arbitraryValues?.bareArbitraryValues
582
+ };
583
+ const workspaceRoot = findWorkspaceRoot(resolvedTailwindcssBasedir) ?? (absoluteCssEntryBasedir ? findWorkspaceRoot(absoluteCssEntryBasedir) : void 0);
584
+ const groupedCssEntries = normalizedCssEntries ? groupCssEntriesByBase(normalizedCssEntries, omitUndefined({
585
+ preferredBaseDir: resolvedTailwindcssBasedir,
586
+ workspaceRoot
587
+ })) : void 0;
588
+ const multiPatcher = groupedCssEntries ? tryCreateMultiTailwindcssPatcher(groupedCssEntries, patcherOptions) : void 0;
589
+ if (multiPatcher) return multiPatcher;
590
+ if (groupedCssEntries?.size === 1) {
591
+ const firstGroup = groupedCssEntries.entries().next().value;
592
+ if (firstGroup) {
593
+ const [baseDir, entries] = firstGroup;
594
+ return createPatcherForBase(baseDir, entries, patcherOptions);
595
+ }
596
+ }
597
+ return createPatcherForBase(resolvedTailwindcssBasedir, normalizedCssEntries ?? rawCssEntries, patcherOptions);
598
+ }
599
+ //#endregion
600
+ export { applyV4CssCalcDefaults as a, upsertTailwindV4CssSource as c, resolveUniAppXOptions as i, resolveTailwindcssBasedir as n, warnMissingCssEntries as o, isUniAppXEnabled as r, hasConfiguredTailwindV4CssRoots as s, createTailwindcssPatcherFromContext as t };