tailwind-styled-v4 5.0.11 → 5.0.13

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 (110) hide show
  1. package/README.md +100 -4
  2. package/dist/{analyzeWorkspace-DDOQdzzI.d.ts → analyzeWorkspace-CopJNGmi.d.ts} +2 -0
  3. package/dist/{analyzeWorkspace-BS5O4rhC.d.mts → analyzeWorkspace-DpVPccjz.d.mts} +2 -0
  4. package/dist/analyzer.d.mts +4 -4
  5. package/dist/analyzer.d.ts +4 -4
  6. package/dist/analyzer.js +34 -69
  7. package/dist/analyzer.js.map +1 -1
  8. package/dist/analyzer.mjs +33 -68
  9. package/dist/analyzer.mjs.map +1 -1
  10. package/dist/animate.d.mts +4 -0
  11. package/dist/animate.d.ts +4 -0
  12. package/dist/animate.js +33 -11
  13. package/dist/animate.js.map +1 -1
  14. package/dist/animate.mjs +33 -11
  15. package/dist/animate.mjs.map +1 -1
  16. package/dist/atomic.js +57 -6
  17. package/dist/atomic.js.map +1 -1
  18. package/dist/atomic.mjs +57 -6
  19. package/dist/atomic.mjs.map +1 -1
  20. package/dist/cli.js +404 -190
  21. package/dist/cli.js.map +1 -1
  22. package/dist/cli.mjs +401 -187
  23. package/dist/cli.mjs.map +1 -1
  24. package/dist/compiler.d.mts +2700 -212
  25. package/dist/compiler.d.ts +2700 -212
  26. package/dist/compiler.js +1996 -503
  27. package/dist/compiler.js.map +1 -1
  28. package/dist/compiler.mjs +1847 -448
  29. package/dist/compiler.mjs.map +1 -1
  30. package/dist/devtools.js +17 -4
  31. package/dist/devtools.js.map +1 -1
  32. package/dist/devtools.mjs +17 -4
  33. package/dist/devtools.mjs.map +1 -1
  34. package/dist/engine.d.mts +11 -470
  35. package/dist/engine.d.ts +11 -470
  36. package/dist/engine.js +2777 -455
  37. package/dist/engine.js.map +1 -1
  38. package/dist/engine.mjs +2776 -454
  39. package/dist/engine.mjs.map +1 -1
  40. package/dist/index-BDQw13kn.d.ts +464 -0
  41. package/dist/index-DJv28Uzq.d.mts +464 -0
  42. package/dist/index.browser.mjs +143 -255
  43. package/dist/index.browser.mjs.map +1 -1
  44. package/dist/index.d.mts +23 -39
  45. package/dist/index.d.ts +23 -39
  46. package/dist/index.js +7234 -1400
  47. package/dist/index.js.map +1 -1
  48. package/dist/index.mjs +7234 -1400
  49. package/dist/index.mjs.map +1 -1
  50. package/dist/next.d.mts +44 -1
  51. package/dist/next.d.ts +44 -1
  52. package/dist/next.js +3224 -1065
  53. package/dist/next.js.map +1 -1
  54. package/dist/next.mjs +3223 -1066
  55. package/dist/next.mjs.map +1 -1
  56. package/dist/rspack.d.mts +9 -0
  57. package/dist/rspack.d.ts +9 -0
  58. package/dist/rspack.js +99 -61
  59. package/dist/rspack.js.map +1 -1
  60. package/dist/rspack.mjs +99 -61
  61. package/dist/rspack.mjs.map +1 -1
  62. package/dist/runtime-css.d.mts +8 -0
  63. package/dist/runtime-css.d.ts +8 -0
  64. package/dist/runtime-css.js +23 -7
  65. package/dist/runtime-css.js.map +1 -1
  66. package/dist/runtime-css.mjs +23 -7
  67. package/dist/runtime-css.mjs.map +1 -1
  68. package/dist/scanner.js +16 -37
  69. package/dist/scanner.js.map +1 -1
  70. package/dist/scanner.mjs +15 -36
  71. package/dist/scanner.mjs.map +1 -1
  72. package/dist/shared.d.mts +107 -1
  73. package/dist/shared.d.ts +107 -1
  74. package/dist/shared.js +3014 -466
  75. package/dist/shared.js.map +1 -1
  76. package/dist/shared.mjs +3008 -445
  77. package/dist/shared.mjs.map +1 -1
  78. package/dist/svelte.js +39 -35
  79. package/dist/svelte.js.map +1 -1
  80. package/dist/svelte.mjs +38 -34
  81. package/dist/svelte.mjs.map +1 -1
  82. package/dist/theme.js +85 -76
  83. package/dist/theme.js.map +1 -1
  84. package/dist/theme.mjs +83 -74
  85. package/dist/theme.mjs.map +1 -1
  86. package/dist/turbopackLoader.js +2351 -187
  87. package/dist/turbopackLoader.js.map +1 -1
  88. package/dist/turbopackLoader.mjs +2351 -187
  89. package/dist/turbopackLoader.mjs.map +1 -1
  90. package/dist/tw.js +404 -190
  91. package/dist/tw.js.map +1 -1
  92. package/dist/tw.mjs +401 -187
  93. package/dist/tw.mjs.map +1 -1
  94. package/dist/vite.js +2657 -320
  95. package/dist/vite.js.map +1 -1
  96. package/dist/vite.mjs +2657 -320
  97. package/dist/vite.mjs.map +1 -1
  98. package/dist/vue.js +39 -35
  99. package/dist/vue.js.map +1 -1
  100. package/dist/vue.mjs +38 -34
  101. package/dist/vue.mjs.map +1 -1
  102. package/dist/webpackLoader.js +190 -33
  103. package/dist/webpackLoader.js.map +1 -1
  104. package/dist/webpackLoader.mjs +190 -33
  105. package/dist/webpackLoader.mjs.map +1 -1
  106. package/native/index.node +0 -0
  107. package/native/tailwind-styled-native.node +0 -0
  108. package/native/tailwind-styled-native.win32-x64-msvc.node +0 -0
  109. package/package.json +9 -4
  110. package/CHANGELOG.md +0 -285
