@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/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @fluixi/devtools v1.0.0-alpha.
|
|
1
|
+
/*! @fluixi/devtools v1.0.0-alpha.110 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -687,6 +687,8 @@ var OFF = {
|
|
|
687
687
|
},
|
|
688
688
|
disposed() {
|
|
689
689
|
},
|
|
690
|
+
marked() {
|
|
691
|
+
},
|
|
690
692
|
take: () => [],
|
|
691
693
|
dropped: 0,
|
|
692
694
|
clear() {
|
|
@@ -698,6 +700,7 @@ function createHistory(limit) {
|
|
|
698
700
|
let seq = 0;
|
|
699
701
|
let commit = 0;
|
|
700
702
|
let dropped = 0;
|
|
703
|
+
let held = false;
|
|
701
704
|
const push = (event) => {
|
|
702
705
|
events.push({ ...event, seq: seq++, t: Date.now(), commit });
|
|
703
706
|
if (events.length > limit) {
|
|
@@ -707,7 +710,10 @@ function createHistory(limit) {
|
|
|
707
710
|
};
|
|
708
711
|
return {
|
|
709
712
|
wrote(id, by, detail2) {
|
|
710
|
-
if (by === void 0)
|
|
713
|
+
if (by === void 0) {
|
|
714
|
+
if (held) held = false;
|
|
715
|
+
else commit++;
|
|
716
|
+
}
|
|
711
717
|
push({ kind: "write", id, by, ...detail2 });
|
|
712
718
|
},
|
|
713
719
|
ran(id, by) {
|
|
@@ -719,6 +725,11 @@ function createHistory(limit) {
|
|
|
719
725
|
disposed(id, label) {
|
|
720
726
|
push({ kind: "disposed", id, label });
|
|
721
727
|
},
|
|
728
|
+
marked(label) {
|
|
729
|
+
commit++;
|
|
730
|
+
held = true;
|
|
731
|
+
push({ kind: "mark", id: -1, label });
|
|
732
|
+
},
|
|
722
733
|
take() {
|
|
723
734
|
const taken = events;
|
|
724
735
|
events = [];
|
|
@@ -744,7 +755,8 @@ function toCommits(events) {
|
|
|
744
755
|
commit,
|
|
745
756
|
t: group[0].t,
|
|
746
757
|
events: group,
|
|
747
|
-
cause: group.find((e) => e.kind === "write" && e.by === void 0)
|
|
758
|
+
cause: group.find((e) => e.kind === "write" && e.by === void 0),
|
|
759
|
+
mark: group.find((e) => e.kind === "mark")
|
|
748
760
|
}));
|
|
749
761
|
}
|
|
750
762
|
|
|
@@ -2284,6 +2296,9 @@ function observeGraph(options = {}) {
|
|
|
2284
2296
|
takeEvents() {
|
|
2285
2297
|
return history.take();
|
|
2286
2298
|
},
|
|
2299
|
+
mark(label) {
|
|
2300
|
+
history.marked(label);
|
|
2301
|
+
},
|
|
2287
2302
|
detach() {
|
|
2288
2303
|
stop();
|
|
2289
2304
|
internals.clear();
|
|
@@ -2561,6 +2576,7 @@ function applySnapshot(graph, snapshot) {
|
|
|
2561
2576
|
// src/hook.ts
|
|
2562
2577
|
var HISTORY = 500;
|
|
2563
2578
|
var HOOK = "__FLUIXI_DEVTOOLS_HOOK__";
|
|
2579
|
+
var FLASH_MS = 1200;
|
|
2564
2580
|
function installDevtoolsHook() {
|
|
2565
2581
|
const host2 = globalThis;
|
|
2566
2582
|
const existing = host2[HOOK];
|
|
@@ -2571,6 +2587,7 @@ function installDevtoolsHook() {
|
|
|
2571
2587
|
let observed = null;
|
|
2572
2588
|
let owned = false;
|
|
2573
2589
|
let version = null;
|
|
2590
|
+
let flashTimer;
|
|
2574
2591
|
const history = [];
|
|
2575
2592
|
const hook = {
|
|
2576
2593
|
copies: 1,
|
|
@@ -2592,6 +2609,15 @@ function installDevtoolsHook() {
|
|
|
2592
2609
|
get version() {
|
|
2593
2610
|
return version;
|
|
2594
2611
|
},
|
|
2612
|
+
mark(label) {
|
|
2613
|
+
observed?.mark(label);
|
|
2614
|
+
},
|
|
2615
|
+
flash(elements, label) {
|
|
2616
|
+
if (!elements.length) return;
|
|
2617
|
+
showHighlight([...elements], label);
|
|
2618
|
+
clearTimeout(flashTimer);
|
|
2619
|
+
flashTimer = setTimeout(hideHighlight, FLASH_MS);
|
|
2620
|
+
},
|
|
2595
2621
|
highlight(target) {
|
|
2596
2622
|
if (!observed || target === null) {
|
|
2597
2623
|
hideHighlight();
|
|
@@ -4037,10 +4063,12 @@ var clock = (t) => {
|
|
|
4037
4063
|
return `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}.${pad(d.getMilliseconds(), 3)}`;
|
|
4038
4064
|
};
|
|
4039
4065
|
function subject(commit, nameOf) {
|
|
4066
|
+
if (commit.mark) return commit.mark.label ?? "marked";
|
|
4040
4067
|
if (!commit.cause) return commit.commit === 0 ? "first render" : "continued";
|
|
4041
4068
|
return nameOf(commit.cause);
|
|
4042
4069
|
}
|
|
4043
4070
|
function change(commit) {
|
|
4071
|
+
if (commit.mark) return "";
|
|
4044
4072
|
const cause = commit.cause;
|
|
4045
4073
|
if (!cause || cause.from === void 0 || cause.to === void 0) return "";
|
|
4046
4074
|
return `${cause.from} → ${cause.to}`;
|
|
@@ -4058,7 +4086,7 @@ function detail(commit, nameOf) {
|
|
|
4058
4086
|
return lines.join("\n");
|
|
4059
4087
|
}
|
|
4060
4088
|
function summary(commit) {
|
|
4061
|
-
const counts = { ran: 0, created: 0, disposed: 0, write: 0 };
|
|
4089
|
+
const counts = { ran: 0, created: 0, disposed: 0, write: 0, mark: 0 };
|
|
4062
4090
|
for (const event of commit.events) counts[event.kind]++;
|
|
4063
4091
|
const writes = counts.write - (commit.cause ? 1 : 0);
|
|
4064
4092
|
return [
|
|
@@ -4507,7 +4535,8 @@ var VERBS = {
|
|
|
4507
4535
|
write: "written",
|
|
4508
4536
|
ran: "ran",
|
|
4509
4537
|
created: "made",
|
|
4510
|
-
disposed: "gone"
|
|
4538
|
+
disposed: "gone",
|
|
4539
|
+
mark: "marked"
|
|
4511
4540
|
};
|
|
4512
4541
|
var MIN_W2 = 320;
|
|
4513
4542
|
var MIN_H2 = 200;
|