tailwind-styled-v4 5.0.9 → 5.0.10

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 (137) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/dist/{analyzeWorkspace-DuJKh7Ty.d.mts → analyzeWorkspace-BS5O4rhC.d.mts} +47 -2
  3. package/dist/{analyzeWorkspace-Ct_NTAWt.d.ts → analyzeWorkspace-DDOQdzzI.d.ts} +47 -2
  4. package/dist/analyzer.d.mts +5 -3
  5. package/dist/analyzer.d.ts +5 -3
  6. package/dist/analyzer.js +563 -468
  7. package/dist/analyzer.js.map +1 -1
  8. package/dist/analyzer.mjs +562 -467
  9. package/dist/analyzer.mjs.map +1 -1
  10. package/dist/animate.d.mts +4 -7
  11. package/dist/animate.d.ts +4 -7
  12. package/dist/animate.js +171 -265
  13. package/dist/animate.js.map +1 -1
  14. package/dist/animate.mjs +165 -264
  15. package/dist/animate.mjs.map +1 -1
  16. package/dist/atomic.d.mts +22 -1
  17. package/dist/atomic.d.ts +22 -1
  18. package/dist/atomic.js +221 -165
  19. package/dist/atomic.js.map +1 -1
  20. package/dist/atomic.mjs +200 -165
  21. package/dist/atomic.mjs.map +1 -1
  22. package/dist/cli.d.mts +60 -1
  23. package/dist/cli.d.ts +60 -1
  24. package/dist/cli.js +1261 -1517
  25. package/dist/cli.js.map +1 -1
  26. package/dist/cli.mjs +1238 -1513
  27. package/dist/cli.mjs.map +1 -1
  28. package/dist/compiler.d.mts +38 -7
  29. package/dist/compiler.d.ts +38 -7
  30. package/dist/compiler.js +174 -197
  31. package/dist/compiler.js.map +1 -1
  32. package/dist/compiler.mjs +151 -194
  33. package/dist/compiler.mjs.map +1 -1
  34. package/dist/devtools.js +7 -31
  35. package/dist/devtools.js.map +1 -1
  36. package/dist/devtools.mjs +7 -31
  37. package/dist/devtools.mjs.map +1 -1
  38. package/dist/engine.d.mts +134 -63
  39. package/dist/engine.d.ts +134 -63
  40. package/dist/engine.js +2863 -2482
  41. package/dist/engine.js.map +1 -1
  42. package/dist/engine.mjs +2852 -2485
  43. package/dist/engine.mjs.map +1 -1
  44. package/dist/{index-eWAocnD2.d.mts → index-NDINUhLN.d.mts} +3 -1
  45. package/dist/{index-eWAocnD2.d.ts → index-NDINUhLN.d.ts} +3 -1
  46. package/dist/index.d.mts +45 -32
  47. package/dist/index.d.ts +45 -32
  48. package/dist/index.js +271 -158
  49. package/dist/index.js.map +1 -1
  50. package/dist/index.mjs +251 -158
  51. package/dist/index.mjs.map +1 -1
  52. package/dist/{liveTokenEngine-DSUk88P6.d.ts → liveTokenEngine-CN9ian1R.d.ts} +1 -1
  53. package/dist/{liveTokenEngine-CX5_0c4q.d.mts → liveTokenEngine-DKoWRtqH.d.mts} +1 -1
  54. package/dist/next.js +20 -39
  55. package/dist/next.js.map +1 -1
  56. package/dist/next.mjs +18 -37
  57. package/dist/next.mjs.map +1 -1
  58. package/dist/plugin-api.d.mts +8 -2
  59. package/dist/plugin-api.d.ts +8 -2
  60. package/dist/plugin-api.js +14 -2
  61. package/dist/plugin-api.js.map +1 -1
  62. package/dist/plugin-api.mjs +14 -3
  63. package/dist/plugin-api.mjs.map +1 -1
  64. package/dist/plugin-registry.js +51 -11
  65. package/dist/plugin-registry.js.map +1 -1
  66. package/dist/plugin-registry.mjs +51 -11
  67. package/dist/plugin-registry.mjs.map +1 -1
  68. package/dist/plugin.d.mts +5 -7
  69. package/dist/plugin.d.ts +5 -7
  70. package/dist/plugin.js +16 -15
  71. package/dist/plugin.js.map +1 -1
  72. package/dist/plugin.mjs +16 -16
  73. package/dist/plugin.mjs.map +1 -1
  74. package/dist/rspack.js +17 -38
  75. package/dist/rspack.js.map +1 -1
  76. package/dist/rspack.mjs +15 -36
  77. package/dist/rspack.mjs.map +1 -1
  78. package/dist/runtime.d.mts +2 -2
  79. package/dist/runtime.d.ts +2 -2
  80. package/dist/scanner.d.mts +10 -1
  81. package/dist/scanner.d.ts +10 -1
  82. package/dist/scanner.js +298 -124
  83. package/dist/scanner.js.map +1 -1
  84. package/dist/scanner.mjs +296 -124
  85. package/dist/scanner.mjs.map +1 -1
  86. package/dist/shared.d.mts +1 -1
  87. package/dist/shared.d.ts +1 -1
  88. package/dist/shared.js +104 -176
  89. package/dist/shared.js.map +1 -1
  90. package/dist/shared.mjs +85 -176
  91. package/dist/shared.mjs.map +1 -1
  92. package/dist/storybook-addon.d.mts +1 -1
  93. package/dist/storybook-addon.d.ts +1 -1
  94. package/dist/svelte.d.mts +1 -1
  95. package/dist/svelte.d.ts +1 -1
  96. package/dist/svelte.js +166 -3
  97. package/dist/svelte.js.map +1 -1
  98. package/dist/svelte.mjs +143 -1
  99. package/dist/svelte.mjs.map +1 -1
  100. package/dist/syntax.js +21 -21
  101. package/dist/syntax.js.map +1 -1
  102. package/dist/syntax.mjs +21 -21
  103. package/dist/syntax.mjs.map +1 -1
  104. package/dist/testing.js +9 -1
  105. package/dist/testing.js.map +1 -1
  106. package/dist/testing.mjs +9 -1
  107. package/dist/testing.mjs.map +1 -1
  108. package/dist/theme.d.mts +2 -2
  109. package/dist/theme.d.ts +2 -2
  110. package/dist/theme.js +40 -112
  111. package/dist/theme.js.map +1 -1
  112. package/dist/theme.mjs +37 -110
  113. package/dist/theme.mjs.map +1 -1
  114. package/dist/turbopackLoader.js +79 -124
  115. package/dist/turbopackLoader.js.map +1 -1
  116. package/dist/turbopackLoader.mjs +63 -122
  117. package/dist/turbopackLoader.mjs.map +1 -1
  118. package/dist/tw.js +1256 -1517
  119. package/dist/tw.js.map +1 -1
  120. package/dist/tw.mjs +1236 -1513
  121. package/dist/tw.mjs.map +1 -1
  122. package/dist/vite.js +1783 -823
  123. package/dist/vite.js.map +1 -1
  124. package/dist/vite.mjs +1767 -821
  125. package/dist/vite.mjs.map +1 -1
  126. package/dist/vue.d.mts +1 -1
  127. package/dist/vue.d.ts +1 -1
  128. package/dist/vue.js +165 -4
  129. package/dist/vue.js.map +1 -1
  130. package/dist/vue.mjs +141 -1
  131. package/dist/vue.mjs.map +1 -1
  132. package/dist/webpackLoader.js +65 -108
  133. package/dist/webpackLoader.js.map +1 -1
  134. package/dist/webpackLoader.mjs +45 -104
  135. package/dist/webpackLoader.mjs.map +1 -1
  136. package/native/tailwind-styled-native.node +0 -0
  137. package/package.json +22 -24
