weapp-tailwindcss 5.0.0-next.9 → 5.0.1

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 (167) hide show
  1. package/README.md +2 -2
  2. package/dist/auto-DEHRmEAx.mjs +200 -0
  3. package/dist/auto-dPpsm6FB.js +238 -0
  4. package/dist/bundle-state-CBF5YX1m.js +529 -0
  5. package/dist/bundle-state-CQmxxx0R.mjs +413 -0
  6. package/dist/bundlers/shared/cache.d.ts +9 -7
  7. package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -2
  8. package/dist/bundlers/shared/css-cleanup.d.ts +1 -3
  9. package/dist/bundlers/shared/css-imports.d.ts +3 -3
  10. package/dist/bundlers/shared/generated-css-marker.d.ts +3 -0
  11. package/dist/bundlers/shared/generator-css/directives.d.ts +11 -3
  12. package/dist/bundlers/shared/generator-css/markers.d.ts +12 -0
  13. package/dist/bundlers/shared/generator-css/source-files.d.ts +9 -6
  14. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +16 -2
  15. package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +10 -0
  16. package/dist/bundlers/shared/generator-css.d.ts +6 -2
  17. package/dist/bundlers/shared/hmr-timing.d.ts +22 -0
  18. package/dist/bundlers/shared/style-requests.d.ts +2 -0
  19. package/dist/bundlers/vite/bundle-state.d.ts +1 -0
  20. package/dist/bundlers/vite/css-finalizer.d.ts +6 -0
  21. package/dist/bundlers/vite/generate-bundle/candidates.d.ts +1 -1
  22. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +5 -1
  23. package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +1 -0
  24. package/dist/bundlers/vite/generate-bundle.d.ts +13 -1
  25. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +10 -2
  26. package/dist/bundlers/vite/index.d.ts +5 -2
  27. package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
  28. package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -5
  29. package/dist/bundlers/vite/runtime-class-set.d.ts +5 -1
  30. package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
  31. package/dist/bundlers/vite/source-candidates.d.ts +24 -2
  32. package/dist/bundlers/vite/source-scan.d.ts +26 -0
  33. package/dist/bundlers/vite/static-config-content.d.ts +5 -0
  34. package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +5 -0
  35. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +5 -1
  36. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +8 -3
  37. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
  38. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +31 -0
  39. package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -8
  40. package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
  41. package/dist/cache/index.d.ts +6 -6
  42. package/dist/{chunk-8l464Juk.js → chunk-C5U5_Hdc.js} +14 -0
  43. package/dist/cli/context.d.ts +1 -11
  44. package/dist/cli/doctor/types.d.ts +11 -11
  45. package/dist/cli/vscode-entry.d.ts +3 -3
  46. package/dist/cli.js +684 -41
  47. package/dist/cli.mjs +682 -40
  48. package/dist/context/runtime-package-replacements.d.ts +2 -0
  49. package/dist/context/style-options.d.ts +3 -0
  50. package/dist/context/tailwindcss.d.ts +1 -1
  51. package/dist/core.js +1 -2
  52. package/dist/core.mjs +1 -1
  53. package/dist/css-macro/auto.d.ts +11 -0
  54. package/dist/css-macro/constants.d.ts +5 -2
  55. package/dist/css-macro/postcss.d.ts +1 -0
  56. package/dist/css-macro/postcss.js +7 -46
  57. package/dist/css-macro/postcss.mjs +2 -46
  58. package/dist/css-macro.js +16 -7
  59. package/dist/css-macro.mjs +15 -6
  60. package/dist/defaults-8xrgzxFY.mjs +151 -0
  61. package/dist/defaults-zKUH2mDe.js +193 -0
  62. package/dist/defaults.js +6 -150
  63. package/dist/defaults.mjs +1 -143
  64. package/dist/escape.js +10 -2
  65. package/dist/escape.mjs +10 -2
  66. package/dist/generator/options.d.ts +11 -6
  67. package/dist/generator/types.d.ts +3 -3
  68. package/dist/generator-CvmsIQFI.js +92 -0
  69. package/dist/generator-DDtsUvkH.mjs +67 -0
  70. package/dist/generator.js +12 -12
  71. package/dist/generator.mjs +2 -1
  72. package/dist/gulp.js +163 -40
  73. package/dist/gulp.mjs +155 -32
  74. package/dist/incremental-runtime-class-set-BffodqHh.js +2366 -0
  75. package/dist/incremental-runtime-class-set-DArodvWs.mjs +2291 -0
  76. package/dist/index.d.ts +2 -1
  77. package/dist/index.js +17 -5
  78. package/dist/index.mjs +6 -5
  79. package/dist/js/babel/cache-options.d.ts +3 -0
  80. package/dist/js/babel/parse.d.ts +7 -4
  81. package/dist/js/precheck.d.ts +2 -2
  82. package/dist/js/replacement-cache.d.ts +5 -0
  83. package/dist/{postcss-w48mGIhe.mjs → postcss-BzNYQUOH.mjs} +54 -114
  84. package/dist/postcss-C7BMYpEF.mjs +169 -0
  85. package/dist/postcss-CiYLsqZn.js +192 -0
  86. package/dist/{postcss-QIXwT40c.js → postcss-DE0TOtV9.js} +60 -121
  87. package/dist/postcss-html-transform.js +1 -1
  88. package/dist/postcss.js +1 -1
  89. package/dist/postcss.mjs +1 -1
  90. package/dist/precheck-BzYPm-EG.js +4842 -0
  91. package/dist/precheck-jZvTVXXG.mjs +4716 -0
  92. package/dist/presets/index.d.ts +1 -0
  93. package/dist/presets/uni-app-x.d.ts +1 -0
  94. package/dist/presets.js +27 -13
  95. package/dist/presets.mjs +25 -13
  96. package/dist/reset.js +1 -1
  97. package/dist/runtime-registry-DpcR3IHI.js +5496 -0
  98. package/dist/shared/mpx.d.ts +1 -0
  99. package/dist/source-candidates-BuTlMabx.mjs +322 -0
  100. package/dist/source-candidates-CxoIaS88.js +335 -0
  101. package/dist/tailwindcss/miniprogram.d.ts +1 -5
  102. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
  103. package/dist/tailwindcss/runtime/cache.d.ts +4 -3
  104. package/dist/tailwindcss/runtime.d.ts +9 -9
  105. package/dist/tailwindcss/source-scan.d.ts +35 -0
  106. package/dist/tailwindcss/v3-engine/types.d.ts +19 -14
  107. package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
  108. package/dist/tailwindcss/v4/patcher.d.ts +1 -1
  109. package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
  110. package/dist/tailwindcss/v4-engine/types.d.ts +18 -5
  111. package/dist/{tailwindcss-C5IgPlQ0.mjs → tailwindcss-CCZcu0lr.mjs} +75 -98
  112. package/dist/{tailwindcss-Bu-RWIHx.js → tailwindcss-DZckITp1.js} +83 -106
  113. package/dist/typedoc.export.d.ts +1 -1
  114. package/dist/types/index.d.ts +51 -41
  115. package/dist/types/shared.d.ts +3 -0
  116. package/dist/types/typedoc-tailwindcss-patch.d.ts +67 -0
  117. package/dist/types/user-defined-options/general.d.ts +25 -22
  118. package/dist/types/user-defined-options/important.d.ts +32 -27
  119. package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
  120. package/dist/types/user-defined-options/matcher.d.ts +6 -6
  121. package/dist/unocss/index.d.ts +2 -0
  122. package/dist/utils/object.d.ts +9 -0
  123. package/dist/utils/options.d.ts +2 -0
  124. package/dist/utils/regex.d.ts +1 -0
  125. package/dist/{utils-BiShvil9.js → utils-D7Ygohep.js} +2 -2
  126. package/dist/{utils-Btw1iOVV.mjs → utils-DsaS975I.mjs} +1 -1
  127. package/dist/v3-engine-DGBhUnjn.mjs +3419 -0
  128. package/dist/v3-engine-M6Aqru5T.js +3714 -0
  129. package/dist/vite-BBcQIJpD.mjs +24493 -0
  130. package/dist/vite-DgRkWVPG.js +24507 -0
  131. package/dist/vite.js +1 -1
  132. package/dist/vite.mjs +1 -1
  133. package/dist/weapp-tw-css-import-rewrite-loader.js +5456 -22
  134. package/dist/weapp-tw-runtime-classset-loader.js +32 -9
  135. package/dist/{webpack-BzN2ly34.js → webpack-D-gb4ZvO.js} +341 -96
  136. package/dist/{webpack-DJazm5sT.mjs → webpack-D43aMQzO.mjs} +323 -79
  137. package/dist/webpack.d.ts +1 -3
  138. package/dist/webpack.js +3 -4
  139. package/dist/webpack.mjs +2 -2
  140. package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -4
  141. package/package.json +22 -20
  142. package/dist/bundlers/shared/css-cleanup/color-gamut.d.ts +0 -3
  143. package/dist/bundlers/shared/css-cleanup/root-cleanups.d.ts +0 -4
  144. package/dist/bundlers/shared/css-cleanup/selectors.d.ts +0 -8
  145. package/dist/cache-BVAiJV3J.js +0 -502
  146. package/dist/cache-CHs4DXui.mjs +0 -434
  147. package/dist/constants-BoB_6lFw.js +0 -73
  148. package/dist/constants-E_loJC49.mjs +0 -44
  149. package/dist/generator-DKkhJbOg.js +0 -1531
  150. package/dist/generator-UBmfduYg.mjs +0 -1432
  151. package/dist/generator-css-Bwp3nbrl.js +0 -1381
  152. package/dist/generator-css-DeLLmp2N.mjs +0 -1342
  153. package/dist/lightningcss/index.d.ts +0 -8
  154. package/dist/lightningcss/style-handler/options.d.ts +0 -3
  155. package/dist/lightningcss/style-handler/selector-transform.d.ts +0 -10
  156. package/dist/lightningcss/style-handler/selector-utils.d.ts +0 -10
  157. package/dist/lightningcss/style-handler.d.ts +0 -17
  158. package/dist/precheck-B32p-gLI.js +0 -2736
  159. package/dist/precheck-B4RH6ZNN.mjs +0 -2622
  160. package/dist/run-tasks-B50A3pxt.js +0 -128
  161. package/dist/run-tasks-DdNi-hkk.mjs +0 -91
  162. package/dist/runtime-patch-CwN5ya72.mjs +0 -71
  163. package/dist/runtime-patch-D6mBo_KB.js +0 -85
  164. package/dist/vite-By5KQi9s.js +0 -2419
  165. package/dist/vite-Cyp42bBf.mjs +0 -2406
  166. /package/dist/{logger-Bub1jggA.mjs → logger-BNzxZbZj.mjs} +0 -0
  167. /package/dist/{logger-BRy6XPQ2.js → logger-TlKT3xmR.js} +0 -0
