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/shared.mjs
CHANGED
|
@@ -26,6 +26,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
26
26
|
};
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
+
// node_modules/tsup/assets/esm_shims.js
|
|
30
|
+
import path from "path";
|
|
31
|
+
import { fileURLToPath } from "url";
|
|
32
|
+
var getFilename, getDirname, __dirname, __filename;
|
|
33
|
+
var init_esm_shims = __esm({
|
|
34
|
+
"node_modules/tsup/assets/esm_shims.js"() {
|
|
35
|
+
"use strict";
|
|
36
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
37
|
+
getDirname = () => path.dirname(getFilename());
|
|
38
|
+
__dirname = /* @__PURE__ */ getDirname();
|
|
39
|
+
__filename = /* @__PURE__ */ getFilename();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
29
43
|
// packages/domain/shared/src/trace.ts
|
|
30
44
|
function getHealthColor(status) {
|
|
31
45
|
switch (status) {
|
|
@@ -119,6 +133,7 @@ function getPipelinePercentages(metrics) {
|
|
|
119
133
|
var init_trace = __esm({
|
|
120
134
|
"packages/domain/shared/src/trace.ts"() {
|
|
121
135
|
"use strict";
|
|
136
|
+
init_esm_shims();
|
|
122
137
|
}
|
|
123
138
|
});
|
|
124
139
|
|
|
@@ -134,6 +149,7 @@ var ERROR_CODES, ERROR_SUGGESTIONS;
|
|
|
134
149
|
var init_error_codes = __esm({
|
|
135
150
|
"packages/domain/shared/src/error-codes.ts"() {
|
|
136
151
|
"use strict";
|
|
152
|
+
init_esm_shims();
|
|
137
153
|
ERROR_CODES = {
|
|
138
154
|
// E0xx — Native binding
|
|
139
155
|
NATIVE_NOT_FOUND: "E001",
|
|
@@ -201,6 +217,7 @@ function isTailwindV4() {
|
|
|
201
217
|
var init_compatibility = __esm({
|
|
202
218
|
"packages/domain/shared/src/compatibility.ts"() {
|
|
203
219
|
"use strict";
|
|
220
|
+
init_esm_shims();
|
|
204
221
|
}
|
|
205
222
|
});
|
|
206
223
|
|
|
@@ -214,9 +231,9 @@ function parseNative(schema, data, context) {
|
|
|
214
231
|
const result = schema.safeParse(data);
|
|
215
232
|
if (!result.success) {
|
|
216
233
|
const first = result.error.issues[0];
|
|
217
|
-
const
|
|
234
|
+
const path7 = first?.path?.join(".") ?? "(root)";
|
|
218
235
|
throw new Error(
|
|
219
|
-
`[${context}] Native binding returned unexpected data: ${
|
|
236
|
+
`[${context}] Native binding returned unexpected data: ${path7}: ${first?.message ?? "validation failed"}`
|
|
220
237
|
);
|
|
221
238
|
}
|
|
222
239
|
return result.data;
|
|
@@ -225,6 +242,7 @@ var NativeScanFileSchema, NativeScanResultSchema, NativeClassUsageSchema, Native
|
|
|
225
242
|
var init_native_schemas = __esm({
|
|
226
243
|
"packages/domain/shared/src/native-schemas.ts"() {
|
|
227
244
|
"use strict";
|
|
245
|
+
init_esm_shims();
|
|
228
246
|
NativeScanFileSchema = z.object({
|
|
229
247
|
file: z.string().min(1, "file path cannot be empty"),
|
|
230
248
|
classes: z.array(z.string()),
|
|
@@ -355,14 +373,14 @@ function createEsmRequire(importMetaUrl) {
|
|
|
355
373
|
if (!nodeRequire) throw new Error("require not available");
|
|
356
374
|
return nodeRequire.createRequire(importMetaUrl);
|
|
357
375
|
}
|
|
358
|
-
function
|
|
376
|
+
function getDirname2(importMetaUrl) {
|
|
359
377
|
if (isBrowser) return "";
|
|
360
378
|
if (typeof __dirname !== "undefined") return __dirname;
|
|
361
379
|
const nodePath = getNodePath();
|
|
362
380
|
const nodeUrl = getNodeUrl();
|
|
363
381
|
return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
|
|
364
382
|
}
|
|
365
|
-
function
|
|
383
|
+
function getFilename2(importMetaUrl) {
|
|
366
384
|
if (isBrowser) return "";
|
|
367
385
|
if (typeof __filename !== "undefined") return __filename;
|
|
368
386
|
return getNodeUrl().fileURLToPath(importMetaUrl);
|
|
@@ -371,7 +389,7 @@ function resolveFromRoot(...segments) {
|
|
|
371
389
|
if (isBrowser) return segments.join("/");
|
|
372
390
|
const nodePath = getNodePath();
|
|
373
391
|
const nodeFs = getNodeFs();
|
|
374
|
-
let dir = typeof __dirname !== "undefined" ? __dirname :
|
|
392
|
+
let dir = typeof __dirname !== "undefined" ? __dirname : getDirname2(getCurrentFileUrl());
|
|
375
393
|
for (let i = 0; i < 10; i++) {
|
|
376
394
|
const pkgPath = nodePath.join(dir, "package.json");
|
|
377
395
|
try {
|
|
@@ -395,12 +413,13 @@ function tryRequire(moduleName, importMetaUrl) {
|
|
|
395
413
|
}
|
|
396
414
|
function resolveNativeNodePath(importMetaUrl, ...relativeSegments) {
|
|
397
415
|
if (isBrowser) return relativeSegments.join("/");
|
|
398
|
-
return getNodePath().resolve(
|
|
416
|
+
return getNodePath().resolve(getDirname2(importMetaUrl), ...relativeSegments);
|
|
399
417
|
}
|
|
400
418
|
var isBrowser, nodeModuleRef, _nodePath, _nodeUrl, _nodeFs;
|
|
401
419
|
var init_esmHelpers = __esm({
|
|
402
420
|
"packages/domain/shared/src/esmHelpers.ts"() {
|
|
403
421
|
"use strict";
|
|
422
|
+
init_esm_shims();
|
|
404
423
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
405
424
|
nodeModuleRef = null;
|
|
406
425
|
_nodePath = null;
|
|
@@ -452,6 +471,7 @@ var RING_BUFFER_SIZE, TelemetryCollector, _globalCollector;
|
|
|
452
471
|
var init_telemetry = __esm({
|
|
453
472
|
"packages/domain/shared/src/telemetry.ts"() {
|
|
454
473
|
"use strict";
|
|
474
|
+
init_esm_shims();
|
|
455
475
|
RING_BUFFER_SIZE = 100;
|
|
456
476
|
TelemetryCollector = class {
|
|
457
477
|
data = [];
|
|
@@ -555,6 +575,7 @@ var ScanCacheClassEntrySchema, ScanCacheSchema, TailwindContentItemSchema, Tailw
|
|
|
555
575
|
var init_configSchemas = __esm({
|
|
556
576
|
"packages/domain/shared/src/configSchemas.ts"() {
|
|
557
577
|
"use strict";
|
|
578
|
+
init_esm_shims();
|
|
558
579
|
ScanCacheClassEntrySchema = z2.object({
|
|
559
580
|
name: z2.string().min(1),
|
|
560
581
|
usedIn: z2.array(z2.string()),
|
|
@@ -646,11 +667,11 @@ function resolvePath(...segments) {
|
|
|
646
667
|
return segments.join("/").replace(/\/+/g, "/");
|
|
647
668
|
}
|
|
648
669
|
}
|
|
649
|
-
function existsSync(
|
|
670
|
+
function existsSync(path7) {
|
|
650
671
|
if (isBrowser2) return false;
|
|
651
672
|
try {
|
|
652
673
|
const nodeFs = __require(NODE_FS);
|
|
653
|
-
return nodeFs.existsSync(
|
|
674
|
+
return nodeFs.existsSync(path7);
|
|
654
675
|
} catch {
|
|
655
676
|
return false;
|
|
656
677
|
}
|
|
@@ -704,6 +725,7 @@ var isBrowser2, NODE_URL, NODE_FS, NODE_PATH;
|
|
|
704
725
|
var init_workerResolver = __esm({
|
|
705
726
|
"packages/domain/shared/src/workerResolver.ts"() {
|
|
706
727
|
"use strict";
|
|
728
|
+
init_esm_shims();
|
|
707
729
|
isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
|
|
708
730
|
NODE_URL = typeof window === "undefined" || typeof document === "undefined" ? "node:url" : null;
|
|
709
731
|
NODE_FS = typeof window === "undefined" || typeof document === "undefined" ? "node:fs" : null;
|
|
@@ -870,13 +892,23 @@ function generateBarrelFile(exports, dir, opts = {}) {
|
|
|
870
892
|
var init_codegen = __esm({
|
|
871
893
|
"packages/domain/shared/src/codegen.ts"() {
|
|
872
894
|
"use strict";
|
|
895
|
+
init_esm_shims();
|
|
873
896
|
}
|
|
874
897
|
});
|
|
875
898
|
|
|
876
899
|
// packages/domain/shared/src/native-resolution.ts
|
|
877
900
|
import { createRequire } from "module";
|
|
878
901
|
import * as fs from "fs";
|
|
879
|
-
import * as
|
|
902
|
+
import * as path2 from "path";
|
|
903
|
+
function _safeCreateRequire() {
|
|
904
|
+
if (typeof import.meta !== "undefined" && import.meta.url && !import.meta.url.includes("unknown")) {
|
|
905
|
+
return createRequire(import.meta.url);
|
|
906
|
+
}
|
|
907
|
+
if (typeof __filename !== "undefined") {
|
|
908
|
+
return createRequire(__filename);
|
|
909
|
+
}
|
|
910
|
+
return createRequire(new URL(`file://${process.cwd()}/`).href);
|
|
911
|
+
}
|
|
880
912
|
function platformKey() {
|
|
881
913
|
if (isBrowser3) return "browser";
|
|
882
914
|
return `${process.platform}-${process.arch}`;
|
|
@@ -912,11 +944,11 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
912
944
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
913
945
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
914
946
|
if (runtimeDir) {
|
|
915
|
-
for (const depth of ["..",
|
|
916
|
-
const pkgRoot =
|
|
947
|
+
for (const depth of ["..", path2.join("..", ".."), path2.join("..", "..", "..")]) {
|
|
948
|
+
const pkgRoot = path2.resolve(runtimeDir, depth);
|
|
917
949
|
for (const bin of BINARY_NAMES_SELF) {
|
|
918
950
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
919
|
-
const candidate =
|
|
951
|
+
const candidate = path2.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
920
952
|
tried.push(`self-bundled:${candidate}`);
|
|
921
953
|
if (fs.existsSync(candidate)) {
|
|
922
954
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
@@ -930,22 +962,22 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
930
962
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
931
963
|
const localCandidates = [];
|
|
932
964
|
for (const bin of BINARY_NAMES) {
|
|
933
|
-
localCandidates.push(
|
|
934
|
-
localCandidates.push(
|
|
935
|
-
localCandidates.push(
|
|
936
|
-
localCandidates.push(
|
|
965
|
+
localCandidates.push(path2.resolve(base, `${bin}.node`));
|
|
966
|
+
localCandidates.push(path2.resolve(base, "..", `${bin}.node`));
|
|
967
|
+
localCandidates.push(path2.resolve(base, `${bin}.${platform}.node`));
|
|
968
|
+
localCandidates.push(path2.resolve(base, `${bin}.${napiPlatform}.node`));
|
|
937
969
|
}
|
|
938
970
|
for (const startDir of [cwd, base]) {
|
|
939
971
|
let dir = startDir;
|
|
940
972
|
for (let i = 0; i < 6; i++) {
|
|
941
|
-
const nativeDir =
|
|
973
|
+
const nativeDir = path2.resolve(dir, "native");
|
|
942
974
|
for (const bin of BINARY_NAMES) {
|
|
943
|
-
localCandidates.push(
|
|
944
|
-
localCandidates.push(
|
|
945
|
-
localCandidates.push(
|
|
946
|
-
localCandidates.push(
|
|
975
|
+
localCandidates.push(path2.resolve(nativeDir, `${bin}.node`));
|
|
976
|
+
localCandidates.push(path2.resolve(nativeDir, `${bin}.${platform}.node`));
|
|
977
|
+
localCandidates.push(path2.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
|
|
978
|
+
localCandidates.push(path2.resolve(nativeDir, "target", "release", `${bin}.node`));
|
|
947
979
|
}
|
|
948
|
-
const parent =
|
|
980
|
+
const parent = path2.resolve(dir, "..");
|
|
949
981
|
if (parent === dir) break;
|
|
950
982
|
dir = parent;
|
|
951
983
|
}
|
|
@@ -976,10 +1008,9 @@ var isBrowser3, _require, PLATFORM_MAP;
|
|
|
976
1008
|
var init_native_resolution = __esm({
|
|
977
1009
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
978
1010
|
"use strict";
|
|
1011
|
+
init_esm_shims();
|
|
979
1012
|
isBrowser3 = typeof window !== "undefined" || typeof document !== "undefined";
|
|
980
|
-
_require =
|
|
981
|
-
typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
|
|
982
|
-
);
|
|
1013
|
+
_require = _safeCreateRequire();
|
|
983
1014
|
PLATFORM_MAP = {
|
|
984
1015
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
985
1016
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -994,9 +1025,9 @@ var init_native_resolution = __esm({
|
|
|
994
1025
|
// packages/domain/shared/src/observability.ts
|
|
995
1026
|
function createObservabilityClient(opts = {}) {
|
|
996
1027
|
const { baseUrl = "http://localhost:7421", timeoutMs = 3e3 } = opts;
|
|
997
|
-
async function fetchJson(
|
|
1028
|
+
async function fetchJson(path7) {
|
|
998
1029
|
try {
|
|
999
|
-
const res = await fetch(`${baseUrl}${
|
|
1030
|
+
const res = await fetch(`${baseUrl}${path7}`, {
|
|
1000
1031
|
signal: AbortSignal.timeout(timeoutMs)
|
|
1001
1032
|
});
|
|
1002
1033
|
if (!res.ok) return null;
|
|
@@ -1026,6 +1057,7 @@ function createObservabilityClient(opts = {}) {
|
|
|
1026
1057
|
var init_observability = __esm({
|
|
1027
1058
|
"packages/domain/shared/src/observability.ts"() {
|
|
1028
1059
|
"use strict";
|
|
1060
|
+
init_esm_shims();
|
|
1029
1061
|
}
|
|
1030
1062
|
});
|
|
1031
1063
|
|
|
@@ -1034,8 +1066,9 @@ var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttemp
|
|
|
1034
1066
|
var init_nativeBridge = __esm({
|
|
1035
1067
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
1036
1068
|
"use strict";
|
|
1069
|
+
init_esm_shims();
|
|
1037
1070
|
init_src2();
|
|
1038
|
-
_loadNative = (
|
|
1071
|
+
_loadNative = (path7) => __require(path7);
|
|
1039
1072
|
log = (...args) => {
|
|
1040
1073
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
1041
1074
|
console.log("[compiler:native]", ...args);
|
|
@@ -1174,6 +1207,7 @@ function resetCacheStats() {
|
|
|
1174
1207
|
var init_cssGeneratorNative = __esm({
|
|
1175
1208
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
1176
1209
|
"use strict";
|
|
1210
|
+
init_esm_shims();
|
|
1177
1211
|
init_nativeBridge();
|
|
1178
1212
|
}
|
|
1179
1213
|
});
|
|
@@ -1247,6 +1281,7 @@ function atomicRegistrySize() {
|
|
|
1247
1281
|
var init_compilationNative = __esm({
|
|
1248
1282
|
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
1249
1283
|
"use strict";
|
|
1284
|
+
init_esm_shims();
|
|
1250
1285
|
init_nativeBridge();
|
|
1251
1286
|
}
|
|
1252
1287
|
});
|
|
@@ -1391,6 +1426,7 @@ function twMergeRaw(classLists) {
|
|
|
1391
1426
|
var init_cssCompilationNative = __esm({
|
|
1392
1427
|
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
1393
1428
|
"use strict";
|
|
1429
|
+
init_esm_shims();
|
|
1394
1430
|
init_nativeBridge();
|
|
1395
1431
|
}
|
|
1396
1432
|
});
|
|
@@ -1491,6 +1527,7 @@ function idRegistryImport(importedData) {
|
|
|
1491
1527
|
var init_idRegistryNative = __esm({
|
|
1492
1528
|
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
1493
1529
|
"use strict";
|
|
1530
|
+
init_esm_shims();
|
|
1494
1531
|
init_nativeBridge();
|
|
1495
1532
|
}
|
|
1496
1533
|
});
|
|
@@ -1633,6 +1670,7 @@ function scanFilesBatchNative(filesJson) {
|
|
|
1633
1670
|
var init_streamingNative = __esm({
|
|
1634
1671
|
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
1635
1672
|
"use strict";
|
|
1673
|
+
init_esm_shims();
|
|
1636
1674
|
init_nativeBridge();
|
|
1637
1675
|
}
|
|
1638
1676
|
});
|
|
@@ -1685,6 +1723,7 @@ var require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
|
1685
1723
|
var init_tailwindEngine = __esm({
|
|
1686
1724
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
1687
1725
|
"use strict";
|
|
1726
|
+
init_esm_shims();
|
|
1688
1727
|
require2 = createRequire2(
|
|
1689
1728
|
typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
|
|
1690
1729
|
);
|
|
@@ -1874,6 +1913,7 @@ var require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEM
|
|
|
1874
1913
|
var init_tailwindEngine2 = __esm({
|
|
1875
1914
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1876
1915
|
"use strict";
|
|
1916
|
+
init_esm_shims();
|
|
1877
1917
|
init_nativeBridge();
|
|
1878
1918
|
init_cssGeneratorNative();
|
|
1879
1919
|
init_cssCompilationNative();
|
|
@@ -1893,6 +1933,7 @@ var init_tailwindEngine2 = __esm({
|
|
|
1893
1933
|
var init_compiler = __esm({
|
|
1894
1934
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
1895
1935
|
"use strict";
|
|
1936
|
+
init_esm_shims();
|
|
1896
1937
|
init_cssGeneratorNative();
|
|
1897
1938
|
init_compilationNative();
|
|
1898
1939
|
init_cssCompilationNative();
|
|
@@ -1906,6 +1947,7 @@ var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astEx
|
|
|
1906
1947
|
var init_parser = __esm({
|
|
1907
1948
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1908
1949
|
"use strict";
|
|
1950
|
+
init_esm_shims();
|
|
1909
1951
|
init_nativeBridge();
|
|
1910
1952
|
parseClasses = (raw) => {
|
|
1911
1953
|
const native = getNativeBridge();
|
|
@@ -2085,6 +2127,7 @@ function resetMemoryStats() {
|
|
|
2085
2127
|
var init_analyzerNative = __esm({
|
|
2086
2128
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
2087
2129
|
"use strict";
|
|
2130
|
+
init_esm_shims();
|
|
2088
2131
|
init_nativeBridge();
|
|
2089
2132
|
}
|
|
2090
2133
|
});
|
|
@@ -2179,6 +2222,7 @@ function resolveSimpleVariants(configJson) {
|
|
|
2179
2222
|
var init_themeResolutionNative = __esm({
|
|
2180
2223
|
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
2181
2224
|
"use strict";
|
|
2225
|
+
init_esm_shims();
|
|
2182
2226
|
init_nativeBridge();
|
|
2183
2227
|
}
|
|
2184
2228
|
});
|
|
@@ -2227,6 +2271,7 @@ function generateSubComponentTypes(root, outputPath) {
|
|
|
2227
2271
|
var init_scannerNative = __esm({
|
|
2228
2272
|
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
2229
2273
|
"use strict";
|
|
2274
|
+
init_esm_shims();
|
|
2230
2275
|
init_nativeBridge();
|
|
2231
2276
|
}
|
|
2232
2277
|
});
|
|
@@ -2235,6 +2280,7 @@ var init_scannerNative = __esm({
|
|
|
2235
2280
|
var init_analyzer = __esm({
|
|
2236
2281
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
2237
2282
|
"use strict";
|
|
2283
|
+
init_esm_shims();
|
|
2238
2284
|
init_analyzerNative();
|
|
2239
2285
|
init_themeResolutionNative();
|
|
2240
2286
|
init_scannerNative();
|
|
@@ -2424,6 +2470,7 @@ function resetResolverPoolStats() {
|
|
|
2424
2470
|
var init_cacheNative = __esm({
|
|
2425
2471
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
2426
2472
|
"use strict";
|
|
2473
|
+
init_esm_shims();
|
|
2427
2474
|
init_nativeBridge();
|
|
2428
2475
|
}
|
|
2429
2476
|
});
|
|
@@ -2432,6 +2479,7 @@ var init_cacheNative = __esm({
|
|
|
2432
2479
|
var init_cache = __esm({
|
|
2433
2480
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
2434
2481
|
"use strict";
|
|
2482
|
+
init_esm_shims();
|
|
2435
2483
|
init_cacheNative();
|
|
2436
2484
|
}
|
|
2437
2485
|
});
|
|
@@ -2681,6 +2729,7 @@ function redisDiagnose() {
|
|
|
2681
2729
|
var init_redisNative = __esm({
|
|
2682
2730
|
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
2683
2731
|
"use strict";
|
|
2732
|
+
init_esm_shims();
|
|
2684
2733
|
init_nativeBridge();
|
|
2685
2734
|
}
|
|
2686
2735
|
});
|
|
@@ -2689,6 +2738,7 @@ var init_redisNative = __esm({
|
|
|
2689
2738
|
var init_redis = __esm({
|
|
2690
2739
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
2691
2740
|
"use strict";
|
|
2741
|
+
init_esm_shims();
|
|
2692
2742
|
init_redisNative();
|
|
2693
2743
|
}
|
|
2694
2744
|
});
|
|
@@ -2828,6 +2878,7 @@ function getCompilerDiagnostics() {
|
|
|
2828
2878
|
var init_watchSystemNative = __esm({
|
|
2829
2879
|
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
2830
2880
|
"use strict";
|
|
2881
|
+
init_esm_shims();
|
|
2831
2882
|
init_nativeBridge();
|
|
2832
2883
|
}
|
|
2833
2884
|
});
|
|
@@ -2836,13 +2887,14 @@ var init_watchSystemNative = __esm({
|
|
|
2836
2887
|
var init_watch = __esm({
|
|
2837
2888
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
2838
2889
|
"use strict";
|
|
2890
|
+
init_esm_shims();
|
|
2839
2891
|
init_watchSystemNative();
|
|
2840
2892
|
}
|
|
2841
2893
|
});
|
|
2842
2894
|
|
|
2843
2895
|
// packages/domain/compiler/src/index.ts
|
|
2844
2896
|
import fs2 from "fs";
|
|
2845
|
-
import
|
|
2897
|
+
import path3 from "path";
|
|
2846
2898
|
import { createRequire as createRequire4 } from "module";
|
|
2847
2899
|
function _layoutClassesToCss(classes) {
|
|
2848
2900
|
const native = getNativeBridge();
|
|
@@ -2882,6 +2934,7 @@ var _require2, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess,
|
|
|
2882
2934
|
var init_src = __esm({
|
|
2883
2935
|
"packages/domain/compiler/src/index.ts"() {
|
|
2884
2936
|
"use strict";
|
|
2937
|
+
init_esm_shims();
|
|
2885
2938
|
init_nativeBridge();
|
|
2886
2939
|
init_compiler();
|
|
2887
2940
|
init_parser();
|
|
@@ -2983,7 +3036,7 @@ var init_src = __esm({
|
|
|
2983
3036
|
};
|
|
2984
3037
|
scanProjectUsage = (dirs, cwd) => {
|
|
2985
3038
|
const { batchExtractClasses: batchExtractClasses2 } = _require2("./parser");
|
|
2986
|
-
const files = dirs.map((dir) =>
|
|
3039
|
+
const files = dirs.map((dir) => path3.resolve(cwd, dir));
|
|
2987
3040
|
const results = batchExtractClasses2(files) || [];
|
|
2988
3041
|
const combined = {};
|
|
2989
3042
|
for (const result of results) {
|
|
@@ -3020,7 +3073,7 @@ var init_src = __esm({
|
|
|
3020
3073
|
"tailwind.config.cjs"
|
|
3021
3074
|
];
|
|
3022
3075
|
for (const file of configFiles) {
|
|
3023
|
-
const fullPath =
|
|
3076
|
+
const fullPath = path3.join(cwd, file);
|
|
3024
3077
|
if (fs2.existsSync(fullPath)) {
|
|
3025
3078
|
const mod = __require(fullPath);
|
|
3026
3079
|
return mod.default || mod;
|
|
@@ -3031,9 +3084,9 @@ var init_src = __esm({
|
|
|
3031
3084
|
getContentPaths = (cwd = process.cwd()) => {
|
|
3032
3085
|
return {
|
|
3033
3086
|
content: [
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3087
|
+
path3.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
3088
|
+
path3.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
3089
|
+
path3.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
3037
3090
|
]
|
|
3038
3091
|
};
|
|
3039
3092
|
};
|
|
@@ -3448,6 +3501,7 @@ __export(internal_exports, {
|
|
|
3448
3501
|
var init_internal = __esm({
|
|
3449
3502
|
"packages/domain/compiler/src/internal.ts"() {
|
|
3450
3503
|
"use strict";
|
|
3504
|
+
init_esm_shims();
|
|
3451
3505
|
init_src();
|
|
3452
3506
|
init_tailwindEngine2();
|
|
3453
3507
|
init_compiler();
|
|
@@ -3461,7 +3515,7 @@ var init_internal = __esm({
|
|
|
3461
3515
|
|
|
3462
3516
|
// packages/domain/shared/src/staticStateExtractor.ts
|
|
3463
3517
|
import fs3 from "fs";
|
|
3464
|
-
import
|
|
3518
|
+
import path4 from "path";
|
|
3465
3519
|
function getNative() {
|
|
3466
3520
|
if (_native) return _native;
|
|
3467
3521
|
try {
|
|
@@ -3496,12 +3550,12 @@ function* walkSourceFiles(dir) {
|
|
|
3496
3550
|
return;
|
|
3497
3551
|
}
|
|
3498
3552
|
for (const entry of entries) {
|
|
3499
|
-
const fullPath =
|
|
3553
|
+
const fullPath = path4.join(dir, entry.name);
|
|
3500
3554
|
if (entry.isDirectory()) {
|
|
3501
3555
|
if (IGNORE_PATTERNS.some((p) => entry.name === p || entry.name.startsWith(p))) continue;
|
|
3502
3556
|
yield* walkSourceFiles(fullPath);
|
|
3503
3557
|
} else if (entry.isFile()) {
|
|
3504
|
-
const ext =
|
|
3558
|
+
const ext = path4.extname(entry.name);
|
|
3505
3559
|
if (SOURCE_EXTENSIONS.has(ext)) yield fullPath;
|
|
3506
3560
|
}
|
|
3507
3561
|
}
|
|
@@ -3565,7 +3619,7 @@ function extractStaticStateCss(srcDir, options = {}) {
|
|
|
3565
3619
|
allConfigs.push(...configs);
|
|
3566
3620
|
if (verbose) {
|
|
3567
3621
|
process.stderr.write(
|
|
3568
|
-
`[tw:static-state] ${
|
|
3622
|
+
`[tw:static-state] ${path4.relative(srcDir, filePath)}: ${configs.length} komponen
|
|
3569
3623
|
`
|
|
3570
3624
|
);
|
|
3571
3625
|
}
|
|
@@ -3589,7 +3643,7 @@ function extractStaticStateCss(srcDir, options = {}) {
|
|
|
3589
3643
|
allConfigs.push(...configs);
|
|
3590
3644
|
if (verbose) {
|
|
3591
3645
|
process.stderr.write(
|
|
3592
|
-
`[tw:static-state] ${
|
|
3646
|
+
`[tw:static-state] ${path4.relative(srcDir, filePath)}: ${configs.length} komponen
|
|
3593
3647
|
`
|
|
3594
3648
|
);
|
|
3595
3649
|
}
|
|
@@ -3683,9 +3737,9 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
|
|
|
3683
3737
|
resolvedCss: options.resolvedCss || ""
|
|
3684
3738
|
// ← ensure always passed
|
|
3685
3739
|
});
|
|
3686
|
-
const twClassesDir =
|
|
3740
|
+
const twClassesDir = path4.join(path4.dirname(safelistPath), "tw-classes");
|
|
3687
3741
|
fs3.mkdirSync(twClassesDir, { recursive: true });
|
|
3688
|
-
const stateFilePath =
|
|
3742
|
+
const stateFilePath = path4.join(twClassesDir, TW_STATE_STATIC_FILENAME);
|
|
3689
3743
|
if (result.rulesGenerated === 0) {
|
|
3690
3744
|
try {
|
|
3691
3745
|
fs3.writeFileSync(
|
|
@@ -3714,6 +3768,7 @@ var SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native, TW_STATE_STATIC_FILENAME;
|
|
|
3714
3768
|
var init_staticStateExtractor = __esm({
|
|
3715
3769
|
"packages/domain/shared/src/staticStateExtractor.ts"() {
|
|
3716
3770
|
"use strict";
|
|
3771
|
+
init_esm_shims();
|
|
3717
3772
|
SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs"]);
|
|
3718
3773
|
IGNORE_PATTERNS = ["node_modules", ".next", "dist", "build", ".git", "coverage", "__tests__"];
|
|
3719
3774
|
_native = null;
|
|
@@ -3723,7 +3778,7 @@ var init_staticStateExtractor = __esm({
|
|
|
3723
3778
|
|
|
3724
3779
|
// packages/domain/shared/src/logger.ts
|
|
3725
3780
|
import fs4 from "fs";
|
|
3726
|
-
import
|
|
3781
|
+
import path5 from "path";
|
|
3727
3782
|
function getEnvLevel() {
|
|
3728
3783
|
const env = process.env.TWS_LOG_LEVEL?.toLowerCase();
|
|
3729
3784
|
if (env && env in LEVELS) return env;
|
|
@@ -3733,7 +3788,7 @@ function setGlobalLogFile(filePath) {
|
|
|
3733
3788
|
_globalLogFile = filePath;
|
|
3734
3789
|
_logFileInitialized = false;
|
|
3735
3790
|
try {
|
|
3736
|
-
fs4.mkdirSync(
|
|
3791
|
+
fs4.mkdirSync(path5.dirname(filePath), { recursive: true });
|
|
3737
3792
|
fs4.writeFileSync(
|
|
3738
3793
|
filePath,
|
|
3739
3794
|
`# tailwind-styled build log \u2014 ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
@@ -3778,6 +3833,7 @@ var LEVELS, _globalLogFile, _logFileInitialized, logger;
|
|
|
3778
3833
|
var init_logger = __esm({
|
|
3779
3834
|
"packages/domain/shared/src/logger.ts"() {
|
|
3780
3835
|
"use strict";
|
|
3836
|
+
init_esm_shims();
|
|
3781
3837
|
LEVELS = { silent: 0, error: 1, warn: 2, info: 3, debug: 4 };
|
|
3782
3838
|
_globalLogFile = null;
|
|
3783
3839
|
_logFileInitialized = false;
|
|
@@ -3788,8 +3844,8 @@ var init_logger = __esm({
|
|
|
3788
3844
|
// packages/domain/shared/src/index.ts
|
|
3789
3845
|
import { createHash } from "crypto";
|
|
3790
3846
|
import fs5 from "fs";
|
|
3791
|
-
import
|
|
3792
|
-
import { fileURLToPath } from "url";
|
|
3847
|
+
import path6 from "path";
|
|
3848
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
3793
3849
|
import { createRequire as createRequire5 } from "module";
|
|
3794
3850
|
function createLogger2(namespace) {
|
|
3795
3851
|
const prefix = `[${namespace}]`;
|
|
@@ -3820,9 +3876,9 @@ function createDebugLogger(namespace, label) {
|
|
|
3820
3876
|
}
|
|
3821
3877
|
};
|
|
3822
3878
|
}
|
|
3823
|
-
function formatIssuePath(
|
|
3824
|
-
if (!
|
|
3825
|
-
return
|
|
3879
|
+
function formatIssuePath(path7) {
|
|
3880
|
+
if (!path7 || path7.length === 0) return "(root)";
|
|
3881
|
+
return path7.map(
|
|
3826
3882
|
(segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
|
|
3827
3883
|
).join(".");
|
|
3828
3884
|
}
|
|
@@ -3836,7 +3892,7 @@ function loadNativeBinding(options) {
|
|
|
3836
3892
|
const { runtimeDir, candidates, isValid } = options;
|
|
3837
3893
|
const loadErrors = [];
|
|
3838
3894
|
for (const candidate of candidates) {
|
|
3839
|
-
const candidatePath =
|
|
3895
|
+
const candidatePath = path6.resolve(runtimeDir, candidate);
|
|
3840
3896
|
try {
|
|
3841
3897
|
if (!fs5.existsSync(candidatePath) && !fs5.existsSync(candidatePath + ".node")) {
|
|
3842
3898
|
continue;
|
|
@@ -3881,22 +3937,22 @@ function resolveNativeBindingCandidates(options) {
|
|
|
3881
3937
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
3882
3938
|
const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
|
|
3883
3939
|
for (const bin of BINARY_NAMES) {
|
|
3884
|
-
candidates.push(
|
|
3885
|
-
candidates.push(
|
|
3886
|
-
candidates.push(
|
|
3887
|
-
candidates.push(
|
|
3888
|
-
candidates.push(
|
|
3889
|
-
candidates.push(
|
|
3890
|
-
candidates.push(
|
|
3891
|
-
candidates.push(
|
|
3892
|
-
candidates.push(
|
|
3940
|
+
candidates.push(path6.resolve(runtimeDir, `${bin}.node`));
|
|
3941
|
+
candidates.push(path6.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
|
|
3942
|
+
candidates.push(path6.resolve(runtimeDir, "..", "native", `${bin}.node`));
|
|
3943
|
+
candidates.push(path6.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
|
|
3944
|
+
candidates.push(path6.resolve(process.cwd(), "native", `${bin}.node`));
|
|
3945
|
+
candidates.push(path6.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
|
|
3946
|
+
candidates.push(path6.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
|
|
3947
|
+
candidates.push(path6.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
|
|
3948
|
+
candidates.push(path6.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
|
|
3893
3949
|
}
|
|
3894
3950
|
return Array.from(new Set(candidates));
|
|
3895
3951
|
}
|
|
3896
3952
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
3897
|
-
if (dir) return
|
|
3953
|
+
if (dir) return path6.resolve(dir);
|
|
3898
3954
|
try {
|
|
3899
|
-
return
|
|
3955
|
+
return path6.dirname(fileURLToPath2(importMetaUrl));
|
|
3900
3956
|
} catch {
|
|
3901
3957
|
return process.cwd();
|
|
3902
3958
|
}
|
|
@@ -3914,6 +3970,7 @@ var TwError, _require3, LRUCache;
|
|
|
3914
3970
|
var init_src2 = __esm({
|
|
3915
3971
|
"packages/domain/shared/src/index.ts"() {
|
|
3916
3972
|
"use strict";
|
|
3973
|
+
init_esm_shims();
|
|
3917
3974
|
init_trace();
|
|
3918
3975
|
init_error_codes();
|
|
3919
3976
|
init_compatibility();
|
|
@@ -3960,8 +4017,8 @@ var init_src2 = __esm({
|
|
|
3960
4017
|
/** Buat TwError dari ZodError — dukung shape Zod v3 (`errors`) dan v4 (`issues`). */
|
|
3961
4018
|
static fromZod(err) {
|
|
3962
4019
|
const first = err.issues?.[0] ?? err.errors?.[0];
|
|
3963
|
-
const
|
|
3964
|
-
const message = first ? `${
|
|
4020
|
+
const path7 = formatIssuePath(first?.path);
|
|
4021
|
+
const message = first ? `${path7}: ${first.message}` : "Schema validation failed";
|
|
3965
4022
|
return new _TwError("validation", "SCHEMA_VALIDATION_FAILED", message, err);
|
|
3966
4023
|
}
|
|
3967
4024
|
static wrap(source, code, err) {
|
|
@@ -4027,6 +4084,7 @@ var init_src2 = __esm({
|
|
|
4027
4084
|
});
|
|
4028
4085
|
|
|
4029
4086
|
// src/umbrella/shared.ts
|
|
4087
|
+
init_esm_shims();
|
|
4030
4088
|
init_src2();
|
|
4031
4089
|
export {
|
|
4032
4090
|
ERROR_CODES,
|
|
@@ -4069,8 +4127,8 @@ export {
|
|
|
4069
4127
|
generateComponentCode,
|
|
4070
4128
|
generateStorybookStory,
|
|
4071
4129
|
getBuildTimeColor,
|
|
4072
|
-
getDirname,
|
|
4073
|
-
getFilename,
|
|
4130
|
+
getDirname2 as getDirname,
|
|
4131
|
+
getFilename2 as getFilename,
|
|
4074
4132
|
getGlobalTelemetry,
|
|
4075
4133
|
getHealthColor,
|
|
4076
4134
|
getMemoryColor,
|