@@ -1,14 +1,32 @@
1
1
  'use strict';
2
2
 
3
3
  var module$1 = require('module');
4
- var fs = require('fs');
4
+ var fs3 = require('fs');
5
5
  var path = require('path');
6
+ require('crypto');
7
+ var url = require('url');
6
8
 
7
9
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
8
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
9
27
 
10
- var fs__default = /*#__PURE__*/_interopDefault(fs);
11
- var path__default = /*#__PURE__*/_interopDefault(path);
28
+ var fs3__namespace = /*#__PURE__*/_interopNamespace(fs3);
29
+ var path__namespace = /*#__PURE__*/_interopNamespace(path);
12
30
 
13
31
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
14
32
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -21,45 +39,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
21
39
  var __esm = (fn, res) => function __init() {
22
40
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
23
41
  };
24
-
25
- // packages/domain/shared/src/native-resolution.ts
26
- function getNodeModuleRef() {
27
- if (isBrowser) return null;
28
- if (nodeModuleRef !== null) return nodeModuleRef;
29
- try {
30
- const test = typeof __require === "function" ? __require("module") : null;
31
- nodeModuleRef = test;
32
- return test;
33
- } catch {
34
- nodeModuleRef = null;
35
- return null;
36
- }
37
- }
38
- function getNodeFs() {
39
- if (isBrowser) return { existsSync: () => false };
40
- const nodeRequire = getNodeModuleRef();
41
- if (!nodeRequire) return { existsSync: () => false };
42
- if (!_nodeFs) _nodeFs = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)))("node:fs");
43
- return _nodeFs;
44
- }
45
- function getNodePath() {
46
- if (isBrowser) return { resolve: () => "", dirname: "" };
47
- const nodeRequire = getNodeModuleRef();
48
- if (!nodeRequire) return { resolve: () => "", dirname: "" };
49
- if (!_nodePath) _nodePath = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)))("node:path");
50
- return _nodePath;
51
- }
52
- function getRequire(_importMetaUrl) {
53
- if (isBrowser) return () => {
54
- throw new Error("node:module not available");
55
- };
56
- const nodeRequire = getNodeModuleRef();
57
- if (!nodeRequire) return () => {
58
- throw new Error("require not available");
59
- };
60
- if (!_require) _require = nodeRequire.createRequire(_importMetaUrl);
61
- return _require;
62
- }
63
42
  function platformKey() {
64
43
  if (isBrowser) return "browser";
65
44
  return `${process.platform}-${process.arch}`;
@@ -70,24 +49,21 @@ function resolveNativeBinary(runtimeDir) {
70
49
  if (isBrowser) {
71
50
  return { path: null, source: "not-found", platform, tried: ["not available in browser"] };
72
51
  }
73
- const fs2 = getNodeFs();
74
- const path2 = getNodePath();
75
- const _req = getRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)));
52
+ if (process.env.TWS_DISABLE_NATIVE === "1") {
53
+ return { path: null, source: "not-found", platform, tried: [] };
54
+ }
76
55
  const envPath = process.env.TW_NATIVE_PATH?.trim();
