@aperture-browser/session-react 0.0.0-nightly.98.95679814d178 → 1.0.0-beta.1

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/dist/index.d.ts CHANGED
@@ -1,24 +1,102 @@
1
- import { ApertureProvider, ApertureProviderProps, ApertureRuntime, ApertureRuntimeOptions, BrowserCommands, BrowserMediaPath, BrowserMediaPhase, CollaborationControl, CollaborationCursor, CollaborationError, CollaborationLeaseMode, CollaborationPaintEvent, CollaborationPaintPoint, CollaborationParticipant, CollaborationPhase, CollaborationRole, LiveSessionControl, LiveSessionError, LiveSessionMediaSelection, LiveSessionMediaSize, LiveSessionViewportOwnership, RuntimeProvider, RuntimeProviderMissingError, SessionNotice, SessionStatus, SessionViewport, SessionViewportOverlay, SessionViewportPlaceholder, SessionViewportProps, SessionViewportStatus, UseBrowserControlResult, UseSessionOptions, UseSessionResult, collaborationPaintLifetimeMs, makeApertureRuntime, shareSessionAccess, useBaseUrl, useBrowserControl, useEffectCallback, useFork, useLiveSession, useRunApi, useRuntime, useSession } from "./headless.js";
2
- import { ReactNode } from "react";
3
- import * as Effect from "effect/Effect";
4
- import { CollaborationRole as CollaborationRole$1, SessionAccess, SessionAccess as SessionAccess$1 } from "@aperture-browser/live-session";
1
+ import { AddressControl, InputState, Kept, Lease, LeaseState, RecordingTimeline, RecordingsControl, SessionConnection, SessionError, SessionProvider, SessionProviderProps, SessionViewport, SessionViewportProps, TabSound, TimelineEvent, TimelinePiece, UploadInProgress, UploadsControl, addressOf, connect, keptOf, n as __reExport, pictureBox, recordingIsEdited, recordingRuns, t as __exportAll, useAddress, useConnectedSession, useInputState, useLease, useReconnect, useRecordingTimeline, useRecordings, useRememberedFit, useSession, useSessionSnapshot, useStored, useTabSound, useUploads, useWatchedTarget } from "./headless.js";
2
+ import * as React from "react";
3
+ import { ComponentProps, ComponentType, ReactNode } from "react";
4
+ import { ConnectOptions, EditRecording, Features, Member, Picture, Session, Target } from "@aperture-browser/session-client";
5
+ import { Drawer } from "@base-ui/react/drawer";
6
+ import { Menu } from "@base-ui/react/menu";
7
+ import { ContextMenu } from "@base-ui/react/context-menu";
8
+ import { Button } from "@base-ui/react/button";
9
+ import { VariantProps } from "class-variance-authority";
10
+ export * from "@aperture-browser/session-client";
5
11
 
12
+ //#region src/workbench/contributions.d.ts
13
+ /**
14
+ * A place of the workbench that takes contributions.
15
+ *
16
+ * - `titlebar.start`, `titlebar.end`: beside the tab strip and the members.
17
+ * - `toolbar.start`, `toolbar.end`: before the navigation buttons, and after the address.
18
+ * - `toolbar.actions`: the buttons at the toolbar's end.
19
+ * - `menu.browser`, `menu.picture`, `menu.recording`: the menus of those buttons.
20
+ * - `menu.phone`: the menu of a phone's bar, in place of `menu.browser`.
21
+ * - `menu.tab`: the menu of a right click on a tab, which is given as `target`.
22
+ * - `menu.page`: the menu of a right click in the session.
23
+ * - `viewport`: laid over the picture.
24
+ *
25
+ * On a phone the workbench is the picture with a bar over its foot: the toolbar's slots
26
+ * are in the bar, and the title bar's slots and `menu.browser` are shown nowhere. The
27
+ * bar's menu is `menu.phone`, a sheet whose submenus are pages of it: what is contributed
28
+ * for a phone as well has a place there.
29
+ */
30
+ type WorkbenchSlotName = "titlebar.start" | "titlebar.end" | "toolbar.start" | "toolbar.end" | "toolbar.actions" | "menu.browser" | "menu.phone" | "menu.picture" | "menu.recording" | "menu.tab" | "menu.page" | "viewport";
31
+ interface WorkbenchSlotProps {
32
+ /** The tab the menu is of, in `menu.tab`. */
33
+ readonly target?: Target | undefined;
34
+ }
35
+ /**
36
+ * One thing in one place of the workbench. Everything the workbench shows in its slots is
37
+ * a contribution, its own included: one with the id of another takes its place.
38
+ */
39
+ interface WorkbenchContribution {
40
+ readonly id: string;
41
+ readonly slot: WorkbenchSlotName;
42
+ /**
43
+ * In a menu, the contributions of one group stand together, apart from the other groups.
44
+ * Groups come in the order of their first contribution.
45
+ */
46
+ readonly group?: string | undefined;
47
+ /** Lower comes first; the workbench's own are a hundred apart. */
48
+ readonly order?: number | undefined;
49
+ /**
50
+ * What is shown. A menu's contribution renders items of the menu's kind: of a dropdown
51
+ * menu, and in `menu.tab` of a context menu. Rendering nothing leaves no trace.
52
+ */
53
+ readonly component: ComponentType<WorkbenchSlotProps>;
54
+ }
55
+ /**
56
+ * The contributions an embedder gives: more of them, each replacing the one of its id, or
57
+ * a function of the workbench's own that gives all there are to be.
58
+ */
59
+ type WorkbenchContributions = readonly WorkbenchContribution[] | ((own: readonly WorkbenchContribution[]) => readonly WorkbenchContribution[]);
60
+ declare function resolveContributions(own: readonly WorkbenchContribution[], given: WorkbenchContributions | undefined): readonly WorkbenchContribution[];
61
+ /** A slot's contributions in their order, by group. */
62
+ declare function groupContributions(contributions: readonly WorkbenchContribution[], slot: WorkbenchSlotName): ReadonlyArray<readonly [group: string, contributions: readonly WorkbenchContribution[]]>;
63
+ //#endregion
6
64
  //#region src/features.d.ts
