tailwind-styled-v4 5.0.37 → 5.0.39

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 (123) hide show
  1. package/dist/analyzer.js +213 -161
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +121 -83
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +131 -87
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +31 -15
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +107 -67
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +47 -14
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +601 -428
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +504 -313
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +833 -508
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +298 -30
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +72 -41
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/dashboard.mjs +12 -6
  24. package/dist/dashboard.mjs.map +1 -1
  25. package/dist/devtools.js +335 -289
  26. package/dist/devtools.js.map +1 -1
  27. package/dist/devtools.mjs +28 -11
  28. package/dist/devtools.mjs.map +1 -1
  29. package/dist/engine.js +719 -506
  30. package/dist/engine.js.map +1 -1
  31. package/dist/engine.mjs +520 -318
  32. package/dist/engine.mjs.map +1 -1
  33. package/dist/index.d.mts +145 -319
  34. package/dist/index.d.ts +145 -319
  35. package/dist/index.js +1337 -7442
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +1275 -7386
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/next.js +327 -242
  40. package/dist/next.js.map +1 -1
  41. package/dist/next.mjs +272 -184
  42. package/dist/next.mjs.map +1 -1
  43. package/dist/plugin-api.js +94 -49
  44. package/dist/plugin-api.js.map +1 -1
  45. package/dist/plugin-api.mjs +26 -6
  46. package/dist/plugin-api.mjs.map +1 -1
  47. package/dist/plugin-registry.js +68 -40
  48. package/dist/plugin-registry.js.map +1 -1
  49. package/dist/plugin-registry.mjs +14 -10
  50. package/dist/plugin-registry.mjs.map +1 -1
  51. package/dist/plugin.js +102 -53
  52. package/dist/plugin.js.map +1 -1
  53. package/dist/plugin.mjs +30 -6
  54. package/dist/plugin.mjs.map +1 -1
  55. package/dist/preset.js +48 -15
  56. package/dist/preset.js.map +1 -1
  57. package/dist/preset.mjs +13 -5
  58. package/dist/preset.mjs.map +1 -1
  59. package/dist/rspack.js +108 -53
  60. package/dist/rspack.js.map +1 -1
  61. package/dist/rspack.mjs +50 -18
  62. package/dist/rspack.mjs.map +1 -1
  63. package/dist/runtime-css.js +63 -24
  64. package/dist/runtime-css.js.map +1 -1
  65. package/dist/runtime-css.mjs +15 -7
  66. package/dist/runtime-css.mjs.map +1 -1
  67. package/dist/runtime.js +98 -44
  68. package/dist/runtime.js.map +1 -1
  69. package/dist/runtime.mjs +31 -8
  70. package/dist/runtime.mjs.map +1 -1
  71. package/dist/scanner.js +164 -120
  72. package/dist/scanner.js.map +1 -1
  73. package/dist/scanner.mjs +70 -40
  74. package/dist/scanner.mjs.map +1 -1
  75. package/dist/shared.d.mts +0 -12
  76. package/dist/shared.d.ts +0 -12
  77. package/dist/shared.js +481 -299
  78. package/dist/shared.js.map +1 -1
  79. package/dist/shared.mjs +304 -133
  80. package/dist/shared.mjs.map +1 -1
  81. package/dist/storybook-addon.js +40 -10
  82. package/dist/storybook-addon.js.map +1 -1
  83. package/dist/storybook-addon.mjs +8 -3
  84. package/dist/storybook-addon.mjs.map +1 -1
  85. package/dist/svelte.js +95 -64
  86. package/dist/svelte.js.map +1 -1
  87. package/dist/svelte.mjs +37 -14
  88. package/dist/svelte.mjs.map +1 -1
  89. package/dist/syntax.js +69 -37
  90. package/dist/syntax.js.map +1 -1
  91. package/dist/syntax.mjs +8 -7
  92. package/dist/syntax.mjs.map +1 -1
  93. package/dist/testing.js +56 -18
  94. package/dist/testing.js.map +1 -1
  95. package/dist/testing.mjs +16 -3
  96. package/dist/testing.mjs.map +1 -1
  97. package/dist/theme.js +133 -74
  98. package/dist/theme.js.map +1 -1
  99. package/dist/theme.mjs +45 -14
  100. package/dist/theme.mjs.map +1 -1
  101. package/dist/turbopackLoader.js +156 -115
  102. package/dist/turbopackLoader.js.map +1 -1
  103. package/dist/turbopackLoader.mjs +135 -82
  104. package/dist/turbopackLoader.mjs.map +1 -1
  105. package/dist/tw.js +584 -423
  106. package/dist/tw.js.map +1 -1
  107. package/dist/tw.mjs +498 -311
  108. package/dist/tw.mjs.map +1 -1
  109. package/dist/vite.js +599 -450
  110. package/dist/vite.js.map +1 -1
  111. package/dist/vite.mjs +484 -332
  112. package/dist/vite.mjs.map +1 -1
  113. package/dist/vue.js +102 -70
  114. package/dist/vue.js.map +1 -1
  115. package/dist/vue.mjs +39 -15
  116. package/dist/vue.mjs.map +1 -1
  117. package/dist/webpackLoader.js +112 -77
  118. package/dist/webpackLoader.js.map +1 -1
  119. package/dist/webpackLoader.mjs +52 -18
  120. package/dist/webpackLoader.mjs.map +1 -1
  121. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  122. package/native/tailwind-styled-native.node +0 -0
  123. package/package.json +3 -1
package/dist/shared.js CHANGED
@@ -1,45 +1,12 @@
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
-
1
+ const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
32
2
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
3
+ "use strict";
4
+ var __create = Object.create;
33
5
  var __defProp = Object.defineProperty;
34
6
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
35
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
36
9
  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
10
  var __esm = (fn, res) => function __init() {
44
11
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
45
12
  };
@@ -55,6 +22,14 @@ var __copyProps = (to, from, except, desc) => {
55
22
  }
56
23
  return to;
57
24
  };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
58
33
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
34
 
60
35
  // packages/domain/shared/src/trace.ts
@@ -149,6 +124,7 @@ function getPipelinePercentages(metrics) {
149
124
  }
150
125
  var init_trace = __esm({
151
126
  "packages/domain/shared/src/trace.ts"() {
127
+ "use strict";
152
128
  }
153
129
  });
154
130
 
@@ -160,10 +136,11 @@ function formatErrorCode(code) {
160
136
  const prefix = code.startsWith("E") ? "Error" : code.startsWith("W") ? "Warning" : "Code";
161
137
  return `[${prefix} ${code}]`;
162
138
  }
