tailwind-styled-v4 5.0.36 → 5.0.38

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 (163) hide show
  1. package/dist/analyzer.d.mts +152 -5
  2. package/dist/analyzer.d.ts +152 -5
  3. package/dist/analyzer.js +213 -161
  4. package/dist/analyzer.js.map +1 -1
  5. package/dist/analyzer.mjs +118 -82
  6. package/dist/analyzer.mjs.map +1 -1
  7. package/dist/animate.d.mts +30 -3
  8. package/dist/animate.d.ts +30 -3
  9. package/dist/animate.js +131 -87
  10. package/dist/animate.js.map +1 -1
  11. package/dist/animate.mjs +28 -14
  12. package/dist/animate.mjs.map +1 -1
  13. package/dist/atomic.js +105 -68
  14. package/dist/atomic.js.map +1 -1
  15. package/dist/atomic.mjs +40 -13
  16. package/dist/atomic.mjs.map +1 -1
  17. package/dist/cli.js +577 -426
  18. package/dist/cli.js.map +1 -1
  19. package/dist/cli.mjs +466 -304
  20. package/dist/cli.mjs.map +1 -1
  21. package/dist/compiler.d.mts +5 -0
  22. package/dist/compiler.d.ts +5 -0
  23. package/dist/compiler.js +826 -508
  24. package/dist/compiler.js.map +1 -1
  25. package/dist/compiler.mjs +287 -29
  26. package/dist/compiler.mjs.map +1 -1
  27. package/dist/dashboard.js +71 -41
  28. package/dist/dashboard.js.map +1 -1
  29. package/dist/dashboard.mjs +12 -6
  30. package/dist/dashboard.mjs.map +1 -1
  31. package/dist/devtools.d.mts +88 -2
  32. package/dist/devtools.d.ts +88 -2
  33. package/dist/devtools.js +333 -289
  34. package/dist/devtools.js.map +1 -1
  35. package/dist/devtools.mjs +26 -11
  36. package/dist/devtools.mjs.map +1 -1
  37. package/dist/engine.d.mts +557 -6
  38. package/dist/engine.d.ts +557 -6
  39. package/dist/engine.js +679 -502
  40. package/dist/engine.js.map +1 -1
  41. package/dist/engine.mjs +467 -307
  42. package/dist/engine.mjs.map +1 -1
  43. package/dist/index.d.mts +180 -127
  44. package/dist/index.d.ts +180 -127
  45. package/dist/index.js +1329 -7441
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +1266 -7385
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/next.js +318 -243
  50. package/dist/next.js.map +1 -1
  51. package/dist/next.mjs +256 -181
  52. package/dist/next.mjs.map +1 -1
  53. package/dist/plugin-api.d.mts +4 -2
  54. package/dist/plugin-api.d.ts +4 -2
  55. package/dist/plugin-api.js +93 -49
  56. package/dist/plugin-api.js.map +1 -1
  57. package/dist/plugin-api.mjs +26 -6
  58. package/dist/plugin-api.mjs.map +1 -1
  59. package/dist/plugin-registry.js +103 -62
  60. package/dist/plugin-registry.js.map +1 -1
  61. package/dist/plugin-registry.mjs +53 -35
  62. package/dist/plugin-registry.mjs.map +1 -1
  63. package/dist/plugin.d.mts +165 -5
  64. package/dist/plugin.d.ts +165 -5
  65. package/dist/plugin.js +115 -50
  66. package/dist/plugin.js.map +1 -1
  67. package/dist/plugin.mjs +44 -6
  68. package/dist/plugin.mjs.map +1 -1
  69. package/dist/preset.js +47 -15
  70. package/dist/preset.js.map +1 -1
  71. package/dist/preset.mjs +13 -5
  72. package/dist/preset.mjs.map +1 -1
  73. package/dist/rspack.js +82 -50
  74. package/dist/rspack.js.map +1 -1
  75. package/dist/rspack.mjs +20 -12
  76. package/dist/rspack.mjs.map +1 -1
  77. package/dist/runtime-css.js +62 -24
  78. package/dist/runtime-css.js.map +1 -1
  79. package/dist/runtime-css.mjs +15 -7
  80. package/dist/runtime-css.mjs.map +1 -1
  81. package/dist/runtime.d.mts +38 -3
  82. package/dist/runtime.d.ts +38 -3
  83. package/dist/runtime.js +97 -44
  84. package/dist/runtime.js.map +1 -1
  85. package/dist/runtime.mjs +31 -8
  86. package/dist/runtime.mjs.map +1 -1
  87. package/dist/scanner.d.mts +58 -4
  88. package/dist/scanner.d.ts +58 -4
  89. package/dist/scanner.js +163 -120
  90. package/dist/scanner.js.map +1 -1
  91. package/dist/scanner.mjs +67 -39
  92. package/dist/scanner.mjs.map +1 -1
  93. package/dist/shared.d.mts +185 -3
  94. package/dist/shared.d.ts +185 -3
  95. package/dist/shared.js +441 -295
  96. package/dist/shared.js.map +1 -1
  97. package/dist/shared.mjs +253 -122
  98. package/dist/shared.mjs.map +1 -1
  99. package/dist/storybook-addon.d.mts +2 -2
  100. package/dist/storybook-addon.d.ts +2 -2
  101. package/dist/storybook-addon.js +39 -10
  102. package/dist/storybook-addon.js.map +1 -1
  103. package/dist/storybook-addon.mjs +8 -3
  104. package/dist/storybook-addon.mjs.map +1 -1
  105. package/dist/svelte.d.mts +2 -1
  106. package/dist/svelte.d.ts +2 -1
  107. package/dist/svelte.js +88 -64
  108. package/dist/svelte.js.map +1 -1
  109. package/dist/svelte.mjs +28 -13
  110. package/dist/svelte.mjs.map +1 -1
  111. package/dist/syntax.js +68 -37
  112. package/dist/syntax.js.map +1 -1
  113. package/dist/syntax.mjs +8 -7
  114. package/dist/syntax.mjs.map +1 -1
  115. package/dist/testing.js +55 -18
  116. package/dist/testing.js.map +1 -1
  117. package/dist/testing.mjs +16 -3
  118. package/dist/testing.mjs.map +1 -1
  119. package/dist/theme.d.mts +38 -3
  120. package/dist/theme.d.ts +38 -3
  121. package/dist/theme.js +131 -74
  122. package/dist/theme.js.map +1 -1
  123. package/dist/theme.mjs +42 -13
  124. package/dist/theme.mjs.map +1 -1
  125. package/dist/turbopackLoader.js +150 -116
  126. package/dist/turbopackLoader.js.map +1 -1
  127. package/dist/turbopackLoader.mjs +124 -81
  128. package/dist/turbopackLoader.mjs.map +1 -1
  129. package/dist/tw.js +560 -421
  130. package/dist/tw.js.map +1 -1
  131. package/dist/tw.mjs +460 -302
  132. package/dist/tw.mjs.map +1 -1
  133. package/dist/vite.js +561 -446
  134. package/dist/vite.js.map +1 -1
  135. package/dist/vite.mjs +433 -321
  136. package/dist/vite.mjs.map +1 -1
  137. package/dist/vue.d.mts +4 -1
  138. package/dist/vue.d.ts +4 -1
  139. package/dist/vue.js +95 -70
  140. package/dist/vue.js.map +1 -1
  141. package/dist/vue.mjs +30 -14
  142. package/dist/vue.mjs.map +1 -1
  143. package/dist/webpackLoader.js +110 -78
  144. package/dist/webpackLoader.js.map +1 -1
  145. package/dist/webpackLoader.mjs +45 -17
  146. package/dist/webpackLoader.mjs.map +1 -1
  147. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  148. package/native/tailwind-styled-native.node +0 -0
  149. package/package.json +3 -1
  150. package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
  151. package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
  152. package/dist/index-DQI6O24n.d.mts +0 -464
  153. package/dist/index-NDINUhLN.d.mts +0 -90
  154. package/dist/index-NDINUhLN.d.ts +0 -90
  155. package/dist/index-UkYbyBkR.d.ts +0 -464
  156. package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
  157. package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
  158. package/dist/schemas-DR-SLxZZ.d.mts +0 -59
  159. package/dist/schemas-DR-SLxZZ.d.ts +0 -59
  160. package/dist/trace-Dz4vmZdy.d.mts +0 -96
  161. package/dist/trace-Dz4vmZdy.d.ts +0 -96
  162. package/dist/types-DXr2PmGP.d.mts +0 -31
  163. package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/shared.js CHANGED
@@ -1,45 +1,11 @@
1
- 'use strict';
2
-
3
- var zod = require('zod');
4
- var module$1 = require('module');
5
- var fs3 = require('fs');
6
- var path = require('path');
7
- var crypto = require('crypto');
8
- var url = require('url');
9
-
10
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
11
- function _interopNamespace(e) {
12
- if (e && e.__esModule) return e;
13
- var n = Object.create(null);
14
- if (e) {
15
- Object.keys(e).forEach(function (k) {
16
- if (k !== 'default') {
17
- var d = Object.getOwnPropertyDescriptor(e, k);
18
- Object.defineProperty(n, k, d.get ? d : {
19
- enumerable: true,
20
- get: function () { return e[k]; }
21
- });
22
- }
23
- });
24
- }
25
- n.default = e;
26
- return Object.freeze(n);
27
- }
28
-
29
- var fs3__namespace = /*#__PURE__*/_interopNamespace(fs3);
30
- var path__namespace = /*#__PURE__*/_interopNamespace(path);
31
-
32
1
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
2
+ "use strict";
3
+ var __create = Object.create;
33
4
  var __defProp = Object.defineProperty;
34
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
35
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
36
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
37
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
38
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
39
- }) : x)(function(x) {
40
- if (typeof require !== "undefined") return require.apply(this, arguments);
41
- throw Error('Dynamic require of "' + x + '" is not supported');
42
- });
43
9
  var __esm = (fn, res) => function __init() {
44
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
45
11
  };
@@ -55,6 +21,14 @@ var __copyProps = (to, from, except, desc) => {
55
21
  }
56
22
  return to;
