tailwind-styled-v4 5.0.40 → 5.1.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 (103) 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/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  102. package/native/tailwind-styled-native.node +0 -0
  103. package/package.json +1 -1
package/dist/next.mjs CHANGED
@@ -26,6 +26,20 @@ 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, getDirname, __dirname, __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
+ getDirname = () => path.dirname(getFilename());
38
+ __dirname = /* @__PURE__ */ getDirname();
39
+ __filename = /* @__PURE__ */ getFilename();
40
+ }
41
+ });
42
+
29
43
  // packages/domain/shared/src/workerResolver.ts
30
44
  function getDirnameFromUrl(importMetaUrl) {
31
45
  if (!importMetaUrl) return "";
@@ -52,11 +66,11 @@ function resolvePath(...segments) {
52
66
  return segments.join("/").replace(/\/+/g, "/");
53
67
  }
54
68
  }
55
- function existsSync(path12) {
69
+ function existsSync(path13) {
56
70
  if (isBrowser) return false;
57
71
  try {
58
72
  const nodeFs = __require(NODE_FS);
59
- return nodeFs.existsSync(path12);
73
+ return nodeFs.existsSync(path13);
60
74
  } catch {
61
75
  return false;
62
76
  }
@@ -110,6 +124,7 @@ var isBrowser, NODE_URL, NODE_FS, NODE_PATH;
110
124
  var init_workerResolver = __esm({
111
125
  "packages/domain/shared/src/workerResolver.ts"() {
112
126
  "use strict";
127
+ init_esm_shims();
113
128
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
114
129
  NODE_URL = typeof window === "undefined" || typeof document === "undefined" ? "node:url" : null;
115
130
  NODE_FS = typeof window === "undefined" || typeof document === "undefined" ? "node:fs" : null;
@@ -120,7 +135,16 @@ var init_workerResolver = __esm({
120
135
  // packages/domain/shared/src/native-resolution.ts
121
136
  import { createRequire } from "module";
122
137
  import * as fs from "fs";
123
- import * as path from "path";
138
+ import * as path2 from "path";
139
+ function _safeCreateRequire() {
140
+ if (typeof import.meta !== "undefined" && import.meta.url && !import.meta.url.includes("unknown")) {
141
+ return createRequire(import.meta.url);
142
+ }
143
+ if (typeof __filename !== "undefined") {
144
+ return createRequire(__filename);
145
+ }
146
+ return createRequire(new URL(`file://${process.cwd()}/`).href);
147
+ }
124
148
  function platformKey() {
125
149
  if (isBrowser2) return "browser";
126
150
  return `${process.platform}-${process.arch}`;
@@ -156,11 +180,11 @@ function resolveNativeBinary(runtimeDir) {
156
180
  const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
157
181
  const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
158
182
  if (runtimeDir) {
159
- for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
160
- const pkgRoot = path.resolve(runtimeDir, depth);
183
+ for (const depth of ["..", path2.join("..", ".."), path2.join("..", "..", "..")]) {
184
+ const pkgRoot = path2.resolve(runtimeDir, depth);
161
185
  for (const bin of BINARY_NAMES_SELF) {
162
186
  for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
163
- const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
187
+ const candidate = path2.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
164
188
  tried.push(`self-bundled:${candidate}`);
165
189
  if (fs.existsSync(candidate)) {
166
190
  return { path: candidate, source: "prebuilt", platform, tried };
@@ -174,22 +198,22 @@ function resolveNativeBinary(runtimeDir) {
174
198
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
175
199
  const localCandidates = [];
176
200
  for (const bin of BINARY_NAMES) {
177
- localCandidates.push(path.resolve(base, `${bin}.node`));
178
- localCandidates.push(path.resolve(base, "..", `${bin}.node`));
179
- localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
180
- localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
201
+ localCandidates.push(path2.resolve(base, `${bin}.node`));
202
+ localCandidates.push(path2.resolve(base, "..", `${bin}.node`));
203
+ localCandidates.push(path2.resolve(base, `${bin}.${platform}.node`));
204
+ localCandidates.push(path2.resolve(base, `${bin}.${napiPlatform}.node`));
181
205
  }
182
206
  for (const startDir of [cwd, base]) {
183
207
  let dir = startDir;
184
208
  for (let i = 0; i < 6; i++) {
185
- const nativeDir = path.resolve(dir, "native");
209
+ const nativeDir = path2.resolve(dir, "native");
186
210
  for (const bin of BINARY_NAMES) {
187
- localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
188
- localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
189
- localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
190
- localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
211
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.node`));
212
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.${platform}.node`));
213
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
214
+ localCandidates.push(path2.resolve(nativeDir, "target", "release", `${bin}.node`));
191
215
  }
192
- const parent = path.resolve(dir, "..");
216
+ const parent = path2.resolve(dir, "..");
193
217
  if (parent === dir) break;
194
218
  dir = parent;
195
219
  }
@@ -206,10 +230,9 @@ var isBrowser2, _require, PLATFORM_MAP;
206
230
  var init_native_resolution = __esm({
207
231
  "packages/domain/shared/src/native-resolution.ts"() {
208
232
  "use strict";
233
+ init_esm_shims();
209
234
  isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
210
- _require = createRequire(
211
- typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
212
- );
235
+ _require = _safeCreateRequire();
213
236
  PLATFORM_MAP = {
214
237
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
215
238
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -226,8 +249,9 @@ var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttemp
226
249
  var init_nativeBridge = __esm({
227
250
  "packages/domain/compiler/src/nativeBridge.ts"() {
228
251
  "use strict";
252
+ init_esm_shims();
229
253
  init_src2();
230
- _loadNative = (path12) => __require(path12);
254
+ _loadNative = (path13) => __require(path13);
231
255
  log = (...args) => {
232
256
  if (process.env.DEBUG?.includes("compiler:native")) {
233
257
  console.log("[compiler:native]", ...args);
@@ -384,6 +408,7 @@ function resetCacheStats() {
384
408
  var init_cssGeneratorNative = __esm({
385
409
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
386
410
  "use strict";
411
+ init_esm_shims();
387
412
  init_nativeBridge();
388
413
  }
389
414
  });
@@ -457,6 +482,7 @@ function atomicRegistrySize() {
457
482
  var init_compilationNative = __esm({
458
483
  "packages/domain/compiler/src/compiler/compilationNative.ts"() {
459
484
  "use strict";
485
+ init_esm_shims();
460
486
  init_nativeBridge();
461
487
  }
462
488
  });
@@ -601,6 +627,7 @@ function twMergeRaw(classLists) {
601
627
  var init_cssCompilationNative = __esm({
602
628
  "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
603
629
  "use strict";
630
+ init_esm_shims();
604
631
  init_nativeBridge();
605
632
  }
606
633
  });
@@ -701,6 +728,7 @@ function idRegistryImport(importedData) {
701
728
  var init_idRegistryNative = __esm({
702
729
  "packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
703
730
  "use strict";
731
+ init_esm_shims();
704
732
  init_nativeBridge();
705
733
  }
706
734
  });
@@ -843,6 +871,7 @@ function scanFilesBatchNative(filesJson) {
843
871
  var init_streamingNative = __esm({
844
872
  "packages/domain/compiler/src/compiler/streamingNative.ts"() {
845
873
  "use strict";
874
+ init_esm_shims();
846
875
  init_nativeBridge();
847
876
  }
848
877
  });
@@ -895,6 +924,7 @@ var require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
895
924
  var init_tailwindEngine = __esm({
896
925
  "packages/domain/compiler/src/tailwindEngine.ts"() {
897
926
  "use strict";
927
+ init_esm_shims();
898
928
  require2 = createRequire2(
899
929
  typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
900
930
  );
@@ -1084,6 +1114,7 @@ var require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEM
1084
1114
  var init_tailwindEngine2 = __esm({
1085
1115
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1086
1116
  "use strict";
1117
+ init_esm_shims();
1087
1118
  init_nativeBridge();
1088
1119
  init_cssGeneratorNative();
1089
1120
  init_cssCompilationNative();
@@ -1103,6 +1134,7 @@ var init_tailwindEngine2 = __esm({
1103
1134
  var init_compiler = __esm({
1104
1135
  "packages/domain/compiler/src/compiler/index.ts"() {
1105
1136
  "use strict";
1137
+ init_esm_shims();
1106
1138
  init_cssGeneratorNative();
1107
1139
  init_compilationNative();
1108
1140
  init_cssCompilationNative();
@@ -1117,6 +1149,7 @@ var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astEx
1117
1149
  var init_parser = __esm({
1118
1150
  "packages/domain/compiler/src/parser/index.ts"() {
1119
1151
  "use strict";
1152
+ init_esm_shims();
1120
1153
  init_nativeBridge();
1121
1154
  parseClasses = (raw) => {
1122
1155
  const native = getNativeBridge();
@@ -1296,6 +1329,7 @@ function resetMemoryStats() {
1296
1329
  var init_analyzerNative = __esm({
1297
1330
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
1298
1331
  "use strict";
1332
+ init_esm_shims();
1299
1333
  init_nativeBridge();
1300
1334
  }
1301
1335
  });
@@ -1390,6 +1424,7 @@ function resolveSimpleVariants(configJson) {
1390
1424
  var init_themeResolutionNative = __esm({
1391
1425
  "packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
1392
1426
  "use strict";
1427
+ init_esm_shims();
1393
1428
  init_nativeBridge();
1394
1429
  }
1395
1430
  });
@@ -1438,6 +1473,7 @@ function generateSubComponentTypes(root, outputPath) {
1438
1473
  var init_scannerNative = __esm({
1439
1474
  "packages/domain/compiler/src/analyzer/scannerNative.ts"() {
1440
1475
  "use strict";
1476
+ init_esm_shims();
1441
1477
  init_nativeBridge();
1442
1478
  }
1443
1479
  });
@@ -1446,6 +1482,7 @@ var init_scannerNative = __esm({
1446
1482
  var init_analyzer = __esm({
1447
1483
  "packages/domain/compiler/src/analyzer/index.ts"() {
1448
1484
  "use strict";
1485
+ init_esm_shims();
1449
1486
  init_analyzerNative();
1450
1487
  init_themeResolutionNative();
1451
1488
  init_scannerNative();
@@ -1635,6 +1672,7 @@ function resetResolverPoolStats() {
1635
1672
  var init_cacheNative = __esm({
1636
1673
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
1637
1674
  "use strict";
1675
+ init_esm_shims();
1638
1676
  init_nativeBridge();
1639
1677
  }
1640
1678
  });
@@ -1643,6 +1681,7 @@ var init_cacheNative = __esm({
1643
1681
  var init_cache = __esm({
1644
1682
  "packages/domain/compiler/src/cache/index.ts"() {
1645
1683
  "use strict";
1684
+ init_esm_shims();
1646
1685
  init_cacheNative();
1647
1686
  }
1648
1687
  });
@@ -1892,6 +1931,7 @@ function redisDiagnose() {
1892
1931
  var init_redisNative = __esm({
1893
1932
  "packages/domain/compiler/src/redis/redisNative.ts"() {
1894
1933
  "use strict";
1934
+ init_esm_shims();
1895
1935
  init_nativeBridge();
1896
1936
  }
1897
1937
  });
@@ -1900,6 +1940,7 @@ var init_redisNative = __esm({
1900
1940
  var init_redis = __esm({
1901
1941
  "packages/domain/compiler/src/redis/index.ts"() {
1902
1942
  "use strict";
1943
+ init_esm_shims();
1903
1944
  init_redisNative();
1904
1945
  }
1905
1946
  });
@@ -2039,6 +2080,7 @@ function getCompilerDiagnostics() {
2039
2080
  var init_watchSystemNative = __esm({
2040
2081
  "packages/domain/compiler/src/watch/watchSystemNative.ts"() {
2041
2082
  "use strict";
2083
+ init_esm_shims();
2042
2084
  init_nativeBridge();
2043
2085
  }
2044
2086
  });
@@ -2047,6 +2089,7 @@ var init_watchSystemNative = __esm({
2047
2089
  var init_watch = __esm({
2048
2090
  "packages/domain/compiler/src/watch/index.ts"() {
2049
2091
  "use strict";
2092
+ init_esm_shims();
2050
2093
  init_watchSystemNative();
2051
2094
  }
2052
2095
  });
@@ -2275,7 +2318,7 @@ __export(src_exports, {
2275
2318
  watchResume: () => watchResume
2276
2319
  });
2277
2320
  import fs2 from "fs";
2278
- import path2 from "path";
2321
+ import path3 from "path";
2279
2322
  import { createRequire as createRequire4 } from "module";
2280
2323
  function _layoutClassesToCss(classes) {
2281
2324
  const native = getNativeBridge();
@@ -2315,6 +2358,7 @@ var _require2, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess,
2315
2358
  var init_src = __esm({
2316
2359
  "packages/domain/compiler/src/index.ts"() {
2317
2360
  "use strict";
2361
+ init_esm_shims();
2318
2362
  init_nativeBridge();
2319
2363
  init_compiler();
2320
2364
  init_parser();
@@ -2416,7 +2460,7 @@ var init_src = __esm({
2416
2460
  };
2417
2461
  scanProjectUsage = (dirs, cwd) => {
2418
2462
  const { batchExtractClasses: batchExtractClasses2 } = _require2("./parser");
2419
- const files = dirs.map((dir) => path2.resolve(cwd, dir));
2463
+ const files = dirs.map((dir) => path3.resolve(cwd, dir));
2420
2464
  const results = batchExtractClasses2(files) || [];
2421
2465
  const combined = {};
2422
2466
  for (const result of results) {
@@ -2453,7 +2497,7 @@ var init_src = __esm({
2453
2497
  "tailwind.config.cjs"
2454
2498
  ];
2455
2499
  for (const file of configFiles) {
2456
- const fullPath = path2.join(cwd, file);
2500
+ const fullPath = path3.join(cwd, file);
2457
2501
  if (fs2.existsSync(fullPath)) {
2458
2502
  const mod = __require(fullPath);
2459
2503
  return mod.default || mod;
@@ -2464,9 +2508,9 @@ var init_src = __esm({
2464
2508
  getContentPaths = (cwd = process.cwd()) => {
2465
2509
  return {
2466
2510
  content: [
2467
- path2.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
2468
- path2.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
2469
- path2.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
2511
+ path3.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
2512
+ path3.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
2513
+ path3.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
2470
2514
  ]
2471
2515
  };
2472
2516
  };
@@ -2886,6 +2930,7 @@ __export(internal_exports, {
2886
2930
  var init_internal = __esm({
2887
2931
  "packages/domain/compiler/src/internal.ts"() {
2888
2932
  "use strict";
2933
+ init_esm_shims();
2889
2934
  init_src();
2890
2935
  init_tailwindEngine2();
2891
2936
  init_compiler();
@@ -2899,7 +2944,7 @@ var init_internal = __esm({
2899
2944
 
2900
2945
  // packages/domain/shared/src/staticStateExtractor.ts
2901
2946
  import fs3 from "fs";
2902
- import path3 from "path";
2947
+ import path4 from "path";
2903
2948
  function getNative() {
2904
2949
  if (_native) return _native;
2905
2950
  try {
@@ -2934,12 +2979,12 @@ function* walkSourceFiles(dir) {
2934
2979
  return;
2935
2980
  }
2936
2981
  for (const entry of entries) {
2937
- const fullPath = path3.join(dir, entry.name);
2982
+ const fullPath = path4.join(dir, entry.name);
2938
2983
  if (entry.isDirectory()) {
2939
2984
  if (IGNORE_PATTERNS.some((p) => entry.name === p || entry.name.startsWith(p))) continue;
2940
2985
  yield* walkSourceFiles(fullPath);
2941
2986
  } else if (entry.isFile()) {
2942
- const ext = path3.extname(entry.name);
2987
+ const ext = path4.extname(entry.name);
2943
2988
  if (SOURCE_EXTENSIONS.has(ext)) yield fullPath;
2944
2989
  }
2945
2990
  }
@@ -3003,7 +3048,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3003
3048
  allConfigs.push(...configs);
3004
3049
  if (verbose) {
3005
3050
  process.stderr.write(
3006
- `[tw:static-state] ${path3.relative(srcDir, filePath)}: ${configs.length} komponen
3051
+ `[tw:static-state] ${path4.relative(srcDir, filePath)}: ${configs.length} komponen
3007
3052
  `
3008
3053
  );
3009
3054
  }
@@ -3027,7 +3072,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3027
3072
  allConfigs.push(...configs);
3028
3073
  if (verbose) {
3029
3074
  process.stderr.write(
3030
- `[tw:static-state] ${path3.relative(srcDir, filePath)}: ${configs.length} komponen
3075
+ `[tw:static-state] ${path4.relative(srcDir, filePath)}: ${configs.length} komponen
3031
3076
  `
3032
3077
  );
3033
3078
  }
@@ -3121,9 +3166,9 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3121
3166
  resolvedCss: options.resolvedCss || ""
3122
3167
  // ← ensure always passed
3123
3168
  });
3124
- const twClassesDir = path3.join(path3.dirname(safelistPath), "tw-classes");
3169
+ const twClassesDir = path4.join(path4.dirname(safelistPath), "tw-classes");
3125
3170
  fs3.mkdirSync(twClassesDir, { recursive: true });
3126
- const stateFilePath = path3.join(twClassesDir, TW_STATE_STATIC_FILENAME);
3171
+ const stateFilePath = path4.join(twClassesDir, TW_STATE_STATIC_FILENAME);
3127
3172
  if (result.rulesGenerated === 0) {
3128
3173
  try {
3129
3174
  fs3.writeFileSync(
@@ -3152,6 +3197,7 @@ var SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native, TW_STATE_STATIC_FILENAME;
3152
3197
  var init_staticStateExtractor = __esm({
3153
3198
  "packages/domain/shared/src/staticStateExtractor.ts"() {
3154
3199
  "use strict";
3200
+ init_esm_shims();
3155
3201
  SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs"]);
3156
3202
  IGNORE_PATTERNS = ["node_modules", ".next", "dist", "build", ".git", "coverage", "__tests__"];
3157
3203
  _native = null;
@@ -3161,7 +3207,7 @@ var init_staticStateExtractor = __esm({
3161
3207
 
3162
3208
  // packages/domain/shared/src/logger.ts
3163
3209
  import fs4 from "fs";
3164
- import path4 from "path";
3210
+ import path5 from "path";
3165
3211
  function getEnvLevel() {
3166
3212
  const env = process.env.TWS_LOG_LEVEL?.toLowerCase();
3167
3213
  if (env && env in LEVELS) return env;
@@ -3171,7 +3217,7 @@ function setGlobalLogFile(filePath) {
3171
3217
  _globalLogFile = filePath;
3172
3218
  _logFileInitialized = false;
3173
3219
  try {
3174
- fs4.mkdirSync(path4.dirname(filePath), { recursive: true });
3220
+ fs4.mkdirSync(path5.dirname(filePath), { recursive: true });
3175
3221
  fs4.writeFileSync(
3176
3222
  filePath,
3177
3223
  `# tailwind-styled build log \u2014 ${(/* @__PURE__ */ new Date()).toISOString()}
@@ -3216,6 +3262,7 @@ var LEVELS, _globalLogFile, _logFileInitialized, logger;
3216
3262
  var init_logger = __esm({
3217
3263
  "packages/domain/shared/src/logger.ts"() {
3218
3264
  "use strict";
3265
+ init_esm_shims();
3219
3266
  LEVELS = { silent: 0, error: 1, warn: 2, info: 3, debug: 4 };
3220
3267
  _globalLogFile = null;
3221
3268
  _logFileInitialized = false;
@@ -3226,8 +3273,8 @@ var init_logger = __esm({
3226
3273
  // packages/domain/shared/src/index.ts
3227
3274
  import { createHash } from "crypto";
3228
3275
  import fs5 from "fs";
3229
- import path5 from "path";
3230
- import { fileURLToPath } from "url";
3276
+ import path6 from "path";
3277
+ import { fileURLToPath as fileURLToPath2 } from "url";
3231
3278
  import { createRequire as createRequire5 } from "module";
3232
3279
  function createLogger2(namespace) {
3233
3280
  const prefix = `[${namespace}]`;
@@ -3258,9 +3305,9 @@ function createDebugLogger(namespace, label) {
3258
3305
  }
3259
3306
  };
3260
3307
  }
3261
- function formatIssuePath(path12) {
3262
- if (!path12 || path12.length === 0) return "(root)";
3263
- return path12.map(
3308
+ function formatIssuePath(path13) {
3309
+ if (!path13 || path13.length === 0) return "(root)";
3310
+ return path13.map(
3264
3311
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
3265
3312
  ).join(".");
3266
3313
  }
@@ -3268,7 +3315,7 @@ function loadNativeBinding(options) {
3268
3315
  const { runtimeDir, candidates, isValid } = options;
3269
3316
  const loadErrors = [];
3270
3317
  for (const candidate of candidates) {
3271
- const candidatePath = path5.resolve(runtimeDir, candidate);
3318
+ const candidatePath = path6.resolve(runtimeDir, candidate);
3272
3319
  try {
3273
3320
  if (!fs5.existsSync(candidatePath) && !fs5.existsSync(candidatePath + ".node")) {
3274
3321
  continue;
@@ -3313,22 +3360,22 @@ function resolveNativeBindingCandidates(options) {
3313
3360
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
3314
3361
  const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
3315
3362
  for (const bin of BINARY_NAMES) {
3316
- candidates.push(path5.resolve(runtimeDir, `${bin}.node`));
3317
- candidates.push(path5.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3318
- candidates.push(path5.resolve(runtimeDir, "..", "native", `${bin}.node`));
3319
- candidates.push(path5.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3320
- candidates.push(path5.resolve(process.cwd(), "native", `${bin}.node`));
3321
- candidates.push(path5.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3322
- candidates.push(path5.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3323
- candidates.push(path5.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3324
- candidates.push(path5.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3363
+ candidates.push(path6.resolve(runtimeDir, `${bin}.node`));
3364
+ candidates.push(path6.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3365
+ candidates.push(path6.resolve(runtimeDir, "..", "native", `${bin}.node`));
3366
+ candidates.push(path6.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3367
+ candidates.push(path6.resolve(process.cwd(), "native", `${bin}.node`));
3368
+ candidates.push(path6.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3369
+ candidates.push(path6.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3370
+ candidates.push(path6.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3371
+ candidates.push(path6.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3325
3372
  }
3326
3373
  return Array.from(new Set(candidates));
3327
3374
  }
3328
3375
  function resolveRuntimeDir(dir, importMetaUrl) {
3329
- if (dir) return path5.resolve(dir);
3376
+ if (dir) return path6.resolve(dir);
3330
3377
  try {
3331
- return path5.dirname(fileURLToPath(importMetaUrl));
3378
+ return path6.dirname(fileURLToPath2(importMetaUrl));
3332
3379
  } catch {
3333
3380
  return process.cwd();
3334
3381
  }
@@ -3337,6 +3384,7 @@ var TwError, _require3;
3337
3384
  var init_src2 = __esm({
3338
3385
  "packages/domain/shared/src/index.ts"() {
3339
3386
  "use strict";
3387
+ init_esm_shims();
3340
3388
  init_workerResolver();
3341
3389
  init_native_resolution();
3342
3390
  init_staticStateExtractor();
@@ -3374,8 +3422,8 @@ var init_src2 = __esm({
3374
3422
  /** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
3375
3423
  static fromZod(err) {
3376
3424
  const first = err.issues?.[0] ?? err.errors?.[0];
3377
- const path12 = formatIssuePath(first?.path);
3378
- const message = first ? `${path12}: ${first.message}` : "Schema validation failed";
3425
+ const path13 = formatIssuePath(first?.path);
3426
+ const message = first ? `${path13}: ${first.message}` : "Schema validation failed";
3379
3427
  return new _TwError("validation", "SCHEMA_VALIDATION_FAILED", message, err);
3380
3428
  }
3381
3429
  static wrap(source, code, err) {
@@ -3428,14 +3476,14 @@ __export(native_bridge_exports, {
3428
3476
  startWatchNative: () => startWatchNative,
3429
3477
  stopWatchNative: () => stopWatchNative
3430
3478
  });
3431
- import path6 from "path";
3432
- import { fileURLToPath as fileURLToPath2 } from "url";
3433
- function getDirname() {
3479
+ import path7 from "path";
3480
+ import { fileURLToPath as fileURLToPath3 } from "url";
3481
+ function getDirname2() {
3434
3482
  if (typeof __dirname !== "undefined") {
3435
3483
  return __dirname;
3436
3484
  }
3437
3485
  if (typeof import.meta !== "undefined" && import.meta.url) {
3438
- return path6.dirname(fileURLToPath2(import.meta.url));
3486
+ return path7.dirname(fileURLToPath3(import.meta.url));
3439
3487
  }
3440
3488
  return process.cwd();
3441
3489
  }
@@ -3644,6 +3692,7 @@ var log2, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader,
3644
3692
  var init_native_bridge = __esm({
3645
3693
  "packages/domain/scanner/src/native-bridge.ts"() {
3646
3694
  "use strict";
3695
+ init_esm_shims();
3647
3696
  init_src2();
3648
3697
  log2 = createDebugLogger("scanner:native");
3649
3698
  isValidScannerBinding = (module) => {
@@ -3686,7 +3735,7 @@ var init_native_bridge = __esm({
3686
3735
  }
3687
3736
  return throwNativeBindingError();
3688
3737
  }
3689
- const runtimeDir = getDirname();
3738
+ const runtimeDir = getDirname2();
3690
3739
  const candidates = resolveNativeBindingCandidates({
3691
3740
  runtimeDir,
3692
3741
  includeDefaultCandidates: true
@@ -3725,7 +3774,14 @@ var init_native_bridge = __esm({
3725
3774
  }
3726
3775
  });
3727
3776
 
3777
+ // src/umbrella/next.ts
3778
+ init_esm_shims();
3779
+
3780
+ // packages/presentation/next/src/index.ts
3781
+ init_esm_shims();
3782
+
3728
3783
  // packages/presentation/next/src/schemas.ts
3784
+ init_esm_shims();
3729
3785
  import { z } from "zod";
3730
3786
  var formatIssues = (error) => error.issues.map((issue) => {
3731
3787
  const p = issue.path.length > 0 ? issue.path.join(".") : "<root>";
@@ -3750,31 +3806,34 @@ var NextAdapterOptionsSchema = z.object({
3750
3806
  var parseNextAdapterOptions = (options) => parseWithSchema(NextAdapterOptionsSchema, options ?? {}, "next adapter options are invalid");
3751
3807
 
3752
3808
  // packages/presentation/next/src/withTailwindStyled.ts
3809
+ init_esm_shims();
3753
3810
  init_src2();
3754
3811
  import fs10 from "fs";
3755
3812
  import { createRequire as createRequire7 } from "module";
3756
- import path11 from "path";
3813
+ import path12 from "path";
3757
3814
 
3758
3815
  // packages/domain/scanner/src/index.ts
3816
+ init_esm_shims();
3759
3817
  init_src2();
3760
3818
  import fs7 from "fs";
3761
3819
  import { createRequire as createRequire6 } from "module";
3762
- import path8 from "path";
3763
- import { fileURLToPath as fileURLToPath3 } from "url";
3820
+ import path9 from "path";
3821
+ import { fileURLToPath as fileURLToPath4 } from "url";
3764
3822
  import { Worker } from "worker_threads";
3765
3823
 
3766
3824
  // packages/domain/scanner/src/cache-native.ts
3825
+ init_esm_shims();
3767
3826
  init_native_bridge();
3768
3827
  import fs6 from "fs";
3769
- import path7 from "path";
3828
+ import path8 from "path";
3770
3829
  function defaultCachePath(rootDir, cacheDir) {
3771
- const dir = cacheDir ? path7.resolve(rootDir, cacheDir) : path7.join(process.cwd(), ".cache", "tailwind-styled");
3772
- return path7.join(dir, "scanner-cache.json");
3830
+ const dir = cacheDir ? path8.resolve(rootDir, cacheDir) : path8.join(process.cwd(), ".cache", "tailwind-styled");
3831
+ return path8.join(dir, "scanner-cache.json");
3773
3832
  }
3774
3833
  var STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
3775
3834
  function readCache(rootDir, cacheDir) {
3776
3835
  const cachePath = defaultCachePath(rootDir, cacheDir);
3777
- fs6.mkdirSync(path7.dirname(cachePath), { recursive: true });
3836
+ fs6.mkdirSync(path8.dirname(cachePath), { recursive: true });
3778
3837
  const result = cacheReadNative(cachePath);
3779
3838
  if (!result) return [];
3780
3839
  return result.entries.map((e) => ({
@@ -3789,7 +3848,7 @@ function readCache(rootDir, cacheDir) {
3789
3848
  }
3790
3849
  function writeCache(rootDir, entries, cacheDir) {
3791
3850
  const cachePath = defaultCachePath(rootDir, cacheDir);
3792
- fs6.mkdirSync(path7.dirname(cachePath), { recursive: true });
3851
+ fs6.mkdirSync(path8.dirname(cachePath), { recursive: true });
3793
3852
  const success = cacheWriteNative(cachePath, entries);
3794
3853
  if (!success) {
3795
3854
  throw new Error(
@@ -3813,14 +3872,15 @@ function filePriority(mtimeMs, size, cached, nowMs = Date.now()) {
3813
3872
  init_native_bridge();
3814
3873
 
3815
3874
  // packages/domain/scanner/src/schemas.ts
3875
+ init_esm_shims();
3816
3876
  init_src2();
3817
3877
  import { z as z2 } from "zod";
3818
- var formatIssuePath2 = (path12) => path12.length > 0 ? path12.map(
3878
+ var formatIssuePath2 = (path13) => path13.length > 0 ? path13.map(
3819
3879
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
3820
3880
  ).join(".") : "<root>";
3821
3881
  var formatIssues2 = (error) => error.issues.map((issue) => {
3822
- const path12 = formatIssuePath2(issue.path);
3823
- return `${path12}: ${issue.message}`;
3882
+ const path13 = formatIssuePath2(issue.path);
3883
+ return `${path13}: ${issue.message}`;
3824
3884
  }).join("; ");
3825
3885
  var parseWithSchema2 = (schema, data, label) => {
3826
3886
  const parsed = schema.safeParse(data);
@@ -3880,7 +3940,7 @@ function getRuntimeDir() {
3880
3940
  return __dirname;
3881
3941
  }
3882
3942
  if (typeof import.meta !== "undefined" && import.meta.url) {
3883
- return path8.dirname(fileURLToPath3(import.meta.url));
3943
+ return path9.dirname(fileURLToPath4(import.meta.url));
3884
3944
  }
3885
3945
  return process.cwd();
3886
3946
  }
@@ -3895,7 +3955,7 @@ var createNativeParserLoader = () => {
3895
3955
  const loadNativeParserBinding = () => {
3896
3956
  if (_state.binding !== void 0) return _state.binding;
3897
3957
  const runtimeDir = getRuntimeDir();
3898
- const req = createRequire6(path8.join(runtimeDir, "noop.cjs"));
3958
+ const req = createRequire6(path9.join(runtimeDir, "noop.cjs"));
3899
3959
  const _platform = process.platform;
3900
3960
  const _arch = process.arch;
3901
3961
  const _platformArch = `${_platform}-${_arch}`;
@@ -3903,27 +3963,27 @@ var createNativeParserLoader = () => {
3903
3963
  const candidates = [
3904
3964
  // ── binaryName baru: tailwind-styled-native (napi-rs naming) ──
3905
3965
  // cwd = repo root saat run dari root, atau package dir saat workspaces
3906
- path8.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
3907
- path8.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArch}.node`),
3908
- path8.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3966
+ path9.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
3967
+ path9.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArch}.node`),
3968
+ path9.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3909
3969
  // runtimeDir = dist/ → naik 1 level ke package root (npm install case)
3910
3970
  // e.g. node_modules/tailwind-styled-v4/dist/ → node_modules/tailwind-styled-v4/native/
3911
- path8.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
3912
- path8.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArch}.node`),
3913
- path8.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3971
+ path9.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
3972
+ path9.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArch}.node`),
3973
+ path9.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3914
3974
  // runtimeDir = dist/ → naik 4 level ke repo root (monorepo dev case)
3915
- path8.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
3916
- path8.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3975
+ path9.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
3976
+ path9.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3917
3977
  // 3 level fallback (jika package di-nest lebih dangkal)
3918
- path8.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
3919
- path8.resolve(runtimeDir, "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3978
+ path9.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
3979
+ path9.resolve(runtimeDir, "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
3920
3980
  // ── binaryName lama: tailwind_styled_parser (backward compat) ──
3921
- path8.resolve(process.cwd(), "native/tailwind_styled_parser.node"),
3922
- path8.resolve(process.cwd(), "native/build/Release/tailwind_styled_parser.node"),
3923
- path8.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
3924
- path8.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
3925
- path8.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node"),
3926
- path8.resolve(
3981
+ path9.resolve(process.cwd(), "native/tailwind_styled_parser.node"),
3982
+ path9.resolve(process.cwd(), "native/build/Release/tailwind_styled_parser.node"),
3983
+ path9.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
3984
+ path9.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
3985
+ path9.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node"),
3986
+ path9.resolve(
3927
3987
  runtimeDir,
3928
3988
  "..",
3929
3989
  "..",
@@ -3982,13 +4042,13 @@ function collectCandidates(rootDir, ignoreDirectories, extensionSet) {
3982
4042
  }
3983
4043
  })();
3984
4044
  for (const entry of entries) {
3985
- const fullPath = path8.join(currentDir, entry.name);
4045
+ const fullPath = path9.join(currentDir, entry.name);
3986
4046
  if (entry.isDirectory()) {
3987
4047
  if (!ignoreDirectories.has(entry.name)) directories.push(fullPath);
3988
4048
  continue;
3989
4049
  }
3990
4050
  if (!entry.isFile()) continue;
3991
- if (!extensionSet.has(path8.extname(entry.name))) continue;
4051
+ if (!extensionSet.has(path9.extname(entry.name))) continue;
3992
4052
  candidates.push(fullPath);
3993
4053
  }
3994
4054
  }
@@ -4163,9 +4223,10 @@ function scanWorkspace2(rootDir, options = {}) {
4163
4223
  init_src2();
4164
4224
 
4165
4225
  // packages/presentation/next/src/incrementalOrchestrator.ts
4226
+ init_esm_shims();
4166
4227
  init_src();
4167
4228
  import fs8 from "fs";
4168
- import path9 from "path";
4229
+ import path10 from "path";
4169
4230
  var _fingerprintCache = /* @__PURE__ */ new Map();
4170
4231
  function getNative2() {
4171
4232
  try {
@@ -4219,7 +4280,7 @@ function hasSourceChanged(sourceFiles) {
4219
4280
  }
4220
4281
  function isIncrementalEnabled(cwd) {
4221
4282
  try {
4222
- const configPath = path9.join(cwd, "tailwind-styled.config.json");
4283
+ const configPath = path10.join(cwd, "tailwind-styled.config.json");
4223
4284
  if (!fs8.existsSync(configPath)) return false;
4224
4285
  const config = JSON.parse(fs8.readFileSync(configPath, "utf-8"));
4225
4286
  return config.compiler?.incremental === true;
@@ -4229,8 +4290,9 @@ function isIncrementalEnabled(cwd) {
4229
4290
  }
4230
4291
 
4231
4292
  // packages/presentation/next/src/staticCssWebpackPlugin.ts
4293
+ init_esm_shims();
4232
4294
  import fs9 from "fs";
4233
- import path10 from "path";
4295
+ import path11 from "path";
4234
4296
  var _fileStaticCssMap = /* @__PURE__ */ new Map();
4235
4297
  function setFileStaticCss(filepath, css) {
4236
4298
  if (css && css.trim()) {
@@ -4264,13 +4326,13 @@ var StaticCssWebpackPlugin = class _StaticCssWebpackPlugin {
4264
4326
  static PLUGIN_NAME = "TailwindStyledStaticCss";
4265
4327
  outPath;
4266
4328
  constructor(safelistPath) {
4267
- this.outPath = path10.join(path10.dirname(safelistPath), "_tw-state-static.css");
4329
+ this.outPath = path11.join(path11.dirname(safelistPath), "_tw-state-static.css");
4268
4330
  }
4269
4331
  apply(compiler) {
4270
4332
  compiler.hooks.done.tap(_StaticCssWebpackPlugin.PLUGIN_NAME, () => {
4271
4333
  try {
4272
4334
  const content = buildContent(_fileStaticCssMap);
4273
- fs9.mkdirSync(path10.dirname(this.outPath), { recursive: true });
4335
+ fs9.mkdirSync(path11.dirname(this.outPath), { recursive: true });
4274
4336
  fs9.writeFileSync(
4275
4337
  this.outPath,
4276
4338
  HEADER + (content || "/* no static rules yet */") + "\n",
@@ -4308,9 +4370,9 @@ var resolveLoaderPath2 = (basename) => {
4308
4370
  } catch {
4309
4371
  const runtimeDir = resolveRuntimeDir2();
4310
4372
  const candidates = [
4311
- path11.resolve(runtimeDir, `${basename}.mjs`),
4312
- path11.resolve(runtimeDir, `${basename}.js`),
4313
- path11.resolve(runtimeDir, `${basename}.cjs`)
4373
+ path12.resolve(runtimeDir, `${basename}.mjs`),
4374
+ path12.resolve(runtimeDir, `${basename}.js`),
4375
+ path12.resolve(runtimeDir, `${basename}.cjs`)
4314
4376
  ];
4315
4377
  for (const candidate of candidates) {
4316
4378
  if (fs10.existsSync(candidate)) {
@@ -4351,7 +4413,7 @@ var createLoaderOptions = (options) => {
4351
4413
  preserveImports: true
4352
4414
  };
4353
4415
  if (options.verbose !== void 0) opts.verbose = options.verbose;
4354
- opts.safelistPath = options.safelistPath ?? path11.join(process.cwd(), ".next", "tailwind-styled-safelist.css");
4416
+ opts.safelistPath = options.safelistPath ?? path12.join(process.cwd(), ".next", "tailwind-styled-safelist.css");
4355
4417
  return Object.freeze(opts);
4356
4418
  };
4357
4419
  var buildTurbopackRules = (loaderPath, loaderOptions) => {
@@ -4364,7 +4426,7 @@ var buildTurbopackRules = (loaderPath, loaderOptions) => {
4364
4426
  ])
4365
4427
  );
4366
4428
  };
4367
- var normalizeLoaderPath = (loaderPath) => path11.resolve(loaderPath);
4429
+ var normalizeLoaderPath = (loaderPath) => path12.resolve(loaderPath);
4368
4430
  var applyWebpackRule = (config, options, loaderPath) => {
4369
4431
  const loaderOptions = createLoaderOptions(options);
4370
4432
  const rules = config.module?.rules ?? [];
@@ -4381,7 +4443,7 @@ var applyWebpackRule = (config, options, loaderPath) => {
4381
4443
  enforce: "pre",
4382
4444
  use: [{ loader: loaderPath, options: loaderOptions }]
4383
4445
  };
4384
- const safelistPath = loaderOptions.safelistPath ?? path11.join(process.cwd(), ".next", "tailwind-styled-safelist.css");
4446
+ const safelistPath = loaderOptions.safelistPath ?? path12.join(process.cwd(), ".next", "tailwind-styled-safelist.css");
4385
4447
  const pluginAlreadyRegistered = (config.plugins ?? []).some(
4386
4448
  (p) => p?.constructor?.name === StaticCssWebpackPlugin.PLUGIN_NAME
4387
4449
  );
@@ -4481,15 +4543,15 @@ function withTailwindStyled(options = {}) {
4481
4543
  return fullCss.slice(startIdx, endIdx + 1);
4482
4544
  };
4483
4545
  var extractUtilitiesLayer = extractUtilitiesLayer2;
4484
- const twClassesDir = path11.join(path11.dirname(safelistPath), "tw-classes");
4546
+ const twClassesDir = path12.join(path12.dirname(safelistPath), "tw-classes");
4485
4547
  fs10.mkdirSync(twClassesDir, { recursive: true });
4486
- setGlobalLogFile(path11.join(twClassesDir, "_tw-build.log"));
4548
+ setGlobalLogFile(path12.join(twClassesDir, "_tw-build.log"));
4487
4549
  fs10.writeFileSync(
4488
- path11.join(twClassesDir, "_start.txt"),
4550
+ path12.join(twClassesDir, "_start.txt"),
4489
4551
  String(Date.now()),
4490
4552
  "utf-8"
4491
4553
  );
4492
- const stateStaticPath = path11.join(twClassesDir, TW_STATE_STATIC_FILENAME);
4554
+ const stateStaticPath = path12.join(twClassesDir, TW_STATE_STATIC_FILENAME);
4493
4555
  try {
4494
4556
  fs10.writeFileSync(
4495
4557
  stateStaticPath,
@@ -4507,14 +4569,14 @@ function withTailwindStyled(options = {}) {
4507
4569
  "src/index.css",
4508
4570
  "styles/globals.css"
4509
4571
  ];
4510
- const safelistDir = path11.dirname(safelistPath);
4572
+ const safelistDir = path12.dirname(safelistPath);
4511
4573
  for (const candidate of CSS_CANDIDATES) {
4512
- const candidatePath = path11.join(process.cwd(), candidate);
4574
+ const candidatePath = path12.join(process.cwd(), candidate);
4513
4575
  if (!fs10.existsSync(candidatePath)) continue;
4514
4576
  const content = fs10.readFileSync(candidatePath, "utf-8");
4515
4577
  if (content.includes("_tw-state-static.css")) break;
4516
- const globalsDir = path11.dirname(candidatePath);
4517
- const rel = path11.relative(globalsDir, stateStaticPath).replace(/\\/g, "/");
4578
+ const globalsDir = path12.dirname(candidatePath);
4579
+ const rel = path12.relative(globalsDir, stateStaticPath).replace(/\\/g, "/");
4518
4580
  const importLine = `@import "./${rel}";`;
4519
4581
  const tailwindImportRe = /(@import\s+["']tailwindcss["']\s*;[^\n]*\n?)/;
4520
4582
  let updated;
@@ -4540,12 +4602,12 @@ ${content}`;
4540
4602
  }
4541
4603
  if (!process.env.TW_NATIVE_PATH) {
4542
4604
  const runtimeDir = resolveRuntimeDir2();
4543
- const nativePath = path11.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node");
4605
+ const nativePath = path12.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node");
4544
4606
  if (fs10.existsSync(nativePath)) {
4545
4607
  process.env.TW_NATIVE_PATH = nativePath;
4546
4608
  }
4547
4609
  }
4548
- const srcDir = path11.join(process.cwd(), "src");
4610
+ const srcDir = path12.join(process.cwd(), "src");
4549
4611
  if (fs10.existsSync(srcDir)) {
4550
4612
  try {
4551
4613
  const result = scanWorkspace2(srcDir);
@@ -4623,12 +4685,12 @@ ${content}`;
4623
4685
  "styles/globals.css"
4624
4686
  ];
4625
4687
  try {
4626
- const twConfigPath = path11.join(process.cwd(), "tailwind-styled.config.json");
4688
+ const twConfigPath = path12.join(process.cwd(), "tailwind-styled.config.json");
4627
4689
  if (fs10.existsSync(twConfigPath)) {
4628
4690
  const twConfig = JSON.parse(fs10.readFileSync(twConfigPath, "utf-8"));
4629
4691
  const cssEntry = twConfig.css?.entry;
4630
4692
  if (cssEntry) {
4631
- const cssEntryPath = path11.join(process.cwd(), cssEntry);
4693
+ const cssEntryPath = path12.join(process.cwd(), cssEntry);
4632
4694
  if (fs10.existsSync(cssEntryPath)) {
4633
4695
  cssEntryContent = fs10.readFileSync(cssEntryPath, "utf-8");
4634
4696
  }
@@ -4638,7 +4700,7 @@ ${content}`;
4638
4700
  }
4639
4701
  if (!cssEntryContent) {
4640
4702
  for (const candidate of CSS_CANDIDATES) {
4641
- const candidatePath = path11.join(process.cwd(), candidate);
4703
+ const candidatePath = path12.join(process.cwd(), candidate);
4642
4704
  if (fs10.existsSync(candidatePath)) {
4643
4705
  cssEntryContent = fs10.readFileSync(candidatePath, "utf-8");
4644
4706
  break;
@@ -4648,7 +4710,7 @@ ${content}`;
4648
4710
  if (cssEntryContent) {
4649
4711
  cssEntryContent = cssEntryContent.replace(/@source\s+["'][^"']+["']\s*;?\s*/g, "").replace(/←[^\n]*/g, "").trim();
4650
4712
  }
4651
- const initialScanPath = path11.join(twClassesDir, "_initial-scan.css");
4713
+ const initialScanPath = path12.join(twClassesDir, "_initial-scan.css");
4652
4714
  if (!fs10.existsSync(initialScanPath)) {
4653
4715
  atomicWriteFile2(
4654
4716
  initialScanPath,