@fluixi/devtools 1.0.0-alpha.108 → 1.0.0-alpha.110
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/callsite.mjs +4 -63
- package/dist/change-view.mjs +6 -106
- package/dist/chunk-235BSS43.mjs +185 -0
- package/dist/chunk-2ACSNLS6.mjs +87 -0
- package/dist/chunk-2VDMQ3VF.mjs +520 -0
- package/dist/chunk-33U2S43X.mjs +121 -0
- package/dist/chunk-B3SAJ7QG.mjs +72 -0
- package/dist/chunk-BTCWJTXR.mjs +216 -0
- package/dist/chunk-CPZWLBCQ.mjs +35 -0
- package/dist/chunk-D25KZZBZ.mjs +212 -0
- package/dist/chunk-EBSROPWJ.mjs +314 -0
- package/dist/chunk-F664XLZL.mjs +743 -0
- package/dist/chunk-FY5K3QVT.mjs +35 -0
- package/dist/chunk-GDQXCOQB.mjs +43 -0
- package/dist/chunk-JLNWT36I.mjs +118 -0
- package/dist/chunk-JTHAZJJZ.mjs +780 -0
- package/dist/chunk-L6XQGNMW.mjs +106 -0
- package/dist/chunk-MN6O673L.mjs +90 -0
- package/dist/chunk-NDUBBBNL.mjs +70 -0
- package/dist/chunk-NT7YMK77.mjs +157 -0
- package/dist/chunk-NVULLJDH.mjs +120 -0
- package/dist/chunk-NWLSDERQ.mjs +68 -0
- package/dist/chunk-OPIGF5XB.mjs +184 -0
- package/dist/chunk-P5I7DWFX.mjs +292 -0
- package/dist/chunk-PSSBFXBD.mjs +155 -0
- package/dist/chunk-PTQ5VCYE.mjs +103 -0
- package/dist/chunk-UAEJ3N7F.mjs +76 -0
- package/dist/chunk-V6DKWEYD.mjs +67 -0
- package/dist/chunk-VO2V7AC5.mjs +80 -0
- package/dist/chunk-WGQH7RUW.mjs +25 -0
- package/dist/chunk-Z6KYHEKY.mjs +64 -0
- package/dist/copy.mjs +3 -39
- package/dist/describe.mjs +3 -31
- package/dist/detail-panel.cjs +2 -1
- package/dist/detail-panel.d.ts.map +1 -1
- package/dist/detail-panel.js +1 -0
- package/dist/detail-panel.mjs +6 -280
- package/dist/diff.mjs +4 -201
- package/dist/dom.mjs +7 -176
- package/dist/export.mjs +6 -207
- package/dist/float.mjs +5 -206
- package/dist/format.mjs +5 -151
- package/dist/graph-view.mjs +9 -875
- package/dist/highlight.mjs +6 -113
- package/dist/history.cjs +14 -2
- package/dist/history.d.ts +8 -1
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +15 -2
- package/dist/history.mjs +4 -70
- package/dist/hook.cjs +26 -1
- package/dist/hook.d.ts +4 -0
- package/dist/hook.d.ts.map +1 -1
- package/dist/hook.js +13 -0
- package/dist/hook.mjs +16 -1719
- package/dist/index.cjs +34 -5
- package/dist/index.mjs +106 -4673
- package/dist/inspector.mjs +11 -677
- package/dist/instrument.mjs +9 -486
- package/dist/kind-filter.mjs +6 -148
- package/dist/menu.mjs +4 -116
- package/dist/observe.cjs +15 -1
- package/dist/observe.d.ts +2 -0
- package/dist/observe.d.ts.map +1 -1
- package/dist/observe.js +3 -0
- package/dist/observe.mjs +14 -1510
- package/dist/palette.mjs +6 -28
- package/dist/path.mjs +3 -21
- package/dist/plugin.mjs +9 -57
- package/dist/plugins/context.mjs +6 -71
- package/dist/plugins/directives.mjs +8 -68
- package/dist/plugins/index.cjs +1 -1
- package/dist/plugins/index.mjs +13 -136
- package/dist/source.mjs +12 -93
- package/dist/timeline.cjs +5 -2
- package/dist/timeline.d.ts.map +1 -1
- package/dist/timeline.js +5 -1
- package/dist/timeline.mjs +7 -323
- package/dist/tree.mjs +11 -558
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/value-pane.mjs +6 -196
- package/dist/wire.cjs +1 -1
- package/dist/wire.mjs +6 -86
- package/package.json +3 -3
package/dist/menu.mjs
CHANGED
|
@@ -1,119 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
root.className = "fx-menu";
|
|
6
|
-
const button = doc.createElement("button");
|
|
7
|
-
button.type = "button";
|
|
8
|
-
button.className = "fx-menu-button fx-dropdown-btn";
|
|
9
|
-
button.setAttribute("aria-haspopup", "true");
|
|
10
|
-
button.setAttribute("aria-expanded", "false");
|
|
11
|
-
if (options.hint) button.title = options.hint;
|
|
12
|
-
const caret = doc.createElement("div");
|
|
13
|
-
caret.className = "fx-dropdown-caret";
|
|
14
|
-
const panel = doc.createElement("div");
|
|
15
|
-
panel.className = "fx-menu-panel";
|
|
16
|
-
if (options.menuClass) {
|
|
17
|
-
panel.classList.add(...options.menuClass.split(/\s+/).filter((c) => c));
|
|
18
|
-
}
|
|
19
|
-
panel.hidden = true;
|
|
20
|
-
const boxes = /* @__PURE__ */ new Map();
|
|
21
|
-
for (const item of options.items) {
|
|
22
|
-
if (item.type === "action") {
|
|
23
|
-
const run = doc.createElement("button");
|
|
24
|
-
run.type = "button";
|
|
25
|
-
run.className = "fx-menu-action";
|
|
26
|
-
run.textContent = item.label;
|
|
27
|
-
if (item.hint) run.title = item.hint;
|
|
28
|
-
run.addEventListener("click", () => {
|
|
29
|
-
close();
|
|
30
|
-
item.onRun();
|
|
31
|
-
});
|
|
32
|
-
panel.append(run);
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
const box = doc.createElement("input");
|
|
36
|
-
box.type = "checkbox";
|
|
37
|
-
box.checked = item.on === true;
|
|
38
|
-
const row = doc.createElement("label");
|
|
39
|
-
if (item.hint) row.title = item.hint;
|
|
40
|
-
row.append(box, doc.createTextNode(item.label));
|
|
41
|
-
box.addEventListener("change", () => {
|
|
42
|
-
paint();
|
|
43
|
-
item.onChange(box.checked);
|
|
44
|
-
});
|
|
45
|
-
panel.append(row);
|
|
46
|
-
boxes.set(item.label, box);
|
|
47
|
-
}
|
|
48
|
-
root.append(button, panel);
|
|
49
|
-
host.append(root);
|
|
50
|
-
function paint() {
|
|
51
|
-
let on = 0;
|
|
52
|
-
for (const box of boxes.values()) if (box.checked) on++;
|
|
53
|
-
button.textContent = on ? `${options.label} · ${on}` : options.label;
|
|
54
|
-
button.appendChild(caret);
|
|
55
|
-
button.classList.toggle("on", on > 0);
|
|
56
|
-
}
|
|
57
|
-
function close() {
|
|
58
|
-
panel.hidden = true;
|
|
59
|
-
button.setAttribute("aria-expanded", "false");
|
|
60
|
-
}
|
|
61
|
-
button.addEventListener("click", (event) => {
|
|
62
|
-
event.stopPropagation();
|
|
63
|
-
panel.hidden = !panel.hidden;
|
|
64
|
-
button.setAttribute("aria-expanded", String(!panel.hidden));
|
|
65
|
-
});
|
|
66
|
-
panel.addEventListener("click", (event) => event.stopPropagation());
|
|
67
|
-
const away = () => close();
|
|
68
|
-
const key = (event) => {
|
|
69
|
-
if (event.key === "Escape") close();
|
|
70
|
-
};
|
|
71
|
-
doc.addEventListener("click", away);
|
|
72
|
-
doc.addEventListener("keydown", key);
|
|
73
|
-
paint();
|
|
74
|
-
return {
|
|
75
|
-
set(label, on) {
|
|
76
|
-
const box = boxes.get(label);
|
|
77
|
-
if (!box) return;
|
|
78
|
-
box.checked = on;
|
|
79
|
-
paint();
|
|
80
|
-
},
|
|
81
|
-
destroy() {
|
|
82
|
-
doc.removeEventListener("click", away);
|
|
83
|
-
doc.removeEventListener("keydown", key);
|
|
84
|
-
root.remove();
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
var MENU_CSS = `
|
|
89
|
-
/* The button itself is styled by DROPDOWN_FILTER_CSS, shared with the kind filter. */
|
|
90
|
-
.fx-menu { position: relative; display: inline-flex; }
|
|
91
|
-
.fx-menu-button { white-space: nowrap; position: relative; padding-inline-end: 1.1rem; }
|
|
92
|
-
/* hidden is display:none from the user agent, which a class setting display outranks. */
|
|
93
|
-
.fx-menu-panel[hidden] { display: none; }
|
|
94
|
-
.fx-menu-panel {
|
|
95
|
-
position: absolute; top: calc(100% + 4px); z-index: 40;
|
|
96
|
-
display: grid; gap: 2px; padding: 6px 8px; min-width: 150px;
|
|
97
|
-
background: var(--fx-panel, #14161c);
|
|
98
|
-
border: 1px solid var(--fx-line, #262a35); border-radius: 6px;
|
|
99
|
-
box-shadow: 0 6px 18px rgba(0, 0, 0, .38);
|
|
100
|
-
}
|
|
101
|
-
.fx-menu-panel:not(.fx-panel-left){ right: 0; }
|
|
102
|
-
.fx-menu-panel.fx-panel-left { left: 0; }
|
|
103
|
-
.fx-menu-panel label {
|
|
104
|
-
display: flex; align-items: center; gap: 6px;
|
|
105
|
-
font-size: 11px; color: var(--fx-muted, #8a90a2); cursor: pointer; user-select: none;
|
|
106
|
-
}
|
|
107
|
-
.fx-menu-panel label:hover { color: var(--fx-label, #e7e9ee); }
|
|
108
|
-
.fx-menu-panel input { width: 11px; height: 11px; margin: 0; accent-color: var(--fx-accent, #5eead4); }
|
|
109
|
-
.fx-menu-action {
|
|
110
|
-
text-align: left; padding: 2px 0; border: 0; background: none; cursor: pointer;
|
|
111
|
-
font: inherit; font-size: 11px; color: var(--fx-muted, #8a90a2);
|
|
112
|
-
/* A button does not inherit this, so an action read lowercase beside uppercase toggles. */
|
|
113
|
-
text-transform: inherit; letter-spacing: inherit;
|
|
114
|
-
}
|
|
115
|
-
.fx-menu-action:hover { color: var(--fx-accent, #5eead4); }
|
|
116
|
-
`;
|
|
1
|
+
import {
|
|
2
|
+
MENU_CSS,
|
|
3
|
+
createMenu
|
|
4
|
+
} from "./chunk-33U2S43X.mjs";
|
|
117
5
|
export {
|
|
118
6
|
MENU_CSS,
|
|
119
7
|
createMenu
|
package/dist/observe.cjs
CHANGED
|
@@ -326,6 +326,8 @@ var OFF = {
|
|
|
326
326
|
},
|
|
327
327
|
disposed() {
|
|
328
328
|
},
|
|
329
|
+
marked() {
|
|
330
|
+
},
|
|
329
331
|
take: () => [],
|
|
330
332
|
dropped: 0,
|
|
331
333
|
clear() {
|
|
@@ -337,6 +339,7 @@ function createHistory(limit) {
|
|
|
337
339
|
let seq = 0;
|
|
338
340
|
let commit = 0;
|
|
339
341
|
let dropped = 0;
|
|
342
|
+
let held = false;
|
|
340
343
|
const push = (event) => {
|
|
341
344
|
events.push({ ...event, seq: seq++, t: Date.now(), commit });
|
|
342
345
|
if (events.length > limit) {
|
|
@@ -346,7 +349,10 @@ function createHistory(limit) {
|
|
|
346
349
|
};
|
|
347
350
|
return {
|
|
348
351
|
wrote(id, by, detail) {
|
|
349
|
-
if (by === void 0)
|
|
352
|
+
if (by === void 0) {
|
|
353
|
+
if (held) held = false;
|
|
354
|
+
else commit++;
|
|
355
|
+
}
|
|
350
356
|
push({ kind: "write", id, by, ...detail });
|
|
351
357
|
},
|
|
352
358
|
ran(id, by) {
|
|
@@ -358,6 +364,11 @@ function createHistory(limit) {
|
|
|
358
364
|
disposed(id, label) {
|
|
359
365
|
push({ kind: "disposed", id, label });
|
|
360
366
|
},
|
|
367
|
+
marked(label) {
|
|
368
|
+
commit++;
|
|
369
|
+
held = true;
|
|
370
|
+
push({ kind: "mark", id: -1, label });
|
|
371
|
+
},
|
|
361
372
|
take() {
|
|
362
373
|
const taken = events;
|
|
363
374
|
events = [];
|
|
@@ -1445,6 +1456,9 @@ function observeGraph(options = {}) {
|
|
|
1445
1456
|
takeEvents() {
|
|
1446
1457
|
return history.take();
|
|
1447
1458
|
},
|
|
1459
|
+
mark(label) {
|
|
1460
|
+
history.marked(label);
|
|
1461
|
+
},
|
|
1448
1462
|
detach() {
|
|
1449
1463
|
stop();
|
|
1450
1464
|
internals.clear();
|
package/dist/observe.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export interface ObservedGraph {
|
|
|
31
31
|
takeRemoved(): number[];
|
|
32
32
|
/** What happened since the last call, in order. Empty when history is off. */
|
|
33
33
|
takeEvents(): GraphEvent[];
|
|
34
|
+
/** Open a commit named `label`, such as a hot update; the writes that follow land in it. */
|
|
35
|
+
mark(label: string): void;
|
|
34
36
|
/** Where this node reaches the page, for whatever is still on it. */
|
|
35
37
|
elementsFor(id: number): Element[];
|
|
36
38
|
/** The node driving `element`, or the nearest ancestor that has one. */
|
package/dist/observe.d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