tailwind-styled-v4 5.0.37 → 5.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +121 -83
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +31 -15
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +107 -67
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +47 -14
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +601 -428
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +504 -313
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +833 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +298 -30
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +72 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.js +335 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +28 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +719 -506
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +520 -318
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +145 -319
- package/dist/index.d.ts +145 -319
- package/dist/index.js +1337 -7442
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1275 -7386
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +327 -242
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +272 -184
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +94 -49
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-api.mjs +26 -6
- package/dist/plugin-api.mjs.map +1 -1
- package/dist/plugin-registry.js +68 -40
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +14 -10
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.js +102 -53
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +30 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +48 -15
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +13 -5
- package/dist/preset.mjs.map +1 -1
- package/dist/rspack.js +108 -53
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +50 -18
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +63 -24
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +15 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/runtime.js +98 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.js +164 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +70 -40
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +0 -12
- package/dist/shared.d.ts +0 -12
- package/dist/shared.js +481 -299
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +304 -133
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +40 -10
- package/dist/storybook-addon.js.map +1 -1
- package/dist/storybook-addon.mjs +8 -3
- package/dist/storybook-addon.mjs.map +1 -1
- package/dist/svelte.js +95 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +37 -14
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +69 -37
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +8 -7
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +56 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.js +133 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +45 -14
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +156 -115
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +135 -82
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +584 -423
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +498 -311
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +599 -450
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +484 -332
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +102 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +39 -15
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +112 -77
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +52 -18
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +3 -1
package/dist/devtools.js
CHANGED
|
@@ -1,22 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
require('crypto');
|
|
4
|
-
require('fs');
|
|
5
|
-
require('path');
|
|
6
|
-
require('url');
|
|
7
|
-
var module$1 = require('module');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
|
|
10
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
11
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
|
-
|
|
1
|
+
const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
|
|
15
2
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
10
|
var __esm = (fn, res) => function __init() {
|
|
18
11
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
19
12
|
};
|
|
13
|
+
var __export = (target, all) => {
|
|
14
|
+
for (var name in all)
|
|
15
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
|
+
};
|
|
17
|
+
var __copyProps = (to, from, except, desc) => {
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
+
for (let key of __getOwnPropNames(from))
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
+
mod
|
|
32
|
+
));
|
|
33
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
34
|
|
|
21
35
|
// packages/domain/shared/src/trace.ts
|
|
22
36
|
function getHealthColor(status) {
|
|
@@ -84,16 +98,47 @@ function getPipelinePercentages(metrics) {
|
|
|
84
98
|
}
|
|
85
99
|
var init_trace = __esm({
|
|
86
100
|
"packages/domain/shared/src/trace.ts"() {
|
|
101
|
+
"use strict";
|
|
87
102
|
}
|
|
88
103
|
});
|
|
104
|
+
|
|
105
|
+
// packages/domain/shared/src/index.ts
|
|
106
|
+
var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module, _require;
|
|
89
107
|
var init_src = __esm({
|
|
90
108
|
"packages/domain/shared/src/index.ts"() {
|
|
109
|
+
"use strict";
|
|
110
|
+
import_node_crypto = require("crypto");
|
|
111
|
+
import_node_fs = __toESM(require("fs"));
|
|
112
|
+
import_node_path = __toESM(require("path"));
|
|
113
|
+
import_node_url = require("url");
|
|
114
|
+
import_node_module = require("module");
|
|
91
115
|
init_trace();
|
|
92
|
-
|
|
116
|
+
_require = (0, import_node_module.createRequire)(
|
|
117
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
|
|
118
|
+
);
|
|
93
119
|
}
|
|
94
120
|
});
|
|
95
121
|
|
|
122
|
+
// src/umbrella/devtools.ts
|
|
123
|
+
var devtools_exports = {};
|
|
124
|
+
__export(devtools_exports, {
|
|
125
|
+
DevToolsProvider: () => DevToolsProvider,
|
|
126
|
+
TwDevTools: () => TwDevTools,
|
|
127
|
+
fetchClassInspection: () => fetchClassInspection,
|
|
128
|
+
formatClassInspectionCli: () => formatClassInspectionCli,
|
|
129
|
+
formatClassInspectionJson: () => formatClassInspectionJson,
|
|
130
|
+
formatDuration: () => formatDuration,
|
|
131
|
+
formatMemory: () => formatMemory,
|
|
132
|
+
getBuildTimeColor: () => getBuildTimeColor,
|
|
133
|
+
getHealthColor: () => getHealthColor,
|
|
134
|
+
getMemoryColor: () => getMemoryColor,
|
|
135
|
+
getModeColor: () => getModeColor,
|
|
136
|
+
getPipelinePercentages: () => getPipelinePercentages
|
|
137
|
+
});
|
|
138
|
+
module.exports = __toCommonJS(devtools_exports);
|
|
139
|
+
|
|
96
140
|
// packages/infrastructure/devtools/src/index.tsx
|
|
141
|
+
var import_react = __toESM(require("react"), 1);
|
|
97
142
|
init_src();
|
|
98
143
|
|
|
99
144
|
// packages/infrastructure/devtools/src/classInspector.ts
|
|
@@ -224,53 +269,53 @@ function InspectorPanel({
|
|
|
224
269
|
pinned: _pinned
|
|
225
270
|
}) {
|
|
226
271
|
if (!inspected) {
|
|
227
|
-
return
|
|
272
|
+
return import_react.default.createElement(
|
|
228
273
|
"div",
|
|
229
274
|
{ style: S.emptyPanel },
|
|
230
|
-
|
|
275
|
+
import_react.default.createElement("span", { style: { opacity: 0.4 } }, "Hover an element to inspect")
|
|
231
276
|
);
|
|
232
277
|
}
|
|
233
|
-
return
|
|
278
|
+
return import_react.default.createElement(
|
|
234
279
|
"div",
|
|
235
280
|
{ style: S.scrollArea },
|
|
236
281
|
// Variant props
|
|
237
|
-
Object.keys(inspected.variantProps).length > 0 &&
|
|
282
|
+
Object.keys(inspected.variantProps).length > 0 && import_react.default.createElement(
|
|
238
283
|
"div",
|
|
239
284
|
{ style: S.section },
|
|
240
|
-
|
|
285
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Variants"),
|
|
241
286
|
Object.entries(inspected.variantProps).map(
|
|
242
|
-
([k, v]) =>
|
|
287
|
+
([k, v]) => import_react.default.createElement(
|
|
243
288
|
"div",
|
|
244
289
|
{ key: k, style: S.row },
|
|
245
|
-
|
|
246
|
-
|
|
290
|
+
import_react.default.createElement("span", { style: S.varKey }, k),
|
|
291
|
+
import_react.default.createElement("span", { style: S.varValue }, `"${v}"`)
|
|
247
292
|
)
|
|
248
293
|
)
|
|
249
294
|
),
|
|
250
295
|
// Active states
|
|
251
|
-
Object.keys(inspected.activeStates).length > 0 &&
|
|
296
|
+
Object.keys(inspected.activeStates).length > 0 && import_react.default.createElement(
|
|
252
297
|
"div",
|
|
253
298
|
{ style: S.section },
|
|
254
|
-
|
|
299
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Active Data Attrs"),
|
|
255
300
|
Object.entries(inspected.activeStates).map(
|
|
256
|
-
([k, v]) =>
|
|
301
|
+
([k, v]) => import_react.default.createElement(
|
|
257
302
|
"div",
|
|
258
303
|
{ key: k, style: S.row },
|
|
259
|
-
|
|
260
|
-
|
|
304
|
+
import_react.default.createElement("code", { style: { ...S.varKey, color: "#f59e0b" } }, `data-${k}`),
|
|
305
|
+
import_react.default.createElement("span", { style: { ...S.varValue, color: "#34d399" } }, `"${v}"`)
|
|
261
306
|
)
|
|
262
307
|
)
|
|
263
308
|
),
|
|
264
309
|
// State names
|
|
265
|
-
inspected.stateNames.length > 0 &&
|
|
310
|
+
inspected.stateNames.length > 0 && import_react.default.createElement(
|
|
266
311
|
"div",
|
|
267
312
|
{ style: S.section },
|
|
268
|
-
|
|
269
|
-
|
|
313
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Reactive States"),
|
|
314
|
+
import_react.default.createElement(
|
|
270
315
|
"div",
|
|
271
316
|
{ style: S.classGrid },
|
|
272
317
|
inspected.stateNames.map(
|
|
273
|
-
(s) =>
|
|
318
|
+
(s) => import_react.default.createElement(
|
|
274
319
|
"code",
|
|
275
320
|
{
|
|
276
321
|
key: s,
|
|
@@ -286,15 +331,15 @@ function InspectorPanel({
|
|
|
286
331
|
)
|
|
287
332
|
),
|
|
288
333
|
// Container breakpoints
|
|
289
|
-
inspected.containerBps.length > 0 &&
|
|
334
|
+
inspected.containerBps.length > 0 && import_react.default.createElement(
|
|
290
335
|
"div",
|
|
291
336
|
{ style: S.section },
|
|
292
|
-
|
|
293
|
-
|
|
337
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Container Breakpoints"),
|
|
338
|
+
import_react.default.createElement(
|
|
294
339
|
"div",
|
|
295
340
|
{ style: S.classGrid },
|
|
296
341
|
inspected.containerBps.map(
|
|
297
|
-
(bp) =>
|
|
342
|
+
(bp) => import_react.default.createElement(
|
|
298
343
|
"code",
|
|
299
344
|
{ key: bp, style: { ...S.classChip, color: "#818cf8" } },
|
|
300
345
|
bp
|
|
@@ -303,15 +348,15 @@ function InspectorPanel({
|
|
|
303
348
|
)
|
|
304
349
|
),
|
|
305
350
|
// Tailwind classes
|
|
306
|
-
inspected.twClasses.length > 0 &&
|
|
351
|
+
inspected.twClasses.length > 0 && import_react.default.createElement(
|
|
307
352
|
"div",
|
|
308
353
|
{ style: S.section },
|
|
309
|
-
|
|
310
|
-
|
|
354
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Classes"),
|
|
355
|
+
import_react.default.createElement(
|
|
311
356
|
"div",
|
|
312
357
|
{ style: S.classGrid },
|
|
313
358
|
inspected.twClasses.map(
|
|
314
|
-
(cls) =>
|
|
359
|
+
(cls) => import_react.default.createElement(
|
|
315
360
|
"code",
|
|
316
361
|
{ key: cls, style: S.classChip, title: inspected.atomicMap[cls] },
|
|
317
362
|
cls
|
|
@@ -320,7 +365,7 @@ function InspectorPanel({
|
|
|
320
365
|
)
|
|
321
366
|
),
|
|
322
367
|
// Copy
|
|
323
|
-
|
|
368
|
+
import_react.default.createElement(
|
|
324
369
|
"button",
|
|
325
370
|
{
|
|
326
371
|
style: S.copyBtn,
|
|
@@ -344,8 +389,8 @@ function InspectorPanel({
|
|
|
344
389
|
);
|
|
345
390
|
}
|
|
346
391
|
function StatePanel() {
|
|
347
|
-
const [entries, setEntries] =
|
|
348
|
-
|
|
392
|
+
const [entries, setEntries] = (0, import_react.useState)([]);
|
|
393
|
+
(0, import_react.useEffect)(() => {
|
|
349
394
|
const refresh = () => {
|
|
350
395
|
const reg = window.__TW_STATE_REGISTRY__;
|
|
351
396
|
setEntries(reg ? Array.from(reg.values()) : []);
|
|
@@ -355,54 +400,54 @@ function StatePanel() {
|
|
|
355
400
|
return () => clearInterval(interval);
|
|
356
401
|
}, []);
|
|
357
402
|
if (entries.length === 0) {
|
|
358
|
-
return
|
|
403
|
+
return import_react.default.createElement(
|
|
359
404
|
"div",
|
|
360
405
|
{ style: S.emptyPanel },
|
|
361
|
-
|
|
406
|
+
import_react.default.createElement(
|
|
362
407
|
"span",
|
|
363
408
|
{ style: { opacity: 0.4 } },
|
|
364
409
|
"No state-enabled components found."
|
|
365
410
|
),
|
|
366
|
-
|
|
367
|
-
|
|
411
|
+
import_react.default.createElement("br", null),
|
|
412
|
+
import_react.default.createElement(
|
|
368
413
|
"span",
|
|
369
414
|
{ style: { opacity: 0.3, fontSize: "11px" } },
|
|
370
415
|
'Use tw.button({ state: { active: "..." } }) to register.'
|
|
371
416
|
)
|
|
372
417
|
);
|
|
373
418
|
}
|
|
374
|
-
return
|
|
419
|
+
return import_react.default.createElement(
|
|
375
420
|
"div",
|
|
376
421
|
{ style: S.scrollArea },
|
|
377
422
|
entries.map(
|
|
378
|
-
(entry) =>
|
|
423
|
+
(entry) => import_react.default.createElement(
|
|
379
424
|
"div",
|
|
380
425
|
{ key: entry.id, style: S.section },
|
|
381
|
-
|
|
426
|
+
import_react.default.createElement(
|
|
382
427
|
"div",
|
|
383
428
|
{ style: S.sectionTitle },
|
|
384
|
-
|
|
385
|
-
|
|
429
|
+
import_react.default.createElement("span", { style: { color: "#60a5fa" } }, entry.tag.toUpperCase()),
|
|
430
|
+
import_react.default.createElement(
|
|
386
431
|
"span",
|
|
387
432
|
{ style: { marginLeft: "8px", color: "#52525b", fontSize: "10px" } },
|
|
388
433
|
entry.id
|
|
389
434
|
)
|
|
390
435
|
),
|
|
391
|
-
|
|
436
|
+
import_react.default.createElement(
|
|
392
437
|
"div",
|
|
393
438
|
{ style: S.classGrid },
|
|
394
439
|
entry.states.map(
|
|
395
|
-
(s) =>
|
|
440
|
+
(s) => import_react.default.createElement(
|
|
396
441
|
"code",
|
|
397
442
|
{ key: s, style: { ...S.classChip, color: "#f59e0b" } },
|
|
398
443
|
`data-${s}`
|
|
399
444
|
)
|
|
400
445
|
)
|
|
401
446
|
),
|
|
402
|
-
|
|
447
|
+
import_react.default.createElement(
|
|
403
448
|
"div",
|
|
404
449
|
{ style: { ...S.row, marginTop: "4px" } },
|
|
405
|
-
|
|
450
|
+
import_react.default.createElement(
|
|
406
451
|
"span",
|
|
407
452
|
{
|
|
408
453
|
style: {
|
|
@@ -419,8 +464,8 @@ function StatePanel() {
|
|
|
419
464
|
);
|
|
420
465
|
}
|
|
421
466
|
function ContainerPanel() {
|
|
422
|
-
const [entries, setEntries] =
|
|
423
|
-
|
|
467
|
+
const [entries, setEntries] = (0, import_react.useState)([]);
|
|
468
|
+
(0, import_react.useEffect)(() => {
|
|
424
469
|
const refresh = () => {
|
|
425
470
|
const reg = window.__TW_CONTAINER_REGISTRY__;
|
|
426
471
|
setEntries(reg ? Array.from(reg.values()) : []);
|
|
@@ -430,57 +475,57 @@ function ContainerPanel() {
|
|
|
430
475
|
return () => clearInterval(interval);
|
|
431
476
|
}, []);
|
|
432
477
|
if (entries.length === 0) {
|
|
433
|
-
return
|
|
478
|
+
return import_react.default.createElement(
|
|
434
479
|
"div",
|
|
435
480
|
{ style: S.emptyPanel },
|
|
436
|
-
|
|
481
|
+
import_react.default.createElement(
|
|
437
482
|
"span",
|
|
438
483
|
{ style: { opacity: 0.4 } },
|
|
439
484
|
"No container query components found."
|
|
440
485
|
),
|
|
441
|
-
|
|
442
|
-
|
|
486
|
+
import_react.default.createElement("br", null),
|
|
487
|
+
import_react.default.createElement(
|
|
443
488
|
"span",
|
|
444
489
|
{ style: { opacity: 0.3, fontSize: "11px" } },
|
|
445
490
|
'Use tw.div({ container: { md: "flex-row" } }) to register.'
|
|
446
491
|
)
|
|
447
492
|
);
|
|
448
493
|
}
|
|
449
|
-
return
|
|
494
|
+
return import_react.default.createElement(
|
|
450
495
|
"div",
|
|
451
496
|
{ style: S.scrollArea },
|
|
452
497
|
entries.map(
|
|
453
|
-
(entry) =>
|
|
498
|
+
(entry) => import_react.default.createElement(
|
|
454
499
|
"div",
|
|
455
500
|
{ key: entry.id, style: S.section },
|
|
456
|
-
|
|
501
|
+
import_react.default.createElement(
|
|
457
502
|
"div",
|
|
458
503
|
{ style: S.sectionTitle },
|
|
459
|
-
|
|
460
|
-
entry.containerName &&
|
|
504
|
+
import_react.default.createElement("span", { style: { color: "#60a5fa" } }, entry.tag.toUpperCase()),
|
|
505
|
+
entry.containerName && import_react.default.createElement(
|
|
461
506
|
"span",
|
|
462
507
|
{ style: { marginLeft: "6px", color: "#818cf8" } },
|
|
463
508
|
`[${entry.containerName}]`
|
|
464
509
|
),
|
|
465
|
-
|
|
510
|
+
import_react.default.createElement(
|
|
466
511
|
"span",
|
|
467
512
|
{ style: { marginLeft: "8px", color: "#52525b", fontSize: "10px" } },
|
|
468
513
|
entry.id
|
|
469
514
|
)
|
|
470
515
|
),
|
|
471
|
-
|
|
516
|
+
import_react.default.createElement(
|
|
472
517
|
"div",
|
|
473
518
|
null,
|
|
474
519
|
entry.breakpoints.map(
|
|
475
|
-
(bp, i) =>
|
|
520
|
+
(bp, i) => import_react.default.createElement(
|
|
476
521
|
"div",
|
|
477
522
|
{ key: i, style: { ...S.row, marginBottom: "2px" } },
|
|
478
|
-
|
|
523
|
+
import_react.default.createElement(
|
|
479
524
|
"code",
|
|
480
525
|
{ style: { color: "#818cf8", fontSize: "11px" } },
|
|
481
526
|
`\u2265 ${bp.minWidth}`
|
|
482
527
|
),
|
|
483
|
-
|
|
528
|
+
import_react.default.createElement(
|
|
484
529
|
"span",
|
|
485
530
|
{ style: { color: "#6b7280", fontSize: "11px" } },
|
|
486
531
|
bp.classes
|
|
@@ -493,8 +538,8 @@ function ContainerPanel() {
|
|
|
493
538
|
);
|
|
494
539
|
}
|
|
495
540
|
function TokensPanel() {
|
|
496
|
-
const [tokens, setTokens_] =
|
|
497
|
-
|
|
541
|
+
const [tokens, setTokens_] = (0, import_react.useState)({});
|
|
542
|
+
(0, import_react.useEffect)(() => {
|
|
498
543
|
const engine = window.__TW_TOKEN_ENGINE__;
|
|
499
544
|
if (!engine) return;
|
|
500
545
|
setTokens_(engine.getTokens());
|
|
@@ -504,35 +549,35 @@ function TokensPanel() {
|
|
|
504
549
|
}, []);
|
|
505
550
|
const entries = Object.entries(tokens);
|
|
506
551
|
if (entries.length === 0) {
|
|
507
|
-
return
|
|
552
|
+
return import_react.default.createElement(
|
|
508
553
|
"div",
|
|
509
554
|
{ style: S.emptyPanel },
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
555
|
+
import_react.default.createElement("span", { style: { opacity: 0.4 } }, "No live tokens registered."),
|
|
556
|
+
import_react.default.createElement("br", null),
|
|
557
|
+
import_react.default.createElement(
|
|
513
558
|
"span",
|
|
514
559
|
{ style: { opacity: 0.3, fontSize: "11px" } },
|
|
515
560
|
'Use liveToken({ primary: "#3b82f6" }) to register tokens.'
|
|
516
561
|
)
|
|
517
562
|
);
|
|
518
563
|
}
|
|
519
|
-
return
|
|
564
|
+
return import_react.default.createElement(
|
|
520
565
|
"div",
|
|
521
566
|
{ style: S.scrollArea },
|
|
522
|
-
|
|
567
|
+
import_react.default.createElement(
|
|
523
568
|
"div",
|
|
524
569
|
{ style: { ...S.sectionTitle, padding: "8px 12px 4px", color: "#52525b" } },
|
|
525
570
|
"Click color to edit \xB7 Changes apply instantly"
|
|
526
571
|
),
|
|
527
572
|
entries.map(([name, value]) => {
|
|
528
573
|
const isColor = value.startsWith("#") || value.startsWith("rgb") || value.startsWith("hsl");
|
|
529
|
-
return
|
|
574
|
+
return import_react.default.createElement(
|
|
530
575
|
"div",
|
|
531
576
|
{ key: name, style: { ...S.row, padding: "6px 12px", borderBottom: "1px solid #18181b" } },
|
|
532
|
-
|
|
577
|
+
import_react.default.createElement(
|
|
533
578
|
"div",
|
|
534
579
|
{ style: { display: "flex", alignItems: "center", gap: "8px" } },
|
|
535
|
-
isColor &&
|
|
580
|
+
isColor && import_react.default.createElement("div", {
|
|
536
581
|
style: {
|
|
537
582
|
width: "16px",
|
|
538
583
|
height: "16px",
|
|
@@ -542,9 +587,9 @@ function TokensPanel() {
|
|
|
542
587
|
flexShrink: 0
|
|
543
588
|
}
|
|
544
589
|
}),
|
|
545
|
-
|
|
590
|
+
import_react.default.createElement("span", { style: { color: "#a1a1aa", fontSize: "12px" } }, name)
|
|
546
591
|
),
|
|
547
|
-
isColor ?
|
|
592
|
+
isColor ? import_react.default.createElement("input", {
|
|
548
593
|
type: "color",
|
|
549
594
|
defaultValue: value.startsWith("#") ? value : "#000000",
|
|
550
595
|
style: {
|
|
@@ -558,7 +603,7 @@ function TokensPanel() {
|
|
|
558
603
|
const engine = window.__TW_TOKEN_ENGINE__;
|
|
559
604
|
if (engine) engine.setToken(name, e.target.value);
|
|
560
605
|
}
|
|
561
|
-
}) :
|
|
606
|
+
}) : import_react.default.createElement("input", {
|
|
562
607
|
type: "text",
|
|
563
608
|
defaultValue: value,
|
|
564
609
|
style: {
|
|
@@ -581,12 +626,12 @@ function TokensPanel() {
|
|
|
581
626
|
);
|
|
582
627
|
}
|
|
583
628
|
function AnalyzerPanel() {
|
|
584
|
-
const [scanning, setScanning] =
|
|
585
|
-
const [results, setResults] =
|
|
586
|
-
const [engineMetrics, setEngineMetrics] =
|
|
587
|
-
const [metricsFetching, setMetricsFetching] =
|
|
588
|
-
const [metricsError, setMetricsError] =
|
|
589
|
-
const loadEngineMetrics =
|
|
629
|
+
const [scanning, setScanning] = (0, import_react.useState)(false);
|
|
630
|
+
const [results, setResults] = (0, import_react.useState)(null);
|
|
631
|
+
const [engineMetrics, setEngineMetrics] = (0, import_react.useState)(null);
|
|
632
|
+
const [metricsFetching, setMetricsFetching] = (0, import_react.useState)(false);
|
|
633
|
+
const [metricsError, setMetricsError] = (0, import_react.useState)(null);
|
|
634
|
+
const loadEngineMetrics = (0, import_react.useCallback)(async () => {
|
|
590
635
|
setMetricsFetching(true);
|
|
591
636
|
setMetricsError(null);
|
|
592
637
|
try {
|
|
@@ -606,7 +651,7 @@ function AnalyzerPanel() {
|
|
|
606
651
|
setMetricsFetching(false);
|
|
607
652
|
}
|
|
608
653
|
}, []);
|
|
609
|
-
const runScan =
|
|
654
|
+
const runScan = (0, import_react.useCallback)(() => {
|
|
610
655
|
setScanning(true);
|
|
611
656
|
setTimeout(() => {
|
|
612
657
|
const twEls = document.querySelectorAll("[data-tw]");
|
|
@@ -638,14 +683,14 @@ function AnalyzerPanel() {
|
|
|
638
683
|
setScanning(false);
|
|
639
684
|
}, 100);
|
|
640
685
|
}, []);
|
|
641
|
-
return
|
|
686
|
+
return import_react.default.createElement(
|
|
642
687
|
"div",
|
|
643
688
|
{ style: S.scrollArea },
|
|
644
|
-
|
|
689
|
+
import_react.default.createElement(
|
|
645
690
|
"div",
|
|
646
691
|
{ style: { padding: "10px 12px" } },
|
|
647
692
|
// ── DOM Scan ──────────────────────────────────────────────────────────
|
|
648
|
-
|
|
693
|
+
import_react.default.createElement(
|
|
649
694
|
"button",
|
|
650
695
|
{
|
|
651
696
|
style: { ...S.copyBtn, borderTop: "none", color: "#60a5fa", fontWeight: "600" },
|
|
@@ -655,58 +700,58 @@ function AnalyzerPanel() {
|
|
|
655
700
|
scanning ? "Scanning DOM..." : "\u25B6 Run DOM Scan"
|
|
656
701
|
),
|
|
657
702
|
// ── Engine Metrics (dari dashboard) ───────────────────────────────────
|
|
658
|
-
|
|
703
|
+
import_react.default.createElement(
|
|
659
704
|
"div",
|
|
660
705
|
{ style: { ...S.section, marginTop: "8px" } },
|
|
661
|
-
|
|
706
|
+
import_react.default.createElement(
|
|
662
707
|
"div",
|
|
663
708
|
{ style: { ...S.sectionTitle, marginBottom: "6px" } },
|
|
664
709
|
"\u26A1 Engine Metrics"
|
|
665
710
|
),
|
|
666
|
-
engineMetrics ?
|
|
711
|
+
engineMetrics ? import_react.default.createElement(
|
|
667
712
|
"div",
|
|
668
713
|
null,
|
|
669
|
-
|
|
714
|
+
import_react.default.createElement(
|
|
670
715
|
"div",
|
|
671
716
|
{ style: S.row },
|
|
672
|
-
|
|
673
|
-
|
|
717
|
+
import_react.default.createElement("span", { style: S.varKey }, "Build"),
|
|
718
|
+
import_react.default.createElement(
|
|
674
719
|
"span",
|
|
675
720
|
{ style: { ...S.varValue, color: "#34d399" } },
|
|
676
721
|
engineMetrics.buildMs !== null ? `${engineMetrics.buildMs}ms` : "\u2014"
|
|
677
722
|
)
|
|
678
723
|
),
|
|
679
|
-
|
|
724
|
+
import_react.default.createElement(
|
|
680
725
|
"div",
|
|
681
726
|
{ style: S.row },
|
|
682
|
-
|
|
683
|
-
|
|
727
|
+
import_react.default.createElement("span", { style: S.varKey }, "Classes"),
|
|
728
|
+
import_react.default.createElement(
|
|
684
729
|
"span",
|
|
685
730
|
{ style: { ...S.varValue, color: "#34d399" } },
|
|
686
731
|
String(engineMetrics.classCount ?? "\u2014")
|
|
687
732
|
)
|
|
688
733
|
),
|
|
689
|
-
|
|
734
|
+
import_react.default.createElement(
|
|
690
735
|
"div",
|
|
691
736
|
{ style: S.row },
|
|
692
|
-
|
|
693
|
-
|
|
737
|
+
import_react.default.createElement("span", { style: S.varKey }, "Files"),
|
|
738
|
+
import_react.default.createElement(
|
|
694
739
|
"span",
|
|
695
740
|
{ style: { ...S.varValue, color: "#34d399" } },
|
|
696
741
|
String(engineMetrics.fileCount ?? "\u2014")
|
|
697
742
|
)
|
|
698
743
|
),
|
|
699
|
-
|
|
744
|
+
import_react.default.createElement(
|
|
700
745
|
"div",
|
|
701
746
|
{ style: S.row },
|
|
702
|
-
|
|
703
|
-
|
|
747
|
+
import_react.default.createElement("span", { style: S.varKey }, "Mode"),
|
|
748
|
+
import_react.default.createElement(
|
|
704
749
|
"span",
|
|
705
750
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
706
751
|
String(engineMetrics.mode ?? "\u2014")
|
|
707
752
|
)
|
|
708
753
|
),
|
|
709
|
-
|
|
754
|
+
import_react.default.createElement(
|
|
710
755
|
"button",
|
|
711
756
|
{
|
|
712
757
|
style: {
|
|
@@ -721,15 +766,15 @@ function AnalyzerPanel() {
|
|
|
721
766
|
},
|
|
722
767
|
"\u21BB Refresh"
|
|
723
768
|
)
|
|
724
|
-
) : metricsError ?
|
|
769
|
+
) : metricsError ? import_react.default.createElement(
|
|
725
770
|
"div",
|
|
726
771
|
null,
|
|
727
|
-
|
|
772
|
+
import_react.default.createElement(
|
|
728
773
|
"div",
|
|
729
774
|
{ style: { color: "#f87171", fontSize: "11px", marginBottom: "6px" } },
|
|
730
775
|
metricsError
|
|
731
776
|
),
|
|
732
|
-
|
|
777
|
+
import_react.default.createElement(
|
|
733
778
|
"button",
|
|
734
779
|
{
|
|
735
780
|
style: { ...S.copyBtn, borderTop: "none", color: "#34d399", fontWeight: "600" },
|
|
@@ -738,10 +783,10 @@ function AnalyzerPanel() {
|
|
|
738
783
|
},
|
|
739
784
|
metricsFetching ? "Connecting..." : "\u21BB Retry"
|
|
740
785
|
)
|
|
741
|
-
) :
|
|
786
|
+
) : import_react.default.createElement(
|
|
742
787
|
"div",
|
|
743
788
|
null,
|
|
744
|
-
|
|
789
|
+
import_react.default.createElement(
|
|
745
790
|
"div",
|
|
746
791
|
{
|
|
747
792
|
style: {
|
|
@@ -752,14 +797,14 @@ function AnalyzerPanel() {
|
|
|
752
797
|
}
|
|
753
798
|
},
|
|
754
799
|
"Rust analyzer hanya tersedia via CLI atau dashboard.",
|
|
755
|
-
|
|
756
|
-
|
|
800
|
+
import_react.default.createElement("br", null),
|
|
801
|
+
import_react.default.createElement(
|
|
757
802
|
"code",
|
|
758
803
|
{ style: { color: "#52525b", fontSize: "10px" } },
|
|
759
804
|
"tw analyze . | tw dashboard"
|
|
760
805
|
)
|
|
761
806
|
),
|
|
762
|
-
|
|
807
|
+
import_react.default.createElement(
|
|
763
808
|
"button",
|
|
764
809
|
{
|
|
765
810
|
style: { ...S.copyBtn, borderTop: "none", color: "#34d399", fontWeight: "600" },
|
|
@@ -771,46 +816,46 @@ function AnalyzerPanel() {
|
|
|
771
816
|
)
|
|
772
817
|
),
|
|
773
818
|
// ── DOM Scan Results ──────────────────────────────────────────────────
|
|
774
|
-
results &&
|
|
819
|
+
results && import_react.default.createElement(
|
|
775
820
|
"div",
|
|
776
821
|
null,
|
|
777
|
-
|
|
822
|
+
import_react.default.createElement(
|
|
778
823
|
"div",
|
|
779
824
|
{ style: S.section },
|
|
780
|
-
|
|
781
|
-
|
|
825
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Summary"),
|
|
826
|
+
import_react.default.createElement(
|
|
782
827
|
"div",
|
|
783
828
|
{ style: S.row },
|
|
784
|
-
|
|
785
|
-
|
|
829
|
+
import_react.default.createElement("span", { style: S.varKey }, "State components"),
|
|
830
|
+
import_react.default.createElement("span", { style: S.varValue }, String(results.stateCount))
|
|
786
831
|
),
|
|
787
|
-
|
|
832
|
+
import_react.default.createElement(
|
|
788
833
|
"div",
|
|
789
834
|
{ style: S.row },
|
|
790
|
-
|
|
791
|
-
|
|
835
|
+
import_react.default.createElement("span", { style: S.varKey }, "Container components"),
|
|
836
|
+
import_react.default.createElement("span", { style: S.varValue }, String(results.containerCount))
|
|
792
837
|
),
|
|
793
|
-
|
|
838
|
+
import_react.default.createElement(
|
|
794
839
|
"div",
|
|
795
840
|
{ style: S.row },
|
|
796
|
-
|
|
797
|
-
|
|
841
|
+
import_react.default.createElement("span", { style: S.varKey }, "Live tokens"),
|
|
842
|
+
import_react.default.createElement("span", { style: S.varValue }, String(results.tokenCount))
|
|
798
843
|
)
|
|
799
844
|
),
|
|
800
|
-
results.duplicates.length > 0 ?
|
|
845
|
+
results.duplicates.length > 0 ? import_react.default.createElement(
|
|
801
846
|
"div",
|
|
802
847
|
{ style: S.section },
|
|
803
|
-
|
|
848
|
+
import_react.default.createElement("div", { style: S.sectionTitle }, "Duplicate Class Sets"),
|
|
804
849
|
results.duplicates.map(
|
|
805
|
-
(d, i) =>
|
|
850
|
+
(d, i) => import_react.default.createElement(
|
|
806
851
|
"div",
|
|
807
852
|
{ key: i, style: { marginBottom: "8px" } },
|
|
808
|
-
|
|
853
|
+
import_react.default.createElement(
|
|
809
854
|
"div",
|
|
810
855
|
{ style: { color: "#f59e0b", fontSize: "11px", marginBottom: "2px" } },
|
|
811
856
|
d.names.join(", ")
|
|
812
857
|
),
|
|
813
|
-
|
|
858
|
+
import_react.default.createElement(
|
|
814
859
|
"code",
|
|
815
860
|
{
|
|
816
861
|
style: {
|
|
@@ -823,10 +868,10 @@ function AnalyzerPanel() {
|
|
|
823
868
|
)
|
|
824
869
|
)
|
|
825
870
|
)
|
|
826
|
-
) :
|
|
871
|
+
) : import_react.default.createElement(
|
|
827
872
|
"div",
|
|
828
873
|
{ style: S.section },
|
|
829
|
-
|
|
874
|
+
import_react.default.createElement(
|
|
830
875
|
"span",
|
|
831
876
|
{ style: { color: "#34d399", fontSize: "12px" } },
|
|
832
877
|
"\u2713 No duplicate class sets in current DOM"
|
|
@@ -838,14 +883,14 @@ function AnalyzerPanel() {
|
|
|
838
883
|
}
|
|
839
884
|
var DASHBOARD_BASE = "http://localhost:3000";
|
|
840
885
|
function TracePanel() {
|
|
841
|
-
const [metrics, setMetrics] =
|
|
842
|
-
const [history, setHistory] =
|
|
843
|
-
const [summary, setSummary] =
|
|
844
|
-
const [error, setError] =
|
|
845
|
-
const [fetching, setFetching] =
|
|
846
|
-
const [autoRefresh, setAutoRefresh] =
|
|
847
|
-
const intervalRef =
|
|
848
|
-
const fetchAll =
|
|
886
|
+
const [metrics, setMetrics] = (0, import_react.useState)(null);
|
|
887
|
+
const [history, setHistory] = (0, import_react.useState)([]);
|
|
888
|
+
const [summary, setSummary] = (0, import_react.useState)(null);
|
|
889
|
+
const [error, setError] = (0, import_react.useState)(null);
|
|
890
|
+
const [fetching, setFetching] = (0, import_react.useState)(false);
|
|
891
|
+
const [autoRefresh, setAutoRefresh] = (0, import_react.useState)(false);
|
|
892
|
+
const intervalRef = (0, import_react.useRef)(null);
|
|
893
|
+
const fetchAll = (0, import_react.useCallback)(async () => {
|
|
849
894
|
setFetching(true);
|
|
850
895
|
setError(null);
|
|
851
896
|
try {
|
|
@@ -872,7 +917,7 @@ function TracePanel() {
|
|
|
872
917
|
setFetching(false);
|
|
873
918
|
}
|
|
874
919
|
}, []);
|
|
875
|
-
|
|
920
|
+
(0, import_react.useEffect)(() => {
|
|
876
921
|
if (autoRefresh) {
|
|
877
922
|
fetchAll();
|
|
878
923
|
intervalRef.current = setInterval(fetchAll, 3e3);
|
|
@@ -887,7 +932,7 @@ function TracePanel() {
|
|
|
887
932
|
const renderHistoryChart = () => {
|
|
888
933
|
const vals = history.map((h) => h.buildMs ?? 0).filter((v) => v > 0);
|
|
889
934
|
if (vals.length === 0) {
|
|
890
|
-
return
|
|
935
|
+
return import_react.default.createElement(
|
|
891
936
|
"div",
|
|
892
937
|
{
|
|
893
938
|
style: {
|
|
@@ -903,7 +948,7 @@ function TracePanel() {
|
|
|
903
948
|
const max = Math.max(...vals);
|
|
904
949
|
const chartWidth = 296;
|
|
905
950
|
const barWidth = Math.max(3, Math.floor(chartWidth / vals.length) - 1);
|
|
906
|
-
return
|
|
951
|
+
return import_react.default.createElement(
|
|
907
952
|
"div",
|
|
908
953
|
{
|
|
909
954
|
style: {
|
|
@@ -916,7 +961,7 @@ function TracePanel() {
|
|
|
916
961
|
},
|
|
917
962
|
vals.map((v, i) => {
|
|
918
963
|
const h = max > 0 ? Math.max(3, Math.round(v / max * 56)) : 3;
|
|
919
|
-
return
|
|
964
|
+
return import_react.default.createElement("div", {
|
|
920
965
|
key: i,
|
|
921
966
|
style: {
|
|
922
967
|
width: `${barWidth}px`,
|
|
@@ -938,15 +983,15 @@ function TracePanel() {
|
|
|
938
983
|
const analyze = metrics.analyzeMs ?? 0;
|
|
939
984
|
const compile = metrics.compileMs ?? 0;
|
|
940
985
|
if (scanPct === 0 && analyzePct === 0 && compilePct === 0) return null;
|
|
941
|
-
return
|
|
986
|
+
return import_react.default.createElement(
|
|
942
987
|
"div",
|
|
943
988
|
null,
|
|
944
|
-
|
|
989
|
+
import_react.default.createElement(
|
|
945
990
|
"div",
|
|
946
991
|
{ style: { ...S.sectionTitle, marginBottom: "6px" } },
|
|
947
992
|
"Pipeline Breakdown"
|
|
948
993
|
),
|
|
949
|
-
|
|
994
|
+
import_react.default.createElement(
|
|
950
995
|
"div",
|
|
951
996
|
{
|
|
952
997
|
style: {
|
|
@@ -957,41 +1002,41 @@ function TracePanel() {
|
|
|
957
1002
|
marginBottom: "6px"
|
|
958
1003
|
}
|
|
959
1004
|
},
|
|
960
|
-
scanPct > 0 &&
|
|
1005
|
+
scanPct > 0 && import_react.default.createElement("div", {
|
|
961
1006
|
style: { width: `${scanPct}%`, background: "#60a5fa", minWidth: "2px" },
|
|
962
1007
|
title: `Scan: ${scan}ms`
|
|
963
1008
|
}),
|
|
964
|
-
analyzePct > 0 &&
|
|
1009
|
+
analyzePct > 0 && import_react.default.createElement("div", {
|
|
965
1010
|
style: { width: `${analyzePct}%`, background: "#818cf8", minWidth: "2px" },
|
|
966
1011
|
title: `Analyze: ${analyze}ms`
|
|
967
1012
|
}),
|
|
968
|
-
compilePct > 0 &&
|
|
1013
|
+
compilePct > 0 && import_react.default.createElement("div", {
|
|
969
1014
|
style: { width: `${compilePct}%`, background: "#34d399", minWidth: "2px" },
|
|
970
1015
|
title: `Compile: ${compile}ms`
|
|
971
1016
|
})
|
|
972
1017
|
),
|
|
973
|
-
|
|
1018
|
+
import_react.default.createElement(
|
|
974
1019
|
"div",
|
|
975
1020
|
{ style: { display: "flex", gap: "12px", fontSize: "10px" } },
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1021
|
+
import_react.default.createElement("span", { style: { color: "#60a5fa" } }, `Scan ${scan}ms`),
|
|
1022
|
+
import_react.default.createElement("span", { style: { color: "#818cf8" } }, `Analyze ${analyze}ms`),
|
|
1023
|
+
import_react.default.createElement("span", { style: { color: "#34d399" } }, `Compile ${compile}ms`)
|
|
979
1024
|
)
|
|
980
1025
|
);
|
|
981
1026
|
};
|
|
982
1027
|
if (error && !metrics) {
|
|
983
|
-
return
|
|
1028
|
+
return import_react.default.createElement(
|
|
984
1029
|
"div",
|
|
985
1030
|
{ style: S.scrollArea },
|
|
986
|
-
|
|
1031
|
+
import_react.default.createElement(
|
|
987
1032
|
"div",
|
|
988
1033
|
{ style: { padding: "12px" } },
|
|
989
|
-
|
|
1034
|
+
import_react.default.createElement(
|
|
990
1035
|
"div",
|
|
991
1036
|
{ style: { color: "#f87171", fontSize: "11px", marginBottom: "8px" } },
|
|
992
1037
|
error
|
|
993
1038
|
),
|
|
994
|
-
|
|
1039
|
+
import_react.default.createElement(
|
|
995
1040
|
"button",
|
|
996
1041
|
{
|
|
997
1042
|
style: { ...S.copyBtn, borderTop: "none", color: "#34d399", fontWeight: "600" },
|
|
@@ -1004,13 +1049,13 @@ function TracePanel() {
|
|
|
1004
1049
|
);
|
|
1005
1050
|
}
|
|
1006
1051
|
if (!metrics) {
|
|
1007
|
-
return
|
|
1052
|
+
return import_react.default.createElement(
|
|
1008
1053
|
"div",
|
|
1009
1054
|
{ style: S.scrollArea },
|
|
1010
|
-
|
|
1055
|
+
import_react.default.createElement(
|
|
1011
1056
|
"div",
|
|
1012
1057
|
{ style: { padding: "12px" } },
|
|
1013
|
-
|
|
1058
|
+
import_react.default.createElement(
|
|
1014
1059
|
"div",
|
|
1015
1060
|
{
|
|
1016
1061
|
style: {
|
|
@@ -1021,14 +1066,14 @@ function TracePanel() {
|
|
|
1021
1066
|
}
|
|
1022
1067
|
},
|
|
1023
1068
|
"Build timeline dan pipeline events dari engine.",
|
|
1024
|
-
|
|
1025
|
-
|
|
1069
|
+
import_react.default.createElement("br", null),
|
|
1070
|
+
import_react.default.createElement(
|
|
1026
1071
|
"code",
|
|
1027
1072
|
{ style: { color: "#52525b", fontSize: "10px" } },
|
|
1028
1073
|
"tw dashboard"
|
|
1029
1074
|
)
|
|
1030
1075
|
),
|
|
1031
|
-
|
|
1076
|
+
import_react.default.createElement(
|
|
1032
1077
|
"button",
|
|
1033
1078
|
{
|
|
1034
1079
|
style: { ...S.copyBtn, borderTop: "none", color: "#34d399", fontWeight: "600" },
|
|
@@ -1040,14 +1085,14 @@ function TracePanel() {
|
|
|
1040
1085
|
)
|
|
1041
1086
|
);
|
|
1042
1087
|
}
|
|
1043
|
-
return
|
|
1088
|
+
return import_react.default.createElement(
|
|
1044
1089
|
"div",
|
|
1045
1090
|
{ style: S.scrollArea },
|
|
1046
1091
|
// ── Mode & Health ────────────────────────────────────────────────────
|
|
1047
|
-
|
|
1092
|
+
import_react.default.createElement(
|
|
1048
1093
|
"div",
|
|
1049
1094
|
{ style: { padding: "10px 12px 6px" } },
|
|
1050
|
-
|
|
1095
|
+
import_react.default.createElement(
|
|
1051
1096
|
"div",
|
|
1052
1097
|
{
|
|
1053
1098
|
style: {
|
|
@@ -1057,10 +1102,10 @@ function TracePanel() {
|
|
|
1057
1102
|
marginBottom: "8px"
|
|
1058
1103
|
}
|
|
1059
1104
|
},
|
|
1060
|
-
|
|
1105
|
+
import_react.default.createElement(
|
|
1061
1106
|
"div",
|
|
1062
1107
|
{ style: { display: "flex", alignItems: "center", gap: "8px" } },
|
|
1063
|
-
|
|
1108
|
+
import_react.default.createElement("div", {
|
|
1064
1109
|
style: {
|
|
1065
1110
|
width: "8px",
|
|
1066
1111
|
height: "8px",
|
|
@@ -1069,7 +1114,7 @@ function TracePanel() {
|
|
|
1069
1114
|
boxShadow: `0 0 6px ${getModeColor(metrics.mode)}`
|
|
1070
1115
|
}
|
|
1071
1116
|
}),
|
|
1072
|
-
|
|
1117
|
+
import_react.default.createElement(
|
|
1073
1118
|
"span",
|
|
1074
1119
|
{
|
|
1075
1120
|
style: {
|
|
@@ -1082,10 +1127,10 @@ function TracePanel() {
|
|
|
1082
1127
|
metrics.mode ?? "unknown"
|
|
1083
1128
|
)
|
|
1084
1129
|
),
|
|
1085
|
-
|
|
1130
|
+
import_react.default.createElement(
|
|
1086
1131
|
"div",
|
|
1087
1132
|
{ style: { display: "flex", gap: "4px" } },
|
|
1088
|
-
|
|
1133
|
+
import_react.default.createElement(
|
|
1089
1134
|
"button",
|
|
1090
1135
|
{
|
|
1091
1136
|
style: {
|
|
@@ -1104,7 +1149,7 @@ function TracePanel() {
|
|
|
1104
1149
|
},
|
|
1105
1150
|
autoRefresh ? "\u25CF Live" : "\u25CB Live"
|
|
1106
1151
|
),
|
|
1107
|
-
|
|
1152
|
+
import_react.default.createElement(
|
|
1108
1153
|
"button",
|
|
1109
1154
|
{
|
|
1110
1155
|
style: {
|
|
@@ -1128,25 +1173,25 @@ function TracePanel() {
|
|
|
1128
1173
|
)
|
|
1129
1174
|
),
|
|
1130
1175
|
// ── Health Status ────────────────────────────────────────────────────
|
|
1131
|
-
summary &&
|
|
1176
|
+
summary && import_react.default.createElement(
|
|
1132
1177
|
"div",
|
|
1133
1178
|
{ style: S.section },
|
|
1134
|
-
|
|
1135
|
-
|
|
1179
|
+
import_react.default.createElement("div", { style: { ...S.sectionTitle, marginBottom: "6px" } }, "Health"),
|
|
1180
|
+
import_react.default.createElement(
|
|
1136
1181
|
"div",
|
|
1137
1182
|
{ style: S.row },
|
|
1138
|
-
|
|
1139
|
-
|
|
1183
|
+
import_react.default.createElement("span", { style: S.varKey }, "Status"),
|
|
1184
|
+
import_react.default.createElement(
|
|
1140
1185
|
"span",
|
|
1141
1186
|
{ style: { color: getHealthColor(summary.health?.status), fontWeight: "600" } },
|
|
1142
1187
|
summary.health?.status ?? "unknown"
|
|
1143
1188
|
)
|
|
1144
1189
|
),
|
|
1145
|
-
summary.health?.issues && summary.health.issues.length > 0 &&
|
|
1190
|
+
summary.health?.issues && summary.health.issues.length > 0 && import_react.default.createElement(
|
|
1146
1191
|
"div",
|
|
1147
1192
|
{ style: { marginTop: "4px" } },
|
|
1148
1193
|
summary.health.issues.map(
|
|
1149
|
-
(issue, i) =>
|
|
1194
|
+
(issue, i) => import_react.default.createElement(
|
|
1150
1195
|
"div",
|
|
1151
1196
|
{
|
|
1152
1197
|
key: i,
|
|
@@ -1162,19 +1207,19 @@ function TracePanel() {
|
|
|
1162
1207
|
)
|
|
1163
1208
|
),
|
|
1164
1209
|
// ── Build Metrics ────────────────────────────────────────────────────
|
|
1165
|
-
|
|
1210
|
+
import_react.default.createElement(
|
|
1166
1211
|
"div",
|
|
1167
1212
|
{ style: S.section },
|
|
1168
|
-
|
|
1213
|
+
import_react.default.createElement(
|
|
1169
1214
|
"div",
|
|
1170
1215
|
{ style: { ...S.sectionTitle, marginBottom: "6px" } },
|
|
1171
1216
|
"Build Metrics"
|
|
1172
1217
|
),
|
|
1173
|
-
|
|
1218
|
+
import_react.default.createElement(
|
|
1174
1219
|
"div",
|
|
1175
1220
|
{ style: S.row },
|
|
1176
|
-
|
|
1177
|
-
|
|
1221
|
+
import_react.default.createElement("span", { style: S.varKey }, "Build"),
|
|
1222
|
+
import_react.default.createElement(
|
|
1178
1223
|
"span",
|
|
1179
1224
|
{
|
|
1180
1225
|
style: {
|
|
@@ -1185,23 +1230,23 @@ function TracePanel() {
|
|
|
1185
1230
|
metrics.buildMs !== null ? `${metrics.buildMs}ms` : "\u2014"
|
|
1186
1231
|
)
|
|
1187
1232
|
),
|
|
1188
|
-
|
|
1233
|
+
import_react.default.createElement(
|
|
1189
1234
|
"div",
|
|
1190
1235
|
{ style: S.row },
|
|
1191
|
-
|
|
1192
|
-
|
|
1236
|
+
import_react.default.createElement("span", { style: S.varKey }, "Classes"),
|
|
1237
|
+
import_react.default.createElement("span", { style: S.varValue }, String(metrics.classCount ?? "\u2014"))
|
|
1193
1238
|
),
|
|
1194
|
-
|
|
1239
|
+
import_react.default.createElement(
|
|
1195
1240
|
"div",
|
|
1196
1241
|
{ style: S.row },
|
|
1197
|
-
|
|
1198
|
-
|
|
1242
|
+
import_react.default.createElement("span", { style: S.varKey }, "Files"),
|
|
1243
|
+
import_react.default.createElement("span", { style: S.varValue }, String(metrics.fileCount ?? "\u2014"))
|
|
1199
1244
|
),
|
|
1200
|
-
metrics.cssBytes !== null &&
|
|
1245
|
+
metrics.cssBytes !== null && import_react.default.createElement(
|
|
1201
1246
|
"div",
|
|
1202
1247
|
{ style: S.row },
|
|
1203
|
-
|
|
1204
|
-
|
|
1248
|
+
import_react.default.createElement("span", { style: S.varKey }, "CSS"),
|
|
1249
|
+
import_react.default.createElement(
|
|
1205
1250
|
"span",
|
|
1206
1251
|
{ style: { ...S.varValue, color: "#818cf8" } },
|
|
1207
1252
|
formatMemory(metrics.cssBytes)
|
|
@@ -1209,61 +1254,61 @@ function TracePanel() {
|
|
|
1209
1254
|
)
|
|
1210
1255
|
),
|
|
1211
1256
|
// ── Pipeline Breakdown ───────────────────────────────────────────────
|
|
1212
|
-
|
|
1257
|
+
import_react.default.createElement("div", { style: S.section }, renderPipelineBar()),
|
|
1213
1258
|
// ── Pipeline Events ──────────────────────────────────────────────────
|
|
1214
|
-
(metrics.eventsReceived !== void 0 || metrics.batchesProcessed !== void 0) &&
|
|
1259
|
+
(metrics.eventsReceived !== void 0 || metrics.batchesProcessed !== void 0) && import_react.default.createElement(
|
|
1215
1260
|
"div",
|
|
1216
1261
|
{ style: S.section },
|
|
1217
|
-
|
|
1262
|
+
import_react.default.createElement(
|
|
1218
1263
|
"div",
|
|
1219
1264
|
{ style: { ...S.sectionTitle, marginBottom: "6px" } },
|
|
1220
1265
|
"Pipeline Events"
|
|
1221
1266
|
),
|
|
1222
|
-
metrics.eventsReceived !== void 0 &&
|
|
1267
|
+
metrics.eventsReceived !== void 0 && import_react.default.createElement(
|
|
1223
1268
|
"div",
|
|
1224
1269
|
{ style: S.row },
|
|
1225
|
-
|
|
1226
|
-
|
|
1270
|
+
import_react.default.createElement("span", { style: S.varKey }, "Events received"),
|
|
1271
|
+
import_react.default.createElement(
|
|
1227
1272
|
"span",
|
|
1228
1273
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1229
1274
|
String(metrics.eventsReceived)
|
|
1230
1275
|
)
|
|
1231
1276
|
),
|
|
1232
|
-
metrics.eventsProcessed !== void 0 &&
|
|
1277
|
+
metrics.eventsProcessed !== void 0 && import_react.default.createElement(
|
|
1233
1278
|
"div",
|
|
1234
1279
|
{ style: S.row },
|
|
1235
|
-
|
|
1236
|
-
|
|
1280
|
+
import_react.default.createElement("span", { style: S.varKey }, "Events processed"),
|
|
1281
|
+
import_react.default.createElement(
|
|
1237
1282
|
"span",
|
|
1238
1283
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1239
1284
|
String(metrics.eventsProcessed)
|
|
1240
1285
|
)
|
|
1241
1286
|
),
|
|
1242
|
-
metrics.batchesProcessed !== void 0 &&
|
|
1287
|
+
metrics.batchesProcessed !== void 0 && import_react.default.createElement(
|
|
1243
1288
|
"div",
|
|
1244
1289
|
{ style: S.row },
|
|
1245
|
-
|
|
1246
|
-
|
|
1290
|
+
import_react.default.createElement("span", { style: S.varKey }, "Batches"),
|
|
1291
|
+
import_react.default.createElement(
|
|
1247
1292
|
"span",
|
|
1248
1293
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1249
1294
|
String(metrics.batchesProcessed)
|
|
1250
1295
|
)
|
|
1251
1296
|
),
|
|
1252
|
-
metrics.incrementalUpdates !== void 0 &&
|
|
1297
|
+
metrics.incrementalUpdates !== void 0 && import_react.default.createElement(
|
|
1253
1298
|
"div",
|
|
1254
1299
|
{ style: S.row },
|
|
1255
|
-
|
|
1256
|
-
|
|
1300
|
+
import_react.default.createElement("span", { style: S.varKey }, "Incremental"),
|
|
1301
|
+
import_react.default.createElement(
|
|
1257
1302
|
"span",
|
|
1258
1303
|
{ style: { color: "#34d399", fontSize: "11px" } },
|
|
1259
1304
|
String(metrics.incrementalUpdates)
|
|
1260
1305
|
)
|
|
1261
1306
|
),
|
|
1262
|
-
metrics.fullRescans !== void 0 &&
|
|
1307
|
+
metrics.fullRescans !== void 0 && import_react.default.createElement(
|
|
1263
1308
|
"div",
|
|
1264
1309
|
{ style: S.row },
|
|
1265
|
-
|
|
1266
|
-
|
|
1310
|
+
import_react.default.createElement("span", { style: S.varKey }, "Full rescans"),
|
|
1311
|
+
import_react.default.createElement(
|
|
1267
1312
|
"span",
|
|
1268
1313
|
{ style: { color: "#fbbf24", fontSize: "11px" } },
|
|
1269
1314
|
String(metrics.fullRescans)
|
|
@@ -1271,15 +1316,15 @@ function TracePanel() {
|
|
|
1271
1316
|
)
|
|
1272
1317
|
),
|
|
1273
1318
|
// ── Memory ───────────────────────────────────────────────────────────
|
|
1274
|
-
metrics.memoryMb &&
|
|
1319
|
+
metrics.memoryMb && import_react.default.createElement(
|
|
1275
1320
|
"div",
|
|
1276
1321
|
{ style: S.section },
|
|
1277
|
-
|
|
1278
|
-
|
|
1322
|
+
import_react.default.createElement("div", { style: { ...S.sectionTitle, marginBottom: "6px" } }, "Memory"),
|
|
1323
|
+
import_react.default.createElement(
|
|
1279
1324
|
"div",
|
|
1280
1325
|
{ style: S.row },
|
|
1281
|
-
|
|
1282
|
-
|
|
1326
|
+
import_react.default.createElement("span", { style: S.varKey }, "Heap used"),
|
|
1327
|
+
import_react.default.createElement(
|
|
1283
1328
|
"span",
|
|
1284
1329
|
{
|
|
1285
1330
|
style: {
|
|
@@ -1290,21 +1335,21 @@ function TracePanel() {
|
|
|
1290
1335
|
`${metrics.memoryMb.heapUsed.toFixed(1)}MB`
|
|
1291
1336
|
)
|
|
1292
1337
|
),
|
|
1293
|
-
|
|
1338
|
+
import_react.default.createElement(
|
|
1294
1339
|
"div",
|
|
1295
1340
|
{ style: S.row },
|
|
1296
|
-
|
|
1297
|
-
|
|
1341
|
+
import_react.default.createElement("span", { style: S.varKey }, "Heap total"),
|
|
1342
|
+
import_react.default.createElement(
|
|
1298
1343
|
"span",
|
|
1299
1344
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1300
1345
|
`${metrics.memoryMb.heapTotal.toFixed(1)}MB`
|
|
1301
1346
|
)
|
|
1302
1347
|
),
|
|
1303
|
-
|
|
1348
|
+
import_react.default.createElement(
|
|
1304
1349
|
"div",
|
|
1305
1350
|
{ style: S.row },
|
|
1306
|
-
|
|
1307
|
-
|
|
1351
|
+
import_react.default.createElement("span", { style: S.varKey }, "RSS"),
|
|
1352
|
+
import_react.default.createElement(
|
|
1308
1353
|
"span",
|
|
1309
1354
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1310
1355
|
`${metrics.memoryMb.rss.toFixed(1)}MB`
|
|
@@ -1312,49 +1357,49 @@ function TracePanel() {
|
|
|
1312
1357
|
)
|
|
1313
1358
|
),
|
|
1314
1359
|
// ── Workspace Summary ────────────────────────────────────────────────
|
|
1315
|
-
summary &&
|
|
1360
|
+
summary && import_react.default.createElement(
|
|
1316
1361
|
"div",
|
|
1317
1362
|
{ style: S.section },
|
|
1318
|
-
|
|
1363
|
+
import_react.default.createElement(
|
|
1319
1364
|
"div",
|
|
1320
1365
|
{ style: { ...S.sectionTitle, marginBottom: "6px" } },
|
|
1321
1366
|
"Workspace"
|
|
1322
1367
|
),
|
|
1323
|
-
|
|
1368
|
+
import_react.default.createElement(
|
|
1324
1369
|
"div",
|
|
1325
1370
|
{ style: S.row },
|
|
1326
|
-
|
|
1327
|
-
|
|
1371
|
+
import_react.default.createElement("span", { style: S.varKey }, "Packages"),
|
|
1372
|
+
import_react.default.createElement(
|
|
1328
1373
|
"span",
|
|
1329
1374
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1330
1375
|
String(summary.workspace?.totalPackages ?? "\u2014")
|
|
1331
1376
|
)
|
|
1332
1377
|
),
|
|
1333
|
-
|
|
1378
|
+
import_react.default.createElement(
|
|
1334
1379
|
"div",
|
|
1335
1380
|
{ style: S.row },
|
|
1336
|
-
|
|
1337
|
-
|
|
1381
|
+
import_react.default.createElement("span", { style: S.varKey }, "Files"),
|
|
1382
|
+
import_react.default.createElement(
|
|
1338
1383
|
"span",
|
|
1339
1384
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1340
1385
|
String(summary.workspace?.totalFiles ?? "\u2014")
|
|
1341
1386
|
)
|
|
1342
1387
|
),
|
|
1343
|
-
|
|
1388
|
+
import_react.default.createElement(
|
|
1344
1389
|
"div",
|
|
1345
1390
|
{ style: S.row },
|
|
1346
|
-
|
|
1347
|
-
|
|
1391
|
+
import_react.default.createElement("span", { style: S.varKey }, "Classes"),
|
|
1392
|
+
import_react.default.createElement(
|
|
1348
1393
|
"span",
|
|
1349
1394
|
{ style: { color: "#a1a1aa", fontSize: "11px" } },
|
|
1350
1395
|
String(summary.workspace?.totalClasses ?? "\u2014")
|
|
1351
1396
|
)
|
|
1352
1397
|
),
|
|
1353
|
-
|
|
1398
|
+
import_react.default.createElement(
|
|
1354
1399
|
"div",
|
|
1355
1400
|
{ style: S.row },
|
|
1356
|
-
|
|
1357
|
-
|
|
1401
|
+
import_react.default.createElement("span", { style: S.varKey }, "Cache hit rate"),
|
|
1402
|
+
import_react.default.createElement(
|
|
1358
1403
|
"span",
|
|
1359
1404
|
{
|
|
1360
1405
|
style: {
|
|
@@ -1367,10 +1412,10 @@ function TracePanel() {
|
|
|
1367
1412
|
)
|
|
1368
1413
|
),
|
|
1369
1414
|
// ── Build Time History ───────────────────────────────────────────────
|
|
1370
|
-
|
|
1415
|
+
import_react.default.createElement(
|
|
1371
1416
|
"div",
|
|
1372
1417
|
{ style: S.section },
|
|
1373
|
-
|
|
1418
|
+
import_react.default.createElement(
|
|
1374
1419
|
"div",
|
|
1375
1420
|
{ style: { ...S.sectionTitle, marginBottom: "6px" } },
|
|
1376
1421
|
`Build History (${history.length} snapshots)`
|
|
@@ -1378,7 +1423,7 @@ function TracePanel() {
|
|
|
1378
1423
|
renderHistoryChart()
|
|
1379
1424
|
),
|
|
1380
1425
|
// ── Timestamp ────────────────────────────────────────────────────────
|
|
1381
|
-
metrics.generatedAt &&
|
|
1426
|
+
metrics.generatedAt && import_react.default.createElement(
|
|
1382
1427
|
"div",
|
|
1383
1428
|
{
|
|
1384
1429
|
style: {
|
|
@@ -1394,16 +1439,16 @@ function TracePanel() {
|
|
|
1394
1439
|
}
|
|
1395
1440
|
function TwDevTools() {
|
|
1396
1441
|
if (process.env.NODE_ENV === "production") return null;
|
|
1397
|
-
const [state, setState] =
|
|
1442
|
+
const [state, setState] = (0, import_react.useState)({
|
|
1398
1443
|
open: false,
|
|
1399
1444
|
panel: "inspector",
|
|
1400
1445
|
pinned: false,
|
|
1401
1446
|
inspected: null,
|
|
1402
1447
|
position: { x: 0, y: 0 }
|
|
1403
1448
|
});
|
|
1404
|
-
const overlayRef =
|
|
1449
|
+
const overlayRef = (0, import_react.useRef)(null);
|
|
1405
1450
|
const isInspecting = state.open && state.panel === "inspector";
|
|
1406
|
-
|
|
1451
|
+
(0, import_react.useEffect)(() => {
|
|
1407
1452
|
const onKey = (e) => {
|
|
1408
1453
|
if (e.ctrlKey && e.shiftKey && e.key === "D") {
|
|
1409
1454
|
e.preventDefault();
|
|
@@ -1421,7 +1466,7 @@ function TwDevTools() {
|
|
|
1421
1466
|
window.addEventListener("keydown", onKey);
|
|
1422
1467
|
return () => window.removeEventListener("keydown", onKey);
|
|
1423
1468
|
}, []);
|
|
1424
|
-
const onMouseMove =
|
|
1469
|
+
const onMouseMove = (0, import_react.useCallback)(
|
|
1425
1470
|
(e) => {
|
|
1426
1471
|
if (!isInspecting || state.pinned) return;
|
|
1427
1472
|
const twEl = findNearestTwElement(e.target);
|
|
@@ -1449,7 +1494,7 @@ function TwDevTools() {
|
|
|
1449
1494
|
},
|
|
1450
1495
|
[isInspecting, state.pinned]
|
|
1451
1496
|
);
|
|
1452
|
-
const onClick =
|
|
1497
|
+
const onClick = (0, import_react.useCallback)(
|
|
1453
1498
|
(e) => {
|
|
1454
1499
|
if (!isInspecting) return;
|
|
1455
1500
|
if (overlayRef.current?.contains(e.target)) return;
|
|
@@ -1457,7 +1502,7 @@ function TwDevTools() {
|
|
|
1457
1502
|
},
|
|
1458
1503
|
[isInspecting]
|
|
1459
1504
|
);
|
|
1460
|
-
|
|
1505
|
+
(0, import_react.useEffect)(() => {
|
|
1461
1506
|
if (!isInspecting) return;
|
|
1462
1507
|
window.addEventListener("mousemove", onMouseMove);
|
|
1463
1508
|
window.addEventListener("click", onClick);
|
|
@@ -1467,7 +1512,7 @@ function TwDevTools() {
|
|
|
1467
1512
|
};
|
|
1468
1513
|
}, [isInspecting, onMouseMove, onClick]);
|
|
1469
1514
|
if (!state.open) {
|
|
1470
|
-
return
|
|
1515
|
+
return import_react.default.createElement(
|
|
1471
1516
|
"button",
|
|
1472
1517
|
{
|
|
1473
1518
|
onClick: () => setState((s) => ({ ...s, open: true })),
|
|
@@ -1485,11 +1530,11 @@ function TwDevTools() {
|
|
|
1485
1530
|
{ id: "analyzer", label: "Analyzer", icon: "\u{1F4CA}" },
|
|
1486
1531
|
{ id: "trace", label: "Trace", icon: "\u{1F52C}" }
|
|
1487
1532
|
];
|
|
1488
|
-
return
|
|
1533
|
+
return import_react.default.createElement(
|
|
1489
1534
|
"div",
|
|
1490
1535
|
{ style: S.root },
|
|
1491
1536
|
// ── Element highlight (inspector only) ──────────────────────────────
|
|
1492
|
-
isInspecting && state.inspected &&
|
|
1537
|
+
isInspecting && state.inspected && import_react.default.createElement("div", {
|
|
1493
1538
|
style: {
|
|
1494
1539
|
...S.highlight,
|
|
1495
1540
|
top: state.inspected.rect.top + window.scrollY,
|
|
@@ -1499,7 +1544,7 @@ function TwDevTools() {
|
|
|
1499
1544
|
}
|
|
1500
1545
|
}),
|
|
1501
1546
|
// ── Component name label ────────────────────────────────────────────
|
|
1502
|
-
isInspecting && state.inspected &&
|
|
1547
|
+
isInspecting && state.inspected && import_react.default.createElement(
|
|
1503
1548
|
"div",
|
|
1504
1549
|
{
|
|
1505
1550
|
style: {
|
|
@@ -1519,7 +1564,7 @@ function TwDevTools() {
|
|
|
1519
1564
|
state.inspected.componentName
|
|
1520
1565
|
),
|
|
1521
1566
|
// ── Main DevTools panel ─────────────────────────────────────────────
|
|
1522
|
-
|
|
1567
|
+
import_react.default.createElement(
|
|
1523
1568
|
"div",
|
|
1524
1569
|
{
|
|
1525
1570
|
ref: overlayRef,
|
|
@@ -1536,19 +1581,19 @@ function TwDevTools() {
|
|
|
1536
1581
|
}
|
|
1537
1582
|
},
|
|
1538
1583
|
// Header
|
|
1539
|
-
|
|
1584
|
+
import_react.default.createElement(
|
|
1540
1585
|
"div",
|
|
1541
1586
|
{ style: S.header },
|
|
1542
|
-
|
|
1587
|
+
import_react.default.createElement(
|
|
1543
1588
|
"span",
|
|
1544
1589
|
{ style: S.componentName },
|
|
1545
1590
|
state.inspected && state.panel === "inspector" ? state.inspected.componentName : "tailwind-styled-v4"
|
|
1546
1591
|
),
|
|
1547
|
-
|
|
1592
|
+
import_react.default.createElement(
|
|
1548
1593
|
"div",
|
|
1549
1594
|
{ style: S.headerActions },
|
|
1550
|
-
state.pinned &&
|
|
1551
|
-
|
|
1595
|
+
state.pinned && import_react.default.createElement("span", { style: S.pinBadge }, "\u{1F4CC}"),
|
|
1596
|
+
import_react.default.createElement(
|
|
1552
1597
|
"button",
|
|
1553
1598
|
{
|
|
1554
1599
|
style: S.closeBtn,
|
|
@@ -1559,11 +1604,11 @@ function TwDevTools() {
|
|
|
1559
1604
|
)
|
|
1560
1605
|
),
|
|
1561
1606
|
// Tab bar
|
|
1562
|
-
|
|
1607
|
+
import_react.default.createElement(
|
|
1563
1608
|
"div",
|
|
1564
1609
|
{ style: S.tabBar },
|
|
1565
1610
|
PANELS.map(
|
|
1566
|
-
(p) =>
|
|
1611
|
+
(p) => import_react.default.createElement(
|
|
1567
1612
|
"button",
|
|
1568
1613
|
{
|
|
1569
1614
|
key: p.id,
|
|
@@ -1581,23 +1626,23 @@ function TwDevTools() {
|
|
|
1581
1626
|
)
|
|
1582
1627
|
),
|
|
1583
1628
|
// Panel content
|
|
1584
|
-
state.panel === "inspector" &&
|
|
1629
|
+
state.panel === "inspector" && import_react.default.createElement(InspectorPanel, {
|
|
1585
1630
|
inspected: state.inspected,
|
|
1586
1631
|
position: state.position,
|
|
1587
1632
|
pinned: state.pinned
|
|
1588
1633
|
}),
|
|
1589
|
-
state.panel === "state" &&
|
|
1590
|
-
state.panel === "container" &&
|
|
1591
|
-
state.panel === "tokens" &&
|
|
1592
|
-
state.panel === "analyzer" &&
|
|
1593
|
-
state.panel === "trace" &&
|
|
1634
|
+
state.panel === "state" && import_react.default.createElement(StatePanel, null),
|
|
1635
|
+
state.panel === "container" && import_react.default.createElement(ContainerPanel, null),
|
|
1636
|
+
state.panel === "tokens" && import_react.default.createElement(TokensPanel, null),
|
|
1637
|
+
state.panel === "analyzer" && import_react.default.createElement(AnalyzerPanel, null),
|
|
1638
|
+
state.panel === "trace" && import_react.default.createElement(TracePanel, null)
|
|
1594
1639
|
),
|
|
1595
1640
|
// ── Status bar ──────────────────────────────────────────────────────
|
|
1596
|
-
|
|
1641
|
+
import_react.default.createElement(
|
|
1597
1642
|
"div",
|
|
1598
1643
|
{ style: S.statusBar },
|
|
1599
|
-
|
|
1600
|
-
|
|
1644
|
+
import_react.default.createElement("span", null, "\u{1F3A8} tailwind-styled-v4 DevTools"),
|
|
1645
|
+
import_react.default.createElement(
|
|
1601
1646
|
"span",
|
|
1602
1647
|
{ style: { opacity: 0.6, fontSize: "10px" } },
|
|
1603
1648
|
state.pinned ? "Click to unpin" : isInspecting ? "Hover to inspect \xB7 Click to pin \xB7 1-6 switch panel \xB7 Esc close" : "Ctrl+Shift+D close \xB7 1-6 switch panel"
|
|
@@ -1779,20 +1824,21 @@ var S = {
|
|
|
1779
1824
|
};
|
|
1780
1825
|
function DevToolsProvider() {
|
|
1781
1826
|
if (process.env.NODE_ENV === "production") return null;
|
|
1782
|
-
return
|
|
1827
|
+
return import_react.default.createElement(TwDevTools);
|
|
1783
1828
|
}
|
|
1784
|
-
|
|
1785
|
-
exports
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1829
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1830
|
+
0 && (module.exports = {
|
|
1831
|
+
DevToolsProvider,
|
|
1832
|
+
TwDevTools,
|
|
1833
|
+
fetchClassInspection,
|
|
1834
|
+
formatClassInspectionCli,
|
|
1835
|
+
formatClassInspectionJson,
|
|
1836
|
+
formatDuration,
|
|
1837
|
+
formatMemory,
|
|
1838
|
+
getBuildTimeColor,
|
|
1839
|
+
getHealthColor,
|
|
1840
|
+
getMemoryColor,
|
|
1841
|
+
getModeColor,
|
|
1842
|
+
getPipelinePercentages
|
|
1843
|
+
});
|
|
1798
1844
|
//# sourceMappingURL=devtools.js.map
|