77
56
  if (envPath) {
78
- if (fs2.existsSync(envPath)) {
57
+ if (fs3__namespace.existsSync(envPath)) {
79
58
  return { path: envPath, source: "env", platform, tried };
80
59
  }
81
60
  tried.push(`env:${envPath} (not found)`);
82
61
  }
83
- if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_NO_RUST === "1" || process.env.TWS_DISABLE_NATIVE === "1") {
84
- return { path: null, source: "not-found", platform, tried: ["disabled by env"] };
85
- }
86
62
  const prebuiltPkgs = PLATFORM_MAP[platform] ?? [];
87
63
  for (const pkg of prebuiltPkgs) {
88
64
  try {
89
- const candidate = _req.resolve(`${pkg}/tailwind_styled_parser.node`);
90
- if (fs2.existsSync(candidate)) {
65
+ const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
66
+ if (fs3__namespace.existsSync(candidate)) {
91
67
  return { path: candidate, source: "prebuilt", platform, tried };
92
68
  }
93
69
  tried.push(`prebuilt:${pkg} (resolved but missing)`);
@@ -97,30 +73,43 @@ function resolveNativeBinary(runtimeDir) {
97
73
  }
98
74
  const cwd = process.cwd();
99
75
  const base = runtimeDir ?? cwd;
100
- const localCandidates = [
101
- path2.resolve(base, "tailwind_styled_parser.node"),
102
- path2.resolve(base, "..", "tailwind_styled_parser.node"),
103
- path2.resolve(cwd, "native", "tailwind_styled_parser.node"),
104
- path2.resolve(cwd, "native", "target", "release", "tailwind_styled_parser.node"),
105
- // napi-rs conventional output
106
- path2.resolve(base, `tailwind_styled_parser.${platform}.node`)
107
- ];
76
+ const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
77
+ const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
78
+ const localCandidates = [];
79
+ for (const bin of BINARY_NAMES) {
80
+ localCandidates.push(path__namespace.resolve(base, `${bin}.node`));
81
+ localCandidates.push(path__namespace.resolve(base, "..", `${bin}.node`));
82
+ localCandidates.push(path__namespace.resolve(base, `${bin}.${platform}.node`));
83
+ localCandidates.push(path__namespace.resolve(base, `${bin}.${napiPlatform}.node`));
84
+ }
85
+ for (const startDir of [cwd, base]) {
86
+ let dir = startDir;
87
+ for (let i = 0; i < 6; i++) {
88
+ const nativeDir = path__namespace.resolve(dir, "native");
89
+ for (const bin of BINARY_NAMES) {
90
+ localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.node`));
91
+ localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.${platform}.node`));
92
+ localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
93
+ localCandidates.push(path__namespace.resolve(nativeDir, "target", "release", `${bin}.node`));
94
+ }
95
+ const parent = path__namespace.resolve(dir, "..");
96
+ if (parent === dir) break;
97
+ dir = parent;
98
+ }
99
+ }
108
100
  for (const candidate of localCandidates) {
109
101
  tried.push(`local:${candidate}`);
110
- if (fs2.existsSync(candidate)) {
102
+ if (fs3__namespace.existsSync(candidate)) {
111
103
  return { path: candidate, source: "local", platform, tried };
112
104
  }
113
105
  }
114
106
  return { path: null, source: "not-found", platform, tried };
115
107
  }
116
- var isBrowser, nodeModuleRef, _nodeFs, _nodePath, _require, PLATFORM_MAP;
108
+ var isBrowser, _require, PLATFORM_MAP;
117
109
  var init_native_resolution = __esm({
118
110
  "packages/domain/shared/src/native-resolution.ts"() {
119
111
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
120
- nodeModuleRef = null;
121
- _nodeFs = null;
122
- _nodePath = null;
123
- _require = null;
112
+ _require = typeof __require !== "undefined" ? __require : module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)));
124
113
  PLATFORM_MAP = {
125
114
  "linux-x64": ["@tailwind-styled/native-linux-x64"],
126
115
  "linux-arm64": ["@tailwind-styled/native-linux-arm64"],
@@ -131,59 +120,26 @@ var init_native_resolution = __esm({
131
120
  };
132
121
  }
133
122
  });