@@ -1,17 +1,15 @@
1
- const require_chunk = require("./chunk-8l464Juk.js");
2
- const require_cache = require("./cache-BVAiJV3J.js");
3
- const require_generator = require("./generator-DKkhJbOg.js");
1
+ const require_chunk = require("./chunk-C5U5_Hdc.js");
2
+ const require_v3_engine = require("./v3-engine-M6Aqru5T.js");
3
+ const require_generator = require("./generator-CvmsIQFI.js");
4
4
  let postcss = require("postcss");
5
5
  postcss = require_chunk.__toESM(postcss);
6
- let node_path = require("node:path");
7
- node_path = require_chunk.__toESM(node_path);
6
+ let tailwindcss_patch = require("tailwindcss-patch");
8
7
  let node_process = require("node:process");
9
8
  node_process = require_chunk.__toESM(node_process);
10
- let tailwindcss_patch = require("tailwindcss-patch");
11
- let tailwindcss_config = require("tailwindcss-config");
9
+ let node_path = require("node:path");
10
+ node_path = require_chunk.__toESM(node_path);
12
11
  let node_fs_promises = require("node:fs/promises");
13
- let fast_glob = require("fast-glob");
14
- fast_glob = require_chunk.__toESM(fast_glob);
12
+ let tailwindcss_config = require("tailwindcss-config");
15
13
  //#region src/postcss/config-directive.ts
