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