134
-
135
- // packages/domain/shared/src/index.ts
136
- function getNodeModuleRef2() {
137
- if (isBrowser2) return null;
138
- if (nodeModuleRef2 !== null) return nodeModuleRef2;
139
- try {
140
- const test = typeof __require === "function" ? __require("module") : null;
141
- nodeModuleRef2 = test;
142
- return test;
143
- } catch {
144
- nodeModuleRef2 = null;
145
- return null;
146
- }
147
- }
148
- function getNodeUrl() {
149
- if (isBrowser2) throw new Error("node:url not available in browser");
150
- const nodeRequire = getNodeModuleRef2();
151
- if (!nodeRequire) throw new Error("require not available");
152
- if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)))("node:url");
153
- return _nodeUrl;
154
- }
155
- function getRequire2() {
156
- if (isBrowser2) return (() => {
157
- throw new Error("require not available in browser");
158
- });
159
- const nodeRequire = getNodeModuleRef2();
160
- if (!nodeRequire) return (() => {
161
- throw new Error("require not available");
162
- });
163
- return nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)));
164
- }
165
123
  function resolveRuntimeDir(dir, importMetaUrl) {
166
- if (isBrowser2) return "";
167
124
  try {
168
- return getNodeUrl().fileURLToPath(importMetaUrl);
125
+ return path__namespace.default.dirname(url.fileURLToPath(importMetaUrl));
169
126
  } catch {
170
127
  return process.cwd();
171
128
  }
172
129
  }
