deictic 0.8.0 → 0.9.0
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/API.md +73 -18
- package/README.md +1 -1
- package/dist/annotations/client.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/index.d.ts +13 -13
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +11 -7
- package/dist/client/index.js.map +1 -1
- package/dist/react/client.d.ts +19 -0
- package/dist/react/client.d.ts.map +1 -0
- package/dist/react/client.js +504 -0
- package/dist/react/client.js.map +1 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +1 -0
- package/dist/recommended/index.d.ts +15 -7
- package/dist/recommended/index.d.ts.map +1 -1
- package/dist/recommended/index.js +1 -1
- package/dist/recordings/client.d.ts.map +1 -1
- package/dist/recordings/client.js +48 -5
- package/dist/recordings/client.js.map +1 -1
- package/dist/screenshots/client.d.ts +9 -1
- package/dist/screenshots/client.d.ts.map +1 -1
- package/dist/screenshots/rrweb.d.ts +0 -6
- package/dist/screenshots/rrweb.d.ts.map +1 -1
- package/dist/screenshots/rrweb.js +53 -10
- package/dist/screenshots/rrweb.js.map +1 -1
- package/dist/shared/board.js +1 -1
- package/dist/shared/canvas.js +30 -0
- package/dist/shared/canvas.js.map +1 -0
- package/dist/shared/client.js +44 -2
- package/dist/shared/client.js.map +1 -1
- package/dist/shared/dom.js +7 -1
- package/dist/shared/dom.js.map +1 -1
- package/dist/shared/drawer.js +1 -1
- package/dist/shared/endpoints.js +1 -1
- package/dist/shared/find.js +6 -1
- package/dist/shared/find.js.map +1 -1
- package/dist/shared/frame.js +5 -2
- package/dist/shared/frame.js.map +1 -1
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index10.d.ts +70 -0
- package/dist/shared/index10.d.ts.map +1 -0
- package/dist/shared/index3.d.ts +11 -0
- package/dist/shared/index3.d.ts.map +1 -1
- package/dist/shared/index7.d.ts +92 -312
- package/dist/shared/index7.d.ts.map +1 -1
- package/dist/shared/index8.d.ts +324 -47
- package/dist/shared/index8.d.ts.map +1 -1
- package/dist/shared/index9.d.ts +45 -63
- package/dist/shared/index9.d.ts.map +1 -1
- package/dist/shared/init.js +15 -11
- package/dist/shared/init.js.map +1 -1
- package/dist/shared/marks.js +7 -1
- package/dist/shared/marks.js.map +1 -1
- package/dist/shared/package.js +3 -1
- package/dist/shared/packages.js +1 -1
- package/dist/shared/playwright.js +59 -3
- package/dist/shared/playwright.js.map +1 -1
- package/dist/shared/react.js +25 -0
- package/dist/shared/react.js.map +1 -0
- package/dist/shared/recommended.js +6 -3
- package/dist/shared/recommended.js.map +1 -1
- package/dist/shared/recording.js +80 -3
- package/dist/shared/recording.js.map +1 -1
- package/dist/shared/recordings.js +30 -2
- package/dist/shared/recordings.js.map +1 -1
- package/dist/shared/screenshots.js.map +1 -1
- package/dist/shared/src.js.map +1 -1
- package/dist/shared/task.js +1 -0
- package/dist/shared/task.js.map +1 -1
- package/dist/shared/tasks.js +11 -0
- package/dist/shared/tasks.js.map +1 -1
- package/dist/tailwind/client.d.ts +1 -1
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tasks/client.d.ts +1 -1
- package/dist/tasks/client.js +45 -19
- package/dist/tasks/client.js.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/voice/client.d.ts +1 -1
- package/dist/voice/client.js +1 -1
- package/dist/voice/index.d.ts +1 -1
- package/package.json +25 -1
- package/src/cli/bun.ts +2 -2
- package/src/cli/find.ts +5 -1
- package/src/cli/frame.ts +6 -3
- package/src/cli/init.ts +14 -9
- package/src/cli/recording.ts +90 -4
- package/src/cli/task.ts +4 -0
- package/src/cli.ts +13 -6
- package/src/client/dom.ts +14 -0
- package/src/client/index.ts +21 -14
- package/src/index.ts +6 -0
- package/src/plugins/react/client.ts +162 -0
- package/src/plugins/react/index.ts +130 -0
- package/src/plugins/react/renders.ts +219 -0
- package/src/plugins/react/serialize.ts +139 -0
- package/src/plugins/react/timeline.ts +143 -0
- package/src/plugins/recommended/index.ts +17 -5
- package/src/plugins/recordings/client.ts +64 -4
- package/src/plugins/recordings/marks.ts +7 -0
- package/src/plugins/recordings/replay.ts +30 -2
- package/src/plugins/screenshots/canvas.ts +27 -0
- package/src/plugins/screenshots/client.ts +42 -2
- package/src/plugins/screenshots/index.ts +11 -0
- package/src/plugins/screenshots/playwright.ts +90 -4
- package/src/plugins/screenshots/rrweb.ts +57 -9
- package/src/plugins/screenshots/states.ts +26 -0
- package/src/plugins/tasks/client.ts +41 -6
- package/src/plugins/tasks/composer.ts +24 -7
- package/src/plugins/tasks/index.ts +16 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as Commit } from "../shared/index7.js";
|
|
2
|
+
/** What a task asks of the plugin, and a recording. */
|
|
3
|
+
export interface Inspector {
|
|
4
|
+
/** The snapshot of the element's components, as the JSON a task attaches: `undefined` where React didn't render it in development. */
|
|
5
|
+
snapshot(el: Element): Promise<string | undefined>;
|
|
6
|
+
/**
|
|
7
|
+
* React's commits from now, an entry a frame (`emit` hears each), until what's answered stops it: for a recording.
|
|
8
|
+
* `undefined` where renders aren't counted (`renders: false`, or no DevTools hook on the page).
|
|
9
|
+
*/
|
|
10
|
+
commits?: (emit: (commit: Commit) => void) => () => void;
|
|
11
|
+
}
|
|
12
|
+
declare module 'deictic' {
|
|
13
|
+
interface ClientApis {
|
|
14
|
+
react: Inspector;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import("deictic").ClientPlugin<never, never, Inspector>;
|
|
18
|
+
export { _default as default };
|
|
19
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../src/plugins/react/client.ts"],"mappings":";;iBAgBiB;;EAEf,SAAS,IAAI,UAAU;;;;;EAKvB,WAAW,OAAO,QAAQ;;;YAIhB;IACR,OAAO;;;cAuDX,4B"}
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import { i as ownerOf, n as fiberOf, t as componentOf } from "../shared/component.js";
|
|
2
|
+
import { n as defineClientPlugin } from "../shared/src.js";
|
|
3
|
+
import { o as sensitive } from "../shared/mask.js";
|
|
4
|
+
// src/plugins/react/renders.ts
|
|
5
|
+
/** Function, class, `forwardRef` and simple `memo` components: those that render (a `memo` wrapper's is its child). */
|
|
6
|
+
const COMPOSITE = /* @__PURE__ */ new Set([
|
|
7
|
+
0,
|
|
8
|
+
1,
|
|
9
|
+
11,
|
|
10
|
+
15
|
|
11
|
+
]);
|
|
12
|
+
const CLASS = 1;
|
|
13
|
+
/** React's flag for a fiber whose component ran in this render, rather than bailed out. */
|
|
14
|
+
const PERFORMED_WORK = 1;
|
|
15
|
+
/** How many render times are kept per component, for how many were recent. */
|
|
16
|
+
const KEPT = 100;
|
|
17
|
+
/** What's recent: renders this long before a task, a loop or a burst. */
|
|
18
|
+
const RECENT = 1e4;
|
|
19
|
+
/** How many changed props a reason names. */
|
|
20
|
+
const NAMED$1 = 10;
|
|
21
|
+
/** A hook's state that's an effect: a new one each render, which says nothing changed. */
|
|
22
|
+
const isEffect = (state) => typeof state === "object" && state !== null && "create" in state && "tag" in state;
|
|
23
|
+
/** Why `next` rendered, `prev` being what it was: its props, its state, a context, or its parent rendering it again. */
|
|
24
|
+
function whyOf(next, prev) {
|
|
25
|
+
if (prev === null) return "mounted";
|
|
26
|
+
const reasons = [];
|
|
27
|
+
if (next.memoizedProps !== prev.memoizedProps) {
|
|
28
|
+
const before = prev.memoizedProps ?? {};
|
|
29
|
+
const now = next.memoizedProps ?? {};
|
|
30
|
+
const keys = [.../* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(now)])].filter((k) => !Object.is(before[k], now[k]));
|
|
31
|
+
if (keys.length > 0) reasons.push(`props changed: ${keys.slice(0, NAMED$1).join(", ")}${keys.length > NAMED$1 ? ` and ${keys.length - NAMED$1} more` : ""}`);
|
|
32
|
+
}
|
|
33
|
+
if (stateChanged(next, prev)) reasons.push("state changed");
|
|
34
|
+
if (contextChanged(next, prev)) reasons.push("context changed");
|
|
35
|
+
return reasons.length > 0 ? reasons.join("; ") : "its parent rendered";
|
|
36
|
+
}
|
|
37
|
+
function stateChanged(next, prev) {
|
|
38
|
+
if (next.memoizedState === prev.memoizedState) return false;
|
|
39
|
+
if (next.tag === CLASS) return true;
|
|
40
|
+
let a = prev.memoizedState;
|
|
41
|
+
let b = next.memoizedState;
|
|
42
|
+
for (; a != null && b != null; a = a.next, b = b.next) {
|
|
43
|
+
if (Object.is(a.memoizedState, b.memoizedState) || isEffect(b.memoizedState)) continue;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
function contextChanged(next, prev) {
|
|
49
|
+
let a = prev.dependencies?.firstContext;
|
|
50
|
+
let b = next.dependencies?.firstContext;
|
|
51
|
+
for (; a != null && b != null; a = a.next, b = b.next) if (!Object.is(a.memoizedValue, b.memoizedValue)) return true;
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
/** The stats of every component the page rendered since it started being counted, read by its fiber, either of its two. */
|
|
55
|
+
function renderStats(now = () => performance.now()) {
|
|
56
|
+
const stats = /* @__PURE__ */ new WeakMap();
|
|
57
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
58
|
+
const record = (fiber, prev) => {
|
|
59
|
+
const entry = stats.get(fiber) ?? (fiber.alternate === null ? void 0 : stats.get(fiber.alternate)) ?? {
|
|
60
|
+
count: 0,
|
|
61
|
+
at: [],
|
|
62
|
+
why: ""
|
|
63
|
+
};
|
|
64
|
+
entry.count++;
|
|
65
|
+
entry.at.push(now());
|
|
66
|
+
if (entry.at.length > KEPT) entry.at.shift();
|
|
67
|
+
entry.why = whyOf(fiber, prev);
|
|
68
|
+
if (typeof fiber.actualDuration === "number") entry.lastMs = fiber.actualDuration;
|
|
69
|
+
if (typeof fiber.selfBaseDuration === "number") entry.selfMs = fiber.selfBaseDuration;
|
|
70
|
+
stats.set(fiber, entry);
|
|
71
|
+
if (fiber.alternate !== null) stats.set(fiber.alternate, entry);
|
|
72
|
+
return {
|
|
73
|
+
fiber,
|
|
74
|
+
why: entry.why,
|
|
75
|
+
...typeof fiber.actualDuration === "number" ? { ms: fiber.actualDuration } : {},
|
|
76
|
+
...typeof fiber.selfBaseDuration === "number" ? { selfMs: fiber.selfBaseDuration } : {}
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/** A committed tree, from its root's current fiber: what was rendered in it, and nothing React left as it was. */
|
|
80
|
+
const commit = (root, priority) => {
|
|
81
|
+
const rendered = [];
|
|
82
|
+
const stack = [];
|
|
83
|
+
for (let child = root.child; child !== null; child = child.sibling) stack.push(child);
|
|
84
|
+
while (stack.length > 0) {
|
|
85
|
+
const fiber = stack.pop();
|
|
86
|
+
const prev = fiber.alternate;
|
|
87
|
+
if ((prev === null || ((fiber.flags ?? 0) & PERFORMED_WORK) !== 0) && COMPOSITE.has(fiber.tag)) rendered.push(record(fiber, prev));
|
|
88
|
+
if (prev !== null && fiber.child === prev.child) continue;
|
|
89
|
+
for (let child = fiber.child; child !== null; child = child.sibling) stack.push(child);
|
|
90
|
+
}
|
|
91
|
+
if (listeners.size === 0) return;
|
|
92
|
+
const made = {
|
|
93
|
+
rendered,
|
|
94
|
+
...typeof root.actualDuration === "number" ? { ms: root.actualDuration } : {},
|
|
95
|
+
...priority === void 0 ? {} : { priority }
|
|
96
|
+
};
|
|
97
|
+
for (const listen of listeners) listen(made);
|
|
98
|
+
};
|
|
99
|
+
/** Hears each commit from now, until what's answered stops it. */
|
|
100
|
+
const subscribe = (listen) => {
|
|
101
|
+
listeners.add(listen);
|
|
102
|
+
return () => void listeners.delete(listen);
|
|
103
|
+
};
|
|
104
|
+
const read = (fiber) => {
|
|
105
|
+
const entry = stats.get(fiber) ?? (fiber.alternate === null ? void 0 : stats.get(fiber.alternate));
|
|
106
|
+
if (entry === void 0) return void 0;
|
|
107
|
+
const at = now();
|
|
108
|
+
const round = (ms) => Math.round(ms * 100) / 100;
|
|
109
|
+
return {
|
|
110
|
+
count: entry.count,
|
|
111
|
+
recent: entry.at.filter((t) => at - t <= RECENT).length,
|
|
112
|
+
lastAgo: Math.round(at - entry.at.at(-1)),
|
|
113
|
+
...entry.lastMs === void 0 ? {} : { lastMs: round(entry.lastMs) },
|
|
114
|
+
...entry.selfMs === void 0 ? {} : { selfMs: round(entry.selfMs) },
|
|
115
|
+
why: entry.why
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
return {
|
|
119
|
+
commit,
|
|
120
|
+
read,
|
|
121
|
+
subscribe
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Counts every commit from now on, where the page has DevTools' hook: answers what reads the counts and what hears
|
|
126
|
+
* each commit, or nothing where
|
|
127
|
+
* there's no hook (React then calls nothing, and keeps no timings either). The hook's own handler (React Refresh's,
|
|
128
|
+
* or the DevTools extension's) goes on being called first.
|
|
129
|
+
*/
|
|
130
|
+
function countRenders(target = globalThis) {
|
|
131
|
+
const hook = target.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
132
|
+
if (hook === void 0) return void 0;
|
|
133
|
+
const counts = renderStats();
|
|
134
|
+
let warned = false;
|
|
135
|
+
const before = hook.onCommitFiberRoot;
|
|
136
|
+
hook.onCommitFiberRoot = function(id, root, priority, ...rest) {
|
|
137
|
+
const answer = before?.call(this, id, root, priority, ...rest);
|
|
138
|
+
try {
|
|
139
|
+
counts.commit(root.current, priority);
|
|
140
|
+
} catch (e) {
|
|
141
|
+
if (!warned) console.warn("deictic: renders aren't counted on this page", e);
|
|
142
|
+
warned = true;
|
|
143
|
+
}
|
|
144
|
+
return answer;
|
|
145
|
+
};
|
|
146
|
+
return {
|
|
147
|
+
read: counts.read,
|
|
148
|
+
subscribe: counts.subscribe
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
// src/plugins/react/serialize.ts
|
|
152
|
+
/**
|
|
153
|
+
* A component's props, state and hooks as JSON: what a person would see of them in React's DevTools, for an agent
|
|
154
|
+
* to read in a file. Anything JSON can't hold says what it was, in brackets (`[function onClick]`, `[<Button>]`,
|
|
155
|
+
* `[circular]`), and what's too deep or too long is cut where it says so, as a page's values may be its whole store.
|
|
156
|
+
*/
|
|
157
|
+
const LIMITS = {
|
|
158
|
+
depth: 5,
|
|
159
|
+
items: 50,
|
|
160
|
+
text: 1e3
|
|
161
|
+
};
|
|
162
|
+
const ELEMENTS = /* @__PURE__ */ new Set([Symbol.for("react.transitional.element"), Symbol.for("react.element")]);
|
|
163
|
+
/** A function's or a class's name, or nothing for one with none. */
|
|
164
|
+
const nameOf = (fn) => {
|
|
165
|
+
if (typeof fn !== "function" && (typeof fn !== "object" || fn === null)) return void 0;
|
|
166
|
+
const { displayName, name } = fn;
|
|
167
|
+
const found = displayName ?? name;
|
|
168
|
+
return typeof found === "string" && found !== "" ? found : void 0;
|
|
169
|
+
};
|
|
170
|
+
/** `<Button>` for a React element: its tag, or its component's name through `memo` and `forwardRef`. */
|
|
171
|
+
function elementName(type) {
|
|
172
|
+
if (typeof type === "string") return type;
|
|
173
|
+
let at = type;
|
|
174
|
+
for (let depth = 0; depth < 4 && at !== null && at !== void 0; depth++) {
|
|
175
|
+
const name = nameOf(at);
|
|
176
|
+
if (name !== void 0) return name;
|
|
177
|
+
at = at.render ?? at.type;
|
|
178
|
+
}
|
|
179
|
+
return "Anonymous";
|
|
180
|
+
}
|
|
181
|
+
const cut = (text, limit) => text.length > limit ? `${text.slice(0, limit)}… (${text.length - limit} more)` : text;
|
|
182
|
+
/** What a value read as, as JSON, its secrets blanked by their names (and `mask`'s, a part of a name in any case). */
|
|
183
|
+
function serialize(value, mask = [], limits = LIMITS) {
|
|
184
|
+
const above = /* @__PURE__ */ new Set();
|
|
185
|
+
const walk = (value, depth) => {
|
|
186
|
+
switch (typeof value) {
|
|
187
|
+
case "undefined": return;
|
|
188
|
+
case "boolean": return value;
|
|
189
|
+
case "number": return Number.isFinite(value) ? value : `[${value}]`;
|
|
190
|
+
case "bigint": return `[${value}n]`;
|
|
191
|
+
case "string": return cut(value, limits.text);
|
|
192
|
+
case "symbol": return `[${value.toString()}]`;
|
|
193
|
+
case "function": return `[function${nameOf(value) === void 0 ? "" : ` ${nameOf(value)}`}]`;
|
|
194
|
+
}
|
|
195
|
+
if (value === null || typeof value !== "object") return null;
|
|
196
|
+
const object = value;
|
|
197
|
+
if (ELEMENTS.has(object.$$typeof)) return `[<${elementName(object.type)}>]`;
|
|
198
|
+
if (typeof object.nodeType === "number" && typeof object.nodeName === "string") {
|
|
199
|
+
const { nodeType, nodeName } = object;
|
|
200
|
+
return nodeType === 1 ? `[<${nodeName.toLowerCase()}>]` : `[${nodeName}]`;
|
|
201
|
+
}
|
|
202
|
+
if (typeof window !== "undefined" && value === window) return "[window]";
|
|
203
|
+
if (value instanceof Date) return Number.isNaN(value.getTime()) ? "[Invalid Date]" : value.toISOString();
|
|
204
|
+
if (value instanceof RegExp) return `[${value.toString()}]`;
|
|
205
|
+
if (value instanceof Error) return `[${value.name}: ${cut(value.message, limits.text)}]`;
|
|
206
|
+
if (typeof object.then === "function") return "[Promise]";
|
|
207
|
+
if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer) return `[${nameOf(value.constructor) ?? "Buffer"}(${value.byteLength} bytes)]`;
|
|
208
|
+
if (above.has(value)) return "[circular]";
|
|
209
|
+
const many = Array.isArray(value) ? value.length : value instanceof Map || value instanceof Set ? value.size : void 0;
|
|
210
|
+
if (depth >= limits.depth) {
|
|
211
|
+
if (Array.isArray(value)) return `[Array(${value.length})]`;
|
|
212
|
+
if (value instanceof Map) return `[Map(${value.size})]`;
|
|
213
|
+
if (value instanceof Set) return `[Set(${value.size})]`;
|
|
214
|
+
return `[${nameOf(value.constructor) ?? "Object"}]`;
|
|
215
|
+
}
|
|
216
|
+
above.add(value);
|
|
217
|
+
try {
|
|
218
|
+
const items = (entries, of) => {
|
|
219
|
+
const out = [];
|
|
220
|
+
for (const item of entries) {
|
|
221
|
+
if (out.length === limits.items) {
|
|
222
|
+
out.push(`[… ${(many ?? 0) - limits.items} more]`);
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
out.push(of(item));
|
|
226
|
+
}
|
|
227
|
+
return out;
|
|
228
|
+
};
|
|
229
|
+
const inside = (item) => walk(item, depth + 1) ?? "[undefined]";
|
|
230
|
+
if (Array.isArray(value)) return items(value, inside);
|
|
231
|
+
if (value instanceof Set) return { [`Set(${value.size})`]: items(value, inside) };
|
|
232
|
+
if (value instanceof Map) {
|
|
233
|
+
const pair = (entry) => {
|
|
234
|
+
const [key, item] = entry;
|
|
235
|
+
return [inside(key), typeof key === "string" && sensitive(key, mask) ? "***" : inside(item)];
|
|
236
|
+
};
|
|
237
|
+
return { [`Map(${value.size})`]: items(value, pair) };
|
|
238
|
+
}
|
|
239
|
+
const out = {};
|
|
240
|
+
const proto = Object.getPrototypeOf(value);
|
|
241
|
+
const made = proto === null || proto === Object.prototype ? void 0 : nameOf(proto.constructor);
|
|
242
|
+
if (made !== void 0) out["@"] = made;
|
|
243
|
+
const keys = Object.keys(value);
|
|
244
|
+
for (const key of keys.slice(0, limits.items)) {
|
|
245
|
+
let item;
|
|
246
|
+
try {
|
|
247
|
+
item = object[key];
|
|
248
|
+
} catch {
|
|
249
|
+
out[key] = "[unreadable]";
|
|
250
|
+
continue;
|
|
251
|
+
}
|
|
252
|
+
const read = sensitive(key, mask) ? "***" : walk(item, depth + 1);
|
|
253
|
+
if (read !== void 0) out[key] = read;
|
|
254
|
+
}
|
|
255
|
+
if (keys.length > limits.items) out["…"] = `${keys.length - limits.items} more keys`;
|
|
256
|
+
return out;
|
|
257
|
+
} finally {
|
|
258
|
+
above.delete(value);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
return walk(value, 0);
|
|
262
|
+
}
|
|
263
|
+
/** How many components an entry names, the slowest first. */
|
|
264
|
+
const NAMED = 20;
|
|
265
|
+
/** The span entries are counted in, in milliseconds. */
|
|
266
|
+
const SECOND = 1e3;
|
|
267
|
+
/** How far down a component a host element it wrote is looked for, in fibers. */
|
|
268
|
+
const LOOKED = 200;
|
|
269
|
+
/** React's scheduler priorities, as `onCommitFiberRoot` is given them. */
|
|
270
|
+
const PRIORITIES = {
|
|
271
|
+
1: "immediate",
|
|
272
|
+
2: "user-blocking",
|
|
273
|
+
3: "normal",
|
|
274
|
+
4: "low",
|
|
275
|
+
5: "idle"
|
|
276
|
+
};
|
|
277
|
+
/** `src/Plan.tsx:12`: the first host element under `fiber` that it wrote, where the page marks it. */
|
|
278
|
+
function placeOf$1(fiber) {
|
|
279
|
+
const its = (by) => by != null && (by === fiber || by === fiber.alternate);
|
|
280
|
+
const stack = fiber.child === null ? [] : [fiber.child];
|
|
281
|
+
for (let looked = 0; stack.length > 0 && looked < LOOKED; looked++) {
|
|
282
|
+
const at = stack.pop();
|
|
283
|
+
if (at.sibling !== null) stack.push(at.sibling);
|
|
284
|
+
if (typeof at.type === "string" && its(at._debugOwner)) {
|
|
285
|
+
const mark = at.stateNode?.getAttribute?.("data-deictic");
|
|
286
|
+
if (typeof mark === "string") return mark.replace(/:\d+$/, "");
|
|
287
|
+
}
|
|
288
|
+
if (at.child !== null) stack.push(at.child);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const round = (ms) => Math.round(ms * 100) / 100;
|
|
292
|
+
/** One entry of commits: the components that rendered, each once with how often, the slowest first. */
|
|
293
|
+
function summarize(commits) {
|
|
294
|
+
const by = /* @__PURE__ */ new Map();
|
|
295
|
+
for (const { rendered } of commits) for (const { fiber, why, ms, selfMs } of rendered) {
|
|
296
|
+
const name = componentOf(fiber) ?? "Anonymous";
|
|
297
|
+
const at = placeOf$1(fiber);
|
|
298
|
+
const key = `${name} ${at ?? ""}`;
|
|
299
|
+
const entry = by.get(key) ?? {
|
|
300
|
+
name,
|
|
301
|
+
...at === void 0 ? {} : { at },
|
|
302
|
+
count: 0,
|
|
303
|
+
why,
|
|
304
|
+
order: by.size
|
|
305
|
+
};
|
|
306
|
+
entry.count = (entry.count ?? 0) + 1;
|
|
307
|
+
entry.why = why;
|
|
308
|
+
if (ms !== void 0) entry.ms = round((entry.ms ?? 0) + ms);
|
|
309
|
+
if (selfMs !== void 0) entry.selfMs = round((entry.selfMs ?? 0) + selfMs);
|
|
310
|
+
by.set(key, entry);
|
|
311
|
+
}
|
|
312
|
+
const all = [...by.values()].sort((a, b) => (b.selfMs ?? 0) - (a.selfMs ?? 0) !== 0 ? (b.selfMs ?? 0) - (a.selfMs ?? 0) : a.order - b.order);
|
|
313
|
+
const kept = all.slice(0, NAMED);
|
|
314
|
+
const timed = commits.flatMap((c) => c.ms === void 0 ? [] : [c.ms]);
|
|
315
|
+
const ms = timed.length === 0 ? void 0 : timed.reduce((sum, n) => sum + n, 0);
|
|
316
|
+
const priority = commits.at(-1)?.priority;
|
|
317
|
+
return {
|
|
318
|
+
commits: commits.length,
|
|
319
|
+
...ms === void 0 ? {} : { ms: round(ms) },
|
|
320
|
+
...commits.length > 1 && timed.length > 0 ? { slowest: round(Math.max(...timed)) } : {},
|
|
321
|
+
...priority === void 0 || PRIORITIES[priority] === void 0 ? {} : { priority: PRIORITIES[priority] },
|
|
322
|
+
components: kept.map(({ order: _, count, ...rest }) => ({
|
|
323
|
+
...rest,
|
|
324
|
+
...count !== void 0 && count > 1 ? { count } : {}
|
|
325
|
+
})),
|
|
326
|
+
...all.length > kept.length ? { more: all.length - kept.length } : {}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Listens to the commits `subscribe` gives, and answers each frame's as one entry, `RATE` a second, then the rest of
|
|
331
|
+
* that second as one: `emit` hears them, until what's answered stops it (what's waiting goes first).
|
|
332
|
+
*/
|
|
333
|
+
function timeline(subscribe, emit, clock = {
|
|
334
|
+
now: () => performance.now(),
|
|
335
|
+
later: (run, ms) => setTimeout(run, ms)
|
|
336
|
+
}) {
|
|
337
|
+
let waiting = [];
|
|
338
|
+
let second = Number.NEGATIVE_INFINITY;
|
|
339
|
+
let inSecond = 0;
|
|
340
|
+
let over = [];
|
|
341
|
+
let overFrom = 0;
|
|
342
|
+
const flushOver = () => {
|
|
343
|
+
if (over.length === 0) return;
|
|
344
|
+
const commits = over;
|
|
345
|
+
over = [];
|
|
346
|
+
emit({
|
|
347
|
+
...summarize(commits),
|
|
348
|
+
over: Math.round(clock.now() - overFrom)
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
const flush = () => {
|
|
352
|
+
const commits = waiting;
|
|
353
|
+
waiting = [];
|
|
354
|
+
if (commits.length === 0) return;
|
|
355
|
+
const now = clock.now();
|
|
356
|
+
if (now - second >= SECOND) {
|
|
357
|
+
flushOver();
|
|
358
|
+
second = now;
|
|
359
|
+
inSecond = 0;
|
|
360
|
+
}
|
|
361
|
+
if (inSecond < 10) {
|
|
362
|
+
inSecond++;
|
|
363
|
+
emit(summarize(commits));
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
if (over.length === 0) {
|
|
367
|
+
overFrom = now;
|
|
368
|
+
const counting = second;
|
|
369
|
+
clock.later(() => {
|
|
370
|
+
if (second === counting) flushOver();
|
|
371
|
+
}, second + SECOND - now);
|
|
372
|
+
}
|
|
373
|
+
over.push(...commits);
|
|
374
|
+
};
|
|
375
|
+
const unsubscribe = subscribe((commit) => {
|
|
376
|
+
if (waiting.length === 0) clock.later(flush, 16);
|
|
377
|
+
waiting.push(commit);
|
|
378
|
+
});
|
|
379
|
+
return () => {
|
|
380
|
+
unsubscribe();
|
|
381
|
+
flush();
|
|
382
|
+
flushOver();
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
// src/plugins/react/client.ts
|
|
386
|
+
/** How long hook names may take: their source, and its map, are fetched from the dev server. */
|
|
387
|
+
const NAMES_WAIT = 3e3;
|
|
388
|
+
/** What's attached at most, in characters: a page's values may be its whole store. */
|
|
389
|
+
const MOST = 2e5;
|
|
390
|
+
/** Hooks whose values are functions to run, which say nothing of what the component shows. */
|
|
391
|
+
const SILENT = /* @__PURE__ */ new Set([
|
|
392
|
+
"Effect",
|
|
393
|
+
"LayoutEffect",
|
|
394
|
+
"InsertionEffect",
|
|
395
|
+
"ImperativeHandle",
|
|
396
|
+
"EffectEvent"
|
|
397
|
+
]);
|
|
398
|
+
let loading;
|
|
399
|
+
/**
|
|
400
|
+
* bippy, with a renderer to inspect hooks through. React hands its renderer to DevTools' hook as it loads, which
|
|
401
|
+
* React Refresh (Vite's, Next's) installs first in development; where nothing did, the page's React is asked for its
|
|
402
|
+
* dispatcher, which is all hook inspection needs of one.
|
|
403
|
+
*/
|
|
404
|
+
const bippy = () => loading ??= (async () => {
|
|
405
|
+
const [main, source] = await Promise.all([import("bippy"), import("bippy/source")]).catch((e) => {
|
|
406
|
+
loading = void 0;
|
|
407
|
+
throw new Error("react needs bippy: add it to your devDependencies", { cause: e });
|
|
408
|
+
});
|
|
409
|
+
if (main.getRDTHook().renderers.size === 0 && main._renderers.size === 0) {
|
|
410
|
+
const React = await import("react");
|
|
411
|
+
const internals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ?? React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentDispatcher;
|
|
412
|
+
if (internals !== void 0) main._renderers.add({ currentDispatcherRef: internals });
|
|
413
|
+
}
|
|
414
|
+
return {
|
|
415
|
+
...main,
|
|
416
|
+
...source
|
|
417
|
+
};
|
|
418
|
+
})();
|
|
419
|
+
const parentOf = (el) => {
|
|
420
|
+
if (el.parentElement !== null) return el.parentElement;
|
|
421
|
+
const root = el.getRootNode();
|
|
422
|
+
return root instanceof ShadowRoot ? root.host : void 0;
|
|
423
|
+
};
|
|
424
|
+
/** `src/Plan.tsx:12`: where the nearest element around `el` that `owner` wrote is, which is in its JSX. */
|
|
425
|
+
function placeOf(el, owner) {
|
|
426
|
+
for (let at = el; at !== void 0; at = parentOf(at)) {
|
|
427
|
+
const by = ownerOf(fiberOf(at));
|
|
428
|
+
if (by === void 0 || by !== owner && by !== owner.alternate) continue;
|
|
429
|
+
const mark = at.getAttribute("data-deictic");
|
|
430
|
+
if (mark !== null) return mark.replace(/:\d+$/, "");
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
var client_default = defineClientPlugin({
|
|
434
|
+
name: "react",
|
|
435
|
+
setup: ({ options }) => {
|
|
436
|
+
const { components = 4, mask = [], names = true, renders = true } = options ?? {};
|
|
437
|
+
const counted = renders ? countRenders() : void 0;
|
|
438
|
+
const value = (of) => serialize(of, mask);
|
|
439
|
+
/** A hook as DevTools lists it: its kind (`State`, or a custom hook's name less `use`), what the code calls it, its value. */
|
|
440
|
+
const hookOf = (node, named) => {
|
|
441
|
+
if (SILENT.has(node.name)) return void 0;
|
|
442
|
+
const { fileName, lineNumber, columnNumber } = node.hookSource ?? {};
|
|
443
|
+
const as = fileName ? named.get(`${fileName}:${lineNumber ?? 0}:${columnNumber ?? 0}`) : void 0;
|
|
444
|
+
const inner = node.subHooks.flatMap((sub) => hookOf(sub, named) ?? []);
|
|
445
|
+
const read = node.subHooks.length > 0 && node.value === void 0 ? void 0 : value(node.value);
|
|
446
|
+
return {
|
|
447
|
+
hook: node.name,
|
|
448
|
+
...as === void 0 ? {} : { as },
|
|
449
|
+
...read === void 0 ? {} : { value: read },
|
|
450
|
+
...inner.length === 0 ? {} : { hooks: inner }
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
return {
|
|
454
|
+
...counted === void 0 ? {} : { commits: (emit) => timeline(counted.subscribe, emit) },
|
|
455
|
+
snapshot: async (el) => {
|
|
456
|
+
const wrote = ownerOf(fiberOf(el));
|
|
457
|
+
if (wrote === void 0) return void 0;
|
|
458
|
+
const b = await bippy();
|
|
459
|
+
const found = [];
|
|
460
|
+
for (let owner = wrote; owner !== void 0 && found.length < components; owner = ownerOf(owner)) {
|
|
461
|
+
const name = componentOf(owner) ?? "Anonymous";
|
|
462
|
+
if (typeof owner.name === "string") {
|
|
463
|
+
found.push({
|
|
464
|
+
name,
|
|
465
|
+
server: true
|
|
466
|
+
});
|
|
467
|
+
continue;
|
|
468
|
+
}
|
|
469
|
+
const fiber = b.getLatestFiber(owner);
|
|
470
|
+
const at = placeOf(el, owner);
|
|
471
|
+
const component = {
|
|
472
|
+
name,
|
|
473
|
+
...at === void 0 ? {} : { at }
|
|
474
|
+
};
|
|
475
|
+
const props = value(fiber.memoizedProps);
|
|
476
|
+
if (props !== void 0) component.props = props;
|
|
477
|
+
const rendered = counted?.read(fiber);
|
|
478
|
+
if (rendered !== void 0) component.renders = rendered;
|
|
479
|
+
if (fiber.stateNode !== null && typeof fiber.stateNode === "object" && "state" in fiber.stateNode) {
|
|
480
|
+
const state = value(fiber.stateNode.state);
|
|
481
|
+
if (state !== void 0) component.state = state;
|
|
482
|
+
} else try {
|
|
483
|
+
const tree = b.getFiberHooks(fiber);
|
|
484
|
+
let named = /* @__PURE__ */ new Map();
|
|
485
|
+
if (names && tree.length > 0) named = await b.parseHookNames(tree, void 0, { timeoutMs: NAMES_WAIT }).catch(() => /* @__PURE__ */ new Map());
|
|
486
|
+
const hooks = tree.flatMap((node) => hookOf(node, named) ?? []);
|
|
487
|
+
if (hooks.length > 0) component.hooks = hooks;
|
|
488
|
+
} catch (e) {
|
|
489
|
+
component.problem = `its hooks couldn't be read: ${e instanceof Error ? e.message : String(e)}`;
|
|
490
|
+
}
|
|
491
|
+
found.push(component);
|
|
492
|
+
}
|
|
493
|
+
if (found.length === 0) return void 0;
|
|
494
|
+
const json = JSON.stringify({ components: found }, null, 2);
|
|
495
|
+
if (json.length <= MOST) return json;
|
|
496
|
+
const less = JSON.stringify({ components: found.slice(0, 1) }, null, 2);
|
|
497
|
+
return less.length <= MOST ? less : `${less.slice(0, MOST)}\n… cut short`;
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
export { client_default as default };
|
|
503
|
+
|
|
504
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","names":["NAMED","placeOf"],"sources":["../../src/plugins/react/renders.ts","../../src/plugins/react/serialize.ts","../../src/plugins/react/timeline.ts","../../src/plugins/react/client.ts"],"sourcesContent":["/**\n * How often each component rendered, how long it took and why, as React's DevTools profiler tells it: each commit\n * React hands DevTools' hook (`onCommitFiberRoot`) is walked for the components it rendered. The hook is React\n * Refresh's in development (Vite's, Next's, webpack's and Rspack's), which React found as it loaded, and calls on\n * every commit whoever answers it later: so it's counted from when deictic's page half starts, not from the page's\n * first render.\n */\nimport type { Renders } from './index.ts';\n\n/** What a fiber holds that this reads: React's own, in development. */\nexport interface Fiber {\n tag: number;\n flags?: number;\n alternate: Fiber | null;\n child: Fiber | null;\n sibling: Fiber | null;\n memoizedProps?: unknown;\n memoizedState?: unknown;\n dependencies?: { firstContext?: Dependency | null } | null;\n /** In profiling mode, which React is in where DevTools' hook was there as it loaded: this render, with what's under it. */\n actualDuration?: number;\n /** And its own part of it. */\n selfBaseDuration?: number;\n /** The component, or a host element's tag. */\n type?: unknown;\n /** Who wrote it, in development. */\n _debugOwner?: Fiber | null;\n /** A host element's DOM node. */\n stateNode?: unknown;\n}\n\n/** A component that rendered in a commit: its timings as they were then, as the next render overwrites a fiber's. */\nexport interface RenderedFiber {\n fiber: Fiber;\n why: string;\n ms?: number;\n selfMs?: number;\n}\n\n/** A commit, as it was made: for whoever listens to them (a recording's timeline). */\nexport interface Rendering {\n /** The whole commit's render, in milliseconds, where React times it. */\n ms?: number;\n /** React's scheduler priority for it. */\n priority?: number;\n rendered: RenderedFiber[];\n}\n\ninterface Dependency {\n memoizedValue?: unknown;\n next?: Dependency | null;\n}\n\n/** A hook of a function component: React keeps them as a list. */\ninterface HookNode {\n memoizedState?: unknown;\n next?: HookNode | null;\n}\n\n/** Function, class, `forwardRef` and simple `memo` components: those that render (a `memo` wrapper's is its child). */\nconst COMPOSITE = new Set([0, 1, 11, 15]);\nconst CLASS = 1;\n/** React's flag for a fiber whose component ran in this render, rather than bailed out. */\nconst PERFORMED_WORK = 1;\n/** How many render times are kept per component, for how many were recent. */\nconst KEPT = 100;\n/** What's recent: renders this long before a task, a loop or a burst. */\nexport const RECENT = 10_000;\n/** How many changed props a reason names. */\nconst NAMED = 10;\n\ninterface Stats {\n count: number;\n at: number[];\n lastMs?: number;\n selfMs?: number;\n why: string;\n}\n\n/** A hook's state that's an effect: a new one each render, which says nothing changed. */\nconst isEffect = (state: unknown) => typeof state === 'object' && state !== null && 'create' in state && 'tag' in state;\n\n/** Why `next` rendered, `prev` being what it was: its props, its state, a context, or its parent rendering it again. */\nexport function whyOf(next: Fiber, prev: Fiber | null): string {\n if (prev === null) return 'mounted';\n const reasons: string[] = [];\n if (next.memoizedProps !== prev.memoizedProps) {\n const before = (prev.memoizedProps ?? {}) as Record<string, unknown>;\n const now = (next.memoizedProps ?? {}) as Record<string, unknown>;\n const keys = [...new Set([...Object.keys(before), ...Object.keys(now)])].filter((k) => !Object.is(before[k], now[k]));\n if (keys.length > 0)\n reasons.push(`props changed: ${keys.slice(0, NAMED).join(', ')}${keys.length > NAMED ? ` and ${keys.length - NAMED} more` : ''}`);\n }\n if (stateChanged(next, prev)) reasons.push('state changed');\n if (contextChanged(next, prev)) reasons.push('context changed');\n // Props of a new object with the same values: what a parent passes each time it renders.\n return reasons.length > 0 ? reasons.join('; ') : 'its parent rendered';\n}\n\nfunction stateChanged(next: Fiber, prev: Fiber): boolean {\n if (next.memoizedState === prev.memoizedState) return false;\n if (next.tag === CLASS) return true;\n let a = prev.memoizedState as HookNode | null | undefined;\n let b = next.memoizedState as HookNode | null | undefined;\n for (; a != null && b != null; a = a.next, b = b.next) {\n if (Object.is(a.memoizedState, b.memoizedState) || isEffect(b.memoizedState)) continue;\n return true;\n }\n return false;\n}\n\nfunction contextChanged(next: Fiber, prev: Fiber): boolean {\n let a = prev.dependencies?.firstContext;\n let b = next.dependencies?.firstContext;\n for (; a != null && b != null; a = a.next, b = b.next) if (!Object.is(a.memoizedValue, b.memoizedValue)) return true;\n return false;\n}\n\n/** The stats of every component the page rendered since it started being counted, read by its fiber, either of its two. */\nexport function renderStats(now: () => number = () => performance.now()) {\n const stats = new WeakMap<Fiber, Stats>();\n\n const listeners = new Set<(commit: Rendering) => void>();\n\n const record = (fiber: Fiber, prev: Fiber | null): RenderedFiber => {\n const kept = stats.get(fiber) ?? (fiber.alternate === null ? undefined : stats.get(fiber.alternate));\n const entry: Stats = kept ?? { count: 0, at: [], why: '' };\n entry.count++;\n entry.at.push(now());\n if (entry.at.length > KEPT) entry.at.shift();\n entry.why = whyOf(fiber, prev);\n if (typeof fiber.actualDuration === 'number') entry.lastMs = fiber.actualDuration;\n if (typeof fiber.selfBaseDuration === 'number') entry.selfMs = fiber.selfBaseDuration;\n stats.set(fiber, entry);\n if (fiber.alternate !== null) stats.set(fiber.alternate, entry);\n return {\n fiber,\n why: entry.why,\n ...(typeof fiber.actualDuration === 'number' ? { ms: fiber.actualDuration } : {}),\n ...(typeof fiber.selfBaseDuration === 'number' ? { selfMs: fiber.selfBaseDuration } : {}),\n };\n };\n\n /** A committed tree, from its root's current fiber: what was rendered in it, and nothing React left as it was. */\n const commit = (root: Fiber, priority?: number) => {\n const rendered: RenderedFiber[] = [];\n const stack: Fiber[] = [];\n for (let child = root.child; child !== null; child = child.sibling) stack.push(child);\n while (stack.length > 0) {\n const fiber = stack.pop()!;\n const prev = fiber.alternate;\n if ((prev === null || ((fiber.flags ?? 0) & PERFORMED_WORK) !== 0) && COMPOSITE.has(fiber.tag)) rendered.push(record(fiber, prev));\n // Children React didn't clone weren't rendered, nor anything under them.\n if (prev !== null && fiber.child === prev.child) continue;\n for (let child = fiber.child; child !== null; child = child.sibling) stack.push(child);\n }\n if (listeners.size === 0) return;\n const made: Rendering = {\n rendered,\n ...(typeof root.actualDuration === 'number' ? { ms: root.actualDuration } : {}),\n ...(priority === undefined ? {} : { priority }),\n };\n for (const listen of listeners) listen(made);\n };\n\n /** Hears each commit from now, until what's answered stops it. */\n const subscribe = (listen: (commit: Rendering) => void) => {\n listeners.add(listen);\n return () => void listeners.delete(listen);\n };\n\n const read = (fiber: Fiber): Renders | undefined => {\n const entry = stats.get(fiber) ?? (fiber.alternate === null ? undefined : stats.get(fiber.alternate));\n if (entry === undefined) return undefined;\n const at = now();\n const round = (ms: number) => Math.round(ms * 100) / 100;\n return {\n count: entry.count,\n recent: entry.at.filter((t) => at - t <= RECENT).length,\n lastAgo: Math.round(at - entry.at.at(-1)!),\n ...(entry.lastMs === undefined ? {} : { lastMs: round(entry.lastMs) }),\n ...(entry.selfMs === undefined ? {} : { selfMs: round(entry.selfMs) }),\n why: entry.why,\n };\n };\n\n return { commit, read, subscribe };\n}\n\n/** DevTools' hook, as React calls it. */\ninterface Hook {\n onCommitFiberRoot?: (id: number, root: { current: Fiber }, priority?: number, ...rest: unknown[]) => unknown;\n}\n\n/**\n * Counts every commit from now on, where the page has DevTools' hook: answers what reads the counts and what hears\n * each commit, or nothing where\n * there's no hook (React then calls nothing, and keeps no timings either). The hook's own handler (React Refresh's,\n * or the DevTools extension's) goes on being called first.\n */\nexport function countRenders(target: { __REACT_DEVTOOLS_GLOBAL_HOOK__?: Hook } = globalThis as never) {\n const hook = target.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (hook === undefined) return undefined;\n const counts = renderStats();\n let warned = false;\n const before = hook.onCommitFiberRoot;\n hook.onCommitFiberRoot = function (this: unknown, id, root, priority, ...rest) {\n const answer = before?.call(this, id, root, priority, ...rest);\n try {\n counts.commit(root.current, priority);\n } catch (e) {\n // Never the page's render: a fiber of a React this doesn't know. Said once, not on each commit.\n if (!warned) console.warn(\"deictic: renders aren't counted on this page\", e);\n warned = true;\n }\n return answer;\n };\n return { read: counts.read, subscribe: counts.subscribe };\n}\n","/**\n * A component's props, state and hooks as JSON: what a person would see of them in React's DevTools, for an agent\n * to read in a file. Anything JSON can't hold says what it was, in brackets (`[function onClick]`, `[<Button>]`,\n * `[circular]`), and what's too deep or too long is cut where it says so, as a page's values may be its whole store.\n */\nimport { MASKED, sensitive } from '#src/plugins/network/mask.ts';\n\nimport type { Value } from './index.ts';\n\nexport interface Limits {\n /** How deep into objects and arrays. */\n depth: number;\n /** How many keys of an object, and items of an array, a Map or a Set. */\n items: number;\n /** How long a string, in characters. */\n text: number;\n}\n\nexport const LIMITS: Limits = { depth: 5, items: 50, text: 1000 };\n\nconst ELEMENTS = new Set([Symbol.for('react.transitional.element'), Symbol.for('react.element')]);\n\n/** A function's or a class's name, or nothing for one with none. */\nconst nameOf = (fn: unknown): string | undefined => {\n if (typeof fn !== 'function' && (typeof fn !== 'object' || fn === null)) return undefined;\n const { displayName, name } = fn as { displayName?: unknown; name?: unknown };\n const found = displayName ?? name;\n return typeof found === 'string' && found !== '' ? found : undefined;\n};\n\n/** `<Button>` for a React element: its tag, or its component's name through `memo` and `forwardRef`. */\nfunction elementName(type: unknown): string {\n if (typeof type === 'string') return type;\n let at = type as { render?: unknown; type?: unknown } | null | undefined;\n for (let depth = 0; depth < 4 && at !== null && at !== undefined; depth++) {\n const name = nameOf(at);\n if (name !== undefined) return name;\n at = (at.render ?? at.type) as typeof at;\n }\n return 'Anonymous';\n}\n\nconst cut = (text: string, limit: number) => (text.length > limit ? `${text.slice(0, limit)}… (${text.length - limit} more)` : text);\n\n/** What a value read as, as JSON, its secrets blanked by their names (and `mask`'s, a part of a name in any case). */\nexport function serialize(value: unknown, mask: readonly string[] = [], limits: Limits = LIMITS): Value | undefined {\n const above = new Set<object>();\n const walk = (value: unknown, depth: number): Value | undefined => {\n switch (typeof value) {\n case 'undefined':\n return undefined;\n case 'boolean':\n return value;\n case 'number':\n return Number.isFinite(value) ? value : `[${value}]`;\n case 'bigint':\n return `[${value}n]`;\n case 'string':\n return cut(value, limits.text);\n case 'symbol':\n return `[${value.toString()}]`;\n case 'function':\n return `[function${nameOf(value) === undefined ? '' : ` ${nameOf(value)}`}]`;\n case 'object':\n break;\n }\n if (value === null || typeof value !== 'object') return null;\n const object = value as Record<PropertyKey, unknown>;\n if (ELEMENTS.has(object.$$typeof as symbol)) return `[<${elementName(object.type)}>]`;\n // A DOM node, told by its shape: `instanceof Node` is another window's in an iframe.\n if (typeof object.nodeType === 'number' && typeof object.nodeName === 'string') {\n const { nodeType, nodeName } = object as { nodeType: number; nodeName: string };\n return nodeType === 1 ? `[<${nodeName.toLowerCase()}>]` : `[${nodeName}]`;\n }\n if (typeof window !== 'undefined' && value === window) return '[window]';\n if (value instanceof Date) return Number.isNaN(value.getTime()) ? '[Invalid Date]' : value.toISOString();\n if (value instanceof RegExp) return `[${value.toString()}]`;\n if (value instanceof Error) return `[${value.name}: ${cut(value.message, limits.text)}]`;\n if (typeof object.then === 'function') return '[Promise]';\n if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer)\n return `[${nameOf(value.constructor) ?? 'Buffer'}(${value.byteLength} bytes)]`;\n if (above.has(value)) return '[circular]';\n const many = Array.isArray(value) ? value.length : value instanceof Map || value instanceof Set ? value.size : undefined;\n if (depth >= limits.depth) {\n if (Array.isArray(value)) return `[Array(${value.length})]`;\n if (value instanceof Map) return `[Map(${value.size})]`;\n if (value instanceof Set) return `[Set(${value.size})]`;\n return `[${nameOf(value.constructor) ?? 'Object'}]`;\n }\n above.add(value);\n try {\n const items = (entries: Iterable<unknown>, of: (item: unknown) => Value) => {\n const out: Value[] = [];\n for (const item of entries) {\n if (out.length === limits.items) {\n out.push(`[… ${(many ?? 0) - limits.items} more]`);\n break;\n }\n out.push(of(item));\n }\n return out;\n };\n // Undefined, in an array, is a hole JSON writes as null: said, so it isn't read as null.\n const inside = (item: unknown) => walk(item, depth + 1) ?? '[undefined]';\n if (Array.isArray(value)) return items(value, inside);\n if (value instanceof Set) return { [`Set(${value.size})`]: items(value, inside) };\n if (value instanceof Map) {\n const pair = (entry: unknown) => {\n const [key, item] = entry as [unknown, unknown];\n return [inside(key), typeof key === 'string' && sensitive(key, mask) ? MASKED : inside(item)];\n };\n return { [`Map(${value.size})`]: items(value, pair) };\n }\n const out: { [key: string]: Value } = {};\n // A class's instance says which, as DevTools does; a plain object, or one of no prototype, doesn't.\n const proto = Object.getPrototypeOf(value) as object | null;\n const made = proto === null || proto === Object.prototype ? undefined : nameOf(proto.constructor);\n if (made !== undefined) out['@'] = made;\n const keys = Object.keys(value);\n for (const key of keys.slice(0, limits.items)) {\n let item: unknown;\n try {\n item = object[key];\n } catch {\n // A getter that throws.\n out[key] = '[unreadable]';\n continue;\n }\n const read = sensitive(key, mask) ? MASKED : walk(item, depth + 1);\n if (read !== undefined) out[key] = read;\n }\n if (keys.length > limits.items) out['…'] = `${keys.length - limits.items} more keys`;\n return out;\n } finally {\n above.delete(value);\n }\n };\n return walk(value, 0);\n}\n","/**\n * React's commits as a timeline, for a recording: what DevTools' profiler shows of each commit, cut to what reads in\n * a list. Commits a frame apart are one entry (an animation commits each frame), each names the components that\n * rendered in it, the slowest first. Past `RATE` entries in a second, the rest of that second's commits are one entry\n * at its end, which says how long it spans and its slowest commit: a recording is kept as it goes, and a page that\n * renders without stop would fill it. So it's `RATE + 1` entries a second at most, whatever the page does.\n */\nimport { componentOf } from '#src/client/component.ts';\n\nimport type { Commit, Rendered } from './index.ts';\nimport type { Fiber, Rendering } from './renders.ts';\n\n/** Commits closer than this are one entry, in milliseconds: a frame. */\nexport const FRAME = 16;\n/** How many components an entry names, the slowest first. */\nconst NAMED = 20;\n/** How many entries a second go in as they come; past that, the rest of the second is one. */\nexport const RATE = 10;\n/** The span entries are counted in, in milliseconds. */\nconst SECOND = 1000;\n/** How far down a component a host element it wrote is looked for, in fibers. */\nconst LOOKED = 200;\n\n/** React's scheduler priorities, as `onCommitFiberRoot` is given them. */\nconst PRIORITIES: Record<number, string> = { 1: 'immediate', 2: 'user-blocking', 3: 'normal', 4: 'low', 5: 'idle' };\n\n/** `src/Plan.tsx:12`: the first host element under `fiber` that it wrote, where the page marks it. */\nfunction placeOf(fiber: Fiber): string | undefined {\n const its = (by: Fiber | null | undefined) => by != null && (by === fiber || by === fiber.alternate);\n const stack: Fiber[] = fiber.child === null ? [] : [fiber.child];\n for (let looked = 0; stack.length > 0 && looked < LOOKED; looked++) {\n const at = stack.pop()!;\n if (at.sibling !== null) stack.push(at.sibling);\n if (typeof at.type === 'string' && its(at._debugOwner)) {\n const mark = (at.stateNode as Element | null)?.getAttribute?.('data-deictic');\n if (typeof mark === 'string') return mark.replace(/:\\d+$/, '');\n }\n if (at.child !== null) stack.push(at.child);\n }\n return undefined;\n}\n\nconst round = (ms: number) => Math.round(ms * 100) / 100;\n\n/** One entry of commits: the components that rendered, each once with how often, the slowest first. */\nexport function summarize(commits: Rendering[]): Commit {\n const by = new Map<string, Rendered & { order: number }>();\n for (const { rendered } of commits) {\n for (const { fiber, why, ms, selfMs } of rendered) {\n const name = componentOf(fiber) ?? 'Anonymous';\n const at = placeOf(fiber);\n const key = `${name} ${at ?? ''}`;\n const seen = by.get(key);\n const entry = seen ?? { name, ...(at === undefined ? {} : { at }), count: 0, why, order: by.size };\n entry.count = (entry.count ?? 0) + 1;\n entry.why = why;\n if (ms !== undefined) entry.ms = round((entry.ms ?? 0) + ms);\n if (selfMs !== undefined) entry.selfMs = round((entry.selfMs ?? 0) + selfMs);\n by.set(key, entry);\n }\n }\n // The slowest first, and those alike in the order they rendered.\n const all = [...by.values()].sort((a, b) =>\n (b.selfMs ?? 0) - (a.selfMs ?? 0) !== 0 ? (b.selfMs ?? 0) - (a.selfMs ?? 0) : a.order - b.order,\n );\n const kept = all.slice(0, NAMED);\n const timed = commits.flatMap((c) => (c.ms === undefined ? [] : [c.ms]));\n const ms = timed.length === 0 ? undefined : timed.reduce((sum, n) => sum + n, 0);\n const priority = commits.at(-1)?.priority;\n return {\n commits: commits.length,\n ...(ms === undefined ? {} : { ms: round(ms) }),\n // Of several: what makes a page stutter is one slow commit, not many quick ones.\n ...(commits.length > 1 && timed.length > 0 ? { slowest: round(Math.max(...timed)) } : {}),\n ...(priority === undefined || PRIORITIES[priority] === undefined ? {} : { priority: PRIORITIES[priority] }),\n components: kept.map(({ order: _, count, ...rest }) => ({ ...rest, ...(count !== undefined && count > 1 ? { count } : {}) })),\n ...(all.length > kept.length ? { more: all.length - kept.length } : {}),\n };\n}\n\n/**\n * Listens to the commits `subscribe` gives, and answers each frame's as one entry, `RATE` a second, then the rest of\n * that second as one: `emit` hears them, until what's answered stops it (what's waiting goes first).\n */\nexport function timeline(\n subscribe: (listen: (commit: Rendering) => void) => () => void,\n emit: (commit: Commit) => void,\n clock: { now: () => number; later: (run: () => void, ms: number) => unknown } = {\n now: () => performance.now(),\n later: (run, ms) => setTimeout(run, ms),\n },\n): () => void {\n let waiting: Rendering[] = [];\n // The second being counted: when it started, and its entries so far.\n let second = Number.NEGATIVE_INFINITY;\n let inSecond = 0;\n // Its commits past `RATE` entries, and since when.\n let over: Rendering[] = [];\n let overFrom = 0;\n const flushOver = () => {\n if (over.length === 0) return;\n const commits = over;\n over = [];\n emit({ ...summarize(commits), over: Math.round(clock.now() - overFrom) });\n };\n const flush = () => {\n const commits = waiting;\n waiting = [];\n if (commits.length === 0) return;\n const now = clock.now();\n if (now - second >= SECOND) {\n flushOver();\n second = now;\n inSecond = 0;\n }\n if (inSecond < RATE) {\n inSecond++;\n emit(summarize(commits));\n return;\n }\n if (over.length === 0) {\n overFrom = now;\n // At the second's end, unless the next second's first entry has said it by then.\n const counting = second;\n clock.later(\n () => {\n if (second === counting) flushOver();\n },\n second + SECOND - now,\n );\n }\n over.push(...commits);\n };\n const unsubscribe = subscribe((commit) => {\n if (waiting.length === 0) clock.later(flush, FRAME);\n waiting.push(commit);\n });\n return () => {\n unsubscribe();\n flush();\n flushOver();\n };\n}\n","/**\n * The react plugin's page half: what React's DevTools would show of the components that wrote an element, read off\n * its fibers with bippy (an optional peer, imported as a task first asks for it), for a task to attach.\n */\nimport type * as Main from 'bippy';\nimport type * as Source from 'bippy/source';\n\nimport { componentOf, fiberOf, type Owner, ownerOf } from '#src/client/component.ts';\nimport { defineClientPlugin } from '#src/index.ts';\n\nimport type { Commit, Component, Hook, ReactOptions, Snapshot } from './index.ts';\nimport { countRenders, type Fiber } from './renders.ts';\nimport { serialize } from './serialize.ts';\nimport { timeline } from './timeline.ts';\n\n/** What a task asks of the plugin, and a recording. */\nexport interface Inspector {\n /** The snapshot of the element's components, as the JSON a task attaches: `undefined` where React didn't render it in development. */\n snapshot(el: Element): Promise<string | undefined>;\n /**\n * React's commits from now, an entry a frame (`emit` hears each), until what's answered stops it: for a recording.\n * `undefined` where renders aren't counted (`renders: false`, or no DevTools hook on the page).\n */\n commits?: (emit: (commit: Commit) => void) => () => void;\n}\n\ndeclare module 'deictic' {\n interface ClientApis {\n react: Inspector;\n }\n}\n\n/** How long hook names may take: their source, and its map, are fetched from the dev server. */\nconst NAMES_WAIT = 3000;\n/** What's attached at most, in characters: a page's values may be its whole store. */\nconst MOST = 200_000;\n\n/** Hooks whose values are functions to run, which say nothing of what the component shows. */\nconst SILENT = new Set(['Effect', 'LayoutEffect', 'InsertionEffect', 'ImperativeHandle', 'EffectEvent']);\n\ntype Bippy = typeof Main & typeof Source;\n\nlet loading: Promise<Bippy> | undefined;\n\n/**\n * bippy, with a renderer to inspect hooks through. React hands its renderer to DevTools' hook as it loads, which\n * React Refresh (Vite's, Next's) installs first in development; where nothing did, the page's React is asked for its\n * dispatcher, which is all hook inspection needs of one.\n */\nconst bippy = (): Promise<Bippy> =>\n (loading ??= (async () => {\n const [main, source] = await Promise.all([import('bippy'), import('bippy/source')]).catch((e: unknown) => {\n loading = undefined;\n throw new Error('react needs bippy: add it to your devDependencies', { cause: e });\n });\n if (main.getRDTHook().renderers.size === 0 && main._renderers.size === 0) {\n const React = (await import('react')) as unknown as Record<string, unknown>;\n const internals = (React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ??\n (React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as { ReactCurrentDispatcher?: unknown } | undefined)\n ?.ReactCurrentDispatcher) as { H: unknown } | { current: unknown } | undefined;\n if (internals !== undefined) main._renderers.add({ currentDispatcherRef: internals } as never);\n }\n return { ...main, ...source };\n })());\n\nconst parentOf = (el: Element): Element | undefined => {\n if (el.parentElement !== null) return el.parentElement;\n const root = el.getRootNode();\n return root instanceof ShadowRoot ? root.host : undefined;\n};\n\n/** `src/Plan.tsx:12`: where the nearest element around `el` that `owner` wrote is, which is in its JSX. */\nfunction placeOf(el: Element, owner: Owner): string | undefined {\n for (let at: Element | undefined = el; at !== undefined; at = parentOf(at)) {\n const by = ownerOf(fiberOf(at));\n // A component's fiber is one of two, by turns: an element may name either.\n if (by === undefined || (by !== owner && by !== owner.alternate)) continue;\n const mark = at.getAttribute('data-deictic');\n if (mark !== null) return mark.replace(/:\\d+$/, '');\n }\n return undefined;\n}\n\nexport default defineClientPlugin<never, never, Inspector>({\n name: 'react',\n setup: ({ options }) => {\n const { components = 4, mask = [], names = true, renders = true } = (options ?? {}) as ReactOptions;\n // From now, before any task: what rendered before the page started deictic goes uncounted.\n const counted = renders ? countRenders() : undefined;\n const value = (of: unknown) => serialize(of, mask);\n\n /** A hook as DevTools lists it: its kind (`State`, or a custom hook's name less `use`), what the code calls it, its value. */\n const hookOf = (node: Source.HooksNode, named: Map<string, string>): Hook | undefined => {\n if (SILENT.has(node.name)) return undefined;\n const { fileName, lineNumber, columnNumber } = node.hookSource ?? {};\n const as = fileName ? named.get(`${fileName}:${lineNumber ?? 0}:${columnNumber ?? 0}`) : undefined;\n const inner = node.subHooks.flatMap((sub) => hookOf(sub, named) ?? []);\n const read = node.subHooks.length > 0 && node.value === undefined ? undefined : value(node.value);\n return {\n hook: node.name,\n ...(as === undefined ? {} : { as }),\n ...(read === undefined ? {} : { value: read }),\n ...(inner.length === 0 ? {} : { hooks: inner }),\n };\n };\n\n return {\n ...(counted === undefined ? {} : { commits: (emit: (commit: Commit) => void) => timeline(counted.subscribe, emit) }),\n snapshot: async (el) => {\n const wrote = ownerOf(fiberOf(el));\n if (wrote === undefined) return undefined;\n const b = await bippy();\n const found: Component[] = [];\n for (let owner: Owner | undefined = wrote; owner !== undefined && found.length < components; owner = ownerOf(owner)) {\n const name = componentOf(owner) ?? 'Anonymous';\n // A server component: it has a name and no fiber, so no props or state the page holds.\n if (typeof owner.name === 'string') {\n found.push({ name, server: true });\n continue;\n }\n const fiber = b.getLatestFiber(owner as never) as unknown as Owner & {\n memoizedProps?: unknown;\n memoizedState?: unknown;\n stateNode?: { state?: unknown } | null;\n };\n const at = placeOf(el, owner);\n const component: Component = { name, ...(at === undefined ? {} : { at }) };\n const props = value(fiber.memoizedProps);\n if (props !== undefined) component.props = props;\n const rendered = counted?.read(fiber as unknown as Fiber);\n if (rendered !== undefined) component.renders = rendered;\n // A class's state is its instance's; a function's is its hooks.\n if (fiber.stateNode !== null && typeof fiber.stateNode === 'object' && 'state' in fiber.stateNode) {\n const state = value(fiber.stateNode.state);\n if (state !== undefined) component.state = state;\n } else {\n try {\n const tree = b.getFiberHooks(fiber as never);\n let named = new Map<string, string>();\n if (names && tree.length > 0) {\n // Read off the source, which may not answer: the hooks go unnamed then.\n named = await b.parseHookNames(tree, undefined, { timeoutMs: NAMES_WAIT }).catch(() => new Map());\n }\n const hooks = tree.flatMap((node) => hookOf(node, named) ?? []);\n if (hooks.length > 0) component.hooks = hooks;\n } catch (e) {\n component.problem = `its hooks couldn't be read: ${e instanceof Error ? e.message : String(e)}`;\n }\n }\n found.push(component);\n }\n if (found.length === 0) return undefined;\n const snapshot: Snapshot = { components: found };\n const json = JSON.stringify(snapshot, null, 2);\n if (json.length <= MOST) return json;\n // Too much: the nearest component's alone, the one that wrote the element.\n const less = JSON.stringify({ components: found.slice(0, 1) } satisfies Snapshot, null, 2);\n return less.length <= MOST ? less : `${less.slice(0, MOST)}\\n… cut short`;\n },\n };\n },\n});\n"],"mappings":";;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IAAI,SAAS,KAAK,SAAS,GAEzB,QAAQ,MAAM,EAAE,eAAe,MAAM,KAAA,GAAW,EAAE,WAAW,WAAW,CAAC,CAAC,CAAC,4BAAY,IAAI,IAAI,CAAC;MAElG,MAAM,QAAQ,KAAK,SAAS,SAAS,OAAO,MAAM,KAAK,KAAK,CAAC,CAAC;MAC9D,IAAI,MAAM,SAAS,GAAG,UAAU,QAAQ;KAC1C,SAAS,GAAG;MACV,UAAU,UAAU,+BAA+B,aAAa,QAAQ,EAAE,UAAU,OAAO,CAAC;KAC9F;KAEF,MAAM,KAAK,SAAS;IACtB;IACA,IAAI,MAAM,WAAW,GAAG,OAAO,KAAA;IAE/B,MAAM,OAAO,KAAK,UAAU,EADC,YAAY,MACN,GAAG,MAAM,CAAC;IAC7C,IAAI,KAAK,UAAU,MAAM,OAAO;IAEhC,MAAM,OAAO,KAAK,UAAU,EAAE,YAAY,MAAM,MAAM,GAAG,CAAC,EAAE,GAAsB,MAAM,CAAC;IACzF,OAAO,KAAK,UAAU,OAAO,OAAO,GAAG,KAAK,MAAM,GAAG,IAAI,EAAE;GAC7D;EACF;CACF;AACF,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as Rendered, c as Value, i as ReactOptions, l as reactState, n as Component, o as Renders, r as Hook, s as Snapshot, t as Commit } from "../shared/index7.js";
|
|
2
|
+
export { Commit, Component, Hook, ReactOptions, Rendered, Renders, Snapshot, Value, reactState as default, reactState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as default, t as reactState } from "../shared/react.js";
|