tailwind-styled-v4 5.1.16 → 5.1.18

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 +0 -3
  20. package/dist/index.browser.mjs.map +1 -1
  21. package/dist/index.js +0 -3
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +0 -3
  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 +0 -3
  32. package/dist/runtime.js.map +1 -1
  33. package/dist/runtime.mjs +0 -3
  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 +0 -3
  40. package/dist/theme.js.map +1 -1
  41. package/dist/theme.mjs +0 -3
  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/cli.js CHANGED
@@ -988,8 +988,8 @@ var require_command = __commonJS({
988
988
  init_cjs_shims();
989
989
  var EventEmitter = require("events").EventEmitter;
990
990
  var childProcess = require("child_process");
991
- var path30 = require("path");
992
- var fs16 = require("fs");
991
+ var path31 = require("path");
992
+ var fs17 = require("fs");
993
993
  var process2 = require("process");
994
994
  var { Argument: Argument2, humanReadableArgName } = require_argument();
995
995
  var { CommanderError: CommanderError2 } = require_error();
@@ -1921,11 +1921,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1921
1921
  let launchWithNode = false;
1922
1922
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1923
1923
  function findFile(baseDir, baseName) {
1924
- const localBin = path30.resolve(baseDir, baseName);
1925
- if (fs16.existsSync(localBin)) return localBin;
1926
- if (sourceExt.includes(path30.extname(baseName))) return void 0;
1924
+ const localBin = path31.resolve(baseDir, baseName);
1925
+ if (fs17.existsSync(localBin)) return localBin;
1926
+ if (sourceExt.includes(path31.extname(baseName))) return void 0;
1927
1927
  const foundExt = sourceExt.find(
1928
- (ext) => fs16.existsSync(`${localBin}${ext}`)
1928
+ (ext) => fs17.existsSync(`${localBin}${ext}`)
1929
1929
  );
1930
1930
  if (foundExt) return `${localBin}${foundExt}`;
1931
1931
  return void 0;
@@ -1937,21 +1937,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
1937
1937
  if (this._scriptPath) {
1938
1938
  let resolvedScriptPath;
1939
1939
  try {
1940
- resolvedScriptPath = fs16.realpathSync(this._scriptPath);
1940
+ resolvedScriptPath = fs17.realpathSync(this._scriptPath);
1941
1941
  } catch (err) {
1942
1942
  resolvedScriptPath = this._scriptPath;
1943
1943
  }
1944
- executableDir = path30.resolve(
1945
- path30.dirname(resolvedScriptPath),
1944
+ executableDir = path31.resolve(
1945
+ path31.dirname(resolvedScriptPath),
1946
1946
  executableDir
1947
1947
  );
1948
1948
  }
1949
1949
  if (executableDir) {
1950
1950
  let localFile = findFile(executableDir, executableFile);
1951
1951
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1952
- const legacyName = path30.basename(
1952
+ const legacyName = path31.basename(
1953
1953
  this._scriptPath,
1954
- path30.extname(this._scriptPath)
1954
+ path31.extname(this._scriptPath)
1955
1955
  );
1956
1956
  if (legacyName !== this._name) {
1957
1957
  localFile = findFile(
@@ -1962,7 +1962,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1962
1962
  }
1963
1963
  executableFile = localFile || executableFile;
1964
1964
  }
1965
- launchWithNode = sourceExt.includes(path30.extname(executableFile));
1965
+ launchWithNode = sourceExt.includes(path31.extname(executableFile));
1966
1966
  let proc;
1967
1967
  if (process2.platform !== "win32") {
1968
1968
  if (launchWithNode) {
@@ -2802,7 +2802,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2802
2802
  * @return {Command}
2803
2803
  */
2804
2804
  nameFromFilename(filename) {
2805
- this._name = path30.basename(filename, path30.extname(filename));
2805
+ this._name = path31.basename(filename, path31.extname(filename));
2806
2806
  return this;
2807
2807
  }
2808
2808
  /**
@@ -2816,9 +2816,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2816
2816
  * @param {string} [path]
2817
2817
  * @return {(string|null|Command)}
2818
2818
  */
2819
- executableDir(path31) {
2820
- if (path31 === void 0) return this._executableDir;
2821
- this._executableDir = path31;
2819
+ executableDir(path32) {
2820
+ if (path32 === void 0) return this._executableDir;
2821
+ this._executableDir = path32;
2822
2822
  return this;
2823
2823
  }
2824
2824
  /**
@@ -3332,9 +3332,9 @@ function createDebugLogger(namespace, label) {
3332
3332
  }
3333
3333
  };
3334
3334
  }
3335
- function formatIssuePath(path30) {
3336
- if (!path30 || path30.length === 0) return "(root)";
3337
- return path30.map(
3335
+ function formatIssuePath(path31) {
3336
+ if (!path31 || path31.length === 0) return "(root)";
3337
+ return path31.map(
3338
3338
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
3339
3339
  ).join(".");
3340
3340
  }
@@ -3455,8 +3455,8 @@ var init_src = __esm({
3455
3455
  /** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
3456
3456
  static fromZod(err) {
3457
3457
  const first = err.issues?.[0] ?? err.errors?.[0];
3458
- const path30 = formatIssuePath(first?.path);
3459
- const message = first ? `${path30}: ${first.message}` : "Schema validation failed";
3458
+ const path31 = formatIssuePath(first?.path);
3459
+ const message = first ? `${path31}: ${first.message}` : "Schema validation failed";
3460
3460
  return new _TwError("validation", "SCHEMA_VALIDATION_FAILED", message, err);
3461
3461
  }
3462
3462
  static wrap(source, code, err) {
@@ -4013,12 +4013,12 @@ var init_schemas = __esm({
4013
4013
  init_cjs_shims();
4014
4014
  import_zod = require("zod");
4015
4015
  init_src();
4016
- formatIssuePath2 = (path30) => path30.length > 0 ? path30.map(
4016
+ formatIssuePath2 = (path31) => path31.length > 0 ? path31.map(
4017
4017
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
4018
4018
  ).join(".") : "<root>";
4019
4019
  formatIssues = (error) => error.issues.map((issue) => {
4020
- const path30 = formatIssuePath2(issue.path);
4021
- return `${path30}: ${issue.message}`;
4020
+ const path31 = formatIssuePath2(issue.path);
4021
+ return `${path31}: ${issue.message}`;
4022
4022
  }).join("; ");
4023
4023
  parseWithSchema = (schema, data, label) => {
4024
4024
  const parsed = schema.safeParse(data);
@@ -4624,7 +4624,7 @@ var init_schemas2 = __esm({
4624
4624
  init_cjs_shims();
4625
4625
  init_src();
4626
4626
  import_zod2 = require("zod");
4627
- formatIssuePath3 = (path30) => path30.length > 0 ? path30.map(
4627
+ formatIssuePath3 = (path31) => path31.length > 0 ? path31.map(
4628
4628
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
4629
4629
  ).join(".") : "<root>";
4630
4630
  isPlainObject = (value) => {
@@ -4633,8 +4633,8 @@ var init_schemas2 = __esm({
4633
4633
  return proto === Object.prototype || proto === null;
4634
4634
  };
4635
4635
  formatIssues2 = (error) => error.issues.map((issue) => {
4636
- const path30 = formatIssuePath3(issue.path);
4637
- return `${path30}: ${issue.message}`;
4636
+ const path31 = formatIssuePath3(issue.path);
4637
+ return `${path31}: ${issue.message}`;
4638
4638
  }).join("; ");
4639
4639
  parseWithSchema2 = (schema, data, label) => {
4640
4640
  const parsed = schema.safeParse(data);
@@ -6254,7 +6254,7 @@ var init_nativeBridge = __esm({
6254
6254
  "use strict";
6255
6255
  init_cjs_shims();
6256
6256
  init_src();
6257
- _loadNative = (path30) => require(path30);
6257
+ _loadNative = (path31) => require(path31);
6258
6258
  log3 = (...args) => {
6259
6259
  if (process.env.DEBUG?.includes("compiler:native")) {
6260
6260
  console.log("[compiler:native]", ...args);
@@ -6396,14 +6396,25 @@ var init_watch = __esm({
6396
6396
  }
6397
6397
  });
6398
6398
 
6399
+ // packages/domain/compiler/src/routeGraph.ts
6400
+ var import_node_fs9, import_node_path24;
6401
+ var init_routeGraph = __esm({
6402
+ "packages/domain/compiler/src/routeGraph.ts"() {
6403
+ "use strict";
6404
+ init_cjs_shims();
6405
+ import_node_fs9 = __toESM(require("fs"), 1);
6406
+ import_node_path24 = __toESM(require("path"), 1);
6407
+ }
6408
+ });
6409
+
6399
6410
  // packages/domain/compiler/src/index.ts
6400
- var import_node_fs9, import_node_path24, import_node_module4, _require3, compileCssFromClasses;
6411
+ var import_node_fs10, import_node_path25, import_node_module4, _require3, compileCssFromClasses;
6401
6412
  var init_src4 = __esm({
6402
6413
  "packages/domain/compiler/src/index.ts"() {
6403
6414
  "use strict";
6404
6415
  init_cjs_shims();
6405
- import_node_fs9 = __toESM(require("fs"), 1);
6406
- import_node_path24 = __toESM(require("path"), 1);
6416
+ import_node_fs10 = __toESM(require("fs"), 1);
6417
+ import_node_path25 = __toESM(require("path"), 1);
6407
6418
  import_node_module4 = require("module");
6408
6419
  init_nativeBridge();
6409
6420
  init_compiler();
@@ -6412,6 +6423,7 @@ var init_src4 = __esm({
6412
6423
  init_cache();
6413
6424
  init_redis();
6414
6425
  init_watch();
6426
+ init_routeGraph();
6415
6427
  _require3 = (0, import_node_module4.createRequire)(
6416
6428
  typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : importMetaUrl
6417
6429
  );
@@ -9097,7 +9109,7 @@ init_cjs_shims();
9097
9109
 
9098
9110
  // packages/infrastructure/cli/src/preflight.ts
9099
9111
  init_cjs_shims();
9100
- var import_node_path25 = __toESM(require("path"), 1);
9112
+ var import_node_path26 = __toESM(require("path"), 1);
9101
9113
  var import_node_url7 = require("url");
9102
9114
  init_args();
9103
9115
  init_errors();
@@ -9130,8 +9142,8 @@ async function validateThemeConfig(cwd2) {
9130
9142
  const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
9131
9143
  let configPath = null;
9132
9144
  for (const file of twConfigFiles) {
9133
- if (await pathExists2(import_node_path25.default.join(cwd2, file))) {
9134
- configPath = import_node_path25.default.join(cwd2, file);
9145
+ if (await pathExists2(import_node_path26.default.join(cwd2, file))) {
9146
+ configPath = import_node_path26.default.join(cwd2, file);
9135
9147
  break;
9136
9148
  }
9137
9149
  }
@@ -9222,7 +9234,7 @@ function resolveCliEntry(scriptPath) {
9222
9234
  async function hasTailwindCssImport(cwd2) {
9223
9235
  const cssFiles = ["src/app/globals.css", "src/index.css", "src/style.css", "app/globals.css"];
9224
9236
  for (const file of cssFiles) {
9225
- const raw = await readFileSafe(import_node_path25.default.join(cwd2, file));
9237
+ const raw = await readFileSafe(import_node_path26.default.join(cwd2, file));
9226
9238
  if (raw?.includes("tailwindcss")) return true;
9227
9239
  }
9228
9240
  return false;
@@ -9238,7 +9250,7 @@ async function hasSafelistSource(cwd2) {
9238
9250
  "app/globals.css"
9239
9251
  ];
9240
9252
  for (const file of cssFiles) {
9241
- const raw = await readFileSafe(import_node_path25.default.join(cwd2, file));
9253
+ const raw = await readFileSafe(import_node_path26.default.join(cwd2, file));
9242
9254
  if (raw === null) continue;
9243
9255
  if (raw.includes("tw-classes")) return { found: true, cssFile: file };
9244
9256
  if (raw.includes("tailwindcss")) return { found: false, cssFile: file };
@@ -9246,8 +9258,8 @@ async function hasSafelistSource(cwd2) {
9246
9258
  return { found: false, cssFile: null };
9247
9259
  }
9248
9260
  async function applyTailwindInit(cwd2) {
9249
- await ensureFileSafe(import_node_path25.default.join(cwd2, "src", "tailwind.css"), DEFAULT_TAILWIND_CSS2);
9250
- await ensureFileSafe(import_node_path25.default.join(cwd2, "tailwind-styled.config.json"), DEFAULT_TW_CONFIG);
9261
+ await ensureFileSafe(import_node_path26.default.join(cwd2, "src", "tailwind.css"), DEFAULT_TAILWIND_CSS2);
9262
+ await ensureFileSafe(import_node_path26.default.join(cwd2, "tailwind-styled.config.json"), DEFAULT_TW_CONFIG);
9251
9263
  }
9252
9264
  function check(results, id, label, pass, message, fix) {
9253
9265
  results.push({ id, label, pass, message, fix });
@@ -9269,7 +9281,7 @@ async function runPreflightCli(rawArgs) {
9269
9281
  node.major >= 20 ? `Node ${node.full} OK` : `Node ${node.full} - requires >=20. Download: https://nodejs.org`,
9270
9282
  node.major < 20 ? "Install Node.js 20 LTS or newer from https://nodejs.org" : void 0
9271
9283
  );
9272
- const pkg = await readJsonSafe(import_node_path25.default.join(cwd2, "package.json"));
9284
+ const pkg = await readJsonSafe(import_node_path26.default.join(cwd2, "package.json"));
9273
9285
  check(
9274
9286
  results,
9275
9287
  "package-json",
@@ -9303,7 +9315,7 @@ async function runPreflightCli(rawArgs) {
9303
9315
  }
9304
9316
  const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
9305
9317
  const twConfigChecks = await Promise.all(
9306
- twConfigFiles.map(async (file) => ({ file, exists: await pathExists2(import_node_path25.default.join(cwd2, file)) }))
9318
+ twConfigFiles.map(async (file) => ({ file, exists: await pathExists2(import_node_path26.default.join(cwd2, file)) }))
9307
9319
  );
9308
9320
  const foundTwConfig = twConfigChecks.find((item) => item.exists)?.file ?? null;
9309
9321
  const hasCssConfig = await hasTailwindCssImport(cwd2);
@@ -9315,7 +9327,7 @@ async function runPreflightCli(rawArgs) {
9315
9327
  foundTwConfig ? `${foundTwConfig} found OK` : hasCssConfig ? "@import tailwindcss found in CSS OK" : "No Tailwind config found - run: tw init",
9316
9328
  "tw init"
9317
9329
  );
9318
- const oldConfig = await readJsonSafe(import_node_path25.default.join(cwd2, "tailwind.config.js")) ?? await readJsonSafe(import_node_path25.default.join(cwd2, "tailwind.config.ts"));
9330
+ const oldConfig = await readJsonSafe(import_node_path26.default.join(cwd2, "tailwind.config.js")) ?? await readJsonSafe(import_node_path26.default.join(cwd2, "tailwind.config.ts"));
9319
9331
  if (oldConfig) {
9320
9332
  const hasOldJit = oldConfig.mode === "jit";
9321
9333
  const hasOldPurge = "purge" in oldConfig;
@@ -9339,7 +9351,7 @@ async function runPreflightCli(rawArgs) {
9339
9351
  validation.message
9340
9352
  );
9341
9353
  }
9342
- const hasTsConfig = await pathExists2(import_node_path25.default.join(cwd2, "tsconfig.json"));
9354
+ const hasTsConfig = await pathExists2(import_node_path26.default.join(cwd2, "tsconfig.json"));
9343
9355
  check(
9344
9356
  results,
9345
9357
  "typescript",
@@ -9698,7 +9710,7 @@ var scriptCommands = [
9698
9710
 
9699
9711
  // packages/infrastructure/cli/src/commands/storybook.ts
9700
9712
  init_cjs_shims();
9701
- var import_node_path26 = __toESM(require("path"), 1);
9713
+ var import_node_path27 = __toESM(require("path"), 1);
9702
9714
  var import_node_util11 = require("util");
9703
9715
  init_errors();
9704
9716
  init_fs();
@@ -9740,7 +9752,7 @@ var storybookCommand = {
9740
9752
  context.output.writeText(
9741
9753
  `[tw storybook] Tip: use --variants='{"size":["sm","lg"]}' to enumerate variant combinations`
9742
9754
  );
9743
- const localBin = import_node_path26.default.join(
9755
+ const localBin = import_node_path27.default.join(
9744
9756
  process.cwd(),
9745
9757
  "node_modules",
9746
9758
  ".bin",
@@ -10926,12 +10938,12 @@ async function traceClass(className, options) {
10926
10938
 
10927
10939
  // packages/infrastructure/cli/src/utils/traceTargetService.ts
10928
10940
  init_cjs_shims();
10929
- var import_node_fs10 = __toESM(require("fs"), 1);
10930
- var import_node_path27 = __toESM(require("path"), 1);
10941
+ var import_node_fs11 = __toESM(require("fs"), 1);
10942
+ var import_node_path28 = __toESM(require("path"), 1);
10931
10943
  init_internal();
10932
10944
  init_src2();
10933
10945
  function toRelativePath(root, value) {
10934
- const relative = import_node_path27.default.relative(root, value);
10946
+ const relative = import_node_path28.default.relative(root, value);
10935
10947
  return relative.length > 0 ? relative : ".";
10936
10948
  }
10937
10949
  function uniqueSorted(values) {
@@ -11000,7 +11012,7 @@ function tryCompileClasses(classes) {
11000
11012
  }
11001
11013
  }
11002
11014
  function traceSingleFile(filePath, root) {
11003
- const source = import_node_fs10.default.readFileSync(filePath, "utf8");
11015
+ const source = import_node_fs11.default.readFileSync(filePath, "utf8");
11004
11016
  const classes = uniqueSorted(scanSource(source));
11005
11017
  const imports = extractImports(source);
11006
11018
  const compiled = tryCompileClasses(classes);
@@ -11031,7 +11043,7 @@ function traceDirectory(targetDir, root) {
11031
11043
  const imports = [];
11032
11044
  const importKeys = /* @__PURE__ */ new Set();
11033
11045
  const files = scanResult.files.filter((entry) => isScannableFile2(entry.file, DEFAULT_EXTENSIONS)).map((entry) => {
11034
- const source = import_node_fs10.default.readFileSync(entry.file, "utf8");
11046
+ const source = import_node_fs11.default.readFileSync(entry.file, "utf8");
11035
11047
  const fileImports = extractImports(source);
11036
11048
  for (const fileImport of fileImports) {
11037
11049
  const key = `${fileImport.kind}:${fileImport.source}`;
@@ -11062,12 +11074,12 @@ function traceDirectory(targetDir, root) {
11062
11074
  };
11063
11075
  }
11064
11076
  async function traceTarget(target, options = {}) {
11065
- const root = import_node_path27.default.resolve(options.root ?? process.cwd());
11066
- const resolvedTarget = import_node_path27.default.resolve(root, target);
11067
- if (!import_node_fs10.default.existsSync(resolvedTarget)) {
11077
+ const root = import_node_path28.default.resolve(options.root ?? process.cwd());
11078
+ const resolvedTarget = import_node_path28.default.resolve(root, target);
11079
+ if (!import_node_fs11.default.existsSync(resolvedTarget)) {
11068
11080
  throw new Error(`Trace target not found: ${resolvedTarget}`);
11069
11081
  }
11070
- const stat = import_node_fs10.default.statSync(resolvedTarget);
11082
+ const stat = import_node_fs11.default.statSync(resolvedTarget);
11071
11083
  if (stat.isDirectory()) {
11072
11084
  return traceDirectory(resolvedTarget, root);
11073
11085
  }
@@ -11230,8 +11242,8 @@ function printClassTraceOutput(result, output) {
11230
11242
 
11231
11243
  // packages/infrastructure/cli/src/generateTypes.ts
11232
11244
  init_cjs_shims();
11233
- var import_node_fs11 = __toESM(require("fs"), 1);
11234
- var import_node_path28 = __toESM(require("path"), 1);
11245
+ var import_node_fs12 = __toESM(require("fs"), 1);
11246
+ var import_node_path29 = __toESM(require("path"), 1);
11235
11247
  var import_picocolors6 = __toESM(require_picocolors(), 1);
11236
11248
  init_output();
11237
11249
  async function runGenerateTypesCli(rawArgs) {
@@ -11239,7 +11251,7 @@ async function runGenerateTypesCli(rawArgs) {
11239
11251
  const logger = createCliLogger({ output });
11240
11252
  const cwd2 = process.cwd();
11241
11253
  const outFile = rawArgs.find((a) => a.startsWith("--out="))?.slice(6) ?? "src/types/tailwind-styled.d.ts";
11242
- const outPath = import_node_path28.default.resolve(cwd2, outFile);
11254
+ const outPath = import_node_path29.default.resolve(cwd2, outFile);
11243
11255
  output.writeText("");
11244
11256
  output.writeText(import_picocolors6.default.bold(import_picocolors6.default.cyan(" \u25C6 tw generate-types")));
11245
11257
  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"));
@@ -11275,12 +11287,12 @@ async function runGenerateTypesCli(rawArgs) {
11275
11287
  }
11276
11288
  output.writeText("");
11277
11289
  output.writeText(import_picocolors6.default.bold(" [2/2]") + import_picocolors6.default.cyan(" generate .d.ts"));
11278
- const outDir = import_node_path28.default.dirname(outPath);
11279
- if (!import_node_fs11.default.existsSync(outDir)) {
11280
- import_node_fs11.default.mkdirSync(outDir, { recursive: true });
11290
+ const outDir = import_node_path29.default.dirname(outPath);
11291
+ if (!import_node_fs12.default.existsSync(outDir)) {
11292
+ import_node_fs12.default.mkdirSync(outDir, { recursive: true });
11281
11293
  }
11282
- import_node_fs11.default.writeFileSync(outPath, result.dtsContent, "utf-8");
11283
- logger.ok(import_node_path28.default.relative(cwd2, outPath));
11294
+ import_node_fs12.default.writeFileSync(outPath, result.dtsContent, "utf-8");
11295
+ logger.ok(import_node_path29.default.relative(cwd2, outPath));
11284
11296
  output.writeText("");
11285
11297
  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"));
11286
11298
  output.writeText(import_picocolors6.default.bold(import_picocolors6.default.green(" \u2713 types generated")));
@@ -11291,11 +11303,11 @@ async function runGenerateTypesCli(rawArgs) {
11291
11303
  }
11292
11304
  async function loadNativeBinding2(cwd2) {
11293
11305
  const candidates = [
11294
- import_node_path28.default.join(cwd2, "native", "tailwind-styled-native.node"),
11295
- import_node_path28.default.join(cwd2, "node_modules", "tailwind-styled-v4", "native", "tailwind-styled-native.node")
11306
+ import_node_path29.default.join(cwd2, "native", "tailwind-styled-native.node"),
11307
+ import_node_path29.default.join(cwd2, "node_modules", "tailwind-styled-v4", "native", "tailwind-styled-native.node")
11296
11308
  ];
11297
11309
  for (const candidate of candidates) {
11298
- if (import_node_fs11.default.existsSync(candidate)) {
11310
+ if (import_node_fs12.default.existsSync(candidate)) {
11299
11311
  try {
11300
11312
  return require(candidate);
11301
11313
  } catch {
@@ -11312,8 +11324,8 @@ init_errors();
11312
11324
 
11313
11325
  // packages/infrastructure/cli/src/utils/whyService.ts
11314
11326
  init_cjs_shims();
11315
- var import_node_fs12 = __toESM(require("fs"), 1);
11316
- var import_node_path29 = __toESM(require("path"), 1);
11327
+ var import_node_fs13 = __toESM(require("fs"), 1);
11328
+ var import_node_path30 = __toESM(require("path"), 1);
11317
11329
  init_internal();
11318
11330
  init_src2();
11319
11331
  function extractVariantChain(usage) {
@@ -11362,7 +11374,7 @@ async function whyClass(className, options) {
11362
11374
  for (const file of scanResult.files) {
11363
11375
  const source = (() => {
11364
11376
  try {
11365
- return import_node_fs12.default.readFileSync(file.file, "utf8");
11377
+ return import_node_fs13.default.readFileSync(file.file, "utf8");
11366
11378
  } catch {
11367
11379
  return "";
11368
11380
  }
@@ -11376,7 +11388,7 @@ async function whyClass(className, options) {
11376
11388
  className
11377
11389
  ]);
11378
11390
  usedIn.push({
11379
- file: import_node_path29.default.relative(root, file.file) || import_node_path29.default.basename(file.file),
11391
+ file: import_node_path30.default.relative(root, file.file) || import_node_path30.default.basename(file.file),
11380
11392
  line: location.line,
11381
11393
  column: location.column,
11382
11394
  usage: normalizeScannedClass(fileClass)