tailwind-styled-v4 5.0.36 → 5.0.38
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.d.mts +152 -5
- package/dist/analyzer.d.ts +152 -5
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +118 -82
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.d.mts +30 -3
- package/dist/animate.d.ts +30 -3
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +28 -14
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +105 -68
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +40 -13
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +577 -426
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +466 -304
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +5 -0
- package/dist/compiler.d.ts +5 -0
- package/dist/compiler.js +826 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +287 -29
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +71 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.d.mts +88 -2
- package/dist/devtools.d.ts +88 -2
- package/dist/devtools.js +333 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +26 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.d.mts +557 -6
- package/dist/engine.d.ts +557 -6
- package/dist/engine.js +679 -502
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +467 -307
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +180 -127
- package/dist/index.d.ts +180 -127
- package/dist/index.js +1329 -7441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1266 -7385
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +318 -243
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +256 -181
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.d.mts +4 -2
- package/dist/plugin-api.d.ts +4 -2
- package/dist/plugin-api.js +93 -49
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-api.mjs +26 -6
- package/dist/plugin-api.mjs.map +1 -1
- package/dist/plugin-registry.js +103 -62
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +53 -35
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.d.mts +165 -5
- package/dist/plugin.d.ts +165 -5
- package/dist/plugin.js +115 -50
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +44 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +47 -15
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +13 -5
- package/dist/preset.mjs.map +1 -1
- package/dist/rspack.js +82 -50
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +20 -12
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +62 -24
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +15 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/runtime.d.mts +38 -3
- package/dist/runtime.d.ts +38 -3
- package/dist/runtime.js +97 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.mts +58 -4
- package/dist/scanner.d.ts +58 -4
- package/dist/scanner.js +163 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +67 -39
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +185 -3
- package/dist/shared.d.ts +185 -3
- package/dist/shared.js +441 -295
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +253 -122
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.d.mts +2 -2
- package/dist/storybook-addon.d.ts +2 -2
- package/dist/storybook-addon.js +39 -10
- package/dist/storybook-addon.js.map +1 -1
- package/dist/storybook-addon.mjs +8 -3
- package/dist/storybook-addon.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -1
- package/dist/svelte.d.ts +2 -1
- package/dist/svelte.js +88 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +28 -13
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +68 -37
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +8 -7
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +55 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.d.mts +38 -3
- package/dist/theme.d.ts +38 -3
- package/dist/theme.js +131 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +42 -13
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +150 -116
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +124 -81
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +560 -421
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +460 -302
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +561 -446
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +433 -321
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.d.mts +4 -1
- package/dist/vue.d.ts +4 -1
- package/dist/vue.js +95 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +30 -14
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +110 -78
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +45 -17
- 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 +3 -1
- package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
- package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
- package/dist/index-DQI6O24n.d.mts +0 -464
- package/dist/index-NDINUhLN.d.mts +0 -90
- package/dist/index-NDINUhLN.d.ts +0 -90
- package/dist/index-UkYbyBkR.d.ts +0 -464
- package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
- package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
- package/dist/schemas-DR-SLxZZ.d.mts +0 -59
- package/dist/schemas-DR-SLxZZ.d.ts +0 -59
- package/dist/trace-Dz4vmZdy.d.mts +0 -96
- package/dist/trace-Dz4vmZdy.d.ts +0 -96
- package/dist/types-DXr2PmGP.d.mts +0 -31
- package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/compiler.mjs
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import { createRequire } from 'module';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import fs__default from 'fs';
|
|
4
|
-
import * as path from 'path';
|
|
5
|
-
import path__default from 'path';
|
|
6
|
-
import 'crypto';
|
|
7
|
-
import { fileURLToPath } from 'url';
|
|
8
|
-
|
|
9
1
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
10
2
|
var __defProp = Object.defineProperty;
|
|
11
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -22,6 +14,11 @@ var __export = (target, all) => {
|
|
|
22
14
|
for (var name in all)
|
|
23
15
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
24
16
|
};
|
|
17
|
+
|
|
18
|
+
// packages/domain/shared/src/native-resolution.ts
|
|
19
|
+
import { createRequire } from "module";
|
|
20
|
+
import * as fs from "fs";
|
|
21
|
+
import * as path from "path";
|
|
25
22
|
function platformKey() {
|
|
26
23
|
if (isBrowser) return "browser";
|
|
27
24
|
return `${process.platform}-${process.arch}`;
|
|
@@ -106,6 +103,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
106
103
|
var isBrowser, _require, PLATFORM_MAP;
|
|
107
104
|
var init_native_resolution = __esm({
|
|
108
105
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
106
|
+
"use strict";
|
|
109
107
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
110
108
|
_require = typeof __require !== "undefined" ? __require : createRequire(import.meta.url);
|
|
111
109
|
PLATFORM_MAP = {
|
|
@@ -118,17 +116,27 @@ var init_native_resolution = __esm({
|
|
|
118
116
|
};
|
|
119
117
|
}
|
|
120
118
|
});
|
|
119
|
+
|
|
120
|
+
// packages/domain/shared/src/index.ts
|
|
121
|
+
import { createHash } from "crypto";
|
|
122
|
+
import fs2 from "fs";
|
|
123
|
+
import path2 from "path";
|
|
124
|
+
import { fileURLToPath } from "url";
|
|
125
|
+
import { createRequire as createRequire2 } from "module";
|
|
121
126
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
127
|
+
if (dir) return path2.resolve(dir);
|
|
122
128
|
try {
|
|
123
|
-
return
|
|
129
|
+
return path2.dirname(fileURLToPath(importMetaUrl));
|
|
124
130
|
} catch {
|
|
125
131
|
return process.cwd();
|
|
126
132
|
}
|
|
127
133
|
}
|
|
134
|
+
var _require2;
|
|
128
135
|
var init_src = __esm({
|
|
129
136
|
"packages/domain/shared/src/index.ts"() {
|
|
137
|
+
"use strict";
|
|
130
138
|
init_native_resolution();
|
|
131
|
-
|
|
139
|
+
_require2 = createRequire2(import.meta.url);
|
|
132
140
|
}
|
|
133
141
|
});
|
|
134
142
|
|
|
@@ -136,6 +144,7 @@ var init_src = __esm({
|
|
|
136
144
|
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, resetNativeBridgeCache, adaptNativeResult;
|
|
137
145
|
var init_nativeBridge = __esm({
|
|
138
146
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
147
|
+
"use strict";
|
|
139
148
|
init_src();
|
|
140
149
|
_loadNative = (path4) => __require(path4);
|
|
141
150
|
log = (...args) => {
|
|
@@ -293,6 +302,7 @@ function resetCacheStats() {
|
|
|
293
302
|
}
|
|
294
303
|
var init_cssGeneratorNative = __esm({
|
|
295
304
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
305
|
+
"use strict";
|
|
296
306
|
init_nativeBridge();
|
|
297
307
|
}
|
|
298
308
|
});
|
|
@@ -365,6 +375,7 @@ function atomicRegistrySize() {
|
|
|
365
375
|
}
|
|
366
376
|
var init_compilationNative = __esm({
|
|
367
377
|
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
378
|
+
"use strict";
|
|
368
379
|
init_nativeBridge();
|
|
369
380
|
}
|
|
370
381
|
});
|
|
@@ -508,6 +519,7 @@ function twMergeRaw(classLists) {
|
|
|
508
519
|
}
|
|
509
520
|
var init_cssCompilationNative = __esm({
|
|
510
521
|
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
522
|
+
"use strict";
|
|
511
523
|
init_nativeBridge();
|
|
512
524
|
}
|
|
513
525
|
});
|
|
@@ -607,6 +619,7 @@ function idRegistryImport(importedData) {
|
|
|
607
619
|
}
|
|
608
620
|
var init_idRegistryNative = __esm({
|
|
609
621
|
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
622
|
+
"use strict";
|
|
610
623
|
init_nativeBridge();
|
|
611
624
|
}
|
|
612
625
|
});
|
|
@@ -748,9 +761,13 @@ function scanFilesBatchNative(filesJson) {
|
|
|
748
761
|
}
|
|
749
762
|
var init_streamingNative = __esm({
|
|
750
763
|
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
764
|
+
"use strict";
|
|
751
765
|
init_nativeBridge();
|
|
752
766
|
}
|
|
753
767
|
});
|
|
768
|
+
|
|
769
|
+
// packages/domain/compiler/src/tailwindEngine.ts
|
|
770
|
+
import { createRequire as createRequire3 } from "module";
|
|
754
771
|
function loadTailwindEngine() {
|
|
755
772
|
if (_twEngine) return _twEngine;
|
|
756
773
|
if (_twEngineError) throw _twEngineError;
|
|
@@ -770,10 +787,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
770
787
|
if (classes.length === 0) return "";
|
|
771
788
|
const tw = loadTailwindEngine();
|
|
772
789
|
const input = cssEntryContent ?? "@import 'tailwindcss';";
|
|
773
|
-
const { readFileSync, existsSync: existsSync2 } = await import(
|
|
774
|
-
const { dirname, resolve: resolve2 } = await import(
|
|
790
|
+
const { readFileSync, existsSync: existsSync2 } = await import("fs");
|
|
791
|
+
const { dirname, resolve: resolve2 } = await import("path");
|
|
775
792
|
const projectRoot = root ?? process.cwd();
|
|
776
|
-
const req =
|
|
793
|
+
const req = createRequire3(resolve2(projectRoot, "package.json"));
|
|
777
794
|
const loadStylesheet = async (id, base) => {
|
|
778
795
|
try {
|
|
779
796
|
const cssId = id === "tailwindcss" ? "tailwindcss/index.css" : id === "tailwindcss/preflight" ? "tailwindcss/preflight.css" : id === "tailwindcss/utilities" ? "tailwindcss/utilities.css" : id === "tailwindcss/theme" ? "tailwindcss/theme.css" : id;
|
|
@@ -793,10 +810,12 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
793
810
|
const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
|
|
794
811
|
return compiler.build(classes);
|
|
795
812
|
}
|
|
796
|
-
var require2, _twEngine, _twEngineError;
|
|
813
|
+
var require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
797
814
|
var init_tailwindEngine = __esm({
|
|
798
815
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
799
|
-
|
|
816
|
+
"use strict";
|
|
817
|
+
require2 = createRequire3(import.meta.url);
|
|
818
|
+
MAX_CACHE_MEMORY = 256 * 1024;
|
|
800
819
|
_twEngine = null;
|
|
801
820
|
_twEngineError = null;
|
|
802
821
|
}
|
|
@@ -811,6 +830,7 @@ __export(tailwindEngine_exports, {
|
|
|
811
830
|
runCssPipeline: () => runCssPipeline,
|
|
812
831
|
runCssPipelineSync: () => runCssPipelineSync
|
|
813
832
|
});
|
|
833
|
+
import { createRequire as createRequire4 } from "module";
|
|
814
834
|
function _getCacheKey(classes, minify, cssEntry, root) {
|
|
815
835
|
const sorted = [...classes].sort().join(",");
|
|
816
836
|
const flags = `${minify ? "1" : "0"}${cssEntry ? "1" : "0"}${root ? "1" : "0"}`;
|
|
@@ -977,24 +997,27 @@ function processTailwindCssWithTargets(css, targets) {
|
|
|
977
997
|
}
|
|
978
998
|
return result.css;
|
|
979
999
|
}
|
|
980
|
-
var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
|
|
1000
|
+
var require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
|
|
981
1001
|
var init_tailwindEngine2 = __esm({
|
|
982
1002
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1003
|
+
"use strict";
|
|
983
1004
|
init_nativeBridge();
|
|
984
1005
|
init_cssGeneratorNative();
|
|
985
1006
|
init_cssCompilationNative();
|
|
986
1007
|
init_tailwindEngine();
|
|
987
|
-
|
|
1008
|
+
require3 = createRequire4(import.meta.url);
|
|
988
1009
|
_cssCache = /* @__PURE__ */ new Map();
|
|
989
1010
|
_cacheHits = 0;
|
|
990
1011
|
_cacheMisses = 0;
|
|
991
1012
|
MAX_CACHE_SIZE = 100;
|
|
1013
|
+
MAX_CACHE_MEMORY2 = 256 * 1024;
|
|
992
1014
|
}
|
|
993
1015
|
});
|
|
994
1016
|
|
|
995
1017
|
// packages/domain/compiler/src/compiler/index.ts
|
|
996
1018
|
var init_compiler = __esm({
|
|
997
1019
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
1020
|
+
"use strict";
|
|
998
1021
|
init_cssGeneratorNative();
|
|
999
1022
|
init_compilationNative();
|
|
1000
1023
|
init_cssCompilationNative();
|
|
@@ -1008,6 +1031,7 @@ var init_compiler = __esm({
|
|
|
1008
1031
|
var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1009
1032
|
var init_parser = __esm({
|
|
1010
1033
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1034
|
+
"use strict";
|
|
1011
1035
|
init_nativeBridge();
|
|
1012
1036
|
parseClasses = (raw) => {
|
|
1013
1037
|
const native = getNativeBridge();
|
|
@@ -1186,6 +1210,7 @@ function resetMemoryStats() {
|
|
|
1186
1210
|
}
|
|
1187
1211
|
var init_analyzerNative = __esm({
|
|
1188
1212
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
1213
|
+
"use strict";
|
|
1189
1214
|
init_nativeBridge();
|
|
1190
1215
|
}
|
|
1191
1216
|
});
|
|
@@ -1279,6 +1304,7 @@ function resolveSimpleVariants(configJson) {
|
|
|
1279
1304
|
}
|
|
1280
1305
|
var init_themeResolutionNative = __esm({
|
|
1281
1306
|
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
1307
|
+
"use strict";
|
|
1282
1308
|
init_nativeBridge();
|
|
1283
1309
|
}
|
|
1284
1310
|
});
|
|
@@ -1326,6 +1352,7 @@ function generateSubComponentTypes(root, outputPath) {
|
|
|
1326
1352
|
}
|
|
1327
1353
|
var init_scannerNative = __esm({
|
|
1328
1354
|
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
1355
|
+
"use strict";
|
|
1329
1356
|
init_nativeBridge();
|
|
1330
1357
|
}
|
|
1331
1358
|
});
|
|
@@ -1333,6 +1360,7 @@ var init_scannerNative = __esm({
|
|
|
1333
1360
|
// packages/domain/compiler/src/analyzer/index.ts
|
|
1334
1361
|
var init_analyzer = __esm({
|
|
1335
1362
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
1363
|
+
"use strict";
|
|
1336
1364
|
init_analyzerNative();
|
|
1337
1365
|
init_themeResolutionNative();
|
|
1338
1366
|
init_scannerNative();
|
|
@@ -1521,6 +1549,7 @@ function resetResolverPoolStats() {
|
|
|
1521
1549
|
}
|
|
1522
1550
|
var init_cacheNative = __esm({
|
|
1523
1551
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
1552
|
+
"use strict";
|
|
1524
1553
|
init_nativeBridge();
|
|
1525
1554
|
}
|
|
1526
1555
|
});
|
|
@@ -1528,6 +1557,7 @@ var init_cacheNative = __esm({
|
|
|
1528
1557
|
// packages/domain/compiler/src/cache/index.ts
|
|
1529
1558
|
var init_cache = __esm({
|
|
1530
1559
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
1560
|
+
"use strict";
|
|
1531
1561
|
init_cacheNative();
|
|
1532
1562
|
}
|
|
1533
1563
|
});
|
|
@@ -1776,6 +1806,7 @@ function redisDiagnose() {
|
|
|
1776
1806
|
}
|
|
1777
1807
|
var init_redisNative = __esm({
|
|
1778
1808
|
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
1809
|
+
"use strict";
|
|
1779
1810
|
init_nativeBridge();
|
|
1780
1811
|
}
|
|
1781
1812
|
});
|
|
@@ -1783,6 +1814,7 @@ var init_redisNative = __esm({
|
|
|
1783
1814
|
// packages/domain/compiler/src/redis/index.ts
|
|
1784
1815
|
var init_redis = __esm({
|
|
1785
1816
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
1817
|
+
"use strict";
|
|
1786
1818
|
init_redisNative();
|
|
1787
1819
|
}
|
|
1788
1820
|
});
|
|
@@ -1921,6 +1953,7 @@ function getCompilerDiagnostics() {
|
|
|
1921
1953
|
}
|
|
1922
1954
|
var init_watchSystemNative = __esm({
|
|
1923
1955
|
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
1956
|
+
"use strict";
|
|
1924
1957
|
init_nativeBridge();
|
|
1925
1958
|
}
|
|
1926
1959
|
});
|
|
@@ -1928,9 +1961,15 @@ var init_watchSystemNative = __esm({
|
|
|
1928
1961
|
// packages/domain/compiler/src/watch/index.ts
|
|
1929
1962
|
var init_watch = __esm({
|
|
1930
1963
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
1964
|
+
"use strict";
|
|
1931
1965
|
init_watchSystemNative();
|
|
1932
1966
|
}
|
|
1933
1967
|
});
|
|
1968
|
+
|
|
1969
|
+
// packages/domain/compiler/src/index.ts
|
|
1970
|
+
import fs3 from "fs";
|
|
1971
|
+
import path3 from "path";
|
|
1972
|
+
import { createRequire as createRequire5 } from "module";
|
|
1934
1973
|
function _layoutClassesToCss(classes) {
|
|
1935
1974
|
const native = getNativeBridge();
|
|
1936
1975
|
if (!native?.layoutClassesToCss) {
|
|
@@ -1968,6 +2007,7 @@ function extractContainerCssFromSource(source) {
|
|
|
1968
2007
|
var _require3, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, BucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
1969
2008
|
var init_src2 = __esm({
|
|
1970
2009
|
"packages/domain/compiler/src/index.ts"() {
|
|
2010
|
+
"use strict";
|
|
1971
2011
|
init_nativeBridge();
|
|
1972
2012
|
init_compiler();
|
|
1973
2013
|
init_parser();
|
|
@@ -1975,7 +2015,7 @@ var init_src2 = __esm({
|
|
|
1975
2015
|
init_cache();
|
|
1976
2016
|
init_redis();
|
|
1977
2017
|
init_watch();
|
|
1978
|
-
_require3 =
|
|
2018
|
+
_require3 = createRequire5(import.meta.url);
|
|
1979
2019
|
transformSource = (source, opts) => {
|
|
1980
2020
|
const native = getNativeBridge();
|
|
1981
2021
|
if (!native?.transformSource) {
|
|
@@ -2067,7 +2107,7 @@ var init_src2 = __esm({
|
|
|
2067
2107
|
};
|
|
2068
2108
|
scanProjectUsage = (dirs, cwd) => {
|
|
2069
2109
|
const { batchExtractClasses: batchExtractClasses2 } = _require3("./parser");
|
|
2070
|
-
const files = dirs.map((dir) =>
|
|
2110
|
+
const files = dirs.map((dir) => path3.resolve(cwd, dir));
|
|
2071
2111
|
const results = batchExtractClasses2(files) || [];
|
|
2072
2112
|
const combined = {};
|
|
2073
2113
|
for (const result of results) {
|
|
@@ -2084,13 +2124,13 @@ var init_src2 = __esm({
|
|
|
2084
2124
|
const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
|
|
2085
2125
|
const allClasses = Object.keys(classes).sort();
|
|
2086
2126
|
if (outputPath) {
|
|
2087
|
-
|
|
2127
|
+
fs3.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
2088
2128
|
}
|
|
2089
2129
|
return allClasses;
|
|
2090
2130
|
};
|
|
2091
2131
|
loadSafelist = (safelistPath) => {
|
|
2092
2132
|
try {
|
|
2093
|
-
const content =
|
|
2133
|
+
const content = fs3.readFileSync(safelistPath, "utf-8");
|
|
2094
2134
|
return JSON.parse(content);
|
|
2095
2135
|
} catch {
|
|
2096
2136
|
return [];
|
|
@@ -2104,8 +2144,8 @@ var init_src2 = __esm({
|
|
|
2104
2144
|
"tailwind.config.cjs"
|
|
2105
2145
|
];
|
|
2106
2146
|
for (const file of configFiles) {
|
|
2107
|
-
const fullPath =
|
|
2108
|
-
if (
|
|
2147
|
+
const fullPath = path3.join(cwd, file);
|
|
2148
|
+
if (fs3.existsSync(fullPath)) {
|
|
2109
2149
|
const mod = __require(fullPath);
|
|
2110
2150
|
return mod.default || mod;
|
|
2111
2151
|
}
|
|
@@ -2115,9 +2155,9 @@ var init_src2 = __esm({
|
|
|
2115
2155
|
getContentPaths = (cwd = process.cwd()) => {
|
|
2116
2156
|
return {
|
|
2117
2157
|
content: [
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2158
|
+
path3.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
2159
|
+
path3.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
2160
|
+
path3.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
2121
2161
|
]
|
|
2122
2162
|
};
|
|
2123
2163
|
};
|
|
@@ -2314,7 +2354,225 @@ ${source}`;
|
|
|
2314
2354
|
|
|
2315
2355
|
// src/umbrella/compiler.ts
|
|
2316
2356
|
init_src2();
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2357
|
+
export {
|
|
2358
|
+
BucketEngine,
|
|
2359
|
+
IncrementalEngine,
|
|
2360
|
+
adaptNativeResult,
|
|
2361
|
+
analyzeClassUsageNative,
|
|
2362
|
+
analyzeClasses,
|
|
2363
|
+
analyzeClassesNative,
|
|
2364
|
+
analyzeFile,
|
|
2365
|
+
analyzeRscNative,
|
|
2366
|
+
analyzeVariantUsage,
|
|
2367
|
+
astExtractClasses,
|
|
2368
|
+
atomicRegistrySize,
|
|
2369
|
+
batchExtractClasses,
|
|
2370
|
+
batchExtractClassesNative,
|
|
2371
|
+
bucketSort,
|
|
2372
|
+
buildStyleTag,
|
|
2373
|
+
cachePriority,
|
|
2374
|
+
cacheRead,
|
|
2375
|
+
cacheWrite,
|
|
2376
|
+
checkAgainstSafelist,
|
|
2377
|
+
checkAgainstSafelistNative,
|
|
2378
|
+
classifyAndSortClassesNative,
|
|
2379
|
+
classifyNode,
|
|
2380
|
+
clearAllCaches,
|
|
2381
|
+
clearAtomicRegistry,
|
|
2382
|
+
clearCompileCache,
|
|
2383
|
+
clearCssGenCache,
|
|
2384
|
+
clearParseCache,
|
|
2385
|
+
clearResolveCache,
|
|
2386
|
+
clearResolverPool,
|
|
2387
|
+
clearThemeCache,
|
|
2388
|
+
collectFiles,
|
|
2389
|
+
compileAnimation,
|
|
2390
|
+
compileClass,
|
|
2391
|
+
compileClasses,
|
|
2392
|
+
compileCssFromClasses,
|
|
2393
|
+
compileCssLightning,
|
|
2394
|
+
compileCssNative2,
|
|
2395
|
+
compileKeyframes,
|
|
2396
|
+
compileTheme,
|
|
2397
|
+
compileToCss,
|
|
2398
|
+
compileToCssBatch,
|
|
2399
|
+
compileVariantTableNative,
|
|
2400
|
+
computeIncrementalDiff,
|
|
2401
|
+
createFingerprint,
|
|
2402
|
+
detectConflicts,
|
|
2403
|
+
detectDeadCode,
|
|
2404
|
+
diffClassLists,
|
|
2405
|
+
eliminateDeadCss,
|
|
2406
|
+
eliminateDeadCssNative,
|
|
2407
|
+
emitPluginHook,
|
|
2408
|
+
estimateOptimalCacheConfig,
|
|
2409
|
+
estimateOptimalCacheConfigNative,
|
|
2410
|
+
extractAllClasses,
|
|
2411
|
+
extractAndGenerateStateCss,
|
|
2412
|
+
extractAndGenerateStateCssNative,
|
|
2413
|
+
extractClassesFromSource,
|
|
2414
|
+
extractClassesFromSourceNative,
|
|
2415
|
+
extractComponentUsage,
|
|
2416
|
+
extractContainerCssFromSource,
|
|
2417
|
+
extractTwContainerConfigs,
|
|
2418
|
+
extractTwStateConfigs,
|
|
2419
|
+
extractTwStateConfigsNative,
|
|
2420
|
+
fileToRoute,
|
|
2421
|
+
findDeadVariants,
|
|
2422
|
+
generateAtomicCss,
|
|
2423
|
+
generateCss,
|
|
2424
|
+
generateCssBatch,
|
|
2425
|
+
generateCssForClasses,
|
|
2426
|
+
generateCssNative,
|
|
2427
|
+
generateSafelist,
|
|
2428
|
+
generateStaticStateCss,
|
|
2429
|
+
generateStaticStateCssNative,
|
|
2430
|
+
generateSubComponentTypes,
|
|
2431
|
+
getAllRoutes,
|
|
2432
|
+
getBucketEngine,
|
|
2433
|
+
getCacheOptimizationHints,
|
|
2434
|
+
getCacheStatistics,
|
|
2435
|
+
getCacheStats,
|
|
2436
|
+
getCompilationMetrics,
|
|
2437
|
+
getCompilerDiagnostics,
|
|
2438
|
+
getContentPaths,
|
|
2439
|
+
getIncrementalEngine,
|
|
2440
|
+
getMemoryRecommendationsNative,
|
|
2441
|
+
getMemoryStatsNative,
|
|
2442
|
+
getNativeBridge,
|
|
2443
|
+
getPluginHooks,
|
|
2444
|
+
getResolverPoolStats,
|
|
2445
|
+
getRouteClasses,
|
|
2446
|
+
getWatchStats,
|
|
2447
|
+
getWeek6FeaturesStatus,
|
|
2448
|
+
hasTwUsage,
|
|
2449
|
+
hashContent,
|
|
2450
|
+
hoistComponentsNative,
|
|
2451
|
+
idRegistryActiveCount,
|
|
2452
|
+
idRegistryCreate,
|
|
2453
|
+
idRegistryDestroy,
|
|
2454
|
+
idRegistryExport,
|
|
2455
|
+
idRegistryGenerate,
|
|
2456
|
+
idRegistryImport,
|
|
2457
|
+
idRegistryLookup,
|
|
2458
|
+
idRegistryNext,
|
|
2459
|
+
idRegistryReset,
|
|
2460
|
+
idRegistrySnapshot,
|
|
2461
|
+
injectClientDirective,
|
|
2462
|
+
injectServerOnlyComment,
|
|
2463
|
+
injectStateHash,
|
|
2464
|
+
isAlreadyTransformed,
|
|
2465
|
+
isWatchRunning,
|
|
2466
|
+
layoutClassesToCss,
|
|
2467
|
+
loadSafelist,
|
|
2468
|
+
loadTailwindConfig,
|
|
2469
|
+
mergeClassesStatic,
|
|
2470
|
+
mergeCssDeclarationsNative,
|
|
2471
|
+
minifyCss,
|
|
2472
|
+
normalizeAndDedupClasses,
|
|
2473
|
+
normalizeClasses,
|
|
2474
|
+
optimizeCssNative,
|
|
2475
|
+
parseAtomicClass,
|
|
2476
|
+
parseClass,
|
|
2477
|
+
parseClasses,
|
|
2478
|
+
pollWatchEvents,
|
|
2479
|
+
processFileChange,
|
|
2480
|
+
processTailwindCssLightning,
|
|
2481
|
+
propertyIdToString,
|
|
2482
|
+
pruneStaleCacheEntries,
|
|
2483
|
+
rebuildWorkspaceResult,
|
|
2484
|
+
redisCacheClear,
|
|
2485
|
+
redisCacheHitRate,
|
|
2486
|
+
redisCacheKeyCount,
|
|
2487
|
+
redisCacheSize,
|
|
2488
|
+
redisCacheSync,
|
|
2489
|
+
redisClusterStatus,
|
|
2490
|
+
redisDelete,
|
|
2491
|
+
redisDiagnose,
|
|
2492
|
+
redisDisableCacheWarming,
|
|
2493
|
+
redisDisableCluster,
|
|
2494
|
+
redisDisablePersistence,
|
|
2495
|
+
redisEnableCacheWarming,
|
|
2496
|
+
redisEnableCluster,
|
|
2497
|
+
redisEnablePersistence,
|
|
2498
|
+
redisExists,
|
|
2499
|
+
redisExpirationGet,
|
|
2500
|
+
redisExpirationSet,
|
|
2501
|
+
redisFlushAll,
|
|
2502
|
+
redisFlushDb,
|
|
2503
|
+
redisGet,
|
|
2504
|
+
redisGetEvictionPolicy,
|
|
2505
|
+
redisInfo,
|
|
2506
|
+
redisMemoryStats,
|
|
2507
|
+
redisMget,
|
|
2508
|
+
redisMonitor,
|
|
2509
|
+
redisMset,
|
|
2510
|
+
redisOptimizeMemory,
|
|
2511
|
+
redisPing,
|
|
2512
|
+
redisPoolConnect,
|
|
2513
|
+
redisPoolReconnect,
|
|
2514
|
+
redisPoolStats,
|
|
2515
|
+
redisPublish,
|
|
2516
|
+
redisReplicate,
|
|
2517
|
+
redisReplicationStatus,
|
|
2518
|
+
redisSet,
|
|
2519
|
+
redisSetEvictionPolicy,
|
|
2520
|
+
redisSnapshot,
|
|
2521
|
+
redisSubscribe,
|
|
2522
|
+
registerFileClasses,
|
|
2523
|
+
registerGlobalClasses,
|
|
2524
|
+
registerPluginHook,
|
|
2525
|
+
registerPropertyName,
|
|
2526
|
+
registerValueName,
|
|
2527
|
+
resetBucketEngine,
|
|
2528
|
+
resetCacheStats,
|
|
2529
|
+
resetCompilationMetrics,
|
|
2530
|
+
resetIncrementalEngine,
|
|
2531
|
+
resetMemoryStats,
|
|
2532
|
+
resetNativeBridgeCache,
|
|
2533
|
+
resetResolverPoolStats,
|
|
2534
|
+
resolveCascade,
|
|
2535
|
+
resolveClassNames,
|
|
2536
|
+
resolveColorCached,
|
|
2537
|
+
resolveConflictGroup,
|
|
2538
|
+
resolveFontSizeCached,
|
|
2539
|
+
resolveSimpleVariants,
|
|
2540
|
+
resolveSpacingCached,
|
|
2541
|
+
resolveThemeValue,
|
|
2542
|
+
resolveVariants,
|
|
2543
|
+
reverseLookupProperty,
|
|
2544
|
+
reverseLookupValue,
|
|
2545
|
+
runCssPipeline,
|
|
2546
|
+
runElimination,
|
|
2547
|
+
runLoaderTransform,
|
|
2548
|
+
scanCacheOptimizations,
|
|
2549
|
+
scanFile,
|
|
2550
|
+
scanFileNative,
|
|
2551
|
+
scanFilesBatchNative,
|
|
2552
|
+
scanProjectUsage,
|
|
2553
|
+
scanWorkspace,
|
|
2554
|
+
shouldProcess,
|
|
2555
|
+
shouldSkipFile,
|
|
2556
|
+
startWatch,
|
|
2557
|
+
stopWatch,
|
|
2558
|
+
toAtomicClasses,
|
|
2559
|
+
transformSource,
|
|
2560
|
+
twMerge,
|
|
2561
|
+
twMergeMany,
|
|
2562
|
+
twMergeManyWithSeparator,
|
|
2563
|
+
twMergeRaw,
|
|
2564
|
+
twMergeWithSeparator,
|
|
2565
|
+
unregisterPluginHook,
|
|
2566
|
+
validateCssOutput,
|
|
2567
|
+
validateThemeConfig,
|
|
2568
|
+
valueIdToString,
|
|
2569
|
+
walkAndPrefilterSourceFiles,
|
|
2570
|
+
watchAddPattern,
|
|
2571
|
+
watchClearAll,
|
|
2572
|
+
watchEventTypeToString,
|
|
2573
|
+
watchGetActiveHandles,
|
|
2574
|
+
watchPause,
|
|
2575
|
+
watchRemovePattern,
|
|
2576
|
+
watchResume
|
|
2577
|
+
};
|
|
2320
2578
|
//# sourceMappingURL=compiler.mjs.map
|