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