tailwind-styled-v4 5.0.40 → 5.0.411

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 (101) hide show
  1. package/dist/analyzer.js +43 -16
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +104 -72
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +33 -7
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +55 -22
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +39 -10
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +56 -23
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +222 -38
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +321 -203
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +57 -14
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +71 -28
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +0 -1
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/devtools.js +16 -2
  24. package/dist/devtools.js.map +1 -1
  25. package/dist/devtools.mjs +21 -2
  26. package/dist/devtools.mjs.map +1 -1
  27. package/dist/engine.js +141 -51
  28. package/dist/engine.js.map +1 -1
  29. package/dist/engine.mjs +238 -148
  30. package/dist/engine.mjs.map +1 -1
  31. package/dist/index.js +50 -8
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +74 -29
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/next.js +98 -37
  36. package/dist/next.js.map +1 -1
  37. package/dist/next.mjs +177 -115
  38. package/dist/next.mjs.map +1 -1
  39. package/dist/plugin-api.js +0 -1
  40. package/dist/plugin-api.js.map +1 -1
  41. package/dist/plugin-registry.js +6 -2
  42. package/dist/plugin-registry.js.map +1 -1
  43. package/dist/plugin-registry.mjs +9 -2
  44. package/dist/plugin-registry.mjs.map +1 -1
  45. package/dist/plugin.js +0 -1
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/preset.js +0 -1
  48. package/dist/preset.js.map +1 -1
  49. package/dist/rspack.js +89 -6
  50. package/dist/rspack.js.map +1 -1
  51. package/dist/rspack.mjs +39 -18
  52. package/dist/rspack.mjs.map +1 -1
  53. package/dist/runtime-css.js +0 -1
  54. package/dist/runtime-css.js.map +1 -1
  55. package/dist/runtime.js +0 -1
  56. package/dist/runtime.js.map +1 -1
  57. package/dist/scanner.js +29 -11
  58. package/dist/scanner.js.map +1 -1
  59. package/dist/scanner.mjs +84 -61
  60. package/dist/scanner.mjs.map +1 -1
  61. package/dist/shared.js +91 -35
  62. package/dist/shared.js.map +1 -1
  63. package/dist/shared.mjs +122 -64
  64. package/dist/shared.mjs.map +1 -1
  65. package/dist/storybook-addon.js +0 -1
  66. package/dist/storybook-addon.js.map +1 -1
  67. package/dist/svelte.js +40 -8
  68. package/dist/svelte.js.map +1 -1
  69. package/dist/svelte.mjs +57 -28
  70. package/dist/svelte.mjs.map +1 -1
  71. package/dist/syntax.js +7 -3
  72. package/dist/syntax.js.map +1 -1
  73. package/dist/syntax.mjs +30 -23
  74. package/dist/syntax.mjs.map +1 -1
  75. package/dist/testing.js +0 -1
  76. package/dist/testing.js.map +1 -1
  77. package/dist/theme.js +23 -5
  78. package/dist/theme.js.map +1 -1
  79. package/dist/theme.mjs +41 -17
  80. package/dist/theme.mjs.map +1 -1
  81. package/dist/turbopackLoader.js +58 -14
  82. package/dist/turbopackLoader.js.map +1 -1
  83. package/dist/turbopackLoader.mjs +89 -45
  84. package/dist/turbopackLoader.mjs.map +1 -1
  85. package/dist/tw.js +224 -38
  86. package/dist/tw.js.map +1 -1
  87. package/dist/tw.mjs +321 -203
  88. package/dist/tw.mjs.map +1 -1
  89. package/dist/vite.js +132 -50
  90. package/dist/vite.js.map +1 -1
  91. package/dist/vite.mjs +226 -143
  92. package/dist/vite.mjs.map +1 -1
  93. package/dist/vue.js +40 -8
  94. package/dist/vue.js.map +1 -1
  95. package/dist/vue.mjs +57 -28
  96. package/dist/vue.mjs.map +1 -1
  97. package/dist/webpackLoader.js +40 -10
  98. package/dist/webpackLoader.js.map +1 -1
  99. package/dist/webpackLoader.mjs +59 -27
  100. package/dist/webpackLoader.mjs.map +1 -1
  101. package/package.json +1 -1
