weapp-tailwindcss 5.5.1 → 5.5.3

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 (80) hide show
  1. package/dist/bundlers/shared/css-imports.d.ts +1 -0
  2. package/dist/bundlers/shared/framework-user-css.d.ts +3 -0
  3. package/dist/bundlers/shared/generator-css/output-import-shell.d.ts +6 -2
  4. package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -1
  5. package/dist/bundlers/shared/v4-generation-core.d.ts +1 -0
  6. package/dist/bundlers/vite/frameworks/taro/index.d.ts +2 -1
  7. package/dist/bundlers/vite/generate-bundle/bundle-markup-candidates.d.ts +3 -2
  8. package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +1 -0
  9. package/dist/bundlers/vite/generate-bundle/entry-style-graph.d.ts +6 -0
  10. package/dist/bundlers/vite/generate-bundle/runtime-configured-css.d.ts +1 -0
  11. package/dist/bundlers/vite/serve-js-transform.d.ts +1 -1
  12. package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +2 -0
  13. package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +1 -1
  14. package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +3 -1
  15. package/dist/bundlers/webpack/shared/loader-anchors.d.ts +1 -0
  16. package/dist/compiler/runtime-snapshot.d.ts +4 -1
  17. package/dist/{compiler-B0YSc0DY.js → compiler-C9X5Afn4.js} +3 -3
  18. package/dist/{compiler-D2ZJc3uA.cjs → compiler-DMPaUcH6.cjs} +6 -6
  19. package/dist/core.cjs +1 -1
  20. package/dist/core.js +1 -1
  21. package/dist/{css-imports-BFMU7Hpd.cjs → css-imports-DXplvodk.cjs} +29 -0
  22. package/dist/{css-loader-runtime-CSv0lKqV.cjs → css-loader-runtime-DGqsWVua.cjs} +2 -1
  23. package/dist/{defaults-B5ep0ojb.js → defaults-CKx-4LcW.js} +1 -1
  24. package/dist/{defaults-BI9j1znS.cjs → defaults-CiGsr8Xq.cjs} +1 -1
  25. package/dist/defaults.cjs +1 -1
  26. package/dist/defaults.js +1 -1
  27. package/dist/{generator-DsrQ9txU.cjs → generator-BoZIiZD5.cjs} +130 -77
  28. package/dist/{generator-DyXTBPmE.js → generator-C2aWns8n.js} +119 -78
  29. package/dist/generator.cjs +1 -1
  30. package/dist/generator.js +1 -1
  31. package/dist/{gulp-DXeQfvVC.js → gulp-COAAztkm.js} +4 -4
  32. package/dist/{gulp-C9ENAx3f.cjs → gulp-D50z06nw.cjs} +5 -5
  33. package/dist/gulp.cjs +1 -1
  34. package/dist/gulp.js +1 -1
  35. package/dist/{hmr-timing-DNxQm-bN.js → hmr-timing-CTk1uZr9.js} +245 -183
  36. package/dist/{hmr-timing-Cz4IesEM.cjs → hmr-timing-DK0MJKpl.cjs} +5 -5
  37. package/dist/index.cjs +4 -4
  38. package/dist/index.js +4 -4
  39. package/dist/{pipeline-helpers-CSGnR5gh.cjs → pipeline-helpers-BzjYXNTa.cjs} +4 -4
  40. package/dist/postcss.cjs +1 -1
  41. package/dist/postcss.js +1 -1
  42. package/dist/presets.cjs +2 -2
  43. package/dist/presets.js +2 -2
  44. package/dist/rspack.cjs +6 -3
  45. package/dist/rspack.js +6 -3
  46. package/dist/{scoped-generator-kRj_5Axx.js → scoped-generator-C21A7fis.js} +3 -3
  47. package/dist/{scoped-generator-TVjEaOeP.cjs → scoped-generator-CTkuf9Ae.cjs} +3 -3
  48. package/dist/{source-candidate-scan-signature-B7cUxqqX.cjs → source-candidate-scan-signature-4mZDDaKT.cjs} +2 -2
  49. package/dist/{source-candidate-scan-signature-CsP4BQNa.js → source-candidate-scan-signature-BB5DfjO2.js} +2 -2
  50. package/dist/tailwindcss/v4-engine/css-import.d.ts +14 -0
  51. package/dist/{tailwindcss-C-jBBQfw.cjs → tailwindcss-Bji4u8In.cjs} +1 -1
  52. package/dist/{tailwindcss-BK9S7zuq.js → tailwindcss-c4PkOe1F.js} +1 -1
  53. package/dist/{transform-DUPOPZ54.cjs → transform-Cy0ddBWf.cjs} +14 -14
  54. package/dist/{transform-CfOzh007.js → transform-DmLonqPE.js} +14 -14
  55. package/dist/uni-app-x/border-preflight.d.ts +18 -0
  56. package/dist/uni-app-x/style-asset/source-parser.d.ts +2 -0
  57. package/dist/uni-app-x/style-reference-path.d.ts +1 -0
  58. package/dist/uni-app-x/transform.d.ts +2 -0
  59. package/dist/uni-app-x/vite/plugin-options.d.ts +2 -0
  60. package/dist/uni-app-x/vite/style-request.d.ts +5 -0
  61. package/dist/uni-app-x/vite/style-source.d.ts +14 -4
  62. package/dist/uni-app-x/vite/web-sfc-hmr.d.ts +14 -0
  63. package/dist/{v4-generation-core-CRNUU_Rr.cjs → v4-generation-core-DQeiq-g1.cjs} +243 -181
  64. package/dist/vite/web.cjs +1 -1
  65. package/dist/vite/web.js +1 -1
  66. package/dist/{vite-BXe-axax.js → vite-CaUxtQx5.js} +340 -88
  67. package/dist/{vite-D_mAIfTU.cjs → vite-OG66oLpb.cjs} +356 -85
  68. package/dist/vite.cjs +1 -1
  69. package/dist/vite.js +1 -1
  70. package/dist/{watch-dependencies-DLZDrWdH.cjs → watch-dependencies-GbC14Rlt.cjs} +14 -11
  71. package/dist/weapp-tw-css-generation-loader.cjs +3 -2
  72. package/dist/weapp-tw-css-import-rewrite-loader.cjs +11 -10
  73. package/dist/weapp-tw-runtime-classset-loader.cjs +16 -11
  74. package/dist/{web-Cv7ualrU.js → web-Bd-9OHFE.js} +7 -6
  75. package/dist/{web-B2Ea9K4B.cjs → web-CZKIefdl.cjs} +9 -8
  76. package/dist/{webpack-7Um2GFtx.js → webpack-Cyvq3H7Z.js} +38 -23
  77. package/dist/{webpack-Ce04-btG.cjs → webpack-DJGgU27Y.cjs} +37 -23
  78. package/dist/webpack.cjs +1 -1
  79. package/dist/webpack.js +1 -1
  80. package/package.json +7 -5
