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.
- package/README.md +100 -4
- package/dist/{analyzeWorkspace-DDOQdzzI.d.ts → analyzeWorkspace-CopJNGmi.d.ts} +2 -0
- package/dist/{analyzeWorkspace-BS5O4rhC.d.mts → analyzeWorkspace-DpVPccjz.d.mts} +2 -0
- package/dist/analyzer.d.mts +4 -4
- package/dist/analyzer.d.ts +4 -4
- package/dist/analyzer.js +34 -69
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +33 -68
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.d.mts +4 -0
- package/dist/animate.d.ts +4 -0
- package/dist/animate.js +33 -11
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +33 -11
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +57 -6
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +57 -6
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +404 -190
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +401 -187
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +2700 -212
- package/dist/compiler.d.ts +2700 -212
- package/dist/compiler.js +1996 -503
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +1847 -448
- package/dist/compiler.mjs.map +1 -1
- package/dist/devtools.js +17 -4
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +17 -4
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.d.mts +11 -470
- package/dist/engine.d.ts +11 -470
- package/dist/engine.js +2777 -455
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +2776 -454
- package/dist/engine.mjs.map +1 -1
- package/dist/index-BDQw13kn.d.ts +464 -0
- package/dist/index-DJv28Uzq.d.mts +464 -0
- package/dist/index.browser.mjs +143 -255
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.d.mts +23 -39
- package/dist/index.d.ts +23 -39
- package/dist/index.js +7234 -1400
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7234 -1400
- package/dist/index.mjs.map +1 -1
- package/dist/next.d.mts +44 -1
- package/dist/next.d.ts +44 -1
- package/dist/next.js +3224 -1065
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +3223 -1066
- package/dist/next.mjs.map +1 -1
- package/dist/rspack.d.mts +9 -0
- package/dist/rspack.d.ts +9 -0
- package/dist/rspack.js +99 -61
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +99 -61
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.d.mts +8 -0
- package/dist/runtime-css.d.ts +8 -0
- package/dist/runtime-css.js +23 -7
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +23 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/scanner.js +16 -37
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +15 -36
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +107 -1
- package/dist/shared.d.ts +107 -1
- package/dist/shared.js +3014 -466
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +3008 -445
- package/dist/shared.mjs.map +1 -1
- package/dist/svelte.js +39 -35
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +38 -34
- package/dist/svelte.mjs.map +1 -1
- package/dist/theme.js +85 -76
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +83 -74
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +2351 -187
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +2351 -187
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +404 -190
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +401 -187
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +2657 -320
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +2657 -320
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +39 -35
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +38 -34
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +190 -33
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +190 -33
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/index.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/native/tailwind-styled-native.win32-x64-msvc.node +0 -0
- package/package.json +9 -4
- package/CHANGELOG.md +0 -285
package/dist/scanner.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'crypto';
|
|
2
|
-
import
|
|
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 (!
|
|
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 (
|
|
104
|
+
if (fs3.existsSync(runtimeDir)) {
|
|
105
105
|
try {
|
|
106
|
-
for (const entry of
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 (!
|
|
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 (
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|