@arbidocs/blocks 0.4.109 → 0.4.110
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/agents/index.cjs +286 -286
- package/dist/agents/index.js +10 -10
- package/dist/agents/tasks/ConversationListView.d.ts +5 -1
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +5 -1
- package/dist/calendar/EventDetails.d.ts +1 -1
- package/dist/calendar/index.cjs +13 -0
- package/dist/calendar/index.cjs.map +1 -1
- package/dist/calendar/index.js +13 -0
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/types.d.ts +3 -0
- package/dist/calls/CallSidePanel.d.ts +17 -0
- package/dist/calls/CallStage.d.ts +57 -0
- package/dist/calls/ControlBar.d.ts +91 -0
- package/dist/calls/ControlButton.d.ts +44 -0
- package/dist/calls/PreJoin.d.ts +31 -0
- package/dist/calls/cards.d.ts +54 -0
- package/dist/calls/hooks.d.ts +20 -0
- package/dist/calls/index.cjs +1853 -0
- package/dist/calls/index.cjs.map +1 -0
- package/dist/calls/index.d.ts +20 -0
- package/dist/calls/index.js +1737 -0
- package/dist/calls/index.js.map +1 -0
- package/dist/calls/join-choices.d.ts +11 -0
- package/dist/calls/layout.d.ts +106 -0
- package/dist/calls/panels.d.ts +55 -0
- package/dist/calls/status.d.ts +69 -0
- package/dist/calls/tiles.d.ts +59 -0
- package/dist/chat/Message.d.ts +17 -2
- package/dist/chat/TranscriptLine.d.ts +50 -0
- package/dist/chat/index.cjs +147 -126
- package/dist/chat/index.d.ts +3 -1
- package/dist/chat/index.js +5 -4
- package/dist/chat/transcript-runs.d.ts +6 -0
- package/dist/{chunk-QKWQMOHN.cjs → chunk-2UAJVK3C.cjs} +4 -4
- package/dist/{chunk-QKWQMOHN.cjs.map → chunk-2UAJVK3C.cjs.map} +1 -1
- package/dist/{chunk-7C35WXYB.js → chunk-5HFPRI3W.js} +5 -5
- package/dist/chunk-5HFPRI3W.js.map +1 -0
- package/dist/{chunk-ZSV2NQQP.js → chunk-6RHHMBZ5.js} +158 -5
- package/dist/chunk-6RHHMBZ5.js.map +1 -0
- package/dist/{chunk-FQX6N5G6.js → chunk-A35KT2II.js} +35 -18
- package/dist/chunk-A35KT2II.js.map +1 -0
- package/dist/{chunk-PGDL26TQ.js → chunk-AY32GGKU.js} +10 -4
- package/dist/{chunk-PGDL26TQ.js.map → chunk-AY32GGKU.js.map} +1 -1
- package/dist/{chunk-S55VDTX3.js → chunk-CECWAIHL.js} +3 -3
- package/dist/{chunk-S55VDTX3.js.map → chunk-CECWAIHL.js.map} +1 -1
- package/dist/{chunk-UABPHZWZ.js → chunk-CXZ7FPTQ.js} +3 -3
- package/dist/{chunk-UABPHZWZ.js.map → chunk-CXZ7FPTQ.js.map} +1 -1
- package/dist/{chunk-C2HRZSAT.cjs → chunk-DJM7DLCT.cjs} +5 -5
- package/dist/chunk-DJM7DLCT.cjs.map +1 -0
- package/dist/{chunk-I4XQCE6U.cjs → chunk-HBBJYRGI.cjs} +162 -5
- package/dist/{chunk-ZSV2NQQP.js.map → chunk-HBBJYRGI.cjs.map} +1 -1
- package/dist/chunk-MWDW5UBW.cjs +199 -0
- package/dist/chunk-MWDW5UBW.cjs.map +1 -0
- package/dist/{chunk-NUTLXVPX.js → chunk-NRUPUDWB.js} +16 -7
- package/dist/chunk-NRUPUDWB.js.map +1 -0
- package/dist/{chunk-DDF5GPIJ.js → chunk-P5ST47VY.js} +3 -3
- package/dist/{chunk-DDF5GPIJ.js.map → chunk-P5ST47VY.js.map} +1 -1
- package/dist/{chunk-W7NZRZ54.js → chunk-SQNAJPNR.js} +4 -4
- package/dist/{chunk-W7NZRZ54.js.map → chunk-SQNAJPNR.js.map} +1 -1
- package/dist/{chunk-PDRYGPZB.cjs → chunk-VP4KJ4LK.cjs} +16 -6
- package/dist/chunk-VP4KJ4LK.cjs.map +1 -0
- package/dist/{chunk-GBYY3PIC.cjs → chunk-VZKBI2KJ.cjs} +79 -62
- package/dist/chunk-VZKBI2KJ.cjs.map +1 -0
- package/dist/{chunk-5YXG342J.cjs → chunk-W7ZDBPJ3.cjs} +4 -4
- package/dist/{chunk-5YXG342J.cjs.map → chunk-W7ZDBPJ3.cjs.map} +1 -1
- package/dist/{chunk-SKSE4OT6.cjs → chunk-WPVIOGDG.cjs} +5 -5
- package/dist/{chunk-SKSE4OT6.cjs.map → chunk-WPVIOGDG.cjs.map} +1 -1
- package/dist/{chunk-3US5OIDQ.cjs → chunk-XSUOEJB3.cjs} +9 -3
- package/dist/chunk-XSUOEJB3.cjs.map +1 -0
- package/dist/chunk-Z3AZ7Q5X.js +177 -0
- package/dist/chunk-Z3AZ7Q5X.js.map +1 -0
- package/dist/{chunk-Z5VUZ6YD.cjs → chunk-ZV3BKLFY.cjs} +3 -3
- package/dist/{chunk-Z5VUZ6YD.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +41 -41
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/index.cjs +66 -66
- package/dist/connect/index.js +13 -13
- package/dist/facts/index.cjs +4 -4
- package/dist/facts/index.js +4 -4
- package/dist/files/index.cjs +6 -6
- package/dist/files/index.js +6 -6
- package/dist/home/index.cjs +17 -17
- package/dist/home/index.js +3 -3
- package/dist/index.cjs +846 -825
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -20
- package/dist/index.js.map +1 -1
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +37 -37
- package/dist/settings/index.js +5 -5
- package/dist/shell/index.cjs +12 -12
- package/dist/shell/index.js +4 -4
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +5 -5
- package/dist/studio/index.js +4 -4
- package/dist/workflow-canvas/index.cjs +53 -53
- package/dist/workflow-canvas/index.js +10 -10
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +15 -5
- package/src/calls/calls.css +157 -0
- package/dist/chunk-3US5OIDQ.cjs.map +0 -1
- package/dist/chunk-7C35WXYB.js.map +0 -1
- package/dist/chunk-C2HRZSAT.cjs.map +0 -1
- package/dist/chunk-FQX6N5G6.js.map +0 -1
- package/dist/chunk-GBYY3PIC.cjs.map +0 -1
- package/dist/chunk-I4XQCE6U.cjs.map +0 -1
- package/dist/chunk-NUTLXVPX.js.map +0 -1
- package/dist/chunk-PDRYGPZB.cjs.map +0 -1
package/dist/calendar/types.d.ts
CHANGED
|
@@ -172,6 +172,7 @@ export interface CalendarLabels {
|
|
|
172
172
|
confirmed: string;
|
|
173
173
|
cancelled: string;
|
|
174
174
|
join: string;
|
|
175
|
+
openMeetingChat: string;
|
|
175
176
|
accept: string;
|
|
176
177
|
decline: string;
|
|
177
178
|
maybe: string;
|
|
@@ -471,6 +472,8 @@ export interface EventDetailsProps {
|
|
|
471
472
|
/** "Propose new time" for an invitation (shown next to the RSVP buttons). */
|
|
472
473
|
onProposeTime?: () => void;
|
|
473
474
|
onJoin?: () => void;
|
|
475
|
+
/** An ARBI call's meeting chat (shown next to Join). */
|
|
476
|
+
onOpenMeetingChat?: () => void;
|
|
474
477
|
onClose?: () => void;
|
|
475
478
|
/** Render the Join button as enabled (the host decides the join window). */
|
|
476
479
|
canJoin?: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A side panel inside the call (chat, participants): the same header as the app's docked panels
|
|
3
|
+
* (FloatingPanel: title in the brand colour, hairline below, a ghost close button), on the normal
|
|
4
|
+
* background, beside the tiles rather than over them.
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
7
|
+
export declare function CallSidePanel({ title, icon, actions, onClose, closeLabel, closeTestId, children, className, ...rest }: {
|
|
8
|
+
title: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** Extra header actions, left of the close button. */
|
|
11
|
+
actions?: ReactNode;
|
|
12
|
+
onClose(): void;
|
|
13
|
+
closeLabel: string;
|
|
14
|
+
closeTestId?: string;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
} & React.HTMLAttributes<HTMLElement>): ReactElement;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The call panel, docked beside the call's conversation like the document viewer: the app's
|
|
3
|
+
* header (`TabHeader`: one tab with the call's title; status chips, the view switch and
|
|
4
|
+
* "Minimise" on the right), a "Speaking: …" line, the stage (tiles, or a side panel over them)
|
|
5
|
+
* and the control bar. Normal app surfaces in both themes; only the tiles are dark.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
8
|
+
export type CallView = 'speaker' | 'gallery';
|
|
9
|
+
export declare function CallHeader({ title, icon, status, view, onViewChange, onMinimise, minimiseLabel, }: {
|
|
10
|
+
title: string;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** The status chips; given `compact` on a narrow header. */
|
|
13
|
+
status?: ReactNode | ((compact: boolean) => ReactNode);
|
|
14
|
+
/** Speaker (the talker large) or gallery (everyone equal): one switch. */
|
|
15
|
+
view?: CallView;
|
|
16
|
+
onViewChange?(view: CallView): void;
|
|
17
|
+
onMinimise?(): void;
|
|
18
|
+
minimiseLabel?: string;
|
|
19
|
+
}): ReactElement;
|
|
20
|
+
/**
|
|
21
|
+
* "Speaking: Ada, Bo" — who is talking right now, in words (the tile rings say it in colour and
|
|
22
|
+
* motion). Polite live region, so a screen reader hears changes without being flooded.
|
|
23
|
+
*/
|
|
24
|
+
export declare function SpeakingNow({ names, idleText, className, }: {
|
|
25
|
+
/** Who is talking (person pills, or plain names). */
|
|
26
|
+
names: ReactNode[];
|
|
27
|
+
idleText?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
}): ReactElement;
|
|
30
|
+
/**
|
|
31
|
+
* A short-lived line under the header ("Transcription on — started by Ada"): the notice gets its
|
|
32
|
+
* own line, so it never takes the title's room; the header keeps only the short chip.
|
|
33
|
+
*/
|
|
34
|
+
export declare function CallNotice({ children }: {
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
}): ReactElement;
|
|
37
|
+
/**
|
|
38
|
+
* The panel frame: header, a slim line under it ("Speaking: …", notices), the video stage, the
|
|
39
|
+
* participant list under the video, and the control bar. `stageHeight` sizes the video to its
|
|
40
|
+
* tiles (they keep 16:9 at the top) so the rest of the panel goes to the list rather than to blank
|
|
41
|
+
* space; without it, or with a `compact` list, the stage takes the room.
|
|
42
|
+
*/
|
|
43
|
+
export declare function CallStageFrame({ header, subheader, stage, stageRef, stageOverlay, people, stageHeight, controls, className, }: {
|
|
44
|
+
header: ReactNode;
|
|
45
|
+
/** A slim line under the header ("Speaking: …"). */
|
|
46
|
+
subheader?: ReactNode;
|
|
47
|
+
stage: ReactNode;
|
|
48
|
+
stageRef?: React.Ref<HTMLDivElement>;
|
|
49
|
+
/** Floating over the tiles' top-left corner (lobby requests, connection state). */
|
|
50
|
+
stageOverlay?: ReactNode;
|
|
51
|
+
/** The participant list, under the video. */
|
|
52
|
+
people?: ReactNode;
|
|
53
|
+
/** The video's natural height for a stage `width` wide and at most `maxHeight` tall. */
|
|
54
|
+
stageHeight?(width: number, maxHeight: number): number;
|
|
55
|
+
controls: ReactNode;
|
|
56
|
+
className?: string;
|
|
57
|
+
}): ReactElement;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The call's control bar: one row, three columns. Left, the elapsed time (and any warning);
|
|
3
|
+
* centre, the controls in groups; right, Leave. Controls are `CallControlButton`s; Record carries
|
|
4
|
+
* its label, so its state is never a guess.
|
|
5
|
+
* Press-shortcuts: a control marked `data-call-shortcut="m"` is clicked by the M key while
|
|
6
|
+
* `shortcuts` is on and nobody is typing.
|
|
7
|
+
*/
|
|
8
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
9
|
+
export declare function CallControlBar({ left, right, children, shortcuts, className, }: {
|
|
10
|
+
left?: ReactNode;
|
|
11
|
+
right?: ReactNode;
|
|
12
|
+
/** The centre controls (use `ControlGroup` / `ControlDivider`). */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Single-key shortcuts on (the call is on screen). */
|
|
15
|
+
shortcuts?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): ReactElement;
|
|
18
|
+
export declare function ControlGroup({ children }: {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}): ReactElement;
|
|
21
|
+
export declare function ControlDivider(): ReactElement;
|
|
22
|
+
/** `m:ss` since `since`, ticking every second. */
|
|
23
|
+
export declare function ElapsedTime({ since, title }: {
|
|
24
|
+
since: number;
|
|
25
|
+
title?: string;
|
|
26
|
+
}): ReactElement;
|
|
27
|
+
export interface MediaDevice {
|
|
28
|
+
deviceId: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}
|
|
31
|
+
/** Microphone or camera: one toggle with an attached caret that opens the device list. */
|
|
32
|
+
export declare function MediaControl({ kind, enabled, pending, onToggle, devices, activeDeviceId, onSelectDevice, shortcut, testId, options, }: {
|
|
33
|
+
kind: 'microphone' | 'camera';
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
pending?: boolean;
|
|
36
|
+
onToggle(): void;
|
|
37
|
+
devices: MediaDevice[];
|
|
38
|
+
activeDeviceId?: string;
|
|
39
|
+
onSelectDevice(deviceId: string): void;
|
|
40
|
+
shortcut?: string;
|
|
41
|
+
testId: string;
|
|
42
|
+
/** On/off settings under the device list (e.g. "Mirror my video"). */
|
|
43
|
+
options?: {
|
|
44
|
+
label: string;
|
|
45
|
+
checked: boolean;
|
|
46
|
+
onChange(checked: boolean): void;
|
|
47
|
+
testId?: string;
|
|
48
|
+
}[];
|
|
49
|
+
}): ReactElement;
|
|
50
|
+
export interface RecordMode<M extends string = string> {
|
|
51
|
+
mode: M;
|
|
52
|
+
label: string;
|
|
53
|
+
description: string;
|
|
54
|
+
testId?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The host's record button: off, it opens the mode choice; on, it stops (red). A plain menu
|
|
58
|
+
* rather than a portal so the choice stays next to its button.
|
|
59
|
+
*/
|
|
60
|
+
export declare function RecordControl<M extends string>({ on, busy, modes, note, onStart, onStop, }: {
|
|
61
|
+
on: boolean;
|
|
62
|
+
busy?: boolean;
|
|
63
|
+
modes: RecordMode<M>[];
|
|
64
|
+
/** One line above the modes (how recording works). */
|
|
65
|
+
note?: string;
|
|
66
|
+
onStart(mode: M): void;
|
|
67
|
+
onStop(): void;
|
|
68
|
+
}): ReactElement;
|
|
69
|
+
/** Leave: the one filled red control, at the right end. */
|
|
70
|
+
export declare function LeaveButton({ onLeave, compact, label, title, }: {
|
|
71
|
+
onLeave(): void;
|
|
72
|
+
compact?: boolean;
|
|
73
|
+
label?: string;
|
|
74
|
+
title?: string;
|
|
75
|
+
}): ReactElement;
|
|
76
|
+
export interface MoreMenuItem {
|
|
77
|
+
key: string;
|
|
78
|
+
label: ReactNode;
|
|
79
|
+
icon?: ReactNode;
|
|
80
|
+
onSelect(): void;
|
|
81
|
+
disabled?: boolean;
|
|
82
|
+
/** Right-aligned extra (a count). */
|
|
83
|
+
trailing?: ReactNode;
|
|
84
|
+
testId?: string;
|
|
85
|
+
}
|
|
86
|
+
/** "More": a details header, then groups of items separated by hairlines. */
|
|
87
|
+
export declare function MoreMenu({ details, groups, label, }: {
|
|
88
|
+
details?: ReactNode;
|
|
89
|
+
groups: MoreMenuItem[][];
|
|
90
|
+
label?: string;
|
|
91
|
+
}): ReactElement;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one button style of the call controls: an ARBI `Button` (36 px, 44 px on touch) with a
|
|
3
|
+
* tooltip naming the action and its shortcut. Three tones:
|
|
4
|
+
* neutral — a plain control (share, chat, more);
|
|
5
|
+
* active — a control whose thing is on or open (captions on, chat open);
|
|
6
|
+
* off — a device the user turned off (mic / camera), red-tinted, not a giant block.
|
|
7
|
+
* The status chips of the header (`CallStatusChip`) live here too, so all call chrome shares
|
|
8
|
+
* one source of sizes and colours.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
11
|
+
import { type ButtonProps } from '@arbidocs/react/ui';
|
|
12
|
+
export type ControlTone = 'neutral' | 'active' | 'off' | 'danger';
|
|
13
|
+
export interface CallControlButtonProps extends Omit<ButtonProps, 'variant'> {
|
|
14
|
+
/** What the button does now ("Turn off microphone"). Also its accessible name. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Shown in the tooltip after the label, e.g. "M". */
|
|
17
|
+
shortcut?: string;
|
|
18
|
+
tone?: ControlTone;
|
|
19
|
+
/** Tooltip side (default above: the bar sits at the bottom). */
|
|
20
|
+
side?: 'top' | 'bottom';
|
|
21
|
+
/** False for a menu trigger: the open menu says it all, and a tip would sit on top of it. */
|
|
22
|
+
tooltip?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const CallControlButton: import("react").ForwardRefExoticComponent<CallControlButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
/** A count on a control's corner: unread messages (red, top) or how many people (quiet, bottom). */
|
|
26
|
+
export declare function ControlBadge({ count, tone, testId, }: {
|
|
27
|
+
count: number;
|
|
28
|
+
tone?: 'alert' | 'quiet';
|
|
29
|
+
testId?: string;
|
|
30
|
+
}): ReactElement;
|
|
31
|
+
/** A small quiet status chip for the call header (recording, transcription, encryption). */
|
|
32
|
+
export declare function CallStatusChip({ tone, icon, label, compact, pulse, title, children, className, testId, ...rest }: {
|
|
33
|
+
tone: 'red' | 'green' | 'yellow' | 'neutral';
|
|
34
|
+
icon?: ReactNode;
|
|
35
|
+
/** Visible text (hidden when compact; the accessible text stays). */
|
|
36
|
+
label: ReactNode;
|
|
37
|
+
compact?: boolean;
|
|
38
|
+
/** A pulsing dot in front (live capture). */
|
|
39
|
+
pulse?: boolean;
|
|
40
|
+
title?: string;
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
className?: string;
|
|
43
|
+
testId?: string;
|
|
44
|
+
} & Omit<React.HTMLAttributes<HTMLSpanElement>, 'title'>): ReactElement;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PreJoin — device check before entering a call: camera preview, microphone level meter, camera /
|
|
3
|
+
* microphone pickers and on/off toggles. Used when starting a call, joining a scheduled call or a
|
|
4
|
+
* call link. (Answering a ring skips it and joins straight away, microphone on.)
|
|
5
|
+
*
|
|
6
|
+
* Plain getUserMedia — no media library — so it is cheap to show. The preview tracks are stopped on
|
|
7
|
+
* join / unmount; the call opens its own with the chosen devices. Wide: preview left, choices
|
|
8
|
+
* right; narrow: stacked.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
11
|
+
import { type JoinChoices, type MediaKind } from './join-choices';
|
|
12
|
+
export interface PreJoinProps {
|
|
13
|
+
/** The call's name, shown above the choices. */
|
|
14
|
+
title?: string | null;
|
|
15
|
+
/** Heading of the choices (default "Ready to join?"). */
|
|
16
|
+
heading?: string;
|
|
17
|
+
/** Extra fields above the join button (optional). */
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
joinLabel?: string;
|
|
20
|
+
busy?: boolean;
|
|
21
|
+
/** Shown under the controls (e.g. a join error). */
|
|
22
|
+
error?: string | null;
|
|
23
|
+
onJoin(choices: JoinChoices): void;
|
|
24
|
+
onCancel?(): void;
|
|
25
|
+
/** Mirror the camera preview (a selfie view, the default; only the <video> flips). */
|
|
26
|
+
mirror?: boolean;
|
|
27
|
+
/** Turns a device error into a sentence (defaults to {@link describeMediaError}). */
|
|
28
|
+
describeError?(err: unknown, kind: MediaKind): string;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function PreJoin({ title, heading, children, joinLabel, busy, error, onJoin, onCancel, describeError, mirror, className, }: PreJoinProps): ReactElement;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The call's small cards: the minimised call (picture-in-picture, so the user keeps working),
|
|
3
|
+
* the incoming-call card, and the waiting / connecting states. Same surfaces as the app's popovers.
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactElement, type ReactNode } from 'react';
|
|
6
|
+
/**
|
|
7
|
+
* The minimised call: the current speaker (their tile, with its voice ring), "Speaking: …", the
|
|
8
|
+
* status chips, and my microphone and camera, back to the call, leave.
|
|
9
|
+
*/
|
|
10
|
+
export declare function MinimisedCall({ title, video, status, speaking, micEnabled, onToggleMic, cameraEnabled, onToggleCamera, onRestore, onLeave, restoreLabel, shortcuts, className, }: {
|
|
11
|
+
title: string;
|
|
12
|
+
/** M / V work on the card too. */
|
|
13
|
+
shortcuts?: boolean;
|
|
14
|
+
/** The current speaker's tile; omitted (before the call connects), a phone placeholder. */
|
|
15
|
+
video?: ReactNode;
|
|
16
|
+
status?: ReactNode;
|
|
17
|
+
/** "Speaking: …" (a `SpeakingNow`), shown instead of the title while someone talks. */
|
|
18
|
+
speaking?: ReactNode;
|
|
19
|
+
/** Omit (with the toggle) before the call connects. */
|
|
20
|
+
micEnabled?: boolean;
|
|
21
|
+
onToggleMic?(): void;
|
|
22
|
+
cameraEnabled?: boolean;
|
|
23
|
+
onToggleCamera?(): void;
|
|
24
|
+
onRestore(): void;
|
|
25
|
+
onLeave(): void;
|
|
26
|
+
restoreLabel?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): ReactElement;
|
|
29
|
+
/** A ring: who calls, in what context, accept / decline, and the ringtone switch. */
|
|
30
|
+
export declare function IncomingCallCard({ callerName, caller, context, busy, muted, onMutedChange, onAccept, onDecline, className, }: {
|
|
31
|
+
callerName: string;
|
|
32
|
+
/** The caller as the app shows people (a pill); else `callerName`. */
|
|
33
|
+
caller?: ReactNode;
|
|
34
|
+
/** "is calling you", "invites you to a group call", … */
|
|
35
|
+
context: string;
|
|
36
|
+
busy?: boolean;
|
|
37
|
+
muted: boolean;
|
|
38
|
+
onMutedChange(muted: boolean): void;
|
|
39
|
+
onAccept(): void;
|
|
40
|
+
onDecline(): void;
|
|
41
|
+
className?: string;
|
|
42
|
+
}): ReactElement;
|
|
43
|
+
/** A centred state on the stage (waiting in the lobby, connecting). */
|
|
44
|
+
export declare function CallStateMessage({ title, description, spinner, action, testId, }: {
|
|
45
|
+
title: string;
|
|
46
|
+
description?: string;
|
|
47
|
+
spinner?: boolean;
|
|
48
|
+
action?: ReactNode;
|
|
49
|
+
testId?: string;
|
|
50
|
+
}): ReactElement;
|
|
51
|
+
/** Covers the tiles while (re)connecting. */
|
|
52
|
+
export declare function ConnectionOverlay({ label }: {
|
|
53
|
+
label: string;
|
|
54
|
+
}): ReactElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Small hooks of the call blocks. */
|
|
2
|
+
import { type RefObject } from 'react';
|
|
3
|
+
/** Size of an element, kept current with a ResizeObserver. */
|
|
4
|
+
export declare function useElementSize<T extends HTMLElement>(): [
|
|
5
|
+
(el: T | null) => void,
|
|
6
|
+
{
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* A notice that is spelled out on mount (when `announce`) and folds after `ms`; `onFolded` runs
|
|
13
|
+
* once it folds, so the app can avoid spelling it out again on the next mount.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useBriefNotice(announce?: boolean, onFolded?: () => void, ms?: number): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Single-key shortcuts inside `ref`: a control marked `data-call-shortcut="m"` is clicked by the M
|
|
18
|
+
* key while `enabled` and nobody is typing (or holding a modifier).
|
|
19
|
+
*/
|
|
20
|
+
export declare function useShortcutKeys(ref: RefObject<HTMLElement | null>, enabled: boolean): void;
|