tailwind-styled-v4 5.0.11 → 5.0.13
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/README.md +100 -4
- package/dist/{analyzeWorkspace-DDOQdzzI.d.ts → analyzeWorkspace-CopJNGmi.d.ts} +2 -0
- package/dist/{analyzeWorkspace-BS5O4rhC.d.mts → analyzeWorkspace-DpVPccjz.d.mts} +2 -0
- package/dist/analyzer.d.mts +4 -4
- package/dist/analyzer.d.ts +4 -4
- package/dist/analyzer.js +34 -69
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +33 -68
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.d.mts +4 -0
- package/dist/animate.d.ts +4 -0
- package/dist/animate.js +33 -11
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +33 -11
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +57 -6
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +57 -6
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +404 -190
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +401 -187
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +2700 -212
- package/dist/compiler.d.ts +2700 -212
- package/dist/compiler.js +1996 -503
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +1847 -448
- package/dist/compiler.mjs.map +1 -1
- package/dist/devtools.js +17 -4
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +17 -4
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.d.mts +11 -470
- package/dist/engine.d.ts +11 -470
- package/dist/engine.js +2777 -455
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +2776 -454
- package/dist/engine.mjs.map +1 -1
- package/dist/index-BDQw13kn.d.ts +464 -0
- package/dist/index-DJv28Uzq.d.mts +464 -0
- package/dist/index.browser.mjs +143 -255
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.d.mts +23 -39
- package/dist/index.d.ts +23 -39
- package/dist/index.js +7234 -1400
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7234 -1400
- package/dist/index.mjs.map +1 -1
- package/dist/next.d.mts +44 -1
- package/dist/next.d.ts +44 -1
- package/dist/next.js +3224 -1065
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +3223 -1066
- package/dist/next.mjs.map +1 -1
- package/dist/rspack.d.mts +9 -0
- package/dist/rspack.d.ts +9 -0
- package/dist/rspack.js +99 -61
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +99 -61
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.d.mts +8 -0
- package/dist/runtime-css.d.ts +8 -0
- package/dist/runtime-css.js +23 -7
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +23 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/scanner.js +16 -37
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +15 -36
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +107 -1
- package/dist/shared.d.ts +107 -1
- package/dist/shared.js +3014 -466
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +3008 -445
- package/dist/shared.mjs.map +1 -1
- package/dist/svelte.js +39 -35
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +38 -34
- package/dist/svelte.mjs.map +1 -1
- package/dist/theme.js +85 -76
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +83 -74
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +2351 -187
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +2351 -187
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +404 -190
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +401 -187
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +2657 -320
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +2657 -320
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +39 -35
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +38 -34
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +190 -33
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +190 -33
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/index.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/native/tailwind-styled-native.win32-x64-msvc.node +0 -0
- package/package.json +9 -4
- package/CHANGELOG.md +0 -285
package/dist/compiler.js
CHANGED
|
@@ -30,7 +30,9 @@ var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
|
30
30
|
|
|
31
31
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
32
32
|
var __defProp = Object.defineProperty;
|
|
33
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
33
34
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
35
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
34
36
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
35
37
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
36
38
|
}) : x)(function(x) {
|
|
@@ -44,6 +46,15 @@ var __export = (target, all) => {
|
|
|
44
46
|
for (var name in all)
|
|
45
47
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
46
48
|
};
|
|
49
|
+
var __copyProps = (to, from, except, desc) => {
|
|
50
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
51
|
+
for (let key of __getOwnPropNames(from))
|
|
52
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
53
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
54
|
+
}
|
|
55
|
+
return to;
|
|
56
|
+
};
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
47
58
|
function platformKey() {
|
|
48
59
|
if (isBrowser) return "browser";
|
|
49
60
|
return `${process.platform}-${process.arch}`;
|
|
@@ -54,7 +65,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
54
65
|
if (isBrowser) {
|
|
55
66
|
return { path: null, source: "not-found", platform, tried: ["not available in browser"] };
|
|
56
67
|
}
|
|
57
|
-
if (process.env.TWS_DISABLE_NATIVE === "1") {
|
|
68
|
+
if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_DISABLE_NATIVE === "1") {
|
|
58
69
|
return { path: null, source: "not-found", platform, tried: [] };
|
|
59
70
|
}
|
|
60
71
|
const envPath = process.env.TW_NATIVE_PATH?.trim();
|
|
@@ -159,7 +170,7 @@ var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttemp
|
|
|
159
170
|
var init_nativeBridge = __esm({
|
|
160
171
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
161
172
|
init_src();
|
|
162
|
-
_loadNative = (
|
|
173
|
+
_loadNative = (path4) => __require(path4);
|
|
163
174
|
log = (...args) => {
|
|
164
175
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
165
176
|
console.log("[compiler:native]", ...args);
|
|
@@ -232,585 +243,2067 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
232
243
|
}
|
|
233
244
|
});
|
|
234
245
|
|
|
235
|
-
// packages/domain/compiler/src/
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
// packages/domain/compiler/src/compiler/cssGeneratorNative.ts
|
|
247
|
+
async function generateCssNative(classes, options) {
|
|
248
|
+
const { theme } = options;
|
|
249
|
+
const native = exports.getNativeBridge();
|
|
250
|
+
if (!native?.generateCssNative) {
|
|
251
|
+
throw new Error(
|
|
252
|
+
"FATAL: Rust CSS generator (generateCssNative) is required but not available. Ensure native binding is properly loaded. Check that native/.node binary exists."
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
const themeJson = JSON.stringify(theme);
|
|
256
|
+
const css = native.generateCssNative(classes, themeJson);
|
|
257
|
+
return css;
|
|
258
|
+
}
|
|
259
|
+
function getCacheStats() {
|
|
246
260
|
try {
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
_twEngine = tw;
|
|
252
|
-
return _twEngine;
|
|
253
|
-
} catch (e) {
|
|
254
|
-
_twEngineError = e instanceof Error ? e : new Error(String(e));
|
|
255
|
-
throw _twEngineError;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
async function generateRawCss(classes, cssEntryContent, root) {
|
|
259
|
-
if (classes.length === 0) return "";
|
|
260
|
-
const tw = loadTailwindEngine();
|
|
261
|
-
const input = cssEntryContent ?? "@import 'tailwindcss';";
|
|
262
|
-
const { readFileSync, existsSync: existsSync2 } = await import('fs');
|
|
263
|
-
const { dirname, resolve: resolve2 } = await import('path');
|
|
264
|
-
const projectRoot = root ?? process.cwd();
|
|
265
|
-
const req = module$1.createRequire(resolve2(projectRoot, "package.json"));
|
|
266
|
-
const loadStylesheet = async (id, base) => {
|
|
267
|
-
try {
|
|
268
|
-
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;
|
|
269
|
-
const pkgPath = req.resolve(cssId);
|
|
270
|
-
return {
|
|
271
|
-
content: readFileSync(pkgPath, "utf-8"),
|
|
272
|
-
base: dirname(pkgPath)
|
|
273
|
-
};
|
|
274
|
-
} catch {
|
|
275
|
-
try {
|
|
276
|
-
const absPath = resolve2(base, id);
|
|
277
|
-
if (existsSync2(absPath)) {
|
|
278
|
-
return { content: readFileSync(absPath, "utf-8"), base: dirname(absPath) };
|
|
279
|
-
}
|
|
280
|
-
} catch {
|
|
281
|
-
}
|
|
282
|
-
return { content: "", base };
|
|
261
|
+
const native = exports.getNativeBridge();
|
|
262
|
+
if (!native?.getCacheStats) {
|
|
263
|
+
return null;
|
|
283
264
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
265
|
+
const [hits, misses] = native.getCacheStats();
|
|
266
|
+
return { hits, misses };
|
|
267
|
+
} catch {
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
287
270
|
}
|
|
288
|
-
function
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
271
|
+
function clearThemeCache() {
|
|
272
|
+
try {
|
|
273
|
+
const native = exports.getNativeBridge();
|
|
274
|
+
if (!native?.clearThemeCache) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
native.clearThemeCache();
|
|
278
|
+
} catch {
|
|
293
279
|
}
|
|
294
|
-
const result = native.processTailwindCssLightning(rawCss);
|
|
295
|
-
return result?.css ?? rawCss;
|
|
296
280
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
return { css: "", classes: [], sizeBytes: 0, optimized: false };
|
|
281
|
+
var init_cssGeneratorNative = __esm({
|
|
282
|
+
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
283
|
+
init_nativeBridge();
|
|
301
284
|
}
|
|
302
|
-
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
// packages/domain/compiler/src/compiler/compilationNative.ts
|
|
288
|
+
function compileCssNative2(classes, prefix) {
|
|
303
289
|
const native = exports.getNativeBridge();
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return {
|
|
307
|
-
css: finalCss,
|
|
308
|
-
classes: unique,
|
|
309
|
-
sizeBytes: finalCss.length,
|
|
310
|
-
optimized: hasLightning
|
|
311
|
-
};
|
|
290
|
+
if (!native?.compileCss) throw new Error("compileCss not available");
|
|
291
|
+
return native.compileCss(classes, prefix);
|
|
312
292
|
}
|
|
313
|
-
function
|
|
314
|
-
|
|
293
|
+
function compileCssLightning(classes) {
|
|
294
|
+
const native = exports.getNativeBridge();
|
|
295
|
+
if (!native?.compileCssLightning) throw new Error("compileCssLightning not available");
|
|
296
|
+
return native.compileCssLightning(classes);
|
|
315
297
|
}
|
|
316
|
-
function
|
|
298
|
+
function extractTwStateConfigsNative(source, filename) {
|
|
317
299
|
const native = exports.getNativeBridge();
|
|
318
|
-
if (!native?.
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
const result = native.processTailwindCssWithTargets(css, targets ?? null);
|
|
322
|
-
return (result?.css ?? css).trim();
|
|
300
|
+
if (!native?.extractTwStateConfigs) throw new Error("extractTwStateConfigs not available");
|
|
301
|
+
return native.extractTwStateConfigs(source, filename);
|
|
323
302
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
"
|
|
303
|
+
function generateStaticStateCssNative(inputs, resolvedCss) {
|
|
304
|
+
const native = exports.getNativeBridge();
|
|
305
|
+
if (!native?.generateStaticStateCss) throw new Error("generateStaticStateCss not available");
|
|
306
|
+
return native.generateStaticStateCss(inputs, resolvedCss ?? null);
|
|
307
|
+
}
|
|
308
|
+
function extractAndGenerateStateCssNative(source, filename) {
|
|
309
|
+
const native = exports.getNativeBridge();
|
|
310
|
+
if (!native?.extractAndGenerateStateCss) throw new Error("extractAndGenerateStateCss not available");
|
|
311
|
+
return native.extractAndGenerateStateCss(source, filename);
|
|
312
|
+
}
|
|
313
|
+
function layoutClassesToCss(classes) {
|
|
314
|
+
const native = exports.getNativeBridge();
|
|
315
|
+
if (!native?.layoutClassesToCss) throw new Error("layoutClassesToCss not available");
|
|
316
|
+
return native.layoutClassesToCss(classes);
|
|
317
|
+
}
|
|
318
|
+
function hashContent(input, algorithm = "sha256", length = 8) {
|
|
319
|
+
const native = exports.getNativeBridge();
|
|
320
|
+
if (!native?.hashContent) throw new Error("hashContent not available");
|
|
321
|
+
return native.hashContent(input, algorithm, length);
|
|
322
|
+
}
|
|
323
|
+
function extractTwContainerConfigs(source) {
|
|
324
|
+
const native = exports.getNativeBridge();
|
|
325
|
+
if (!native?.extractTwContainerConfigs) throw new Error("extractTwContainerConfigs not available");
|
|
326
|
+
return native.extractTwContainerConfigs(source);
|
|
327
|
+
}
|
|
328
|
+
function parseAtomicClass(twClass) {
|
|
329
|
+
const native = exports.getNativeBridge();
|
|
330
|
+
if (!native?.parseAtomicClass) throw new Error("parseAtomicClass not available");
|
|
331
|
+
return native.parseAtomicClass(twClass);
|
|
332
|
+
}
|
|
333
|
+
function generateAtomicCss(rulesJson) {
|
|
334
|
+
const native = exports.getNativeBridge();
|
|
335
|
+
if (!native?.generateAtomicCss) throw new Error("generateAtomicCss not available");
|
|
336
|
+
return native.generateAtomicCss(rulesJson);
|
|
337
|
+
}
|
|
338
|
+
function toAtomicClasses(twClasses) {
|
|
339
|
+
const native = exports.getNativeBridge();
|
|
340
|
+
if (!native?.toAtomicClasses) throw new Error("toAtomicClasses not available");
|
|
341
|
+
return native.toAtomicClasses(twClasses);
|
|
342
|
+
}
|
|
343
|
+
function clearAtomicRegistry() {
|
|
344
|
+
const native = exports.getNativeBridge();
|
|
345
|
+
if (!native?.clearAtomicRegistry) return;
|
|
346
|
+
native.clearAtomicRegistry();
|
|
347
|
+
}
|
|
348
|
+
function atomicRegistrySize() {
|
|
349
|
+
const native = exports.getNativeBridge();
|
|
350
|
+
if (!native?.atomicRegistrySize) return 0;
|
|
351
|
+
return native.atomicRegistrySize();
|
|
352
|
+
}
|
|
353
|
+
var init_compilationNative = __esm({
|
|
354
|
+
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
327
355
|
init_nativeBridge();
|
|
328
|
-
require2 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('compiler.js', document.baseURI).href)));
|
|
329
|
-
_twEngine = null;
|
|
330
|
-
_twEngineError = null;
|
|
331
356
|
}
|
|
332
357
|
});
|
|
333
358
|
|
|
334
|
-
// packages/domain/compiler/src/
|
|
335
|
-
|
|
336
|
-
var transformSource = (source, opts) => {
|
|
359
|
+
// packages/domain/compiler/src/compiler/cssCompilationNative.ts
|
|
360
|
+
function compileClass(input) {
|
|
337
361
|
const native = exports.getNativeBridge();
|
|
338
|
-
if (!native?.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
362
|
+
if (!native?.compile_class) throw new Error("compile_class not available");
|
|
363
|
+
const resultJson = native.compile_class(input);
|
|
364
|
+
try {
|
|
365
|
+
return JSON.parse(resultJson);
|
|
366
|
+
} catch {
|
|
367
|
+
return {
|
|
368
|
+
selector: "",
|
|
369
|
+
declarations: "",
|
|
370
|
+
properties: [],
|
|
371
|
+
specificity: 0
|
|
372
|
+
};
|
|
344
373
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
var hasTwUsage = (source) => {
|
|
374
|
+
}
|
|
375
|
+
function compileClasses(inputs) {
|
|
348
376
|
const native = exports.getNativeBridge();
|
|
349
|
-
if (!native?.
|
|
350
|
-
|
|
377
|
+
if (!native?.compile_classes) throw new Error("compile_classes not available");
|
|
378
|
+
const resultJson = native.compile_classes(inputs);
|
|
379
|
+
try {
|
|
380
|
+
return JSON.parse(resultJson);
|
|
381
|
+
} catch {
|
|
382
|
+
return {
|
|
383
|
+
css: "",
|
|
384
|
+
resolved_classes: [],
|
|
385
|
+
unknown_classes: [],
|
|
386
|
+
size_bytes: 0,
|
|
387
|
+
duration_ms: 0
|
|
388
|
+
};
|
|
351
389
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
var isAlreadyTransformed = (source) => {
|
|
390
|
+
}
|
|
391
|
+
function compileToCss(input, minify) {
|
|
355
392
|
const native = exports.getNativeBridge();
|
|
356
|
-
if (!native?.
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
};
|
|
361
|
-
var shouldProcess = (source) => {
|
|
362
|
-
return hasTwUsage(source) && !isAlreadyTransformed(source);
|
|
363
|
-
};
|
|
364
|
-
var compileCssFromClasses = (classes, prefix) => {
|
|
393
|
+
if (!native?.compile_to_css) throw new Error("compile_to_css not available");
|
|
394
|
+
return native.compile_to_css(input, minify ?? false);
|
|
395
|
+
}
|
|
396
|
+
function compileToCssBatch(inputs, minify) {
|
|
365
397
|
const native = exports.getNativeBridge();
|
|
366
|
-
if (!native?.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
if (!result) {
|
|
371
|
-
throw new Error("FATAL: transformSource returned null");
|
|
372
|
-
}
|
|
373
|
-
return result;
|
|
374
|
-
};
|
|
375
|
-
var buildStyleTag = (classes) => {
|
|
376
|
-
const result = compileCssFromClasses(classes);
|
|
377
|
-
return result?.code ? `<style data-tailwind-styled>${result.code}</style>` : "";
|
|
378
|
-
};
|
|
379
|
-
var compileCssNative = (classes, prefix = null) => {
|
|
380
|
-
return compileCssFromClasses(classes, prefix);
|
|
381
|
-
};
|
|
382
|
-
var generateCssForClasses = async (classes, _tailwindConfig, root, cssEntryContent, minify = false) => {
|
|
383
|
-
const { runCssPipeline: runCssPipeline2 } = await Promise.resolve().then(() => (init_tailwindEngine(), tailwindEngine_exports));
|
|
384
|
-
const result = await runCssPipeline2(classes, cssEntryContent, root, minify);
|
|
385
|
-
return result.css;
|
|
386
|
-
};
|
|
387
|
-
var extractAllClasses = (source) => {
|
|
398
|
+
if (!native?.compile_to_css_batch) throw new Error("compile_to_css_batch not available");
|
|
399
|
+
return native.compile_to_css_batch(inputs, minify ?? false);
|
|
400
|
+
}
|
|
401
|
+
function minifyCss(css) {
|
|
388
402
|
const native = exports.getNativeBridge();
|
|
389
|
-
if (!native?.
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
};
|
|
394
|
-
var extractClassesFromSource = (source) => {
|
|
403
|
+
if (!native?.minify_css) throw new Error("minify_css not available");
|
|
404
|
+
return native.minify_css(css);
|
|
405
|
+
}
|
|
406
|
+
function compileAnimation(animationName, from, to) {
|
|
395
407
|
const native = exports.getNativeBridge();
|
|
396
|
-
if (!native?.
|
|
397
|
-
|
|
408
|
+
if (!native?.compile_animation) throw new Error("compile_animation not available");
|
|
409
|
+
const resultJson = native.compile_animation(animationName, from, to);
|
|
410
|
+
try {
|
|
411
|
+
return JSON.parse(resultJson);
|
|
412
|
+
} catch {
|
|
413
|
+
return {
|
|
414
|
+
animation_id: "",
|
|
415
|
+
keyframes_css: "",
|
|
416
|
+
animation_rule: "",
|
|
417
|
+
duration_ms: 0
|
|
418
|
+
};
|
|
398
419
|
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
};
|
|
402
|
-
var astExtractClasses = (source, filename) => {
|
|
420
|
+
}
|
|
421
|
+
function compileKeyframes(name, stopsJson) {
|
|
403
422
|
const native = exports.getNativeBridge();
|
|
404
|
-
if (!native?.
|
|
405
|
-
|
|
423
|
+
if (!native?.compile_keyframes) throw new Error("compile_keyframes not available");
|
|
424
|
+
const resultJson = native.compile_keyframes(name, stopsJson);
|
|
425
|
+
try {
|
|
426
|
+
return JSON.parse(resultJson);
|
|
427
|
+
} catch {
|
|
428
|
+
return {
|
|
429
|
+
animation_id: "",
|
|
430
|
+
keyframes_css: "",
|
|
431
|
+
animation_rule: "",
|
|
432
|
+
duration_ms: 0
|
|
433
|
+
};
|
|
406
434
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
var parseClasses = (raw) => {
|
|
435
|
+
}
|
|
436
|
+
function compileTheme(tokensJson, themeName, prefix) {
|
|
410
437
|
const native = exports.getNativeBridge();
|
|
411
|
-
if (!native?.
|
|
412
|
-
|
|
438
|
+
if (!native?.compile_theme) throw new Error("compile_theme not available");
|
|
439
|
+
const resultJson = native.compile_theme(tokensJson, themeName, prefix);
|
|
440
|
+
try {
|
|
441
|
+
return JSON.parse(resultJson);
|
|
442
|
+
} catch {
|
|
443
|
+
return {
|
|
444
|
+
selector: ":root",
|
|
445
|
+
variables: [],
|
|
446
|
+
variables_css: "",
|
|
447
|
+
theme_name: themeName
|
|
448
|
+
};
|
|
413
449
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
var normalizeClasses = (raw) => {
|
|
417
|
-
const result = normalizeAndDedupClasses(raw);
|
|
418
|
-
return result?.normalized || "";
|
|
419
|
-
};
|
|
420
|
-
var mergeClassesStatic = (classes) => {
|
|
421
|
-
const result = normalizeAndDedupClasses(classes);
|
|
422
|
-
return result?.normalized || "";
|
|
423
|
-
};
|
|
424
|
-
var normalizeAndDedupClasses = (raw) => {
|
|
450
|
+
}
|
|
451
|
+
function twMerge(classString) {
|
|
425
452
|
const native = exports.getNativeBridge();
|
|
426
|
-
if (!native?.
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
return result || { normalized: "", duplicatesRemoved: 0, uniqueCount: 0 };
|
|
431
|
-
};
|
|
432
|
-
var eliminateDeadCss = (css, deadClasses) => {
|
|
453
|
+
if (!native?.tw_merge) throw new Error("tw_merge not available");
|
|
454
|
+
return native.tw_merge(classString);
|
|
455
|
+
}
|
|
456
|
+
function twMergeMany(classStrings) {
|
|
433
457
|
const native = exports.getNativeBridge();
|
|
434
|
-
if (!native?.
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
};
|
|
445
|
-
var findDeadVariants = (variantConfig, usage) => {
|
|
446
|
-
const unused = [];
|
|
447
|
-
const configs = Array.isArray(variantConfig) ? variantConfig : [{ name: "__root__", variants: variantConfig }];
|
|
448
|
-
for (const component of configs) {
|
|
449
|
-
const componentUsage = usage[component.name] ?? /* @__PURE__ */ new Set();
|
|
450
|
-
const variants = component.variants;
|
|
451
|
-
for (const [key, values] of Object.entries(variants)) {
|
|
452
|
-
for (const [value] of Object.entries(values)) {
|
|
453
|
-
if (!componentUsage.has(`${key}:${value}`)) {
|
|
454
|
-
unused.push(`${component.name !== "__root__" ? `${component.name}/` : ""}${key}:${value}`);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
return {
|
|
460
|
-
unusedCount: unused.length,
|
|
461
|
-
unused
|
|
458
|
+
if (!native?.tw_merge_many) throw new Error("tw_merge_many not available");
|
|
459
|
+
return native.tw_merge_many(classStrings);
|
|
460
|
+
}
|
|
461
|
+
function twMergeWithSeparator(classString, options) {
|
|
462
|
+
const native = exports.getNativeBridge();
|
|
463
|
+
if (!native?.tw_merge_with_separator)
|
|
464
|
+
throw new Error("tw_merge_with_separator not available");
|
|
465
|
+
const opts = {
|
|
466
|
+
separator: options.separator,
|
|
467
|
+
debug: options.debug
|
|
462
468
|
};
|
|
463
|
-
|
|
464
|
-
|
|
469
|
+
return native.tw_merge_with_separator(classString, opts);
|
|
470
|
+
}
|
|
471
|
+
function twMergeManyWithSeparator(classStrings, options) {
|
|
465
472
|
const native = exports.getNativeBridge();
|
|
466
|
-
if (!native?.
|
|
467
|
-
throw new Error("
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
);
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
var optimizeCss = (css) => {
|
|
473
|
+
if (!native?.tw_merge_many_with_separator)
|
|
474
|
+
throw new Error("tw_merge_many_with_separator not available");
|
|
475
|
+
const opts = {
|
|
476
|
+
separator: options.separator,
|
|
477
|
+
debug: options.debug
|
|
478
|
+
};
|
|
479
|
+
return native.tw_merge_many_with_separator(classStrings, opts);
|
|
480
|
+
}
|
|
481
|
+
function twMergeRaw(classLists) {
|
|
476
482
|
const native = exports.getNativeBridge();
|
|
477
|
-
if (!native?.
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
);
|
|
484
|
-
if (!native?.processTailwindCssLightning) {
|
|
485
|
-
throw new Error("FATAL: Native binding 'processTailwindCssLightning' is required but not available.");
|
|
486
|
-
}
|
|
487
|
-
const deadSet = new Set(deadResult.deadInCss ?? []);
|
|
488
|
-
const pruned = css.split(/(?<=\})\s*/).filter((rule) => {
|
|
489
|
-
const selectorMatch = rule.match(/\.([a-zA-Z0-9_-]+)/);
|
|
490
|
-
if (!selectorMatch) return true;
|
|
491
|
-
return !deadSet.has(selectorMatch[1]);
|
|
492
|
-
}).join("\n");
|
|
493
|
-
const compiled = native.processTailwindCssLightning(pruned);
|
|
494
|
-
return (compiled?.css ?? pruned).trim();
|
|
495
|
-
};
|
|
496
|
-
var scanProjectUsage = (dirs, cwd) => {
|
|
497
|
-
const path3 = __require("path");
|
|
498
|
-
const files = dirs.map((dir) => path3.resolve(cwd, dir));
|
|
499
|
-
const results = batchExtractClasses(files) || [];
|
|
500
|
-
const combined = {};
|
|
501
|
-
for (const result of results) {
|
|
502
|
-
if (result.ok && result.classes) {
|
|
503
|
-
for (const cls of result.classes) {
|
|
504
|
-
if (!combined[cls]) combined[cls] = {};
|
|
505
|
-
combined[cls][result.file] = /* @__PURE__ */ new Set([cls]);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
483
|
+
if (!native?.tw_merge_raw) throw new Error("tw_merge_raw not available");
|
|
484
|
+
return native.tw_merge_raw(classLists);
|
|
485
|
+
}
|
|
486
|
+
var init_cssCompilationNative = __esm({
|
|
487
|
+
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
488
|
+
init_nativeBridge();
|
|
508
489
|
}
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
// packages/domain/compiler/src/compiler/idRegistryNative.ts
|
|
493
|
+
function idRegistryCreate() {
|
|
512
494
|
const native = exports.getNativeBridge();
|
|
513
|
-
if (!native?.
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
};
|
|
518
|
-
var diffClassLists = (previous, current) => {
|
|
495
|
+
if (!native?.id_registry_create) throw new Error("id_registry_create not available");
|
|
496
|
+
return native.id_registry_create();
|
|
497
|
+
}
|
|
498
|
+
function idRegistryGenerate(handle, name) {
|
|
519
499
|
const native = exports.getNativeBridge();
|
|
520
|
-
if (!native?.
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
};
|
|
525
|
-
var batchExtractClasses = (filePaths) => {
|
|
500
|
+
if (!native?.id_registry_generate) throw new Error("id_registry_generate not available");
|
|
501
|
+
return native.id_registry_generate(handle, name);
|
|
502
|
+
}
|
|
503
|
+
function idRegistryLookup(handle, name) {
|
|
526
504
|
const native = exports.getNativeBridge();
|
|
527
|
-
if (!native?.
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
505
|
+
if (!native?.id_registry_lookup) throw new Error("id_registry_lookup not available");
|
|
506
|
+
return native.id_registry_lookup(handle, name);
|
|
507
|
+
}
|
|
508
|
+
function idRegistryNext(handle) {
|
|
509
|
+
const native = exports.getNativeBridge();
|
|
510
|
+
if (!native?.id_registry_next) throw new Error("id_registry_next not available");
|
|
511
|
+
return native.id_registry_next(handle);
|
|
512
|
+
}
|
|
513
|
+
function idRegistryDestroy(handle) {
|
|
514
|
+
const native = exports.getNativeBridge();
|
|
515
|
+
if (!native?.id_registry_destroy) return;
|
|
516
|
+
native.id_registry_destroy(handle);
|
|
517
|
+
}
|
|
518
|
+
function idRegistryReset(handle) {
|
|
519
|
+
const native = exports.getNativeBridge();
|
|
520
|
+
if (!native?.id_registry_reset) return;
|
|
521
|
+
native.id_registry_reset(handle);
|
|
522
|
+
}
|
|
523
|
+
function idRegistrySnapshot(handle) {
|
|
533
524
|
const native = exports.getNativeBridge();
|
|
534
|
-
if (!native?.
|
|
535
|
-
|
|
525
|
+
if (!native?.id_registry_snapshot) throw new Error("id_registry_snapshot not available");
|
|
526
|
+
const snapshotJson = native.id_registry_snapshot(handle);
|
|
527
|
+
try {
|
|
528
|
+
return JSON.parse(snapshotJson);
|
|
529
|
+
} catch {
|
|
530
|
+
return {
|
|
531
|
+
handle,
|
|
532
|
+
next_id: 0,
|
|
533
|
+
entries: [],
|
|
534
|
+
total_entries: 0
|
|
535
|
+
};
|
|
536
536
|
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
537
|
+
}
|
|
538
|
+
function idRegistryActiveCount() {
|
|
539
|
+
const native = exports.getNativeBridge();
|
|
540
|
+
if (!native?.id_registry_active_count) throw new Error("id_registry_active_count not available");
|
|
541
|
+
return native.id_registry_active_count();
|
|
542
|
+
}
|
|
543
|
+
function registerPropertyName(propertyName) {
|
|
544
|
+
const native = exports.getNativeBridge();
|
|
545
|
+
if (!native?.register_property_name)
|
|
546
|
+
throw new Error("register_property_name not available");
|
|
547
|
+
return native.register_property_name(propertyName);
|
|
548
|
+
}
|
|
549
|
+
function registerValueName(valueName) {
|
|
550
|
+
const native = exports.getNativeBridge();
|
|
551
|
+
if (!native?.register_value_name) throw new Error("register_value_name not available");
|
|
552
|
+
return native.register_value_name(valueName);
|
|
553
|
+
}
|
|
554
|
+
function propertyIdToString(propertyId) {
|
|
540
555
|
const native = exports.getNativeBridge();
|
|
541
|
-
if (!native?.
|
|
542
|
-
|
|
556
|
+
if (!native?.property_id_to_string) throw new Error("property_id_to_string not available");
|
|
557
|
+
return native.property_id_to_string(propertyId);
|
|
558
|
+
}
|
|
559
|
+
function valueIdToString(valueId) {
|
|
560
|
+
const native = exports.getNativeBridge();
|
|
561
|
+
if (!native?.value_id_to_string) throw new Error("value_id_to_string not available");
|
|
562
|
+
return native.value_id_to_string(valueId);
|
|
563
|
+
}
|
|
564
|
+
function reverseLookupProperty(propertyId) {
|
|
565
|
+
const native = exports.getNativeBridge();
|
|
566
|
+
if (!native?.reverse_lookup_property)
|
|
567
|
+
throw new Error("reverse_lookup_property not available");
|
|
568
|
+
return native.reverse_lookup_property(propertyId);
|
|
569
|
+
}
|
|
570
|
+
function reverseLookupValue(valueId) {
|
|
571
|
+
const native = exports.getNativeBridge();
|
|
572
|
+
if (!native?.reverse_lookup_value) throw new Error("reverse_lookup_value not available");
|
|
573
|
+
return native.reverse_lookup_value(valueId);
|
|
574
|
+
}
|
|
575
|
+
function idRegistryExport(handle) {
|
|
576
|
+
const native = exports.getNativeBridge();
|
|
577
|
+
if (!native?.id_registry_export) throw new Error("id_registry_export not available");
|
|
578
|
+
return native.id_registry_export(handle);
|
|
579
|
+
}
|
|
580
|
+
function idRegistryImport(importedData) {
|
|
581
|
+
const native = exports.getNativeBridge();
|
|
582
|
+
if (!native?.id_registry_import) throw new Error("id_registry_import not available");
|
|
583
|
+
return native.id_registry_import(importedData);
|
|
584
|
+
}
|
|
585
|
+
var init_idRegistryNative = __esm({
|
|
586
|
+
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
587
|
+
init_nativeBridge();
|
|
543
588
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
// packages/domain/compiler/src/compiler/streamingNative.ts
|
|
592
|
+
function processFileChange(fileChangeJson) {
|
|
547
593
|
const native = exports.getNativeBridge();
|
|
548
|
-
if (!native?.
|
|
549
|
-
|
|
594
|
+
if (!native?.process_file_change) throw new Error("process_file_change not available");
|
|
595
|
+
const resultJson = native.process_file_change(fileChangeJson);
|
|
596
|
+
try {
|
|
597
|
+
return JSON.parse(resultJson);
|
|
598
|
+
} catch {
|
|
599
|
+
return {
|
|
600
|
+
file_path: "",
|
|
601
|
+
status: "error",
|
|
602
|
+
old_classes: [],
|
|
603
|
+
new_classes: [],
|
|
604
|
+
added_classes: [],
|
|
605
|
+
removed_classes: [],
|
|
606
|
+
changed: false,
|
|
607
|
+
fingerprint: "",
|
|
608
|
+
error: "Failed to parse result"
|
|
609
|
+
};
|
|
550
610
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
var compileVariants = (componentId, config) => {
|
|
554
|
-
return compileVariantTable(JSON.stringify({ componentId, ...config }));
|
|
555
|
-
};
|
|
556
|
-
var classifyAndSortClasses = (classes) => {
|
|
611
|
+
}
|
|
612
|
+
function computeIncrementalDiff(oldScanJson, newScanJson) {
|
|
557
613
|
const native = exports.getNativeBridge();
|
|
558
|
-
if (!native?.
|
|
559
|
-
throw new Error("
|
|
614
|
+
if (!native?.compute_incremental_diff)
|
|
615
|
+
throw new Error("compute_incremental_diff not available");
|
|
616
|
+
const resultJson = native.compute_incremental_diff(oldScanJson, newScanJson);
|
|
617
|
+
try {
|
|
618
|
+
return JSON.parse(resultJson);
|
|
619
|
+
} catch {
|
|
620
|
+
return {
|
|
621
|
+
is_changed: false,
|
|
622
|
+
changes_count: 0,
|
|
623
|
+
diff: {
|
|
624
|
+
added_files: [],
|
|
625
|
+
removed_files: [],
|
|
626
|
+
modified_files: [],
|
|
627
|
+
added_classes: [],
|
|
628
|
+
removed_classes: [],
|
|
629
|
+
total_changes: 0
|
|
630
|
+
},
|
|
631
|
+
processing_time_ms: 0
|
|
632
|
+
};
|
|
560
633
|
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
var mergeCssDeclarations = (cssChunks) => {
|
|
634
|
+
}
|
|
635
|
+
function createFingerprint(filePath, fileContent) {
|
|
564
636
|
const native = exports.getNativeBridge();
|
|
565
|
-
if (!native?.
|
|
566
|
-
|
|
637
|
+
if (!native?.create_fingerprint) throw new Error("create_fingerprint not available");
|
|
638
|
+
const fingerprintJson = native.create_fingerprint(filePath, fileContent);
|
|
639
|
+
try {
|
|
640
|
+
return JSON.parse(fingerprintJson);
|
|
641
|
+
} catch {
|
|
642
|
+
return {
|
|
643
|
+
file_path: filePath,
|
|
644
|
+
content_hash: "",
|
|
645
|
+
size_bytes: fileContent.length,
|
|
646
|
+
mtime_ms: Date.now(),
|
|
647
|
+
class_hash: "",
|
|
648
|
+
signature: ""
|
|
649
|
+
};
|
|
567
650
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
var analyzeClassUsage = (classes, scanResultJson, css) => {
|
|
651
|
+
}
|
|
652
|
+
function injectStateHash(css, stateHash) {
|
|
571
653
|
const native = exports.getNativeBridge();
|
|
572
|
-
if (!native?.
|
|
573
|
-
|
|
654
|
+
if (!native?.inject_state_hash) throw new Error("inject_state_hash not available");
|
|
655
|
+
const resultJson = native.inject_state_hash(css, stateHash);
|
|
656
|
+
try {
|
|
657
|
+
return JSON.parse(resultJson);
|
|
658
|
+
} catch {
|
|
659
|
+
return {
|
|
660
|
+
injected: false,
|
|
661
|
+
state_hash: stateHash,
|
|
662
|
+
affected_files: 0,
|
|
663
|
+
total_injected_bytes: 0
|
|
664
|
+
};
|
|
574
665
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
var analyzeRsc = (source, filename) => {
|
|
666
|
+
}
|
|
667
|
+
function pruneStaleCacheEntries(maxAgeSeconds, maxEntries) {
|
|
578
668
|
const native = exports.getNativeBridge();
|
|
579
|
-
if (!native?.
|
|
580
|
-
|
|
669
|
+
if (!native?.prune_stale_entries) throw new Error("prune_stale_entries not available");
|
|
670
|
+
const resultJson = native.prune_stale_entries(maxAgeSeconds, maxEntries);
|
|
671
|
+
try {
|
|
672
|
+
return JSON.parse(resultJson);
|
|
673
|
+
} catch {
|
|
674
|
+
return {
|
|
675
|
+
entries_before: 0,
|
|
676
|
+
entries_after: 0,
|
|
677
|
+
entries_removed: 0,
|
|
678
|
+
freed_bytes: 0
|
|
679
|
+
};
|
|
581
680
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
dynamic: []
|
|
599
|
-
};
|
|
600
|
-
};
|
|
601
|
-
var injectClientDirective = (source) => {
|
|
602
|
-
if (!source.includes('"use client"') && !source.includes("'use client'")) {
|
|
603
|
-
return '"use client";\n' + source;
|
|
681
|
+
}
|
|
682
|
+
function rebuildWorkspaceResult(rootDir, extensions) {
|
|
683
|
+
const native = exports.getNativeBridge();
|
|
684
|
+
if (!native?.rebuild_workspace_result)
|
|
685
|
+
throw new Error("rebuild_workspace_result not available");
|
|
686
|
+
const resultJson = native.rebuild_workspace_result(rootDir, extensions || []);
|
|
687
|
+
try {
|
|
688
|
+
return JSON.parse(resultJson);
|
|
689
|
+
} catch {
|
|
690
|
+
return {
|
|
691
|
+
total_files_scanned: 0,
|
|
692
|
+
total_classes_found: 0,
|
|
693
|
+
unique_classes: 0,
|
|
694
|
+
build_time_ms: 0,
|
|
695
|
+
files_with_changes: 0
|
|
696
|
+
};
|
|
604
697
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
var injectServerOnlyComment = (source) => {
|
|
608
|
-
return `/* @server-only */
|
|
609
|
-
${source}`;
|
|
610
|
-
};
|
|
611
|
-
var analyzeClasses = (filesJson, cwd, flags) => {
|
|
698
|
+
}
|
|
699
|
+
function scanFileNative(filePath, fileContent) {
|
|
612
700
|
const native = exports.getNativeBridge();
|
|
613
|
-
if (!native?.
|
|
614
|
-
|
|
701
|
+
if (!native?.scan_file_native) throw new Error("scan_file_native not available");
|
|
702
|
+
const resultJson = native.scan_file_native(filePath, fileContent);
|
|
703
|
+
try {
|
|
704
|
+
return JSON.parse(resultJson);
|
|
705
|
+
} catch {
|
|
706
|
+
return {
|
|
707
|
+
file: filePath,
|
|
708
|
+
classes: [],
|
|
709
|
+
added_classes: [],
|
|
710
|
+
removed_classes: [],
|
|
711
|
+
changed: false
|
|
712
|
+
};
|
|
615
713
|
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
const fs3 = __require("fs");
|
|
623
|
-
fs3.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
624
|
-
}
|
|
625
|
-
return allClasses;
|
|
626
|
-
};
|
|
627
|
-
var loadSafelist = (safelistPath) => {
|
|
628
|
-
const fs3 = __require("fs");
|
|
714
|
+
}
|
|
715
|
+
function scanFilesBatchNative(filesJson) {
|
|
716
|
+
const native = exports.getNativeBridge();
|
|
717
|
+
if (!native?.scan_files_batch_native)
|
|
718
|
+
throw new Error("scan_files_batch_native not available");
|
|
719
|
+
const resultJson = native.scan_files_batch_native(filesJson);
|
|
629
720
|
try {
|
|
630
|
-
|
|
631
|
-
return JSON.parse(content);
|
|
721
|
+
return JSON.parse(resultJson);
|
|
632
722
|
} catch {
|
|
633
723
|
return [];
|
|
634
724
|
}
|
|
635
|
-
}
|
|
636
|
-
var
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
725
|
+
}
|
|
726
|
+
var init_streamingNative = __esm({
|
|
727
|
+
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
728
|
+
init_nativeBridge();
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
|
|
732
|
+
// packages/domain/compiler/src/compiler/tailwindEngine.ts
|
|
733
|
+
var tailwindEngine_exports = {};
|
|
734
|
+
__export(tailwindEngine_exports, {
|
|
735
|
+
clearCache: () => clearCache,
|
|
736
|
+
getCacheStats: () => getCacheStats2,
|
|
737
|
+
processTailwindCssWithTargets: () => processTailwindCssWithTargets,
|
|
738
|
+
runCssPipeline: () => runCssPipeline,
|
|
739
|
+
runCssPipelineSync: () => runCssPipelineSync
|
|
740
|
+
});
|
|
741
|
+
function _getCacheKey(classes, minify, cssEntry, root) {
|
|
742
|
+
const sorted = [...classes].sort().join(",");
|
|
743
|
+
const flags = `${minify ? "1" : "0"}${cssEntry ? "1" : "0"}${root ? "1" : "0"}`;
|
|
744
|
+
return `${sorted}|${flags}`;
|
|
745
|
+
}
|
|
746
|
+
function _evictOldestIfNeeded() {
|
|
747
|
+
if (_cssCache.size >= MAX_CACHE_SIZE) {
|
|
748
|
+
const firstKey = _cssCache.keys().next().value;
|
|
749
|
+
if (firstKey !== void 0) {
|
|
750
|
+
_cssCache.delete(firstKey);
|
|
650
751
|
}
|
|
651
752
|
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
const path3 = __require("path");
|
|
753
|
+
}
|
|
754
|
+
function getCacheStats2() {
|
|
755
|
+
const total = _cacheHits + _cacheMisses;
|
|
656
756
|
return {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
757
|
+
hits: _cacheHits,
|
|
758
|
+
misses: _cacheMisses,
|
|
759
|
+
hitRate: total > 0 ? _cacheHits / total : 0,
|
|
760
|
+
size: _cssCache.size,
|
|
761
|
+
maxSize: MAX_CACHE_SIZE
|
|
662
762
|
};
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
763
|
+
}
|
|
764
|
+
function clearCache() {
|
|
765
|
+
_cssCache.clear();
|
|
766
|
+
_cacheHits = 0;
|
|
767
|
+
_cacheMisses = 0;
|
|
768
|
+
}
|
|
769
|
+
function getThemeConfig() {
|
|
667
770
|
return {
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
771
|
+
colors: {
|
|
772
|
+
slate: {
|
|
773
|
+
"50": "#f8fafc",
|
|
774
|
+
"100": "#f1f5f9",
|
|
775
|
+
"200": "#e2e8f0",
|
|
776
|
+
"300": "#cbd5e1",
|
|
777
|
+
"400": "#94a3b8",
|
|
778
|
+
"500": "#64748b",
|
|
779
|
+
"600": "#475569",
|
|
780
|
+
"700": "#334155",
|
|
781
|
+
"800": "#1e293b",
|
|
782
|
+
"900": "#0f172a"
|
|
783
|
+
},
|
|
784
|
+
gray: {
|
|
785
|
+
"50": "#f9fafb",
|
|
786
|
+
"100": "#f3f4f6",
|
|
787
|
+
"200": "#e5e7eb",
|
|
788
|
+
"300": "#d1d5db",
|
|
789
|
+
"400": "#9ca3af",
|
|
790
|
+
"500": "#6b7280",
|
|
791
|
+
"600": "#4b5563",
|
|
792
|
+
"700": "#374151",
|
|
793
|
+
"800": "#1f2937",
|
|
794
|
+
"900": "#111827"
|
|
795
|
+
},
|
|
796
|
+
white: "#ffffff",
|
|
797
|
+
black: "#000000",
|
|
798
|
+
red: {
|
|
799
|
+
"500": "#ef4444",
|
|
800
|
+
"600": "#dc2626"
|
|
801
|
+
},
|
|
802
|
+
blue: {
|
|
803
|
+
"500": "#3b82f6",
|
|
804
|
+
"600": "#1e40af"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
spacing: {
|
|
808
|
+
"0": "0px",
|
|
809
|
+
"1": "0.25rem",
|
|
810
|
+
"2": "0.5rem",
|
|
811
|
+
"3": "0.75rem",
|
|
812
|
+
"4": "1rem",
|
|
813
|
+
"5": "1.25rem",
|
|
814
|
+
"6": "1.5rem",
|
|
815
|
+
"8": "2rem",
|
|
816
|
+
"10": "2.5rem",
|
|
817
|
+
"12": "3rem",
|
|
818
|
+
"16": "4rem",
|
|
819
|
+
"20": "5rem",
|
|
820
|
+
"24": "6rem"
|
|
821
|
+
},
|
|
822
|
+
breakpoints: {
|
|
823
|
+
"sm": "640px",
|
|
824
|
+
"md": "768px",
|
|
825
|
+
"lg": "1024px",
|
|
826
|
+
"xl": "1280px",
|
|
827
|
+
"2xl": "1536px"
|
|
828
|
+
}
|
|
671
829
|
};
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
|
|
677
|
-
|
|
830
|
+
}
|
|
831
|
+
function postProcessWithLightning(rawCss) {
|
|
832
|
+
if (!rawCss) return "";
|
|
833
|
+
const native = exports.getNativeBridge();
|
|
834
|
+
if (!native?.processTailwindCssLightning) {
|
|
835
|
+
throw new Error("FATAL: Native binding 'processTailwindCssLightning' is required but not available.");
|
|
678
836
|
}
|
|
679
|
-
|
|
680
|
-
|
|
837
|
+
const result = native.processTailwindCssLightning(rawCss);
|
|
838
|
+
if (!result?.css) {
|
|
839
|
+
throw new Error("FATAL: processTailwindCssLightning returned null");
|
|
681
840
|
}
|
|
682
|
-
return
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
const rootPage = normalized.match(/\/app\/page\.[tj]sx?$/);
|
|
692
|
-
if (rootPage) return "/";
|
|
693
|
-
return null;
|
|
694
|
-
};
|
|
695
|
-
var getAllRoutes = () => {
|
|
696
|
-
const native = exports.getNativeBridge();
|
|
697
|
-
if (!native?.analyzeClasses) {
|
|
698
|
-
throw new Error("FATAL: Native binding 'analyzeClasses' is required but not available.");
|
|
841
|
+
return result.css;
|
|
842
|
+
}
|
|
843
|
+
async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
|
|
844
|
+
const filtered = classes.filter(Boolean);
|
|
845
|
+
const uniqueMap = /* @__PURE__ */ new Map();
|
|
846
|
+
filtered.forEach((cls) => uniqueMap.set(cls, cls));
|
|
847
|
+
const unique = Array.from(uniqueMap.values());
|
|
848
|
+
if (unique.length === 0) {
|
|
849
|
+
return { css: "", classes: [], sizeBytes: 0, optimized: false };
|
|
699
850
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
var getIncrementalEngine = () => {
|
|
711
|
-
if (!_incrementalEngineInstance) {
|
|
712
|
-
_incrementalEngineInstance = new IncrementalEngine();
|
|
851
|
+
const cacheKey = _getCacheKey(unique, minify, cssEntryContent, root);
|
|
852
|
+
const cached = _cssCache.get(cacheKey);
|
|
853
|
+
if (cached) {
|
|
854
|
+
_cacheHits++;
|
|
855
|
+
if (process.env.DEBUG?.includes("compiler")) {
|
|
856
|
+
console.log(
|
|
857
|
+
`[Compiler] Cache HIT: ${unique.length} classes (hit rate: ${(getCacheStats2().hitRate * 100).toFixed(1)}%)`
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
return cached;
|
|
713
861
|
}
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
};
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
862
|
+
_cacheMisses++;
|
|
863
|
+
let rawCss;
|
|
864
|
+
let usedRustCompiler = false;
|
|
865
|
+
const theme = getThemeConfig();
|
|
866
|
+
rawCss = await generateCssNative(unique, { theme });
|
|
867
|
+
usedRustCompiler = true;
|
|
868
|
+
const finalCss = minify ? postProcessWithLightning(rawCss) : rawCss;
|
|
869
|
+
if (process.env.DEBUG?.includes("compiler")) {
|
|
870
|
+
console.log(
|
|
871
|
+
`[Compiler] Generated CSS from ${unique.length} classes (${usedRustCompiler ? "Rust" : "JavaScript"})`,
|
|
872
|
+
`Size: ${finalCss.length} bytes`
|
|
873
|
+
);
|
|
722
874
|
}
|
|
723
|
-
|
|
724
|
-
|
|
875
|
+
const result = {
|
|
876
|
+
css: finalCss,
|
|
877
|
+
classes: unique,
|
|
878
|
+
sizeBytes: finalCss.length,
|
|
879
|
+
optimized: minify
|
|
880
|
+
};
|
|
881
|
+
_evictOldestIfNeeded();
|
|
882
|
+
_cssCache.set(cacheKey, result);
|
|
883
|
+
return result;
|
|
884
|
+
}
|
|
885
|
+
function runCssPipelineSync(_classes) {
|
|
886
|
+
return { css: "", classes: [], sizeBytes: 0, optimized: false };
|
|
887
|
+
}
|
|
888
|
+
function processTailwindCssWithTargets(css, targets) {
|
|
725
889
|
const native = exports.getNativeBridge();
|
|
726
|
-
if (!native?.
|
|
727
|
-
throw new Error("FATAL: Native binding '
|
|
890
|
+
if (!native?.processTailwindCssWithTargets) {
|
|
891
|
+
throw new Error("FATAL: Native binding 'processTailwindCssWithTargets' is required but not available.");
|
|
892
|
+
}
|
|
893
|
+
const result = native.processTailwindCssWithTargets(css, targets ?? null);
|
|
894
|
+
if (!result?.css) {
|
|
895
|
+
throw new Error("FATAL: processTailwindCssWithTargets returned null");
|
|
896
|
+
}
|
|
897
|
+
return result.css;
|
|
898
|
+
}
|
|
899
|
+
var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
|
|
900
|
+
var init_tailwindEngine = __esm({
|
|
901
|
+
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
902
|
+
init_nativeBridge();
|
|
903
|
+
init_cssGeneratorNative();
|
|
904
|
+
module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('compiler.js', document.baseURI).href)));
|
|
905
|
+
_cssCache = /* @__PURE__ */ new Map();
|
|
906
|
+
_cacheHits = 0;
|
|
907
|
+
_cacheMisses = 0;
|
|
908
|
+
MAX_CACHE_SIZE = 100;
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
|
|
912
|
+
// packages/domain/compiler/src/compiler/index.ts
|
|
913
|
+
var init_compiler = __esm({
|
|
914
|
+
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
915
|
+
init_cssGeneratorNative();
|
|
916
|
+
init_compilationNative();
|
|
917
|
+
init_cssCompilationNative();
|
|
918
|
+
init_idRegistryNative();
|
|
919
|
+
init_streamingNative();
|
|
920
|
+
init_tailwindEngine();
|
|
728
921
|
}
|
|
922
|
+
});
|
|
923
|
+
|
|
924
|
+
// packages/domain/compiler/src/parser/index.ts
|
|
925
|
+
var parser_exports = {};
|
|
926
|
+
__export(parser_exports, {
|
|
927
|
+
astExtractClasses: () => exports.astExtractClasses,
|
|
928
|
+
batchExtractClasses: () => exports.batchExtractClasses,
|
|
929
|
+
checkAgainstSafelist: () => exports.checkAgainstSafelist,
|
|
930
|
+
diffClassLists: () => exports.diffClassLists,
|
|
931
|
+
extractAllClasses: () => exports.extractAllClasses,
|
|
932
|
+
extractClassesFromSource: () => exports.extractClassesFromSource,
|
|
933
|
+
extractComponentUsage: () => exports.extractComponentUsage,
|
|
934
|
+
mergeClassesStatic: () => exports.mergeClassesStatic,
|
|
935
|
+
normalizeAndDedupClasses: () => exports.normalizeAndDedupClasses,
|
|
936
|
+
normalizeClasses: () => exports.normalizeClasses,
|
|
937
|
+
parseClasses: () => exports.parseClasses
|
|
938
|
+
});
|
|
939
|
+
exports.parseClasses = void 0; exports.extractAllClasses = void 0; exports.extractClassesFromSource = void 0; exports.astExtractClasses = void 0; exports.normalizeClasses = void 0; exports.mergeClassesStatic = void 0; exports.normalizeAndDedupClasses = void 0; exports.extractComponentUsage = void 0; exports.batchExtractClasses = void 0; exports.checkAgainstSafelist = void 0; exports.diffClassLists = void 0;
|
|
940
|
+
var init_parser = __esm({
|
|
941
|
+
"packages/domain/compiler/src/parser/index.ts"() {
|
|
942
|
+
init_nativeBridge();
|
|
943
|
+
exports.parseClasses = (raw) => {
|
|
944
|
+
const native = exports.getNativeBridge();
|
|
945
|
+
if (!native?.parseClasses) {
|
|
946
|
+
throw new Error("FATAL: Native binding 'parseClasses' is required but not available.");
|
|
947
|
+
}
|
|
948
|
+
return native.parseClasses(raw) || [];
|
|
949
|
+
};
|
|
950
|
+
exports.extractAllClasses = (source) => {
|
|
951
|
+
const native = exports.getNativeBridge();
|
|
952
|
+
if (!native?.extractAllClasses) {
|
|
953
|
+
throw new Error("FATAL: Native binding 'extractAllClasses' is required but not available.");
|
|
954
|
+
}
|
|
955
|
+
return native.extractAllClasses(source) || [];
|
|
956
|
+
};
|
|
957
|
+
exports.extractClassesFromSource = (source) => {
|
|
958
|
+
const native = exports.getNativeBridge();
|
|
959
|
+
if (!native?.extractClassesFromSource) {
|
|
960
|
+
throw new Error("FATAL: Native binding 'extractClassesFromSource' is required but not available.");
|
|
961
|
+
}
|
|
962
|
+
const result = native.extractClassesFromSource(source);
|
|
963
|
+
return Array.isArray(result) ? result.join(" ") : String(result || "");
|
|
964
|
+
};
|
|
965
|
+
exports.astExtractClasses = (source, _filename) => {
|
|
966
|
+
const native = exports.getNativeBridge();
|
|
967
|
+
if (!native?.extractClassesFromSource) {
|
|
968
|
+
throw new Error("FATAL: Native binding 'extractClassesFromSource' is required but not available.");
|
|
969
|
+
}
|
|
970
|
+
return native.extractClassesFromSource(source) || [];
|
|
971
|
+
};
|
|
972
|
+
exports.normalizeClasses = (raw) => {
|
|
973
|
+
const result = exports.normalizeAndDedupClasses(raw);
|
|
974
|
+
return result?.normalized || "";
|
|
975
|
+
};
|
|
976
|
+
exports.mergeClassesStatic = (classes) => {
|
|
977
|
+
const result = exports.normalizeAndDedupClasses(classes);
|
|
978
|
+
return result?.normalized || "";
|
|
979
|
+
};
|
|
980
|
+
exports.normalizeAndDedupClasses = (raw) => {
|
|
981
|
+
const native = exports.getNativeBridge();
|
|
982
|
+
if (!native?.normalizeAndDedupClasses) {
|
|
983
|
+
throw new Error("FATAL: Native binding 'normalizeAndDedupClasses' is required but not available.");
|
|
984
|
+
}
|
|
985
|
+
const result = native.normalizeAndDedupClasses(raw);
|
|
986
|
+
return result || { normalized: "", duplicatesRemoved: 0, uniqueCount: 0 };
|
|
987
|
+
};
|
|
988
|
+
exports.extractComponentUsage = (source) => {
|
|
989
|
+
const native = exports.getNativeBridge();
|
|
990
|
+
if (!native?.extractComponentUsage) {
|
|
991
|
+
throw new Error("FATAL: Native binding 'extractComponentUsage' is required but not available.");
|
|
992
|
+
}
|
|
993
|
+
return native.extractComponentUsage(source) || [];
|
|
994
|
+
};
|
|
995
|
+
exports.batchExtractClasses = (filePaths) => {
|
|
996
|
+
const native = exports.getNativeBridge();
|
|
997
|
+
if (!native?.batchExtractClasses) {
|
|
998
|
+
throw new Error("FATAL: Native binding 'batchExtractClasses' is required but not available.");
|
|
999
|
+
}
|
|
1000
|
+
return native.batchExtractClasses(filePaths) || [];
|
|
1001
|
+
};
|
|
1002
|
+
exports.checkAgainstSafelist = (classes, safelist) => {
|
|
1003
|
+
const native = exports.getNativeBridge();
|
|
1004
|
+
if (!native?.checkAgainstSafelist) {
|
|
1005
|
+
throw new Error("FATAL: Native binding 'checkAgainstSafelist' is required but not available.");
|
|
1006
|
+
}
|
|
1007
|
+
return native.checkAgainstSafelist(classes, safelist) || { matched: [], unmatched: [], safelistSize: 0 };
|
|
1008
|
+
};
|
|
1009
|
+
exports.diffClassLists = (previous, current) => {
|
|
1010
|
+
const native = exports.getNativeBridge();
|
|
1011
|
+
if (!native?.diffClassLists) {
|
|
1012
|
+
throw new Error("FATAL: Native binding 'diffClassLists' is required but not available.");
|
|
1013
|
+
}
|
|
1014
|
+
return native.diffClassLists(previous, current) || { added: [], removed: [], unchanged: [], hasChanges: false };
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
// packages/domain/compiler/src/analyzer/analyzerNative.ts
|
|
1020
|
+
function detectDeadCode(scanResultJson, css) {
|
|
1021
|
+
const native = exports.getNativeBridge();
|
|
1022
|
+
if (!native?.detectDeadCode) throw new Error("detectDeadCode not available");
|
|
1023
|
+
return native.detectDeadCode(scanResultJson, css);
|
|
1024
|
+
}
|
|
1025
|
+
function analyzeClassUsageNative(classes, scanResultJson, css) {
|
|
1026
|
+
const native = exports.getNativeBridge();
|
|
1027
|
+
if (!native?.analyzeClassUsage) throw new Error("analyzeClassUsage not available");
|
|
1028
|
+
return native.analyzeClassUsage(classes, scanResultJson, css);
|
|
1029
|
+
}
|
|
1030
|
+
function analyzeClassesNative(filesJson, cwd, flags) {
|
|
1031
|
+
const native = exports.getNativeBridge();
|
|
1032
|
+
if (!native?.analyzeClasses) throw new Error("analyzeClasses not available");
|
|
1033
|
+
return native.analyzeClasses(filesJson, cwd, flags ?? 0);
|
|
1034
|
+
}
|
|
1035
|
+
function analyzeRscNative(source, filename) {
|
|
1036
|
+
const native = exports.getNativeBridge();
|
|
1037
|
+
if (!native?.analyzeRsc) throw new Error("analyzeRsc not available");
|
|
1038
|
+
return native.analyzeRsc(source, filename);
|
|
1039
|
+
}
|
|
1040
|
+
function optimizeCssNative(css) {
|
|
1041
|
+
const native = exports.getNativeBridge();
|
|
1042
|
+
if (!native?.processTailwindCssLightning) throw new Error("processTailwindCssLightning not available");
|
|
1043
|
+
const result = native.processTailwindCssLightning(css);
|
|
729
1044
|
return {
|
|
730
|
-
|
|
731
|
-
|
|
1045
|
+
css: result.css,
|
|
1046
|
+
originalSize: css.length,
|
|
1047
|
+
optimizedSize: result.size_bytes,
|
|
1048
|
+
reductionPercentage: (css.length - result.size_bytes) / css.length * 100
|
|
732
1049
|
};
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
1050
|
+
}
|
|
1051
|
+
function processTailwindCssLightning(css) {
|
|
1052
|
+
const native = exports.getNativeBridge();
|
|
1053
|
+
if (!native?.processTailwindCssLightning) throw new Error("processTailwindCssLightning not available");
|
|
1054
|
+
return native.processTailwindCssLightning(css);
|
|
1055
|
+
}
|
|
1056
|
+
function eliminateDeadCssNative(css, deadClasses) {
|
|
1057
|
+
const native = exports.getNativeBridge();
|
|
1058
|
+
if (!native?.eliminateDeadCss) throw new Error("eliminateDeadCss not available");
|
|
1059
|
+
return native.eliminateDeadCss(css, deadClasses);
|
|
1060
|
+
}
|
|
1061
|
+
function hoistComponentsNative(source) {
|
|
1062
|
+
const native = exports.getNativeBridge();
|
|
1063
|
+
if (!native?.hoistComponents) throw new Error("hoistComponents not available");
|
|
1064
|
+
return native.hoistComponents(source);
|
|
1065
|
+
}
|
|
1066
|
+
function compileVariantTableNative(configJson) {
|
|
1067
|
+
const native = exports.getNativeBridge();
|
|
1068
|
+
if (!native?.compileVariantTable) throw new Error("compileVariantTable not available");
|
|
1069
|
+
return native.compileVariantTable(configJson);
|
|
1070
|
+
}
|
|
1071
|
+
function classifyAndSortClassesNative(classes) {
|
|
1072
|
+
const native = exports.getNativeBridge();
|
|
1073
|
+
if (!native?.classifyAndSortClasses) throw new Error("classifyAndSortClasses not available");
|
|
1074
|
+
return native.classifyAndSortClasses(classes);
|
|
1075
|
+
}
|
|
1076
|
+
function mergeCssDeclarationsNative(cssChunks) {
|
|
1077
|
+
const native = exports.getNativeBridge();
|
|
1078
|
+
if (!native?.mergeCssDeclarations) throw new Error("mergeCssDeclarations not available");
|
|
1079
|
+
return native.mergeCssDeclarations(cssChunks);
|
|
1080
|
+
}
|
|
1081
|
+
var init_analyzerNative = __esm({
|
|
1082
|
+
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
1083
|
+
init_nativeBridge();
|
|
739
1084
|
}
|
|
740
|
-
};
|
|
741
|
-
|
|
1085
|
+
});
|
|
1086
|
+
|
|
1087
|
+
// packages/domain/compiler/src/analyzer/themeResolutionNative.ts
|
|
1088
|
+
function resolveVariants(configJson) {
|
|
742
1089
|
const native = exports.getNativeBridge();
|
|
743
|
-
if (!native?.
|
|
744
|
-
|
|
1090
|
+
if (!native?.resolve_variants) throw new Error("resolve_variants not available");
|
|
1091
|
+
const resultJson = native.resolve_variants(configJson);
|
|
1092
|
+
try {
|
|
1093
|
+
return JSON.parse(resultJson);
|
|
1094
|
+
} catch {
|
|
1095
|
+
return {
|
|
1096
|
+
variants: [],
|
|
1097
|
+
supported: [],
|
|
1098
|
+
deprecated: [],
|
|
1099
|
+
conflicting: []
|
|
1100
|
+
};
|
|
745
1101
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
var detectConflicts = (classes) => {
|
|
1102
|
+
}
|
|
1103
|
+
function validateThemeConfig(configJson) {
|
|
749
1104
|
const native = exports.getNativeBridge();
|
|
750
|
-
if (!native?.
|
|
751
|
-
|
|
1105
|
+
if (!native?.validate_variant_config) throw new Error("validate_variant_config not available");
|
|
1106
|
+
const resultJson = native.validate_variant_config(configJson);
|
|
1107
|
+
try {
|
|
1108
|
+
return JSON.parse(resultJson);
|
|
1109
|
+
} catch {
|
|
1110
|
+
return {
|
|
1111
|
+
is_valid: false,
|
|
1112
|
+
errors: ["Unable to parse configuration"],
|
|
1113
|
+
warnings: [],
|
|
1114
|
+
suggestions: []
|
|
1115
|
+
};
|
|
752
1116
|
}
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
1117
|
+
}
|
|
1118
|
+
function resolveCascade(baseThemeJson, overridesJson) {
|
|
1119
|
+
const native = exports.getNativeBridge();
|
|
1120
|
+
if (!native?.resolve_cascade) throw new Error("resolve_cascade not available");
|
|
1121
|
+
const resultJson = native.resolve_cascade(baseThemeJson, overridesJson);
|
|
1122
|
+
try {
|
|
1123
|
+
return JSON.parse(resultJson);
|
|
1124
|
+
} catch {
|
|
1125
|
+
return {
|
|
1126
|
+
base_theme: {},
|
|
1127
|
+
user_overrides: {},
|
|
1128
|
+
merged_theme: {},
|
|
1129
|
+
conflict_resolutions: []
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
function resolveClassNames(classNames, themeJson) {
|
|
1134
|
+
const native = exports.getNativeBridge();
|
|
1135
|
+
if (!native?.resolve_class_names) throw new Error("resolve_class_names not available");
|
|
1136
|
+
const resultJson = native.resolve_class_names(classNames, themeJson);
|
|
1137
|
+
try {
|
|
1138
|
+
return JSON.parse(resultJson);
|
|
1139
|
+
} catch {
|
|
1140
|
+
return [];
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
function resolveConflictGroup(groupName, themeJson) {
|
|
1144
|
+
const native = exports.getNativeBridge();
|
|
1145
|
+
if (!native?.resolve_conflict_group)
|
|
1146
|
+
throw new Error("resolve_conflict_group not available");
|
|
1147
|
+
const resultJson = native.resolve_conflict_group(groupName, themeJson);
|
|
1148
|
+
try {
|
|
1149
|
+
return JSON.parse(resultJson);
|
|
1150
|
+
} catch {
|
|
1151
|
+
return {
|
|
1152
|
+
group_name: groupName,
|
|
1153
|
+
conflicting_classes: [],
|
|
1154
|
+
description: "",
|
|
1155
|
+
resolution_strategy: "last-wins"
|
|
1156
|
+
};
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
function resolveThemeValue(keyPath, themeJson) {
|
|
1160
|
+
const native = exports.getNativeBridge();
|
|
1161
|
+
if (!native?.resolve_theme_value) throw new Error("resolve_theme_value not available");
|
|
1162
|
+
return native.resolve_theme_value(keyPath, themeJson);
|
|
1163
|
+
}
|
|
1164
|
+
function resolveSimpleVariants(configJson) {
|
|
1165
|
+
const native = exports.getNativeBridge();
|
|
1166
|
+
if (!native?.resolve_simple_variants) throw new Error("resolve_simple_variants not available");
|
|
1167
|
+
const resultJson = native.resolve_simple_variants(configJson);
|
|
1168
|
+
try {
|
|
1169
|
+
return JSON.parse(resultJson);
|
|
1170
|
+
} catch {
|
|
1171
|
+
return [];
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
var init_themeResolutionNative = __esm({
|
|
1175
|
+
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
1176
|
+
init_nativeBridge();
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
// packages/domain/compiler/src/analyzer/scannerNative.ts
|
|
1181
|
+
function scanWorkspace(root, extensions) {
|
|
1182
|
+
const native = exports.getNativeBridge();
|
|
1183
|
+
if (!native?.scan_workspace) throw new Error("scan_workspace not available");
|
|
1184
|
+
return native.scan_workspace(root, extensions);
|
|
1185
|
+
}
|
|
1186
|
+
function extractClassesFromSourceNative(source) {
|
|
1187
|
+
const native = exports.getNativeBridge();
|
|
1188
|
+
if (!native?.extract_classes_from_source) throw new Error("extract_classes_from_source not available");
|
|
1189
|
+
return native.extract_classes_from_source(source);
|
|
1190
|
+
}
|
|
1191
|
+
function batchExtractClassesNative(filePaths) {
|
|
1192
|
+
const native = exports.getNativeBridge();
|
|
1193
|
+
if (!native?.batch_extract_classes) throw new Error("batch_extract_classes not available");
|
|
1194
|
+
return native.batch_extract_classes(filePaths);
|
|
1195
|
+
}
|
|
1196
|
+
function checkAgainstSafelistNative(classes, safelist) {
|
|
1197
|
+
const native = exports.getNativeBridge();
|
|
1198
|
+
if (!native?.check_against_safelist) throw new Error("check_against_safelist not available");
|
|
1199
|
+
return native.check_against_safelist(classes, safelist);
|
|
1200
|
+
}
|
|
1201
|
+
function scanFile(filePath) {
|
|
1202
|
+
const native = exports.getNativeBridge();
|
|
1203
|
+
if (!native?.scan_file) throw new Error("scan_file not available");
|
|
1204
|
+
return native.scan_file(filePath);
|
|
1205
|
+
}
|
|
1206
|
+
function collectFiles(root, extensions) {
|
|
1207
|
+
const native = exports.getNativeBridge();
|
|
1208
|
+
if (!native?.collect_files) throw new Error("collect_files not available");
|
|
1209
|
+
return native.collect_files(root, extensions);
|
|
1210
|
+
}
|
|
1211
|
+
function walkAndPrefilterSourceFiles(root, extensions, _parallel) {
|
|
1212
|
+
const native = exports.getNativeBridge();
|
|
1213
|
+
if (!native?.walk_and_prefilter_source_files) throw new Error("walk_and_prefilter_source_files not available");
|
|
1214
|
+
return native.walk_and_prefilter_source_files(root, extensions);
|
|
1215
|
+
}
|
|
1216
|
+
function generateSubComponentTypes(root, outputPath) {
|
|
1217
|
+
const native = exports.getNativeBridge();
|
|
1218
|
+
if (!native?.generate_sub_component_types) throw new Error("generate_sub_component_types not available");
|
|
1219
|
+
return native.generate_sub_component_types(root, outputPath);
|
|
1220
|
+
}
|
|
1221
|
+
var init_scannerNative = __esm({
|
|
1222
|
+
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
1223
|
+
init_nativeBridge();
|
|
1224
|
+
}
|
|
1225
|
+
});
|
|
1226
|
+
|
|
1227
|
+
// packages/domain/compiler/src/analyzer/index.ts
|
|
1228
|
+
var init_analyzer = __esm({
|
|
1229
|
+
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
1230
|
+
init_analyzerNative();
|
|
1231
|
+
init_themeResolutionNative();
|
|
1232
|
+
init_scannerNative();
|
|
1233
|
+
}
|
|
1234
|
+
});
|
|
1235
|
+
|
|
1236
|
+
// packages/domain/compiler/src/cache/cacheNative.ts
|
|
1237
|
+
function getCacheStatistics() {
|
|
1238
|
+
const native = exports.getNativeBridge();
|
|
1239
|
+
if (!native?.get_cache_statistics) throw new Error("get_cache_statistics not available");
|
|
1240
|
+
const statsJson = native.get_cache_statistics();
|
|
1241
|
+
try {
|
|
1242
|
+
return JSON.parse(statsJson);
|
|
1243
|
+
} catch {
|
|
1244
|
+
return {
|
|
1245
|
+
parse_cache: { hits: 0, misses: 0, size: 0 },
|
|
1246
|
+
resolve_cache: { hits: 0, misses: 0, size: 0 },
|
|
1247
|
+
compile_cache: { hits: 0, misses: 0, size: 0 },
|
|
1248
|
+
css_gen_cache: { hits: 0, misses: 0, size: 0 },
|
|
1249
|
+
overall_hit_rate: 0,
|
|
1250
|
+
total_memory_bytes: 0
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
function clearAllCaches() {
|
|
1255
|
+
const native = exports.getNativeBridge();
|
|
1256
|
+
if (!native?.clear_all_caches) return;
|
|
1257
|
+
try {
|
|
1258
|
+
native.clear_all_caches();
|
|
1259
|
+
} catch {
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
function clearParseCache() {
|
|
1263
|
+
const native = exports.getNativeBridge();
|
|
1264
|
+
if (!native?.clear_parse_cache) return;
|
|
1265
|
+
try {
|
|
1266
|
+
native.clear_parse_cache();
|
|
1267
|
+
} catch {
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
function clearResolveCache() {
|
|
1271
|
+
const native = exports.getNativeBridge();
|
|
1272
|
+
if (!native?.clear_resolve_cache) return;
|
|
1273
|
+
try {
|
|
1274
|
+
native.clear_resolve_cache();
|
|
1275
|
+
} catch {
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
function clearCompileCache() {
|
|
1279
|
+
const native = exports.getNativeBridge();
|
|
1280
|
+
if (!native?.clear_compile_cache) return;
|
|
1281
|
+
try {
|
|
1282
|
+
native.clear_compile_cache();
|
|
1283
|
+
} catch {
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
function clearCssGenCache() {
|
|
1287
|
+
const native = exports.getNativeBridge();
|
|
1288
|
+
if (!native?.clear_css_gen_cache) return;
|
|
1289
|
+
try {
|
|
1290
|
+
native.clear_css_gen_cache();
|
|
1291
|
+
} catch {
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
function getCacheOptimizationHints(hitRatePercent, memoryUsedMb) {
|
|
1295
|
+
const native = exports.getNativeBridge();
|
|
1296
|
+
if (!native?.get_cache_optimization_hints)
|
|
1297
|
+
throw new Error("get_cache_optimization_hints not available");
|
|
1298
|
+
const hintsJson = native.get_cache_optimization_hints(
|
|
1299
|
+
Math.min(100, Math.max(0, hitRatePercent)),
|
|
1300
|
+
Math.max(1, memoryUsedMb)
|
|
1301
|
+
);
|
|
1302
|
+
try {
|
|
1303
|
+
return JSON.parse(hintsJson);
|
|
1304
|
+
} catch {
|
|
1305
|
+
return {
|
|
1306
|
+
current_strategy: "unknown",
|
|
1307
|
+
recommended_strategy: "increase_size",
|
|
1308
|
+
estimated_improvement_percent: 0,
|
|
1309
|
+
suggested_memory_mb: 256,
|
|
1310
|
+
notes: ["Unable to analyze cache statistics"]
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
function estimateOptimalCacheConfig(totalBudgetMb, workloadType) {
|
|
1315
|
+
const native = exports.getNativeBridge();
|
|
1316
|
+
if (!native?.estimate_optimal_cache_config_native)
|
|
1317
|
+
throw new Error("estimate_optimal_cache_config_native not available");
|
|
1318
|
+
const configJson = native.estimate_optimal_cache_config_native(
|
|
1319
|
+
Math.max(64, totalBudgetMb),
|
|
1320
|
+
workloadType
|
|
1321
|
+
);
|
|
1322
|
+
try {
|
|
1323
|
+
return JSON.parse(configJson);
|
|
1324
|
+
} catch {
|
|
1325
|
+
return {
|
|
1326
|
+
parse_cache_size: 128,
|
|
1327
|
+
resolve_cache_size: 64,
|
|
1328
|
+
compile_cache_size: 256,
|
|
1329
|
+
css_gen_cache_size: 128,
|
|
1330
|
+
recommended_eviction_policy: "lru",
|
|
1331
|
+
ttl_seconds: 3600,
|
|
1332
|
+
expected_hit_rate_percent: 75
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
function cacheRead(cachePath) {
|
|
1337
|
+
const native = exports.getNativeBridge();
|
|
1338
|
+
if (!native?.cache_read) throw new Error("cache_read not available");
|
|
1339
|
+
const result = native.cache_read(cachePath);
|
|
1340
|
+
try {
|
|
1341
|
+
return JSON.parse(result.entries_json || "[]");
|
|
1342
|
+
} catch {
|
|
1343
|
+
return [];
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
function cacheWrite(cachePath, entries) {
|
|
1347
|
+
const native = exports.getNativeBridge();
|
|
1348
|
+
if (!native?.cache_write) throw new Error("cache_write not available");
|
|
1349
|
+
try {
|
|
1350
|
+
const result = native.cache_write(
|
|
1351
|
+
cachePath,
|
|
1352
|
+
entries.map((e) => ({
|
|
1353
|
+
file: e.file,
|
|
1354
|
+
content_hash: e.contentHash,
|
|
1355
|
+
classes: e.classes,
|
|
1356
|
+
mtime_ms: e.mtimeMs,
|
|
1357
|
+
size_bytes: e.sizeBytes
|
|
1358
|
+
}))
|
|
1359
|
+
);
|
|
1360
|
+
return typeof result === "boolean" ? result : result === true;
|
|
1361
|
+
} catch {
|
|
1362
|
+
return false;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
function cachePriority(mtimeMs, sizeBytes, hitCount) {
|
|
1366
|
+
const native = exports.getNativeBridge();
|
|
1367
|
+
if (!native?.cache_priority) throw new Error("cache_priority not available");
|
|
1368
|
+
return native.cache_priority(mtimeMs, sizeBytes, hitCount);
|
|
1369
|
+
}
|
|
1370
|
+
var init_cacheNative = __esm({
|
|
1371
|
+
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
1372
|
+
init_nativeBridge();
|
|
1373
|
+
}
|
|
1374
|
+
});
|
|
1375
|
+
|
|
1376
|
+
// packages/domain/compiler/src/cache/index.ts
|
|
1377
|
+
var init_cache = __esm({
|
|
1378
|
+
"packages/domain/compiler/src/cache/index.ts"() {
|
|
1379
|
+
init_cacheNative();
|
|
1380
|
+
}
|
|
1381
|
+
});
|
|
1382
|
+
|
|
1383
|
+
// packages/domain/compiler/src/redis/redisNative.ts
|
|
1384
|
+
function redisPing() {
|
|
1385
|
+
const native = exports.getNativeBridge();
|
|
1386
|
+
if (!native?.redis_ping) throw new Error("redis_ping not available");
|
|
1387
|
+
return native.redis_ping();
|
|
1388
|
+
}
|
|
1389
|
+
function redisGet(key) {
|
|
1390
|
+
const native = exports.getNativeBridge();
|
|
1391
|
+
if (!native?.redis_get) throw new Error("redis_get not available");
|
|
1392
|
+
const result = native.redis_get(key);
|
|
1393
|
+
return result === "nil" ? null : result;
|
|
1394
|
+
}
|
|
1395
|
+
function redisSet(key, value, ttl_seconds) {
|
|
1396
|
+
const native = exports.getNativeBridge();
|
|
1397
|
+
if (!native?.redis_set) throw new Error("redis_set not available");
|
|
1398
|
+
return native.redis_set(key, value, ttl_seconds);
|
|
1399
|
+
}
|
|
1400
|
+
function redisDelete(key) {
|
|
1401
|
+
const native = exports.getNativeBridge();
|
|
1402
|
+
if (!native?.redis_delete) throw new Error("redis_delete not available");
|
|
1403
|
+
return native.redis_delete(key);
|
|
1404
|
+
}
|
|
1405
|
+
function redisExists(key) {
|
|
1406
|
+
const native = exports.getNativeBridge();
|
|
1407
|
+
if (!native?.redis_exists) throw new Error("redis_exists not available");
|
|
1408
|
+
return native.redis_exists(key);
|
|
1409
|
+
}
|
|
1410
|
+
function redisMget(keys) {
|
|
1411
|
+
const native = exports.getNativeBridge();
|
|
1412
|
+
if (!native?.redis_mget) throw new Error("redis_mget not available");
|
|
1413
|
+
const result = native.redis_mget(keys);
|
|
1414
|
+
try {
|
|
1415
|
+
return JSON.parse(result);
|
|
1416
|
+
} catch {
|
|
1417
|
+
return keys.map(() => null);
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
function redisMset(pairs) {
|
|
1421
|
+
const native = exports.getNativeBridge();
|
|
1422
|
+
if (!native?.redis_mset) throw new Error("redis_mset not available");
|
|
1423
|
+
return native.redis_mset(pairs);
|
|
1424
|
+
}
|
|
1425
|
+
function redisFlushDb() {
|
|
1426
|
+
const native = exports.getNativeBridge();
|
|
1427
|
+
if (!native?.redis_flush_db) throw new Error("redis_flush_db not available");
|
|
1428
|
+
return native.redis_flush_db();
|
|
1429
|
+
}
|
|
1430
|
+
function redisFlushAll() {
|
|
1431
|
+
const native = exports.getNativeBridge();
|
|
1432
|
+
if (!native?.redis_flush_all) throw new Error("redis_flush_all not available");
|
|
1433
|
+
return native.redis_flush_all();
|
|
1434
|
+
}
|
|
1435
|
+
function redisPoolConnect(host, port, pool_size) {
|
|
1436
|
+
const native = exports.getNativeBridge();
|
|
1437
|
+
if (!native?.redis_pool_connect) throw new Error("redis_pool_connect not available");
|
|
1438
|
+
return native.redis_pool_connect(host, port, pool_size);
|
|
1439
|
+
}
|
|
1440
|
+
function redisPoolStats() {
|
|
1441
|
+
const native = exports.getNativeBridge();
|
|
1442
|
+
if (!native?.redis_pool_stats) throw new Error("redis_pool_stats not available");
|
|
1443
|
+
const result = native.redis_pool_stats();
|
|
1444
|
+
try {
|
|
1445
|
+
return JSON.parse(result);
|
|
1446
|
+
} catch {
|
|
1447
|
+
return {
|
|
1448
|
+
connected_count: 0,
|
|
1449
|
+
idle_count: 0,
|
|
1450
|
+
waiting_count: 0,
|
|
1451
|
+
total_requests: 0,
|
|
1452
|
+
total_errors: 0
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
function redisPoolReconnect() {
|
|
1457
|
+
const native = exports.getNativeBridge();
|
|
1458
|
+
if (!native?.redis_pool_reconnect) throw new Error("redis_pool_reconnect not available");
|
|
1459
|
+
return native.redis_pool_reconnect();
|
|
1460
|
+
}
|
|
1461
|
+
function redisEnableCluster(initial_nodes) {
|
|
1462
|
+
const native = exports.getNativeBridge();
|
|
1463
|
+
if (!native?.redis_enable_cluster) throw new Error("redis_enable_cluster not available");
|
|
1464
|
+
const result = native.redis_enable_cluster(initial_nodes);
|
|
1465
|
+
try {
|
|
1466
|
+
return JSON.parse(result);
|
|
1467
|
+
} catch {
|
|
1468
|
+
return {
|
|
1469
|
+
enabled: false,
|
|
1470
|
+
cluster_state: "error",
|
|
1471
|
+
nodes: [],
|
|
1472
|
+
slots_assigned: 0,
|
|
1473
|
+
slots_ok: 0,
|
|
1474
|
+
slots_fail: 0
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
function redisDisableCluster() {
|
|
1479
|
+
const native = exports.getNativeBridge();
|
|
1480
|
+
if (!native?.redis_disable_cluster) throw new Error("redis_disable_cluster not available");
|
|
1481
|
+
return native.redis_disable_cluster();
|
|
1482
|
+
}
|
|
1483
|
+
function redisClusterStatus() {
|
|
1484
|
+
const native = exports.getNativeBridge();
|
|
1485
|
+
if (!native?.redis_cluster_status) throw new Error("redis_cluster_status not available");
|
|
1486
|
+
const result = native.redis_cluster_status();
|
|
1487
|
+
try {
|
|
1488
|
+
return JSON.parse(result);
|
|
1489
|
+
} catch {
|
|
1490
|
+
return {
|
|
1491
|
+
enabled: false,
|
|
1492
|
+
cluster_state: "unknown",
|
|
1493
|
+
nodes: [],
|
|
1494
|
+
slots_assigned: 0,
|
|
1495
|
+
slots_ok: 0,
|
|
1496
|
+
slots_fail: 0
|
|
1497
|
+
};
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
function redisSubscribe(channel) {
|
|
1501
|
+
const native = exports.getNativeBridge();
|
|
1502
|
+
if (!native?.redis_subscribe) throw new Error("redis_subscribe not available");
|
|
1503
|
+
return native.redis_subscribe(channel);
|
|
1504
|
+
}
|
|
1505
|
+
function redisPublish(channel, message) {
|
|
1506
|
+
const native = exports.getNativeBridge();
|
|
1507
|
+
if (!native?.redis_publish) throw new Error("redis_publish not available");
|
|
1508
|
+
return native.redis_publish(channel, message);
|
|
1509
|
+
}
|
|
1510
|
+
function redisExpirationSet(key, ttl_seconds) {
|
|
1511
|
+
const native = exports.getNativeBridge();
|
|
1512
|
+
if (!native?.redis_expiration_set) throw new Error("redis_expiration_set not available");
|
|
1513
|
+
return native.redis_expiration_set(key, ttl_seconds);
|
|
1514
|
+
}
|
|
1515
|
+
function redisExpirationGet(key) {
|
|
1516
|
+
const native = exports.getNativeBridge();
|
|
1517
|
+
if (!native?.redis_expiration_get) throw new Error("redis_expiration_get not available");
|
|
1518
|
+
const result = native.redis_expiration_get(key);
|
|
1519
|
+
try {
|
|
1520
|
+
return JSON.parse(result);
|
|
1521
|
+
} catch {
|
|
1522
|
+
return {
|
|
1523
|
+
key,
|
|
1524
|
+
ttl_seconds: -1,
|
|
1525
|
+
expiration_timestamp: 0,
|
|
1526
|
+
is_persistent: true
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
function redisInfo() {
|
|
1531
|
+
const native = exports.getNativeBridge();
|
|
1532
|
+
if (!native?.redis_info) throw new Error("redis_info not available");
|
|
1533
|
+
return native.redis_info();
|
|
1534
|
+
}
|
|
1535
|
+
function redisMonitor() {
|
|
1536
|
+
const native = exports.getNativeBridge();
|
|
1537
|
+
if (!native?.redis_monitor) throw new Error("redis_monitor not available");
|
|
1538
|
+
return native.redis_monitor();
|
|
1539
|
+
}
|
|
1540
|
+
function redisCacheSize() {
|
|
1541
|
+
const native = exports.getNativeBridge();
|
|
1542
|
+
if (!native?.redis_cache_size) throw new Error("redis_cache_size not available");
|
|
1543
|
+
return native.redis_cache_size();
|
|
1544
|
+
}
|
|
1545
|
+
function redisCacheKeyCount() {
|
|
1546
|
+
const native = exports.getNativeBridge();
|
|
1547
|
+
if (!native?.redis_cache_key_count) throw new Error("redis_cache_key_count not available");
|
|
1548
|
+
return native.redis_cache_key_count();
|
|
1549
|
+
}
|
|
1550
|
+
function redisCacheClear() {
|
|
1551
|
+
const native = exports.getNativeBridge();
|
|
1552
|
+
if (!native?.redis_cache_clear) throw new Error("redis_cache_clear not available");
|
|
1553
|
+
return native.redis_cache_clear();
|
|
1554
|
+
}
|
|
1555
|
+
function redisCacheHitRate() {
|
|
1556
|
+
const native = exports.getNativeBridge();
|
|
1557
|
+
if (!native?.redis_cache_hit_rate) throw new Error("redis_cache_hit_rate not available");
|
|
1558
|
+
return native.redis_cache_hit_rate();
|
|
1559
|
+
}
|
|
1560
|
+
function redisEnablePersistence(mode) {
|
|
1561
|
+
const native = exports.getNativeBridge();
|
|
1562
|
+
if (!native?.redis_enable_persistence) throw new Error("redis_enable_persistence not available");
|
|
1563
|
+
return native.redis_enable_persistence(mode);
|
|
1564
|
+
}
|
|
1565
|
+
function redisDisablePersistence() {
|
|
1566
|
+
const native = exports.getNativeBridge();
|
|
1567
|
+
if (!native?.redis_disable_persistence) throw new Error("redis_disable_persistence not available");
|
|
1568
|
+
return native.redis_disable_persistence();
|
|
1569
|
+
}
|
|
1570
|
+
function redisSnapshot() {
|
|
1571
|
+
const native = exports.getNativeBridge();
|
|
1572
|
+
if (!native?.redis_snapshot) throw new Error("redis_snapshot not available");
|
|
1573
|
+
return native.redis_snapshot();
|
|
1574
|
+
}
|
|
1575
|
+
function redisMemoryStats() {
|
|
1576
|
+
const native = exports.getNativeBridge();
|
|
1577
|
+
if (!native?.redis_memory_stats) throw new Error("redis_memory_stats not available");
|
|
1578
|
+
return native.redis_memory_stats();
|
|
1579
|
+
}
|
|
1580
|
+
function redisOptimizeMemory() {
|
|
1581
|
+
const native = exports.getNativeBridge();
|
|
1582
|
+
if (!native?.redis_optimize_memory) throw new Error("redis_optimize_memory not available");
|
|
1583
|
+
return native.redis_optimize_memory();
|
|
1584
|
+
}
|
|
1585
|
+
function redisSetEvictionPolicy(policy) {
|
|
1586
|
+
const native = exports.getNativeBridge();
|
|
1587
|
+
if (!native?.redis_set_eviction_policy) throw new Error("redis_set_eviction_policy not available");
|
|
1588
|
+
return native.redis_set_eviction_policy(policy);
|
|
1589
|
+
}
|
|
1590
|
+
function redisGetEvictionPolicy() {
|
|
1591
|
+
const native = exports.getNativeBridge();
|
|
1592
|
+
if (!native?.redis_get_eviction_policy) throw new Error("redis_get_eviction_policy not available");
|
|
1593
|
+
return native.redis_get_eviction_policy();
|
|
1594
|
+
}
|
|
1595
|
+
function redisReplicate(target_host, target_port) {
|
|
1596
|
+
const native = exports.getNativeBridge();
|
|
1597
|
+
if (!native?.redis_replicate) throw new Error("redis_replicate not available");
|
|
1598
|
+
return native.redis_replicate(target_host, target_port);
|
|
1599
|
+
}
|
|
1600
|
+
function redisReplicationStatus() {
|
|
1601
|
+
const native = exports.getNativeBridge();
|
|
1602
|
+
if (!native?.redis_replication_status) throw new Error("redis_replication_status not available");
|
|
1603
|
+
return native.redis_replication_status();
|
|
1604
|
+
}
|
|
1605
|
+
function redisCacheSync(peers) {
|
|
1606
|
+
const native = exports.getNativeBridge();
|
|
1607
|
+
if (!native?.redis_cache_sync) throw new Error("redis_cache_sync not available");
|
|
1608
|
+
return native.redis_cache_sync(peers);
|
|
1609
|
+
}
|
|
1610
|
+
function redisEnableCacheWarming(key_pattern) {
|
|
1611
|
+
const native = exports.getNativeBridge();
|
|
1612
|
+
if (!native?.redis_enable_cache_warming) throw new Error("redis_enable_cache_warming not available");
|
|
1613
|
+
return native.redis_enable_cache_warming(key_pattern);
|
|
1614
|
+
}
|
|
1615
|
+
function redisDisableCacheWarming() {
|
|
1616
|
+
const native = exports.getNativeBridge();
|
|
1617
|
+
if (!native?.redis_disable_cache_warming) throw new Error("redis_disable_cache_warming not available");
|
|
1618
|
+
return native.redis_disable_cache_warming();
|
|
1619
|
+
}
|
|
1620
|
+
function redisDiagnose() {
|
|
1621
|
+
const native = exports.getNativeBridge();
|
|
1622
|
+
if (!native?.redis_diagnose) throw new Error("redis_diagnose not available");
|
|
1623
|
+
return native.redis_diagnose();
|
|
1624
|
+
}
|
|
1625
|
+
var init_redisNative = __esm({
|
|
1626
|
+
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
1627
|
+
init_nativeBridge();
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
|
|
1631
|
+
// packages/domain/compiler/src/redis/index.ts
|
|
1632
|
+
var init_redis = __esm({
|
|
1633
|
+
"packages/domain/compiler/src/redis/index.ts"() {
|
|
1634
|
+
init_redisNative();
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1637
|
+
|
|
1638
|
+
// packages/domain/compiler/src/watch/watchSystemNative.ts
|
|
1639
|
+
function startWatch(root_path, patterns) {
|
|
1640
|
+
const native = exports.getNativeBridge();
|
|
1641
|
+
if (!native?.start_watch) throw new Error("start_watch not available");
|
|
1642
|
+
return native.start_watch(root_path, patterns);
|
|
1643
|
+
}
|
|
1644
|
+
function pollWatchEvents(handle, timeout_ms) {
|
|
1645
|
+
const native = exports.getNativeBridge();
|
|
1646
|
+
if (!native?.poll_watch_events) throw new Error("poll_watch_events not available");
|
|
1647
|
+
const result = native.poll_watch_events(handle, timeout_ms);
|
|
1648
|
+
try {
|
|
1649
|
+
return JSON.parse(result);
|
|
1650
|
+
} catch {
|
|
1651
|
+
return [];
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
function stopWatch(handle) {
|
|
1655
|
+
const native = exports.getNativeBridge();
|
|
1656
|
+
if (!native?.stop_watch) throw new Error("stop_watch not available");
|
|
1657
|
+
return native.stop_watch(handle);
|
|
1658
|
+
}
|
|
1659
|
+
function watchAddPattern(handle, pattern) {
|
|
1660
|
+
const native = exports.getNativeBridge();
|
|
1661
|
+
if (!native?.watch_add_pattern) throw new Error("watch_add_pattern not available");
|
|
1662
|
+
return native.watch_add_pattern(handle, pattern);
|
|
1663
|
+
}
|
|
1664
|
+
function watchRemovePattern(handle, pattern) {
|
|
1665
|
+
const native = exports.getNativeBridge();
|
|
1666
|
+
if (!native?.watch_remove_pattern) throw new Error("watch_remove_pattern not available");
|
|
1667
|
+
return native.watch_remove_pattern(handle, pattern);
|
|
1668
|
+
}
|
|
1669
|
+
function watchGetActiveHandles() {
|
|
1670
|
+
const native = exports.getNativeBridge();
|
|
1671
|
+
if (!native?.watch_get_active_handles) throw new Error("watch_get_active_handles not available");
|
|
1672
|
+
const result = native.watch_get_active_handles();
|
|
1673
|
+
try {
|
|
1674
|
+
return JSON.parse(result);
|
|
1675
|
+
} catch {
|
|
1676
|
+
return [];
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
function watchClearAll() {
|
|
1680
|
+
const native = exports.getNativeBridge();
|
|
1681
|
+
if (!native?.watch_clear_all) throw new Error("watch_clear_all not available");
|
|
1682
|
+
return native.watch_clear_all();
|
|
1683
|
+
}
|
|
1684
|
+
function watchEventTypeToString(event_type_code) {
|
|
1685
|
+
const native = exports.getNativeBridge();
|
|
1686
|
+
if (!native?.watch_event_type_to_string) throw new Error("watch_event_type_to_string not available");
|
|
1687
|
+
return native.watch_event_type_to_string(event_type_code);
|
|
1688
|
+
}
|
|
1689
|
+
function isWatchRunning(handle) {
|
|
1690
|
+
const native = exports.getNativeBridge();
|
|
1691
|
+
if (!native?.is_watch_running) throw new Error("is_watch_running not available");
|
|
1692
|
+
return native.is_watch_running(handle);
|
|
1693
|
+
}
|
|
1694
|
+
function getWatchStats() {
|
|
1695
|
+
const native = exports.getNativeBridge();
|
|
1696
|
+
if (!native?.get_watch_stats) throw new Error("get_watch_stats not available");
|
|
1697
|
+
const result = native.get_watch_stats();
|
|
1698
|
+
try {
|
|
1699
|
+
return JSON.parse(result);
|
|
1700
|
+
} catch {
|
|
1701
|
+
return {
|
|
1702
|
+
active_watchers: 0,
|
|
1703
|
+
total_events: 0,
|
|
1704
|
+
events_this_second: 0,
|
|
1705
|
+
average_latency_ms: 0,
|
|
1706
|
+
largest_batch_size: 0
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
function watchPause(handle) {
|
|
1711
|
+
const native = exports.getNativeBridge();
|
|
1712
|
+
if (!native?.watch_pause) throw new Error("watch_pause not available");
|
|
1713
|
+
return native.watch_pause(handle);
|
|
1714
|
+
}
|
|
1715
|
+
function watchResume(handle) {
|
|
1716
|
+
const native = exports.getNativeBridge();
|
|
1717
|
+
if (!native?.watch_resume) throw new Error("watch_resume not available");
|
|
1718
|
+
return native.watch_resume(handle);
|
|
1719
|
+
}
|
|
1720
|
+
function scanCacheOptimizations() {
|
|
1721
|
+
const native = exports.getNativeBridge();
|
|
1722
|
+
if (!native?.scan_cache_optimizations) throw new Error("scan_cache_optimizations not available");
|
|
1723
|
+
return native.scan_cache_optimizations();
|
|
1724
|
+
}
|
|
1725
|
+
function getPluginHooks() {
|
|
1726
|
+
const native = exports.getNativeBridge();
|
|
1727
|
+
if (!native?.get_plugin_hooks) throw new Error("get_plugin_hooks not available");
|
|
1728
|
+
const result = native.get_plugin_hooks();
|
|
1729
|
+
try {
|
|
1730
|
+
return JSON.parse(result);
|
|
1731
|
+
} catch {
|
|
1732
|
+
return [];
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
function registerPluginHook(hook_name, handler_id) {
|
|
1736
|
+
const native = exports.getNativeBridge();
|
|
1737
|
+
if (!native?.register_plugin_hook) throw new Error("register_plugin_hook not available");
|
|
1738
|
+
return native.register_plugin_hook(hook_name, handler_id);
|
|
1739
|
+
}
|
|
1740
|
+
function unregisterPluginHook(hook_name, handler_id) {
|
|
1741
|
+
const native = exports.getNativeBridge();
|
|
1742
|
+
if (!native?.unregister_plugin_hook) throw new Error("unregister_plugin_hook not available");
|
|
1743
|
+
return native.unregister_plugin_hook(hook_name, handler_id);
|
|
1744
|
+
}
|
|
1745
|
+
function emitPluginHook(hook_name, data_json) {
|
|
1746
|
+
const native = exports.getNativeBridge();
|
|
1747
|
+
if (!native?.emit_plugin_hook) throw new Error("emit_plugin_hook not available");
|
|
1748
|
+
return native.emit_plugin_hook(hook_name, data_json);
|
|
1749
|
+
}
|
|
1750
|
+
function getCompilationMetrics() {
|
|
1751
|
+
const native = exports.getNativeBridge();
|
|
1752
|
+
if (!native?.get_compilation_metrics) throw new Error("get_compilation_metrics not available");
|
|
1753
|
+
return native.get_compilation_metrics();
|
|
1754
|
+
}
|
|
1755
|
+
function resetCompilationMetrics() {
|
|
1756
|
+
const native = exports.getNativeBridge();
|
|
1757
|
+
if (!native?.reset_compilation_metrics) throw new Error("reset_compilation_metrics not available");
|
|
1758
|
+
return native.reset_compilation_metrics();
|
|
1759
|
+
}
|
|
1760
|
+
function validateCssOutput(css) {
|
|
1761
|
+
const native = exports.getNativeBridge();
|
|
1762
|
+
if (!native?.validate_css_output) throw new Error("validate_css_output not available");
|
|
1763
|
+
return native.validate_css_output(css);
|
|
1764
|
+
}
|
|
1765
|
+
function getCompilerDiagnostics() {
|
|
1766
|
+
const native = exports.getNativeBridge();
|
|
1767
|
+
if (!native?.get_compiler_diagnostics) throw new Error("get_compiler_diagnostics not available");
|
|
1768
|
+
return native.get_compiler_diagnostics();
|
|
1769
|
+
}
|
|
1770
|
+
var init_watchSystemNative = __esm({
|
|
1771
|
+
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
1772
|
+
init_nativeBridge();
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
|
|
1776
|
+
// packages/domain/compiler/src/watch/index.ts
|
|
1777
|
+
var init_watch = __esm({
|
|
1778
|
+
"packages/domain/compiler/src/watch/index.ts"() {
|
|
1779
|
+
init_watchSystemNative();
|
|
1780
|
+
}
|
|
1781
|
+
});
|
|
1782
|
+
function _layoutClassesToCss(classes) {
|
|
1783
|
+
const native = exports.getNativeBridge();
|
|
1784
|
+
if (!native?.layoutClassesToCss) {
|
|
1785
|
+
throw new Error("FATAL: Native binding 'layoutClassesToCss' is required but not available.");
|
|
1786
|
+
}
|
|
1787
|
+
return native.layoutClassesToCss(classes);
|
|
1788
|
+
}
|
|
1789
|
+
function _hashContainer(tag, containerJson, name) {
|
|
1790
|
+
const sortedKey = tag + (name ?? "") + containerJson;
|
|
1791
|
+
const native = exports.getNativeBridge();
|
|
1792
|
+
if (!native?.hashContent) {
|
|
1793
|
+
throw new Error("FATAL: Native binding 'hashContent' is required but not available.");
|
|
1794
|
+
}
|
|
1795
|
+
return `tw-cq-${native.hashContent(sortedKey, "fnv", 6)}`;
|
|
1796
|
+
}
|
|
1797
|
+
function extractContainerCssFromSource(source) {
|
|
1798
|
+
const native = exports.getNativeBridge();
|
|
1799
|
+
if (!native?.extractTwContainerConfigs) {
|
|
1800
|
+
throw new Error("FATAL: Native binding 'extractTwContainerConfigs' is required but not available.");
|
|
1801
|
+
}
|
|
1802
|
+
const configs = native.extractTwContainerConfigs(source);
|
|
1803
|
+
const rules = [];
|
|
1804
|
+
for (const cfg of configs) {
|
|
1805
|
+
const id = _hashContainer(cfg.tag, cfg.containerJson, cfg.containerName);
|
|
1806
|
+
for (const { key, classes } of cfg.breakpoints) {
|
|
1807
|
+
const minWidth = _CONTAINER_BREAKPOINTS[key] ?? key;
|
|
1808
|
+
const css = _layoutClassesToCss(classes);
|
|
1809
|
+
if (!css) continue;
|
|
1810
|
+
const query = cfg.containerName ? `@container ${cfg.containerName} (min-width: ${minWidth})` : `@container (min-width: ${minWidth})`;
|
|
1811
|
+
rules.push(`${query}{.${id}{${css}}}`);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
return rules.join("\n");
|
|
1815
|
+
}
|
|
1816
|
+
exports.transformSource = void 0; exports.hasTwUsage = void 0; exports.isAlreadyTransformed = void 0; exports.shouldProcess = void 0; exports.compileCssFromClasses = void 0; exports.buildStyleTag = void 0; exports.generateCssForClasses = void 0; exports.eliminateDeadCss = void 0; exports.findDeadVariants = void 0; exports.runElimination = void 0; exports.scanProjectUsage = void 0; exports.generateSafelist = void 0; exports.loadSafelist = void 0; exports.loadTailwindConfig = void 0; exports.getContentPaths = void 0; var _CONTAINER_BREAKPOINTS; exports.runLoaderTransform = void 0; exports.shouldSkipFile = void 0; exports.fileToRoute = void 0; exports.getAllRoutes = void 0; exports.getRouteClasses = void 0; exports.registerFileClasses = void 0; exports.registerGlobalClasses = void 0; var _incrementalEngineInstance; exports.getIncrementalEngine = void 0; exports.resetIncrementalEngine = void 0; exports.IncrementalEngine = void 0; exports.getBucketEngine = void 0; exports.resetBucketEngine = void 0; exports.BucketEngine = void 0; exports.classifyNode = void 0; exports.detectConflicts = void 0; exports.bucketSort = void 0; exports.analyzeFile = void 0; exports.analyzeVariantUsage = void 0; exports.injectClientDirective = void 0; exports.injectServerOnlyComment = void 0; exports.analyzeClasses = void 0; exports.extractTwStateConfigs = void 0; exports.generateStaticStateCss = void 0; exports.extractAndGenerateStateCss = void 0;
|
|
1817
|
+
var init_src2 = __esm({
|
|
1818
|
+
"packages/domain/compiler/src/index.ts"() {
|
|
1819
|
+
init_nativeBridge();
|
|
1820
|
+
init_compiler();
|
|
1821
|
+
init_parser();
|
|
1822
|
+
init_analyzer();
|
|
1823
|
+
init_cache();
|
|
1824
|
+
init_redis();
|
|
1825
|
+
init_watch();
|
|
1826
|
+
exports.transformSource = (source, opts) => {
|
|
1827
|
+
const native = exports.getNativeBridge();
|
|
1828
|
+
if (!native?.transformSource) {
|
|
1829
|
+
throw new Error("FATAL: Native binding 'transformSource' is required but not available.");
|
|
1830
|
+
}
|
|
1831
|
+
const result = native.transformSource(source, opts);
|
|
1832
|
+
if (!result) {
|
|
1833
|
+
throw new Error("FATAL: transformSource returned null");
|
|
1834
|
+
}
|
|
1835
|
+
return result;
|
|
1836
|
+
};
|
|
1837
|
+
exports.hasTwUsage = (source) => {
|
|
1838
|
+
const native = exports.getNativeBridge();
|
|
1839
|
+
if (!native?.hasTwUsage) {
|
|
1840
|
+
throw new Error("FATAL: Native binding 'hasTwUsage' is required but not available.");
|
|
1841
|
+
}
|
|
1842
|
+
return native.hasTwUsage(source);
|
|
1843
|
+
};
|
|
1844
|
+
exports.isAlreadyTransformed = (source) => {
|
|
1845
|
+
const native = exports.getNativeBridge();
|
|
1846
|
+
if (!native?.isAlreadyTransformed) {
|
|
1847
|
+
throw new Error("FATAL: Native binding 'isAlreadyTransformed' is required but not available.");
|
|
1848
|
+
}
|
|
1849
|
+
return native.isAlreadyTransformed(source);
|
|
1850
|
+
};
|
|
1851
|
+
exports.shouldProcess = (source) => {
|
|
1852
|
+
return exports.hasTwUsage(source) && !exports.isAlreadyTransformed(source);
|
|
1853
|
+
};
|
|
1854
|
+
exports.compileCssFromClasses = (classes, prefix) => {
|
|
1855
|
+
const native = exports.getNativeBridge();
|
|
1856
|
+
if (!native?.transformSource) {
|
|
1857
|
+
throw new Error("FATAL: Native binding 'transformSource' is required but not available.");
|
|
1858
|
+
}
|
|
1859
|
+
const result = native.transformSource(classes.join(" "), { prefix: prefix ?? "" });
|
|
1860
|
+
if (!result) {
|
|
1861
|
+
throw new Error("FATAL: transformSource returned null");
|
|
1862
|
+
}
|
|
1863
|
+
return result;
|
|
1864
|
+
};
|
|
1865
|
+
exports.buildStyleTag = (classes) => {
|
|
1866
|
+
const result = exports.compileCssFromClasses(classes);
|
|
1867
|
+
return result?.code ? `<style data-tailwind-styled>${result.code}</style>` : "";
|
|
1868
|
+
};
|
|
1869
|
+
exports.generateCssForClasses = async (classes, _tailwindConfig, root, cssEntryContent, minify = false) => {
|
|
1870
|
+
try {
|
|
1871
|
+
const { runCssPipeline: runCssPipeline2 } = await Promise.resolve().then(() => (init_tailwindEngine(), tailwindEngine_exports));
|
|
1872
|
+
const result = await runCssPipeline2(classes, cssEntryContent, root, minify);
|
|
1873
|
+
return result.css;
|
|
1874
|
+
} catch {
|
|
1875
|
+
const native = exports.getNativeBridge();
|
|
1876
|
+
if (!native?.transformSource) {
|
|
1877
|
+
throw new Error("FATAL: Native binding 'transformSource' is required but not available.");
|
|
1878
|
+
}
|
|
1879
|
+
const result = native.transformSource(classes.join(" "), {});
|
|
1880
|
+
return result?.code || "";
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1883
|
+
exports.eliminateDeadCss = (css, deadClasses) => {
|
|
1884
|
+
const native = exports.getNativeBridge();
|
|
1885
|
+
if (!native?.eliminateDeadCss) {
|
|
1886
|
+
throw new Error("FATAL: Native binding 'eliminateDeadCss' is required but not available.");
|
|
1887
|
+
}
|
|
1888
|
+
return native.eliminateDeadCss(css, Array.from(deadClasses));
|
|
1889
|
+
};
|
|
1890
|
+
exports.findDeadVariants = (variantConfig, usage) => {
|
|
1891
|
+
const unused = [];
|
|
1892
|
+
const configs = Array.isArray(variantConfig) ? variantConfig : [{ name: "__root__", variants: variantConfig }];
|
|
1893
|
+
for (const component of configs) {
|
|
1894
|
+
const componentUsage = usage[component.name] ?? /* @__PURE__ */ new Set();
|
|
1895
|
+
const variants = component.variants;
|
|
1896
|
+
for (const [key, values] of Object.entries(variants)) {
|
|
1897
|
+
for (const [value] of Object.entries(values)) {
|
|
1898
|
+
if (!componentUsage.has(`${key}:${value}`)) {
|
|
1899
|
+
unused.push(`${component.name !== "__root__" ? `${component.name}/` : ""}${key}:${value}`);
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
return { unusedCount: unused.length, unused };
|
|
1905
|
+
};
|
|
1906
|
+
exports.runElimination = (css, scanResult) => {
|
|
1907
|
+
const native = exports.getNativeBridge();
|
|
1908
|
+
if (!native?.detectDeadCode) {
|
|
1909
|
+
throw new Error("FATAL: Native binding 'detectDeadCode' is required but not available.");
|
|
1910
|
+
}
|
|
1911
|
+
const dead = native.detectDeadCode(JSON.stringify(scanResult), css);
|
|
1912
|
+
return exports.eliminateDeadCss(css, new Set(dead.deadInCss ?? []));
|
|
1913
|
+
};
|
|
1914
|
+
exports.scanProjectUsage = (dirs, cwd) => {
|
|
1915
|
+
const { batchExtractClasses: batchExtractClasses2 } = (init_parser(), __toCommonJS(parser_exports));
|
|
1916
|
+
const files = dirs.map((dir) => path__namespace.default.resolve(cwd, dir));
|
|
1917
|
+
const results = batchExtractClasses2(files) || [];
|
|
1918
|
+
const combined = {};
|
|
1919
|
+
for (const result of results) {
|
|
1920
|
+
if (result.ok && result.classes) {
|
|
1921
|
+
for (const cls of result.classes) {
|
|
1922
|
+
if (!combined[cls]) combined[cls] = {};
|
|
1923
|
+
combined[cls][result.file] = /* @__PURE__ */ new Set([cls]);
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
return combined;
|
|
1928
|
+
};
|
|
1929
|
+
exports.generateSafelist = (scanDirs, outputPath, cwd) => {
|
|
1930
|
+
const classes = exports.scanProjectUsage(scanDirs, cwd || process.cwd());
|
|
1931
|
+
const allClasses = Object.keys(classes).sort();
|
|
1932
|
+
if (outputPath) {
|
|
1933
|
+
fs__namespace.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
1934
|
+
}
|
|
1935
|
+
return allClasses;
|
|
1936
|
+
};
|
|
1937
|
+
exports.loadSafelist = (safelistPath) => {
|
|
1938
|
+
try {
|
|
1939
|
+
const content = fs__namespace.default.readFileSync(safelistPath, "utf-8");
|
|
1940
|
+
return JSON.parse(content);
|
|
1941
|
+
} catch {
|
|
1942
|
+
return [];
|
|
1943
|
+
}
|
|
1944
|
+
};
|
|
1945
|
+
exports.loadTailwindConfig = (cwd = process.cwd()) => {
|
|
1946
|
+
const configFiles = [
|
|
1947
|
+
"tailwind.config.ts",
|
|
1948
|
+
"tailwind.config.js",
|
|
1949
|
+
"tailwind.config.mjs",
|
|
1950
|
+
"tailwind.config.cjs"
|
|
1951
|
+
];
|
|
1952
|
+
for (const file of configFiles) {
|
|
1953
|
+
const fullPath = path__namespace.default.join(cwd, file);
|
|
1954
|
+
if (fs__namespace.default.existsSync(fullPath)) {
|
|
1955
|
+
const mod = __require(fullPath);
|
|
1956
|
+
return mod.default || mod;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
return {};
|
|
1960
|
+
};
|
|
1961
|
+
exports.getContentPaths = (cwd = process.cwd()) => {
|
|
1962
|
+
return {
|
|
1963
|
+
content: [
|
|
1964
|
+
path__namespace.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
1965
|
+
path__namespace.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
1966
|
+
path__namespace.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
1967
|
+
]
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
_CONTAINER_BREAKPOINTS = {
|
|
1971
|
+
xs: "240px",
|
|
1972
|
+
sm: "320px",
|
|
1973
|
+
md: "640px",
|
|
1974
|
+
lg: "1024px",
|
|
1975
|
+
xl: "1280px",
|
|
1976
|
+
"2xl": "1536px"
|
|
1977
|
+
};
|
|
1978
|
+
exports.runLoaderTransform = (ctx) => {
|
|
1979
|
+
const { filepath, source, options } = ctx;
|
|
1980
|
+
const result = exports.transformSource(source, { filename: filepath, ...options });
|
|
1981
|
+
let staticCss;
|
|
1982
|
+
try {
|
|
1983
|
+
const cssChunks = [];
|
|
1984
|
+
const stateRules = exports.extractAndGenerateStateCss(source, filepath);
|
|
1985
|
+
if (stateRules.length > 0) {
|
|
1986
|
+
cssChunks.push(stateRules.map((r) => r.cssRule).join("\n"));
|
|
1987
|
+
}
|
|
1988
|
+
const containerCss = extractContainerCssFromSource(source);
|
|
1989
|
+
if (containerCss) cssChunks.push(containerCss);
|
|
1990
|
+
const combined = cssChunks.join("\n").trim();
|
|
1991
|
+
if (combined) staticCss = combined;
|
|
1992
|
+
} catch (err) {
|
|
1993
|
+
console.debug("Static CSS extraction warning:", err);
|
|
1994
|
+
}
|
|
1995
|
+
return {
|
|
1996
|
+
code: result?.code || "",
|
|
1997
|
+
changed: result?.changed || false,
|
|
1998
|
+
classes: result?.classes || [],
|
|
1999
|
+
staticCss
|
|
2000
|
+
};
|
|
2001
|
+
};
|
|
2002
|
+
exports.shouldSkipFile = (filepath) => {
|
|
2003
|
+
const SKIP_PATHS = ["node_modules", ".next", ".rspack-dist", ".turbo", "dist/", "out/"];
|
|
2004
|
+
const skipExtensions = [".css", ".json", ".md", ".txt", ".yaml", ".yml"];
|
|
2005
|
+
for (const p of SKIP_PATHS) {
|
|
2006
|
+
if (filepath.includes(p)) return true;
|
|
2007
|
+
}
|
|
2008
|
+
for (const ext of skipExtensions) {
|
|
2009
|
+
if (filepath.endsWith(ext)) return true;
|
|
2010
|
+
}
|
|
2011
|
+
return false;
|
|
2012
|
+
};
|
|
2013
|
+
exports.fileToRoute = (filepath) => {
|
|
2014
|
+
const normalized = filepath.replace(/\\/g, "/");
|
|
2015
|
+
if (normalized.includes("/layout.") || normalized.includes("/loading.") || normalized.includes("/error.")) {
|
|
2016
|
+
return "__global";
|
|
2017
|
+
}
|
|
2018
|
+
const pageMatch = normalized.match(/\/app\/(.+?)\/page\.[tj]sx?$/);
|
|
2019
|
+
if (pageMatch) return `/${pageMatch[1]}`;
|
|
2020
|
+
const rootPage = normalized.match(/\/app\/page\.[tj]sx?$/);
|
|
2021
|
+
if (rootPage) return "/";
|
|
2022
|
+
return null;
|
|
2023
|
+
};
|
|
2024
|
+
exports.getAllRoutes = () => {
|
|
2025
|
+
const native = exports.getNativeBridge();
|
|
2026
|
+
if (!native?.analyzeClasses) {
|
|
2027
|
+
throw new Error("FATAL: Native binding 'analyzeClasses' is required but not available.");
|
|
2028
|
+
}
|
|
2029
|
+
return ["/", "__global"];
|
|
2030
|
+
};
|
|
2031
|
+
exports.getRouteClasses = (_route) => /* @__PURE__ */ new Set();
|
|
2032
|
+
exports.registerFileClasses = (_filepath, _classes) => {
|
|
2033
|
+
};
|
|
2034
|
+
exports.registerGlobalClasses = (_classes) => {
|
|
2035
|
+
};
|
|
2036
|
+
_incrementalEngineInstance = null;
|
|
2037
|
+
exports.getIncrementalEngine = () => {
|
|
2038
|
+
if (!_incrementalEngineInstance) {
|
|
2039
|
+
_incrementalEngineInstance = new exports.IncrementalEngine();
|
|
2040
|
+
}
|
|
2041
|
+
return _incrementalEngineInstance;
|
|
2042
|
+
};
|
|
2043
|
+
exports.resetIncrementalEngine = () => {
|
|
2044
|
+
_incrementalEngineInstance = null;
|
|
2045
|
+
};
|
|
2046
|
+
exports.IncrementalEngine = class {
|
|
2047
|
+
compile(source) {
|
|
2048
|
+
return exports.transformSource(source);
|
|
2049
|
+
}
|
|
2050
|
+
};
|
|
2051
|
+
exports.getBucketEngine = () => {
|
|
2052
|
+
const native = exports.getNativeBridge();
|
|
2053
|
+
if (!native?.classifyAndSortClasses) {
|
|
2054
|
+
throw new Error("FATAL: Native binding 'classifyAndSortClasses' is required but not available.");
|
|
2055
|
+
}
|
|
2056
|
+
return {
|
|
2057
|
+
add: (className) => className,
|
|
2058
|
+
get: (_bucket) => []
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
exports.resetBucketEngine = () => {
|
|
2062
|
+
};
|
|
2063
|
+
exports.BucketEngine = class {
|
|
2064
|
+
add(className) {
|
|
2065
|
+
return className;
|
|
2066
|
+
}
|
|
2067
|
+
};
|
|
2068
|
+
exports.classifyNode = (_node) => {
|
|
2069
|
+
const native = exports.getNativeBridge();
|
|
2070
|
+
if (!native?.classifyAndSortClasses) {
|
|
2071
|
+
throw new Error("FATAL: Native binding 'classifyAndSortClasses' is required but not available.");
|
|
2072
|
+
}
|
|
2073
|
+
return "unknown";
|
|
2074
|
+
};
|
|
2075
|
+
exports.detectConflicts = (_classes) => {
|
|
2076
|
+
const native = exports.getNativeBridge();
|
|
2077
|
+
if (!native?.analyzeClassUsage) {
|
|
2078
|
+
throw new Error("FATAL: Native binding 'analyzeClassUsage' is required but not available.");
|
|
2079
|
+
}
|
|
2080
|
+
return [];
|
|
2081
|
+
};
|
|
2082
|
+
exports.bucketSort = (classes) => {
|
|
2083
|
+
const native = exports.getNativeBridge();
|
|
2084
|
+
if (!native?.classifyAndSortClasses) {
|
|
2085
|
+
throw new Error("FATAL: Native binding 'classifyAndSortClasses' is required but not available.");
|
|
2086
|
+
}
|
|
2087
|
+
const sorted = native.classifyAndSortClasses(classes);
|
|
2088
|
+
return sorted.map((c) => c.raw ?? c);
|
|
2089
|
+
};
|
|
2090
|
+
exports.analyzeFile = (source, filename) => {
|
|
2091
|
+
const native = exports.getNativeBridge();
|
|
2092
|
+
if (!native?.analyzeRsc) {
|
|
2093
|
+
throw new Error("FATAL: Native binding 'analyzeRsc' is required but not available.");
|
|
2094
|
+
}
|
|
2095
|
+
const rsc = native.analyzeRsc(source, filename);
|
|
2096
|
+
return {
|
|
2097
|
+
isServer: rsc?.isServer ?? true,
|
|
2098
|
+
needsClientDirective: rsc?.needsClientDirective ?? false,
|
|
2099
|
+
clientReasons: rsc?.clientReasons ?? [],
|
|
2100
|
+
interactiveClasses: [],
|
|
2101
|
+
canStaticResolveVariants: true
|
|
2102
|
+
};
|
|
2103
|
+
};
|
|
2104
|
+
exports.analyzeVariantUsage = (_source, _componentName, _variantKeys) => {
|
|
2105
|
+
return { resolved: {}, dynamic: [] };
|
|
2106
|
+
};
|
|
2107
|
+
exports.injectClientDirective = (source) => {
|
|
2108
|
+
if (!source.includes('"use client"') && !source.includes("'use client'")) {
|
|
2109
|
+
return '"use client";\n' + source;
|
|
2110
|
+
}
|
|
2111
|
+
return source;
|
|
2112
|
+
};
|
|
2113
|
+
exports.injectServerOnlyComment = (source) => {
|
|
2114
|
+
return `/* @server-only */
|
|
2115
|
+
${source}`;
|
|
2116
|
+
};
|
|
2117
|
+
exports.analyzeClasses = (filesJson, cwd, flags) => {
|
|
2118
|
+
const native = exports.getNativeBridge();
|
|
2119
|
+
if (!native?.analyzeClasses) {
|
|
2120
|
+
throw new Error("FATAL: Native binding 'analyzeClasses' is required but not available.");
|
|
2121
|
+
}
|
|
2122
|
+
return native.analyzeClasses(filesJson, cwd, flags);
|
|
2123
|
+
};
|
|
2124
|
+
exports.extractTwStateConfigs = (source, filename) => {
|
|
2125
|
+
const native = exports.getNativeBridge();
|
|
2126
|
+
if (!native?.extractTwStateConfigs) {
|
|
2127
|
+
throw new Error("FATAL: Native binding 'extractTwStateConfigs' is required but not available.");
|
|
2128
|
+
}
|
|
2129
|
+
return native.extractTwStateConfigs(source, filename);
|
|
2130
|
+
};
|
|
2131
|
+
exports.generateStaticStateCss = (entries, _themeConfig) => {
|
|
2132
|
+
const rules = [];
|
|
2133
|
+
for (const entry of entries) {
|
|
2134
|
+
const stateConfig = JSON.parse(entry.statesJson);
|
|
2135
|
+
for (const [stateName, classes] of Object.entries(stateConfig)) {
|
|
2136
|
+
rules.push({
|
|
2137
|
+
selector: `.${entry.componentName}[data-state="${stateName}"]`,
|
|
2138
|
+
declarations: classes,
|
|
2139
|
+
cssRule: `.${entry.componentName}[data-state="${stateName}"]{${classes}}`,
|
|
2140
|
+
componentName: entry.componentName,
|
|
2141
|
+
stateName
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
return rules;
|
|
2146
|
+
};
|
|
2147
|
+
exports.extractAndGenerateStateCss = (source, filename) => {
|
|
2148
|
+
const entries = exports.extractTwStateConfigs(source, filename);
|
|
2149
|
+
return exports.generateStaticStateCss(entries);
|
|
2150
|
+
};
|
|
2151
|
+
}
|
|
2152
|
+
});
|
|
2153
|
+
|
|
2154
|
+
// src/umbrella/compiler.ts
|
|
2155
|
+
init_src2();
|
|
758
2156
|
|
|
759
|
-
exports.
|
|
760
|
-
exports.
|
|
761
|
-
exports.
|
|
762
|
-
exports.
|
|
763
|
-
exports.
|
|
764
|
-
exports.
|
|
765
|
-
exports.
|
|
766
|
-
exports.
|
|
767
|
-
exports.
|
|
768
|
-
exports.
|
|
769
|
-
exports.
|
|
770
|
-
exports.
|
|
771
|
-
exports.
|
|
772
|
-
exports.
|
|
773
|
-
exports.
|
|
774
|
-
exports.
|
|
775
|
-
exports.
|
|
776
|
-
exports.
|
|
777
|
-
exports.
|
|
778
|
-
exports.
|
|
779
|
-
exports.
|
|
780
|
-
exports.
|
|
781
|
-
exports.
|
|
782
|
-
exports.
|
|
783
|
-
exports.
|
|
784
|
-
exports.
|
|
785
|
-
exports.
|
|
786
|
-
exports.
|
|
787
|
-
exports.
|
|
788
|
-
exports.
|
|
789
|
-
exports.
|
|
790
|
-
exports.
|
|
791
|
-
exports.
|
|
792
|
-
exports.
|
|
793
|
-
exports.
|
|
794
|
-
exports.
|
|
795
|
-
exports.
|
|
796
|
-
exports.
|
|
797
|
-
exports.
|
|
798
|
-
exports.
|
|
799
|
-
exports.
|
|
800
|
-
exports.
|
|
801
|
-
exports.
|
|
802
|
-
exports.
|
|
803
|
-
exports.
|
|
804
|
-
exports.
|
|
805
|
-
exports.
|
|
806
|
-
exports.
|
|
807
|
-
exports.
|
|
808
|
-
exports.
|
|
809
|
-
exports.
|
|
810
|
-
exports.
|
|
811
|
-
exports.
|
|
812
|
-
exports.
|
|
813
|
-
exports.
|
|
814
|
-
exports.
|
|
2157
|
+
exports.analyzeClassUsageNative = analyzeClassUsageNative;
|
|
2158
|
+
exports.analyzeClassesNative = analyzeClassesNative;
|
|
2159
|
+
exports.analyzeRscNative = analyzeRscNative;
|
|
2160
|
+
exports.atomicRegistrySize = atomicRegistrySize;
|
|
2161
|
+
exports.batchExtractClassesNative = batchExtractClassesNative;
|
|
2162
|
+
exports.cachePriority = cachePriority;
|
|
2163
|
+
exports.cacheRead = cacheRead;
|
|
2164
|
+
exports.cacheWrite = cacheWrite;
|
|
2165
|
+
exports.checkAgainstSafelistNative = checkAgainstSafelistNative;
|
|
2166
|
+
exports.classifyAndSortClassesNative = classifyAndSortClassesNative;
|
|
2167
|
+
exports.clearAllCaches = clearAllCaches;
|
|
2168
|
+
exports.clearAtomicRegistry = clearAtomicRegistry;
|
|
2169
|
+
exports.clearCompileCache = clearCompileCache;
|
|
2170
|
+
exports.clearCssGenCache = clearCssGenCache;
|
|
2171
|
+
exports.clearParseCache = clearParseCache;
|
|
2172
|
+
exports.clearResolveCache = clearResolveCache;
|
|
2173
|
+
exports.clearThemeCache = clearThemeCache;
|
|
2174
|
+
exports.collectFiles = collectFiles;
|
|
2175
|
+
exports.compileAnimation = compileAnimation;
|
|
2176
|
+
exports.compileClass = compileClass;
|
|
2177
|
+
exports.compileClasses = compileClasses;
|
|
2178
|
+
exports.compileCssLightning = compileCssLightning;
|
|
2179
|
+
exports.compileCssNative2 = compileCssNative2;
|
|
2180
|
+
exports.compileKeyframes = compileKeyframes;
|
|
2181
|
+
exports.compileTheme = compileTheme;
|
|
2182
|
+
exports.compileToCss = compileToCss;
|
|
2183
|
+
exports.compileToCssBatch = compileToCssBatch;
|
|
2184
|
+
exports.compileVariantTableNative = compileVariantTableNative;
|
|
2185
|
+
exports.computeIncrementalDiff = computeIncrementalDiff;
|
|
2186
|
+
exports.createFingerprint = createFingerprint;
|
|
2187
|
+
exports.detectDeadCode = detectDeadCode;
|
|
2188
|
+
exports.eliminateDeadCssNative = eliminateDeadCssNative;
|
|
2189
|
+
exports.emitPluginHook = emitPluginHook;
|
|
2190
|
+
exports.estimateOptimalCacheConfig = estimateOptimalCacheConfig;
|
|
2191
|
+
exports.extractAndGenerateStateCssNative = extractAndGenerateStateCssNative;
|
|
2192
|
+
exports.extractClassesFromSourceNative = extractClassesFromSourceNative;
|
|
2193
|
+
exports.extractContainerCssFromSource = extractContainerCssFromSource;
|
|
2194
|
+
exports.extractTwContainerConfigs = extractTwContainerConfigs;
|
|
2195
|
+
exports.extractTwStateConfigsNative = extractTwStateConfigsNative;
|
|
2196
|
+
exports.generateAtomicCss = generateAtomicCss;
|
|
2197
|
+
exports.generateCssNative = generateCssNative;
|
|
2198
|
+
exports.generateStaticStateCssNative = generateStaticStateCssNative;
|
|
2199
|
+
exports.generateSubComponentTypes = generateSubComponentTypes;
|
|
2200
|
+
exports.getCacheOptimizationHints = getCacheOptimizationHints;
|
|
2201
|
+
exports.getCacheStatistics = getCacheStatistics;
|
|
2202
|
+
exports.getCacheStats = getCacheStats;
|
|
2203
|
+
exports.getCompilationMetrics = getCompilationMetrics;
|
|
2204
|
+
exports.getCompilerDiagnostics = getCompilerDiagnostics;
|
|
2205
|
+
exports.getPluginHooks = getPluginHooks;
|
|
2206
|
+
exports.getWatchStats = getWatchStats;
|
|
2207
|
+
exports.hashContent = hashContent;
|
|
2208
|
+
exports.hoistComponentsNative = hoistComponentsNative;
|
|
2209
|
+
exports.idRegistryActiveCount = idRegistryActiveCount;
|
|
2210
|
+
exports.idRegistryCreate = idRegistryCreate;
|
|
2211
|
+
exports.idRegistryDestroy = idRegistryDestroy;
|
|
2212
|
+
exports.idRegistryExport = idRegistryExport;
|
|
2213
|
+
exports.idRegistryGenerate = idRegistryGenerate;
|
|
2214
|
+
exports.idRegistryImport = idRegistryImport;
|
|
2215
|
+
exports.idRegistryLookup = idRegistryLookup;
|
|
2216
|
+
exports.idRegistryNext = idRegistryNext;
|
|
2217
|
+
exports.idRegistryReset = idRegistryReset;
|
|
2218
|
+
exports.idRegistrySnapshot = idRegistrySnapshot;
|
|
2219
|
+
exports.injectStateHash = injectStateHash;
|
|
2220
|
+
exports.isWatchRunning = isWatchRunning;
|
|
2221
|
+
exports.layoutClassesToCss = layoutClassesToCss;
|
|
2222
|
+
exports.mergeCssDeclarationsNative = mergeCssDeclarationsNative;
|
|
2223
|
+
exports.minifyCss = minifyCss;
|
|
2224
|
+
exports.optimizeCssNative = optimizeCssNative;
|
|
2225
|
+
exports.parseAtomicClass = parseAtomicClass;
|
|
2226
|
+
exports.pollWatchEvents = pollWatchEvents;
|
|
2227
|
+
exports.processFileChange = processFileChange;
|
|
2228
|
+
exports.processTailwindCssLightning = processTailwindCssLightning;
|
|
2229
|
+
exports.propertyIdToString = propertyIdToString;
|
|
2230
|
+
exports.pruneStaleCacheEntries = pruneStaleCacheEntries;
|
|
2231
|
+
exports.rebuildWorkspaceResult = rebuildWorkspaceResult;
|
|
2232
|
+
exports.redisCacheClear = redisCacheClear;
|
|
2233
|
+
exports.redisCacheHitRate = redisCacheHitRate;
|
|
2234
|
+
exports.redisCacheKeyCount = redisCacheKeyCount;
|
|
2235
|
+
exports.redisCacheSize = redisCacheSize;
|
|
2236
|
+
exports.redisCacheSync = redisCacheSync;
|
|
2237
|
+
exports.redisClusterStatus = redisClusterStatus;
|
|
2238
|
+
exports.redisDelete = redisDelete;
|
|
2239
|
+
exports.redisDiagnose = redisDiagnose;
|
|
2240
|
+
exports.redisDisableCacheWarming = redisDisableCacheWarming;
|
|
2241
|
+
exports.redisDisableCluster = redisDisableCluster;
|
|
2242
|
+
exports.redisDisablePersistence = redisDisablePersistence;
|
|
2243
|
+
exports.redisEnableCacheWarming = redisEnableCacheWarming;
|
|
2244
|
+
exports.redisEnableCluster = redisEnableCluster;
|
|
2245
|
+
exports.redisEnablePersistence = redisEnablePersistence;
|
|
2246
|
+
exports.redisExists = redisExists;
|
|
2247
|
+
exports.redisExpirationGet = redisExpirationGet;
|
|
2248
|
+
exports.redisExpirationSet = redisExpirationSet;
|
|
2249
|
+
exports.redisFlushAll = redisFlushAll;
|
|
2250
|
+
exports.redisFlushDb = redisFlushDb;
|
|
2251
|
+
exports.redisGet = redisGet;
|
|
2252
|
+
exports.redisGetEvictionPolicy = redisGetEvictionPolicy;
|
|
2253
|
+
exports.redisInfo = redisInfo;
|
|
2254
|
+
exports.redisMemoryStats = redisMemoryStats;
|
|
2255
|
+
exports.redisMget = redisMget;
|
|
2256
|
+
exports.redisMonitor = redisMonitor;
|
|
2257
|
+
exports.redisMset = redisMset;
|
|
2258
|
+
exports.redisOptimizeMemory = redisOptimizeMemory;
|
|
2259
|
+
exports.redisPing = redisPing;
|
|
2260
|
+
exports.redisPoolConnect = redisPoolConnect;
|
|
2261
|
+
exports.redisPoolReconnect = redisPoolReconnect;
|
|
2262
|
+
exports.redisPoolStats = redisPoolStats;
|
|
2263
|
+
exports.redisPublish = redisPublish;
|
|
2264
|
+
exports.redisReplicate = redisReplicate;
|
|
2265
|
+
exports.redisReplicationStatus = redisReplicationStatus;
|
|
2266
|
+
exports.redisSet = redisSet;
|
|
2267
|
+
exports.redisSetEvictionPolicy = redisSetEvictionPolicy;
|
|
2268
|
+
exports.redisSnapshot = redisSnapshot;
|
|
2269
|
+
exports.redisSubscribe = redisSubscribe;
|
|
2270
|
+
exports.registerPluginHook = registerPluginHook;
|
|
2271
|
+
exports.registerPropertyName = registerPropertyName;
|
|
2272
|
+
exports.registerValueName = registerValueName;
|
|
2273
|
+
exports.resetCompilationMetrics = resetCompilationMetrics;
|
|
2274
|
+
exports.resolveCascade = resolveCascade;
|
|
2275
|
+
exports.resolveClassNames = resolveClassNames;
|
|
2276
|
+
exports.resolveConflictGroup = resolveConflictGroup;
|
|
2277
|
+
exports.resolveSimpleVariants = resolveSimpleVariants;
|
|
2278
|
+
exports.resolveThemeValue = resolveThemeValue;
|
|
2279
|
+
exports.resolveVariants = resolveVariants;
|
|
2280
|
+
exports.reverseLookupProperty = reverseLookupProperty;
|
|
2281
|
+
exports.reverseLookupValue = reverseLookupValue;
|
|
2282
|
+
exports.runCssPipeline = runCssPipeline;
|
|
2283
|
+
exports.scanCacheOptimizations = scanCacheOptimizations;
|
|
2284
|
+
exports.scanFile = scanFile;
|
|
2285
|
+
exports.scanFileNative = scanFileNative;
|
|
2286
|
+
exports.scanFilesBatchNative = scanFilesBatchNative;
|
|
2287
|
+
exports.scanWorkspace = scanWorkspace;
|
|
2288
|
+
exports.startWatch = startWatch;
|
|
2289
|
+
exports.stopWatch = stopWatch;
|
|
2290
|
+
exports.toAtomicClasses = toAtomicClasses;
|
|
2291
|
+
exports.twMerge = twMerge;
|
|
2292
|
+
exports.twMergeMany = twMergeMany;
|
|
2293
|
+
exports.twMergeManyWithSeparator = twMergeManyWithSeparator;
|
|
2294
|
+
exports.twMergeRaw = twMergeRaw;
|
|
2295
|
+
exports.twMergeWithSeparator = twMergeWithSeparator;
|
|
2296
|
+
exports.unregisterPluginHook = unregisterPluginHook;
|
|
2297
|
+
exports.validateCssOutput = validateCssOutput;
|
|
2298
|
+
exports.validateThemeConfig = validateThemeConfig;
|
|
2299
|
+
exports.valueIdToString = valueIdToString;
|
|
2300
|
+
exports.walkAndPrefilterSourceFiles = walkAndPrefilterSourceFiles;
|
|
2301
|
+
exports.watchAddPattern = watchAddPattern;
|
|
2302
|
+
exports.watchClearAll = watchClearAll;
|
|
2303
|
+
exports.watchEventTypeToString = watchEventTypeToString;
|
|
2304
|
+
exports.watchGetActiveHandles = watchGetActiveHandles;
|
|
2305
|
+
exports.watchPause = watchPause;
|
|
2306
|
+
exports.watchRemovePattern = watchRemovePattern;
|
|
2307
|
+
exports.watchResume = watchResume;
|
|
815
2308
|
//# sourceMappingURL=compiler.js.map
|
|
816
2309
|
//# sourceMappingURL=compiler.js.map
|