tailwind-styled-v4 5.0.37 → 5.0.39
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 +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +121 -83
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +31 -15
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +107 -67
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +47 -14
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +601 -428
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +504 -313
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +833 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +298 -30
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +72 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.js +335 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +28 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +719 -506
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +520 -318
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +145 -319
- package/dist/index.d.ts +145 -319
- package/dist/index.js +1337 -7442
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1275 -7386
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +327 -242
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +272 -184
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +94 -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 +68 -40
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +14 -10
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.js +102 -53
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +30 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +48 -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 +108 -53
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +50 -18
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +63 -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.js +98 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.js +164 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +70 -40
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +0 -12
- package/dist/shared.d.ts +0 -12
- package/dist/shared.js +481 -299
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +304 -133
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +40 -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.js +95 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +37 -14
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +69 -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 +56 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.js +133 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +45 -14
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +156 -115
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +135 -82
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +584 -423
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +498 -311
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +599 -450
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +484 -332
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +102 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +39 -15
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +112 -77
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +52 -18
- 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/compiler.js
CHANGED
|
@@ -1,42 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var module$1 = require('module');
|
|
4
|
-
var fs = require('fs');
|
|
5
|
-
var path = require('path');
|
|
6
|
-
require('crypto');
|
|
7
|
-
var url = require('url');
|
|
8
|
-
|
|
9
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
10
|
-
function _interopNamespace(e) {
|
|
11
|
-
if (e && e.__esModule) return e;
|
|
12
|
-
var n = Object.create(null);
|
|
13
|
-
if (e) {
|
|
14
|
-
Object.keys(e).forEach(function (k) {
|
|
15
|
-
if (k !== 'default') {
|
|
16
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function () { return e[k]; }
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
n.default = e;
|
|
25
|
-
return Object.freeze(n);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
29
|
-
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
30
|
-
|
|
1
|
+
const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
|
|
31
2
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __create = Object.create;
|
|
32
5
|
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
33
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
}) : x)(function(x) {
|
|
37
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
38
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
39
|
-
});
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
40
10
|
var __esm = (fn, res) => function __init() {
|
|
41
11
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
42
12
|
};
|
|
@@ -44,6 +14,25 @@ var __export = (target, all) => {
|
|
|
44
14
|
for (var name in all)
|
|
45
15
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
46
16
|
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
+
|
|
35
|
+
// packages/domain/shared/src/native-resolution.ts
|
|
47
36
|
function platformKey() {
|
|
48
37
|
if (isBrowser) return "browser";
|
|
49
38
|
return `${process.platform}-${process.arch}`;
|
|
@@ -59,7 +48,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
59
48
|
}
|
|
60
49
|
const envPath = process.env.TW_NATIVE_PATH?.trim();
|
|
61
50
|
if (envPath) {
|
|
62
|
-
if (
|
|
51
|
+
if (fs.existsSync(envPath)) {
|
|
63
52
|
return { path: envPath, source: "env", platform, tried };
|
|
64
53
|
}
|
|
65
54
|
tried.push(`env:${envPath} (not found)`);
|
|
@@ -68,7 +57,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
68
57
|
for (const pkg of prebuiltPkgs) {
|
|
69
58
|
try {
|
|
70
59
|
const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
|
|
71
|
-
if (
|
|
60
|
+
if (fs.existsSync(candidate)) {
|
|
72
61
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
73
62
|
}
|
|
74
63
|
tried.push(`prebuilt:${pkg} (resolved but missing)`);
|
|
@@ -79,13 +68,13 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
79
68
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
80
69
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
81
70
|
if (runtimeDir) {
|
|
82
|
-
for (const depth of ["..",
|
|
83
|
-
const pkgRoot =
|
|
71
|
+
for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
|
|
72
|
+
const pkgRoot = path.resolve(runtimeDir, depth);
|
|
84
73
|
for (const bin of BINARY_NAMES_SELF) {
|
|
85
74
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
86
|
-
const candidate =
|
|
75
|
+
const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
87
76
|
tried.push(`self-bundled:${candidate}`);
|
|
88
|
-
if (
|
|
77
|
+
if (fs.existsSync(candidate)) {
|
|
89
78
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
90
79
|
}
|
|
91
80
|
}
|
|
@@ -97,39 +86,45 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
97
86
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
98
87
|
const localCandidates = [];
|
|
99
88
|
for (const bin of BINARY_NAMES) {
|
|
100
|
-
localCandidates.push(
|
|
101
|
-
localCandidates.push(
|
|
102
|
-
localCandidates.push(
|
|
103
|
-
localCandidates.push(
|
|
89
|
+
localCandidates.push(path.resolve(base, `${bin}.node`));
|
|
90
|
+
localCandidates.push(path.resolve(base, "..", `${bin}.node`));
|
|
91
|
+
localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
|
|
92
|
+
localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
|
|
104
93
|
}
|
|
105
94
|
for (const startDir of [cwd, base]) {
|
|
106
95
|
let dir = startDir;
|
|
107
96
|
for (let i = 0; i < 6; i++) {
|
|
108
|
-
const nativeDir =
|
|
97
|
+
const nativeDir = path.resolve(dir, "native");
|
|
109
98
|
for (const bin of BINARY_NAMES) {
|
|
110
|
-
localCandidates.push(
|
|
111
|
-
localCandidates.push(
|
|
112
|
-
localCandidates.push(
|
|
113
|
-
localCandidates.push(
|
|
99
|
+
localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
|
|
100
|
+
localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
|
|
101
|
+
localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
|
|
102
|
+
localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
|
|
114
103
|
}
|
|
115
|
-
const parent =
|
|
104
|
+
const parent = path.resolve(dir, "..");
|
|
116
105
|
if (parent === dir) break;
|
|
117
106
|
dir = parent;
|
|
118
107
|
}
|
|
119
108
|
}
|
|
120
109
|
for (const candidate of localCandidates) {
|
|
121
110
|
tried.push(`local:${candidate}`);
|
|
122
|
-
if (
|
|
111
|
+
if (fs.existsSync(candidate)) {
|
|
123
112
|
return { path: candidate, source: "local", platform, tried };
|
|
124
113
|
}
|
|
125
114
|
}
|
|
126
115
|
return { path: null, source: "not-found", platform, tried };
|
|
127
116
|
}
|
|
128
|
-
var isBrowser, _require, PLATFORM_MAP;
|
|
117
|
+
var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
|
|
129
118
|
var init_native_resolution = __esm({
|
|
130
119
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
120
|
+
"use strict";
|
|
121
|
+
import_node_module = require("module");
|
|
122
|
+
fs = __toESM(require("fs"));
|
|
123
|
+
path = __toESM(require("path"));
|
|
131
124
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
132
|
-
_require =
|
|
125
|
+
_require = (0, import_node_module.createRequire)(
|
|
126
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
127
|
+
);
|
|
133
128
|
PLATFORM_MAP = {
|
|
134
129
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
135
130
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -140,26 +135,39 @@ var init_native_resolution = __esm({
|
|
|
140
135
|
};
|
|
141
136
|
}
|
|
142
137
|
});
|
|
138
|
+
|
|
139
|
+
// packages/domain/shared/src/index.ts
|
|
143
140
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
141
|
+
if (dir) return import_node_path.default.resolve(dir);
|
|
144
142
|
try {
|
|
145
|
-
return
|
|
143
|
+
return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
146
144
|
} catch {
|
|
147
145
|
return process.cwd();
|
|
148
146
|
}
|
|
149
147
|
}
|
|
148
|
+
var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, _require2;
|
|
150
149
|
var init_src = __esm({
|
|
151
150
|
"packages/domain/shared/src/index.ts"() {
|
|
151
|
+
"use strict";
|
|
152
|
+
import_node_crypto = require("crypto");
|
|
153
|
+
import_node_fs = __toESM(require("fs"));
|
|
154
|
+
import_node_path = __toESM(require("path"));
|
|
155
|
+
import_node_url = require("url");
|
|
156
|
+
import_node_module2 = require("module");
|
|
152
157
|
init_native_resolution();
|
|
153
|
-
|
|
158
|
+
_require2 = (0, import_node_module2.createRequire)(
|
|
159
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
|
|
160
|
+
);
|
|
154
161
|
}
|
|
155
162
|
});
|
|
156
163
|
|
|
157
164
|
// packages/domain/compiler/src/nativeBridge.ts
|
|
158
|
-
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge
|
|
165
|
+
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, resetNativeBridgeCache, adaptNativeResult;
|
|
159
166
|
var init_nativeBridge = __esm({
|
|
160
167
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
168
|
+
"use strict";
|
|
161
169
|
init_src();
|
|
162
|
-
_loadNative = (path4) =>
|
|
170
|
+
_loadNative = (path4) => require(path4);
|
|
163
171
|
log = (...args) => {
|
|
164
172
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
165
173
|
console.log("[compiler:native]", ...args);
|
|
@@ -173,7 +181,7 @@ var init_nativeBridge = __esm({
|
|
|
173
181
|
const m = mod;
|
|
174
182
|
return !!(typeof m.transformSource === "function" || typeof m.extractAllClasses === "function" || typeof m.hasTwUsage === "function");
|
|
175
183
|
};
|
|
176
|
-
|
|
184
|
+
getNativeBridge = () => {
|
|
177
185
|
if (nativeBridge) {
|
|
178
186
|
return nativeBridge;
|
|
179
187
|
}
|
|
@@ -185,7 +193,7 @@ var init_nativeBridge = __esm({
|
|
|
185
193
|
}
|
|
186
194
|
bridgeLoadAttempted = true;
|
|
187
195
|
try {
|
|
188
|
-
const runtimeDir = resolveRuntimeDir(void 0,
|
|
196
|
+
const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
|
|
189
197
|
const result = resolveNativeBinary(runtimeDir);
|
|
190
198
|
if (result.path && result.path.endsWith(".node")) {
|
|
191
199
|
try {
|
|
@@ -244,13 +252,13 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
244
252
|
throw bridgeLoadError;
|
|
245
253
|
}
|
|
246
254
|
};
|
|
247
|
-
|
|
255
|
+
resetNativeBridgeCache = () => {
|
|
248
256
|
nativeBridge = null;
|
|
249
257
|
bridgeLoadAttempted = false;
|
|
250
258
|
bridgeLoadError = null;
|
|
251
259
|
log("Native bridge cache reset");
|
|
252
260
|
};
|
|
253
|
-
|
|
261
|
+
adaptNativeResult = (raw) => {
|
|
254
262
|
return {
|
|
255
263
|
code: raw.code ?? "",
|
|
256
264
|
classes: raw.classes ?? [],
|
|
@@ -261,7 +269,7 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
261
269
|
};
|
|
262
270
|
if (typeof process !== "undefined" && !bridgeLoadAttempted) {
|
|
263
271
|
try {
|
|
264
|
-
|
|
272
|
+
getNativeBridge();
|
|
265
273
|
} catch {
|
|
266
274
|
}
|
|
267
275
|
}
|
|
@@ -271,7 +279,7 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
271
279
|
// packages/domain/compiler/src/compiler/cssGeneratorNative.ts
|
|
272
280
|
async function generateCssNative(classes, options) {
|
|
273
281
|
const { theme } = options;
|
|
274
|
-
const native =
|
|
282
|
+
const native = getNativeBridge();
|
|
275
283
|
if (!native?.generateCssNative) {
|
|
276
284
|
throw new Error(
|
|
277
285
|
"FATAL: Rust CSS generator (generateCssNative) is required but not available. Ensure native binding is properly loaded. Check that native/.node binary exists."
|
|
@@ -282,7 +290,7 @@ async function generateCssNative(classes, options) {
|
|
|
282
290
|
return css;
|
|
283
291
|
}
|
|
284
292
|
function getCacheStats() {
|
|
285
|
-
const native =
|
|
293
|
+
const native = getNativeBridge();
|
|
286
294
|
try {
|
|
287
295
|
if (!native?.getCacheStats) {
|
|
288
296
|
return null;
|
|
@@ -294,7 +302,7 @@ function getCacheStats() {
|
|
|
294
302
|
}
|
|
295
303
|
}
|
|
296
304
|
function clearThemeCache() {
|
|
297
|
-
const native =
|
|
305
|
+
const native = getNativeBridge();
|
|
298
306
|
try {
|
|
299
307
|
if (!native?.clearThemeCache) {
|
|
300
308
|
return;
|
|
@@ -304,7 +312,7 @@ function clearThemeCache() {
|
|
|
304
312
|
}
|
|
305
313
|
}
|
|
306
314
|
function resetCacheStats() {
|
|
307
|
-
const native =
|
|
315
|
+
const native = getNativeBridge();
|
|
308
316
|
try {
|
|
309
317
|
if (!native?.resetCacheStats) {
|
|
310
318
|
return;
|
|
@@ -315,85 +323,87 @@ function resetCacheStats() {
|
|
|
315
323
|
}
|
|
316
324
|
var init_cssGeneratorNative = __esm({
|
|
317
325
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
326
|
+
"use strict";
|
|
318
327
|
init_nativeBridge();
|
|
319
328
|
}
|
|
320
329
|
});
|
|
321
330
|
|
|
322
331
|
// packages/domain/compiler/src/compiler/compilationNative.ts
|
|
323
332
|
function compileCssNative2(classes, prefix) {
|
|
324
|
-
const native =
|
|
333
|
+
const native = getNativeBridge();
|
|
325
334
|
if (!native?.compileCss) throw new Error("compileCss not available");
|
|
326
335
|
return native.compileCss(classes, prefix);
|
|
327
336
|
}
|
|
328
337
|
function compileCssLightning(classes) {
|
|
329
|
-
const native =
|
|
338
|
+
const native = getNativeBridge();
|
|
330
339
|
if (!native?.compileCssLightning) throw new Error("compileCssLightning not available");
|
|
331
340
|
return native.compileCssLightning(classes);
|
|
332
341
|
}
|
|
333
342
|
function extractTwStateConfigsNative(source, filename) {
|
|
334
|
-
const native =
|
|
343
|
+
const native = getNativeBridge();
|
|
335
344
|
if (!native?.extractTwStateConfigs) throw new Error("extractTwStateConfigs not available");
|
|
336
345
|
return native.extractTwStateConfigs(source, filename);
|
|
337
346
|
}
|
|
338
347
|
function generateStaticStateCssNative(inputs, resolvedCss) {
|
|
339
|
-
const native =
|
|
348
|
+
const native = getNativeBridge();
|
|
340
349
|
if (!native?.generateStaticStateCss) throw new Error("generateStaticStateCss not available");
|
|
341
350
|
return native.generateStaticStateCss(inputs, resolvedCss ?? null);
|
|
342
351
|
}
|
|
343
352
|
function extractAndGenerateStateCssNative(source, filename) {
|
|
344
|
-
const native =
|
|
353
|
+
const native = getNativeBridge();
|
|
345
354
|
if (!native?.extractAndGenerateStateCss) throw new Error("extractAndGenerateStateCss not available");
|
|
346
355
|
return native.extractAndGenerateStateCss(source, filename);
|
|
347
356
|
}
|
|
348
357
|
function layoutClassesToCss(classes) {
|
|
349
|
-
const native =
|
|
358
|
+
const native = getNativeBridge();
|
|
350
359
|
if (!native?.layoutClassesToCss) throw new Error("layoutClassesToCss not available");
|
|
351
360
|
return native.layoutClassesToCss(classes);
|
|
352
361
|
}
|
|
353
362
|
function hashContent(input, algorithm = "sha256", length = 8) {
|
|
354
|
-
const native =
|
|
363
|
+
const native = getNativeBridge();
|
|
355
364
|
if (!native?.hashContent) throw new Error("hashContent not available");
|
|
356
365
|
return native.hashContent(input, algorithm, length);
|
|
357
366
|
}
|
|
358
367
|
function extractTwContainerConfigs(source) {
|
|
359
|
-
const native =
|
|
368
|
+
const native = getNativeBridge();
|
|
360
369
|
if (!native?.extractTwContainerConfigs) throw new Error("extractTwContainerConfigs not available");
|
|
361
370
|
return native.extractTwContainerConfigs(source);
|
|
362
371
|
}
|
|
363
372
|
function parseAtomicClass(twClass) {
|
|
364
|
-
const native =
|
|
373
|
+
const native = getNativeBridge();
|
|
365
374
|
if (!native?.parseAtomicClass) throw new Error("parseAtomicClass not available");
|
|
366
375
|
return native.parseAtomicClass(twClass);
|
|
367
376
|
}
|
|
368
377
|
function generateAtomicCss(rulesJson) {
|
|
369
|
-
const native =
|
|
378
|
+
const native = getNativeBridge();
|
|
370
379
|
if (!native?.generateAtomicCss) throw new Error("generateAtomicCss not available");
|
|
371
380
|
return native.generateAtomicCss(rulesJson);
|
|
372
381
|
}
|
|
373
382
|
function toAtomicClasses(twClasses) {
|
|
374
|
-
const native =
|
|
383
|
+
const native = getNativeBridge();
|
|
375
384
|
if (!native?.toAtomicClasses) throw new Error("toAtomicClasses not available");
|
|
376
385
|
return native.toAtomicClasses(twClasses);
|
|
377
386
|
}
|
|
378
387
|
function clearAtomicRegistry() {
|
|
379
|
-
const native =
|
|
388
|
+
const native = getNativeBridge();
|
|
380
389
|
if (!native?.clearAtomicRegistry) return;
|
|
381
390
|
native.clearAtomicRegistry();
|
|
382
391
|
}
|
|
383
392
|
function atomicRegistrySize() {
|
|
384
|
-
const native =
|
|
393
|
+
const native = getNativeBridge();
|
|
385
394
|
if (!native?.atomicRegistrySize) return 0;
|
|
386
395
|
return native.atomicRegistrySize();
|
|
387
396
|
}
|
|
388
397
|
var init_compilationNative = __esm({
|
|
389
398
|
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
399
|
+
"use strict";
|
|
390
400
|
init_nativeBridge();
|
|
391
401
|
}
|
|
392
402
|
});
|
|
393
403
|
|
|
394
404
|
// packages/domain/compiler/src/compiler/cssCompilationNative.ts
|
|
395
405
|
function compileClass(input) {
|
|
396
|
-
const native =
|
|
406
|
+
const native = getNativeBridge();
|
|
397
407
|
if (!native?.compile_class) throw new Error("compile_class not available");
|
|
398
408
|
const resultJson = native.compile_class(input);
|
|
399
409
|
try {
|
|
@@ -408,7 +418,7 @@ function compileClass(input) {
|
|
|
408
418
|
}
|
|
409
419
|
}
|
|
410
420
|
function compileClasses(inputs) {
|
|
411
|
-
const native =
|
|
421
|
+
const native = getNativeBridge();
|
|
412
422
|
if (!native?.compile_classes) throw new Error("compile_classes not available");
|
|
413
423
|
const resultJson = native.compile_classes(inputs);
|
|
414
424
|
try {
|
|
@@ -424,32 +434,32 @@ function compileClasses(inputs) {
|
|
|
424
434
|
}
|
|
425
435
|
}
|
|
426
436
|
function compileToCss(input, minify) {
|
|
427
|
-
const native =
|
|
437
|
+
const native = getNativeBridge();
|
|
428
438
|
if (!native?.compile_to_css) throw new Error("compile_to_css not available");
|
|
429
439
|
return native.compile_to_css(input, minify ?? false);
|
|
430
440
|
}
|
|
431
441
|
function compileToCssBatch(inputs, minify) {
|
|
432
|
-
const native =
|
|
442
|
+
const native = getNativeBridge();
|
|
433
443
|
if (!native?.compile_to_css_batch) throw new Error("compile_to_css_batch not available");
|
|
434
444
|
return native.compile_to_css_batch(inputs, minify ?? false);
|
|
435
445
|
}
|
|
436
446
|
function minifyCss(css) {
|
|
437
|
-
const native =
|
|
447
|
+
const native = getNativeBridge();
|
|
438
448
|
if (!native?.minify_css) throw new Error("minify_css not available");
|
|
439
449
|
return native.minify_css(css);
|
|
440
450
|
}
|
|
441
451
|
function generateCss(ruleJson, minify) {
|
|
442
|
-
const native =
|
|
452
|
+
const native = getNativeBridge();
|
|
443
453
|
if (!native?.generate_css) throw new Error("generate_css not available");
|
|
444
454
|
return native.generate_css(ruleJson, minify);
|
|
445
455
|
}
|
|
446
456
|
function generateCssBatch(rulesJson, minify) {
|
|
447
|
-
const native =
|
|
457
|
+
const native = getNativeBridge();
|
|
448
458
|
if (!native?.generate_css_batch) throw new Error("generate_css_batch not available");
|
|
449
459
|
return native.generate_css_batch(rulesJson, minify);
|
|
450
460
|
}
|
|
451
461
|
function compileAnimation(animationName, from, to) {
|
|
452
|
-
const native =
|
|
462
|
+
const native = getNativeBridge();
|
|
453
463
|
if (!native?.compile_animation) throw new Error("compile_animation not available");
|
|
454
464
|
const resultJson = native.compile_animation(animationName, from, to);
|
|
455
465
|
try {
|
|
@@ -464,7 +474,7 @@ function compileAnimation(animationName, from, to) {
|
|
|
464
474
|
}
|
|
465
475
|
}
|
|
466
476
|
function compileKeyframes(name, stopsJson) {
|
|
467
|
-
const native =
|
|
477
|
+
const native = getNativeBridge();
|
|
468
478
|
if (!native?.compile_keyframes) throw new Error("compile_keyframes not available");
|
|
469
479
|
const resultJson = native.compile_keyframes(name, stopsJson);
|
|
470
480
|
try {
|
|
@@ -479,7 +489,7 @@ function compileKeyframes(name, stopsJson) {
|
|
|
479
489
|
}
|
|
480
490
|
}
|
|
481
491
|
function compileTheme(tokensJson, themeName, prefix) {
|
|
482
|
-
const native =
|
|
492
|
+
const native = getNativeBridge();
|
|
483
493
|
if (!native?.compile_theme) throw new Error("compile_theme not available");
|
|
484
494
|
const resultJson = native.compile_theme(tokensJson, themeName, prefix);
|
|
485
495
|
try {
|
|
@@ -494,17 +504,17 @@ function compileTheme(tokensJson, themeName, prefix) {
|
|
|
494
504
|
}
|
|
495
505
|
}
|
|
496
506
|
function twMerge(classString) {
|
|
497
|
-
const native =
|
|
507
|
+
const native = getNativeBridge();
|
|
498
508
|
if (!native?.tw_merge) throw new Error("tw_merge not available");
|
|
499
509
|
return native.tw_merge(classString);
|
|
500
510
|
}
|
|
501
511
|
function twMergeMany(classStrings) {
|
|
502
|
-
const native =
|
|
512
|
+
const native = getNativeBridge();
|
|
503
513
|
if (!native?.tw_merge_many) throw new Error("tw_merge_many not available");
|
|
504
514
|
return native.tw_merge_many(classStrings);
|
|
505
515
|
}
|
|
506
516
|
function twMergeWithSeparator(classString, options) {
|
|
507
|
-
const native =
|
|
517
|
+
const native = getNativeBridge();
|
|
508
518
|
if (!native?.tw_merge_with_separator)
|
|
509
519
|
throw new Error("tw_merge_with_separator not available");
|
|
510
520
|
const opts = {
|
|
@@ -514,7 +524,7 @@ function twMergeWithSeparator(classString, options) {
|
|
|
514
524
|
return native.tw_merge_with_separator(classString, opts);
|
|
515
525
|
}
|
|
516
526
|
function twMergeManyWithSeparator(classStrings, options) {
|
|
517
|
-
const native =
|
|
527
|
+
const native = getNativeBridge();
|
|
518
528
|
if (!native?.tw_merge_many_with_separator)
|
|
519
529
|
throw new Error("tw_merge_many_with_separator not available");
|
|
520
530
|
const opts = {
|
|
@@ -524,49 +534,50 @@ function twMergeManyWithSeparator(classStrings, options) {
|
|
|
524
534
|
return native.tw_merge_many_with_separator(classStrings, opts);
|
|
525
535
|
}
|
|
526
536
|
function twMergeRaw(classLists) {
|
|
527
|
-
const native =
|
|
537
|
+
const native = getNativeBridge();
|
|
528
538
|
if (!native?.tw_merge_raw) throw new Error("tw_merge_raw not available");
|
|
529
539
|
return native.tw_merge_raw(classLists);
|
|
530
540
|
}
|
|
531
541
|
var init_cssCompilationNative = __esm({
|
|
532
542
|
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
543
|
+
"use strict";
|
|
533
544
|
init_nativeBridge();
|
|
534
545
|
}
|
|
535
546
|
});
|
|
536
547
|
|
|
537
548
|
// packages/domain/compiler/src/compiler/idRegistryNative.ts
|
|
538
549
|
function idRegistryCreate() {
|
|
539
|
-
const native =
|
|
550
|
+
const native = getNativeBridge();
|
|
540
551
|
if (!native?.id_registry_create) throw new Error("id_registry_create not available");
|
|
541
552
|
return native.id_registry_create();
|
|
542
553
|
}
|
|
543
554
|
function idRegistryGenerate(handle, name) {
|
|
544
|
-
const native =
|
|
555
|
+
const native = getNativeBridge();
|
|
545
556
|
if (!native?.id_registry_generate) throw new Error("id_registry_generate not available");
|
|
546
557
|
return native.id_registry_generate(handle, name);
|
|
547
558
|
}
|
|
548
559
|
function idRegistryLookup(handle, name) {
|
|
549
|
-
const native =
|
|
560
|
+
const native = getNativeBridge();
|
|
550
561
|
if (!native?.id_registry_lookup) throw new Error("id_registry_lookup not available");
|
|
551
562
|
return native.id_registry_lookup(handle, name);
|
|
552
563
|
}
|
|
553
564
|
function idRegistryNext(handle) {
|
|
554
|
-
const native =
|
|
565
|
+
const native = getNativeBridge();
|
|
555
566
|
if (!native?.id_registry_next) throw new Error("id_registry_next not available");
|
|
556
567
|
return native.id_registry_next(handle);
|
|
557
568
|
}
|
|
558
569
|
function idRegistryDestroy(handle) {
|
|
559
|
-
const native =
|
|
570
|
+
const native = getNativeBridge();
|
|
560
571
|
if (!native?.id_registry_destroy) return;
|
|
561
572
|
native.id_registry_destroy(handle);
|
|
562
573
|
}
|
|
563
574
|
function idRegistryReset(handle) {
|
|
564
|
-
const native =
|
|
575
|
+
const native = getNativeBridge();
|
|
565
576
|
if (!native?.id_registry_reset) return;
|
|
566
577
|
native.id_registry_reset(handle);
|
|
567
578
|
}
|
|
568
579
|
function idRegistrySnapshot(handle) {
|
|
569
|
-
const native =
|
|
580
|
+
const native = getNativeBridge();
|
|
570
581
|
if (!native?.id_registry_snapshot) throw new Error("id_registry_snapshot not available");
|
|
571
582
|
const snapshotJson = native.id_registry_snapshot(handle);
|
|
572
583
|
try {
|
|
@@ -581,61 +592,62 @@ function idRegistrySnapshot(handle) {
|
|
|
581
592
|
}
|
|
582
593
|
}
|
|
583
594
|
function idRegistryActiveCount() {
|
|
584
|
-
const native =
|
|
595
|
+
const native = getNativeBridge();
|
|
585
596
|
if (!native?.id_registry_active_count) throw new Error("id_registry_active_count not available");
|
|
586
597
|
return native.id_registry_active_count();
|
|
587
598
|
}
|
|
588
599
|
function registerPropertyName(propertyName) {
|
|
589
|
-
const native =
|
|
600
|
+
const native = getNativeBridge();
|
|
590
601
|
if (!native?.register_property_name)
|
|
591
602
|
throw new Error("register_property_name not available");
|
|
592
603
|
return native.register_property_name(propertyName);
|
|
593
604
|
}
|
|
594
605
|
function registerValueName(valueName) {
|
|
595
|
-
const native =
|
|
606
|
+
const native = getNativeBridge();
|
|
596
607
|
if (!native?.register_value_name) throw new Error("register_value_name not available");
|
|
597
608
|
return native.register_value_name(valueName);
|
|
598
609
|
}
|
|
599
610
|
function propertyIdToString(propertyId) {
|
|
600
|
-
const native =
|
|
611
|
+
const native = getNativeBridge();
|
|
601
612
|
if (!native?.property_id_to_string) throw new Error("property_id_to_string not available");
|
|
602
613
|
return native.property_id_to_string(propertyId);
|
|
603
614
|
}
|
|
604
615
|
function valueIdToString(valueId) {
|
|
605
|
-
const native =
|
|
616
|
+
const native = getNativeBridge();
|
|
606
617
|
if (!native?.value_id_to_string) throw new Error("value_id_to_string not available");
|
|
607
618
|
return native.value_id_to_string(valueId);
|
|
608
619
|
}
|
|
609
620
|
function reverseLookupProperty(propertyId) {
|
|
610
|
-
const native =
|
|
621
|
+
const native = getNativeBridge();
|
|
611
622
|
if (!native?.reverse_lookup_property)
|
|
612
623
|
throw new Error("reverse_lookup_property not available");
|
|
613
624
|
return native.reverse_lookup_property(propertyId);
|
|
614
625
|
}
|
|
615
626
|
function reverseLookupValue(valueId) {
|
|
616
|
-
const native =
|
|
627
|
+
const native = getNativeBridge();
|
|
617
628
|
if (!native?.reverse_lookup_value) throw new Error("reverse_lookup_value not available");
|
|
618
629
|
return native.reverse_lookup_value(valueId);
|
|
619
630
|
}
|
|
620
631
|
function idRegistryExport(handle) {
|
|
621
|
-
const native =
|
|
632
|
+
const native = getNativeBridge();
|
|
622
633
|
if (!native?.id_registry_export) throw new Error("id_registry_export not available");
|
|
623
634
|
return native.id_registry_export(handle);
|
|
624
635
|
}
|
|
625
636
|
function idRegistryImport(importedData) {
|
|
626
|
-
const native =
|
|
637
|
+
const native = getNativeBridge();
|
|
627
638
|
if (!native?.id_registry_import) throw new Error("id_registry_import not available");
|
|
628
639
|
return native.id_registry_import(importedData);
|
|
629
640
|
}
|
|
630
641
|
var init_idRegistryNative = __esm({
|
|
631
642
|
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
643
|
+
"use strict";
|
|
632
644
|
init_nativeBridge();
|
|
633
645
|
}
|
|
634
646
|
});
|
|
635
647
|
|
|
636
648
|
// packages/domain/compiler/src/compiler/streamingNative.ts
|
|
637
649
|
function processFileChange(fileChangeJson) {
|
|
638
|
-
const native =
|
|
650
|
+
const native = getNativeBridge();
|
|
639
651
|
if (!native?.process_file_change) throw new Error("process_file_change not available");
|
|
640
652
|
const resultJson = native.process_file_change(fileChangeJson);
|
|
641
653
|
try {
|
|
@@ -655,7 +667,7 @@ function processFileChange(fileChangeJson) {
|
|
|
655
667
|
}
|
|
656
668
|
}
|
|
657
669
|
function computeIncrementalDiff(oldScanJson, newScanJson) {
|
|
658
|
-
const native =
|
|
670
|
+
const native = getNativeBridge();
|
|
659
671
|
if (!native?.compute_incremental_diff)
|
|
660
672
|
throw new Error("compute_incremental_diff not available");
|
|
661
673
|
const resultJson = native.compute_incremental_diff(oldScanJson, newScanJson);
|
|
@@ -678,7 +690,7 @@ function computeIncrementalDiff(oldScanJson, newScanJson) {
|
|
|
678
690
|
}
|
|
679
691
|
}
|
|
680
692
|
function createFingerprint(filePath, fileContent) {
|
|
681
|
-
const native =
|
|
693
|
+
const native = getNativeBridge();
|
|
682
694
|
if (!native?.create_fingerprint) throw new Error("create_fingerprint not available");
|
|
683
695
|
const fingerprintJson = native.create_fingerprint(filePath, fileContent);
|
|
684
696
|
try {
|
|
@@ -695,7 +707,7 @@ function createFingerprint(filePath, fileContent) {
|
|
|
695
707
|
}
|
|
696
708
|
}
|
|
697
709
|
function injectStateHash(css, stateHash) {
|
|
698
|
-
const native =
|
|
710
|
+
const native = getNativeBridge();
|
|
699
711
|
if (!native?.inject_state_hash) throw new Error("inject_state_hash not available");
|
|
700
712
|
const resultJson = native.inject_state_hash(css, stateHash);
|
|
701
713
|
try {
|
|
@@ -710,7 +722,7 @@ function injectStateHash(css, stateHash) {
|
|
|
710
722
|
}
|
|
711
723
|
}
|
|
712
724
|
function pruneStaleCacheEntries(maxAgeSeconds, maxEntries) {
|
|
713
|
-
const native =
|
|
725
|
+
const native = getNativeBridge();
|
|
714
726
|
if (!native?.prune_stale_entries) throw new Error("prune_stale_entries not available");
|
|
715
727
|
const resultJson = native.prune_stale_entries(maxAgeSeconds, maxEntries);
|
|
716
728
|
try {
|
|
@@ -725,7 +737,7 @@ function pruneStaleCacheEntries(maxAgeSeconds, maxEntries) {
|
|
|
725
737
|
}
|
|
726
738
|
}
|
|
727
739
|
function rebuildWorkspaceResult(rootDir, extensions) {
|
|
728
|
-
const native =
|
|
740
|
+
const native = getNativeBridge();
|
|
729
741
|
if (!native?.rebuild_workspace_result)
|
|
730
742
|
throw new Error("rebuild_workspace_result not available");
|
|
731
743
|
const resultJson = native.rebuild_workspace_result(rootDir, extensions || []);
|
|
@@ -742,7 +754,7 @@ function rebuildWorkspaceResult(rootDir, extensions) {
|
|
|
742
754
|
}
|
|
743
755
|
}
|
|
744
756
|
function scanFileNative(filePath, fileContent) {
|
|
745
|
-
const native =
|
|
757
|
+
const native = getNativeBridge();
|
|
746
758
|
if (!native?.scan_file_native) throw new Error("scan_file_native not available");
|
|
747
759
|
const resultJson = native.scan_file_native(filePath, fileContent);
|
|
748
760
|
try {
|
|
@@ -758,7 +770,7 @@ function scanFileNative(filePath, fileContent) {
|
|
|
758
770
|
}
|
|
759
771
|
}
|
|
760
772
|
function scanFilesBatchNative(filesJson) {
|
|
761
|
-
const native =
|
|
773
|
+
const native = getNativeBridge();
|
|
762
774
|
if (!native?.scan_files_batch_native)
|
|
763
775
|
throw new Error("scan_files_batch_native not available");
|
|
764
776
|
const resultJson = native.scan_files_batch_native(filesJson);
|
|
@@ -770,9 +782,12 @@ function scanFilesBatchNative(filesJson) {
|
|
|
770
782
|
}
|
|
771
783
|
var init_streamingNative = __esm({
|
|
772
784
|
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
785
|
+
"use strict";
|
|
773
786
|
init_nativeBridge();
|
|
774
787
|
}
|
|
775
788
|
});
|
|
789
|
+
|
|
790
|
+
// packages/domain/compiler/src/tailwindEngine.ts
|
|
776
791
|
function loadTailwindEngine() {
|
|
777
792
|
if (_twEngine) return _twEngine;
|
|
778
793
|
if (_twEngineError) throw _twEngineError;
|
|
@@ -792,10 +807,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
792
807
|
if (classes.length === 0) return "";
|
|
793
808
|
const tw = loadTailwindEngine();
|
|
794
809
|
const input = cssEntryContent ?? "@import 'tailwindcss';";
|
|
795
|
-
const { readFileSync, existsSync: existsSync2 } = await import(
|
|
796
|
-
const { dirname, resolve: resolve2 } = await import(
|
|
810
|
+
const { readFileSync, existsSync: existsSync2 } = await import("fs");
|
|
811
|
+
const { dirname, resolve: resolve2 } = await import("path");
|
|
797
812
|
const projectRoot = root ?? process.cwd();
|
|
798
|
-
const req =
|
|
813
|
+
const req = (0, import_node_module3.createRequire)(resolve2(projectRoot, "package.json"));
|
|
799
814
|
const loadStylesheet = async (id, base) => {
|
|
800
815
|
try {
|
|
801
816
|
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;
|
|
@@ -815,10 +830,16 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
815
830
|
const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
|
|
816
831
|
return compiler.build(classes);
|
|
817
832
|
}
|
|
818
|
-
var require2, _twEngine, _twEngineError;
|
|
833
|
+
var import_node_module3, import_meta, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
819
834
|
var init_tailwindEngine = __esm({
|
|
820
835
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
821
|
-
|
|
836
|
+
"use strict";
|
|
837
|
+
import_node_module3 = require("module");
|
|
838
|
+
import_meta = {};
|
|
839
|
+
require2 = (0, import_node_module3.createRequire)(
|
|
840
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
|
|
841
|
+
);
|
|
842
|
+
MAX_CACHE_MEMORY = 256 * 1024;
|
|
822
843
|
_twEngine = null;
|
|
823
844
|
_twEngineError = null;
|
|
824
845
|
}
|
|
@@ -925,7 +946,7 @@ function getThemeConfig() {
|
|
|
925
946
|
}
|
|
926
947
|
function postProcessWithLightning(rawCss) {
|
|
927
948
|
if (!rawCss) return "";
|
|
928
|
-
const native =
|
|
949
|
+
const native = getNativeBridge();
|
|
929
950
|
if (!native?.processTailwindCssLightning) {
|
|
930
951
|
throw new Error("FATAL: Native binding 'processTailwindCssLightning' is required but not available.");
|
|
931
952
|
}
|
|
@@ -989,7 +1010,7 @@ function runCssPipelineSync(_classes) {
|
|
|
989
1010
|
return { css: "", classes: [], sizeBytes: 0, optimized: false };
|
|
990
1011
|
}
|
|
991
1012
|
function processTailwindCssWithTargets(css, targets) {
|
|
992
|
-
const native =
|
|
1013
|
+
const native = getNativeBridge();
|
|
993
1014
|
if (!native?.processTailwindCssWithTargets) {
|
|
994
1015
|
throw new Error("FATAL: Native binding 'processTailwindCssWithTargets' is required but not available.");
|
|
995
1016
|
}
|
|
@@ -999,24 +1020,31 @@ function processTailwindCssWithTargets(css, targets) {
|
|
|
999
1020
|
}
|
|
1000
1021
|
return result.css;
|
|
1001
1022
|
}
|
|
1002
|
-
var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
|
|
1023
|
+
var import_node_module4, import_meta2, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
|
|
1003
1024
|
var init_tailwindEngine2 = __esm({
|
|
1004
1025
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1026
|
+
"use strict";
|
|
1027
|
+
import_node_module4 = require("module");
|
|
1005
1028
|
init_nativeBridge();
|
|
1006
1029
|
init_cssGeneratorNative();
|
|
1007
1030
|
init_cssCompilationNative();
|
|
1008
1031
|
init_tailwindEngine();
|
|
1009
|
-
|
|
1032
|
+
import_meta2 = {};
|
|
1033
|
+
require3 = (0, import_node_module4.createRequire)(
|
|
1034
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta2 !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
|
|
1035
|
+
);
|
|
1010
1036
|
_cssCache = /* @__PURE__ */ new Map();
|
|
1011
1037
|
_cacheHits = 0;
|
|
1012
1038
|
_cacheMisses = 0;
|
|
1013
1039
|
MAX_CACHE_SIZE = 100;
|
|
1040
|
+
MAX_CACHE_MEMORY2 = 256 * 1024;
|
|
1014
1041
|
}
|
|
1015
1042
|
});
|
|
1016
1043
|
|
|
1017
1044
|
// packages/domain/compiler/src/compiler/index.ts
|
|
1018
1045
|
var init_compiler = __esm({
|
|
1019
1046
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
1047
|
+
"use strict";
|
|
1020
1048
|
init_cssGeneratorNative();
|
|
1021
1049
|
init_compilationNative();
|
|
1022
1050
|
init_cssCompilationNative();
|
|
@@ -1027,86 +1055,87 @@ var init_compiler = __esm({
|
|
|
1027
1055
|
});
|
|
1028
1056
|
|
|
1029
1057
|
// packages/domain/compiler/src/parser/index.ts
|
|
1030
|
-
|
|
1058
|
+
var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1031
1059
|
var init_parser = __esm({
|
|
1032
1060
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1061
|
+
"use strict";
|
|
1033
1062
|
init_nativeBridge();
|
|
1034
|
-
|
|
1035
|
-
const native =
|
|
1063
|
+
parseClasses = (raw) => {
|
|
1064
|
+
const native = getNativeBridge();
|
|
1036
1065
|
if (!native?.parseClasses) {
|
|
1037
1066
|
throw new Error("FATAL: Native binding 'parseClasses' is required but not available.");
|
|
1038
1067
|
}
|
|
1039
1068
|
return native.parseClasses(raw) || [];
|
|
1040
1069
|
};
|
|
1041
|
-
|
|
1042
|
-
const native =
|
|
1070
|
+
parseClass = (input) => {
|
|
1071
|
+
const native = getNativeBridge();
|
|
1043
1072
|
if (!native?.parseClass) {
|
|
1044
1073
|
throw new Error("FATAL: Native binding 'parseClass' is required but not available.");
|
|
1045
1074
|
}
|
|
1046
1075
|
const result = native.parseClass(input);
|
|
1047
1076
|
return typeof result === "string" ? JSON.parse(result) : result;
|
|
1048
1077
|
};
|
|
1049
|
-
|
|
1050
|
-
const native =
|
|
1078
|
+
extractAllClasses = (source) => {
|
|
1079
|
+
const native = getNativeBridge();
|
|
1051
1080
|
if (!native?.extractAllClasses) {
|
|
1052
1081
|
throw new Error("FATAL: Native binding 'extractAllClasses' is required but not available.");
|
|
1053
1082
|
}
|
|
1054
1083
|
return native.extractAllClasses(source) || [];
|
|
1055
1084
|
};
|
|
1056
|
-
|
|
1057
|
-
const native =
|
|
1085
|
+
extractClassesFromSource = (source) => {
|
|
1086
|
+
const native = getNativeBridge();
|
|
1058
1087
|
if (!native?.extractClassesFromSource) {
|
|
1059
1088
|
throw new Error("FATAL: Native binding 'extractClassesFromSource' is required but not available.");
|
|
1060
1089
|
}
|
|
1061
1090
|
const result = native.extractClassesFromSource(source);
|
|
1062
1091
|
return Array.isArray(result) ? result.join(" ") : String(result || "");
|
|
1063
1092
|
};
|
|
1064
|
-
|
|
1065
|
-
const native =
|
|
1093
|
+
astExtractClasses = (source, _filename) => {
|
|
1094
|
+
const native = getNativeBridge();
|
|
1066
1095
|
if (!native?.extractClassesFromSource) {
|
|
1067
1096
|
throw new Error("FATAL: Native binding 'extractClassesFromSource' is required but not available.");
|
|
1068
1097
|
}
|
|
1069
1098
|
return native.extractClassesFromSource(source) || [];
|
|
1070
1099
|
};
|
|
1071
|
-
|
|
1072
|
-
const result =
|
|
1100
|
+
normalizeClasses = (raw) => {
|
|
1101
|
+
const result = normalizeAndDedupClasses(raw);
|
|
1073
1102
|
return result?.normalized || "";
|
|
1074
1103
|
};
|
|
1075
|
-
|
|
1076
|
-
const result =
|
|
1104
|
+
mergeClassesStatic = (classes) => {
|
|
1105
|
+
const result = normalizeAndDedupClasses(classes);
|
|
1077
1106
|
return result?.normalized || "";
|
|
1078
1107
|
};
|
|
1079
|
-
|
|
1080
|
-
const native =
|
|
1108
|
+
normalizeAndDedupClasses = (raw) => {
|
|
1109
|
+
const native = getNativeBridge();
|
|
1081
1110
|
if (!native?.normalizeAndDedupClasses) {
|
|
1082
1111
|
throw new Error("FATAL: Native binding 'normalizeAndDedupClasses' is required but not available.");
|
|
1083
1112
|
}
|
|
1084
1113
|
const result = native.normalizeAndDedupClasses(raw);
|
|
1085
1114
|
return result || { normalized: "", duplicatesRemoved: 0, uniqueCount: 0 };
|
|
1086
1115
|
};
|
|
1087
|
-
|
|
1088
|
-
const native =
|
|
1116
|
+
extractComponentUsage = (source) => {
|
|
1117
|
+
const native = getNativeBridge();
|
|
1089
1118
|
if (!native?.extractComponentUsage) {
|
|
1090
1119
|
throw new Error("FATAL: Native binding 'extractComponentUsage' is required but not available.");
|
|
1091
1120
|
}
|
|
1092
1121
|
return native.extractComponentUsage(source) || [];
|
|
1093
1122
|
};
|
|
1094
|
-
|
|
1095
|
-
const native =
|
|
1123
|
+
batchExtractClasses = (filePaths) => {
|
|
1124
|
+
const native = getNativeBridge();
|
|
1096
1125
|
if (!native?.batchExtractClasses) {
|
|
1097
1126
|
throw new Error("FATAL: Native binding 'batchExtractClasses' is required but not available.");
|
|
1098
1127
|
}
|
|
1099
1128
|
return native.batchExtractClasses(filePaths) || [];
|
|
1100
1129
|
};
|
|
1101
|
-
|
|
1102
|
-
const native =
|
|
1130
|
+
checkAgainstSafelist = (classes, safelist) => {
|
|
1131
|
+
const native = getNativeBridge();
|
|
1103
1132
|
if (!native?.checkAgainstSafelist) {
|
|
1104
1133
|
throw new Error("FATAL: Native binding 'checkAgainstSafelist' is required but not available.");
|
|
1105
1134
|
}
|
|
1106
1135
|
return native.checkAgainstSafelist(classes, safelist) || { matched: [], unmatched: [], safelistSize: 0 };
|
|
1107
1136
|
};
|
|
1108
|
-
|
|
1109
|
-
const native =
|
|
1137
|
+
diffClassLists = (previous, current) => {
|
|
1138
|
+
const native = getNativeBridge();
|
|
1110
1139
|
if (!native?.diffClassLists) {
|
|
1111
1140
|
throw new Error("FATAL: Native binding 'diffClassLists' is required but not available.");
|
|
1112
1141
|
}
|
|
@@ -1117,27 +1146,27 @@ var init_parser = __esm({
|
|
|
1117
1146
|
|
|
1118
1147
|
// packages/domain/compiler/src/analyzer/analyzerNative.ts
|
|
1119
1148
|
function detectDeadCode(scanResultJson, css) {
|
|
1120
|
-
const native =
|
|
1149
|
+
const native = getNativeBridge();
|
|
1121
1150
|
if (!native?.detectDeadCode) throw new Error("detectDeadCode not available");
|
|
1122
1151
|
return native.detectDeadCode(scanResultJson, css);
|
|
1123
1152
|
}
|
|
1124
1153
|
function analyzeClassUsageNative(classes, scanResultJson, css) {
|
|
1125
|
-
const native =
|
|
1154
|
+
const native = getNativeBridge();
|
|
1126
1155
|
if (!native?.analyzeClassUsage) throw new Error("analyzeClassUsage not available");
|
|
1127
1156
|
return native.analyzeClassUsage(classes, scanResultJson, css);
|
|
1128
1157
|
}
|
|
1129
1158
|
function analyzeClassesNative(filesJson, cwd, flags) {
|
|
1130
|
-
const native =
|
|
1159
|
+
const native = getNativeBridge();
|
|
1131
1160
|
if (!native?.analyzeClasses) throw new Error("analyzeClasses not available");
|
|
1132
1161
|
return native.analyzeClasses(filesJson, cwd, flags ?? 0);
|
|
1133
1162
|
}
|
|
1134
1163
|
function analyzeRscNative(source, filename) {
|
|
1135
|
-
const native =
|
|
1164
|
+
const native = getNativeBridge();
|
|
1136
1165
|
if (!native?.analyzeRsc) throw new Error("analyzeRsc not available");
|
|
1137
1166
|
return native.analyzeRsc(source, filename);
|
|
1138
1167
|
}
|
|
1139
1168
|
function optimizeCssNative(css) {
|
|
1140
|
-
const native =
|
|
1169
|
+
const native = getNativeBridge();
|
|
1141
1170
|
if (!native?.processTailwindCssLightning) throw new Error("processTailwindCssLightning not available");
|
|
1142
1171
|
const result = native.processTailwindCssLightning(css);
|
|
1143
1172
|
return {
|
|
@@ -1148,73 +1177,74 @@ function optimizeCssNative(css) {
|
|
|
1148
1177
|
};
|
|
1149
1178
|
}
|
|
1150
1179
|
function processTailwindCssLightning(css) {
|
|
1151
|
-
const native =
|
|
1180
|
+
const native = getNativeBridge();
|
|
1152
1181
|
if (!native?.processTailwindCssLightning) throw new Error("processTailwindCssLightning not available");
|
|
1153
1182
|
return native.processTailwindCssLightning(css);
|
|
1154
1183
|
}
|
|
1155
1184
|
function eliminateDeadCssNative(css, deadClasses) {
|
|
1156
|
-
const native =
|
|
1185
|
+
const native = getNativeBridge();
|
|
1157
1186
|
if (!native?.eliminateDeadCss) throw new Error("eliminateDeadCss not available");
|
|
1158
1187
|
return native.eliminateDeadCss(css, deadClasses);
|
|
1159
1188
|
}
|
|
1160
1189
|
function hoistComponentsNative(source) {
|
|
1161
|
-
const native =
|
|
1190
|
+
const native = getNativeBridge();
|
|
1162
1191
|
if (!native?.hoistComponents) throw new Error("hoistComponents not available");
|
|
1163
1192
|
return native.hoistComponents(source);
|
|
1164
1193
|
}
|
|
1165
1194
|
function compileVariantTableNative(configJson) {
|
|
1166
|
-
const native =
|
|
1195
|
+
const native = getNativeBridge();
|
|
1167
1196
|
if (!native?.compileVariantTable) throw new Error("compileVariantTable not available");
|
|
1168
1197
|
return native.compileVariantTable(configJson);
|
|
1169
1198
|
}
|
|
1170
1199
|
function classifyAndSortClassesNative(classes) {
|
|
1171
|
-
const native =
|
|
1200
|
+
const native = getNativeBridge();
|
|
1172
1201
|
if (!native?.classifyAndSortClasses) throw new Error("classifyAndSortClasses not available");
|
|
1173
1202
|
return native.classifyAndSortClasses(classes);
|
|
1174
1203
|
}
|
|
1175
1204
|
function mergeCssDeclarationsNative(cssChunks) {
|
|
1176
|
-
const native =
|
|
1205
|
+
const native = getNativeBridge();
|
|
1177
1206
|
if (!native?.mergeCssDeclarations) throw new Error("mergeCssDeclarations not available");
|
|
1178
1207
|
return native.mergeCssDeclarations(cssChunks);
|
|
1179
1208
|
}
|
|
1180
1209
|
function getWeek6FeaturesStatus() {
|
|
1181
|
-
const native =
|
|
1210
|
+
const native = getNativeBridge();
|
|
1182
1211
|
if (!native?.getWeek6FeaturesStatus) throw new Error("getWeek6FeaturesStatus not available");
|
|
1183
1212
|
const resultJson = native.getWeek6FeaturesStatus();
|
|
1184
1213
|
return JSON.parse(resultJson);
|
|
1185
1214
|
}
|
|
1186
1215
|
function getMemoryStatsNative() {
|
|
1187
|
-
const native =
|
|
1216
|
+
const native = getNativeBridge();
|
|
1188
1217
|
if (!native?.getMemoryStatsNative) throw new Error("getMemoryStatsNative not available");
|
|
1189
1218
|
const resultJson = native.getMemoryStatsNative();
|
|
1190
1219
|
return JSON.parse(resultJson);
|
|
1191
1220
|
}
|
|
1192
1221
|
function getMemoryRecommendationsNative() {
|
|
1193
|
-
const native =
|
|
1222
|
+
const native = getNativeBridge();
|
|
1194
1223
|
if (!native?.getMemoryRecommendationsNative) throw new Error("getMemoryRecommendationsNative not available");
|
|
1195
1224
|
const resultJson = native.getMemoryRecommendationsNative();
|
|
1196
1225
|
return JSON.parse(resultJson);
|
|
1197
1226
|
}
|
|
1198
1227
|
function estimateOptimalCacheConfigNative(workloadType, expectedEntries) {
|
|
1199
|
-
const native =
|
|
1228
|
+
const native = getNativeBridge();
|
|
1200
1229
|
if (!native?.estimateOptimalCacheConfigNative) throw new Error("estimateOptimalCacheConfigNative not available");
|
|
1201
1230
|
const resultJson = native.estimateOptimalCacheConfigNative(workloadType, expectedEntries);
|
|
1202
1231
|
return JSON.parse(resultJson);
|
|
1203
1232
|
}
|
|
1204
1233
|
function resetMemoryStats() {
|
|
1205
|
-
const native =
|
|
1234
|
+
const native = getNativeBridge();
|
|
1206
1235
|
if (!native?.resetMemoryStats) throw new Error("resetMemoryStats not available");
|
|
1207
1236
|
native.resetMemoryStats();
|
|
1208
1237
|
}
|
|
1209
1238
|
var init_analyzerNative = __esm({
|
|
1210
1239
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
1240
|
+
"use strict";
|
|
1211
1241
|
init_nativeBridge();
|
|
1212
1242
|
}
|
|
1213
1243
|
});
|
|
1214
1244
|
|
|
1215
1245
|
// packages/domain/compiler/src/analyzer/themeResolutionNative.ts
|
|
1216
1246
|
function resolveVariants(configJson) {
|
|
1217
|
-
const native =
|
|
1247
|
+
const native = getNativeBridge();
|
|
1218
1248
|
if (!native?.resolve_variants) throw new Error("resolve_variants not available");
|
|
1219
1249
|
const resultJson = native.resolve_variants(configJson);
|
|
1220
1250
|
try {
|
|
@@ -1229,7 +1259,7 @@ function resolveVariants(configJson) {
|
|
|
1229
1259
|
}
|
|
1230
1260
|
}
|
|
1231
1261
|
function validateThemeConfig(configJson) {
|
|
1232
|
-
const native =
|
|
1262
|
+
const native = getNativeBridge();
|
|
1233
1263
|
if (!native?.validate_variant_config) throw new Error("validate_variant_config not available");
|
|
1234
1264
|
const resultJson = native.validate_variant_config(configJson);
|
|
1235
1265
|
try {
|
|
@@ -1244,7 +1274,7 @@ function validateThemeConfig(configJson) {
|
|
|
1244
1274
|
}
|
|
1245
1275
|
}
|
|
1246
1276
|
function resolveCascade(baseThemeJson, overridesJson) {
|
|
1247
|
-
const native =
|
|
1277
|
+
const native = getNativeBridge();
|
|
1248
1278
|
if (!native?.resolve_cascade) throw new Error("resolve_cascade not available");
|
|
1249
1279
|
const resultJson = native.resolve_cascade(baseThemeJson, overridesJson);
|
|
1250
1280
|
try {
|
|
@@ -1259,7 +1289,7 @@ function resolveCascade(baseThemeJson, overridesJson) {
|
|
|
1259
1289
|
}
|
|
1260
1290
|
}
|
|
1261
1291
|
function resolveClassNames(classNames, themeJson) {
|
|
1262
|
-
const native =
|
|
1292
|
+
const native = getNativeBridge();
|
|
1263
1293
|
if (!native?.resolve_class_names) throw new Error("resolve_class_names not available");
|
|
1264
1294
|
const resultJson = native.resolve_class_names(classNames, themeJson);
|
|
1265
1295
|
try {
|
|
@@ -1269,7 +1299,7 @@ function resolveClassNames(classNames, themeJson) {
|
|
|
1269
1299
|
}
|
|
1270
1300
|
}
|
|
1271
1301
|
function resolveConflictGroup(groupName, themeJson) {
|
|
1272
|
-
const native =
|
|
1302
|
+
const native = getNativeBridge();
|
|
1273
1303
|
if (!native?.resolve_conflict_group)
|
|
1274
1304
|
throw new Error("resolve_conflict_group not available");
|
|
1275
1305
|
const resultJson = native.resolve_conflict_group(groupName, themeJson);
|
|
@@ -1285,12 +1315,12 @@ function resolveConflictGroup(groupName, themeJson) {
|
|
|
1285
1315
|
}
|
|
1286
1316
|
}
|
|
1287
1317
|
function resolveThemeValue(keyPath, themeJson) {
|
|
1288
|
-
const native =
|
|
1318
|
+
const native = getNativeBridge();
|
|
1289
1319
|
if (!native?.resolve_theme_value) throw new Error("resolve_theme_value not available");
|
|
1290
1320
|
return native.resolve_theme_value(keyPath, themeJson);
|
|
1291
1321
|
}
|
|
1292
1322
|
function resolveSimpleVariants(configJson) {
|
|
1293
|
-
const native =
|
|
1323
|
+
const native = getNativeBridge();
|
|
1294
1324
|
if (!native?.resolve_simple_variants) throw new Error("resolve_simple_variants not available");
|
|
1295
1325
|
const resultJson = native.resolve_simple_variants(configJson);
|
|
1296
1326
|
try {
|
|
@@ -1301,53 +1331,55 @@ function resolveSimpleVariants(configJson) {
|
|
|
1301
1331
|
}
|
|
1302
1332
|
var init_themeResolutionNative = __esm({
|
|
1303
1333
|
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
1334
|
+
"use strict";
|
|
1304
1335
|
init_nativeBridge();
|
|
1305
1336
|
}
|
|
1306
1337
|
});
|
|
1307
1338
|
|
|
1308
1339
|
// packages/domain/compiler/src/analyzer/scannerNative.ts
|
|
1309
1340
|
function scanWorkspace(root, extensions) {
|
|
1310
|
-
const native =
|
|
1341
|
+
const native = getNativeBridge();
|
|
1311
1342
|
if (!native?.scan_workspace) throw new Error("scan_workspace not available");
|
|
1312
1343
|
return native.scan_workspace(root, extensions);
|
|
1313
1344
|
}
|
|
1314
1345
|
function extractClassesFromSourceNative(source) {
|
|
1315
|
-
const native =
|
|
1346
|
+
const native = getNativeBridge();
|
|
1316
1347
|
if (!native?.extract_classes_from_source) throw new Error("extract_classes_from_source not available");
|
|
1317
1348
|
return native.extract_classes_from_source(source);
|
|
1318
1349
|
}
|
|
1319
1350
|
function batchExtractClassesNative(filePaths) {
|
|
1320
|
-
const native =
|
|
1351
|
+
const native = getNativeBridge();
|
|
1321
1352
|
if (!native?.batch_extract_classes) throw new Error("batch_extract_classes not available");
|
|
1322
1353
|
return native.batch_extract_classes(filePaths);
|
|
1323
1354
|
}
|
|
1324
1355
|
function checkAgainstSafelistNative(classes, safelist) {
|
|
1325
|
-
const native =
|
|
1356
|
+
const native = getNativeBridge();
|
|
1326
1357
|
if (!native?.check_against_safelist) throw new Error("check_against_safelist not available");
|
|
1327
1358
|
return native.check_against_safelist(classes, safelist);
|
|
1328
1359
|
}
|
|
1329
1360
|
function scanFile(filePath) {
|
|
1330
|
-
const native =
|
|
1361
|
+
const native = getNativeBridge();
|
|
1331
1362
|
if (!native?.scan_file) throw new Error("scan_file not available");
|
|
1332
1363
|
return native.scan_file(filePath);
|
|
1333
1364
|
}
|
|
1334
1365
|
function collectFiles(root, extensions) {
|
|
1335
|
-
const native =
|
|
1366
|
+
const native = getNativeBridge();
|
|
1336
1367
|
if (!native?.collect_files) throw new Error("collect_files not available");
|
|
1337
1368
|
return native.collect_files(root, extensions);
|
|
1338
1369
|
}
|
|
1339
1370
|
function walkAndPrefilterSourceFiles(root, extensions, _parallel) {
|
|
1340
|
-
const native =
|
|
1371
|
+
const native = getNativeBridge();
|
|
1341
1372
|
if (!native?.walk_and_prefilter_source_files) throw new Error("walk_and_prefilter_source_files not available");
|
|
1342
1373
|
return native.walk_and_prefilter_source_files(root, extensions);
|
|
1343
1374
|
}
|
|
1344
1375
|
function generateSubComponentTypes(root, outputPath) {
|
|
1345
|
-
const native =
|
|
1376
|
+
const native = getNativeBridge();
|
|
1346
1377
|
if (!native?.generate_sub_component_types) throw new Error("generate_sub_component_types not available");
|
|
1347
1378
|
return native.generate_sub_component_types(root, outputPath);
|
|
1348
1379
|
}
|
|
1349
1380
|
var init_scannerNative = __esm({
|
|
1350
1381
|
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
1382
|
+
"use strict";
|
|
1351
1383
|
init_nativeBridge();
|
|
1352
1384
|
}
|
|
1353
1385
|
});
|
|
@@ -1355,6 +1387,7 @@ var init_scannerNative = __esm({
|
|
|
1355
1387
|
// packages/domain/compiler/src/analyzer/index.ts
|
|
1356
1388
|
var init_analyzer = __esm({
|
|
1357
1389
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
1390
|
+
"use strict";
|
|
1358
1391
|
init_analyzerNative();
|
|
1359
1392
|
init_themeResolutionNative();
|
|
1360
1393
|
init_scannerNative();
|
|
@@ -1363,7 +1396,7 @@ var init_analyzer = __esm({
|
|
|
1363
1396
|
|
|
1364
1397
|
// packages/domain/compiler/src/cache/cacheNative.ts
|
|
1365
1398
|
function getCacheStatistics() {
|
|
1366
|
-
const native =
|
|
1399
|
+
const native = getNativeBridge();
|
|
1367
1400
|
if (!native?.get_cache_statistics) throw new Error("get_cache_statistics not available");
|
|
1368
1401
|
const statsJson = native.get_cache_statistics();
|
|
1369
1402
|
try {
|
|
@@ -1380,7 +1413,7 @@ function getCacheStatistics() {
|
|
|
1380
1413
|
}
|
|
1381
1414
|
}
|
|
1382
1415
|
function clearAllCaches() {
|
|
1383
|
-
const native =
|
|
1416
|
+
const native = getNativeBridge();
|
|
1384
1417
|
if (!native?.clear_all_caches) return;
|
|
1385
1418
|
try {
|
|
1386
1419
|
native.clear_all_caches();
|
|
@@ -1388,7 +1421,7 @@ function clearAllCaches() {
|
|
|
1388
1421
|
}
|
|
1389
1422
|
}
|
|
1390
1423
|
function clearParseCache() {
|
|
1391
|
-
const native =
|
|
1424
|
+
const native = getNativeBridge();
|
|
1392
1425
|
if (!native?.clear_parse_cache) return;
|
|
1393
1426
|
try {
|
|
1394
1427
|
native.clear_parse_cache();
|
|
@@ -1396,7 +1429,7 @@ function clearParseCache() {
|
|
|
1396
1429
|
}
|
|
1397
1430
|
}
|
|
1398
1431
|
function clearResolveCache() {
|
|
1399
|
-
const native =
|
|
1432
|
+
const native = getNativeBridge();
|
|
1400
1433
|
if (!native?.clear_resolve_cache) return;
|
|
1401
1434
|
try {
|
|
1402
1435
|
native.clear_resolve_cache();
|
|
@@ -1404,7 +1437,7 @@ function clearResolveCache() {
|
|
|
1404
1437
|
}
|
|
1405
1438
|
}
|
|
1406
1439
|
function clearCompileCache() {
|
|
1407
|
-
const native =
|
|
1440
|
+
const native = getNativeBridge();
|
|
1408
1441
|
if (!native?.clear_compile_cache) return;
|
|
1409
1442
|
try {
|
|
1410
1443
|
native.clear_compile_cache();
|
|
@@ -1412,7 +1445,7 @@ function clearCompileCache() {
|
|
|
1412
1445
|
}
|
|
1413
1446
|
}
|
|
1414
1447
|
function clearCssGenCache() {
|
|
1415
|
-
const native =
|
|
1448
|
+
const native = getNativeBridge();
|
|
1416
1449
|
if (!native?.clear_css_gen_cache) return;
|
|
1417
1450
|
try {
|
|
1418
1451
|
native.clear_css_gen_cache();
|
|
@@ -1420,7 +1453,7 @@ function clearCssGenCache() {
|
|
|
1420
1453
|
}
|
|
1421
1454
|
}
|
|
1422
1455
|
function getCacheOptimizationHints(hitRatePercent, memoryUsedMb) {
|
|
1423
|
-
const native =
|
|
1456
|
+
const native = getNativeBridge();
|
|
1424
1457
|
if (!native?.get_cache_optimization_hints)
|
|
1425
1458
|
throw new Error("get_cache_optimization_hints not available");
|
|
1426
1459
|
const hintsJson = native.get_cache_optimization_hints(
|
|
@@ -1440,7 +1473,7 @@ function getCacheOptimizationHints(hitRatePercent, memoryUsedMb) {
|
|
|
1440
1473
|
}
|
|
1441
1474
|
}
|
|
1442
1475
|
function estimateOptimalCacheConfig(totalBudgetMb, workloadType) {
|
|
1443
|
-
const native =
|
|
1476
|
+
const native = getNativeBridge();
|
|
1444
1477
|
if (!native?.estimate_optimal_cache_config_native)
|
|
1445
1478
|
throw new Error("estimate_optimal_cache_config_native not available");
|
|
1446
1479
|
const configJson = native.estimate_optimal_cache_config_native(
|
|
@@ -1462,7 +1495,7 @@ function estimateOptimalCacheConfig(totalBudgetMb, workloadType) {
|
|
|
1462
1495
|
}
|
|
1463
1496
|
}
|
|
1464
1497
|
function cacheRead(cachePath) {
|
|
1465
|
-
const native =
|
|
1498
|
+
const native = getNativeBridge();
|
|
1466
1499
|
if (!native?.cache_read) throw new Error("cache_read not available");
|
|
1467
1500
|
const result = native.cache_read(cachePath);
|
|
1468
1501
|
try {
|
|
@@ -1472,7 +1505,7 @@ function cacheRead(cachePath) {
|
|
|
1472
1505
|
}
|
|
1473
1506
|
}
|
|
1474
1507
|
function cacheWrite(cachePath, entries) {
|
|
1475
|
-
const native =
|
|
1508
|
+
const native = getNativeBridge();
|
|
1476
1509
|
if (!native?.cache_write) throw new Error("cache_write not available");
|
|
1477
1510
|
try {
|
|
1478
1511
|
const result = native.cache_write(
|
|
@@ -1491,12 +1524,12 @@ function cacheWrite(cachePath, entries) {
|
|
|
1491
1524
|
}
|
|
1492
1525
|
}
|
|
1493
1526
|
function cachePriority(mtimeMs, sizeBytes, hitCount) {
|
|
1494
|
-
const native =
|
|
1527
|
+
const native = getNativeBridge();
|
|
1495
1528
|
if (!native?.cache_priority) throw new Error("cache_priority not available");
|
|
1496
1529
|
return native.cache_priority(mtimeMs, sizeBytes, hitCount);
|
|
1497
1530
|
}
|
|
1498
1531
|
function getResolverPoolStats() {
|
|
1499
|
-
const native =
|
|
1532
|
+
const native = getNativeBridge();
|
|
1500
1533
|
if (!native?.getResolverPoolStats) throw new Error("getResolverPoolStats not available");
|
|
1501
1534
|
const statsJson = native.getResolverPoolStats();
|
|
1502
1535
|
try {
|
|
@@ -1512,7 +1545,7 @@ function getResolverPoolStats() {
|
|
|
1512
1545
|
}
|
|
1513
1546
|
}
|
|
1514
1547
|
function clearResolverPool() {
|
|
1515
|
-
const native =
|
|
1548
|
+
const native = getNativeBridge();
|
|
1516
1549
|
if (!native?.clearResolverPool) throw new Error("clearResolverPool not available");
|
|
1517
1550
|
const resultJson = native.clearResolverPool();
|
|
1518
1551
|
try {
|
|
@@ -1522,27 +1555,28 @@ function clearResolverPool() {
|
|
|
1522
1555
|
}
|
|
1523
1556
|
}
|
|
1524
1557
|
function resolveColorCached(themeId, color, configJson) {
|
|
1525
|
-
const native =
|
|
1558
|
+
const native = getNativeBridge();
|
|
1526
1559
|
if (!native?.resolveColorCached) throw new Error("resolveColorCached not available");
|
|
1527
1560
|
return native.resolveColorCached(themeId, color, configJson);
|
|
1528
1561
|
}
|
|
1529
1562
|
function resolveSpacingCached(themeId, spacing, configJson) {
|
|
1530
|
-
const native =
|
|
1563
|
+
const native = getNativeBridge();
|
|
1531
1564
|
if (!native?.resolveSpacingCached) throw new Error("resolveSpacingCached not available");
|
|
1532
1565
|
return native.resolveSpacingCached(themeId, spacing, configJson);
|
|
1533
1566
|
}
|
|
1534
1567
|
function resolveFontSizeCached(themeId, size, configJson) {
|
|
1535
|
-
const native =
|
|
1568
|
+
const native = getNativeBridge();
|
|
1536
1569
|
if (!native?.resolveFontSizeCached) throw new Error("resolveFontSizeCached not available");
|
|
1537
1570
|
return native.resolveFontSizeCached(themeId, size, configJson);
|
|
1538
1571
|
}
|
|
1539
1572
|
function resetResolverPoolStats() {
|
|
1540
|
-
const native =
|
|
1573
|
+
const native = getNativeBridge();
|
|
1541
1574
|
if (!native?.resetResolverPoolStats) throw new Error("resetResolverPoolStats not available");
|
|
1542
1575
|
native.resetResolverPoolStats();
|
|
1543
1576
|
}
|
|
1544
1577
|
var init_cacheNative = __esm({
|
|
1545
1578
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
1579
|
+
"use strict";
|
|
1546
1580
|
init_nativeBridge();
|
|
1547
1581
|
}
|
|
1548
1582
|
});
|
|
@@ -1550,39 +1584,40 @@ var init_cacheNative = __esm({
|
|
|
1550
1584
|
// packages/domain/compiler/src/cache/index.ts
|
|
1551
1585
|
var init_cache = __esm({
|
|
1552
1586
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
1587
|
+
"use strict";
|
|
1553
1588
|
init_cacheNative();
|
|
1554
1589
|
}
|
|
1555
1590
|
});
|
|
1556
1591
|
|
|
1557
1592
|
// packages/domain/compiler/src/redis/redisNative.ts
|
|
1558
1593
|
function redisPing() {
|
|
1559
|
-
const native =
|
|
1594
|
+
const native = getNativeBridge();
|
|
1560
1595
|
if (!native?.redis_ping) throw new Error("redis_ping not available");
|
|
1561
1596
|
return native.redis_ping();
|
|
1562
1597
|
}
|
|
1563
1598
|
function redisGet(key) {
|
|
1564
|
-
const native =
|
|
1599
|
+
const native = getNativeBridge();
|
|
1565
1600
|
if (!native?.redis_get) throw new Error("redis_get not available");
|
|
1566
1601
|
const result = native.redis_get(key);
|
|
1567
1602
|
return result === "nil" ? null : result;
|
|
1568
1603
|
}
|
|
1569
1604
|
function redisSet(key, value, ttl_seconds) {
|
|
1570
|
-
const native =
|
|
1605
|
+
const native = getNativeBridge();
|
|
1571
1606
|
if (!native?.redis_set) throw new Error("redis_set not available");
|
|
1572
1607
|
return native.redis_set(key, value, ttl_seconds);
|
|
1573
1608
|
}
|
|
1574
1609
|
function redisDelete(key) {
|
|
1575
|
-
const native =
|
|
1610
|
+
const native = getNativeBridge();
|
|
1576
1611
|
if (!native?.redis_delete) throw new Error("redis_delete not available");
|
|
1577
1612
|
return native.redis_delete(key);
|
|
1578
1613
|
}
|
|
1579
1614
|
function redisExists(key) {
|
|
1580
|
-
const native =
|
|
1615
|
+
const native = getNativeBridge();
|
|
1581
1616
|
if (!native?.redis_exists) throw new Error("redis_exists not available");
|
|
1582
1617
|
return native.redis_exists(key);
|
|
1583
1618
|
}
|
|
1584
1619
|
function redisMget(keys) {
|
|
1585
|
-
const native =
|
|
1620
|
+
const native = getNativeBridge();
|
|
1586
1621
|
if (!native?.redis_mget) throw new Error("redis_mget not available");
|
|
1587
1622
|
const result = native.redis_mget(keys);
|
|
1588
1623
|
try {
|
|
@@ -1592,27 +1627,27 @@ function redisMget(keys) {
|
|
|
1592
1627
|
}
|
|
1593
1628
|
}
|
|
1594
1629
|
function redisMset(pairs) {
|
|
1595
|
-
const native =
|
|
1630
|
+
const native = getNativeBridge();
|
|
1596
1631
|
if (!native?.redis_mset) throw new Error("redis_mset not available");
|
|
1597
1632
|
return native.redis_mset(pairs);
|
|
1598
1633
|
}
|
|
1599
1634
|
function redisFlushDb() {
|
|
1600
|
-
const native =
|
|
1635
|
+
const native = getNativeBridge();
|
|
1601
1636
|
if (!native?.redis_flush_db) throw new Error("redis_flush_db not available");
|
|
1602
1637
|
return native.redis_flush_db();
|
|
1603
1638
|
}
|
|
1604
1639
|
function redisFlushAll() {
|
|
1605
|
-
const native =
|
|
1640
|
+
const native = getNativeBridge();
|
|
1606
1641
|
if (!native?.redis_flush_all) throw new Error("redis_flush_all not available");
|
|
1607
1642
|
return native.redis_flush_all();
|
|
1608
1643
|
}
|
|
1609
1644
|
function redisPoolConnect(host, port, pool_size) {
|
|
1610
|
-
const native =
|
|
1645
|
+
const native = getNativeBridge();
|
|
1611
1646
|
if (!native?.redis_pool_connect) throw new Error("redis_pool_connect not available");
|
|
1612
1647
|
return native.redis_pool_connect(host, port, pool_size);
|
|
1613
1648
|
}
|
|
1614
1649
|
function redisPoolStats() {
|
|
1615
|
-
const native =
|
|
1650
|
+
const native = getNativeBridge();
|
|
1616
1651
|
if (!native?.redis_pool_stats) throw new Error("redis_pool_stats not available");
|
|
1617
1652
|
const result = native.redis_pool_stats();
|
|
1618
1653
|
try {
|
|
@@ -1628,12 +1663,12 @@ function redisPoolStats() {
|
|
|
1628
1663
|
}
|
|
1629
1664
|
}
|
|
1630
1665
|
function redisPoolReconnect() {
|
|
1631
|
-
const native =
|
|
1666
|
+
const native = getNativeBridge();
|
|
1632
1667
|
if (!native?.redis_pool_reconnect) throw new Error("redis_pool_reconnect not available");
|
|
1633
1668
|
return native.redis_pool_reconnect();
|
|
1634
1669
|
}
|
|
1635
1670
|
function redisEnableCluster(initial_nodes) {
|
|
1636
|
-
const native =
|
|
1671
|
+
const native = getNativeBridge();
|
|
1637
1672
|
if (!native?.redis_enable_cluster) throw new Error("redis_enable_cluster not available");
|
|
1638
1673
|
const result = native.redis_enable_cluster(initial_nodes);
|
|
1639
1674
|
try {
|
|
@@ -1650,12 +1685,12 @@ function redisEnableCluster(initial_nodes) {
|
|
|
1650
1685
|
}
|
|
1651
1686
|
}
|
|
1652
1687
|
function redisDisableCluster() {
|
|
1653
|
-
const native =
|
|
1688
|
+
const native = getNativeBridge();
|
|
1654
1689
|
if (!native?.redis_disable_cluster) throw new Error("redis_disable_cluster not available");
|
|
1655
1690
|
return native.redis_disable_cluster();
|
|
1656
1691
|
}
|
|
1657
1692
|
function redisClusterStatus() {
|
|
1658
|
-
const native =
|
|
1693
|
+
const native = getNativeBridge();
|
|
1659
1694
|
if (!native?.redis_cluster_status) throw new Error("redis_cluster_status not available");
|
|
1660
1695
|
const result = native.redis_cluster_status();
|
|
1661
1696
|
try {
|
|
@@ -1672,22 +1707,22 @@ function redisClusterStatus() {
|
|
|
1672
1707
|
}
|
|
1673
1708
|
}
|
|
1674
1709
|
function redisSubscribe(channel) {
|
|
1675
|
-
const native =
|
|
1710
|
+
const native = getNativeBridge();
|
|
1676
1711
|
if (!native?.redis_subscribe) throw new Error("redis_subscribe not available");
|
|
1677
1712
|
return native.redis_subscribe(channel);
|
|
1678
1713
|
}
|
|
1679
1714
|
function redisPublish(channel, message) {
|
|
1680
|
-
const native =
|
|
1715
|
+
const native = getNativeBridge();
|
|
1681
1716
|
if (!native?.redis_publish) throw new Error("redis_publish not available");
|
|
1682
1717
|
return native.redis_publish(channel, message);
|
|
1683
1718
|
}
|
|
1684
1719
|
function redisExpirationSet(key, ttl_seconds) {
|
|
1685
|
-
const native =
|
|
1720
|
+
const native = getNativeBridge();
|
|
1686
1721
|
if (!native?.redis_expiration_set) throw new Error("redis_expiration_set not available");
|
|
1687
1722
|
return native.redis_expiration_set(key, ttl_seconds);
|
|
1688
1723
|
}
|
|
1689
1724
|
function redisExpirationGet(key) {
|
|
1690
|
-
const native =
|
|
1725
|
+
const native = getNativeBridge();
|
|
1691
1726
|
if (!native?.redis_expiration_get) throw new Error("redis_expiration_get not available");
|
|
1692
1727
|
const result = native.redis_expiration_get(key);
|
|
1693
1728
|
try {
|
|
@@ -1702,102 +1737,103 @@ function redisExpirationGet(key) {
|
|
|
1702
1737
|
}
|
|
1703
1738
|
}
|
|
1704
1739
|
function redisInfo() {
|
|
1705
|
-
const native =
|
|
1740
|
+
const native = getNativeBridge();
|
|
1706
1741
|
if (!native?.redis_info) throw new Error("redis_info not available");
|
|
1707
1742
|
return native.redis_info();
|
|
1708
1743
|
}
|
|
1709
1744
|
function redisMonitor() {
|
|
1710
|
-
const native =
|
|
1745
|
+
const native = getNativeBridge();
|
|
1711
1746
|
if (!native?.redis_monitor) throw new Error("redis_monitor not available");
|
|
1712
1747
|
return native.redis_monitor();
|
|
1713
1748
|
}
|
|
1714
1749
|
function redisCacheSize() {
|
|
1715
|
-
const native =
|
|
1750
|
+
const native = getNativeBridge();
|
|
1716
1751
|
if (!native?.redis_cache_size) throw new Error("redis_cache_size not available");
|
|
1717
1752
|
return native.redis_cache_size();
|
|
1718
1753
|
}
|
|
1719
1754
|
function redisCacheKeyCount() {
|
|
1720
|
-
const native =
|
|
1755
|
+
const native = getNativeBridge();
|
|
1721
1756
|
if (!native?.redis_cache_key_count) throw new Error("redis_cache_key_count not available");
|
|
1722
1757
|
return native.redis_cache_key_count();
|
|
1723
1758
|
}
|
|
1724
1759
|
function redisCacheClear() {
|
|
1725
|
-
const native =
|
|
1760
|
+
const native = getNativeBridge();
|
|
1726
1761
|
if (!native?.redis_cache_clear) throw new Error("redis_cache_clear not available");
|
|
1727
1762
|
return native.redis_cache_clear();
|
|
1728
1763
|
}
|
|
1729
1764
|
function redisCacheHitRate() {
|
|
1730
|
-
const native =
|
|
1765
|
+
const native = getNativeBridge();
|
|
1731
1766
|
if (!native?.redis_cache_hit_rate) throw new Error("redis_cache_hit_rate not available");
|
|
1732
1767
|
return native.redis_cache_hit_rate();
|
|
1733
1768
|
}
|
|
1734
1769
|
function redisEnablePersistence(mode) {
|
|
1735
|
-
const native =
|
|
1770
|
+
const native = getNativeBridge();
|
|
1736
1771
|
if (!native?.redis_enable_persistence) throw new Error("redis_enable_persistence not available");
|
|
1737
1772
|
return native.redis_enable_persistence(mode);
|
|
1738
1773
|
}
|
|
1739
1774
|
function redisDisablePersistence() {
|
|
1740
|
-
const native =
|
|
1775
|
+
const native = getNativeBridge();
|
|
1741
1776
|
if (!native?.redis_disable_persistence) throw new Error("redis_disable_persistence not available");
|
|
1742
1777
|
return native.redis_disable_persistence();
|
|
1743
1778
|
}
|
|
1744
1779
|
function redisSnapshot() {
|
|
1745
|
-
const native =
|
|
1780
|
+
const native = getNativeBridge();
|
|
1746
1781
|
if (!native?.redis_snapshot) throw new Error("redis_snapshot not available");
|
|
1747
1782
|
return native.redis_snapshot();
|
|
1748
1783
|
}
|
|
1749
1784
|
function redisMemoryStats() {
|
|
1750
|
-
const native =
|
|
1785
|
+
const native = getNativeBridge();
|
|
1751
1786
|
if (!native?.redis_memory_stats) throw new Error("redis_memory_stats not available");
|
|
1752
1787
|
return native.redis_memory_stats();
|
|
1753
1788
|
}
|
|
1754
1789
|
function redisOptimizeMemory() {
|
|
1755
|
-
const native =
|
|
1790
|
+
const native = getNativeBridge();
|
|
1756
1791
|
if (!native?.redis_optimize_memory) throw new Error("redis_optimize_memory not available");
|
|
1757
1792
|
return native.redis_optimize_memory();
|
|
1758
1793
|
}
|
|
1759
1794
|
function redisSetEvictionPolicy(policy) {
|
|
1760
|
-
const native =
|
|
1795
|
+
const native = getNativeBridge();
|
|
1761
1796
|
if (!native?.redis_set_eviction_policy) throw new Error("redis_set_eviction_policy not available");
|
|
1762
1797
|
return native.redis_set_eviction_policy(policy);
|
|
1763
1798
|
}
|
|
1764
1799
|
function redisGetEvictionPolicy() {
|
|
1765
|
-
const native =
|
|
1800
|
+
const native = getNativeBridge();
|
|
1766
1801
|
if (!native?.redis_get_eviction_policy) throw new Error("redis_get_eviction_policy not available");
|
|
1767
1802
|
return native.redis_get_eviction_policy();
|
|
1768
1803
|
}
|
|
1769
1804
|
function redisReplicate(target_host, target_port) {
|
|
1770
|
-
const native =
|
|
1805
|
+
const native = getNativeBridge();
|
|
1771
1806
|
if (!native?.redis_replicate) throw new Error("redis_replicate not available");
|
|
1772
1807
|
return native.redis_replicate(target_host, target_port);
|
|
1773
1808
|
}
|
|
1774
1809
|
function redisReplicationStatus() {
|
|
1775
|
-
const native =
|
|
1810
|
+
const native = getNativeBridge();
|
|
1776
1811
|
if (!native?.redis_replication_status) throw new Error("redis_replication_status not available");
|
|
1777
1812
|
return native.redis_replication_status();
|
|
1778
1813
|
}
|
|
1779
1814
|
function redisCacheSync(peers) {
|
|
1780
|
-
const native =
|
|
1815
|
+
const native = getNativeBridge();
|
|
1781
1816
|
if (!native?.redis_cache_sync) throw new Error("redis_cache_sync not available");
|
|
1782
1817
|
return native.redis_cache_sync(peers);
|
|
1783
1818
|
}
|
|
1784
1819
|
function redisEnableCacheWarming(key_pattern) {
|
|
1785
|
-
const native =
|
|
1820
|
+
const native = getNativeBridge();
|
|
1786
1821
|
if (!native?.redis_enable_cache_warming) throw new Error("redis_enable_cache_warming not available");
|
|
1787
1822
|
return native.redis_enable_cache_warming(key_pattern);
|
|
1788
1823
|
}
|
|
1789
1824
|
function redisDisableCacheWarming() {
|
|
1790
|
-
const native =
|
|
1825
|
+
const native = getNativeBridge();
|
|
1791
1826
|
if (!native?.redis_disable_cache_warming) throw new Error("redis_disable_cache_warming not available");
|
|
1792
1827
|
return native.redis_disable_cache_warming();
|
|
1793
1828
|
}
|
|
1794
1829
|
function redisDiagnose() {
|
|
1795
|
-
const native =
|
|
1830
|
+
const native = getNativeBridge();
|
|
1796
1831
|
if (!native?.redis_diagnose) throw new Error("redis_diagnose not available");
|
|
1797
1832
|
return native.redis_diagnose();
|
|
1798
1833
|
}
|
|
1799
1834
|
var init_redisNative = __esm({
|
|
1800
1835
|
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
1836
|
+
"use strict";
|
|
1801
1837
|
init_nativeBridge();
|
|
1802
1838
|
}
|
|
1803
1839
|
});
|
|
@@ -1805,18 +1841,19 @@ var init_redisNative = __esm({
|
|
|
1805
1841
|
// packages/domain/compiler/src/redis/index.ts
|
|
1806
1842
|
var init_redis = __esm({
|
|
1807
1843
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
1844
|
+
"use strict";
|
|
1808
1845
|
init_redisNative();
|
|
1809
1846
|
}
|
|
1810
1847
|
});
|
|
1811
1848
|
|
|
1812
1849
|
// packages/domain/compiler/src/watch/watchSystemNative.ts
|
|
1813
1850
|
function startWatch(root_path, patterns) {
|
|
1814
|
-
const native =
|
|
1851
|
+
const native = getNativeBridge();
|
|
1815
1852
|
if (!native?.start_watch) throw new Error("start_watch not available");
|
|
1816
1853
|
return native.start_watch(root_path, patterns);
|
|
1817
1854
|
}
|
|
1818
1855
|
function pollWatchEvents(handle, timeout_ms) {
|
|
1819
|
-
const native =
|
|
1856
|
+
const native = getNativeBridge();
|
|
1820
1857
|
if (!native?.poll_watch_events) throw new Error("poll_watch_events not available");
|
|
1821
1858
|
const result = native.poll_watch_events(handle, timeout_ms);
|
|
1822
1859
|
try {
|
|
@@ -1826,22 +1863,22 @@ function pollWatchEvents(handle, timeout_ms) {
|
|
|
1826
1863
|
}
|
|
1827
1864
|
}
|
|
1828
1865
|
function stopWatch(handle) {
|
|
1829
|
-
const native =
|
|
1866
|
+
const native = getNativeBridge();
|
|
1830
1867
|
if (!native?.stop_watch) throw new Error("stop_watch not available");
|
|
1831
1868
|
return native.stop_watch(handle);
|
|
1832
1869
|
}
|
|
1833
1870
|
function watchAddPattern(handle, pattern) {
|
|
1834
|
-
const native =
|
|
1871
|
+
const native = getNativeBridge();
|
|
1835
1872
|
if (!native?.watch_add_pattern) throw new Error("watch_add_pattern not available");
|
|
1836
1873
|
return native.watch_add_pattern(handle, pattern);
|
|
1837
1874
|
}
|
|
1838
1875
|
function watchRemovePattern(handle, pattern) {
|
|
1839
|
-
const native =
|
|
1876
|
+
const native = getNativeBridge();
|
|
1840
1877
|
if (!native?.watch_remove_pattern) throw new Error("watch_remove_pattern not available");
|
|
1841
1878
|
return native.watch_remove_pattern(handle, pattern);
|
|
1842
1879
|
}
|
|
1843
1880
|
function watchGetActiveHandles() {
|
|
1844
|
-
const native =
|
|
1881
|
+
const native = getNativeBridge();
|
|
1845
1882
|
if (!native?.watch_get_active_handles) throw new Error("watch_get_active_handles not available");
|
|
1846
1883
|
const result = native.watch_get_active_handles();
|
|
1847
1884
|
try {
|
|
@@ -1851,22 +1888,22 @@ function watchGetActiveHandles() {
|
|
|
1851
1888
|
}
|
|
1852
1889
|
}
|
|
1853
1890
|
function watchClearAll() {
|
|
1854
|
-
const native =
|
|
1891
|
+
const native = getNativeBridge();
|
|
1855
1892
|
if (!native?.watch_clear_all) throw new Error("watch_clear_all not available");
|
|
1856
1893
|
return native.watch_clear_all();
|
|
1857
1894
|
}
|
|
1858
1895
|
function watchEventTypeToString(event_type_code) {
|
|
1859
|
-
const native =
|
|
1896
|
+
const native = getNativeBridge();
|
|
1860
1897
|
if (!native?.watch_event_type_to_string) throw new Error("watch_event_type_to_string not available");
|
|
1861
1898
|
return native.watch_event_type_to_string(event_type_code);
|
|
1862
1899
|
}
|
|
1863
1900
|
function isWatchRunning(handle) {
|
|
1864
|
-
const native =
|
|
1901
|
+
const native = getNativeBridge();
|
|
1865
1902
|
if (!native?.is_watch_running) throw new Error("is_watch_running not available");
|
|
1866
1903
|
return native.is_watch_running(handle);
|
|
1867
1904
|
}
|
|
1868
1905
|
function getWatchStats() {
|
|
1869
|
-
const native =
|
|
1906
|
+
const native = getNativeBridge();
|
|
1870
1907
|
if (!native?.get_watch_stats) throw new Error("get_watch_stats not available");
|
|
1871
1908
|
const result = native.get_watch_stats();
|
|
1872
1909
|
try {
|
|
@@ -1882,22 +1919,22 @@ function getWatchStats() {
|
|
|
1882
1919
|
}
|
|
1883
1920
|
}
|
|
1884
1921
|
function watchPause(handle) {
|
|
1885
|
-
const native =
|
|
1922
|
+
const native = getNativeBridge();
|
|
1886
1923
|
if (!native?.watch_pause) throw new Error("watch_pause not available");
|
|
1887
1924
|
return native.watch_pause(handle);
|
|
1888
1925
|
}
|
|
1889
1926
|
function watchResume(handle) {
|
|
1890
|
-
const native =
|
|
1927
|
+
const native = getNativeBridge();
|
|
1891
1928
|
if (!native?.watch_resume) throw new Error("watch_resume not available");
|
|
1892
1929
|
return native.watch_resume(handle);
|
|
1893
1930
|
}
|
|
1894
1931
|
function scanCacheOptimizations() {
|
|
1895
|
-
const native =
|
|
1932
|
+
const native = getNativeBridge();
|
|
1896
1933
|
if (!native?.scan_cache_optimizations) throw new Error("scan_cache_optimizations not available");
|
|
1897
1934
|
return native.scan_cache_optimizations();
|
|
1898
1935
|
}
|
|
1899
1936
|
function getPluginHooks() {
|
|
1900
|
-
const native =
|
|
1937
|
+
const native = getNativeBridge();
|
|
1901
1938
|
if (!native?.get_plugin_hooks) throw new Error("get_plugin_hooks not available");
|
|
1902
1939
|
const result = native.get_plugin_hooks();
|
|
1903
1940
|
try {
|
|
@@ -1907,42 +1944,43 @@ function getPluginHooks() {
|
|
|
1907
1944
|
}
|
|
1908
1945
|
}
|
|
1909
1946
|
function registerPluginHook(hook_name, handler_id) {
|
|
1910
|
-
const native =
|
|
1947
|
+
const native = getNativeBridge();
|
|
1911
1948
|
if (!native?.register_plugin_hook) throw new Error("register_plugin_hook not available");
|
|
1912
1949
|
return native.register_plugin_hook(hook_name, handler_id);
|
|
1913
1950
|
}
|
|
1914
1951
|
function unregisterPluginHook(hook_name, handler_id) {
|
|
1915
|
-
const native =
|
|
1952
|
+
const native = getNativeBridge();
|
|
1916
1953
|
if (!native?.unregister_plugin_hook) throw new Error("unregister_plugin_hook not available");
|
|
1917
1954
|
return native.unregister_plugin_hook(hook_name, handler_id);
|
|
1918
1955
|
}
|
|
1919
1956
|
function emitPluginHook(hook_name, data_json) {
|
|
1920
|
-
const native =
|
|
1957
|
+
const native = getNativeBridge();
|
|
1921
1958
|
if (!native?.emit_plugin_hook) throw new Error("emit_plugin_hook not available");
|
|
1922
1959
|
return native.emit_plugin_hook(hook_name, data_json);
|
|
1923
1960
|
}
|
|
1924
1961
|
function getCompilationMetrics() {
|
|
1925
|
-
const native =
|
|
1962
|
+
const native = getNativeBridge();
|
|
1926
1963
|
if (!native?.get_compilation_metrics) throw new Error("get_compilation_metrics not available");
|
|
1927
1964
|
return native.get_compilation_metrics();
|
|
1928
1965
|
}
|
|
1929
1966
|
function resetCompilationMetrics() {
|
|
1930
|
-
const native =
|
|
1967
|
+
const native = getNativeBridge();
|
|
1931
1968
|
if (!native?.reset_compilation_metrics) throw new Error("reset_compilation_metrics not available");
|
|
1932
1969
|
return native.reset_compilation_metrics();
|
|
1933
1970
|
}
|
|
1934
1971
|
function validateCssOutput(css) {
|
|
1935
|
-
const native =
|
|
1972
|
+
const native = getNativeBridge();
|
|
1936
1973
|
if (!native?.validate_css_output) throw new Error("validate_css_output not available");
|
|
1937
1974
|
return native.validate_css_output(css);
|
|
1938
1975
|
}
|
|
1939
1976
|
function getCompilerDiagnostics() {
|
|
1940
|
-
const native =
|
|
1977
|
+
const native = getNativeBridge();
|
|
1941
1978
|
if (!native?.get_compiler_diagnostics) throw new Error("get_compiler_diagnostics not available");
|
|
1942
1979
|
return native.get_compiler_diagnostics();
|
|
1943
1980
|
}
|
|
1944
1981
|
var init_watchSystemNative = __esm({
|
|
1945
1982
|
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
1983
|
+
"use strict";
|
|
1946
1984
|
init_nativeBridge();
|
|
1947
1985
|
}
|
|
1948
1986
|
});
|
|
@@ -1950,11 +1988,14 @@ var init_watchSystemNative = __esm({
|
|
|
1950
1988
|
// packages/domain/compiler/src/watch/index.ts
|
|
1951
1989
|
var init_watch = __esm({
|
|
1952
1990
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
1991
|
+
"use strict";
|
|
1953
1992
|
init_watchSystemNative();
|
|
1954
1993
|
}
|
|
1955
1994
|
});
|
|
1995
|
+
|
|
1996
|
+
// packages/domain/compiler/src/index.ts
|
|
1956
1997
|
function _layoutClassesToCss(classes) {
|
|
1957
|
-
const native =
|
|
1998
|
+
const native = getNativeBridge();
|
|
1958
1999
|
if (!native?.layoutClassesToCss) {
|
|
1959
2000
|
throw new Error("FATAL: Native binding 'layoutClassesToCss' is required but not available.");
|
|
1960
2001
|
}
|
|
@@ -1962,14 +2003,14 @@ function _layoutClassesToCss(classes) {
|
|
|
1962
2003
|
}
|
|
1963
2004
|
function _hashContainer(tag, containerJson, name) {
|
|
1964
2005
|
const sortedKey = tag + (name ?? "") + containerJson;
|
|
1965
|
-
const native =
|
|
2006
|
+
const native = getNativeBridge();
|
|
1966
2007
|
if (!native?.hashContent) {
|
|
1967
2008
|
throw new Error("FATAL: Native binding 'hashContent' is required but not available.");
|
|
1968
2009
|
}
|
|
1969
2010
|
return `tw-cq-${native.hashContent(sortedKey, "fnv", 6)}`;
|
|
1970
2011
|
}
|
|
1971
2012
|
function extractContainerCssFromSource(source) {
|
|
1972
|
-
const native =
|
|
2013
|
+
const native = getNativeBridge();
|
|
1973
2014
|
if (!native?.extractTwContainerConfigs) {
|
|
1974
2015
|
throw new Error("FATAL: Native binding 'extractTwContainerConfigs' is required but not available.");
|
|
1975
2016
|
}
|
|
@@ -1987,9 +2028,13 @@ function extractContainerCssFromSource(source) {
|
|
|
1987
2028
|
}
|
|
1988
2029
|
return rules.join("\n");
|
|
1989
2030
|
}
|
|
1990
|
-
var
|
|
2031
|
+
var import_node_fs2, import_node_path2, import_node_module5, _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;
|
|
1991
2032
|
var init_src2 = __esm({
|
|
1992
2033
|
"packages/domain/compiler/src/index.ts"() {
|
|
2034
|
+
"use strict";
|
|
2035
|
+
import_node_fs2 = __toESM(require("fs"), 1);
|
|
2036
|
+
import_node_path2 = __toESM(require("path"), 1);
|
|
2037
|
+
import_node_module5 = require("module");
|
|
1993
2038
|
init_nativeBridge();
|
|
1994
2039
|
init_compiler();
|
|
1995
2040
|
init_parser();
|
|
@@ -1997,9 +2042,11 @@ var init_src2 = __esm({
|
|
|
1997
2042
|
init_cache();
|
|
1998
2043
|
init_redis();
|
|
1999
2044
|
init_watch();
|
|
2000
|
-
_require3 =
|
|
2001
|
-
|
|
2002
|
-
|
|
2045
|
+
_require3 = (0, import_node_module5.createRequire)(
|
|
2046
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
2047
|
+
);
|
|
2048
|
+
transformSource = (source, opts) => {
|
|
2049
|
+
const native = getNativeBridge();
|
|
2003
2050
|
if (!native?.transformSource) {
|
|
2004
2051
|
throw new Error("FATAL: Native binding 'transformSource' is required but not available.");
|
|
2005
2052
|
}
|
|
@@ -2010,25 +2057,25 @@ var init_src2 = __esm({
|
|
|
2010
2057
|
}
|
|
2011
2058
|
return result;
|
|
2012
2059
|
};
|
|
2013
|
-
|
|
2014
|
-
const native =
|
|
2060
|
+
hasTwUsage = (source) => {
|
|
2061
|
+
const native = getNativeBridge();
|
|
2015
2062
|
if (!native?.hasTwUsage) {
|
|
2016
2063
|
throw new Error("FATAL: Native binding 'hasTwUsage' is required but not available.");
|
|
2017
2064
|
}
|
|
2018
2065
|
return native.hasTwUsage(source);
|
|
2019
2066
|
};
|
|
2020
|
-
|
|
2021
|
-
const native =
|
|
2067
|
+
isAlreadyTransformed = (source) => {
|
|
2068
|
+
const native = getNativeBridge();
|
|
2022
2069
|
if (!native?.isAlreadyTransformed) {
|
|
2023
2070
|
throw new Error("FATAL: Native binding 'isAlreadyTransformed' is required but not available.");
|
|
2024
2071
|
}
|
|
2025
2072
|
return native.isAlreadyTransformed(source);
|
|
2026
2073
|
};
|
|
2027
|
-
|
|
2028
|
-
return
|
|
2074
|
+
shouldProcess = (source) => {
|
|
2075
|
+
return hasTwUsage(source) && !isAlreadyTransformed(source);
|
|
2029
2076
|
};
|
|
2030
|
-
|
|
2031
|
-
const native =
|
|
2077
|
+
compileCssFromClasses = (classes, prefix) => {
|
|
2078
|
+
const native = getNativeBridge();
|
|
2032
2079
|
if (!native?.transformSource) {
|
|
2033
2080
|
throw new Error("FATAL: Native binding 'transformSource' is required but not available.");
|
|
2034
2081
|
}
|
|
@@ -2038,17 +2085,17 @@ var init_src2 = __esm({
|
|
|
2038
2085
|
}
|
|
2039
2086
|
return result;
|
|
2040
2087
|
};
|
|
2041
|
-
|
|
2042
|
-
const result =
|
|
2088
|
+
buildStyleTag = (classes) => {
|
|
2089
|
+
const result = compileCssFromClasses(classes);
|
|
2043
2090
|
return result?.code ? `<style data-tailwind-styled>${result.code}</style>` : "";
|
|
2044
2091
|
};
|
|
2045
|
-
|
|
2092
|
+
generateCssForClasses = async (classes, _tailwindConfig, root, cssEntryContent, minify = false) => {
|
|
2046
2093
|
try {
|
|
2047
2094
|
const { runCssPipeline: runCssPipeline2 } = await Promise.resolve().then(() => (init_tailwindEngine2(), tailwindEngine_exports));
|
|
2048
2095
|
const result = await runCssPipeline2(classes, cssEntryContent, root, minify);
|
|
2049
2096
|
return result.css;
|
|
2050
2097
|
} catch {
|
|
2051
|
-
const native =
|
|
2098
|
+
const native = getNativeBridge();
|
|
2052
2099
|
if (!native?.transformSource) {
|
|
2053
2100
|
throw new Error("FATAL: Native binding 'transformSource' is required but not available.");
|
|
2054
2101
|
}
|
|
@@ -2056,14 +2103,14 @@ var init_src2 = __esm({
|
|
|
2056
2103
|
return result?.code || "";
|
|
2057
2104
|
}
|
|
2058
2105
|
};
|
|
2059
|
-
|
|
2060
|
-
const native =
|
|
2106
|
+
eliminateDeadCss = (css, deadClasses) => {
|
|
2107
|
+
const native = getNativeBridge();
|
|
2061
2108
|
if (!native?.eliminateDeadCss) {
|
|
2062
2109
|
throw new Error("FATAL: Native binding 'eliminateDeadCss' is required but not available.");
|
|
2063
2110
|
}
|
|
2064
2111
|
return native.eliminateDeadCss(css, Array.from(deadClasses));
|
|
2065
2112
|
};
|
|
2066
|
-
|
|
2113
|
+
findDeadVariants = (variantConfig, usage) => {
|
|
2067
2114
|
const unused = [];
|
|
2068
2115
|
const configs = Array.isArray(variantConfig) ? variantConfig : [{ name: "__root__", variants: variantConfig }];
|
|
2069
2116
|
for (const component of configs) {
|
|
@@ -2079,17 +2126,17 @@ var init_src2 = __esm({
|
|
|
2079
2126
|
}
|
|
2080
2127
|
return { unusedCount: unused.length, unused };
|
|
2081
2128
|
};
|
|
2082
|
-
|
|
2083
|
-
const native =
|
|
2129
|
+
runElimination = (css, scanResult) => {
|
|
2130
|
+
const native = getNativeBridge();
|
|
2084
2131
|
if (!native?.detectDeadCode) {
|
|
2085
2132
|
throw new Error("FATAL: Native binding 'detectDeadCode' is required but not available.");
|
|
2086
2133
|
}
|
|
2087
2134
|
const dead = native.detectDeadCode(JSON.stringify(scanResult), css);
|
|
2088
|
-
return
|
|
2135
|
+
return eliminateDeadCss(css, new Set(dead.deadInCss ?? []));
|
|
2089
2136
|
};
|
|
2090
|
-
|
|
2137
|
+
scanProjectUsage = (dirs, cwd) => {
|
|
2091
2138
|
const { batchExtractClasses: batchExtractClasses2 } = _require3("./parser");
|
|
2092
|
-
const files = dirs.map((dir) =>
|
|
2139
|
+
const files = dirs.map((dir) => import_node_path2.default.resolve(cwd, dir));
|
|
2093
2140
|
const results = batchExtractClasses2(files) || [];
|
|
2094
2141
|
const combined = {};
|
|
2095
2142
|
for (const result of results) {
|
|
@@ -2102,23 +2149,23 @@ var init_src2 = __esm({
|
|
|
2102
2149
|
}
|
|
2103
2150
|
return combined;
|
|
2104
2151
|
};
|
|
2105
|
-
|
|
2106
|
-
const classes =
|
|
2152
|
+
generateSafelist = (scanDirs, outputPath, cwd) => {
|
|
2153
|
+
const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
|
|
2107
2154
|
const allClasses = Object.keys(classes).sort();
|
|
2108
2155
|
if (outputPath) {
|
|
2109
|
-
|
|
2156
|
+
import_node_fs2.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
2110
2157
|
}
|
|
2111
2158
|
return allClasses;
|
|
2112
2159
|
};
|
|
2113
|
-
|
|
2160
|
+
loadSafelist = (safelistPath) => {
|
|
2114
2161
|
try {
|
|
2115
|
-
const content =
|
|
2162
|
+
const content = import_node_fs2.default.readFileSync(safelistPath, "utf-8");
|
|
2116
2163
|
return JSON.parse(content);
|
|
2117
2164
|
} catch {
|
|
2118
2165
|
return [];
|
|
2119
2166
|
}
|
|
2120
2167
|
};
|
|
2121
|
-
|
|
2168
|
+
loadTailwindConfig = (cwd = process.cwd()) => {
|
|
2122
2169
|
const configFiles = [
|
|
2123
2170
|
"tailwind.config.ts",
|
|
2124
2171
|
"tailwind.config.js",
|
|
@@ -2126,20 +2173,20 @@ var init_src2 = __esm({
|
|
|
2126
2173
|
"tailwind.config.cjs"
|
|
2127
2174
|
];
|
|
2128
2175
|
for (const file of configFiles) {
|
|
2129
|
-
const fullPath =
|
|
2130
|
-
if (
|
|
2131
|
-
const mod =
|
|
2176
|
+
const fullPath = import_node_path2.default.join(cwd, file);
|
|
2177
|
+
if (import_node_fs2.default.existsSync(fullPath)) {
|
|
2178
|
+
const mod = require(fullPath);
|
|
2132
2179
|
return mod.default || mod;
|
|
2133
2180
|
}
|
|
2134
2181
|
}
|
|
2135
2182
|
return {};
|
|
2136
2183
|
};
|
|
2137
|
-
|
|
2184
|
+
getContentPaths = (cwd = process.cwd()) => {
|
|
2138
2185
|
return {
|
|
2139
2186
|
content: [
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2187
|
+
import_node_path2.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
2188
|
+
import_node_path2.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
2189
|
+
import_node_path2.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
2143
2190
|
]
|
|
2144
2191
|
};
|
|
2145
2192
|
};
|
|
@@ -2151,13 +2198,13 @@ var init_src2 = __esm({
|
|
|
2151
2198
|
xl: "1280px",
|
|
2152
2199
|
"2xl": "1536px"
|
|
2153
2200
|
};
|
|
2154
|
-
|
|
2201
|
+
runLoaderTransform = (ctx) => {
|
|
2155
2202
|
const { filepath, source, options } = ctx;
|
|
2156
|
-
const result =
|
|
2203
|
+
const result = transformSource(source, { filename: filepath, ...options });
|
|
2157
2204
|
let staticCss;
|
|
2158
2205
|
try {
|
|
2159
2206
|
const cssChunks = [];
|
|
2160
|
-
const stateRules =
|
|
2207
|
+
const stateRules = extractAndGenerateStateCss(source, filepath);
|
|
2161
2208
|
if (stateRules.length > 0) {
|
|
2162
2209
|
const resolvedRules = stateRules.filter((r) => {
|
|
2163
2210
|
const decl = r.declarations.trim();
|
|
@@ -2181,7 +2228,7 @@ var init_src2 = __esm({
|
|
|
2181
2228
|
staticCss
|
|
2182
2229
|
};
|
|
2183
2230
|
};
|
|
2184
|
-
|
|
2231
|
+
shouldSkipFile = (filepath) => {
|
|
2185
2232
|
const SKIP_PATHS = ["node_modules", ".next", ".rspack-dist", ".turbo", "dist/", "out/"];
|
|
2186
2233
|
const skipExtensions = [".css", ".json", ".md", ".txt", ".yaml", ".yml"];
|
|
2187
2234
|
for (const p of SKIP_PATHS) {
|
|
@@ -2192,7 +2239,7 @@ var init_src2 = __esm({
|
|
|
2192
2239
|
}
|
|
2193
2240
|
return false;
|
|
2194
2241
|
};
|
|
2195
|
-
|
|
2242
|
+
fileToRoute = (filepath) => {
|
|
2196
2243
|
const normalized = filepath.replace(/\\/g, "/");
|
|
2197
2244
|
if (normalized.includes("/layout.") || normalized.includes("/loading.") || normalized.includes("/error.")) {
|
|
2198
2245
|
return "__global";
|
|
@@ -2203,35 +2250,35 @@ var init_src2 = __esm({
|
|
|
2203
2250
|
if (rootPage) return "/";
|
|
2204
2251
|
return null;
|
|
2205
2252
|
};
|
|
2206
|
-
|
|
2207
|
-
const native =
|
|
2253
|
+
getAllRoutes = () => {
|
|
2254
|
+
const native = getNativeBridge();
|
|
2208
2255
|
if (!native?.analyzeClasses) {
|
|
2209
2256
|
throw new Error("FATAL: Native binding 'analyzeClasses' is required but not available.");
|
|
2210
2257
|
}
|
|
2211
2258
|
return ["/", "__global"];
|
|
2212
2259
|
};
|
|
2213
|
-
|
|
2214
|
-
|
|
2260
|
+
getRouteClasses = (_route) => /* @__PURE__ */ new Set();
|
|
2261
|
+
registerFileClasses = (_filepath, _classes) => {
|
|
2215
2262
|
};
|
|
2216
|
-
|
|
2263
|
+
registerGlobalClasses = (_classes) => {
|
|
2217
2264
|
};
|
|
2218
2265
|
_incrementalEngineInstance = null;
|
|
2219
|
-
|
|
2266
|
+
getIncrementalEngine = () => {
|
|
2220
2267
|
if (!_incrementalEngineInstance) {
|
|
2221
|
-
_incrementalEngineInstance = new
|
|
2268
|
+
_incrementalEngineInstance = new IncrementalEngine();
|
|
2222
2269
|
}
|
|
2223
2270
|
return _incrementalEngineInstance;
|
|
2224
2271
|
};
|
|
2225
|
-
|
|
2272
|
+
resetIncrementalEngine = () => {
|
|
2226
2273
|
_incrementalEngineInstance = null;
|
|
2227
2274
|
};
|
|
2228
|
-
|
|
2275
|
+
IncrementalEngine = class {
|
|
2229
2276
|
compile(source) {
|
|
2230
|
-
return
|
|
2277
|
+
return transformSource(source);
|
|
2231
2278
|
}
|
|
2232
2279
|
};
|
|
2233
|
-
|
|
2234
|
-
const native =
|
|
2280
|
+
getBucketEngine = () => {
|
|
2281
|
+
const native = getNativeBridge();
|
|
2235
2282
|
if (!native?.classifyAndSortClasses) {
|
|
2236
2283
|
throw new Error("FATAL: Native binding 'classifyAndSortClasses' is required but not available.");
|
|
2237
2284
|
}
|
|
@@ -2240,37 +2287,37 @@ var init_src2 = __esm({
|
|
|
2240
2287
|
get: (_bucket) => []
|
|
2241
2288
|
};
|
|
2242
2289
|
};
|
|
2243
|
-
|
|
2290
|
+
resetBucketEngine = () => {
|
|
2244
2291
|
};
|
|
2245
|
-
|
|
2292
|
+
BucketEngine = class {
|
|
2246
2293
|
add(className) {
|
|
2247
2294
|
return className;
|
|
2248
2295
|
}
|
|
2249
2296
|
};
|
|
2250
|
-
|
|
2251
|
-
const native =
|
|
2297
|
+
classifyNode = (_node) => {
|
|
2298
|
+
const native = getNativeBridge();
|
|
2252
2299
|
if (!native?.classifyAndSortClasses) {
|
|
2253
2300
|
throw new Error("FATAL: Native binding 'classifyAndSortClasses' is required but not available.");
|
|
2254
2301
|
}
|
|
2255
2302
|
return "unknown";
|
|
2256
2303
|
};
|
|
2257
|
-
|
|
2258
|
-
const native =
|
|
2304
|
+
detectConflicts = (_classes) => {
|
|
2305
|
+
const native = getNativeBridge();
|
|
2259
2306
|
if (!native?.analyzeClassUsage) {
|
|
2260
2307
|
throw new Error("FATAL: Native binding 'analyzeClassUsage' is required but not available.");
|
|
2261
2308
|
}
|
|
2262
2309
|
return [];
|
|
2263
2310
|
};
|
|
2264
|
-
|
|
2265
|
-
const native =
|
|
2311
|
+
bucketSort = (classes) => {
|
|
2312
|
+
const native = getNativeBridge();
|
|
2266
2313
|
if (!native?.classifyAndSortClasses) {
|
|
2267
2314
|
throw new Error("FATAL: Native binding 'classifyAndSortClasses' is required but not available.");
|
|
2268
2315
|
}
|
|
2269
2316
|
const sorted = native.classifyAndSortClasses(classes);
|
|
2270
2317
|
return sorted.map((c) => c.raw ?? c);
|
|
2271
2318
|
};
|
|
2272
|
-
|
|
2273
|
-
const native =
|
|
2319
|
+
analyzeFile = (source, filename) => {
|
|
2320
|
+
const native = getNativeBridge();
|
|
2274
2321
|
if (!native?.analyzeRsc) {
|
|
2275
2322
|
throw new Error("FATAL: Native binding 'analyzeRsc' is required but not available.");
|
|
2276
2323
|
}
|
|
@@ -2283,35 +2330,35 @@ var init_src2 = __esm({
|
|
|
2283
2330
|
canStaticResolveVariants: true
|
|
2284
2331
|
};
|
|
2285
2332
|
};
|
|
2286
|
-
|
|
2333
|
+
analyzeVariantUsage = (_source, _componentName, _variantKeys) => {
|
|
2287
2334
|
return { resolved: {}, dynamic: [] };
|
|
2288
2335
|
};
|
|
2289
|
-
|
|
2336
|
+
injectClientDirective = (source) => {
|
|
2290
2337
|
if (!source.includes('"use client"') && !source.includes("'use client'")) {
|
|
2291
2338
|
return '"use client";\n' + source;
|
|
2292
2339
|
}
|
|
2293
2340
|
return source;
|
|
2294
2341
|
};
|
|
2295
|
-
|
|
2342
|
+
injectServerOnlyComment = (source) => {
|
|
2296
2343
|
return `/* @server-only */
|
|
2297
2344
|
${source}`;
|
|
2298
2345
|
};
|
|
2299
|
-
|
|
2300
|
-
const native =
|
|
2346
|
+
analyzeClasses = (filesJson, cwd, flags) => {
|
|
2347
|
+
const native = getNativeBridge();
|
|
2301
2348
|
if (!native?.analyzeClasses) {
|
|
2302
2349
|
throw new Error("FATAL: Native binding 'analyzeClasses' is required but not available.");
|
|
2303
2350
|
}
|
|
2304
2351
|
return native.analyzeClasses(filesJson, cwd, flags);
|
|
2305
2352
|
};
|
|
2306
|
-
|
|
2307
|
-
const native =
|
|
2353
|
+
extractTwStateConfigs = (source, filename) => {
|
|
2354
|
+
const native = getNativeBridge();
|
|
2308
2355
|
if (!native?.extractTwStateConfigs) {
|
|
2309
2356
|
throw new Error("FATAL: Native binding 'extractTwStateConfigs' is required but not available.");
|
|
2310
2357
|
}
|
|
2311
2358
|
return native.extractTwStateConfigs(source, filename);
|
|
2312
2359
|
};
|
|
2313
|
-
|
|
2314
|
-
const native =
|
|
2360
|
+
generateStaticStateCss = (entries, resolvedCssOrThemeConfig) => {
|
|
2361
|
+
const native = getNativeBridge();
|
|
2315
2362
|
if (!native?.generateStaticStateCss) {
|
|
2316
2363
|
throw new Error("FATAL: Native binding 'generateStaticStateCss' is required but not available.");
|
|
2317
2364
|
}
|
|
@@ -2323,11 +2370,11 @@ ${source}`;
|
|
|
2323
2370
|
}));
|
|
2324
2371
|
return native.generateStaticStateCss(inputs, resolvedCss);
|
|
2325
2372
|
};
|
|
2326
|
-
|
|
2327
|
-
const native =
|
|
2373
|
+
extractAndGenerateStateCss = (source, filename) => {
|
|
2374
|
+
const native = getNativeBridge();
|
|
2328
2375
|
if (!native?.extractAndGenerateStateCss) {
|
|
2329
|
-
const entries =
|
|
2330
|
-
return
|
|
2376
|
+
const entries = extractTwStateConfigs(source, filename);
|
|
2377
|
+
return generateStaticStateCss(entries);
|
|
2331
2378
|
}
|
|
2332
2379
|
return native.extractAndGenerateStateCss(source, filename);
|
|
2333
2380
|
};
|
|
@@ -2335,172 +2382,450 @@ ${source}`;
|
|
|
2335
2382
|
});
|
|
2336
2383
|
|
|
2337
2384
|
// src/umbrella/compiler.ts
|
|
2385
|
+
var compiler_exports = {};
|
|
2386
|
+
__export(compiler_exports, {
|
|
2387
|
+
BucketEngine: () => BucketEngine,
|
|
2388
|
+
IncrementalEngine: () => IncrementalEngine,
|
|
2389
|
+
adaptNativeResult: () => adaptNativeResult,
|
|
2390
|
+
analyzeClassUsageNative: () => analyzeClassUsageNative,
|
|
2391
|
+
analyzeClasses: () => analyzeClasses,
|
|
2392
|
+
analyzeClassesNative: () => analyzeClassesNative,
|
|
2393
|
+
analyzeFile: () => analyzeFile,
|
|
2394
|
+
analyzeRscNative: () => analyzeRscNative,
|
|
2395
|
+
analyzeVariantUsage: () => analyzeVariantUsage,
|
|
2396
|
+
astExtractClasses: () => astExtractClasses,
|
|
2397
|
+
atomicRegistrySize: () => atomicRegistrySize,
|
|
2398
|
+
batchExtractClasses: () => batchExtractClasses,
|
|
2399
|
+
batchExtractClassesNative: () => batchExtractClassesNative,
|
|
2400
|
+
bucketSort: () => bucketSort,
|
|
2401
|
+
buildStyleTag: () => buildStyleTag,
|
|
2402
|
+
cachePriority: () => cachePriority,
|
|
2403
|
+
cacheRead: () => cacheRead,
|
|
2404
|
+
cacheWrite: () => cacheWrite,
|
|
2405
|
+
checkAgainstSafelist: () => checkAgainstSafelist,
|
|
2406
|
+
checkAgainstSafelistNative: () => checkAgainstSafelistNative,
|
|
2407
|
+
classifyAndSortClassesNative: () => classifyAndSortClassesNative,
|
|
2408
|
+
classifyNode: () => classifyNode,
|
|
2409
|
+
clearAllCaches: () => clearAllCaches,
|
|
2410
|
+
clearAtomicRegistry: () => clearAtomicRegistry,
|
|
2411
|
+
clearCompileCache: () => clearCompileCache,
|
|
2412
|
+
clearCssGenCache: () => clearCssGenCache,
|
|
2413
|
+
clearParseCache: () => clearParseCache,
|
|
2414
|
+
clearResolveCache: () => clearResolveCache,
|
|
2415
|
+
clearResolverPool: () => clearResolverPool,
|
|
2416
|
+
clearThemeCache: () => clearThemeCache,
|
|
2417
|
+
collectFiles: () => collectFiles,
|
|
2418
|
+
compileAnimation: () => compileAnimation,
|
|
2419
|
+
compileClass: () => compileClass,
|
|
2420
|
+
compileClasses: () => compileClasses,
|
|
2421
|
+
compileCssFromClasses: () => compileCssFromClasses,
|
|
2422
|
+
compileCssLightning: () => compileCssLightning,
|
|
2423
|
+
compileCssNative2: () => compileCssNative2,
|
|
2424
|
+
compileKeyframes: () => compileKeyframes,
|
|
2425
|
+
compileTheme: () => compileTheme,
|
|
2426
|
+
compileToCss: () => compileToCss,
|
|
2427
|
+
compileToCssBatch: () => compileToCssBatch,
|
|
2428
|
+
compileVariantTableNative: () => compileVariantTableNative,
|
|
2429
|
+
computeIncrementalDiff: () => computeIncrementalDiff,
|
|
2430
|
+
createFingerprint: () => createFingerprint,
|
|
2431
|
+
detectConflicts: () => detectConflicts,
|
|
2432
|
+
detectDeadCode: () => detectDeadCode,
|
|
2433
|
+
diffClassLists: () => diffClassLists,
|
|
2434
|
+
eliminateDeadCss: () => eliminateDeadCss,
|
|
2435
|
+
eliminateDeadCssNative: () => eliminateDeadCssNative,
|
|
2436
|
+
emitPluginHook: () => emitPluginHook,
|
|
2437
|
+
estimateOptimalCacheConfig: () => estimateOptimalCacheConfig,
|
|
2438
|
+
estimateOptimalCacheConfigNative: () => estimateOptimalCacheConfigNative,
|
|
2439
|
+
extractAllClasses: () => extractAllClasses,
|
|
2440
|
+
extractAndGenerateStateCss: () => extractAndGenerateStateCss,
|
|
2441
|
+
extractAndGenerateStateCssNative: () => extractAndGenerateStateCssNative,
|
|
2442
|
+
extractClassesFromSource: () => extractClassesFromSource,
|
|
2443
|
+
extractClassesFromSourceNative: () => extractClassesFromSourceNative,
|
|
2444
|
+
extractComponentUsage: () => extractComponentUsage,
|
|
2445
|
+
extractContainerCssFromSource: () => extractContainerCssFromSource,
|
|
2446
|
+
extractTwContainerConfigs: () => extractTwContainerConfigs,
|
|
2447
|
+
extractTwStateConfigs: () => extractTwStateConfigs,
|
|
2448
|
+
extractTwStateConfigsNative: () => extractTwStateConfigsNative,
|
|
2449
|
+
fileToRoute: () => fileToRoute,
|
|
2450
|
+
findDeadVariants: () => findDeadVariants,
|
|
2451
|
+
generateAtomicCss: () => generateAtomicCss,
|
|
2452
|
+
generateCss: () => generateCss,
|
|
2453
|
+
generateCssBatch: () => generateCssBatch,
|
|
2454
|
+
generateCssForClasses: () => generateCssForClasses,
|
|
2455
|
+
generateCssNative: () => generateCssNative,
|
|
2456
|
+
generateSafelist: () => generateSafelist,
|
|
2457
|
+
generateStaticStateCss: () => generateStaticStateCss,
|
|
2458
|
+
generateStaticStateCssNative: () => generateStaticStateCssNative,
|
|
2459
|
+
generateSubComponentTypes: () => generateSubComponentTypes,
|
|
2460
|
+
getAllRoutes: () => getAllRoutes,
|
|
2461
|
+
getBucketEngine: () => getBucketEngine,
|
|
2462
|
+
getCacheOptimizationHints: () => getCacheOptimizationHints,
|
|
2463
|
+
getCacheStatistics: () => getCacheStatistics,
|
|
2464
|
+
getCacheStats: () => getCacheStats,
|
|
2465
|
+
getCompilationMetrics: () => getCompilationMetrics,
|
|
2466
|
+
getCompilerDiagnostics: () => getCompilerDiagnostics,
|
|
2467
|
+
getContentPaths: () => getContentPaths,
|
|
2468
|
+
getIncrementalEngine: () => getIncrementalEngine,
|
|
2469
|
+
getMemoryRecommendationsNative: () => getMemoryRecommendationsNative,
|
|
2470
|
+
getMemoryStatsNative: () => getMemoryStatsNative,
|
|
2471
|
+
getNativeBridge: () => getNativeBridge,
|
|
2472
|
+
getPluginHooks: () => getPluginHooks,
|
|
2473
|
+
getResolverPoolStats: () => getResolverPoolStats,
|
|
2474
|
+
getRouteClasses: () => getRouteClasses,
|
|
2475
|
+
getWatchStats: () => getWatchStats,
|
|
2476
|
+
getWeek6FeaturesStatus: () => getWeek6FeaturesStatus,
|
|
2477
|
+
hasTwUsage: () => hasTwUsage,
|
|
2478
|
+
hashContent: () => hashContent,
|
|
2479
|
+
hoistComponentsNative: () => hoistComponentsNative,
|
|
2480
|
+
idRegistryActiveCount: () => idRegistryActiveCount,
|
|
2481
|
+
idRegistryCreate: () => idRegistryCreate,
|
|
2482
|
+
idRegistryDestroy: () => idRegistryDestroy,
|
|
2483
|
+
idRegistryExport: () => idRegistryExport,
|
|
2484
|
+
idRegistryGenerate: () => idRegistryGenerate,
|
|
2485
|
+
idRegistryImport: () => idRegistryImport,
|
|
2486
|
+
idRegistryLookup: () => idRegistryLookup,
|
|
2487
|
+
idRegistryNext: () => idRegistryNext,
|
|
2488
|
+
idRegistryReset: () => idRegistryReset,
|
|
2489
|
+
idRegistrySnapshot: () => idRegistrySnapshot,
|
|
2490
|
+
injectClientDirective: () => injectClientDirective,
|
|
2491
|
+
injectServerOnlyComment: () => injectServerOnlyComment,
|
|
2492
|
+
injectStateHash: () => injectStateHash,
|
|
2493
|
+
isAlreadyTransformed: () => isAlreadyTransformed,
|
|
2494
|
+
isWatchRunning: () => isWatchRunning,
|
|
2495
|
+
layoutClassesToCss: () => layoutClassesToCss,
|
|
2496
|
+
loadSafelist: () => loadSafelist,
|
|
2497
|
+
loadTailwindConfig: () => loadTailwindConfig,
|
|
2498
|
+
mergeClassesStatic: () => mergeClassesStatic,
|
|
2499
|
+
mergeCssDeclarationsNative: () => mergeCssDeclarationsNative,
|
|
2500
|
+
minifyCss: () => minifyCss,
|
|
2501
|
+
normalizeAndDedupClasses: () => normalizeAndDedupClasses,
|
|
2502
|
+
normalizeClasses: () => normalizeClasses,
|
|
2503
|
+
optimizeCssNative: () => optimizeCssNative,
|
|
2504
|
+
parseAtomicClass: () => parseAtomicClass,
|
|
2505
|
+
parseClass: () => parseClass,
|
|
2506
|
+
parseClasses: () => parseClasses,
|
|
2507
|
+
pollWatchEvents: () => pollWatchEvents,
|
|
2508
|
+
processFileChange: () => processFileChange,
|
|
2509
|
+
processTailwindCssLightning: () => processTailwindCssLightning,
|
|
2510
|
+
propertyIdToString: () => propertyIdToString,
|
|
2511
|
+
pruneStaleCacheEntries: () => pruneStaleCacheEntries,
|
|
2512
|
+
rebuildWorkspaceResult: () => rebuildWorkspaceResult,
|
|
2513
|
+
redisCacheClear: () => redisCacheClear,
|
|
2514
|
+
redisCacheHitRate: () => redisCacheHitRate,
|
|
2515
|
+
redisCacheKeyCount: () => redisCacheKeyCount,
|
|
2516
|
+
redisCacheSize: () => redisCacheSize,
|
|
2517
|
+
redisCacheSync: () => redisCacheSync,
|
|
2518
|
+
redisClusterStatus: () => redisClusterStatus,
|
|
2519
|
+
redisDelete: () => redisDelete,
|
|
2520
|
+
redisDiagnose: () => redisDiagnose,
|
|
2521
|
+
redisDisableCacheWarming: () => redisDisableCacheWarming,
|
|
2522
|
+
redisDisableCluster: () => redisDisableCluster,
|
|
2523
|
+
redisDisablePersistence: () => redisDisablePersistence,
|
|
2524
|
+
redisEnableCacheWarming: () => redisEnableCacheWarming,
|
|
2525
|
+
redisEnableCluster: () => redisEnableCluster,
|
|
2526
|
+
redisEnablePersistence: () => redisEnablePersistence,
|
|
2527
|
+
redisExists: () => redisExists,
|
|
2528
|
+
redisExpirationGet: () => redisExpirationGet,
|
|
2529
|
+
redisExpirationSet: () => redisExpirationSet,
|
|
2530
|
+
redisFlushAll: () => redisFlushAll,
|
|
2531
|
+
redisFlushDb: () => redisFlushDb,
|
|
2532
|
+
redisGet: () => redisGet,
|
|
2533
|
+
redisGetEvictionPolicy: () => redisGetEvictionPolicy,
|
|
2534
|
+
redisInfo: () => redisInfo,
|
|
2535
|
+
redisMemoryStats: () => redisMemoryStats,
|
|
2536
|
+
redisMget: () => redisMget,
|
|
2537
|
+
redisMonitor: () => redisMonitor,
|
|
2538
|
+
redisMset: () => redisMset,
|
|
2539
|
+
redisOptimizeMemory: () => redisOptimizeMemory,
|
|
2540
|
+
redisPing: () => redisPing,
|
|
2541
|
+
redisPoolConnect: () => redisPoolConnect,
|
|
2542
|
+
redisPoolReconnect: () => redisPoolReconnect,
|
|
2543
|
+
redisPoolStats: () => redisPoolStats,
|
|
2544
|
+
redisPublish: () => redisPublish,
|
|
2545
|
+
redisReplicate: () => redisReplicate,
|
|
2546
|
+
redisReplicationStatus: () => redisReplicationStatus,
|
|
2547
|
+
redisSet: () => redisSet,
|
|
2548
|
+
redisSetEvictionPolicy: () => redisSetEvictionPolicy,
|
|
2549
|
+
redisSnapshot: () => redisSnapshot,
|
|
2550
|
+
redisSubscribe: () => redisSubscribe,
|
|
2551
|
+
registerFileClasses: () => registerFileClasses,
|
|
2552
|
+
registerGlobalClasses: () => registerGlobalClasses,
|
|
2553
|
+
registerPluginHook: () => registerPluginHook,
|
|
2554
|
+
registerPropertyName: () => registerPropertyName,
|
|
2555
|
+
registerValueName: () => registerValueName,
|
|
2556
|
+
resetBucketEngine: () => resetBucketEngine,
|
|
2557
|
+
resetCacheStats: () => resetCacheStats,
|
|
2558
|
+
resetCompilationMetrics: () => resetCompilationMetrics,
|
|
2559
|
+
resetIncrementalEngine: () => resetIncrementalEngine,
|
|
2560
|
+
resetMemoryStats: () => resetMemoryStats,
|
|
2561
|
+
resetNativeBridgeCache: () => resetNativeBridgeCache,
|
|
2562
|
+
resetResolverPoolStats: () => resetResolverPoolStats,
|
|
2563
|
+
resolveCascade: () => resolveCascade,
|
|
2564
|
+
resolveClassNames: () => resolveClassNames,
|
|
2565
|
+
resolveColorCached: () => resolveColorCached,
|
|
2566
|
+
resolveConflictGroup: () => resolveConflictGroup,
|
|
2567
|
+
resolveFontSizeCached: () => resolveFontSizeCached,
|
|
2568
|
+
resolveSimpleVariants: () => resolveSimpleVariants,
|
|
2569
|
+
resolveSpacingCached: () => resolveSpacingCached,
|
|
2570
|
+
resolveThemeValue: () => resolveThemeValue,
|
|
2571
|
+
resolveVariants: () => resolveVariants,
|
|
2572
|
+
reverseLookupProperty: () => reverseLookupProperty,
|
|
2573
|
+
reverseLookupValue: () => reverseLookupValue,
|
|
2574
|
+
runCssPipeline: () => runCssPipeline,
|
|
2575
|
+
runElimination: () => runElimination,
|
|
2576
|
+
runLoaderTransform: () => runLoaderTransform,
|
|
2577
|
+
scanCacheOptimizations: () => scanCacheOptimizations,
|
|
2578
|
+
scanFile: () => scanFile,
|
|
2579
|
+
scanFileNative: () => scanFileNative,
|
|
2580
|
+
scanFilesBatchNative: () => scanFilesBatchNative,
|
|
2581
|
+
scanProjectUsage: () => scanProjectUsage,
|
|
2582
|
+
scanWorkspace: () => scanWorkspace,
|
|
2583
|
+
shouldProcess: () => shouldProcess,
|
|
2584
|
+
shouldSkipFile: () => shouldSkipFile,
|
|
2585
|
+
startWatch: () => startWatch,
|
|
2586
|
+
stopWatch: () => stopWatch,
|
|
2587
|
+
toAtomicClasses: () => toAtomicClasses,
|
|
2588
|
+
transformSource: () => transformSource,
|
|
2589
|
+
twMerge: () => twMerge,
|
|
2590
|
+
twMergeMany: () => twMergeMany,
|
|
2591
|
+
twMergeManyWithSeparator: () => twMergeManyWithSeparator,
|
|
2592
|
+
twMergeRaw: () => twMergeRaw,
|
|
2593
|
+
twMergeWithSeparator: () => twMergeWithSeparator,
|
|
2594
|
+
unregisterPluginHook: () => unregisterPluginHook,
|
|
2595
|
+
validateCssOutput: () => validateCssOutput,
|
|
2596
|
+
validateThemeConfig: () => validateThemeConfig,
|
|
2597
|
+
valueIdToString: () => valueIdToString,
|
|
2598
|
+
walkAndPrefilterSourceFiles: () => walkAndPrefilterSourceFiles,
|
|
2599
|
+
watchAddPattern: () => watchAddPattern,
|
|
2600
|
+
watchClearAll: () => watchClearAll,
|
|
2601
|
+
watchEventTypeToString: () => watchEventTypeToString,
|
|
2602
|
+
watchGetActiveHandles: () => watchGetActiveHandles,
|
|
2603
|
+
watchPause: () => watchPause,
|
|
2604
|
+
watchRemovePattern: () => watchRemovePattern,
|
|
2605
|
+
watchResume: () => watchResume
|
|
2606
|
+
});
|
|
2607
|
+
module.exports = __toCommonJS(compiler_exports);
|
|
2338
2608
|
init_src2();
|
|
2339
|
-
|
|
2340
|
-
exports
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2609
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2610
|
+
0 && (module.exports = {
|
|
2611
|
+
BucketEngine,
|
|
2612
|
+
IncrementalEngine,
|
|
2613
|
+
adaptNativeResult,
|
|
2614
|
+
analyzeClassUsageNative,
|
|
2615
|
+
analyzeClasses,
|
|
2616
|
+
analyzeClassesNative,
|
|
2617
|
+
analyzeFile,
|
|
2618
|
+
analyzeRscNative,
|
|
2619
|
+
analyzeVariantUsage,
|
|
2620
|
+
astExtractClasses,
|
|
2621
|
+
atomicRegistrySize,
|
|
2622
|
+
batchExtractClasses,
|
|
2623
|
+
batchExtractClassesNative,
|
|
2624
|
+
bucketSort,
|
|
2625
|
+
buildStyleTag,
|
|
2626
|
+
cachePriority,
|
|
2627
|
+
cacheRead,
|
|
2628
|
+
cacheWrite,
|
|
2629
|
+
checkAgainstSafelist,
|
|
2630
|
+
checkAgainstSafelistNative,
|
|
2631
|
+
classifyAndSortClassesNative,
|
|
2632
|
+
classifyNode,
|
|
2633
|
+
clearAllCaches,
|
|
2634
|
+
clearAtomicRegistry,
|
|
2635
|
+
clearCompileCache,
|
|
2636
|
+
clearCssGenCache,
|
|
2637
|
+
clearParseCache,
|
|
2638
|
+
clearResolveCache,
|
|
2639
|
+
clearResolverPool,
|
|
2640
|
+
clearThemeCache,
|
|
2641
|
+
collectFiles,
|
|
2642
|
+
compileAnimation,
|
|
2643
|
+
compileClass,
|
|
2644
|
+
compileClasses,
|
|
2645
|
+
compileCssFromClasses,
|
|
2646
|
+
compileCssLightning,
|
|
2647
|
+
compileCssNative2,
|
|
2648
|
+
compileKeyframes,
|
|
2649
|
+
compileTheme,
|
|
2650
|
+
compileToCss,
|
|
2651
|
+
compileToCssBatch,
|
|
2652
|
+
compileVariantTableNative,
|
|
2653
|
+
computeIncrementalDiff,
|
|
2654
|
+
createFingerprint,
|
|
2655
|
+
detectConflicts,
|
|
2656
|
+
detectDeadCode,
|
|
2657
|
+
diffClassLists,
|
|
2658
|
+
eliminateDeadCss,
|
|
2659
|
+
eliminateDeadCssNative,
|
|
2660
|
+
emitPluginHook,
|
|
2661
|
+
estimateOptimalCacheConfig,
|
|
2662
|
+
estimateOptimalCacheConfigNative,
|
|
2663
|
+
extractAllClasses,
|
|
2664
|
+
extractAndGenerateStateCss,
|
|
2665
|
+
extractAndGenerateStateCssNative,
|
|
2666
|
+
extractClassesFromSource,
|
|
2667
|
+
extractClassesFromSourceNative,
|
|
2668
|
+
extractComponentUsage,
|
|
2669
|
+
extractContainerCssFromSource,
|
|
2670
|
+
extractTwContainerConfigs,
|
|
2671
|
+
extractTwStateConfigs,
|
|
2672
|
+
extractTwStateConfigsNative,
|
|
2673
|
+
fileToRoute,
|
|
2674
|
+
findDeadVariants,
|
|
2675
|
+
generateAtomicCss,
|
|
2676
|
+
generateCss,
|
|
2677
|
+
generateCssBatch,
|
|
2678
|
+
generateCssForClasses,
|
|
2679
|
+
generateCssNative,
|
|
2680
|
+
generateSafelist,
|
|
2681
|
+
generateStaticStateCss,
|
|
2682
|
+
generateStaticStateCssNative,
|
|
2683
|
+
generateSubComponentTypes,
|
|
2684
|
+
getAllRoutes,
|
|
2685
|
+
getBucketEngine,
|
|
2686
|
+
getCacheOptimizationHints,
|
|
2687
|
+
getCacheStatistics,
|
|
2688
|
+
getCacheStats,
|
|
2689
|
+
getCompilationMetrics,
|
|
2690
|
+
getCompilerDiagnostics,
|
|
2691
|
+
getContentPaths,
|
|
2692
|
+
getIncrementalEngine,
|
|
2693
|
+
getMemoryRecommendationsNative,
|
|
2694
|
+
getMemoryStatsNative,
|
|
2695
|
+
getNativeBridge,
|
|
2696
|
+
getPluginHooks,
|
|
2697
|
+
getResolverPoolStats,
|
|
2698
|
+
getRouteClasses,
|
|
2699
|
+
getWatchStats,
|
|
2700
|
+
getWeek6FeaturesStatus,
|
|
2701
|
+
hasTwUsage,
|
|
2702
|
+
hashContent,
|
|
2703
|
+
hoistComponentsNative,
|
|
2704
|
+
idRegistryActiveCount,
|
|
2705
|
+
idRegistryCreate,
|
|
2706
|
+
idRegistryDestroy,
|
|
2707
|
+
idRegistryExport,
|
|
2708
|
+
idRegistryGenerate,
|
|
2709
|
+
idRegistryImport,
|
|
2710
|
+
idRegistryLookup,
|
|
2711
|
+
idRegistryNext,
|
|
2712
|
+
idRegistryReset,
|
|
2713
|
+
idRegistrySnapshot,
|
|
2714
|
+
injectClientDirective,
|
|
2715
|
+
injectServerOnlyComment,
|
|
2716
|
+
injectStateHash,
|
|
2717
|
+
isAlreadyTransformed,
|
|
2718
|
+
isWatchRunning,
|
|
2719
|
+
layoutClassesToCss,
|
|
2720
|
+
loadSafelist,
|
|
2721
|
+
loadTailwindConfig,
|
|
2722
|
+
mergeClassesStatic,
|
|
2723
|
+
mergeCssDeclarationsNative,
|
|
2724
|
+
minifyCss,
|
|
2725
|
+
normalizeAndDedupClasses,
|
|
2726
|
+
normalizeClasses,
|
|
2727
|
+
optimizeCssNative,
|
|
2728
|
+
parseAtomicClass,
|
|
2729
|
+
parseClass,
|
|
2730
|
+
parseClasses,
|
|
2731
|
+
pollWatchEvents,
|
|
2732
|
+
processFileChange,
|
|
2733
|
+
processTailwindCssLightning,
|
|
2734
|
+
propertyIdToString,
|
|
2735
|
+
pruneStaleCacheEntries,
|
|
2736
|
+
rebuildWorkspaceResult,
|
|
2737
|
+
redisCacheClear,
|
|
2738
|
+
redisCacheHitRate,
|
|
2739
|
+
redisCacheKeyCount,
|
|
2740
|
+
redisCacheSize,
|
|
2741
|
+
redisCacheSync,
|
|
2742
|
+
redisClusterStatus,
|
|
2743
|
+
redisDelete,
|
|
2744
|
+
redisDiagnose,
|
|
2745
|
+
redisDisableCacheWarming,
|
|
2746
|
+
redisDisableCluster,
|
|
2747
|
+
redisDisablePersistence,
|
|
2748
|
+
redisEnableCacheWarming,
|
|
2749
|
+
redisEnableCluster,
|
|
2750
|
+
redisEnablePersistence,
|
|
2751
|
+
redisExists,
|
|
2752
|
+
redisExpirationGet,
|
|
2753
|
+
redisExpirationSet,
|
|
2754
|
+
redisFlushAll,
|
|
2755
|
+
redisFlushDb,
|
|
2756
|
+
redisGet,
|
|
2757
|
+
redisGetEvictionPolicy,
|
|
2758
|
+
redisInfo,
|
|
2759
|
+
redisMemoryStats,
|
|
2760
|
+
redisMget,
|
|
2761
|
+
redisMonitor,
|
|
2762
|
+
redisMset,
|
|
2763
|
+
redisOptimizeMemory,
|
|
2764
|
+
redisPing,
|
|
2765
|
+
redisPoolConnect,
|
|
2766
|
+
redisPoolReconnect,
|
|
2767
|
+
redisPoolStats,
|
|
2768
|
+
redisPublish,
|
|
2769
|
+
redisReplicate,
|
|
2770
|
+
redisReplicationStatus,
|
|
2771
|
+
redisSet,
|
|
2772
|
+
redisSetEvictionPolicy,
|
|
2773
|
+
redisSnapshot,
|
|
2774
|
+
redisSubscribe,
|
|
2775
|
+
registerFileClasses,
|
|
2776
|
+
registerGlobalClasses,
|
|
2777
|
+
registerPluginHook,
|
|
2778
|
+
registerPropertyName,
|
|
2779
|
+
registerValueName,
|
|
2780
|
+
resetBucketEngine,
|
|
2781
|
+
resetCacheStats,
|
|
2782
|
+
resetCompilationMetrics,
|
|
2783
|
+
resetIncrementalEngine,
|
|
2784
|
+
resetMemoryStats,
|
|
2785
|
+
resetNativeBridgeCache,
|
|
2786
|
+
resetResolverPoolStats,
|
|
2787
|
+
resolveCascade,
|
|
2788
|
+
resolveClassNames,
|
|
2789
|
+
resolveColorCached,
|
|
2790
|
+
resolveConflictGroup,
|
|
2791
|
+
resolveFontSizeCached,
|
|
2792
|
+
resolveSimpleVariants,
|
|
2793
|
+
resolveSpacingCached,
|
|
2794
|
+
resolveThemeValue,
|
|
2795
|
+
resolveVariants,
|
|
2796
|
+
reverseLookupProperty,
|
|
2797
|
+
reverseLookupValue,
|
|
2798
|
+
runCssPipeline,
|
|
2799
|
+
runElimination,
|
|
2800
|
+
runLoaderTransform,
|
|
2801
|
+
scanCacheOptimizations,
|
|
2802
|
+
scanFile,
|
|
2803
|
+
scanFileNative,
|
|
2804
|
+
scanFilesBatchNative,
|
|
2805
|
+
scanProjectUsage,
|
|
2806
|
+
scanWorkspace,
|
|
2807
|
+
shouldProcess,
|
|
2808
|
+
shouldSkipFile,
|
|
2809
|
+
startWatch,
|
|
2810
|
+
stopWatch,
|
|
2811
|
+
toAtomicClasses,
|
|
2812
|
+
transformSource,
|
|
2813
|
+
twMerge,
|
|
2814
|
+
twMergeMany,
|
|
2815
|
+
twMergeManyWithSeparator,
|
|
2816
|
+
twMergeRaw,
|
|
2817
|
+
twMergeWithSeparator,
|
|
2818
|
+
unregisterPluginHook,
|
|
2819
|
+
validateCssOutput,
|
|
2820
|
+
validateThemeConfig,
|
|
2821
|
+
valueIdToString,
|
|
2822
|
+
walkAndPrefilterSourceFiles,
|
|
2823
|
+
watchAddPattern,
|
|
2824
|
+
watchClearAll,
|
|
2825
|
+
watchEventTypeToString,
|
|
2826
|
+
watchGetActiveHandles,
|
|
2827
|
+
watchPause,
|
|
2828
|
+
watchRemovePattern,
|
|
2829
|
+
watchResume
|
|
2830
|
+
});
|
|
2506
2831
|
//# sourceMappingURL=compiler.js.map
|