65
+ /** The parts of the workbench an embedder may leave out. All are shown unless said. */
7
66
  interface SessionFeatures {
67
+ /** The tab strip. */
8
68
  readonly tabs?: boolean;
69
+ /** Back, forward and reload. */
9
70
  readonly navigation?: boolean;
10
71
  readonly addressBar?: boolean;
72
+ /** Who is in the session, and the lease of the watched tab. */
11
73
  readonly presence?: boolean;
12
- readonly drawing?: boolean;
13
- readonly devTools?: boolean;
74
+ /** The buttons and menus at the toolbar's end. */
14
75
  readonly menus?: boolean;
15
- readonly statusBadge?: boolean;
76
+ /** The session's files: uploads, downloads and what pages ask for. */
77
+ readonly files?: boolean;
78
+ readonly recordings?: boolean;
79
+ /** The menu shown for a right click in the session. */
80
+ readonly pageMenu?: boolean;
81
+ /** Which tabs sound, and muting them. */
82
+ readonly sound?: boolean;
83
+ /** Copying from the session and pasting into it, from the menus. */
84
+ readonly clipboard?: boolean;
16
85
  }
17
86
  interface ApertureSessionFeatures extends SessionFeatures {
87
+ /** Notices as toasts. Without it the embedding page shows none of its own accord. */
18
88
  readonly toaster?: boolean;
19
89
  }
20
- type ResolvedSessionFeatures = Required<SessionFeatures>;
21
- declare function resolveSessionFeatures(features?: SessionFeatures): ResolvedSessionFeatures;
90
+ /**
91
+ * What the workbench shows: what the embedder did not leave out, of what this client may
92
+ * read or write at all. `access` tells which of the two, for what depends on it.
93
+ */
94
+ interface ResolvedSessionFeatures extends Required<SessionFeatures> {
95
+ readonly uploads: boolean;
96
+ readonly downloads: boolean;
97
+ readonly access: Features;
98
+ }
99
+ declare function resolveSessionFeatures(features: SessionFeatures | undefined, access: Features): ResolvedSessionFeatures;
22
100
  //#endregion
23
101
  //#region src/ui-root.d.ts
24
102
  type ApertureTheme = "light" | "dark" | "system";
@@ -33,78 +111,545 @@ declare function ApertureUIRoot({
33
111
  children
34
112
  }: ApertureUIRootProps): import("react").JSX.Element;
35
113
  //#endregion