173
- var isBrowser2, nodeModuleRef2, _nodeUrl;
174
130
  var init_src = __esm({
175
131
  "packages/domain/shared/src/index.ts"() {
176
132
  init_native_resolution();
177
- isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
178
- nodeModuleRef2 = null;
179
- _nodeUrl = null;
180
- getRequire2();
133
+ module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)));
181
134
  }
182
135
  });
183
- var log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
136
+
137
+ // packages/domain/compiler/src/nativeBridge.ts
138
+ var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
184
139
  var init_nativeBridge = __esm({
185
140
  "packages/domain/compiler/src/nativeBridge.ts"() {
186
141
  init_src();
142
+ _loadNative = (path4) => __require(path4);
187
143
  log = (...args) => {
188
144
  if (process.env.DEBUG?.includes("compiler:native")) {
189
145
  console.log("[compiler:native]", ...args);
@@ -210,11 +166,10 @@ var init_nativeBridge = __esm({
210
166
  bridgeLoadAttempted = true;
211
167
  try {
212
168
  const runtimeDir = resolveRuntimeDir(void 0, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)));
213
- const require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('turbopackLoader.js', document.baseURI).href)));
214
169
  const result = resolveNativeBinary(runtimeDir);
215
170
  if (result.path && result.path.endsWith(".node")) {
216
171
  try {
217
- const binding = require2(result.path);
172
+ const binding = _loadNative(result.path);
218
173
  if (isValidNativeBridge(binding)) {
219
174
  nativeBridge = binding;
220
175
  log("Native bridge loaded successfully from:", result.path);
@@ -264,7 +219,7 @@ var runLoaderTransform = (ctx) => {
264
219
  classes: result?.classes || []
265
220
  };
266
221
  };
267
- var registerFileClasses = (filepath, classes) => {
222
+ var registerFileClasses = (_filepath, _classes) => {
268
223
  };
269
224
  function parseBool(val, fallback = false) {
270
225
  if (typeof val === "boolean") return val;
@@ -301,29 +256,29 @@ var CYCLE_SENTINEL = "_cycle.txt";
301
256
  var START_SENTINEL = "_start.txt";
302
257
  var _workerCache = /* @__PURE__ */ new Map();
303
258
  function getTwClassesDir(safelistPath) {
304
- return path__default.default.join(path__default.default.dirname(safelistPath), "tw-classes");
259
+ return path__namespace.default.join(path__namespace.default.dirname(safelistPath), "tw-classes");
305
260
  }
306
261
  function readSentinel(filePath) {
307
262
  try {
308
- return fs__default.default.readFileSync(filePath, "utf-8").trim();
263
+ return fs3__namespace.default.readFileSync(filePath, "utf-8").trim();
309
264
  } catch {
310
265
  return "";
311
266
  }
312
267
  }
313
268
  function clearAndMarkCycle(twClassesDir, startId) {
314
269
  try {
315
- if (fs__default.default.existsSync(twClassesDir)) {
316
- for (const file of fs__default.default.readdirSync(twClassesDir)) {
270
+ if (fs3__namespace.default.existsSync(twClassesDir)) {
271
+ for (const file of fs3__namespace.default.readdirSync(twClassesDir)) {
317
272
  if (file === START_SENTINEL || file === "_webpack-merged.css") continue;
318
273
  try {
319
- fs__default.default.unlinkSync(path__default.default.join(twClassesDir, file));
274
+ fs3__namespace.default.unlinkSync(path__namespace.default.join(twClassesDir, file));
320
275
  } catch {
321
276
  }
322
277
  }
323
278
  } else {
324
- fs__default.default.mkdirSync(twClassesDir, { recursive: true });
279
+ fs3__namespace.default.mkdirSync(twClassesDir, { recursive: true });
325
280
  }
326
- fs__default.default.writeFileSync(path__default.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
281
+ fs3__namespace.default.writeFileSync(path__namespace.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
327
282
  _workerCache.set(twClassesDir, startId);
328
283
  } catch {
329
284
  }
@@ -331,32 +286,32 @@ function clearAndMarkCycle(twClassesDir, startId) {
331
286
  function getPerFileSafelistPath(safelistDir, resourcePath) {
332
287
  const normalized = resourcePath.replace(/\\/g, "/");
333
288
  const slug = normalized.replace(/^.*\/src\//, "").replace(/\.[tj]sx?$/, "").replace(/[^a-zA-Z0-9]/g, "_").slice(0, 80);
334
- return path__default.default.join(safelistDir, `${slug}.css`);
289
+ return path__namespace.default.join(safelistDir, `${slug}.css`);
335
290
  }
336
291
  function writePerFileSafelist(safelistPath, resourcePath, classes) {
337
292
  if (!safelistPath || classes.length === 0) return;
338
293
  try {
339
294
  const twClassesDir = getTwClassesDir(safelistPath);
340
- const startId = readSentinel(path__default.default.join(twClassesDir, START_SENTINEL));
341
- const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(path__default.default.join(twClassesDir, CYCLE_SENTINEL));
295
+ const startId = readSentinel(path__namespace.default.join(twClassesDir, START_SENTINEL));
296
+ const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(path__namespace.default.join(twClassesDir, CYCLE_SENTINEL));
342
297
  if (startId && cachedCycle !== startId) {
343
298
  clearAndMarkCycle(twClassesDir, startId);
344
- } else if (!fs__default.default.existsSync(twClassesDir)) {
345
- fs__default.default.mkdirSync(twClassesDir, { recursive: true });
299
+ } else if (!fs3__namespace.default.existsSync(twClassesDir)) {
300
+ fs3__namespace.default.mkdirSync(twClassesDir, { recursive: true });
346
301
  }
347
302
  const outPath = getPerFileSafelistPath(twClassesDir, resourcePath);
348
303
  const sorted = [...new Set(classes)].sort();
349
304
  const css = [
350
- `/* tw-safelist: ${path__default.default.basename(resourcePath)} \u2014 auto-generated */`,
305
+ `/* tw-safelist: ${path__namespace.default.basename(resourcePath)} \u2014 auto-generated */`,
351
306
  "@layer utilities {",
352
307
  sorted.map((cls) => `.${cls.replace(/([^a-zA-Z0-9_-])/g, "\\$1")} {}`).join("\n"),
353
308
  "}"
354
309
  ].join("\n");
355
310
  try {
356
- if (fs__default.default.readFileSync(outPath, "utf-8") === css) return;
311
+ if (fs3__namespace.default.readFileSync(outPath, "utf-8") === css) return;
357
312
  } catch {
358
313
  }
359
- fs__default.default.writeFileSync(outPath, css, "utf-8");
314
+ fs3__namespace.default.writeFileSync(outPath, css, "utf-8");
360
315
  } catch {
361
316
  }
362
317
  }
@@ -365,7 +320,7 @@ function turbopackLoader(source, options = {}) {
365
320
  const router = detectRouter(this.resourcePath);
366
321
  const nextMajor = parseNum(options.nextMajor);
367
322
  const debug = parseBool(options.debug);
368
- const filename = path__default.default.basename(this.resourcePath);
323
+ const filename = path__namespace.default.basename(this.resourcePath);
369
324
  const effective = {
370
325
  addDataAttr: parseBool(options.addDataAttr),
371
326
  // App Router: selalu auto-detect client boundary