@aperture-browser/session-client 0.0.0-nightly.153.6c19cc53471e → 0.0.0-nightly.156.86df3ffe328b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,6 +32,6 @@ detach();
32
32
  session.close();
33
33
  ```
34
34
 
35
- `getSnapshot` and `subscribe` are a store, as `useSyncExternalStore` takes one. What is sent over the session socket is not answered: its effect shows in the snapshot. The session's HTTP routes (`recordings`, `screenshots`, `upload`, `storageState`) return promises that reject with `SessionError`.
35
+ `getSnapshot` and `subscribe` are a store, as `useSyncExternalStore` takes one. What is sent over the session socket is not answered: its effect shows in the snapshot. The session's HTTP routes (`recordings`, `pace`, `screenshots`, `upload`, `storageState`) return promises that reject with `SessionError`.
36
36
 
37
37
  `@aperture-browser/session-client/effect` has the same client as an Effect service, with the generated protocol messages.
package/dist/effect.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as QUALITIES, A as ClipboardForm, B as LEASE_ACTIONS, Ct as Address, D as ALONGS, E as http_d_exports, F as Failure, G as PAGE_MODES, H as Member, I as Features, J as Picture, K as PIXELS, L as FileRequest, M as Download, N as DownloadState, O as Along, P as FORMATS, Q as Presence, R as Grant, St as SessionError, U as Menu, V as LeaseAction, W as NO_FEATURES, X as PictureWay, Y as PictureSettings, Z as PointerMark, _t as qualityOf, a as PictureChange, at as Target, bt as targetOf, c as SnapshotStore, ct as VideoStatus, d as Surfaces, dt as featuresOf, et as Role, f as KEYS, ft as fileRequestOf, gt as presenceOf, ht as pointerOf, i as GoOptions, it as StrokePoint, j as Connection, k as ClipboardEvent, l as layer, lt as downloadOf, mt as menuOf, n as Destination, nt as Snapshot, o as Session, ot as VideoFormat, pt as formatOf, q as PageMode, rt as StrokePhase, s as SessionService, st as VideoQuality, t as ConnectOptions, tt as STROKE_PHASE, u as make, ut as failureOf, vt as statusOf, xt as live_pb_d_exports, yt as strokeOf, z as HeldTab } from "./session-5_K8VTRJ.js";
2
- export { type ALONGS, type Address, type Along, type ClipboardEvent, type ClipboardForm, type ConnectOptions, type Connection, type Destination, type Download, type DownloadState, type FORMATS, type Failure, type Features, type FileRequest, type GoOptions, type Grant, type HeldTab, KEYS, type LEASE_ACTIONS, type LeaseAction, type Member, type Menu, type NO_FEATURES, type PAGE_MODES, type PIXELS, type PageMode, type Picture, type PictureChange, type PictureSettings, type PictureWay, type PointerMark, type Presence, type QUALITIES, type Role, type STROKE_PHASE, Session, SessionError, http_d_exports as SessionHttp, type SessionService, type Snapshot, type SnapshotStore, type StrokePhase, type StrokePoint, type Surfaces, type Target, type VideoFormat, type VideoQuality, type VideoStatus, type downloadOf, type failureOf, type featuresOf, type fileRequestOf, type formatOf, layer, make, type menuOf, type pointerOf, type presenceOf, live_pb_d_exports as proto, type qualityOf, type statusOf, type strokeOf, type targetOf };
1
+ import { $ as PointerMark, A as ClipboardEvent, B as HeldTab, Ct as targetOf, D as http_d_exports, Et as Address, F as FORMATS, G as NO_FEATURES, H as LeaseAction, I as Failure, J as Pace, K as PAGE_MODES, L as Features, M as Connection, N as Download, O as ALONGS, P as DownloadState, Q as PictureWay, R as FileRequest, St as strokeOf, Tt as SessionError, U as Member, V as LEASE_ACTIONS, W as Menu, X as Picture, Y as PageMode, Z as PictureSettings, _t as paceOf, a as PictureChange, at as StrokePhase, bt as qualityOf, c as SnapshotStore, ct as VideoFormat, d as Surfaces, dt as downloadOf, et as Presence, f as KEYS, ft as failureOf, gt as menuOf, ht as formatOf, i as GoOptions, it as Snapshot, j as ClipboardForm, k as Along, l as layer, lt as VideoQuality, mt as fileRequestOf, n as Destination, nt as Role, o as Session, ot as StrokePoint, pt as featuresOf, q as PIXELS, rt as STROKE_PHASE, s as SessionService, st as Target, t as ConnectOptions, tt as QUALITIES, u as make, ut as VideoStatus, vt as pointerOf, wt as live_pb_d_exports, xt as statusOf, yt as presenceOf, z as Grant } from "./session-C6Huw03i.js";
2
+ export { type ALONGS, type Address, type Along, type ClipboardEvent, type ClipboardForm, type ConnectOptions, type Connection, type Destination, type Download, type DownloadState, type FORMATS, type Failure, type Features, type FileRequest, type GoOptions, type Grant, type HeldTab, KEYS, type LEASE_ACTIONS, type LeaseAction, type Member, type Menu, type NO_FEATURES, type PAGE_MODES, type PIXELS, type Pace, type PageMode, type Picture, type PictureChange, type PictureSettings, type PictureWay, type PointerMark, type Presence, type QUALITIES, type Role, type STROKE_PHASE, Session, SessionError, http_d_exports as SessionHttp, type SessionService, type Snapshot, type SnapshotStore, type StrokePhase, type StrokePoint, type Surfaces, type Target, type VideoFormat, type VideoQuality, type VideoStatus, type downloadOf, type failureOf, type featuresOf, type fileRequestOf, type formatOf, layer, make, type menuOf, type paceOf, type pointerOf, type presenceOf, live_pb_d_exports as proto, type qualityOf, type statusOf, type strokeOf, type targetOf };
package/dist/effect.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as live_pb_exports, i as KEYS, n as layer, o as http_exports, r as make, s as SessionError, t as Session } from "./session-C7RtpAVE.js";
1
+ import { a as live_pb_exports, i as KEYS, n as layer, o as http_exports, r as make, s as SessionError, t as Session } from "./session-atG-NDq1.js";
2
2
  export { KEYS, Session, SessionError, http_exports as SessionHttp, layer, make, live_pb_exports as proto };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as ClipboardForm, C as UploadProgress, F as Failure, H as Member, I as Features, J as Picture, L as FileRequest, M as Download, N as DownloadState, O as Along, Q as Presence, R as Grant, S as StorageStateAsked, St as SessionError, T as ViewportSize, U as Menu, V as LeaseAction, X as PictureWay, Y as PictureSettings, Z as PointerMark, _ as RecordingOptions, a as PictureChange, at as Target, b as StateCookie, ct as VideoStatus, d as Surfaces, et as Role, g as RecordingEdit, h as RecordingBurst, i as GoOptions, it as StrokePoint, j as Connection, k as ClipboardEvent, m as RecordingAnnotation, n as Destination, nt as Snapshot, ot as VideoFormat, p as Recording, q as PageMode, r as FitOptions, rt as StrokePhase, st as VideoQuality, t as ConnectOptions, v as Screenshot, w as Uploaded, x as StorageState, y as StartRecording, z as HeldTab } from "./session-5_K8VTRJ.js";
1
+ import { $ as PointerMark, A as ClipboardEvent, B as HeldTab, C as StorageStateAsked, E as ViewportSize, H as LeaseAction, I as Failure, J as Pace, L as Features, M as Connection, N as Download, P as DownloadState, Q as PictureWay, R as FileRequest, S as StorageState, T as Uploaded, Tt as SessionError, U as Member, W as Menu, X as Picture, Y as PageMode, Z as PictureSettings, _ as RecordingEdit, a as PictureChange, at as StrokePhase, b as StartRecording, ct as VideoFormat, d as Surfaces, et as Presence, g as RecordingBurst, h as RecordingAnnotation, i as GoOptions, it as Snapshot, j as ClipboardForm, k as Along, lt as VideoQuality, m as Recording, n as Destination, nt as Role, ot as StrokePoint, p as EditRecording, r as FitOptions, st as Target, t as ConnectOptions, ut as VideoStatus, v as RecordingOptions, w as UploadProgress, x as StateCookie, y as Screenshot, z as Grant } from "./session-C6Huw03i.js";
2
2
 
3
3
  //#region src/index.d.ts
4
4
  /**
@@ -123,8 +123,9 @@ interface Session {
123
123
  readonly recordings: {
124
124
  readonly list: () => Promise<Recording[]>;
125
125
  readonly get: (id: string) => Promise<Recording>;
126
- readonly start: (options?: StartRecording) => Promise<Recording>;
127
- readonly stop: (id: string) => Promise<Recording>; /** Has a running recording go on with another tab. */
126
+ readonly start: (options?: StartRecording) => Promise<Recording>; /** Stops a recording; its edit is made with `options`. */
127
+ readonly stop: (id: string, options?: EditRecording) => Promise<Recording>; /** Makes the edit of a stopped recording again, with other options. */
128
+ readonly edit: (id: string, options?: EditRecording) => Promise<Recording>; /** Has a running recording go on with another tab. */
128
129
  readonly retarget: (id: string, tab: number) => Promise<Recording>; /** Adds an annotation to the recording named, or to the only one that runs. */
129
130
  readonly annotate: (annotation: RecordingAnnotation, id?: string) => Promise<void>;
130
131
  };
@@ -133,6 +134,11 @@ interface Session {
133
134
  readonly export: (asked?: StorageStateAsked) => Promise<StorageState>;
134
135
  readonly import: (state: StorageState) => Promise<void>;
135
136
  };
137
+ /** How the session's automation moves the pointer in what is recorded. */
138
+ readonly pace: {
139
+ readonly get: () => Promise<Pace>;
140
+ readonly set: (pace: Pace) => Promise<Pace>;
141
+ };
136
142
  readonly screenshots: {
137
143
  readonly list: () => Promise<Screenshot[]>; /** Takes one of a tab, the newest when none is named, and keeps it in the files. */
138
144
  readonly take: (tab?: number) => Promise<Screenshot>;
@@ -143,5 +149,5 @@ interface Session {
143
149
  /** Connects to a session at once; the snapshot tells how far the connection is. */
144
150
  declare const connect: (options: ConnectOptions) => Session;
145
151
  //#endregion
146
- export { type Along, type ClipboardEvent, type ClipboardForm, type ConnectOptions, type Connection, type Destination, type Download, type DownloadState, type Failure, type Features, type FileRequest, type FitOptions, type GoOptions, type Grant, type HeldTab, type LeaseAction, type Member, type Menu, type PageMode, type Picture, type PictureChange, type PictureSettings, type PictureWay, type PointerMark, type Presence, type Recording, type RecordingAnnotation, type RecordingBurst, type RecordingEdit, type RecordingOptions, type Role, type Screenshot, Session, SessionError, type Snapshot, type StartRecording, type StateCookie, type StorageState, type StorageStateAsked, type StrokePhase, type StrokePoint, type Surfaces, type Target, type UploadProgress, type Uploaded, type VideoFormat, type VideoQuality, type VideoStatus, type ViewportSize, connect };
152
+ export { type Along, type ClipboardEvent, type ClipboardForm, type ConnectOptions, type Connection, type Destination, type Download, type DownloadState, type EditRecording, type Failure, type Features, type FileRequest, type FitOptions, type GoOptions, type Grant, type HeldTab, type LeaseAction, type Member, type Menu, type Pace, type PageMode, type Picture, type PictureChange, type PictureSettings, type PictureWay, type PointerMark, type Presence, type Recording, type RecordingAnnotation, type RecordingBurst, type RecordingEdit, type RecordingOptions, type Role, type Screenshot, Session, SessionError, type Snapshot, type StartRecording, type StateCookie, type StorageState, type StorageStateAsked, type StrokePhase, type StrokePoint, type Surfaces, type Target, type UploadProgress, type Uploaded, type VideoFormat, type VideoQuality, type VideoStatus, type ViewportSize, connect };
147
153
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as make, s as SessionError } from "./session-C7RtpAVE.js";
1
+ import { r as make, s as SessionError } from "./session-atG-NDq1.js";
2
2
  import * as Effect from "effect/Effect";
3
3
  import * as Exit from "effect/Exit";
4
4
  import * as Scope from "effect/Scope";
@@ -54,7 +54,8 @@ const connect = (options) => {
54
54
  list: () => promised(session.recordings.list),
55
55
  get: (id) => promised(session.recordings.get(id)),
56
56
  start: (started) => promised(session.recordings.start(started)),
57
- stop: (id) => promised(session.recordings.stop(id)),
57
+ stop: (id, options) => promised(session.recordings.stop(id, options)),
58
+ edit: (id, options) => promised(session.recordings.edit(id, options)),
58
59
  retarget: (id, tab) => promised(session.recordings.retarget(id, tab)),
59
60
  annotate: (annotation, id) => promised(session.recordings.annotate(annotation, id))
60
61
  },
@@ -62,6 +63,10 @@ const connect = (options) => {
62
63
  export: (asked) => promised(session.storageState.export(asked)),
63
64
  import: (state) => promised(session.storageState.import(state))
64
65
  },
66
+ pace: {
67
+ get: () => promised(session.pace.get),
68
+ set: (pace) => promised(session.pace.set(pace))
69
+ },
65
70
  screenshots: {
66
71
  list: () => promised(session.screenshots.list),
67
72
  take: (tab) => promised(session.screenshots.take(tab))
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Scope from \"effect/Scope\";\nimport type {\n Recording,\n RecordingAnnotation,\n Screenshot,\n StartRecording,\n StorageState,\n StorageStateAsked,\n Uploaded,\n UploadProgress,\n ViewportSize,\n} from \"./http.ts\";\nimport type { Surfaces } from \"./input.ts\";\nimport type {\n ClipboardEvent,\n ClipboardForm,\n Failure,\n LeaseAction,\n PageMode,\n PointerMark,\n Snapshot,\n StrokePhase,\n StrokePoint,\n Target,\n} from \"./model.ts\";\nimport {\n type ConnectOptions,\n type Destination,\n type FitOptions,\n type GoOptions,\n make,\n type PictureChange,\n} from \"./session.ts\";\n\nexport { SessionError } from \"./errors.ts\";\nexport type {\n Recording,\n RecordingAnnotation,\n RecordingBurst,\n RecordingEdit,\n RecordingOptions,\n Screenshot,\n StartRecording,\n StateCookie,\n StorageState,\n StorageStateAsked,\n Uploaded,\n UploadProgress,\n ViewportSize,\n} from \"./http.ts\";\nexport type { Surfaces } from \"./input.ts\";\nexport type {\n Along,\n ClipboardEvent,\n ClipboardForm,\n Connection,\n Download,\n DownloadState,\n Failure,\n Features,\n Grant,\n FileRequest,\n HeldTab,\n LeaseAction,\n PageMode,\n PointerMark,\n StrokePhase,\n StrokePoint,\n Member,\n Menu,\n Picture,\n PictureSettings,\n PictureWay,\n Presence,\n Role,\n Snapshot,\n Target,\n VideoFormat,\n VideoQuality,\n VideoStatus,\n} from \"./model.ts\";\nexport type {\n ConnectOptions,\n Destination,\n FitOptions,\n GoOptions,\n PictureChange,\n} from \"./session.ts\";\n\n/**\n * One session, watched and controlled. Its requests reject with `SessionError`; what goes\n * over the session socket is not answered, and shows in the snapshot when it took effect.\n */\nexport interface Session {\n /** Referentially stable until something changes. */\n readonly getSnapshot: () => Snapshot;\n readonly subscribe: (listener: () => void) => () => void;\n\n /** Watches a tab, named by its number. */\n readonly select: (tab: number) => void;\n readonly go: (to: Destination, options?: GoOptions) => void;\n readonly newTab: () => void;\n readonly closeTab: (tab: number) => void;\n /**\n * `fit` has the watched target's viewport follow the attached stage's size. With\n * `whenFree` the fitting waits until the tab is this member's to size: until it holds the\n * tab, or nobody holds it and nobody else watches it.\n */\n readonly setViewport: (viewport: ViewportSize | \"fit\", options?: FitOptions) => void;\n /** Gives the watched target another scale and leaves its size, fitted or not, as it is. */\n readonly setScale: (scale: number) => void;\n /**\n * Sets how the watched tab's pages are shown, for a member that holds the tab. Where\n * that changes how they are shown, the page loads again.\n */\n readonly setMode: (mode: PageMode) => void;\n /**\n * Changes how the picture comes. A key that is left out keeps what it has; one that is\n * there and undefined leaves the choice to the session again.\n */\n readonly setPicture: (change: PictureChange) => void;\n /**\n * Mutes a tab for this client, or lets it be heard again. A tab is heard while it is\n * watched, once the browser lets a page play sound: after the first click or key.\n */\n readonly setMuted: (tab: number, muted: boolean) => void;\n readonly lease: (action: LeaseAction) => void;\n /**\n * Shows the picture in `video` or `canvas`, whichever `picture.way` needs, and takes\n * the pointer, the wheel, the keyboard, input methods, the clipboard and what is\n * dropped on them. Gives what detaches them. One set of surfaces at a time.\n */\n readonly attach: (surfaces: Surfaces) => () => void;\n /** Gives the keyboard to the session, as a click on the picture does. */\n readonly focus: () => void;\n readonly dismissMenu: () => void;\n /** Asks for a picture the watched page shows; it comes as what the session copied. */\n readonly copyPicture: (url: string) => void;\n /** Puts content on the session's clipboard, for a paste there to take. */\n readonly writeClipboard: (forms: readonly ClipboardForm[]) => void;\n /**\n * What is copied in the session. This browser's clipboard was offered it before the\n * listener hears of it, and `written` tells whether it took it.\n */\n readonly onClipboard: (listener: (event: ClipboardEvent) => void) => () => void;\n /**\n * What this client asked for with `go`, `closeTab`, `copyPicture` or `chooseFiles` and\n * the session did not do, with the reason.\n */\n readonly onFailure: (listener: (failure: Failure) => void) => () => void;\n /**\n * A finger moved the watched tab's page, by this much of the target's pixels each time:\n * down the page where `y` is more than nothing. It tells what the finger did, whether\n * or not the page had anywhere to go.\n */\n readonly onDragged: (\n listener: (by: { readonly x: number; readonly y: number }) => void,\n ) => () => void;\n /** Where the other members' pointers are on the watched tab, as they move. */\n readonly onPointer: (listener: (pointer: PointerMark) => void) => () => void;\n /** The strokes the other members draw over the watched tab, point by point. */\n readonly onStroke: (listener: (point: StrokePoint) => void) => () => void;\n /** Follows a member to whichever tab it watches; nobody when left out. */\n readonly follow: (member?: number) => void;\n /** Shows the others a point of a stroke over the watched tab, in its logical pixels. */\n readonly draw: (\n stroke: number,\n phase: StrokePhase,\n at: { readonly x: number; readonly y: number },\n ) => void;\n /** Shows the others where this pointer is while it gives no input; nowhere when left out. */\n readonly point: (at?: { readonly x: number; readonly y: number }) => void;\n /**\n * Pastes into the session: the forms given, or what this browser's clipboard has where\n * a page may read it. False when there was nothing to paste.\n */\n readonly paste: (forms?: readonly ClipboardForm[]) => Promise<boolean>;\n /** Copies what is selected in the session; it comes as what the session copied. */\n readonly copySelection: () => void;\n readonly selectAll: () => void;\n /**\n * Puts content on this browser's clipboard from a click, for what the session copied\n * and the clipboard did not take by itself: text is copied, a picture opens to be\n * copied by hand.\n */\n readonly copyHere: (forms: readonly ClipboardForm[]) => Promise<boolean>;\n\n readonly upload: (\n file: File,\n onProgress?: (progress: UploadProgress) => void,\n ) => Promise<Uploaded>;\n readonly uploads: () => Promise<Uploaded[]>;\n readonly removeUpload: (name: string) => Promise<void>;\n /** Answers a page's request for files with uploads, by name; with none it is dismissed. */\n readonly chooseFiles: (request: number, names: readonly string[]) => void;\n /** An authenticated URL of one of the session's files, such as `downloads/<name>`. */\n readonly fileUrl: (path: string) => string;\n /** The tab as it looks now; `width` asks for a smaller picture, that many pixels wide. */\n readonly screenshotUrl: (tab: number, width?: number) => string;\n /**\n * The tab as it looked a moment ago, small: for a list of the tabs. The session makes\n * one in a while, however often it is asked.\n */\n readonly previewUrl: (tab: number) => string;\n /**\n * The icon of the target's page, which the session fetches as its browser does anything\n * else of the page: the page's site is told nothing of who watches. None for a page\n * that is not of the web.\n */\n readonly faviconUrl: (target: Target) => string | undefined;\n readonly recordings: {\n readonly list: () => Promise<Recording[]>;\n readonly get: (id: string) => Promise<Recording>;\n readonly start: (options?: StartRecording) => Promise<Recording>;\n readonly stop: (id: string) => Promise<Recording>;\n /** Has a running recording go on with another tab. */\n readonly retarget: (id: string, tab: number) => Promise<Recording>;\n /** Adds an annotation to the recording named, or to the only one that runs. */\n readonly annotate: (annotation: RecordingAnnotation, id?: string) => Promise<void>;\n };\n /** The cookies and local storage of the session's browser, for whoever runs the session. */\n readonly storageState: {\n readonly export: (asked?: StorageStateAsked) => Promise<StorageState>;\n readonly import: (state: StorageState) => Promise<void>;\n };\n readonly screenshots: {\n readonly list: () => Promise<Screenshot[]>;\n /** Takes one of a tab, the newest when none is named, and keeps it in the files. */\n readonly take: (tab?: number) => Promise<Screenshot>;\n };\n /** Ends the session's client: what is attached, the picture, the sound, the socket. */\n readonly close: () => void;\n}\n\nconst promised = <A, E>(effect: Effect.Effect<A, E>) => Effect.runPromise(effect);\n\n/** Connects to a session at once; the snapshot tells how far the connection is. */\nexport const connect = (options: ConnectOptions): Session => {\n const scope = Scope.makeUnsafe();\n const session = Effect.runSync(Scope.provide(make(options), scope));\n\n return {\n getSnapshot: session.store.get,\n subscribe: session.store.subscribe,\n select: (tab) => Effect.runSync(session.select(tab)),\n go: (to, given) => Effect.runSync(session.go(to, given)),\n newTab: () => Effect.runSync(session.newTab),\n closeTab: (tab) => Effect.runSync(session.closeTab(tab)),\n setViewport: (viewport, options) => Effect.runSync(session.setViewport(viewport, options)),\n setScale: (scale) => Effect.runSync(session.setScale(scale)),\n setMode: (mode) => Effect.runSync(session.setMode(mode)),\n setPicture: (change) => Effect.runSync(session.setPicture(change)),\n setMuted: (tab, muted) => Effect.runSync(session.setMuted(tab, muted)),\n lease: (action) => Effect.runSync(session.lease(action)),\n attach: (surfaces) => {\n const attached = Scope.forkUnsafe(scope);\n Effect.runSync(Scope.provide(session.attach(surfaces), attached));\n return () => Effect.runSync(Scope.close(attached, Exit.void));\n },\n focus: () => Effect.runSync(session.focus),\n dismissMenu: () => Effect.runSync(session.dismissMenu),\n copyPicture: (url) => Effect.runSync(session.copyPicture(url)),\n writeClipboard: (forms) => Effect.runSync(session.writeClipboard(forms)),\n onClipboard: session.onClipboard,\n onFailure: session.onFailure,\n onDragged: session.onDragged,\n onPointer: session.onPointer,\n onStroke: session.onStroke,\n follow: (member) => Effect.runSync(session.follow(member)),\n draw: (stroke, phase, at) => Effect.runSync(session.draw(stroke, phase, at)),\n point: (at) => Effect.runSync(session.point(at)),\n paste: (forms) => promised(session.paste(forms)),\n copySelection: () => Effect.runSync(session.copySelection),\n selectAll: () => Effect.runSync(session.selectAll),\n copyHere: (forms) => promised(session.copyHere(forms)),\n upload: (file, onProgress) => promised(session.upload(file, onProgress)),\n uploads: () => promised(session.uploads),\n removeUpload: (name) => promised(session.removeUpload(name)),\n chooseFiles: (request, names) => Effect.runSync(session.chooseFiles(request, names)),\n fileUrl: session.fileUrl,\n screenshotUrl: session.screenshotUrl,\n previewUrl: session.previewUrl,\n faviconUrl: session.faviconUrl,\n recordings: {\n list: () => promised(session.recordings.list),\n get: (id) => promised(session.recordings.get(id)),\n start: (started) => promised(session.recordings.start(started)),\n stop: (id) => promised(session.recordings.stop(id)),\n retarget: (id, tab) => promised(session.recordings.retarget(id, tab)),\n annotate: (annotation, id) => promised(session.recordings.annotate(annotation, id)),\n },\n storageState: {\n export: (asked) => promised(session.storageState.export(asked)),\n import: (state) => promised(session.storageState.import(state)),\n },\n screenshots: {\n list: () => promised(session.screenshots.list),\n take: (tab) => promised(session.screenshots.take(tab)),\n },\n close: () => {\n Effect.runFork(Scope.close(scope, Exit.void));\n },\n };\n};\n"],"mappings":";;;;;AA4OA,MAAM,YAAkB,WAAgC,OAAO,WAAW,MAAM;;AAGhF,MAAa,WAAW,YAAqC;CAC3D,MAAM,QAAQ,MAAM,WAAW;CAC/B,MAAM,UAAU,OAAO,QAAQ,MAAM,QAAQ,KAAK,OAAO,GAAG,KAAK,CAAC;CAElE,OAAO;EACL,aAAa,QAAQ,MAAM;EAC3B,WAAW,QAAQ,MAAM;EACzB,SAAS,QAAQ,OAAO,QAAQ,QAAQ,OAAO,GAAG,CAAC;EACnD,KAAK,IAAI,UAAU,OAAO,QAAQ,QAAQ,GAAG,IAAI,KAAK,CAAC;EACvD,cAAc,OAAO,QAAQ,QAAQ,MAAM;EAC3C,WAAW,QAAQ,OAAO,QAAQ,QAAQ,SAAS,GAAG,CAAC;EACvD,cAAc,UAAU,YAAY,OAAO,QAAQ,QAAQ,YAAY,UAAU,OAAO,CAAC;EACzF,WAAW,UAAU,OAAO,QAAQ,QAAQ,SAAS,KAAK,CAAC;EAC3D,UAAU,SAAS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AC;EAC3D,cAAc,SAAS,UAAU,OAAO,QAAQ,QAAQ,YAAY,SAAS,KAAK,CAAC;EACnF,SAAS,QAAQ;EACjB,eAAe,QAAQ;EACvB,YAAY,QAAQ;EACpB,YAAY,QAAQ;EACpB,YAAY;GACV,YAAY,SAAS,QAAQ,WAAW,IAAI;GAC5C,MAAM,OAAO,SAAS,QAAQ,WAAW,IAAI,EAAE,CAAC;GAChD,QAAQ,YAAY,SAAS,QAAQ,WAAW,MAAM,OAAO,CAAC;GAC9D,OAAO,OAAO,SAAS,QAAQ,WAAW,KAAK,EAAE,CAAC;GAClD,WAAW,IAAI,QAAQ,SAAS,QAAQ,WAAW,SAAS,IAAI,GAAG,CAAC;GACpE,WAAW,YAAY,OAAO,SAAS,QAAQ,WAAW,SAAS,YAAY,EAAE,CAAC;EACpF;EACA,cAAc;GACZ,SAAS,UAAU,SAAS,QAAQ,aAAa,OAAO,KAAK,CAAC;GAC9D,SAAS,UAAU,SAAS,QAAQ,aAAa,OAAO,KAAK,CAAC;EAChE;EACA,aAAa;GACX,YAAY,SAAS,QAAQ,YAAY,IAAI;GAC7C,OAAO,QAAQ,SAAS,QAAQ,YAAY,KAAK,GAAG,CAAC;EACvD;EACA,aAAa;GACX,OAAO,QAAQ,MAAM,MAAM,OAAO,KAAK,IAAI,CAAC;EAC9C;CACF;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Scope from \"effect/Scope\";\nimport type {\n EditRecording,\n Recording,\n RecordingAnnotation,\n Screenshot,\n StartRecording,\n StorageState,\n StorageStateAsked,\n Uploaded,\n UploadProgress,\n ViewportSize,\n} from \"./http.ts\";\nimport type { Surfaces } from \"./input.ts\";\nimport type {\n ClipboardEvent,\n ClipboardForm,\n Failure,\n LeaseAction,\n Pace,\n PageMode,\n PointerMark,\n Snapshot,\n StrokePhase,\n StrokePoint,\n Target,\n} from \"./model.ts\";\nimport {\n type ConnectOptions,\n type Destination,\n type FitOptions,\n type GoOptions,\n make,\n type PictureChange,\n} from \"./session.ts\";\n\nexport { SessionError } from \"./errors.ts\";\nexport type {\n EditRecording,\n Recording,\n RecordingAnnotation,\n RecordingBurst,\n RecordingEdit,\n RecordingOptions,\n Screenshot,\n StartRecording,\n StateCookie,\n StorageState,\n StorageStateAsked,\n Uploaded,\n UploadProgress,\n ViewportSize,\n} from \"./http.ts\";\nexport type { Surfaces } from \"./input.ts\";\nexport type {\n Along,\n ClipboardEvent,\n ClipboardForm,\n Connection,\n Download,\n DownloadState,\n Failure,\n Features,\n Pace,\n Grant,\n FileRequest,\n HeldTab,\n LeaseAction,\n PageMode,\n PointerMark,\n StrokePhase,\n StrokePoint,\n Member,\n Menu,\n Picture,\n PictureSettings,\n PictureWay,\n Presence,\n Role,\n Snapshot,\n Target,\n VideoFormat,\n VideoQuality,\n VideoStatus,\n} from \"./model.ts\";\nexport type {\n ConnectOptions,\n Destination,\n FitOptions,\n GoOptions,\n PictureChange,\n} from \"./session.ts\";\n\n/**\n * One session, watched and controlled. Its requests reject with `SessionError`; what goes\n * over the session socket is not answered, and shows in the snapshot when it took effect.\n */\nexport interface Session {\n /** Referentially stable until something changes. */\n readonly getSnapshot: () => Snapshot;\n readonly subscribe: (listener: () => void) => () => void;\n\n /** Watches a tab, named by its number. */\n readonly select: (tab: number) => void;\n readonly go: (to: Destination, options?: GoOptions) => void;\n readonly newTab: () => void;\n readonly closeTab: (tab: number) => void;\n /**\n * `fit` has the watched target's viewport follow the attached stage's size. With\n * `whenFree` the fitting waits until the tab is this member's to size: until it holds the\n * tab, or nobody holds it and nobody else watches it.\n */\n readonly setViewport: (viewport: ViewportSize | \"fit\", options?: FitOptions) => void;\n /** Gives the watched target another scale and leaves its size, fitted or not, as it is. */\n readonly setScale: (scale: number) => void;\n /**\n * Sets how the watched tab's pages are shown, for a member that holds the tab. Where\n * that changes how they are shown, the page loads again.\n */\n readonly setMode: (mode: PageMode) => void;\n /**\n * Changes how the picture comes. A key that is left out keeps what it has; one that is\n * there and undefined leaves the choice to the session again.\n */\n readonly setPicture: (change: PictureChange) => void;\n /**\n * Mutes a tab for this client, or lets it be heard again. A tab is heard while it is\n * watched, once the browser lets a page play sound: after the first click or key.\n */\n readonly setMuted: (tab: number, muted: boolean) => void;\n readonly lease: (action: LeaseAction) => void;\n /**\n * Shows the picture in `video` or `canvas`, whichever `picture.way` needs, and takes\n * the pointer, the wheel, the keyboard, input methods, the clipboard and what is\n * dropped on them. Gives what detaches them. One set of surfaces at a time.\n */\n readonly attach: (surfaces: Surfaces) => () => void;\n /** Gives the keyboard to the session, as a click on the picture does. */\n readonly focus: () => void;\n readonly dismissMenu: () => void;\n /** Asks for a picture the watched page shows; it comes as what the session copied. */\n readonly copyPicture: (url: string) => void;\n /** Puts content on the session's clipboard, for a paste there to take. */\n readonly writeClipboard: (forms: readonly ClipboardForm[]) => void;\n /**\n * What is copied in the session. This browser's clipboard was offered it before the\n * listener hears of it, and `written` tells whether it took it.\n */\n readonly onClipboard: (listener: (event: ClipboardEvent) => void) => () => void;\n /**\n * What this client asked for with `go`, `closeTab`, `copyPicture` or `chooseFiles` and\n * the session did not do, with the reason.\n */\n readonly onFailure: (listener: (failure: Failure) => void) => () => void;\n /**\n * A finger moved the watched tab's page, by this much of the target's pixels each time:\n * down the page where `y` is more than nothing. It tells what the finger did, whether\n * or not the page had anywhere to go.\n */\n readonly onDragged: (\n listener: (by: { readonly x: number; readonly y: number }) => void,\n ) => () => void;\n /** Where the other members' pointers are on the watched tab, as they move. */\n readonly onPointer: (listener: (pointer: PointerMark) => void) => () => void;\n /** The strokes the other members draw over the watched tab, point by point. */\n readonly onStroke: (listener: (point: StrokePoint) => void) => () => void;\n /** Follows a member to whichever tab it watches; nobody when left out. */\n readonly follow: (member?: number) => void;\n /** Shows the others a point of a stroke over the watched tab, in its logical pixels. */\n readonly draw: (\n stroke: number,\n phase: StrokePhase,\n at: { readonly x: number; readonly y: number },\n ) => void;\n /** Shows the others where this pointer is while it gives no input; nowhere when left out. */\n readonly point: (at?: { readonly x: number; readonly y: number }) => void;\n /**\n * Pastes into the session: the forms given, or what this browser's clipboard has where\n * a page may read it. False when there was nothing to paste.\n */\n readonly paste: (forms?: readonly ClipboardForm[]) => Promise<boolean>;\n /** Copies what is selected in the session; it comes as what the session copied. */\n readonly copySelection: () => void;\n readonly selectAll: () => void;\n /**\n * Puts content on this browser's clipboard from a click, for what the session copied\n * and the clipboard did not take by itself: text is copied, a picture opens to be\n * copied by hand.\n */\n readonly copyHere: (forms: readonly ClipboardForm[]) => Promise<boolean>;\n\n readonly upload: (\n file: File,\n onProgress?: (progress: UploadProgress) => void,\n ) => Promise<Uploaded>;\n readonly uploads: () => Promise<Uploaded[]>;\n readonly removeUpload: (name: string) => Promise<void>;\n /** Answers a page's request for files with uploads, by name; with none it is dismissed. */\n readonly chooseFiles: (request: number, names: readonly string[]) => void;\n /** An authenticated URL of one of the session's files, such as `downloads/<name>`. */\n readonly fileUrl: (path: string) => string;\n /** The tab as it looks now; `width` asks for a smaller picture, that many pixels wide. */\n readonly screenshotUrl: (tab: number, width?: number) => string;\n /**\n * The tab as it looked a moment ago, small: for a list of the tabs. The session makes\n * one in a while, however often it is asked.\n */\n readonly previewUrl: (tab: number) => string;\n /**\n * The icon of the target's page, which the session fetches as its browser does anything\n * else of the page: the page's site is told nothing of who watches. None for a page\n * that is not of the web.\n */\n readonly faviconUrl: (target: Target) => string | undefined;\n readonly recordings: {\n readonly list: () => Promise<Recording[]>;\n readonly get: (id: string) => Promise<Recording>;\n readonly start: (options?: StartRecording) => Promise<Recording>;\n /** Stops a recording; its edit is made with `options`. */\n readonly stop: (id: string, options?: EditRecording) => Promise<Recording>;\n /** Makes the edit of a stopped recording again, with other options. */\n readonly edit: (id: string, options?: EditRecording) => Promise<Recording>;\n /** Has a running recording go on with another tab. */\n readonly retarget: (id: string, tab: number) => Promise<Recording>;\n /** Adds an annotation to the recording named, or to the only one that runs. */\n readonly annotate: (annotation: RecordingAnnotation, id?: string) => Promise<void>;\n };\n /** The cookies and local storage of the session's browser, for whoever runs the session. */\n readonly storageState: {\n readonly export: (asked?: StorageStateAsked) => Promise<StorageState>;\n readonly import: (state: StorageState) => Promise<void>;\n };\n /** How the session's automation moves the pointer in what is recorded. */\n readonly pace: {\n readonly get: () => Promise<Pace>;\n readonly set: (pace: Pace) => Promise<Pace>;\n };\n readonly screenshots: {\n readonly list: () => Promise<Screenshot[]>;\n /** Takes one of a tab, the newest when none is named, and keeps it in the files. */\n readonly take: (tab?: number) => Promise<Screenshot>;\n };\n /** Ends the session's client: what is attached, the picture, the sound, the socket. */\n readonly close: () => void;\n}\n\nconst promised = <A, E>(effect: Effect.Effect<A, E>) => Effect.runPromise(effect);\n\n/** Connects to a session at once; the snapshot tells how far the connection is. */\nexport const connect = (options: ConnectOptions): Session => {\n const scope = Scope.makeUnsafe();\n const session = Effect.runSync(Scope.provide(make(options), scope));\n\n return {\n getSnapshot: session.store.get,\n subscribe: session.store.subscribe,\n select: (tab) => Effect.runSync(session.select(tab)),\n go: (to, given) => Effect.runSync(session.go(to, given)),\n newTab: () => Effect.runSync(session.newTab),\n closeTab: (tab) => Effect.runSync(session.closeTab(tab)),\n setViewport: (viewport, options) => Effect.runSync(session.setViewport(viewport, options)),\n setScale: (scale) => Effect.runSync(session.setScale(scale)),\n setMode: (mode) => Effect.runSync(session.setMode(mode)),\n setPicture: (change) => Effect.runSync(session.setPicture(change)),\n setMuted: (tab, muted) => Effect.runSync(session.setMuted(tab, muted)),\n lease: (action) => Effect.runSync(session.lease(action)),\n attach: (surfaces) => {\n const attached = Scope.forkUnsafe(scope);\n Effect.runSync(Scope.provide(session.attach(surfaces), attached));\n return () => Effect.runSync(Scope.close(attached, Exit.void));\n },\n focus: () => Effect.runSync(session.focus),\n dismissMenu: () => Effect.runSync(session.dismissMenu),\n copyPicture: (url) => Effect.runSync(session.copyPicture(url)),\n writeClipboard: (forms) => Effect.runSync(session.writeClipboard(forms)),\n onClipboard: session.onClipboard,\n onFailure: session.onFailure,\n onDragged: session.onDragged,\n onPointer: session.onPointer,\n onStroke: session.onStroke,\n follow: (member) => Effect.runSync(session.follow(member)),\n draw: (stroke, phase, at) => Effect.runSync(session.draw(stroke, phase, at)),\n point: (at) => Effect.runSync(session.point(at)),\n paste: (forms) => promised(session.paste(forms)),\n copySelection: () => Effect.runSync(session.copySelection),\n selectAll: () => Effect.runSync(session.selectAll),\n copyHere: (forms) => promised(session.copyHere(forms)),\n upload: (file, onProgress) => promised(session.upload(file, onProgress)),\n uploads: () => promised(session.uploads),\n removeUpload: (name) => promised(session.removeUpload(name)),\n chooseFiles: (request, names) => Effect.runSync(session.chooseFiles(request, names)),\n fileUrl: session.fileUrl,\n screenshotUrl: session.screenshotUrl,\n previewUrl: session.previewUrl,\n faviconUrl: session.faviconUrl,\n recordings: {\n list: () => promised(session.recordings.list),\n get: (id) => promised(session.recordings.get(id)),\n start: (started) => promised(session.recordings.start(started)),\n stop: (id, options) => promised(session.recordings.stop(id, options)),\n edit: (id, options) => promised(session.recordings.edit(id, options)),\n retarget: (id, tab) => promised(session.recordings.retarget(id, tab)),\n annotate: (annotation, id) => promised(session.recordings.annotate(annotation, id)),\n },\n storageState: {\n export: (asked) => promised(session.storageState.export(asked)),\n import: (state) => promised(session.storageState.import(state)),\n },\n pace: {\n get: () => promised(session.pace.get),\n set: (pace) => promised(session.pace.set(pace)),\n },\n screenshots: {\n list: () => promised(session.screenshots.list),\n take: (tab) => promised(session.screenshots.take(tab)),\n },\n close: () => {\n Effect.runFork(Scope.close(scope, Exit.void));\n },\n };\n};\n"],"mappings":";;;;;AAwPA,MAAM,YAAkB,WAAgC,OAAO,WAAW,MAAM;;AAGhF,MAAa,WAAW,YAAqC;CAC3D,MAAM,QAAQ,MAAM,WAAW;CAC/B,MAAM,UAAU,OAAO,QAAQ,MAAM,QAAQ,KAAK,OAAO,GAAG,KAAK,CAAC;CAElE,OAAO;EACL,aAAa,QA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EACA,aAAa;GACX,YAAY,SAAS,QAAQ,YAAY,IAAI;GAC7C,OAAO,QAAQ,SAAS,QAAQ,YAAY,KAAK,GAAG,CAAC;EACvD;EACA,aAAa;GACX,OAAO,QAAQ,MAAM,MAAM,OAAO,KAAK,IAAI,CAAC;EAC9C;CACF;AACF"}
@@ -25,7 +25,7 @@ declare const SessionError_base: Schema.Class<SessionError, Schema.TaggedStruct<
25
25
  /** A request to the session that could not be made, or that the session refused. */
26
26
  declare class SessionError extends SessionError_base {}
27
27
  declare namespace live_pb_d_exports {
28
- export { Along$1 as Along, AlongSchema, Asked, AskedSchema, AudioFrame, AudioFrameSchema, ClientMessage, ClientMessageSchema, Clipboard, ClipboardSchema, Clipboard_Form, Clipboard_FormSchema, Close, CloseSchema, CopyPicture, CopyPictureSchema, Cursor, CursorSchema, Cursor_Hidden, Cursor_HiddenSchema, Device, DeviceSchema, Download$1 as Download, DownloadSchema, DownloadState$1 as DownloadState, DownloadStateSchema, Downloads, DownloadsSchema, Draw, DrawSchema, Drop, DropSchema, Failed, FailedSchema, Features$1 as Features, FeaturesSchema, FileRequest$1 as FileRequest, FileRequestSchema, FileRequests, FileRequestsSchema, FilesChosen, FilesChosenSchema, Follow, FollowSchema, Go, GoSchema, Grant$1 as Grant, GrantSchema, HeldTab$1 as HeldTab, HeldTabSchema, Hello, HelloSchema, Key, KeySchema, Lease, LeaseAction$1 as LeaseAction, LeaseActionSchema, LeaseSchema, Member$1 as Member, MemberSchema, Menu$1 as Menu, MenuSchema, MouseButton, MouseButtonSchema, PageMode$1 as PageMode, PageModeSchema, Pixels, PixelsSchema, Point, PointSchema, Pointer, PointerButton, PointerButtonSchema, PointerLeave, PointerLeaveSchema, PointerMotion, PointerMotionSchema, PointerSchema, PointerScroll, PointerScrollSchema, Pointing, PointingSchema, Presence$1 as Presence, PresenceSchema, Role$1 as Role, RoleSchema, RtcAnswer, RtcAnswerSchema, RtcOffer, RtcOfferSchema, RtcRefused, RtcRefusedSchema, Select, SelectSchema, Selected, SelectedSchema, ServerMessage, ServerMessageSchema, SetMode, SetModeSchema, Stroke, StrokePhase$1 as StrokePhase, StrokePhaseSchema, StrokeSchema, Target$1 as Target, TargetSchema, Targets, TargetsSchema, Text, TextSchema, Tile, TileSchema, VideoFormat$1 as VideoFormat, VideoFormatSchema, VideoFrame, VideoFrameSchema, VideoQuality$1 as VideoQuality, VideoQualitySchema, VideoShown, VideoShownSchema, VideoStatus$1 as VideoStatus, VideoStatusSchema, Viewport, ViewportSchema, file_aperture_live_v1_live };
28
+ export { Along$1 as Along, AlongSchema, Asked, AskedSchema, AudioFrame, AudioFrameSchema, ClientMessage, ClientMessageSchema, Clipboard, ClipboardSchema, Clipboard_Form, Clipboard_FormSchema, Close, CloseSchema, CopyPicture, CopyPictureSchema, Cursor, CursorSchema, Cursor_Hidden, Cursor_HiddenSchema, Device, DeviceSchema, Download$1 as Download, DownloadSchema, DownloadState$1 as DownloadState, DownloadStateSchema, Downloads, DownloadsSchema, Draw, DrawSchema, Drop, DropSchema, Failed, FailedSchema, Features$1 as Features, FeaturesSchema, FileRequest$1 as FileRequest, FileRequestSchema, FileRequests, FileRequestsSchema, FilesChosen, FilesChosenSchema, Follow, FollowSchema, Go, GoSchema, Grant$1 as Grant, GrantSchema, HeldTab$1 as HeldTab, HeldTabSchema, Hello, HelloSchema, Key, KeySchema, Lease, LeaseAction$1 as LeaseAction, LeaseActionSchema, LeaseSchema, Member$1 as Member, MemberSchema, Menu$1 as Menu, MenuSchema, MouseButton, MouseButtonSchema, Pace$1 as Pace, PaceSchema, Paced, PacedSchema, PageMode$1 as PageMode, PageModeSchema, Pixels, PixelsSchema, Point, PointSchema, Pointer, PointerButton, PointerButtonSchema, PointerLeave, PointerLeaveSchema, PointerMotion, PointerMotionSchema, PointerSchema, PointerScroll, PointerScrollSchema, Pointing, PointingSchema, Presence$1 as Presence, PresenceSchema, Role$1 as Role, RoleSchema, RtcAnswer, RtcAnswerSchema, RtcOffer, RtcOfferSchema, RtcRefused, RtcRefusedSchema, Select, SelectSchema, Selected, SelectedSchema, ServerMessage, ServerMessageSchema, SetMode, SetModeSchema, Stroke, StrokePhase$1 as StrokePhase, StrokePhaseSchema, StrokeSchema, Target$1 as Target, TargetSchema, Targets, TargetsSchema, Text, TextSchema, Tile, TileSchema, VideoFormat$1 as VideoFormat, VideoFormatSchema, VideoFrame, VideoFrameSchema, VideoQuality$1 as VideoQuality, VideoQualitySchema, VideoShown, VideoShownSchema, VideoStatus$1 as VideoStatus, VideoStatusSchema, Viewport, ViewportSchema, file_aperture_live_v1_live };
29
29
  }
30
30
  /**
31
31
  * Describes the file aperture/live/v1/live.proto.
@@ -309,6 +309,12 @@ type ServerMessage = Message<"aperture.live.v1.ServerMessage"> & {
309
309
  */
310
310
  value: Stroke;
311
311
  case: "stroke";
312
+ } | {
313
+ /**
314
+ * @generated from field: aperture.live.v1.Paced paced = 19;
315
+ */
316
+ value: Paced;
317
+ case: "paced";
312
318
  } | {
313
319
  case: undefined;
314
320
  value?: undefined;
@@ -319,6 +325,25 @@ type ServerMessage = Message<"aperture.live.v1.ServerMessage"> & {
319
325
  * Use `create(ServerMessageSchema)` to create a new message.
320
326
  */
321
327
  declare const ServerMessageSchema: GenMessage<ServerMessage>;
328
+ /**
329
+ * How the session's automation moves the pointer in a tab that is being recorded. It is
330
+ * the session's, the same for every recording and whoever watches: told once the client
331
+ * said `hello`, and again whenever it is set, which the session's `/pace` route and its
332
+ * `pace` tool do. A tab nothing records gets the automation's input at once.
333
+ *
334
+ * @generated from message aperture.live.v1.Paced
335
+ */
336
+ type Paced = Message<"aperture.live.v1.Paced"> & {
337
+ /**
338
+ * @generated from field: aperture.live.v1.Pace pace = 1;
339
+ */
340
+ pace: Pace$1;
341
+ };
342
+ /**
343
+ * Describes the message aperture.live.v1.Paced.
344
+ * Use `create(PacedSchema)` to create a new message.
345
+ */
346
+ declare const PacedSchema: GenMessage<Paced>;
322
347
  /**
323
348
  * What the client may do in the session, area by area: what whoever let it in gave it, of
324
349
  * what the session offers at all. Sent first after `hello`. What is not granted is refused:
@@ -1618,6 +1643,38 @@ type Cursor_Hidden = Message<"aperture.live.v1.Cursor.Hidden"> & {};
1618
1643
  * Use `create(Cursor_HiddenSchema)` to create a new message.
1619
1644
  */
1620
1645
  declare const Cursor_HiddenSchema: GenMessage<Cursor_Hidden>;
1646
+ /**
1647
+ * @generated from enum aperture.live.v1.Pace
1648
+ */
1649
+ declare enum Pace$1 {
1650
+ /**
1651
+ * @generated from enum value: PACE_UNSPECIFIED = 0;
1652
+ */
1653
+ UNSPECIFIED = 0,
1654
+ /**
1655
+ * The pointer jumps to each action.
1656
+ *
1657
+ * @generated from enum value: PACE_INSTANT = 1;
1658
+ */
1659
+ INSTANT = 1,
1660
+ /**
1661
+ * The pointer travels there, quickly but so that the eye can follow, and text is typed
1662
+ * out.
1663
+ *
1664
+ * @generated from enum value: PACE_FAST = 2;
1665
+ */
1666
+ FAST = 2,
1667
+ /**
1668
+ * Unhurried travel, for demos.
1669
+ *
1670
+ * @generated from enum value: PACE_SLOW = 3;
1671
+ */
1672
+ SLOW = 3
1673
+ }
1674
+ /**
1675
+ * Describes the enum aperture.live.v1.Pace.
1676
+ */
1677
+ declare const PaceSchema: GenEnum<Pace$1>;
1621
1678
  /**
1622
1679
  * The form a target's video takes.
1623
1680
  *
@@ -2068,6 +2125,9 @@ interface Features {
2068
2125
  /** What a client may do before the session has told: nothing. */
2069
2126
  declare const NO_FEATURES: Features;
2070
2127
  declare const featuresOf: (features: Features$1) => Features;
2128
+ /** How the session's automation moves the pointer in a tab that is being recorded. */
2129
+ type Pace = "instant" | "fast" | "slow";
2130
+ declare const paceOf: (pace: Pace$1) => Pace;
2071
2131
  interface Member {
2072
2132
  readonly id: number;
2073
2133
  readonly name: string;
@@ -2195,6 +2255,8 @@ interface Snapshot {
2195
2255
  readonly picture: Picture;
2196
2256
  /** Nothing is granted until the session has told. */
2197
2257
  readonly features: Features;
2258
+ /** How the session's automation moves the pointer in a tab that is being recorded. */
2259
+ readonly pace: Pace;
2198
2260
  /** The numbers of the tabs that are muted here; the others are heard while watched. */
2199
2261
  readonly muted: readonly number[];
2200
2262
  /** The session's right-click report, at the client coordinates of the click. */
@@ -2258,7 +2320,7 @@ declare const fileRequestOf: (request: FileRequest$1) => FileRequest;
2258
2320
  declare const menuOf: (menu: Menu$1) => Menu;
2259
2321
  declare const statusOf: (status: VideoStatus$1) => VideoStatus;
2260
2322
  declare namespace http_d_exports {
2261
- export { DownloadedFile, Recording, RecordingAnnotation, RecordingBurst, RecordingEdit, RecordingOptions, Screenshot, StartRecording, StateCookie, StorageState, StorageStateAsked, UploadProgress, Uploaded, ViewportSize, annotateRecording, downloads, exportStorageState, getRecording, importStorageState, listRecordings, listScreenshots, removeUpload, retargetRecording, setViewport, startRecording, stopRecording, takeScreenshot, targets, upload, uploads };
2323
+ export { DownloadedFile, EditRecording, Recording, RecordingAnnotation, RecordingBurst, RecordingEdit, RecordingOptions, Screenshot, StartRecording, StateCookie, StorageState, StorageStateAsked, UploadProgress, Uploaded, ViewportSize, annotateRecording, downloads, editRecording, exportStorageState, getPace, getRecording, importStorageState, listRecordings, listScreenshots, removeUpload, retargetRecording, setPace, setViewport, startRecording, stopRecording, takeScreenshot, targets, upload, uploads };
2262
2324
  }
2263
2325
  /** A file put into the session for its browser to take. */
2264
2326
  interface Uploaded {
@@ -2291,7 +2353,10 @@ interface RecordingBurst {
2291
2353
  readonly settle_ms: number;
2292
2354
  readonly max_tail_ms: number;
2293
2355
  }
2294
- /** What a recording says, as it starts, about the edit made when it stops. */
2356
+ /**
2357
+ * How an edit of a recording is made: said as the recording stops, and again for every edit
2358
+ * that is made of it after.
2359
+ */
2295
2360
  interface RecordingOptions {
2296
2361
  /** `bursts` keeps only the stretches around what the automation did. */
2297
2362
  readonly capture: "continuous" | "bursts";
@@ -2300,18 +2365,27 @@ interface RecordingOptions {
2300
2365
  /** Marks clicks with a ripple. */
2301
2366
  readonly ripple: boolean;
2302
2367
  readonly burst: RecordingBurst;
2303
- /** How automation moves the pointer while the recording runs. */
2304
- readonly pace: "instant" | "fast" | "slow";
2305
2368
  /** The share of the picture that must change for something to have happened: 0 to 1. */
2306
2369
  readonly motion_threshold: number;
2370
+ /** The edited video's frames a second: 1 to 60, which is the most the raw video has. */
2371
+ readonly fps: number;
2307
2372
  }
2308
- interface StartRecording extends Partial<Omit<RecordingOptions, "burst">> {
2373
+ /** What is said of an edit; what is left out is as the session has it by default. */
2374
+ interface EditRecording extends Partial<Omit<RecordingOptions, "burst">> {
2375
+ readonly burst?: Partial<RecordingBurst>;
2376
+ }
2377
+ interface StartRecording {
2309
2378
  /** The tab to record; the newest one when left out. */
2310
2379
  readonly tab?: number;
2311
- readonly burst?: Partial<RecordingBurst>;
2380
+ /** Go on with whichever tab the session's automation acts on. */
2381
+ readonly follow?: boolean;
2312
2382
  }
2313
2383
  interface RecordingEdit {
2314
2384
  readonly state: "editing" | "finished" | "failed";
2385
+ /** What it is made with: what the recording was stopped or last edited again with. */
2386
+ readonly options: RecordingOptions;
2387
+ /** When it was made, which tells one edit of a recording from the one before. */
2388
+ readonly made_at_ms: number | null;
2315
2389
  /** The edited video's file, relative to the session's files, once it is made. */
2316
2390
  readonly file: string | null;
2317
2391
  /** What happened, where in the raw video and where in the edited one. */
@@ -2340,7 +2414,8 @@ interface Recording {
2340
2414
  readonly duration_ms: number | null;
2341
2415
  readonly bytes: number | null;
2342
2416
  readonly failure: string | null;
2343
- readonly options: RecordingOptions;
2417
+ /** It goes on with whichever tab the session's automation acts on. */
2418
+ readonly follow: boolean;
2344
2419
  /** The edit, once the recording stopped; none where the session cannot make one. */
2345
2420
  readonly edit: RecordingEdit | null;
2346
2421
  }
@@ -2380,7 +2455,17 @@ declare const removeUpload: (address: Address, name: string) => Effect.Effect<vo
2380
2455
  declare const listRecordings: (address: Address) => Effect.Effect<Recording[], SessionError, never>;
2381
2456
  declare const getRecording: (address: Address, id: string) => Effect.Effect<Recording, SessionError, never>;
2382
2457
  declare const startRecording: (address: Address, options?: StartRecording | undefined) => Effect.Effect<Recording, SessionError, never>;
2383
- declare const stopRecording: (address: Address, id: string) => Effect.Effect<Recording, SessionError, never>;
2458
+ /** Stops a recording. Its edit is made after, with `options`. */
2459
+ declare const stopRecording: (address: Address, id: string, options?: EditRecording | undefined) => Effect.Effect<Recording, SessionError, never>;
2460
+ /**
2461
+ * Makes the edit of a stopped recording again, of the same raw video and with `options`. It
2462
+ * takes the place of the edit there is once it is made. Refused while an edit of the
2463
+ * recording is being made, and for a recording whose raw video is gone.
2464
+ */
2465
+ declare const editRecording: (address: Address, id: string, options?: EditRecording | undefined) => Effect.Effect<Recording, SessionError, never>;
2466
+ declare const getPace: (address: Address) => Effect.Effect<Pace, SessionError, never>;
2467
+ /** Sets the session's pace, for every recording and whoever watches. */
2468
+ declare const setPace: (address: Address, pace: Pace) => Effect.Effect<Pace, SessionError, never>;
2384
2469
  /** Has a running recording go on with another tab, in the same video. */
2385
2470
  declare const retargetRecording: (address: Address, id: string, tab: number) => Effect.Effect<Recording, SessionError, never>;
2386
2471
  /** What a running recording's edit is told to show. */
@@ -2628,8 +2713,9 @@ interface SessionService {
2628
2713
  readonly recordings: {
2629
2714
  readonly list: Effect.Effect<Recording[], SessionError>;
2630
2715
  readonly get: (id: string) => Effect.Effect<Recording, SessionError>;
2631
- readonly start: (options?: StartRecording) => Effect.Effect<Recording, SessionError>;
2632
- readonly stop: (id: string) => Effect.Effect<Recording, SessionError>; /** Has a running recording go on with another tab. */
2716
+ readonly start: (options?: StartRecording) => Effect.Effect<Recording, SessionError>; /** Stops a recording; its edit is made with `options`. */
2717
+ readonly stop: (id: string, options?: EditRecording) => Effect.Effect<Recording, SessionError>; /** Makes the edit of a stopped recording again, with other options. */
2718
+ readonly edit: (id: string, options?: EditRecording) => Effect.Effect<Recording, SessionError>; /** Has a running recording go on with another tab. */
2633
2719
  readonly retarget: (id: string, tab: number) => Effect.Effect<Recording, SessionError>; /** Adds an annotation to the recording named, or to the only one that runs. */
2634
2720
  readonly annotate: (annotation: RecordingAnnotation, id?: string) => Effect.Effect<void, SessionError>;
2635
2721
  };
@@ -2638,6 +2724,14 @@ interface SessionService {
2638
2724
  readonly export: (asked?: StorageStateAsked) => Effect.Effect<StorageState, SessionError>;
2639
2725
  readonly import: (state: StorageState) => Effect.Effect<void, SessionError>;
2640
2726
  };
2727
+ /**
2728
+ * How the session's automation moves the pointer in what is recorded. The snapshot's
2729
+ * `pace` tells it as it is set, by anyone.
2730
+ */
2731
+ readonly pace: {
2732
+ readonly get: Effect.Effect<Pace, SessionError>;
2733
+ readonly set: (pace: Pace) => Effect.Effect<Pace, SessionError>;
2734
+ };
2641
2735
  readonly screenshots: {
2642
2736
  readonly list: Effect.Effect<Screenshot[], SessionError>; /** Takes one of a target, the newest when none is named, and keeps it in the files. */
2643
2737
  readonly take: (tab?: number) => Effect.Effect<Screenshot, SessionError>;
@@ -2706,7 +2800,8 @@ declare const make: (options: ConnectOptions) => Effect.Effect<{
2706
2800
  list: Effect.Effect<Recording[], SessionError, never>;
2707
2801
  get: (id: string) => Effect.Effect<Recording, SessionError, never>;
2708
2802
  start: (started: StartRecording | undefined) => Effect.Effect<Recording, SessionError, never>;
2709
- stop: (id: string) => Effect.Effect<Recording, SessionError, never>;
2803
+ stop: (id: string, options: EditRecording | undefined) => Effect.Effect<Recording, SessionError, never>;
2804
+ edit: (id: string, options: EditRecording | undefined) => Effect.Effect<Recording, SessionError, never>;
2710
2805
  retarget: (id: string, tab: number) => Effect.Effect<Recording, SessionError, never>;
2711
2806
  annotate: (annotation: RecordingAnnotation, id: string | undefined) => Effect.Effect<void, SessionError, never>;
2712
2807
  };
@@ -2714,6 +2809,10 @@ declare const make: (options: ConnectOptions) => Effect.Effect<{
2714
2809
  export: (asked: StorageStateAsked | undefined) => Effect.Effect<StorageState, SessionError, never>;
2715
2810
  import: (state: StorageState) => Effect.Effect<void, SessionError, never>;
2716
2811
  };
2812
+ pace: {
2813
+ get: Effect.Effect<Pace, SessionError, never>;
2814
+ set: (pace: Pace) => Effect.Effect<Pace, SessionError, never>;
2815
+ };
2717
2816
  screenshots: {
2718
2817
  list: Effect.Effect<Screenshot[], SessionError, never>;
2719
2818
  take: (tab: number | undefined) => Effect.Effect<Screenshot, SessionError, never>;
@@ -2725,5 +2824,5 @@ declare class Session extends Session_base {}
2725
2824
  /** Connects to a session for as long as the layer lives. */
2726
2825
  declare const layer: (options: ConnectOptions) => Layer.Layer<Session, never, never>;
2727
2826
  //#endregion
2728
- export { QUALITIES as $, ClipboardForm as A, LEASE_ACTIONS as B, UploadProgress as C, Address as Ct, ALONGS as D, http_d_exports as E, Failure as F, PAGE_MODES as G, Member as H, Features as I, Picture as J, PIXELS as K, FileRequest as L, Download as M, DownloadState as N, Along as O, FORMATS as P, Presence as Q, Grant as R, StorageStateAsked as S, SessionError as St, ViewportSize as T, Menu as U, LeaseAction as V, NO_FEATURES as W, PictureWay as X, PictureSettings as Y, PointerMark as Z, RecordingOptions as _, qualityOf as _t, PictureChange as a, Target as at, StateCookie as b, targetOf as bt, SnapshotStore as c, VideoStatus as ct, Surfaces as d, featuresOf as dt, Role as et, KEYS as f, fileRequestOf as ft, RecordingEdit as g, presenceOf as gt, RecordingBurst as h, pointerOf as ht, GoOptions as i, StrokePoint as it, Connection as j, ClipboardEvent as k, layer as l, downloadOf as lt, RecordingAnnotation as m, menuOf as mt, Destination as n, Snapshot as nt, Session as o, VideoFormat as ot, Recording as p, formatOf as pt, PageMode as q, FitOptions as r, StrokePhase as rt, SessionService as s, VideoQuality as st, ConnectOptions as t, STROKE_PHASE as tt, make as u, failureOf as ut, Screenshot as v, statusOf as vt, Uploaded as w, StorageState as x, live_pb_d_exports as xt, StartRecording as y, strokeOf as yt, HeldTab as z };
2729
- //# sourceMappingURL=session-5_K8VTRJ.d.ts.map
2827
+ export { PointerMark as $, ClipboardEvent as A, HeldTab as B, StorageStateAsked as C, targetOf as Ct, http_d_exports as D, ViewportSize as E, Address as Et, FORMATS as F, NO_FEATURES as G, LeaseAction as H, Failure as I, Pace as J, PAGE_MODES as K, Features as L, Connection as M, Download as N, ALONGS as O, DownloadState as P, PictureWay as Q, FileRequest as R, StorageState as S, strokeOf as St, Uploaded as T, SessionError as Tt, Member as U, LEASE_ACTIONS as V, Menu as W, Picture as X, PageMode as Y, PictureSettings as Z, RecordingEdit as _, paceOf as _t, PictureChange as a, StrokePhase as at, StartRecording as b, qualityOf as bt, SnapshotStore as c, VideoFormat as ct, Surfaces as d, downloadOf as dt, Presence as et, KEYS as f, failureOf as ft, RecordingBurst as g, menuOf as gt, RecordingAnnotation as h, formatOf as ht, GoOptions as i, Snapshot as it, ClipboardForm as j, Along as k, layer as l, VideoQuality as lt, Recording as m, fileRequestOf as mt, Destination as n, Role as nt, Session as o, StrokePoint as ot, EditRecording as p, featuresOf as pt, PIXELS as q, FitOptions as r, STROKE_PHASE as rt, SessionService as s, Target as st, ConnectOptions as t, QUALITIES as tt, make as u, VideoStatus as ut, RecordingOptions as v, pointerOf as vt, UploadProgress as w, live_pb_d_exports as wt, StateCookie as x, statusOf as xt, Screenshot as y, presenceOf as yt, Grant as z };
2828
+ //# sourceMappingURL=session-C6Huw03i.d.ts.map