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
package/dist/shared/index7.d.ts
CHANGED
|
@@ -1,323 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
interface ReactOptions {
|
|
2
|
+
/** How many components, out from the one that wrote the element: 4 by default. */
|
|
3
|
+
components?: number;
|
|
4
|
+
/** More names whose values are blanked: a part of the name, in any case. */
|
|
5
|
+
mask?: string[];
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Whether hooks are named as the code names them, read off the source and its map (fetched from the dev server, as
|
|
8
|
+
* DevTools does): true by default. Without, each is its kind alone, `State` or `Memo`, in the order they're called.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
-
/** Where its log is kept, from the project's root: `.deictic/board` by default. */
|
|
11
|
-
dir?: string;
|
|
12
|
-
/** `false` for no pages of the board's own (its inspector): the panel then links its tasks nowhere. */
|
|
13
|
-
inspect?: boolean;
|
|
14
|
-
/** More arguments for `vb serve`, as it takes them: `['--tailscale', 'box.tailnet.ts.net']`. */
|
|
15
|
-
args?: string[];
|
|
16
|
-
}
|
|
17
|
-
/** What `local()` answers, for the tasks plugin's `board` option. */
|
|
18
|
-
interface LocalBoard {
|
|
19
|
-
local: LocalOptions;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The project's own board on this machine, as the tasks plugin's `board`: what it uses anyway with no
|
|
23
|
-
* `BOARD_URL`, here whatever the environment says, and with options.
|
|
24
|
-
*/
|
|
25
|
-
declare const local: (options?: LocalOptions) => LocalBoard;
|
|
26
|
-
/** What the plugin uses of a board: `board()` from `@vercel/board` is one. */
|
|
27
|
-
type TaskBoard = Pick<Board, 'tasks' | 'thread' | 'threads' | 'reply' | 'discovery' | 'upload' | 'download' | 'edit' | 'actors'>;
|
|
28
|
-
interface TasksOptions {
|
|
29
|
-
/**
|
|
30
|
-
* The board, as `@vercel/board`'s `board()` answers it. By default the one `BOARD_URL` names, and with none,
|
|
31
|
-
* one of the project's own on this machine: `vb serve`, started with the dev server and stopped with it, at
|
|
32
|
-
* `http://127.0.0.1:4100/api/board` (or the port `.deictic/board.json` says, where that one's taken), its log
|
|
33
|
-
* in `.deictic/board`. For your team's board, through `vercel login`, pass `board()`. `local()`, from here, is
|
|
34
|
-
* that board of the project's own whatever `BOARD_URL` says, with its port, its folder and the rest as options.
|
|
35
|
-
*/
|
|
36
|
-
board?: TaskBoard | LocalBoard;
|
|
37
|
-
/** The channel tasks go to: `deictic` by default. */
|
|
38
|
-
channel?: string;
|
|
39
|
-
/**
|
|
40
|
-
* The project the tasks are about, as the `deictic.project` label, to tell them apart on a board several
|
|
41
|
-
* projects share: by default the `name` in the root's `package.json`, and no label where it has none.
|
|
42
|
-
*/
|
|
43
|
-
project?: string;
|
|
44
|
-
/** Labels every task gets besides deictic's own, for whoever works them to filter by (`vb tail --label`). None by default. */
|
|
45
|
-
labels?: Record<string, string>;
|
|
46
|
-
/**
|
|
47
|
-
* Where the panel links the channel to, for a person to see its tasks, and with `task`, where it links
|
|
48
|
-
* that task's ID to. By default the board's own pages when it's one `vb serve` runs on this machine
|
|
49
|
-
* (`http://127.0.0.1:4100/c/deictic`, and `?thread=<id>` on it), and none for another board, whose pages
|
|
50
|
-
* deictic can't know.
|
|
51
|
-
*/
|
|
52
|
-
link?: (channel: string, task?: string) => string | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Whether a task has the element's HTML as it rendered attached, as `element.html`, masked as a screenshot is
|
|
55
|
-
* (the screenshots plugin's masking, where it's loaded): what was on the page, for whoever can't open it as the
|
|
56
|
-
* person did. True by default: the Task tab has a box for it, ticked, to untick for a task that should go
|
|
57
|
-
* without. `false` takes the box away, where a page shows what the board shouldn't hold.
|
|
58
|
-
*/
|
|
59
|
-
html?: boolean;
|
|
60
|
-
/** What opens its tab directly, beside deictic's own shortcut, which opens any: none by default. */
|
|
61
|
-
shortcut?: Shortcut;
|
|
62
|
-
/**
|
|
63
|
-
* Whether deictic's own problems become tasks, for whoever works the board to fix: a package the project hasn't
|
|
64
|
-
* installed, a plugin that failed, a request that broke. One task per problem while it's open (`deictic.problem`
|
|
65
|
-
* is its key), about the project, not an element. True by default.
|
|
66
|
-
*/
|
|
67
|
-
problems?: boolean;
|
|
68
|
-
}
|
|
69
|
-
interface Task {
|
|
70
|
-
id: string;
|
|
71
|
-
/** The first line of what was typed. */
|
|
72
|
-
title: string;
|
|
73
|
-
/** What was typed, whole: what an edit changes. */
|
|
74
|
-
text: string;
|
|
75
|
-
state: string;
|
|
76
|
-
/** Who holds its claim, by name (`claude`), while it's claimed. A board keeps no one for a task's end. */
|
|
77
|
-
by?: string;
|
|
78
|
-
/** Whether it can still be edited or deleted: no one has claimed it. */
|
|
79
|
-
open: boolean;
|
|
80
|
-
/** Its page on the board, when there's one to link to. */
|
|
81
|
-
link?: string;
|
|
82
|
-
/** What was attached to it but not kept by the time it was sent, so it went without: `a screenshot`. */
|
|
83
|
-
dropped?: string;
|
|
84
|
-
/** The spot in the element it's about, where it's about one: CSS pixels from the element's top left. */
|
|
85
|
-
point?: Point;
|
|
86
|
-
/** Which of the elements from its place it's about, where the page had more than one. */
|
|
87
|
-
which?: Which;
|
|
10
|
+
names?: boolean;
|
|
88
11
|
/**
|
|
89
|
-
*
|
|
12
|
+
* Whether each component's renders are counted, timed and explained, from React's commits as DevTools' hook hears
|
|
13
|
+
* them: true by default. That hook is React Refresh's, in development; without one there's nothing to count.
|
|
90
14
|
*/
|
|
91
|
-
|
|
15
|
+
renders?: boolean;
|
|
92
16
|
}
|
|
93
|
-
/**
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
*/
|
|
97
|
-
interface Which {
|
|
98
|
-
nth: number;
|
|
99
|
-
text?: string;
|
|
100
|
-
}
|
|
101
|
-
/** A place in the element's file: a line and a column, from 1, and the tag there as the task saw it. */
|
|
102
|
-
interface Place {
|
|
103
|
-
line: number;
|
|
104
|
-
column: number;
|
|
105
|
-
tag: string;
|
|
106
|
-
}
|
|
107
|
-
/** A task as the drawer lists it: with its place, where it has one, and how its thread stands. */
|
|
108
|
-
interface Listed extends Task {
|
|
109
|
-
/** `file:line:column`, as the element's mark: none for a task about the page. */
|
|
110
|
-
place?: string;
|
|
111
|
-
/** The tag there, as the task saw it. */
|
|
112
|
-
tag?: string;
|
|
113
|
-
/** The page it was added on, as its path: `/pricing`. */
|
|
114
|
-
page?: string;
|
|
115
|
-
/** How many replies its thread has, and the newest's ID: what the page tells the unread by. */
|
|
116
|
-
replies: number;
|
|
117
|
-
last?: string;
|
|
118
|
-
/** What the board says of where it stands: why it's blocked, what it came to, why it failed. */
|
|
119
|
-
said?: string;
|
|
120
|
-
/** A problem of deictic's it tells of, not a person's ask: the project's setup to fix, or a bug of deictic's. */
|
|
121
|
-
problem?: Problem['kind'];
|
|
122
|
-
}
|
|
123
|
-
/** A task with a place, as its mark has it: what the page pins to the element there. */
|
|
124
|
-
type Placed = Listed & {
|
|
125
|
-
place: string;
|
|
17
|
+
/** What JSON holds of a value: anything it can't hold says what it was, in brackets (`[function onClick]`). */
|
|
18
|
+
type Value = null | boolean | number | string | Value[] | {
|
|
19
|
+
[key: string]: Value;
|
|
126
20
|
};
|
|
127
|
-
/** A
|
|
128
|
-
interface
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* is and anything else as text. A `standalone` server answers its own.
|
|
139
|
-
*/
|
|
140
|
-
url?: string;
|
|
141
|
-
/** Where a recording plays back, as the message says. */
|
|
142
|
-
replay?: string;
|
|
143
|
-
}
|
|
144
|
-
/** A message in a task's thread, oldest first. */
|
|
145
|
-
interface Reply {
|
|
146
|
-
id: string;
|
|
147
|
-
/** Who wrote it, by name. */
|
|
148
|
-
by: string;
|
|
149
|
-
/** `person`, or what else wrote it: an agent's `profile`, a deployment, a workflow. */
|
|
150
|
-
kind: string;
|
|
151
|
-
text: string;
|
|
152
|
-
/** When, as an ISO date. */
|
|
153
|
-
at: string;
|
|
154
|
-
/** What it has attached. */
|
|
155
|
-
files: Attached[];
|
|
156
|
-
}
|
|
157
|
-
/** A task with its thread, as the drawer opens it. */
|
|
158
|
-
interface Thread {
|
|
159
|
-
task: Listed;
|
|
160
|
-
/** What the task has attached: its shots, recordings, voice notes and elements' HTML. */
|
|
161
|
-
files: Attached[];
|
|
162
|
-
replies: Reply[];
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* A reply, as the drawer's composer sends it to the `reply/<id>` route: its words, and what's attached, as a task
|
|
166
|
-
* attaches it. A reply with nothing typed says what's attached instead.
|
|
167
|
-
*/
|
|
168
|
-
type Answer = Pick<Op, 'text' | 'screenshots' | 'recordings' | 'voice' | 'annotations'>;
|
|
169
|
-
interface Model {
|
|
170
|
-
channel: string;
|
|
171
|
-
/** The channel's page, when there's one to link to. */
|
|
172
|
-
link?: string;
|
|
173
|
-
/** Tasks about this element, oldest first, canceled ones left out: also those added before it moved. */
|
|
174
|
-
tasks: Task[];
|
|
175
|
-
/**
|
|
176
|
-
* Who watches the channel, by name (`claude`): the agents whose watch (`deictic watch`) is running in
|
|
177
|
-
* this project, as a board can't say, and those holding a claim on one of the channel's tasks, which it can.
|
|
178
|
-
* Empty where none is and the board is this machine's own;
|
|
179
|
-
* left out where none is and the board is another, which an agent may watch from elsewhere.
|
|
180
|
-
*/
|
|
181
|
-
watching?: string[];
|
|
182
|
-
}
|
|
183
|
-
/** A new task: what the page knows and the source doesn't. */
|
|
184
|
-
interface Op {
|
|
185
|
-
text: string;
|
|
186
|
-
/** The page's URL. */
|
|
187
|
-
page: string;
|
|
188
|
-
viewport: {
|
|
189
|
-
width: number;
|
|
190
|
-
height: number;
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* The spot it's about, where it was added on one (the tool panel's task tool) and not on the element as a whole:
|
|
194
|
-
* CSS pixels from the element's top left, and outside its box where the element is only the nearest to the spot.
|
|
195
|
-
*/
|
|
196
|
-
point?: Point;
|
|
197
|
-
/**
|
|
198
|
-
* What was under the pointer inside the element, where nothing marked it (a dependency's markup, or a
|
|
199
|
-
* shadow root's): its path from the element, and its HTML, cut short.
|
|
200
|
-
*/
|
|
201
|
-
pointed?: {
|
|
202
|
-
path: string;
|
|
203
|
-
html: string;
|
|
204
|
-
};
|
|
205
|
-
/** How many elements on the page come from the same place in the source. */
|
|
21
|
+
/** A hook as DevTools lists it. */
|
|
22
|
+
interface Hook {
|
|
23
|
+
/** Its kind: `State`, `Memo`, `Context`, or a custom hook's name less `use` (`Auth`), whose `hooks` it called. */
|
|
24
|
+
hook: string;
|
|
25
|
+
/** What the code calls it: `const [count, setCount] = useState(0)` is `count`. */
|
|
26
|
+
as?: string;
|
|
27
|
+
value?: Value;
|
|
28
|
+
hooks?: Hook[];
|
|
29
|
+
}
|
|
30
|
+
/** A component's renders, counted from when the page started deictic, not from its first. */
|
|
31
|
+
interface Renders {
|
|
206
32
|
count: number;
|
|
207
|
-
/**
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
html?: string;
|
|
232
|
-
/**
|
|
233
|
-
* Shots the screenshots plugin took, to attach, where that plugin is loaded: each with where the element is in
|
|
234
|
-
* it (`box`, for one taken of the element; one taken of the window from the tool panel has none), whether
|
|
235
|
-
* it's `outlined` there (dashes drawn around it, or around the spot, in the PNG), and the marks drawn on it in
|
|
236
|
-
* the Task tab, where there are any.
|
|
237
|
-
*/
|
|
238
|
-
screenshots?: {
|
|
239
|
-
id: string;
|
|
240
|
-
box?: Box;
|
|
241
|
-
outlined?: boolean;
|
|
242
|
-
marks?: Marks;
|
|
243
|
-
}[];
|
|
244
|
-
/**
|
|
245
|
-
* Recordings the recordings plugin made, to attach, where that plugin is loaded: how long each ran,
|
|
246
|
-
* where it plays back, and the voice plugin's clips of the mic in it, attached too.
|
|
247
|
-
*/
|
|
248
|
-
recordings?: {
|
|
249
|
-
id: string;
|
|
250
|
-
duration: number;
|
|
251
|
-
replay: string;
|
|
252
|
-
voice?: string[];
|
|
253
|
-
}[];
|
|
254
|
-
/** Voice notes the voice plugin kept, to attach, where that plugin is loaded, and how long each runs. */
|
|
255
|
-
voice?: {
|
|
256
|
-
id: string;
|
|
257
|
-
duration: number;
|
|
258
|
-
}[];
|
|
259
|
-
/** The page's annotations, where that plugin is loaded and there are any: how many, and their notes' text. */
|
|
260
|
-
annotations?: Marks;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* A task the Task tab just added, as the page hears of it: the `detail` of a `deictic:task` event on `window`, for a
|
|
264
|
-
* page that shows its own tasks (deictic's playground lists them as a board does).
|
|
265
|
-
*/
|
|
266
|
-
interface TaskAdded {
|
|
267
|
-
id: string;
|
|
268
|
-
/** The first line of what was typed. */
|
|
269
|
-
title: string;
|
|
270
|
-
state: string;
|
|
271
|
-
channel: string;
|
|
272
|
-
/** The element: its file, line and column, and its tag. */
|
|
273
|
-
target: Target;
|
|
274
|
-
/** The page's URL. */
|
|
275
|
-
page: string;
|
|
276
|
-
/** How many of each were attached; `marks` counts those drawn on shots and on the page. */
|
|
277
|
-
attached: {
|
|
278
|
-
screenshots: number;
|
|
279
|
-
recordings: number;
|
|
280
|
-
voice: number;
|
|
281
|
-
marks: number;
|
|
282
|
-
};
|
|
283
|
-
/**
|
|
284
|
-
* Where each attached shot is, as it was sent (outlined, or as it was drawn on), for the page to show: the
|
|
285
|
-
* screenshots plugin's `shot` route, or what a `standalone` server answered.
|
|
286
|
-
*/
|
|
287
|
-
screenshots: string[];
|
|
288
|
-
}
|
|
289
|
-
/** Marks, as a task tells of them: how many, and what the notes among them say. */
|
|
290
|
-
interface Marks {
|
|
291
|
-
count: number;
|
|
292
|
-
notes: string[];
|
|
293
|
-
}
|
|
294
|
-
interface Added {
|
|
295
|
-
channel: string;
|
|
296
|
-
id: string;
|
|
297
|
-
text: string;
|
|
298
|
-
labels: Record<string, string>;
|
|
299
|
-
/** What's attached, by the board's IDs: kept, so a redo attaches the same without uploading it again. */
|
|
300
|
-
attachments?: string[];
|
|
301
|
-
}
|
|
302
|
-
/** A task's words changed in the tab, as an earlier version let it: its message's whole text before and after. */
|
|
303
|
-
interface Edited {
|
|
304
|
-
kind: 'edited';
|
|
305
|
-
id: string;
|
|
306
|
-
before: string;
|
|
307
|
-
after: string;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* A task deleted in the tab, as an earlier version let it: canceled on the board, for good, as a board has it. So
|
|
311
|
-
* it's kept whole, and an undo adds it again, as a new task whose ID the record then has.
|
|
312
|
-
*/
|
|
313
|
-
interface Removed extends Added {
|
|
314
|
-
kind: 'removed';
|
|
33
|
+
/** In the 10 seconds before the task: a loop, or a burst on each keystroke. */
|
|
34
|
+
recent: number;
|
|
35
|
+
/** How long ago it last rendered, in milliseconds. */
|
|
36
|
+
lastAgo: number;
|
|
37
|
+
/** How long its last render took, with what it rendered, in milliseconds: where React times them. */
|
|
38
|
+
lastMs?: number;
|
|
39
|
+
/** Its own part of it. */
|
|
40
|
+
selfMs?: number;
|
|
41
|
+
/** Why it last rendered: `mounted`, `props changed: chosen`, `state changed`, `context changed`, `its parent rendered`. */
|
|
42
|
+
why: string;
|
|
43
|
+
}
|
|
44
|
+
/** A component that rendered in a recording's commit, once for each time it did in the entry. */
|
|
45
|
+
interface Rendered {
|
|
46
|
+
name: string;
|
|
47
|
+
/** Where its JSX has the first element it wrote, `src/Plan.tsx:12`, where it wrote one. */
|
|
48
|
+
at?: string;
|
|
49
|
+
/** How many times it rendered in the entry, where that's more than once. */
|
|
50
|
+
count?: number;
|
|
51
|
+
/** How long it took, with what it rendered, in milliseconds, all its renders in the entry together. */
|
|
52
|
+
ms?: number;
|
|
53
|
+
/** Its own part of it. */
|
|
54
|
+
selfMs?: number;
|
|
55
|
+
/** Why it last rendered, as `Renders.why`. */
|
|
56
|
+
why: string;
|
|
315
57
|
}
|
|
316
58
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
59
|
+
* A recording's entry of React's commits, `deictic.react` events: commits a frame apart, as one, with the components
|
|
60
|
+
* they rendered, the slowest first. `{ on: boolean }` events say where the recording starts and stops having them.
|
|
319
61
|
*/
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
62
|
+
interface Commit {
|
|
63
|
+
/** How many commits it is. */
|
|
64
|
+
commits: number;
|
|
65
|
+
/** How long rendering them took, in milliseconds, where React times it. */
|
|
66
|
+
ms?: number;
|
|
67
|
+
/** Of several, the slowest one's, in milliseconds: one past a frame is what makes a page stutter. */
|
|
68
|
+
slowest?: number;
|
|
69
|
+
/**
|
|
70
|
+
* The rest of a busy second, past ten entries in it: how long it spans, in milliseconds, up to this entry's
|
|
71
|
+
* moment. A page that renders without stop is ten entries and this one a second.
|
|
72
|
+
*/
|
|
73
|
+
over?: number;
|
|
74
|
+
/** React's scheduler priority for the last: `immediate` (a click, a key), `user-blocking`, `normal`, `low`, `idle`. */
|
|
75
|
+
priority?: string;
|
|
76
|
+
/** Twenty at most. */
|
|
77
|
+
components: Rendered[];
|
|
78
|
+
/** How many more components rendered than it names. */
|
|
79
|
+
more?: number;
|
|
80
|
+
}
|
|
81
|
+
/** A component that wrote the element, or wrote one that did. */
|
|
82
|
+
interface Component {
|
|
83
|
+
name: string;
|
|
84
|
+
/** Where its JSX has the nearest element around this one, `src/Plan.tsx:12`: none for one that only passed it on. */
|
|
85
|
+
at?: string;
|
|
86
|
+
/** A server component: React kept its name, and nothing of it is in the page. */
|
|
87
|
+
server?: true;
|
|
88
|
+
props?: Value;
|
|
89
|
+
/** A class component's state. */
|
|
90
|
+
state?: Value;
|
|
91
|
+
/** A function component's hooks, in the order it calls them, effects left out. */
|
|
92
|
+
hooks?: Hook[];
|
|
93
|
+
renders?: Renders;
|
|
94
|
+
/** Why what's missing is. */
|
|
95
|
+
problem?: string;
|
|
96
|
+
}
|
|
97
|
+
/** `react.json`: the component that wrote the element first, then the one that wrote it, and on out. */
|
|
98
|
+
interface Snapshot {
|
|
99
|
+
components: Component[];
|
|
100
|
+
}
|
|
101
|
+
declare function reactState(options?: ReactOptions): import("deictic").ServerPlugin<never, never, unknown, unknown>;
|
|
102
|
+
export { Rendered as a, Value as c, ReactOptions as i, reactState as l, Component as n, Renders as o, Hook as r, Snapshot as s, Commit as t };
|
|
323
103
|
//# sourceMappingURL=index7.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index7.d.ts","names":[],"sources":["../../src/plugins/
|
|
1
|
+
{"version":3,"file":"index7.d.ts","names":[],"sources":["../../src/plugins/react/index.ts"],"mappings":"A,UAciB;;EAEf;;EAEA;;;;;EAKA;;;;;EAKA;;;KAIU,2CAA2C;GAAa,cAAc;;;UAGjE;;EAEf;;EAEA;EACA,QAAQ;EACR,QAAQ;;;UAIO;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;UAIe;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;UAOe;;EAEf;;EAEA;;EAEA;;;;;EAKA;;EAEA;;EAEA,YAAY;;EAEZ;;;UAIe;EACf;;EAEA;;EAEA;EACA,QAAQ;;EAER,QAAQ;;EAER,QAAQ;EACR,UAAU;;EAEV;;;UAIe;EACf,YAAY;;iBAGE,WAAW,UAAS,iCAAiB"}
|