@@ -26,10 +26,31 @@ var __copyProps = (to, from, except, desc) => {
26
26
  };
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
+ // node_modules/tsup/assets/esm_shims.js
30
+ import path from "path";
31
+ import { fileURLToPath } from "url";
32
+ var getFilename, __filename;
33
+ var init_esm_shims = __esm({
34
+ "node_modules/tsup/assets/esm_shims.js"() {
35
+ "use strict";
36
+ getFilename = () => fileURLToPath(import.meta.url);
37
+ __filename = /* @__PURE__ */ getFilename();
38
+ }
39
+ });
40
+
29
41
  // packages/domain/shared/src/native-resolution.ts
30
42
  import { createRequire } from "module";
31
43
  import * as fs from "fs";
32
- import * as path from "path";
44
+ import * as path2 from "path";
45
+ function _safeCreateRequire() {
46
+ if (typeof import.meta !== "undefined" && import.meta.url && !import.meta.url.includes("unknown")) {
47
+ return createRequire(import.meta.url);
48
+ }
49
+ if (typeof __filename !== "undefined") {
50
+ return createRequire(__filename);
51
+ }
52
+ return createRequire(new URL(`file://${process.cwd()}/`).href);
53
+ }
33
54
  function platformKey() {
34
55
  if (isBrowser) return "browser";
35
56
  return `${process.platform}-${process.arch}`;
@@ -65,11 +86,11 @@ function resolveNativeBinary(runtimeDir) {
65
86
  const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
66
87
  const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
67
88
  if (runtimeDir) {
68
- for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
69
- const pkgRoot = path.resolve(runtimeDir, depth);
89
+ for (const depth of ["..", path2.join("..", ".."), path2.join("..", "..", "..")]) {
90
+ const pkgRoot = path2.resolve(runtimeDir, depth);
70
91
  for (const bin of BINARY_NAMES_SELF) {
71
92
  for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
72
- const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
93
+ const candidate = path2.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
73
94
  tried.push(`self-bundled:${candidate}`);
74
95
  if (fs.existsSync(candidate)) {
75
96
  return { path: candidate, source: "prebuilt", platform, tried };
@@ -83,22 +104,22 @@ function resolveNativeBinary(runtimeDir) {
83
104
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
84
105
  const localCandidates = [];
85
106
  for (const bin of BINARY_NAMES) {
86
- localCandidates.push(path.resolve(base, `${bin}.node`));
87
- localCandidates.push(path.resolve(base, "..", `${bin}.node`));
88
- localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
89
- localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
107
+ localCandidates.push(path2.resolve(base, `${bin}.node`));
108
+ localCandidates.push(path2.resolve(base, "..", `${bin}.node`));
109
+ localCandidates.push(path2.resolve(base, `${bin}.${platform}.node`));
110
+ localCandidates.push(path2.resolve(base, `${bin}.${napiPlatform}.node`));
90
111
  }
91
112
  for (const startDir of [cwd, base]) {
92
113
  let dir = startDir;
93
114
  for (let i = 0; i < 6; i++) {
94
- const nativeDir = path.resolve(dir, "native");
115
+ const nativeDir = path2.resolve(dir, "native");
95
116
  for (const bin of BINARY_NAMES) {
96
- localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
97
- localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
98
- localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
99
- localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
117
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.node`));
118
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.${platform}.node`));
119
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
120
+ localCandidates.push(path2.resolve(nativeDir, "target", "release", `${bin}.node`));
100
121
  }
101
- const parent = path.resolve(dir, "..");
122
+ const parent = path2.resolve(dir, "..");
102
123
  if (parent === dir) break;
103
124
  dir = parent;
104
125
  }
@@ -115,10 +136,9 @@ var isBrowser, _require, PLATFORM_MAP;
115
136
  var init_native_resolution = __esm({
116
137
  "packages/domain/shared/src/native-resolution.ts"() {
117
138
  "use strict";
139
+ init_esm_shims();
118
140
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
119
- _require = createRequire(
120
- typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
121
- );
141
+ _require = _safeCreateRequire();
122
142
  PLATFORM_MAP = {
123
143
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
124
144
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -133,13 +153,13 @@ var init_native_resolution = __esm({
133
153
  // packages/domain/shared/src/index.ts
134
154
  import { createHash } from "crypto";
135
155
  import fs2 from "fs";
136
- import path2 from "path";
137
- import { fileURLToPath } from "url";
156
+ import path3 from "path";
157
+ import { fileURLToPath as fileURLToPath2 } from "url";
138
158
  import { createRequire as createRequire2 } from "module";
139
159
  function resolveRuntimeDir(dir, importMetaUrl) {
140
- if (dir) return path2.resolve(dir);
160
+ if (dir) return path3.resolve(dir);
141
161
  try {
142
- return path2.dirname(fileURLToPath(importMetaUrl));
162
+ return path3.dirname(fileURLToPath2(importMetaUrl));
143
163
  } catch {
144
164
  return process.cwd();
145
165
  }
@@ -148,6 +168,7 @@ var _require2;
148
168
  var init_src = __esm({
149
169
  "packages/domain/shared/src/index.ts"() {
150
170
  "use strict";
171
+ init_esm_shims();
151
172
  init_native_resolution();
152
173
  _require2 = createRequire2(
153
174
  typeof __filename !== "undefined" ? `file://${__filename}` : import.meta.url ?? "file://unknown"
@@ -160,8 +181,9 @@ var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttemp
160
181
  var init_nativeBridge = __esm({
161
182
  "packages/domain/compiler/src/nativeBridge.ts"() {
162
183
  "use strict";
184
+ init_esm_shims();
163
185
  init_src();
164
- _loadNative = (path5) => __require(path5);
186
+ _loadNative = (path6) => __require(path6);
165
187
  log = (...args) => {
166
188
  if (process.env.DEBUG?.includes("compiler:native")) {
167
189
  console.log("[compiler:native]", ...args);
@@ -300,6 +322,7 @@ function resetCacheStats() {
300
322
  var init_cssGeneratorNative = __esm({
301
323
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
302
324
  "use strict";
325
+ init_esm_shims();
303
326
  init_nativeBridge();
304
327
  }
305
328
  });
@@ -373,6 +396,7 @@ function atomicRegistrySize() {
373
396
  var init_compilationNative = __esm({
374
397
  "packages/domain/compiler/src/compiler/compilationNative.ts"() {
375
398
  "use strict";
399
+ init_esm_shims();
376
400
  init_nativeBridge();
377
401
  }
378
402
  });
@@ -517,6 +541,7 @@ function twMergeRaw(classLists) {
517
541
  var init_cssCompilationNative = __esm({
518
542
  "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
519
543
  "use strict";
544
+ init_esm_shims();
520
545
  init_nativeBridge();
521
546
  }
522
547
  });
@@ -617,6 +642,7 @@ function idRegistryImport(importedData) {
617
642
  var init_idRegistryNative = __esm({
618
643
  "packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
619
644
  "use strict";
645
+ init_esm_shims();
620
646
  init_nativeBridge();
621
647
  }
622
648
  });
@@ -759,6 +785,7 @@ function scanFilesBatchNative(filesJson) {
759
785
  var init_streamingNative = __esm({
760
786
  "packages/domain/compiler/src/compiler/streamingNative.ts"() {
761
787
  "use strict";
788
+ init_esm_shims();
762
789
  init_nativeBridge();
763
790
  }
764
791
  });
@@ -811,6 +838,7 @@ var require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
811
838
  var init_tailwindEngine = __esm({
812
839
  "packages/domain/compiler/src/tailwindEngine.ts"() {
813
840
  "use strict";
841
+ init_esm_shims();
814
842
  require2 = createRequire3(
815
843
  typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
816
844
  );
@@ -1000,6 +1028,7 @@ var require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEM
1000
1028
  var init_tailwindEngine2 = __esm({
1001
1029
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1002
1030
  "use strict";
1031
+ init_esm_shims();
1003
1032
  init_nativeBridge();
1004
1033
  init_cssGeneratorNative();
1005
1034
  init_cssCompilationNative();
@@ -1019,6 +1048,7 @@ var init_tailwindEngine2 = __esm({
1019
1048
  var init_compiler = __esm({
1020
1049
  "packages/domain/compiler/src/compiler/index.ts"() {
1021
1050
  "use strict";
1051
+ init_esm_shims();
1022
1052
  init_cssGeneratorNative();
1023
1053
  init_compilationNative();
1024
1054
  init_cssCompilationNative();
@@ -1032,6 +1062,7 @@ var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astEx
1032
1062
  var init_parser = __esm({
1033
1063
  "packages/domain/compiler/src/parser/index.ts"() {
1034
1064
  "use strict";
1065
+ init_esm_shims();
1035
1066
  init_nativeBridge();
1036
1067
  parseClasses = (raw) => {
1037
1068
  const native = getNativeBridge();
@@ -1211,6 +1242,7 @@ function resetMemoryStats() {
1211
1242
  var init_analyzerNative = __esm({
1212
1243
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
1213
1244
  "use strict";
1245
+ init_esm_shims();
1214
1246
  init_nativeBridge();
1215
1247
  }
1216
1248
  });
@@ -1305,6 +1337,7 @@ function resolveSimpleVariants(configJson) {
1305
1337
  var init_themeResolutionNative = __esm({
1306
1338
  "packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
1307
1339
  "use strict";
1340
+ init_esm_shims();
1308
1341
  init_nativeBridge();
1309
1342
  }
1310
1343
  });
@@ -1353,6 +1386,7 @@ function generateSubComponentTypes(root, outputPath) {
1353
1386
  var init_scannerNative = __esm({
1354
1387
  "packages/domain/compiler/src/analyzer/scannerNative.ts"() {
1355
1388
  "use strict";
1389
+ init_esm_shims();
1356
1390
  init_nativeBridge();
1357
1391
  }
1358
1392
  });
@@ -1361,6 +1395,7 @@ var init_scannerNative = __esm({
1361
1395
  var init_analyzer = __esm({
1362
1396
  "packages/domain/compiler/src/analyzer/index.ts"() {
1363
1397
  "use strict";
1398
+ init_esm_shims();
1364
1399
  init_analyzerNative();
1365
1400
  init_themeResolutionNative();
1366
1401
  init_scannerNative();
@@ -1550,6 +1585,7 @@ function resetResolverPoolStats() {
1550
1585
  var init_cacheNative = __esm({
1551
1586
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
1552
1587
  "use strict";
1588
+ init_esm_shims();
1553
1589
  init_nativeBridge();
1554
1590
  }
1555
1591
  });
@@ -1558,6 +1594,7 @@ var init_cacheNative = __esm({
1558
1594
  var init_cache = __esm({
1559
1595
  "packages/domain/compiler/src/cache/index.ts"() {
1560
1596
  "use strict";
1597
+ init_esm_shims();
1561
1598
  init_cacheNative();
1562
1599
  }
1563
1600
  });
@@ -1807,6 +1844,7 @@ function redisDiagnose() {
1807
1844
  var init_redisNative = __esm({
1808
1845
  "packages/domain/compiler/src/redis/redisNative.ts"() {
1809
1846
  "use strict";
1847
+ init_esm_shims();
1810
1848
  init_nativeBridge();
1811
1849
  }
1812
1850
  });
@@ -1815,6 +1853,7 @@ var init_redisNative = __esm({
1815
1853
  var init_redis = __esm({
1816
1854
  "packages/domain/compiler/src/redis/index.ts"() {
1817
1855
  "use strict";
1856
+ init_esm_shims();
1818
1857
  init_redisNative();
1819
1858
  }
1820
1859
  });
@@ -1954,6 +1993,7 @@ function getCompilerDiagnostics() {
1954
1993
  var init_watchSystemNative = __esm({
1955
1994
  "packages/domain/compiler/src/watch/watchSystemNative.ts"() {
1956
1995
  "use strict";
1996
+ init_esm_shims();
1957
1997
  init_nativeBridge();
1958
1998
  }
1959
1999
  });
@@ -1962,13 +2002,14 @@ var init_watchSystemNative = __esm({
1962
2002
  var init_watch = __esm({
1963
2003
  "packages/domain/compiler/src/watch/index.ts"() {
1964
2004
  "use strict";
2005
+ init_esm_shims();
1965
2006
  init_watchSystemNative();
1966
2007
  }
1967
2008
  });
1968
2009
 
1969
2010
  // packages/domain/compiler/src/index.ts
1970
2011
  import fs3 from "fs";
1971
- import path3 from "path";
2012
+ import path4 from "path";
1972
2013
  import { createRequire as createRequire5 } from "module";
1973
2014
  function _layoutClassesToCss(classes) {
1974
2015
  const native = getNativeBridge();
@@ -2008,6 +2049,7 @@ var _require3, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess,
2008
2049
  var init_src2 = __esm({
2009
2050
  "packages/domain/compiler/src/index.ts"() {
2010
2051
  "use strict";
2052
+ init_esm_shims();
2011
2053
  init_nativeBridge();
2012
2054
  init_compiler();
2013
2055
  init_parser();
@@ -2109,7 +2151,7 @@ var init_src2 = __esm({
2109
2151
  };
2110
2152
  scanProjectUsage = (dirs, cwd) => {
2111
2153
  const { batchExtractClasses: batchExtractClasses2 } = _require3("./parser");
2112
- const files = dirs.map((dir) => path3.resolve(cwd, dir));
2154
+ const files = dirs.map((dir) => path4.resolve(cwd, dir));
2113
2155
  const results = batchExtractClasses2(files) || [];
2114
2156
  const combined = {};
2115
2157
  for (const result of results) {
@@ -2146,7 +2188,7 @@ var init_src2 = __esm({
2146
2188
  "tailwind.config.cjs"
2147
2189
  ];
2148
2190
  for (const file of configFiles) {
2149
- const fullPath = path3.join(cwd, file);
2191
+ const fullPath = path4.join(cwd, file);
2150
2192
  if (fs3.existsSync(fullPath)) {
2151
2193
  const mod = __require(fullPath);
2152
2194
  return mod.default || mod;
@@ -2157,9 +2199,9 @@ var init_src2 = __esm({
2157
2199
  getContentPaths = (cwd = process.cwd()) => {
2158
2200
  return {
2159
2201
  content: [
2160
- path3.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
2161
- path3.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
2162
- path3.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
2202
+ path4.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
2203
+ path4.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
2204
+ path4.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
2163
2205
  ]
2164
2206
  };
2165
2207
  };
@@ -2574,6 +2616,7 @@ __export(internal_exports, {
2574
2616
  var init_internal = __esm({
2575
2617
  "packages/domain/compiler/src/internal.ts"() {
2576
2618
  "use strict";
2619
+ init_esm_shims();
2577
2620
  init_src2();
2578
2621
  init_tailwindEngine2();
2579
2622
  init_compiler();
@@ -2586,13 +2629,14 @@ var init_internal = __esm({
2586
2629
  });
2587
2630
 
2588
2631
  // packages/presentation/next/src/turbopackLoader.ts
2632
+ init_esm_shims();
2589
2633
  init_internal();
2590
2634
  import fs4 from "fs";
2591
- import path4 from "path";
2635
+ import path5 from "path";
2592
2636
  var _writtenRules = /* @__PURE__ */ new Set();
2593
2637
  function appendStaticCssToFile(staticCss, safelistPath) {
2594
2638
  if (!staticCss.trim() || !safelistPath) return;
2595
- const stateFilePath = path4.join(path4.dirname(safelistPath), "_tw-state-static.css");
2639
+ const stateFilePath = path5.join(path5.dirname(safelistPath), "_tw-state-static.css");
2596
2640
  const newRules = [];
2597
2641
  for (const chunk of staticCss.split(/(?<=\})\s*/)) {
2598
2642
  const rule = chunk.trim();
@@ -2603,7 +2647,7 @@ function appendStaticCssToFile(staticCss, safelistPath) {
2603
2647
  }
2604
2648
  if (newRules.length === 0) return;
2605
2649
  try {
2606
- fs4.mkdirSync(path4.dirname(stateFilePath), { recursive: true });
2650
+ fs4.mkdirSync(path5.dirname(stateFilePath), { recursive: true });
2607
2651
  if (!fs4.existsSync(stateFilePath)) {
2608
2652
  fs4.writeFileSync(
2609
2653
  stateFilePath,
@@ -2655,7 +2699,7 @@ var CYCLE_SENTINEL = "_cycle.txt";
2655
2699
  var START_SENTINEL = "_start.txt";
2656
2700
  var _workerCache = /* @__PURE__ */ new Map();
2657
2701
  function getTwClassesDir(safelistPath) {
2658
- return path4.join(path4.dirname(safelistPath), "tw-classes");
2702
+ return path5.join(path5.dirname(safelistPath), "tw-classes");
2659
2703
  }
2660
2704
  function readSentinel(filePath) {
2661
2705
  try {
@@ -2674,31 +2718,31 @@ function clearAndMarkCycle(twClassesDir, startId) {
2674
2718
  try {
2675
2719
  fs4.renameSync(twClassesDir, tempDir);
2676
2720
  fs4.mkdirSync(twClassesDir, { recursive: true });
2677
- const startFile = path4.join(tempDir, START_SENTINEL);
2721
+ const startFile = path5.join(tempDir, START_SENTINEL);
2678
2722
  if (fs4.existsSync(startFile)) {
2679
- fs4.copyFileSync(startFile, path4.join(twClassesDir, START_SENTINEL));
2723
+ fs4.copyFileSync(startFile, path5.join(twClassesDir, START_SENTINEL));
2680
2724
  }
2681
- const mergedFile = path4.join(tempDir, "_webpack-merged.css");
2725
+ const mergedFile = path5.join(tempDir, "_webpack-merged.css");
2682
2726
  if (fs4.existsSync(mergedFile)) {
2683
- fs4.copyFileSync(mergedFile, path4.join(twClassesDir, "_webpack-merged.css"));
2727
+ fs4.copyFileSync(mergedFile, path5.join(twClassesDir, "_webpack-merged.css"));
2684
2728
  }
2685
- fs4.writeFileSync(path4.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
2729
+ fs4.writeFileSync(path5.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
2686
2730
  _workerCache.set(twClassesDir, startId);
2687
2731
  fs4.rmSync(tempDir, { recursive: true, force: true });
2688
2732
  } catch {
2689
2733
  for (const file of fs4.readdirSync(twClassesDir)) {
2690
2734
  if (file === START_SENTINEL || file === "_webpack-merged.css") continue;
2691
2735
  try {
2692
- fs4.unlinkSync(path4.join(twClassesDir, file));
2736
+ fs4.unlinkSync(path5.join(twClassesDir, file));
2693
2737
  } catch {
2694
2738
  }
2695
2739
  }
2696
- fs4.writeFileSync(path4.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
2740
+ fs4.writeFileSync(path5.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
2697
2741
  _workerCache.set(twClassesDir, startId);
2698
2742
  }
2699
2743
  } else {
2700
2744
  fs4.mkdirSync(twClassesDir, { recursive: true });
2701
- fs4.writeFileSync(path4.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
2745
+ fs4.writeFileSync(path5.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
2702
2746
  _workerCache.set(twClassesDir, startId);
2703
2747
  }
2704
2748
  } catch {
@@ -2709,14 +2753,14 @@ function clearAndMarkCycle(twClassesDir, startId) {
2709
2753
  function getPerFileSafelistPath(safelistDir, resourcePath) {
2710
2754
  const normalized = resourcePath.replace(/\\/g, "/");
2711
2755
  const slug = normalized.replace(/^.*\/src\//, "").replace(/\.[tj]sx?$/, "").replace(/[^a-zA-Z0-9]/g, "_").slice(0, 80);
2712
- return path4.join(safelistDir, `${slug}.css`);
2756
+ return path5.join(safelistDir, `${slug}.css`);
2713
2757
  }
2714
2758
  function writePerFileSafelist(safelistPath, resourcePath, classes) {
2715
2759
  if (!safelistPath || classes.length === 0) return;
2716
2760
  try {
2717
2761
  const twClassesDir = getTwClassesDir(safelistPath);
2718
- const startId = readSentinel(path4.join(twClassesDir, START_SENTINEL));
2719
- const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(path4.join(twClassesDir, CYCLE_SENTINEL));
2762
+ const startId = readSentinel(path5.join(twClassesDir, START_SENTINEL));
2763
+ const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(path5.join(twClassesDir, CYCLE_SENTINEL));
2720
2764
  if (startId && cachedCycle !== startId) {
2721
2765
  clearAndMarkCycle(twClassesDir, startId);
2722
2766
  } else if (!fs4.existsSync(twClassesDir)) {
@@ -2725,7 +2769,7 @@ function writePerFileSafelist(safelistPath, resourcePath, classes) {
2725
2769
  const outPath = getPerFileSafelistPath(twClassesDir, resourcePath);
2726
2770
  const sorted = [...new Set(classes)].sort();
2727
2771
  const css = [
2728
- `/* tw-safelist: ${path4.basename(resourcePath)} \u2014 auto-generated */`,
2772
+ `/* tw-safelist: ${path5.basename(resourcePath)} \u2014 auto-generated */`,
2729
2773
  "@layer utilities {",
2730
2774
  sorted.map((cls) => `.${cls.replace(/([^a-zA-Z0-9_-])/g, "\\$1")} {}`).join("\n"),
2731
2775
  "}"
@@ -2757,7 +2801,7 @@ function turbopackLoader(source, options = {}) {
2757
2801
  const router = detectRouter(this.resourcePath);
2758
2802
  const nextMajor = parseNum(options.nextMajor);
2759
2803
  const debug = parseBool(options.debug);
2760
- const filename = path4.basename(this.resourcePath);
2804
+ const filename = path5.basename(this.resourcePath);
2761
2805
  const effective = {
2762
2806
  addDataAttr: parseBool(options.addDataAttr),
2763
2807
  // App Router: selalu auto-detect client boundary