@fluixi/devtools 0.2.0-alpha.2 → 0.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -2
- package/dist/callsite.cjs +72 -0
- package/dist/callsite.d.ts +22 -0
- package/dist/callsite.d.ts.map +1 -0
- package/dist/callsite.js +82 -0
- package/dist/callsite.mjs +51 -0
- package/dist/change-view.cjs +134 -0
- package/dist/change-view.d.ts +10 -0
- package/dist/change-view.d.ts.map +1 -0
- package/dist/change-view.js +102 -0
- package/dist/change-view.mjs +111 -0
- package/dist/copy.cjs +63 -0
- package/dist/copy.d.ts +9 -0
- package/dist/copy.d.ts.map +1 -0
- package/dist/copy.js +52 -0
- package/dist/copy.mjs +42 -0
- package/dist/describe.cjs +55 -0
- package/dist/describe.d.ts +3 -0
- package/dist/describe.d.ts.map +1 -0
- package/dist/describe.js +47 -0
- package/dist/describe.mjs +34 -0
- package/dist/detail-panel.cjs +307 -0
- package/dist/detail-panel.d.ts +17 -0
- package/dist/detail-panel.d.ts.map +1 -0
- package/dist/detail-panel.js +217 -0
- package/dist/detail-panel.mjs +284 -0
- package/dist/diff.cjs +225 -0
- package/dist/diff.d.ts +31 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +132 -0
- package/dist/diff.mjs +202 -0
- package/dist/dom.cjs +204 -0
- package/dist/dom.d.ts +81 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +269 -0
- package/dist/dom.mjs +183 -0
- package/dist/export.cjs +221 -0
- package/dist/export.d.ts +55 -0
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +90 -0
- package/dist/export.mjs +209 -0
- package/dist/float.cjs +232 -0
- package/dist/float.d.ts +54 -0
- package/dist/float.d.ts.map +1 -0
- package/dist/float.js +256 -0
- package/dist/float.mjs +211 -0
- package/dist/format.cjs +175 -0
- package/dist/format.d.ts +16 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +188 -0
- package/dist/format.mjs +154 -0
- package/dist/graph-view.cjs +893 -0
- package/dist/graph-view.d.ts +79 -2
- package/dist/graph-view.d.ts.map +1 -1
- package/dist/graph-view.js +866 -50
- package/dist/graph-view.mjs +870 -0
- package/dist/highlight.cjs +140 -0
- package/dist/highlight.d.ts +56 -0
- package/dist/highlight.d.ts.map +1 -0
- package/dist/highlight.js +154 -0
- package/dist/highlight.mjs +119 -0
- package/dist/history.cjs +95 -0
- package/dist/history.d.ts +59 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +85 -0
- package/dist/history.mjs +74 -0
- package/dist/hook.cjs +1562 -0
- package/dist/hook.d.ts +60 -0
- package/dist/hook.d.ts.map +1 -0
- package/dist/hook.js +142 -0
- package/dist/hook.mjs +1553 -0
- package/dist/index.cjs +4552 -0
- package/dist/index.d.ts +44 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -1
- package/dist/index.mjs +4544 -0
- package/dist/inspector.cjs +688 -0
- package/dist/inspector.d.ts +60 -0
- package/dist/inspector.d.ts.map +1 -0
- package/dist/inspector.js +415 -0
- package/dist/inspector.mjs +676 -0
- package/dist/instrument.cjs +497 -0
- package/dist/instrument.d.ts +147 -5
- package/dist/instrument.d.ts.map +1 -1
- package/dist/instrument.js +164 -44
- package/dist/instrument.mjs +487 -0
- package/dist/kind-filter.cjs +172 -0
- package/dist/kind-filter.d.ts +39 -0
- package/dist/kind-filter.d.ts.map +1 -0
- package/dist/kind-filter.js +151 -0
- package/dist/kind-filter.mjs +151 -0
- package/dist/menu.cjs +141 -0
- package/dist/menu.d.ts +37 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +125 -0
- package/dist/menu.mjs +120 -0
- package/dist/observe.cjs +1352 -0
- package/dist/observe.d.ts +80 -0
- package/dist/observe.d.ts.map +1 -0
- package/dist/observe.js +893 -0
- package/dist/observe.mjs +1345 -0
- package/dist/palette.cjs +52 -0
- package/dist/palette.d.ts +11 -0
- package/dist/palette.d.ts.map +1 -0
- package/dist/palette.js +27 -0
- package/dist/palette.mjs +31 -0
- package/dist/path.cjs +45 -0
- package/dist/path.d.ts +19 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +49 -0
- package/dist/path.mjs +24 -0
- package/dist/plugin.cjs +87 -0
- package/dist/plugin.d.ts +121 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +74 -0
- package/dist/plugin.mjs +66 -0
- package/dist/plugins/context.cjs +98 -0
- package/dist/plugins/context.d.ts +10 -0
- package/dist/plugins/context.d.ts.map +1 -0
- package/dist/plugins/context.js +80 -0
- package/dist/plugins/context.mjs +75 -0
- package/dist/plugins/directives.cjs +98 -0
- package/dist/plugins/directives.d.ts +25 -0
- package/dist/plugins/directives.d.ts.map +1 -0
- package/dist/plugins/directives.js +78 -0
- package/dist/plugins/directives.mjs +75 -0
- package/dist/plugins/index.cjs +162 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +9 -0
- package/dist/plugins/index.mjs +140 -0
- package/dist/source.cjs +111 -0
- package/dist/source.d.ts +72 -0
- package/dist/source.d.ts.map +1 -0
- package/dist/source.js +153 -0
- package/dist/source.mjs +90 -0
- package/dist/timeline.cjs +350 -0
- package/dist/timeline.d.ts +30 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.js +271 -0
- package/dist/timeline.mjs +327 -0
- package/dist/tree.cjs +574 -0
- package/dist/tree.d.ts +128 -0
- package/dist/tree.d.ts.map +1 -0
- package/dist/tree.js +645 -0
- package/dist/tree.mjs +551 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/value-pane.cjs +223 -0
- package/dist/value-pane.d.ts +10 -0
- package/dist/value-pane.d.ts.map +1 -0
- package/dist/value-pane.js +61 -0
- package/dist/value-pane.mjs +200 -0
- package/dist/wire.cjs +109 -0
- package/dist/wire.d.ts +100 -0
- package/dist/wire.d.ts.map +1 -0
- package/dist/wire.js +93 -0
- package/dist/wire.mjs +89 -0
- package/package.json +17 -5
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// src/format.ts
|
|
2
|
+
function indentValue(text, pad = " ") {
|
|
3
|
+
const out = [];
|
|
4
|
+
let depth = 0;
|
|
5
|
+
let quote = null;
|
|
6
|
+
let line = "";
|
|
7
|
+
const flush = () => {
|
|
8
|
+
if (line.trim()) out.push(pad.repeat(depth) + line.trim());
|
|
9
|
+
line = "";
|
|
10
|
+
};
|
|
11
|
+
for (let i = 0; i < text.length; i++) {
|
|
12
|
+
const c = text[i];
|
|
13
|
+
if (quote) {
|
|
14
|
+
line += c;
|
|
15
|
+
if (c === quote && text[i - 1] !== "\\") quote = null;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
if (c === '"' || c === "'") {
|
|
19
|
+
quote = c;
|
|
20
|
+
line += c;
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (c === "{" || c === "[") {
|
|
24
|
+
line += c;
|
|
25
|
+
flush();
|
|
26
|
+
depth++;
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (c === "}" || c === "]") {
|
|
30
|
+
flush();
|
|
31
|
+
depth = Math.max(0, depth - 1);
|
|
32
|
+
line = c;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (c === ",") {
|
|
36
|
+
line += c;
|
|
37
|
+
flush();
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
line += c;
|
|
41
|
+
}
|
|
42
|
+
flush();
|
|
43
|
+
return out.join("\n");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/float.ts
|
|
47
|
+
var MIN_W = 240;
|
|
48
|
+
var MIN_H = 160;
|
|
49
|
+
function draggable(handle, onMove, onStart) {
|
|
50
|
+
handle.addEventListener("pointerdown", (event) => {
|
|
51
|
+
if (event.button !== 0) return;
|
|
52
|
+
if (event.target.closest("button")) return;
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
handle.setPointerCapture(event.pointerId);
|
|
55
|
+
const fromX = event.clientX;
|
|
56
|
+
const fromY = event.clientY;
|
|
57
|
+
onStart?.();
|
|
58
|
+
const move = (e) => onMove(e.clientX - fromX, e.clientY - fromY);
|
|
59
|
+
const stop = () => {
|
|
60
|
+
handle.removeEventListener("pointermove", move);
|
|
61
|
+
handle.removeEventListener("pointerup", stop);
|
|
62
|
+
handle.removeEventListener("pointercancel", stop);
|
|
63
|
+
handle.removeEventListener("lostpointercapture", stop);
|
|
64
|
+
if (handle.hasPointerCapture(event.pointerId)) handle.releasePointerCapture(event.pointerId);
|
|
65
|
+
};
|
|
66
|
+
handle.addEventListener("pointermove", move);
|
|
67
|
+
handle.addEventListener("pointerup", stop);
|
|
68
|
+
handle.addEventListener("pointercancel", stop);
|
|
69
|
+
handle.addEventListener("lostpointercapture", stop);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
var opened = 0;
|
|
73
|
+
function floatCard(doc, title, at) {
|
|
74
|
+
const card = doc.createElement("div");
|
|
75
|
+
card.className = "fx-float";
|
|
76
|
+
const spot = at ?? {
|
|
77
|
+
x: 60 + opened % 4 * 28,
|
|
78
|
+
y: 60 + opened % 4 * 28,
|
|
79
|
+
width: 360,
|
|
80
|
+
height: 280
|
|
81
|
+
};
|
|
82
|
+
opened += 1;
|
|
83
|
+
const bar = doc.createElement("div");
|
|
84
|
+
bar.className = "fx-float-bar";
|
|
85
|
+
const name = doc.createElement("span");
|
|
86
|
+
name.textContent = title;
|
|
87
|
+
bar.append(name);
|
|
88
|
+
card.append(bar);
|
|
89
|
+
let x = spot.x;
|
|
90
|
+
let y = spot.y;
|
|
91
|
+
let w = spot.width;
|
|
92
|
+
let h = spot.height;
|
|
93
|
+
const apply = () => {
|
|
94
|
+
const view = doc.defaultView;
|
|
95
|
+
const vw = view?.innerWidth ?? w;
|
|
96
|
+
const vh = view?.innerHeight ?? h;
|
|
97
|
+
w = Math.min(Math.max(MIN_W, w), vw);
|
|
98
|
+
h = Math.min(Math.max(MIN_H, h), vh);
|
|
99
|
+
x = Math.min(Math.max(0, x), Math.max(0, vw - w));
|
|
100
|
+
y = Math.min(Math.max(0, y), Math.max(0, vh - h));
|
|
101
|
+
card.style.left = `${x}px`;
|
|
102
|
+
card.style.top = `${y}px`;
|
|
103
|
+
card.style.width = `${w}px`;
|
|
104
|
+
card.style.height = `${h}px`;
|
|
105
|
+
};
|
|
106
|
+
let from = { x, y, w, h };
|
|
107
|
+
const remember = () => {
|
|
108
|
+
from = { x, y, w, h };
|
|
109
|
+
};
|
|
110
|
+
for (const edge of ["n", "s", "e", "w", "ne", "nw", "se", "sw"]) {
|
|
111
|
+
const handle = doc.createElement("div");
|
|
112
|
+
handle.className = `fx-float-h fx-float-${edge}`;
|
|
113
|
+
card.append(handle);
|
|
114
|
+
draggable(
|
|
115
|
+
handle,
|
|
116
|
+
(dx, dy) => {
|
|
117
|
+
if (edge.includes("e")) w = from.w + dx;
|
|
118
|
+
if (edge.includes("s")) h = from.h + dy;
|
|
119
|
+
if (edge.includes("w")) {
|
|
120
|
+
w = Math.max(MIN_W, from.w - dx);
|
|
121
|
+
x = from.x + from.w - w;
|
|
122
|
+
}
|
|
123
|
+
if (edge.includes("n")) {
|
|
124
|
+
h = Math.max(MIN_H, from.h - dy);
|
|
125
|
+
y = from.y + from.h - h;
|
|
126
|
+
}
|
|
127
|
+
apply();
|
|
128
|
+
},
|
|
129
|
+
remember
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
draggable(
|
|
133
|
+
bar,
|
|
134
|
+
(dx, dy) => {
|
|
135
|
+
x = from.x + dx;
|
|
136
|
+
y = from.y + dy;
|
|
137
|
+
apply();
|
|
138
|
+
},
|
|
139
|
+
remember
|
|
140
|
+
);
|
|
141
|
+
apply();
|
|
142
|
+
return { card, bar, remove: () => card.remove() };
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/value-pane.ts
|
|
146
|
+
var escape = (text) => text.replace(/[&<>"]/g, (c) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[c]);
|
|
147
|
+
function createValuePane(host) {
|
|
148
|
+
const doc = host.ownerDocument;
|
|
149
|
+
let built = null;
|
|
150
|
+
const close = () => {
|
|
151
|
+
built?.remove();
|
|
152
|
+
built = null;
|
|
153
|
+
};
|
|
154
|
+
const onKey = (event) => {
|
|
155
|
+
if (event.key === "Escape") close();
|
|
156
|
+
};
|
|
157
|
+
doc.addEventListener("keydown", onKey);
|
|
158
|
+
return {
|
|
159
|
+
open(title, text) {
|
|
160
|
+
close();
|
|
161
|
+
built = floatCard(doc, title, { x: 80, y: 80, width: 420, height: 320 });
|
|
162
|
+
const shut = doc.createElement("button");
|
|
163
|
+
shut.type = "button";
|
|
164
|
+
shut.className = "vp-close";
|
|
165
|
+
shut.textContent = "✕";
|
|
166
|
+
shut.title = "Close";
|
|
167
|
+
shut.addEventListener("click", close);
|
|
168
|
+
built.bar.append(shut);
|
|
169
|
+
const body = doc.createElement("pre");
|
|
170
|
+
body.className = "vp-body";
|
|
171
|
+
body.innerHTML = escape(indentValue(text));
|
|
172
|
+
built.card.append(body);
|
|
173
|
+
doc.body.appendChild(built.card);
|
|
174
|
+
},
|
|
175
|
+
close,
|
|
176
|
+
get isOpen() {
|
|
177
|
+
return built !== null;
|
|
178
|
+
},
|
|
179
|
+
destroy() {
|
|
180
|
+
doc.removeEventListener("keydown", onKey);
|
|
181
|
+
close();
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
var VALUE_PANE_CSS = `
|
|
186
|
+
.vp-close {
|
|
187
|
+
margin-left: auto; background: none; border: 0; cursor: pointer;
|
|
188
|
+
color: var(--fx-muted, #8a90a2); font-size: 12px; line-height: 1; padding: 2px 4px;
|
|
189
|
+
}
|
|
190
|
+
.vp-close:hover { color: var(--fx-label, #e7e9ee); }
|
|
191
|
+
.vp-body {
|
|
192
|
+
flex: 1; margin: 0; padding: 8px; overflow: auto; white-space: pre;
|
|
193
|
+
font-family: ui-monospace, monospace; font-size: 11.5px; line-height: 1.5;
|
|
194
|
+
color: var(--fx-label, #e7e9ee);
|
|
195
|
+
}
|
|
196
|
+
`;
|
|
197
|
+
export {
|
|
198
|
+
VALUE_PANE_CSS,
|
|
199
|
+
createValuePane
|
|
200
|
+
};
|
package/dist/wire.cjs
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*! @fluixi/devtools v0.2.0-alpha.4 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/wire.ts
|
|
22
|
+
var wire_exports = {};
|
|
23
|
+
__export(wire_exports, {
|
|
24
|
+
applySnapshot: () => applySnapshot,
|
|
25
|
+
serializeGraph: () => serializeGraph,
|
|
26
|
+
snapshotToRenderMap: () => snapshotToRenderMap
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(wire_exports);
|
|
29
|
+
var STATE_NAME = { 0: "clean", 1: "check", 2: "dirty" };
|
|
30
|
+
var STATE_CODE = { clean: 0, check: 1, dirty: 2 };
|
|
31
|
+
function serializeGraph(graph, now = Date.now(), options = {}) {
|
|
32
|
+
const nodes = [];
|
|
33
|
+
const wanted = options.ids ? new Set(options.ids) : null;
|
|
34
|
+
for (const node of graph.values()) {
|
|
35
|
+
if (wanted && !wanted.has(node.id)) continue;
|
|
36
|
+
const state = typeof node.core?.state === "number" ? STATE_NAME[node.core.state] : void 0;
|
|
37
|
+
nodes.push({
|
|
38
|
+
id: node.id,
|
|
39
|
+
label: node.label,
|
|
40
|
+
kind: node.kind,
|
|
41
|
+
authored: node.authored,
|
|
42
|
+
deps: [...node.deps],
|
|
43
|
+
writes: [...node.writes],
|
|
44
|
+
value: node.value,
|
|
45
|
+
detail: node.detail,
|
|
46
|
+
runs: node.runs,
|
|
47
|
+
lastPulse: node.lastPulse,
|
|
48
|
+
order: node.order,
|
|
49
|
+
version: node.core?.version,
|
|
50
|
+
state,
|
|
51
|
+
loading: node.loading,
|
|
52
|
+
lazy: node.lazy,
|
|
53
|
+
props: node.props,
|
|
54
|
+
extra: node.extra,
|
|
55
|
+
source: node.source,
|
|
56
|
+
declaredAt: node.declaredAt,
|
|
57
|
+
usedAt: node.usedAt,
|
|
58
|
+
createdIn: node.createdIn,
|
|
59
|
+
bindings: node.bindings,
|
|
60
|
+
targets: node.targets,
|
|
61
|
+
setAt: node.setAt,
|
|
62
|
+
// Falls back to what the node already carries, so a relay that re-serialises a
|
|
63
|
+
// snapshot it received does not drop the description.
|
|
64
|
+
dom: options.dom?.(node.id) ?? node.dom
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
const removed = options.removed ? [...options.removed] : void 0;
|
|
68
|
+
const events = options.events?.length ? [...options.events] : void 0;
|
|
69
|
+
const cursor = options.cursor;
|
|
70
|
+
return wanted ? { t: now, nodes, partial: true, removed, events, cursor } : { t: now, nodes, events, cursor };
|
|
71
|
+
}
|
|
72
|
+
function snapshotToRenderMap(snapshot) {
|
|
73
|
+
const map = /* @__PURE__ */ new Map();
|
|
74
|
+
for (const node of snapshot.nodes) {
|
|
75
|
+
map.set(node.id, {
|
|
76
|
+
id: node.id,
|
|
77
|
+
label: node.label,
|
|
78
|
+
kind: node.kind,
|
|
79
|
+
authored: node.authored,
|
|
80
|
+
deps: new Set(node.deps),
|
|
81
|
+
writes: new Set(node.writes),
|
|
82
|
+
value: node.value,
|
|
83
|
+
detail: node.detail,
|
|
84
|
+
runs: node.runs,
|
|
85
|
+
lastPulse: node.lastPulse,
|
|
86
|
+
order: node.order,
|
|
87
|
+
core: { version: node.version, state: node.state ? STATE_CODE[node.state] : void 0 },
|
|
88
|
+
loading: node.loading,
|
|
89
|
+
lazy: node.lazy,
|
|
90
|
+
props: node.props,
|
|
91
|
+
extra: node.extra,
|
|
92
|
+
source: node.source,
|
|
93
|
+
declaredAt: node.declaredAt,
|
|
94
|
+
usedAt: node.usedAt,
|
|
95
|
+
createdIn: node.createdIn,
|
|
96
|
+
bindings: node.bindings,
|
|
97
|
+
targets: node.targets,
|
|
98
|
+
setAt: node.setAt,
|
|
99
|
+
dom: node.dom
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return map;
|
|
103
|
+
}
|
|
104
|
+
function applySnapshot(graph, snapshot) {
|
|
105
|
+
if (!snapshot.partial) return snapshotToRenderMap(snapshot);
|
|
106
|
+
for (const [id, node] of snapshotToRenderMap(snapshot)) graph.set(id, node);
|
|
107
|
+
for (const id of snapshot.removed ?? []) graph.delete(id);
|
|
108
|
+
return graph;
|
|
109
|
+
}
|
package/dist/wire.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { DomTarget, NodeKind, NodeState, PropReport, RNode } from './instrument.js';
|
|
2
|
+
import type { ReactiveSourceLocation } from './source.js';
|
|
3
|
+
import type { DomNode } from './dom.js';
|
|
4
|
+
import type { GraphEvent } from './history.js';
|
|
5
|
+
export type { NodeKind, NodeState, DomTarget, PropReport } from './instrument.js';
|
|
6
|
+
export type { ReactiveSourceLocation } from './source.js';
|
|
7
|
+
export type { GraphEvent, GraphEventKind } from './history.js';
|
|
8
|
+
export interface WireNode {
|
|
9
|
+
readonly id: number;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly kind: NodeKind;
|
|
12
|
+
/** Whether the label is the author's own. Absent means the framework named it. */
|
|
13
|
+
readonly authored?: boolean;
|
|
14
|
+
/** Source ids read on the last run (read edges: source → this). */
|
|
15
|
+
readonly deps: number[];
|
|
16
|
+
/** Signal ids written while this node ran. Empty on an observed graph. */
|
|
17
|
+
readonly writes: number[];
|
|
18
|
+
readonly value?: string;
|
|
19
|
+
/** The value with room to read it, for a tooltip or an inspector. */
|
|
20
|
+
readonly detail?: string;
|
|
21
|
+
readonly runs: number;
|
|
22
|
+
/** Producer's Date.now() at the last change. The consumer's clock agrees with it. */
|
|
23
|
+
readonly lastPulse: number;
|
|
24
|
+
readonly order?: number;
|
|
25
|
+
readonly version?: number;
|
|
26
|
+
readonly state?: NodeState;
|
|
27
|
+
readonly loading?: boolean;
|
|
28
|
+
/** Arrived as its own chunk rather than in the page's first bundle. */
|
|
29
|
+
readonly lazy?: boolean;
|
|
30
|
+
/** Components only: the props the tag was handed. */
|
|
31
|
+
readonly props?: PropReport[];
|
|
32
|
+
/** What plugins attached, by plugin name. Passed through by a reader that lacks them. */
|
|
33
|
+
readonly extra?: Record<string, unknown>;
|
|
34
|
+
/** Where the node was created, when the compiler marked it. */
|
|
35
|
+
readonly source?: ReactiveSourceLocation;
|
|
36
|
+
/** Components only: where the component itself was declared. */
|
|
37
|
+
readonly declaredAt?: ReactiveSourceLocation;
|
|
38
|
+
/** The line of the application that led to a node the compiler did not mark. */
|
|
39
|
+
readonly usedAt?: ReactiveSourceLocation;
|
|
40
|
+
/** The node whose run created this one. */
|
|
41
|
+
readonly createdIn?: number;
|
|
42
|
+
/** How many dom bindings read it. */
|
|
43
|
+
readonly bindings?: number;
|
|
44
|
+
/** What those bindings write: the text of an `li`, the `class` of a `div`. */
|
|
45
|
+
readonly targets?: DomTarget[];
|
|
46
|
+
/** Where it is set from outside any computation. */
|
|
47
|
+
readonly setAt?: ReactiveSourceLocation[];
|
|
48
|
+
/**
|
|
49
|
+
* What this tag rendered, for a panel that is not in the page and so has no elements of
|
|
50
|
+
* its own. Only sent when the producer was asked for it.
|
|
51
|
+
*/
|
|
52
|
+
readonly dom?: DomNode[];
|
|
53
|
+
}
|
|
54
|
+
export interface GraphSnapshot {
|
|
55
|
+
/** Producer clock (ms since epoch), so a pulse still ages correctly after the trip. */
|
|
56
|
+
readonly t: number;
|
|
57
|
+
readonly nodes: WireNode[];
|
|
58
|
+
/** True when `nodes` is only what changed, so a consumer keeps the rest of what it has. */
|
|
59
|
+
readonly partial?: boolean;
|
|
60
|
+
/** Ids the producer no longer has. Only meaningful on a partial. */
|
|
61
|
+
readonly removed?: number[];
|
|
62
|
+
/**
|
|
63
|
+
* Why there is nothing to show, when a producer can say. A dev server that is running but
|
|
64
|
+
* has no devtools installed answers with this rather than with a 404, which reads the same
|
|
65
|
+
* as a server that is not a fluixi project at all.
|
|
66
|
+
*/
|
|
67
|
+
readonly reason?: string;
|
|
68
|
+
/** Oldest first, and always a delta: resending it would replay what the consumer has. */
|
|
69
|
+
readonly events?: GraphEvent[];
|
|
70
|
+
/**
|
|
71
|
+
* Where the producer had got to. A consumer folding in deltas keeps this and asks for
|
|
72
|
+
* what came after it, so two of them reading at their own pace both see every change.
|
|
73
|
+
*/
|
|
74
|
+
readonly cursor?: number;
|
|
75
|
+
}
|
|
76
|
+
export interface SerializeOptions {
|
|
77
|
+
/** Send only these nodes, being what `sample()` returned. Makes it a partial. */
|
|
78
|
+
ids?: Iterable<number>;
|
|
79
|
+
removed?: Iterable<number>;
|
|
80
|
+
/** What `takeEvents()` returned. Omitted rather than sent empty. */
|
|
81
|
+
events?: readonly GraphEvent[];
|
|
82
|
+
/**
|
|
83
|
+
* Describe what each tag rendered, so a panel elsewhere can draw the dom too. Off unless
|
|
84
|
+
* asked: it is the largest thing a snapshot can carry. Undefined for a node that rendered
|
|
85
|
+
* nothing, so the field is left off instead of sending an empty array per node.
|
|
86
|
+
*/
|
|
87
|
+
dom?: (id: number) => DomNode[] | undefined;
|
|
88
|
+
/** Passed through to the snapshot, for a consumer that will come back for more. */
|
|
89
|
+
cursor?: number;
|
|
90
|
+
}
|
|
91
|
+
/** Flatten a live graph for transport. */
|
|
92
|
+
export declare function serializeGraph(graph: Map<number, RNode>, now?: number, options?: SerializeOptions): GraphSnapshot;
|
|
93
|
+
/** Rebuild a graph the renderer can draw. Nodes have no reader: a snapshot is already read. */
|
|
94
|
+
export declare function snapshotToRenderMap(snapshot: GraphSnapshot): Map<number, RNode>;
|
|
95
|
+
/**
|
|
96
|
+
* Fold a snapshot into what is already on screen. A full one replaces the graph; a partial
|
|
97
|
+
* updates the nodes it carries and drops the ones the producer says are gone.
|
|
98
|
+
*/
|
|
99
|
+
export declare function applySnapshot(graph: Map<number, RNode>, snapshot: GraphSnapshot): Map<number, RNode>;
|
|
100
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"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"}
|
package/dist/wire.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
const STATE_NAME = { 0: 'clean', 1: 'check', 2: 'dirty' };
|
|
2
|
+
const STATE_CODE = { clean: 0, check: 1, dirty: 2 };
|
|
3
|
+
/** Flatten a live graph for transport. */
|
|
4
|
+
export function serializeGraph(graph, now = Date.now(), options = {}) {
|
|
5
|
+
const nodes = [];
|
|
6
|
+
const wanted = options.ids ? new Set(options.ids) : null;
|
|
7
|
+
for (const node of graph.values()) {
|
|
8
|
+
if (wanted && !wanted.has(node.id))
|
|
9
|
+
continue;
|
|
10
|
+
const state = typeof node.core?.state === 'number' ? STATE_NAME[node.core.state] : undefined;
|
|
11
|
+
nodes.push({
|
|
12
|
+
id: node.id,
|
|
13
|
+
label: node.label,
|
|
14
|
+
kind: node.kind,
|
|
15
|
+
authored: node.authored,
|
|
16
|
+
deps: [...node.deps],
|
|
17
|
+
writes: [...node.writes],
|
|
18
|
+
value: node.value,
|
|
19
|
+
detail: node.detail,
|
|
20
|
+
runs: node.runs,
|
|
21
|
+
lastPulse: node.lastPulse,
|
|
22
|
+
order: node.order,
|
|
23
|
+
version: node.core?.version,
|
|
24
|
+
state,
|
|
25
|
+
loading: node.loading,
|
|
26
|
+
lazy: node.lazy,
|
|
27
|
+
props: node.props,
|
|
28
|
+
extra: node.extra,
|
|
29
|
+
source: node.source,
|
|
30
|
+
declaredAt: node.declaredAt,
|
|
31
|
+
usedAt: node.usedAt,
|
|
32
|
+
createdIn: node.createdIn,
|
|
33
|
+
bindings: node.bindings,
|
|
34
|
+
targets: node.targets,
|
|
35
|
+
setAt: node.setAt,
|
|
36
|
+
// Falls back to what the node already carries, so a relay that re-serialises a
|
|
37
|
+
// snapshot it received does not drop the description.
|
|
38
|
+
dom: options.dom?.(node.id) ?? node.dom,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const removed = options.removed ? [...options.removed] : undefined;
|
|
42
|
+
const events = options.events?.length ? [...options.events] : undefined;
|
|
43
|
+
const cursor = options.cursor;
|
|
44
|
+
return wanted
|
|
45
|
+
? { t: now, nodes, partial: true, removed, events, cursor }
|
|
46
|
+
: { t: now, nodes, events, cursor };
|
|
47
|
+
}
|
|
48
|
+
/** Rebuild a graph the renderer can draw. Nodes have no reader: a snapshot is already read. */
|
|
49
|
+
export function snapshotToRenderMap(snapshot) {
|
|
50
|
+
const map = new Map();
|
|
51
|
+
for (const node of snapshot.nodes) {
|
|
52
|
+
map.set(node.id, {
|
|
53
|
+
id: node.id,
|
|
54
|
+
label: node.label,
|
|
55
|
+
kind: node.kind,
|
|
56
|
+
authored: node.authored,
|
|
57
|
+
deps: new Set(node.deps),
|
|
58
|
+
writes: new Set(node.writes),
|
|
59
|
+
value: node.value,
|
|
60
|
+
detail: node.detail,
|
|
61
|
+
runs: node.runs,
|
|
62
|
+
lastPulse: node.lastPulse,
|
|
63
|
+
order: node.order,
|
|
64
|
+
core: { version: node.version, state: node.state ? STATE_CODE[node.state] : undefined },
|
|
65
|
+
loading: node.loading,
|
|
66
|
+
lazy: node.lazy,
|
|
67
|
+
props: node.props,
|
|
68
|
+
extra: node.extra,
|
|
69
|
+
source: node.source,
|
|
70
|
+
declaredAt: node.declaredAt,
|
|
71
|
+
usedAt: node.usedAt,
|
|
72
|
+
createdIn: node.createdIn,
|
|
73
|
+
bindings: node.bindings,
|
|
74
|
+
targets: node.targets,
|
|
75
|
+
setAt: node.setAt,
|
|
76
|
+
dom: node.dom,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return map;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Fold a snapshot into what is already on screen. A full one replaces the graph; a partial
|
|
83
|
+
* updates the nodes it carries and drops the ones the producer says are gone.
|
|
84
|
+
*/
|
|
85
|
+
export function applySnapshot(graph, snapshot) {
|
|
86
|
+
if (!snapshot.partial)
|
|
87
|
+
return snapshotToRenderMap(snapshot);
|
|
88
|
+
for (const [id, node] of snapshotToRenderMap(snapshot))
|
|
89
|
+
graph.set(id, node);
|
|
90
|
+
for (const id of snapshot.removed ?? [])
|
|
91
|
+
graph.delete(id);
|
|
92
|
+
return graph;
|
|
93
|
+
}
|
package/dist/wire.mjs
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*! @fluixi/devtools v0.2.0-alpha.4 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
|
+
|
|
3
|
+
// src/wire.ts
|
|
4
|
+
var STATE_NAME = { 0: "clean", 1: "check", 2: "dirty" };
|
|
5
|
+
var STATE_CODE = { clean: 0, check: 1, dirty: 2 };
|
|
6
|
+
function serializeGraph(graph, now = Date.now(), options = {}) {
|
|
7
|
+
const nodes = [];
|
|
8
|
+
const wanted = options.ids ? new Set(options.ids) : null;
|
|
9
|
+
for (const node of graph.values()) {
|
|
10
|
+
if (wanted && !wanted.has(node.id)) continue;
|
|
11
|
+
const state = typeof node.core?.state === "number" ? STATE_NAME[node.core.state] : void 0;
|
|
12
|
+
nodes.push({
|
|
13
|
+
id: node.id,
|
|
14
|
+
label: node.label,
|
|
15
|
+
kind: node.kind,
|
|
16
|
+
authored: node.authored,
|
|
17
|
+
deps: [...node.deps],
|
|
18
|
+
writes: [...node.writes],
|
|
19
|
+
value: node.value,
|
|
20
|
+
detail: node.detail,
|
|
21
|
+
runs: node.runs,
|
|
22
|
+
lastPulse: node.lastPulse,
|
|
23
|
+
order: node.order,
|
|
24
|
+
version: node.core?.version,
|
|
25
|
+
state,
|
|
26
|
+
loading: node.loading,
|
|
27
|
+
lazy: node.lazy,
|
|
28
|
+
props: node.props,
|
|
29
|
+
extra: node.extra,
|
|
30
|
+
source: node.source,
|
|
31
|
+
declaredAt: node.declaredAt,
|
|
32
|
+
usedAt: node.usedAt,
|
|
33
|
+
createdIn: node.createdIn,
|
|
34
|
+
bindings: node.bindings,
|
|
35
|
+
targets: node.targets,
|
|
36
|
+
setAt: node.setAt,
|
|
37
|
+
// Falls back to what the node already carries, so a relay that re-serialises a
|
|
38
|
+
// snapshot it received does not drop the description.
|
|
39
|
+
dom: options.dom?.(node.id) ?? node.dom
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const removed = options.removed ? [...options.removed] : void 0;
|
|
43
|
+
const events = options.events?.length ? [...options.events] : void 0;
|
|
44
|
+
const cursor = options.cursor;
|
|
45
|
+
return wanted ? { t: now, nodes, partial: true, removed, events, cursor } : { t: now, nodes, events, cursor };
|
|
46
|
+
}
|
|
47
|
+
function snapshotToRenderMap(snapshot) {
|
|
48
|
+
const map = /* @__PURE__ */ new Map();
|
|
49
|
+
for (const node of snapshot.nodes) {
|
|
50
|
+
map.set(node.id, {
|
|
51
|
+
id: node.id,
|
|
52
|
+
label: node.label,
|
|
53
|
+
kind: node.kind,
|
|
54
|
+
authored: node.authored,
|
|
55
|
+
deps: new Set(node.deps),
|
|
56
|
+
writes: new Set(node.writes),
|
|
57
|
+
value: node.value,
|
|
58
|
+
detail: node.detail,
|
|
59
|
+
runs: node.runs,
|
|
60
|
+
lastPulse: node.lastPulse,
|
|
61
|
+
order: node.order,
|
|
62
|
+
core: { version: node.version, state: node.state ? STATE_CODE[node.state] : void 0 },
|
|
63
|
+
loading: node.loading,
|
|
64
|
+
lazy: node.lazy,
|
|
65
|
+
props: node.props,
|
|
66
|
+
extra: node.extra,
|
|
67
|
+
source: node.source,
|
|
68
|
+
declaredAt: node.declaredAt,
|
|
69
|
+
usedAt: node.usedAt,
|
|
70
|
+
createdIn: node.createdIn,
|
|
71
|
+
bindings: node.bindings,
|
|
72
|
+
targets: node.targets,
|
|
73
|
+
setAt: node.setAt,
|
|
74
|
+
dom: node.dom
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
return map;
|
|
78
|
+
}
|
|
79
|
+
function applySnapshot(graph, snapshot) {
|
|
80
|
+
if (!snapshot.partial) return snapshotToRenderMap(snapshot);
|
|
81
|
+
for (const [id, node] of snapshotToRenderMap(snapshot)) graph.set(id, node);
|
|
82
|
+
for (const id of snapshot.removed ?? []) graph.delete(id);
|
|
83
|
+
return graph;
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
applySnapshot,
|
|
87
|
+
serializeGraph,
|
|
88
|
+
snapshotToRenderMap
|
|
89
|
+
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluixi/devtools",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.4",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"author": "Ibrahima Touré",
|
|
5
6
|
"description": "Live inspector for the Fluixi reactive graph — instrument signals/memos/effects and visualize propagation.",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"exports": {
|
|
8
9
|
"./package.json": "./package.json",
|
|
9
10
|
".": {
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs",
|
|
12
14
|
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./wire": {
|
|
17
|
+
"types": "./dist/wire.d.ts",
|
|
18
|
+
"import": "./dist/wire.mjs",
|
|
19
|
+
"require": "./dist/wire.cjs",
|
|
20
|
+
"default": "./dist/wire.js"
|
|
13
21
|
}
|
|
14
22
|
},
|
|
15
23
|
"files": [
|
|
@@ -23,10 +31,14 @@
|
|
|
23
31
|
},
|
|
24
32
|
"dependencies": {},
|
|
25
33
|
"devDependencies": {
|
|
26
|
-
"@
|
|
34
|
+
"@bambiste/mix-builder": "^0.4.0",
|
|
35
|
+
"cross-env": "^7.0.3",
|
|
36
|
+
"@fluixi/reactive": "1.0.0-alpha.84"
|
|
27
37
|
},
|
|
28
38
|
"scripts": {
|
|
29
|
-
"build": "
|
|
30
|
-
"test": "vitest run"
|
|
39
|
+
"build": "cross-env NODE_ENV=production mix-builder",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"build:typings": "tsc -p tsconfig.lib.json",
|
|
42
|
+
"dev": "tsc -w -p tsconfig.lib.json"
|
|
31
43
|
}
|
|
32
44
|
}
|