57
23
  };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
58
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
33
 
60
34
  // packages/domain/shared/src/trace.ts
@@ -149,6 +123,7 @@ function getPipelinePercentages(metrics) {
149
123
  }
150
124
  var init_trace = __esm({
151
125
  "packages/domain/shared/src/trace.ts"() {
126
+ "use strict";
152
127
  }
153
128
  });
154
129
 
@@ -160,10 +135,11 @@ function formatErrorCode(code) {
160
135
  const prefix = code.startsWith("E") ? "Error" : code.startsWith("W") ? "Warning" : "Code";
161
136
  return `[${prefix} ${code}]`;
162
137
  }
163
- exports.ERROR_CODES = void 0; var ERROR_SUGGESTIONS;
138
+ var ERROR_CODES, ERROR_SUGGESTIONS;
164
139
  var init_error_codes = __esm({
165
140
  "packages/domain/shared/src/error-codes.ts"() {
166
- exports.ERROR_CODES = {
141
+ "use strict";
142
+ ERROR_CODES = {
167
143
  // E0xx — Native binding
168
144
  NATIVE_NOT_FOUND: "E001",
169
145
  NATIVE_LOAD_FAILED: "E002",
@@ -204,8 +180,8 @@ var init_error_codes = __esm({
204
180
  // packages/domain/shared/src/compatibility.ts
205
181
  function detectTailwind() {
206
182
  try {
207
- const pkgPath = __require.resolve("tailwindcss/package.json");
208
- const { version } = __require(pkgPath);
183
+ const pkgPath = require.resolve("tailwindcss/package.json");
184
+ const { version } = require(pkgPath);
209
185
  const major = Number.parseInt(version.split(".")[0], 10);
210
186
  return { version, major, supported: major >= 4, path: pkgPath };
211
187
  } catch {
@@ -229,8 +205,11 @@ function isTailwindV4() {
229
205
  }
230
206
  var init_compatibility = __esm({
231
207
  "packages/domain/shared/src/compatibility.ts"() {
208
+ "use strict";
232
209
  }
233
210
  });
211
+
212
+ // packages/domain/shared/src/native-schemas.ts
234
213
  function safeParseNative(schema, data, fallback) {
235
214
  const result = schema.safeParse(data);
236
215
  return result.success ? result.data : fallback;
@@ -246,67 +225,69 @@ function parseNative(schema, data, context) {
246
225
  }
247
226
  return result.data;
248
227
  }
249
- exports.NativeScanFileSchema = void 0; exports.NativeScanResultSchema = void 0; var NativeClassUsageSchema; exports.NativeAnalyzerReportSchema = void 0; exports.NativeTransformResultSchema = void 0; exports.NativeCssCompileResultSchema = void 0; exports.NativeWatchResultSchema = void 0; exports.NativeCacheEntrySchema = void 0; exports.NativeCacheReadResultSchema = void 0;
228
+ var import_zod, NativeScanFileSchema, NativeScanResultSchema, NativeClassUsageSchema, NativeAnalyzerReportSchema, NativeTransformResultSchema, NativeCssCompileResultSchema, NativeWatchEventSchema, NativeWatchResultSchema, NativeCacheEntrySchema, NativeCacheReadResultSchema;
250
229
  var init_native_schemas = __esm({
251
230
  "packages/domain/shared/src/native-schemas.ts"() {
252
- exports.NativeScanFileSchema = zod.z.object({
253
- file: zod.z.string().min(1, "file path cannot be empty"),
254
- classes: zod.z.array(zod.z.string()),
255
- hash: zod.z.string().optional()
231
+ "use strict";
232
+ import_zod = require("zod");
233
+ NativeScanFileSchema = import_zod.z.object({
234
+ file: import_zod.z.string().min(1, "file path cannot be empty"),
235
+ classes: import_zod.z.array(import_zod.z.string()),
236
+ hash: import_zod.z.string().optional()
256
237
  });
257
- exports.NativeScanResultSchema = zod.z.object({
258
- files: zod.z.array(exports.NativeScanFileSchema),
259
- totalFiles: zod.z.number().int().nonnegative(),
260
- uniqueClasses: zod.z.array(zod.z.string())
238
+ NativeScanResultSchema = import_zod.z.object({
239
+ files: import_zod.z.array(NativeScanFileSchema),
240
+ totalFiles: import_zod.z.number().int().nonnegative(),
241
+ uniqueClasses: import_zod.z.array(import_zod.z.string())
261
242
  });
262
- NativeClassUsageSchema = zod.z.object({
263
- name: zod.z.string(),
264
- count: zod.z.number().int().nonnegative(),
265
- files: zod.z.array(zod.z.string()).optional()
243
+ NativeClassUsageSchema = import_zod.z.object({
244
+ name: import_zod.z.string(),
245
+ count: import_zod.z.number().int().nonnegative(),
246
+ files: import_zod.z.array(import_zod.z.string()).optional()
266
247
  });
267
- exports.NativeAnalyzerReportSchema = zod.z.object({
268
- root: zod.z.string(),
269
- topClasses: zod.z.array(NativeClassUsageSchema).optional(),
270
- safelist: zod.z.array(zod.z.string()).optional(),
271
- css: zod.z.string().optional(),
272
- conflicts: zod.z.array(zod.z.unknown()).optional(),
273
- unusedClasses: zod.z.array(zod.z.string()).optional(),
274
- durationMs: zod.z.number().nonnegative().optional()
248
+ NativeAnalyzerReportSchema = import_zod.z.object({
249
+ root: import_zod.z.string(),
250
+ topClasses: import_zod.z.array(NativeClassUsageSchema).optional(),
251
+ safelist: import_zod.z.array(import_zod.z.string()).optional(),
252
+ css: import_zod.z.string().optional(),
253
+ conflicts: import_zod.z.array(import_zod.z.unknown()).optional(),
254
+ unusedClasses: import_zod.z.array(import_zod.z.string()).optional(),
255
+ durationMs: import_zod.z.number().nonnegative().optional()
275
256
  });
276
- exports.NativeTransformResultSchema = zod.z.object({
277
- code: zod.z.string(),
278
- classes: zod.z.array(zod.z.string()),
279
- changed: zod.z.boolean(),
280
- rsc: zod.z.object({
281
- isServer: zod.z.boolean(),
282
- needsClientDirective: zod.z.boolean(),
283
- clientReasons: zod.z.array(zod.z.string())
257
+ NativeTransformResultSchema = import_zod.z.object({
258
+ code: import_zod.z.string(),
259
+ classes: import_zod.z.array(import_zod.z.string()),
260
+ changed: import_zod.z.boolean(),
261
+ rsc: import_zod.z.object({
262
+ isServer: import_zod.z.boolean(),
263
+ needsClientDirective: import_zod.z.boolean(),
264
+ clientReasons: import_zod.z.array(import_zod.z.string())
284
265
  }).optional()
285
266
  });
286
- exports.NativeCssCompileResultSchema = zod.z.object({
287
- css: zod.z.string(),
288
- resolvedClasses: zod.z.array(zod.z.string()),
289
- unresolvedClasses: zod.z.array(zod.z.string()).optional()
267
+ NativeCssCompileResultSchema = import_zod.z.object({
268
+ css: import_zod.z.string(),
269
+ resolvedClasses: import_zod.z.array(import_zod.z.string()),
270
+ unresolvedClasses: import_zod.z.array(import_zod.z.string()).optional()
290
271
  });
291
- zod.z.object({
292
- type: zod.z.enum(["change", "unlink", "create"]),
293
- path: zod.z.string()
272
+ NativeWatchEventSchema = import_zod.z.object({
273
+ type: import_zod.z.enum(["change", "unlink", "create"]),
274
+ path: import_zod.z.string()
294
275
  });
295
- exports.NativeWatchResultSchema = zod.z.object({
296
- status: zod.z.enum(["ok", "error"]),
297
- handleId: zod.z.string().optional(),
298
- error: zod.z.string().optional()
276
+ NativeWatchResultSchema = import_zod.z.object({
277
+ status: import_zod.z.enum(["ok", "error"]),
278
+ handleId: import_zod.z.string().optional(),
279
+ error: import_zod.z.string().optional()
299
280
  });
300
- exports.NativeCacheEntrySchema = zod.z.object({
301
- file: zod.z.string(),
302
- hash: zod.z.string(),
303
- classes: zod.z.array(zod.z.string()),
304
- timestamp: zod.z.number(),
305
- size: zod.z.number().optional()
281
+ NativeCacheEntrySchema = import_zod.z.object({
282
+ file: import_zod.z.string(),
283
+ hash: import_zod.z.string(),
284
+ classes: import_zod.z.array(import_zod.z.string()),
285
+ timestamp: import_zod.z.number(),
286
+ size: import_zod.z.number().optional()
306
287
  });
307
- exports.NativeCacheReadResultSchema = zod.z.object({
308
- entries: zod.z.array(exports.NativeCacheEntrySchema),
309
- version: zod.z.string().optional()
288
+ NativeCacheReadResultSchema = import_zod.z.object({
289
+ entries: import_zod.z.array(NativeCacheEntrySchema),
290
+ version: import_zod.z.string().optional()
310
291
  });
311
292
  }
312
293
  });
@@ -316,7 +297,7 @@ function getNodeModuleRef() {
316
297
  if (isBrowser) return null;
317
298
  if (nodeModuleRef !== null) return nodeModuleRef;
318
299
  try {
319
- const test = typeof __require === "function" ? __require("module") : null;
300
+ const test = typeof require === "function" ? require("module") : null;
320
301
  nodeModuleRef = test;
321
302
  return test;
322
303
  } catch {
@@ -328,21 +309,21 @@ function getNodePath() {
328
309
  if (isBrowser) throw new Error("node:path not available in browser");
329
310
  const nodeRequire = getNodeModuleRef();
330
311
  if (!nodeRequire) throw new Error("require not available");
331
- if (!_nodePath) _nodePath = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)))("node:path");
312
+ if (!_nodePath) _nodePath = nodeRequire.createRequire(import_meta.url)("node:path");
332
313
  return _nodePath;
333
314
  }
334
315
  function getNodeUrl() {
335
316
  if (isBrowser) throw new Error("node:url not available in browser");
336
317
  const nodeRequire = getNodeModuleRef();
337
318
  if (!nodeRequire) throw new Error("require not available");
338
- if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)))("node:url");
319
+ if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(import_meta.url)("node:url");
339
320
  return _nodeUrl;
340
321
  }
341
322
  function getNodeFs() {
342
323
  if (isBrowser) throw new Error("node:fs not available in browser");
343
324
  const nodeRequire = getNodeModuleRef();
344
325
  if (!nodeRequire) throw new Error("require not available");
345
- if (!_nodeFs) _nodeFs = nodeRequire.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)))("node:fs");
326
+ if (!_nodeFs) _nodeFs = nodeRequire.createRequire(import_meta.url)("node:fs");
346
327
  return _nodeFs;
347
328
  }
348
329
  function createEsmRequire(importMetaUrl) {
@@ -365,7 +346,7 @@ function resolveFromRoot(...segments) {
365
346
  if (isBrowser) return segments.join("/");
366
347
  const nodePath = getNodePath();
367
348
  const nodeFs = getNodeFs();
368
- let dir = getDirname((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)));
349
+ let dir = getDirname(import_meta.url);
369
350
  for (let i = 0; i < 10; i++) {
370
351
  const pkgPath = nodePath.join(dir, "package.json");
371
352
  try {
@@ -391,9 +372,11 @@ function resolveNativeNodePath(importMetaUrl, ...relativeSegments) {
391
372
  if (isBrowser) return relativeSegments.join("/");
392
373
  return getNodePath().resolve(getDirname(importMetaUrl), ...relativeSegments);
393
374
  }
394
- var isBrowser, nodeModuleRef, _nodePath, _nodeUrl, _nodeFs;
375
+ var import_meta, isBrowser, nodeModuleRef, _nodePath, _nodeUrl, _nodeFs;
395
376
  var init_esmHelpers = __esm({
396
377
  "packages/domain/shared/src/esmHelpers.ts"() {
378
+ "use strict";
379
+ import_meta = {};
397
380
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
398
381
  nodeModuleRef = null;
399
382
  _nodePath = null;
@@ -405,7 +388,7 @@ var init_esmHelpers = __esm({
405
388
  // packages/domain/shared/src/telemetry.ts
406
389
  function getGlobalTelemetry() {
407
390
  if (!_globalCollector) {
408
- _globalCollector = new exports.TelemetryCollector();
391
+ _globalCollector = new TelemetryCollector();
409
392
  }
410
393
  return _globalCollector;
411
394
  }
@@ -441,11 +424,12 @@ function createBuildTimer() {
441
424
  }
442
425
  };
443
426
  }
444
- var RING_BUFFER_SIZE; exports.TelemetryCollector = void 0; var _globalCollector;
427
+ var RING_BUFFER_SIZE, TelemetryCollector, _globalCollector;
445
428
  var init_telemetry = __esm({
446
429
  "packages/domain/shared/src/telemetry.ts"() {
430
+ "use strict";
447
431
  RING_BUFFER_SIZE = 100;
448
- exports.TelemetryCollector = class {
432
+ TelemetryCollector = class {
449
433
  data = [];
450
434
  enabled;
451
435
  constructor(enabled) {
@@ -510,6 +494,8 @@ var init_telemetry = __esm({
510
494
  _globalCollector = null;
511
495
  }
512
496
  });
497
+
498
+ // packages/domain/shared/src/configSchemas.ts
513
499
  function parseJsonWithSchema(jsonString, schema, sourceName) {
514
500
  let parsed;
515
501
  try {
@@ -528,8 +514,8 @@ ${issues}`);
528
514
  return result.data;
529
515
  }
530
516
  function parseJsonFileWithSchema(filePath, schema) {
531
- const { readFileSync } = __require("fs");
532
- const { basename } = __require("path");
517
+ const { readFileSync } = require("fs");
518
+ const { basename } = require("path");
533
519
  let content;
534
520
  try {
535
521
  content = readFileSync(filePath, "utf-8");
@@ -540,70 +526,72 @@ function parseJsonFileWithSchema(filePath, schema) {
540
526
  }
541
527
  return parseJsonWithSchema(content, schema, basename(filePath));
542
528
  }
543
- exports.ScanCacheClassEntrySchema = void 0; exports.ScanCacheSchema = void 0; var TailwindContentItemSchema; exports.TailwindConfigSchema = void 0; exports.RegistryPluginEntrySchema = void 0; exports.RegistryFileSchema = void 0; exports.PackageJsonSchema = void 0;
529
+ var import_zod2, ScanCacheClassEntrySchema, ScanCacheSchema, TailwindContentItemSchema, TailwindConfigSchema, RegistryPluginEntrySchema, RegistryFileSchema, PackageJsonSchema;
544
530
  var init_configSchemas = __esm({
545
531
  "packages/domain/shared/src/configSchemas.ts"() {
546
- exports.ScanCacheClassEntrySchema = zod.z.object({
547
- name: zod.z.string().min(1),
548
- usedIn: zod.z.array(zod.z.string()),
549
- risk: zod.z.enum(["low", "medium", "high"]).default("low"),
550
- bundleContribution: zod.z.number().nonnegative().default(0),
551
- variants: zod.z.array(zod.z.string()).default([])
532
+ "use strict";
533
+ import_zod2 = require("zod");
534
+ ScanCacheClassEntrySchema = import_zod2.z.object({
535
+ name: import_zod2.z.string().min(1),
536
+ usedIn: import_zod2.z.array(import_zod2.z.string()),
537
+ risk: import_zod2.z.enum(["low", "medium", "high"]).default("low"),
538
+ bundleContribution: import_zod2.z.number().nonnegative().default(0),
539
+ variants: import_zod2.z.array(import_zod2.z.string()).default([])
552
540
  });
553
- exports.ScanCacheSchema = zod.z.object({
554
- version: zod.z.string().default("1"),
555
- generatedAt: zod.z.string(),
556
- root: zod.z.string(),
557
- classNames: zod.z.array(exports.ScanCacheClassEntrySchema),
558
- totalFiles: zod.z.number().int().nonnegative(),
559
- uniqueCount: zod.z.number().int().nonnegative()
541
+ ScanCacheSchema = import_zod2.z.object({
542
+ version: import_zod2.z.string().default("1"),
543
+ generatedAt: import_zod2.z.string(),
544
+ root: import_zod2.z.string(),
545
+ classNames: import_zod2.z.array(ScanCacheClassEntrySchema),
546
+ totalFiles: import_zod2.z.number().int().nonnegative(),
547
+ uniqueCount: import_zod2.z.number().int().nonnegative()
560
548
  });
561
- TailwindContentItemSchema = zod.z.union([
562
- zod.z.string(),
563
- zod.z.object({
564
- raw: zod.z.string(),
565
- extension: zod.z.string().optional()
549
+ TailwindContentItemSchema = import_zod2.z.union([
550
+ import_zod2.z.string(),
551
+ import_zod2.z.object({
552
+ raw: import_zod2.z.string(),
553
+ extension: import_zod2.z.string().optional()
566
554
  }),
567
- zod.z.object({
568
- files: zod.z.array(zod.z.string()),
569
- transform: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
555
+ import_zod2.z.object({
556
+ files: import_zod2.z.array(import_zod2.z.string()),
557
+ transform: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional()
570
558
  })
571
559
  ]);
572
- exports.TailwindConfigSchema = zod.z.object({
573
- content: zod.z.array(TailwindContentItemSchema).optional(),
574
- theme: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
575
- plugins: zod.z.array(zod.z.unknown()).optional(),
576
- darkMode: zod.z.union([zod.z.literal("class"), zod.z.literal("media"), zod.z.literal(false)]).optional(),
577
- prefix: zod.z.string().optional(),
578
- safelist: zod.z.array(zod.z.union([zod.z.string(), zod.z.object({ pattern: zod.z.instanceof(RegExp) })])).optional(),
579
- blocklist: zod.z.array(zod.z.string()).optional()
560
+ TailwindConfigSchema = import_zod2.z.object({
561
+ content: import_zod2.z.array(TailwindContentItemSchema).optional(),
562
+ theme: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional(),
563
+ plugins: import_zod2.z.array(import_zod2.z.unknown()).optional(),
564
+ darkMode: import_zod2.z.union([import_zod2.z.literal("class"), import_zod2.z.literal("media"), import_zod2.z.literal(false)]).optional(),
565
+ prefix: import_zod2.z.string().optional(),
566
+ safelist: import_zod2.z.array(import_zod2.z.union([import_zod2.z.string(), import_zod2.z.object({ pattern: import_zod2.z.instanceof(RegExp) })])).optional(),
567
+ blocklist: import_zod2.z.array(import_zod2.z.string()).optional()
580
568
  }).passthrough();
581
- exports.RegistryPluginEntrySchema = zod.z.object({
582
- name: zod.z.string().min(1),
583
- description: zod.z.string(),
584
- version: zod.z.string(),
585
- tags: zod.z.array(zod.z.string()).default([]),
586
- official: zod.z.boolean().default(false),
587
- docs: zod.z.string().url().optional(),
588
- install: zod.z.string().optional(),
589
- integrity: zod.z.string().optional()
569
+ RegistryPluginEntrySchema = import_zod2.z.object({
570
+ name: import_zod2.z.string().min(1),
571
+ description: import_zod2.z.string(),
572
+ version: import_zod2.z.string(),
573
+ tags: import_zod2.z.array(import_zod2.z.string()).default([]),
574
+ official: import_zod2.z.boolean().default(false),
575
+ docs: import_zod2.z.string().url().optional(),
576
+ install: import_zod2.z.string().optional(),
577
+ integrity: import_zod2.z.string().optional()
590
578
  });
591
- exports.RegistryFileSchema = zod.z.object({
592
- version: zod.z.string(),
593
- official: zod.z.array(exports.RegistryPluginEntrySchema).default([]),
594
- community: zod.z.array(exports.RegistryPluginEntrySchema).default([])
579
+ RegistryFileSchema = import_zod2.z.object({
580
+ version: import_zod2.z.string(),
581
+ official: import_zod2.z.array(RegistryPluginEntrySchema).default([]),
582
+ community: import_zod2.z.array(RegistryPluginEntrySchema).default([])
595
583
  });
596
- exports.PackageJsonSchema = zod.z.object({
597
- name: zod.z.string(),
598
- version: zod.z.string(),
599
- scripts: zod.z.record(zod.z.string(), zod.z.string()).optional(),
600
- dependencies: zod.z.record(zod.z.string(), zod.z.string()).optional(),
601
- devDependencies: zod.z.record(zod.z.string(), zod.z.string()).optional(),
602
- peerDependencies: zod.z.record(zod.z.string(), zod.z.string()).optional(),
603
- main: zod.z.string().optional(),
604
- module: zod.z.string().optional(),
605
- exports: zod.z.unknown().optional(),
606
- type: zod.z.enum(["module", "commonjs"]).optional()
584
+ PackageJsonSchema = import_zod2.z.object({
585
+ name: import_zod2.z.string(),
586
+ version: import_zod2.z.string(),
587
+ scripts: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
588
+ dependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
589
+ devDependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
590
+ peerDependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
591
+ main: import_zod2.z.string().optional(),
592
+ module: import_zod2.z.string().optional(),
593
+ exports: import_zod2.z.unknown().optional(),
594
+ type: import_zod2.z.enum(["module", "commonjs"]).optional()
607
595
  }).passthrough();
608
596
  }
609
597
  });
@@ -613,8 +601,8 @@ function getDirnameFromUrl(importMetaUrl) {
613
601
  if (!importMetaUrl) return "";
614
602
  if (isBrowser2) return "";
615
603
  try {
616
- const nodeUrl = __require(NODE_URL);
617
- const nodePath = __require(NODE_PATH);
604
+ const nodeUrl = require(NODE_URL);
605
+ const nodePath = require(NODE_PATH);
618
606
  return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
619
607
  } catch {
620
608
  if (importMetaUrl.startsWith("file://")) {
@@ -628,7 +616,7 @@ function getDirnameFromUrl(importMetaUrl) {
628
616
  function resolvePath(...segments) {
629
617
  if (isBrowser2) return segments.join("/").replace(/\/+/g, "/");
630
618
  try {
631
- const nodePath = __require(NODE_PATH);
619
+ const nodePath = require(NODE_PATH);
632
620
  return nodePath.resolve(...segments);
633
621
  } catch {
634
622
  return segments.join("/").replace(/\/+/g, "/");
@@ -637,7 +625,7 @@ function resolvePath(...segments) {
637
625
  function existsSync(path6) {
638
626
  if (isBrowser2) return false;
639
627
  try {
640
- const nodeFs = __require(NODE_FS);
628
+ const nodeFs = require(NODE_FS);
641
629
  return nodeFs.existsSync(path6);
642
630
  } catch {
643
631
  return false;
@@ -691,6 +679,7 @@ function resolveLoaderPath(loaderBasename, importMetaUrl) {
691
679
  var isBrowser2, NODE_URL, NODE_FS, NODE_PATH;
692
680
  var init_workerResolver = __esm({
693
681
  "packages/domain/shared/src/workerResolver.ts"() {
682
+ "use strict";
694
683
  isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
695
684
  NODE_URL = typeof window === "undefined" || typeof document === "undefined" ? "node:url" : null;
696
685
  NODE_FS = typeof window === "undefined" || typeof document === "undefined" ? "node:fs" : null;
@@ -840,13 +829,13 @@ function generateClassRenameCodemod(renames, opts = {}) {
840
829
  }
841
830
  return lines.join("\n");
842
831
  }
843
- function generateBarrelFile(exports$1, dir, opts = {}) {
832
+ function generateBarrelFile(exports2, dir, opts = {}) {
844
833
  const { includeTypes = true } = opts;
845
834
  const lines = [];
846
835
  lines.push(`// Auto-generated barrel file for ${dir}`);
847
836
  lines.push(`// Run: npx tsx scripts/generate-barrel.ts to regenerate`);
848
837
  lines.push(``);
849
- for (const name of exports$1) {
838
+ for (const name of exports2) {
850
839
  lines.push(`export { default as ${name}, type ${name}Props } from "./${name}"`);
851
840
  if (includeTypes) {
852
841
  lines.push(`export type * from "./${name}"`);
@@ -856,8 +845,11 @@ function generateBarrelFile(exports$1, dir, opts = {}) {
856
845
  }
857
846
  var init_codegen = __esm({
858
847
  "packages/domain/shared/src/codegen.ts"() {
848
+ "use strict";
859
849
  }
860
850
  });
851
+
852
+ // packages/domain/shared/src/native-resolution.ts
861
853
  function platformKey() {
862
854
  if (isBrowser3) return "browser";
863
855
  return `${process.platform}-${process.arch}`;
@@ -873,7 +865,7 @@ function resolveNativeBinary(runtimeDir) {
873
865
  }
874
866
  const envPath = process.env.TW_NATIVE_PATH?.trim();
875
867
  if (envPath) {
876
- if (fs3__namespace.existsSync(envPath)) {
868
+ if (fs.existsSync(envPath)) {
877
869
  return { path: envPath, source: "env", platform, tried };
878
870
  }
879
871
  tried.push(`env:${envPath} (not found)`);
@@ -882,7 +874,7 @@ function resolveNativeBinary(runtimeDir) {
882
874
  for (const pkg of prebuiltPkgs) {
883
875
  try {
884
876
  const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
885
- if (fs3__namespace.existsSync(candidate)) {
877
+ if (fs.existsSync(candidate)) {
886
878
  return { path: candidate, source: "prebuilt", platform, tried };
887
879
  }
888
880
  tried.push(`prebuilt:${pkg} (resolved but missing)`);
@@ -893,13 +885,13 @@ function resolveNativeBinary(runtimeDir) {
893
885
  const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
894
886
  const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
895
887
  if (runtimeDir) {
896
- for (const depth of ["..", path__namespace.join("..", ".."), path__namespace.join("..", "..", "..")]) {
897
- const pkgRoot = path__namespace.resolve(runtimeDir, depth);
888
+ for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
889
+ const pkgRoot = path.resolve(runtimeDir, depth);
898
890
  for (const bin of BINARY_NAMES_SELF) {
899
891
  for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
900
- const candidate = path__namespace.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
892
+ const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
901
893
  tried.push(`self-bundled:${candidate}`);
902
- if (fs3__namespace.existsSync(candidate)) {
894
+ if (fs.existsSync(candidate)) {
903
895
  return { path: candidate, source: "prebuilt", platform, tried };
904
896
  }
905
897
  }
@@ -911,29 +903,29 @@ function resolveNativeBinary(runtimeDir) {
911
903
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
912
904
  const localCandidates = [];
913
905
  for (const bin of BINARY_NAMES) {
914
- localCandidates.push(path__namespace.resolve(base, `${bin}.node`));
915
- localCandidates.push(path__namespace.resolve(base, "..", `${bin}.node`));
916
- localCandidates.push(path__namespace.resolve(base, `${bin}.${platform}.node`));
917
- localCandidates.push(path__namespace.resolve(base, `${bin}.${napiPlatform}.node`));
906
+ localCandidates.push(path.resolve(base, `${bin}.node`));
907
+ localCandidates.push(path.resolve(base, "..", `${bin}.node`));
908
+ localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
909
+ localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
918
910
  }
919
911
  for (const startDir of [cwd, base]) {
920
912
  let dir = startDir;
921
913
  for (let i = 0; i < 6; i++) {
922
- const nativeDir = path__namespace.resolve(dir, "native");
914
+ const nativeDir = path.resolve(dir, "native");
923
915
  for (const bin of BINARY_NAMES) {
924
- localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.node`));
925
- localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.${platform}.node`));
926
- localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
927
- localCandidates.push(path__namespace.resolve(nativeDir, "target", "release", `${bin}.node`));
916
+ localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
917
+ localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
918
+ localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
919
+ localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
928
920
  }
929
- const parent = path__namespace.resolve(dir, "..");
921
+ const parent = path.resolve(dir, "..");
930
922
  if (parent === dir) break;
931
923
  dir = parent;
932
924
  }
933
925
  }
934
926
  for (const candidate of localCandidates) {
935
927
  tried.push(`local:${candidate}`);
936
- if (fs3__namespace.existsSync(candidate)) {
928
+ if (fs.existsSync(candidate)) {
937
929
  return { path: candidate, source: "local", platform, tried };
938
930
  }
939
931
  }
@@ -953,11 +945,16 @@ function formatNativeNotFoundError(result) {
953
945
  ];
954
946
  return lines.join("\n");
955
947
  }
956
- var isBrowser3, _require, PLATFORM_MAP;
948
+ var import_node_module, fs, path, import_meta2, isBrowser3, _require, PLATFORM_MAP;
957
949
  var init_native_resolution = __esm({
958
950
  "packages/domain/shared/src/native-resolution.ts"() {
951
+ "use strict";
952
+ import_node_module = require("module");
953
+ fs = __toESM(require("fs"));
954
+ path = __toESM(require("path"));
955
+ import_meta2 = {};
959
956
  isBrowser3 = typeof window !== "undefined" || typeof document !== "undefined";
960
- _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('shared.js', document.baseURI).href)));
957
+ _require = typeof require !== "undefined" ? require : (0, import_node_module.createRequire)(import_meta2.url);
961
958
  PLATFORM_MAP = {
962
959
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
963
960
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -1003,15 +1000,18 @@ function createObservabilityClient(opts = {}) {
1003
1000
  }
1004
1001
  var init_observability = __esm({
1005
1002
  "packages/domain/shared/src/observability.ts"() {
1003
+ "use strict";
1006
1004
  }
1007
1005
  });
1008
1006
 
1009
1007
  // packages/domain/compiler/src/nativeBridge.ts
1010
- var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
1008
+ var import_meta3, _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
1011
1009
  var init_nativeBridge = __esm({
1012
1010
  "packages/domain/compiler/src/nativeBridge.ts"() {
1011
+ "use strict";
1013
1012
  init_src2();
1014
- _loadNative = (path6) => __require(path6);
1013
+ import_meta3 = {};
1014
+ _loadNative = (path6) => require(path6);
1015
1015
  log = (...args) => {
1016
1016
  if (process.env.DEBUG?.includes("compiler:native")) {
1017
1017
  console.log("[compiler:native]", ...args);
@@ -1037,7 +1037,7 @@ var init_nativeBridge = __esm({
1037
1037
  }
1038
1038
  bridgeLoadAttempted = true;
1039
1039
  try {
1040
- const runtimeDir = resolveRuntimeDir(void 0, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)));
1040
+ const runtimeDir = resolveRuntimeDir(void 0, import_meta3.url);
1041
1041
  const result = resolveNativeBinary(runtimeDir);
1042
1042
  if (result.path && result.path.endsWith(".node")) {
1043
1043
  try {
@@ -1149,6 +1149,7 @@ function resetCacheStats() {
1149
1149
  }
1150
1150
  var init_cssGeneratorNative = __esm({
1151
1151
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
1152
+ "use strict";
1152
1153
  init_nativeBridge();
1153
1154
  }
1154
1155
  });
@@ -1221,6 +1222,7 @@ function atomicRegistrySize() {
1221
1222
  }
1222
1223
  var init_compilationNative = __esm({
1223
1224
  "packages/domain/compiler/src/compiler/compilationNative.ts"() {
1225
+ "use strict";
1224
1226
  init_nativeBridge();
1225
1227
  }
1226
1228
  });
@@ -1364,6 +1366,7 @@ function twMergeRaw(classLists) {
1364
1366
  }
1365
1367
  var init_cssCompilationNative = __esm({
1366
1368
  "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
1369
+ "use strict";
1367
1370
  init_nativeBridge();
1368
1371
  }
1369
1372
  });
@@ -1463,6 +1466,7 @@ function idRegistryImport(importedData) {
1463
1466
  }
1464
1467
  var init_idRegistryNative = __esm({
1465
1468
  "packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
1469
+ "use strict";
1466
1470
  init_nativeBridge();
1467
1471
  }
1468
1472
  });
@@ -1604,9 +1608,12 @@ function scanFilesBatchNative(filesJson) {
1604
1608
  }
1605
1609
  var init_streamingNative = __esm({
1606
1610
  "packages/domain/compiler/src/compiler/streamingNative.ts"() {
1611
+ "use strict";
1607
1612
  init_nativeBridge();
1608
1613
  }
1609
1614
  });
1615
+
1616
+ // packages/domain/compiler/src/tailwindEngine.ts
1610
1617
  function loadTailwindEngine() {
1611
1618
  if (_twEngine) return _twEngine;
1612
1619
  if (_twEngineError) throw _twEngineError;
@@ -1626,10 +1633,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
1626
1633
  if (classes.length === 0) return "";
1627
1634
  const tw = loadTailwindEngine();
1628
1635
  const input = cssEntryContent ?? "@import 'tailwindcss';";
1629
- const { readFileSync, existsSync: existsSync3 } = await import('fs');
1630
- const { dirname, resolve: resolve2 } = await import('path');
1636
+ const { readFileSync, existsSync: existsSync3 } = await import("fs");
1637
+ const { dirname, resolve: resolve2 } = await import("path");
1631
1638
  const projectRoot = root ?? process.cwd();
1632
- const req = module$1.createRequire(resolve2(projectRoot, "package.json"));
1639
+ const req = (0, import_node_module2.createRequire)(resolve2(projectRoot, "package.json"));
1633
1640
  const loadStylesheet = async (id, base) => {
1634
1641
  try {
1635
1642
  const cssId = id === "tailwindcss" ? "tailwindcss/index.css" : id === "tailwindcss/preflight" ? "tailwindcss/preflight.css" : id === "tailwindcss/utilities" ? "tailwindcss/utilities.css" : id === "tailwindcss/theme" ? "tailwindcss/theme.css" : id;
@@ -1649,10 +1656,14 @@ async function generateRawCss(classes, cssEntryContent, root) {
1649
1656
  const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
1650
1657
  return compiler.build(classes);
1651
1658
  }
1652
- var require2, _twEngine, _twEngineError;
1659
+ var import_node_module2, import_meta4, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
1653
1660
  var init_tailwindEngine = __esm({
1654
1661
  "packages/domain/compiler/src/tailwindEngine.ts"() {
1655
- require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)));
1662
+ "use strict";
1663
+ import_node_module2 = require("module");
1664
+ import_meta4 = {};
1665
+ require2 = (0, import_node_module2.createRequire)(import_meta4.url);
1666
+ MAX_CACHE_MEMORY = 256 * 1024;
1656
1667
  _twEngine = null;
1657
1668
  _twEngineError = null;
1658
1669
  }
@@ -1833,24 +1844,29 @@ function processTailwindCssWithTargets(css, targets) {
1833
1844
  }
1834
1845
  return result.css;
1835
1846
  }
1836
- var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
1847
+ var import_node_module3, import_meta5, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
1837
1848
  var init_tailwindEngine2 = __esm({
1838
1849
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1850
+ "use strict";
1851
+ import_node_module3 = require("module");
1839
1852
  init_nativeBridge();
1840
1853
  init_cssGeneratorNative();
1841
1854
  init_cssCompilationNative();
1842
1855
  init_tailwindEngine();
1843
- module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)));
1856
+ import_meta5 = {};
1857
+ require3 = (0, import_node_module3.createRequire)(import_meta5.url);
1844
1858
  _cssCache = /* @__PURE__ */ new Map();
1845
1859
  _cacheHits = 0;
1846
1860
  _cacheMisses = 0;
1847
1861
  MAX_CACHE_SIZE = 100;
1862
+ MAX_CACHE_MEMORY2 = 256 * 1024;
1848
1863
  }
1849
1864
  });
1850
1865
 
1851
1866
  // packages/domain/compiler/src/compiler/index.ts
1852
1867
  var init_compiler = __esm({
1853
1868
  "packages/domain/compiler/src/compiler/index.ts"() {
1869
+ "use strict";
1854
1870
  init_cssGeneratorNative();
1855
1871
  init_compilationNative();
1856
1872
  init_cssCompilationNative();
@@ -1863,6 +1879,7 @@ var init_compiler = __esm({
1863
1879
  var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
1864
1880
  var init_parser = __esm({
1865
1881
  "packages/domain/compiler/src/parser/index.ts"() {
1882
+ "use strict";
1866
1883
  init_nativeBridge();
1867
1884
  parseClasses = (raw) => {
1868
1885
  const native = getNativeBridge();
@@ -2041,6 +2058,7 @@ function resetMemoryStats() {
2041
2058
  }
2042
2059
  var init_analyzerNative = __esm({
2043
2060
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
2061
+ "use strict";
2044
2062
  init_nativeBridge();
2045
2063
  }
2046
2064
  });
@@ -2134,6 +2152,7 @@ function resolveSimpleVariants(configJson) {
2134
2152
  }
2135
2153
  var init_themeResolutionNative = __esm({
2136
2154
  "packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
2155
+ "use strict";
2137
2156
  init_nativeBridge();
2138
2157
  }
2139
2158
  });
@@ -2181,6 +2200,7 @@ function generateSubComponentTypes(root, outputPath) {
2181
2200
  }
2182
2201
  var init_scannerNative = __esm({
2183
2202
  "packages/domain/compiler/src/analyzer/scannerNative.ts"() {
2203
+ "use strict";
2184
2204
  init_nativeBridge();
2185
2205
  }
2186
2206
  });
@@ -2188,6 +2208,7 @@ var init_scannerNative = __esm({
2188
2208
  // packages/domain/compiler/src/analyzer/index.ts
2189
2209
  var init_analyzer = __esm({
2190
2210
  "packages/domain/compiler/src/analyzer/index.ts"() {
2211
+ "use strict";
2191
2212
  init_analyzerNative();
2192
2213
  init_themeResolutionNative();
2193
2214
  init_scannerNative();
@@ -2376,6 +2397,7 @@ function resetResolverPoolStats() {
2376
2397
  }
2377
2398
  var init_cacheNative = __esm({
2378
2399
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
2400
+ "use strict";
2379
2401
  init_nativeBridge();
2380
2402
  }
2381
2403
  });
@@ -2383,6 +2405,7 @@ var init_cacheNative = __esm({
2383
2405
  // packages/domain/compiler/src/cache/index.ts
2384
2406
  var init_cache = __esm({
2385
2407
  "packages/domain/compiler/src/cache/index.ts"() {
2408
+ "use strict";
2386
2409
  init_cacheNative();
2387
2410
  }
2388
2411
  });
@@ -2631,6 +2654,7 @@ function redisDiagnose() {
2631
2654
  }
2632
2655
  var init_redisNative = __esm({
2633
2656
  "packages/domain/compiler/src/redis/redisNative.ts"() {
2657
+ "use strict";
2634
2658
  init_nativeBridge();
2635
2659
  }
2636
2660
  });
@@ -2638,6 +2662,7 @@ var init_redisNative = __esm({
2638
2662
  // packages/domain/compiler/src/redis/index.ts
2639
2663
  var init_redis = __esm({
2640
2664
  "packages/domain/compiler/src/redis/index.ts"() {
2665
+ "use strict";
2641
2666
  init_redisNative();
2642
2667
  }
2643
2668
  });
@@ -2776,6 +2801,7 @@ function getCompilerDiagnostics() {
2776
2801
  }
2777
2802
  var init_watchSystemNative = __esm({
2778
2803
  "packages/domain/compiler/src/watch/watchSystemNative.ts"() {
2804
+ "use strict";
2779
2805
  init_nativeBridge();
2780
2806
  }
2781
2807
  });
@@ -2783,9 +2809,12 @@ var init_watchSystemNative = __esm({
2783
2809
  // packages/domain/compiler/src/watch/index.ts
2784
2810
  var init_watch = __esm({
2785
2811
  "packages/domain/compiler/src/watch/index.ts"() {
2812
+ "use strict";
2786
2813
  init_watchSystemNative();
2787
2814
  }
2788
2815
  });
2816
+
2817
+ // packages/domain/compiler/src/index.ts
2789
2818
  function _layoutClassesToCss(classes) {
2790
2819
  const native = getNativeBridge();
2791
2820
  if (!native?.layoutClassesToCss) {
@@ -2820,9 +2849,13 @@ function extractContainerCssFromSource(source) {
2820
2849
  }
2821
2850
  return rules.join("\n");
2822
2851
  }
2823
- var _require2, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
2852
+ var import_node_fs, import_node_path, import_node_module4, import_meta6, _require2, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
2824
2853
  var init_src = __esm({
2825
2854
  "packages/domain/compiler/src/index.ts"() {
2855
+ "use strict";
2856
+ import_node_fs = __toESM(require("fs"), 1);
2857
+ import_node_path = __toESM(require("path"), 1);
2858
+ import_node_module4 = require("module");
2826
2859
  init_nativeBridge();
2827
2860
  init_compiler();
2828
2861
  init_parser();
@@ -2830,7 +2863,8 @@ var init_src = __esm({
2830
2863
  init_cache();
2831
2864
  init_redis();
2832
2865
  init_watch();
2833
- _require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)));
2866
+ import_meta6 = {};
2867
+ _require2 = (0, import_node_module4.createRequire)(import_meta6.url);
2834
2868
  transformSource = (source, opts) => {
2835
2869
  const native = getNativeBridge();
2836
2870
  if (!native?.transformSource) {
@@ -2922,7 +2956,7 @@ var init_src = __esm({
2922
2956
  };
2923
2957
  scanProjectUsage = (dirs, cwd) => {
2924
2958
  const { batchExtractClasses: batchExtractClasses2 } = _require2("./parser");
2925
- const files = dirs.map((dir) => path__namespace.default.resolve(cwd, dir));
2959
+ const files = dirs.map((dir) => import_node_path.default.resolve(cwd, dir));
2926
2960
  const results = batchExtractClasses2(files) || [];
2927
2961
  const combined = {};
2928
2962
  for (const result of results) {
@@ -2939,13 +2973,13 @@ var init_src = __esm({
2939
2973
  const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
2940
2974
  const allClasses = Object.keys(classes).sort();
2941
2975
  if (outputPath) {
2942
- fs3__namespace.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
2976
+ import_node_fs.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
2943
2977
  }
2944
2978
  return allClasses;
2945
2979
  };
2946
2980
  loadSafelist = (safelistPath) => {
2947
2981
  try {
2948
- const content = fs3__namespace.default.readFileSync(safelistPath, "utf-8");
2982
+ const content = import_node_fs.default.readFileSync(safelistPath, "utf-8");
2949
2983
  return JSON.parse(content);
2950
2984
  } catch {
2951
2985
  return [];
@@ -2959,9 +2993,9 @@ var init_src = __esm({
2959
2993
  "tailwind.config.cjs"
2960
2994
  ];
2961
2995
  for (const file of configFiles) {
2962
- const fullPath = path__namespace.default.join(cwd, file);
2963
- if (fs3__namespace.default.existsSync(fullPath)) {
2964
- const mod = __require(fullPath);
2996
+ const fullPath = import_node_path.default.join(cwd, file);
2997
+ if (import_node_fs.default.existsSync(fullPath)) {
2998
+ const mod = require(fullPath);
2965
2999
  return mod.default || mod;
2966
3000
  }
2967
3001
  }
@@ -2970,9 +3004,9 @@ var init_src = __esm({
2970
3004
  getContentPaths = (cwd = process.cwd()) => {
2971
3005
  return {
2972
3006
  content: [
2973
- path__namespace.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
2974
- path__namespace.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
2975
- path__namespace.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
3007
+ import_node_path.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
3008
+ import_node_path.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
3009
+ import_node_path.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
2976
3010
  ]
2977
3011
  };
2978
3012
  };
@@ -3386,6 +3420,7 @@ __export(internal_exports, {
3386
3420
  });
3387
3421
  var init_internal = __esm({
3388
3422
  "packages/domain/compiler/src/internal.ts"() {
3423
+ "use strict";
3389
3424
  init_src();
3390
3425
  init_tailwindEngine2();
3391
3426
  init_compiler();
@@ -3396,6 +3431,8 @@ var init_internal = __esm({
3396
3431
  init_watch();
3397
3432
  }
3398
3433
  });
3434
+
3435
+ // packages/domain/shared/src/staticStateExtractor.ts
3399
3436
  function getNative() {
3400
3437
  if (_native) return _native;
3401
3438
  try {
@@ -3425,17 +3462,17 @@ function getNative() {
3425
3462
  function* walkSourceFiles(dir) {
3426
3463
  let entries;
3427
3464
  try {
3428
- entries = fs3__namespace.default.readdirSync(dir, { withFileTypes: true });
3465
+ entries = import_node_fs2.default.readdirSync(dir, { withFileTypes: true });
3429
3466
  } catch {
3430
3467
  return;
3431
3468
  }
3432
3469
  for (const entry of entries) {
3433
- const fullPath = path__namespace.default.join(dir, entry.name);
3470
+ const fullPath = import_node_path2.default.join(dir, entry.name);
3434
3471
  if (entry.isDirectory()) {
3435
3472
  if (IGNORE_PATTERNS.some((p) => entry.name === p || entry.name.startsWith(p))) continue;
3436
3473
  yield* walkSourceFiles(fullPath);
3437
3474
  } else if (entry.isFile()) {
3438
- const ext = path__namespace.default.extname(entry.name);
3475
+ const ext = import_node_path2.default.extname(entry.name);
3439
3476
  if (SOURCE_EXTENSIONS.has(ext)) yield fullPath;
3440
3477
  }
3441
3478
  }
@@ -3499,7 +3536,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3499
3536
  allConfigs.push(...configs);
3500
3537
  if (verbose) {
3501
3538
  process.stderr.write(
3502
- `[tw:static-state] ${path__namespace.default.relative(srcDir, filePath)}: ${configs.length} komponen
3539
+ `[tw:static-state] ${import_node_path2.default.relative(srcDir, filePath)}: ${configs.length} komponen
3503
3540
  `
3504
3541
  );
3505
3542
  }
@@ -3510,7 +3547,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3510
3547
  if (filesScanned >= maxFiles) break;
3511
3548
  let source;
3512
3549
  try {
3513
- source = fs3__namespace.default.readFileSync(filePath, "utf-8");
3550
+ source = import_node_fs2.default.readFileSync(filePath, "utf-8");
3514
3551
  } catch {
3515
3552
  continue;
3516
3553
  }
@@ -3523,7 +3560,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3523
3560
  allConfigs.push(...configs);
3524
3561
  if (verbose) {
3525
3562
  process.stderr.write(
3526
- `[tw:static-state] ${path__namespace.default.relative(srcDir, filePath)}: ${configs.length} komponen
3563
+ `[tw:static-state] ${import_node_path2.default.relative(srcDir, filePath)}: ${configs.length} komponen
3527
3564
  `
3528
3565
  );
3529
3566
  }
@@ -3617,12 +3654,12 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3617
3654
  resolvedCss: options.resolvedCss || ""
3618
3655
  // ← ensure always passed
3619
3656
  });
3620
- const twClassesDir = path__namespace.default.join(path__namespace.default.dirname(safelistPath), "tw-classes");
3621
- fs3__namespace.default.mkdirSync(twClassesDir, { recursive: true });
3622
- const stateFilePath = path__namespace.default.join(twClassesDir, exports.TW_STATE_STATIC_FILENAME);
3657
+ const twClassesDir = import_node_path2.default.join(import_node_path2.default.dirname(safelistPath), "tw-classes");
3658
+ import_node_fs2.default.mkdirSync(twClassesDir, { recursive: true });
3659
+ const stateFilePath = import_node_path2.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);
3623
3660
  if (result.rulesGenerated === 0) {
3624
3661
  try {
3625
- fs3__namespace.default.writeFileSync(
3662
+ import_node_fs2.default.writeFileSync(
3626
3663
  stateFilePath,
3627
3664
  "/* tw-state-static.css \u2014 tidak ada state rules yang di-generate */\n",
3628
3665
  "utf-8"
@@ -3632,27 +3669,32 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3632
3669
  return `[tw:static-state] tidak ada state rules yang di-generate (${result.filesScanned} files di-scan)`;
3633
3670
  }
3634
3671
  try {
3635
- fs3__namespace.default.writeFileSync(stateFilePath, result.generatedCss, "utf-8");
3672
+ import_node_fs2.default.writeFileSync(stateFilePath, result.generatedCss, "utf-8");
3636
3673
  return [
3637
3674
  `[tw:static-state] ${result.rulesGenerated} static state rules di-generate`,
3638
3675
  ` \u2192 ${result.filesScanned} files scanned, ${result.filesWithStates} dengan states`,
3639
3676
  ` \u2192 ${result.componentsFound} components, ${result.rulesSkipped} rules skipped (fallback ke runtime)`,
3640
- ` \u2192 ditulis ke tw-classes/${exports.TW_STATE_STATIC_FILENAME}`
3677
+ ` \u2192 ditulis ke tw-classes/${TW_STATE_STATIC_FILENAME}`
3641
3678
  ].join("\n");
3642
3679
  } catch (writeErr) {
3643
3680
  const msg = writeErr instanceof Error ? writeErr.message : String(writeErr);
3644
3681
  return `[tw:static-state] gagal tulis state CSS: ${msg}`;
3645
3682
  }
3646
3683
  }
3647
- var SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native; exports.TW_STATE_STATIC_FILENAME = void 0;
3684
+ var import_node_fs2, import_node_path2, SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native, TW_STATE_STATIC_FILENAME;
3648
3685
  var init_staticStateExtractor = __esm({
3649
3686
  "packages/domain/shared/src/staticStateExtractor.ts"() {
3687
+ "use strict";
3688
+ import_node_fs2 = __toESM(require("fs"));
3689
+ import_node_path2 = __toESM(require("path"));
3650
3690
  SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs"]);
3651
3691
  IGNORE_PATTERNS = ["node_modules", ".next", "dist", "build", ".git", "coverage", "__tests__"];
3652
3692
  _native = null;
3653
- exports.TW_STATE_STATIC_FILENAME = "_tw-state-static.css";
3693
+ TW_STATE_STATIC_FILENAME = "_tw-state-static.css";
3654
3694
  }
3655
3695
  });
3696
+
3697
+ // packages/domain/shared/src/logger.ts
3656
3698
  function getEnvLevel() {
3657
3699
  const env = process.env.TWS_LOG_LEVEL?.toLowerCase();
3658
3700
  if (env && env in LEVELS) return env;
@@ -3662,8 +3704,8 @@ function setGlobalLogFile(filePath) {
3662
3704
  _globalLogFile = filePath;
3663
3705
  _logFileInitialized = false;
3664
3706
  try {
3665
- fs3__namespace.default.mkdirSync(path__namespace.default.dirname(filePath), { recursive: true });
3666
- fs3__namespace.default.writeFileSync(
3707
+ import_node_fs3.default.mkdirSync(import_node_path3.default.dirname(filePath), { recursive: true });
3708
+ import_node_fs3.default.writeFileSync(
3667
3709
  filePath,
3668
3710
  `# tailwind-styled build log \u2014 ${(/* @__PURE__ */ new Date()).toISOString()}
3669
3711
  `,
@@ -3676,13 +3718,13 @@ function setGlobalLogFile(filePath) {
3676
3718
  function writeToFile(line) {
3677
3719
  if (!_globalLogFile || !_logFileInitialized) return;
3678
3720
  try {
3679
- fs3__namespace.default.appendFileSync(_globalLogFile, line);
3721
+ import_node_fs3.default.appendFileSync(_globalLogFile, line);
3680
3722
  } catch {
3681
3723
  }
3682
3724
  }
3683
3725
  function createLogger(prefix, level) {
3684
3726
  const loggerState = {
3685
- currentLevel: getEnvLevel(),
3727
+ currentLevel: level ?? getEnvLevel(),
3686
3728
  setLevel(l) {
3687
3729
  this.currentLevel = l;
3688
3730
  }
@@ -3703,15 +3745,20 @@ function createLogger(prefix, level) {
3703
3745
  setLogFile: (filePath) => setGlobalLogFile(filePath)
3704
3746
  };
3705
3747
  }
3706
- var LEVELS, _globalLogFile, _logFileInitialized;
3748
+ var import_node_fs3, import_node_path3, LEVELS, _globalLogFile, _logFileInitialized, logger;
3707
3749
  var init_logger = __esm({
3708
3750
  "packages/domain/shared/src/logger.ts"() {
3751
+ "use strict";
3752
+ import_node_fs3 = __toESM(require("fs"));
3753
+ import_node_path3 = __toESM(require("path"));
3709
3754
  LEVELS = { silent: 0, error: 1, warn: 2, info: 3, debug: 4 };
3710
3755
  _globalLogFile = null;
3711
3756
  _logFileInitialized = false;
3712
- createLogger("tailwind-styled");
3757
+ logger = createLogger("tailwind-styled");
3713
3758
  }
3714
3759
  });
3760
+
3761
+ // packages/domain/shared/src/index.ts
3715
3762
  function createLogger2(namespace) {
3716
3763
  const prefix = `[${namespace}]`;
3717
3764
  return {
@@ -3748,18 +3795,18 @@ function formatIssuePath(path6) {
3748
3795
  ).join(".");
3749
3796
  }
3750
3797
  function wrapUnknownError(domain, code, error) {
3751
- return exports.TwError.wrap(domain, code, error);
3798
+ return TwError.wrap(domain, code, error);
3752
3799
  }
3753
3800
  function isTwError(err) {
3754
- return err instanceof exports.TwError;
3801
+ return err instanceof TwError;
3755
3802
  }
3756
3803
  function loadNativeBinding(options) {
3757
3804
  const { runtimeDir, candidates, isValid } = options;
3758
3805
  const loadErrors = [];
3759
3806
  for (const candidate of candidates) {
3760
- const candidatePath = path__namespace.default.resolve(runtimeDir, candidate);
3807
+ const candidatePath = import_node_path4.default.resolve(runtimeDir, candidate);
3761
3808
  try {
3762
- if (!fs3__namespace.default.existsSync(candidatePath) && !fs3__namespace.default.existsSync(candidatePath + ".node")) {
3809
+ if (!import_node_fs4.default.existsSync(candidatePath) && !import_node_fs4.default.existsSync(candidatePath + ".node")) {
3763
3810
  continue;
3764
3811
  }
3765
3812
  const mod = requireNativeModule(candidatePath);
@@ -3791,9 +3838,9 @@ function resolveNativeBindingCandidates(options) {
3791
3838
  }
3792
3839
  }
3793
3840
  if (!includeDefaultCandidates) return candidates;
3794
- if (fs3__namespace.default.existsSync(runtimeDir)) {
3841
+ if (import_node_fs4.default.existsSync(runtimeDir)) {
3795
3842
  try {
3796
- for (const entry of fs3__namespace.default.readdirSync(runtimeDir)) {
3843
+ for (const entry of import_node_fs4.default.readdirSync(runtimeDir)) {
3797
3844
  if (entry.endsWith(".node")) candidates.push(entry);
3798
3845
  }
3799
3846
  } catch {
@@ -3802,38 +3849,44 @@ function resolveNativeBindingCandidates(options) {
3802
3849
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
3803
3850
  const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
3804
3851
  for (const bin of BINARY_NAMES) {
3805
- candidates.push(path__namespace.default.resolve(runtimeDir, `${bin}.node`));
3806
- candidates.push(path__namespace.default.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3807
- candidates.push(path__namespace.default.resolve(runtimeDir, "..", "native", `${bin}.node`));
3808
- candidates.push(path__namespace.default.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3809
- candidates.push(path__namespace.default.resolve(process.cwd(), "native", `${bin}.node`));
3810
- candidates.push(path__namespace.default.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3811
- candidates.push(path__namespace.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3812
- candidates.push(path__namespace.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3813
- candidates.push(path__namespace.default.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3852
+ candidates.push(import_node_path4.default.resolve(runtimeDir, `${bin}.node`));
3853
+ candidates.push(import_node_path4.default.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3854
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "native", `${bin}.node`));
3855
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3856
+ candidates.push(import_node_path4.default.resolve(process.cwd(), "native", `${bin}.node`));
3857
+ candidates.push(import_node_path4.default.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3858
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3859
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3860
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3814
3861
  }
3815
3862
  return Array.from(new Set(candidates));
3816
3863
  }
3817
3864
  function resolveRuntimeDir(dir, importMetaUrl) {
3818
- if (dir) return path__namespace.default.resolve(dir);
3865
+ if (dir) return import_node_path4.default.resolve(dir);
3819
3866
  try {
3820
- return path__namespace.default.dirname(url.fileURLToPath(importMetaUrl));
3867
+ return import_node_path4.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
3821
3868
  } catch {
3822
3869
  return process.cwd();
3823
3870
  }
3824
3871
  }
3825
3872
  function hashContent2(content, algorithm = "md5", length) {
3826
- const hash = crypto.createHash(algorithm).update(content).digest("hex");
3873
+ const hash = (0, import_node_crypto.createHash)(algorithm).update(content).digest("hex");
3827
3874
  return length ? hash.slice(0, length) : hash;
3828
3875
  }
3829
3876
  function formatErrorMessage(error) {
3830
- if (error instanceof exports.TwError) return error.toString();
3877
+ if (error instanceof TwError) return error.toString();
3831
3878
  if (error instanceof Error) return error.message;
3832
3879
  return String(error);
3833
3880
  }
3834
- exports.TwError = void 0; var _require3; exports.LRUCache = void 0;
3881
+ var import_node_crypto, import_node_fs4, import_node_path4, import_node_url, import_node_module5, import_meta7, TwError, _require3, LRUCache;
3835
3882
  var init_src2 = __esm({
3836
3883
  "packages/domain/shared/src/index.ts"() {
3884
+ "use strict";
3885
+ import_node_crypto = require("crypto");
3886
+ import_node_fs4 = __toESM(require("fs"));
3887
+ import_node_path4 = __toESM(require("path"));
3888
+ import_node_url = require("url");
3889
+ import_node_module5 = require("module");
3837
3890
  init_trace();
3838
3891
  init_error_codes();
3839
3892
  init_compatibility();
@@ -3847,7 +3900,8 @@ var init_src2 = __esm({
3847
3900
  init_observability();
3848
3901
  init_staticStateExtractor();
3849
3902
  init_logger();
3850
- exports.TwError = class _TwError extends Error {
3903
+ import_meta7 = {};
3904
+ TwError = class _TwError extends Error {
3851
3905
  /** @deprecated Gunakan source */
3852
3906
  domain;
3853
3907
  source;
@@ -3899,8 +3953,8 @@ var init_src2 = __esm({
3899
3953
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
3900
3954
  }
3901
3955
  };
3902
- _require3 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared.js', document.baseURI).href)));
3903
- exports.LRUCache = class {
3956
+ _require3 = (0, import_node_module5.createRequire)(import_meta7.url);
3957
+ LRUCache = class {
3904
3958
  capacity;
3905
3959
  cache;
3906
3960
  constructor(capacity) {
@@ -3945,56 +3999,148 @@ var init_src2 = __esm({
3945
3999
  });
3946
4000
 
3947
4001
  // src/umbrella/shared.ts
4002
+ var shared_exports = {};
4003
+ __export(shared_exports, {
4004
+ ERROR_CODES: () => ERROR_CODES,
4005
+ LRUCache: () => LRUCache,
4006
+ NativeAnalyzerReportSchema: () => NativeAnalyzerReportSchema,
4007
+ NativeCacheEntrySchema: () => NativeCacheEntrySchema,
4008
+ NativeCacheReadResultSchema: () => NativeCacheReadResultSchema,
4009
+ NativeCssCompileResultSchema: () => NativeCssCompileResultSchema,
4010
+ NativeScanFileSchema: () => NativeScanFileSchema,
4011
+ NativeScanResultSchema: () => NativeScanResultSchema,
4012
+ NativeTransformResultSchema: () => NativeTransformResultSchema,
4013
+ NativeWatchResultSchema: () => NativeWatchResultSchema,
4014
+ PackageJsonSchema: () => PackageJsonSchema,
4015
+ RegistryFileSchema: () => RegistryFileSchema,
4016
+ RegistryPluginEntrySchema: () => RegistryPluginEntrySchema,
4017
+ ScanCacheClassEntrySchema: () => ScanCacheClassEntrySchema,
4018
+ ScanCacheSchema: () => ScanCacheSchema,
4019
+ TW_STATE_STATIC_FILENAME: () => TW_STATE_STATIC_FILENAME,
4020
+ TailwindConfigSchema: () => TailwindConfigSchema,
4021
+ TelemetryCollector: () => TelemetryCollector,
4022
+ TwError: () => TwError,
4023
+ appendStaticStateCssToSafelist: () => appendStaticStateCssToSafelist,
4024
+ assertTailwindV4: () => assertTailwindV4,
4025
+ calculateHealth: () => calculateHealth,
4026
+ createBuildTimer: () => createBuildTimer,
4027
+ createDebugLogger: () => createDebugLogger,
4028
+ createEsmRequire: () => createEsmRequire,
4029
+ createLogger: () => createLogger2,
4030
+ createObservabilityClient: () => createObservabilityClient,
4031
+ createTraceSnapshot: () => createTraceSnapshot,
4032
+ detectTailwind: () => detectTailwind,
4033
+ extractStaticStateCss: () => extractStaticStateCss,
4034
+ formatDuration: () => formatDuration,
4035
+ formatErrorCode: () => formatErrorCode,
4036
+ formatErrorMessage: () => formatErrorMessage,
4037
+ formatMemory: () => formatMemory,
4038
+ formatNativeNotFoundError: () => formatNativeNotFoundError,
4039
+ generateBarrelFile: () => generateBarrelFile,
4040
+ generateClassRenameCodemod: () => generateClassRenameCodemod,
4041
+ generateComponentCode: () => generateComponentCode,
4042
+ generateStorybookStory: () => generateStorybookStory,
4043
+ getBuildTimeColor: () => getBuildTimeColor,
4044
+ getDirname: () => getDirname,
4045
+ getFilename: () => getFilename,
4046
+ getGlobalTelemetry: () => getGlobalTelemetry,
4047
+ getHealthColor: () => getHealthColor,
4048
+ getMemoryColor: () => getMemoryColor,
4049
+ getModeColor: () => getModeColor,
4050
+ getPipelinePercentages: () => getPipelinePercentages,
4051
+ getSuggestion: () => getSuggestion,
4052
+ getTailwindVersion: () => getTailwindVersion,
4053
+ hashContent: () => hashContent2,
4054
+ isTailwindV4: () => isTailwindV4,
4055
+ isTwError: () => isTwError,
4056
+ loadNativeBinding: () => loadNativeBinding,
4057
+ parseJsonFileWithSchema: () => parseJsonFileWithSchema,
4058
+ parseJsonWithSchema: () => parseJsonWithSchema,
4059
+ parseNative: () => parseNative,
4060
+ resetGlobalTelemetry: () => resetGlobalTelemetry,
4061
+ resolveFromRoot: () => resolveFromRoot,
4062
+ resolveLoaderPath: () => resolveLoaderPath,
4063
+ resolveNativeBinary: () => resolveNativeBinary,
4064
+ resolveNativeBindingCandidates: () => resolveNativeBindingCandidates,
4065
+ resolveNativeNodePath: () => resolveNativeNodePath,
4066
+ resolveRuntimeDir: () => resolveRuntimeDir,
4067
+ resolveWorkerPath: () => resolveWorkerPath,
4068
+ safeParseNative: () => safeParseNative,
4069
+ setGlobalLogFile: () => setGlobalLogFile,
4070
+ tryRequire: () => tryRequire,
4071
+ wrapUnknownError: () => wrapUnknownError
4072
+ });
4073
+ module.exports = __toCommonJS(shared_exports);
3948
4074
  init_src2();
3949
-
3950
- exports.appendStaticStateCssToSafelist = appendStaticStateCssToSafelist;
3951
- exports.assertTailwindV4 = assertTailwindV4;
3952
- exports.calculateHealth = calculateHealth;
3953
- exports.createBuildTimer = createBuildTimer;
3954
- exports.createDebugLogger = createDebugLogger;
3955
- exports.createEsmRequire = createEsmRequire;
3956
- exports.createLogger = createLogger2;
3957
- exports.createObservabilityClient = createObservabilityClient;
3958
- exports.createTraceSnapshot = createTraceSnapshot;
3959
- exports.detectTailwind = detectTailwind;
3960
- exports.extractStaticStateCss = extractStaticStateCss;
3961
- exports.formatDuration = formatDuration;
3962
- exports.formatErrorCode = formatErrorCode;
3963
- exports.formatErrorMessage = formatErrorMessage;
3964
- exports.formatMemory = formatMemory;
3965
- exports.formatNativeNotFoundError = formatNativeNotFoundError;
3966
- exports.generateBarrelFile = generateBarrelFile;
3967
- exports.generateClassRenameCodemod = generateClassRenameCodemod;
3968
- exports.generateComponentCode = generateComponentCode;
3969
- exports.generateStorybookStory = generateStorybookStory;
3970
- exports.getBuildTimeColor = getBuildTimeColor;
3971
- exports.getDirname = getDirname;
3972
- exports.getFilename = getFilename;
3973
- exports.getGlobalTelemetry = getGlobalTelemetry;
3974
- exports.getHealthColor = getHealthColor;
3975
- exports.getMemoryColor = getMemoryColor;
3976
- exports.getModeColor = getModeColor;
3977
- exports.getPipelinePercentages = getPipelinePercentages;
3978
- exports.getSuggestion = getSuggestion;
3979
- exports.getTailwindVersion = getTailwindVersion;
3980
- exports.hashContent = hashContent2;
3981
- exports.isTailwindV4 = isTailwindV4;
3982
- exports.isTwError = isTwError;
3983
- exports.loadNativeBinding = loadNativeBinding;
3984
- exports.parseJsonFileWithSchema = parseJsonFileWithSchema;
3985
- exports.parseJsonWithSchema = parseJsonWithSchema;
3986
- exports.parseNative = parseNative;
3987
- exports.resetGlobalTelemetry = resetGlobalTelemetry;
3988
- exports.resolveFromRoot = resolveFromRoot;
3989
- exports.resolveLoaderPath = resolveLoaderPath;
3990
- exports.resolveNativeBinary = resolveNativeBinary;
3991
- exports.resolveNativeBindingCandidates = resolveNativeBindingCandidates;
3992
- exports.resolveNativeNodePath = resolveNativeNodePath;
3993
- exports.resolveRuntimeDir = resolveRuntimeDir;
3994
- exports.resolveWorkerPath = resolveWorkerPath;
3995
- exports.safeParseNative = safeParseNative;
3996
- exports.setGlobalLogFile = setGlobalLogFile;
3997
- exports.tryRequire = tryRequire;
3998
- exports.wrapUnknownError = wrapUnknownError;
3999
- //# sourceMappingURL=shared.js.map
4075
+ // Annotate the CommonJS export names for ESM import in node:
4076
+ 0 && (module.exports = {
4077
+ ERROR_CODES,
4078
+ LRUCache,
4079
+ NativeAnalyzerReportSchema,
4080
+ NativeCacheEntrySchema,
4081
+ NativeCacheReadResultSchema,
4082
+ NativeCssCompileResultSchema,
4083
+ NativeScanFileSchema,
4084
+ NativeScanResultSchema,
4085
+ NativeTransformResultSchema,
4086
+ NativeWatchResultSchema,
4087
+ PackageJsonSchema,
4088
+ RegistryFileSchema,
4089
+ RegistryPluginEntrySchema,
4090
+ ScanCacheClassEntrySchema,
4091
+ ScanCacheSchema,
4092
+ TW_STATE_STATIC_FILENAME,
4093
+ TailwindConfigSchema,
4094
+ TelemetryCollector,
4095
+ TwError,
4096
+ appendStaticStateCssToSafelist,
4097
+ assertTailwindV4,
4098
+ calculateHealth,
4099
+ createBuildTimer,
4100
+ createDebugLogger,
4101
+ createEsmRequire,
4102
+ createLogger,
4103
+ createObservabilityClient,
4104
+ createTraceSnapshot,
4105
+ detectTailwind,
4106
+ extractStaticStateCss,
4107
+ formatDuration,
4108
+ formatErrorCode,
4109
+ formatErrorMessage,
4110
+ formatMemory,
4111
+ formatNativeNotFoundError,
4112
+ generateBarrelFile,
4113
+ generateClassRenameCodemod,
4114
+ generateComponentCode,
4115
+ generateStorybookStory,
4116
+ getBuildTimeColor,
4117
+ getDirname,
4118
+ getFilename,
4119
+ getGlobalTelemetry,
4120
+ getHealthColor,
4121
+ getMemoryColor,
4122
+ getModeColor,
4123
+ getPipelinePercentages,
4124
+ getSuggestion,
4125
+ getTailwindVersion,
4126
+ hashContent,
4127
+ isTailwindV4,
4128
+ isTwError,
4129
+ loadNativeBinding,
4130
+ parseJsonFileWithSchema,
4131
+ parseJsonWithSchema,
4132
+ parseNative,
4133
+ resetGlobalTelemetry,
4134
+ resolveFromRoot,
4135
+ resolveLoaderPath,
4136
+ resolveNativeBinary,
4137
+ resolveNativeBindingCandidates,
4138
+ resolveNativeNodePath,
4139
+ resolveRuntimeDir,
4140
+ resolveWorkerPath,
4141
+ safeParseNative,
4142
+ setGlobalLogFile,
4143
+ tryRequire,
4144
+ wrapUnknownError
4145
+ });
4000
4146
  //# sourceMappingURL=shared.js.map