tailwind-styled-v4 5.0.40 → 5.1.1
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/dist/analyzer.js +43 -16
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +104 -72
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +33 -7
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +55 -22
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +39 -10
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +56 -23
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +222 -38
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +321 -203
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +57 -14
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +71 -28
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +0 -1
- package/dist/dashboard.js.map +1 -1
- package/dist/devtools.js +16 -2
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +21 -2
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +141 -51
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +238 -148
- package/dist/engine.mjs.map +1 -1
- package/dist/index.js +50 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -29
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +98 -37
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +177 -115
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +0 -1
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-registry.js +6 -2
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +9 -2
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.js +0 -1
- package/dist/plugin.js.map +1 -1
- package/dist/preset.js +0 -1
- package/dist/preset.js.map +1 -1
- package/dist/rspack.js +89 -6
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +39 -18
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +0 -1
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime.js +0 -1
- package/dist/runtime.js.map +1 -1
- package/dist/scanner.js +29 -11
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +84 -61
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.js +91 -35
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +122 -64
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +0 -1
- package/dist/storybook-addon.js.map +1 -1
- package/dist/svelte.js +40 -8
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +57 -28
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +7 -3
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +30 -23
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +0 -1
- package/dist/testing.js.map +1 -1
- package/dist/theme.js +23 -5
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +41 -17
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +58 -14
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +89 -45
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +224 -38
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +321 -203
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +132 -50
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +226 -143
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +40 -8
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +57 -28
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +40 -10
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +59 -27
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +1 -1
package/dist/analyzer.mjs
CHANGED
|
@@ -20,11 +20,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
20
20
|
};
|
|
21
21
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
22
|
|
|
23
|
+
// node_modules/tsup/assets/esm_shims.js
|
|
24
|
+
import path from "path";
|
|
25
|
+
import { fileURLToPath } from "url";
|
|
26
|
+
var getFilename, getDirname, __dirname, __filename;
|
|
27
|
+
var init_esm_shims = __esm({
|
|
28
|
+
"node_modules/tsup/assets/esm_shims.js"() {
|
|
29
|
+
"use strict";
|
|
30
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
31
|
+
getDirname = () => path.dirname(getFilename());
|
|
32
|
+
__dirname = /* @__PURE__ */ getDirname();
|
|
33
|
+
__filename = /* @__PURE__ */ getFilename();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
23
37
|
// packages/domain/shared/src/index.ts
|
|
24
38
|
import { createHash } from "crypto";
|
|
25
39
|
import fs from "fs";
|
|
26
|
-
import
|
|
27
|
-
import { fileURLToPath } from "url";
|
|
40
|
+
import path2 from "path";
|
|
41
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
28
42
|
import { createRequire } from "module";
|
|
29
43
|
function createLogger(namespace) {
|
|
30
44
|
const prefix = `[${namespace}]`;
|
|
@@ -55,9 +69,9 @@ function createDebugLogger(namespace, label) {
|
|
|
55
69
|
}
|
|
56
70
|
};
|
|
57
71
|
}
|
|
58
|
-
function formatIssuePath(
|
|
59
|
-
if (!
|
|
60
|
-
return
|
|
72
|
+
function formatIssuePath(path9) {
|
|
73
|
+
if (!path9 || path9.length === 0) return "(root)";
|
|
74
|
+
return path9.map(
|
|
61
75
|
(segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
|
|
62
76
|
).join(".");
|
|
63
77
|
}
|
|
@@ -65,7 +79,7 @@ function loadNativeBinding(options) {
|
|
|
65
79
|
const { runtimeDir, candidates, isValid } = options;
|
|
66
80
|
const loadErrors = [];
|
|
67
81
|
for (const candidate of candidates) {
|
|
68
|
-
const candidatePath =
|
|
82
|
+
const candidatePath = path2.resolve(runtimeDir, candidate);
|
|
69
83
|
try {
|
|
70
84
|
if (!fs.existsSync(candidatePath) && !fs.existsSync(candidatePath + ".node")) {
|
|
71
85
|
continue;
|
|
@@ -110,22 +124,22 @@ function resolveNativeBindingCandidates(options) {
|
|
|
110
124
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
111
125
|
const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
|
|
112
126
|
for (const bin of BINARY_NAMES) {
|
|
113
|
-
candidates.push(
|
|
114
|
-
candidates.push(
|
|
115
|
-
candidates.push(
|
|
116
|
-
candidates.push(
|
|
117
|
-
candidates.push(
|
|
118
|
-
candidates.push(
|
|
119
|
-
candidates.push(
|
|
120
|
-
candidates.push(
|
|
121
|
-
candidates.push(
|
|
127
|
+
candidates.push(path2.resolve(runtimeDir, `${bin}.node`));
|
|
128
|
+
candidates.push(path2.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
|
|
129
|
+
candidates.push(path2.resolve(runtimeDir, "..", "native", `${bin}.node`));
|
|
130
|
+
candidates.push(path2.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
|
|
131
|
+
candidates.push(path2.resolve(process.cwd(), "native", `${bin}.node`));
|
|
132
|
+
candidates.push(path2.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
|
|
133
|
+
candidates.push(path2.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
|
|
134
|
+
candidates.push(path2.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
|
|
135
|
+
candidates.push(path2.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
|
|
122
136
|
}
|
|
123
137
|
return Array.from(new Set(candidates));
|
|
124
138
|
}
|
|
125
139
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
126
|
-
if (dir) return
|
|
140
|
+
if (dir) return path2.resolve(dir);
|
|
127
141
|
try {
|
|
128
|
-
return
|
|
142
|
+
return path2.dirname(fileURLToPath2(importMetaUrl));
|
|
129
143
|
} catch {
|
|
130
144
|
return process.cwd();
|
|
131
145
|
}
|
|
@@ -134,6 +148,7 @@ var TwError, _require;
|
|
|
134
148
|
var init_src = __esm({
|
|
135
149
|
"packages/domain/shared/src/index.ts"() {
|
|
136
150
|
"use strict";
|
|
151
|
+
init_esm_shims();
|
|
137
152
|
TwError = class _TwError extends Error {
|
|
138
153
|
/** @deprecated Gunakan source */
|
|
139
154
|
domain;
|
|
@@ -167,8 +182,8 @@ var init_src = __esm({
|
|
|
167
182
|
/** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
|
|
168
183
|
static fromZod(err) {
|
|
169
184
|
const first = err.issues?.[0] ?? err.errors?.[0];
|
|
170
|
-
const
|
|
171
|
-
const message = first ? `${
|
|
185
|
+
const path9 = formatIssuePath(first?.path);
|
|
186
|
+
const message = first ? `${path9}: ${first.message}` : "Schema validation failed";
|
|
172
187
|
return new _TwError("validation", "SCHEMA_VALIDATION_FAILED", message, err);
|
|
173
188
|
}
|
|
174
189
|
static wrap(source, code, err) {
|
|
@@ -221,14 +236,14 @@ __export(native_bridge_exports, {
|
|
|
221
236
|
startWatchNative: () => startWatchNative,
|
|
222
237
|
stopWatchNative: () => stopWatchNative
|
|
223
238
|
});
|
|
224
|
-
import
|
|
225
|
-
import { fileURLToPath as
|
|
226
|
-
function
|
|
239
|
+
import path3 from "path";
|
|
240
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
241
|
+
function getDirname2() {
|
|
227
242
|
if (typeof __dirname !== "undefined") {
|
|
228
243
|
return __dirname;
|
|
229
244
|
}
|
|
230
245
|
if (typeof import.meta !== "undefined" && import.meta.url) {
|
|
231
|
-
return
|
|
246
|
+
return path3.dirname(fileURLToPath3(import.meta.url));
|
|
232
247
|
}
|
|
233
248
|
return process.cwd();
|
|
234
249
|
}
|
|
@@ -437,6 +452,7 @@ var log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader,
|
|
|
437
452
|
var init_native_bridge = __esm({
|
|
438
453
|
"packages/domain/scanner/src/native-bridge.ts"() {
|
|
439
454
|
"use strict";
|
|
455
|
+
init_esm_shims();
|
|
440
456
|
init_src();
|
|
441
457
|
log = createDebugLogger("scanner:native");
|
|
442
458
|
isValidScannerBinding = (module) => {
|
|
@@ -479,7 +495,7 @@ var init_native_bridge = __esm({
|
|
|
479
495
|
}
|
|
480
496
|
return throwNativeBindingError();
|
|
481
497
|
}
|
|
482
|
-
const runtimeDir =
|
|
498
|
+
const runtimeDir = getDirname2();
|
|
483
499
|
const candidates = resolveNativeBindingCandidates({
|
|
484
500
|
runtimeDir,
|
|
485
501
|
includeDefaultCandidates: true
|
|
@@ -520,14 +536,14 @@ var init_native_bridge = __esm({
|
|
|
520
536
|
|
|
521
537
|
// packages/domain/scanner/src/cache-native.ts
|
|
522
538
|
import fs2 from "fs";
|
|
523
|
-
import
|
|
539
|
+
import path4 from "path";
|
|
524
540
|
function defaultCachePath(rootDir, cacheDir) {
|
|
525
|
-
const dir = cacheDir ?
|
|
526
|
-
return
|
|
541
|
+
const dir = cacheDir ? path4.resolve(rootDir, cacheDir) : path4.join(process.cwd(), ".cache", "tailwind-styled");
|
|
542
|
+
return path4.join(dir, "scanner-cache.json");
|
|
527
543
|
}
|
|
528
544
|
function readCache(rootDir, cacheDir) {
|
|
529
545
|
const cachePath = defaultCachePath(rootDir, cacheDir);
|
|
530
|
-
fs2.mkdirSync(
|
|
546
|
+
fs2.mkdirSync(path4.dirname(cachePath), { recursive: true });
|
|
531
547
|
const result = cacheReadNative(cachePath);
|
|
532
548
|
if (!result) return [];
|
|
533
549
|
return result.entries.map((e) => ({
|
|
@@ -542,7 +558,7 @@ function readCache(rootDir, cacheDir) {
|
|
|
542
558
|
}
|
|
543
559
|
function writeCache(rootDir, entries, cacheDir) {
|
|
544
560
|
const cachePath = defaultCachePath(rootDir, cacheDir);
|
|
545
|
-
fs2.mkdirSync(
|
|
561
|
+
fs2.mkdirSync(path4.dirname(cachePath), { recursive: true });
|
|
546
562
|
const success = cacheWriteNative(cachePath, entries);
|
|
547
563
|
if (!success) {
|
|
548
564
|
throw new Error(
|
|
@@ -565,6 +581,7 @@ var STALE_THRESHOLD_MS;
|
|
|
565
581
|
var init_cache_native = __esm({
|
|
566
582
|
"packages/domain/scanner/src/cache-native.ts"() {
|
|
567
583
|
"use strict";
|
|
584
|
+
init_esm_shims();
|
|
568
585
|
init_native_bridge();
|
|
569
586
|
STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
570
587
|
}
|
|
@@ -572,9 +589,9 @@ var init_cache_native = __esm({
|
|
|
572
589
|
|
|
573
590
|
// packages/domain/scanner/src/parallel-scanner.ts
|
|
574
591
|
import { Worker, isMainThread, parentPort, workerData } from "worker_threads";
|
|
575
|
-
import
|
|
592
|
+
import path5 from "path";
|
|
576
593
|
import { availableParallelism } from "os";
|
|
577
|
-
import { fileURLToPath as
|
|
594
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
578
595
|
function collectFiles(rootDir, extensions, ignoreDirs) {
|
|
579
596
|
const native = collectFilesNative(rootDir, extensions, ignoreDirs);
|
|
580
597
|
if (native !== null) return native;
|
|
@@ -615,7 +632,7 @@ async function scanWorkspaceParallel(rootDir, options = {}) {
|
|
|
615
632
|
maxWorkers = Math.max(1, availableParallelism() - 1),
|
|
616
633
|
chunkSize = DEFAULT_CHUNK_SIZE
|
|
617
634
|
} = options;
|
|
618
|
-
const files = collectFiles(
|
|
635
|
+
const files = collectFiles(path5.resolve(rootDir), extensions, ignoreDirs);
|
|
619
636
|
if (files.length < PARALLEL_THRESHOLD) {
|
|
620
637
|
return mergeResults(batchExtractClassesNative(files));
|
|
621
638
|
}
|
|
@@ -635,6 +652,7 @@ var PARALLEL_THRESHOLD, DEFAULT_CHUNK_SIZE, _workerFilename;
|
|
|
635
652
|
var init_parallel_scanner = __esm({
|
|
636
653
|
"packages/domain/scanner/src/parallel-scanner.ts"() {
|
|
637
654
|
"use strict";
|
|
655
|
+
init_esm_shims();
|
|
638
656
|
init_src2();
|
|
639
657
|
init_native_bridge();
|
|
640
658
|
PARALLEL_THRESHOLD = 50;
|
|
@@ -653,7 +671,7 @@ var init_parallel_scanner = __esm({
|
|
|
653
671
|
parentPort.postMessage(msg);
|
|
654
672
|
}
|
|
655
673
|
}
|
|
656
|
-
_workerFilename = typeof __filename !== "undefined" ? __filename :
|
|
674
|
+
_workerFilename = typeof __filename !== "undefined" ? __filename : fileURLToPath4(import.meta.url);
|
|
657
675
|
}
|
|
658
676
|
});
|
|
659
677
|
|
|
@@ -663,13 +681,14 @@ var formatIssuePath2, formatIssues, parseWithSchema, NonNegativeIntegerSchema, S
|
|
|
663
681
|
var init_schemas = __esm({
|
|
664
682
|
"packages/domain/scanner/src/schemas.ts"() {
|
|
665
683
|
"use strict";
|
|
684
|
+
init_esm_shims();
|
|
666
685
|
init_src();
|
|
667
|
-
formatIssuePath2 = (
|
|
686
|
+
formatIssuePath2 = (path9) => path9.length > 0 ? path9.map(
|
|
668
687
|
(segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
|
|
669
688
|
).join(".") : "<root>";
|
|
670
689
|
formatIssues = (error) => error.issues.map((issue) => {
|
|
671
|
-
const
|
|
672
|
-
return `${
|
|
690
|
+
const path9 = formatIssuePath2(issue.path);
|
|
691
|
+
return `${path9}: ${issue.message}`;
|
|
673
692
|
}).join("; ");
|
|
674
693
|
parseWithSchema = (schema, data, label) => {
|
|
675
694
|
const parsed = schema.safeParse(data);
|
|
@@ -743,15 +762,15 @@ __export(src_exports, {
|
|
|
743
762
|
});
|
|
744
763
|
import fs3 from "fs";
|
|
745
764
|
import { createRequire as createRequire2 } from "module";
|
|
746
|
-
import
|
|
747
|
-
import { fileURLToPath as
|
|
765
|
+
import path6 from "path";
|
|
766
|
+
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
748
767
|
import { Worker as Worker2 } from "worker_threads";
|
|
749
768
|
function getRuntimeDir() {
|
|
750
769
|
if (typeof __dirname !== "undefined" && __dirname.length > 0) {
|
|
751
770
|
return __dirname;
|
|
752
771
|
}
|
|
753
772
|
if (typeof import.meta !== "undefined" && import.meta.url) {
|
|
754
|
-
return
|
|
773
|
+
return path6.dirname(fileURLToPath5(import.meta.url));
|
|
755
774
|
}
|
|
756
775
|
return process.cwd();
|
|
757
776
|
}
|
|
@@ -761,14 +780,14 @@ function resolveScannerWorkerModulePath() {
|
|
|
761
780
|
return __dirname;
|
|
762
781
|
}
|
|
763
782
|
if (typeof import.meta !== "undefined" && import.meta.url) {
|
|
764
|
-
return
|
|
783
|
+
return path6.dirname(fileURLToPath5(import.meta.url));
|
|
765
784
|
}
|
|
766
785
|
return process.cwd();
|
|
767
786
|
})();
|
|
768
787
|
const candidates = [
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
788
|
+
path6.resolve(runtimeDir, "worker.cjs"),
|
|
789
|
+
path6.resolve(runtimeDir, "worker.js"),
|
|
790
|
+
path6.resolve(runtimeDir, "worker.ts")
|
|
772
791
|
];
|
|
773
792
|
for (const candidate of candidates) {
|
|
774
793
|
if (fs3.existsSync(candidate)) return candidate;
|
|
@@ -834,13 +853,13 @@ function collectCandidates(rootDir, ignoreDirectories, extensionSet) {
|
|
|
834
853
|
}
|
|
835
854
|
})();
|
|
836
855
|
for (const entry of entries) {
|
|
837
|
-
const fullPath =
|
|
856
|
+
const fullPath = path6.join(currentDir, entry.name);
|
|
838
857
|
if (entry.isDirectory()) {
|
|
839
858
|
if (!ignoreDirectories.has(entry.name)) directories.push(fullPath);
|
|
840
859
|
continue;
|
|
841
860
|
}
|
|
842
861
|
if (!entry.isFile()) continue;
|
|
843
|
-
if (!extensionSet.has(
|
|
862
|
+
if (!extensionSet.has(path6.extname(entry.name))) continue;
|
|
844
863
|
candidates.push(fullPath);
|
|
845
864
|
}
|
|
846
865
|
}
|
|
@@ -867,7 +886,7 @@ function scanSource(source) {
|
|
|
867
886
|
);
|
|
868
887
|
}
|
|
869
888
|
function isScannableFile2(filePath, includeExtensions = DEFAULT_EXTENSIONS) {
|
|
870
|
-
return includeExtensions.includes(
|
|
889
|
+
return includeExtensions.includes(path6.extname(filePath));
|
|
871
890
|
}
|
|
872
891
|
function scanFile(filePath) {
|
|
873
892
|
const { scanFileNative: scanFileNative2 } = (init_native_bridge(), __toCommonJS(native_bridge_exports));
|
|
@@ -1038,6 +1057,7 @@ var log2, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader,
|
|
|
1038
1057
|
var init_src2 = __esm({
|
|
1039
1058
|
"packages/domain/scanner/src/index.ts"() {
|
|
1040
1059
|
"use strict";
|
|
1060
|
+
init_esm_shims();
|
|
1041
1061
|
init_src();
|
|
1042
1062
|
init_cache_native();
|
|
1043
1063
|
init_native_bridge();
|
|
@@ -1058,7 +1078,7 @@ var init_src2 = __esm({
|
|
|
1058
1078
|
const loadNativeParserBinding = () => {
|
|
1059
1079
|
if (_state.binding !== void 0) return _state.binding;
|
|
1060
1080
|
const runtimeDir = getRuntimeDir();
|
|
1061
|
-
const req = createRequire2(
|
|
1081
|
+
const req = createRequire2(path6.join(runtimeDir, "noop.cjs"));
|
|
1062
1082
|
const _platform = process.platform;
|
|
1063
1083
|
const _arch = process.arch;
|
|
1064
1084
|
const _platformArch = `${_platform}-${_arch}`;
|
|
@@ -1066,27 +1086,27 @@ var init_src2 = __esm({
|
|
|
1066
1086
|
const candidates = [
|
|
1067
1087
|
// ── binaryName baru: tailwind-styled-native (napi-rs naming) ──
|
|
1068
1088
|
// cwd = repo root saat run dari root, atau package dir saat workspaces
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1089
|
+
path6.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
|
|
1090
|
+
path6.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArch}.node`),
|
|
1091
|
+
path6.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
1072
1092
|
// runtimeDir = dist/ → naik 1 level ke package root (npm install case)
|
|
1073
1093
|
// e.g. node_modules/tailwind-styled-v4/dist/ → node_modules/tailwind-styled-v4/native/
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1094
|
+
path6.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
|
|
1095
|
+
path6.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArch}.node`),
|
|
1096
|
+
path6.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
1077
1097
|
// runtimeDir = dist/ → naik 4 level ke repo root (monorepo dev case)
|
|
1078
|
-
|
|
1079
|
-
|
|
1098
|
+
path6.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
|
|
1099
|
+
path6.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
1080
1100
|
// 3 level fallback (jika package di-nest lebih dangkal)
|
|
1081
|
-
|
|
1082
|
-
|
|
1101
|
+
path6.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
|
|
1102
|
+
path6.resolve(runtimeDir, "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
1083
1103
|
// ── binaryName lama: tailwind_styled_parser (backward compat) ──
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1104
|
+
path6.resolve(process.cwd(), "native/tailwind_styled_parser.node"),
|
|
1105
|
+
path6.resolve(process.cwd(), "native/build/Release/tailwind_styled_parser.node"),
|
|
1106
|
+
path6.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
|
|
1107
|
+
path6.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
|
|
1108
|
+
path6.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node"),
|
|
1109
|
+
path6.resolve(
|
|
1090
1110
|
runtimeDir,
|
|
1091
1111
|
"..",
|
|
1092
1112
|
"..",
|
|
@@ -1131,14 +1151,23 @@ var init_src2 = __esm({
|
|
|
1131
1151
|
}
|
|
1132
1152
|
});
|
|
1133
1153
|
|
|
1154
|
+
// src/umbrella/analyzer.ts
|
|
1155
|
+
init_esm_shims();
|
|
1156
|
+
|
|
1157
|
+
// packages/domain/analyzer/src/index.ts
|
|
1158
|
+
init_esm_shims();
|
|
1159
|
+
|
|
1134
1160
|
// packages/domain/analyzer/src/analyzeWorkspace.ts
|
|
1161
|
+
init_esm_shims();
|
|
1135
1162
|
init_src2();
|
|
1136
|
-
import
|
|
1163
|
+
import path8 from "path";
|
|
1137
1164
|
|
|
1138
1165
|
// packages/domain/analyzer/src/binding.ts
|
|
1166
|
+
init_esm_shims();
|
|
1139
1167
|
init_src();
|
|
1140
1168
|
|
|
1141
1169
|
// packages/domain/analyzer/src/utils.ts
|
|
1170
|
+
init_esm_shims();
|
|
1142
1171
|
init_src();
|
|
1143
1172
|
import fs4 from "fs";
|
|
1144
1173
|
var DEFAULT_TOP_LIMIT = 10;
|
|
@@ -1257,9 +1286,10 @@ async function requireNativeCssCompiler() {
|
|
|
1257
1286
|
}
|
|
1258
1287
|
|
|
1259
1288
|
// packages/domain/analyzer/src/schemas.ts
|
|
1289
|
+
init_esm_shims();
|
|
1260
1290
|
init_src();
|
|
1261
1291
|
import { z as z2 } from "zod";
|
|
1262
|
-
var formatIssuePath3 = (
|
|
1292
|
+
var formatIssuePath3 = (path9) => path9.length > 0 ? path9.map(
|
|
1263
1293
|
(segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
|
|
1264
1294
|
).join(".") : "<root>";
|
|
1265
1295
|
var isPlainObject = (value) => {
|
|
@@ -1268,8 +1298,8 @@ var isPlainObject = (value) => {
|
|
|
1268
1298
|
return proto === Object.prototype || proto === null;
|
|
1269
1299
|
};
|
|
1270
1300
|
var formatIssues2 = (error) => error.issues.map((issue) => {
|
|
1271
|
-
const
|
|
1272
|
-
return `${
|
|
1301
|
+
const path9 = formatIssuePath3(issue.path);
|
|
1302
|
+
return `${path9}: ${issue.message}`;
|
|
1273
1303
|
}).join("; ");
|
|
1274
1304
|
var parseWithSchema2 = (schema, data, label) => {
|
|
1275
1305
|
const parsed = schema.safeParse(data);
|
|
@@ -1365,8 +1395,9 @@ var parseNativeCssCompileResult = (result, className) => parseWithSchema2(
|
|
|
1365
1395
|
var parseClassToCssOptions = (options) => parseWithSchema2(ClassToCssOptionsSchema, options ?? {}, "classToCss options are invalid");
|
|
1366
1396
|
|
|
1367
1397
|
// packages/domain/analyzer/src/semantic.ts
|
|
1398
|
+
init_esm_shims();
|
|
1368
1399
|
import fs5 from "fs";
|
|
1369
|
-
import
|
|
1400
|
+
import path7 from "path";
|
|
1370
1401
|
import { pathToFileURL } from "url";
|
|
1371
1402
|
var SUPPORTED_TAILWIND_CONFIG_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".js", ".cjs", ".mjs"]);
|
|
1372
1403
|
var tailwindConfigCache = /* @__PURE__ */ new Map();
|
|
@@ -1401,11 +1432,11 @@ var detectConflicts = async (usages) => {
|
|
|
1401
1432
|
};
|
|
1402
1433
|
};
|
|
1403
1434
|
var isSupportedTailwindConfigPath = (configPath) => {
|
|
1404
|
-
return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(
|
|
1435
|
+
return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(path7.extname(configPath).toLowerCase());
|
|
1405
1436
|
};
|
|
1406
1437
|
var resolveTailwindConfigPath = async (root, explicitPath) => {
|
|
1407
1438
|
if (explicitPath) {
|
|
1408
|
-
const resolved =
|
|
1439
|
+
const resolved = path7.resolve(root, explicitPath);
|
|
1409
1440
|
if (!await pathExists(resolved)) return null;
|
|
1410
1441
|
return resolved;
|
|
1411
1442
|
}
|
|
@@ -1416,7 +1447,7 @@ var resolveTailwindConfigPath = async (root, explicitPath) => {
|
|
|
1416
1447
|
"tailwind.config.mjs"
|
|
1417
1448
|
];
|
|
1418
1449
|
for (const candidate of candidates) {
|
|
1419
|
-
const fullPath =
|
|
1450
|
+
const fullPath = path7.resolve(root, candidate);
|
|
1420
1451
|
if (await pathExists(fullPath)) return fullPath;
|
|
1421
1452
|
}
|
|
1422
1453
|
return null;
|
|
@@ -1675,7 +1706,7 @@ async function buildDistribution(usages, native) {
|
|
|
1675
1706
|
}
|
|
1676
1707
|
async function analyzeWorkspace(root, options = {}) {
|
|
1677
1708
|
const startedAtMs = Date.now();
|
|
1678
|
-
const resolvedRoot =
|
|
1709
|
+
const resolvedRoot = path8.resolve(root);
|
|
1679
1710
|
const normalizedOptions = parseAnalyzerOptions(options);
|
|
1680
1711
|
const scan = await (async () => {
|
|
1681
1712
|
const scanStartedAtMs = Date.now();
|
|
@@ -1779,6 +1810,7 @@ async function analyzeWorkspace(root, options = {}) {
|
|
|
1779
1810
|
}
|
|
1780
1811
|
|
|
1781
1812
|
// packages/domain/analyzer/src/classToCss.ts
|
|
1813
|
+
init_esm_shims();
|
|
1782
1814
|
var normalizeClassInput = (input, binding) => {
|
|
1783
1815
|
if (typeof input === "string") {
|
|
1784
1816
|
if (!binding.normalizeClassInput) {
|