@q9labsai/chalk-react 5.4.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -30
- package/dist/Board-PPO62QTR.js +80 -0
- package/dist/CallCharts-7ZQLN47C.js +114 -0
- package/dist/CallDetails-IG57GXT2.js +200 -0
- package/dist/CallDialogContent-GST2I23W.js +177 -0
- package/dist/CameraBackgroundPicker-AZXKBGRF.js +72 -0
- package/dist/ConnectionNotice-NQUBBT46.js +55 -0
- package/dist/DeviceAccessCard-MLRBTPRP.js +238 -0
- package/dist/DeviceAccessWaiting-MQXXW45M.js +25 -0
- package/dist/DeviceSheet-GZTV44UW.js +118 -0
- package/dist/InviteQrCode-TNTZA3GS.js +54 -0
- package/dist/KnockNotice-CAW4CJ4S.js +181 -0
- package/dist/ReactionSheet-ZU6RWC66.js +132 -0
- package/dist/chunk-26PBFST5.js +25 -0
- package/dist/{chunk-K5DV2OTY.js → chunk-4RSCAIFK.js} +340 -165
- package/dist/chunk-ADIDI7AJ.js +10 -0
- package/dist/chunk-ALGD3RBI.js +10 -0
- package/dist/chunk-CQBYFA2W.js +73 -0
- package/dist/chunk-E6HPIMFO.js +44 -0
- package/dist/{chunk-LYZ7EBFF.js → chunk-F6QZY5SM.js} +4116 -4605
- package/dist/chunk-I6FSUWKG.js +51 -0
- package/dist/chunk-JDCFKSGV.js +95 -0
- package/dist/chunk-PH3RC6T6.js +476 -0
- package/dist/chunk-PMGIER77.js +92 -0
- package/dist/chunk-Q36UO2T2.js +363 -0
- package/dist/chunk-SBGC5DKV.js +114 -0
- package/dist/chunk-SZNV3J4B.js +9 -0
- package/dist/{chunk-4U7QZC72.js → chunk-TSBY6C5U.js} +1 -102
- package/dist/chunk-XY7WXXME.js +85 -0
- package/dist/chunk-YOWY22N7.js +148 -0
- package/dist/chunk-Z5AASN4L.js +34 -0
- package/dist/components/admission-panel/KnockNotice.d.ts +31 -0
- package/dist/components/admission-panel/answer-all.d.ts +2 -0
- package/dist/components/call-limbo/CallLimbo.d.ts +5 -1
- package/dist/components/chalk/Chalk.d.ts +2 -5
- package/dist/components/chalk/StatusSurface.d.ts +3 -3
- package/dist/components/chalk-ui/ChalkSheet.d.ts +6 -2
- package/dist/components/chalk-ui/InviteLinkButton.d.ts +5 -0
- package/dist/components/chalk-ui/InviteQR.d.ts +4 -0
- package/dist/components/chalk-ui/InviteQrCode.d.ts +3 -0
- package/dist/components/chalk-ui/MenuIcon.d.ts +17 -0
- package/dist/components/chalk-ui/invite-qr-path.d.ts +10 -0
- package/dist/components/chalk-ui/sheet-drag.d.ts +17 -0
- package/dist/components/chalk-ui/useCopyText.d.ts +6 -0
- package/dist/components/chalk-ui/useSheetDrag.d.ts +11 -0
- package/dist/components/composite/ReactionSheet.d.ts +5 -0
- package/dist/components/connection-notice/ConnectionBars.d.ts +4 -0
- package/dist/components/connection-notice/ConnectionNotice.d.ts +12 -0
- package/dist/components/connection-notice/shown-notice.d.ts +12 -0
- package/dist/components/connection-status/ConnectionRing.d.ts +2 -0
- package/dist/components/connection-status/ConnectionStatus.d.ts +24 -0
- package/dist/components/connection-status/LiveConnectionStatus.d.ts +9 -0
- package/dist/components/connection-status/use-connection-phase.d.ts +23 -0
- package/dist/components/control-bar/DockLayout.d.ts +2 -1
- package/dist/components/control-bar/ShareControl.d.ts +3 -1
- package/dist/components/control-bar/ShellIcon.d.ts +18 -6
- package/dist/components/control-bar/control-bar-behavior.d.ts +19 -8
- package/dist/components/control-bar/control-bar-devices.d.ts +8 -0
- package/dist/components/control-bar/useDeviceSheets.d.ts +7 -0
- package/dist/components/device-access/DeviceAccessCard.d.ts +17 -0
- package/dist/components/device-access/DeviceAccessStyles.d.ts +1 -0
- package/dist/components/device-access/DeviceAccessWaiting.d.ts +4 -0
- package/dist/components/device-access/LazyDeviceAccessCard.d.ts +7 -0
- package/dist/components/device-access/browser-marks.d.ts +5 -0
- package/dist/components/device-access/card-copy.d.ts +17 -0
- package/dist/components/device-access/load-card.d.ts +2 -0
- package/dist/components/device-access/model.d.ts +29 -0
- package/dist/components/device-access/ports.d.ts +21 -0
- package/dist/components/device-access/resolve.d.ts +31 -0
- package/dist/components/device-access/store.d.ts +32 -0
- package/dist/components/device-access/useDeviceAccess.d.ts +7 -0
- package/dist/components/device-popover/CameraBackgroundPicker.d.ts +23 -0
- package/dist/components/device-popover/DevicePopover.d.ts +7 -1
- package/dist/components/device-popover/DevicePreview.d.ts +12 -0
- package/dist/components/device-popover/DeviceSheet.d.ts +26 -0
- package/dist/components/index.js +30 -15
- package/dist/components/participant-grid/ParticipantGrid.d.ts +9 -0
- package/dist/components/participant-tile/ParticipantTile.d.ts +12 -1
- package/dist/components/participant-tile/TileConnection.d.ts +9 -0
- package/dist/components/participant-tile/TileShell.d.ts +2 -1
- package/dist/components/participant-tile/useFrozenFrame.d.ts +12 -0
- package/dist/components/participant-tile/useVideoTileVisibility.d.ts +6 -0
- package/dist/components/participants-panel/ParticipantsPanel.d.ts +5 -0
- package/dist/components/participants-panel/participant-options-menu.d.ts +4 -1
- package/dist/components/participants-panel/participant-order.d.ts +13 -0
- package/dist/components/participants-panel/participant-row.d.ts +5 -1
- package/dist/components/participants-panel/participant-search.d.ts +4 -0
- package/dist/components/space-header/CallCharts.d.ts +22 -0
- package/dist/components/space-header/CallDetails.d.ts +5 -13
- package/dist/components/space-header/CallDialog.d.ts +5 -0
- package/dist/components/space-header/CallDialogContent.d.ts +13 -0
- package/dist/components/space-header/CallMenuStyles.d.ts +2 -0
- package/dist/components/space-header/RowIcon.d.ts +12 -0
- package/dist/components/space-header/call-diagnostics.d.ts +2 -1
- package/dist/components/space-header/call-network.d.ts +18 -0
- package/dist/components/space-header/space-header-contract.d.ts +8 -1
- package/dist/components/space-view/SpacePresentation.d.ts +3 -1
- package/dist/components/space-view/SpaceView.d.ts +3 -5
- package/dist/components/space-view/useBoardNotices.d.ts +7 -0
- package/dist/components/space-view/useMicrophoneNotice.d.ts +11 -0
- package/dist/components/toast-stack/ToastStack.d.ts +3 -1
- package/dist/components/toast-stack/call-events.d.ts +4 -2
- package/dist/index.d.ts +4 -0
- package/dist/index.js +298 -28
- package/dist/internal/call-width.d.ts +9 -0
- package/dist/internal/media-devices.d.ts +11 -0
- package/dist/internal/speaker-test.d.ts +2 -0
- package/dist/internal/useHandOrder.d.ts +2 -0
- package/dist/internal/useHeldWhile.d.ts +2 -0
- package/dist/internal/useInputLevel.d.ts +4 -0
- package/dist/internal/useLongPress.d.ts +15 -0
- package/dist/internal/useSeenConnected.d.ts +9 -0
- package/dist/internal/useSilentMicrophone.d.ts +4 -0
- package/dist/internal/useTrueFor.d.ts +4 -0
- package/dist/participant-options-menu-S3EL6K3M.js +330 -0
- package/dist/pre-join/remembered-devices.d.ts +12 -0
- package/dist/pre-join/usePreJoinDevices.d.ts +47 -0
- package/dist/public-surface.contract.d.ts +1 -1
- package/dist/test-support/index.d.ts +1 -1
- package/dist/test-support/index.js +41 -10
- package/dist/theme.d.ts +32 -32
- package/dist/toast.d.ts +1 -0
- package/dist/toast.js +7 -0
- package/dist/utils/formatClockTime.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +20 -12
- package/package.json +24 -11
- package/dist/components/call-limbo/qr-code.d.ts +0 -4
- package/dist/components/offline-actions/OfflineActions.d.ts +0 -9
- package/dist/components/participants-panel/index.d.ts +0 -2
- package/dist/components/reconnecting-overlay/ReconnectingOverlay.d.ts +0 -12
- package/dist/components/space-header/share-qr.d.ts +0 -2
- package/dist/components/space-view/countdown.d.ts +0 -5
|
@@ -11,12 +11,18 @@ export interface ParticipantTileProps {
|
|
|
11
11
|
audioLevel?: number;
|
|
12
12
|
isMuted?: boolean;
|
|
13
13
|
isVideoEnabled?: boolean;
|
|
14
|
+
/** Shows a badge while the SFU holds this camera back for the viewer's network. */
|
|
15
|
+
isVideoPausedForNetwork?: boolean;
|
|
16
|
+
/** This guest dropped out of the call and is trying to come back. */
|
|
17
|
+
isReconnecting?: boolean;
|
|
14
18
|
isScreenSharing?: boolean;
|
|
15
19
|
isHandRaised?: boolean;
|
|
16
20
|
handRaiseOrder?: number;
|
|
17
21
|
/** 0 means unknown; 1–2 show a poor-connection badge. */
|
|
18
22
|
connectionQuality?: 0 | 1 | 2 | 3 | 4;
|
|
19
23
|
avatarUrl?: string;
|
|
24
|
+
/** A remote camera's publication; the tile reports whether it is on screen so hidden video is not pulled. */
|
|
25
|
+
videoPublicationId?: string;
|
|
20
26
|
};
|
|
21
27
|
videoTrack?: MediaStreamTrack | null;
|
|
22
28
|
/** Mirror the video horizontally. Defaults to the persisted self-view preference for local cameras, false for remote cameras. */
|
|
@@ -43,9 +49,14 @@ export interface ParticipantTileProps {
|
|
|
43
49
|
export interface ParticipantTileSurfaceProps extends Omit<ParticipantTileProps, "videoTrack"> {
|
|
44
50
|
readonly media?: React.ReactNode;
|
|
45
51
|
readonly mediaVisible: boolean;
|
|
52
|
+
/** The last picture before the call dropped, drawn on a canvas; it takes the avatar's place while the call reconnects. */
|
|
53
|
+
readonly frozenFrame?: {
|
|
54
|
+
readonly node: React.ReactNode;
|
|
55
|
+
readonly shown: boolean;
|
|
56
|
+
};
|
|
46
57
|
readonly animatedAvatars?: boolean;
|
|
47
58
|
}
|
|
48
59
|
export declare const ParticipantTile: React.MemoExoticComponent<({ videoTrack, ...props }: ParticipantTileProps) => React.JSX.Element>;
|
|
49
|
-
export declare const ParticipantTileSurface: React.MemoExoticComponent<({ participant, mirror, showName, showStatus, showAvatar, generatedAvatars, aspectRatio, onClick, onDoubleClick, pinned, onFollow, following, primary, className, style, children, gradientPreference, hidden, media, mediaVisible, animatedAvatars, }: ParticipantTileSurfaceProps) => React.JSX.Element>;
|
|
60
|
+
export declare const ParticipantTileSurface: React.MemoExoticComponent<({ participant, mirror, showName, showStatus, showAvatar, generatedAvatars, aspectRatio, onClick, onDoubleClick, pinned, onFollow, following, primary, className, style, children, gradientPreference, hidden, media, mediaVisible, frozenFrame, animatedAvatars, }: ParticipantTileSurfaceProps) => React.JSX.Element>;
|
|
50
61
|
/** The weak-connection cue shares the mockup's three compact signal bars. */
|
|
51
62
|
export declare function SignalBars(): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** How a guest's own link reads on their tile. Level 2 is weak and level 1 is very poor. */
|
|
2
|
+
export declare function TileSignal({ name, level }: {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly level: 1 | 2;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
/** A guest who dropped out of the call and is trying to come back: the tile dims and shows a ring and their name. */
|
|
7
|
+
export declare function TileReconnecting({ name }: {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { type CSSProperties, type ReactNode } from "react";
|
|
2
2
|
export interface TileShellProps {
|
|
3
3
|
readonly label: string;
|
|
4
|
+
readonly participantId?: string;
|
|
4
5
|
readonly accentColor: string;
|
|
5
6
|
readonly pinned?: boolean;
|
|
6
7
|
/** The 2px ring that marks the person whose view this board follows. */
|
|
@@ -19,4 +20,4 @@ export interface TileShellProps {
|
|
|
19
20
|
readonly children?: ReactNode;
|
|
20
21
|
}
|
|
21
22
|
/** One shared frame and bottom-left name tag for camera, screen and board tiles. */
|
|
22
|
-
export declare function TileShell({ label, accentColor, pinned, ring, speaking, audioLevel, lift, onClick, onDoubleClick, className, style, dataTour, hidden, chip, corner, children }: TileShellProps): React.JSX.Element;
|
|
23
|
+
export declare function TileShell({ label, participantId, accentColor, pinned, ring, speaking, audioLevel, lift, onClick, onDoubleClick, className, style, dataTour, hidden, chip, corner, children }: TileShellProps): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from "react";
|
|
2
|
+
/** True while the call is reconnecting or has lost its connection: tiles hold their last picture instead of going blank. */
|
|
3
|
+
export declare const FrozenFramesContext: import("react").Context<boolean>;
|
|
4
|
+
export declare const useFramesFrozen: () => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Copies the visible video frame onto a canvas at the moment the call drops. Safari blanks a video whose
|
|
7
|
+
* track has ended, so the picture a person was looking at must be saved before that happens.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useFrozenFrame(videoRef: RefObject<HTMLVideoElement | null>, frozen: boolean): {
|
|
10
|
+
readonly node: ReactNode;
|
|
11
|
+
readonly shown: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tells the media client whether a remote video tile is on screen, keyed by its publication, so video nobody can see
|
|
4
|
+
* is not pulled. `onScreen` is false for a tile its layout keeps mounted but off the page.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useVideoTileVisibility(elementRef: RefObject<HTMLElement | null>, publicationId: string | undefined, onScreen: boolean): void;
|
|
@@ -13,7 +13,10 @@ export interface ParticipantListParticipant {
|
|
|
13
13
|
isMuted?: boolean;
|
|
14
14
|
isVideoEnabled?: boolean;
|
|
15
15
|
isHandRaised?: boolean;
|
|
16
|
+
/** Place in the queue of raised hands, counting from 1. */
|
|
16
17
|
handOrder?: number;
|
|
18
|
+
isSpeaking?: boolean;
|
|
19
|
+
isReconnecting?: boolean;
|
|
17
20
|
avatarUrl?: string;
|
|
18
21
|
}
|
|
19
22
|
export type ParticipantListVariant = "default" | "sidebar" | "mobile";
|
|
@@ -35,6 +38,8 @@ export interface ParticipantsPanelProps {
|
|
|
35
38
|
participantGradientPreference?: ParticipantGradientPreference;
|
|
36
39
|
/** Show a generated Facehash when a Participant has no uploaded avatar. */
|
|
37
40
|
generatedAvatars?: boolean;
|
|
41
|
+
/** Each raised hand's place in the queue. Without it the panel counts hands from when it mounted. */
|
|
42
|
+
handOrders?: ReadonlyMap<string, number>;
|
|
38
43
|
/** Show the capability-gated admission section when the Space enables it. */
|
|
39
44
|
admissionEnabled?: boolean;
|
|
40
45
|
className?: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type ParticipantOptionsMenuProps } from "./participant-options-menu-contract";
|
|
2
|
-
export declare function ParticipantOptionsMenu({ participant, variant, canManageParticipants, onClose, onAssignRole, onStopParticipantScreenShare, onMuteParticipant, onRequestUnmute, onStopParticipantCamera, onRequestStartCamera, onRemoveParticipant, onEditName, participantVolumes, onParticipantVolumeChange, onCommandError, }: ParticipantOptionsMenuProps
|
|
3
|
+
export declare function ParticipantOptionsMenu({ header, participant, variant, canManageParticipants, onClose, onAssignRole, onStopParticipantScreenShare, onMuteParticipant, onRequestUnmute, onStopParticipantCamera, onRequestStartCamera, onRemoveParticipant, onEditName, participantVolumes, onParticipantVolumeChange, onCommandError, }: ParticipantOptionsMenuProps & {
|
|
4
|
+
readonly header?: ReactNode;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
3
6
|
export { runParticipantAction, type ParticipantOptionsMenuProps } from "./participant-options-menu-contract";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParticipantListParticipant } from "./ParticipantsPanel";
|
|
2
|
+
export interface ParticipantGroups {
|
|
3
|
+
readonly you: readonly ParticipantListParticipant[];
|
|
4
|
+
readonly hands: readonly ParticipantListParticipant[];
|
|
5
|
+
readonly others: readonly ParticipantListParticipant[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* You first, then raised hands in the order they went up, then hosts, then everyone else in roster order.
|
|
9
|
+
* Nobody is sorted by name, so a row never moves while someone reads it.
|
|
10
|
+
*/
|
|
11
|
+
export declare function orderParticipants(participants: readonly ParticipantListParticipant[]): ParticipantGroups;
|
|
12
|
+
/** A hand number helps only when it tells hands apart, so it shows from two hands up. */
|
|
13
|
+
export declare function handNumbers(participants: readonly ParticipantListParticipant[]): boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ParticipantListParticipant, ParticipantListVariant } from "./ParticipantsPanel";
|
|
2
2
|
import type { ParticipantGradientPreference } from "../../utils/colorGenerator";
|
|
3
|
-
export declare function ParticipantRow({ participant, variant, canManageParticipants, onAssignRole, onStopParticipantScreenShare, onMuteParticipant, onRequestUnmute, onStopParticipantCamera, onRequestStartCamera, onRemoveParticipant, onUpdateDisplayName, onCommandError, participantVolumes, onParticipantVolumeChange, onParticipantClick, participantGradientPreference, generatedAvatars, menuOpen, onMenuToggle, onMenuClose, }: ParticipantRowProps): import("react").JSX.Element;
|
|
3
|
+
export declare function ParticipantRow({ participant, variant, canManageParticipants, onAssignRole, onStopParticipantScreenShare, onMuteParticipant, onRequestUnmute, onStopParticipantCamera, onRequestStartCamera, onRemoveParticipant, onUpdateDisplayName, onCommandError, participantVolumes, onParticipantVolumeChange, onParticipantClick, participantGradientPreference, generatedAvatars, menuOpen, onMenuToggle, onMenuClose, query, handNumber, }: ParticipantRowProps): import("react").JSX.Element;
|
|
4
4
|
export interface ParticipantRowProps {
|
|
5
5
|
onParticipantClick?: (id: string) => void;
|
|
6
6
|
participant: ParticipantListParticipant;
|
|
@@ -19,6 +19,10 @@ export interface ParticipantRowProps {
|
|
|
19
19
|
onParticipantVolumeChange?: (id: string, volume: number) => void;
|
|
20
20
|
participantGradientPreference?: ParticipantGradientPreference;
|
|
21
21
|
generatedAvatars?: boolean;
|
|
22
|
+
/** Search text to highlight in the name. */
|
|
23
|
+
query?: string;
|
|
24
|
+
/** The hand's place in the queue, set only while two or more hands are up. */
|
|
25
|
+
handNumber?: number;
|
|
22
26
|
menuOpen: boolean;
|
|
23
27
|
onMenuToggle: () => void;
|
|
24
28
|
onMenuClose: () => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ParticipantListParticipant } from "./ParticipantsPanel";
|
|
2
|
+
export declare function matchParticipants(participants: readonly ParticipantListParticipant[], query: string): ParticipantListParticipant[];
|
|
3
|
+
/** Splits a name around the first match of `query`, so the match can be highlighted. */
|
|
4
|
+
export declare function splitMatch(name: string, query: string): readonly [before: string, match: string, after: string];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CallStatsSample } from "@q9labsai/chalk-client";
|
|
2
|
+
/** One value per call-stats window, oldest first; `null` where a window measured nothing. */
|
|
3
|
+
export type NetworkSeries = readonly (number | null)[];
|
|
4
|
+
export type Charts = {
|
|
5
|
+
readonly latency: {
|
|
6
|
+
readonly points: NetworkSeries;
|
|
7
|
+
readonly headline: string;
|
|
8
|
+
};
|
|
9
|
+
readonly loss: {
|
|
10
|
+
readonly points: NetworkSeries;
|
|
11
|
+
readonly headline: string;
|
|
12
|
+
};
|
|
13
|
+
readonly bandwidth: {
|
|
14
|
+
readonly upload: NetworkSeries;
|
|
15
|
+
readonly download: NetworkSeries;
|
|
16
|
+
readonly headline: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare function callCharts(samples: readonly CallStatsSample[]): Charts | null;
|
|
20
|
+
export declare function CallChartsView({ samples }: {
|
|
21
|
+
readonly samples: readonly CallStatsSample[];
|
|
22
|
+
}): import("react").JSX.Element | null;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import { type RefObject } from "react";
|
|
2
1
|
import type { SpaceHeaderProps } from "./space-header-contract";
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
readonly
|
|
6
|
-
readonly open: boolean;
|
|
7
|
-
readonly onClose: () => void;
|
|
8
|
-
readonly onReportProblem?: SpaceHeaderProps["onReportProblem"];
|
|
9
|
-
readonly diagnostics: string;
|
|
10
|
-
readonly returnFocus?: RefObject<HTMLButtonElement | null>;
|
|
11
|
-
readonly focusScope: RefObject<HTMLElement | null>;
|
|
12
|
-
readonly unavailableReason?: string;
|
|
13
|
-
}): import("react").JSX.Element;
|
|
14
|
-
export declare function CallDetails({ shareUrl, spaceName, onClose, diagnostics, colorScheme, onColorSchemeChange, sounds, onSoundsChange, onDialog, onReportProblem, }: Pick<SpaceHeaderProps, "spaceName" | "shareUrl" | "diagnostics" | "colorScheme" | "onColorSchemeChange" | "onReportProblem"> & {
|
|
2
|
+
export declare function CallDetails({ shareUrl, spaceName, onClose, diagnostics, network, people, isRecording, colorScheme, onColorSchemeChange, sounds, onSoundsChange, onDialog, onReportProblem, revealConnection, hideShortcuts, }: Pick<SpaceHeaderProps, "spaceName" | "shareUrl" | "diagnostics" | "network" | "people" | "isRecording" | "colorScheme" | "onColorSchemeChange" | "onReportProblem"> & {
|
|
3
|
+
/** Phones have no keyboard, so the phone sheet leaves the shortcuts row out. */
|
|
4
|
+
readonly hideShortcuts?: boolean;
|
|
15
5
|
readonly onClose: () => void;
|
|
16
6
|
readonly sounds: boolean;
|
|
17
7
|
readonly onSoundsChange: (enabled: boolean) => void;
|
|
18
8
|
readonly onDialog: (kind: "shortcuts" | "report") => void;
|
|
9
|
+
/** Opened from the connection chip: the Connection row starts expanded and ringed so the person sees where the chip led. */
|
|
10
|
+
readonly revealConnection?: boolean;
|
|
19
11
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentProps } from "react";
|
|
2
|
+
declare const Content: import("react").LazyExoticComponent<typeof import("./CallDialogContent").CallDialogContent>;
|
|
3
|
+
/** The report and shortcuts dialog. Its code downloads the first time a dialog opens, and the dialog then stays mounted. */
|
|
4
|
+
export declare function CallDialog(props: ComponentProps<typeof Content>): import("react").JSX.Element | null;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { SpaceHeaderProps } from "./space-header-contract";
|
|
3
|
+
export declare const CALL_SHORTCUTS: readonly [readonly ["Mute or unmute", "⌘ D"], readonly ["Turn camera on or off", "⌘ E"], readonly ["Raise or lower hand", "⌃ ⌘ H"], readonly ["Open or close chat", "⌃ ⌘ C"], readonly ["Open or close people", "⌃ ⌘ P"], readonly ["Switch layout", "⌃ ⌘ L"], readonly ["Full screen", "⌃ ⌘ F"], readonly ["Talk while muted", "Hold Space"], readonly ["Show shortcuts", "?"], readonly ["Close a menu or panel", "Esc"]];
|
|
4
|
+
export declare function CallDialogContent({ kind, open, onClose, onReportProblem, diagnostics, returnFocus, focusScope, unavailableReason, }: {
|
|
5
|
+
readonly kind: "shortcuts" | "report";
|
|
6
|
+
readonly open: boolean;
|
|
7
|
+
readonly onClose: () => void;
|
|
8
|
+
readonly onReportProblem?: SpaceHeaderProps["onReportProblem"];
|
|
9
|
+
readonly diagnostics: string;
|
|
10
|
+
readonly returnFocus?: RefObject<HTMLButtonElement | null>;
|
|
11
|
+
readonly focusScope: RefObject<HTMLElement | null>;
|
|
12
|
+
readonly unavailableReason?: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const GLYPHS: {
|
|
2
|
+
qr: import("react").JSX.Element;
|
|
3
|
+
flag: import("react").JSX.Element;
|
|
4
|
+
keyboard: import("react").JSX.Element;
|
|
5
|
+
sun: import("react").JSX.Element;
|
|
6
|
+
bell: import("react").JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
/** Glyphs for the call menu rows; they ship with the menu, not with the header. */
|
|
9
|
+
export declare function RowIcon({ name }: {
|
|
10
|
+
readonly name: keyof typeof GLYPHS;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ConnectionSlice, type MediaSlice } from "@q9labsai/chalk-client";
|
|
2
|
+
/** Facts for the call menu and for problem reports. The Connection row stays first: the menu reads quality from `network` and skips it. */
|
|
2
3
|
export declare function callDiagnostics(connection: ConnectionSlice, media: MediaSlice): {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CallStatsSample, LinkQuality } from "@q9labsai/chalk-client";
|
|
2
|
+
export type CallQuality = {
|
|
3
|
+
/** Signal bars lit, 1 to 4. */
|
|
4
|
+
readonly level: 1 | 2 | 3 | 4;
|
|
5
|
+
readonly tone: "good" | "warn" | "bad";
|
|
6
|
+
readonly word: string;
|
|
7
|
+
readonly helper?: string;
|
|
8
|
+
};
|
|
9
|
+
/** What the call menu needs to rate the connection and draw its charts. */
|
|
10
|
+
export type CallNetwork = {
|
|
11
|
+
readonly live: boolean;
|
|
12
|
+
readonly samples?: readonly CallStatsSample[];
|
|
13
|
+
/** The steady tier the header chip shows. When present it decides weak and very poor, so the menu never disagrees with the chip. */
|
|
14
|
+
readonly link?: LinkQuality;
|
|
15
|
+
};
|
|
16
|
+
export declare const lossOf: (sample: CallStatsSample) => number | null;
|
|
17
|
+
export declare const rounded: (value: number | null, digits: number) => string;
|
|
18
|
+
export declare function connectionQuality({ live, samples, link }: CallNetwork): CallQuality;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { CallNetwork } from "./call-network";
|
|
2
3
|
export interface SpaceHeaderProps {
|
|
3
4
|
spaceName: string;
|
|
4
5
|
people?: readonly {
|
|
@@ -14,7 +15,12 @@ export interface SpaceHeaderProps {
|
|
|
14
15
|
readonly label: string;
|
|
15
16
|
readonly value: string;
|
|
16
17
|
}[];
|
|
17
|
-
|
|
18
|
+
/** Connection quality and its charts for the call menu. Without it the menu has no Connection row. */
|
|
19
|
+
network?: CallNetwork;
|
|
20
|
+
/** Whether the camera is on, so a very poor link can offer to turn it off. */
|
|
21
|
+
videoOn?: boolean;
|
|
22
|
+
/** The "Turn off video" action of the connection chip. The video stays off until the person turns it back on. */
|
|
23
|
+
onTurnOffVideo?: () => void;
|
|
18
24
|
onReportProblem?: (report: {
|
|
19
25
|
readonly description: string;
|
|
20
26
|
readonly diagnostics?: string;
|
|
@@ -29,6 +35,7 @@ export interface SpaceHeaderProps {
|
|
|
29
35
|
readonly onToggleChat?: () => void;
|
|
30
36
|
readonly onTogglePeople?: () => void;
|
|
31
37
|
readonly onToggleLayout?: () => void;
|
|
38
|
+
readonly onToggleFullscreen?: () => void;
|
|
32
39
|
readonly onClosePanel?: () => void;
|
|
33
40
|
readonly onPushToTalk?: (enabled: boolean) => void;
|
|
34
41
|
};
|
|
@@ -15,10 +15,12 @@ export interface SpacePresentationProps {
|
|
|
15
15
|
readonly dialogs?: ReactNode;
|
|
16
16
|
readonly renderToken?: string;
|
|
17
17
|
readonly interactive?: boolean;
|
|
18
|
+
/** While the call reconnects the header and dock stay on screen; once it is lost the dock dims except Leave. */
|
|
19
|
+
readonly connectionTrouble?: "reconnecting" | "lost";
|
|
18
20
|
readonly className?: string;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Presentation-only Space chrome shared by the live controller and deterministic
|
|
22
24
|
* Recording projection. Networking, device effects and commands stay in callers.
|
|
23
25
|
*/
|
|
24
|
-
export declare function SpacePresentation({ colorScheme, stageBackground, header, stage, controls, compactControls, stageOverlay, sidebar, mediaOutput, toasts, overlays, dialogs, renderToken, interactive, className }: SpacePresentationProps): React.JSX.Element;
|
|
26
|
+
export declare function SpacePresentation({ colorScheme, stageBackground, header, stage, controls, compactControls, stageOverlay, sidebar, mediaOutput, toasts, overlays, dialogs, renderToken, interactive, connectionTrouble, className }: SpacePresentationProps): React.JSX.Element;
|
|
@@ -2,7 +2,6 @@ import { type MediaCommandSource, type MediaCommandAction } from "../control-bar
|
|
|
2
2
|
import { type ChalkWhiteboardView, type ClientFailure } from "@q9labsai/chalk-client";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { ChatUploadFile } from "@q9labsai/chalk-client";
|
|
5
|
-
import { type ReconnectingOverlayProps } from "../reconnecting-overlay/ReconnectingOverlay";
|
|
6
5
|
import type { WhiteboardViewProps } from "../whiteboard-view/WhiteboardView";
|
|
7
6
|
export type SpacePanel = "chat" | "participants" | "admission";
|
|
8
7
|
export interface SpaceViewFeatures {
|
|
@@ -56,12 +55,11 @@ export interface SpaceViewProps {
|
|
|
56
55
|
readonly onDismissCommandError?: () => void;
|
|
57
56
|
readonly onToggleWhiteboard?: () => void;
|
|
58
57
|
readonly whiteboard?: SpaceViewWhiteboard;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
58
|
+
/** Rejoin after the call could not be recovered; the failed card offers it. */
|
|
59
|
+
readonly onRejoin?: () => void;
|
|
62
60
|
readonly overlay?: React.ReactNode;
|
|
63
61
|
readonly onLeft?: () => void | Promise<void>;
|
|
64
62
|
readonly onEndEpisode?: () => void | Promise<void>;
|
|
65
63
|
readonly className?: string;
|
|
66
64
|
}
|
|
67
|
-
export declare function SpaceView({ timeLimit, colorScheme, onColorSchemeChange, spaceName, shareUrl, callLinkOpen, onCallLinkToggle, onReportProblem, reportUnavailableReason, onOpenReportProblem, inviteLink, pickChatFiles, stageBackground, layout: controlledLayout, onLayoutChange, initialPanel, features, generatedAvatars, commandError: externalCommandError, commandSource: externalCommandSource, commandAction: externalCommandAction, onDismissCommandError, onToggleWhiteboard, whiteboard,
|
|
65
|
+
export declare function SpaceView({ timeLimit, colorScheme, onColorSchemeChange, spaceName, shareUrl, callLinkOpen, onCallLinkToggle, onReportProblem, reportUnavailableReason, onOpenReportProblem, inviteLink, pickChatFiles, stageBackground, layout: controlledLayout, onLayoutChange, initialPanel, features, generatedAvatars, commandError: externalCommandError, commandSource: externalCommandSource, commandAction: externalCommandAction, onDismissCommandError, onToggleWhiteboard, whiteboard, onRejoin, overlay, onLeft, onEndEpisode, className, }: SpaceViewProps): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BoardToast } from "@q9labsai/chalk-whiteboard/react";
|
|
2
|
+
import type { Toast } from "../toast-stack/ToastStack";
|
|
3
|
+
export declare function useBoardNotices(boardOpen: boolean | undefined): {
|
|
4
|
+
boardToasts: readonly Toast[];
|
|
5
|
+
showBoardToast: (toast: BoardToast | null) => void;
|
|
6
|
+
dismissBoardToast: (id: string) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConnectionStatus, MediaSlice } from "@q9labsai/chalk-client";
|
|
2
|
+
import type { Toast } from "../toast-stack/ToastStack";
|
|
3
|
+
export declare function useMicrophoneNotice(connectionStatus: ConnectionStatus, microphone: MediaSlice["local"]["microphone"]): {
|
|
4
|
+
id: string;
|
|
5
|
+
toasts: Toast[];
|
|
6
|
+
picker: {
|
|
7
|
+
open: boolean;
|
|
8
|
+
onOpenChange: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
9
|
+
};
|
|
10
|
+
dismiss: () => void;
|
|
11
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type ChalkToastProps } from "../chalk-ui/ChalkToast";
|
|
2
3
|
export interface Toast extends Omit<ChalkToastProps, "onDismiss" | "announce"> {
|
|
3
4
|
readonly id: string;
|
|
@@ -7,6 +8,7 @@ export interface ToastStackProps {
|
|
|
7
8
|
readonly onDismiss: (id: string) => void;
|
|
8
9
|
readonly maxVisible?: number;
|
|
9
10
|
readonly className?: string;
|
|
11
|
+
readonly children?: ReactNode;
|
|
10
12
|
/**
|
|
11
13
|
* Called with the ids of the notices the stage has no room for, so the host can offer them elsewhere, such as from the header.
|
|
12
14
|
* With it, a call shorter than `FOLD_BELOW_PX` folds every notice. Taller calls fold notices past `maxVisible` or outside the available band, announcing each folded message once.
|
|
@@ -19,4 +21,4 @@ export interface ToastStackProps {
|
|
|
19
21
|
* 8px gaps), and the 242px the open drawing tools lift notices by, 611px in all.
|
|
20
22
|
*/
|
|
21
23
|
export declare const FOLD_BELOW_PX = 620;
|
|
22
|
-
export declare const ToastStack: import("react").MemoExoticComponent<({ toasts, onDismiss, maxVisible, className, onFold }: ToastStackProps) => import("react").JSX.Element>;
|
|
24
|
+
export declare const ToastStack: import("react").MemoExoticComponent<({ toasts, onDismiss, maxVisible, className, onFold, children }: ToastStackProps) => import("react").JSX.Element>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type MediaCommandSource, type MediaCommandAction } from "../control-bar/command-failure";
|
|
2
|
-
import type
|
|
2
|
+
import { type CallEvent, type ClientFailure, type SpaceSnapshot } from "@q9labsai/chalk-client";
|
|
3
3
|
import type { Toast } from "./ToastStack";
|
|
4
4
|
export declare function mediaFailureToast(failure: ClientFailure | null, source?: MediaCommandSource, action?: MediaCommandAction, onRetry?: () => void): Omit<Toast, "id"> | null;
|
|
5
|
-
/**
|
|
5
|
+
/** The toast a call event gets on the web, or null when the web says nothing for it. */
|
|
6
|
+
export declare function callEventToast(event: CallEvent): Omit<Toast, "id"> | null;
|
|
7
|
+
/** The toasts for what changed between two snapshots, for previews that have no client. */
|
|
6
8
|
export declare function callEventToasts(previous: SpaceSnapshot, next: SpaceSnapshot): Omit<Toast, "id">[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export { ChalkProvider } from "./bindings/context";
|
|
2
2
|
export type { ChalkProviderProps } from "./bindings/context";
|
|
3
3
|
export { useCan, useChat, useConnection, useMedia, useScreenShare, useOffline, useParticipants, useReactions, useRecording, useSelf, useSpaceClient, useWhiteboard } from "./bindings/hooks";
|
|
4
|
+
export { usePreJoinDevices } from "./pre-join/usePreJoinDevices";
|
|
5
|
+
export type { PreJoinAccess, PreJoinDevices, PreJoinJoinOptions } from "./pre-join/usePreJoinDevices";
|
|
6
|
+
export { listedRememberedDevices, readRememberedDevices } from "./pre-join/remembered-devices";
|
|
7
|
+
export type { RememberedDevices } from "./pre-join/remembered-devices";
|
|
4
8
|
export { Chalk } from "./components/chalk/Chalk";
|
|
5
9
|
export type { ChalkFeatures, ChalkProps, SpaceLayout } from "./components/chalk/Chalk";
|
|
6
10
|
export { RecordingSpaceView } from "./components/space-view/RecordingSpaceView";
|