tailwind-styled-v4 5.1.16 → 5.1.17

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 (59) hide show
  1. package/dist/atomic.js +16 -4
  2. package/dist/atomic.js.map +1 -1
  3. package/dist/atomic.mjs +13 -2
  4. package/dist/atomic.mjs.map +1 -1
  5. package/dist/cli.js +80 -68
  6. package/dist/cli.js.map +1 -1
  7. package/dist/cli.mjs +77 -66
  8. package/dist/cli.mjs.map +1 -1
  9. package/dist/compiler.d.mts +84 -4
  10. package/dist/compiler.d.ts +84 -4
  11. package/dist/compiler.js +245 -15
  12. package/dist/compiler.js.map +1 -1
  13. package/dist/compiler.mjs +240 -14
  14. package/dist/compiler.mjs.map +1 -1
  15. package/dist/engine.js +209 -167
  16. package/dist/engine.js.map +1 -1
  17. package/dist/engine.mjs +200 -159
  18. package/dist/engine.mjs.map +1 -1
  19. package/dist/index.browser.mjs +1 -1
  20. package/dist/index.browser.mjs.map +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +1 -1
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/next.d.mts +16 -0
  26. package/dist/next.d.ts +16 -0
  27. package/dist/next.js +458 -158
  28. package/dist/next.js.map +1 -1
  29. package/dist/next.mjs +454 -154
  30. package/dist/next.mjs.map +1 -1
  31. package/dist/runtime.js +1 -1
  32. package/dist/runtime.js.map +1 -1
  33. package/dist/runtime.mjs +1 -1
  34. package/dist/runtime.mjs.map +1 -1
  35. package/dist/shared.js +106 -64
  36. package/dist/shared.js.map +1 -1
  37. package/dist/shared.mjs +101 -60
  38. package/dist/shared.mjs.map +1 -1
  39. package/dist/theme.js +1 -1
  40. package/dist/theme.js.map +1 -1
  41. package/dist/theme.mjs +1 -1
  42. package/dist/theme.mjs.map +1 -1
  43. package/dist/turbopackLoader.js +94 -52
  44. package/dist/turbopackLoader.js.map +1 -1
  45. package/dist/turbopackLoader.mjs +92 -51
  46. package/dist/turbopackLoader.mjs.map +1 -1
  47. package/dist/tw.js +80 -68
  48. package/dist/tw.js.map +1 -1
  49. package/dist/tw.mjs +77 -66
  50. package/dist/tw.mjs.map +1 -1
  51. package/dist/vite.js +172 -130
  52. package/dist/vite.js.map +1 -1
  53. package/dist/vite.mjs +166 -125
  54. package/dist/vite.mjs.map +1 -1
  55. package/dist/webpackLoader.js +28 -10
  56. package/dist/webpackLoader.js.map +1 -1
  57. package/dist/webpackLoader.mjs +26 -9
  58. package/dist/webpackLoader.mjs.map +1 -1
  59. package/package.json +1 -1
