@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.
Files changed (83) hide show
  1. package/dist/callsite.mjs +4 -63
  2. package/dist/change-view.mjs +6 -106
  3. package/dist/chunk-235BSS43.mjs +185 -0
  4. package/dist/chunk-2ACSNLS6.mjs +87 -0
  5. package/dist/chunk-2VDMQ3VF.mjs +520 -0
  6. package/dist/chunk-33U2S43X.mjs +121 -0
  7. package/dist/chunk-B3SAJ7QG.mjs +72 -0
  8. package/dist/chunk-BTCWJTXR.mjs +216 -0
  9. package/dist/chunk-CPZWLBCQ.mjs +35 -0
  10. package/dist/chunk-D25KZZBZ.mjs +212 -0
  11. package/dist/chunk-EBSROPWJ.mjs +314 -0
  12. package/dist/chunk-F664XLZL.mjs +743 -0
  13. package/dist/chunk-FY5K3QVT.mjs +35 -0
  14. package/dist/chunk-GDQXCOQB.mjs +43 -0
  15. package/dist/chunk-JLNWT36I.mjs +118 -0
  16. package/dist/chunk-JTHAZJJZ.mjs +780 -0
  17. package/dist/chunk-L6XQGNMW.mjs +106 -0
  18. package/dist/chunk-MN6O673L.mjs +90 -0
  19. package/dist/chunk-NDUBBBNL.mjs +70 -0
  20. package/dist/chunk-NT7YMK77.mjs +157 -0
  21. package/dist/chunk-NVULLJDH.mjs +120 -0
  22. package/dist/chunk-NWLSDERQ.mjs +68 -0
  23. package/dist/chunk-OPIGF5XB.mjs +184 -0
  24. package/dist/chunk-P5I7DWFX.mjs +292 -0
  25. package/dist/chunk-PSSBFXBD.mjs +155 -0
  26. package/dist/chunk-PTQ5VCYE.mjs +103 -0
  27. package/dist/chunk-UAEJ3N7F.mjs +76 -0
  28. package/dist/chunk-V6DKWEYD.mjs +67 -0
  29. package/dist/chunk-VO2V7AC5.mjs +80 -0
  30. package/dist/chunk-WGQH7RUW.mjs +25 -0
  31. package/dist/chunk-Z6KYHEKY.mjs +64 -0
  32. package/dist/copy.mjs +3 -39
  33. package/dist/describe.mjs +3 -31
  34. package/dist/detail-panel.cjs +2 -1
  35. package/dist/detail-panel.d.ts.map +1 -1
  36. package/dist/detail-panel.js +1 -0
  37. package/dist/detail-panel.mjs +6 -280
  38. package/dist/diff.mjs +4 -201
  39. package/dist/dom.mjs +7 -176
  40. package/dist/export.mjs +6 -207
  41. package/dist/float.mjs +5 -206
  42. package/dist/format.mjs +5 -151
  43. package/dist/graph-view.mjs +9 -875
  44. package/dist/highlight.mjs +6 -113
  45. package/dist/history.cjs +14 -2
  46. package/dist/history.d.ts +8 -1
  47. package/dist/history.d.ts.map +1 -1
  48. package/dist/history.js +15 -2
  49. package/dist/history.mjs +4 -70
  50. package/dist/hook.cjs +26 -1
  51. package/dist/hook.d.ts +4 -0
  52. package/dist/hook.d.ts.map +1 -1
  53. package/dist/hook.js +13 -0
  54. package/dist/hook.mjs +16 -1719
  55. package/dist/index.cjs +34 -5
  56. package/dist/index.mjs +106 -4673
  57. package/dist/inspector.mjs +11 -677
  58. package/dist/instrument.mjs +9 -486
  59. package/dist/kind-filter.mjs +6 -148
  60. package/dist/menu.mjs +4 -116
  61. package/dist/observe.cjs +15 -1
  62. package/dist/observe.d.ts +2 -0
  63. package/dist/observe.d.ts.map +1 -1
  64. package/dist/observe.js +3 -0
  65. package/dist/observe.mjs +14 -1510
  66. package/dist/palette.mjs +6 -28
  67. package/dist/path.mjs +3 -21
  68. package/dist/plugin.mjs +9 -57
  69. package/dist/plugins/context.mjs +6 -71
  70. package/dist/plugins/directives.mjs +8 -68
  71. package/dist/plugins/index.cjs +1 -1
  72. package/dist/plugins/index.mjs +13 -136
  73. package/dist/source.mjs +12 -93
  74. package/dist/timeline.cjs +5 -2
  75. package/dist/timeline.d.ts.map +1 -1
  76. package/dist/timeline.js +5 -1
  77. package/dist/timeline.mjs +7 -323
  78. package/dist/tree.mjs +11 -558
  79. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  80. package/dist/value-pane.mjs +6 -196
  81. package/dist/wire.cjs +1 -1
  82. package/dist/wire.mjs +6 -86
  83. package/package.json +3 -3
package/dist/menu.mjs CHANGED
@@ -1,119 +1,7 @@
1
- // src/menu.ts
2
- function createMenu(host, options) {
3
- const doc = host.ownerDocument;
4
- const root = doc.createElement("div");
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) commit++;
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. */
@@ -1 +1 @@
1
- {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../src/observe.ts"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAmE,KAAK,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9G,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,EAA0B,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAmDhE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,gFAAgF;IAChF,MAAM,IAAI,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,6FAA6F;IAC7F,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,4EAA4E;IAC5E,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,WAAW,IAAI,MAAM,EAAE,CAAC;IACxB,8EAA8E;IAC9E,UAAU,IAAI,UAAU,EAAE,CAAC;IAC3B,qEAAqE;IACrE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IACnC,wEAAwE;IACxE,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,EAAE,CAAC;IAC9B;;;;OAI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OAIG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,sBAAsB,GAAG,SAAS,CAAC;CACtF;AAgGD,wBAAgB,YAAY,CAAC,OAAO,GAAE,cAAmB,GAAG,aAAa,CAi2BxE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAcrF"}
package/dist/observe.js CHANGED
@@ -989,6 +989,9 @@ export function observeGraph(options = {}) {
989
989
  takeEvents() {
990
990
  return history.take();
991
991
  },
992
+ mark(label) {
993
+ history.marked(label);
994
+ },
992
995
  detach() {
993
996
  stop();
994
997
  internals.clear();