deictic 0.6.0 → 0.7.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 +136 -30
- package/README.md +4 -3
- package/dist/annotations/client.d.ts +1 -1
- package/dist/annotations/client.d.ts.map +1 -1
- package/dist/annotations/client.js +161 -176
- package/dist/annotations/client.js.map +1 -1
- package/dist/annotations/index.d.ts +2 -11
- package/dist/client/index.d.ts +7 -6
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1007 -192
- package/dist/client/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/recommended/index.d.ts +2 -2
- package/dist/recordings/client.d.ts.map +1 -1
- package/dist/recordings/client.js +82 -153
- package/dist/recordings/client.js.map +1 -1
- package/dist/screenshots/client.d.ts.map +1 -1
- package/dist/shared/annotations.js +3 -4
- package/dist/shared/annotations.js.map +1 -1
- package/dist/shared/board.js +1 -1
- package/dist/shared/client.js +45 -2
- package/dist/shared/client.js.map +1 -1
- package/dist/shared/component.js +62 -0
- package/dist/shared/component.js.map +1 -0
- package/dist/shared/dom.js +79 -0
- package/dist/shared/dom.js.map +1 -0
- package/dist/shared/drawer.js +217 -0
- package/dist/shared/drawer.js.map +1 -0
- package/dist/shared/index.d.ts +116 -7
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index2.d.ts +9 -19
- package/dist/shared/index2.d.ts.map +1 -1
- package/dist/shared/index7.d.ts +103 -26
- package/dist/shared/index7.d.ts.map +1 -1
- package/dist/shared/index9.d.ts +1 -1
- package/dist/shared/integration.d.ts +1 -1
- package/dist/shared/packages.js +1 -1
- package/dist/shared/recording.js +31 -3
- package/dist/shared/recording.js.map +1 -1
- package/dist/shared/src.js.map +1 -1
- package/dist/shared/task.js +44 -29
- package/dist/shared/task.js.map +1 -1
- package/dist/shared/tasks.js +232 -62
- package/dist/shared/tasks.js.map +1 -1
- package/dist/shared/vb.js +1 -1
- package/dist/shared/voice2.js +6 -4
- package/dist/shared/voice2.js.map +1 -1
- package/dist/shared/watch.js +14 -14
- package/dist/shared/watch.js.map +1 -1
- package/dist/tasks/client.d.ts +2 -2
- package/dist/tasks/client.d.ts.map +1 -1
- package/dist/tasks/client.js +1829 -741
- package/dist/tasks/client.js.map +1 -1
- package/dist/tasks/index.d.ts +2 -2
- package/dist/voice/client.d.ts.map +1 -1
- package/dist/voice/client.js +154 -57
- package/dist/voice/client.js.map +1 -1
- package/package.json +1 -1
- package/skills/deictic/SKILL.md +22 -28
- package/src/cli/recording.ts +34 -3
- package/src/cli/task.ts +59 -30
- package/src/cli/voice.ts +9 -4
- package/src/cli/watch.ts +14 -13
- package/src/client/away.ts +3 -1
- package/src/client/component.ts +98 -0
- package/src/client/dom.ts +70 -0
- package/src/client/drawer.ts +258 -0
- package/src/client/index.ts +220 -128
- package/src/client/lightbox.ts +8 -8
- package/src/client/lighting.ts +279 -0
- package/src/client/style.ts +263 -44
- package/src/client/tools.ts +279 -0
- package/src/client/tooltip.ts +25 -5
- package/src/client/tray.ts +48 -0
- package/src/index.ts +113 -6
- package/src/plugins/annotations/client.ts +103 -129
- package/src/plugins/annotations/draw.ts +68 -72
- package/src/plugins/annotations/index.ts +12 -19
- package/src/plugins/recordings/client.ts +89 -167
- package/src/plugins/screenshots/client.ts +53 -2
- package/src/plugins/tasks/client.ts +219 -748
- package/src/plugins/tasks/composer.ts +797 -0
- package/src/plugins/tasks/drawer.ts +516 -0
- package/src/plugins/tasks/index.ts +360 -82
- package/src/plugins/tasks/pins.ts +275 -0
- package/src/plugins/tasks/store.ts +132 -0
- package/src/plugins/voice/client.ts +96 -5
- package/skills/deictic/references/recordings.md +0 -13
- package/skills/deictic/references/tasks.md +0 -22
- package/skills/deictic/references/watch.md +0 -17
package/dist/shared/index.d.ts
CHANGED
|
@@ -127,6 +127,92 @@ interface ServerPlugin<Model = unknown, Op = unknown, Record = unknown, Api = un
|
|
|
127
127
|
describe?(op: Op, before: Model): string;
|
|
128
128
|
}
|
|
129
129
|
declare const definePlugin: <Model, Op, Record = unknown, Api = unknown>(plugin: ServerPlugin<Model, Op, Record, Api>) => ServerPlugin<Model, Op, Record, Api>;
|
|
130
|
+
/** Where something is in an element, in CSS pixels from its top left. */
|
|
131
|
+
interface Point {
|
|
132
|
+
x: number;
|
|
133
|
+
y: number;
|
|
134
|
+
}
|
|
135
|
+
/** A spot on the page: a marked element, and a point in it (or beside it, for the nearest to a point no marked element is under). */
|
|
136
|
+
interface Spot {
|
|
137
|
+
element: Element;
|
|
138
|
+
at: Point;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* The tool panel: a bar docked to an edge of the window, which shows while a shortcut's keys are held and stays
|
|
142
|
+
* while it's in use. A plugin adds its tools to it from its page half's `setup`.
|
|
143
|
+
*/
|
|
144
|
+
interface ToolPanel {
|
|
145
|
+
/**
|
|
146
|
+
* Adds a plugin's controls, as one group, in the order plugins are loaded. Groups of one `section` sit together,
|
|
147
|
+
* with no line between them, after the groups of none: the screenshots', recordings', voice's and tasks' are
|
|
148
|
+
* `capture`. `last` puts a group at the end of its section, or after all the others for one of none. Each control is a button named by its `title`; its `aria-keyshortcuts`
|
|
149
|
+
* (`B`, `Control+Z`) is the key the panel hears for it, alone or with the keys held to point, and what its tooltip
|
|
150
|
+
* shows.
|
|
151
|
+
*/
|
|
152
|
+
add: (group: HTMLElement, options?: {
|
|
153
|
+
last?: boolean;
|
|
154
|
+
section?: string;
|
|
155
|
+
}) => void;
|
|
156
|
+
/**
|
|
157
|
+
* Takes the page for a tool that works on it (drawing, picking a point): the tool that had it lets go first, and
|
|
158
|
+
* the panel stays shown. `left` is called when another takes it, or Esc or the pointer tool gives the page back.
|
|
159
|
+
* Answers what lets go of it, for the tool to call when it's done on its own.
|
|
160
|
+
*/
|
|
161
|
+
hold: (left: () => void) => () => void;
|
|
162
|
+
/** Keeps the panel shown while something goes on that its controls end (a recording). Answers what ends that. */
|
|
163
|
+
keep: () => () => void;
|
|
164
|
+
/**
|
|
165
|
+
* Takes the page until a point of it is pressed, lighting what's under the pointer as pointing does: answers the
|
|
166
|
+
* spot, the marked element there or the nearest to it, or nothing where the page was given back first.
|
|
167
|
+
*/
|
|
168
|
+
pick: () => Promise<Spot | undefined>;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* The drawer: on the window's side, where what the plugins have for the page lands, a section each. It
|
|
172
|
+
* shows while a shortcut's keys are held and a section has something, and stays while it's in use.
|
|
173
|
+
*/
|
|
174
|
+
interface Drawer {
|
|
175
|
+
/**
|
|
176
|
+
* Adds a section, in the order added, or before the others with `first`. A section that has nothing to show sets
|
|
177
|
+
* its own `hidden`: the drawer stays away while every one is. Folded away, the drawer counts what the sections
|
|
178
|
+
* have: each says how many things it lists in `data-count`, and how many are unread in `data-unread`.
|
|
179
|
+
*/
|
|
180
|
+
add: (section: HTMLElement, options?: {
|
|
181
|
+
first?: boolean;
|
|
182
|
+
}) => void;
|
|
183
|
+
/**
|
|
184
|
+
* Opens one item in the drawer, in the sections' place, under `title` and a way back. The drawer stays while it's
|
|
185
|
+
* open. `closed` is called when it's left, by the way back, Esc, or another item opening. Answers what closes it.
|
|
186
|
+
*/
|
|
187
|
+
show: (view: HTMLElement, options?: {
|
|
188
|
+
title?: string;
|
|
189
|
+
closed?: () => void;
|
|
190
|
+
}) => () => void;
|
|
191
|
+
/** Keeps the drawer up while something goes on in it; answers what lets it go. */
|
|
192
|
+
keep: () => () => void;
|
|
193
|
+
}
|
|
194
|
+
/** Something a plugin made on the page that nothing has taken yet: a shot, a recording, a voice clip. */
|
|
195
|
+
interface TrayItem {
|
|
196
|
+
/** The plugin that made it. */
|
|
197
|
+
plugin: string;
|
|
198
|
+
/** Its ID, as that plugin has it. */
|
|
199
|
+
id: string;
|
|
200
|
+
/** What that plugin says of it, as JSON: the screenshots plugin's `Shot`, a `Recording`, a `Clip`. */
|
|
201
|
+
value: unknown;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* What plugins made on the page from the tool panel, until something takes it: a task attaches what's there and
|
|
205
|
+
* removes it. Kept for the tab's session, so it's there on the tab's next page too.
|
|
206
|
+
*/
|
|
207
|
+
interface Tray {
|
|
208
|
+
/** What's kept, oldest first: all of it, or one plugin's. */
|
|
209
|
+
list: (plugin?: string) => TrayItem[];
|
|
210
|
+
add: (plugin: string, id: string, value: unknown) => void;
|
|
211
|
+
/** Takes one out, or all of a plugin's. */
|
|
212
|
+
remove: (plugin: string, id?: string) => void;
|
|
213
|
+
/** Hears every change from now on; answers what stops it. */
|
|
214
|
+
subscribe: (listener: () => void) => () => void;
|
|
215
|
+
}
|
|
130
216
|
interface ClientContext {
|
|
131
217
|
/** The dev server's base URL, ending in `/`. */
|
|
132
218
|
base: string;
|
|
@@ -139,11 +225,24 @@ interface ClientContext {
|
|
|
139
225
|
/** Asks one of this plugin's own routes, from the page: `request('shots', { method: 'POST', body: blob })`. */
|
|
140
226
|
request: (route: string, init?: RequestInit) => Promise<Response>;
|
|
141
227
|
/**
|
|
142
|
-
* Opens the popup on an element at a plugin's tab, as its shortcut would
|
|
143
|
-
*
|
|
144
|
-
*
|
|
228
|
+
* Opens the popup on an element at a plugin's tab, as its shortcut would, or with `at` on a spot in it: the
|
|
229
|
+
* popup is then beside the spot, which is what's lit, and the tab's context has it. An element rendered again
|
|
230
|
+
* since stands in for one no longer on the page. False when there's no such tab or no such element any more, and
|
|
231
|
+
* while the open popup holds something unsaved, whose button then shakes. Not as `setup` runs, which is before the
|
|
232
|
+
* popup can open.
|
|
233
|
+
*/
|
|
234
|
+
open: (plugin: string, element: Element, at?: Point) => boolean;
|
|
235
|
+
/** The tool panel, to add this plugin's tools to. */
|
|
236
|
+
tools: ToolPanel;
|
|
237
|
+
/** What was made from the tool panel and not taken yet. */
|
|
238
|
+
tray: Tray;
|
|
239
|
+
/** The drawer, to add this plugin's section to. */
|
|
240
|
+
drawer: Drawer;
|
|
241
|
+
/**
|
|
242
|
+
* Lights an element on the page as pointing at it does, for something of the overlay's own that stands for it (a
|
|
243
|
+
* task's row in the drawer, while the pointer is on it); none puts the light back as it was.
|
|
145
244
|
*/
|
|
146
|
-
|
|
245
|
+
light: (element?: Element) => void;
|
|
147
246
|
/**
|
|
148
247
|
* Shows `items` in the lightbox over everything, at `at` (the first by default), stepping between them with
|
|
149
248
|
* ← and →. With `from`, it grows out of that element (the chip clicked) and shrinks back into it on close.
|
|
@@ -191,12 +290,17 @@ interface PanelContext<Model, Op> extends ClientContext {
|
|
|
191
290
|
* dependency's, or in an open shadow root, as the popup's own on a page that shows it (`popupIn`).
|
|
192
291
|
*/
|
|
193
292
|
pointed?: Element;
|
|
293
|
+
/** The spot in `element` the popup was opened on, where it was (the tool panel's task tool), not the element as a whole. */
|
|
294
|
+
at?: Point;
|
|
194
295
|
/** Every element on the page from the same place in the source, the clicked one among them: the rows of a list. */
|
|
195
296
|
elements: Element[];
|
|
196
297
|
target: Target;
|
|
197
298
|
model: Model;
|
|
198
|
-
/**
|
|
199
|
-
|
|
299
|
+
/**
|
|
300
|
+
* Applies an op on disk, and reads the model again. Rejects with the server's reason, which the panel also shows.
|
|
301
|
+
* On another element with `on`, whose model is then the one answered: for an op that's about that one.
|
|
302
|
+
*/
|
|
303
|
+
apply(op: Op, on?: Target): Promise<Model>;
|
|
200
304
|
close: () => void;
|
|
201
305
|
/**
|
|
202
306
|
* Says there's something here that leaving would lose (words typed, a change tried on the page), and the button
|
|
@@ -239,9 +343,14 @@ interface ClientPlugin<Model = unknown, Op = unknown, Api = unknown> {
|
|
|
239
343
|
* done the popup opens at this tab with `resumed`, on the element where this page has it and without where not.
|
|
240
344
|
*/
|
|
241
345
|
resume?(context: ClientContext): Promise<unknown> | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* What it shows on the page while a shortcut's keys are held, and the page is dimmed to point on: the tasks
|
|
348
|
+
* plugin pins each task where its element is. Answers what takes it away.
|
|
349
|
+
*/
|
|
350
|
+
pointing?(context: ClientContext): () => void;
|
|
242
351
|
/** Draws into `panel`, inside deictic's shadow root. Returns what to undo on the page when the panel closes. */
|
|
243
352
|
mount?: (panel: HTMLElement, context: PanelContext<Model, Op>) => (() => void) | void;
|
|
244
353
|
}
|
|
245
354
|
declare const defineClientPlugin: <Model, Op, Api = unknown>(plugin: ClientPlugin<Model, Op, Api>) => ClientPlugin<Model, Op, Api>;
|
|
246
|
-
export {
|
|
355
|
+
export { Shortcut as A, TextEdit as C, defineClientPlugin as D, TrayItem as E, definePlugin as O, Target as S, Tray as T, ServerContext as _, Done as a, Spot as b, LightboxItem as c, PanelContext as d, Point as f, ServerApis as g, Route as h, ClientPlugin as i, Modifier as k, LightboxOptions as l, Resumed as m, ClientApis as n, Drawer as o, Refusal as p, ClientContext as r, LightboxAction as s, ApiOf as t, Loc as u, ServerPlugin as v, ToolPanel as w, Standalone as x, Source as y };
|
|
247
356
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/shortcut.ts","../../src/index.ts"],"mappings":";;;;;;;;;;KAUY;UAEK;;EAEf,YAAY;;EAEZ;;;UCYe;EACf;EACA;EACA;;;UAIe;EACf,KAAK;EACL;;;UAIe;EACf;EACA;EACA;EACA;;;UAIe;;EAEf;EACA;;EAEA,SAAS;;EAET,SAAS;;EAET,KAAK;;;;;;;KAQK,cAAc,SAAS,YAAY,WAAW,QAAQ;;cAGrD,gBAAgB;EAClB;;;;;;UAOM,KAAK;EACpB,MAAM;;KAGH,MAAM,KAAK,IAAI,QAAQ;;;;;UAOX;;UAIA;;KAGL,MAAM,MAAM,uBAAuB,mBAAmB,OAAO,KAAK;UAE7D;;EAEf;;;;;EAKA,MAAM,qBAAqB,MAAM,SAAS,MAAM,YAAY;;;;;;KAOlD,SAAS,SAAS,SAAS,SAAS,kBAAkB,MAAM;UAEvD,aAAa,iBAAiB,cAAc,kBAAkB;;EAE7E;;EAEA;;EAEA;;EAEA,WAAW;;EAEX;;;;;EAKA;;EAEA,OAAO,SAAS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,YAAY,QAAQ;;EAE9C,UAAU;;;UAIK;EACf;EACA;;EAEA;;UAGe,aAAa,iBAAiB,cAAc;;EAE3D;;EAEA;;;;;EAKA,OAAO,SAAS,gBAAgB;;;;;;EAMhC,QAAQ,SAAS,gBAAgB;;;;;EAKjC,UAAU,SAAS;;EAEnB,SAAS,OAAO,aAAa,SAAS,aAAa,OAAO;;cAG/C,qBAAsB,OAAO,IAAI,eAAa,QAAU,aAAa,OAAO,IAAI,SAAO,aAAa,OAAO,IAAI"}
|
package/dist/shared/index2.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { w as Shortcut } from "./index.js";
|
|
2
1
|
/** A point in page coordinates: CSS pixels from the document's top left, so it stays put as the page scrolls. */
|
|
3
2
|
interface Point {
|
|
4
3
|
x: number;
|
|
@@ -57,28 +56,21 @@ interface Annotations {
|
|
|
57
56
|
*/
|
|
58
57
|
svg(area: Area): string | undefined;
|
|
59
58
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
|
|
59
|
+
* Starts drawing on the page, as the tool panel's own tools do, with the one used last (the box, first): for
|
|
60
|
+
* another plugin's button. The page is the marks' until the tool panel gives it back (its pointer, or Esc).
|
|
61
|
+
*/
|
|
62
|
+
draw(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Opens `picture` over everything, to draw on with the same tools: the marks on Save, in the picture's CSS
|
|
65
|
+
* pixels, or nothing on Cancel, Esc or `signal`. Start it with `marks`, to change them. They're the picture's
|
|
66
|
+
* alone, not the page's.
|
|
63
67
|
*/
|
|
64
68
|
edit(picture: Picture, marks?: readonly Annotation[], options?: {
|
|
65
69
|
signal?: AbortSignal;
|
|
66
70
|
}): Promise<Annotation[] | undefined>;
|
|
67
71
|
/** The picture with the marks drawn over it, as a PNG at the picture's own resolution. */
|
|
68
72
|
flatten(picture: Picture, marks: readonly Annotation[]): Promise<Blob>;
|
|
69
|
-
/**
|
|
70
|
-
* Annotate mode's tools, for another plugin's UI to show (a recording's toolbar): a pointer tool, picked
|
|
71
|
-
* to start with, leaves the page usable; while a drawing tool is picked, the page is drawn on. What's
|
|
72
|
-
* drawn is its own `marks`, not the page's: shown while it's open, kept by nothing, gone on `close`.
|
|
73
|
-
*/
|
|
74
|
-
tools(): {
|
|
75
|
-
element: HTMLElement;
|
|
76
|
-
marks: MarkSet;
|
|
77
|
-
close: () => void;
|
|
78
|
-
};
|
|
79
73
|
}
|
|
80
|
-
/** A set of marks on the page: the page's own, kept for the session, or a toolbar's, kept by nothing. */
|
|
81
|
-
type MarkSet = Pick<Annotations, 'list' | 'add' | 'remove' | 'clear' | 'subscribe' | 'svg'>;
|
|
82
74
|
/** An image to draw on: where it loads from (the page's origin, so a canvas may read it), and its size in CSS pixels, which marks on it are in. */
|
|
83
75
|
interface Picture {
|
|
84
76
|
url: string;
|
|
@@ -91,11 +83,9 @@ declare module 'deictic' {
|
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
85
|
interface AnnotationsOptions {
|
|
94
|
-
/** What opens its tab directly, beside deictic's own shortcut, which opens any: none by default. */
|
|
95
|
-
shortcut?: Shortcut;
|
|
96
86
|
/** The colour marks are drawn in: a red that deictic's own green isn't. */
|
|
97
87
|
color?: string;
|
|
98
88
|
}
|
|
99
89
|
declare function annotations(options?: AnnotationsOptions): import("deictic").ServerPlugin<unknown, unknown, unknown, unknown>;
|
|
100
|
-
export { Area as a,
|
|
90
|
+
export { Area as a, Shape as c, AnnotationsOptions as i, annotations as l, AnnotationEvent as n, Picture as o, Annotations as r, Point as s, Annotation as t };
|
|
101
91
|
//# sourceMappingURL=index2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/plugins/annotations/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index2.d.ts","names":[],"sources":["../../src/plugins/annotations/index.ts"],"mappings":";UAYiB;EACf;EACA;;;UAIe;EACf;EACA;EACA;EACA;;KAGU;EACL;IAAgB;EACjB;EAAe,MAAM;EAAO,IAAI;;EAChC;EAAa,QAAQ;;EACrB;EAAc,IAAI;EAAO;;UAEd;EACf;EACA;EACA,OAAO;;EAEP;;;KAIU;EAAoB;EAAa,YAAY;;EAAiB;EAAgB;;EAAiB;;;UAG1F;;EAEf,QAAQ;EACR,IAAI,OAAO,OAAO,iBAAiB;EACnC,OAAO;EACP;;EAEA,UAAU,WAAW,OAAO;;;;;EAK5B,IAAI,MAAM;;;;;EAKV;;;;;;EAMA,KAAK,SAAS,SAAS,iBAAiB,cAAc;IAAY,SAAS;MAAgB,QAAQ;;EAEnG,QAAQ,SAAS,SAAS,gBAAgB,eAAe,QAAQ;;;UAIlD;EACf;EACA;EACA;;;YAIU;IACR,aAAa;;;UAIA;;EAEf;;iBAGc,YAAY,UAAS,uCAAuB"}
|
package/dist/shared/index7.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Board } from "@vercel/board";
|
|
2
|
-
import {
|
|
2
|
+
import { A as Shortcut, S as Target, f as Point } from "./index.js";
|
|
3
3
|
import { t as Box } from "./index3.js";
|
|
4
4
|
interface LocalOptions {
|
|
5
5
|
/**
|
|
@@ -24,7 +24,7 @@ interface LocalBoard {
|
|
|
24
24
|
*/
|
|
25
25
|
declare const local: (options?: LocalOptions) => LocalBoard;
|
|
26
26
|
/** What the plugin uses of a board: `board()` from `@vercel/board` is one. */
|
|
27
|
-
type TaskBoard = Pick<Board, 'tasks' | 'thread' | 'discovery' | 'upload' | 'edit' | 'actors'>;
|
|
27
|
+
type TaskBoard = Pick<Board, 'tasks' | 'thread' | 'threads' | 'reply' | 'discovery' | 'upload' | 'download' | 'edit' | 'actors'>;
|
|
28
28
|
interface TasksOptions {
|
|
29
29
|
/**
|
|
30
30
|
* The board, as `@vercel/board`'s `board()` answers it. By default the one `BOARD_URL` names, and with none,
|
|
@@ -75,9 +75,10 @@ interface Task {
|
|
|
75
75
|
link?: string;
|
|
76
76
|
/** What was attached to it but not kept by the time it was sent, so it went without: `a screenshot`. */
|
|
77
77
|
dropped?: string;
|
|
78
|
+
/** The spot in the element it's about, where it's about one: CSS pixels from the element's top left. */
|
|
79
|
+
point?: Point;
|
|
78
80
|
/**
|
|
79
|
-
* Where it was added, where that isn't the element's place:
|
|
80
|
-
* it moved; for one of `elsewhere`, the element it's about.
|
|
81
|
+
* Where it was added, where that isn't the element's place: where the element was before it moved.
|
|
81
82
|
*/
|
|
82
83
|
at?: Place;
|
|
83
84
|
}
|
|
@@ -87,14 +88,72 @@ interface Place {
|
|
|
87
88
|
column: number;
|
|
88
89
|
tag: string;
|
|
89
90
|
}
|
|
91
|
+
/** A task as the drawer lists it: with its place, where it has one, and how its thread stands. */
|
|
92
|
+
interface Listed extends Task {
|
|
93
|
+
/** `file:line:column`, as the element's mark: none for a task about the page. */
|
|
94
|
+
place?: string;
|
|
95
|
+
/** The tag there, as the task saw it. */
|
|
96
|
+
tag?: string;
|
|
97
|
+
/** The page it was added on, as its path: `/pricing`. */
|
|
98
|
+
page?: string;
|
|
99
|
+
/** How many replies its thread has, and the newest's ID: what the page tells the unread by. */
|
|
100
|
+
replies: number;
|
|
101
|
+
last?: string;
|
|
102
|
+
/** What the board says of where it stands: why it's blocked, what it came to, why it failed. */
|
|
103
|
+
said?: string;
|
|
104
|
+
}
|
|
105
|
+
/** A task with a place, as its mark has it: what the page pins to the element there. */
|
|
106
|
+
type Placed = Listed & {
|
|
107
|
+
place: string;
|
|
108
|
+
};
|
|
109
|
+
/** A file attached to a task or to a reply in its thread, as the board keeps it. */
|
|
110
|
+
interface Attached {
|
|
111
|
+
/** The board's ID for it. */
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
/** Its MIME type: `image/png`, `audio/webm`, `application/json` for a recording, `text/html` for an element's HTML. */
|
|
115
|
+
type: string;
|
|
116
|
+
/** In bytes. */
|
|
117
|
+
size: number;
|
|
118
|
+
/**
|
|
119
|
+
* Where the page gets it: by default the plugin's `file/<task>/<id>` route, which serves an image or a sound as it
|
|
120
|
+
* is and anything else as text. A `standalone` server answers its own.
|
|
121
|
+
*/
|
|
122
|
+
url?: string;
|
|
123
|
+
/** Where a recording plays back, as the message says. */
|
|
124
|
+
replay?: string;
|
|
125
|
+
}
|
|
126
|
+
/** A message in a task's thread, oldest first. */
|
|
127
|
+
interface Reply {
|
|
128
|
+
id: string;
|
|
129
|
+
/** Who wrote it, by name. */
|
|
130
|
+
by: string;
|
|
131
|
+
/** `person`, or what else wrote it: an agent's `profile`, a deployment, a workflow. */
|
|
132
|
+
kind: string;
|
|
133
|
+
text: string;
|
|
134
|
+
/** When, as an ISO date. */
|
|
135
|
+
at: string;
|
|
136
|
+
/** What it has attached. */
|
|
137
|
+
files: Attached[];
|
|
138
|
+
}
|
|
139
|
+
/** A task with its thread, as the drawer opens it. */
|
|
140
|
+
interface Thread {
|
|
141
|
+
task: Listed;
|
|
142
|
+
/** What the task has attached: its shots, recordings, voice notes and elements' HTML. */
|
|
143
|
+
files: Attached[];
|
|
144
|
+
replies: Reply[];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A reply, as the drawer's composer sends it to the `reply/<id>` route: its words, and what's attached, as a task
|
|
148
|
+
* attaches it. A reply with nothing typed says what's attached instead.
|
|
149
|
+
*/
|
|
150
|
+
type Answer = Pick<Op, 'text' | 'screenshots' | 'recordings' | 'voice' | 'annotations'>;
|
|
90
151
|
interface Model {
|
|
91
152
|
channel: string;
|
|
92
153
|
/** The channel's page, when there's one to link to. */
|
|
93
154
|
link?: string;
|
|
94
155
|
/** Tasks about this element, oldest first, canceled ones left out: also those added before it moved. */
|
|
95
156
|
tasks: Task[];
|
|
96
|
-
/** Tasks about the file's other elements, by line, canceled ones left out: each with its `at`. */
|
|
97
|
-
elsewhere: Task[];
|
|
98
157
|
/**
|
|
99
158
|
* Who watches the channel, by name (`claude`): the agents whose watch (`deictic watch`) is running in
|
|
100
159
|
* this project, as a board can't say, and those holding a claim on one of the channel's tasks, which it can.
|
|
@@ -103,16 +162,6 @@ interface Model {
|
|
|
103
162
|
*/
|
|
104
163
|
watching?: string[];
|
|
105
164
|
}
|
|
106
|
-
/**
|
|
107
|
-
* What the Task tab asks for: a new task (an `Op`), other words for one it lists (`edit` is its ID), or
|
|
108
|
-
* that one deleted (`remove` is its ID), which cancels it on the board.
|
|
109
|
-
*/
|
|
110
|
-
type Change = Op | {
|
|
111
|
-
edit: string;
|
|
112
|
-
text: string;
|
|
113
|
-
} | {
|
|
114
|
-
remove: string;
|
|
115
|
-
};
|
|
116
165
|
/** A new task: what the page knows and the source doesn't. */
|
|
117
166
|
interface Op {
|
|
118
167
|
text: string;
|
|
@@ -122,6 +171,11 @@ interface Op {
|
|
|
122
171
|
width: number;
|
|
123
172
|
height: number;
|
|
124
173
|
};
|
|
174
|
+
/**
|
|
175
|
+
* 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:
|
|
176
|
+
* CSS pixels from the element's top left, and outside its box where the element is only the nearest to the spot.
|
|
177
|
+
*/
|
|
178
|
+
point?: Point;
|
|
125
179
|
/**
|
|
126
180
|
* What was under the pointer inside the element, where nothing marked it (a dependency's markup, or a
|
|
127
181
|
* shadow root's): its path from the element, and its HTML, cut short.
|
|
@@ -132,6 +186,20 @@ interface Op {
|
|
|
132
186
|
};
|
|
133
187
|
/** How many elements on the page come from the same place in the source. */
|
|
134
188
|
count: number;
|
|
189
|
+
/**
|
|
190
|
+
* The other elements it's about, after the one it's sent on, in the order they were attached: each one's place,
|
|
191
|
+
* its tag, and its HTML as it rendered, where that's attached.
|
|
192
|
+
*/
|
|
193
|
+
also?: {
|
|
194
|
+
at: string;
|
|
195
|
+
tag: string;
|
|
196
|
+
html?: string;
|
|
197
|
+
}[];
|
|
198
|
+
/**
|
|
199
|
+
* No element is attached: it's about the page, and the element it's sent on is only where the popup was. It has
|
|
200
|
+
* no place then, so no element's tab lists it and nothing pins it.
|
|
201
|
+
*/
|
|
202
|
+
detached?: boolean;
|
|
135
203
|
/**
|
|
136
204
|
* The source it rendered through, after its own place, nearest first: where the one before it is used. With
|
|
137
205
|
* React in development, the components that wrote it, `Field (src/Field.tsx:20)` or a name alone; without, the
|
|
@@ -142,13 +210,14 @@ interface Op {
|
|
|
142
210
|
/** The element's HTML as it rendered, to attach: cut short, and masked where the screenshots plugin is loaded. */
|
|
143
211
|
html?: string;
|
|
144
212
|
/**
|
|
145
|
-
* Shots the screenshots plugin took
|
|
146
|
-
*
|
|
147
|
-
*
|
|
213
|
+
* Shots the screenshots plugin took, to attach, where that plugin is loaded: each with where the element is in
|
|
214
|
+
* it (`box`, for one taken of the element; one taken of the window from the tool panel has none), whether
|
|
215
|
+
* it's `outlined` there (dashes drawn around it, or around the spot, in the PNG), and the marks drawn on it in
|
|
216
|
+
* the Task tab, where there are any.
|
|
148
217
|
*/
|
|
149
218
|
screenshots?: {
|
|
150
219
|
id: string;
|
|
151
|
-
box
|
|
220
|
+
box?: Box;
|
|
152
221
|
outlined?: boolean;
|
|
153
222
|
marks?: Marks;
|
|
154
223
|
}[];
|
|
@@ -191,6 +260,11 @@ interface TaskAdded {
|
|
|
191
260
|
voice: number;
|
|
192
261
|
marks: number;
|
|
193
262
|
};
|
|
263
|
+
/**
|
|
264
|
+
* Where each attached shot is, as it was sent (outlined, or as it was drawn on), for the page to show: the
|
|
265
|
+
* screenshots plugin's `shot` route, or what a `standalone` server answered.
|
|
266
|
+
*/
|
|
267
|
+
screenshots: string[];
|
|
194
268
|
}
|
|
195
269
|
/** Marks, as a task tells of them: how many, and what the notes among them say. */
|
|
196
270
|
interface Marks {
|
|
@@ -205,7 +279,7 @@ interface Added {
|
|
|
205
279
|
/** What's attached, by the board's IDs: kept, so a redo attaches the same without uploading it again. */
|
|
206
280
|
attachments?: string[];
|
|
207
281
|
}
|
|
208
|
-
/** A task's words changed: its message's whole text before and after. */
|
|
282
|
+
/** A task's words changed in the tab, as an earlier version let it: its message's whole text before and after. */
|
|
209
283
|
interface Edited {
|
|
210
284
|
kind: 'edited';
|
|
211
285
|
id: string;
|
|
@@ -213,14 +287,17 @@ interface Edited {
|
|
|
213
287
|
after: string;
|
|
214
288
|
}
|
|
215
289
|
/**
|
|
216
|
-
* A task deleted in the
|
|
217
|
-
* an undo adds it again, as a new task whose ID the record then has.
|
|
290
|
+
* A task deleted in the tab, as an earlier version let it: canceled on the board, for good, as a board has it. So
|
|
291
|
+
* it's kept whole, and an undo adds it again, as a new task whose ID the record then has.
|
|
218
292
|
*/
|
|
219
293
|
interface Removed extends Added {
|
|
220
294
|
kind: 'removed';
|
|
221
295
|
}
|
|
222
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* What the history keeps of a change: a task added has no `kind`, as it had none before there were others. The others
|
|
298
|
+
* are no longer made (a task is changed in the drawer, by the plugin's routes), and still undone where a history has them.
|
|
299
|
+
*/
|
|
223
300
|
type Kept = Added | Edited | Removed;
|
|
224
|
-
declare function tasks(options?: TasksOptions): import("deictic").ServerPlugin<Model,
|
|
225
|
-
export { local as _,
|
|
301
|
+
declare function tasks(options?: TasksOptions): import("deictic").ServerPlugin<Model, Op, Kept, unknown>;
|
|
302
|
+
export { local as S, TasksOptions as _, Kept as a, LocalBoard 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, LocalOptions as x, tasks as y };
|
|
226
303
|
//# sourceMappingURL=index7.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index7.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;;KCVvC,YAAY,KAAK;UAEZ;;;;;;;;EAQf,QAAQ,YAAY;;EAEpB;;;;;EAKA;;EAEA,SAAS;;;;;;;EAOT,QAAQ,iBAAiB;;;;;;;E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f;EACA;EACA;EACA,QAAQ;;EAER;;;UAIe;EACf;EACA;EACA;EACA;;;;;;UAOe,gBAAgB;EAC/B;;;;;;KAOU,OAAO,QAAQ,SAAS;iBAqBpB,MAAM,UAAS,iCAAiB,aAAA,OAAA,IAAA"}
|
package/dist/shared/index9.d.ts
CHANGED
package/dist/shared/packages.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
// package.json
|
|
5
5
|
var name = "deictic";
|
|
6
|
-
var version = "0.
|
|
6
|
+
var version = "0.7.0";
|
|
7
7
|
var peerDependencies = {
|
|
8
8
|
"@rrweb/rrweb-plugin-console-record": "^2.2.2",
|
|
9
9
|
"@rrweb/rrweb-plugin-network-record": "^2.2.2",
|
package/dist/shared/recording.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import { relative } from "node:path";
|
|
1
2
|
import { a as clock, l as fail, t as ME } from "./board.js";
|
|
2
3
|
import { r as loadRecording } from "./find.js";
|
|
3
4
|
// src/cli/recording.ts
|
|
5
|
+
/**
|
|
6
|
+
* `deictic recording`: a recording as a timeline: the page, each click and field typed in (with the element's place
|
|
7
|
+
* in the source), scrolls, resizes, each change to the marks (what was drawn, where, and the notes' text), the voice
|
|
8
|
+
* clips, the page's console and its requests where the project records them, and the end. Or the part of it asked
|
|
9
|
+
* for: `--only`, `--problems`, `--from`, `--to`, `--around`, `--grep`, and `--full` for all of each line.
|
|
10
|
+
*/
|
|
4
11
|
const round = Math.round;
|
|
5
12
|
/** The marks, as data where the recording has it. */
|
|
6
13
|
function shapeOf({ shape }) {
|
|
@@ -151,7 +158,10 @@ function timelineOf(events, voice) {
|
|
|
151
158
|
const after = new Set(now.map(key));
|
|
152
159
|
const added = now.filter((a) => !before.has(key(a)));
|
|
153
160
|
const removed = marks.filter((a) => !after.has(key(a)));
|
|
154
|
-
if (added.length > 0 || removed.length > 0)
|
|
161
|
+
if (added.length > 0 || removed.length > 0) {
|
|
162
|
+
const gone = now.length === 0 && removed.length > 1 ? [`− all ${removed.length} marks`] : removed.map((a) => `− ${shapeOf(a)}`);
|
|
163
|
+
push(t, "marks", [...added.map((a) => `+ ${shapeOf(a)}`), ...gone].join("; "), { marks: now.map((a) => a.shape) });
|
|
164
|
+
}
|
|
155
165
|
marks = now;
|
|
156
166
|
}
|
|
157
167
|
if (e.type === 5 && d.tag === "deictic.page") push(t, "page", `${payload.href} (a route change, no load)`);
|
|
@@ -227,6 +237,23 @@ function timelineOf(events, voice) {
|
|
|
227
237
|
for (const c of voice) push(c.at, "voice", `clip ${c.id}, ${clock(c.duration)} long, until ${clock(c.at + c.duration)}`);
|
|
228
238
|
return timeline.sort((a, b) => a.t - b.t);
|
|
229
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* The page's own URLs as paths, in a line of text: `http://localhost:5180/src/App.tsx?t=1712:9:7` is `/src/App.tsx:9:7`,
|
|
242
|
+
* and a file Vite serves from outside its root (`/@fs/S:/…/dist/client.js`) is that file's path from here. The header
|
|
243
|
+
* says the origin once; `--json` keeps every URL whole.
|
|
244
|
+
*/
|
|
245
|
+
function shortener(page) {
|
|
246
|
+
let origin;
|
|
247
|
+
try {
|
|
248
|
+
origin = new URL(page).origin;
|
|
249
|
+
} catch {
|
|
250
|
+
return (text) => text;
|
|
251
|
+
}
|
|
252
|
+
const quoted = origin.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
253
|
+
const fs = new RegExp(`${quoted}/@fs/([A-Za-z]:)?([^\\s?:)]+)`, "g");
|
|
254
|
+
const own = new RegExp(`${quoted}(?=/)`, "g");
|
|
255
|
+
return (text) => text.replace(fs, (_, drive, rest) => relative(process.cwd(), drive ? `${drive}${rest}` : `/${rest}`).replaceAll("\\", "/")).replace(own, "").replace(/(\.[cm]?[jt]sx?)\?[tv]=[\w.-]+/g, "$1");
|
|
256
|
+
}
|
|
230
257
|
async function run(named, values) {
|
|
231
258
|
const { kept, id, replay, task } = await loadRecording(named, Number(values.nth));
|
|
232
259
|
const events = kept.events;
|
|
@@ -271,9 +298,10 @@ async function run(named, values) {
|
|
|
271
298
|
if (replay !== void 0) console.log(`replays at ${replay} (add ?t=<seconds> to open it paused there)`);
|
|
272
299
|
if (shown.length < timeline.length) console.log(`${shown.length} of its ${timeline.length} lines, as asked`);
|
|
273
300
|
console.log();
|
|
274
|
-
const
|
|
301
|
+
const short = shortener(kept.page);
|
|
302
|
+
const under = (line) => console.log(`${" ".repeat(22)}${short(line)}`);
|
|
275
303
|
for (const e of shown) {
|
|
276
|
-
console.log(`${e.at.padStart(6)} ${e.kind.padEnd(13)} ${e.text}`);
|
|
304
|
+
console.log(`${e.at.padStart(6)} ${e.kind.padEnd(13)} ${short(e.text)}`);
|
|
277
305
|
if (e.trace && (values.full === true || e.problem === true)) for (const line of values.full ? e.trace : e.trace.slice(0, 5)) under(`at ${line}`);
|
|
278
306
|
if (values.full !== true || e.request === void 0) continue;
|
|
279
307
|
const r = e.request;
|