@three-flatland/devtools 0.1.0-alpha.3 → 1.0.0-alpha.6
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 +1 -1
- package/dist/buffers-modal.d.ts +16 -52
- package/dist/buffers-modal.d.ts.map +1 -0
- package/dist/buffers-modal.js +459 -464
- package/dist/buffers-modal.js.map +1 -1
- package/dist/buffers-view.d.ts +22 -34
- package/dist/buffers-view.d.ts.map +1 -0
- package/dist/buffers-view.js +252 -240
- package/dist/buffers-view.js.map +1 -1
- package/dist/create-pane.d.ts +38 -37
- package/dist/create-pane.d.ts.map +1 -0
- package/dist/create-pane.js +197 -166
- package/dist/create-pane.js.map +1 -1
- package/dist/dashboard/app.tsx +2 -0
- package/dist/dashboard/export.ts +1 -3
- package/dist/dashboard/frame-cursor.ts +81 -0
- package/dist/dashboard/hooks.ts +10 -2
- package/dist/dashboard/index.html +61 -0
- package/dist/dashboard/panels/batches.tsx +5 -18
- package/dist/dashboard/panels/buffers.tsx +52 -26
- package/dist/dashboard/panels/env.tsx +5 -6
- package/dist/dashboard/panels/protocol-log.tsx +146 -58
- package/dist/dashboard/panels/registry.tsx +55 -69
- package/dist/dashboard/panels/scrubber.tsx +100 -0
- package/dist/dashboard/panels/stats.tsx +60 -32
- package/dist/dashboard/protocol-store.ts +25 -8
- package/dist/dashboard/vendor/hooks.module.d.ts +146 -0
- package/dist/dashboard/vendor/jsx-runtime.d.ts +55 -0
- package/dist/dashboard/vendor/jsx.d.ts +3123 -0
- package/dist/dashboard/vendor/preact.module.d.ts +397 -0
- package/dist/devtools-client.d.ts +312 -300
- package/dist/devtools-client.d.ts.map +1 -0
- package/dist/devtools-client.js +866 -838
- package/dist/devtools-client.js.map +1 -1
- package/dist/index.d.ts +6 -8
- package/dist/index.js +5 -12
- package/dist/perf-trace.d.ts +6 -4
- package/dist/perf-trace.d.ts.map +1 -0
- package/dist/perf-trace.js +80 -66
- package/dist/perf-trace.js.map +1 -1
- package/dist/plugins.d.ts +6 -6
- package/dist/plugins.d.ts.map +1 -0
- package/dist/plugins.js +5 -5
- package/dist/plugins.js.map +1 -1
- package/dist/provider-switcher.d.ts +8 -15
- package/dist/provider-switcher.d.ts.map +1 -0
- package/dist/provider-switcher.js +68 -68
- package/dist/provider-switcher.js.map +1 -1
- package/dist/react/devtools-provider.d.ts +11 -10
- package/dist/react/devtools-provider.d.ts.map +1 -0
- package/dist/react/devtools-provider.js +60 -32
- package/dist/react/devtools-provider.js.map +1 -1
- package/dist/react/use-fps-graph.d.ts +7 -7
- package/dist/react/use-fps-graph.d.ts.map +1 -0
- package/dist/react/use-fps-graph.js +27 -21
- package/dist/react/use-fps-graph.js.map +1 -1
- package/dist/react/use-pane-button.d.ts +4 -4
- package/dist/react/use-pane-button.d.ts.map +1 -0
- package/dist/react/use-pane-button.js +35 -30
- package/dist/react/use-pane-button.js.map +1 -1
- package/dist/react/use-pane-folder.d.ts +5 -4
- package/dist/react/use-pane-folder.d.ts.map +1 -0
- package/dist/react/use-pane-folder.js +33 -20
- package/dist/react/use-pane-folder.js.map +1 -1
- package/dist/react/use-pane-input.d.ts +31 -30
- package/dist/react/use-pane-input.d.ts.map +1 -0
- package/dist/react/use-pane-input.js +46 -42
- package/dist/react/use-pane-input.js.map +1 -1
- package/dist/react/use-pane-radio-grid.d.ts +20 -20
- package/dist/react/use-pane-radio-grid.d.ts.map +1 -0
- package/dist/react/use-pane-radio-grid.js +72 -50
- package/dist/react/use-pane-radio-grid.js.map +1 -1
- package/dist/react/use-pane.d.ts +4 -4
- package/dist/react/use-pane.d.ts.map +1 -0
- package/dist/react/use-pane.js +52 -17
- package/dist/react/use-pane.js.map +1 -1
- package/dist/react.d.ts +10 -12
- package/dist/react.js +2 -12
- package/dist/registry-view.d.ts +8 -21
- package/dist/registry-view.d.ts.map +1 -0
- package/dist/registry-view.js +357 -338
- package/dist/registry-view.js.map +1 -1
- package/dist/relay.d.ts +16 -0
- package/dist/relay.d.ts.map +1 -0
- package/dist/relay.js +189 -0
- package/dist/relay.js.map +1 -0
- package/dist/remote.d.ts +10 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +28 -0
- package/dist/remote.js.map +1 -0
- package/dist/stats-graph.d.ts +23 -31
- package/dist/stats-graph.d.ts.map +1 -0
- package/dist/stats-graph.js +323 -264
- package/dist/stats-graph.js.map +1 -1
- package/dist/stats-row.d.ts +8 -21
- package/dist/stats-row.d.ts.map +1 -0
- package/dist/stats-row.js +99 -101
- package/dist/stats-row.js.map +1 -1
- package/dist/theme.d.ts +3 -1
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +43 -54
- package/dist/theme.js.map +1 -1
- package/dist/vite-plugin.d.ts +7 -6
- package/dist/vite-plugin.d.ts.map +1 -0
- package/dist/vite-plugin.js +87 -78
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +33 -29
- package/dist/buffers-modal.cjs +0 -491
- package/dist/buffers-modal.cjs.map +0 -1
- package/dist/buffers-modal.d.cts +0 -62
- package/dist/buffers-view.cjs +0 -269
- package/dist/buffers-view.cjs.map +0 -1
- package/dist/buffers-view.d.cts +0 -39
- package/dist/create-pane.cjs +0 -203
- package/dist/create-pane.cjs.map +0 -1
- package/dist/create-pane.d.cts +0 -66
- package/dist/devtools-client.cjs +0 -870
- package/dist/devtools-client.cjs.map +0 -1
- package/dist/devtools-client.d.cts +0 -362
- package/dist/index.cjs +0 -42
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -8
- package/dist/index.js.map +0 -1
- package/dist/perf-trace.cjs +0 -103
- package/dist/perf-trace.cjs.map +0 -1
- package/dist/perf-trace.d.cts +0 -27
- package/dist/plugins.cjs +0 -44
- package/dist/plugins.cjs.map +0 -1
- package/dist/plugins.d.cts +0 -7
- package/dist/provider-switcher.cjs +0 -95
- package/dist/provider-switcher.cjs.map +0 -1
- package/dist/provider-switcher.d.cts +0 -18
- package/dist/react/devtools-provider.cjs +0 -59
- package/dist/react/devtools-provider.cjs.map +0 -1
- package/dist/react/devtools-provider.d.cts +0 -39
- package/dist/react/use-fps-graph.cjs +0 -49
- package/dist/react/use-fps-graph.cjs.map +0 -1
- package/dist/react/use-fps-graph.d.cts +0 -15
- package/dist/react/use-pane-button.cjs +0 -58
- package/dist/react/use-pane-button.cjs.map +0 -1
- package/dist/react/use-pane-button.d.cts +0 -10
- package/dist/react/use-pane-folder.cjs +0 -48
- package/dist/react/use-pane-folder.cjs.map +0 -1
- package/dist/react/use-pane-folder.d.cts +0 -15
- package/dist/react/use-pane-input.cjs +0 -70
- package/dist/react/use-pane-input.cjs.map +0 -1
- package/dist/react/use-pane-input.d.cts +0 -44
- package/dist/react/use-pane-radio-grid.cjs +0 -78
- package/dist/react/use-pane-radio-grid.cjs.map +0 -1
- package/dist/react/use-pane-radio-grid.d.cts +0 -35
- package/dist/react/use-pane.cjs +0 -45
- package/dist/react/use-pane.cjs.map +0 -1
- package/dist/react/use-pane.d.cts +0 -40
- package/dist/react.cjs +0 -50
- package/dist/react.cjs.map +0 -1
- package/dist/react.d.cts +0 -12
- package/dist/react.js.map +0 -1
- package/dist/registry-view.cjs +0 -371
- package/dist/registry-view.cjs.map +0 -1
- package/dist/registry-view.d.cts +0 -24
- package/dist/stats-graph.cjs +0 -297
- package/dist/stats-graph.cjs.map +0 -1
- package/dist/stats-graph.d.cts +0 -40
- package/dist/stats-row.cjs +0 -153
- package/dist/stats-row.cjs.map +0 -1
- package/dist/stats-row.d.cts +0 -24
- package/dist/theme.cjs +0 -260
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -10
- package/dist/vite-plugin.cjs +0 -113
- package/dist/vite-plugin.cjs.map +0 -1
- package/dist/vite-plugin.d.cts +0 -9
package/dist/registry-view.cjs
DELETED
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var registry_view_exports = {};
|
|
20
|
-
__export(registry_view_exports, {
|
|
21
|
-
addRegistryView: () => addRegistryView
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(registry_view_exports);
|
|
24
|
-
const BAR_HEIGHT = 24;
|
|
25
|
-
const BAR_WIDTH = 240;
|
|
26
|
-
const FILL_BY_KIND = {
|
|
27
|
-
float: "#47cca9",
|
|
28
|
-
int: "#47cc6a",
|
|
29
|
-
uint: "#ffa347",
|
|
30
|
-
bits: "#d94c87",
|
|
31
|
-
float2: "#9d7aff",
|
|
32
|
-
float3: "#9d7aff",
|
|
33
|
-
float4: "#9d7aff"
|
|
34
|
-
};
|
|
35
|
-
function splitName(name) {
|
|
36
|
-
const dot = name.indexOf(".");
|
|
37
|
-
if (dot === -1) return { group: "ungrouped", short: name };
|
|
38
|
-
return { group: name.slice(0, dot), short: name.slice(dot + 1) };
|
|
39
|
-
}
|
|
40
|
-
function addRegistryView(parent, client) {
|
|
41
|
-
const blade = parent.addBlade({ view: "separator" });
|
|
42
|
-
const bladeEl = blade.element;
|
|
43
|
-
bladeEl.innerHTML = "";
|
|
44
|
-
bladeEl.className = "tp-cntv";
|
|
45
|
-
bladeEl.style.cssText = "display:none;flex-direction:column;background:rgba(0,0,0,0.3)";
|
|
46
|
-
const header = document.createElement("div");
|
|
47
|
-
header.style.cssText = [
|
|
48
|
-
"display:grid",
|
|
49
|
-
"grid-template-columns:2em 1fr 2em",
|
|
50
|
-
"align-items:center",
|
|
51
|
-
"padding:4px 6px 6px",
|
|
52
|
-
"font-size:11px",
|
|
53
|
-
"color:var(--tp-label-foreground-color)",
|
|
54
|
-
"user-select:none",
|
|
55
|
-
"-webkit-user-select:none",
|
|
56
|
-
"font-variant-numeric:tabular-nums",
|
|
57
|
-
"cursor:pointer"
|
|
58
|
-
].join(";");
|
|
59
|
-
const arrowStyle = "cursor:pointer;padding:0 4px;opacity:0.8;font-family:ui-monospace,monospace;text-align:center";
|
|
60
|
-
const prevBtn = document.createElement("span");
|
|
61
|
-
prevBtn.textContent = "\u25C0";
|
|
62
|
-
prevBtn.style.cssText = arrowStyle;
|
|
63
|
-
prevBtn.setAttribute("role", "button");
|
|
64
|
-
prevBtn.setAttribute("aria-label", "Previous registry group");
|
|
65
|
-
const groupLabel = document.createElement("span");
|
|
66
|
-
groupLabel.style.cssText = "font-weight:500;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none";
|
|
67
|
-
const nextBtn = document.createElement("span");
|
|
68
|
-
nextBtn.textContent = "\u25B6";
|
|
69
|
-
nextBtn.style.cssText = arrowStyle;
|
|
70
|
-
nextBtn.setAttribute("role", "button");
|
|
71
|
-
nextBtn.setAttribute("aria-label", "Next registry group");
|
|
72
|
-
header.appendChild(prevBtn);
|
|
73
|
-
header.appendChild(groupLabel);
|
|
74
|
-
header.appendChild(nextBtn);
|
|
75
|
-
const body = document.createElement("div");
|
|
76
|
-
body.style.cssText = "display:flex;flex-direction:column;gap:4px;padding:2px 6px 6px";
|
|
77
|
-
bladeEl.appendChild(header);
|
|
78
|
-
bladeEl.appendChild(body);
|
|
79
|
-
const groups = /* @__PURE__ */ new Map();
|
|
80
|
-
let activeGroup = null;
|
|
81
|
-
let collapsed = true;
|
|
82
|
-
body.style.display = "none";
|
|
83
|
-
function syncFilter() {
|
|
84
|
-
if (collapsed || activeGroup === null) {
|
|
85
|
-
client.setRegistry([]);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
const g = groups.get(activeGroup);
|
|
89
|
-
if (!g) {
|
|
90
|
-
client.setRegistry([]);
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const names = [];
|
|
94
|
-
for (const row of g.entries.values()) names.push(row.name);
|
|
95
|
-
client.setRegistry(names);
|
|
96
|
-
}
|
|
97
|
-
const toggleCollapse = (e) => {
|
|
98
|
-
e.stopPropagation();
|
|
99
|
-
collapsed = !collapsed;
|
|
100
|
-
body.style.display = collapsed ? "none" : "flex";
|
|
101
|
-
if (!collapsed && activeGroup !== null) {
|
|
102
|
-
const g = groups.get(activeGroup);
|
|
103
|
-
if (g) {
|
|
104
|
-
g.container.style.display = "flex";
|
|
105
|
-
for (const row of g.entries.values()) row.lastVersion = -1;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
syncFilter();
|
|
109
|
-
};
|
|
110
|
-
header.addEventListener("click", toggleCollapse);
|
|
111
|
-
prevBtn.addEventListener("click", (e) => {
|
|
112
|
-
e.stopPropagation();
|
|
113
|
-
cycle(-1);
|
|
114
|
-
});
|
|
115
|
-
nextBtn.addEventListener("click", (e) => {
|
|
116
|
-
e.stopPropagation();
|
|
117
|
-
cycle(1);
|
|
118
|
-
});
|
|
119
|
-
function ensureGroup(name) {
|
|
120
|
-
let g = groups.get(name);
|
|
121
|
-
if (g) return g;
|
|
122
|
-
const container = document.createElement("div");
|
|
123
|
-
container.style.cssText = "display:none;flex-direction:column;gap:4px";
|
|
124
|
-
body.appendChild(container);
|
|
125
|
-
g = { group: name, container, entries: /* @__PURE__ */ new Map() };
|
|
126
|
-
groups.set(name, g);
|
|
127
|
-
return g;
|
|
128
|
-
}
|
|
129
|
-
function destroyGroup(name) {
|
|
130
|
-
const g = groups.get(name);
|
|
131
|
-
if (!g) return;
|
|
132
|
-
g.container.remove();
|
|
133
|
-
groups.delete(name);
|
|
134
|
-
if (activeGroup === name) activeGroup = null;
|
|
135
|
-
}
|
|
136
|
-
function ensureEntryRow(g, name, shortName) {
|
|
137
|
-
const existing = g.entries.get(shortName);
|
|
138
|
-
if (existing) return existing;
|
|
139
|
-
const row = document.createElement("div");
|
|
140
|
-
row.style.cssText = "display:flex;flex-direction:column;gap:2px";
|
|
141
|
-
const head = document.createElement("div");
|
|
142
|
-
head.style.cssText = [
|
|
143
|
-
"display:flex",
|
|
144
|
-
"align-items:baseline",
|
|
145
|
-
"gap:6px",
|
|
146
|
-
"font-size:10px",
|
|
147
|
-
"line-height:1.2",
|
|
148
|
-
"font-family:var(--tp-base-font-family, ui-monospace, monospace)",
|
|
149
|
-
"font-variant-numeric:tabular-nums",
|
|
150
|
-
"color:var(--tp-monitor-foreground-color)"
|
|
151
|
-
].join(";");
|
|
152
|
-
const nameLabel = document.createElement("span");
|
|
153
|
-
nameLabel.style.cssText = "flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--tp-label-foreground-color)";
|
|
154
|
-
nameLabel.textContent = shortName;
|
|
155
|
-
const valueLabel = document.createElement("span");
|
|
156
|
-
valueLabel.style.cssText = "opacity:0.75;white-space:nowrap";
|
|
157
|
-
head.appendChild(nameLabel);
|
|
158
|
-
head.appendChild(valueLabel);
|
|
159
|
-
const canvas = document.createElement("canvas");
|
|
160
|
-
canvas.width = BAR_WIDTH;
|
|
161
|
-
canvas.height = BAR_HEIGHT;
|
|
162
|
-
canvas.style.cssText = `width:100%;height:${BAR_HEIGHT}px;background:rgba(0,2,28,0.45);border-radius:2px`;
|
|
163
|
-
row.appendChild(head);
|
|
164
|
-
row.appendChild(canvas);
|
|
165
|
-
g.container.appendChild(row);
|
|
166
|
-
const entry = {
|
|
167
|
-
name,
|
|
168
|
-
shortName,
|
|
169
|
-
row,
|
|
170
|
-
nameLabel,
|
|
171
|
-
valueLabel,
|
|
172
|
-
canvas,
|
|
173
|
-
ctx: canvas.getContext("2d"),
|
|
174
|
-
lastVersion: -1
|
|
175
|
-
};
|
|
176
|
-
g.entries.set(shortName, entry);
|
|
177
|
-
return entry;
|
|
178
|
-
}
|
|
179
|
-
function destroyEntryRow(g, shortName) {
|
|
180
|
-
const row = g.entries.get(shortName);
|
|
181
|
-
if (!row) return;
|
|
182
|
-
row.row.remove();
|
|
183
|
-
g.entries.delete(shortName);
|
|
184
|
-
}
|
|
185
|
-
function setActiveGroup(name) {
|
|
186
|
-
activeGroup = name;
|
|
187
|
-
for (const [groupName, g] of groups) {
|
|
188
|
-
g.container.style.display = groupName === name && !collapsed ? "flex" : "none";
|
|
189
|
-
}
|
|
190
|
-
groupLabel.textContent = name ?? "\u2014";
|
|
191
|
-
if (name !== null) {
|
|
192
|
-
const g = groups.get(name);
|
|
193
|
-
if (g) for (const row of g.entries.values()) row.lastVersion = -1;
|
|
194
|
-
}
|
|
195
|
-
syncFilter();
|
|
196
|
-
}
|
|
197
|
-
function cycle(delta) {
|
|
198
|
-
const names = Array.from(groups.keys());
|
|
199
|
-
if (names.length === 0) return;
|
|
200
|
-
const idx = activeGroup !== null ? names.indexOf(activeGroup) : -1;
|
|
201
|
-
const next = names[(idx + delta + names.length) % names.length];
|
|
202
|
-
setActiveGroup(next);
|
|
203
|
-
}
|
|
204
|
-
function renderBars(row, kind, sample, isSigned) {
|
|
205
|
-
const ctx = row.ctx;
|
|
206
|
-
const w = row.canvas.width;
|
|
207
|
-
const h = row.canvas.height;
|
|
208
|
-
let min = Infinity;
|
|
209
|
-
let max = -Infinity;
|
|
210
|
-
let sum = 0;
|
|
211
|
-
const n = sample.length;
|
|
212
|
-
for (let i = 0; i < n; i++) {
|
|
213
|
-
const v = sample[i];
|
|
214
|
-
if (v < min) min = v;
|
|
215
|
-
if (v > max) max = v;
|
|
216
|
-
sum += v;
|
|
217
|
-
}
|
|
218
|
-
const mean = n > 0 ? sum / n : 0;
|
|
219
|
-
if (!ctx) return { min, max, mean };
|
|
220
|
-
ctx.clearRect(0, 0, w, h);
|
|
221
|
-
if (n === 0 || !Number.isFinite(min) || !Number.isFinite(max)) return { min, max: 0, mean };
|
|
222
|
-
const zeroY = isSigned ? h / 2 : h;
|
|
223
|
-
const scale = isSigned ? h / 2 / Math.max(Math.abs(min), Math.abs(max) || 1) : h / (max || 1);
|
|
224
|
-
ctx.fillStyle = FILL_BY_KIND[kind] ?? "#47cca9";
|
|
225
|
-
const bw = Math.max(1, w / n);
|
|
226
|
-
for (let i = 0; i < n; i++) {
|
|
227
|
-
const v = sample[i];
|
|
228
|
-
const x = Math.floor(i / n * w);
|
|
229
|
-
const bh = v * scale;
|
|
230
|
-
if (isSigned) {
|
|
231
|
-
if (bh >= 0) ctx.fillRect(x, zeroY - bh, Math.ceil(bw), bh);
|
|
232
|
-
else ctx.fillRect(x, zeroY, Math.ceil(bw), -bh);
|
|
233
|
-
} else {
|
|
234
|
-
ctx.fillRect(x, zeroY - bh, Math.ceil(bw), bh);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
if (isSigned) {
|
|
238
|
-
ctx.fillStyle = "rgba(240, 237, 216, 0.2)";
|
|
239
|
-
ctx.fillRect(0, zeroY, w, 1);
|
|
240
|
-
}
|
|
241
|
-
return { min, max, mean };
|
|
242
|
-
}
|
|
243
|
-
function renderBits(row, sample, count) {
|
|
244
|
-
const ctx = row.ctx;
|
|
245
|
-
const w = row.canvas.width;
|
|
246
|
-
const h = row.canvas.height;
|
|
247
|
-
if (!ctx) return { ones: 0, total: 0 };
|
|
248
|
-
ctx.clearRect(0, 0, w, h);
|
|
249
|
-
const totalBits = count * 32;
|
|
250
|
-
if (totalBits === 0) return { ones: 0, total: 0 };
|
|
251
|
-
let ones = 0;
|
|
252
|
-
const px = w / totalBits;
|
|
253
|
-
ctx.fillStyle = FILL_BY_KIND.bits;
|
|
254
|
-
for (let i = 0; i < count; i++) {
|
|
255
|
-
const word = sample[i] >>> 0;
|
|
256
|
-
for (let b = 0; b < 32; b++) {
|
|
257
|
-
if (word >>> b & 1) {
|
|
258
|
-
ones++;
|
|
259
|
-
const bitIdx = i * 32 + b;
|
|
260
|
-
const x = Math.floor(bitIdx * px);
|
|
261
|
-
ctx.fillRect(x, 2, Math.max(1, Math.ceil(px)), h - 4);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return { ones, total: totalBits };
|
|
266
|
-
}
|
|
267
|
-
function renderEntry(row, entry) {
|
|
268
|
-
if (row.lastVersion === entry.version) return;
|
|
269
|
-
row.lastVersion = entry.version;
|
|
270
|
-
row.nameLabel.title = `${entry.name} \xB7 ${entry.kind} \xB7 ${entry.count}`;
|
|
271
|
-
const kind = entry.kind;
|
|
272
|
-
if (kind === "bits") {
|
|
273
|
-
const { ones, total } = renderBits(row, entry.sample, entry.count);
|
|
274
|
-
row.valueLabel.textContent = `${ones} / ${total}`;
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
if (kind === "float2" || kind === "float3" || kind === "float4") {
|
|
278
|
-
const stride = kind === "float2" ? 2 : kind === "float3" ? 3 : 4;
|
|
279
|
-
const n = Math.floor(entry.sample.length / stride);
|
|
280
|
-
const mags = new Float32Array(n);
|
|
281
|
-
for (let i = 0; i < n; i++) {
|
|
282
|
-
let sq = 0;
|
|
283
|
-
for (let c = 0; c < stride; c++) {
|
|
284
|
-
const v = entry.sample[i * stride + c];
|
|
285
|
-
sq += v * v;
|
|
286
|
-
}
|
|
287
|
-
mags[i] = Math.sqrt(sq);
|
|
288
|
-
}
|
|
289
|
-
const stats2 = renderBars(row, kind, mags, false);
|
|
290
|
-
row.valueLabel.textContent = `${n}\xD7${stride} \u03BC=${stats2.mean.toFixed(2)}`;
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const isSigned = kind === "int" || kind === "float";
|
|
294
|
-
const stats = renderBars(row, kind, entry.sample, isSigned);
|
|
295
|
-
const fmt = (v) => {
|
|
296
|
-
if (!Number.isFinite(v)) return "\u2014";
|
|
297
|
-
if (kind === "uint" || kind === "int") return Math.round(v).toString();
|
|
298
|
-
return v.toFixed(2);
|
|
299
|
-
};
|
|
300
|
-
row.valueLabel.textContent = `\u03BC=${fmt(stats.mean)} ${fmt(stats.min)}\u2013${fmt(stats.max)}`;
|
|
301
|
-
}
|
|
302
|
-
const unsubscribe = client.addListener((state) => {
|
|
303
|
-
const registry = state.registry;
|
|
304
|
-
const seen = /* @__PURE__ */ new Map();
|
|
305
|
-
for (const [name] of registry) {
|
|
306
|
-
const { group, short } = splitName(name);
|
|
307
|
-
let bucket = seen.get(group);
|
|
308
|
-
if (!bucket) {
|
|
309
|
-
bucket = /* @__PURE__ */ new Set();
|
|
310
|
-
seen.set(group, bucket);
|
|
311
|
-
}
|
|
312
|
-
bucket.add(short);
|
|
313
|
-
}
|
|
314
|
-
for (const [groupName, g] of groups) {
|
|
315
|
-
const bucket = seen.get(groupName);
|
|
316
|
-
if (!bucket) {
|
|
317
|
-
destroyGroup(groupName);
|
|
318
|
-
continue;
|
|
319
|
-
}
|
|
320
|
-
for (const shortName of g.entries.keys()) {
|
|
321
|
-
if (!bucket.has(shortName)) destroyEntryRow(g, shortName);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
for (const [name] of registry) {
|
|
325
|
-
const { group, short } = splitName(name);
|
|
326
|
-
const g = ensureGroup(group);
|
|
327
|
-
ensureEntryRow(g, name, short);
|
|
328
|
-
}
|
|
329
|
-
if (groups.size === 0) {
|
|
330
|
-
activeGroup = null;
|
|
331
|
-
groupLabel.textContent = "\u2014";
|
|
332
|
-
} else if (activeGroup === null || !groups.has(activeGroup)) {
|
|
333
|
-
setActiveGroup(groups.keys().next().value);
|
|
334
|
-
} else {
|
|
335
|
-
groupLabel.textContent = activeGroup;
|
|
336
|
-
const g = groups.get(activeGroup);
|
|
337
|
-
g.container.style.display = collapsed ? "none" : "flex";
|
|
338
|
-
}
|
|
339
|
-
if (!collapsed && activeGroup !== null) {
|
|
340
|
-
const g = groups.get(activeGroup);
|
|
341
|
-
if (g) {
|
|
342
|
-
for (const [shortName, row] of g.entries) {
|
|
343
|
-
const entry = registry.get(`${activeGroup}.${shortName}`) ?? registry.get(shortName);
|
|
344
|
-
if (entry) renderEntry(row, entry);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
const multi = groups.size > 1;
|
|
349
|
-
const arrowOpacity = multi ? "0.8" : "0.25";
|
|
350
|
-
const arrowPointer = multi ? "pointer" : "default";
|
|
351
|
-
prevBtn.style.opacity = arrowOpacity;
|
|
352
|
-
nextBtn.style.opacity = arrowOpacity;
|
|
353
|
-
prevBtn.style.cursor = arrowPointer;
|
|
354
|
-
nextBtn.style.cursor = arrowPointer;
|
|
355
|
-
bladeEl.style.display = registry.size > 0 ? "flex" : "none";
|
|
356
|
-
syncFilter();
|
|
357
|
-
});
|
|
358
|
-
return {
|
|
359
|
-
element: bladeEl,
|
|
360
|
-
dispose() {
|
|
361
|
-
unsubscribe();
|
|
362
|
-
groups.clear();
|
|
363
|
-
blade.dispose();
|
|
364
|
-
}
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
368
|
-
0 && (module.exports = {
|
|
369
|
-
addRegistryView
|
|
370
|
-
});
|
|
371
|
-
//# sourceMappingURL=registry-view.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/registry-view.ts"],"sourcesContent":["/**\n * Registry view — one group visible at a time. Header reads\n * `◀ groupName ▶`; arrows cycle through the groups the provider has\n * published. Below the header, every entry in the active group is\n * stacked (one bar chart per entry) so you see the full module in one\n * glance. Hidden while the registry is empty.\n *\n * Groups are derived from the part of each entry name before the\n * first `.` (`forwardPlus.lightCounts` + `forwardPlus.tileScores` →\n * group `forwardPlus`). Names without a dot land in an `ungrouped`\n * bucket.\n */\n\nimport type { FolderApi, Pane } from 'tweakpane'\n\nimport type { DevtoolsClient, RegistryEntrySnapshot } from './devtools-client.js'\n\nexport interface RegistryViewHandle {\n readonly element: HTMLElement\n dispose(): void\n}\n\ninterface EntryRow {\n name: string\n shortName: string\n row: HTMLDivElement\n nameLabel: HTMLSpanElement\n valueLabel: HTMLSpanElement\n canvas: HTMLCanvasElement\n ctx: CanvasRenderingContext2D | null\n lastVersion: number\n}\n\ninterface GroupUI {\n group: string\n container: HTMLDivElement\n entries: Map<string, EntryRow>\n}\n\nconst BAR_HEIGHT = 24\nconst BAR_WIDTH = 240\n\nconst FILL_BY_KIND: Record<string, string> = {\n float: '#47cca9',\n int: '#47cc6a',\n uint: '#ffa347',\n bits: '#d94c87',\n float2: '#9d7aff',\n float3: '#9d7aff',\n float4: '#9d7aff',\n}\n\nfunction splitName(name: string): { group: string; short: string } {\n const dot = name.indexOf('.')\n if (dot === -1) return { group: 'ungrouped', short: name }\n return { group: name.slice(0, dot), short: name.slice(dot + 1) }\n}\n\nexport function addRegistryView(\n parent: Pane | FolderApi,\n client: DevtoolsClient,\n): RegistryViewHandle {\n const blade = parent.addBlade({ view: 'separator' }) as unknown as {\n element: HTMLElement\n dispose(): void\n }\n const bladeEl = blade.element\n bladeEl.innerHTML = ''\n bladeEl.className = 'tp-cntv'\n // Hidden until entries exist. Set `display:flex` (not `''`) when\n // showing so the children can centre-align via flex rules — toggling\n // to '' would revert to the stylesheet's `block`, breaking layout.\n // `background` lays a ~30% black overlay over whatever Tweakpane's\n // base colour is, visually sinking this blade back relative to the\n // stats blades above it.\n bladeEl.style.cssText = 'display:none;flex-direction:column;background:rgba(0,0,0,0.3)'\n\n // Header: \"◀ group ▶\" — group name centred, arrows on either end.\n // Clicking the centre label toggles collapse. No fold chevron — the\n // visible body IS the indicator.\n const header = document.createElement('div')\n // Symmetric 2em arrow columns so the 1fr middle is the blade's true\n // centre regardless of arrow-glyph rendering width. `cursor:pointer`\n // on the whole header so the collapse target isn't just the text\n // glyphs; arrows stop propagation so they don't also toggle.\n header.style.cssText = [\n 'display:grid',\n 'grid-template-columns:2em 1fr 2em',\n 'align-items:center',\n 'padding:4px 6px 6px',\n 'font-size:11px',\n 'color:var(--tp-label-foreground-color)',\n 'user-select:none',\n '-webkit-user-select:none',\n 'font-variant-numeric:tabular-nums',\n 'cursor:pointer',\n ].join(';')\n // Match the provider-switcher arrow styling verbatim so both cycle\n // controls feel identical. `padding:0 4px` gives a more generous\n // click target than relying on the grid cell alone.\n const arrowStyle = 'cursor:pointer;padding:0 4px;opacity:0.8;font-family:ui-monospace,monospace;text-align:center'\n const prevBtn = document.createElement('span')\n prevBtn.textContent = '◀'\n prevBtn.style.cssText = arrowStyle\n prevBtn.setAttribute('role', 'button')\n prevBtn.setAttribute('aria-label', 'Previous registry group')\n const groupLabel = document.createElement('span')\n // Intentionally no `cursor:pointer` here — the click handler lives on\n // the header row, so the whole row shares one hit target. Giving the\n // label its own cursor/handler caused inconsistent hit-testing when\n // the user clicked on the label's text-vs-padding boundary.\n groupLabel.style.cssText = 'font-weight:500;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none'\n const nextBtn = document.createElement('span')\n nextBtn.textContent = '▶'\n nextBtn.style.cssText = arrowStyle\n nextBtn.setAttribute('role', 'button')\n nextBtn.setAttribute('aria-label', 'Next registry group')\n header.appendChild(prevBtn)\n header.appendChild(groupLabel)\n header.appendChild(nextBtn)\n\n const body = document.createElement('div')\n body.style.cssText = 'display:flex;flex-direction:column;gap:4px;padding:2px 6px 6px'\n\n bladeEl.appendChild(header)\n bladeEl.appendChild(body)\n\n const groups = new Map<string, GroupUI>()\n let activeGroup: string | null = null\n // Start collapsed — don't stream registry data until the user opens\n // the view. `setRegistry([])` below keeps the provider quiet.\n let collapsed = true\n body.style.display = 'none'\n\n /** Push the currently-visible entry names up to the client. */\n function syncFilter(): void {\n if (collapsed || activeGroup === null) {\n client.setRegistry([])\n return\n }\n const g = groups.get(activeGroup)\n if (!g) {\n client.setRegistry([])\n return\n }\n const names: string[] = []\n for (const row of g.entries.values()) names.push(row.name)\n client.setRegistry(names)\n }\n\n const toggleCollapse = (e: Event): void => {\n // Stop propagation so the separator-blade shim below doesn't ever\n // see this click (Tweakpane can sometimes process blade pointer\n // events in a way that interferes with custom handlers).\n e.stopPropagation()\n collapsed = !collapsed\n body.style.display = collapsed ? 'none' : 'flex'\n if (!collapsed && activeGroup !== null) {\n const g = groups.get(activeGroup)\n if (g) {\n g.container.style.display = 'flex'\n for (const row of g.entries.values()) row.lastVersion = -1\n }\n }\n syncFilter()\n }\n header.addEventListener('click', toggleCollapse)\n prevBtn.addEventListener('click', (e) => { e.stopPropagation(); cycle(-1) })\n nextBtn.addEventListener('click', (e) => { e.stopPropagation(); cycle(1) })\n\n function ensureGroup(name: string): GroupUI {\n let g = groups.get(name)\n if (g) return g\n const container = document.createElement('div')\n container.style.cssText = 'display:none;flex-direction:column;gap:4px'\n body.appendChild(container)\n g = { group: name, container, entries: new Map() }\n groups.set(name, g)\n return g\n }\n\n function destroyGroup(name: string): void {\n const g = groups.get(name)\n if (!g) return\n g.container.remove()\n groups.delete(name)\n if (activeGroup === name) activeGroup = null\n }\n\n function ensureEntryRow(g: GroupUI, name: string, shortName: string): EntryRow {\n const existing = g.entries.get(shortName)\n if (existing) return existing\n\n const row = document.createElement('div')\n row.style.cssText = 'display:flex;flex-direction:column;gap:2px'\n\n const head = document.createElement('div')\n head.style.cssText = [\n 'display:flex',\n 'align-items:baseline',\n 'gap:6px',\n 'font-size:10px',\n 'line-height:1.2',\n 'font-family:var(--tp-base-font-family, ui-monospace, monospace)',\n 'font-variant-numeric:tabular-nums',\n 'color:var(--tp-monitor-foreground-color)',\n ].join(';')\n const nameLabel = document.createElement('span')\n nameLabel.style.cssText = 'flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--tp-label-foreground-color)'\n nameLabel.textContent = shortName\n const valueLabel = document.createElement('span')\n valueLabel.style.cssText = 'opacity:0.75;white-space:nowrap'\n head.appendChild(nameLabel)\n head.appendChild(valueLabel)\n\n const canvas = document.createElement('canvas')\n canvas.width = BAR_WIDTH\n canvas.height = BAR_HEIGHT\n canvas.style.cssText = `width:100%;height:${BAR_HEIGHT}px;background:rgba(0,2,28,0.45);border-radius:2px`\n\n row.appendChild(head)\n row.appendChild(canvas)\n g.container.appendChild(row)\n\n const entry: EntryRow = {\n name,\n shortName,\n row,\n nameLabel,\n valueLabel,\n canvas,\n ctx: canvas.getContext('2d'),\n lastVersion: -1,\n }\n g.entries.set(shortName, entry)\n return entry\n }\n\n function destroyEntryRow(g: GroupUI, shortName: string): void {\n const row = g.entries.get(shortName)\n if (!row) return\n row.row.remove()\n g.entries.delete(shortName)\n }\n\n function setActiveGroup(name: string | null): void {\n activeGroup = name\n for (const [groupName, g] of groups) {\n g.container.style.display = groupName === name && !collapsed ? 'flex' : 'none'\n }\n groupLabel.textContent = name ?? '—'\n if (name !== null) {\n const g = groups.get(name)\n if (g) for (const row of g.entries.values()) row.lastVersion = -1\n }\n syncFilter()\n }\n\n function cycle(delta: number): void {\n const names = Array.from(groups.keys())\n if (names.length === 0) return\n const idx = activeGroup !== null ? names.indexOf(activeGroup) : -1\n const next = names[(idx + delta + names.length) % names.length]!\n setActiveGroup(next)\n }\n // (arrow click handlers wired above, alongside the toggle.)\n\n function renderBars(row: EntryRow, kind: string, sample: Float32Array | Uint32Array | Int32Array, isSigned: boolean): { min: number; max: number; mean: number } {\n const ctx = row.ctx\n const w = row.canvas.width\n const h = row.canvas.height\n let min = Infinity\n let max = -Infinity\n let sum = 0\n const n = sample.length\n for (let i = 0; i < n; i++) {\n const v = sample[i]!\n if (v < min) min = v\n if (v > max) max = v\n sum += v\n }\n const mean = n > 0 ? sum / n : 0\n\n if (!ctx) return { min, max, mean }\n ctx.clearRect(0, 0, w, h)\n if (n === 0 || !Number.isFinite(min) || !Number.isFinite(max)) return { min, max: 0, mean }\n\n const zeroY = isSigned ? h / 2 : h\n const scale = isSigned ? (h / 2) / Math.max(Math.abs(min), Math.abs(max) || 1) : h / (max || 1)\n\n ctx.fillStyle = FILL_BY_KIND[kind] ?? '#47cca9'\n const bw = Math.max(1, w / n)\n for (let i = 0; i < n; i++) {\n const v = sample[i]!\n const x = Math.floor((i / n) * w)\n const bh = v * scale\n if (isSigned) {\n if (bh >= 0) ctx.fillRect(x, zeroY - bh, Math.ceil(bw), bh)\n else ctx.fillRect(x, zeroY, Math.ceil(bw), -bh)\n } else {\n ctx.fillRect(x, zeroY - bh, Math.ceil(bw), bh)\n }\n }\n if (isSigned) {\n ctx.fillStyle = 'rgba(240, 237, 216, 0.2)'\n ctx.fillRect(0, zeroY, w, 1)\n }\n return { min, max, mean }\n }\n\n function renderBits(row: EntryRow, sample: Uint32Array, count: number): { ones: number; total: number } {\n const ctx = row.ctx\n const w = row.canvas.width\n const h = row.canvas.height\n if (!ctx) return { ones: 0, total: 0 }\n ctx.clearRect(0, 0, w, h)\n const totalBits = count * 32\n if (totalBits === 0) return { ones: 0, total: 0 }\n let ones = 0\n const px = w / totalBits\n ctx.fillStyle = FILL_BY_KIND.bits!\n for (let i = 0; i < count; i++) {\n const word = sample[i]! >>> 0\n for (let b = 0; b < 32; b++) {\n if ((word >>> b) & 1) {\n ones++\n const bitIdx = i * 32 + b\n const x = Math.floor(bitIdx * px)\n ctx.fillRect(x, 2, Math.max(1, Math.ceil(px)), h - 4)\n }\n }\n }\n return { ones, total: totalBits }\n }\n\n function renderEntry(row: EntryRow, entry: RegistryEntrySnapshot): void {\n if (row.lastVersion === entry.version) return\n row.lastVersion = entry.version\n row.nameLabel.title = `${entry.name} · ${entry.kind} · ${entry.count}`\n\n const kind = entry.kind\n if (kind === 'bits') {\n const { ones, total } = renderBits(row, entry.sample as Uint32Array, entry.count)\n row.valueLabel.textContent = `${ones} / ${total}`\n return\n }\n\n if (kind === 'float2' || kind === 'float3' || kind === 'float4') {\n const stride = kind === 'float2' ? 2 : kind === 'float3' ? 3 : 4\n const n = Math.floor(entry.sample.length / stride)\n const mags = new Float32Array(n)\n for (let i = 0; i < n; i++) {\n let sq = 0\n for (let c = 0; c < stride; c++) {\n const v = entry.sample[i * stride + c]!\n sq += v * v\n }\n mags[i] = Math.sqrt(sq)\n }\n const stats = renderBars(row, kind, mags, false)\n row.valueLabel.textContent = `${n}×${stride} μ=${stats.mean.toFixed(2)}`\n return\n }\n\n const isSigned = kind === 'int' || kind === 'float'\n const stats = renderBars(row, kind, entry.sample, isSigned)\n const fmt = (v: number): string => {\n if (!Number.isFinite(v)) return '—'\n if (kind === 'uint' || kind === 'int') return Math.round(v).toString()\n return v.toFixed(2)\n }\n row.valueLabel.textContent = `μ=${fmt(stats.mean)} ${fmt(stats.min)}–${fmt(stats.max)}`\n }\n\n const unsubscribe = client.addListener((state) => {\n const registry = state.registry\n\n const seen = new Map<string, Set<string>>()\n for (const [name] of registry) {\n const { group, short } = splitName(name)\n let bucket = seen.get(group)\n if (!bucket) {\n bucket = new Set()\n seen.set(group, bucket)\n }\n bucket.add(short)\n }\n\n // Prune.\n for (const [groupName, g] of groups) {\n const bucket = seen.get(groupName)\n if (!bucket) {\n destroyGroup(groupName)\n continue\n }\n for (const shortName of g.entries.keys()) {\n if (!bucket.has(shortName)) destroyEntryRow(g, shortName)\n }\n }\n\n // Ensure every row exists first (so cycling never lands on a\n // missing container), but defer rendering until active group is\n // pinned below.\n for (const [name] of registry) {\n const { group, short } = splitName(name)\n const g = ensureGroup(group)\n ensureEntryRow(g, name, short)\n }\n\n // Establish / repair active group.\n if (groups.size === 0) {\n activeGroup = null\n groupLabel.textContent = '—'\n } else if (activeGroup === null || !groups.has(activeGroup)) {\n setActiveGroup(groups.keys().next().value as string)\n } else {\n groupLabel.textContent = activeGroup\n const g = groups.get(activeGroup)!\n g.container.style.display = collapsed ? 'none' : 'flex'\n }\n\n // Only re-render the rows the user can actually see. Inactive\n // groups + collapsed state = no canvas work at all.\n if (!collapsed && activeGroup !== null) {\n const g = groups.get(activeGroup)\n if (g) {\n for (const [shortName, row] of g.entries) {\n const entry = registry.get(`${activeGroup}.${shortName}`) ?? registry.get(shortName)\n if (entry) renderEntry(row, entry)\n }\n }\n }\n\n // Arrows stay visible (so the header stays symmetric) but dim when\n // there's nowhere to cycle to.\n const multi = groups.size > 1\n const arrowOpacity = multi ? '0.8' : '0.25'\n const arrowPointer = multi ? 'pointer' : 'default'\n prevBtn.style.opacity = arrowOpacity\n nextBtn.style.opacity = arrowOpacity\n prevBtn.style.cursor = arrowPointer\n nextBtn.style.cursor = arrowPointer\n\n // Use `flex` (not `''`) so children can centre-align via flex.\n bladeEl.style.display = registry.size > 0 ? 'flex' : 'none'\n\n // Resync the filter — an entry may have been added/removed in the\n // active group since the last call. Client dedupes identical\n // subscribes so this is cheap on the quiet path.\n syncFilter()\n })\n\n return {\n element: bladeEl,\n dispose() {\n unsubscribe()\n groups.clear()\n blade.dispose()\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCA,MAAM,aAAa;AACnB,MAAM,YAAY;AAElB,MAAM,eAAuC;AAAA,EAC3C,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AACV;AAEA,SAAS,UAAU,MAAgD;AACjE,QAAM,MAAM,KAAK,QAAQ,GAAG;AAC5B,MAAI,QAAQ,GAAI,QAAO,EAAE,OAAO,aAAa,OAAO,KAAK;AACzD,SAAO,EAAE,OAAO,KAAK,MAAM,GAAG,GAAG,GAAG,OAAO,KAAK,MAAM,MAAM,CAAC,EAAE;AACjE;AAEO,SAAS,gBACd,QACA,QACoB;AACpB,QAAM,QAAQ,OAAO,SAAS,EAAE,MAAM,YAAY,CAAC;AAInD,QAAM,UAAU,MAAM;AACtB,UAAQ,YAAY;AACpB,UAAQ,YAAY;AAOpB,UAAQ,MAAM,UAAU;AAKxB,QAAM,SAAS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C,YAAM,IAAI,OAAO,IAAI,WAAW;AAChC,UAAI,GAAG;AACL,mBAAW,CAAC,WAAW,GAAG,KAAK,EAAE,SAAS;AACxC,gBAAM,QAAQ,SAAS,IAAI,GAAG,WAAW,IAAI,SAAS,EAAE,KAAK,SAAS,IAAI,SAAS;AACnF,cAAI,MAAO,aAAY,KAAK,KAAK;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAIA,UAAM,QAAQ,OAAO,OAAO;AAC5B,UAAM,eAAe,QAAQ,QAAQ;AACrC,UAAM,eAAe,QAAQ,YAAY;AACzC,YAAQ,MAAM,UAAU;AACxB,YAAQ,MAAM,UAAU;AACxB,YAAQ,MAAM,SAAS;AACvB,YAAQ,MAAM,SAAS;AAGvB,YAAQ,MAAM,UAAU,SAAS,OAAO,IAAI,SAAS;AAKrD,eAAW;AAAA,EACb,CAAC;AAED,SAAO;AAAA,IACL,SAAS;AAAA,IACT,UAAU;AACR,kBAAY;AACZ,aAAO,MAAM;AACb,YAAM,QAAQ;AAAA,IAChB;AAAA,EACF;AACF;","names":["stats"]}
|
package/dist/registry-view.d.cts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Pane, FolderApi } from 'tweakpane';
|
|
2
|
-
import { DevtoolsClient } from './devtools-client.cjs';
|
|
3
|
-
import 'three-flatland/debug-protocol';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Registry view — one group visible at a time. Header reads
|
|
7
|
-
* `◀ groupName ▶`; arrows cycle through the groups the provider has
|
|
8
|
-
* published. Below the header, every entry in the active group is
|
|
9
|
-
* stacked (one bar chart per entry) so you see the full module in one
|
|
10
|
-
* glance. Hidden while the registry is empty.
|
|
11
|
-
*
|
|
12
|
-
* Groups are derived from the part of each entry name before the
|
|
13
|
-
* first `.` (`forwardPlus.lightCounts` + `forwardPlus.tileScores` →
|
|
14
|
-
* group `forwardPlus`). Names without a dot land in an `ungrouped`
|
|
15
|
-
* bucket.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
interface RegistryViewHandle {
|
|
19
|
-
readonly element: HTMLElement;
|
|
20
|
-
dispose(): void;
|
|
21
|
-
}
|
|
22
|
-
declare function addRegistryView(parent: Pane | FolderApi, client: DevtoolsClient): RegistryViewHandle;
|
|
23
|
-
|
|
24
|
-
export { type RegistryViewHandle, addRegistryView };
|