tailwind-styled-v4 5.0.36 → 5.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer.d.mts +152 -5
- package/dist/analyzer.d.ts +152 -5
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +118 -82
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.d.mts +30 -3
- package/dist/animate.d.ts +30 -3
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +28 -14
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +105 -68
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +40 -13
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +577 -426
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +466 -304
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +5 -0
- package/dist/compiler.d.ts +5 -0
- package/dist/compiler.js +826 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +287 -29
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +71 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.d.mts +88 -2
- package/dist/devtools.d.ts +88 -2
- package/dist/devtools.js +333 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +26 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.d.mts +557 -6
- package/dist/engine.d.ts +557 -6
- package/dist/engine.js +679 -502
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +467 -307
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +180 -127
- package/dist/index.d.ts +180 -127
- package/dist/index.js +1329 -7441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1266 -7385
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +318 -243
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +256 -181
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.d.mts +4 -2
- package/dist/plugin-api.d.ts +4 -2
- package/dist/plugin-api.js +93 -49
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-api.mjs +26 -6
- package/dist/plugin-api.mjs.map +1 -1
- package/dist/plugin-registry.js +103 -62
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +53 -35
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.d.mts +165 -5
- package/dist/plugin.d.ts +165 -5
- package/dist/plugin.js +115 -50
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +44 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +47 -15
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +13 -5
- package/dist/preset.mjs.map +1 -1
- package/dist/rspack.js +82 -50
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +20 -12
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +62 -24
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +15 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/runtime.d.mts +38 -3
- package/dist/runtime.d.ts +38 -3
- package/dist/runtime.js +97 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.mts +58 -4
- package/dist/scanner.d.ts +58 -4
- package/dist/scanner.js +163 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +67 -39
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +185 -3
- package/dist/shared.d.ts +185 -3
- package/dist/shared.js +441 -295
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +253 -122
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.d.mts +2 -2
- package/dist/storybook-addon.d.ts +2 -2
- package/dist/storybook-addon.js +39 -10
- package/dist/storybook-addon.js.map +1 -1
- package/dist/storybook-addon.mjs +8 -3
- package/dist/storybook-addon.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -1
- package/dist/svelte.d.ts +2 -1
- package/dist/svelte.js +88 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +28 -13
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +68 -37
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +8 -7
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +55 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.d.mts +38 -3
- package/dist/theme.d.ts +38 -3
- package/dist/theme.js +131 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +42 -13
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +150 -116
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +124 -81
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +560 -421
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +460 -302
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +561 -446
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +433 -321
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.d.mts +4 -1
- package/dist/vue.d.ts +4 -1
- package/dist/vue.js +95 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +30 -14
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +110 -78
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +45 -17
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +3 -1
- package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
- package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
- package/dist/index-DQI6O24n.d.mts +0 -464
- package/dist/index-NDINUhLN.d.mts +0 -90
- package/dist/index-NDINUhLN.d.ts +0 -90
- package/dist/index-UkYbyBkR.d.ts +0 -464
- package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
- package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
- package/dist/schemas-DR-SLxZZ.d.mts +0 -59
- package/dist/schemas-DR-SLxZZ.d.ts +0 -59
- package/dist/trace-Dz4vmZdy.d.mts +0 -96
- package/dist/trace-Dz4vmZdy.d.ts +0 -96
- package/dist/types-DXr2PmGP.d.mts +0 -31
- package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/engine.js
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var zod = require('zod');
|
|
4
|
-
var module$1 = require('module');
|
|
5
|
-
var fs3 = require('fs');
|
|
6
|
-
var path9 = require('path');
|
|
7
|
-
var crypto = require('crypto');
|
|
8
|
-
var url = require('url');
|
|
9
|
-
var worker_threads = require('worker_threads');
|
|
10
|
-
var os = require('os');
|
|
11
|
-
require('perf_hooks');
|
|
12
|
-
|
|
13
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
14
|
-
function _interopNamespace(e) {
|
|
15
|
-
if (e && e.__esModule) return e;
|
|
16
|
-
var n = Object.create(null);
|
|
17
|
-
if (e) {
|
|
18
|
-
Object.keys(e).forEach(function (k) {
|
|
19
|
-
if (k !== 'default') {
|
|
20
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () { return e[k]; }
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
n.default = e;
|
|
29
|
-
return Object.freeze(n);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var fs3__namespace = /*#__PURE__*/_interopNamespace(fs3);
|
|
33
|
-
var path9__namespace = /*#__PURE__*/_interopNamespace(path9);
|
|
34
|
-
|
|
35
1
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
36
4
|
var __defProp = Object.defineProperty;
|
|
37
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
38
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
39
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
40
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
41
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
42
|
-
}) : x)(function(x) {
|
|
43
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
44
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
45
|
-
});
|
|
46
9
|
var __esm = (fn, res) => function __init() {
|
|
47
10
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
48
11
|
};
|
|
@@ -58,6 +21,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
58
21
|
}
|
|
59
22
|
return to;
|
|
60
23
|
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
+
mod
|
|
31
|
+
));
|
|
61
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
62
33
|
|
|
63
34
|
// packages/domain/shared/src/trace.ts
|
|
@@ -152,6 +123,7 @@ function getPipelinePercentages(metrics) {
|
|
|
152
123
|
}
|
|
153
124
|
var init_trace = __esm({
|
|
154
125
|
"packages/domain/shared/src/trace.ts"() {
|
|
126
|
+
"use strict";
|
|
155
127
|
}
|
|
156
128
|
});
|
|
157
129
|
|
|
@@ -166,6 +138,7 @@ function formatErrorCode(code) {
|
|
|
166
138
|
var ERROR_CODES, ERROR_SUGGESTIONS;
|
|
167
139
|
var init_error_codes = __esm({
|
|
168
140
|
"packages/domain/shared/src/error-codes.ts"() {
|
|
141
|
+
"use strict";
|
|
169
142
|
ERROR_CODES = {
|
|
170
143
|
// E0xx — Native binding
|
|
171
144
|
NATIVE_NOT_FOUND: "E001",
|
|
@@ -207,8 +180,8 @@ var init_error_codes = __esm({
|
|
|
207
180
|
// packages/domain/shared/src/compatibility.ts
|
|
208
181
|
function detectTailwind() {
|
|
209
182
|
try {
|
|
210
|
-
const pkgPath =
|
|
211
|
-
const { version } =
|
|
183
|
+
const pkgPath = require.resolve("tailwindcss/package.json");
|
|
184
|
+
const { version } = require(pkgPath);
|
|
212
185
|
const major = Number.parseInt(version.split(".")[0], 10);
|
|
213
186
|
return { version, major, supported: major >= 4, path: pkgPath };
|
|
214
187
|
} catch {
|
|
@@ -232,8 +205,11 @@ function isTailwindV4() {
|
|
|
232
205
|
}
|
|
233
206
|
var init_compatibility = __esm({
|
|
234
207
|
"packages/domain/shared/src/compatibility.ts"() {
|
|
208
|
+
"use strict";
|
|
235
209
|
}
|
|
236
210
|
});
|
|
211
|
+
|
|
212
|
+
// packages/domain/shared/src/native-schemas.ts
|
|
237
213
|
function safeParseNative(schema, data, fallback) {
|
|
238
214
|
const result = schema.safeParse(data);
|
|
239
215
|
return result.success ? result.data : fallback;
|
|
@@ -249,67 +225,69 @@ function parseNative(schema, data, context) {
|
|
|
249
225
|
}
|
|
250
226
|
return result.data;
|
|
251
227
|
}
|
|
252
|
-
var NativeScanFileSchema, NativeScanResultSchema, NativeClassUsageSchema, NativeAnalyzerReportSchema, NativeTransformResultSchema, NativeCssCompileResultSchema, NativeWatchResultSchema, NativeCacheEntrySchema, NativeCacheReadResultSchema;
|
|
228
|
+
var import_zod, NativeScanFileSchema, NativeScanResultSchema, NativeClassUsageSchema, NativeAnalyzerReportSchema, NativeTransformResultSchema, NativeCssCompileResultSchema, NativeWatchEventSchema, NativeWatchResultSchema, NativeCacheEntrySchema, NativeCacheReadResultSchema;
|
|
253
229
|
var init_native_schemas = __esm({
|
|
254
230
|
"packages/domain/shared/src/native-schemas.ts"() {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
231
|
+
"use strict";
|
|
232
|
+
import_zod = require("zod");
|
|
233
|
+
NativeScanFileSchema = import_zod.z.object({
|
|
234
|
+
file: import_zod.z.string().min(1, "file path cannot be empty"),
|
|
235
|
+
classes: import_zod.z.array(import_zod.z.string()),
|
|
236
|
+
hash: import_zod.z.string().optional()
|
|
259
237
|
});
|
|
260
|
-
NativeScanResultSchema =
|
|
261
|
-
files:
|
|
262
|
-
totalFiles:
|
|
263
|
-
uniqueClasses:
|
|
238
|
+
NativeScanResultSchema = import_zod.z.object({
|
|
239
|
+
files: import_zod.z.array(NativeScanFileSchema),
|
|
240
|
+
totalFiles: import_zod.z.number().int().nonnegative(),
|
|
241
|
+
uniqueClasses: import_zod.z.array(import_zod.z.string())
|
|
264
242
|
});
|
|
265
|
-
NativeClassUsageSchema =
|
|
266
|
-
name:
|
|
267
|
-
count:
|
|
268
|
-
files:
|
|
243
|
+
NativeClassUsageSchema = import_zod.z.object({
|
|
244
|
+
name: import_zod.z.string(),
|
|
245
|
+
count: import_zod.z.number().int().nonnegative(),
|
|
246
|
+
files: import_zod.z.array(import_zod.z.string()).optional()
|
|
269
247
|
});
|
|
270
|
-
NativeAnalyzerReportSchema =
|
|
271
|
-
root:
|
|
272
|
-
topClasses:
|
|
273
|
-
safelist:
|
|
274
|
-
css:
|
|
275
|
-
conflicts:
|
|
276
|
-
unusedClasses:
|
|
277
|
-
durationMs:
|
|
248
|
+
NativeAnalyzerReportSchema = import_zod.z.object({
|
|
249
|
+
root: import_zod.z.string(),
|
|
250
|
+
topClasses: import_zod.z.array(NativeClassUsageSchema).optional(),
|
|
251
|
+
safelist: import_zod.z.array(import_zod.z.string()).optional(),
|
|
252
|
+
css: import_zod.z.string().optional(),
|
|
253
|
+
conflicts: import_zod.z.array(import_zod.z.unknown()).optional(),
|
|
254
|
+
unusedClasses: import_zod.z.array(import_zod.z.string()).optional(),
|
|
255
|
+
durationMs: import_zod.z.number().nonnegative().optional()
|
|
278
256
|
});
|
|
279
|
-
NativeTransformResultSchema =
|
|
280
|
-
code:
|
|
281
|
-
classes:
|
|
282
|
-
changed:
|
|
283
|
-
rsc:
|
|
284
|
-
isServer:
|
|
285
|
-
needsClientDirective:
|
|
286
|
-
clientReasons:
|
|
257
|
+
NativeTransformResultSchema = import_zod.z.object({
|
|
258
|
+
code: import_zod.z.string(),
|
|
259
|
+
classes: import_zod.z.array(import_zod.z.string()),
|
|
260
|
+
changed: import_zod.z.boolean(),
|
|
261
|
+
rsc: import_zod.z.object({
|
|
262
|
+
isServer: import_zod.z.boolean(),
|
|
263
|
+
needsClientDirective: import_zod.z.boolean(),
|
|
264
|
+
clientReasons: import_zod.z.array(import_zod.z.string())
|
|
287
265
|
}).optional()
|
|
288
266
|
});
|
|
289
|
-
NativeCssCompileResultSchema =
|
|
290
|
-
css:
|
|
291
|
-
resolvedClasses:
|
|
292
|
-
unresolvedClasses:
|
|
267
|
+
NativeCssCompileResultSchema = import_zod.z.object({
|
|
268
|
+
css: import_zod.z.string(),
|
|
269
|
+
resolvedClasses: import_zod.z.array(import_zod.z.string()),
|
|
270
|
+
unresolvedClasses: import_zod.z.array(import_zod.z.string()).optional()
|
|
293
271
|
});
|
|
294
|
-
|
|
295
|
-
type:
|
|
296
|
-
path:
|
|
272
|
+
NativeWatchEventSchema = import_zod.z.object({
|
|
273
|
+
type: import_zod.z.enum(["change", "unlink", "create"]),
|
|
274
|
+
path: import_zod.z.string()
|
|
297
275
|
});
|
|
298
|
-
NativeWatchResultSchema =
|
|
299
|
-
status:
|
|
300
|
-
handleId:
|
|
301
|
-
error:
|
|
276
|
+
NativeWatchResultSchema = import_zod.z.object({
|
|
277
|
+
status: import_zod.z.enum(["ok", "error"]),
|
|
278
|
+
handleId: import_zod.z.string().optional(),
|
|
279
|
+
error: import_zod.z.string().optional()
|
|
302
280
|
});
|
|
303
|
-
NativeCacheEntrySchema =
|
|
304
|
-
file:
|
|
305
|
-
hash:
|
|
306
|
-
classes:
|
|
307
|
-
timestamp:
|
|
308
|
-
size:
|
|
281
|
+
NativeCacheEntrySchema = import_zod.z.object({
|
|
282
|
+
file: import_zod.z.string(),
|
|
283
|
+
hash: import_zod.z.string(),
|
|
284
|
+
classes: import_zod.z.array(import_zod.z.string()),
|
|
285
|
+
timestamp: import_zod.z.number(),
|
|
286
|
+
size: import_zod.z.number().optional()
|
|
309
287
|
});
|
|
310
|
-
NativeCacheReadResultSchema =
|
|
311
|
-
entries:
|
|
312
|
-
version:
|
|
288
|
+
NativeCacheReadResultSchema = import_zod.z.object({
|
|
289
|
+
entries: import_zod.z.array(NativeCacheEntrySchema),
|
|
290
|
+
version: import_zod.z.string().optional()
|
|
313
291
|
});
|
|
314
292
|
}
|
|
315
293
|
});
|
|
@@ -319,7 +297,7 @@ function getNodeModuleRef() {
|
|
|
319
297
|
if (isBrowser) return null;
|
|
320
298
|
if (nodeModuleRef !== null) return nodeModuleRef;
|
|
321
299
|
try {
|
|
322
|
-
const test = typeof
|
|
300
|
+
const test = typeof require === "function" ? require("module") : null;
|
|
323
301
|
nodeModuleRef = test;
|
|
324
302
|
return test;
|
|
325
303
|
} catch {
|
|
@@ -331,21 +309,21 @@ function getNodePath() {
|
|
|
331
309
|
if (isBrowser) throw new Error("node:path not available in browser");
|
|
332
310
|
const nodeRequire = getNodeModuleRef();
|
|
333
311
|
if (!nodeRequire) throw new Error("require not available");
|
|
334
|
-
if (!_nodePath) _nodePath = nodeRequire.createRequire(
|
|
312
|
+
if (!_nodePath) _nodePath = nodeRequire.createRequire(import_meta.url)("node:path");
|
|
335
313
|
return _nodePath;
|
|
336
314
|
}
|
|
337
315
|
function getNodeUrl() {
|
|
338
316
|
if (isBrowser) throw new Error("node:url not available in browser");
|
|
339
317
|
const nodeRequire = getNodeModuleRef();
|
|
340
318
|
if (!nodeRequire) throw new Error("require not available");
|
|
341
|
-
if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(
|
|
319
|
+
if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(import_meta.url)("node:url");
|
|
342
320
|
return _nodeUrl;
|
|
343
321
|
}
|
|
344
322
|
function getNodeFs() {
|
|
345
323
|
if (isBrowser) throw new Error("node:fs not available in browser");
|
|
346
324
|
const nodeRequire = getNodeModuleRef();
|
|
347
325
|
if (!nodeRequire) throw new Error("require not available");
|
|
348
|
-
if (!_nodeFs) _nodeFs = nodeRequire.createRequire(
|
|
326
|
+
if (!_nodeFs) _nodeFs = nodeRequire.createRequire(import_meta.url)("node:fs");
|
|
349
327
|
return _nodeFs;
|
|
350
328
|
}
|
|
351
329
|
function createEsmRequire(importMetaUrl) {
|
|
@@ -368,7 +346,7 @@ function resolveFromRoot(...segments) {
|
|
|
368
346
|
if (isBrowser) return segments.join("/");
|
|
369
347
|
const nodePath = getNodePath();
|
|
370
348
|
const nodeFs = getNodeFs();
|
|
371
|
-
let dir = getDirname(
|
|
349
|
+
let dir = getDirname(import_meta.url);
|
|
372
350
|
for (let i = 0; i < 10; i++) {
|
|
373
351
|
const pkgPath = nodePath.join(dir, "package.json");
|
|
374
352
|
try {
|
|
@@ -394,9 +372,11 @@ function resolveNativeNodePath(importMetaUrl, ...relativeSegments) {
|
|
|
394
372
|
if (isBrowser) return relativeSegments.join("/");
|
|
395
373
|
return getNodePath().resolve(getDirname(importMetaUrl), ...relativeSegments);
|
|
396
374
|
}
|
|
397
|
-
var isBrowser, nodeModuleRef, _nodePath, _nodeUrl, _nodeFs;
|
|
375
|
+
var import_meta, isBrowser, nodeModuleRef, _nodePath, _nodeUrl, _nodeFs;
|
|
398
376
|
var init_esmHelpers = __esm({
|
|
399
377
|
"packages/domain/shared/src/esmHelpers.ts"() {
|
|
378
|
+
"use strict";
|
|
379
|
+
import_meta = {};
|
|
400
380
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
401
381
|
nodeModuleRef = null;
|
|
402
382
|
_nodePath = null;
|
|
@@ -447,6 +427,7 @@ function createBuildTimer() {
|
|
|
447
427
|
var RING_BUFFER_SIZE, TelemetryCollector, _globalCollector;
|
|
448
428
|
var init_telemetry = __esm({
|
|
449
429
|
"packages/domain/shared/src/telemetry.ts"() {
|
|
430
|
+
"use strict";
|
|
450
431
|
RING_BUFFER_SIZE = 100;
|
|
451
432
|
TelemetryCollector = class {
|
|
452
433
|
data = [];
|
|
@@ -513,6 +494,8 @@ var init_telemetry = __esm({
|
|
|
513
494
|
_globalCollector = null;
|
|
514
495
|
}
|
|
515
496
|
});
|
|
497
|
+
|
|
498
|
+
// packages/domain/shared/src/configSchemas.ts
|
|
516
499
|
function parseJsonWithSchema(jsonString, schema, sourceName) {
|
|
517
500
|
let parsed;
|
|
518
501
|
try {
|
|
@@ -531,8 +514,8 @@ ${issues}`);
|
|
|
531
514
|
return result.data;
|
|
532
515
|
}
|
|
533
516
|
function parseJsonFileWithSchema(filePath, schema) {
|
|
534
|
-
const { readFileSync } =
|
|
535
|
-
const { basename } =
|
|
517
|
+
const { readFileSync } = require("fs");
|
|
518
|
+
const { basename } = require("path");
|
|
536
519
|
let content;
|
|
537
520
|
try {
|
|
538
521
|
content = readFileSync(filePath, "utf-8");
|
|
@@ -543,70 +526,72 @@ function parseJsonFileWithSchema(filePath, schema) {
|
|
|
543
526
|
}
|
|
544
527
|
return parseJsonWithSchema(content, schema, basename(filePath));
|
|
545
528
|
}
|
|
546
|
-
var ScanCacheClassEntrySchema, ScanCacheSchema, TailwindContentItemSchema, TailwindConfigSchema, RegistryPluginEntrySchema, RegistryFileSchema, PackageJsonSchema;
|
|
529
|
+
var import_zod2, ScanCacheClassEntrySchema, ScanCacheSchema, TailwindContentItemSchema, TailwindConfigSchema, RegistryPluginEntrySchema, RegistryFileSchema, PackageJsonSchema;
|
|
547
530
|
var init_configSchemas = __esm({
|
|
548
531
|
"packages/domain/shared/src/configSchemas.ts"() {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
532
|
+
"use strict";
|
|
533
|
+
import_zod2 = require("zod");
|
|
534
|
+
ScanCacheClassEntrySchema = import_zod2.z.object({
|
|
535
|
+
name: import_zod2.z.string().min(1),
|
|
536
|
+
usedIn: import_zod2.z.array(import_zod2.z.string()),
|
|
537
|
+
risk: import_zod2.z.enum(["low", "medium", "high"]).default("low"),
|
|
538
|
+
bundleContribution: import_zod2.z.number().nonnegative().default(0),
|
|
539
|
+
variants: import_zod2.z.array(import_zod2.z.string()).default([])
|
|
555
540
|
});
|
|
556
|
-
ScanCacheSchema =
|
|
557
|
-
version:
|
|
558
|
-
generatedAt:
|
|
559
|
-
root:
|
|
560
|
-
classNames:
|
|
561
|
-
totalFiles:
|
|
562
|
-
uniqueCount:
|
|
541
|
+
ScanCacheSchema = import_zod2.z.object({
|
|
542
|
+
version: import_zod2.z.string().default("1"),
|
|
543
|
+
generatedAt: import_zod2.z.string(),
|
|
544
|
+
root: import_zod2.z.string(),
|
|
545
|
+
classNames: import_zod2.z.array(ScanCacheClassEntrySchema),
|
|
546
|
+
totalFiles: import_zod2.z.number().int().nonnegative(),
|
|
547
|
+
uniqueCount: import_zod2.z.number().int().nonnegative()
|
|
563
548
|
});
|
|
564
|
-
TailwindContentItemSchema =
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
raw:
|
|
568
|
-
extension:
|
|
549
|
+
TailwindContentItemSchema = import_zod2.z.union([
|
|
550
|
+
import_zod2.z.string(),
|
|
551
|
+
import_zod2.z.object({
|
|
552
|
+
raw: import_zod2.z.string(),
|
|
553
|
+
extension: import_zod2.z.string().optional()
|
|
569
554
|
}),
|
|
570
|
-
|
|
571
|
-
files:
|
|
572
|
-
transform:
|
|
555
|
+
import_zod2.z.object({
|
|
556
|
+
files: import_zod2.z.array(import_zod2.z.string()),
|
|
557
|
+
transform: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional()
|
|
573
558
|
})
|
|
574
559
|
]);
|
|
575
|
-
TailwindConfigSchema =
|
|
576
|
-
content:
|
|
577
|
-
theme:
|
|
578
|
-
plugins:
|
|
579
|
-
darkMode:
|
|
580
|
-
prefix:
|
|
581
|
-
safelist:
|
|
582
|
-
blocklist:
|
|
560
|
+
TailwindConfigSchema = import_zod2.z.object({
|
|
561
|
+
content: import_zod2.z.array(TailwindContentItemSchema).optional(),
|
|
562
|
+
theme: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional(),
|
|
563
|
+
plugins: import_zod2.z.array(import_zod2.z.unknown()).optional(),
|
|
564
|
+
darkMode: import_zod2.z.union([import_zod2.z.literal("class"), import_zod2.z.literal("media"), import_zod2.z.literal(false)]).optional(),
|
|
565
|
+
prefix: import_zod2.z.string().optional(),
|
|
566
|
+
safelist: import_zod2.z.array(import_zod2.z.union([import_zod2.z.string(), import_zod2.z.object({ pattern: import_zod2.z.instanceof(RegExp) })])).optional(),
|
|
567
|
+
blocklist: import_zod2.z.array(import_zod2.z.string()).optional()
|
|
583
568
|
}).passthrough();
|
|
584
|
-
RegistryPluginEntrySchema =
|
|
585
|
-
name:
|
|
586
|
-
description:
|
|
587
|
-
version:
|
|
588
|
-
tags:
|
|
589
|
-
official:
|
|
590
|
-
docs:
|
|
591
|
-
install:
|
|
592
|
-
integrity:
|
|
569
|
+
RegistryPluginEntrySchema = import_zod2.z.object({
|
|
570
|
+
name: import_zod2.z.string().min(1),
|
|
571
|
+
description: import_zod2.z.string(),
|
|
572
|
+
version: import_zod2.z.string(),
|
|
573
|
+
tags: import_zod2.z.array(import_zod2.z.string()).default([]),
|
|
574
|
+
official: import_zod2.z.boolean().default(false),
|
|
575
|
+
docs: import_zod2.z.string().url().optional(),
|
|
576
|
+
install: import_zod2.z.string().optional(),
|
|
577
|
+
integrity: import_zod2.z.string().optional()
|
|
593
578
|
});
|
|
594
|
-
RegistryFileSchema =
|
|
595
|
-
version:
|
|
596
|
-
official:
|
|
597
|
-
community:
|
|
579
|
+
RegistryFileSchema = import_zod2.z.object({
|
|
580
|
+
version: import_zod2.z.string(),
|
|
581
|
+
official: import_zod2.z.array(RegistryPluginEntrySchema).default([]),
|
|
582
|
+
community: import_zod2.z.array(RegistryPluginEntrySchema).default([])
|
|
598
583
|
});
|
|
599
|
-
PackageJsonSchema =
|
|
600
|
-
name:
|
|
601
|
-
version:
|
|
602
|
-
scripts:
|
|
603
|
-
dependencies:
|
|
604
|
-
devDependencies:
|
|
605
|
-
peerDependencies:
|
|
606
|
-
main:
|
|
607
|
-
module:
|
|
608
|
-
exports:
|
|
609
|
-
type:
|
|
584
|
+
PackageJsonSchema = import_zod2.z.object({
|
|
585
|
+
name: import_zod2.z.string(),
|
|
586
|
+
version: import_zod2.z.string(),
|
|
587
|
+
scripts: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
|
|
588
|
+
dependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
|
|
589
|
+
devDependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
|
|
590
|
+
peerDependencies: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.string()).optional(),
|
|
591
|
+
main: import_zod2.z.string().optional(),
|
|
592
|
+
module: import_zod2.z.string().optional(),
|
|
593
|
+
exports: import_zod2.z.unknown().optional(),
|
|
594
|
+
type: import_zod2.z.enum(["module", "commonjs"]).optional()
|
|
610
595
|
}).passthrough();
|
|
611
596
|
}
|
|
612
597
|
});
|
|
@@ -616,8 +601,8 @@ function getDirnameFromUrl(importMetaUrl) {
|
|
|
616
601
|
if (!importMetaUrl) return "";
|
|
617
602
|
if (isBrowser2) return "";
|
|
618
603
|
try {
|
|
619
|
-
const nodeUrl =
|
|
620
|
-
const nodePath =
|
|
604
|
+
const nodeUrl = require(NODE_URL);
|
|
605
|
+
const nodePath = require(NODE_PATH);
|
|
621
606
|
return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
|
|
622
607
|
} catch {
|
|
623
608
|
if (importMetaUrl.startsWith("file://")) {
|
|
@@ -631,7 +616,7 @@ function getDirnameFromUrl(importMetaUrl) {
|
|
|
631
616
|
function resolvePath(...segments) {
|
|
632
617
|
if (isBrowser2) return segments.join("/").replace(/\/+/g, "/");
|
|
633
618
|
try {
|
|
634
|
-
const nodePath =
|
|
619
|
+
const nodePath = require(NODE_PATH);
|
|
635
620
|
return nodePath.resolve(...segments);
|
|
636
621
|
} catch {
|
|
637
622
|
return segments.join("/").replace(/\/+/g, "/");
|
|
@@ -640,7 +625,7 @@ function resolvePath(...segments) {
|
|
|
640
625
|
function existsSync(path16) {
|
|
641
626
|
if (isBrowser2) return false;
|
|
642
627
|
try {
|
|
643
|
-
const nodeFs =
|
|
628
|
+
const nodeFs = require(NODE_FS);
|
|
644
629
|
return nodeFs.existsSync(path16);
|
|
645
630
|
} catch {
|
|
646
631
|
return false;
|
|
@@ -694,6 +679,7 @@ function resolveLoaderPath(loaderBasename, importMetaUrl) {
|
|
|
694
679
|
var isBrowser2, NODE_URL, NODE_FS, NODE_PATH;
|
|
695
680
|
var init_workerResolver = __esm({
|
|
696
681
|
"packages/domain/shared/src/workerResolver.ts"() {
|
|
682
|
+
"use strict";
|
|
697
683
|
isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
|
|
698
684
|
NODE_URL = typeof window === "undefined" || typeof document === "undefined" ? "node:url" : null;
|
|
699
685
|
NODE_FS = typeof window === "undefined" || typeof document === "undefined" ? "node:fs" : null;
|
|
@@ -843,13 +829,13 @@ function generateClassRenameCodemod(renames, opts = {}) {
|
|
|
843
829
|
}
|
|
844
830
|
return lines.join("\n");
|
|
845
831
|
}
|
|
846
|
-
function generateBarrelFile(
|
|
832
|
+
function generateBarrelFile(exports2, dir, opts = {}) {
|
|
847
833
|
const { includeTypes = true } = opts;
|
|
848
834
|
const lines = [];
|
|
849
835
|
lines.push(`// Auto-generated barrel file for ${dir}`);
|
|
850
836
|
lines.push(`// Run: npx tsx scripts/generate-barrel.ts to regenerate`);
|
|
851
837
|
lines.push(``);
|
|
852
|
-
for (const name of
|
|
838
|
+
for (const name of exports2) {
|
|
853
839
|
lines.push(`export { default as ${name}, type ${name}Props } from "./${name}"`);
|
|
854
840
|
if (includeTypes) {
|
|
855
841
|
lines.push(`export type * from "./${name}"`);
|
|
@@ -859,8 +845,11 @@ function generateBarrelFile(exports$1, dir, opts = {}) {
|
|
|
859
845
|
}
|
|
860
846
|
var init_codegen = __esm({
|
|
861
847
|
"packages/domain/shared/src/codegen.ts"() {
|
|
848
|
+
"use strict";
|
|
862
849
|
}
|
|
863
850
|
});
|
|
851
|
+
|
|
852
|
+
// packages/domain/shared/src/native-resolution.ts
|
|
864
853
|
function platformKey() {
|
|
865
854
|
if (isBrowser3) return "browser";
|
|
866
855
|
return `${process.platform}-${process.arch}`;
|
|
@@ -876,7 +865,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
876
865
|
}
|
|
877
866
|
const envPath = process.env.TW_NATIVE_PATH?.trim();
|
|
878
867
|
if (envPath) {
|
|
879
|
-
if (
|
|
868
|
+
if (fs.existsSync(envPath)) {
|
|
880
869
|
return { path: envPath, source: "env", platform, tried };
|
|
881
870
|
}
|
|
882
871
|
tried.push(`env:${envPath} (not found)`);
|
|
@@ -885,7 +874,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
885
874
|
for (const pkg of prebuiltPkgs) {
|
|
886
875
|
try {
|
|
887
876
|
const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
|
|
888
|
-
if (
|
|
877
|
+
if (fs.existsSync(candidate)) {
|
|
889
878
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
890
879
|
}
|
|
891
880
|
tried.push(`prebuilt:${pkg} (resolved but missing)`);
|
|
@@ -896,13 +885,13 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
896
885
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
897
886
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
898
887
|
if (runtimeDir) {
|
|
899
|
-
for (const depth of ["..",
|
|
900
|
-
const pkgRoot =
|
|
888
|
+
for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
|
|
889
|
+
const pkgRoot = path.resolve(runtimeDir, depth);
|
|
901
890
|
for (const bin of BINARY_NAMES_SELF) {
|
|
902
891
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
903
|
-
const candidate =
|
|
892
|
+
const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
904
893
|
tried.push(`self-bundled:${candidate}`);
|
|
905
|
-
if (
|
|
894
|
+
if (fs.existsSync(candidate)) {
|
|
906
895
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
907
896
|
}
|
|
908
897
|
}
|
|
@@ -914,29 +903,29 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
914
903
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
915
904
|
const localCandidates = [];
|
|
916
905
|
for (const bin of BINARY_NAMES) {
|
|
917
|
-
localCandidates.push(
|
|
918
|
-
localCandidates.push(
|
|
919
|
-
localCandidates.push(
|
|
920
|
-
localCandidates.push(
|
|
906
|
+
localCandidates.push(path.resolve(base, `${bin}.node`));
|
|
907
|
+
localCandidates.push(path.resolve(base, "..", `${bin}.node`));
|
|
908
|
+
localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
|
|
909
|
+
localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
|
|
921
910
|
}
|
|
922
911
|
for (const startDir of [cwd, base]) {
|
|
923
912
|
let dir = startDir;
|
|
924
913
|
for (let i = 0; i < 6; i++) {
|
|
925
|
-
const nativeDir =
|
|
914
|
+
const nativeDir = path.resolve(dir, "native");
|
|
926
915
|
for (const bin of BINARY_NAMES) {
|
|
927
|
-
localCandidates.push(
|
|
928
|
-
localCandidates.push(
|
|
929
|
-
localCandidates.push(
|
|
930
|
-
localCandidates.push(
|
|
916
|
+
localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
|
|
917
|
+
localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
|
|
918
|
+
localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
|
|
919
|
+
localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
|
|
931
920
|
}
|
|
932
|
-
const parent =
|
|
921
|
+
const parent = path.resolve(dir, "..");
|
|
933
922
|
if (parent === dir) break;
|
|
934
923
|
dir = parent;
|
|
935
924
|
}
|
|
936
925
|
}
|
|
937
926
|
for (const candidate of localCandidates) {
|
|
938
927
|
tried.push(`local:${candidate}`);
|
|
939
|
-
if (
|
|
928
|
+
if (fs.existsSync(candidate)) {
|
|
940
929
|
return { path: candidate, source: "local", platform, tried };
|
|
941
930
|
}
|
|
942
931
|
}
|
|
@@ -956,11 +945,16 @@ function formatNativeNotFoundError(result) {
|
|
|
956
945
|
];
|
|
957
946
|
return lines.join("\n");
|
|
958
947
|
}
|
|
959
|
-
var isBrowser3, _require, PLATFORM_MAP;
|
|
948
|
+
var import_node_module, fs, path, import_meta2, isBrowser3, _require, PLATFORM_MAP;
|
|
960
949
|
var init_native_resolution = __esm({
|
|
961
950
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
951
|
+
"use strict";
|
|
952
|
+
import_node_module = require("module");
|
|
953
|
+
fs = __toESM(require("fs"));
|
|
954
|
+
path = __toESM(require("path"));
|
|
955
|
+
import_meta2 = {};
|
|
962
956
|
isBrowser3 = typeof window !== "undefined" || typeof document !== "undefined";
|
|
963
|
-
_require = typeof
|
|
957
|
+
_require = typeof require !== "undefined" ? require : (0, import_node_module.createRequire)(import_meta2.url);
|
|
964
958
|
PLATFORM_MAP = {
|
|
965
959
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
966
960
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -1006,15 +1000,18 @@ function createObservabilityClient(opts = {}) {
|
|
|
1006
1000
|
}
|
|
1007
1001
|
var init_observability = __esm({
|
|
1008
1002
|
"packages/domain/shared/src/observability.ts"() {
|
|
1003
|
+
"use strict";
|
|
1009
1004
|
}
|
|
1010
1005
|
});
|
|
1011
1006
|
|
|
1012
1007
|
// packages/domain/compiler/src/nativeBridge.ts
|
|
1013
|
-
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
|
|
1008
|
+
var import_meta3, _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
|
|
1014
1009
|
var init_nativeBridge = __esm({
|
|
1015
1010
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
1011
|
+
"use strict";
|
|
1016
1012
|
init_src2();
|
|
1017
|
-
|
|
1013
|
+
import_meta3 = {};
|
|
1014
|
+
_loadNative = (path16) => require(path16);
|
|
1018
1015
|
log = (...args) => {
|
|
1019
1016
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
1020
1017
|
console.log("[compiler:native]", ...args);
|
|
@@ -1040,7 +1037,7 @@ var init_nativeBridge = __esm({
|
|
|
1040
1037
|
}
|
|
1041
1038
|
bridgeLoadAttempted = true;
|
|
1042
1039
|
try {
|
|
1043
|
-
const runtimeDir = resolveRuntimeDir(void 0,
|
|
1040
|
+
const runtimeDir = resolveRuntimeDir(void 0, import_meta3.url);
|
|
1044
1041
|
const result = resolveNativeBinary(runtimeDir);
|
|
1045
1042
|
if (result.path && result.path.endsWith(".node")) {
|
|
1046
1043
|
try {
|
|
@@ -1152,6 +1149,7 @@ function resetCacheStats() {
|
|
|
1152
1149
|
}
|
|
1153
1150
|
var init_cssGeneratorNative = __esm({
|
|
1154
1151
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
1152
|
+
"use strict";
|
|
1155
1153
|
init_nativeBridge();
|
|
1156
1154
|
}
|
|
1157
1155
|
});
|
|
@@ -1224,6 +1222,7 @@ function atomicRegistrySize() {
|
|
|
1224
1222
|
}
|
|
1225
1223
|
var init_compilationNative = __esm({
|
|
1226
1224
|
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
1225
|
+
"use strict";
|
|
1227
1226
|
init_nativeBridge();
|
|
1228
1227
|
}
|
|
1229
1228
|
});
|
|
@@ -1367,6 +1366,7 @@ function twMergeRaw(classLists) {
|
|
|
1367
1366
|
}
|
|
1368
1367
|
var init_cssCompilationNative = __esm({
|
|
1369
1368
|
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
1369
|
+
"use strict";
|
|
1370
1370
|
init_nativeBridge();
|
|
1371
1371
|
}
|
|
1372
1372
|
});
|
|
@@ -1466,6 +1466,7 @@ function idRegistryImport(importedData) {
|
|
|
1466
1466
|
}
|
|
1467
1467
|
var init_idRegistryNative = __esm({
|
|
1468
1468
|
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
1469
|
+
"use strict";
|
|
1469
1470
|
init_nativeBridge();
|
|
1470
1471
|
}
|
|
1471
1472
|
});
|
|
@@ -1607,9 +1608,12 @@ function scanFilesBatchNative(filesJson) {
|
|
|
1607
1608
|
}
|
|
1608
1609
|
var init_streamingNative = __esm({
|
|
1609
1610
|
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
1611
|
+
"use strict";
|
|
1610
1612
|
init_nativeBridge();
|
|
1611
1613
|
}
|
|
1612
1614
|
});
|
|
1615
|
+
|
|
1616
|
+
// packages/domain/compiler/src/tailwindEngine.ts
|
|
1613
1617
|
function loadTailwindEngine() {
|
|
1614
1618
|
if (_twEngine) return _twEngine;
|
|
1615
1619
|
if (_twEngineError) throw _twEngineError;
|
|
@@ -1629,10 +1633,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
1629
1633
|
if (classes.length === 0) return "";
|
|
1630
1634
|
const tw = loadTailwindEngine();
|
|
1631
1635
|
const input = cssEntryContent ?? "@import 'tailwindcss';";
|
|
1632
|
-
const { readFileSync, existsSync: existsSync3 } = await import(
|
|
1633
|
-
const { dirname, resolve: resolve2 } = await import(
|
|
1636
|
+
const { readFileSync, existsSync: existsSync3 } = await import("fs");
|
|
1637
|
+
const { dirname, resolve: resolve2 } = await import("path");
|
|
1634
1638
|
const projectRoot = root ?? process.cwd();
|
|
1635
|
-
const req =
|
|
1639
|
+
const req = (0, import_node_module2.createRequire)(resolve2(projectRoot, "package.json"));
|
|
1636
1640
|
const loadStylesheet = async (id, base) => {
|
|
1637
1641
|
try {
|
|
1638
1642
|
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;
|
|
@@ -1652,10 +1656,14 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
1652
1656
|
const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
|
|
1653
1657
|
return compiler.build(classes);
|
|
1654
1658
|
}
|
|
1655
|
-
var require2, _twEngine, _twEngineError;
|
|
1659
|
+
var import_node_module2, import_meta4, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
1656
1660
|
var init_tailwindEngine = __esm({
|
|
1657
1661
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
1658
|
-
|
|
1662
|
+
"use strict";
|
|
1663
|
+
import_node_module2 = require("module");
|
|
1664
|
+
import_meta4 = {};
|
|
1665
|
+
require2 = (0, import_node_module2.createRequire)(import_meta4.url);
|
|
1666
|
+
MAX_CACHE_MEMORY = 256 * 1024;
|
|
1659
1667
|
_twEngine = null;
|
|
1660
1668
|
_twEngineError = null;
|
|
1661
1669
|
}
|
|
@@ -1836,24 +1844,29 @@ function processTailwindCssWithTargets(css, targets) {
|
|
|
1836
1844
|
}
|
|
1837
1845
|
return result.css;
|
|
1838
1846
|
}
|
|
1839
|
-
var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
|
|
1847
|
+
var import_node_module3, import_meta5, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
|
|
1840
1848
|
var init_tailwindEngine2 = __esm({
|
|
1841
1849
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1850
|
+
"use strict";
|
|
1851
|
+
import_node_module3 = require("module");
|
|
1842
1852
|
init_nativeBridge();
|
|
1843
1853
|
init_cssGeneratorNative();
|
|
1844
1854
|
init_cssCompilationNative();
|
|
1845
1855
|
init_tailwindEngine();
|
|
1846
|
-
|
|
1856
|
+
import_meta5 = {};
|
|
1857
|
+
require3 = (0, import_node_module3.createRequire)(import_meta5.url);
|
|
1847
1858
|
_cssCache = /* @__PURE__ */ new Map();
|
|
1848
1859
|
_cacheHits = 0;
|
|
1849
1860
|
_cacheMisses = 0;
|
|
1850
1861
|
MAX_CACHE_SIZE = 100;
|
|
1862
|
+
MAX_CACHE_MEMORY2 = 256 * 1024;
|
|
1851
1863
|
}
|
|
1852
1864
|
});
|
|
1853
1865
|
|
|
1854
1866
|
// packages/domain/compiler/src/compiler/index.ts
|
|
1855
1867
|
var init_compiler = __esm({
|
|
1856
1868
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
1869
|
+
"use strict";
|
|
1857
1870
|
init_cssGeneratorNative();
|
|
1858
1871
|
init_compilationNative();
|
|
1859
1872
|
init_cssCompilationNative();
|
|
@@ -1866,6 +1879,7 @@ var init_compiler = __esm({
|
|
|
1866
1879
|
var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1867
1880
|
var init_parser = __esm({
|
|
1868
1881
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1882
|
+
"use strict";
|
|
1869
1883
|
init_nativeBridge();
|
|
1870
1884
|
parseClasses = (raw) => {
|
|
1871
1885
|
const native = getNativeBridge();
|
|
@@ -2044,6 +2058,7 @@ function resetMemoryStats() {
|
|
|
2044
2058
|
}
|
|
2045
2059
|
var init_analyzerNative = __esm({
|
|
2046
2060
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
2061
|
+
"use strict";
|
|
2047
2062
|
init_nativeBridge();
|
|
2048
2063
|
}
|
|
2049
2064
|
});
|
|
@@ -2137,6 +2152,7 @@ function resolveSimpleVariants(configJson) {
|
|
|
2137
2152
|
}
|
|
2138
2153
|
var init_themeResolutionNative = __esm({
|
|
2139
2154
|
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
2155
|
+
"use strict";
|
|
2140
2156
|
init_nativeBridge();
|
|
2141
2157
|
}
|
|
2142
2158
|
});
|
|
@@ -2184,6 +2200,7 @@ function generateSubComponentTypes(root, outputPath) {
|
|
|
2184
2200
|
}
|
|
2185
2201
|
var init_scannerNative = __esm({
|
|
2186
2202
|
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
2203
|
+
"use strict";
|
|
2187
2204
|
init_nativeBridge();
|
|
2188
2205
|
}
|
|
2189
2206
|
});
|
|
@@ -2191,6 +2208,7 @@ var init_scannerNative = __esm({
|
|
|
2191
2208
|
// packages/domain/compiler/src/analyzer/index.ts
|
|
2192
2209
|
var init_analyzer = __esm({
|
|
2193
2210
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
2211
|
+
"use strict";
|
|
2194
2212
|
init_analyzerNative();
|
|
2195
2213
|
init_themeResolutionNative();
|
|
2196
2214
|
init_scannerNative();
|
|
@@ -2379,6 +2397,7 @@ function resetResolverPoolStats() {
|
|
|
2379
2397
|
}
|
|
2380
2398
|
var init_cacheNative = __esm({
|
|
2381
2399
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
2400
|
+
"use strict";
|
|
2382
2401
|
init_nativeBridge();
|
|
2383
2402
|
}
|
|
2384
2403
|
});
|
|
@@ -2386,6 +2405,7 @@ var init_cacheNative = __esm({
|
|
|
2386
2405
|
// packages/domain/compiler/src/cache/index.ts
|
|
2387
2406
|
var init_cache = __esm({
|
|
2388
2407
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
2408
|
+
"use strict";
|
|
2389
2409
|
init_cacheNative();
|
|
2390
2410
|
}
|
|
2391
2411
|
});
|
|
@@ -2634,6 +2654,7 @@ function redisDiagnose() {
|
|
|
2634
2654
|
}
|
|
2635
2655
|
var init_redisNative = __esm({
|
|
2636
2656
|
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
2657
|
+
"use strict";
|
|
2637
2658
|
init_nativeBridge();
|
|
2638
2659
|
}
|
|
2639
2660
|
});
|
|
@@ -2641,6 +2662,7 @@ var init_redisNative = __esm({
|
|
|
2641
2662
|
// packages/domain/compiler/src/redis/index.ts
|
|
2642
2663
|
var init_redis = __esm({
|
|
2643
2664
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
2665
|
+
"use strict";
|
|
2644
2666
|
init_redisNative();
|
|
2645
2667
|
}
|
|
2646
2668
|
});
|
|
@@ -2779,6 +2801,7 @@ function getCompilerDiagnostics() {
|
|
|
2779
2801
|
}
|
|
2780
2802
|
var init_watchSystemNative = __esm({
|
|
2781
2803
|
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
2804
|
+
"use strict";
|
|
2782
2805
|
init_nativeBridge();
|
|
2783
2806
|
}
|
|
2784
2807
|
});
|
|
@@ -2786,9 +2809,12 @@ var init_watchSystemNative = __esm({
|
|
|
2786
2809
|
// packages/domain/compiler/src/watch/index.ts
|
|
2787
2810
|
var init_watch = __esm({
|
|
2788
2811
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
2812
|
+
"use strict";
|
|
2789
2813
|
init_watchSystemNative();
|
|
2790
2814
|
}
|
|
2791
2815
|
});
|
|
2816
|
+
|
|
2817
|
+
// packages/domain/compiler/src/index.ts
|
|
2792
2818
|
function _layoutClassesToCss(classes) {
|
|
2793
2819
|
const native = getNativeBridge();
|
|
2794
2820
|
if (!native?.layoutClassesToCss) {
|
|
@@ -2823,9 +2849,13 @@ function extractContainerCssFromSource(source) {
|
|
|
2823
2849
|
}
|
|
2824
2850
|
return rules.join("\n");
|
|
2825
2851
|
}
|
|
2826
|
-
var _require2, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
2852
|
+
var import_node_fs, import_node_path, import_node_module4, import_meta6, _require2, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
2827
2853
|
var init_src = __esm({
|
|
2828
2854
|
"packages/domain/compiler/src/index.ts"() {
|
|
2855
|
+
"use strict";
|
|
2856
|
+
import_node_fs = __toESM(require("fs"), 1);
|
|
2857
|
+
import_node_path = __toESM(require("path"), 1);
|
|
2858
|
+
import_node_module4 = require("module");
|
|
2829
2859
|
init_nativeBridge();
|
|
2830
2860
|
init_compiler();
|
|
2831
2861
|
init_parser();
|
|
@@ -2833,7 +2863,8 @@ var init_src = __esm({
|
|
|
2833
2863
|
init_cache();
|
|
2834
2864
|
init_redis();
|
|
2835
2865
|
init_watch();
|
|
2836
|
-
|
|
2866
|
+
import_meta6 = {};
|
|
2867
|
+
_require2 = (0, import_node_module4.createRequire)(import_meta6.url);
|
|
2837
2868
|
transformSource = (source, opts) => {
|
|
2838
2869
|
const native = getNativeBridge();
|
|
2839
2870
|
if (!native?.transformSource) {
|
|
@@ -2925,7 +2956,7 @@ var init_src = __esm({
|
|
|
2925
2956
|
};
|
|
2926
2957
|
scanProjectUsage = (dirs, cwd) => {
|
|
2927
2958
|
const { batchExtractClasses: batchExtractClasses2 } = _require2("./parser");
|
|
2928
|
-
const files = dirs.map((dir) =>
|
|
2959
|
+
const files = dirs.map((dir) => import_node_path.default.resolve(cwd, dir));
|
|
2929
2960
|
const results = batchExtractClasses2(files) || [];
|
|
2930
2961
|
const combined = {};
|
|
2931
2962
|
for (const result of results) {
|
|
@@ -2942,13 +2973,13 @@ var init_src = __esm({
|
|
|
2942
2973
|
const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
|
|
2943
2974
|
const allClasses = Object.keys(classes).sort();
|
|
2944
2975
|
if (outputPath) {
|
|
2945
|
-
|
|
2976
|
+
import_node_fs.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
2946
2977
|
}
|
|
2947
2978
|
return allClasses;
|
|
2948
2979
|
};
|
|
2949
2980
|
loadSafelist = (safelistPath) => {
|
|
2950
2981
|
try {
|
|
2951
|
-
const content =
|
|
2982
|
+
const content = import_node_fs.default.readFileSync(safelistPath, "utf-8");
|
|
2952
2983
|
return JSON.parse(content);
|
|
2953
2984
|
} catch {
|
|
2954
2985
|
return [];
|
|
@@ -2962,9 +2993,9 @@ var init_src = __esm({
|
|
|
2962
2993
|
"tailwind.config.cjs"
|
|
2963
2994
|
];
|
|
2964
2995
|
for (const file of configFiles) {
|
|
2965
|
-
const fullPath =
|
|
2966
|
-
if (
|
|
2967
|
-
const mod =
|
|
2996
|
+
const fullPath = import_node_path.default.join(cwd, file);
|
|
2997
|
+
if (import_node_fs.default.existsSync(fullPath)) {
|
|
2998
|
+
const mod = require(fullPath);
|
|
2968
2999
|
return mod.default || mod;
|
|
2969
3000
|
}
|
|
2970
3001
|
}
|
|
@@ -2973,9 +3004,9 @@ var init_src = __esm({
|
|
|
2973
3004
|
getContentPaths = (cwd = process.cwd()) => {
|
|
2974
3005
|
return {
|
|
2975
3006
|
content: [
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
3007
|
+
import_node_path.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
3008
|
+
import_node_path.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
3009
|
+
import_node_path.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
2979
3010
|
]
|
|
2980
3011
|
};
|
|
2981
3012
|
};
|
|
@@ -3389,6 +3420,7 @@ __export(internal_exports, {
|
|
|
3389
3420
|
});
|
|
3390
3421
|
var init_internal = __esm({
|
|
3391
3422
|
"packages/domain/compiler/src/internal.ts"() {
|
|
3423
|
+
"use strict";
|
|
3392
3424
|
init_src();
|
|
3393
3425
|
init_tailwindEngine2();
|
|
3394
3426
|
init_compiler();
|
|
@@ -3399,6 +3431,8 @@ var init_internal = __esm({
|
|
|
3399
3431
|
init_watch();
|
|
3400
3432
|
}
|
|
3401
3433
|
});
|
|
3434
|
+
|
|
3435
|
+
// packages/domain/shared/src/staticStateExtractor.ts
|
|
3402
3436
|
function getNative() {
|
|
3403
3437
|
if (_native) return _native;
|
|
3404
3438
|
try {
|
|
@@ -3428,17 +3462,17 @@ function getNative() {
|
|
|
3428
3462
|
function* walkSourceFiles(dir) {
|
|
3429
3463
|
let entries;
|
|
3430
3464
|
try {
|
|
3431
|
-
entries =
|
|
3465
|
+
entries = import_node_fs2.default.readdirSync(dir, { withFileTypes: true });
|
|
3432
3466
|
} catch {
|
|
3433
3467
|
return;
|
|
3434
3468
|
}
|
|
3435
3469
|
for (const entry of entries) {
|
|
3436
|
-
const fullPath =
|
|
3470
|
+
const fullPath = import_node_path2.default.join(dir, entry.name);
|
|
3437
3471
|
if (entry.isDirectory()) {
|
|
3438
3472
|
if (IGNORE_PATTERNS.some((p) => entry.name === p || entry.name.startsWith(p))) continue;
|
|
3439
3473
|
yield* walkSourceFiles(fullPath);
|
|
3440
3474
|
} else if (entry.isFile()) {
|
|
3441
|
-
const ext =
|
|
3475
|
+
const ext = import_node_path2.default.extname(entry.name);
|
|
3442
3476
|
if (SOURCE_EXTENSIONS.has(ext)) yield fullPath;
|
|
3443
3477
|
}
|
|
3444
3478
|
}
|
|
@@ -3502,7 +3536,7 @@ function extractStaticStateCss(srcDir, options = {}) {
|
|
|
3502
3536
|
allConfigs.push(...configs);
|
|
3503
3537
|
if (verbose) {
|
|
3504
3538
|
process.stderr.write(
|
|
3505
|
-
`[tw:static-state] ${
|
|
3539
|
+
`[tw:static-state] ${import_node_path2.default.relative(srcDir, filePath)}: ${configs.length} komponen
|
|
3506
3540
|
`
|
|
3507
3541
|
);
|
|
3508
3542
|
}
|
|
@@ -3513,7 +3547,7 @@ function extractStaticStateCss(srcDir, options = {}) {
|
|
|
3513
3547
|
if (filesScanned >= maxFiles) break;
|
|
3514
3548
|
let source;
|
|
3515
3549
|
try {
|
|
3516
|
-
source =
|
|
3550
|
+
source = import_node_fs2.default.readFileSync(filePath, "utf-8");
|
|
3517
3551
|
} catch {
|
|
3518
3552
|
continue;
|
|
3519
3553
|
}
|
|
@@ -3526,7 +3560,7 @@ function extractStaticStateCss(srcDir, options = {}) {
|
|
|
3526
3560
|
allConfigs.push(...configs);
|
|
3527
3561
|
if (verbose) {
|
|
3528
3562
|
process.stderr.write(
|
|
3529
|
-
`[tw:static-state] ${
|
|
3563
|
+
`[tw:static-state] ${import_node_path2.default.relative(srcDir, filePath)}: ${configs.length} komponen
|
|
3530
3564
|
`
|
|
3531
3565
|
);
|
|
3532
3566
|
}
|
|
@@ -3620,12 +3654,12 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
|
|
|
3620
3654
|
resolvedCss: options.resolvedCss || ""
|
|
3621
3655
|
// ← ensure always passed
|
|
3622
3656
|
});
|
|
3623
|
-
const twClassesDir =
|
|
3624
|
-
|
|
3625
|
-
const stateFilePath =
|
|
3657
|
+
const twClassesDir = import_node_path2.default.join(import_node_path2.default.dirname(safelistPath), "tw-classes");
|
|
3658
|
+
import_node_fs2.default.mkdirSync(twClassesDir, { recursive: true });
|
|
3659
|
+
const stateFilePath = import_node_path2.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);
|
|
3626
3660
|
if (result.rulesGenerated === 0) {
|
|
3627
3661
|
try {
|
|
3628
|
-
|
|
3662
|
+
import_node_fs2.default.writeFileSync(
|
|
3629
3663
|
stateFilePath,
|
|
3630
3664
|
"/* tw-state-static.css \u2014 tidak ada state rules yang di-generate */\n",
|
|
3631
3665
|
"utf-8"
|
|
@@ -3635,7 +3669,7 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
|
|
|
3635
3669
|
return `[tw:static-state] tidak ada state rules yang di-generate (${result.filesScanned} files di-scan)`;
|
|
3636
3670
|
}
|
|
3637
3671
|
try {
|
|
3638
|
-
|
|
3672
|
+
import_node_fs2.default.writeFileSync(stateFilePath, result.generatedCss, "utf-8");
|
|
3639
3673
|
return [
|
|
3640
3674
|
`[tw:static-state] ${result.rulesGenerated} static state rules di-generate`,
|
|
3641
3675
|
` \u2192 ${result.filesScanned} files scanned, ${result.filesWithStates} dengan states`,
|
|
@@ -3647,15 +3681,20 @@ function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
|
|
|
3647
3681
|
return `[tw:static-state] gagal tulis state CSS: ${msg}`;
|
|
3648
3682
|
}
|
|
3649
3683
|
}
|
|
3650
|
-
var SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native, TW_STATE_STATIC_FILENAME;
|
|
3684
|
+
var import_node_fs2, import_node_path2, SOURCE_EXTENSIONS, IGNORE_PATTERNS, _native, TW_STATE_STATIC_FILENAME;
|
|
3651
3685
|
var init_staticStateExtractor = __esm({
|
|
3652
3686
|
"packages/domain/shared/src/staticStateExtractor.ts"() {
|
|
3687
|
+
"use strict";
|
|
3688
|
+
import_node_fs2 = __toESM(require("fs"));
|
|
3689
|
+
import_node_path2 = __toESM(require("path"));
|
|
3653
3690
|
SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mts", ".mjs"]);
|
|
3654
3691
|
IGNORE_PATTERNS = ["node_modules", ".next", "dist", "build", ".git", "coverage", "__tests__"];
|
|
3655
3692
|
_native = null;
|
|
3656
3693
|
TW_STATE_STATIC_FILENAME = "_tw-state-static.css";
|
|
3657
3694
|
}
|
|
3658
3695
|
});
|
|
3696
|
+
|
|
3697
|
+
// packages/domain/shared/src/logger.ts
|
|
3659
3698
|
function getEnvLevel() {
|
|
3660
3699
|
const env = process.env.TWS_LOG_LEVEL?.toLowerCase();
|
|
3661
3700
|
if (env && env in LEVELS) return env;
|
|
@@ -3665,8 +3704,8 @@ function setGlobalLogFile(filePath) {
|
|
|
3665
3704
|
_globalLogFile = filePath;
|
|
3666
3705
|
_logFileInitialized = false;
|
|
3667
3706
|
try {
|
|
3668
|
-
|
|
3669
|
-
|
|
3707
|
+
import_node_fs3.default.mkdirSync(import_node_path3.default.dirname(filePath), { recursive: true });
|
|
3708
|
+
import_node_fs3.default.writeFileSync(
|
|
3670
3709
|
filePath,
|
|
3671
3710
|
`# tailwind-styled build log \u2014 ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
3672
3711
|
`,
|
|
@@ -3679,13 +3718,13 @@ function setGlobalLogFile(filePath) {
|
|
|
3679
3718
|
function writeToFile(line) {
|
|
3680
3719
|
if (!_globalLogFile || !_logFileInitialized) return;
|
|
3681
3720
|
try {
|
|
3682
|
-
|
|
3721
|
+
import_node_fs3.default.appendFileSync(_globalLogFile, line);
|
|
3683
3722
|
} catch {
|
|
3684
3723
|
}
|
|
3685
3724
|
}
|
|
3686
3725
|
function createLogger(prefix, level) {
|
|
3687
3726
|
const loggerState = {
|
|
3688
|
-
currentLevel: getEnvLevel(),
|
|
3727
|
+
currentLevel: level ?? getEnvLevel(),
|
|
3689
3728
|
setLevel(l) {
|
|
3690
3729
|
this.currentLevel = l;
|
|
3691
3730
|
}
|
|
@@ -3706,13 +3745,16 @@ function createLogger(prefix, level) {
|
|
|
3706
3745
|
setLogFile: (filePath) => setGlobalLogFile(filePath)
|
|
3707
3746
|
};
|
|
3708
3747
|
}
|
|
3709
|
-
var LEVELS, _globalLogFile, _logFileInitialized;
|
|
3748
|
+
var import_node_fs3, import_node_path3, LEVELS, _globalLogFile, _logFileInitialized, logger;
|
|
3710
3749
|
var init_logger = __esm({
|
|
3711
3750
|
"packages/domain/shared/src/logger.ts"() {
|
|
3751
|
+
"use strict";
|
|
3752
|
+
import_node_fs3 = __toESM(require("fs"));
|
|
3753
|
+
import_node_path3 = __toESM(require("path"));
|
|
3712
3754
|
LEVELS = { silent: 0, error: 1, warn: 2, info: 3, debug: 4 };
|
|
3713
3755
|
_globalLogFile = null;
|
|
3714
3756
|
_logFileInitialized = false;
|
|
3715
|
-
createLogger("tailwind-styled");
|
|
3757
|
+
logger = createLogger("tailwind-styled");
|
|
3716
3758
|
}
|
|
3717
3759
|
});
|
|
3718
3760
|
|
|
@@ -3833,9 +3875,9 @@ function loadNativeBinding(options) {
|
|
|
3833
3875
|
const { runtimeDir, candidates, isValid } = options;
|
|
3834
3876
|
const loadErrors = [];
|
|
3835
3877
|
for (const candidate of candidates) {
|
|
3836
|
-
const candidatePath =
|
|
3878
|
+
const candidatePath = import_node_path4.default.resolve(runtimeDir, candidate);
|
|
3837
3879
|
try {
|
|
3838
|
-
if (!
|
|
3880
|
+
if (!import_node_fs4.default.existsSync(candidatePath) && !import_node_fs4.default.existsSync(candidatePath + ".node")) {
|
|
3839
3881
|
continue;
|
|
3840
3882
|
}
|
|
3841
3883
|
const mod = requireNativeModule(candidatePath);
|
|
@@ -3867,9 +3909,9 @@ function resolveNativeBindingCandidates(options) {
|
|
|
3867
3909
|
}
|
|
3868
3910
|
}
|
|
3869
3911
|
if (!includeDefaultCandidates) return candidates;
|
|
3870
|
-
if (
|
|
3912
|
+
if (import_node_fs4.default.existsSync(runtimeDir)) {
|
|
3871
3913
|
try {
|
|
3872
|
-
for (const entry of
|
|
3914
|
+
for (const entry of import_node_fs4.default.readdirSync(runtimeDir)) {
|
|
3873
3915
|
if (entry.endsWith(".node")) candidates.push(entry);
|
|
3874
3916
|
}
|
|
3875
3917
|
} catch {
|
|
@@ -3878,28 +3920,28 @@ function resolveNativeBindingCandidates(options) {
|
|
|
3878
3920
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
3879
3921
|
const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
|
|
3880
3922
|
for (const bin of BINARY_NAMES) {
|
|
3881
|
-
candidates.push(
|
|
3882
|
-
candidates.push(
|
|
3883
|
-
candidates.push(
|
|
3884
|
-
candidates.push(
|
|
3885
|
-
candidates.push(
|
|
3886
|
-
candidates.push(
|
|
3887
|
-
candidates.push(
|
|
3888
|
-
candidates.push(
|
|
3889
|
-
candidates.push(
|
|
3923
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, `${bin}.node`));
|
|
3924
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
|
|
3925
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "native", `${bin}.node`));
|
|
3926
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
|
|
3927
|
+
candidates.push(import_node_path4.default.resolve(process.cwd(), "native", `${bin}.node`));
|
|
3928
|
+
candidates.push(import_node_path4.default.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
|
|
3929
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
|
|
3930
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
|
|
3931
|
+
candidates.push(import_node_path4.default.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
|
|
3890
3932
|
}
|
|
3891
3933
|
return Array.from(new Set(candidates));
|
|
3892
3934
|
}
|
|
3893
3935
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
3894
|
-
if (dir) return
|
|
3936
|
+
if (dir) return import_node_path4.default.resolve(dir);
|
|
3895
3937
|
try {
|
|
3896
|
-
return
|
|
3938
|
+
return import_node_path4.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
3897
3939
|
} catch {
|
|
3898
3940
|
return process.cwd();
|
|
3899
3941
|
}
|
|
3900
3942
|
}
|
|
3901
3943
|
function hashContent2(content, algorithm = "md5", length) {
|
|
3902
|
-
const hash =
|
|
3944
|
+
const hash = (0, import_node_crypto.createHash)(algorithm).update(content).digest("hex");
|
|
3903
3945
|
return length ? hash.slice(0, length) : hash;
|
|
3904
3946
|
}
|
|
3905
3947
|
function formatErrorMessage(error) {
|
|
@@ -3907,9 +3949,15 @@ function formatErrorMessage(error) {
|
|
|
3907
3949
|
if (error instanceof Error) return error.message;
|
|
3908
3950
|
return String(error);
|
|
3909
3951
|
}
|
|
3910
|
-
var TwError, _require3, LRUCache;
|
|
3952
|
+
var import_node_crypto, import_node_fs4, import_node_path4, import_node_url, import_node_module5, import_meta7, TwError, _require3, LRUCache;
|
|
3911
3953
|
var init_src2 = __esm({
|
|
3912
3954
|
"packages/domain/shared/src/index.ts"() {
|
|
3955
|
+
"use strict";
|
|
3956
|
+
import_node_crypto = require("crypto");
|
|
3957
|
+
import_node_fs4 = __toESM(require("fs"));
|
|
3958
|
+
import_node_path4 = __toESM(require("path"));
|
|
3959
|
+
import_node_url = require("url");
|
|
3960
|
+
import_node_module5 = require("module");
|
|
3913
3961
|
init_trace();
|
|
3914
3962
|
init_error_codes();
|
|
3915
3963
|
init_compatibility();
|
|
@@ -3923,6 +3971,7 @@ var init_src2 = __esm({
|
|
|
3923
3971
|
init_observability();
|
|
3924
3972
|
init_staticStateExtractor();
|
|
3925
3973
|
init_logger();
|
|
3974
|
+
import_meta7 = {};
|
|
3926
3975
|
TwError = class _TwError extends Error {
|
|
3927
3976
|
/** @deprecated Gunakan source */
|
|
3928
3977
|
domain;
|
|
@@ -3975,7 +4024,7 @@ var init_src2 = __esm({
|
|
|
3975
4024
|
return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
|
|
3976
4025
|
}
|
|
3977
4026
|
};
|
|
3978
|
-
_require3 =
|
|
4027
|
+
_require3 = (0, import_node_module5.createRequire)(import_meta7.url);
|
|
3979
4028
|
LRUCache = class {
|
|
3980
4029
|
capacity;
|
|
3981
4030
|
cache;
|
|
@@ -4053,8 +4102,8 @@ function getDirname2() {
|
|
|
4053
4102
|
if (typeof __dirname !== "undefined") {
|
|
4054
4103
|
return __dirname;
|
|
4055
4104
|
}
|
|
4056
|
-
if (typeof
|
|
4057
|
-
return
|
|
4105
|
+
if (typeof import_meta8 !== "undefined" && import_meta8.url) {
|
|
4106
|
+
return import_node_path5.default.dirname((0, import_node_url2.fileURLToPath)(import_meta8.url));
|
|
4058
4107
|
}
|
|
4059
4108
|
return process.cwd();
|
|
4060
4109
|
}
|
|
@@ -4259,13 +4308,17 @@ function hasNativeWatchBinding() {
|
|
|
4259
4308
|
return false;
|
|
4260
4309
|
}
|
|
4261
4310
|
}
|
|
4262
|
-
var log2, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
|
|
4311
|
+
var import_node_path5, import_node_url2, import_meta8, log2, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
|
|
4263
4312
|
var init_native_bridge = __esm({
|
|
4264
4313
|
"packages/domain/scanner/src/native-bridge.ts"() {
|
|
4314
|
+
"use strict";
|
|
4315
|
+
import_node_path5 = __toESM(require("path"), 1);
|
|
4316
|
+
import_node_url2 = require("url");
|
|
4265
4317
|
init_src2();
|
|
4318
|
+
import_meta8 = {};
|
|
4266
4319
|
log2 = createDebugLogger("scanner:native");
|
|
4267
|
-
isValidScannerBinding = (
|
|
4268
|
-
const candidate =
|
|
4320
|
+
isValidScannerBinding = (module2) => {
|
|
4321
|
+
const candidate = module2;
|
|
4269
4322
|
return !!(candidate && (candidate.scanWorkspace || candidate.extractClassesFromSource || candidate.hashFileContent || candidate.cacheRead || candidate.cacheWrite));
|
|
4270
4323
|
};
|
|
4271
4324
|
createScannerBridgeLoader = () => {
|
|
@@ -4342,13 +4395,15 @@ var init_native_bridge = __esm({
|
|
|
4342
4395
|
resetScannerBridgeCache = scannerBridgeLoader.reset;
|
|
4343
4396
|
}
|
|
4344
4397
|
});
|
|
4398
|
+
|
|
4399
|
+
// packages/domain/scanner/src/cache-native.ts
|
|
4345
4400
|
function defaultCachePath(rootDir, cacheDir) {
|
|
4346
|
-
const dir = cacheDir ?
|
|
4347
|
-
return
|
|
4401
|
+
const dir = cacheDir ? import_node_path6.default.resolve(rootDir, cacheDir) : import_node_path6.default.join(process.cwd(), ".cache", "tailwind-styled");
|
|
4402
|
+
return import_node_path6.default.join(dir, "scanner-cache.json");
|
|
4348
4403
|
}
|
|
4349
4404
|
function readCache(rootDir, cacheDir) {
|
|
4350
4405
|
const cachePath = defaultCachePath(rootDir, cacheDir);
|
|
4351
|
-
|
|
4406
|
+
import_node_fs5.default.mkdirSync(import_node_path6.default.dirname(cachePath), { recursive: true });
|
|
4352
4407
|
const result = cacheReadNative(cachePath);
|
|
4353
4408
|
if (!result) return [];
|
|
4354
4409
|
return result.entries.map((e) => ({
|
|
@@ -4363,7 +4418,7 @@ function readCache(rootDir, cacheDir) {
|
|
|
4363
4418
|
}
|
|
4364
4419
|
function writeCache(rootDir, entries, cacheDir) {
|
|
4365
4420
|
const cachePath = defaultCachePath(rootDir, cacheDir);
|
|
4366
|
-
|
|
4421
|
+
import_node_fs5.default.mkdirSync(import_node_path6.default.dirname(cachePath), { recursive: true });
|
|
4367
4422
|
const success = cacheWriteNative(cachePath, entries);
|
|
4368
4423
|
if (!success) {
|
|
4369
4424
|
throw new Error(
|
|
@@ -4382,11 +4437,18 @@ function filePriority(mtimeMs, size, cached, nowMs = Date.now()) {
|
|
|
4382
4437
|
nowMs
|
|
4383
4438
|
);
|
|
4384
4439
|
}
|
|
4440
|
+
var import_node_fs5, import_node_path6, STALE_THRESHOLD_MS;
|
|
4385
4441
|
var init_cache_native = __esm({
|
|
4386
4442
|
"packages/domain/scanner/src/cache-native.ts"() {
|
|
4443
|
+
"use strict";
|
|
4444
|
+
import_node_fs5 = __toESM(require("fs"), 1);
|
|
4445
|
+
import_node_path6 = __toESM(require("path"), 1);
|
|
4387
4446
|
init_native_bridge();
|
|
4447
|
+
STALE_THRESHOLD_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
4388
4448
|
}
|
|
4389
4449
|
});
|
|
4450
|
+
|
|
4451
|
+
// packages/domain/scanner/src/parallel-scanner.ts
|
|
4390
4452
|
function collectFiles2(rootDir, extensions, ignoreDirs) {
|
|
4391
4453
|
const native = collectFilesNative(rootDir, extensions, ignoreDirs);
|
|
4392
4454
|
if (native !== null) return native;
|
|
@@ -4404,7 +4466,7 @@ function mergeResults(batchResults) {
|
|
|
4404
4466
|
}
|
|
4405
4467
|
function runChunkInWorker(filePaths) {
|
|
4406
4468
|
return new Promise((resolve2, reject) => {
|
|
4407
|
-
const worker = new
|
|
4469
|
+
const worker = new import_node_worker_threads.Worker(_workerFilename, {
|
|
4408
4470
|
workerData: { filePaths }
|
|
4409
4471
|
});
|
|
4410
4472
|
worker.once("message", (payload) => {
|
|
@@ -4424,10 +4486,10 @@ async function scanWorkspaceParallel(rootDir, options = {}) {
|
|
|
4424
4486
|
const {
|
|
4425
4487
|
extensions = DEFAULT_EXTENSIONS,
|
|
4426
4488
|
ignoreDirs = DEFAULT_IGNORES,
|
|
4427
|
-
maxWorkers = Math.max(1,
|
|
4489
|
+
maxWorkers = Math.max(1, (0, import_node_os.availableParallelism)() - 1),
|
|
4428
4490
|
chunkSize = DEFAULT_CHUNK_SIZE
|
|
4429
4491
|
} = options;
|
|
4430
|
-
const files = collectFiles2(
|
|
4492
|
+
const files = collectFiles2(import_node_path7.default.resolve(rootDir), extensions, ignoreDirs);
|
|
4431
4493
|
if (files.length < PARALLEL_THRESHOLD) {
|
|
4432
4494
|
return mergeResults(batchExtractClassesNative2(files));
|
|
4433
4495
|
}
|
|
@@ -4443,33 +4505,43 @@ async function scanWorkspaceParallel(rootDir, options = {}) {
|
|
|
4443
4505
|
}
|
|
4444
4506
|
return mergeResults(allResults);
|
|
4445
4507
|
}
|
|
4446
|
-
var PARALLEL_THRESHOLD, DEFAULT_CHUNK_SIZE, _workerFilename;
|
|
4508
|
+
var import_node_worker_threads, import_node_path7, import_node_os, import_node_url3, import_meta9, PARALLEL_THRESHOLD, DEFAULT_CHUNK_SIZE, _workerFilename;
|
|
4447
4509
|
var init_parallel_scanner = __esm({
|
|
4448
4510
|
"packages/domain/scanner/src/parallel-scanner.ts"() {
|
|
4511
|
+
"use strict";
|
|
4512
|
+
import_node_worker_threads = require("worker_threads");
|
|
4513
|
+
import_node_path7 = __toESM(require("path"), 1);
|
|
4514
|
+
import_node_os = require("os");
|
|
4515
|
+
import_node_url3 = require("url");
|
|
4449
4516
|
init_src3();
|
|
4450
4517
|
init_native_bridge();
|
|
4518
|
+
import_meta9 = {};
|
|
4451
4519
|
PARALLEL_THRESHOLD = 50;
|
|
4452
4520
|
DEFAULT_CHUNK_SIZE = 150;
|
|
4453
|
-
if (!
|
|
4454
|
-
const { filePaths } =
|
|
4521
|
+
if (!import_node_worker_threads.isMainThread && import_node_worker_threads.parentPort) {
|
|
4522
|
+
const { filePaths } = import_node_worker_threads.workerData;
|
|
4455
4523
|
try {
|
|
4456
4524
|
const results = batchExtractClassesNative2(filePaths);
|
|
4457
4525
|
const msg = { ok: true, results };
|
|
4458
|
-
|
|
4526
|
+
import_node_worker_threads.parentPort.postMessage(msg);
|
|
4459
4527
|
} catch (error) {
|
|
4460
4528
|
const msg = {
|
|
4461
4529
|
ok: false,
|
|
4462
4530
|
error: error instanceof Error ? error.message : String(error)
|
|
4463
4531
|
};
|
|
4464
|
-
|
|
4532
|
+
import_node_worker_threads.parentPort.postMessage(msg);
|
|
4465
4533
|
}
|
|
4466
4534
|
}
|
|
4467
|
-
_workerFilename = typeof __filename !== "undefined" ? __filename :
|
|
4535
|
+
_workerFilename = typeof __filename !== "undefined" ? __filename : (0, import_node_url3.fileURLToPath)(import_meta9.url);
|
|
4468
4536
|
}
|
|
4469
4537
|
});
|
|
4470
|
-
|
|
4538
|
+
|
|
4539
|
+
// packages/domain/scanner/src/schemas.ts
|
|
4540
|
+
var import_zod3, formatIssuePath2, formatIssues, parseWithSchema, NonNegativeIntegerSchema, ScanWorkspaceOptionsSchema, ScanFileResultSchema, ScanWorkspaceResultSchema, ScannerWorkerRequestSchema, ScannerWorkerSuccessMessageSchema, ScannerWorkerErrorMessageSchema, ScannerWorkerMessageSchema, parseScanWorkspaceOptions, parseScanWorkspaceResult, parseScannerWorkerMessage;
|
|
4471
4541
|
var init_schemas = __esm({
|
|
4472
4542
|
"packages/domain/scanner/src/schemas.ts"() {
|
|
4543
|
+
"use strict";
|
|
4544
|
+
import_zod3 = require("zod");
|
|
4473
4545
|
init_src2();
|
|
4474
4546
|
formatIssuePath2 = (path16) => path16.length > 0 ? path16.map(
|
|
4475
4547
|
(segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
|
|
@@ -4489,40 +4561,40 @@ var init_schemas = __esm({
|
|
|
4489
4561
|
parsed.error
|
|
4490
4562
|
);
|
|
4491
4563
|
};
|
|
4492
|
-
NonNegativeIntegerSchema =
|
|
4493
|
-
ScanWorkspaceOptionsSchema =
|
|
4494
|
-
includeExtensions:
|
|
4495
|
-
ignoreDirectories:
|
|
4496
|
-
useCache:
|
|
4497
|
-
cacheDir:
|
|
4498
|
-
smartInvalidation:
|
|
4564
|
+
NonNegativeIntegerSchema = import_zod3.z.number().int().min(0);
|
|
4565
|
+
ScanWorkspaceOptionsSchema = import_zod3.z.object({
|
|
4566
|
+
includeExtensions: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
4567
|
+
ignoreDirectories: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
4568
|
+
useCache: import_zod3.z.boolean().optional(),
|
|
4569
|
+
cacheDir: import_zod3.z.string().min(1).optional(),
|
|
4570
|
+
smartInvalidation: import_zod3.z.boolean().optional()
|
|
4499
4571
|
});
|
|
4500
|
-
ScanFileResultSchema =
|
|
4501
|
-
file:
|
|
4502
|
-
classes:
|
|
4503
|
-
hash:
|
|
4572
|
+
ScanFileResultSchema = import_zod3.z.object({
|
|
4573
|
+
file: import_zod3.z.string(),
|
|
4574
|
+
classes: import_zod3.z.array(import_zod3.z.string()),
|
|
4575
|
+
hash: import_zod3.z.string().optional()
|
|
4504
4576
|
});
|
|
4505
|
-
ScanWorkspaceResultSchema =
|
|
4506
|
-
files:
|
|
4577
|
+
ScanWorkspaceResultSchema = import_zod3.z.object({
|
|
4578
|
+
files: import_zod3.z.array(ScanFileResultSchema),
|
|
4507
4579
|
totalFiles: NonNegativeIntegerSchema,
|
|
4508
|
-
uniqueClasses:
|
|
4580
|
+
uniqueClasses: import_zod3.z.array(import_zod3.z.string())
|
|
4509
4581
|
}).refine((value) => value.totalFiles === value.files.length, {
|
|
4510
4582
|
message: "scan result totalFiles must match files.length",
|
|
4511
4583
|
path: ["totalFiles"]
|
|
4512
4584
|
});
|
|
4513
|
-
|
|
4514
|
-
rootDir:
|
|
4585
|
+
ScannerWorkerRequestSchema = import_zod3.z.object({
|
|
4586
|
+
rootDir: import_zod3.z.string().min(1),
|
|
4515
4587
|
options: ScanWorkspaceOptionsSchema.optional()
|
|
4516
4588
|
});
|
|
4517
|
-
ScannerWorkerSuccessMessageSchema =
|
|
4518
|
-
ok:
|
|
4589
|
+
ScannerWorkerSuccessMessageSchema = import_zod3.z.object({
|
|
4590
|
+
ok: import_zod3.z.literal(true),
|
|
4519
4591
|
result: ScanWorkspaceResultSchema
|
|
4520
4592
|
});
|
|
4521
|
-
ScannerWorkerErrorMessageSchema =
|
|
4522
|
-
ok:
|
|
4523
|
-
error:
|
|
4593
|
+
ScannerWorkerErrorMessageSchema = import_zod3.z.object({
|
|
4594
|
+
ok: import_zod3.z.literal(false),
|
|
4595
|
+
error: import_zod3.z.string().optional()
|
|
4524
4596
|
});
|
|
4525
|
-
ScannerWorkerMessageSchema =
|
|
4597
|
+
ScannerWorkerMessageSchema = import_zod3.z.union([
|
|
4526
4598
|
ScannerWorkerSuccessMessageSchema,
|
|
4527
4599
|
ScannerWorkerErrorMessageSchema
|
|
4528
4600
|
]);
|
|
@@ -4552,8 +4624,8 @@ function getRuntimeDir() {
|
|
|
4552
4624
|
if (typeof __dirname !== "undefined" && __dirname.length > 0) {
|
|
4553
4625
|
return __dirname;
|
|
4554
4626
|
}
|
|
4555
|
-
if (typeof
|
|
4556
|
-
return
|
|
4627
|
+
if (typeof import_meta10 !== "undefined" && import_meta10.url) {
|
|
4628
|
+
return import_node_path8.default.dirname((0, import_node_url4.fileURLToPath)(import_meta10.url));
|
|
4557
4629
|
}
|
|
4558
4630
|
return process.cwd();
|
|
4559
4631
|
}
|
|
@@ -4562,18 +4634,18 @@ function resolveScannerWorkerModulePath() {
|
|
|
4562
4634
|
if (typeof __dirname !== "undefined" && __dirname.length > 0) {
|
|
4563
4635
|
return __dirname;
|
|
4564
4636
|
}
|
|
4565
|
-
if (typeof
|
|
4566
|
-
return
|
|
4637
|
+
if (typeof import_meta10 !== "undefined" && import_meta10.url) {
|
|
4638
|
+
return import_node_path8.default.dirname((0, import_node_url4.fileURLToPath)(import_meta10.url));
|
|
4567
4639
|
}
|
|
4568
4640
|
return process.cwd();
|
|
4569
4641
|
})();
|
|
4570
4642
|
const candidates = [
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4643
|
+
import_node_path8.default.resolve(runtimeDir, "worker.cjs"),
|
|
4644
|
+
import_node_path8.default.resolve(runtimeDir, "worker.js"),
|
|
4645
|
+
import_node_path8.default.resolve(runtimeDir, "worker.ts")
|
|
4574
4646
|
];
|
|
4575
4647
|
for (const candidate of candidates) {
|
|
4576
|
-
if (
|
|
4648
|
+
if (import_node_fs6.default.existsSync(candidate)) return candidate;
|
|
4577
4649
|
}
|
|
4578
4650
|
return null;
|
|
4579
4651
|
}
|
|
@@ -4585,7 +4657,7 @@ function scanWorkspaceInWorker(rootDir, options) {
|
|
|
4585
4657
|
}
|
|
4586
4658
|
return new Promise((resolve2, reject) => {
|
|
4587
4659
|
const settleState = { settled: false };
|
|
4588
|
-
const worker = new
|
|
4660
|
+
const worker = new import_node_worker_threads2.Worker(modulePath, { workerData: { rootDir, options: normalizedOptions } });
|
|
4589
4661
|
const timeout = setTimeout(() => {
|
|
4590
4662
|
if (!settleState.settled) {
|
|
4591
4663
|
settleState.settled = true;
|
|
@@ -4630,19 +4702,19 @@ function collectCandidates(rootDir, ignoreDirectories, extensionSet) {
|
|
|
4630
4702
|
if (!currentDir) continue;
|
|
4631
4703
|
const entries = (() => {
|
|
4632
4704
|
try {
|
|
4633
|
-
return
|
|
4705
|
+
return import_node_fs6.default.readdirSync(currentDir, { withFileTypes: true });
|
|
4634
4706
|
} catch {
|
|
4635
4707
|
return [];
|
|
4636
4708
|
}
|
|
4637
4709
|
})();
|
|
4638
4710
|
for (const entry of entries) {
|
|
4639
|
-
const fullPath =
|
|
4711
|
+
const fullPath = import_node_path8.default.join(currentDir, entry.name);
|
|
4640
4712
|
if (entry.isDirectory()) {
|
|
4641
4713
|
if (!ignoreDirectories.has(entry.name)) directories.push(fullPath);
|
|
4642
4714
|
continue;
|
|
4643
4715
|
}
|
|
4644
4716
|
if (!entry.isFile()) continue;
|
|
4645
|
-
if (!extensionSet.has(
|
|
4717
|
+
if (!extensionSet.has(import_node_path8.default.extname(entry.name))) continue;
|
|
4646
4718
|
candidates.push(fullPath);
|
|
4647
4719
|
}
|
|
4648
4720
|
}
|
|
@@ -4669,7 +4741,7 @@ function scanSource(source) {
|
|
|
4669
4741
|
);
|
|
4670
4742
|
}
|
|
4671
4743
|
function isScannableFile2(filePath, includeExtensions = DEFAULT_EXTENSIONS) {
|
|
4672
|
-
return includeExtensions.includes(
|
|
4744
|
+
return includeExtensions.includes(import_node_path8.default.extname(filePath));
|
|
4673
4745
|
}
|
|
4674
4746
|
function scanFile2(filePath) {
|
|
4675
4747
|
const { scanFileNative: scanFileNative3 } = (init_native_bridge(), __toCommonJS(native_bridge_exports));
|
|
@@ -4689,7 +4761,7 @@ function scanWorkspace2(rootDir, options = {}) {
|
|
|
4689
4761
|
const extensionSet = buildExtensionSet(includeExtensions);
|
|
4690
4762
|
const ignoreDirectories = new Set(normalizedOptions.ignoreDirectories ?? DEFAULT_IGNORES);
|
|
4691
4763
|
const useCache = normalizedOptions.useCache ?? true;
|
|
4692
|
-
normalizedOptions.smartInvalidation ?? true;
|
|
4764
|
+
const _smartInvalidation = normalizedOptions.smartInvalidation ?? true;
|
|
4693
4765
|
const files = [];
|
|
4694
4766
|
const unique = /* @__PURE__ */ new Set();
|
|
4695
4767
|
const candidates = collectCandidates(rootDir, ignoreDirectories, extensionSet);
|
|
@@ -4729,7 +4801,7 @@ function scanWorkspace2(rootDir, options = {}) {
|
|
|
4729
4801
|
for (const filePath of candidates) {
|
|
4730
4802
|
const stat = (() => {
|
|
4731
4803
|
try {
|
|
4732
|
-
return
|
|
4804
|
+
return import_node_fs6.default.statSync(filePath);
|
|
4733
4805
|
} catch {
|
|
4734
4806
|
return null;
|
|
4735
4807
|
}
|
|
@@ -4755,7 +4827,7 @@ function scanWorkspace2(rootDir, options = {}) {
|
|
|
4755
4827
|
for (const { filePath, stat, size, cached } of ranked) {
|
|
4756
4828
|
const content = (() => {
|
|
4757
4829
|
try {
|
|
4758
|
-
return
|
|
4830
|
+
return import_node_fs6.default.readFileSync(filePath, "utf8");
|
|
4759
4831
|
} catch {
|
|
4760
4832
|
return null;
|
|
4761
4833
|
}
|
|
@@ -4836,9 +4908,15 @@ async function scanWorkspaceAsync(rootDir, options = {}) {
|
|
|
4836
4908
|
return scanWorkspace2(rootDir, normalizedOptions);
|
|
4837
4909
|
}
|
|
4838
4910
|
}
|
|
4839
|
-
var log3, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader, DEFAULT_EXTENSIONS, DEFAULT_IGNORES;
|
|
4911
|
+
var import_node_fs6, import_node_module6, import_node_path8, import_node_url4, import_node_worker_threads2, import_meta10, log3, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader, DEFAULT_EXTENSIONS, DEFAULT_IGNORES;
|
|
4840
4912
|
var init_src3 = __esm({
|
|
4841
4913
|
"packages/domain/scanner/src/index.ts"() {
|
|
4914
|
+
"use strict";
|
|
4915
|
+
import_node_fs6 = __toESM(require("fs"), 1);
|
|
4916
|
+
import_node_module6 = require("module");
|
|
4917
|
+
import_node_path8 = __toESM(require("path"), 1);
|
|
4918
|
+
import_node_url4 = require("url");
|
|
4919
|
+
import_node_worker_threads2 = require("worker_threads");
|
|
4842
4920
|
init_src2();
|
|
4843
4921
|
init_cache_native();
|
|
4844
4922
|
init_native_bridge();
|
|
@@ -4846,6 +4924,7 @@ var init_src3 = __esm({
|
|
|
4846
4924
|
init_schemas();
|
|
4847
4925
|
init_schemas();
|
|
4848
4926
|
init_native_bridge();
|
|
4927
|
+
import_meta10 = {};
|
|
4849
4928
|
log3 = createLogger2("scanner");
|
|
4850
4929
|
SCAN_WORKER_TIMEOUT_MS = 12e4;
|
|
4851
4930
|
createNativeParserLoader = () => {
|
|
@@ -4859,7 +4938,7 @@ var init_src3 = __esm({
|
|
|
4859
4938
|
const loadNativeParserBinding = () => {
|
|
4860
4939
|
if (_state.binding !== void 0) return _state.binding;
|
|
4861
4940
|
const runtimeDir = getRuntimeDir();
|
|
4862
|
-
const req =
|
|
4941
|
+
const req = (0, import_node_module6.createRequire)(import_node_path8.default.join(runtimeDir, "noop.cjs"));
|
|
4863
4942
|
const _platform = process.platform;
|
|
4864
4943
|
const _arch = process.arch;
|
|
4865
4944
|
const _platformArch = `${_platform}-${_arch}`;
|
|
@@ -4867,27 +4946,27 @@ var init_src3 = __esm({
|
|
|
4867
4946
|
const candidates = [
|
|
4868
4947
|
// ── binaryName baru: tailwind-styled-native (napi-rs naming) ──
|
|
4869
4948
|
// cwd = repo root saat run dari root, atau package dir saat workspaces
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4949
|
+
import_node_path8.default.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
|
|
4950
|
+
import_node_path8.default.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArch}.node`),
|
|
4951
|
+
import_node_path8.default.resolve(process.cwd(), "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
4873
4952
|
// runtimeDir = dist/ → naik 1 level ke package root (npm install case)
|
|
4874
4953
|
// e.g. node_modules/tailwind-styled-v4/dist/ → node_modules/tailwind-styled-v4/native/
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4954
|
+
import_node_path8.default.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
|
|
4955
|
+
import_node_path8.default.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArch}.node`),
|
|
4956
|
+
import_node_path8.default.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
4878
4957
|
// runtimeDir = dist/ → naik 4 level ke repo root (monorepo dev case)
|
|
4879
|
-
|
|
4880
|
-
|
|
4958
|
+
import_node_path8.default.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
|
|
4959
|
+
import_node_path8.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
4881
4960
|
// 3 level fallback (jika package di-nest lebih dangkal)
|
|
4882
|
-
|
|
4883
|
-
|
|
4961
|
+
import_node_path8.default.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
|
|
4962
|
+
import_node_path8.default.resolve(runtimeDir, "..", "..", "..", "native", `tailwind-styled-native.${_platformArchGnu}.node`),
|
|
4884
4963
|
// ── binaryName lama: tailwind_styled_parser (backward compat) ──
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4964
|
+
import_node_path8.default.resolve(process.cwd(), "native/tailwind_styled_parser.node"),
|
|
4965
|
+
import_node_path8.default.resolve(process.cwd(), "native/build/Release/tailwind_styled_parser.node"),
|
|
4966
|
+
import_node_path8.default.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
|
|
4967
|
+
import_node_path8.default.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
|
|
4968
|
+
import_node_path8.default.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node"),
|
|
4969
|
+
import_node_path8.default.resolve(
|
|
4891
4970
|
runtimeDir,
|
|
4892
4971
|
"..",
|
|
4893
4972
|
"..",
|
|
@@ -4899,7 +4978,7 @@ var init_src3 = __esm({
|
|
|
4899
4978
|
)
|
|
4900
4979
|
];
|
|
4901
4980
|
for (const fullPath of candidates) {
|
|
4902
|
-
if (!
|
|
4981
|
+
if (!import_node_fs6.default.existsSync(fullPath)) continue;
|
|
4903
4982
|
try {
|
|
4904
4983
|
const required = req(fullPath);
|
|
4905
4984
|
if (required && (typeof required.extractClassesFromSource === "function" || typeof required.parseClasses === "function" || typeof required.parse_classes === "function")) {
|
|
@@ -4935,21 +5014,23 @@ var init_src3 = __esm({
|
|
|
4935
5014
|
// packages/domain/engine/src/native-bridge.ts
|
|
4936
5015
|
function getDirname3() {
|
|
4937
5016
|
if (typeof __dirname !== "undefined") return __dirname;
|
|
4938
|
-
if (typeof
|
|
4939
|
-
return getDirname(
|
|
5017
|
+
if (typeof import_meta12 !== "undefined" && import_meta12.url) {
|
|
5018
|
+
return getDirname(import_meta12.url);
|
|
4940
5019
|
}
|
|
4941
5020
|
return process.cwd();
|
|
4942
5021
|
}
|
|
4943
5022
|
function getNativeEngineBinding() {
|
|
4944
5023
|
return engineBindingLoader.get();
|
|
4945
5024
|
}
|
|
4946
|
-
var log4, isValidEngineBinding, createEngineBindingLoader, engineBindingLoader;
|
|
5025
|
+
var import_meta12, log4, isValidEngineBinding, createEngineBindingLoader, engineBindingLoader;
|
|
4947
5026
|
var init_native_bridge2 = __esm({
|
|
4948
5027
|
"packages/domain/engine/src/native-bridge.ts"() {
|
|
5028
|
+
"use strict";
|
|
4949
5029
|
init_src2();
|
|
5030
|
+
import_meta12 = {};
|
|
4950
5031
|
log4 = createDebugLogger("engine:native");
|
|
4951
|
-
isValidEngineBinding = (
|
|
4952
|
-
const candidate =
|
|
5032
|
+
isValidEngineBinding = (module2) => {
|
|
5033
|
+
const candidate = module2;
|
|
4953
5034
|
return !!(candidate && (candidate.computeIncrementalDiff || candidate.processFileChange || candidate.hashFileContent));
|
|
4954
5035
|
};
|
|
4955
5036
|
createEngineBindingLoader = () => {
|
|
@@ -5066,11 +5147,12 @@ function createResolutionReason(causes, finalDecision) {
|
|
|
5066
5147
|
finalDecision
|
|
5067
5148
|
};
|
|
5068
5149
|
}
|
|
5069
|
-
|
|
5150
|
+
var RuleId, SelectorId, VariantChainId, PropertyId, ValueId, LayerId, ConditionId, CascadeResolutionId, Origin, Importance, ConditionResult, CascadeStage;
|
|
5070
5151
|
var init_ir = __esm({
|
|
5071
5152
|
"packages/domain/engine/src/ir.ts"() {
|
|
5153
|
+
"use strict";
|
|
5072
5154
|
init_native_bridge2();
|
|
5073
|
-
|
|
5155
|
+
RuleId = class {
|
|
5074
5156
|
constructor(value) {
|
|
5075
5157
|
this.value = value;
|
|
5076
5158
|
}
|
|
@@ -5079,7 +5161,7 @@ var init_ir = __esm({
|
|
|
5079
5161
|
return `R${this.value}`;
|
|
5080
5162
|
}
|
|
5081
5163
|
};
|
|
5082
|
-
|
|
5164
|
+
SelectorId = class {
|
|
5083
5165
|
constructor(value) {
|
|
5084
5166
|
this.value = value;
|
|
5085
5167
|
}
|
|
@@ -5088,7 +5170,7 @@ var init_ir = __esm({
|
|
|
5088
5170
|
return `S${this.value}`;
|
|
5089
5171
|
}
|
|
5090
5172
|
};
|
|
5091
|
-
|
|
5173
|
+
VariantChainId = class {
|
|
5092
5174
|
constructor(value) {
|
|
5093
5175
|
this.value = value;
|
|
5094
5176
|
}
|
|
@@ -5097,7 +5179,7 @@ var init_ir = __esm({
|
|
|
5097
5179
|
return `V${this.value}`;
|
|
5098
5180
|
}
|
|
5099
5181
|
};
|
|
5100
|
-
|
|
5182
|
+
PropertyId = class {
|
|
5101
5183
|
constructor(value, name) {
|
|
5102
5184
|
this.value = value;
|
|
5103
5185
|
this.name = name;
|
|
@@ -5112,7 +5194,7 @@ var init_ir = __esm({
|
|
|
5112
5194
|
return propertyIdToString2(this);
|
|
5113
5195
|
}
|
|
5114
5196
|
};
|
|
5115
|
-
|
|
5197
|
+
ValueId = class {
|
|
5116
5198
|
constructor(value, name) {
|
|
5117
5199
|
this.value = value;
|
|
5118
5200
|
this.name = name;
|
|
@@ -5127,7 +5209,7 @@ var init_ir = __esm({
|
|
|
5127
5209
|
return valueIdToString2(this);
|
|
5128
5210
|
}
|
|
5129
5211
|
};
|
|
5130
|
-
|
|
5212
|
+
LayerId = class {
|
|
5131
5213
|
constructor(value) {
|
|
5132
5214
|
this.value = value;
|
|
5133
5215
|
}
|
|
@@ -5136,7 +5218,7 @@ var init_ir = __esm({
|
|
|
5136
5218
|
return `L${this.value}`;
|
|
5137
5219
|
}
|
|
5138
5220
|
};
|
|
5139
|
-
|
|
5221
|
+
ConditionId = class {
|
|
5140
5222
|
constructor(value) {
|
|
5141
5223
|
this.value = value;
|
|
5142
5224
|
}
|
|
@@ -5145,7 +5227,7 @@ var init_ir = __esm({
|
|
|
5145
5227
|
return `C${this.value}`;
|
|
5146
5228
|
}
|
|
5147
5229
|
};
|
|
5148
|
-
|
|
5230
|
+
CascadeResolutionId = class {
|
|
5149
5231
|
constructor(value) {
|
|
5150
5232
|
this.value = value;
|
|
5151
5233
|
}
|
|
@@ -5154,40 +5236,40 @@ var init_ir = __esm({
|
|
|
5154
5236
|
return `R${this.value}`;
|
|
5155
5237
|
}
|
|
5156
5238
|
};
|
|
5157
|
-
|
|
5239
|
+
Origin = /* @__PURE__ */ ((Origin2) => {
|
|
5158
5240
|
Origin2[Origin2["UserAgent"] = 0] = "UserAgent";
|
|
5159
5241
|
Origin2[Origin2["UserNormal"] = 1] = "UserNormal";
|
|
5160
5242
|
Origin2[Origin2["AuthorNormal"] = 2] = "AuthorNormal";
|
|
5161
5243
|
Origin2[Origin2["AuthorImportant"] = 3] = "AuthorImportant";
|
|
5162
5244
|
Origin2[Origin2["UserImportant"] = 4] = "UserImportant";
|
|
5163
5245
|
return Origin2;
|
|
5164
|
-
})(
|
|
5165
|
-
|
|
5246
|
+
})(Origin || {});
|
|
5247
|
+
Importance = /* @__PURE__ */ ((Importance2) => {
|
|
5166
5248
|
Importance2[Importance2["Normal"] = 0] = "Normal";
|
|
5167
5249
|
Importance2[Importance2["Important"] = 1] = "Important";
|
|
5168
5250
|
return Importance2;
|
|
5169
|
-
})(
|
|
5170
|
-
|
|
5251
|
+
})(Importance || {});
|
|
5252
|
+
ConditionResult = /* @__PURE__ */ ((ConditionResult2) => {
|
|
5171
5253
|
ConditionResult2[ConditionResult2["Active"] = 0] = "Active";
|
|
5172
5254
|
ConditionResult2[ConditionResult2["Inactive"] = 1] = "Inactive";
|
|
5173
5255
|
ConditionResult2[ConditionResult2["Unknown"] = 2] = "Unknown";
|
|
5174
5256
|
return ConditionResult2;
|
|
5175
|
-
})(
|
|
5176
|
-
|
|
5257
|
+
})(ConditionResult || {});
|
|
5258
|
+
CascadeStage = /* @__PURE__ */ ((CascadeStage2) => {
|
|
5177
5259
|
CascadeStage2[CascadeStage2["Origin"] = 0] = "Origin";
|
|
5178
5260
|
CascadeStage2[CascadeStage2["Layer"] = 1] = "Layer";
|
|
5179
5261
|
CascadeStage2[CascadeStage2["Importance"] = 2] = "Importance";
|
|
5180
5262
|
CascadeStage2[CascadeStage2["Specificity"] = 3] = "Specificity";
|
|
5181
5263
|
CascadeStage2[CascadeStage2["Order"] = 4] = "Order";
|
|
5182
5264
|
return CascadeStage2;
|
|
5183
|
-
})(
|
|
5265
|
+
})(CascadeStage || {});
|
|
5184
5266
|
}
|
|
5185
5267
|
});
|
|
5186
5268
|
|
|
5187
5269
|
// packages/domain/engine/src/resolver.ts
|
|
5188
5270
|
var resolver_exports = {};
|
|
5189
5271
|
__export(resolver_exports, {
|
|
5190
|
-
CascadeResolver: () =>
|
|
5272
|
+
CascadeResolver: () => CascadeResolver
|
|
5191
5273
|
});
|
|
5192
5274
|
function toNativeInput(rule) {
|
|
5193
5275
|
return {
|
|
@@ -5227,7 +5309,7 @@ function buildResolutionsMap(nativeResult, rules, styleGraph) {
|
|
|
5227
5309
|
const existing = styleGraph.ruleConflicts.get(winner) ?? [];
|
|
5228
5310
|
styleGraph.ruleConflicts.set(winner, [...existing, ...losers.filter((l) => !existing.some((e) => e.value === l.value))]);
|
|
5229
5311
|
resolvedProperties.set(propertyId, {
|
|
5230
|
-
id: new
|
|
5312
|
+
id: new CascadeResolutionId(res.id),
|
|
5231
5313
|
property: propertyId,
|
|
5232
5314
|
winner,
|
|
5233
5315
|
losers,
|
|
@@ -5237,12 +5319,13 @@ function buildResolutionsMap(nativeResult, rules, styleGraph) {
|
|
|
5237
5319
|
}
|
|
5238
5320
|
return resolvedProperties;
|
|
5239
5321
|
}
|
|
5240
|
-
|
|
5322
|
+
var CascadeResolver;
|
|
5241
5323
|
var init_resolver = __esm({
|
|
5242
5324
|
"packages/domain/engine/src/resolver.ts"() {
|
|
5325
|
+
"use strict";
|
|
5243
5326
|
init_ir();
|
|
5244
5327
|
init_native_bridge2();
|
|
5245
|
-
|
|
5328
|
+
CascadeResolver = class {
|
|
5246
5329
|
rules = /* @__PURE__ */ new Map();
|
|
5247
5330
|
classRules = /* @__PURE__ */ new Map();
|
|
5248
5331
|
styleGraph = { ruleConflicts: /* @__PURE__ */ new Map() };
|
|
@@ -5328,20 +5411,20 @@ function createIdGenerator() {
|
|
|
5328
5411
|
insertionOrderCounter: 0
|
|
5329
5412
|
};
|
|
5330
5413
|
return {
|
|
5331
|
-
generateRuleId: () => new
|
|
5332
|
-
generateSelectorId: () => new
|
|
5414
|
+
generateRuleId: () => new RuleId(state.ruleIdCounter++),
|
|
5415
|
+
generateSelectorId: () => new SelectorId(state.selectorIdCounter++),
|
|
5333
5416
|
generatePropertyId: (name) => {
|
|
5334
|
-
const id = new
|
|
5417
|
+
const id = new PropertyId(state.propertyIdCounter++);
|
|
5335
5418
|
registerPropertyName2(id, name);
|
|
5336
5419
|
return id;
|
|
5337
5420
|
},
|
|
5338
5421
|
generateValueId: (name) => {
|
|
5339
|
-
const id = new
|
|
5422
|
+
const id = new ValueId(state.valueIdCounter++);
|
|
5340
5423
|
registerValueName2(id, name);
|
|
5341
5424
|
return id;
|
|
5342
5425
|
},
|
|
5343
|
-
generateLayerId: () => new
|
|
5344
|
-
generateConditionId: () => new
|
|
5426
|
+
generateLayerId: () => new LayerId(state.layerIdCounter++),
|
|
5427
|
+
generateConditionId: () => new ConditionId(state.conditionIdCounter++),
|
|
5345
5428
|
getNextInsertionOrder: () => state.insertionOrderCounter++,
|
|
5346
5429
|
reset: () => {
|
|
5347
5430
|
state.ruleIdCounter = 0;
|
|
@@ -5379,13 +5462,13 @@ function _parseCssToIrFast(assembled) {
|
|
|
5379
5462
|
layerMap.clear();
|
|
5380
5463
|
layerOrderMap.clear();
|
|
5381
5464
|
for (const le of assembled.layers) {
|
|
5382
|
-
const lid = new
|
|
5465
|
+
const lid = new LayerId(le.layerId);
|
|
5383
5466
|
layerMap.set(le.name, lid);
|
|
5384
5467
|
layerOrderMap.set(le.name, le.order);
|
|
5385
5468
|
}
|
|
5386
5469
|
const rules = assembled.rules.map((r) => {
|
|
5387
|
-
const propertyId = new
|
|
5388
|
-
const valueId = new
|
|
5470
|
+
const propertyId = new PropertyId(r.propertyId);
|
|
5471
|
+
const valueId = new ValueId(r.valueId);
|
|
5389
5472
|
if (native?.registerPropertyName) {
|
|
5390
5473
|
native.registerPropertyName(r.propertyId, r.propertyName);
|
|
5391
5474
|
} else {
|
|
@@ -5397,17 +5480,17 @@ function _parseCssToIrFast(assembled) {
|
|
|
5397
5480
|
registerValueName2(valueId, r.valueName);
|
|
5398
5481
|
}
|
|
5399
5482
|
return {
|
|
5400
|
-
id: new
|
|
5401
|
-
selector: new
|
|
5402
|
-
variantChain: new
|
|
5483
|
+
id: new RuleId(r.ruleId),
|
|
5484
|
+
selector: new SelectorId(r.selectorId),
|
|
5485
|
+
variantChain: new VariantChainId(0),
|
|
5403
5486
|
property: propertyId,
|
|
5404
5487
|
value: valueId,
|
|
5405
5488
|
origin: r.origin,
|
|
5406
5489
|
importance: r.importance,
|
|
5407
|
-
layer: r.layerId >= 0 ? new
|
|
5490
|
+
layer: r.layerId >= 0 ? new LayerId(r.layerId) : null,
|
|
5408
5491
|
layerOrder: r.layerOrder,
|
|
5409
5492
|
specificity: r.specificity,
|
|
5410
|
-
condition: r.conditionId >= 0 ? new
|
|
5493
|
+
condition: r.conditionId >= 0 ? new ConditionId(r.conditionId) : null,
|
|
5411
5494
|
conditionResult: r.conditionResult,
|
|
5412
5495
|
insertionOrder: r.insertionOrder,
|
|
5413
5496
|
fingerprint: r.fingerprint,
|
|
@@ -5417,7 +5500,7 @@ function _parseCssToIrFast(assembled) {
|
|
|
5417
5500
|
const classToRuleIds = new Map(
|
|
5418
5501
|
assembled.classToRuleIds.map((m) => [
|
|
5419
5502
|
m.className,
|
|
5420
|
-
m.ruleIds.map((id) => new
|
|
5503
|
+
m.ruleIds.map((id) => new RuleId(id))
|
|
5421
5504
|
])
|
|
5422
5505
|
);
|
|
5423
5506
|
return { rules, classToRuleIds };
|
|
@@ -5434,7 +5517,7 @@ function _parseCssToIrFallback(css, prefix, native) {
|
|
|
5434
5517
|
const parsed = native.parseCssRules(css);
|
|
5435
5518
|
for (const r of parsed) {
|
|
5436
5519
|
const className = prefix + r.className;
|
|
5437
|
-
r.variants.length > 0;
|
|
5520
|
+
const hasVariants = r.variants.length > 0;
|
|
5438
5521
|
const layerName = detectLayerFromClassName(className);
|
|
5439
5522
|
const layer = layerName ? getOrCreateLayerId(layerName) : null;
|
|
5440
5523
|
const layerOrder = layerName ? layerOrderMap.get(layerName) ?? 4 : 4;
|
|
@@ -5449,7 +5532,7 @@ function _parseCssToIrFallback(css, prefix, native) {
|
|
|
5449
5532
|
const rule = {
|
|
5450
5533
|
id: ruleId,
|
|
5451
5534
|
selector: selectorId,
|
|
5452
|
-
variantChain: new
|
|
5535
|
+
variantChain: new VariantChainId(0),
|
|
5453
5536
|
property: propertyId,
|
|
5454
5537
|
value: valueId,
|
|
5455
5538
|
origin: 2 /* AuthorNormal */,
|
|
@@ -5473,6 +5556,7 @@ function _parseCssToIrFallback(css, prefix, native) {
|
|
|
5473
5556
|
var _defaultIdGen, generateRuleId, generateSelectorId, generatePropertyId, generateValueId, generateLayerId, generateConditionId, getNextInsertionOrder, resetIdGenerator, layerMap, layerOrderMap, LAYER_ORDER;
|
|
5474
5557
|
var init_cssToIr = __esm({
|
|
5475
5558
|
"packages/domain/engine/src/cssToIr.ts"() {
|
|
5559
|
+
"use strict";
|
|
5476
5560
|
init_native_bridge2();
|
|
5477
5561
|
init_ir();
|
|
5478
5562
|
_defaultIdGen = createIdGenerator();
|
|
@@ -5578,7 +5662,7 @@ function trace(className, resolver) {
|
|
|
5578
5662
|
property,
|
|
5579
5663
|
winner: winnerRule?.value.toString() ?? "",
|
|
5580
5664
|
loser: loserRule.value.toString(),
|
|
5581
|
-
stage:
|
|
5665
|
+
stage: CascadeStage[resolution.stage],
|
|
5582
5666
|
causes: resolution.reason.causes.map(formatCause)
|
|
5583
5667
|
});
|
|
5584
5668
|
}
|
|
@@ -5605,17 +5689,77 @@ function trace(className, resolver) {
|
|
|
5605
5689
|
}
|
|
5606
5690
|
var init_trace2 = __esm({
|
|
5607
5691
|
"packages/domain/engine/src/trace.ts"() {
|
|
5692
|
+
"use strict";
|
|
5608
5693
|
init_ir();
|
|
5609
5694
|
}
|
|
5610
5695
|
});
|
|
5611
5696
|
|
|
5697
|
+
// src/umbrella/engine.ts
|
|
5698
|
+
var engine_exports = {};
|
|
5699
|
+
__export(engine_exports, {
|
|
5700
|
+
BuildResultSchema: () => BuildResultSchema,
|
|
5701
|
+
BundleAnalyzer: () => BundleAnalyzer,
|
|
5702
|
+
CascadeResolutionId: () => CascadeResolutionId,
|
|
5703
|
+
CascadeResolver: () => CascadeResolver,
|
|
5704
|
+
CascadeStage: () => CascadeStage,
|
|
5705
|
+
ConditionId: () => ConditionId,
|
|
5706
|
+
ConditionResult: () => ConditionResult,
|
|
5707
|
+
EngineMetricsCollector: () => EngineMetricsCollector,
|
|
5708
|
+
EngineOptionsSchema: () => EngineOptionsSchema,
|
|
5709
|
+
EngineWatchOptionsSchema: () => EngineWatchOptionsSchema,
|
|
5710
|
+
ImpactTracker: () => ImpactTracker,
|
|
5711
|
+
Importance: () => Importance,
|
|
5712
|
+
LayerId: () => LayerId,
|
|
5713
|
+
Origin: () => Origin,
|
|
5714
|
+
PropertyId: () => PropertyId,
|
|
5715
|
+
ReverseLookup: () => ReverseLookup,
|
|
5716
|
+
RuleId: () => RuleId,
|
|
5717
|
+
SelectorId: () => SelectorId,
|
|
5718
|
+
ValueId: () => ValueId,
|
|
5719
|
+
VariantChainId: () => VariantChainId,
|
|
5720
|
+
analyzeWorkspace: () => analyzeWorkspace2,
|
|
5721
|
+
applyIncrementalChange: () => applyIncrementalChange,
|
|
5722
|
+
build: () => build,
|
|
5723
|
+
buildProvenanceChain: () => buildProvenanceChain,
|
|
5724
|
+
createEngine: () => createEngine,
|
|
5725
|
+
createFingerprint: () => createFingerprint2,
|
|
5726
|
+
createResolutionReason: () => createResolutionReason,
|
|
5727
|
+
generateSafelist: () => generateSafelist2,
|
|
5728
|
+
inspectClass: () => inspectClass,
|
|
5729
|
+
parseCssToIr: () => parseCssToIr,
|
|
5730
|
+
parseEngineOptions: () => parseEngineOptions,
|
|
5731
|
+
parseEngineWatchOptions: () => parseEngineWatchOptions,
|
|
5732
|
+
runAfterBuild: () => runAfterBuild,
|
|
5733
|
+
runAfterScan: () => runAfterScan,
|
|
5734
|
+
runAfterWatch: () => runAfterWatch,
|
|
5735
|
+
runBeforeBuild: () => runBeforeBuild,
|
|
5736
|
+
runBeforeScan: () => runBeforeScan,
|
|
5737
|
+
runBeforeWatch: () => runBeforeWatch,
|
|
5738
|
+
runOnError: () => runOnError,
|
|
5739
|
+
runTransformClasses: () => runTransformClasses,
|
|
5740
|
+
scanWorkspace: () => scanWorkspace3,
|
|
5741
|
+
trace: () => trace,
|
|
5742
|
+
traceClass: () => traceClass,
|
|
5743
|
+
traceClasses: () => traceClasses,
|
|
5744
|
+
watchWorkspaceLegacy: () => watchWorkspace,
|
|
5745
|
+
watchWorkspaceNative: () => watchWorkspace2
|
|
5746
|
+
});
|
|
5747
|
+
module.exports = __toCommonJS(engine_exports);
|
|
5748
|
+
|
|
5749
|
+
// packages/domain/engine/src/index.ts
|
|
5750
|
+
var import_node_fs11 = __toESM(require("fs"), 1);
|
|
5751
|
+
var import_node_path14 = __toESM(require("path"), 1);
|
|
5752
|
+
var import_node_url6 = require("url");
|
|
5753
|
+
|
|
5612
5754
|
// packages/domain/analyzer/src/analyzeWorkspace.ts
|
|
5755
|
+
var import_node_path10 = __toESM(require("path"), 1);
|
|
5613
5756
|
init_src3();
|
|
5614
5757
|
|
|
5615
5758
|
// packages/domain/analyzer/src/binding.ts
|
|
5616
5759
|
init_src2();
|
|
5617
5760
|
|
|
5618
5761
|
// packages/domain/analyzer/src/utils.ts
|
|
5762
|
+
var import_node_fs7 = __toESM(require("fs"), 1);
|
|
5619
5763
|
init_src2();
|
|
5620
5764
|
var DEFAULT_TOP_LIMIT = 10;
|
|
5621
5765
|
var DEFAULT_FREQUENT_THRESHOLD = 2;
|
|
@@ -5630,7 +5774,7 @@ function isRecord(value) {
|
|
|
5630
5774
|
}
|
|
5631
5775
|
async function pathExists(filePath) {
|
|
5632
5776
|
try {
|
|
5633
|
-
await
|
|
5777
|
+
await import_node_fs7.default.promises.access(filePath, import_node_fs7.default.constants.F_OK);
|
|
5634
5778
|
return true;
|
|
5635
5779
|
} catch {
|
|
5636
5780
|
return false;
|
|
@@ -5647,8 +5791,9 @@ function sanitizeFrequentThreshold(value) {
|
|
|
5647
5791
|
}
|
|
5648
5792
|
|
|
5649
5793
|
// packages/domain/analyzer/src/binding.ts
|
|
5650
|
-
var
|
|
5651
|
-
|
|
5794
|
+
var import_meta11 = {};
|
|
5795
|
+
var isAnalyzerModule = (module2) => {
|
|
5796
|
+
const candidate = module2;
|
|
5652
5797
|
return typeof candidate?.analyzeClasses === "function" || typeof candidate?.analyzeClassesWorkspace === "function";
|
|
5653
5798
|
};
|
|
5654
5799
|
var createAnalyzerBindingLoader = () => {
|
|
@@ -5658,7 +5803,7 @@ var createAnalyzerBindingLoader = () => {
|
|
|
5658
5803
|
_state.bindingPromise = (async () => {
|
|
5659
5804
|
const runtimeDir = resolveRuntimeDir(
|
|
5660
5805
|
typeof __dirname === "string" ? __dirname : void 0,
|
|
5661
|
-
|
|
5806
|
+
import_meta11.url
|
|
5662
5807
|
);
|
|
5663
5808
|
const candidates = resolveNativeBindingCandidates({
|
|
5664
5809
|
runtimeDir,
|
|
@@ -5701,7 +5846,7 @@ async function requireNativeBinding() {
|
|
|
5701
5846
|
if (binding?.analyzeClasses) return binding;
|
|
5702
5847
|
const runtimeDir = resolveRuntimeDir(
|
|
5703
5848
|
typeof __dirname === "string" ? __dirname : void 0,
|
|
5704
|
-
|
|
5849
|
+
import_meta11.url
|
|
5705
5850
|
);
|
|
5706
5851
|
const candidates = resolveNativeBindingCandidates({
|
|
5707
5852
|
runtimeDir,
|
|
@@ -5729,6 +5874,7 @@ async function requireNativeBinding() {
|
|
|
5729
5874
|
|
|
5730
5875
|
// packages/domain/analyzer/src/schemas.ts
|
|
5731
5876
|
init_src2();
|
|
5877
|
+
var import_zod4 = require("zod");
|
|
5732
5878
|
var formatIssuePath3 = (path16) => path16.length > 0 ? path16.map(
|
|
5733
5879
|
(segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
|
|
5734
5880
|
).join(".") : "<root>";
|
|
@@ -5752,81 +5898,86 @@ var parseWithSchema2 = (schema, data, label) => {
|
|
|
5752
5898
|
parsed.error
|
|
5753
5899
|
);
|
|
5754
5900
|
};
|
|
5755
|
-
var CountSchema =
|
|
5756
|
-
|
|
5757
|
-
name:
|
|
5901
|
+
var CountSchema = import_zod4.z.number().int().min(0);
|
|
5902
|
+
var ClassUsageSchema = import_zod4.z.object({
|
|
5903
|
+
name: import_zod4.z.string(),
|
|
5758
5904
|
count: CountSchema,
|
|
5759
|
-
isUnused:
|
|
5760
|
-
isConflict:
|
|
5905
|
+
isUnused: import_zod4.z.boolean().optional(),
|
|
5906
|
+
isConflict: import_zod4.z.boolean().optional()
|
|
5761
5907
|
});
|
|
5762
|
-
|
|
5763
|
-
className:
|
|
5764
|
-
variants:
|
|
5765
|
-
classes:
|
|
5766
|
-
message:
|
|
5908
|
+
var ClassConflictSchema = import_zod4.z.object({
|
|
5909
|
+
className: import_zod4.z.string(),
|
|
5910
|
+
variants: import_zod4.z.array(import_zod4.z.string()),
|
|
5911
|
+
classes: import_zod4.z.array(import_zod4.z.string()),
|
|
5912
|
+
message: import_zod4.z.string()
|
|
5767
5913
|
});
|
|
5768
|
-
var ClassCountSchema =
|
|
5769
|
-
name:
|
|
5914
|
+
var ClassCountSchema = import_zod4.z.object({
|
|
5915
|
+
name: import_zod4.z.string(),
|
|
5770
5916
|
count: CountSchema
|
|
5771
5917
|
});
|
|
5772
|
-
var NativeReportSchema =
|
|
5773
|
-
root:
|
|
5918
|
+
var NativeReportSchema = import_zod4.z.object({
|
|
5919
|
+
root: import_zod4.z.string(),
|
|
5774
5920
|
totalFiles: CountSchema,
|
|
5775
5921
|
uniqueClassCount: CountSchema,
|
|
5776
5922
|
totalClassOccurrences: CountSchema,
|
|
5777
|
-
topClasses:
|
|
5778
|
-
duplicateCandidates:
|
|
5779
|
-
safelist:
|
|
5923
|
+
topClasses: import_zod4.z.array(ClassCountSchema),
|
|
5924
|
+
duplicateCandidates: import_zod4.z.array(ClassCountSchema),
|
|
5925
|
+
safelist: import_zod4.z.array(import_zod4.z.string())
|
|
5780
5926
|
});
|
|
5781
|
-
|
|
5782
|
-
css:
|
|
5783
|
-
resolvedClasses:
|
|
5784
|
-
unknownClasses:
|
|
5927
|
+
var NativeCssCompileResultSchema2 = import_zod4.z.object({
|
|
5928
|
+
css: import_zod4.z.string(),
|
|
5929
|
+
resolvedClasses: import_zod4.z.array(import_zod4.z.string()),
|
|
5930
|
+
unknownClasses: import_zod4.z.array(import_zod4.z.string()),
|
|
5785
5931
|
sizeBytes: CountSchema
|
|
5786
5932
|
});
|
|
5787
|
-
var AnalyzerClassStatsSchema =
|
|
5788
|
-
top:
|
|
5933
|
+
var AnalyzerClassStatsSchema = import_zod4.z.object({
|
|
5934
|
+
top: import_zod4.z.number({
|
|
5789
5935
|
error: "analyzeWorkspace options.classStats.top must be a number when provided."
|
|
5790
5936
|
}).finite().optional(),
|
|
5791
|
-
frequentThreshold:
|
|
5937
|
+
frequentThreshold: import_zod4.z.number({
|
|
5792
5938
|
error: "analyzeWorkspace options.classStats.frequentThreshold must be a number when provided."
|
|
5793
5939
|
}).finite().optional()
|
|
5794
5940
|
});
|
|
5795
|
-
var AnalyzerSemanticOptionsSchema =
|
|
5796
|
-
tailwindConfigPath:
|
|
5941
|
+
var AnalyzerSemanticOptionsSchema = import_zod4.z.object({
|
|
5942
|
+
tailwindConfigPath: import_zod4.z.string({
|
|
5797
5943
|
error: "analyzeWorkspace options.semantic.tailwindConfigPath must be a non-empty string when provided."
|
|
5798
5944
|
}).min(
|
|
5799
5945
|
1,
|
|
5800
5946
|
"analyzeWorkspace options.semantic.tailwindConfigPath must be a non-empty string when provided."
|
|
5801
5947
|
).optional()
|
|
5802
5948
|
});
|
|
5803
|
-
var AnalyzerOptionsSchema =
|
|
5804
|
-
scanner:
|
|
5949
|
+
var AnalyzerOptionsSchema = import_zod4.z.object({
|
|
5950
|
+
scanner: import_zod4.z.custom(
|
|
5805
5951
|
(value) => isPlainObject(value),
|
|
5806
5952
|
"analyzeWorkspace options.scanner must be an object when provided."
|
|
5807
5953
|
).optional(),
|
|
5808
5954
|
classStats: AnalyzerClassStatsSchema.optional(),
|
|
5809
|
-
semantic:
|
|
5810
|
-
|
|
5955
|
+
semantic: import_zod4.z.union([
|
|
5956
|
+
import_zod4.z.boolean({
|
|
5811
5957
|
error: "analyzeWorkspace options.semantic must be a boolean or an object when provided."
|
|
5812
5958
|
}),
|
|
5813
5959
|
AnalyzerSemanticOptionsSchema
|
|
5814
5960
|
]).optional(),
|
|
5815
|
-
includeClass:
|
|
5961
|
+
includeClass: import_zod4.z.custom(
|
|
5816
5962
|
(value) => typeof value === "function",
|
|
5817
5963
|
"analyzeWorkspace options.includeClass must be a function when provided."
|
|
5818
5964
|
).optional()
|
|
5819
5965
|
});
|
|
5820
|
-
|
|
5821
|
-
prefix:
|
|
5966
|
+
var ClassToCssOptionsSchema = import_zod4.z.object({
|
|
5967
|
+
prefix: import_zod4.z.union([import_zod4.z.string(), import_zod4.z.null()], {
|
|
5822
5968
|
error: "classToCss options.prefix must be a string or null when provided."
|
|
5823
5969
|
}).optional(),
|
|
5824
|
-
strict:
|
|
5970
|
+
strict: import_zod4.z.boolean({
|
|
5825
5971
|
error: "classToCss options.strict must be a boolean when provided."
|
|
5826
5972
|
}).optional()
|
|
5827
5973
|
});
|
|
5828
5974
|
var parseAnalyzerOptions = (options) => parseWithSchema2(AnalyzerOptionsSchema, options ?? {}, "analyzeWorkspace options are invalid");
|
|
5829
5975
|
var parseNativeReport = (report) => parseWithSchema2(NativeReportSchema, report, "Native analyzer report is invalid");
|
|
5976
|
+
|
|
5977
|
+
// packages/domain/analyzer/src/semantic.ts
|
|
5978
|
+
var import_node_fs8 = __toESM(require("fs"), 1);
|
|
5979
|
+
var import_node_path9 = __toESM(require("path"), 1);
|
|
5980
|
+
var import_node_url5 = require("url");
|
|
5830
5981
|
var SUPPORTED_TAILWIND_CONFIG_EXTENSIONS = /* @__PURE__ */ new Set([".ts", ".js", ".cjs", ".mjs"]);
|
|
5831
5982
|
var tailwindConfigCache = /* @__PURE__ */ new Map();
|
|
5832
5983
|
var detectConflicts2 = async (usages) => {
|
|
@@ -5846,11 +5997,11 @@ var detectConflicts2 = async (usages) => {
|
|
|
5846
5997
|
};
|
|
5847
5998
|
};
|
|
5848
5999
|
var isSupportedTailwindConfigPath = (configPath) => {
|
|
5849
|
-
return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(
|
|
6000
|
+
return SUPPORTED_TAILWIND_CONFIG_EXTENSIONS.has(import_node_path9.default.extname(configPath).toLowerCase());
|
|
5850
6001
|
};
|
|
5851
6002
|
var resolveTailwindConfigPath = async (root, explicitPath) => {
|
|
5852
6003
|
if (explicitPath) {
|
|
5853
|
-
const resolved =
|
|
6004
|
+
const resolved = import_node_path9.default.resolve(root, explicitPath);
|
|
5854
6005
|
if (!await pathExists(resolved)) return null;
|
|
5855
6006
|
return resolved;
|
|
5856
6007
|
}
|
|
@@ -5861,7 +6012,7 @@ var resolveTailwindConfigPath = async (root, explicitPath) => {
|
|
|
5861
6012
|
"tailwind.config.mjs"
|
|
5862
6013
|
];
|
|
5863
6014
|
for (const candidate of candidates) {
|
|
5864
|
-
const fullPath =
|
|
6015
|
+
const fullPath = import_node_path9.default.resolve(root, candidate);
|
|
5865
6016
|
if (await pathExists(fullPath)) return fullPath;
|
|
5866
6017
|
}
|
|
5867
6018
|
return null;
|
|
@@ -5915,7 +6066,7 @@ var collectCustomUtilities = (config) => {
|
|
|
5915
6066
|
return out;
|
|
5916
6067
|
};
|
|
5917
6068
|
var collectSafelistFromSource = async (configPath) => {
|
|
5918
|
-
const source = await
|
|
6069
|
+
const source = await import_node_fs8.default.promises.readFile(configPath, "utf8");
|
|
5919
6070
|
const { extractClassesNative: extractClassesNative2 } = await Promise.resolve().then(() => (init_src3(), src_exports2));
|
|
5920
6071
|
const allTokens = extractClassesNative2(source);
|
|
5921
6072
|
const hasSafelist = source.includes("safelist");
|
|
@@ -5942,7 +6093,7 @@ var loadTailwindConfig2 = async (root, semanticOption) => {
|
|
|
5942
6093
|
customUtilities: /* @__PURE__ */ new Set()
|
|
5943
6094
|
};
|
|
5944
6095
|
}
|
|
5945
|
-
const configStat = await
|
|
6096
|
+
const configStat = await import_node_fs8.default.promises.stat(configPath).catch(() => null);
|
|
5946
6097
|
if (configStat) {
|
|
5947
6098
|
const cached = tailwindConfigCache.get(configPath);
|
|
5948
6099
|
if (cached && cached.mtimeMs === configStat.mtimeMs && cached.size === configStat.size) {
|
|
@@ -5955,7 +6106,7 @@ var loadTailwindConfig2 = async (root, semanticOption) => {
|
|
|
5955
6106
|
const result = await (async () => {
|
|
5956
6107
|
try {
|
|
5957
6108
|
const cacheBustToken = Math.trunc(configStat?.mtimeMs ?? Date.now());
|
|
5958
|
-
const imported = await import(`${
|
|
6109
|
+
const imported = await import(`${(0, import_node_url5.pathToFileURL)(configPath).href}?tws_mtime=${cacheBustToken}`);
|
|
5959
6110
|
const candidate = imported.default ?? imported;
|
|
5960
6111
|
if (isRecord(candidate)) {
|
|
5961
6112
|
return { config: candidate, warning: void 0 };
|
|
@@ -6101,7 +6252,7 @@ async function buildDistribution(usages, native) {
|
|
|
6101
6252
|
}
|
|
6102
6253
|
async function analyzeWorkspace(root, options = {}) {
|
|
6103
6254
|
const startedAtMs = Date.now();
|
|
6104
|
-
const resolvedRoot =
|
|
6255
|
+
const resolvedRoot = import_node_path10.default.resolve(root);
|
|
6105
6256
|
const normalizedOptions = parseAnalyzerOptions(options);
|
|
6106
6257
|
const scan = await (async () => {
|
|
6107
6258
|
const scanStartedAtMs = Date.now();
|
|
@@ -6210,6 +6361,8 @@ init_src3();
|
|
|
6210
6361
|
init_src2();
|
|
6211
6362
|
|
|
6212
6363
|
// packages/domain/engine/src/incremental.ts
|
|
6364
|
+
var import_node_fs9 = __toESM(require("fs"), 1);
|
|
6365
|
+
var import_node_path11 = __toESM(require("path"), 1);
|
|
6213
6366
|
init_src3();
|
|
6214
6367
|
init_src2();
|
|
6215
6368
|
init_native_bridge2();
|
|
@@ -6245,8 +6398,8 @@ function areClassSetsEqual(a, b) {
|
|
|
6245
6398
|
function applyIncrementalChange(previous, filePath, type, scanner) {
|
|
6246
6399
|
const includeExtensions = scanner?.includeExtensions ?? DEFAULT_EXTENSIONS2;
|
|
6247
6400
|
if (!isScannableFile2(filePath, includeExtensions)) return previous;
|
|
6248
|
-
const byFile = new Map(previous.files.map((f) => [
|
|
6249
|
-
const normalizedPath =
|
|
6401
|
+
const byFile = new Map(previous.files.map((f) => [import_node_path11.default.resolve(f.file), f]));
|
|
6402
|
+
const normalizedPath = import_node_path11.default.resolve(filePath);
|
|
6250
6403
|
const native = getNativeEngineBinding();
|
|
6251
6404
|
if (!native?.processFileChange) {
|
|
6252
6405
|
throw new Error(
|
|
@@ -6262,7 +6415,7 @@ function applyIncrementalChange(previous, filePath, type, scanner) {
|
|
|
6262
6415
|
}
|
|
6263
6416
|
log5.debug(`native change ${normalizedPath}`);
|
|
6264
6417
|
const scanned = scanFile2(normalizedPath);
|
|
6265
|
-
const content =
|
|
6418
|
+
const content = import_node_fs9.default.readFileSync(normalizedPath, "utf8");
|
|
6266
6419
|
const diff = native.processFileChange(normalizedPath, scanned.classes, content);
|
|
6267
6420
|
const existing = byFile.get(normalizedPath);
|
|
6268
6421
|
if (diff && existing) {
|
|
@@ -6607,13 +6760,17 @@ var EngineMetricsCollector = class {
|
|
|
6607
6760
|
};
|
|
6608
6761
|
|
|
6609
6762
|
// packages/domain/engine/src/metricsWriter.ts
|
|
6763
|
+
var import_node_fs10 = __toESM(require("fs"), 1);
|
|
6764
|
+
var import_node_path12 = __toESM(require("path"), 1);
|
|
6765
|
+
var import_node_perf_hooks = require("perf_hooks");
|
|
6610
6766
|
init_src2();
|
|
6767
|
+
var _log = createLogger2("tw:metrics");
|
|
6611
6768
|
var METRICS_FILE_NAME = "metrics.json";
|
|
6612
6769
|
var CACHE_DIR = ".tw-cache";
|
|
6613
6770
|
function writeMetrics(metrics, cwd = process.cwd()) {
|
|
6614
6771
|
try {
|
|
6615
|
-
const cacheDir =
|
|
6616
|
-
|
|
6772
|
+
const cacheDir = import_node_path12.default.join(cwd, CACHE_DIR);
|
|
6773
|
+
import_node_fs10.default.mkdirSync(cacheDir, { recursive: true });
|
|
6617
6774
|
const mem = process.memoryUsage();
|
|
6618
6775
|
const data = {
|
|
6619
6776
|
...metrics,
|
|
@@ -6624,7 +6781,7 @@ function writeMetrics(metrics, cwd = process.cwd()) {
|
|
|
6624
6781
|
},
|
|
6625
6782
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
6626
6783
|
};
|
|
6627
|
-
|
|
6784
|
+
import_node_fs10.default.writeFileSync(import_node_path12.default.join(cacheDir, METRICS_FILE_NAME), JSON.stringify(data, null, 2));
|
|
6628
6785
|
} catch {
|
|
6629
6786
|
}
|
|
6630
6787
|
}
|
|
@@ -6676,6 +6833,9 @@ async function runAfterWatch(plugins, context) {
|
|
|
6676
6833
|
await plugin.afterWatch?.(context);
|
|
6677
6834
|
}
|
|
6678
6835
|
}
|
|
6836
|
+
|
|
6837
|
+
// packages/domain/engine/src/schemas.ts
|
|
6838
|
+
var import_zod5 = require("zod");
|
|
6679
6839
|
var formatIssues3 = (error) => error.issues.map((issue) => {
|
|
6680
6840
|
const p = issue.path.length > 0 ? issue.path.join(".") : "<root>";
|
|
6681
6841
|
return `${p}: ${issue.message}`;
|
|
@@ -6685,46 +6845,46 @@ var parseWithSchema3 = (schema, data, label) => {
|
|
|
6685
6845
|
if (parsed.success) return parsed.data;
|
|
6686
6846
|
throw new TypeError(`${label}: ${formatIssues3(parsed.error)}`);
|
|
6687
6847
|
};
|
|
6688
|
-
var EngineOptionsSchema =
|
|
6689
|
-
root:
|
|
6690
|
-
scanner:
|
|
6691
|
-
includeExtensions:
|
|
6692
|
-
ignoreDirectories:
|
|
6693
|
-
useCache:
|
|
6694
|
-
cacheDir:
|
|
6695
|
-
smartInvalidation:
|
|
6848
|
+
var EngineOptionsSchema = import_zod5.z.object({
|
|
6849
|
+
root: import_zod5.z.string().optional(),
|
|
6850
|
+
scanner: import_zod5.z.object({
|
|
6851
|
+
includeExtensions: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
6852
|
+
ignoreDirectories: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
6853
|
+
useCache: import_zod5.z.boolean().optional(),
|
|
6854
|
+
cacheDir: import_zod5.z.string().min(1).optional(),
|
|
6855
|
+
smartInvalidation: import_zod5.z.boolean().optional()
|
|
6696
6856
|
}).optional(),
|
|
6697
|
-
compileCss:
|
|
6698
|
-
tailwindConfigPath:
|
|
6699
|
-
analyze:
|
|
6700
|
-
plugins:
|
|
6857
|
+
compileCss: import_zod5.z.boolean().optional(),
|
|
6858
|
+
tailwindConfigPath: import_zod5.z.string().optional(),
|
|
6859
|
+
analyze: import_zod5.z.boolean().optional(),
|
|
6860
|
+
plugins: import_zod5.z.array(import_zod5.z.custom()).optional()
|
|
6701
6861
|
});
|
|
6702
|
-
var EngineWatchOptionsSchema =
|
|
6703
|
-
debounceMs:
|
|
6704
|
-
maxEventsPerFlush:
|
|
6705
|
-
largeFileThreshold:
|
|
6862
|
+
var EngineWatchOptionsSchema = import_zod5.z.object({
|
|
6863
|
+
debounceMs: import_zod5.z.number().int().min(0).optional(),
|
|
6864
|
+
maxEventsPerFlush: import_zod5.z.number().int().min(1).optional(),
|
|
6865
|
+
largeFileThreshold: import_zod5.z.number().int().min(0).optional()
|
|
6706
6866
|
});
|
|
6707
|
-
var BuildResultSchema =
|
|
6708
|
-
scan:
|
|
6709
|
-
files:
|
|
6710
|
-
|
|
6867
|
+
var BuildResultSchema = import_zod5.z.object({
|
|
6868
|
+
scan: import_zod5.z.object({
|
|
6869
|
+
files: import_zod5.z.array(
|
|
6870
|
+
import_zod5.z.object({ file: import_zod5.z.string(), classes: import_zod5.z.array(import_zod5.z.string()), hash: import_zod5.z.string().optional() })
|
|
6711
6871
|
),
|
|
6712
|
-
totalFiles:
|
|
6713
|
-
uniqueClasses:
|
|
6872
|
+
totalFiles: import_zod5.z.number().int().min(0),
|
|
6873
|
+
uniqueClasses: import_zod5.z.array(import_zod5.z.string())
|
|
6714
6874
|
}),
|
|
6715
|
-
mergedClassList:
|
|
6716
|
-
css:
|
|
6717
|
-
analysis:
|
|
6718
|
-
unusedClasses:
|
|
6719
|
-
classConflicts:
|
|
6720
|
-
|
|
6721
|
-
className:
|
|
6722
|
-
files:
|
|
6723
|
-
classes:
|
|
6724
|
-
message:
|
|
6875
|
+
mergedClassList: import_zod5.z.string(),
|
|
6876
|
+
css: import_zod5.z.string(),
|
|
6877
|
+
analysis: import_zod5.z.object({
|
|
6878
|
+
unusedClasses: import_zod5.z.array(import_zod5.z.string()),
|
|
6879
|
+
classConflicts: import_zod5.z.array(
|
|
6880
|
+
import_zod5.z.object({
|
|
6881
|
+
className: import_zod5.z.string(),
|
|
6882
|
+
files: import_zod5.z.array(import_zod5.z.string()),
|
|
6883
|
+
classes: import_zod5.z.array(import_zod5.z.string()).optional(),
|
|
6884
|
+
message: import_zod5.z.string().optional()
|
|
6725
6885
|
})
|
|
6726
6886
|
),
|
|
6727
|
-
classUsage:
|
|
6887
|
+
classUsage: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.number())
|
|
6728
6888
|
}).optional()
|
|
6729
6889
|
});
|
|
6730
6890
|
var parseEngineOptions = (options) => parseWithSchema3(EngineOptionsSchema, options ?? {}, "engine options are invalid");
|
|
@@ -6738,7 +6898,7 @@ function getNativeWatcher() {
|
|
|
6738
6898
|
const { resolveNativeBinary: resolveNativeBinary2 } = (init_src2(), __toCommonJS(src_exports));
|
|
6739
6899
|
const { path: binPath } = resolveNativeBinary2(__dirname);
|
|
6740
6900
|
if (binPath) {
|
|
6741
|
-
_native2 =
|
|
6901
|
+
_native2 = require(binPath);
|
|
6742
6902
|
}
|
|
6743
6903
|
} catch {
|
|
6744
6904
|
_native2 = {};
|
|
@@ -6885,7 +7045,10 @@ init_resolver();
|
|
|
6885
7045
|
init_cssToIr();
|
|
6886
7046
|
|
|
6887
7047
|
// packages/domain/engine/src/watch-native.ts
|
|
7048
|
+
var import_node_module7 = require("module");
|
|
7049
|
+
var import_node_path13 = __toESM(require("path"), 1);
|
|
6888
7050
|
init_src2();
|
|
7051
|
+
var import_meta13 = {};
|
|
6889
7052
|
var watchBindingState = {
|
|
6890
7053
|
binding: void 0
|
|
6891
7054
|
};
|
|
@@ -6899,27 +7062,27 @@ var getBinding = () => {
|
|
|
6899
7062
|
return watchBindingState.binding;
|
|
6900
7063
|
}
|
|
6901
7064
|
const runtimeDir = typeof __dirname === "string" ? __dirname : process.cwd();
|
|
6902
|
-
const req =
|
|
7065
|
+
const req = (0, import_node_module7.createRequire)(import_meta13.url);
|
|
6903
7066
|
const _pa = `${process.platform}-${process.arch}`;
|
|
6904
7067
|
const _paGnu = _pa === "linux-x64" ? "linux-x64-gnu" : _pa === "linux-arm64" ? "linux-arm64-gnu" : _pa;
|
|
6905
7068
|
const candidates = [
|
|
6906
7069
|
// new binary name: tailwind-styled-native
|
|
6907
|
-
|
|
6908
|
-
|
|
7070
|
+
import_node_path13.default.resolve(process.cwd(), "native", "tailwind-styled-native.node"),
|
|
7071
|
+
import_node_path13.default.resolve(process.cwd(), "native", `tailwind-styled-native.${_pa}.node`),
|
|
6909
7072
|
// npm install case: dist/../native/
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
7073
|
+
import_node_path13.default.resolve(runtimeDir, "..", "native", "tailwind-styled-native.node"),
|
|
7074
|
+
import_node_path13.default.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_pa}.node`),
|
|
7075
|
+
import_node_path13.default.resolve(runtimeDir, "..", "native", `tailwind-styled-native.${_paGnu}.node`),
|
|
6913
7076
|
// monorepo dev: 4-level up
|
|
6914
|
-
|
|
6915
|
-
|
|
7077
|
+
import_node_path13.default.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind-styled-native.node"),
|
|
7078
|
+
import_node_path13.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `tailwind-styled-native.${_paGnu}.node`),
|
|
6916
7079
|
// 3-level fallback
|
|
6917
|
-
|
|
7080
|
+
import_node_path13.default.resolve(runtimeDir, "..", "..", "..", "native", "tailwind-styled-native.node"),
|
|
6918
7081
|
// backward compat: tailwind_styled_parser
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
7082
|
+
import_node_path13.default.resolve(process.cwd(), "native", "tailwind_styled_parser.node"),
|
|
7083
|
+
import_node_path13.default.resolve(runtimeDir, "..", "native", "tailwind_styled_parser.node"),
|
|
7084
|
+
import_node_path13.default.resolve(runtimeDir, "..", "..", "..", "..", "native", "tailwind_styled_parser.node"),
|
|
7085
|
+
import_node_path13.default.resolve(runtimeDir, "..", "..", "..", "native", "tailwind_styled_parser.node")
|
|
6923
7086
|
];
|
|
6924
7087
|
for (const c of candidates) {
|
|
6925
7088
|
try {
|
|
@@ -6940,7 +7103,7 @@ var log6 = createLogger2("engine:watch-native");
|
|
|
6940
7103
|
function watchWorkspace2(rootDir, callback, options = {}) {
|
|
6941
7104
|
const binding = getBinding();
|
|
6942
7105
|
const pollMs = options.pollIntervalMs ?? 500;
|
|
6943
|
-
const resolvedRoot =
|
|
7106
|
+
const resolvedRoot = import_node_path13.default.resolve(rootDir);
|
|
6944
7107
|
const result = (() => {
|
|
6945
7108
|
try {
|
|
6946
7109
|
return binding.startWatch(resolvedRoot);
|
|
@@ -6977,7 +7140,7 @@ This package requires native Rust bindings.`
|
|
|
6977
7140
|
const deduped = /* @__PURE__ */ new Set();
|
|
6978
7141
|
const events = [];
|
|
6979
7142
|
for (const e of raw) {
|
|
6980
|
-
const absPath =
|
|
7143
|
+
const absPath = import_node_path13.default.isAbsolute(e.path) ? import_node_path13.default.normalize(e.path) : import_node_path13.default.resolve(resolvedRoot, e.path);
|
|
6981
7144
|
const kind = e.kind;
|
|
6982
7145
|
const key = `${kind}:${absPath}`;
|
|
6983
7146
|
if (deduped.has(key)) continue;
|
|
@@ -7017,11 +7180,11 @@ var configState = {
|
|
|
7017
7180
|
var log7 = createLogger2("engine");
|
|
7018
7181
|
async function loadTailwindConfigFromPath(root, tailwindConfigPath) {
|
|
7019
7182
|
if (!tailwindConfigPath) return void 0;
|
|
7020
|
-
const configPath =
|
|
7021
|
-
if (!
|
|
7183
|
+
const configPath = import_node_path14.default.resolve(root, tailwindConfigPath);
|
|
7184
|
+
if (!import_node_fs11.default.existsSync(configPath)) {
|
|
7022
7185
|
throw TwError.fromIo("CONFIG_NOT_FOUND", `tailwindConfigPath not found: ${configPath}`);
|
|
7023
7186
|
}
|
|
7024
|
-
const imported = await import(
|
|
7187
|
+
const imported = await import((0, import_node_url6.pathToFileURL)(configPath).href);
|
|
7025
7188
|
const config = imported.default ?? imported;
|
|
7026
7189
|
return config;
|
|
7027
7190
|
}
|
|
@@ -7084,11 +7247,11 @@ async function buildFromScan(scan, root, options, tailwindConfig) {
|
|
|
7084
7247
|
};
|
|
7085
7248
|
}
|
|
7086
7249
|
function countWorkspacePackages(root) {
|
|
7087
|
-
const packagesDir =
|
|
7088
|
-
if (!
|
|
7250
|
+
const packagesDir = import_node_path14.default.join(root, "packages");
|
|
7251
|
+
if (!import_node_fs11.default.existsSync(packagesDir)) return 0;
|
|
7089
7252
|
try {
|
|
7090
|
-
return
|
|
7091
|
-
(entry) => entry.isDirectory() &&
|
|
7253
|
+
return import_node_fs11.default.readdirSync(packagesDir, { withFileTypes: true }).filter(
|
|
7254
|
+
(entry) => entry.isDirectory() && import_node_fs11.default.existsSync(import_node_path14.default.join(packagesDir, entry.name, "package.json"))
|
|
7092
7255
|
).length;
|
|
7093
7256
|
} catch (err) {
|
|
7094
7257
|
log7.debug(`countWorkspacePackages: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -7125,7 +7288,7 @@ function writeDashboardMetrics(root, mode, result, metrics) {
|
|
|
7125
7288
|
async function createEngine(rawOptions = {}) {
|
|
7126
7289
|
const options = parseEngineOptions(rawOptions);
|
|
7127
7290
|
const root = options.root ?? process.cwd();
|
|
7128
|
-
const resolvedRoot =
|
|
7291
|
+
const resolvedRoot = import_node_path14.default.resolve(root);
|
|
7129
7292
|
const plugins = rawOptions.plugins ?? [];
|
|
7130
7293
|
const getTailwindConfig = async () => {
|
|
7131
7294
|
if (configState.isLoaded()) return configState.getConfig();
|
|
@@ -7272,7 +7435,7 @@ async function createEngine(rawOptions = {}) {
|
|
|
7272
7435
|
const shouldForceFullRescan = (event) => {
|
|
7273
7436
|
if (event.type === "unlink") return false;
|
|
7274
7437
|
try {
|
|
7275
|
-
const stat =
|
|
7438
|
+
const stat = import_node_fs11.default.statSync(event.filePath);
|
|
7276
7439
|
if (stat.size > largeFileThreshold) {
|
|
7277
7440
|
metrics.markSkippedLargeFile();
|
|
7278
7441
|
return true;
|
|
@@ -7390,14 +7553,14 @@ async function createEngine(rawOptions = {}) {
|
|
|
7390
7553
|
};
|
|
7391
7554
|
}
|
|
7392
7555
|
async function scanWorkspace3(opts = {}) {
|
|
7393
|
-
const root =
|
|
7556
|
+
const root = import_node_path14.default.resolve(opts.root ?? process.cwd());
|
|
7394
7557
|
return scanWorkspaceAsync(root, {
|
|
7395
7558
|
includeExtensions: opts.extensions,
|
|
7396
7559
|
ignoreDirectories: opts.ignoreDirectories
|
|
7397
7560
|
});
|
|
7398
7561
|
}
|
|
7399
7562
|
async function analyzeWorkspace2(opts = {}) {
|
|
7400
|
-
const root =
|
|
7563
|
+
const root = import_node_path14.default.resolve(opts.root ?? process.cwd());
|
|
7401
7564
|
return analyzeWorkspace(root, {
|
|
7402
7565
|
classStats: { top: opts.top ?? 20 }
|
|
7403
7566
|
});
|
|
@@ -7469,39 +7632,53 @@ async function inspectClass(className, scanResult, css = "") {
|
|
|
7469
7632
|
bundleBytes: impact.bundleSizeBytes
|
|
7470
7633
|
};
|
|
7471
7634
|
}
|
|
7472
|
-
|
|
7473
|
-
exports
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7635
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
7636
|
+
0 && (module.exports = {
|
|
7637
|
+
BuildResultSchema,
|
|
7638
|
+
BundleAnalyzer,
|
|
7639
|
+
CascadeResolutionId,
|
|
7640
|
+
CascadeResolver,
|
|
7641
|
+
CascadeStage,
|
|
7642
|
+
ConditionId,
|
|
7643
|
+
ConditionResult,
|
|
7644
|
+
EngineMetricsCollector,
|
|
7645
|
+
EngineOptionsSchema,
|
|
7646
|
+
EngineWatchOptionsSchema,
|
|
7647
|
+
ImpactTracker,
|
|
7648
|
+
Importance,
|
|
7649
|
+
LayerId,
|
|
7650
|
+
Origin,
|
|
7651
|
+
PropertyId,
|
|
7652
|
+
ReverseLookup,
|
|
7653
|
+
RuleId,
|
|
7654
|
+
SelectorId,
|
|
7655
|
+
ValueId,
|
|
7656
|
+
VariantChainId,
|
|
7657
|
+
analyzeWorkspace,
|
|
7658
|
+
applyIncrementalChange,
|
|
7659
|
+
build,
|
|
7660
|
+
buildProvenanceChain,
|
|
7661
|
+
createEngine,
|
|
7662
|
+
createFingerprint,
|
|
7663
|
+
createResolutionReason,
|
|
7664
|
+
generateSafelist,
|
|
7665
|
+
inspectClass,
|
|
7666
|
+
parseCssToIr,
|
|
7667
|
+
parseEngineOptions,
|
|
7668
|
+
parseEngineWatchOptions,
|
|
7669
|
+
runAfterBuild,
|
|
7670
|
+
runAfterScan,
|
|
7671
|
+
runAfterWatch,
|
|
7672
|
+
runBeforeBuild,
|
|
7673
|
+
runBeforeScan,
|
|
7674
|
+
runBeforeWatch,
|
|
7675
|
+
runOnError,
|
|
7676
|
+
runTransformClasses,
|
|
7677
|
+
scanWorkspace,
|
|
7678
|
+
trace,
|
|
7679
|
+
traceClass,
|
|
7680
|
+
traceClasses,
|
|
7681
|
+
watchWorkspaceLegacy,
|
|
7682
|
+
watchWorkspaceNative
|
|
7683
|
+
});
|
|
7507
7684
|
//# sourceMappingURL=engine.js.map
|