deictic 0.8.1 → 0.10.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 +81 -17
- package/README.md +1 -1
- package/dist/annotations/client.js +1 -1
- package/dist/bun.d.ts.map +1 -1
- package/dist/bun.js +26 -8
- package/dist/bun.js.map +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 +19 -7
- package/dist/client/index.js.map +1 -1
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +45 -25
- package/dist/next.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 +46 -12
- package/dist/screenshots/rrweb.js.map +1 -1
- package/dist/shared/board.js +1 -1
- 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 +15 -4
- package/dist/shared/endpoints.js.map +1 -1
- package/dist/shared/index.d.ts +11 -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/integration.d.ts +6 -0
- package/dist/shared/integration.d.ts.map +1 -1
- package/dist/shared/integration.js +28 -1
- package/dist/shared/integration.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 +39 -1
- 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/shared/vite.d.ts +1 -1
- package/dist/shared/vite.d.ts.map +1 -1
- package/dist/shared/vite.js +28 -10
- package/dist/shared/vite.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/dist/webpack.d.ts +4 -0
- package/dist/webpack.d.ts.map +1 -1
- package/dist/webpack.js +37 -15
- package/dist/webpack.js.map +1 -1
- package/package.json +25 -1
- package/src/bun.ts +32 -8
- package/src/cli/bun.ts +2 -2
- 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 +25 -14
- package/src/index.ts +11 -0
- package/src/next.ts +34 -15
- 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/client.ts +42 -2
- package/src/plugins/screenshots/index.ts +11 -0
- package/src/plugins/screenshots/playwright.ts +65 -1
- package/src/plugins/screenshots/rrweb.ts +55 -28
- 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/src/tools/integration.ts +33 -0
- package/src/tools/source.ts +14 -2
- package/src/vite.ts +31 -10
- package/src/webpack.ts +48 -16
package/dist/shared/index8.d.ts
CHANGED
|
@@ -1,52 +1,329 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Board } from "@vercel/board";
|
|
2
|
+
import { C as Target, f as Point, j as Shortcut, p as Problem } from "./index.js";
|
|
3
|
+
import { t as Box } from "./index3.js";
|
|
4
|
+
interface LocalOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The port it listens on, on 127.0.0.1. By default 4100, or a free one where that's taken. One named here is
|
|
7
|
+
* the only one tried: taken, the board doesn't start.
|
|
8
|
+
*/
|
|
9
|
+
port?: number;
|
|
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;
|
|
88
|
+
/**
|
|
89
|
+
* Where it was added, where that isn't the element's place: where the element was before it moved.
|
|
90
|
+
*/
|
|
91
|
+
at?: Place;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* One of several elements from the same place in the source (a list's items): its place among them on the page, from 1,
|
|
95
|
+
* and its text where it has any, which still finds it once the list is in another order.
|
|
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;
|
|
126
|
+
};
|
|
127
|
+
/** A file attached to a task or to a reply in its thread, as the board keeps it. */
|
|
128
|
+
interface Attached {
|
|
129
|
+
/** The board's ID for it. */
|
|
3
130
|
id: string;
|
|
4
|
-
|
|
5
|
-
|
|
131
|
+
name: string;
|
|
132
|
+
/** Its MIME type: `image/png`, `audio/webm`, `application/json` for a recording, `text/html` for an element's HTML. */
|
|
6
133
|
type: string;
|
|
134
|
+
/** In bytes. */
|
|
135
|
+
size: number;
|
|
136
|
+
/**
|
|
137
|
+
* Where the page gets it: by default the plugin's `file/<task>/<id>` route, which serves an image or a sound as it
|
|
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;
|
|
7
143
|
}
|
|
8
|
-
/** A
|
|
9
|
-
interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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. */
|
|
206
|
+
count: number;
|
|
207
|
+
/** Which of them it is, where there's more than one: what the page tells it from the others by. */
|
|
208
|
+
which?: Which;
|
|
209
|
+
/**
|
|
210
|
+
* The other elements it's about, after the one it's sent on, in the order they were attached: each one's place,
|
|
211
|
+
* its tag, and its HTML as it rendered, where that's attached.
|
|
212
|
+
*/
|
|
213
|
+
also?: {
|
|
214
|
+
at: string;
|
|
215
|
+
tag: string;
|
|
216
|
+
html?: string;
|
|
217
|
+
react?: string;
|
|
218
|
+
}[];
|
|
219
|
+
/**
|
|
220
|
+
* No element is attached: it's about the page, and the element it's sent on is only where the popup was. It has
|
|
221
|
+
* no place then, so no element's tab lists it and nothing pins it.
|
|
222
|
+
*/
|
|
223
|
+
detached?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* The source it rendered through, after its own place, nearest first: where the one before it is used. With
|
|
226
|
+
* React in development, the components that wrote it, `Field (src/Field.tsx:20)` or a name alone; without, the
|
|
227
|
+
* files around it, each a `file:line`. A shared component's line says nothing of which use of it this is, and
|
|
228
|
+
* these do.
|
|
229
|
+
*/
|
|
230
|
+
chain?: string[];
|
|
231
|
+
/** The element's HTML as it rendered, to attach: cut short, and masked where the screenshots plugin is loaded. */
|
|
232
|
+
html?: string;
|
|
233
|
+
/**
|
|
234
|
+
* What React's DevTools would show of the components that wrote it, as JSON, to attach as `react.json`: where the
|
|
235
|
+
* react plugin is loaded, and sent with the HTML.
|
|
236
|
+
*/
|
|
237
|
+
react?: string;
|
|
238
|
+
/**
|
|
239
|
+
* Shots the screenshots plugin took, to attach, where that plugin is loaded: each with where the element is in
|
|
240
|
+
* it (`box`, for one taken of the element; one taken of the window from the tool panel has none), whether
|
|
241
|
+
* it's `outlined` there (dashes drawn around it, or around the spot, in the PNG), and the marks drawn on it in
|
|
242
|
+
* the Task tab, where there are any.
|
|
243
|
+
*/
|
|
244
|
+
screenshots?: {
|
|
245
|
+
id: string;
|
|
246
|
+
box?: Box;
|
|
247
|
+
outlined?: boolean;
|
|
248
|
+
marks?: Marks;
|
|
249
|
+
}[];
|
|
250
|
+
/**
|
|
251
|
+
* Recordings the recordings plugin made, to attach, where that plugin is loaded: how long each ran,
|
|
252
|
+
* where it plays back, and the voice plugin's clips of the mic in it, attached too.
|
|
253
|
+
*/
|
|
254
|
+
recordings?: {
|
|
255
|
+
id: string;
|
|
256
|
+
duration: number;
|
|
257
|
+
replay: string;
|
|
258
|
+
voice?: string[];
|
|
259
|
+
}[];
|
|
260
|
+
/** Voice notes the voice plugin kept, to attach, where that plugin is loaded, and how long each runs. */
|
|
261
|
+
voice?: {
|
|
262
|
+
id: string;
|
|
263
|
+
duration: number;
|
|
264
|
+
}[];
|
|
265
|
+
/** The page's annotations, where that plugin is loaded and there are any: how many, and their notes' text. */
|
|
266
|
+
annotations?: Marks;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* A task the Task tab just added, as the page hears of it: the `detail` of a `deictic:task` event on `window`, for a
|
|
270
|
+
* page that shows its own tasks (deictic's playground lists them as a board does).
|
|
271
|
+
*/
|
|
272
|
+
interface TaskAdded {
|
|
273
|
+
id: string;
|
|
274
|
+
/** The first line of what was typed. */
|
|
275
|
+
title: string;
|
|
276
|
+
state: string;
|
|
277
|
+
channel: string;
|
|
278
|
+
/** The element: its file, line and column, and its tag. */
|
|
279
|
+
target: Target;
|
|
280
|
+
/** The page's URL. */
|
|
281
|
+
page: string;
|
|
282
|
+
/** How many of each were attached; `marks` counts those drawn on shots and on the page. */
|
|
283
|
+
attached: {
|
|
284
|
+
screenshots: number;
|
|
285
|
+
recordings: number;
|
|
286
|
+
voice: number;
|
|
287
|
+
marks: number;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Where each attached shot is, as it was sent (outlined, or as it was drawn on), for the page to show: the
|
|
291
|
+
* screenshots plugin's `shot` route, or what a `standalone` server answered.
|
|
292
|
+
*/
|
|
293
|
+
screenshots: string[];
|
|
294
|
+
}
|
|
295
|
+
/** Marks, as a task tells of them: how many, and what the notes among them say. */
|
|
296
|
+
interface Marks {
|
|
297
|
+
count: number;
|
|
298
|
+
notes: string[];
|
|
299
|
+
}
|
|
300
|
+
interface Added {
|
|
301
|
+
channel: string;
|
|
302
|
+
id: string;
|
|
303
|
+
text: string;
|
|
304
|
+
labels: Record<string, string>;
|
|
305
|
+
/** What's attached, by the board's IDs: kept, so a redo attaches the same without uploading it again. */
|
|
306
|
+
attachments?: string[];
|
|
307
|
+
}
|
|
308
|
+
/** A task's words changed in the tab, as an earlier version let it: its message's whole text before and after. */
|
|
309
|
+
interface Edited {
|
|
310
|
+
kind: 'edited';
|
|
311
|
+
id: string;
|
|
312
|
+
before: string;
|
|
313
|
+
after: string;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* A task deleted in the tab, as an earlier version let it: canceled on the board, for good, as a board has it. So
|
|
317
|
+
* it's kept whole, and an undo adds it again, as a new task whose ID the record then has.
|
|
318
|
+
*/
|
|
319
|
+
interface Removed extends Added {
|
|
320
|
+
kind: 'removed';
|
|
49
321
|
}
|
|
50
|
-
|
|
51
|
-
|
|
322
|
+
/**
|
|
323
|
+
* What the history keeps of a change: a task added has no `kind`, as it had none before there were others. The others
|
|
324
|
+
* are no longer made (a task is changed in the drawer, by the plugin's routes), and still undone where a history has them.
|
|
325
|
+
*/
|
|
326
|
+
type Kept = Added | Edited | Removed;
|
|
327
|
+
declare function tasks(options?: TasksOptions): import("deictic").ServerPlugin<Model, Op, Kept, unknown>;
|
|
328
|
+
export { local as C, LocalOptions as S, TasksOptions as _, Kept as a, tasks as b, Model as c, Placed as d, Removed as f, TaskBoard as g, TaskAdded as h, Edited as i, Op as l, Task as m, Answer as n, Listed as o, Reply as p, Attached as r, Marks as s, Added as t, Place as u, Thread as v, LocalBoard as x, Which as y };
|
|
52
329
|
//# sourceMappingURL=index8.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index8.d.ts","names":[],"sources":["../../src/plugins/
|
|
1
|
+
{"version":3,"file":"index8.d.ts","names":[],"sources":["../../src/plugins/tasks/local.ts","../../src/plugins/tasks/index.ts"],"mappings":";;;UAkBiB;;;;;EAKf;;EAEA;;EAEA;;EAEA;;;UAIe;EACf,OAAO;;;;;;cAOI,QAAK,UAAa,iBAAoB;;KCAvC,YAAY,KAAK;UAEZ;;;;;;;;EAQf,QAAQ,YAAY;;EAEpB;;;;;EAKA;;EAEA,SAAS;;;;;;;EAOT,QAAQ,iBAAiB;;;;;;;EAOzB;;EAEA,WAAW;;;;;;EAMX;;UAGe;EACf;;EAEA;;EAEA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,QAAQ;;EAER,QAAQ;;;;EAIR,KAAK;;;;;;UAOU;EACf;EACA;;;UAIe;EACf;EACA;EACA;;;UAIe,eAAe;;EAE9B;;EAEA;;EAEA;;EAEA;EACA;;EAEA;;EAEA,UAAU;;;KAIA,SAAS;EAAW;;;UAGf;;EAEf;EACA;;EAEA;;EAEA;;;;;EAKA;;EAEA;;;UAIe;EACf;;EAEA;;EAEA;EACA;;EAEA;;EAEA,OAAO;;;UAIQ;EACf,MAAM;;EAEN,OAAO;EACP,SAAS;;;;;;KAOC,SAAS,KAAK;UAET;EACf;;EAEA;;EAEA,OAAO;;;;;;;EAOP;;;UAIe;EACf;;EAEA;EACA;IAAY;IAAe;;;;;;EAK3B,QAAQ;;;;;EAKR;IAAY;IAAc;;;EAE1B;;EAEA,QAAQ;;;;;EAKR;IAAS;IAAY;IAAa;IAAe;;;;;;EAKjD;;;;;;;EAOA;;EAEA;;;;;EAKA;;;;;;;EAOA;IAAgB;IAAY,MAAM;IAAK;IAAoB,QAAQ;;;;;;EAKnE;IAAe;IAAY;IAAkB;IAAgB;;;EAE7D;IAAU;IAAY;;;EAEtB,cAAc;;;;;;UAOC;EACf;;EAEA;EACA;EACA;;EAEA,QAAQ;;EAER;;EAEA;IAAY;IAAqB;IAAoB;IAAe;;;;;;EAKpE;;;UAIe;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA,QAAQ;;EAER;;;UAIe;EACf;EACA;EACA;EACA;;;;;;UAOe,gBAAgB;EAC/B;;;;;;KAOU,OAAO,QAAQ,SAAS;iBA0BpB,MAAM,UAAS,iCAAiB,aAAA,OAAA,IAAA"}
|
package/dist/shared/index9.d.ts
CHANGED
|
@@ -1,70 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/** The colour it sets, as CSS. */
|
|
8
|
-
color?: string;
|
|
9
|
-
/** What it sets its main property to, theme values resolved: `0.875rem`. */
|
|
10
|
-
value?: string;
|
|
11
|
-
/** A variant to go on typing after (`hover:`), not a class. */
|
|
12
|
-
variant?: true;
|
|
1
|
+
/** A clip as the page knows it: its ID, where it plays from, how long it runs in milliseconds, and its type. */
|
|
2
|
+
interface Clip {
|
|
3
|
+
id: string;
|
|
4
|
+
url: string;
|
|
5
|
+
duration: number;
|
|
6
|
+
type: string;
|
|
13
7
|
}
|
|
14
|
-
/**
|
|
15
|
-
interface
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
items: ClassInfo[];
|
|
21
|
-
/** A custom value goes between these: `md:text-[` and `]`. None for a kind that takes no value (`flex`). */
|
|
22
|
-
custom?: {
|
|
23
|
-
before: string;
|
|
24
|
-
after: string;
|
|
25
|
-
value?: string;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
interface TailwindOptions {
|
|
29
|
-
/** Calls whose first argument is a class list: `cn`, `clsx`, `cx`, `twMerge`, `classNames` by default. */
|
|
30
|
-
helpers?: string[];
|
|
31
|
-
/** The attribute an element without one gets: `className`, or `class` for Solid and Preact. */
|
|
32
|
-
attribute?: 'className' | 'class';
|
|
8
|
+
/** A take going on: `stop` ends it and answers its clip, `cancel` ends it with none (what was sent of it goes as the oldest clips do). */
|
|
9
|
+
interface Take {
|
|
10
|
+
/** When it started, as `Date.now()`. */
|
|
11
|
+
started: number;
|
|
12
|
+
/** The mic, while it's recorded: to show it's heard (`liveWaveform` from `deictic/client`). */
|
|
13
|
+
stream: MediaStream;
|
|
33
14
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
15
|
+
* What's kept of it by now, as the clip it would be if it ended here, or nothing before its first second is:
|
|
16
|
+
* for a page that's going, with no time left to `stop` it.
|
|
36
17
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
soFar(): Pick<Clip, 'id' | 'duration'> | undefined;
|
|
19
|
+
stop(): Promise<Clip>;
|
|
20
|
+
cancel(): void;
|
|
21
|
+
}
|
|
22
|
+
/** The page's half, for other plugins' page halves. */
|
|
23
|
+
interface Voice {
|
|
24
|
+
/** Starts recording the mic, asking for it the first time: rejects when it's refused or there's none. */
|
|
25
|
+
start(): Promise<Take>;
|
|
26
|
+
}
|
|
27
|
+
/** The server's half, for other plugins' server halves. */
|
|
28
|
+
interface Clips {
|
|
29
|
+
/** A clip's audio, or nothing for one not kept (any more). */
|
|
30
|
+
read(id: string): {
|
|
31
|
+
data: Uint8Array<ArrayBuffer>;
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
} | undefined;
|
|
40
35
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
source: string;
|
|
49
|
-
};
|
|
50
|
-
/** Classes a helper's argument adds: `active && 'ring'` is `ring` when `active`. */
|
|
51
|
-
interface Extra {
|
|
52
|
-
/** The argument, or the part of it these classes come from, as written. */
|
|
53
|
-
source: string;
|
|
54
|
-
/** The classes, where the source spells them out: there, or in a `const` of the file it names. */
|
|
55
|
-
classes?: string;
|
|
56
|
-
/** What must hold for them to be added, as written: `active === 'h3'`. None where they always are. */
|
|
57
|
-
when?: string;
|
|
58
|
-
/** Set where the classes are a string in this file, which an op with `at` can write. */
|
|
59
|
-
editable?: true;
|
|
60
|
-
/** The `const` the string is in, where it isn't the argument itself: other elements may use it too. */
|
|
61
|
-
shared?: string;
|
|
36
|
+
declare module 'deictic' {
|
|
37
|
+
interface ServerApis {
|
|
38
|
+
voice: Clips;
|
|
39
|
+
}
|
|
40
|
+
interface ClientApis {
|
|
41
|
+
voice: Voice;
|
|
42
|
+
}
|
|
62
43
|
}
|
|
63
|
-
interface
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
44
|
+
interface VoiceOptions {
|
|
45
|
+
/** How many clips to keep, the latest: 50 by default. */
|
|
46
|
+
keep?: number;
|
|
47
|
+
/** Where they're kept, from the project's root: `.deictic/voice` by default. */
|
|
48
|
+
dir?: string;
|
|
67
49
|
}
|
|
68
|
-
declare function
|
|
69
|
-
export {
|
|
50
|
+
declare function voice(options?: VoiceOptions): import("deictic").ServerPlugin<never, never, never, Clips>;
|
|
51
|
+
export { VoiceOptions as a, Voice as i, Clips as n, voice as o, Take as r, Clip as t };
|
|
70
52
|
//# sourceMappingURL=index9.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index9.d.ts","names":[],"sources":["../../src/plugins/
|
|
1
|
+
{"version":3,"file":"index9.d.ts","names":[],"sources":["../../src/plugins/voice/index.ts"],"mappings":";UAciB;EACf;EACA;EACA;EACA;;;UAIe;;EAEf;;EAEA,QAAQ;;;;;EAKR,SAAS,KAAK;EACd,QAAQ,QAAQ;EAChB;;;UAIe;;EAEf,SAAS,QAAQ;;;UAIF;;EAEf,KAAK;IAAe,MAAM,WAAW;IAAc;IAAc;;;;YAIvD;IACR,OAAO;;YAEC;IACR,OAAO;;;UAIM;;EAEf;;EAEA;;iBASc,MAAM,UAAS,iCAAiB,kCAAA"}
|
package/dist/shared/init.js
CHANGED
|
@@ -4,8 +4,8 @@ import { dirname, join, relative } from "node:path";
|
|
|
4
4
|
import { createInterface } from "node:readline/promises";
|
|
5
5
|
import MagicString from "magic-string";
|
|
6
6
|
import { Visitor, parseSync } from "oxc-parser";
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as
|
|
7
|
+
import { t as deicticRecommended } from "./recommended.js";
|
|
8
|
+
import { a as packageManager, n as installCommand, o as readJson, r as installed, s as runnerOf } from "./packages.js";
|
|
9
9
|
import { l as fail } from "./board.js";
|
|
10
10
|
// src/cli/edit.ts
|
|
11
11
|
/** The file's line ending. */
|
|
@@ -55,11 +55,11 @@ function addFirst(out, code, open, first, text) {
|
|
|
55
55
|
/** The plugin's module, from the root, which bunfig names and the server imports. */
|
|
56
56
|
const MODULE = "deictic.plugin.ts";
|
|
57
57
|
const PLUGIN = `import { deictic } from 'deictic/bun';
|
|
58
|
-
import {
|
|
58
|
+
import { deicticRecommended } from 'deictic/recommended';
|
|
59
59
|
|
|
60
60
|
// One module for both: bunfig.toml names it as the dev server's bundler plugin, and the server spreads its routes,
|
|
61
61
|
// deictic's endpoints, into its own.
|
|
62
|
-
export default deictic({ plugins:
|
|
62
|
+
export default deictic({ plugins: deicticRecommended() });
|
|
63
63
|
`;
|
|
64
64
|
const SOURCE = /\.[cm]?[jt]sx?$/;
|
|
65
65
|
const SKIP = /* @__PURE__ */ new Set([
|
|
@@ -169,7 +169,7 @@ const extensions = (base) => [
|
|
|
169
169
|
"cts",
|
|
170
170
|
"cjs"
|
|
171
171
|
].map((e) => `${base}.${e}`);
|
|
172
|
-
const PLUGINS = "{ plugins:
|
|
172
|
+
const PLUGINS = "{ plugins: deicticRecommended() }";
|
|
173
173
|
const SETUPS = {
|
|
174
174
|
next: {
|
|
175
175
|
files: extensions("next.config"),
|
|
@@ -234,11 +234,15 @@ function bundlerOf(root) {
|
|
|
234
234
|
if (has.has("webpack")) return "webpack";
|
|
235
235
|
if (serverOf(root) !== void 0) return "bun";
|
|
236
236
|
}
|
|
237
|
-
/**
|
|
238
|
-
|
|
237
|
+
/**
|
|
238
|
+
* What the recommended setup imports, for the bundler and the project: launch-editor opens files under webpack, which
|
|
239
|
+
* has no launcher, and React's state is read only where it has React.
|
|
240
|
+
*/
|
|
241
|
+
function packagesFor(bundler, root) {
|
|
242
|
+
const react = dependenciesOf(root).has("react") || installed(root, "react");
|
|
239
243
|
return [
|
|
240
244
|
"deictic",
|
|
241
|
-
...
|
|
245
|
+
...deicticRecommended({ react: react ? {} : false }).flatMap((p) => p.packages ?? []),
|
|
242
246
|
...bundler === "webpack" || bundler === "rspack" ? ["launch-editor"] : []
|
|
243
247
|
];
|
|
244
248
|
}
|
|
@@ -311,7 +315,7 @@ function addToConfig(bundler, file, code) {
|
|
|
311
315
|
const object = objectOf(exported.value, program);
|
|
312
316
|
if (object === void 0 || !addTo(out, code, object, setup.list, setup.value)) return void 0;
|
|
313
317
|
}
|
|
314
|
-
addImports(out, program, code, [["{
|
|
318
|
+
addImports(out, program, code, [["{ deicticRecommended }", "deictic/recommended"], [`{ ${setup.name} }`, setup.from]], exported.commonjs);
|
|
315
319
|
return out.toString();
|
|
316
320
|
}
|
|
317
321
|
/**
|
|
@@ -350,7 +354,7 @@ async function init(options) {
|
|
|
350
354
|
const manager = packageManager(root);
|
|
351
355
|
const bundler = bundlerOf(root);
|
|
352
356
|
const has = dependenciesOf(root);
|
|
353
|
-
const wanted = packagesFor(bundler).filter((p) => !has.has(p));
|
|
357
|
+
const wanted = packagesFor(bundler, root).filter((p) => !has.has(p));
|
|
354
358
|
const command = installCommand(manager, wanted, root);
|
|
355
359
|
if (wanted.length === 0) log("deictic: its packages are installed");
|
|
356
360
|
else if (!install || dryRun) log(`deictic: install them with ${command}`);
|
|
@@ -380,7 +384,7 @@ function configure(root, bundler, dryRun, log) {
|
|
|
380
384
|
}
|
|
381
385
|
const setup = SETUPS[bundler];
|
|
382
386
|
const file = setup.files.map((f) => join(root, f)).find((f) => existsSync(f));
|
|
383
|
-
const imports = `import {
|
|
387
|
+
const imports = `import { deicticRecommended } from 'deictic/recommended';\nimport { ${setup.name} } from '${setup.from}';`;
|
|
384
388
|
if (file === void 0) {
|
|
385
389
|
log(`deictic: no ${setup.files[0]} here: add deictic to your ${bundler} config:\n\n${imports}\n${setup.snippet}\n`);
|
|
386
390
|
return;
|