@@ -12,6 +12,7 @@ let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
12
12
  let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
13
13
  let lru_cache = require("lru-cache");
14
14
  let node_module = require("node:module");
15
+ let _csstools_css_tokenizer = require("@csstools/css-tokenizer");
15
16
  let node_fs_promises = require("node:fs/promises");
16
17
  let micromatch = require("micromatch");
17
18
  micromatch = require_rolldown_runtime.__toESM(micromatch, 1);
@@ -341,6 +342,47 @@ async function transformTailwindV4CssByTarget(css, target, options) {
341
342
  return shouldUseUniAppWebRpxCompatibility(options?.appType) ? transformTailwindV4WebRpxCss(resolvedWebCss) : resolvedWebCss;
342
343
  }
343
344
  //#endregion
345
+ //#region src/tailwindcss/v4-engine/css-import.ts
346
+ function parseCssImportSpecifier(params) {
347
+ const tokens = (0, _csstools_css_tokenizer.tokenize)({ css: params }).filter((token) => token[0] !== _csstools_css_tokenizer.TokenType.Whitespace && token[0] !== _csstools_css_tokenizer.TokenType.Comment);
348
+ const first = tokens[0];
349
+ if (!first) return;
350
+ if (first[0] === _csstools_css_tokenizer.TokenType.String || first[0] === _csstools_css_tokenizer.TokenType.URL) return {
351
+ specifier: first[4].value,
352
+ raw: first[1],
353
+ quote: first[0] === _csstools_css_tokenizer.TokenType.String ? first[1][0] : void 0
354
+ };
355
+ if (first[0] === _csstools_css_tokenizer.TokenType.Function && first[4].value.toLowerCase() === "url" && tokens[1]?.[0] === _csstools_css_tokenizer.TokenType.String && tokens[2]?.[0] === _csstools_css_tokenizer.TokenType.CloseParen) return {
356
+ specifier: tokens[1][4].value,
357
+ raw: params.slice(first[2], tokens[2][3] + 1),
358
+ quote: tokens[1][1][0]
359
+ };
360
+ }
361
+ function quoteCssImportSpecifier(file, quote = "\"") {
362
+ return `${quote}${(node_path.default.sep === "\\" || /^[a-z]:[\\/]|^\\\\/i.test(file) ? file.replaceAll("\\", "/") : file).replaceAll("\\", "\\\\").replaceAll(quote, `\\${quote}`).replaceAll("\n", "\\a ").replaceAll("\r", "\\d ")}${quote}`;
363
+ }
364
+ function isTailwindCssImport(params) {
365
+ const specifier = parseCssImportSpecifier(params)?.specifier;
366
+ if (!specifier) return false;
367
+ if (specifier === "tailwindcss" || specifier.startsWith("tailwindcss/")) return true;
368
+ const paths = specifier.includes("\\") ? node_path.default.win32 : node_path.default.posix;
369
+ return paths.basename(specifier) === "index.css" && paths.basename(paths.dirname(specifier)) === "tailwindcss";
370
+ }
371
+ function parseImportSourceParam(params) {
372
+ const tokens = (0, _csstools_css_tokenizer.tokenize)({ css: params }).filter((token) => token[0] !== _csstools_css_tokenizer.TokenType.Whitespace && token[0] !== _csstools_css_tokenizer.TokenType.Comment);
373
+ const index = tokens.findIndex((token) => token[0] === _csstools_css_tokenizer.TokenType.Function && token[4].value === "source");
374
+ const value = tokens[index + 1];
375
+ if (index < 0 || tokens[index + 2]?.[0] !== _csstools_css_tokenizer.TokenType.CloseParen) return;
376
+ if (value?.[0] === _csstools_css_tokenizer.TokenType.Ident && value[4].value === "none") return {
377
+ none: true,
378
+ sourcePath: void 0
379
+ };
380
+ return value?.[0] === _csstools_css_tokenizer.TokenType.String ? {
381
+ none: false,
382
+ sourcePath: value[4].value
383
+ } : void 0;
384
+ }
385
+ //#endregion
344
386
  //#region src/tailwindcss/v4-engine/tailwind-v4-default-colors.ts