package/dist/tw.js CHANGED
@@ -989,8 +989,8 @@ var require_command = __commonJS({
989
989
  init_cjs_shims();
990
990
  var EventEmitter = require("events").EventEmitter;
991
991
  var childProcess = require("child_process");
992
- var path30 = require("path");
993
- var fs16 = require("fs");
992
+ var path31 = require("path");
993
+ var fs17 = require("fs");
994
994
  var process2 = require("process");
995
995
  var { Argument: Argument2, humanReadableArgName } = require_argument();
996
996
  var { CommanderError: CommanderError2 } = require_error();
@@ -1922,11 +1922,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1922
1922
  let launchWithNode = false;
1923
1923
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1924
1924
  function findFile(baseDir, baseName) {
1925
- const localBin = path30.resolve(baseDir, baseName);
1926
- if (fs16.existsSync(localBin)) return localBin;
1927
- if (sourceExt.includes(path30.extname(baseName))) return void 0;
1925
+ const localBin = path31.resolve(baseDir, baseName);
1926
+ if (fs17.existsSync(localBin)) return localBin;
1927
+ if (sourceExt.includes(path31.extname(baseName))) return void 0;
1928
1928
  const foundExt = sourceExt.find(
1929
- (ext) => fs16.existsSync(`${localBin}${ext}`)
1929
+ (ext) => fs17.existsSync(`${localBin}${ext}`)
1930
1930
  );
1931
1931
  if (foundExt) return `${localBin}${foundExt}`;
1932
1932
  return void 0;
@@ -1938,21 +1938,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
1938
1938
  if (this._scriptPath) {
1939
1939
  let resolvedScriptPath;
1940
1940
  try {
1941
- resolvedScriptPath = fs16.realpathSync(this._scriptPath);
1941
+ resolvedScriptPath = fs17.realpathSync(this._scriptPath);
1942
1942
  } catch (err) {
1943
1943
  resolvedScriptPath = this._scriptPath;
1944
1944
  }
1945
- executableDir = path30.resolve(
1946
- path30.dirname(resolvedScriptPath),
1945
+ executableDir = path31.resolve(
1946
+ path31.dirname(resolvedScriptPath),
1947
1947
  executableDir
1948
1948
  );
1949
1949
  }
1950
1950
  if (executableDir) {
1951
1951
  let localFile = findFile(executableDir, executableFile);
1952
1952
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1953
- const legacyName = path30.basename(
1953
+ const legacyName = path31.basename(
1954
1954
  this._scriptPath,
1955
- path30.extname(this._scriptPath)
1955
+ path31.extname(this._scriptPath)
1956
1956
  );
1957
1957
  if (legacyName !== this._name) {
1958
1958
  localFile = findFile(
@@ -1963,7 +1963,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1963
1963
  }
1964
1964
  executableFile = localFile || executableFile;
1965
1965
  }
1966
- launchWithNode = sourceExt.includes(path30.extname(executableFile));
1966
+ launchWithNode = sourceExt.includes(path31.extname(executableFile));
1967
1967
  let proc;
1968
1968
  if (process2.platform !== "win32") {
1969
1969
  if (launchWithNode) {
@@ -2803,7 +2803,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2803
2803
  * @return {Command}
2804
2804
  */
2805
2805
  nameFromFilename(filename) {
2806
- this._name = path30.basename(filename, path30.extname(filename));
2806
+ this._name = path31.basename(filename, path31.extname(filename));
2807
2807
  return this;
2808
2808
  }
2809
2809
  /**
@@ -2817,9 +2817,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2817
2817
  * @param {string} [path]
2818
2818
  * @return {(string|null|Command)}
2819
2819
  */
2820
- executableDir(path31) {
2821
- if (path31 === void 0) return this._executableDir;
2822
- this._executableDir = path31;
2820
+ executableDir(path32) {
2821
+ if (path32 === void 0) return this._executableDir;
2822
+ this._executableDir = path32;
2823
2823
  return this;
2824
2824
  }
2825
2825
  /**
@@ -3333,9 +3333,9 @@ function createDebugLogger(namespace, label) {
3333
3333
  }
3334
3334
  };
3335
3335
  }
3336
- function formatIssuePath(path30) {
3337
- if (!path30 || path30.length === 0) return "(root)";
3338
- return path30.map(
3336
+ function formatIssuePath(path31) {
3337
+ if (!path31 || path31.length === 0) return "(root)";
3338
+ return path31.map(
3339
3339
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
3340
3340
  ).join(".");
3341
3341
  }
@@ -3456,8 +3456,8 @@ var init_src = __esm({
3456
3456
  /** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
3457
3457
  static fromZod(err) {
3458
3458
  const first = err.issues?.[0] ?? err.errors?.[0];
3459
- const path30 = formatIssuePath(first?.path);
3460
- const message = first ? `${path30}: ${first.message}` : "Schema validation failed";
3459
+ const path31 = formatIssuePath(first?.path);
3460
+ const message = first ? `${path31}: ${first.message}` : "Schema validation failed";
3461
3461
  return new _TwError("validation", "SCHEMA_VALIDATION_FAILED", message, err);
3462
3462
  }
3463
3463
  static wrap(source, code, err) {
@@ -4014,12 +4014,12 @@ var init_schemas = __esm({
4014
4014
  init_cjs_shims();
4015
4015
  import_zod = require("zod");
4016
4016
  init_src();
4017
- formatIssuePath2 = (path30) => path30.length > 0 ? path30.map(
4017
+ formatIssuePath2 = (path31) => path31.length > 0 ? path31.map(
4018
4018
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
4019
4019
  ).join(".") : "<root>";
4020
4020
  formatIssues = (error) => error.issues.map((issue) => {
4021
- const path30 = formatIssuePath2(issue.path);
4022
- return `${path30}: ${issue.message}`;
4021
+ const path31 = formatIssuePath2(issue.path);
4022
+ return `${path31}: ${issue.message}`;
4023
4023
  }).join("; ");
4024
4024
  parseWithSchema = (schema, data, label) => {
4025
4025
  const parsed = schema.safeParse(data);
@@ -4625,7 +4625,7 @@ var init_schemas2 = __esm({
4625
4625
  init_cjs_shims();
4626
4626
  init_src();
4627
4627
  import_zod2 = require("zod");
4628
- formatIssuePath3 = (path30) => path30.length > 0 ? path30.map(
4628
+ formatIssuePath3 = (path31) => path31.length > 0 ? path31.map(
4629
4629
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
4630
4630
  ).join(".") : "<root>";
4631
4631
  isPlainObject = (value) => {
@@ -4634,8 +4634,8 @@ var init_schemas2 = __esm({
4634
4634
  return proto === Object.prototype || proto === null;
4635
4635
  };
4636
4636
  formatIssues2 = (error) => error.issues.map((issue) => {
4637
- const path30 = formatIssuePath3(issue.path);
4638
- return `${path30}: ${issue.message}`;
4637
+ const path31 = formatIssuePath3(issue.path);
4638
+ return `${path31}: ${issue.message}`;
4639
4639
  }).join("; ");
4640
4640
  parseWithSchema2 = (schema, data, label) => {
4641
4641
  const parsed = schema.safeParse(data);
@@ -6255,7 +6255,7 @@ var init_nativeBridge = __esm({
6255
6255
  "use strict";
6256
6256
  init_cjs_shims();
6257
6257
  init_src();
6258
- _loadNative = (path30) => require(path30);
6258
+ _loadNative = (path31) => require(path31);
6259
6259
  log3 = (...args) => {
6260
6260
  if (process.env.DEBUG?.includes("compiler:native")) {
6261
6261
  console.log("[compiler:native]", ...args);
@@ -6397,14 +6397,25 @@ var init_watch = __esm({
6397
6397
  }
6398
6398
  });
6399
6399
 
6400
+ // packages/domain/compiler/src/routeGraph.ts
6401
+ var import_node_fs9, import_node_path24;
6402
+ var init_routeGraph = __esm({
6403
+ "packages/domain/compiler/src/routeGraph.ts"() {
6404
+ "use strict";
6405
+ init_cjs_shims();
6406
+ import_node_fs9 = __toESM(require("fs"), 1);
6407
+ import_node_path24 = __toESM(require("path"), 1);
6408
+ }
6409
+ });
6410
+
6400
6411
  // packages/domain/compiler/src/index.ts
6401
- var import_node_fs9, import_node_path24, import_node_module4, _require3, compileCssFromClasses;
6412
+ var import_node_fs10, import_node_path25, import_node_module4, _require3, compileCssFromClasses;
6402
6413
  var init_src4 = __esm({
6403
6414
  "packages/domain/compiler/src/index.ts"() {
6404
6415
  "use strict";
6405
6416
  init_cjs_shims();
6406
- import_node_fs9 = __toESM(require("fs"), 1);
6407
- import_node_path24 = __toESM(require("path"), 1);
6417
+ import_node_fs10 = __toESM(require("fs"), 1);
6418
+ import_node_path25 = __toESM(require("path"), 1);
6408
6419
  import_node_module4 = require("module");
6409
6420
  init_nativeBridge();
6410
6421
  init_compiler();
@@ -6413,6 +6424,7 @@ var init_src4 = __esm({
6413
6424
  init_cache();
6414
6425
  init_redis();
6415
6426
  init_watch();
6427
+ init_routeGraph();
6416
6428
  _require3 = (0, import_node_module4.createRequire)(
6417
6429
  typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : importMetaUrl
6418
6430
  );
@@ -9090,7 +9102,7 @@ init_cjs_shims();
9090
9102
 
9091
9103
  // packages/infrastructure/cli/src/preflight.ts
9092
9104
  init_cjs_shims();
9093
- var import_node_path25 = __toESM(require("path"), 1);
9105
+ var import_node_path26 = __toESM(require("path"), 1);
9094
9106
  var import_node_url7 = require("url");
9095
9107
  init_args();
9096
9108
  init_errors();
@@ -9123,8 +9135,8 @@ async function validateThemeConfig(cwd2) {
9123
9135
  const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
9124
9136
  let configPath = null;
9125
9137
  for (const file of twConfigFiles) {
9126
- if (await pathExists2(import_node_path25.default.join(cwd2, file))) {
9127
- configPath = import_node_path25.default.join(cwd2, file);
9138
+ if (await pathExists2(import_node_path26.default.join(cwd2, file))) {
9139
+ configPath = import_node_path26.default.join(cwd2, file);
9128
9140
  break;
9129
9141
  }
9130
9142
  }
@@ -9215,7 +9227,7 @@ function resolveCliEntry(scriptPath) {
9215
9227
  async function hasTailwindCssImport(cwd2) {
9216
9228
  const cssFiles = ["src/app/globals.css", "src/index.css", "src/style.css", "app/globals.css"];
9217
9229
  for (const file of cssFiles) {
9218
- const raw = await readFileSafe(import_node_path25.default.join(cwd2, file));
9230
+ const raw = await readFileSafe(import_node_path26.default.join(cwd2, file));
9219
9231
  if (raw?.includes("tailwindcss")) return true;
9220
9232
  }
9221
9233
  return false;
@@ -9231,7 +9243,7 @@ async function hasSafelistSource(cwd2) {
9231
9243
  "app/globals.css"
9232
9244
  ];
9233
9245
  for (const file of cssFiles) {
9234
- const raw = await readFileSafe(import_node_path25.default.join(cwd2, file));
9246
+ const raw = await readFileSafe(import_node_path26.default.join(cwd2, file));
9235
9247
  if (raw === null) continue;
9236
9248
  if (raw.includes("tw-classes")) return { found: true, cssFile: file };
9237
9249
  if (raw.includes("tailwindcss")) return { found: false, cssFile: file };
@@ -9239,8 +9251,8 @@ async function hasSafelistSource(cwd2) {
9239
9251
  return { found: false, cssFile: null };
9240
9252
  }
9241
9253
  async function applyTailwindInit(cwd2) {
9242
- await ensureFileSafe(import_node_path25.default.join(cwd2, "src", "tailwind.css"), DEFAULT_TAILWIND_CSS2);
9243
- await ensureFileSafe(import_node_path25.default.join(cwd2, "tailwind-styled.config.json"), DEFAULT_TW_CONFIG);
9254
+ await ensureFileSafe(import_node_path26.default.join(cwd2, "src", "tailwind.css"), DEFAULT_TAILWIND_CSS2);
9255
+ await ensureFileSafe(import_node_path26.default.join(cwd2, "tailwind-styled.config.json"), DEFAULT_TW_CONFIG);
9244
9256
  }
9245
9257
  function check(results, id, label, pass, message, fix) {
9246
9258
  results.push({ id, label, pass, message, fix });
@@ -9262,7 +9274,7 @@ async function runPreflightCli(rawArgs) {
9262
9274
  node.major >= 20 ? `Node ${node.full} OK` : `Node ${node.full} - requires >=20. Download: https://nodejs.org`,
9263
9275
  node.major < 20 ? "Install Node.js 20 LTS or newer from https://nodejs.org" : void 0
9264
9276
  );
9265
- const pkg = await readJsonSafe(import_node_path25.default.join(cwd2, "package.json"));
9277
+ const pkg = await readJsonSafe(import_node_path26.default.join(cwd2, "package.json"));
9266
9278
  check(
9267
9279
  results,
9268
9280
  "package-json",
@@ -9296,7 +9308,7 @@ async function runPreflightCli(rawArgs) {
9296
9308
  }
9297
9309
  const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
9298
9310
  const twConfigChecks = await Promise.all(
9299
- twConfigFiles.map(async (file) => ({ file, exists: await pathExists2(import_node_path25.default.join(cwd2, file)) }))
9311
+ twConfigFiles.map(async (file) => ({ file, exists: await pathExists2(import_node_path26.default.join(cwd2, file)) }))
9300
9312
  );
9301
9313
  const foundTwConfig = twConfigChecks.find((item) => item.exists)?.file ?? null;
9302
9314
  const hasCssConfig = await hasTailwindCssImport(cwd2);
@@ -9308,7 +9320,7 @@ async function runPreflightCli(rawArgs) {
9308
9320
  foundTwConfig ? `${foundTwConfig} found OK` : hasCssConfig ? "@import tailwindcss found in CSS OK" : "No Tailwind config found - run: tw init",
9309
9321
  "tw init"
9310
9322
  );
9311
- const oldConfig = await readJsonSafe(import_node_path25.default.join(cwd2, "tailwind.config.js")) ?? await readJsonSafe(import_node_path25.default.join(cwd2, "tailwind.config.ts"));
9323
+ const oldConfig = await readJsonSafe(import_node_path26.default.join(cwd2, "tailwind.config.js")) ?? await readJsonSafe(import_node_path26.default.join(cwd2, "tailwind.config.ts"));
9312
9324
  if (oldConfig) {
9313
9325
  const hasOldJit = oldConfig.mode === "jit";
9314
9326
  const hasOldPurge = "purge" in oldConfig;
@@ -9332,7 +9344,7 @@ async function runPreflightCli(rawArgs) {
9332
9344
  validation.message
9333
9345
  );
9334
9346
  }
9335
- const hasTsConfig = await pathExists2(import_node_path25.default.join(cwd2, "tsconfig.json"));
9347
+ const hasTsConfig = await pathExists2(import_node_path26.default.join(cwd2, "tsconfig.json"));
9336
9348
  check(
9337
9349
  results,
9338
9350
  "typescript",
@@ -9691,7 +9703,7 @@ var scriptCommands = [
9691
9703
 
9692
9704
  // packages/infrastructure/cli/src/commands/storybook.ts
9693
9705
  init_cjs_shims();
9694
- var import_node_path26 = __toESM(require("path"), 1);
9706
+ var import_node_path27 = __toESM(require("path"), 1);
9695
9707
  var import_node_util11 = require("util");
9696
9708
  init_errors();
9697
9709
  init_fs();
@@ -9733,7 +9745,7 @@ var storybookCommand = {
9733
9745
  context.output.writeText(
9734
9746
  `[tw storybook] Tip: use --variants='{"size":["sm","lg"]}' to enumerate variant combinations`
9735
9747
  );
9736
- const localBin = import_node_path26.default.join(
9748
+ const localBin = import_node_path27.default.join(
9737
9749
  process.cwd(),
9738
9750
  "node_modules",
9739
9751
  ".bin",
@@ -10919,12 +10931,12 @@ async function traceClass(className, options) {
10919
10931
 
10920
10932
  // packages/infrastructure/cli/src/utils/traceTargetService.ts
10921
10933
  init_cjs_shims();
10922
- var import_node_fs10 = __toESM(require("fs"), 1);
10923
- var import_node_path27 = __toESM(require("path"), 1);
10934
+ var import_node_fs11 = __toESM(require("fs"), 1);
10935
+ var import_node_path28 = __toESM(require("path"), 1);
10924
10936
  init_internal();
10925
10937
  init_src2();
10926
10938
  function toRelativePath(root, value) {
10927
- const relative = import_node_path27.default.relative(root, value);
10939
+ const relative = import_node_path28.default.relative(root, value);
10928
10940
  return relative.length > 0 ? relative : ".";
10929
10941
  }
10930
10942
  function uniqueSorted(values) {
@@ -10993,7 +11005,7 @@ function tryCompileClasses(classes) {
10993
11005
  }
10994
11006
  }
10995
11007
  function traceSingleFile(filePath, root) {
10996
- const source = import_node_fs10.default.readFileSync(filePath, "utf8");
11008
+ const source = import_node_fs11.default.readFileSync(filePath, "utf8");
10997
11009
  const classes = uniqueSorted(scanSource(source));
10998
11010
  const imports = extractImports(source);
10999
11011
  const compiled = tryCompileClasses(classes);
@@ -11024,7 +11036,7 @@ function traceDirectory(targetDir, root) {
11024
11036
  const imports = [];
11025
11037
  const importKeys = /* @__PURE__ */ new Set();
11026
11038
  const files = scanResult.files.filter((entry) => isScannableFile2(entry.file, DEFAULT_EXTENSIONS)).map((entry) => {
11027
- const source = import_node_fs10.default.readFileSync(entry.file, "utf8");
11039
+ const source = import_node_fs11.default.readFileSync(entry.file, "utf8");
11028
11040
  const fileImports = extractImports(source);
11029
11041
  for (const fileImport of fileImports) {
11030
11042
  const key = `${fileImport.kind}:${fileImport.source}`;
@@ -11055,12 +11067,12 @@ function traceDirectory(targetDir, root) {
11055
11067
  };
11056
11068
  }
11057
11069
  async function traceTarget(target, options = {}) {
11058
- const root = import_node_path27.default.resolve(options.root ?? process.cwd());
11059
- const resolvedTarget = import_node_path27.default.resolve(root, target);
11060
- if (!import_node_fs10.default.existsSync(resolvedTarget)) {
11070
+ const root = import_node_path28.default.resolve(options.root ?? process.cwd());
11071
+ const resolvedTarget = import_node_path28.default.resolve(root, target);
11072
+ if (!import_node_fs11.default.existsSync(resolvedTarget)) {
11061
11073
  throw new Error(`Trace target not found: ${resolvedTarget}`);
11062
11074
  }
11063
- const stat = import_node_fs10.default.statSync(resolvedTarget);
11075
+ const stat = import_node_fs11.default.statSync(resolvedTarget);
11064
11076
  if (stat.isDirectory()) {
11065
11077
  return traceDirectory(resolvedTarget, root);
11066
11078
  }
@@ -11223,8 +11235,8 @@ function printClassTraceOutput(result, output) {
11223
11235
 
11224
11236
  // packages/infrastructure/cli/src/generateTypes.ts
11225
11237
  init_cjs_shims();
11226
- var import_node_fs11 = __toESM(require("fs"), 1);
11227
- var import_node_path28 = __toESM(require("path"), 1);
11238
+ var import_node_fs12 = __toESM(require("fs"), 1);
11239
+ var import_node_path29 = __toESM(require("path"), 1);
11228
11240
  var import_picocolors6 = __toESM(require_picocolors(), 1);
11229
11241
  init_output();
11230
11242
  async function runGenerateTypesCli(rawArgs) {
@@ -11232,7 +11244,7 @@ async function runGenerateTypesCli(rawArgs) {
11232
11244
  const logger = createCliLogger({ output });
11233
11245
  const cwd2 = process.cwd();
11234
11246
  const outFile = rawArgs.find((a) => a.startsWith("--out="))?.slice(6) ?? "src/types/tailwind-styled.d.ts";
11235
- const outPath = import_node_path28.default.resolve(cwd2, outFile);
11247
+ const outPath = import_node_path29.default.resolve(cwd2, outFile);
11236
11248
  output.writeText("");
11237
11249
  output.writeText(import_picocolors6.default.bold(import_picocolors6.default.cyan(" \u25C6 tw generate-types")));
11238
11250
  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"));
@@ -11268,12 +11280,12 @@ async function runGenerateTypesCli(rawArgs) {
11268
11280
  }
11269
11281
  output.writeText("");
11270
11282
  output.writeText(import_picocolors6.default.bold(" [2/2]") + import_picocolors6.default.cyan(" generate .d.ts"));
11271
- const outDir = import_node_path28.default.dirname(outPath);
11272
- if (!import_node_fs11.default.existsSync(outDir)) {
11273
- import_node_fs11.default.mkdirSync(outDir, { recursive: true });
11283
+ const outDir = import_node_path29.default.dirname(outPath);
11284
+ if (!import_node_fs12.default.existsSync(outDir)) {
11285
+ import_node_fs12.default.mkdirSync(outDir, { recursive: true });
11274
11286
  }
11275
- import_node_fs11.default.writeFileSync(outPath, result.dtsContent, "utf-8");
11276
- logger.ok(import_node_path28.default.relative(cwd2, outPath));
11287
+ import_node_fs12.default.writeFileSync(outPath, result.dtsContent, "utf-8");
11288
+ logger.ok(import_node_path29.default.relative(cwd2, outPath));
11277
11289
  output.writeText("");
11278
11290
  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"));
11279
11291
  output.writeText(import_picocolors6.default.bold(import_picocolors6.default.green(" \u2713 types generated")));
@@ -11284,11 +11296,11 @@ async function runGenerateTypesCli(rawArgs) {
11284
11296
  }
11285
11297
  async function loadNativeBinding2(cwd2) {
11286
11298
  const candidates = [
11287
- import_node_path28.default.join(cwd2, "native", "tailwind-styled-native.node"),
11288
- import_node_path28.default.join(cwd2, "node_modules", "tailwind-styled-v4", "native", "tailwind-styled-native.node")
11299
+ import_node_path29.default.join(cwd2, "native", "tailwind-styled-native.node"),
11300
+ import_node_path29.default.join(cwd2, "node_modules", "tailwind-styled-v4", "native", "tailwind-styled-native.node")
11289
11301
  ];
11290
11302
  for (const candidate of candidates) {
11291
- if (import_node_fs11.default.existsSync(candidate)) {
11303
+ if (import_node_fs12.default.existsSync(candidate)) {
11292
11304
  try {
11293
11305
  return require(candidate);
11294
11306
  } catch {
@@ -11305,8 +11317,8 @@ init_errors();
11305
11317
 
11306
11318
  // packages/infrastructure/cli/src/utils/whyService.ts
11307
11319
  init_cjs_shims();
11308
- var import_node_fs12 = __toESM(require("fs"), 1);
11309
- var import_node_path29 = __toESM(require("path"), 1);
11320
+ var import_node_fs13 = __toESM(require("fs"), 1);
11321
+ var import_node_path30 = __toESM(require("path"), 1);
11310
11322
  init_internal();
11311
11323
  init_src2();
11312
11324
  function extractVariantChain(usage) {
@@ -11355,7 +11367,7 @@ async function whyClass(className, options) {
11355
11367
  for (const file of scanResult.files) {
11356
11368
  const source = (() => {
11357
11369
  try {
11358
- return import_node_fs12.default.readFileSync(file.file, "utf8");
11370
+ return import_node_fs13.default.readFileSync(file.file, "utf8");
11359
11371
  } catch {
11360
11372
  return "";
11361
11373
  }
@@ -11369,7 +11381,7 @@ async function whyClass(className, options) {
11369
11381
  className
11370
11382
  ]);
11371
11383
  usedIn.push({
11372
- file: import_node_path29.default.relative(root, file.file) || import_node_path29.default.basename(file.file),
11384
+ file: import_node_path30.default.relative(root, file.file) || import_node_path30.default.basename(file.file),
11373
11385
  line: location.line,
11374
11386
  column: location.column,
11375
11387
  usage: normalizeScannedClass(fileClass)