163
- exports.ERROR_CODES = void 0; var ERROR_SUGGESTIONS;
139
+ var ERROR_CODES, ERROR_SUGGESTIONS;
164
140
  var init_error_codes = __esm({
165
141
  "packages/domain/shared/src/error-codes.ts"() {
166
- exports.ERROR_CODES = {
142
+ "use strict";
143
+ ERROR_CODES = {
167
144
  // E0xx — Native binding
168
145
  NATIVE_NOT_FOUND: "E001",
169
146
  NATIVE_LOAD_FAILED: "E002",
@@ -204,8 +181,8 @@ var init_error_codes = __esm({
204
181
  // packages/domain/shared/src/compatibility.ts
205
182
  function detectTailwind() {
206
183
  try {
207
- const pkgPath = __require.resolve("tailwindcss/package.json");
208
- const { version } = __require(pkgPath);
184
+ const pkgPath = require.resolve("tailwindcss/package.json");
185
+ const { version } = require(pkgPath);
209
186
  const major = Number.parseInt(version.split(".")[0], 10);
210
187
  return { version, major, supported: major >= 4, path: pkgPath };
211
188
  } catch {
@@ -229,8 +206,11 @@ function isTailwindV4() {
229
206
  }
230
207
  var init_compatibility = __esm({
231
208
  "packages/domain/shared/src/compatibility.ts"() {
209
+ "use strict";
232
210
  }
233
211
  });
212
+
213
+ // packages/domain/shared/src/native-schemas.ts
234
214
  function safeParseNative(schema, data, fallback) {
235
215
  const result = schema.safeParse(data);
236
216
  return result.success ? result.data : fallback;
@@ -246,67 +226,69 @@ function parseNative(schema, data, context) {
246
226
  }
247
227
  return result.data;
248
228
  }
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;
229
+ var import_zod, NativeScanFileSchema, NativeScanResultSchema, NativeClassUsageSchema, NativeAnalyzerReportSchema, NativeTransformResultSchema, NativeCssCompileResultSchema, NativeWatchEventSchema, NativeWatchResultSchema, NativeCacheEntrySchema, NativeCacheReadResultSchema;
250
230
  var init_native_schemas = __esm({
251
231
  "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()
232
+ "use strict";
233
+ import_zod = require("zod");
234
+ NativeScanFileSchema = import_zod.z.object({
235
+ file: import_zod.z.string().min(1, "file path cannot be empty"),
236
+ classes: import_zod.z.array(import_zod.z.string()),
237
+ hash: import_zod.z.string().optional()
256
238
  });
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())
239
+ NativeScanResultSchema = import_zod.z.object({
240
+ files: import_zod.z.array(NativeScanFileSchema),
241
+ totalFiles: import_zod.z.number().int().nonnegative(),
242
+ uniqueClasses: import_zod.z.array(import_zod.z.string())
261
243
  });
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()
244
+ NativeClassUsageSchema = import_zod.z.object({
245
+ name: import_zod.z.string(),
246
+ count: import_zod.z.number().int().nonnegative(),
247
+ files: import_zod.z.array(import_zod.z.string()).optional()
266
248
  });
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()
249
+ NativeAnalyzerReportSchema = import_zod.z.object({
250
+ root: import_zod.z.string(),
251
+ topClasses: import_zod.z.array(NativeClassUsageSchema).optional(),
252
+ safelist: import_zod.z.array(import_zod.z.string()).optional(),
253
+ css: import_zod.z.string().optional(),
254
+ conflicts: import_zod.z.array(import_zod.z.unknown()).optional(),
255
+ unusedClasses: import_zod.z.array(import_zod.z.string()).optional(),
256
+ durationMs: import_zod.z.number().nonnegative().optional()
275
257
  });
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())
258
+ NativeTransformResultSchema = import_zod.z.object({
259
+ code: import_zod.z.string(),
260
+ classes: import_zod.z.array(import_zod.z.string()),
261
+ changed: import_zod.z.boolean(),
262
+ rsc: import_zod.z.object({
263
+ isServer: import_zod.z.boolean(),
264
+ needsClientDirective: import_zod.z.boolean(),
265
+ clientReasons: import_zod.z.array(import_zod.z.string())
284
266
  }).optional()
285
267
  });
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()
268
+ NativeCssCompileResultSchema = import_zod.z.object({
269
+ css: import_zod.z.string(),
270
+ resolvedClasses: import_zod.z.array(import_zod.z.string()),
271
+ unresolvedClasses: import_zod.z.array(import_zod.z.string()).optional()
290
272
  });
291
- zod.z.object({
292
- type: zod.z.enum(["change", "unlink", "create"]),
293
- path: zod.z.string()
273
+ NativeWatchEventSchema = import_zod.z.object({
274
+ type: import_zod.z.enum(["change", "unlink", "create"]),
275
+ path: import_zod.z.string()
294
276
  });
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()
277
+ NativeWatchResultSchema = import_zod.z.object({
278
+ status: import_zod.z.enum(["ok", "error"]),
279
+ handleId: import_zod.z.string().optional(),
280
+ error: import_zod.z.string().optional()
299
281
  });
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()
282
+ NativeCacheEntrySchema = import_zod.z.object({
283
+ file: import_zod.z.string(),
284
+ hash: import_zod.z.string(),
285
+ classes: import_zod.z.array(import_zod.z.string()),
286
+ timestamp: import_zod.z.number(),
287
+ size: import_zod.z.number().optional()
306
288
  });
307
- exports.NativeCacheReadResultSchema = zod.z.object({
308
- entries: zod.z.array(exports.NativeCacheEntrySchema),
309
- version: zod.z.string().optional()
289
+ NativeCacheReadResultSchema = import_zod.z.object({
290
+ entries: import_zod.z.array(NativeCacheEntrySchema),
291
+ version: import_zod.z.string().optional()
310
292
  });
311
293
  }
312
294
  });
@@ -316,7 +298,7 @@ function getNodeModuleRef() {
316
298
  if (isBrowser) return null;
317
299
  if (nodeModuleRef !== null) return nodeModuleRef;
318
300
  try {
319
- const test = typeof __require === "function" ? __require("module") : null;
301
+ const test = typeof require === "function" ? require("module") : null;
320
302
  nodeModuleRef = test;
321
303
  return test;
322
304
  } catch {
@@ -324,48 +306,78 @@ function getNodeModuleRef() {
324
306
  return null;
325
307
  }
326
308
  }
309
+ function getCurrentFileUrl() {
310
+ if (__importMetaUrl) {
311
+ return __importMetaUrl;
312
+ }
313
+ if (typeof __filename !== "undefined") {
314
+ return `file://${__filename.replace(/\\/g, "/")}`;
315
+ }
316
+ return "file://unknown";
317
+ }
327
318
  function getNodePath() {
328
319
  if (isBrowser) throw new Error("node:path not available in browser");
329
- const nodeRequire = getNodeModuleRef();
330
- 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");
320
+ if (!_nodePath) {
321
+ if (typeof require === "function") {
322
+ _nodePath = require("path");
323
+ } else {
324
+ const nodeRequire = getNodeModuleRef();
325
+ if (!nodeRequire) throw new Error("require not available");
326
+ _nodePath = nodeRequire.createRequire(getCurrentFileUrl())("node:path");
327
+ }
328
+ }
332
329
  return _nodePath;
333
330
  }
334
331
  function getNodeUrl() {
335
332
  if (isBrowser) throw new Error("node:url not available in browser");
336
- const nodeRequire = getNodeModuleRef();
337
- 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");
333
+ if (!_nodeUrl) {
334
+ if (typeof require === "function") {
335
+ _nodeUrl = require("url");
336
+ } else {
337
+ const nodeRequire = getNodeModuleRef();
338
+ if (!nodeRequire) throw new Error("require not available");
339
+ _nodeUrl = nodeRequire.createRequire(getCurrentFileUrl())("node:url");
340
+ }
341
+ }
339
342
  return _nodeUrl;
340
343
  }
341
344
  function getNodeFs() {
342
345
  if (isBrowser) throw new Error("node:fs not available in browser");
343
- const nodeRequire = getNodeModuleRef();
344
- 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");
346
+ if (!_nodeFs) {
347
+ if (typeof require === "function") {
348
+ _nodeFs = require("fs");
349
+ } else {
350
+ const nodeRequire = getNodeModuleRef();
351
+ if (!nodeRequire) throw new Error("require not available");
352
+ _nodeFs = nodeRequire.createRequire(getCurrentFileUrl())("node:fs");
353
+ }
354
+ }
346
355
  return _nodeFs;
347
356
  }
348
357
  function createEsmRequire(importMetaUrl) {
349
358
  if (isBrowser) throw new Error("require not available in browser");
359
+ if (typeof require === "function") return require;
350
360
  const nodeRequire = getNodeModuleRef();
351
361
  if (!nodeRequire) throw new Error("require not available");
352
362
  return nodeRequire.createRequire(importMetaUrl);
353
363
  }
354
364
  function getDirname(importMetaUrl) {
355
365
  if (isBrowser) return "";
366
+ if (typeof __dirname !== "undefined") return __dirname;
356
367
  const nodePath = getNodePath();
357
368
  const nodeUrl = getNodeUrl();
358
369
  return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
359
370
  }
360
371
  function getFilename(importMetaUrl) {
361
372
  if (isBrowser) return "";
373
+ if (typeof __filename !== "undefined") return __filename;
362
374
  return getNodeUrl().fileURLToPath(importMetaUrl);
363
375
  }
364
376
  function resolveFromRoot(...segments) {
365
377
  if (isBrowser) return segments.join("/");
366
378
  const nodePath = getNodePath();
367
379
  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)));
380
+ let dir = typeof __dirname !== "undefined" ? __dirname : getDirname(getCurrentFileUrl());
369
381
  for (let i = 0; i < 10; i++) {
370
382
  const pkgPath = nodePath.join(dir, "package.json");
371
383
  try {
@@ -394,6 +406,7 @@ function resolveNativeNodePath(importMetaUrl, ...relativeSegments) {
394
406
  var isBrowser, nodeModuleRef, _nodePath, _nodeUrl, _nodeFs;
395
407
  var init_esmHelpers = __esm({
396
408
  "packages/domain/shared/src/esmHelpers.ts"() {
409
+ "use strict";
397
410
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
398
411
  nodeModuleRef = null;
399
412
  _nodePath = null;
@@ -405,7 +418,7 @@ var init_esmHelpers = __esm({
405
418
  // packages/domain/shared/src/telemetry.ts
406
419
  function getGlobalTelemetry() {
407
420
  if (!_globalCollector) {
408
- _globalCollector = new exports.TelemetryCollector();
421
+ _globalCollector = new TelemetryCollector();
409
422
  }
410
423
  return _globalCollector;
411
424
  }
@@ -441,11 +454,12 @@ function createBuildTimer() {
441
454
  }
442
455
  };
443
456
  }
444
- var RING_BUFFER_SIZE; exports.TelemetryCollector = void 0; var _globalCollector;
457
+ var RING_BUFFER_SIZE, TelemetryCollector, _globalCollector;
445
458
  var init_telemetry = __esm({
446
459
  "packages/domain/shared/src/telemetry.ts"() {
460
+ "use strict";
447
461
  RING_BUFFER_SIZE = 100;
448
- exports.TelemetryCollector = class {
462
+ TelemetryCollector = class {
449
463
  data = [];
450
464
  enabled;
451
465
  constructor(enabled) {
@@ -510,6 +524,8 @@ var init_telemetry = __esm({
510
524
  _globalCollector = null;
511
525
  }
512
526
  });
527
+
528
+ // packages/domain/shared/src/configSchemas.ts
513
529
  function parseJsonWithSchema(jsonString, schema, sourceName) {
514
530
  let parsed;
515
531
  try {
@@ -528,8 +544,8 @@ ${issues}`);
528
544
  return result.data;
529
545
  }
530
546
  function parseJsonFileWithSchema(filePath, schema) {
531
- const { readFileSync } = __require("fs");
532
- const { basename } = __require("path");
547
+ const { readFileSync } = require("fs");
548
+ const { basename } = require("path");
533
549
  let content;
534
550
  try {
535
551
  content = readFileSync(filePath, "utf-8");
@@ -540,70 +556,72 @@ function parseJsonFileWithSchema(filePath, schema) {
540
556
  }
541
557
  return parseJsonWithSchema(content, schema, basename(filePath));
542
558
  }
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;
559
+ var import_zod2, ScanCacheClassEntrySchema, ScanCacheSchema, TailwindContentItemSchema, TailwindConfigSchema, RegistryPluginEntrySchema, RegistryFileSchema, PackageJsonSchema;
544
560
  var init_configSchemas = __esm({
545
561
  "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([])
562
+ "use strict";
563
+ import_zod2 = require("zod");
564
+ ScanCacheClassEntrySchema = import_zod2.z.object({
565
+ name: import_zod2.z.string().min(1),
566
+ usedIn: import_zod2.z.array(import_zod2.z.string()),
567
+ risk: import_zod2.z.enum(["low", "medium", "high"]).default("low"),
568
+ bundleContribution: import_zod2.z.number().nonnegative().default(0),
569
+ variants: import_zod2.z.array(import_zod2.z.string()).default([])
552
570
  });
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()
571
+ ScanCacheSchema = import_zod2.z.object({
572
+ version: import_zod2.z.string().default("1"),
573
+ generatedAt: import_zod2.z.string(),
574
+ root: import_zod2.z.string(),
575
+ classNames: import_zod2.z.array(ScanCacheClassEntrySchema),
576
+ totalFiles: import_zod2.z.number().int().nonnegative(),
577
+ uniqueCount: import_zod2.z.number().int().nonnegative()
560
578
  });
561
- TailwindContentItemSchema = zod.z.union([
562
- zod.z.string(),
563
- zod.z.object({
564
- raw: zod.z.string(),
565
- extension: zod.z.string().optional()
579
+ TailwindContentItemSchema = import_zod2.z.union([
580
+ import_zod2.z.string(),
581
+ import_zod2.z.object({
582
+ raw: import_zod2.z.string(),
583
+ extension: import_zod2.z.string().optional()
566
584
  }),
567
- zod.z.object({
568
- files: zod.z.array(zod.z.string()),
569
- transform: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
585
+ import_zod2.z.object({
586
+ files: import_zod2.z.array(import_zod2.z.string()),
587
+ transform: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional()
570
588
  })
571
589
  ]);
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()
590
+ TailwindConfigSchema = import_zod2.z.object({
591
+ content: import_zod2.z.array(TailwindContentItemSchema).optional(),
592
+ theme: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional(),
593
+ plugins: import_zod2.z.array(import_zod2.z.unknown()).optional(),
594
+ darkMode: import_zod2.z.union([import_zod2.z.literal("class"), import_zod2.z.literal("media"), import_zod2.z.literal(false)]).optional(),
595
+ prefix: import_zod2.z.string().optional(),
596
+ safelist: import_zod2.z.array(import_zod2.z.union([import_zod2.z.string(), import_zod2.z.object({ pattern: import_zod2.z.instanceof(RegExp) })])).optional(),
597
+ blocklist: import_zod2.z.array(import_zod2.z.string()).optional()
580
598
  }).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()
599
+ RegistryPluginEntrySchema = import_zod2.z.object({
600
+ name: import_zod2.z.string().min(1),
601
+ description: import_zod2.z.string(),
602
+ version: import_zod2.z.string(),
603
+ tags: import_zod2.z.array(import_zod2.z.string()).default([]),
604
+ official: import_zod2.z.boolean().default(false),
605
+ docs: import_zod2.z.string().url().optional(),
606
+ install: import_zod2.z.string().optional(),
607
+ integrity: import_zod2.z.string().optional()
590
608
  });
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([])
609
+ RegistryFileSchema = import_zod2.z.object({
610
+ version: import_zod2.z.string(),
611
+ official: import_zod2.z.array(RegistryPluginEntrySchema).default([]),
612
+ community: import_zod2.z.array(RegistryPluginEntrySchema).default([])
595
613
  });
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()
614
+ PackageJsonSchema = import_zod2.z.object({
615
+ name: import_zod2.z.string(),
616
+ version: import_zod2.z.string(),
617
+ scripts: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
618
+ dependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
619
+ devDependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
620
+ peerDependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
621
+ main: import_zod2.z.string().optional(),
622
+ module: import_zod2.z.string().optional(),
623
+ exports: import_zod2.z.unknown().optional(),
624
+ type: import_zod2.z.enum(["module", "commonjs"]).optional()
607
625
  }).passthrough();
608
626
  }
609
627
  });
@@ -613,8 +631,8 @@ function getDirnameFromUrl(importMetaUrl) {
613
631
  if (!importMetaUrl) return "";
614
632
  if (isBrowser2) return "";
615
633
  try {
616
- const nodeUrl = __require(NODE_URL);
617
- const nodePath = __require(NODE_PATH);
634
+ const nodeUrl = require(NODE_URL);
635
+ const nodePath = require(NODE_PATH);
618
636
  return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
619
637
  } catch {
620
638
  if (importMetaUrl.startsWith("file://")) {
@@ -628,7 +646,7 @@ function getDirnameFromUrl(importMetaUrl) {
628
646
  function resolvePath(...segments) {
629
647
  if (isBrowser2) return segments.join("/").replace(/\/+/g, "/");
630
648
  try {
631
- const nodePath = __require(NODE_PATH);
649
+ const nodePath = require(NODE_PATH);
632
650
  return nodePath.resolve(...segments);
633
651
  } catch {
634
652
  return segments.join("/").replace(/\/+/g, "/");
@@ -637,7 +655,7 @@ function resolvePath(...segments) {
637
655
  function existsSync(path6) {
638
656
  if (isBrowser2) return false;
639
657
  try {
640
- const nodeFs = __require(NODE_FS);
658
+ const nodeFs = require(NODE_FS);
641
659
  return nodeFs.existsSync(path6);
642
660
  } catch {
643
661
  return false;
@@ -691,6 +709,7 @@ function resolveLoaderPath(loaderBasename, importMetaUrl) {
691
709
  var isBrowser2, NODE_URL, NODE_FS, NODE_PATH;
692
710
  var init_workerResolver = __esm({
693
711
  "packages/domain/shared/src/workerResolver.ts"() {
712
+ "use strict";
694
713
  isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
695
714
  NODE_URL = typeof window === "undefined" || typeof document === "undefined" ? "node:url" : null;
696
715
  NODE_FS = typeof window === "undefined" || typeof document === "undefined" ? "node:fs" : null;
@@ -840,13 +859,13 @@ function generateClassRenameCodemod(renames, opts = {}) {
840
859
  }
841
860
  return lines.join("\n");
842
861
  }
843
- function generateBarrelFile(exports$1, dir, opts = {}) {
862
+ function generateBarrelFile(exports2, dir, opts = {}) {
844
863
  const { includeTypes = true } = opts;
845
864
  const lines = [];
846
865
  lines.push(`// Auto-generated barrel file for ${dir}`);
847
866
  lines.push(`// Run: npx tsx scripts/generate-barrel.ts to regenerate`);
848
867
  lines.push(``);
849
- for (const name of exports$1) {
868
+ for (const name of exports2) {
850
869
  lines.push(`export { default as ${name}, type ${name}Props } from "./${name}"`);
851
870
  if (includeTypes) {
852
871
  lines.push(`export type * from "./${name}"`);
@@ -856,8 +875,11 @@ function generateBarrelFile(exports$1, dir, opts = {}) {
856
875
  }
857
876
  var init_codegen = __esm({
858
877
  "packages/domain/shared/src/codegen.ts"() {
878
+ "use strict";
859
879
  }
860
880
  });
881
+
882
+ // packages/domain/shared/src/native-resolution.ts
861
883
  function platformKey() {
862
884
  if (isBrowser3) return "browser";
863
885
  return `${process.platform}-${process.arch}`;
@@ -873,7 +895,7 @@ function resolveNativeBinary(runtimeDir) {
873
895
  }
874
896
  const envPath = process.env.TW_NATIVE_PATH?.trim();
875
897
  if (envPath) {
876
- if (fs3__namespace.existsSync(envPath)) {
898
+ if (fs.existsSync(envPath)) {
877
899
  return { path: envPath, source: "env", platform, tried };
878
900
  }
879
901
  tried.push(`env:${envPath} (not found)`);
@@ -882,7 +904,7 @@ function resolveNativeBinary(runtimeDir) {
882
904
  for (const pkg of prebuiltPkgs) {
883
905
  try {
884
906
  const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
885
- if (fs3__namespace.existsSync(candidate)) {
907
+ if (fs.existsSync(candidate)) {
886
908
  return { path: candidate, source: "prebuilt", platform, tried };
887
909
  }
888
910
  tried.push(`prebuilt:${pkg} (resolved but missing)`);
@@ -893,13 +915,13 @@ function resolveNativeBinary(runtimeDir) {
893
915
  const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
894
916
  const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
895
917
  if (runtimeDir) {
896
- for (const depth of ["..", path__namespace.join("..", ".."), path__namespace.join("..", "..", "..")]) {
897
- const pkgRoot = path__namespace.resolve(runtimeDir, depth);
918
+ for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
919
+ const pkgRoot = path.resolve(runtimeDir, depth);
898
920
  for (const bin of BINARY_NAMES_SELF) {
899
921
  for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
900
- const candidate = path__namespace.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
922
+ const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
901
923
  tried.push(`self-bundled:${candidate}`);
902
- if (fs3__namespace.existsSync(candidate)) {
924
+ if (fs.existsSync(candidate)) {
903
925
  return { path: candidate, source: "prebuilt", platform, tried };
904
926
  }
905
927
  }
@@ -911,29 +933,29 @@ function resolveNativeBinary(runtimeDir) {
911
933
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
912
934
  const localCandidates = [];
913
935
  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`));
936
+ localCandidates.push(path.resolve(base, `${bin}.node`));
937
+ localCandidates.push(path.resolve(base, "..", `${bin}.node`));
938
+ localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
939
+ localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
918
940
  }
919
941
  for (const startDir of [cwd, base]) {
920
942
  let dir = startDir;
921
943
  for (let i = 0; i < 6; i++) {
922
- const nativeDir = path__namespace.resolve(dir, "native");
944
+ const nativeDir = path.resolve(dir, "native");
923
945
  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`));
946
+ localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
947
+ localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
948
+ localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
949
+ localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
928
950
  }
929
- const parent = path__namespace.resolve(dir, "..");
951
+ const parent = path.resolve(dir, "..");
930
952
  if (parent === dir) break;
931
953
  dir = parent;
932
954
  }
933
955
  }
934
956
  for (const candidate of localCandidates) {
935
957
  tried.push(`local:${candidate}`);
936
- if (fs3__namespace.existsSync(candidate)) {
958
+ if (fs.existsSync(candidate)) {
937
959
  return { path: candidate, source: "local", platform, tried };
938
960
  }
939
961
  }
@@ -953,11 +975,17 @@ function formatNativeNotFoundError(result) {
953
975
  ];
954
976
  return lines.join("\n");
955
977
  }
956
- var isBrowser3, _require, PLATFORM_MAP;
978
+ var import_node_module, fs, path, isBrowser3, _require, PLATFORM_MAP;
957
979
  var init_native_resolution = __esm({
958
980
  "packages/domain/shared/src/native-resolution.ts"() {
981
+ "use strict";
982
+ import_node_module = require("module");
983
+ fs = __toESM(require("fs"));
984
+ path = __toESM(require("path"));
959
985
  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)));
986
+ _require = (0, import_node_module.createRequire)(
987
+ typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
988
+ );
961
989
  PLATFORM_MAP = {
962
990
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
963
991
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -1003,6 +1031,7 @@ function createObservabilityClient(opts = {}) {
1003
1031
  }
1004
1032
  var init_observability = __esm({
1005
1033
  "packages/domain/shared/src/observability.ts"() {
1034
+ "use strict";
1006
1035
  }
1007
1036
  });
1008
1037
 
@@ -1010,8 +1039,9 @@ var init_observability = __esm({
1010
1039
  var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
1011
1040
  var init_nativeBridge = __esm({
1012
1041
  "packages/domain/compiler/src/nativeBridge.ts"() {
1042
+ "use strict";
1013
1043
  init_src2();
1014
- _loadNative = (path6) => __require(path6);
1044
+ _loadNative = (path6) => require(path6);
1015
1045
  log = (...args) => {
1016
1046
  if (process.env.DEBUG?.includes("compiler:native")) {
1017
1047
  console.log("[compiler:native]", ...args);
@@ -1037,7 +1067,7 @@ var init_nativeBridge = __esm({
1037
1067
  }
1038
1068
  bridgeLoadAttempted = true;
1039
1069
  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)));
1070
+ const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
1041
1071
  const result = resolveNativeBinary(runtimeDir);
1042
1072
  if (result.path && result.path.endsWith(".node")) {
1043
1073
  try {
@@ -1149,6 +1179,7 @@ function resetCacheStats() {
1149
1179
  }
1150
1180
  var init_cssGeneratorNative = __esm({
1151
1181
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
1182
+ "use strict";
1152
1183
  init_nativeBridge();
1153
1184
  }
1154
1185
  });
@@ -1221,6 +1252,7 @@ function atomicRegistrySize() {
1221
1252
  }
1222
1253
  var init_compilationNative = __esm({
1223
1254
  "packages/domain/compiler/src/compiler/compilationNative.ts"() {
1255
+ "use strict";
1224
1256
  init_nativeBridge();
1225
1257
  }
1226
1258
  });
@@ -1364,6 +1396,7 @@ function twMergeRaw(classLists) {
1364
1396
  }
1365
1397
  var init_cssCompilationNative = __esm({
1366
1398
  "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
1399
+ "use strict";
1367
1400
  init_nativeBridge();
1368
1401
  }
1369
1402
  });
@@ -1463,6 +1496,7 @@ function idRegistryImport(importedData) {
1463
1496
  }
1464
1497
  var init_idRegistryNative = __esm({
1465
1498
  "packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
1499
+ "use strict";
1466
1500
  init_nativeBridge();
1467
1501
  }
1468
1502
  });
@@ -1604,9 +1638,12 @@ function scanFilesBatchNative(filesJson) {
1604
1638
  }
1605
1639
  var init_streamingNative = __esm({
1606
1640
  "packages/domain/compiler/src/compiler/streamingNative.ts"() {
1641
+ "use strict";
1607
1642
  init_nativeBridge();
1608
1643
  }
1609
1644
  });
1645
+
1646
+ // packages/domain/compiler/src/tailwindEngine.ts
1610
1647
  function loadTailwindEngine() {
1611
1648
  if (_twEngine) return _twEngine;
1612
1649
  if (_twEngineError) throw _twEngineError;
@@ -1626,10 +1663,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
1626
1663
  if (classes.length === 0) return "";
1627
1664
  const tw = loadTailwindEngine();
1628
1665
  const input = cssEntryContent ?? "@import 'tailwindcss';";
1629
- const { readFileSync, existsSync: existsSync3 } = await import('fs');
1630
- const { dirname, resolve: resolve2 } = await import('path');
1666
+ const { readFileSync, existsSync: existsSync3 } = await import("fs");
1667
+ const { dirname, resolve: resolve2 } = await import("path");
1631
1668
  const projectRoot = root ?? process.cwd();
1632
- const req = module$1.createRequire(resolve2(projectRoot, "package.json"));
1669
+ const req = (0, import_node_module2.createRequire)(resolve2(projectRoot, "package.json"));
1633
1670
  const loadStylesheet = async (id, base) => {
1634
1671
  try {
1635
1672
  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 +1686,16 @@ async function generateRawCss(classes, cssEntryContent, root) {
1649
1686
  const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
1650
1687
  return compiler.build(classes);
1651
1688
  }
1652
- var require2, _twEngine, _twEngineError;
1689
+ var import_node_module2, import_meta, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
1653
1690
  var init_tailwindEngine = __esm({
1654
1691
  "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)));
1692
+ "use strict";
1693
+ import_node_module2 = require("module");
1694
+ import_meta = {};
1695
+ require2 = (0, import_node_module2.createRequire)(
1696
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
1697
+ );
1698
+ MAX_CACHE_MEMORY = 256 * 1024;
1656
1699
  _twEngine = null;
1657
1700
  _twEngineError = null;
1658
1701
  }
@@ -1833,24 +1876,31 @@ function processTailwindCssWithTargets(css, targets) {
1833
1876
  }
1834
1877
  return result.css;
1835
1878
  }
1836
- var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
1879
+ var import_node_module3, import_meta2, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
1837
1880
  var init_tailwindEngine2 = __esm({
1838
1881
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1882
+ "use strict";
1883
+ import_node_module3 = require("module");
1839
1884
  init_nativeBridge();
1840
1885
  init_cssGeneratorNative();
1841
1886
  init_cssCompilationNative();
1842
1887
  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)));
1888
+ import_meta2 = {};
1889
+ require3 = (0, import_node_module3.createRequire)(
1890
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta2 !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
1891
+ );
1844
1892
  _cssCache = /* @__PURE__ */ new Map();
1845
1893
  _cacheHits = 0;
1846
1894
  _cacheMisses = 0;
1847
1895
  MAX_CACHE_SIZE = 100;
1896
+ MAX_CACHE_MEMORY2 = 256 * 1024;
1848
1897
  }
1849
1898
  });
1850
1899
 
1851
1900
  // packages/domain/compiler/src/compiler/index.ts
1852
1901
  var init_compiler = __esm({
1853
1902
  "packages/domain/compiler/src/compiler/index.ts"() {
1903
+ "use strict";
1854
1904
  init_cssGeneratorNative();
1855
1905
  init_compilationNative();
1856
1906
  init_cssCompilationNative();
@@ -1863,6 +1913,7 @@ var init_compiler = __esm({
1863
1913
  var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
1864
1914
  var init_parser = __esm({
1865
1915
  "packages/domain/compiler/src/parser/index.ts"() {
1916
+ "use strict";
1866
1917
  init_nativeBridge();
1867
1918
  parseClasses = (raw) => {
1868
1919
  const native = getNativeBridge();
@@ -2041,6 +2092,7 @@ function resetMemoryStats() {
2041
2092
  }
2042
2093
  var init_analyzerNative = __esm({
2043
2094
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
2095
+ "use strict";
2044
2096
  init_nativeBridge();
2045
2097
  }
2046
2098
  });
@@ -2134,6 +2186,7 @@ function resolveSimpleVariants(configJson) {
2134
2186
  }
2135
2187
  var init_themeResolutionNative = __esm({
2136
2188
  "packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
2189
+ "use strict";
2137
2190
  init_nativeBridge();
2138
2191
  }
2139
2192
  });
@@ -2181,6 +2234,7 @@ function generateSubComponentTypes(root, outputPath) {
2181
2234
  }
2182
2235
  var init_scannerNative = __esm({
2183
2236
  "packages/domain/compiler/src/analyzer/scannerNative.ts"() {
2237
+ "use strict";
2184
2238
  init_nativeBridge();
2185
2239
  }
2186
2240
  });
@@ -2188,6 +2242,7 @@ var init_scannerNative = __esm({
2188
2242
  // packages/domain/compiler/src/analyzer/index.ts
2189
2243
  var init_analyzer = __esm({
2190
2244
  "packages/domain/compiler/src/analyzer/index.ts"() {
2245
+ "use strict";
2191
2246
  init_analyzerNative();
2192
2247
  init_themeResolutionNative();
2193
2248
  init_scannerNative();
@@ -2376,6 +2431,7 @@ function resetResolverPoolStats() {
2376
2431
  }
2377
2432
  var init_cacheNative = __esm({
2378
2433
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
2434
+ "use strict";
2379
2435
  init_nativeBridge();
2380
2436
  }
2381
2437
  });
@@ -2383,6 +2439,7 @@ var init_cacheNative = __esm({
2383
2439
  // packages/domain/compiler/src/cache/index.ts
2384
2440
  var init_cache = __esm({
2385
2441
  "packages/domain/compiler/src/cache/index.ts"() {
2442
+ "use strict";
2386
2443
  init_cacheNative();
2387
2444
  }
2388
2445
  });
@@ -2631,6 +2688,7 @@ function redisDiagnose() {
2631
2688
  }
2632
2689
  var init_redisNative = __esm({
2633
2690
  "packages/domain/compiler/src/redis/redisNative.ts"() {
2691
+ "use strict";
2634
2692
  init_nativeBridge();
2635
2693
  }
2636
2694
  });
@@ -2638,6 +2696,7 @@ var init_redisNative = __esm({
2638
2696
  // packages/domain/compiler/src/redis/index.ts
2639
2697
  var init_redis = __esm({
2640
2698
  "packages/domain/compiler/src/redis/index.ts"() {
2699
+ "use strict";
2641
2700
  init_redisNative();
2642
2701
  }
2643
2702
  });
@@ -2776,6 +2835,7 @@ function getCompilerDiagnostics() {
2776
2835
  }
2777
2836
  var init_watchSystemNative = __esm({
2778
2837
  "packages/domain/compiler/src/watch/watchSystemNative.ts"() {
2838
+ "use strict";
2779
2839
  init_nativeBridge();
2780
2840
  }
2781
2841
  });
@@ -2783,9 +2843,12 @@ var init_watchSystemNative = __esm({
2783
2843
  // packages/domain/compiler/src/watch/index.ts
2784
2844
  var init_watch = __esm({
2785
2845
  "packages/domain/compiler/src/watch/index.ts"() {
2846
+ "use strict";
2786
2847
  init_watchSystemNative();
2787
2848
  }
2788
2849
  });
2850
+
2851
+ // packages/domain/compiler/src/index.ts
2789
2852
  function _layoutClassesToCss(classes) {
2790
2853
  const native = getNativeBridge();
2791
2854
  if (!native?.layoutClassesToCss) {
@@ -2820,9 +2883,13 @@ function extractContainerCssFromSource(source) {
2820
2883
  }
2821
2884
  return rules.join("\n");
2822
2885
  }
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;
2886
+ var import_node_fs, import_node_path, import_node_module4, _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
2887
  var init_src = __esm({
2825
2888
  "packages/domain/compiler/src/index.ts"() {
2889
+ "use strict";
2890
+ import_node_fs = __toESM(require("fs"), 1);
2891
+ import_node_path = __toESM(require("path"), 1);
2892
+ import_node_module4 = require("module");
2826
2893
  init_nativeBridge();
2827
2894
  init_compiler();
2828
2895
  init_parser();
@@ -2830,7 +2897,9 @@ var init_src = __esm({
2830
2897
  init_cache();
2831
2898
  init_redis();
2832
2899
  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)));
2900
+ _require2 = (0, import_node_module4.createRequire)(
2901
+ typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
2902
+ );
2834
2903
  transformSource = (source, opts) => {
2835
2904
  const native = getNativeBridge();
2836
2905
  if (!native?.transformSource) {
@@ -2922,7 +2991,7 @@ var init_src = __esm({
2922
2991
  };
2923
2992
  scanProjectUsage = (dirs, cwd) => {
2924
2993
  const { batchExtractClasses: batchExtractClasses2 } = _require2("./parser");
2925
- const files = dirs.map((dir) => path__namespace.default.resolve(cwd, dir));
2994
+ const files = dirs.map((dir) => import_node_path.default.resolve(cwd, dir));
2926
2995
  const results = batchExtractClasses2(files) || [];
2927
2996
  const combined = {};
2928
2997
  for (const result of results) {
@@ -2939,13 +3008,13 @@ var init_src = __esm({
2939
3008
  const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
2940
3009
  const allClasses = Object.keys(classes).sort();
2941
3010
  if (outputPath) {
2942
- fs3__namespace.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
3011
+ import_node_fs.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
2943
3012
  }
2944
3013
  return allClasses;
2945
3014
  };
2946
3015
  loadSafelist = (safelistPath) => {
2947
3016
  try {
2948
- const content = fs3__namespace.default.readFileSync(safelistPath, "utf-8");
3017
+ const content = import_node_fs.default.readFileSync(safelistPath, "utf-8");
2949
3018
  return JSON.parse(content);
2950
3019
  } catch {
2951
3020
  return [];
@@ -2959,9 +3028,9 @@ var init_src = __esm({
2959
3028
  "tailwind.config.cjs"
2960
3029
  ];
2961
3030
  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);
3031
+ const fullPath = import_node_path.default.join(cwd, file);
3032
+ if (import_node_fs.default.existsSync(fullPath)) {
3033
+ const mod = require(fullPath);
2965
3034
  return mod.default || mod;
2966
3035
  }
2967
3036
  }
@@ -2970,9 +3039,9 @@ var init_src = __esm({
2970
3039
  getContentPaths = (cwd = process.cwd()) => {
2971
3040
  return {
2972
3041
  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}")
3042
+ import_node_path.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
3043
+ import_node_path.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
3044
+ import_node_path.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
2976
3045
  ]
2977
3046
  };
2978
3047
  };
@@ -3386,6 +3455,7 @@ __export(internal_exports, {
3386
3455
  });
3387
3456
  var init_internal = __esm({
3388
3457
  "packages/domain/compiler/src/internal.ts"() {
3458
+ "use strict";
3389
3459
  init_src();
3390
3460
  init_tailwindEngine2();
3391
3461
  init_compiler();
@@ -3396,6 +3466,8 @@ var init_internal = __esm({
3396
3466
  init_watch();
3397
3467
  }
3398
3468
  });
3469
+
3470
+ // packages/domain/shared/src/staticStateExtractor.ts
3399
3471
  function getNative() {
3400
3472
  if (_native) return _native;
3401
3473
  try {
@@ -3425,17 +3497,17 @@ function getNative() {
3425
3497
  function* walkSourceFiles(dir) {
3426
3498
  let entries;
3427
3499
  try {
3428
- entries = fs3__namespace.default.readdirSync(dir, { withFileTypes: true });
3500
+ entries = import_node_fs2.default.readdirSync(dir, { withFileTypes: true });
3429
3501
  } catch {
3430
3502
  return;
3431
3503
  }
3432
3504
  for (const entry of entries) {
3433
- const fullPath = path__namespace.default.join(dir, entry.name);
3505
+ const fullPath = import_node_path2.default.join(dir, entry.name);
3434
3506
  if (entry.isDirectory()) {
3435
3507
  if (IGNORE_PATTERNS.some((p) => entry.name === p || entry.name.startsWith(p))) continue;
3436
3508
  yield* walkSourceFiles(fullPath);
3437
3509
  } else if (entry.isFile()) {
3438
- const ext = path__namespace.default.extname(entry.name);
3510
+ const ext = import_node_path2.default.extname(entry.name);
3439
3511
  if (SOURCE_EXTENSIONS.has(ext)) yield fullPath;
3440
3512
  }
3441
3513
  }
@@ -3499,7 +3571,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3499
3571
  allConfigs.push(...configs);
3500
3572
  if (verbose) {
3501
3573
  process.stderr.write(
3502
- `[tw:static-state] ${path__namespace.default.relative(srcDir, filePath)}: ${configs.length} komponen
3574
+ `[tw:static-state] ${import_node_path2.default.relative(srcDir, filePath)}: ${configs.length} komponen
3503
3575
  `
3504
3576
  );
3505
3577
  }
@@ -3510,7 +3582,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3510
3582
  if (filesScanned >= maxFiles) break;
3511
3583
  let source;
3512
3584
  try {
3513
- source = fs3__namespace.default.readFileSync(filePath, "utf-8");
3585
+ source = import_node_fs2.default.readFileSync(filePath, "utf-8");
3514
3586
  } catch {
3515
3587
  continue;
3516
3588
  }
@@ -3523,7 +3595,7 @@ function extractStaticStateCss(srcDir, options = {}) {
3523
3595
  allConfigs.push(...configs);
3524
3596
  if (verbose) {
3525
3597
  process.stderr.write(
3526
- `[tw:static-state] ${path__namespace.default.relative(srcDir, filePath)}: ${configs.length} komponen
3598
+ `[tw:static-state] ${import_node_path2.default.relative(srcDir, filePath)}: ${configs.length} komponen
3527
3599
  `
3528
3600
  );
3529
3601
  }
@@ -3617,12 +3689,12 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3617
3689
  resolvedCss: options.resolvedCss || ""
3618
3690
  // ← ensure always passed
3619
3691
  });
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);
3692
+ const twClassesDir = import_node_path2.default.join(import_node_path2.default.dirname(safelistPath), "tw-classes");
3693
+ import_node_fs2.default.mkdirSync(twClassesDir, { recursive: true });
3694
+ const stateFilePath = import_node_path2.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);
3623
3695
  if (result.rulesGenerated === 0) {
3624
3696
  try {
3625
- fs3__namespace.default.writeFileSync(
3697
+ import_node_fs2.default.writeFileSync(
3626
3698
  stateFilePath,
3627
3699
  "/* tw-state-static.css \u2014 tidak ada state rules yang di-generate */\n",
3628
3700
  "utf-8"
@@ -3632,27 +3704,32 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3632
3704
  return `[tw:static-state] tidak ada state rules yang di-generate (${result.filesScanned} files di-scan)`;
3633
3705
  }
3634
3706
  try {
3635
- fs3__namespace.default.writeFileSync(stateFilePath, result.generatedCss, "utf-8");
3707
+ import_node_fs2.default.writeFileSync(stateFilePath, result.generatedCss, "utf-8");
3636
3708
  return [
3637
3709
  `[tw:static-state] ${result.rulesGenerated} static state rules di-generate`,
3638
3710
  ` \u2192 ${result.filesScanned} files scanned, ${result.filesWithStates} dengan states`,
3639
3711
  ` \u2192 ${result.componentsFound} components, ${result.rulesSkipped} rules skipped (fallback ke runtime)`,
3640
- ` \u2192 ditulis ke tw-classes/${exports.TW_STATE_STATIC_FILENAME}`
3712
+ ` \u2192 ditulis ke tw-classes/${TW_STATE_STATIC_FILENAME}`
3641
3713
  ].join("\n");
3642
3714
  } catch (writeErr) {
3643
3715
  const msg = writeErr instanceof Error ? writeErr.message : String(writeErr);
3644
3716
  return `[tw:static-state] gagal tulis state CSS: ${msg}`;
3645
3717
  }
3646
3718
  }
3647
- var SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native; exports.TW_STATE_STATIC_FILENAME = void 0;
3719
+ var import_node_fs2, import_node_path2, SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native, TW_STATE_STATIC_FILENAME;
3648
3720
  var init_staticStateExtractor = __esm({
3649
3721
  "packages/domain/shared/src/staticStateExtractor.ts"() {
3722
+ "use strict";
3723
+ import_node_fs2 = __toESM(require("fs"));
3724
+ import_node_path2 = __toESM(require("path"));
3650
3725
  SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs"]);
3651
3726
  IGNORE_PATTERNS = ["node_modules", ".next", "dist", "build", ".git", "coverage", "__tests__"];
3652
3727
  _native = null;
3653
- exports.TW_STATE_STATIC_FILENAME = "_tw-state-static.css";
3728
+ TW_STATE_STATIC_FILENAME = "_tw-state-static.css";
3654
3729
  }
3655
3730
  });
3731
+
3732
+ // packages/domain/shared/src/logger.ts
3656
3733
  function getEnvLevel() {
3657
3734
  const env = process.env.TWS_LOG_LEVEL?.toLowerCase();
3658
3735
  if (env && env in LEVELS) return env;
@@ -3662,8 +3739,8 @@ function setGlobalLogFile(filePath) {
3662
3739
  _globalLogFile = filePath;
3663
3740
  _logFileInitialized = false;
3664
3741
  try {
3665
- fs3__namespace.default.mkdirSync(path__namespace.default.dirname(filePath), { recursive: true });
3666
- fs3__namespace.default.writeFileSync(
3742
+ import_node_fs3.default.mkdirSync(import_node_path3.default.dirname(filePath), { recursive: true });
3743
+ import_node_fs3.default.writeFileSync(
3667
3744
  filePath,
3668
3745
  `# tailwind-styled build log \u2014 ${(/* @__PURE__ */ new Date()).toISOString()}
3669
3746
  `,
@@ -3676,13 +3753,13 @@ function setGlobalLogFile(filePath) {
3676
3753
  function writeToFile(line) {
3677
3754
  if (!_globalLogFile || !_logFileInitialized) return;
3678
3755
  try {
3679
- fs3__namespace.default.appendFileSync(_globalLogFile, line);
3756
+ import_node_fs3.default.appendFileSync(_globalLogFile, line);
3680
3757
  } catch {
3681
3758
  }
3682
3759
  }
3683
3760
  function createLogger(prefix, level) {
3684
3761
  const loggerState = {
3685
- currentLevel: getEnvLevel(),
3762
+ currentLevel: level ?? getEnvLevel(),
3686
3763
  setLevel(l) {
3687
3764
  this.currentLevel = l;
3688
3765
  }
@@ -3703,15 +3780,20 @@ function createLogger(prefix, level) {
3703
3780
  setLogFile: (filePath) => setGlobalLogFile(filePath)
3704
3781
  };
3705
3782
  }
3706
- var LEVELS, _globalLogFile, _logFileInitialized;
3783
+ var import_node_fs3, import_node_path3, LEVELS, _globalLogFile, _logFileInitialized, logger;
3707
3784
  var init_logger = __esm({
3708
3785
  "packages/domain/shared/src/logger.ts"() {
3786
+ "use strict";
3787
+ import_node_fs3 = __toESM(require("fs"));
3788
+ import_node_path3 = __toESM(require("path"));
3709
3789
  LEVELS = { silent: 0, error: 1, warn: 2, info: 3, debug: 4 };
3710
3790
  _globalLogFile = null;
3711
3791
  _logFileInitialized = false;
3712
- createLogger("tailwind-styled");
3792
+ logger = createLogger("tailwind-styled");
3713
3793
  }
3714
3794
  });
3795
+
3796
+ // packages/domain/shared/src/index.ts
3715
3797
  function createLogger2(namespace) {
3716
3798
  const prefix = `[${namespace}]`;
3717
3799
  return {
@@ -3748,18 +3830,18 @@ function formatIssuePath(path6) {
3748
3830
  ).join(".");
3749
3831
  }
3750
3832
  function wrapUnknownError(domain, code, error) {
3751
- return exports.TwError.wrap(domain, code, error);
3833
+ return TwError.wrap(domain, code, error);
3752
3834
  }
3753
3835
  function isTwError(err) {
3754
- return err instanceof exports.TwError;
3836
+ return err instanceof TwError;
3755
3837
  }
3756
3838
  function loadNativeBinding(options) {
3757
3839
  const { runtimeDir, candidates, isValid } = options;
3758
3840
  const loadErrors = [];
3759
3841
  for (const candidate of candidates) {
3760
- const candidatePath = path__namespace.default.resolve(runtimeDir, candidate);
3842
+ const candidatePath = import_node_path4.default.resolve(runtimeDir, candidate);
3761
3843
  try {
3762
- if (!fs3__namespace.default.existsSync(candidatePath) && !fs3__namespace.default.existsSync(candidatePath + ".node")) {
3844
+ if (!import_node_fs4.default.existsSync(candidatePath) && !import_node_fs4.default.existsSync(candidatePath + ".node")) {
3763
3845
  continue;
3764
3846
  }
3765
3847
  const mod = requireNativeModule(candidatePath);
@@ -3791,9 +3873,9 @@ function resolveNativeBindingCandidates(options) {
3791
3873
  }
3792
3874
  }
3793
3875
  if (!includeDefaultCandidates) return candidates;
3794
- if (fs3__namespace.default.existsSync(runtimeDir)) {
3876
+ if (import_node_fs4.default.existsSync(runtimeDir)) {
3795
3877
  try {
3796
- for (const entry of fs3__namespace.default.readdirSync(runtimeDir)) {
3878
+ for (const entry of import_node_fs4.default.readdirSync(runtimeDir)) {
3797
3879
  if (entry.endsWith(".node")) candidates.push(entry);
3798
3880
  }
3799
3881
  } catch {
@@ -3802,38 +3884,44 @@ function resolveNativeBindingCandidates(options) {
3802
3884
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
3803
3885
  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
3886
  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`));
3887
+ candidates.push(import_node_path4.default.resolve(runtimeDir, `${bin}.node`));
3888
+ candidates.push(import_node_path4.default.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3889
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "native", `${bin}.node`));
3890
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3891
+ candidates.push(import_node_path4.default.resolve(process.cwd(), "native", `${bin}.node`));
3892
+ candidates.push(import_node_path4.default.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3893
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3894
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3895
+ candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3814
3896
  }
3815
3897
  return Array.from(new Set(candidates));
3816
3898
  }
3817
3899
  function resolveRuntimeDir(dir, importMetaUrl) {
3818
- if (dir) return path__namespace.default.resolve(dir);
3900
+ if (dir) return import_node_path4.default.resolve(dir);
3819
3901
  try {
3820
- return path__namespace.default.dirname(url.fileURLToPath(importMetaUrl));
3902
+ return import_node_path4.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
3821
3903
  } catch {
3822
3904
  return process.cwd();
3823
3905
  }
3824
3906
  }
3825
3907
  function hashContent2(content, algorithm = "md5", length) {
3826
- const hash = crypto.createHash(algorithm).update(content).digest("hex");
3908
+ const hash = (0, import_node_crypto.createHash)(algorithm).update(content).digest("hex");
3827
3909
  return length ? hash.slice(0, length) : hash;
3828
3910
  }
3829
3911
  function formatErrorMessage(error) {
3830
- if (error instanceof exports.TwError) return error.toString();
3912
+ if (error instanceof TwError) return error.toString();
3831
3913
  if (error instanceof Error) return error.message;
3832
3914
  return String(error);
3833
3915
  }
3834
- exports.TwError = void 0; var _require3; exports.LRUCache = void 0;
3916
+ var import_node_crypto, import_node_fs4, import_node_path4, import_node_url, import_node_module5, TwError, _require3, LRUCache;
3835
3917
  var init_src2 = __esm({
3836
3918
  "packages/domain/shared/src/index.ts"() {
3919
+ "use strict";
3920
+ import_node_crypto = require("crypto");
3921
+ import_node_fs4 = __toESM(require("fs"));
3922
+ import_node_path4 = __toESM(require("path"));
3923
+ import_node_url = require("url");
3924
+ import_node_module5 = require("module");
3837
3925
  init_trace();
3838
3926
  init_error_codes();
3839
3927
  init_compatibility();
@@ -3847,7 +3935,7 @@ var init_src2 = __esm({
3847
3935
  init_observability();
3848
3936
  init_staticStateExtractor();
3849
3937
  init_logger();
3850
- exports.TwError = class _TwError extends Error {
3938
+ TwError = class _TwError extends Error {
3851
3939
  /** @deprecated Gunakan source */
3852
3940
  domain;
3853
3941
  source;
@@ -3899,8 +3987,10 @@ var init_src2 = __esm({
3899
3987
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
3900
3988
  }
3901
3989
  };
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 {
3990
+ _require3 = (0, import_node_module5.createRequire)(
3991
+ typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
3992
+ );
3993
+ LRUCache = class {
3904
3994
  capacity;
3905
3995
  cache;
3906
3996
  constructor(capacity) {
@@ -3945,56 +4035,148 @@ var init_src2 = __esm({
3945
4035
  });
3946
4036
 
3947
4037
  // src/umbrella/shared.ts
4038
+ var shared_exports = {};
4039
+ __export(shared_exports, {
4040
+ ERROR_CODES: () => ERROR_CODES,
4041
+ LRUCache: () => LRUCache,
4042
+ NativeAnalyzerReportSchema: () => NativeAnalyzerReportSchema,
4043
+ NativeCacheEntrySchema: () => NativeCacheEntrySchema,
4044
+ NativeCacheReadResultSchema: () => NativeCacheReadResultSchema,
4045
+ NativeCssCompileResultSchema: () => NativeCssCompileResultSchema,
4046
+ NativeScanFileSchema: () => NativeScanFileSchema,
4047
+ NativeScanResultSchema: () => NativeScanResultSchema,
4048
+ NativeTransformResultSchema: () => NativeTransformResultSchema,
4049
+ NativeWatchResultSchema: () => NativeWatchResultSchema,
4050
+ PackageJsonSchema: () => PackageJsonSchema,
4051
+ RegistryFileSchema: () => RegistryFileSchema,
4052
+ RegistryPluginEntrySchema: () => RegistryPluginEntrySchema,
4053
+ ScanCacheClassEntrySchema: () => ScanCacheClassEntrySchema,
4054
+ ScanCacheSchema: () => ScanCacheSchema,
4055
+ TW_STATE_STATIC_FILENAME: () => TW_STATE_STATIC_FILENAME,
4056
+ TailwindConfigSchema: () => TailwindConfigSchema,
4057
+ TelemetryCollector: () => TelemetryCollector,
4058
+ TwError: () => TwError,
4059
+ appendStaticStateCssToSafelist: () => appendStaticStateCssToSafelist,
4060
+ assertTailwindV4: () => assertTailwindV4,
4061
+ calculateHealth: () => calculateHealth,
4062
+ createBuildTimer: () => createBuildTimer,
4063
+ createDebugLogger: () => createDebugLogger,
4064
+ createEsmRequire: () => createEsmRequire,
4065
+ createLogger: () => createLogger2,
4066
+ createObservabilityClient: () => createObservabilityClient,
4067
+ createTraceSnapshot: () => createTraceSnapshot,
4068
+ detectTailwind: () => detectTailwind,
4069
+ extractStaticStateCss: () => extractStaticStateCss,
4070
+ formatDuration: () => formatDuration,
4071
+ formatErrorCode: () => formatErrorCode,
4072
+ formatErrorMessage: () => formatErrorMessage,
4073
+ formatMemory: () => formatMemory,
4074
+ formatNativeNotFoundError: () => formatNativeNotFoundError,
4075
+ generateBarrelFile: () => generateBarrelFile,
4076
+ generateClassRenameCodemod: () => generateClassRenameCodemod,
4077
+ generateComponentCode: () => generateComponentCode,
4078
+ generateStorybookStory: () => generateStorybookStory,
4079
+ getBuildTimeColor: () => getBuildTimeColor,
4080
+ getDirname: () => getDirname,
4081
+ getFilename: () => getFilename,
4082
+ getGlobalTelemetry: () => getGlobalTelemetry,
4083
+ getHealthColor: () => getHealthColor,
4084
+ getMemoryColor: () => getMemoryColor,
4085
+ getModeColor: () => getModeColor,
4086
+ getPipelinePercentages: () => getPipelinePercentages,
4087
+ getSuggestion: () => getSuggestion,
4088
+ getTailwindVersion: () => getTailwindVersion,
4089
+ hashContent: () => hashContent2,
4090
+ isTailwindV4: () => isTailwindV4,
4091
+ isTwError: () => isTwError,
4092
+ loadNativeBinding: () => loadNativeBinding,
4093
+ parseJsonFileWithSchema: () => parseJsonFileWithSchema,
4094
+ parseJsonWithSchema: () => parseJsonWithSchema,
4095
+ parseNative: () => parseNative,
4096
+ resetGlobalTelemetry: () => resetGlobalTelemetry,
4097
+ resolveFromRoot: () => resolveFromRoot,
4098
+ resolveLoaderPath: () => resolveLoaderPath,
4099
+ resolveNativeBinary: () => resolveNativeBinary,
4100
+ resolveNativeBindingCandidates: () => resolveNativeBindingCandidates,
4101
+ resolveNativeNodePath: () => resolveNativeNodePath,
4102
+ resolveRuntimeDir: () => resolveRuntimeDir,
4103
+ resolveWorkerPath: () => resolveWorkerPath,
4104
+ safeParseNative: () => safeParseNative,
4105
+ setGlobalLogFile: () => setGlobalLogFile,
4106
+ tryRequire: () => tryRequire,
4107
+ wrapUnknownError: () => wrapUnknownError
4108
+ });
4109
+ module.exports = __toCommonJS(shared_exports);
3948
4110
  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
4111
+ // Annotate the CommonJS export names for ESM import in node:
4112
+ 0 && (module.exports = {
4113
+ ERROR_CODES,
4114
+ LRUCache,
4115
+ NativeAnalyzerReportSchema,
4116
+ NativeCacheEntrySchema,
4117
+ NativeCacheReadResultSchema,
4118
+ NativeCssCompileResultSchema,
4119
+ NativeScanFileSchema,
4120
+ NativeScanResultSchema,
4121
+ NativeTransformResultSchema,
4122
+ NativeWatchResultSchema,
4123
+ PackageJsonSchema,
4124
+ RegistryFileSchema,
4125
+ RegistryPluginEntrySchema,
4126
+ ScanCacheClassEntrySchema,
4127
+ ScanCacheSchema,
4128
+ TW_STATE_STATIC_FILENAME,
4129
+ TailwindConfigSchema,
4130
+ TelemetryCollector,
4131
+ TwError,
4132
+ appendStaticStateCssToSafelist,
4133
+ assertTailwindV4,
4134
+ calculateHealth,
4135
+ createBuildTimer,
4136
+ createDebugLogger,
4137
+ createEsmRequire,
4138
+ createLogger,
4139
+ createObservabilityClient,
4140
+ createTraceSnapshot,
4141
+ detectTailwind,
4142
+ extractStaticStateCss,
4143
+ formatDuration,
4144
+ formatErrorCode,
4145
+ formatErrorMessage,
4146
+ formatMemory,
4147
+ formatNativeNotFoundError,
4148
+ generateBarrelFile,
4149
+ generateClassRenameCodemod,
4150
+ generateComponentCode,
4151
+ generateStorybookStory,
4152
+ getBuildTimeColor,
4153
+ getDirname,
4154
+ getFilename,
4155
+ getGlobalTelemetry,
4156
+ getHealthColor,
4157
+ getMemoryColor,
4158
+ getModeColor,
4159
+ getPipelinePercentages,
4160
+ getSuggestion,
4161
+ getTailwindVersion,
4162
+ hashContent,
4163
+ isTailwindV4,
4164
+ isTwError,
4165
+ loadNativeBinding,
4166
+ parseJsonFileWithSchema,
4167
+ parseJsonWithSchema,
4168
+ parseNative,
4169
+ resetGlobalTelemetry,
4170
+ resolveFromRoot,
4171
+ resolveLoaderPath,
4172
+ resolveNativeBinary,
4173
+ resolveNativeBindingCandidates,
4174
+ resolveNativeNodePath,
4175
+ resolveRuntimeDir,
4176
+ resolveWorkerPath,
4177
+ safeParseNative,
4178
+ setGlobalLogFile,
4179
+ tryRequire,
4180
+ wrapUnknownError
4181
+ });
4000
4182
  //# sourceMappingURL=shared.js.map