16
14
  function quoteCssString(value) {
17
15
  return value.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"");
@@ -66,152 +64,93 @@ function addSourceDependencyMessages(result, files) {
66
64
  }
67
65
  //#endregion
68
66
  //#region src/postcss/source-files.ts
69
- const POSTCSS_SOURCE_PATTERN = `**/*.{${[
70
- "html",
71
- "wxml",
72
- "axml",
73
- "jxml",
74
- "ksml",
75
- "ttml",
76
- "qml",
77
- "tyml",
78
- "xhsml",
79
- "swan",
80
- "vue",
81
- "mpx",
82
- "js",
83
- "jsx",
84
- "ts",
85
- "tsx"
86
- ].join(",")}}`;
87
- function parseLocalSourceParam(params) {
88
- const value = params.trim();
89
- if (!value || value === "none" || value.startsWith("not ") || value.startsWith("inline(")) return;
90
- return /^(['"])(.+)\1$/.exec(value)?.[2];
91
- }
92
- function parseConfigParam(params) {
93
- const value = params.trim();
94
- return /^(['"])(.+)\1$/.exec(value)?.[2];
95
- }
96
- function parseSourceFileParam(params) {
97
- const value = params.trim();
98
- if (!value || value === "none" || value.startsWith("inline(")) return;
99
- const negated = value.startsWith("not ");
100
- const sourceValue = negated ? value.slice(4).trim() : value;
101
- const match = /^(['"])(.+)\1$/.exec(sourceValue);
102
- return match?.[2] ? {
103
- negated,
104
- sourcePath: match[2]
105
- } : void 0;
106
- }
67
+ const POSTCSS_SOURCE_PATTERN = require_v3_engine.createSourceScanPattern(require_v3_engine.DEFAULT_SOURCE_SCAN_EXTENSIONS);
107
68
  function getSourceExtension(file) {
108
69
  return node_path.default.extname(file).slice(1) || void 0;
109
70
  }
110
- async function pathExistsAsDirectory(file) {
111
- try {
112
- return (await (0, node_fs_promises.stat)(file)).isDirectory();
113
- } catch {
114
- return false;
115
- }
116
- }
117
- async function expandLocalSourceFiles(sourcePath, base) {
118
- const absoluteSource = node_path.default.isAbsolute(sourcePath) ? sourcePath : node_path.default.resolve(base, sourcePath);
119
- if (await pathExistsAsDirectory(absoluteSource)) return (0, fast_glob.default)(POSTCSS_SOURCE_PATTERN, {
120
- absolute: true,
121
- cwd: absoluteSource,
122
- onlyFiles: true
123
- });
124
- return (0, fast_glob.default)(sourcePath, {
125
- absolute: true,
126
- cwd: base,
127
- onlyFiles: true
128
- });
129
- }
130
- async function resolveTailwindSourceEntry(sourcePath, base, negated) {
131
- const absoluteSource = node_path.default.isAbsolute(sourcePath) ? node_path.default.resolve(sourcePath) : node_path.default.resolve(base, sourcePath);
132
- if (await pathExistsAsDirectory(absoluteSource)) return {
133
- base: absoluteSource,
134
- negated,
135
- pattern: POSTCSS_SOURCE_PATTERN
136
- };
137
- if (node_path.default.isAbsolute(sourcePath)) return {
138
- base: node_path.default.dirname(absoluteSource),
139
- negated,
140
- pattern: node_path.default.basename(absoluteSource)
141
- };
142
- return {
143
- base,
144
- negated,
145
- pattern: sourcePath
146
- };
147
- }
148
71
  function collectConfigPaths(root, base) {
149
72
  const configPaths = [];
150
73
  root.walkAtRules("config", (rule) => {
151
- const configPath = parseConfigParam(rule.params);
74
+ const configPath = require_v3_engine.parseConfigParam(rule.params);
152
75
  if (configPath) configPaths.push(node_path.default.isAbsolute(configPath) ? configPath : node_path.default.resolve(base, configPath));
153
76
  });
154
77
  return [...new Set(configPaths)];
155
78
  }
156
- function normalizeContentFiles(content) {
157
- if (typeof content === "string") return [content];
158
- if (Array.isArray(content)) return content.flatMap((item) => normalizeContentFiles(item));
159
- if (typeof content === "object" && content !== null && "files" in content) return normalizeContentFiles(content.files);
160
- return [];
79
+ function resolveOptionConfigPath(config, base) {
80
+ if (!config) return;
81
+ return node_path.default.isAbsolute(config) ? config : node_path.default.resolve(base, config);
161
82
  }
162
- async function collectConfigContentFiles(root, base) {
163
- const configPaths = collectConfigPaths(root, base);
83
+ async function collectConfigContentFiles(root, base, options) {
84
+ const configPaths = [...new Set([...resolveOptionConfigPath(options.config, base) ? [resolveOptionConfigPath(options.config, base)] : [], ...collectConfigPaths(root, base)])];
164
85
  const files = [];
165
86
  for (const configPath of configPaths) {
166
- const contentFiles = normalizeContentFiles((await (0, tailwindcss_config.loadConfig)({
87
+ const contentEntries = require_v3_engine.normalizeLegacyContentEntries((await (0, tailwindcss_config.loadConfig)({
167
88
  config: configPath,
168
89
  cwd: node_path.default.dirname(configPath)
169
- }))?.config.content);
170
- for (const contentFile of contentFiles) files.push(...await expandLocalSourceFiles(contentFile, node_path.default.dirname(configPath)));
90
+ }))?.config.content, node_path.default.dirname(configPath));
91
+ files.push(...await require_v3_engine.expandTailwindSourceEntries(contentEntries));
171
92
  }
172
93
  return {
173
94
  configPaths,
174
95
  files: [...new Set(files)]
175
96
  };
176
97
  }
98
+ async function collectConfiguredContentEntries(root, base, options) {
99
+ const configPath = resolveOptionConfigPath(options.generator?.config ?? options.config, base) ?? collectConfigPaths(root, base)[0];
100
+ if (!configPath) return [];
101
+ const resolvedConfigPath = node_path.default.isAbsolute(configPath) ? configPath : node_path.default.resolve(base, configPath);
102
+ return require_v3_engine.normalizeLegacyContentEntries((await (0, tailwindcss_config.loadConfig)({
103
+ config: resolvedConfigPath,
104
+ cwd: node_path.default.dirname(resolvedConfigPath)
105
+ }))?.config.content, node_path.default.dirname(resolvedConfigPath));
106
+ }
107
+ async function collectRawCandidatesFromSourceEntries(sourceEntries) {
108
+ const candidates = /* @__PURE__ */ new Set();
109
+ const files = await require_v3_engine.expandTailwindSourceEntries(sourceEntries);
110
+ await Promise.all(files.map(async (file) => {
111
+ const matches = await (0, tailwindcss_patch.extractRawCandidatesWithPositions)(await (0, node_fs_promises.readFile)(file, "utf8"), getSourceExtension(file));
112
+ for (const match of matches) {
113
+ const candidate = match?.rawCandidate;
114
+ if (typeof candidate === "string" && candidate.length > 0) candidates.add(candidate);
115
+ }
116
+ }));
117
+ return candidates;
118
+ }
177
119
  async function collectAutoTailwindCandidates(root, result, options) {
178
120
  if (options.scanSources === false) return /* @__PURE__ */ new Set();
179
121
  const base = resolvePostcssBase(result, options);
180
122
  const projectRoot = resolvePostcssProjectRoot(result, options);
181
- const sourceEntryTasks = [];
182
- if (!root.toString().includes("source(none)")) sourceEntryTasks.push(Promise.resolve({
123
+ const sourceEntries = [];
124
+ const hasSourceNone = root.toString().includes("source(none)");
125
+ const inlineCandidates = require_v3_engine.collectCssInlineSourceCandidates(root);
126
+ const configuredContentEntries = options.version === 3 ? await collectConfiguredContentEntries(root, base, options) : [];
127
+ if (configuredContentEntries.length > 0) sourceEntries.push(...configuredContentEntries);
128
+ else if (!hasSourceNone) sourceEntries.push({
183
129
  base,
184
130
  negated: false,
185
131
  pattern: POSTCSS_SOURCE_PATTERN
186
- }));
187
- root.walkAtRules("source", (rule) => {
188
- const parsed = parseSourceFileParam(rule.params);
189
- if (!parsed) return;
190
- sourceEntryTasks.push(resolveTailwindSourceEntry(parsed.sourcePath, base, parsed.negated));
191
132
  });
192
- const sourceEntries = await Promise.all(sourceEntryTasks);
193
- if (sourceEntries.length === 0) return /* @__PURE__ */ new Set();
194
- const candidates = await (0, tailwindcss_patch.extractValidCandidates)({
133
+ sourceEntries.push(...await require_v3_engine.resolveCssSourceEntries(root, base, POSTCSS_SOURCE_PATTERN));
134
+ const candidates = sourceEntries.length === 0 ? [] : options.version === 3 ? await collectRawCandidatesFromSourceEntries(sourceEntries) : await (0, tailwindcss_patch.extractValidCandidates)({
195
135
  base,
196
136
  css: root.toString(),
197
137
  cwd: projectRoot,
198
138
  sources: sourceEntries
199
139
  });
200
- return new Set(candidates);
140
+ return new Set([...[...candidates].filter((candidate) => !inlineCandidates.excluded.has(candidate)), ...inlineCandidates.included]);
201
141
  }
202
142
  async function collectPostcssLocalSources(root, result, options) {
203
143
  const base = resolvePostcssBase(result, options);
204
- const sourcePaths = [];
205
- root.walkAtRules("source", (rule) => {
206
- const sourcePath = parseLocalSourceParam(rule.params);
207
- if (sourcePath) sourcePaths.push(sourcePath);
208
- });
209
- const configContentFiles = await collectConfigContentFiles(root, base);
210
- const files = [...new Set((await Promise.all(sourcePaths.map((sourcePath) => expandLocalSourceFiles(sourcePath, base)))).flat().concat(configContentFiles.files))];
211
- const sources = await Promise.all(files.map(async (file) => ({
212
- content: await (0, node_fs_promises.readFile)(file, "utf8"),
213
- extension: getSourceExtension(file)
214
- })));
144
+ const sourceEntries = await require_v3_engine.resolveCssSourceEntries(root, base, POSTCSS_SOURCE_PATTERN);
145
+ const configContentFiles = await collectConfigContentFiles(root, base, options);
146
+ const files = [...new Set([...await require_v3_engine.expandTailwindSourceEntries(sourceEntries), ...configContentFiles.files])];
147
+ const sources = await Promise.all(files.map(async (file) => {
148
+ const extension = getSourceExtension(file);
149
+ return {
150
+ content: await (0, node_fs_promises.readFile)(file, "utf8"),
151
+ ...extension === void 0 ? {} : { extension }
152
+ };
153
+ }));
215
154
  return {
216
155
  files: [...files, ...configContentFiles.configPaths],
217
156
  sources
@@ -229,7 +168,7 @@ function hasTailwindV4CssSyntax(root) {
229
168
  }
230
169
  function resolvePostcssTailwindVersion(root, result, options) {
231
170
  const packageName = options.packageName ?? "tailwindcss";
232
- const installedVersion = require_cache.readInstalledPackageMajorVersion(packageName, resolvePostcssProjectRoot(result, options));
171
+ const installedVersion = require_v3_engine.readInstalledPackageMajorVersion(packageName, resolvePostcssProjectRoot(result, options));
233
172
  if (installedVersion) return installedVersion;
234
173
  if (options.version) return options.version;
235
174
  if (packageName === "@tailwindcss/postcss" || packageName.includes("tailwindcss4")) return 4;
@@ -249,7 +188,7 @@ const weappTailwindcssPostcssPlugin = (options = {}) => {
249
188
  const tailwindVersion = resolvePostcssTailwindVersion(root, result, options);
250
189
  const [collectedSources, autoCandidates] = await Promise.all([collectPostcssLocalSources(root, result, options), collectAutoTailwindCandidates(root, result, options)]);
251
190
  const generatorConfig = generatorOptions.config ?? options.config;
252
- const generator = require_generator.createWeappTailwindcssGenerator(tailwindVersion === 3 ? await require_generator.resolveTailwindV3Source({
191
+ const generator = require_generator.createWeappTailwindcssGenerator(tailwindVersion === 3 ? await require_v3_engine.resolveTailwindV3Source({
253
192
  config: generatorConfig,
254
193
  css: sourceOptions.css ?? root.toString(),
255
194
  base: resolvePostcssBase(result, options),
@@ -257,7 +196,7 @@ const weappTailwindcssPostcssPlugin = (options = {}) => {
257
196
  projectRoot: resolvePostcssProjectRoot(result, options),
258
197
  packageName: options.packageName,
259
198
  postcssPlugin: options.postcssPlugin
260
- }) : await require_generator.resolveTailwindV4Source({
199
+ }) : await require_v3_engine.resolveTailwindV4Source({
261
200
  ...sourceOptions,
262
201
  css: prependConfigDirective(sourceOptions.css ?? root.toString(), generatorConfig),
263
202
  base: resolvePostcssBase(result, options),
@@ -1,4 +1,4 @@
1
- const require_chunk = require("./chunk-8l464Juk.js");
1
+ const require_chunk = require("./chunk-C5U5_Hdc.js");
2
2
  let _weapp_tailwindcss_postcss_html_transform = require("@weapp-tailwindcss/postcss/html-transform");
3
3
  _weapp_tailwindcss_postcss_html_transform = require_chunk.__toESM(_weapp_tailwindcss_postcss_html_transform);
4
4
  //#region src/postcss-html-transform.ts
package/dist/postcss.js CHANGED
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_postcss = require("./postcss-QIXwT40c.js");
5
+ const require_postcss = require("./postcss-DE0TOtV9.js");
6
6
  exports.default = require_postcss.weappTailwindcssPostcssPlugin;
7
7
  exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
package/dist/postcss.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as weappTailwindcssPostcssPlugin } from "./postcss-w48mGIhe.mjs";
1
+ import { t as weappTailwindcssPostcssPlugin } from "./postcss-BzNYQUOH.mjs";
2
2
  export { weappTailwindcssPostcssPlugin as default, weappTailwindcssPostcssPlugin };