345
387
  const TAILWIND_V4_COLOR_STEPS = [
346
388
  "50",
@@ -730,7 +772,7 @@ function resolveTailwindV4ThemeCssFromImport(css) {
730
772
  let resolved;
731
773
  root.walkAtRules("import", (rule) => {
732
774
  if (resolved) return;
733
- const specifier = parseCssImportSpecifier$2(rule.params);
775
+ const specifier = parseCssImportSpecifier(rule.params)?.specifier;
734
776
  if (!specifier || !node_path.default.isAbsolute(specifier) || node_path.default.basename(specifier) !== "index.css") return;
735
777
  const themeCss = node_path.default.join(node_path.default.dirname(specifier), "theme.css");
736
778
  if ((0, node_fs.existsSync)(themeCss)) resolved = themeCss;
@@ -762,15 +804,8 @@ function applyMiniProgramTailwindV4DefaultColorCss(css, source) {
762
804
  if (insertionIndex === 0) return `${themeCss}\n${css}`;
763
805
  return `${css.slice(0, insertionIndex)}\n${themeCss}\n${css.slice(insertionIndex)}`;
764
806
  }
765
- function parseCssImportSpecifier$2(params) {
766
- const value = params.trim();
767
- const quoted = /^(['"])(.*?)\1/.exec(value);
768
- if (quoted) return quoted[2];
769
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
770
- return url?.[2] ?? url?.[3];
771
- }
772
807
  function isTailwindCssPreflightImport(params) {
773
- const specifier = parseCssImportSpecifier$2(params);
808
+ const specifier = parseCssImportSpecifier(params)?.specifier;
774
809
  return specifier === "tailwindcss/preflight.css" || specifier === "tailwindcss/preflight";
775
810
  }
776
811
  function removeTailwindV4PreflightImports(css) {
@@ -827,7 +862,7 @@ function createCompatibleSource(source, target) {
827
862
  };
828
863
  }
829
864
  //#endregion
830
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js
865
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/typeof.js
831
866
  function _typeof(o) {
832
867
  "@babel/helpers - typeof";
833
868
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -837,7 +872,7 @@ function _typeof(o) {
837
872
  }, _typeof(o);
838
873
  }
839
874
  //#endregion
840
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js
875
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/toPrimitive.js
841
876
  function toPrimitive(t, r) {
842
877
  if ("object" != _typeof(t) || !t) return t;
843
878
  var e = t[Symbol.toPrimitive];
@@ -849,13 +884,13 @@ function toPrimitive(t, r) {
849
884
  return ("string" === r ? String : Number)(t);
850
885
  }
851
886
  //#endregion
852
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js
887
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/toPropertyKey.js
853
888
  function toPropertyKey(t) {
854
889
  var i = toPrimitive(t, "string");
855
890
  return "symbol" == _typeof(i) ? i : i + "";
856
891
  }
857
892
  //#endregion
858
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js
893
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/defineProperty.js
859
894
  function _defineProperty(e, r, t) {
860
895
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
861
896
  value: t,
@@ -923,6 +958,7 @@ const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
923
958
  "ksml",
924
959
  "ttml",
925
960
  "qml",
961
+ "qxml",
926
962
  "tyml",
927
963
  "xhsml",
928
964
  "swan",
@@ -954,6 +990,7 @@ const FULL_SOURCE_SCAN_EXTENSIONS = [
954
990
  "ksml",
955
991
  "ttml",
956
992
  "qml",
993
+ "qxml",
957
994
  "tyml",
958
995
  "xhsml",
959
996
  "swan",
@@ -979,19 +1016,19 @@ function toPosixPath(value) {
979
1016
  return value.split(node_path.default.sep).join("/").split(node_path.default.win32.sep).join("/");
980
1017
  }
981
1018
  function resolveSourceScanPath(value) {
982
- const resolved = node_path.default.resolve(value);
983
- try {
984
- return node_fs.realpathSync.native(resolved);
985
- } catch {
986
- return resolved;
987
- }
1019
+ return resolveSourceScanPathWithApi(value, node_path.default);
988
1020
  }
989
1021
  function resolveSourceScanPathWithApi(value, pathApi) {
990
1022
  const resolved = pathApi.resolve(value);
991
- try {
992
- return node_fs.realpathSync.native(resolved);
993
- } catch {
994
- return resolved;
1023
+ let current = resolved;
1024
+ const missing = [];
1025
+ while (true) try {
1026
+ return pathApi.join(node_fs.realpathSync.native(current), ...missing.reverse());
1027
+ } catch (error) {
1028
+ const parent = pathApi.dirname(current);
1029
+ if (error.code !== "ENOENT" || parent === current) return resolved;
1030
+ missing.push(pathApi.basename(current));
1031
+ current = parent;
995
1032
  }
996
1033
  }
997
1034
  function normalizeEntryPattern(entry) {
@@ -1208,25 +1245,6 @@ const TAILWIND_V4_DEFAULT_IGNORED_SOURCE_PATTERNS = [
1208
1245
  "**/.env",
1209
1246
  "**/.env.*"
1210
1247
  ];
1211
- function parseImportSourceParam(params) {
1212
- const match = /\bsource\(\s*(none|(['"])(.*?)\2)\s*\)/.exec(params);
1213
- if (!match) return;
1214
- return {
1215
- none: match[1] === "none",
1216
- sourcePath: match[3]
1217
- };
1218
- }
1219
- function parseCssImportSpecifier$1(params) {
1220
- const value = params.trim();
1221
- const quoted = /^(['"])(.*?)\1/.exec(value);
1222
- if (quoted) return quoted[2];
1223
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
1224
- return url?.[2] ?? url?.[3];
1225
- }
1226
- function isTailwindCssImport(params) {
1227
- const specifier = parseCssImportSpecifier$1(params);
1228
- return specifier === "tailwindcss" || specifier?.startsWith("tailwindcss/") || specifier?.replaceAll("\\", "/").endsWith("/tailwindcss/index.css");
1229
- }
1230
1248
  function resolveSourceBase(base, sourcePath) {
1231
1249
  return node_path.default.isAbsolute(sourcePath) ? sourcePath : node_path.default.resolve(base, sourcePath);
1232
1250
  }
@@ -2968,31 +2986,6 @@ function isBarePackageSpecifier(specifier) {
2968
2986
  function isPackageJsonImportSpecifier(specifier) {
2969
2987
  return typeof specifier === "string" && specifier.startsWith("#");
2970
2988
  }
2971
- function parseCssImportSpecifier(params) {
2972
- const value = params.trim();
2973
- const quoted = /^(['"])(.*?)\1/.exec(value);
2974
- if (quoted) {
2975
- const specifier = quoted[2];
2976
- if (specifier === void 0) return;
2977
- return {
2978
- quote: quoted[1],
2979
- raw: quoted[0],
2980
- specifier
2981
- };
2982
- }
2983
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
2984
- if (!url) return;
2985
- const specifier = url[2] ?? url[3];
2986
- if (specifier === void 0) return;
2987
- return {
2988
- quote: url[1],
2989
- raw: url[0],
2990
- specifier
2991
- };
2992
- }
2993
- function quoteCssImportSpecifier(specifier, quote = "\"") {
2994
- return `${quote}${specifier.replaceAll("\\", "\\\\").replaceAll(quote, `\\${quote}`)}${quote}`;
2995
- }
2996
2989
  function createTailwindV4CssImportSpecifierSet(packageName) {
2997
2990
  const specifiers = /* @__PURE__ */ new Set(["tailwindcss"]);
2998
2991
  if (packageName && isBarePackageSpecifier(packageName)) specifiers.add(packageName);
@@ -3019,6 +3012,27 @@ function normalizeTailwindV4CssPackageImports(css, packageName) {
3019
3012
  });
3020
3013
  return changed ? root.toString() : css;
3021
3014
  }
3015
+ function normalizeTailwindV4CssSourceDirectives(css, base) {
3016
+ if (!css.includes("@source")) return css;
3017
+ let root;
3018
+ try {
3019
+ root = _weapp_tailwindcss_postcss.postcss.parse(css);
3020
+ } catch {
3021
+ return css;
3022
+ }
3023
+ let changed = false;
3024
+ root.walkAtRules("source", (rule) => {
3025
+ const match = rule.params.match(/^(not\s+)?("([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)')(.*)$/);
3026
+ if (!match) return;
3027
+ const specifier = match[3] ?? match[4];
3028
+ if (!specifier?.startsWith(".")) return;
3029
+ const resolved = node_path.default.resolve(base, specifier);
3030
+ const quote = match[2] === void 0 ? "'" : "\"";
3031
+ rule.params = `${match[1] ?? ""}${quote}${resolved}${quote}${match[5] ?? ""}`;
3032
+ changed = true;
3033
+ });
3034
+ return changed ? root.toString() : css;
3035
+ }
3022
3036
  function normalizeTailwindV4CssSources(cssSources, packageName, projectRoot) {
3023
3037
  if (!cssSources?.length) return cssSources;
3024
3038
  let changed = false;
@@ -3051,6 +3065,42 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
3051
3065
  if (!cssEntries?.length) return;
3052
3066
  const remainingCssEntries = [];
3053
3067
  const cssSources = [];
3068
+ const visited = /* @__PURE__ */ new Set();
3069
+ const collectCssSource = (file, nested = false) => {
3070
+ const normalizedFile = node_path.default.resolve(file);
3071
+ if (visited.has(normalizedFile) || !(0, node_fs.existsSync)(normalizedFile)) return;
3072
+ visited.add(normalizedFile);
3073
+ const base = node_path.default.dirname(normalizedFile);
3074
+ const rawCss = (0, node_fs.readFileSync)(normalizedFile, "utf8");
3075
+ const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
3076
+ const config = entrySource?.config && (0, node_fs.existsSync)(entrySource.config) ? entrySource.config : entrySource?.configRequest && !node_path.default.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? node_path.default.resolve(base, entrySource.configRequest) : entrySource?.config;
3077
+ const css = normalizeTailwindV4CssPackageImports(nested ? normalizeTailwindV4CssSourceDirectives(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), base) : normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), packageName);
3078
+ cssSources.push({
3079
+ file: normalizedFile,
3080
+ base,
3081
+ css,
3082
+ dependencies: [normalizedFile]
3083
+ });
3084
+ let root;
3085
+ try {
3086
+ root = _weapp_tailwindcss_postcss.postcss.parse(rawCss);
3087
+ } catch {
3088
+ return;
3089
+ }
3090
+ root.walkAtRules("import", (rule) => {
3091
+ const parsed = parseCssImportSpecifier(rule.params);
3092
+ if (!parsed || !parsed.specifier.startsWith(".") || parsed.specifier.includes("\\")) return;
3093
+ const importedFile = node_path.default.resolve(base, parsed.specifier);
3094
+ const resolved = (node_path.default.extname(importedFile) ? [importedFile] : [
3095
+ importedFile,
3096
+ `${importedFile}.css`,
3097
+ `${importedFile}.pcss`,
3098
+ `${importedFile}.scss`,
3099
+ `${importedFile}.sass`
3100
+ ]).find((candidate) => (0, node_fs.existsSync)(candidate));
3101
+ if (resolved) collectCssSource(resolved, true);
3102
+ });
3103
+ };
3054
3104
  for (const cssEntry of cssEntries) {
3055
3105
  const normalizedCssEntry = cssEntry.replace(/[?#].*$/, "");
3056
3106
  const file = node_path.default.resolve(normalizedCssEntry);
@@ -3058,16 +3108,7 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
3058
3108
  remainingCssEntries.push(normalizedCssEntry);
3059
3109
  continue;
3060
3110
  }
3061
- const base = node_path.default.dirname(file);
3062
- const rawCss = (0, node_fs.readFileSync)(file, "utf8");
3063
- const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
3064
- const css = normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, entrySource?.config && (0, node_fs.existsSync)(entrySource.config) ? entrySource.config : entrySource?.configRequest && !node_path.default.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? node_path.default.resolve(base, entrySource.configRequest) : entrySource?.config)), packageName);
3065
- cssSources.push({
3066
- file,
3067
- base,
3068
- css,
3069
- dependencies: [file]
3070
- });
3111
+ collectCssSource(file);
3071
3112
  }
3072
3113
  return {
3073
3114
  cssEntries: remainingCssEntries,
@@ -3574,6 +3615,12 @@ Object.defineProperty(exports, "parseConfigParam", {
3574
3615
  return parseConfigParam;
3575
3616
  }
3576
3617
  });
3618
+ Object.defineProperty(exports, "parseCssImportSpecifier", {
3619
+ enumerable: true,
3620
+ get: function() {
3621
+ return parseCssImportSpecifier;
3622
+ }
3623
+ });
3577
3624
  Object.defineProperty(exports, "parseImportRequest", {
3578
3625
  enumerable: true,
3579
3626
  get: function() {
@@ -3592,6 +3639,12 @@ Object.defineProperty(exports, "prependConfigDirective", {
3592
3639
  return prependConfigDirective;
3593
3640
  }
3594
3641
  });
3642
+ Object.defineProperty(exports, "quoteCssImportSpecifier", {
3643
+ enumerable: true,
3644
+ get: function() {
3645
+ return quoteCssImportSpecifier;
3646
+ }
3647
+ });
3595
3648
  Object.defineProperty(exports, "removeMiniProgramInteractiveSelectors", {
3596
3649
  enumerable: true,
3597
3650
  get: function() {
@@ -8,6 +8,7 @@ import process from "node:process";
8
8
  import { createTailwindGenerationSession, createTailwindV4Engine, extractRawCandidates, loadTailwindV4DesignSystem, resolveProjectSourceFiles, resolveTailwindV4Source, resolveValidTailwindV4Candidates as resolveValidTailwindV4Candidates$1 } from "@tailwindcss-mangle/engine";
9
9
  import { analyzeTailwindCssDirectives, createStyleHandler, filterExistingCssRules, finalizeMiniProgramCss as finalizeMiniProgramCss$1, hasMiniProgramCssSpecificityPlaceholders, isTailwindCssGenerationDirective, isTailwindCssImportAtRule, isTailwindCssPackageJsonImportRequest, normalizeTailwindCssImportRequest, normalizeTailwindcssWebRpxDeclarations, parseTailwindCssConfigRequest, parseTailwindCssDirectiveRequest, postcss, protectDynamicColorMixAlpha, pruneMiniProgramGeneratedCss, pruneMiniProgramGeneratedCss as pruneMiniProgramGeneratedCss$1, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, selectorContainsPseudoClass, stripMiniProgramCssSpecificityPlaceholders } from "@weapp-tailwindcss/postcss";
10
10
  import { LRUCache } from "lru-cache";
11
+ import { TokenType, tokenize } from "@csstools/css-tokenizer";
11
12
  import { stat } from "node:fs/promises";
12
13
  import micromatch from "micromatch";
13
14
  //#region src/runtime-branch/generator-target-env.ts
@@ -336,6 +337,47 @@ async function transformTailwindV4CssByTarget(css, target, options) {
336
337
  return shouldUseUniAppWebRpxCompatibility(options?.appType) ? transformTailwindV4WebRpxCss(resolvedWebCss) : resolvedWebCss;
337
338
  }
338
339
  //#endregion
340
+ //#region src/tailwindcss/v4-engine/css-import.ts
341
+ function parseCssImportSpecifier(params) {
342
+ const tokens = tokenize({ css: params }).filter((token) => token[0] !== TokenType.Whitespace && token[0] !== TokenType.Comment);
343
+ const first = tokens[0];
344
+ if (!first) return;
345
+ if (first[0] === TokenType.String || first[0] === TokenType.URL) return {
346
+ specifier: first[4].value,
347
+ raw: first[1],
348
+ quote: first[0] === TokenType.String ? first[1][0] : void 0
349
+ };
350
+ if (first[0] === TokenType.Function && first[4].value.toLowerCase() === "url" && tokens[1]?.[0] === TokenType.String && tokens[2]?.[0] === TokenType.CloseParen) return {
351
+ specifier: tokens[1][4].value,
352
+ raw: params.slice(first[2], tokens[2][3] + 1),
353
+ quote: tokens[1][1][0]
354
+ };
355
+ }
356
+ function quoteCssImportSpecifier(file, quote = "\"") {
357
+ return `${quote}${(path.sep === "\\" || /^[a-z]:[\\/]|^\\\\/i.test(file) ? file.replaceAll("\\", "/") : file).replaceAll("\\", "\\\\").replaceAll(quote, `\\${quote}`).replaceAll("\n", "\\a ").replaceAll("\r", "\\d ")}${quote}`;
358
+ }
359
+ function isTailwindCssImport(params) {
360
+ const specifier = parseCssImportSpecifier(params)?.specifier;
361
+ if (!specifier) return false;
362
+ if (specifier === "tailwindcss" || specifier.startsWith("tailwindcss/")) return true;
363
+ const paths = specifier.includes("\\") ? path.win32 : path.posix;
364
+ return paths.basename(specifier) === "index.css" && paths.basename(paths.dirname(specifier)) === "tailwindcss";
365
+ }
366
+ function parseImportSourceParam(params) {
367
+ const tokens = tokenize({ css: params }).filter((token) => token[0] !== TokenType.Whitespace && token[0] !== TokenType.Comment);
368
+ const index = tokens.findIndex((token) => token[0] === TokenType.Function && token[4].value === "source");
369
+ const value = tokens[index + 1];
370
+ if (index < 0 || tokens[index + 2]?.[0] !== TokenType.CloseParen) return;
371
+ if (value?.[0] === TokenType.Ident && value[4].value === "none") return {
372
+ none: true,
373
+ sourcePath: void 0
374
+ };
375
+ return value?.[0] === TokenType.String ? {
376
+ none: false,
377
+ sourcePath: value[4].value
378
+ } : void 0;
379
+ }
380
+ //#endregion
339
381
  //#region src/tailwindcss/v4-engine/tailwind-v4-default-colors.ts
340
382
  const TAILWIND_V4_COLOR_STEPS = [
341
383
  "50",
@@ -725,7 +767,7 @@ function resolveTailwindV4ThemeCssFromImport(css) {
725
767
  let resolved;
726
768
  root.walkAtRules("import", (rule) => {
727
769
  if (resolved) return;
728
- const specifier = parseCssImportSpecifier$2(rule.params);
770
+ const specifier = parseCssImportSpecifier(rule.params)?.specifier;
729
771
  if (!specifier || !path.isAbsolute(specifier) || path.basename(specifier) !== "index.css") return;
730
772
  const themeCss = path.join(path.dirname(specifier), "theme.css");
731
773
  if (existsSync(themeCss)) resolved = themeCss;
@@ -757,15 +799,8 @@ function applyMiniProgramTailwindV4DefaultColorCss(css, source) {
757
799
  if (insertionIndex === 0) return `${themeCss}\n${css}`;
758
800
  return `${css.slice(0, insertionIndex)}\n${themeCss}\n${css.slice(insertionIndex)}`;
759
801
  }
760
- function parseCssImportSpecifier$2(params) {
761
- const value = params.trim();
762
- const quoted = /^(['"])(.*?)\1/.exec(value);
763
- if (quoted) return quoted[2];
764
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
765
- return url?.[2] ?? url?.[3];
766
- }
767
802
  function isTailwindCssPreflightImport(params) {
768
- const specifier = parseCssImportSpecifier$2(params);
803
+ const specifier = parseCssImportSpecifier(params)?.specifier;
769
804
  return specifier === "tailwindcss/preflight.css" || specifier === "tailwindcss/preflight";
770
805
  }
771
806
  function removeTailwindV4PreflightImports(css) {
@@ -822,7 +857,7 @@ function createCompatibleSource(source, target) {
822
857
  };
823
858
  }
824
859
  //#endregion
825
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js
860
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/typeof.js
826
861
  function _typeof(o) {
827
862
  "@babel/helpers - typeof";
828
863
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -832,7 +867,7 @@ function _typeof(o) {
832
867
  }, _typeof(o);
833
868
  }
834
869
  //#endregion
835
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js
870
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/toPrimitive.js
836
871
  function toPrimitive(t, r) {
837
872
  if ("object" != _typeof(t) || !t) return t;
838
873
  var e = t[Symbol.toPrimitive];
@@ -844,13 +879,13 @@ function toPrimitive(t, r) {
844
879
  return ("string" === r ? String : Number)(t);
845
880
  }
846
881
  //#endregion
847
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js
882
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/toPropertyKey.js
848
883
  function toPropertyKey(t) {
849
884
  var i = toPrimitive(t, "string");
850
885
  return "symbol" == _typeof(i) ? i : i + "";
851
886
  }
852
887
  //#endregion
853
- //#region \0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js
888
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/defineProperty.js
854
889
  function _defineProperty(e, r, t) {
855
890
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
856
891
  value: t,
@@ -918,6 +953,7 @@ const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
918
953
  "ksml",
919
954
  "ttml",
920
955
  "qml",
956
+ "qxml",
921
957
  "tyml",
922
958
  "xhsml",
923
959
  "swan",
@@ -949,6 +985,7 @@ const FULL_SOURCE_SCAN_EXTENSIONS = [
949
985
  "ksml",
950
986
  "ttml",
951
987
  "qml",
988
+ "qxml",
952
989
  "tyml",
953
990
  "xhsml",
954
991
  "swan",
@@ -974,19 +1011,19 @@ function toPosixPath(value) {
974
1011
  return value.split(path.sep).join("/").split(path.win32.sep).join("/");
975
1012
  }
976
1013
  function resolveSourceScanPath(value) {
977
- const resolved = path.resolve(value);
978
- try {
979
- return realpathSync.native(resolved);
980
- } catch {
981
- return resolved;
982
- }
1014
+ return resolveSourceScanPathWithApi(value, path);
983
1015
  }
984
1016
  function resolveSourceScanPathWithApi(value, pathApi) {
985
1017
  const resolved = pathApi.resolve(value);
986
- try {
987
- return realpathSync.native(resolved);
988
- } catch {
989
- return resolved;
1018
+ let current = resolved;
1019
+ const missing = [];
1020
+ while (true) try {
1021
+ return pathApi.join(realpathSync.native(current), ...missing.reverse());
1022
+ } catch (error) {
1023
+ const parent = pathApi.dirname(current);
1024
+ if (error.code !== "ENOENT" || parent === current) return resolved;
1025
+ missing.push(pathApi.basename(current));
1026
+ current = parent;
990
1027
  }
991
1028
  }
992
1029
  function normalizeEntryPattern(entry) {
@@ -1203,25 +1240,6 @@ const TAILWIND_V4_DEFAULT_IGNORED_SOURCE_PATTERNS = [
1203
1240
  "**/.env",
1204
1241
  "**/.env.*"
1205
1242
  ];
1206
- function parseImportSourceParam(params) {
1207
- const match = /\bsource\(\s*(none|(['"])(.*?)\2)\s*\)/.exec(params);
1208
- if (!match) return;
1209
- return {
1210
- none: match[1] === "none",
1211
- sourcePath: match[3]
1212
- };
1213
- }
1214
- function parseCssImportSpecifier$1(params) {
1215
- const value = params.trim();
1216
- const quoted = /^(['"])(.*?)\1/.exec(value);
1217
- if (quoted) return quoted[2];
1218
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
1219
- return url?.[2] ?? url?.[3];
1220
- }
1221
- function isTailwindCssImport(params) {
1222
- const specifier = parseCssImportSpecifier$1(params);
1223
- return specifier === "tailwindcss" || specifier?.startsWith("tailwindcss/") || specifier?.replaceAll("\\", "/").endsWith("/tailwindcss/index.css");
1224
- }
1225
1243
  function resolveSourceBase(base, sourcePath) {
1226
1244
  return path.isAbsolute(sourcePath) ? sourcePath : path.resolve(base, sourcePath);
1227
1245
  }
@@ -2959,31 +2977,6 @@ function isBarePackageSpecifier(specifier) {
2959
2977
  function isPackageJsonImportSpecifier(specifier) {
2960
2978
  return typeof specifier === "string" && specifier.startsWith("#");
2961
2979
  }
2962
- function parseCssImportSpecifier(params) {
2963
- const value = params.trim();
2964
- const quoted = /^(['"])(.*?)\1/.exec(value);
2965
- if (quoted) {
2966
- const specifier = quoted[2];
2967
- if (specifier === void 0) return;
2968
- return {
2969
- quote: quoted[1],
2970
- raw: quoted[0],
2971
- specifier
2972
- };
2973
- }
2974
- const url = /^url\(\s*(?:(['"])(.*?)\1|([^'")\s]+))\s*\)/.exec(value);
2975
- if (!url) return;
2976
- const specifier = url[2] ?? url[3];
2977
- if (specifier === void 0) return;
2978
- return {
2979
- quote: url[1],
2980
- raw: url[0],
2981
- specifier
2982
- };
2983
- }
2984
- function quoteCssImportSpecifier(specifier, quote = "\"") {
2985
- return `${quote}${specifier.replaceAll("\\", "\\\\").replaceAll(quote, `\\${quote}`)}${quote}`;
2986
- }
2987
2980
  function createTailwindV4CssImportSpecifierSet(packageName) {
2988
2981
  const specifiers = /* @__PURE__ */ new Set(["tailwindcss"]);
2989
2982
  if (packageName && isBarePackageSpecifier(packageName)) specifiers.add(packageName);
@@ -3010,6 +3003,27 @@ function normalizeTailwindV4CssPackageImports(css, packageName) {
3010
3003
  });
3011
3004
  return changed ? root.toString() : css;
3012
3005
  }
3006
+ function normalizeTailwindV4CssSourceDirectives(css, base) {
3007
+ if (!css.includes("@source")) return css;
3008
+ let root;
3009
+ try {
3010
+ root = postcss.parse(css);
3011
+ } catch {
3012
+ return css;
3013
+ }
3014
+ let changed = false;
3015
+ root.walkAtRules("source", (rule) => {
3016
+ const match = rule.params.match(/^(not\s+)?("([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)')(.*)$/);
3017
+ if (!match) return;
3018
+ const specifier = match[3] ?? match[4];
3019
+ if (!specifier?.startsWith(".")) return;
3020
+ const resolved = path.resolve(base, specifier);
3021
+ const quote = match[2] === void 0 ? "'" : "\"";
3022
+ rule.params = `${match[1] ?? ""}${quote}${resolved}${quote}${match[5] ?? ""}`;
3023
+ changed = true;
3024
+ });
3025
+ return changed ? root.toString() : css;
3026
+ }
3013
3027
  function normalizeTailwindV4CssSources(cssSources, packageName, projectRoot) {
3014
3028
  if (!cssSources?.length) return cssSources;
3015
3029
  let changed = false;
@@ -3042,6 +3056,42 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
3042
3056
  if (!cssEntries?.length) return;
3043
3057
  const remainingCssEntries = [];
3044
3058
  const cssSources = [];
3059
+ const visited = /* @__PURE__ */ new Set();
3060
+ const collectCssSource = (file, nested = false) => {
3061
+ const normalizedFile = path.resolve(file);
3062
+ if (visited.has(normalizedFile) || !existsSync(normalizedFile)) return;
3063
+ visited.add(normalizedFile);
3064
+ const base = path.dirname(normalizedFile);
3065
+ const rawCss = readFileSync(normalizedFile, "utf8");
3066
+ const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
3067
+ const config = entrySource?.config && existsSync(entrySource.config) ? entrySource.config : entrySource?.configRequest && !path.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? path.resolve(base, entrySource.configRequest) : entrySource?.config;
3068
+ const css = normalizeTailwindV4CssPackageImports(nested ? normalizeTailwindV4CssSourceDirectives(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), base) : normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, config)), packageName);
3069
+ cssSources.push({
3070
+ file: normalizedFile,
3071
+ base,
3072
+ css,
3073
+ dependencies: [normalizedFile]
3074
+ });
3075
+ let root;
3076
+ try {
3077
+ root = postcss.parse(rawCss);
3078
+ } catch {
3079
+ return;
3080
+ }
3081
+ root.walkAtRules("import", (rule) => {
3082
+ const parsed = parseCssImportSpecifier(rule.params);
3083
+ if (!parsed || !parsed.specifier.startsWith(".") || parsed.specifier.includes("\\")) return;
3084
+ const importedFile = path.resolve(base, parsed.specifier);
3085
+ const resolved = (path.extname(importedFile) ? [importedFile] : [
3086
+ importedFile,
3087
+ `${importedFile}.css`,
3088
+ `${importedFile}.pcss`,
3089
+ `${importedFile}.scss`,
3090
+ `${importedFile}.sass`
3091
+ ]).find((candidate) => existsSync(candidate));
3092
+ if (resolved) collectCssSource(resolved, true);
3093
+ });
3094
+ };
3045
3095
  for (const cssEntry of cssEntries) {
3046
3096
  const normalizedCssEntry = cssEntry.replace(/[?#].*$/, "");
3047
3097
  const file = path.resolve(normalizedCssEntry);
@@ -3049,16 +3099,7 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
3049
3099
  remainingCssEntries.push(normalizedCssEntry);
3050
3100
  continue;
3051
3101
  }
3052
- const base = path.dirname(file);
3053
- const rawCss = readFileSync(file, "utf8");
3054
- const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
3055
- const css = normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, entrySource?.config && existsSync(entrySource.config) ? entrySource.config : entrySource?.configRequest && !path.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? path.resolve(base, entrySource.configRequest) : entrySource?.config)), packageName);
3056
- cssSources.push({
3057
- file,
3058
- base,
3059
- css,
3060
- dependencies: [file]
3061
- });
3102
+ collectCssSource(file);
3062
3103
  }
3063
3104
  return {
3064
3105
  cssEntries: remainingCssEntries,
@@ -3283,4 +3324,4 @@ async function createWeappTailwindcssGeneratorFromRuntime(tailwindRuntime) {
3283
3324
  return createWeappTailwindcssGenerator(await resolveTailwindSourceFromRuntime(tailwindRuntime));
3284
3325
  }
3285
3326
  //#endregion
3286
- export { hasTailwindRootDirectives as $, resolveBooleanObjectOption as A, resolveTailwindV4CssSourceBase as At, removeUnsupportedMiniProgramAtRules as B, resolveValidTailwindV4Candidates$1 as Bt, findWorkspacePackageDir as C, expandTailwindSourceEntries as Ct, normalizeTailwindcssRuntimeOptions as D, parseConfigParam as Dt, normalizeExtendLengthUnits as E, normalizeLegacyContentEntries as Et, stripTailwindSourceMediaFragments as F, resolveCssMacroTailwindV4Source as Ft, shouldFilterApplyOnlyGeneratedCss as G, removeTailwindV4GeneratedUserCssArtifacts as H, stripUnmatchedTailwindSourceMediaCloseFragments as I, getTailwindV4IncrementalGenerateCacheStats as It, splitUserCssLayerBlocks as J, extractGeneratedCssForUserLayerSelectors as K, finalizeMiniProgramCss$1 as L, filterUnsupportedMiniProgramTailwindV4Candidates as Lt, isCommentOnlyCss as M, _defineProperty as Mt, removeMiniProgramInteractiveSelectors as N, transformTailwindV4CssByTarget as Nt, resolveTailwindcssOptions as O, resolveCssSourceEntries as Ot, removeTailwindV4GeneratorAtRules as P, transformTailwindV4CssToWeapp as Pt, hasTailwindNonRootGenerationDirectives as Q, hasMiniProgramCssSpecificityPlaceholders as R, shouldUseUniAppWebRpxCompatibility as Rt, findNearestPackageRoot as S, FULL_SOURCE_SCAN_PATTERN as St, omitUndefined as T, isFileMatchedByTailwindSourceEntries as Tt, filterApplyOnlyGeneratedCss as U, stripMiniProgramCssSpecificityPlaceholders as V, normalizeEmptyTailwindCustomVariants as W, hasLocalCssImport as X, preferScopedGeneratedCssRules as Y, hasTailwindApplyDirective as Z, upsertTailwindV4CssSource as _, stripTailwindBanners as _t, resolveGeneratorRuntimeBranch as a, removeTailwindSourceDirectives as at, isTailwindV4CssEntry as b, createTailwindV4Engine$1 as bt, shouldUseNativeAppCssBranch as c, VITE_MARKER_RE as ct, resolveTailwindV4SourceFromRuntime as d, hasTailwindGeneratedCssMarkers as dt, hasTailwindSourceDirectives as et, resolveTailwindV4SourceFromRuntimeOptions as f, splitGeneratorPlaceholderCssBySourceOrder as ft, removeTailwindV4CssSource as g, stripTailwindBanner as gt, hasConfiguredTailwindV4CssRoots as h, stripGeneratorPlaceholderMarkers as ht, normalizeWeappTailwindcssGeneratorOptions as i, parseImportRequest as it, transformGeneratorUserCss as j, toPosixPath as jt, normalizeStringListOption as k, resolveSourceScanPath as kt, resolveUniUtsPlatform as l, createCssAppend as lt, filterTailwindV4CssSourceRoots as m, splitTailwindV4GeneratedCssBySourceOrder as mt, createWeappTailwindcssGeneratorFromRuntime as n, normalizeTailwindSourceDirectives as nt, resolveRuntimeBranch as o, resolveCssEntrySource as ot, resolveTailwindV4SourceOptionsFromRuntime as p, splitTailwindGeneratedCssByBanner as pt, hasUserCssLayerBlocks as q, resolveTailwindSourceFromRuntime as r, normalizeTailwindSourceForGenerator as rt, shouldUseMiniProgramCssBranch as s, GENERATOR_PLACEHOLDER_MARKER_RE as st, createWeappTailwindcssGenerator as t, normalizeTailwindConfigDirectives as tt, resolveTailwindV4Source$1 as u, hasTailwindGeneratedCss as ut, groupCssEntriesByBase as v, normalizeConfigDirective as vt, findWorkspaceRoot as w, isFileExcludedByTailwindSourceEntries as wt, normalizeCssEntries as x, FULL_SOURCE_SCAN_EXTENSION_RE as xt, guessBasedirFromEntries as y, prependConfigDirective as yt, pruneMiniProgramGeneratedCss as z, loadTailwindV4DesignSystem as zt };
3327
+ export { hasTailwindRootDirectives as $, resolveBooleanObjectOption as A, resolveTailwindV4CssSourceBase as At, removeUnsupportedMiniProgramAtRules as B, shouldUseUniAppWebRpxCompatibility as Bt, findWorkspacePackageDir as C, expandTailwindSourceEntries as Ct, normalizeTailwindcssRuntimeOptions as D, parseConfigParam as Dt, normalizeExtendLengthUnits as E, normalizeLegacyContentEntries as Et, stripTailwindSourceMediaFragments as F, transformTailwindV4CssByTarget as Ft, shouldFilterApplyOnlyGeneratedCss as G, removeTailwindV4GeneratedUserCssArtifacts as H, resolveValidTailwindV4Candidates$1 as Ht, stripUnmatchedTailwindSourceMediaCloseFragments as I, transformTailwindV4CssToWeapp as It, splitUserCssLayerBlocks as J, extractGeneratedCssForUserLayerSelectors as K, finalizeMiniProgramCss$1 as L, resolveCssMacroTailwindV4Source as Lt, isCommentOnlyCss as M, _defineProperty as Mt, removeMiniProgramInteractiveSelectors as N, parseCssImportSpecifier as Nt, resolveTailwindcssOptions as O, resolveCssSourceEntries as Ot, removeTailwindV4GeneratorAtRules as P, quoteCssImportSpecifier as Pt, hasTailwindNonRootGenerationDirectives as Q, hasMiniProgramCssSpecificityPlaceholders as R, getTailwindV4IncrementalGenerateCacheStats as Rt, findNearestPackageRoot as S, FULL_SOURCE_SCAN_PATTERN as St, omitUndefined as T, isFileMatchedByTailwindSourceEntries as Tt, filterApplyOnlyGeneratedCss as U, stripMiniProgramCssSpecificityPlaceholders as V, loadTailwindV4DesignSystem as Vt, normalizeEmptyTailwindCustomVariants as W, hasLocalCssImport as X, preferScopedGeneratedCssRules as Y, hasTailwindApplyDirective as Z, upsertTailwindV4CssSource as _, stripTailwindBanners as _t, resolveGeneratorRuntimeBranch as a, removeTailwindSourceDirectives as at, isTailwindV4CssEntry as b, createTailwindV4Engine$1 as bt, shouldUseNativeAppCssBranch as c, VITE_MARKER_RE as ct, resolveTailwindV4SourceFromRuntime as d, hasTailwindGeneratedCssMarkers as dt, hasTailwindSourceDirectives as et, resolveTailwindV4SourceFromRuntimeOptions as f, splitGeneratorPlaceholderCssBySourceOrder as ft, removeTailwindV4CssSource as g, stripTailwindBanner as gt, hasConfiguredTailwindV4CssRoots as h, stripGeneratorPlaceholderMarkers as ht, normalizeWeappTailwindcssGeneratorOptions as i, parseImportRequest as it, transformGeneratorUserCss as j, toPosixPath as jt, normalizeStringListOption as k, resolveSourceScanPath as kt, resolveUniUtsPlatform as l, createCssAppend as lt, filterTailwindV4CssSourceRoots as m, splitTailwindV4GeneratedCssBySourceOrder as mt, createWeappTailwindcssGeneratorFromRuntime as n, normalizeTailwindSourceDirectives as nt, resolveRuntimeBranch as o, resolveCssEntrySource as ot, resolveTailwindV4SourceOptionsFromRuntime as p, splitTailwindGeneratedCssByBanner as pt, hasUserCssLayerBlocks as q, resolveTailwindSourceFromRuntime as r, normalizeTailwindSourceForGenerator as rt, shouldUseMiniProgramCssBranch as s, GENERATOR_PLACEHOLDER_MARKER_RE as st, createWeappTailwindcssGenerator as t, normalizeTailwindConfigDirectives as tt, resolveTailwindV4Source$1 as u, hasTailwindGeneratedCss as ut, groupCssEntriesByBase as v, normalizeConfigDirective as vt, findWorkspaceRoot as w, isFileExcludedByTailwindSourceEntries as wt, normalizeCssEntries as x, FULL_SOURCE_SCAN_EXTENSION_RE as xt, guessBasedirFromEntries as y, prependConfigDirective as yt, pruneMiniProgramGeneratedCss as z, filterUnsupportedMiniProgramTailwindV4Candidates as zt };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_generator = require("./generator-DsrQ9txU.cjs");
2
+ const require_generator = require("./generator-BoZIiZD5.cjs");
3
3
  let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
4
4
  exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
5
5
  exports.createWeappTailwindcssGeneratorFromRuntime = require_generator.createWeappTailwindcssGeneratorFromRuntime;
package/dist/generator.js CHANGED
@@ -1,2 +1,2 @@
1
- import { Nt as transformTailwindV4CssByTarget, Pt as transformTailwindV4CssToWeapp, d as resolveTailwindV4SourceFromRuntime, f as resolveTailwindV4SourceFromRuntimeOptions, i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromRuntime, p as resolveTailwindV4SourceOptionsFromRuntime, r as resolveTailwindSourceFromRuntime, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source, zt as loadTailwindV4DesignSystem } from "./generator-DyXTBPmE.js";
1
+ import { Ft as transformTailwindV4CssByTarget, It as transformTailwindV4CssToWeapp, Vt as loadTailwindV4DesignSystem, d as resolveTailwindV4SourceFromRuntime, f as resolveTailwindV4SourceFromRuntimeOptions, i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromRuntime, p as resolveTailwindV4SourceOptionsFromRuntime, r as resolveTailwindSourceFromRuntime, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-C2aWns8n.js";
2
2
  export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromRuntime, loadTailwindV4DesignSystem, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromRuntime, resolveTailwindV4Source, resolveTailwindV4SourceFromRuntime, resolveTailwindV4SourceFromRuntimeOptions, resolveTailwindV4SourceOptionsFromRuntime, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };