tailwind-styled-v4 5.0.40 → 5.0.411

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/analyzer.js +43 -16
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +104 -72
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +33 -7
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +55 -22
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +39 -10
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +56 -23
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +222 -38
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +321 -203
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +57 -14
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +71 -28
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +0 -1
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/devtools.js +16 -2
  24. package/dist/devtools.js.map +1 -1
  25. package/dist/devtools.mjs +21 -2
  26. package/dist/devtools.mjs.map +1 -1
  27. package/dist/engine.js +141 -51
  28. package/dist/engine.js.map +1 -1
  29. package/dist/engine.mjs +238 -148
  30. package/dist/engine.mjs.map +1 -1
  31. package/dist/index.js +50 -8
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +74 -29
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/next.js +98 -37
  36. package/dist/next.js.map +1 -1
  37. package/dist/next.mjs +177 -115
  38. package/dist/next.mjs.map +1 -1
  39. package/dist/plugin-api.js +0 -1
  40. package/dist/plugin-api.js.map +1 -1
  41. package/dist/plugin-registry.js +6 -2
  42. package/dist/plugin-registry.js.map +1 -1
  43. package/dist/plugin-registry.mjs +9 -2
  44. package/dist/plugin-registry.mjs.map +1 -1
  45. package/dist/plugin.js +0 -1
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/preset.js +0 -1
  48. package/dist/preset.js.map +1 -1
  49. package/dist/rspack.js +89 -6
  50. package/dist/rspack.js.map +1 -1
  51. package/dist/rspack.mjs +39 -18
  52. package/dist/rspack.mjs.map +1 -1
  53. package/dist/runtime-css.js +0 -1
  54. package/dist/runtime-css.js.map +1 -1
  55. package/dist/runtime.js +0 -1
  56. package/dist/runtime.js.map +1 -1
  57. package/dist/scanner.js +29 -11
  58. package/dist/scanner.js.map +1 -1
  59. package/dist/scanner.mjs +84 -61
  60. package/dist/scanner.mjs.map +1 -1
  61. package/dist/shared.js +91 -35
  62. package/dist/shared.js.map +1 -1
  63. package/dist/shared.mjs +122 -64
  64. package/dist/shared.mjs.map +1 -1
  65. package/dist/storybook-addon.js +0 -1
  66. package/dist/storybook-addon.js.map +1 -1
  67. package/dist/svelte.js +40 -8
  68. package/dist/svelte.js.map +1 -1
  69. package/dist/svelte.mjs +57 -28
  70. package/dist/svelte.mjs.map +1 -1
  71. package/dist/syntax.js +7 -3
  72. package/dist/syntax.js.map +1 -1
  73. package/dist/syntax.mjs +30 -23
  74. package/dist/syntax.mjs.map +1 -1
  75. package/dist/testing.js +0 -1
  76. package/dist/testing.js.map +1 -1
  77. package/dist/theme.js +23 -5
  78. package/dist/theme.js.map +1 -1
  79. package/dist/theme.mjs +41 -17
  80. package/dist/theme.mjs.map +1 -1
  81. package/dist/turbopackLoader.js +58 -14
  82. package/dist/turbopackLoader.js.map +1 -1
  83. package/dist/turbopackLoader.mjs +89 -45
  84. package/dist/turbopackLoader.mjs.map +1 -1
  85. package/dist/tw.js +224 -38
  86. package/dist/tw.js.map +1 -1
  87. package/dist/tw.mjs +321 -203
  88. package/dist/tw.mjs.map +1 -1
  89. package/dist/vite.js +132 -50
  90. package/dist/vite.js.map +1 -1
  91. package/dist/vite.mjs +226 -143
  92. package/dist/vite.mjs.map +1 -1
  93. package/dist/vue.js +40 -8
  94. package/dist/vue.js.map +1 -1
  95. package/dist/vue.mjs +57 -28
  96. package/dist/vue.mjs.map +1 -1
  97. package/dist/webpackLoader.js +40 -10
  98. package/dist/webpackLoader.js.map +1 -1
  99. package/dist/webpackLoader.mjs +59 -27
  100. package/dist/webpackLoader.mjs.map +1 -1
  101. package/package.json +1 -1
package/dist/tw.mjs CHANGED
@@ -40,10 +40,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
40
  ));
41
41
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
42
 
43
+ // node_modules/tsup/assets/esm_shims.js
44
+ import path from "path";
45
+ import { fileURLToPath } from "url";
46
+ var getFilename, getDirname, __dirname, __filename;
47
+ var init_esm_shims = __esm({
48
+ "node_modules/tsup/assets/esm_shims.js"() {
49
+ "use strict";
50
+ getFilename = () => fileURLToPath(import.meta.url);
51
+ getDirname = () => path.dirname(getFilename());
52
+ __dirname = /* @__PURE__ */ getDirname();
53
+ __filename = /* @__PURE__ */ getFilename();
54
+ }
55
+ });
56
+
43
57
  // packages/infrastructure/cli/node_modules/commander/lib/error.js
44
58
  var require_error = __commonJS({
45
59
  "packages/infrastructure/cli/node_modules/commander/lib/error.js"(exports) {
46
60
  "use strict";
61
+ init_esm_shims();
47
62
  var CommanderError2 = class extends Error {
48
63
  /**
49
64
  * Constructs the CommanderError class
@@ -80,6 +95,7 @@ var require_error = __commonJS({
80
95
  var require_argument = __commonJS({
81
96
  "packages/infrastructure/cli/node_modules/commander/lib/argument.js"(exports) {
82
97
  "use strict";
98
+ init_esm_shims();
83
99
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
84
100
  var Argument2 = class {
85
101
  /**
@@ -208,6 +224,7 @@ var require_argument = __commonJS({
208
224
  var require_help = __commonJS({
209
225
  "packages/infrastructure/cli/node_modules/commander/lib/help.js"(exports) {
210
226
  "use strict";
227
+ init_esm_shims();
211
228
  var { humanReadableArgName } = require_argument();
212
229
  var Help2 = class {
213
230
  constructor() {
@@ -623,6 +640,7 @@ var require_help = __commonJS({
623
640
  var require_option = __commonJS({
624
641
  "packages/infrastructure/cli/node_modules/commander/lib/option.js"(exports) {
625
642
  "use strict";
643
+ init_esm_shims();
626
644
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
627
645
  var Option2 = class {
628
646
  /**
@@ -896,6 +914,7 @@ var require_option = __commonJS({
896
914
  var require_suggestSimilar = __commonJS({
897
915
  "packages/infrastructure/cli/node_modules/commander/lib/suggestSimilar.js"(exports) {
898
916
  "use strict";
917
+ init_esm_shims();
899
918
  var maxDistance = 3;
900
919
  function editDistance(a, b) {
901
920
  if (Math.abs(a.length - b.length) > maxDistance)
@@ -977,9 +996,10 @@ var require_suggestSimilar = __commonJS({
977
996
  var require_command = __commonJS({
978
997
  "packages/infrastructure/cli/node_modules/commander/lib/command.js"(exports) {
979
998
  "use strict";
999
+ init_esm_shims();
980
1000
  var EventEmitter = __require("events").EventEmitter;
981
1001
  var childProcess = __require("child_process");
982
- var path30 = __require("path");
1002
+ var path31 = __require("path");
983
1003
  var fs16 = __require("fs");
984
1004
  var process2 = __require("process");
985
1005
  var { Argument: Argument2, humanReadableArgName } = require_argument();
@@ -1912,9 +1932,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
1912
1932
  let launchWithNode = false;
1913
1933
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1914
1934
  function findFile(baseDir, baseName) {
1915
- const localBin = path30.resolve(baseDir, baseName);
1935
+ const localBin = path31.resolve(baseDir, baseName);
1916
1936
  if (fs16.existsSync(localBin)) return localBin;
1917
- if (sourceExt.includes(path30.extname(baseName))) return void 0;
1937
+ if (sourceExt.includes(path31.extname(baseName))) return void 0;
1918
1938
  const foundExt = sourceExt.find(
1919
1939
  (ext) => fs16.existsSync(`${localBin}${ext}`)
1920
1940
  );
@@ -1932,17 +1952,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
1932
1952
  } catch (err) {
1933
1953
  resolvedScriptPath = this._scriptPath;
1934
1954
  }
1935
- executableDir = path30.resolve(
1936
- path30.dirname(resolvedScriptPath),
1955
+ executableDir = path31.resolve(
1956
+ path31.dirname(resolvedScriptPath),
1937
1957
  executableDir
1938
1958
  );
1939
1959
  }
1940
1960
  if (executableDir) {
1941
1961
  let localFile = findFile(executableDir, executableFile);
1942
1962
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1943
- const legacyName = path30.basename(
1963
+ const legacyName = path31.basename(
1944
1964
  this._scriptPath,
1945
- path30.extname(this._scriptPath)
1965
+ path31.extname(this._scriptPath)
1946
1966
  );
1947
1967
  if (legacyName !== this._name) {
1948
1968
  localFile = findFile(
@@ -1953,7 +1973,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1953
1973
  }
1954
1974
  executableFile = localFile || executableFile;
1955
1975
  }
1956
- launchWithNode = sourceExt.includes(path30.extname(executableFile));
1976
+ launchWithNode = sourceExt.includes(path31.extname(executableFile));
1957
1977
  let proc;
1958
1978
  if (process2.platform !== "win32") {
1959
1979
  if (launchWithNode) {
@@ -2793,7 +2813,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2793
2813
  * @return {Command}
2794
2814
  */
2795
2815
  nameFromFilename(filename) {
2796
- this._name = path30.basename(filename, path30.extname(filename));
2816
+ this._name = path31.basename(filename, path31.extname(filename));
2797
2817
  return this;
2798
2818
  }
2799
2819
  /**
@@ -2807,9 +2827,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2807
2827
  * @param {string} [path]
2808
2828
  * @return {(string|null|Command)}
2809
2829
  */
2810
- executableDir(path31) {
2811
- if (path31 === void 0) return this._executableDir;
2812
- this._executableDir = path31;
2830
+ executableDir(path32) {
2831
+ if (path32 === void 0) return this._executableDir;
2832
+ this._executableDir = path32;
2813
2833
  return this;
2814
2834
  }
2815
2835
  /**
@@ -3021,6 +3041,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3021
3041
  var require_commander = __commonJS({
3022
3042
  "packages/infrastructure/cli/node_modules/commander/index.js"(exports) {
3023
3043
  "use strict";
3044
+ init_esm_shims();
3024
3045
  var { Argument: Argument2 } = require_argument();
3025
3046
  var { Command: Command2 } = require_command();
3026
3047
  var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
@@ -3045,6 +3066,7 @@ var import_index, program, createCommand, createArgument, createOption, Commande
3045
3066
  var init_esm = __esm({
3046
3067
  "packages/infrastructure/cli/node_modules/commander/esm.mjs"() {
3047
3068
  "use strict";
3069
+ init_esm_shims();
3048
3070
  import_index = __toESM(require_commander(), 1);
3049
3071
  ({
3050
3072
  program,
@@ -3091,6 +3113,7 @@ var CliError, CliUsageError;
3091
3113
  var init_errors = __esm({
3092
3114
  "packages/infrastructure/cli/src/utils/errors.ts"() {
3093
3115
  "use strict";
3116
+ init_esm_shims();
3094
3117
  CliError = class extends Error {
3095
3118
  exitCode;
3096
3119
  code;
@@ -3158,7 +3181,7 @@ function getNodeUrl() {
3158
3181
  }
3159
3182
  return _nodeUrl;
3160
3183
  }
3161
- function getDirname(importMetaUrl) {
3184
+ function getDirname2(importMetaUrl) {
3162
3185
  if (isBrowser) return "";
3163
3186
  if (typeof __dirname !== "undefined") return __dirname;
3164
3187
  const nodePath = getNodePath();
@@ -3169,6 +3192,7 @@ var isBrowser, nodeModuleRef, _nodePath, _nodeUrl;
3169
3192
  var init_esmHelpers = __esm({
3170
3193
  "packages/domain/shared/src/esmHelpers.ts"() {
3171
3194
  "use strict";
3195
+ init_esm_shims();
3172
3196
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
3173
3197
  nodeModuleRef = null;
3174
3198
  _nodePath = null;
@@ -3179,7 +3203,16 @@ var init_esmHelpers = __esm({
3179
3203
  // packages/domain/shared/src/native-resolution.ts
3180
3204
  import { createRequire } from "module";
3181
3205
  import * as fs from "fs";
3182
- import * as path from "path";
3206
+ import * as path2 from "path";
3207
+ function _safeCreateRequire() {
3208
+ if (typeof import.meta !== "undefined" && import.meta.url && !import.meta.url.includes("unknown")) {
3209
+ return createRequire(import.meta.url);
3210
+ }
3211
+ if (typeof __filename !== "undefined") {
3212
+ return createRequire(__filename);
3213
+ }
3214
+ return createRequire(new URL(`file://${process.cwd()}/`).href);
3215
+ }
3183
3216
  function platformKey() {
3184
3217
  if (isBrowser2) return "browser";
3185
3218
  return `${process.platform}-${process.arch}`;
@@ -3215,11 +3248,11 @@ function resolveNativeBinary(runtimeDir) {
3215
3248
  const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
3216
3249
  const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
3217
3250
  if (runtimeDir) {
3218
- for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
3219
- const pkgRoot = path.resolve(runtimeDir, depth);
3251
+ for (const depth of ["..", path2.join("..", ".."), path2.join("..", "..", "..")]) {
3252
+ const pkgRoot = path2.resolve(runtimeDir, depth);
3220
3253
  for (const bin of BINARY_NAMES_SELF) {
3221
3254
  for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
3222
- const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
3255
+ const candidate = path2.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
3223
3256
  tried.push(`self-bundled:${candidate}`);
3224
3257
  if (fs.existsSync(candidate)) {
3225
3258
  return { path: candidate, source: "prebuilt", platform, tried };
@@ -3233,22 +3266,22 @@ function resolveNativeBinary(runtimeDir) {
3233
3266
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
3234
3267
  const localCandidates = [];
3235
3268
  for (const bin of BINARY_NAMES) {
3236
- localCandidates.push(path.resolve(base, `${bin}.node`));
3237
- localCandidates.push(path.resolve(base, "..", `${bin}.node`));
3238
- localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
3239
- localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
3269
+ localCandidates.push(path2.resolve(base, `${bin}.node`));
3270
+ localCandidates.push(path2.resolve(base, "..", `${bin}.node`));
3271
+ localCandidates.push(path2.resolve(base, `${bin}.${platform}.node`));
3272
+ localCandidates.push(path2.resolve(base, `${bin}.${napiPlatform}.node`));
3240
3273
  }
3241
3274
  for (const startDir of [cwd2, base]) {
3242
3275
  let dir = startDir;
3243
3276
  for (let i = 0; i < 6; i++) {
3244
- const nativeDir = path.resolve(dir, "native");
3277
+ const nativeDir = path2.resolve(dir, "native");
3245
3278
  for (const bin of BINARY_NAMES) {
3246
- localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
3247
- localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
3248
- localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
3249
- localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
3279
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.node`));
3280
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.${platform}.node`));
3281
+ localCandidates.push(path2.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
3282
+ localCandidates.push(path2.resolve(nativeDir, "target", "release", `${bin}.node`));
3250
3283
  }
3251
- const parent = path.resolve(dir, "..");
3284
+ const parent = path2.resolve(dir, "..");
3252
3285
  if (parent === dir) break;
3253
3286
  dir = parent;
3254
3287
  }
@@ -3265,10 +3298,9 @@ var isBrowser2, _require, PLATFORM_MAP;
3265
3298
  var init_native_resolution = __esm({
3266
3299
  "packages/domain/shared/src/native-resolution.ts"() {
3267
3300
  "use strict";
3301
+ init_esm_shims();
3268
3302
  isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
3269
- _require = createRequire(
3270
- typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
3271
- );
3303
+ _require = _safeCreateRequire();
3272
3304
  PLATFORM_MAP = {
3273
3305
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
3274
3306
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -3283,8 +3315,8 @@ var init_native_resolution = __esm({
3283
3315
  // packages/domain/shared/src/index.ts
3284
3316
  import { createHash } from "crypto";
3285
3317
  import fs2 from "fs";
3286
- import path2 from "path";
3287
- import { fileURLToPath } from "url";
3318
+ import path3 from "path";
3319
+ import { fileURLToPath as fileURLToPath2 } from "url";
3288
3320
  import { createRequire as createRequire2 } from "module";
3289
3321
  function createLogger(namespace) {
3290
3322
  const prefix = `[${namespace}]`;
@@ -3315,9 +3347,9 @@ function createDebugLogger(namespace, label) {
3315
3347
  }
3316
3348
  };
3317
3349
  }
3318
- function formatIssuePath(path30) {
3319
- if (!path30 || path30.length === 0) return "(root)";
3320
- return path30.map(
3350
+ function formatIssuePath(path31) {
3351
+ if (!path31 || path31.length === 0) return "(root)";
3352
+ return path31.map(
3321
3353
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
3322
3354
  ).join(".");
3323
3355
  }
@@ -3328,7 +3360,7 @@ function loadNativeBinding(options) {
3328
3360
  const { runtimeDir, candidates, isValid } = options;
3329
3361
  const loadErrors = [];
3330
3362
  for (const candidate of candidates) {
3331
- const candidatePath = path2.resolve(runtimeDir, candidate);
3363
+ const candidatePath = path3.resolve(runtimeDir, candidate);
3332
3364
  try {
3333
3365
  if (!fs2.existsSync(candidatePath) && !fs2.existsSync(candidatePath + ".node")) {
3334
3366
  continue;
@@ -3373,22 +3405,22 @@ function resolveNativeBindingCandidates(options) {
3373
3405
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
3374
3406
  const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
3375
3407
  for (const bin of BINARY_NAMES) {
3376
- candidates.push(path2.resolve(runtimeDir, `${bin}.node`));
3377
- candidates.push(path2.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3378
- candidates.push(path2.resolve(runtimeDir, "..", "native", `${bin}.node`));
3379
- candidates.push(path2.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3380
- candidates.push(path2.resolve(process.cwd(), "native", `${bin}.node`));
3381
- candidates.push(path2.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3382
- candidates.push(path2.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3383
- candidates.push(path2.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3384
- candidates.push(path2.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3408
+ candidates.push(path3.resolve(runtimeDir, `${bin}.node`));
3409
+ candidates.push(path3.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
3410
+ candidates.push(path3.resolve(runtimeDir, "..", "native", `${bin}.node`));
3411
+ candidates.push(path3.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
3412
+ candidates.push(path3.resolve(process.cwd(), "native", `${bin}.node`));
3413
+ candidates.push(path3.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
3414
+ candidates.push(path3.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
3415
+ candidates.push(path3.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
3416
+ candidates.push(path3.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
3385
3417
  }
3386
3418
  return Array.from(new Set(candidates));
3387
3419
  }
3388
3420
  function resolveRuntimeDir(dir, importMetaUrl) {
3389
- if (dir) return path2.resolve(dir);
3421
+ if (dir) return path3.resolve(dir);
3390
3422
  try {
3391
- return path2.dirname(fileURLToPath(importMetaUrl));
3423
+ return path3.dirname(fileURLToPath2(importMetaUrl));
3392
3424
  } catch {
3393
3425
  return process.cwd();
3394
3426
  }
@@ -3397,6 +3429,7 @@ var TwError, _require2;
3397
3429
  var init_src = __esm({
3398
3430
  "packages/domain/shared/src/index.ts"() {
3399
3431
  "use strict";
3432
+ init_esm_shims();
3400
3433
  init_esmHelpers();
3401
3434
  init_native_resolution();
3402
3435
  TwError = class _TwError extends Error {
@@ -3432,8 +3465,8 @@ var init_src = __esm({
3432
3465
  /** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
3433
3466
  static fromZod(err) {
3434
3467
  const first = err.issues?.[0] ?? err.errors?.[0];
3435
- const path30 = formatIssuePath(first?.path);
3436
- const message = first ? `${path30}: ${first.message}` : "Schema validation failed";
3468
+ const path31 = formatIssuePath(first?.path);
3469
+ const message = first ? `${path31}: ${first.message}` : "Schema validation failed";
3437
3470
  return new _TwError("validation", "SCHEMA_VALIDATION_FAILED", message, err);
3438
3471
  }
3439
3472
  static wrap(source, code, err) {
@@ -3486,14 +3519,14 @@ __export(native_bridge_exports, {
3486
3519
  startWatchNative: () => startWatchNative,
3487
3520
  stopWatchNative: () => stopWatchNative
3488
3521
  });
3489
- import path3 from "path";
3490
- import { fileURLToPath as fileURLToPath2 } from "url";
3491
- function getDirname2() {
3522
+ import path4 from "path";
3523
+ import { fileURLToPath as fileURLToPath3 } from "url";
3524
+ function getDirname3() {
3492
3525
  if (typeof __dirname !== "undefined") {
3493
3526
  return __dirname;
3494
3527
  }
3495
3528
  if (typeof import.meta !== "undefined" && import.meta.url) {
3496
- return path3.dirname(fileURLToPath2(import.meta.url));
3529
+ return path4.dirname(fileURLToPath3(import.meta.url));
3497
3530
  }
3498
3531
  return process.cwd();
3499
3532
  }
@@ -3702,6 +3735,7 @@ var log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader,
3702
3735
  var init_native_bridge = __esm({
3703
3736
  "packages/domain/scanner/src/native-bridge.ts"() {
3704
3737
  "use strict";
3738
+ init_esm_shims();
3705
3739
  init_src();
3706
3740
  log = createDebugLogger("scanner:native");
3707
3741
  isValidScannerBinding = (module) => {
@@ -3744,7 +3778,7 @@ var init_native_bridge = __esm({
3744
3778
  }
3745
3779
  return throwNativeBindingError();
3746
3780
  }
3747
- const runtimeDir = getDirname2();
3781
+ const runtimeDir = getDirname3();
3748
3782
  const candidates = resolveNativeBindingCandidates({
3749
3783
  runtimeDir,
3750
3784
  includeDefaultCandidates: true
@@ -3785,14 +3819,14 @@ var init_native_bridge = __esm({
3785
3819
 
3786
3820
  // packages/domain/scanner/src/cache-native.ts
3787
3821
  import fs3 from "fs";
3788
- import path4 from "path";
3822
+ import path5 from "path";
3789
3823
  function defaultCachePath(rootDir, cacheDir) {
3790
- const dir = cacheDir ? path4.resolve(rootDir, cacheDir) : path4.join(process.cwd(), ".cache", "tailwind-styled");
3791
- return path4.join(dir, "scanner-cache.json");
3824
+ const dir = cacheDir ? path5.resolve(rootDir, cacheDir) : path5.join(process.cwd(), ".cache", "tailwind-styled");
3825
+ return path5.join(dir, "scanner-cache.json");
3792
3826
  }
3793
3827
  function readCache(rootDir, cacheDir) {
3794
3828
  const cachePath = defaultCachePath(rootDir, cacheDir);
3795
- fs3.mkdirSync(path4.dirname(cachePath), { recursive: true });
3829
+ fs3.mkdirSync(path5.dirname(cachePath), { recursive: true });
3796
3830
  const result = cacheReadNative(cachePath);
3797
3831
  if (!result) return [];
3798
3832
  return result.entries.map((e) => ({
@@ -3807,7 +3841,7 @@ function readCache(rootDir, cacheDir) {
3807
3841
  }
3808
3842
  function writeCache(rootDir, entries, cacheDir) {
3809
3843
  const cachePath = defaultCachePath(rootDir, cacheDir);
3810
- fs3.mkdirSync(path4.dirname(cachePath), { recursive: true });
3844
+ fs3.mkdirSync(path5.dirname(cachePath), { recursive: true });
3811
3845
  const success = cacheWriteNative(cachePath, entries);
3812
3846
  if (!success) {
3813
3847
  throw new Error(
@@ -3830,6 +3864,7 @@ var STALE_THRESHOLD_MS;
3830
3864
  var init_cache_native = __esm({
3831
3865
  "packages/domain/scanner/src/cache-native.ts"() {
3832
3866
  "use strict";
3867
+ init_esm_shims();
3833
3868
  init_native_bridge();
3834
3869
  STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
3835
3870
  }
@@ -3837,9 +3872,9 @@ var init_cache_native = __esm({
3837
3872
 
3838
3873
  // packages/domain/scanner/src/parallel-scanner.ts
3839
3874
  import { Worker, isMainThread, parentPort, workerData } from "worker_threads";
3840
- import path5 from "path";
3875
+ import path6 from "path";
3841
3876
  import { availableParallelism } from "os";
3842
- import { fileURLToPath as fileURLToPath3 } from "url";
3877
+ import { fileURLToPath as fileURLToPath4 } from "url";
3843
3878
  function collectFiles(rootDir, extensions, ignoreDirs) {
3844
3879
  const native = collectFilesNative(rootDir, extensions, ignoreDirs);
3845
3880
  if (native !== null) return native;
@@ -3880,7 +3915,7 @@ async function scanWorkspaceParallel(rootDir, options = {}) {
3880
3915
  maxWorkers = Math.max(1, availableParallelism() - 1),
3881
3916
  chunkSize = DEFAULT_CHUNK_SIZE
3882
3917
  } = options;
3883
- const files = collectFiles(path5.resolve(rootDir), extensions, ignoreDirs);
3918
+ const files = collectFiles(path6.resolve(rootDir), extensions, ignoreDirs);
3884
3919
  if (files.length < PARALLEL_THRESHOLD) {
3885
3920
  return mergeResults(batchExtractClassesNative(files));
3886
3921
  }
@@ -3900,6 +3935,7 @@ var PARALLEL_THRESHOLD, DEFAULT_CHUNK_SIZE, _workerFilename;
3900
3935
  var init_parallel_scanner = __esm({
3901
3936
  "packages/domain/scanner/src/parallel-scanner.ts"() {
3902
3937
  "use strict";
3938
+ init_esm_shims();
3903
3939
  init_src2();
3904
3940
  init_native_bridge();
3905
3941
  PARALLEL_THRESHOLD = 50;
@@ -3918,7 +3954,7 @@ var init_parallel_scanner = __esm({
3918
3954
  parentPort.postMessage(msg);
3919
3955
  }
3920
3956
  }
3921
- _workerFilename = typeof __filename !== "undefined" ? __filename : fileURLToPath3(import.meta.url);
3957
+ _workerFilename = typeof __filename !== "undefined" ? __filename : fileURLToPath4(import.meta.url);
3922
3958
  }
3923
3959
  });
3924
3960
 
@@ -3928,13 +3964,14 @@ var formatIssuePath2, formatIssues, parseWithSchema, NonNegativeIntegerSchema, S
3928
3964
  var init_schemas = __esm({
3929
3965
  "packages/domain/scanner/src/schemas.ts"() {
3930
3966
  "use strict";
3967
+ init_esm_shims();
3931
3968
  init_src();
3932
- formatIssuePath2 = (path30) => path30.length > 0 ? path30.map(
3969
+ formatIssuePath2 = (path31) => path31.length > 0 ? path31.map(
3933
3970
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
3934
3971
  ).join(".") : "<root>";
3935
3972
  formatIssues = (error) => error.issues.map((issue) => {
3936
- const path30 = formatIssuePath2(issue.path);
3937
- return `${path30}: ${issue.message}`;
3973
+ const path31 = formatIssuePath2(issue.path);
3974
+ return `${path31}: ${issue.message}`;
3938
3975
  }).join("; ");
3939
3976
  parseWithSchema = (schema, data, label) => {
3940
3977
  const parsed = schema.safeParse(data);
@@ -4008,15 +4045,15 @@ __export(src_exports, {
4008
4045
  });
4009
4046
  import fs4 from "fs";
4010
4047
  import { createRequire as createRequire3 } from "module";
4011
- import path6 from "path";
4012
- import { fileURLToPath as fileURLToPath4 } from "url";
4048
+ import path7 from "path";
4049
+ import { fileURLToPath as fileURLToPath5 } from "url";
4013
4050
  import { Worker as Worker2 } from "worker_threads";
4014
4051
  function getRuntimeDir() {
4015
4052
  if (typeof __dirname !== "undefined" && __dirname.length > 0) {
4016
4053
  return __dirname;
4017
4054
  }
4018
4055
  if (typeof import.meta !== "undefined" && import.meta.url) {
4019
- return path6.dirname(fileURLToPath4(import.meta.url));
4056
+ return path7.dirname(fileURLToPath5(import.meta.url));
4020
4057
  }
4021
4058
  return process.cwd();
4022
4059
  }
@@ -4026,14 +4063,14 @@ function resolveScannerWorkerModulePath() {
4026
4063
  return __dirname;
4027
4064
  }
4028
4065
  if (typeof import.meta !== "undefined" && import.meta.url) {
4029
- return path6.dirname(fileURLToPath4(import.meta.url));
4066
+ return path7.dirname(fileURLToPath5(import.meta.url));
4030
4067
  }
4031
4068
  return process.cwd();
4032
4069
  })();
4033
4070
  const candidates = [
4034
- path6.resolve(runtimeDir, "worker.cjs"),
4035
- path6.resolve(runtimeDir, "worker.js"),
4036
- path6.resolve(runtimeDir, "worker.ts")
4071
+ path7.resolve(runtimeDir, "worker.cjs"),
4072
+ path7.resolve(runtimeDir, "worker.js"),
4073
+ path7.resolve(runtimeDir, "worker.ts")
4037
4074
  ];
4038
4075
  for (const candidate of candidates) {
4039
4076
  if (fs4.existsSync(candidate)) return candidate;
@@ -4099,13 +4136,13 @@ function collectCandidates(rootDir, ignoreDirectories, extensionSet) {
4099
4136
  }
4100
4137
  })();
4101
4138
  for (const entry of entries) {
4102
- const fullPath = path6.join(currentDir, entry.name);
4139
+ const fullPath = path7.join(currentDir, entry.name);
4103
4140
  if (entry.isDirectory()) {
4104
4141
  if (!ignoreDirectories.has(entry.name)) directories.push(fullPath);
4105
4142
  continue;
4106
4143
  }
4107
4144
  if (!entry.isFile()) continue;
4108
- if (!extensionSet.has(path6.extname(entry.name))) continue;
4145
+ if (!extensionSet.has(path7.extname(entry.name))) continue;
4109
4146
  candidates.push(fullPath);
4110
4147
  }
4111
4148
  }
@@ -4132,7 +4169,7 @@ function scanSource(source) {
4132
4169
  );
4133
4170
  }
4134
4171
  function isScannableFile2(filePath, includeExtensions = DEFAULT_EXTENSIONS) {
4135
- return includeExtensions.includes(path6.extname(filePath));
4172
+ return includeExtensions.includes(path7.extname(filePath));
4136
4173
  }
4137
4174
  function scanFile(filePath) {
4138
4175
  const { scanFileNative: scanFileNative2 } = (init_native_bridge(), __toCommonJS(native_bridge_exports));
@@ -4303,6 +4340,7 @@ var log2, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader,
4303
4340
  var init_src2 = __esm({
4304
4341
  "packages/domain/scanner/src/index.ts"() {
4305
4342
  "use strict";
4343
+ init_esm_shims();
4306
4344
  init_src();
4307
4345
  init_cache_native();
4308
4346
  init_native_bridge();
@@ -4323,7 +4361,7 @@ var init_src2 = __esm({
4323
4361
  const loadNativeParserBinding = () => {
4324
4362
  if (_state.binding !== void 0) return _state.binding;
4325
4363
  const runtimeDir = getRuntimeDir();
4326
- const req = createRequire3(path6.join(runtimeDir, "noop.cjs"));
4364
+ const req = createRequire3(path7.join(runtimeDir, "noop.cjs"));
4327
4365
  const _platform = process.platform;
4328
4366
  const _arch = process.arch;
4329
4367
  const _platformArch = `${_platform}-${_arch}`;
@@ -4331,27 +4369,27 @@ var init_src2 = __esm({
4331
4369
  const candidates = [
4332
4370
  // ── binaryName baru: tailwind-styled-native (napi-rs naming) ──
4333
4371
  // cwd = repo root saat run dari root, atau package dir saat workspaces
4334
- path6.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
4335
- path6.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArch}.node`),
4336
- path6.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4372
+ path7.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
4373
+ path7.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArch}.node`),
4374
+ path7.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4337
4375
  // runtimeDir = dist/ → naik 1 level ke package root (npm install case)
4338
4376
  // e.g. node_modules/tailwind-styled-v4/dist/ → node_modules/tailwind-styled-v4/native/
4339
- path6.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
4340
- path6.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArch}.node`),
4341
- path6.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4377
+ path7.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
4378
+ path7.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArch}.node`),
4379
+ path7.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4342
4380
  // runtimeDir = dist/ → naik 4 level ke repo root (monorepo dev case)
4343
- path6.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
4344
- path6.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4381
+ path7.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
4382
+ path7.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4345
4383
  // 3 level fallback (jika package di-nest lebih dangkal)
4346
- path6.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
4347
- path6.resolve(runtimeDir, "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4384
+ path7.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
4385
+ path7.resolve(runtimeDir, "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
4348
4386
  // ── binaryName lama: tailwind_styled_parser (backward compat) ──
4349
- path6.resolve(process.cwd(), "native/tailwind_styled_parser.node"),
4350
- path6.resolve(process.cwd(), "native/build/Release/tailwind_styled_parser.node"),
4351
- path6.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
4352
- path6.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
4353
- path6.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node"),
4354
- path6.resolve(
4387
+ path7.resolve(process.cwd(), "native/tailwind_styled_parser.node"),
4388
+ path7.resolve(process.cwd(), "native/build/Release/tailwind_styled_parser.node"),
4389
+ path7.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
4390
+ path7.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
4391
+ path7.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node"),
4392
+ path7.resolve(
4355
4393
  runtimeDir,
4356
4394
  "..",
4357
4395
  "..",
@@ -4426,6 +4464,7 @@ var DEFAULT_TOP_LIMIT, DEFAULT_FREQUENT_THRESHOLD, DEBUG_NAMESPACE, debugLog;
4426
4464
  var init_utils = __esm({
4427
4465
  "packages/domain/analyzer/src/utils.ts"() {
4428
4466
  "use strict";
4467
+ init_esm_shims();
4429
4468
  init_src();
4430
4469
  DEFAULT_TOP_LIMIT = 10;
4431
4470
  DEFAULT_FREQUENT_THRESHOLD = 2;
@@ -4477,6 +4516,7 @@ var isAnalyzerModule, createAnalyzerBindingLoader, analyzerBindingLoader;
4477
4516
  var init_binding = __esm({
4478
4517
  "packages/domain/analyzer/src/binding.ts"() {
4479
4518
  "use strict";
4519
+ init_esm_shims();
4480
4520
  init_src();
4481
4521
  init_utils();
4482
4522
  isAnalyzerModule = (module) => {
@@ -4534,8 +4574,9 @@ var formatIssuePath3, isPlainObject, formatIssues2, parseWithSchema2, CountSchem
4534
4574
  var init_schemas2 = __esm({
4535
4575
  "packages/domain/analyzer/src/schemas.ts"() {
4536
4576
  "use strict";
4577
+ init_esm_shims();
4537
4578
  init_src();
4538
- formatIssuePath3 = (path30) => path30.length > 0 ? path30.map(
4579
+ formatIssuePath3 = (path31) => path31.length > 0 ? path31.map(
4539
4580
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
4540
4581
  ).join(".") : "<root>";
4541
4582
  isPlainObject = (value) => {
@@ -4544,8 +4585,8 @@ var init_schemas2 = __esm({
4544
4585
  return proto === Object.prototype || proto === null;
4545
4586
  };
4546
4587
  formatIssues2 = (error) => error.issues.map((issue) => {
4547
- const path30 = formatIssuePath3(issue.path);
4548
- return `${path30}: ${issue.message}`;
4588
+ const path31 = formatIssuePath3(issue.path);
4589
+ return `${path31}: ${issue.message}`;
4549
4590
  }).join("; ");
4550
4591
  parseWithSchema2 = (schema, data, label) => {
4551
4592
  const parsed = schema.safeParse(data);
@@ -4644,12 +4685,13 @@ var init_schemas2 = __esm({
4644
4685
 
4645
4686
  // packages/domain/analyzer/src/semantic.ts
4646
4687
  import fs6 from "fs";
4647
- import path7 from "path";
4688
+ import path8 from "path";
4648
4689
  import { pathToFileURL } from "url";
4649
4690
  var SUPPORTED_TAILWIND_CONFIG_EXTENSIONS, tailwindConfigCache, splitVariantAndBase, resolveConflictGroup, detectConflicts, isSupportedTailwindConfigPath, resolveTailwindConfigPath, collectSafelistFromConfig, collectCustomUtilities, collectSafelistFromSource, loadTailwindConfig, utilityPrefix, buildSemanticReport;
4650
4691
  var init_semantic = __esm({
4651
4692
  "packages/domain/analyzer/src/semantic.ts"() {
4652
4693
  "use strict";
4694
+ init_esm_shims();
4653
4695
  init_binding();
4654
4696
  init_utils();
4655
4697
  SUPPORTED_TAILWIND_CONFIG_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".js", ".cjs", ".mjs"]);
@@ -4685,11 +4727,11 @@ var init_semantic = __esm({
4685
4727
  };
4686
4728
  };
4687
4729
  isSupportedTailwindConfigPath = (configPath) => {
4688
- return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(path7.extname(configPath).toLowerCase());
4730
+ return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(path8.extname(configPath).toLowerCase());
4689
4731
  };
4690
4732
  resolveTailwindConfigPath = async (root, explicitPath) => {
4691
4733
  if (explicitPath) {
4692
- const resolved = path7.resolve(root, explicitPath);
4734
+ const resolved = path8.resolve(root, explicitPath);
4693
4735
  if (!await pathExists(resolved)) return null;
4694
4736
  return resolved;
4695
4737
  }
@@ -4700,7 +4742,7 @@ var init_semantic = __esm({
4700
4742
  "tailwind.config.mjs"
4701
4743
  ];
4702
4744
  for (const candidate of candidates) {
4703
- const fullPath = path7.resolve(root, candidate);
4745
+ const fullPath = path8.resolve(root, candidate);
4704
4746
  if (await pathExists(fullPath)) return fullPath;
4705
4747
  }
4706
4748
  return null;
@@ -4907,7 +4949,7 @@ var init_semantic = __esm({
4907
4949
  });
4908
4950
 
4909
4951
  // packages/domain/analyzer/src/analyzeWorkspace.ts
4910
- import path8 from "path";
4952
+ import path9 from "path";
4911
4953
  function normalizeScan(scan, includeClass) {
4912
4954
  if (!includeClass) return scan;
4913
4955
  const filteredFiles = scan.files.map((file) => ({
@@ -4962,7 +5004,7 @@ async function buildDistribution(usages, native) {
4962
5004
  }
4963
5005
  async function analyzeWorkspace(root, options = {}) {
4964
5006
  const startedAtMs = Date.now();
4965
- const resolvedRoot = path8.resolve(root);
5007
+ const resolvedRoot = path9.resolve(root);
4966
5008
  const normalizedOptions = parseAnalyzerOptions(options);
4967
5009
  const scan = await (async () => {
4968
5010
  const scanStartedAtMs = Date.now();
@@ -5067,6 +5109,7 @@ async function analyzeWorkspace(root, options = {}) {
5067
5109
  var init_analyzeWorkspace = __esm({
5068
5110
  "packages/domain/analyzer/src/analyzeWorkspace.ts"() {
5069
5111
  "use strict";
5112
+ init_esm_shims();
5070
5113
  init_src2();
5071
5114
  init_binding();
5072
5115
  init_schemas2();
@@ -5080,6 +5123,7 @@ var normalizeClassInput, normalizeClassToCssOptions, mergeDeclarationMap, declar
5080
5123
  var init_classToCss = __esm({
5081
5124
  "packages/domain/analyzer/src/classToCss.ts"() {
5082
5125
  "use strict";
5126
+ init_esm_shims();
5083
5127
  init_binding();
5084
5128
  init_schemas2();
5085
5129
  init_utils();
@@ -5201,6 +5245,7 @@ var __internal;
5201
5245
  var init_src3 = __esm({
5202
5246
  "packages/domain/analyzer/src/index.ts"() {
5203
5247
  "use strict";
5248
+ init_esm_shims();
5204
5249
  init_analyzeWorkspace();
5205
5250
  init_classToCss();
5206
5251
  init_schemas2();
@@ -5222,7 +5267,7 @@ var init_src3 = __esm({
5222
5267
 
5223
5268
  // packages/infrastructure/cli/src/utils/fs.ts
5224
5269
  import fs7 from "fs/promises";
5225
- import path9 from "path";
5270
+ import path10 from "path";
5226
5271
  async function pathExists2(filePath) {
5227
5272
  try {
5228
5273
  await fs7.access(filePath);
@@ -5252,7 +5297,7 @@ async function writeFileSafe(filePath, content, options = {}) {
5252
5297
  options.onDryRun?.(`write ${filePath}`);
5253
5298
  return;
5254
5299
  }
5255
- await fs7.mkdir(path9.dirname(filePath), { recursive: true });
5300
+ await fs7.mkdir(path10.dirname(filePath), { recursive: true });
5256
5301
  await fs7.writeFile(filePath, content, "utf8");
5257
5302
  }
5258
5303
  async function ensureFileSafe(filePath, content, options = {}) {
@@ -5263,6 +5308,7 @@ async function ensureFileSafe(filePath, content, options = {}) {
5263
5308
  var init_fs = __esm({
5264
5309
  "packages/infrastructure/cli/src/utils/fs.ts"() {
5265
5310
  "use strict";
5311
+ init_esm_shims();
5266
5312
  }
5267
5313
  });
5268
5314
 
@@ -5270,6 +5316,7 @@ var init_fs = __esm({
5270
5316
  var require_picocolors = __commonJS({
5271
5317
  "node_modules/picocolors/picocolors.js"(exports, module) {
5272
5318
  "use strict";
5319
+ init_esm_shims();
5273
5320
  var p = process || {};
5274
5321
  var argv = p.argv || [];
5275
5322
  var env = p.env || {};
@@ -5357,6 +5404,7 @@ function writeJsonSuccess(command, data) {
5357
5404
  var init_json = __esm({
5358
5405
  "packages/infrastructure/cli/src/utils/json.ts"() {
5359
5406
  "use strict";
5407
+ init_esm_shims();
5360
5408
  }
5361
5409
  });
5362
5410
 
@@ -5506,6 +5554,7 @@ var import_picocolors;
5506
5554
  var init_output = __esm({
5507
5555
  "packages/infrastructure/cli/src/utils/output.ts"() {
5508
5556
  "use strict";
5557
+ init_esm_shims();
5509
5558
  import_picocolors = __toESM(require_picocolors(), 1);
5510
5559
  init_errors();
5511
5560
  init_json();
@@ -5554,19 +5603,20 @@ function parseCliInput(argv) {
5554
5603
  var init_args = __esm({
5555
5604
  "packages/infrastructure/cli/src/utils/args.ts"() {
5556
5605
  "use strict";
5606
+ init_esm_shims();
5557
5607
  }
5558
5608
  });
5559
5609
 
5560
5610
  // packages/infrastructure/cli/src/utils/paths.ts
5561
- import path18 from "path";
5562
- import { fileURLToPath as fileURLToPath5 } from "url";
5611
+ import path19 from "path";
5612
+ import { fileURLToPath as fileURLToPath6 } from "url";
5563
5613
  function runtimeDirFromImportMeta(importMetaUrl) {
5564
- const filename = fileURLToPath5(importMetaUrl);
5565
- return path18.dirname(filename);
5614
+ const filename = fileURLToPath6(importMetaUrl);
5615
+ return path19.dirname(filename);
5566
5616
  }
5567
5617
  async function resolveMonorepoPath(runtimeDir, relativeToRepoRoot) {
5568
- const fromRuntime = path18.resolve(runtimeDir, "..", "..", "..", relativeToRepoRoot);
5569
- const fromCwd = path18.resolve(process.cwd(), relativeToRepoRoot);
5618
+ const fromRuntime = path19.resolve(runtimeDir, "..", "..", "..", relativeToRepoRoot);
5619
+ const fromCwd = path19.resolve(process.cwd(), relativeToRepoRoot);
5570
5620
  return await pathExists2(fromRuntime) ? fromRuntime : fromCwd;
5571
5621
  }
5572
5622
  async function firstExistingPath(paths) {
@@ -5578,6 +5628,7 @@ async function firstExistingPath(paths) {
5578
5628
  var init_paths = __esm({
5579
5629
  "packages/infrastructure/cli/src/utils/paths.ts"() {
5580
5630
  "use strict";
5631
+ init_esm_shims();
5581
5632
  init_errors();
5582
5633
  init_fs();
5583
5634
  }
@@ -5663,6 +5714,7 @@ var isCommanderLikeError, isHelpExit, isVersionExit, normalizeCliError, findComm
5663
5714
  var init_runtime = __esm({
5664
5715
  "packages/infrastructure/cli/src/utils/runtime.ts"() {
5665
5716
  "use strict";
5717
+ init_esm_shims();
5666
5718
  init_args();
5667
5719
  init_errors();
5668
5720
  init_output();
@@ -5720,7 +5772,7 @@ __export(createApp_exports, {
5720
5772
  buildCreateProgram: () => buildCreateProgram,
5721
5773
  main: () => main
5722
5774
  });
5723
- import path19 from "path";
5775
+ import path20 from "path";
5724
5776
  import { isCancel as isCancel3, select as select2, text } from "@clack/prompts";
5725
5777
  function isTemplateName(value) {
5726
5778
  return TEMPLATE_NAMES.includes(value);
@@ -5758,7 +5810,7 @@ async function resolveCreateInput(options) {
5758
5810
  return { name: resolvedName, template: templateValue };
5759
5811
  }
5760
5812
  async function writeProjectFile(context, relativePath, content) {
5761
- const filePath = path19.join(context.projectDir, relativePath);
5813
+ const filePath = path20.join(context.projectDir, relativePath);
5762
5814
  await writeFileSafe(filePath, content, { dryRun: context.dryRun });
5763
5815
  context.writtenFiles.push(relativePath.replaceAll("\\", "/"));
5764
5816
  }
@@ -6074,7 +6126,7 @@ async function createSimpleApp(context) {
6074
6126
  }
6075
6127
  async function createProject(options, output) {
6076
6128
  const { name, template } = await resolveCreateInput(options);
6077
- const projectDir = path19.resolve(process.cwd(), name);
6129
+ const projectDir = path20.resolve(process.cwd(), name);
6078
6130
  if (await pathExists2(projectDir)) {
6079
6131
  throw new CliUsageError(`Directory ${name} already exists.`);
6080
6132
  }
@@ -6132,6 +6184,7 @@ var TEMPLATE_NAMES, TEMPLATES;
6132
6184
  var init_createApp = __esm({
6133
6185
  "packages/infrastructure/cli/src/createApp.ts"() {
6134
6186
  "use strict";
6187
+ init_esm_shims();
6135
6188
  init_esm();
6136
6189
  init_errors();
6137
6190
  init_fs();
@@ -6152,8 +6205,9 @@ var _loadNative, log3, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttem
6152
6205
  var init_nativeBridge = __esm({
6153
6206
  "packages/domain/compiler/src/nativeBridge.ts"() {
6154
6207
  "use strict";
6208
+ init_esm_shims();
6155
6209
  init_src();
6156
- _loadNative = (path30) => __require(path30);
6210
+ _loadNative = (path31) => __require(path31);
6157
6211
  log3 = (...args) => {
6158
6212
  if (process.env.DEBUG?.includes("compiler:native")) {
6159
6213
  console.log("[compiler:native]", ...args);
@@ -6251,6 +6305,7 @@ Tried paths: ${result.tried.join("\n")}`);
6251
6305
  var init_compiler = __esm({
6252
6306
  "packages/domain/compiler/src/compiler/index.ts"() {
6253
6307
  "use strict";
6308
+ init_esm_shims();
6254
6309
  }
6255
6310
  });
6256
6311
 
@@ -6258,6 +6313,7 @@ var init_compiler = __esm({
6258
6313
  var init_parser = __esm({
6259
6314
  "packages/domain/compiler/src/parser/index.ts"() {
6260
6315
  "use strict";
6316
+ init_esm_shims();
6261
6317
  }
6262
6318
  });
6263
6319
 
@@ -6265,6 +6321,7 @@ var init_parser = __esm({
6265
6321
  var init_analyzer = __esm({
6266
6322
  "packages/domain/compiler/src/analyzer/index.ts"() {
6267
6323
  "use strict";
6324
+ init_esm_shims();
6268
6325
  }
6269
6326
  });
6270
6327
 
@@ -6272,6 +6329,7 @@ var init_analyzer = __esm({
6272
6329
  var init_cache = __esm({
6273
6330
  "packages/domain/compiler/src/cache/index.ts"() {
6274
6331
  "use strict";
6332
+ init_esm_shims();
6275
6333
  }
6276
6334
  });
6277
6335
 
@@ -6279,6 +6337,7 @@ var init_cache = __esm({
6279
6337
  var init_redis = __esm({
6280
6338
  "packages/domain/compiler/src/redis/index.ts"() {
6281
6339
  "use strict";
6340
+ init_esm_shims();
6282
6341
  }
6283
6342
  });
6284
6343
 
@@ -6286,17 +6345,19 @@ var init_redis = __esm({
6286
6345
  var init_watch = __esm({
6287
6346
  "packages/domain/compiler/src/watch/index.ts"() {
6288
6347
  "use strict";
6348
+ init_esm_shims();
6289
6349
  }
6290
6350
  });
6291
6351
 
6292
6352
  // packages/domain/compiler/src/index.ts
6293
6353
  import fs12 from "fs";
6294
- import path24 from "path";
6354
+ import path25 from "path";
6295
6355
  import { createRequire as createRequire4 } from "module";
6296
6356
  var _require3, compileCssFromClasses;
6297
6357
  var init_src4 = __esm({
6298
6358
  "packages/domain/compiler/src/index.ts"() {
6299
6359
  "use strict";
6360
+ init_esm_shims();
6300
6361
  init_nativeBridge();
6301
6362
  init_compiler();
6302
6363
  init_parser();
@@ -6325,6 +6386,7 @@ var init_src4 = __esm({
6325
6386
  var init_internal = __esm({
6326
6387
  "packages/domain/compiler/src/internal.ts"() {
6327
6388
  "use strict";
6389
+ init_esm_shims();
6328
6390
  init_src4();
6329
6391
  init_compiler();
6330
6392
  init_parser();
@@ -6335,17 +6397,24 @@ var init_internal = __esm({
6335
6397
  }
6336
6398
  });
6337
6399
 
6400
+ // src/umbrella/tw.ts
6401
+ init_esm_shims();
6402
+
6338
6403
  // packages/infrastructure/cli/src/index.ts
6339
- import { fileURLToPath as fileURLToPath6 } from "url";
6404
+ init_esm_shims();
6405
+ import { fileURLToPath as fileURLToPath7 } from "url";
6340
6406
 
6341
6407
  // packages/infrastructure/cli/src/commands/program.ts
6408
+ init_esm_shims();
6342
6409
  init_esm();
6343
6410
 
6344
6411
  // packages/infrastructure/cli/src/analyze.ts
6345
- import path10 from "path";
6412
+ init_esm_shims();
6413
+ import path11 from "path";
6346
6414
  import { parseArgs as parseNodeArgs } from "util";
6347
6415
 
6348
6416
  // packages/infrastructure/cli/src/utils/analyzer.ts
6417
+ init_esm_shims();
6349
6418
  init_errors();
6350
6419
  async function loadAnalyzerModule() {
6351
6420
  try {
@@ -6416,7 +6485,7 @@ async function runAnalyzeCli(args) {
6416
6485
  verbose: process.env.TWS_VERBOSE === "1" || process.env.VERBOSE === "1"
6417
6486
  });
6418
6487
  const dirArg = parsed.positionals[0] ?? ".";
6419
- const dir = path10.resolve(process.cwd(), dirArg);
6488
+ const dir = path11.resolve(process.cwd(), dirArg);
6420
6489
  if (!await pathExists2(dir)) {
6421
6490
  throw new CliUsageError(`Directory not found: ${dir}`);
6422
6491
  }
@@ -6435,7 +6504,8 @@ async function runAnalyzeCli(args) {
6435
6504
  }
6436
6505
 
6437
6506
  // packages/infrastructure/cli/src/extract.ts
6438
- import path11 from "path";
6507
+ init_esm_shims();
6508
+ import path12 from "path";
6439
6509
  import { parseArgs as parseNodeArgs2 } from "util";
6440
6510
  init_errors();
6441
6511
  init_fs();
@@ -6476,7 +6546,7 @@ async function runExtractCli(args) {
6476
6546
  const parsedMin = parseInt(minRaw, 10);
6477
6547
  const minCount = Number.isFinite(parsedMin) && parsedMin > 0 ? parsedMin : 2;
6478
6548
  const dirArg = parsed.positionals[0] ?? ".";
6479
- const dir = path11.resolve(process.cwd(), dirArg);
6549
+ const dir = path12.resolve(process.cwd(), dirArg);
6480
6550
  if (!await pathExists2(dir)) {
6481
6551
  throw new CliUsageError(`Directory not found: ${dir}`);
6482
6552
  }
@@ -6531,9 +6601,10 @@ async function runExtractCli(args) {
6531
6601
  }
6532
6602
 
6533
6603
  // packages/infrastructure/cli/src/init.ts
6604
+ init_esm_shims();
6534
6605
  init_fs();
6535
6606
  init_output();
6536
- import path12 from "path";
6607
+ import path13 from "path";
6537
6608
  async function ensureFile(filePath, content, report) {
6538
6609
  const status = await ensureFileSafe(filePath, content);
6539
6610
  if (status === "created") {
@@ -6550,15 +6621,15 @@ async function runInitCli(rawArgs) {
6550
6621
  verbose: process.env.TWS_VERBOSE === "1" || process.env.VERBOSE === "1"
6551
6622
  });
6552
6623
  const target = rawArgs.find((arg) => !arg.startsWith("-")) ?? ".";
6553
- const root = path12.resolve(process.cwd(), target);
6624
+ const root = path13.resolve(process.cwd(), target);
6554
6625
  const report = { created: [], skipped: [] };
6555
6626
  await ensureFile(
6556
- path12.join(root, "src", "tailwind.css"),
6627
+ path13.join(root, "src", "tailwind.css"),
6557
6628
  '@import "tailwindcss";\n\n@theme {\n --color-primary: #3b82f6;\n --spacing-section: 3rem;\n}\n',
6558
6629
  report
6559
6630
  );
6560
6631
  await ensureFile(
6561
- path12.join(root, "tailwind-styled.config.json"),
6632
+ path13.join(root, "tailwind-styled.config.json"),
6562
6633
  `${JSON.stringify(
6563
6634
  {
6564
6635
  version: 1,
@@ -6578,21 +6649,23 @@ async function runInitCli(rawArgs) {
6578
6649
  output.writeText("\nInit complete");
6579
6650
  output.writeText(`Created: ${report.created.length}`);
6580
6651
  for (const filePath of report.created) {
6581
- output.writeText(` + ${path12.relative(root, filePath)}`);
6652
+ output.writeText(` + ${path13.relative(root, filePath)}`);
6582
6653
  }
6583
6654
  if (report.skipped.length > 0) {
6584
6655
  output.writeText(`Skipped: ${report.skipped.length}`);
6585
6656
  for (const filePath of report.skipped) {
6586
- output.writeText(` - ${path12.relative(root, filePath)} (exists)`);
6657
+ output.writeText(` - ${path13.relative(root, filePath)} (exists)`);
6587
6658
  }
6588
6659
  }
6589
6660
  }
6590
6661
 
6591
6662
  // packages/infrastructure/cli/src/migrate.ts
6663
+ init_esm_shims();
6592
6664
  import fs8 from "fs/promises";
6593
- import path13 from "path";
6665
+ import path14 from "path";
6594
6666
 
6595
6667
  // packages/infrastructure/cli/src/migrateWizard.ts
6668
+ init_esm_shims();
6596
6669
  init_errors();
6597
6670
  import { confirm, intro, isCancel } from "@clack/prompts";
6598
6671
  async function runMigrationWizard() {
@@ -6651,13 +6724,13 @@ async function findSourceFiles(dir) {
6651
6724
  if (!await pathExists2(currentDir)) return;
6652
6725
  const entries = await fs8.readdir(currentDir, { withFileTypes: true });
6653
6726
  for (const entry of entries) {
6654
- const fullPath = path13.join(currentDir, entry.name);
6727
+ const fullPath = path14.join(currentDir, entry.name);
6655
6728
  if (entry.isDirectory()) {
6656
6729
  if (IGNORED_DIRS.has(entry.name)) continue;
6657
6730
  await walk(fullPath);
6658
6731
  continue;
6659
6732
  }
6660
- if (SOURCE_EXTENSIONS.has(path13.extname(entry.name))) {
6733
+ if (SOURCE_EXTENSIONS.has(path14.extname(entry.name))) {
6661
6734
  out.push(fullPath);
6662
6735
  }
6663
6736
  }
@@ -6678,7 +6751,7 @@ function migrateSource(source, options) {
6678
6751
  return { output, classRenames: 0, importRenames };
6679
6752
  }
6680
6753
  async function migrateConfig(root, dryRun) {
6681
- const cssPath = path13.join(root, "src", "tailwind.css");
6754
+ const cssPath = path14.join(root, "src", "tailwind.css");
6682
6755
  if (await pathExists2(cssPath)) return 0;
6683
6756
  await writeFileSafe(cssPath, DEFAULT_TAILWIND_CSS, { dryRun });
6684
6757
  return 1;
@@ -6691,7 +6764,7 @@ async function runMigrateCli(rawArgs) {
6691
6764
  verbose: process.env.TWS_VERBOSE === "1" || process.env.VERBOSE === "1"
6692
6765
  });
6693
6766
  const target = firstPositional(rawArgs) ?? ".";
6694
- const root = path13.resolve(process.cwd(), target);
6767
+ const root = path14.resolve(process.cwd(), target);
6695
6768
  const dryRunFlag = hasFlag("dry-run", rawArgs);
6696
6769
  const wizardOptions = hasFlag("wizard", rawArgs) ? await runMigrationWizard() : null;
6697
6770
  const { dryRun, includeConfig, includeClasses, includeImports } = wizardOptions ? {
@@ -6740,10 +6813,11 @@ async function runMigrateCli(rawArgs) {
6740
6813
  }
6741
6814
 
6742
6815
  // packages/infrastructure/cli/src/scan.ts
6816
+ init_esm_shims();
6743
6817
  init_src2();
6744
6818
  init_output();
6745
6819
  import fs9 from "fs";
6746
- import path14 from "path";
6820
+ import path15 from "path";
6747
6821
  function buildTopClasses(files) {
6748
6822
  const counts = /* @__PURE__ */ new Map();
6749
6823
  for (const file of files) {
@@ -6786,8 +6860,8 @@ function buildClassNames(files, uniqueClasses) {
6786
6860
  });
6787
6861
  }
6788
6862
  function writeScanCache(root, cacheData) {
6789
- const cacheDir = path14.join(root, ".tailwind-styled");
6790
- const cachePath = path14.join(cacheDir, "scan-cache.json");
6863
+ const cacheDir = path15.join(root, ".tailwind-styled");
6864
+ const cachePath = path15.join(cacheDir, "scan-cache.json");
6791
6865
  fs9.mkdirSync(cacheDir, { recursive: true });
6792
6866
  fs9.writeFileSync(cachePath, JSON.stringify(cacheData, null, 2), "utf-8");
6793
6867
  return cachePath;
@@ -6801,7 +6875,7 @@ async function runScanCli(rawArgs) {
6801
6875
  debug: process.env.TWS_DEBUG === "1" || process.env.DEBUG === "1",
6802
6876
  verbose: process.env.TWS_VERBOSE === "1" || process.env.VERBOSE === "1"
6803
6877
  });
6804
- const root = path14.resolve(process.cwd(), target);
6878
+ const root = path15.resolve(process.cwd(), target);
6805
6879
  const spinner = output.spinner();
6806
6880
  spinner.start(`Scanning ${root}`);
6807
6881
  const scanned = await scanWorkspaceAsync(root);
@@ -6851,10 +6925,12 @@ Scan root : ${result.root}`);
6851
6925
  }
6852
6926
 
6853
6927
  // packages/infrastructure/cli/src/setup.ts
6928
+ init_esm_shims();
6854
6929
  var import_picocolors3 = __toESM(require_picocolors(), 1);
6855
- import path16 from "path";
6930
+ import path17 from "path";
6856
6931
 
6857
6932
  // packages/infrastructure/cli/src/commands/setup/patchers.ts
6933
+ init_esm_shims();
6858
6934
  function patchNextConfigImpl(src) {
6859
6935
  if (src.includes("withTailwindStyled")) return null;
6860
6936
  const hasExport = src.includes("export default");
@@ -7047,6 +7123,7 @@ function patchTsConfigImpl(src) {
7047
7123
  }
7048
7124
 
7049
7125
  // packages/infrastructure/cli/src/commands/setup/prompt.ts
7126
+ init_esm_shims();
7050
7127
  init_errors();
7051
7128
  import { isCancel as isCancel2, select } from "@clack/prompts";
7052
7129
  async function pickProjectTypeInteractive(detected, flags, projectOptions, options = {}) {
@@ -7098,10 +7175,12 @@ async function pickProjectTypeInteractive(detected, flags, projectOptions, optio
7098
7175
  }
7099
7176
 
7100
7177
  // packages/infrastructure/cli/src/commands/setup/workspace.ts
7178
+ init_esm_shims();
7101
7179
  init_fs();
7102
- import path15 from "path";
7180
+ import path16 from "path";
7103
7181
 
7104
7182
  // packages/infrastructure/cli/src/utils/process.ts
7183
+ init_esm_shims();
7105
7184
  init_errors();
7106
7185
  init_json();
7107
7186
  import { spawn } from "child_process";
@@ -7268,12 +7347,12 @@ function configureSetupFlags(rawArgs) {
7268
7347
  };
7269
7348
  }
7270
7349
  async function readPackageJson(cwd2) {
7271
- return readJsonSafe(path15.join(cwd2, "package.json"));
7350
+ return readJsonSafe(path16.join(cwd2, "package.json"));
7272
7351
  }
7273
7352
  async function detectPm(cwd2) {
7274
- if (await pathExists2(path15.join(cwd2, "bun.lockb"))) return "bun";
7275
- if (await pathExists2(path15.join(cwd2, "pnpm-lock.yaml"))) return "pnpm";
7276
- if (await pathExists2(path15.join(cwd2, "yarn.lock"))) return "yarn";
7353
+ if (await pathExists2(path16.join(cwd2, "bun.lockb"))) return "bun";
7354
+ if (await pathExists2(path16.join(cwd2, "pnpm-lock.yaml"))) return "pnpm";
7355
+ if (await pathExists2(path16.join(cwd2, "yarn.lock"))) return "yarn";
7277
7356
  return "npm";
7278
7357
  }
7279
7358
  async function detectBundler(cwd2) {
@@ -7294,7 +7373,7 @@ async function alreadyInstalled(cwd2, pkgName) {
7294
7373
  }
7295
7374
  async function findExisting(cwd2, names) {
7296
7375
  for (const name of names) {
7297
- const resolved = path15.join(cwd2, name);
7376
+ const resolved = path16.join(cwd2, name);
7298
7377
  if (await pathExists2(resolved)) return resolved;
7299
7378
  }
7300
7379
  return null;
@@ -7305,7 +7384,7 @@ async function writeFileWithDryRun(cwd2, filePath, content, label, flags, logger
7305
7384
  return;
7306
7385
  }
7307
7386
  await writeFileSafe(filePath, content);
7308
- logger.ok(path15.relative(cwd2, filePath) || label);
7387
+ logger.ok(path16.relative(cwd2, filePath) || label);
7309
7388
  }
7310
7389
  async function patchFileWithDryRun(filePath, patcher, label, flags, logger) {
7311
7390
  const source = await readFileSafe(filePath);
@@ -7350,6 +7429,7 @@ async function installPackages(cwd2, pm, pkgs, dev, flags, logger) {
7350
7429
  }
7351
7430
 
7352
7431
  // packages/infrastructure/cli/src/utils/logger.ts
7432
+ init_esm_shims();
7353
7433
  var import_picocolors2 = __toESM(require_picocolors(), 1);
7354
7434
  function createCliLogger(options = {}) {
7355
7435
  function emit(level, icon, colorize, message) {
@@ -7468,7 +7548,7 @@ var runSetupCli = async (rawArgs) => {
7468
7548
  if (bundlerConfig) {
7469
7549
  const cfg = await findExisting(cwd, bundlerConfig.files);
7470
7550
  if (cfg)
7471
- await patchFileWithDryRun(cfg, bundlerConfig.patcher, path16.basename(cfg), setupFlags, logger);
7551
+ await patchFileWithDryRun(cfg, bundlerConfig.patcher, path17.basename(cfg), setupFlags, logger);
7472
7552
  else logger.warn(bundlerConfig.warnMsg);
7473
7553
  } else {
7474
7554
  logger.skip("React tanpa bundler - tidak ada bundler config yang di-patch");
@@ -7487,13 +7567,13 @@ var runSetupCli = async (rawArgs) => {
7487
7567
  if (cssFile) {
7488
7568
  await patchFileWithDryRun(
7489
7569
  cssFile,
7490
- (src) => patchTailwindCss(src, bundler, path16.relative(cwd, cssFile), cwd),
7491
- path16.relative(cwd, cssFile),
7570
+ (src) => patchTailwindCss(src, bundler, path17.relative(cwd, cssFile), cwd),
7571
+ path17.relative(cwd, cssFile),
7492
7572
  setupFlags,
7493
7573
  logger
7494
7574
  );
7495
- const detectedCssEntry = path16.relative(cwd, cssFile).replace(/\\/g, "/");
7496
- const twConfigPath = path16.join(cwd, "tailwind-styled.config.json");
7575
+ const detectedCssEntry = path17.relative(cwd, cssFile).replace(/\\/g, "/");
7576
+ const twConfigPath = path17.join(cwd, "tailwind-styled.config.json");
7497
7577
  const twConfig = {
7498
7578
  version: 1,
7499
7579
  compiler: { engine: "rust" },
@@ -7511,7 +7591,7 @@ var runSetupCli = async (rawArgs) => {
7511
7591
  logger.warn('CSS entry tidak ditemukan \u2014 tambahkan @import "tailwindcss" manual ke globals.css');
7512
7592
  }
7513
7593
  output.writeText("\n" + import_picocolors3.default.bold(" [4/4]") + import_picocolors3.default.cyan(" tsconfig.json"));
7514
- const tsCfg = path16.join(cwd, "tsconfig.json");
7594
+ const tsCfg = path17.join(cwd, "tsconfig.json");
7515
7595
  const hasTsConfig = await findExisting(cwd, ["tsconfig.json"]);
7516
7596
  if (hasTsConfig) {
7517
7597
  await patchFileWithDryRun(tsCfg, patchTsConfig, "tsconfig.json", setupFlags, logger);
@@ -7558,7 +7638,8 @@ var runSetupCli = async (rawArgs) => {
7558
7638
  };
7559
7639
 
7560
7640
  // packages/infrastructure/cli/src/stats.ts
7561
- import path17 from "path";
7641
+ init_esm_shims();
7642
+ import path18 from "path";
7562
7643
  import { parseArgs as parseNodeArgs4 } from "util";
7563
7644
  init_errors();
7564
7645
  init_fs();
@@ -7596,7 +7677,7 @@ async function runStatsCli(args) {
7596
7677
  verbose: process.env.TWS_VERBOSE === "1" || process.env.VERBOSE === "1"
7597
7678
  });
7598
7679
  const dirArg = parsed.positionals[0] ?? ".";
7599
- const dir = path17.resolve(process.cwd(), dirArg);
7680
+ const dir = path18.resolve(process.cwd(), dirArg);
7600
7681
  if (!await pathExists2(dir)) {
7601
7682
  throw new CliUsageError(`Directory not found: ${dir}`);
7602
7683
  }
@@ -7650,6 +7731,7 @@ async function runStatsCli(args) {
7650
7731
  init_runtime();
7651
7732
 
7652
7733
  // packages/infrastructure/cli/src/commands/boundary.ts
7734
+ init_esm_shims();
7653
7735
  import { readFileSync, readdirSync } from "fs";
7654
7736
  import { join as join2, extname } from "path";
7655
7737
  import { parseArgs as parseNodeArgs5 } from "util";
@@ -7775,6 +7857,7 @@ var boundaryCommand = {
7775
7857
  };
7776
7858
 
7777
7859
  // packages/infrastructure/cli/src/commands/create.ts
7860
+ init_esm_shims();
7778
7861
  init_args();
7779
7862
  var createCommand2 = {
7780
7863
  name: "create",
@@ -7786,15 +7869,17 @@ var createCommand2 = {
7786
7869
  };
7787
7870
 
7788
7871
  // packages/infrastructure/cli/src/commands/dashboard.ts
7872
+ init_esm_shims();
7789
7873
  init_errors();
7790
7874
  init_fs();
7791
7875
  import { parseArgs as parseNodeArgs6 } from "util";
7792
7876
 
7793
7877
  // packages/infrastructure/cli/src/commands/helpers.ts
7878
+ init_esm_shims();
7794
7879
  init_errors();
7795
7880
  init_paths();
7796
7881
  import fs10 from "fs/promises";
7797
- import path20 from "path";
7882
+ import path21 from "path";
7798
7883
  function enumerateVariantProps(matrix) {
7799
7884
  const keys = Object.keys(matrix);
7800
7885
  if (keys.length === 0) return [{}];
@@ -7816,7 +7901,7 @@ function enumerateVariantProps(matrix) {
7816
7901
  }
7817
7902
  async function resolveScript(context, relativeToRepoRoot) {
7818
7903
  const fromRuntime = await resolveMonorepoPath(context.runtimeDir, relativeToRepoRoot);
7819
- const fromCwd = path20.resolve(process.cwd(), relativeToRepoRoot);
7904
+ const fromCwd = path21.resolve(process.cwd(), relativeToRepoRoot);
7820
7905
  const resolved = await firstExistingPath([fromRuntime, fromCwd]);
7821
7906
  if (!resolved) {
7822
7907
  throw new CliUsageError(`Required script not found: ${relativeToRepoRoot}`);
@@ -7830,7 +7915,7 @@ async function loadRegistry(context) {
7830
7915
  );
7831
7916
  const candidates = [
7832
7917
  runtimeRegistryPath,
7833
- path20.resolve(process.cwd(), "packages/domain/plugin-registry/registry.json")
7918
+ path21.resolve(process.cwd(), "packages/domain/plugin-registry/registry.json")
7834
7919
  ];
7835
7920
  const registryPath = await firstExistingPath(candidates);
7836
7921
  if (!registryPath) {
@@ -7880,11 +7965,12 @@ var dashboardCommand = {
7880
7965
  };
7881
7966
 
7882
7967
  // packages/infrastructure/cli/src/commands/deploy.ts
7968
+ init_esm_shims();
7883
7969
  init_errors();
7884
7970
  init_fs();
7885
7971
  init_json();
7886
7972
  import fsp from "fs/promises";
7887
- import path21 from "path";
7973
+ import path22 from "path";
7888
7974
  import { parseArgs as parseNodeArgs7 } from "util";
7889
7975
  var postJson = async (url, body, token) => {
7890
7976
  const { default: https } = await import("https");
@@ -7938,7 +8024,7 @@ var deployCommand = {
7938
8024
  const version = typeof parsed.values.version === "string" ? parsed.values.version : "0.1.0";
7939
8025
  const tag = typeof parsed.values.tag === "string" ? parsed.values.tag : "latest";
7940
8026
  const registryUrl = typeof parsed.values.registry === "string" ? parsed.values.registry : process.env.TW_REGISTRY_URL ?? null;
7941
- const pkgPath = path21.join(process.cwd(), "package.json");
8027
+ const pkgPath = path22.join(process.cwd(), "package.json");
7942
8028
  if (!await pathExists2(pkgPath)) {
7943
8029
  throw new CliUsageError("[tw deploy] No package.json found in current directory");
7944
8030
  }
@@ -7973,10 +8059,10 @@ var deployCommand = {
7973
8059
  }
7974
8060
  return;
7975
8061
  }
7976
- const cacheDir = path21.join(process.cwd(), ".tw-cache");
8062
+ const cacheDir = path22.join(process.cwd(), ".tw-cache");
7977
8063
  await fsp.mkdir(cacheDir, { recursive: true });
7978
8064
  await fsp.writeFile(
7979
- path21.join(cacheDir, "deploy-manifest.json"),
8065
+ path22.join(cacheDir, "deploy-manifest.json"),
7980
8066
  JSON.stringify(manifest, null, 2)
7981
8067
  );
7982
8068
  if (!registryUrl) {
@@ -8039,14 +8125,16 @@ var deployCommand = {
8039
8125
  };
8040
8126
 
8041
8127
  // packages/infrastructure/cli/src/commands/doctor.ts
8128
+ init_esm_shims();
8042
8129
  var import_picocolors4 = __toESM(require_picocolors(), 1);
8043
8130
  import { parseArgs as parseNodeArgs8 } from "util";
8044
8131
 
8045
8132
  // packages/infrastructure/cli/src/utils/doctorService.ts
8133
+ init_esm_shims();
8046
8134
  init_src3();
8047
8135
  init_src2();
8048
8136
  import fs11 from "fs";
8049
- import path22 from "path";
8137
+ import path23 from "path";
8050
8138
  var SUPPORTED_DIAGNOSTIC_INCLUDES = [
8051
8139
  "workspace",
8052
8140
  "tailwind",
@@ -8092,16 +8180,16 @@ function readJsonFile(filePath) {
8092
8180
  }
8093
8181
  }
8094
8182
  function findWorkspacePackageJsonFiles(root) {
8095
- const packagesDir = path22.join(root, "packages");
8183
+ const packagesDir = path23.join(root, "packages");
8096
8184
  if (!fs11.existsSync(packagesDir)) return [];
8097
- return fs11.readdirSync(packagesDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => path22.join(packagesDir, entry.name, "package.json")).filter((filePath) => fs11.existsSync(filePath));
8185
+ return fs11.readdirSync(packagesDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => path23.join(packagesDir, entry.name, "package.json")).filter((filePath) => fs11.existsSync(filePath));
8098
8186
  }
8099
8187
  function findFiles(dir, ext) {
8100
8188
  const files = [];
8101
8189
  try {
8102
8190
  const entries = fs11.readdirSync(dir, { withFileTypes: true });
8103
8191
  for (const entry of entries) {
8104
- const fullPath = path22.join(dir, entry.name);
8192
+ const fullPath = path23.join(dir, entry.name);
8105
8193
  if (entry.isDirectory() && !entry.name.startsWith(".") && entry.name !== "node_modules") {
8106
8194
  files.push(...findFiles(fullPath, ext));
8107
8195
  } else if (entry.isFile() && entry.name.endsWith(ext)) {
@@ -8119,7 +8207,7 @@ function findFiles(dir, ext) {
8119
8207
  return files;
8120
8208
  }
8121
8209
  function runWorkspaceDiagnostics(root, issues, checks) {
8122
- const rootPackageJsonPath = path22.join(root, "package.json");
8210
+ const rootPackageJsonPath = path23.join(root, "package.json");
8123
8211
  const rootPackageJson = readJsonFile(rootPackageJsonPath);
8124
8212
  if (!rootPackageJson) {
8125
8213
  addCheck(
@@ -8172,7 +8260,7 @@ function runWorkspaceDiagnostics(root, issues, checks) {
8172
8260
  const scripts = typeof manifest.scripts === "object" && manifest.scripts !== null ? manifest.scripts : {};
8173
8261
  const missing = requiredScripts.filter((name) => typeof scripts[name] !== "string");
8174
8262
  if (missing.length === 0) return [];
8175
- const packageName = typeof manifest.name === "string" && manifest.name.length > 0 ? manifest.name : path22.basename(path22.dirname(filePath));
8263
+ const packageName = typeof manifest.name === "string" && manifest.name.length > 0 ? manifest.name : path23.basename(path23.dirname(filePath));
8176
8264
  return [{ packageName, missing }];
8177
8265
  });
8178
8266
  if (missingScripts.length === 0) {
@@ -8207,7 +8295,7 @@ function runWorkspaceDiagnostics(root, issues, checks) {
8207
8295
  );
8208
8296
  }
8209
8297
  function runTailwindProjectDiagnostics(root, issues, checks) {
8210
- const packageJsonPath = path22.join(root, "package.json");
8298
+ const packageJsonPath = path23.join(root, "package.json");
8211
8299
  const packageJson = readJsonFile(packageJsonPath);
8212
8300
  if (!packageJson) {
8213
8301
  addCheck(
@@ -8290,7 +8378,7 @@ function runTailwindProjectDiagnostics(root, issues, checks) {
8290
8378
  );
8291
8379
  }
8292
8380
  const configFiles = ["tailwind.config.js", "tailwind.config.ts", "tailwind.config.mjs"];
8293
- const hasConfig = configFiles.some((name) => fs11.existsSync(path22.join(root, name)));
8381
+ const hasConfig = configFiles.some((name) => fs11.existsSync(path23.join(root, name)));
8294
8382
  addCheck(
8295
8383
  checks,
8296
8384
  "tailwind",
@@ -8299,7 +8387,7 @@ function runTailwindProjectDiagnostics(root, issues, checks) {
8299
8387
  "info",
8300
8388
  hasConfig ? "Tailwind config file detected." : "No tailwind.config file found."
8301
8389
  );
8302
- const tsconfig = readJsonFile(path22.join(root, "tsconfig.json"));
8390
+ const tsconfig = readJsonFile(path23.join(root, "tsconfig.json"));
8303
8391
  const jsx = tsconfig?.compilerOptions?.jsx;
8304
8392
  addCheck(
8305
8393
  checks,
@@ -8465,7 +8553,7 @@ async function runAnalysisDiagnostics(root, issues, checks, verbose) {
8465
8553
  }
8466
8554
  }
8467
8555
  var runDiagnostics = async (options = {}) => {
8468
- const root = path22.resolve(options.root ?? process.cwd());
8556
+ const root = path23.resolve(options.root ?? process.cwd());
8469
8557
  const includes = parseIncludes(options.include);
8470
8558
  const issues = [];
8471
8559
  const checks = [];
@@ -8584,10 +8672,11 @@ function printDoctorOutput(result, output) {
8584
8672
  }
8585
8673
 
8586
8674
  // packages/infrastructure/cli/src/commands/misc.ts
8675
+ init_esm_shims();
8587
8676
  init_errors();
8588
8677
  init_fs();
8589
8678
  init_json();
8590
- import path23 from "path";
8679
+ import path24 from "path";
8591
8680
  import { parseArgs as parseNodeArgs9 } from "util";
8592
8681
  var testCommand = {
8593
8682
  name: "test",
@@ -8617,7 +8706,7 @@ var shareCommand = {
8617
8706
  name: "share",
8618
8707
  async run(args, context) {
8619
8708
  const name = args.find((arg) => !arg.startsWith("-")) ?? "component-name";
8620
- const manifestPath = path23.join(process.cwd(), ".tw-cache", "deploy-manifest.json");
8709
+ const manifestPath = path24.join(process.cwd(), ".tw-cache", "deploy-manifest.json");
8621
8710
  const defaultManifest = {
8622
8711
  name,
8623
8712
  version: "0.1.0"
@@ -8703,14 +8792,14 @@ var isVersionOutdated = (currentVersion, latestVersion) => {
8703
8792
  };
8704
8793
  var resolveCurrentCliVersion = async (context) => {
8705
8794
  const candidates = [
8706
- path23.resolve(context.runtimeDir, "..", "package.json"),
8707
- path23.resolve(process.cwd(), "packages", "cli", "package.json"),
8708
- path23.resolve(process.cwd(), "package.json")
8795
+ path24.resolve(context.runtimeDir, "..", "package.json"),
8796
+ path24.resolve(process.cwd(), "packages", "cli", "package.json"),
8797
+ path24.resolve(process.cwd(), "package.json")
8709
8798
  ];
8710
8799
  for (const candidate of candidates) {
8711
8800
  if (!await pathExists2(candidate)) continue;
8712
8801
  const pkg = await readJsonSafe(candidate);
8713
- const isCliPackage = pkg?.version && (pkg.name === CLI_PACKAGE_NAME || candidate.includes(`${path23.sep}packages${path23.sep}cli${path23.sep}`));
8802
+ const isCliPackage = pkg?.version && (pkg.name === CLI_PACKAGE_NAME || candidate.includes(`${path24.sep}packages${path24.sep}cli${path24.sep}`));
8714
8803
  if (isCliPackage) return pkg.version ?? "0.0.0";
8715
8804
  }
8716
8805
  return "0.0.0";
@@ -8861,6 +8950,7 @@ var miscCommands = [
8861
8950
  ];
8862
8951
 
8863
8952
  // packages/infrastructure/cli/src/commands/plugin.ts
8953
+ init_esm_shims();
8864
8954
  init_errors();
8865
8955
  init_json();
8866
8956
  var pluginCommand = {
@@ -8947,13 +9037,17 @@ var pluginCommand = {
8947
9037
  }
8948
9038
  };
8949
9039
 
9040
+ // packages/infrastructure/cli/src/commands/preflight.ts
9041
+ init_esm_shims();
9042
+
8950
9043
  // packages/infrastructure/cli/src/preflight.ts
9044
+ init_esm_shims();
8951
9045
  init_args();
8952
9046
  init_errors();
8953
9047
  init_fs();
8954
9048
  init_json();
8955
9049
  init_src4();
8956
- import path25 from "path";
9050
+ import path26 from "path";
8957
9051
  import { pathToFileURL as pathToFileURL2 } from "url";
8958
9052
  var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
8959
9053
  var DEFAULT_TW_CONFIG = `${JSON.stringify(
@@ -8980,8 +9074,8 @@ async function validateThemeConfig(cwd2) {
8980
9074
  const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
8981
9075
  let configPath = null;
8982
9076
  for (const file of twConfigFiles) {
8983
- if (await pathExists2(path25.join(cwd2, file))) {
8984
- configPath = path25.join(cwd2, file);
9077
+ if (await pathExists2(path26.join(cwd2, file))) {
9078
+ configPath = path26.join(cwd2, file);
8985
9079
  break;
8986
9080
  }
8987
9081
  }
@@ -9072,7 +9166,7 @@ function resolveCliEntry(scriptPath) {
9072
9166
  async function hasTailwindCssImport(cwd2) {
9073
9167
  const cssFiles = ["src/app/globals.css", "src/index.css", "src/style.css", "app/globals.css"];
9074
9168
  for (const file of cssFiles) {
9075
- const raw = await readFileSafe(path25.join(cwd2, file));
9169
+ const raw = await readFileSafe(path26.join(cwd2, file));
9076
9170
  if (raw?.includes("tailwindcss")) return true;
9077
9171
  }
9078
9172
  return false;
@@ -9088,7 +9182,7 @@ async function hasSafelistSource(cwd2) {
9088
9182
  "app/globals.css"
9089
9183
  ];
9090
9184
  for (const file of cssFiles) {
9091
- const raw = await readFileSafe(path25.join(cwd2, file));
9185
+ const raw = await readFileSafe(path26.join(cwd2, file));
9092
9186
  if (raw === null) continue;
9093
9187
  if (raw.includes("tw-classes")) return { found: true, cssFile: file };
9094
9188
  if (raw.includes("tailwindcss")) return { found: false, cssFile: file };
@@ -9096,8 +9190,8 @@ async function hasSafelistSource(cwd2) {
9096
9190
  return { found: false, cssFile: null };
9097
9191
  }
9098
9192
  async function applyTailwindInit(cwd2) {
9099
- await ensureFileSafe(path25.join(cwd2, "src", "tailwind.css"), DEFAULT_TAILWIND_CSS2);
9100
- await ensureFileSafe(path25.join(cwd2, "tailwind-styled.config.json"), DEFAULT_TW_CONFIG);
9193
+ await ensureFileSafe(path26.join(cwd2, "src", "tailwind.css"), DEFAULT_TAILWIND_CSS2);
9194
+ await ensureFileSafe(path26.join(cwd2, "tailwind-styled.config.json"), DEFAULT_TW_CONFIG);
9101
9195
  }
9102
9196
  function check(results, id, label, pass, message, fix) {
9103
9197
  results.push({ id, label, pass, message, fix });
@@ -9119,7 +9213,7 @@ async function runPreflightCli(rawArgs) {
9119
9213
  node.major >= 20 ? `Node ${node.full} OK` : `Node ${node.full} - requires >=20. Download: https://nodejs.org`,
9120
9214
  node.major < 20 ? "Install Node.js 20 LTS or newer from https://nodejs.org" : void 0
9121
9215
  );
9122
- const pkg = await readJsonSafe(path25.join(cwd2, "package.json"));
9216
+ const pkg = await readJsonSafe(path26.join(cwd2, "package.json"));
9123
9217
  check(
9124
9218
  results,
9125
9219
  "package-json",
@@ -9153,7 +9247,7 @@ async function runPreflightCli(rawArgs) {
9153
9247
  }
9154
9248
  const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
9155
9249
  const twConfigChecks = await Promise.all(
9156
- twConfigFiles.map(async (file) => ({ file, exists: await pathExists2(path25.join(cwd2, file)) }))
9250
+ twConfigFiles.map(async (file) => ({ file, exists: await pathExists2(path26.join(cwd2, file)) }))
9157
9251
  );
9158
9252
  const foundTwConfig = twConfigChecks.find((item) => item.exists)?.file ?? null;
9159
9253
  const hasCssConfig = await hasTailwindCssImport(cwd2);
@@ -9165,7 +9259,7 @@ async function runPreflightCli(rawArgs) {
9165
9259
  foundTwConfig ? `${foundTwConfig} found OK` : hasCssConfig ? "@import tailwindcss found in CSS OK" : "No Tailwind config found - run: tw init",
9166
9260
  "tw init"
9167
9261
  );
9168
- const oldConfig = await readJsonSafe(path25.join(cwd2, "tailwind.config.js")) ?? await readJsonSafe(path25.join(cwd2, "tailwind.config.ts"));
9262
+ const oldConfig = await readJsonSafe(path26.join(cwd2, "tailwind.config.js")) ?? await readJsonSafe(path26.join(cwd2, "tailwind.config.ts"));
9169
9263
  if (oldConfig) {
9170
9264
  const hasOldJit = oldConfig.mode === "jit";
9171
9265
  const hasOldPurge = "purge" in oldConfig;
@@ -9189,7 +9283,7 @@ async function runPreflightCli(rawArgs) {
9189
9283
  validation.message
9190
9284
  );
9191
9285
  }
9192
- const hasTsConfig = await pathExists2(path25.join(cwd2, "tsconfig.json"));
9286
+ const hasTsConfig = await pathExists2(path26.join(cwd2, "tsconfig.json"));
9193
9287
  check(
9194
9288
  results,
9195
9289
  "typescript",
@@ -9297,6 +9391,7 @@ var preflightCommand = {
9297
9391
  };
9298
9392
 
9299
9393
  // packages/infrastructure/cli/src/commands/registry.ts
9394
+ init_esm_shims();
9300
9395
  init_errors();
9301
9396
  var registryCommand = {
9302
9397
  name: "registry",
@@ -9334,6 +9429,7 @@ var installRegistryCommand = {
9334
9429
  };
9335
9430
 
9336
9431
  // packages/infrastructure/cli/src/commands/scriptCommands.ts
9432
+ init_esm_shims();
9337
9433
  init_errors();
9338
9434
  import { parseArgs as parseNodeArgs10 } from "util";
9339
9435
  async function runScriptCommand(commandName, context, relativeScriptPath, args, options = {}) {
@@ -9545,10 +9641,11 @@ var scriptCommands = [
9545
9641
  ];
9546
9642
 
9547
9643
  // packages/infrastructure/cli/src/commands/storybook.ts
9644
+ init_esm_shims();
9548
9645
  init_errors();
9549
9646
  init_fs();
9550
9647
  init_json();
9551
- import path26 from "path";
9648
+ import path27 from "path";
9552
9649
  import { parseArgs as parseNodeArgs11 } from "util";
9553
9650
  var storybookCommand = {
9554
9651
  name: "storybook",
@@ -9587,7 +9684,7 @@ var storybookCommand = {
9587
9684
  context.output.writeText(
9588
9685
  `[tw storybook] Tip: use --variants='{"size":["sm","lg"]}' to enumerate variant combinations`
9589
9686
  );
9590
- const localBin = path26.join(
9687
+ const localBin = path27.join(
9591
9688
  process.cwd(),
9592
9689
  "node_modules",
9593
9690
  ".bin",
@@ -9604,6 +9701,7 @@ var storybookCommand = {
9604
9701
  };
9605
9702
 
9606
9703
  // packages/infrastructure/cli/src/commands/studio.ts
9704
+ init_esm_shims();
9607
9705
  init_errors();
9608
9706
  import { parseArgs as parseNodeArgs12 } from "util";
9609
9707
  var studioCommand = {
@@ -9637,6 +9735,7 @@ var studioCommand = {
9637
9735
  };
9638
9736
 
9639
9737
  // packages/infrastructure/cli/src/commands/sync.ts
9738
+ init_esm_shims();
9640
9739
  init_errors();
9641
9740
  var syncCommand = {
9642
9741
  name: "sync",
@@ -9678,20 +9777,29 @@ var syncCommand = {
9678
9777
  };
9679
9778
 
9680
9779
  // packages/infrastructure/cli/src/commands/trace.ts
9780
+ init_esm_shims();
9681
9781
  var import_picocolors5 = __toESM(require_picocolors(), 1);
9682
9782
  init_errors();
9683
9783
  import { parseArgs as parseNodeArgs13 } from "util";
9684
9784
 
9685
9785
  // packages/infrastructure/cli/src/utils/traceService.ts
9786
+ init_esm_shims();
9686
9787
  init_internal();
9687
9788
 
9789
+ // packages/domain/engine/src/internal.ts
9790
+ init_esm_shims();
9791
+
9792
+ // packages/domain/engine/src/bundleAnalyzer.ts
9793
+ init_esm_shims();
9794
+
9688
9795
  // packages/domain/engine/src/native-bridge.ts
9796
+ init_esm_shims();
9689
9797
  init_src();
9690
9798
  var log4 = createDebugLogger("engine:native");
9691
- function getDirname3() {
9799
+ function getDirname4() {
9692
9800
  if (typeof __dirname !== "undefined") return __dirname;
9693
9801
  if (typeof import.meta !== "undefined" && import.meta.url) {
9694
- return getDirname(import.meta.url);
9802
+ return getDirname2(import.meta.url);
9695
9803
  }
9696
9804
  return process.cwd();
9697
9805
  }
@@ -9735,7 +9843,7 @@ var createEngineBindingLoader = () => {
9735
9843
  }
9736
9844
  return cached;
9737
9845
  }
9738
- const runtimeDir = getDirname3();
9846
+ const runtimeDir = getDirname4();
9739
9847
  const candidates = resolveNativeBindingCandidates({
9740
9848
  runtimeDir,
9741
9849
  includeDefaultCandidates: true
@@ -9866,6 +9974,7 @@ var BundleAnalyzer = class {
9866
9974
  };
9867
9975
 
9868
9976
  // packages/domain/engine/src/impactTracker.ts
9977
+ init_esm_shims();
9869
9978
  var ImpactTracker = class {
9870
9979
  bundleAnalyzer;
9871
9980
  constructor() {
@@ -10050,6 +10159,7 @@ var ImpactTracker = class {
10050
10159
  };
10051
10160
 
10052
10161
  // packages/domain/engine/src/ir.ts
10162
+ init_esm_shims();
10053
10163
  var RuleId = class {
10054
10164
  constructor(value) {
10055
10165
  this.value = value;
@@ -10179,6 +10289,7 @@ function createFingerprint(parts) {
10179
10289
  }
10180
10290
 
10181
10291
  // packages/domain/engine/src/reverseLookup.ts
10292
+ init_esm_shims();
10182
10293
  function getNative() {
10183
10294
  const native = getNativeEngineBinding();
10184
10295
  if (!native?.reverseLookupFromCss || !native?.reverseLookupByProperty || !native?.reverseLookupFindDependents) {
@@ -10253,6 +10364,7 @@ var ReverseLookup = class {
10253
10364
  };
10254
10365
 
10255
10366
  // packages/domain/engine/src/resolver.ts
10367
+ init_esm_shims();
10256
10368
  function toNativeInput(rule) {
10257
10369
  return {
10258
10370
  id: rule.id.value,
@@ -10370,6 +10482,7 @@ var CascadeResolver = class {
10370
10482
  };
10371
10483
 
10372
10484
  // packages/domain/engine/src/cssToIr.ts
10485
+ init_esm_shims();
10373
10486
  function createIdGenerator() {
10374
10487
  const state = {
10375
10488
  ruleIdCounter: 0,
@@ -10542,6 +10655,7 @@ function _parseCssToIrFallback(css, prefix, native) {
10542
10655
  }
10543
10656
 
10544
10657
  // packages/domain/engine/src/trace.ts
10658
+ init_esm_shims();
10545
10659
  function buildProvenanceChain(className) {
10546
10660
  return {
10547
10661
  className,
@@ -10754,12 +10868,13 @@ async function traceClass(className, options) {
10754
10868
  }
10755
10869
 
10756
10870
  // packages/infrastructure/cli/src/utils/traceTargetService.ts
10871
+ init_esm_shims();
10757
10872
  init_internal();
10758
10873
  init_src2();
10759
10874
  import fs13 from "fs";
10760
- import path27 from "path";
10875
+ import path28 from "path";
10761
10876
  function toRelativePath(root, value) {
10762
- const relative = path27.relative(root, value);
10877
+ const relative = path28.relative(root, value);
10763
10878
  return relative.length > 0 ? relative : ".";
10764
10879
  }
10765
10880
  function uniqueSorted(values) {
@@ -10890,8 +11005,8 @@ function traceDirectory(targetDir, root) {
10890
11005
  };
10891
11006
  }
10892
11007
  async function traceTarget(target, options = {}) {
10893
- const root = path27.resolve(options.root ?? process.cwd());
10894
- const resolvedTarget = path27.resolve(root, target);
11008
+ const root = path28.resolve(options.root ?? process.cwd());
11009
+ const resolvedTarget = path28.resolve(root, target);
10895
11010
  if (!fs13.existsSync(resolvedTarget)) {
10896
11011
  throw new Error(`Trace target not found: ${resolvedTarget}`);
10897
11012
  }
@@ -11057,16 +11172,17 @@ function printClassTraceOutput(result, output) {
11057
11172
  }
11058
11173
 
11059
11174
  // packages/infrastructure/cli/src/generateTypes.ts
11175
+ init_esm_shims();
11060
11176
  var import_picocolors6 = __toESM(require_picocolors(), 1);
11061
11177
  init_output();
11062
11178
  import fs14 from "fs";
11063
- import path28 from "path";
11179
+ import path29 from "path";
11064
11180
  async function runGenerateTypesCli(rawArgs) {
11065
11181
  const output = createCliOutput({ json: rawArgs.includes("--json") });
11066
11182
  const logger = createCliLogger({ output });
11067
11183
  const cwd2 = process.cwd();
11068
11184
  const outFile = rawArgs.find((a) => a.startsWith("--out="))?.slice(6) ?? "src/types/tailwind-styled.d.ts";
11069
- const outPath = path28.resolve(cwd2, outFile);
11185
+ const outPath = path29.resolve(cwd2, outFile);
11070
11186
  output.writeText("");
11071
11187
  output.writeText(import_picocolors6.default.bold(import_picocolors6.default.cyan(" \u25C6 tw generate-types")));
11072
11188
  output.writeText(import_picocolors6.default.dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
@@ -11102,12 +11218,12 @@ async function runGenerateTypesCli(rawArgs) {
11102
11218
  }
11103
11219
  output.writeText("");
11104
11220
  output.writeText(import_picocolors6.default.bold(" [2/2]") + import_picocolors6.default.cyan(" generate .d.ts"));
11105
- const outDir = path28.dirname(outPath);
11221
+ const outDir = path29.dirname(outPath);
11106
11222
  if (!fs14.existsSync(outDir)) {
11107
11223
  fs14.mkdirSync(outDir, { recursive: true });
11108
11224
  }
11109
11225
  fs14.writeFileSync(outPath, result.dtsContent, "utf-8");
11110
- logger.ok(path28.relative(cwd2, outPath));
11226
+ logger.ok(path29.relative(cwd2, outPath));
11111
11227
  output.writeText("");
11112
11228
  output.writeText(import_picocolors6.default.dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
11113
11229
  output.writeText(import_picocolors6.default.bold(import_picocolors6.default.green(" \u2713 types generated")));
@@ -11118,8 +11234,8 @@ async function runGenerateTypesCli(rawArgs) {
11118
11234
  }
11119
11235
  async function loadNativeBinding2(cwd2) {
11120
11236
  const candidates = [
11121
- path28.join(cwd2, "native", "tailwind-styled-native.node"),
11122
- path28.join(cwd2, "node_modules", "tailwind-styled-v4", "native", "tailwind-styled-native.node")
11237
+ path29.join(cwd2, "native", "tailwind-styled-native.node"),
11238
+ path29.join(cwd2, "node_modules", "tailwind-styled-v4", "native", "tailwind-styled-native.node")
11123
11239
  ];
11124
11240
  for (const candidate of candidates) {
11125
11241
  if (fs14.existsSync(candidate)) {
@@ -11133,13 +11249,15 @@ async function loadNativeBinding2(cwd2) {
11133
11249
  }
11134
11250
 
11135
11251
  // packages/infrastructure/cli/src/commands/why.ts
11252
+ init_esm_shims();
11136
11253
  init_errors();
11137
11254
  import { parseArgs as parseNodeArgs14 } from "util";
11138
11255
 
11139
11256
  // packages/infrastructure/cli/src/utils/whyService.ts
11257
+ init_esm_shims();
11140
11258
  init_internal();
11141
11259
  import fs15 from "fs";
11142
- import path29 from "path";
11260
+ import path30 from "path";
11143
11261
  init_src2();
11144
11262
  function extractVariantChain(usage) {
11145
11263
  const segments = normalizeScannedClass(usage).split(":").filter(Boolean);
@@ -11201,7 +11319,7 @@ async function whyClass(className, options) {
11201
11319
  className
11202
11320
  ]);
11203
11321
  usedIn.push({
11204
- file: path29.relative(root, file.file) || path29.basename(file.file),
11322
+ file: path30.relative(root, file.file) || path30.basename(file.file),
11205
11323
  line: location.line,
11206
11324
  column: location.column,
11207
11325
  usage: normalizeScannedClass(fileClass)
@@ -11665,7 +11783,7 @@ async function main2() {
11665
11783
  buildProgram: buildMainProgram
11666
11784
  });
11667
11785
  }
11668
- var __currentFile = fileURLToPath6(import.meta.url);
11786
+ var __currentFile = fileURLToPath7(import.meta.url);
11669
11787
  if (process.argv[1] === __currentFile) {
11670
11788
  main2();
11671
11789
  }