36
- //#region src/aperture-session.d.ts
37
- interface SessionProps {
38
- readonly access: SessionAccess$1 | null;
39
- readonly features?: SessionFeatures;
40
- readonly leading?: ReactNode;
114
+ //#region src/workbench/context.d.ts
115
+ /** The theme, where the embedding page lets the workbench's menu change it. */
116
+ interface Appearance {
117
+ readonly theme: ApertureTheme;
118
+ readonly onThemeChange: (theme: ApertureTheme) => void;
41
119
  }
42
- interface ApertureSessionProps extends SessionProps {
43
- readonly features?: ApertureSessionFeatures;
44
- readonly theme?: ApertureTheme;
45
- readonly className?: string;
120
+ interface Workbench {
121
+ readonly features: ResolvedSessionFeatures;
122
+ readonly recordings: RecordingsControl;
123
+ readonly contributions: readonly WorkbenchContribution[];
124
+ /** The id of the recording or screenshot the gallery shows; none while it is closed. */
125
+ readonly viewed: string | undefined;
126
+ readonly view: (id: string | undefined) => void;
127
+ /** Whether this member draws over the picture, which then takes no input from it. */
128
+ readonly drawing: boolean;
129
+ readonly setDrawing: (drawing: boolean) => void;
130
+ readonly appearance: Appearance | undefined;
131
+ readonly targetFaviconUrl: (target: Target) => string | undefined;
132
+ }
133
+ interface WorkbenchProviderProps {
134
+ readonly features?: SessionFeatures | undefined;
135
+ /** What the workbench's slots show; see `workbenchContributions` for its own. */
136
+ readonly contributions: readonly WorkbenchContribution[];
137
+ /**
138
+ * Whether targets take the size of this window unless the person switched that off.
139
+ * False leaves them the size they have until the person chooses another.
140
+ */
141
+ readonly fit?: boolean | undefined;
142
+ /** Lets the browser menu change the theme. */
143
+ readonly appearance?: Appearance | undefined;
144
+ /**
145
+ * A tab's icon, in place of the one the session fetches for its page. The session's
146
+ * own browser asks the page's site for it, which is told nothing of who watches.
147
+ */
148
+ readonly targetFaviconUrl?: ((target: Target) => string | undefined) | undefined;
149
+ readonly children?: ReactNode;
46
150
  }
151
+ /**
152
+ * What the parts of a workbench share: the session's recordings, what is shown, and what
153
+ * is contributed to the slots. The parts work anywhere below it, in any arrangement.
154
+ */
155
+ declare function WorkbenchProvider({
156
+ features: given,
157
+ contributions,
158
+ fit,
159
+ appearance,
160
+ targetFaviconUrl,
161
+ children
162
+ }: WorkbenchProviderProps): import("react").JSX.Element;
163
+ declare function useWorkbench(): Workbench;
164
+ //#endregion
165
+ //#region src/components/session-workbench.d.ts
166
+ interface SessionWorkbenchProps extends Omit<WorkbenchProviderProps, "contributions" | "children"> {
167
+ /**
168
+ * More for the workbench's slots, each in place of the workbench's own of the same id;
169
+ * or a function of the workbench's own that gives all there are to be.
170
+ */
171
+ readonly contributions?: WorkbenchContributions | undefined;
172
+ /**
173
+ * Another arrangement of the workbench's parts, in place of the usual one: the title
174
+ * bar, the toolbar, the picture and the page's menu.
175
+ */
176
+ readonly children?: ReactNode;
177
+ }
178
+ /**
179
+ * One session as a browser to work in: the tab strip with the session's members, the
180
+ * toolbar with its menus, the picture, and the menu of a right click in it.
181
+ */
182
+ declare function SessionWorkbench({
183
+ contributions,
184
+ children,
185
+ ...provider
186
+ }: SessionWorkbenchProps): import("react").JSX.Element;
187
+ /** The box the workbench's parts stand in, one below the other. */
188
+ declare function WorkbenchFrame({
189
+ children
190
+ }: {
191
+ readonly children?: ReactNode;
192
+ }): import("react").JSX.Element;
193
+ //#endregion
194
+ //#region src/aperture-session.d.ts
195
+ interface ApertureSessionProps extends ConnectOptions, Omit<SessionWorkbenchProps, "features" | "appearance" | "children"> {
196
+ readonly features?: ApertureSessionFeatures | undefined;
197
+ readonly theme?: ApertureTheme | undefined;
198
+ /** With it, the browser menu offers to change the theme. */
199
+ readonly onThemeChange?: ((theme: ApertureTheme) => void) | undefined;
200
+ readonly className?: string | undefined;
201
+ /** Hears of the session's client when there is one, and of none when it is closed. */
202
+ readonly onSession?: ((session: Session | null) => void) | undefined;
203
+ }
204
+ /**
205
+ * The workbench of one session: connects to it, shows it, and ends the connection when
206
+ * unmounted. Needs `@aperture-browser/session-react/styles.css`.
207
+ */
47
208
  declare function ApertureSession({
209
+ url,
210
+ token,
211
+ name,
212
+ pixels,
213
+ features,
48
214
  theme,
215
+ onThemeChange,
49
216
  className,
50
- ...props
217
+ onSession,
218
+ ...workbench
51
219
  }: ApertureSessionProps): import("react").JSX.Element;
52
- declare function Session({
53
- access,
54
- features,
55
- leading
56
- }: SessionProps): import("react").JSX.Element;
57
- declare function devToolsUrl(origin: string, cdpUrl: string, sessionToken: string): string;
58
- //#endregion
59
- //#region src/clipboard.d.ts
60
- declare const ClipboardError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => import("effect/Cause").YieldableError & {
61
- readonly _tag: "ClipboardError";
62
- } & Readonly<A>;
63
- /** The browser refused to write to the clipboard. */
64
- declare class ClipboardError extends ClipboardError_base<{
65
- readonly cause?: unknown;
66
- }> {
67
- readonly message = "Clipboard write is unavailable";
68
- }
69
- declare const copyText: (value: string) => Effect.Effect<void, ClipboardError>;
70
- /** Copies `value`, then runs `onCopied`, or shows an error toast if the copy fails. */
71
- declare const copyTextWithToast: (value: string, onCopied?: () => void) => Effect.Effect<void, never, never>;
72
- //#endregion
73
- //#region src/components/browser-control-pane.d.ts
74
- type BrowserControlPaneProps = {
75
- control: UseBrowserControlResult;
76
- leading?: ReactNode;
77
- features?: SessionFeatures;
78
- collaborationRole: CollaborationRole$1;
79
- cdpUrl: string | null;
80
- shareUrls: {
81
- editor: string;
82
- viewer: string;
83
- } | null;
84
- onSessionDetails?: () => void;
85
- };
86
- declare function BrowserControlPane({
87
- control,
88
- leading,
89
- features: featureOverrides,
90
- collaborationRole,
91
- cdpUrl,
92
- shareUrls,
93
- onSessionDetails
94
- }: BrowserControlPaneProps): import("react").JSX.Element;
220
+ //#endregion
221
+ //#region src/components/browser-tab-strip.d.ts
222
+ /** One tab per target. Tabs keep the order the session tells them in: it has no other. */
223
+ declare function BrowserTabStrip(): import("react").JSX.Element;
224
+ declare function TabFavicon({
225
+ src
226
+ }: {
227
+ src: string | undefined;
228
+ }): import("react").JSX.Element;
229
+ declare function tabLabel(target: Target): string;
230
+ //#endregion
231
+ //#region ../ui/src/components/button.d.ts
232
+ declare const buttonVariants: (props?: ({
233
+ variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" | "link" | null | undefined;
234
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
235
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
236
+ declare function Button$1({
237
+ className,
238
+ variant,
239
+ size,
240
+ pending,
241
+ disabled,
242
+ children,
243
+ ...props
244
+ }: Button.Props & VariantProps<typeof buttonVariants> & {
245
+ /**
246
+ * Whether what it does is being done: it is pressed no more until that ends, and says
247
+ * so in place of what it says, as wide as it was.
248
+ */
249
+ pending?: boolean;
250
+ }): import("react").JSX.Element;
251
+ //#endregion
252
+ //#region src/components/browser-toolbar.d.ts
253
+ /** The workbench's first row: the tab strip, and who is in the session. */
254
+ declare function WorkbenchTitlebar(): import("react").JSX.Element | null;
255
+ declare const CompactContext: import("react").Context<boolean>;
256
+ /** Whether the toolbar is narrow: what has a place in the browser menu shows there alone. */
257
+ declare function useCompactToolbar(): boolean;
258
+ /**
259
+ * Whether the toolbar is narrow under a finger, whose buttons are larger: then only going
260
+ * back, the keyboard and the files keep a button, and the rest is in the browser menu.
261
+ */
262
+ declare function useCrowdedToolbar(): boolean;
263
+ /**
264
+ * The workbench's second row: navigation, the address, and the buttons at its end. Without
265
+ * children it is the usual arrangement of its parts.
266
+ */
267
+ declare function WorkbenchToolbar({
268
+ children
269
+ }: {
270
+ readonly children?: ReactNode;
271
+ }): import("react").JSX.Element | null;
272
+ /** Back, forward and reload of the watched tab. */
273
+ declare function NavigationButtons(): import("react").JSX.Element;
274
+ /** The watched tab's address, and the field to take it elsewhere. */
275
+ declare function AddressBar(): import("react").JSX.Element;
276
+ /** The buttons at the toolbar's end, which are what is contributed to `toolbar.actions`. */
277
+ declare function ToolbarActions(): import("react").JSX.Element;
278
+ /** A button of the toolbar, with its name as a tooltip. */
279
+ declare function ToolbarButton({
280
+ label,
281
+ disabled,
282
+ onClick,
283
+ children,
284
+ ...props
285
+ }: {
286
+ label: string;
287
+ disabled?: boolean;
288
+ onClick?: () => void;
289
+ children: ReactNode;
290
+ } & Omit<ComponentProps<typeof Button$1>, "children" | "onClick" | "disabled">): import("react").JSX.Element;
291
+ //#endregion
292
+ //#region src/components/toolbar-actions.d.ts
293
+ /** Brings up a phone's keyboard, which comes only for a field that is focused in a tap. */
294
+ declare function KeyboardAction(): import("react").JSX.Element;
295
+ /** Draws over the picture for the others to see, instead of giving it input. */
296
+ declare function DrawAction(): import("react").JSX.Element | null;
297
+ /** The recording menu, from a button that tells when a recording runs. */
298
+ declare function RecordingAction(): import("react").JSX.Element | null;
299
+ /** How the picture comes, and the watched tab's viewport. */
300
+ declare function PictureAction(): import("react").JSX.Element | null;
301
+ /** The menu with the lease, the clipboard and the rest. */
302
+ declare function BrowserMenuAction(): import("react").JSX.Element;
303
+ declare function CopyItem(): import("react").JSX.Element | null;
304
+ declare function PasteItem(): import("react").JSX.Element | null;
305
+ declare function SelectAllItem(): import("react").JSX.Element;
306
+ declare function TypeItem(): import("react").JSX.Element;
307
+ /** Mutes the watched tab for this client, or lets it be heard again. */
308
+ declare function MuteItem(): import("react").JSX.Element | null;
309
+ /** The recording menu inside the browser menu, where the toolbar has no room for its button. */
310
+ declare function RecordingSubmenuItem(): import("react").JSX.Element | null;
311
+ /** The picture menu inside the browser menu, where the toolbar has no room for its button. */
312
+ declare function PictureSubmenuItem(): import("react").JSX.Element | null;
313
+ /** Forward and reload inside the browser menu, where the toolbar keeps only the way back. */
314
+ declare function NavigationItems(): import("react").JSX.Element | null;
315
+ declare function CopyUrlItem(): import("react").JSX.Element;
316
+ declare function AppearanceItem(): import("react").JSX.Element | null;
317
+ declare function ReconnectItem(): import("react").JSX.Element | null;
318
+ /** What this member may do about the lease of the watched tab. */
319
+ declare function LeaseItems(): import("react").JSX.Element | null;
320
+ //#endregion
321
+ //#region src/components/tab-menu.d.ts
322
+ declare function TabReloadItem({
323
+ target
324
+ }: WorkbenchSlotProps): import("react").JSX.Element;
325
+ declare function TabDuplicateItem({
326
+ target
327
+ }: WorkbenchSlotProps): import("react").JSX.Element;
328
+ declare function TabCopyUrlItem({
329
+ target
330
+ }: WorkbenchSlotProps): import("react").JSX.Element;
331
+ /** Mutes the tab for this client, or lets it be heard again. */
332
+ declare function TabMuteItem({
333
+ target
334
+ }: WorkbenchSlotProps): import("react").JSX.Element | null;
335
+ declare function TabCloseItem({
336
+ target
337
+ }: WorkbenchSlotProps): import("react").JSX.Element;
338
+ declare function TabCloseOthersItem({
339
+ target
340
+ }: WorkbenchSlotProps): import("react").JSX.Element;
341
+ declare function TabCloseRightItem({
342
+ target
343
+ }: WorkbenchSlotProps): import("react").JSX.Element;
344
+ //#endregion
345
+ //#region src/components/menu-parts.d.ts
346
+ /** A toolbar button that opens a menu, with its name as a tooltip. */
347
+ declare function MenuButton({
348
+ label,
349
+ variant,
350
+ children,
351
+ ...props
352
+ }: {
353
+ label: string;
354
+ variant?: ComponentProps<typeof Button$1>["variant"];
355
+ children: ReactNode;
356
+ } & Omit<ComponentProps<typeof Button$1>, "children" | "variant">): import("react").JSX.Element;
357
+ /** A submenu's trigger that names a setting and shows what it is set to. */
358
+ declare function SettingSubTrigger({
359
+ name,
360
+ value,
361
+ disabled
362
+ }: {
363
+ name: string;
364
+ value: ReactNode;
365
+ disabled?: boolean;
366
+ }): import("react").JSX.Element;
367
+ /** A menu item's two lines: what it is, and what that means. */
368
+ declare function Described({
369
+ title,
370
+ children
371
+ }: {
372
+ title: ReactNode;
373
+ children: ReactNode;
374
+ }): import("react").JSX.Element;
375
+ declare function formatBytes(bytes: number): string;
376
+ declare function formatDuration(milliseconds: number): string;
377
+ declare function formatStarted(startedAtMs: number): string;
378
+ /** The small picture of a list's entry, and what stands for it where there is none. */
379
+ declare function Thumbnail({
380
+ src,
381
+ className,
382
+ children
383
+ }: {
384
+ src: string | undefined;
385
+ className?: string;
386
+ children: ReactNode;
387
+ }): import("react").JSX.Element;
95
388
  //#endregion
96
389
  //#region src/components/browser-viewport.d.ts
97
- interface BrowserViewportProps extends Omit<SessionViewportProps, "renderOverlay" | "onNotice"> {
98
- statusBadge?: boolean;
390
+ interface BrowserViewportProps {
391
+ readonly className?: string | undefined;
99
392
  }
393
+ /**
394
+ * The picture with what the workbench lays over it: the connection's state, the lease, and
395
+ * what is contributed to `viewport`.
396
+ */
100
397
  declare function BrowserViewport({
101
- statusBadge,
102
- className,
103
- ...props
398
+ className
104
399
  }: BrowserViewportProps): import("react").JSX.Element;
105
400
  //#endregion
401
+ //#region src/components/kept-gallery.d.ts
402
+ /**
403
+ * One of the session's recordings or screenshots, as large as the window lets it be and no
404
+ * larger than it is: a screenshot as the picture it is, a recording in a player that shows
405
+ * what happened in it. The others are a panel away. Opened by the workbench's `view`.
406
+ */
407
+ declare function KeptGallery(): import("react").JSX.Element;
408
+ //#endregion
409
+ //#region src/components/page-menu.d.ts
410
+ /**
411
+ * The menu of a right click in the session. The session's browser shows none: the session
412
+ * tells what the click was on when the page made nothing of it, and the menu is shown
413
+ * here, where the click was.
414
+ */
415
+ declare function PageMenu(): import("react").JSX.Element | null;
416
+ /** For a click on a link. */
417
+ declare function PageLinkItems(): import("react").JSX.Element | null;
418
+ /** For a click on a picture. */
419
+ declare function PagePictureItems(): import("react").JSX.Element | null;
420
+ /** For a click on selected text, or in a field to write into. */
421
+ declare function PageTextItems(): import("react").JSX.Element;
422
+ declare function PageNavigationItems(): import("react").JSX.Element;
423
+ //#endregion
424
+ //#region src/components/picture-menu.d.ts
425
+ /** What the session says it sends, in a line. */
426
+ declare function pictureStatus(picture: Picture): string;
427
+ /** How the picture comes, and the size and scale of the watched target's viewport. */
428
+ /** How the picture comes: its transport, codec, quality and frame rate. */
429
+ declare function PictureItems(): import("react").JSX.Element;
430
+ /** Whether the other members' pointers are shown over the picture. */
431
+ declare function PointersItem(): import("react").JSX.Element | null;
432
+ /** The watched tab's viewport: whether it fits this window, its size and its scale. */
433
+ declare function ViewportItems(): import("react").JSX.Element;
434
+ //#endregion
435
+ //#region src/components/recording-menu.d.ts
436
+ /** How an edit is made, as the workbench offers it. */
437
+ interface EditSettings {
438
+ readonly capture: "continuous" | "bursts";
439
+ readonly idle: "keep" | "cut" | "speed";
440
+ readonly ripple: boolean;
441
+ readonly fps: 30 | 60;
442
+ }
443
+ /** What a recording is started and stopped with, as this browser remembers it. */
444
+ interface RecordingSettings extends EditSettings {
445
+ /** A new recording goes on with whichever tab automation acts on. */
446
+ readonly follow: boolean;
447
+ }
448
+ declare function useRecordingSettings(): readonly [RecordingSettings, (value: RecordingSettings) => void];
449
+ /** Starts a recording of the watched tab. */
450
+ declare function RecordItem(): import("react").JSX.Element;
451
+ /** The recordings that run, each with the means to stop it. */
452
+ declare function RunningRecordingItems(): import("react").JSX.Element[];
453
+ /**
454
+ * What the session kept of its tabs: the recordings that ended and the screenshots, as one
455
+ * list. Each opens in the gallery.
456
+ */
457
+ declare function KeptItems(): import("react").JSX.Element | null;
458
+ declare function keptPreview(kept: Kept, fileUrl: (path: string) => string): string | undefined;
459
+ /** What a kept thing is and how it went, in a line. */
460
+ declare function KeptFacts({
461
+ kept
462
+ }: {
463
+ kept: Kept;
464
+ }): import("react").JSX.Element;
465
+ /** Takes a screenshot of the watched tab, which the session keeps in its files. */
466
+ declare function ScreenshotItem(): import("react").JSX.Element;
467
+ /** How a new recording is made, and how the one that stops is edited. */
468
+ declare function RecordingSettingsItems(): import("react").JSX.Element;
469
+ /** The session's pace: how automation moves the pointer in what is recorded. */
470
+ declare function AutomationPaceItem(): import("react").JSX.Element | null;
471
+ /** How an edit is made: what a recording is stopped with, or edited again with. */
472
+ declare function EditSettingsItems({
473
+ settings,
474
+ onChange
475
+ }: {
476
+ settings: EditSettings;
477
+ onChange: (settings: EditSettings) => void;
478
+ }): import("react").JSX.Element;
479
+ //#endregion
480
+ //#region src/components/session-files.d.ts
481
+ /**
482
+ * The session's files, from a button of the toolbar: what was uploaded for its browser to
483
+ * take, what it downloaded, and the files a page of the watched tab asks for. The panel
484
+ * opens by itself when a page asks and when a download is done.
485
+ */
486
+ declare function SessionFilesButton(): import("react").JSX.Element | null;
487
+ //#endregion
488
+ //#region src/components/session-presence.d.ts
489
+ /** Who is in the session, as the old workbench showed its collaborators. */
490
+ declare function SessionPresence(): import("react").JSX.Element | null;
491
+ declare function MemberAvatar({
492
+ member,
493
+ holds,
494
+ className
495
+ }: {
496
+ member: Member; /** The member holds the lease of a tab. */
497
+ holds?: boolean;
498
+ className?: string;
499
+ }): import("react").JSX.Element;
500
+ /** One member, as a mark on the tab they watch. */
501
+ declare function MemberDot({
502
+ member,
503
+ holds
504
+ }: {
505
+ member: Member;
506
+ holds: boolean;
507
+ }): import("react").JSX.Element;
508
+ /**
509
+ * The lease of the watched tab, where it concerns this member: someone else holds the tab,
510
+ * or someone asks this member for it. Laid over the picture, where input that does not
511
+ * land is noticed.
512
+ */
513
+ declare function LeaseOverlay(): import("react").JSX.Element | null;
514
+ /**
515
+ * What the automation is called where it holds a tab or points at something: automation
516
+ * as such, and whose it is where it acts for someone. `opens` where a sentence starts
517
+ * with it.
518
+ */
519
+ declare function automationName(member: Member, opens?: boolean): string;
520
+ declare function memberColor(member: Member): string;
521
+ //#endregion
522
+ //#region src/components/page-mode.d.ts
523
+ /**
524
+ * How the watched tab's pages are shown: as on a desktop, as on a phone, or as on what its
525
+ * holder uses. The page loads again when that changes how it is shown.
526
+ */
527
+ declare function PageModeItem(): import("react").JSX.Element;
528
+ //#endregion
529
+ //#region src/components/phone-bar.d.ts
530
+ /**
531
+ * The workbench on a phone: the picture, and over it one bar with the way back, the
532
+ * address, the tabs and a menu with all the rest.
533
+ *
534
+ * The bar is laid over the picture and takes none of its room: the page keeps its size
535
+ * whether the bar is there or away, so nothing of it is drawn anew as the bar comes and
536
+ * goes. It goes as the page is moved down, and a small mark stands for it, which is
537
+ * swiped away where a page has something of its own under it; it is back as the page is
538
+ * moved up or the mark is pressed.
539
+ *
540
+ * A phone held upright has the bar across the picture's foot. One held on its side has a
541
+ * rail along a side of the picture in its place, since height is what there is least of:
542
+ * the address is typed across the picture's head then, and what opens from the rail
543
+ * comes in from its side. Where there is room beside the picture, as a screen's cutout
544
+ * and corners leave, the rail stands there, over nothing, and stays.
545
+ */
546
+ declare function PhoneWorkbench(): import("react").JSX.Element;
547
+ //#endregion
548
+ //#region ../ui/src/components/drawer.d.ts
549
+ /** The edge of the window a sheet stands at, and is dragged to to be rid of it. */
550
+ type DrawerSide = "bottom" | "left" | "right";
551
+ /**
552
+ * A sheet that follows the finger. At the window's foot it is dragged down to be rid of
553
+ * it and between the heights named as `snapPoints`; at a `side` of the window, as where
554
+ * the window is wider than tall, it is dragged to that side to be rid of it.
555
+ */
556
+ //#endregion
557
+ //#region src/components/tab-switcher.d.ts
558
+ interface TabSwitcherProps {
559
+ /** The edge of the window it comes in from: a side's where the phone is held on its side. */
560
+ readonly side?: DrawerSide;
561
+ readonly open: boolean;
562
+ readonly onOpenChange: (open: boolean) => void;
563
+ }
564
+ /**
565
+ * The session's tabs as cards, each with a small picture of its page: the way from one tab
566
+ * to another where there is no room for a row of them. It is a sheet over the window's
567
+ * foot, half of the way up, that is dragged up for more of them and down to be rid of it;
568
+ * a tab that is chosen and a press beside it are rid of it as well. At a side of the
569
+ * window it is as tall as the window, with the cards two abreast, dragged to that side.
570
+ */
571
+ declare function TabSwitcher({
572
+ side,
573
+ open,
574
+ onOpenChange
575
+ }: TabSwitcherProps): import("react").JSX.Element;
576
+ //#endregion
577
+ //#region src/hooks/use-media.d.ts
578
+ /**
579
+ * Whether the session is used from a phone, as the session is told it is: the workbench
580
+ * is then the picture with a bar below it, in place of a browser's rows above it.
581
+ */
582
+ declare const usePhone: () => boolean;
583
+ //#endregion
584
+ //#region ../ui/src/keyboard-inset.d.ts
585
+ /**
586
+ * Tells the styles what of the window the on-screen keyboard leaves to be seen, where the
587
+ * browser lays the page out behind the keyboard and does not make the window shorter for
588
+ * it: how much of the window's foot is covered, as `--keyboard-inset`, and how far down the
589
+ * window what is seen begins, as `--keyboard-top`, which is more than nothing where the
590
+ * browser moved the window up to show what is typed into. A sheet at the foot stands above
591
+ * the keyboard then, and is no taller than what is left.
592
+ */
593
+ declare function useKeyboardInset(): void;
594
+ //#endregion
106
595
  //#region src/notices.d.ts
596
+ interface SessionNotice {
597
+ readonly level: "info" | "error";
598
+ readonly message: string;
599
+ readonly description?: string | undefined;
600
+ }
107
601
  declare function showNotice(notice: SessionNotice): void;
602
+ /** What a failed request to the session says, for a notice's second line. */
603
+ declare function failureText(cause: unknown): string;
604
+ /**
605
+ * Copies text to this browser's clipboard from a click, and tells how it went. A page may
606
+ * always copy text from a click, so a failure is worth a notice.
607
+ */
608
+ declare function copyTextHere(session: Session, text: string, copied: string): void;
609
+ /** Pastes this browser's clipboard into the session, and tells when there was nothing to. */
610
+ declare function pasteHere(session: Session): void;
611
+ //#endregion
612
+ //#region src/workbench/own.d.ts
613
+ /**
614
+ * What the workbench puts into its own slots. An embedder's contribution with one of these
615
+ * ids takes that one's place, and a function of this list can leave any of them out.
616
+ */
617
+ declare const workbenchContributions: readonly WorkbenchContribution[];
618
+ //#endregion
619
+ //#region ../ui/src/components/context-menu.d.ts
620
+ declare function ContextMenuGroup({
621
+ ...props
622
+ }: ContextMenu.Group.Props): React.JSX.Element;
623
+ //#endregion
624
+ //#region ../ui/src/components/dropdown-menu.d.ts
625
+ declare function DropdownMenuGroup({
626
+ ...props
627
+ }: Menu.Group.Props): React.JSX.Element;
628
+ //#endregion
629
+ //#region src/workbench/slot.d.ts
630
+ interface SlotProps extends WorkbenchSlotProps {
631
+ readonly name: WorkbenchSlotName;
632
+ }
633
+ /** What is contributed to a slot, one after the other. */
634
+ declare function WorkbenchSlot({
635
+ name,
636
+ ...props
637
+ }: SlotProps): import("react").JSX.Element[];
638
+ declare const MENU_GROUPS: {
639
+ dropdown: typeof DropdownMenuGroup;
640
+ context: typeof ContextMenuGroup;
641
+ };
642
+ /** What is contributed to a menu, group by group, with a line between the groups. */
643
+ declare function WorkbenchMenuSlot({
644
+ name,
645
+ kind,
646
+ ...props
647
+ }: SlotProps & {
648
+ readonly kind?: keyof typeof MENU_GROUPS;
649
+ }): import("react").JSX.Element[];
650
+ declare namespace index_d_exports {
651
+ export { AddressBar, AddressControl, ApertureSession, ApertureSessionFeatures, ApertureSessionProps, ApertureTheme, ApertureUIRoot, ApertureUIRootProps, Appearance, AppearanceItem, AutomationPaceItem, BrowserMenuAction, BrowserTabStrip, BrowserViewport, BrowserViewportProps, CompactContext, CopyItem, CopyUrlItem, Described, DrawAction, EditSettings, EditSettingsItems, InputState, Kept, KeptFacts, KeptGallery, KeptItems, KeyboardAction, Lease, LeaseItems, LeaseOverlay, LeaseState, MemberAvatar, MemberDot, MenuButton, MuteItem, NavigationButtons, NavigationItems, PageLinkItems, PageMenu, PageModeItem, PageNavigationItems, PagePictureItems, PageTextItems, PasteItem, PhoneWorkbench, PictureAction, PictureItems, PictureSubmenuItem, PointersItem, ReconnectItem, RecordItem, RecordingAction, RecordingSettings, RecordingSettingsItems, RecordingSubmenuItem, RecordingTimeline, RecordingsControl, ResolvedSessionFeatures, RunningRecordingItems, ScreenshotItem, SelectAllItem, SessionConnection, SessionError, SessionFeatures, SessionFilesButton, SessionNotice, SessionPresence, SessionProvider, SessionProviderProps, SessionViewport, SessionViewportProps, SessionWorkbench, SessionWorkbenchProps, SettingSubTrigger, SlotProps, TabCloseItem, TabCloseOthersItem, TabCloseRightItem, TabCopyUrlItem, TabDuplicateItem, TabFavicon, TabMuteItem, TabReloadItem, TabSound, TabSwitcher, TabSwitcherProps, Thumbnail, TimelineEvent, TimelinePiece, ToolbarActions, ToolbarButton, TypeItem, UploadInProgress, UploadsControl, ViewportItems, Workbench, WorkbenchContribution, WorkbenchContributions, WorkbenchFrame, WorkbenchMenuSlot, WorkbenchProvider, WorkbenchProviderProps, WorkbenchSlot, WorkbenchSlotName, WorkbenchSlotProps, WorkbenchTitlebar, WorkbenchToolbar, addressOf, automationName, connect, copyTextHere, failureText, formatBytes, formatDuration, formatStarted, groupContributions, keptOf, keptPreview, memberColor, pasteHere, pictureBox, pictureStatus, recordingIsEdited, recordingRuns, resolveContributions, resolveSessionFeatures, showNotice, tabLabel, useAddress, useCompactToolbar, useConnectedSession, useCrowdedToolbar, useInputState, useKeyboardInset, useLease, usePhone, useReconnect, useRecordingSettings, useRecordingTimeline, useRecordings, useRememberedFit, useSession, useSessionSnapshot, useStored, useTabSound, useUploads, useWatchedTarget, useWorkbench, workbenchContributions };
652
+ }
108
653
  //#endregion
109
- export { ApertureProvider, ApertureProviderProps, ApertureRuntime, ApertureRuntimeOptions, ApertureSession, ApertureSessionFeatures, ApertureSessionProps, ApertureTheme, ApertureUIRoot, ApertureUIRootProps, BrowserCommands, BrowserControlPane, BrowserMediaPath, BrowserMediaPhase, BrowserViewport, BrowserViewportProps, ClipboardError, CollaborationControl, type CollaborationCursor, type CollaborationError, type CollaborationLeaseMode, type CollaborationPaintEvent, type CollaborationPaintPoint, type CollaborationParticipant, type CollaborationPhase, type CollaborationRole, LiveSessionControl, LiveSessionError, LiveSessionMediaSelection, LiveSessionMediaSize, LiveSessionViewportOwnership, ResolvedSessionFeatures, RuntimeProvider, RuntimeProviderMissingError, Session, type SessionAccess, SessionFeatures, SessionNotice, SessionProps, SessionStatus, SessionViewport, SessionViewportOverlay, SessionViewportPlaceholder, SessionViewportProps, SessionViewportStatus, UseBrowserControlResult, UseSessionOptions, UseSessionResult, collaborationPaintLifetimeMs, copyText, copyTextWithToast, devToolsUrl, makeApertureRuntime, resolveSessionFeatures, shareSessionAccess, showNotice, useBaseUrl, useBrowserControl, useEffectCallback, useFork, useLiveSession, useRunApi, useRuntime, useSession };
654
+ export { AddressBar, AddressControl, ApertureSession, ApertureSessionFeatures, ApertureSessionProps, ApertureTheme, ApertureUIRoot, ApertureUIRootProps, Appearance, AppearanceItem, AutomationPaceItem, BrowserMenuAction, BrowserTabStrip, BrowserViewport, BrowserViewportProps, CompactContext, CopyItem, CopyUrlItem, Described, DrawAction, type EditSettings, EditSettingsItems, InputState, Kept, KeptFacts, KeptGallery, KeptItems, KeyboardAction, Lease, LeaseItems, LeaseOverlay, LeaseState, MemberAvatar, MemberDot, MenuButton, MuteItem, NavigationButtons, NavigationItems, PageLinkItems, PageMenu, PageModeItem, PageNavigationItems, PagePictureItems, PageTextItems, PasteItem, PhoneWorkbench, PictureAction, PictureItems, PictureSubmenuItem, PointersItem, ReconnectItem, RecordItem, RecordingAction, type RecordingSettings, RecordingSettingsItems, RecordingSubmenuItem, RecordingTimeline, RecordingsControl, ResolvedSessionFeatures, RunningRecordingItems, ScreenshotItem, SelectAllItem, SessionConnection, SessionError, SessionFeatures, SessionFilesButton, SessionNotice, SessionPresence, SessionProvider, SessionProviderProps, SessionViewport, SessionViewportProps, SessionWorkbench, SessionWorkbenchProps, SettingSubTrigger, SlotProps, TabCloseItem, TabCloseOthersItem, TabCloseRightItem, TabCopyUrlItem, TabDuplicateItem, TabFavicon, TabMuteItem, TabReloadItem, TabSound, TabSwitcher, type TabSwitcherProps, Thumbnail, TimelineEvent, TimelinePiece, ToolbarActions, ToolbarButton, TypeItem, UploadInProgress, UploadsControl, ViewportItems, Workbench, WorkbenchContribution, WorkbenchContributions, WorkbenchFrame, WorkbenchMenuSlot, WorkbenchProvider, WorkbenchProviderProps, WorkbenchSlot, WorkbenchSlotName, WorkbenchSlotProps, WorkbenchTitlebar, WorkbenchToolbar, addressOf, automationName, connect, copyTextHere, failureText, formatBytes, formatDuration, formatStarted, groupContributions, keptOf, keptPreview, memberColor, pasteHere, pictureBox, pictureStatus, recordingIsEdited, recordingRuns, resolveContributions, resolveSessionFeatures, showNotice, tabLabel, useAddress, useCompactToolbar, useConnectedSession, useCrowdedToolbar, useInputState, useKeyboardInset, useLease, usePhone, useReconnect, useRecordingSettings, useRecordingTimeline, useRecordings, useRememberedFit, useSession, useSessionSnapshot, useStored, useTabSound, useUploads, useWatchedTarget, useWorkbench, workbenchContributions };
110
655
  //# sourceMappingURL=index.d.ts.map