package/dist/scanner.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import 'crypto';
2
- import fs4 from 'fs';
2
+ import fs3 from 'fs';
3
3
  import path5 from 'path';
4
4
  import { fileURLToPath } from 'url';
5
5
  import { createRequire } from 'module';
@@ -69,7 +69,7 @@ function loadNativeBinding(options) {
69
69
  for (const candidate of candidates) {
70
70
  const candidatePath = path5.resolve(runtimeDir, candidate);
71
71
  try {
72
- if (!fs4.existsSync(candidatePath) && !fs4.existsSync(candidatePath + ".node")) {
72
+ if (!fs3.existsSync(candidatePath) && !fs3.existsSync(candidatePath + ".node")) {
73
73
  continue;
74
74
  }
75
75
  const mod = requireNativeModule(candidatePath);
@@ -101,9 +101,9 @@ function resolveNativeBindingCandidates(options) {
101
101
  }
102
102
  }
103
103
  if (!includeDefaultCandidates) return candidates;
104
- if (fs4.existsSync(runtimeDir)) {
104
+ if (fs3.existsSync(runtimeDir)) {
105
105
  try {
106
- for (const entry of fs4.readdirSync(runtimeDir)) {
106
+ for (const entry of fs3.readdirSync(runtimeDir)) {
107
107
  if (entry.endsWith(".node")) candidates.push(entry);
108
108
  }
109
109
  } catch {
@@ -517,7 +517,7 @@ function defaultCachePath(rootDir, cacheDir) {
517
517
  }
518
518
  function readCache(rootDir, cacheDir) {
519
519
  const cachePath = defaultCachePath(rootDir, cacheDir);
520
- fs4.mkdirSync(path5.dirname(cachePath), { recursive: true });
520
+ fs3.mkdirSync(path5.dirname(cachePath), { recursive: true });
521
521
  const result = cacheReadNative(cachePath);
522
522
  if (!result) return [];
523
523
  return result.entries.map((e) => ({
@@ -532,7 +532,7 @@ function readCache(rootDir, cacheDir) {
532
532
  }
533
533
  function writeCache(rootDir, entries, cacheDir) {
534
534
  const cachePath = defaultCachePath(rootDir, cacheDir);
535
- fs4.mkdirSync(path5.dirname(cachePath), { recursive: true });
535
+ fs3.mkdirSync(path5.dirname(cachePath), { recursive: true });
536
536
  const success = cacheWriteNative(cachePath, entries);
537
537
  if (!success) {
538
538
  throw new Error(
@@ -560,27 +560,7 @@ var DEFAULT_CHUNK_SIZE = 150;
560
560
  function collectFiles(rootDir, extensions, ignoreDirs) {
561
561
  const native = collectFilesNative(rootDir, extensions, ignoreDirs);
562
562
  if (native !== null) return native;
563
- const files = [];
564
- function walk(dir) {
565
- let entries;
566
- try {
567
- entries = fs4.readdirSync(dir, { withFileTypes: true });
568
- } catch {
569
- return;
570
- }
571
- for (const entry of entries) {
572
- const fullPath = path5.join(dir, entry.name);
573
- const rel = path5.relative(rootDir, fullPath);
574
- if (entry.isDirectory()) {
575
- const ignored = ignoreDirs.some((d) => entry.name === d || rel.startsWith(d + path5.sep));
576
- if (!ignored) walk(fullPath);
577
- } else if (isScannableFile(entry.name, extensions)) {
578
- files.push(fullPath);
579
- }
580
- }
581
- }
582
- walk(rootDir);
583
- return files;
563
+ throw new Error("FATAL: Native binding 'collectFiles' is required but not available.");
584
564
  }
585
565
  function mergeResults(batchResults) {
586
566
  const files = batchResults.map((r) => ({
@@ -590,8 +570,7 @@ function mergeResults(batchResults) {
590
570
  }));
591
571
  const native = rebuildWorkspaceResultNative(files);
592
572
  if (native) return native;
593
- const unique = new Set(files.flatMap((f) => f.classes));
594
- return { files, totalFiles: files.length, uniqueClasses: Array.from(unique).sort() };
573
+ throw new Error("FATAL: Native binding 'rebuildWorkspaceResult' is required but not available.");
595
574
  }
596
575
  if (!isMainThread && parentPort) {
597
576
  const { filePaths } = workerData;
@@ -775,7 +754,7 @@ var createNativeParserLoader = () => {
775
754
  )
776
755
  ];
777
756
  for (const fullPath of candidates) {
778
- if (!fs4.existsSync(fullPath)) continue;
757
+ if (!fs3.existsSync(fullPath)) continue;
779
758
  try {
780
759
  const required = req(fullPath);
781
760
  if (required && (typeof required.extractClassesFromSource === "function" || typeof required.parseClasses === "function" || typeof required.parse_classes === "function")) {
@@ -821,7 +800,7 @@ function resolveScannerWorkerModulePath() {
821
800
  path5.resolve(runtimeDir, "worker.ts")
822
801
  ];
823
802
  for (const candidate of candidates) {
824
- if (fs4.existsSync(candidate)) return candidate;
803
+ if (fs3.existsSync(candidate)) return candidate;
825
804
  }
826
805
  return null;
827
806
  }
@@ -878,7 +857,7 @@ function collectCandidates(rootDir, ignoreDirectories, extensionSet) {
878
857
  if (!currentDir) continue;
879
858
  const entries = (() => {
880
859
  try {
881
- return fs4.readdirSync(currentDir, { withFileTypes: true });
860
+ return fs3.readdirSync(currentDir, { withFileTypes: true });
882
861
  } catch {
883
862
  return [];
884
863
  }
@@ -916,7 +895,7 @@ function scanSource(source) {
916
895
  "FATAL: Native parser binding is required but not available.\nThis package requires native Rust bindings.\n\nResolution steps:\n1. Build the native Rust module: npm run build:rust"
917
896
  );
918
897
  }
919
- function isScannableFile(filePath, includeExtensions = DEFAULT_EXTENSIONS) {
898
+ function isScannableFile2(filePath, includeExtensions = DEFAULT_EXTENSIONS) {
920
899
  return includeExtensions.includes(path5.extname(filePath));
921
900
  }
922
901
  function scanFile(filePath) {
@@ -977,7 +956,7 @@ function scanWorkspace(rootDir, options = {}) {
977
956
  for (const filePath of candidates) {
978
957
  const stat = (() => {
979
958
  try {
980
- return fs4.statSync(filePath);
959
+ return fs3.statSync(filePath);
981
960
  } catch {
982
961
  return null;
983
962
  }
@@ -1003,7 +982,7 @@ function scanWorkspace(rootDir, options = {}) {
1003
982
  for (const { filePath, stat, size, cached } of ranked) {
1004
983
  const content = (() => {
1005
984
  try {
1006
- return fs4.readFileSync(filePath, "utf8");
985
+ return fs3.readFileSync(filePath, "utf8");
1007
986
  } catch {
1008
987
  return null;
1009
988
  }
@@ -1085,6 +1064,6 @@ async function scanWorkspaceAsync(rootDir, options = {}) {
1085
1064
  }
1086
1065
  }
1087
1066
 
1088
- export { DEFAULT_EXTENSIONS, DEFAULT_IGNORES, batchExtractClassesNative, extractClassesNative, isScannableFile, parseScanWorkspaceOptions, parseScanWorkspaceResult, parseScannerWorkerMessage, scanFile, scanSource, scanWorkspace, scanWorkspaceAsync };
1067
+ export { DEFAULT_EXTENSIONS, DEFAULT_IGNORES, batchExtractClassesNative, extractClassesNative, isScannableFile2 as isScannableFile, parseScanWorkspaceOptions, parseScanWorkspaceResult, parseScannerWorkerMessage, scanFile, scanSource, scanWorkspace, scanWorkspaceAsync };
1089
1068
  //# sourceMappingURL=scanner.mjs.map
1090
1069
  //# sourceMappingURL=scanner.mjs.map