@q9labsai/chalk-react 5.0.1 → 5.2.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/CHANGELOG.md +186 -0
- package/dist/bindings/context.d.ts +0 -1
- package/dist/bindings/hooks.d.ts +2 -1
- package/dist/{chunk-NPOO7BOX.js → chunk-CYC2G42K.js} +68 -59
- package/dist/{chunk-XN2E352E.js → chunk-G62BKRNX.js} +2999 -774
- package/dist/{chunk-WRAEH24P.js → chunk-HWQLW4JR.js} +56 -6
- package/dist/components/admission-panel/AdmissionPanel.d.ts +0 -1
- package/dist/components/atomic/AudioIndicator.d.ts +0 -1
- package/dist/components/atomic/Avatar.d.ts +0 -1
- package/dist/components/atomic/HandRaiseIndicator.d.ts +0 -1
- package/dist/components/atomic/NameTag.d.ts +0 -1
- package/dist/components/atomic/ReactionBubble.d.ts +0 -1
- package/dist/components/atomic/StatusBadge.d.ts +0 -1
- package/dist/components/atomic/VolumeSlider.d.ts +0 -1
- package/dist/components/atomic/Waveform.d.ts +0 -1
- package/dist/components/atomic/index.d.ts +0 -1
- package/dist/components/audio-output/AudioOutput.d.ts +0 -1
- package/dist/components/board/Board.d.ts +22 -0
- package/dist/components/board/BoardCursors.d.ts +21 -0
- package/dist/components/board/BoardIcon.d.ts +46 -0
- package/dist/components/board/BoardIsland.d.ts +21 -0
- package/dist/components/board/BoardMenu.d.ts +18 -0
- package/dist/components/board/BoardStyles.d.ts +2 -0
- package/dist/components/board/board-draw-policy.d.ts +15 -0
- package/dist/components/board/board-engine.d.ts +31 -0
- package/dist/components/board/board-history.d.ts +7 -0
- package/dist/components/board/board-model.d.ts +90 -0
- package/dist/components/board/board-toasts.d.ts +6 -0
- package/dist/components/board/board-view-versions.d.ts +1 -0
- package/dist/components/call-card/CallCard.d.ts +0 -1
- package/dist/components/call-card/CallCardStyles.d.ts +0 -1
- package/dist/components/call-limbo/CallLimbo.d.ts +3 -2
- package/dist/components/call-limbo/CallReady.d.ts +0 -1
- package/dist/components/call-limbo/qr-code.d.ts +0 -1
- package/dist/components/call-limbo/useCallLink.d.ts +0 -1
- package/dist/components/chalk/Chalk.d.ts +4 -1
- package/dist/components/chalk/ReportProblemDialog.d.ts +12 -0
- package/dist/components/chalk/StatusSurface.d.ts +4 -2
- package/dist/components/chalk-ui/ChalkAlert.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkBackdrop.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkBadge.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkButton.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkCopyButton.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkDialogPanel.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkDivider.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkEmptyState.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkIconButton.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkInput.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkMenu.d.ts +2 -2
- package/dist/components/chalk-ui/ChalkPanel.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkPopover.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkSegmentedControl.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkSheet.d.ts +1 -2
- package/dist/components/chalk-ui/ChalkSpinner.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkTextarea.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkToast.d.ts +7 -2
- package/dist/components/chalk-ui/ChalkToggle.d.ts +0 -1
- package/dist/components/chalk-ui/ChalkTooltip.d.ts +0 -1
- package/dist/components/chalk-ui/common.d.ts +0 -1
- package/dist/components/chalk-ui/index.d.ts +0 -1
- package/dist/components/composite/ChatPanel.d.ts +0 -1
- package/dist/components/composite/CommandErrorAlert.d.ts +0 -1
- package/dist/components/composite/MessageBubble.d.ts +0 -1
- package/dist/components/composite/ReactionPicker.d.ts +0 -1
- package/dist/components/composite/ReactionTray.d.ts +0 -1
- package/dist/components/composite/ReactionsOverlay.d.ts +0 -1
- package/dist/components/composite/ScreenShareView.d.ts +0 -1
- package/dist/components/composite/chat-file-upload.d.ts +0 -1
- package/dist/components/composite/chat-panel-model.d.ts +0 -1
- package/dist/components/composite/chat-types.d.ts +0 -1
- package/dist/components/composite/chat-upload-file.d.ts +0 -1
- package/dist/components/composite/reaction-float.d.ts +0 -1
- package/dist/components/composite/use-chat-attachment-previews.d.ts +0 -1
- package/dist/components/control-bar/CallLinkIcon.d.ts +0 -1
- package/dist/components/control-bar/ControlBar.d.ts +0 -1
- package/dist/components/control-bar/DockLayout.d.ts +0 -1
- package/dist/components/control-bar/LeaveMenu.d.ts +0 -1
- package/dist/components/control-bar/ShareControl.d.ts +3 -2
- package/dist/components/control-bar/ShellIcon.d.ts +0 -1
- package/dist/components/control-bar/ShellStyles.d.ts +0 -1
- package/dist/components/control-bar/command-failure.d.ts +105 -2
- package/dist/components/control-bar/control-bar-behavior.d.ts +9 -3
- package/dist/components/control-bar/control-bar-button.d.ts +0 -1
- package/dist/components/control-bar/next-camera.d.ts +0 -1
- package/dist/components/device-popover/DevicePopover.d.ts +4 -2
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +3 -3
- package/dist/components/lazy.d.ts +0 -1
- package/dist/components/logo/Logo.d.ts +0 -1
- package/dist/components/media-request-dialog/MediaRequestDialog.d.ts +0 -1
- package/dist/components/media-request-dialog/media-request-dialog-state.d.ts +0 -1
- package/dist/components/offline-actions/OfflineActions.d.ts +2 -2
- package/dist/components/participant-grid/ParticipantGrid.d.ts +0 -1
- package/dist/components/participant-tile/ParticipantTile.d.ts +4 -2
- package/dist/components/participant-tile/TileShell.d.ts +3 -2
- package/dist/components/participant-tile/useVideoTrack.d.ts +0 -1
- package/dist/components/participants-panel/ParticipantsPanel.d.ts +0 -1
- package/dist/components/participants-panel/index.d.ts +0 -1
- package/dist/components/participants-panel/participant-options-menu-contract.d.ts +0 -1
- package/dist/components/participants-panel/participant-options-menu.d.ts +0 -1
- package/dist/components/participants-panel/participant-row.d.ts +0 -1
- package/dist/components/participants-panel/participant-volume-context.d.ts +0 -1
- package/dist/components/reconnecting-overlay/ReconnectingOverlay.d.ts +0 -1
- package/dist/components/recording-history/RecordingHistoryPanel.d.ts +0 -1
- package/dist/components/space-header/CallDetails.d.ts +6 -4
- package/dist/components/space-header/LayoutMenu.d.ts +0 -1
- package/dist/components/space-header/SpaceHeader.d.ts +0 -1
- package/dist/components/space-header/call-diagnostics.d.ts +0 -1
- package/dist/components/space-header/share-qr.d.ts +0 -1
- package/dist/components/space-header/space-header-contract.d.ts +5 -1
- package/dist/components/space-header/useCallShortcuts.d.ts +0 -1
- package/dist/components/space-view/RecordingSpaceView.d.ts +0 -1
- package/dist/components/space-view/SpacePresentation.d.ts +0 -1
- package/dist/components/space-view/SpaceView.d.ts +10 -3
- package/dist/components/space-view/useDrawerPresence.d.ts +0 -1
- package/dist/components/stage/SpaceStage.d.ts +3 -2
- package/dist/components/stage/Stage.d.ts +6 -3
- package/dist/components/stage/StageContentTile.d.ts +0 -1
- package/dist/components/stage/StageIcon.d.ts +0 -1
- package/dist/components/stage/StageMotion.d.ts +0 -1
- package/dist/components/stage/stage-items.d.ts +4 -1
- package/dist/components/stage/stage-layout.d.ts +7 -2
- package/dist/components/stage/useStageDimensions.d.ts +0 -1
- package/dist/components/toast-stack/CallEventIcon.d.ts +1 -2
- package/dist/components/toast-stack/NoticeButton.d.ts +7 -0
- package/dist/components/toast-stack/ToastStack.d.ts +13 -3
- package/dist/components/toast-stack/call-events.d.ts +2 -2
- package/dist/components/toast-stack/notice-announcement.d.ts +4 -0
- package/dist/components/toast-stack/toast-layout-snapshot.d.ts +4 -0
- package/dist/components/toast-stack/useCallToasts.d.ts +0 -1
- package/dist/components/toast-stack/useToastCapacity.d.ts +7 -0
- package/dist/components/ui/index.d.ts +0 -1
- package/dist/components/whiteboard-view/RecordingWhiteboardView.d.ts +0 -1
- package/dist/components/whiteboard-view/WhiteboardView.d.ts +0 -1
- package/dist/components/whiteboard-view/recording-whiteboard-state.d.ts +0 -1
- package/dist/headless.d.ts +0 -1
- package/dist/headless.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -3
- package/dist/internal/call-motion.d.ts +0 -1
- package/dist/internal/sound-cues.d.ts +0 -1
- package/dist/internal/useEpisodeDuration.d.ts +0 -1
- package/dist/internal/useHaptics.d.ts +0 -1
- package/dist/internal/useMediaQuery.d.ts +0 -1
- package/dist/internal/useMirrorSetting.d.ts +0 -1
- package/dist/internal/useSoundCues.d.ts +0 -1
- package/dist/internal/useSoundsSetting.d.ts +0 -1
- package/dist/internal/useWhiteboardSceneSubscription.d.ts +0 -1
- package/dist/internal/whiteboard-view-limits.d.ts +1 -0
- package/dist/public-surface.contract.d.ts +1 -2
- package/dist/selectors/space-selectors.d.ts +0 -1
- package/dist/test-support/index.d.ts +0 -1
- package/dist/test-support/index.js +26 -4
- package/dist/test-support/preview-client.d.ts +0 -1
- package/dist/test-support/preview-devices.d.ts +0 -1
- package/dist/test-support/preview-fixtures.d.ts +0 -1
- package/dist/theme.d.ts +0 -1
- package/dist/utils/cn.d.ts +0 -1
- package/dist/utils/colorGenerator.d.ts +0 -1
- package/dist/utils/icons.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/theme.d.ts +0 -1
- package/dist/whiteboard/wire-adapters.d.ts +0 -1
- package/package.json +6 -5
- package/dist/bindings/context.d.ts.map +0 -1
- package/dist/bindings/hooks.d.ts.map +0 -1
- package/dist/components/admission-panel/AdmissionPanel.d.ts.map +0 -1
- package/dist/components/atomic/AudioIndicator.d.ts.map +0 -1
- package/dist/components/atomic/Avatar.d.ts.map +0 -1
- package/dist/components/atomic/HandRaiseIndicator.d.ts.map +0 -1
- package/dist/components/atomic/NameTag.d.ts.map +0 -1
- package/dist/components/atomic/ReactionBubble.d.ts.map +0 -1
- package/dist/components/atomic/StatusBadge.d.ts.map +0 -1
- package/dist/components/atomic/VolumeSlider.d.ts.map +0 -1
- package/dist/components/atomic/Waveform.d.ts.map +0 -1
- package/dist/components/atomic/index.d.ts.map +0 -1
- package/dist/components/audio-output/AudioOutput.d.ts.map +0 -1
- package/dist/components/call-card/CallCard.d.ts.map +0 -1
- package/dist/components/call-card/CallCardStyles.d.ts.map +0 -1
- package/dist/components/call-limbo/CallLimbo.d.ts.map +0 -1
- package/dist/components/call-limbo/CallReady.d.ts.map +0 -1
- package/dist/components/call-limbo/qr-code.d.ts.map +0 -1
- package/dist/components/call-limbo/useCallLink.d.ts.map +0 -1
- package/dist/components/chalk/Chalk.d.ts.map +0 -1
- package/dist/components/chalk/StatusSurface.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkAlert.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkBackdrop.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkBadge.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkButton.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkCopyButton.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkDialogPanel.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkDivider.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkEmptyState.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkIconButton.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkInput.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkMenu.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkPanel.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkPopover.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkSegmentedControl.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkSheet.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkSpinner.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkTextarea.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkToast.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkToggle.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkTooltip.d.ts.map +0 -1
- package/dist/components/chalk-ui/common.d.ts.map +0 -1
- package/dist/components/chalk-ui/index.d.ts.map +0 -1
- package/dist/components/composite/ChatPanel.d.ts.map +0 -1
- package/dist/components/composite/CommandErrorAlert.d.ts.map +0 -1
- package/dist/components/composite/MessageBubble.d.ts.map +0 -1
- package/dist/components/composite/ReactionPicker.d.ts.map +0 -1
- package/dist/components/composite/ReactionTray.d.ts.map +0 -1
- package/dist/components/composite/ReactionsOverlay.d.ts.map +0 -1
- package/dist/components/composite/ScreenShareView.d.ts.map +0 -1
- package/dist/components/composite/chat-file-upload.d.ts.map +0 -1
- package/dist/components/composite/chat-panel-model.d.ts.map +0 -1
- package/dist/components/composite/chat-types.d.ts.map +0 -1
- package/dist/components/composite/chat-upload-file.d.ts.map +0 -1
- package/dist/components/composite/reaction-float.d.ts.map +0 -1
- package/dist/components/composite/use-chat-attachment-previews.d.ts.map +0 -1
- package/dist/components/control-bar/CallLinkIcon.d.ts.map +0 -1
- package/dist/components/control-bar/ControlBar.d.ts.map +0 -1
- package/dist/components/control-bar/DockLayout.d.ts.map +0 -1
- package/dist/components/control-bar/LeaveMenu.d.ts.map +0 -1
- package/dist/components/control-bar/ShareControl.d.ts.map +0 -1
- package/dist/components/control-bar/ShellIcon.d.ts.map +0 -1
- package/dist/components/control-bar/ShellStyles.d.ts.map +0 -1
- package/dist/components/control-bar/command-failure.d.ts.map +0 -1
- package/dist/components/control-bar/control-bar-behavior.d.ts.map +0 -1
- package/dist/components/control-bar/control-bar-button.d.ts.map +0 -1
- package/dist/components/control-bar/next-camera.d.ts.map +0 -1
- package/dist/components/device-popover/DevicePopover.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/lazy.d.ts.map +0 -1
- package/dist/components/logo/Logo.d.ts.map +0 -1
- package/dist/components/media-request-dialog/MediaRequestDialog.d.ts.map +0 -1
- package/dist/components/media-request-dialog/media-request-dialog-state.d.ts.map +0 -1
- package/dist/components/offline-actions/OfflineActions.d.ts.map +0 -1
- package/dist/components/participant-grid/ParticipantGrid.d.ts.map +0 -1
- package/dist/components/participant-tile/ParticipantTile.d.ts.map +0 -1
- package/dist/components/participant-tile/TileShell.d.ts.map +0 -1
- package/dist/components/participant-tile/useVideoTrack.d.ts.map +0 -1
- package/dist/components/participants-panel/ParticipantsPanel.d.ts.map +0 -1
- package/dist/components/participants-panel/index.d.ts.map +0 -1
- package/dist/components/participants-panel/participant-options-menu-contract.d.ts.map +0 -1
- package/dist/components/participants-panel/participant-options-menu.d.ts.map +0 -1
- package/dist/components/participants-panel/participant-row.d.ts.map +0 -1
- package/dist/components/participants-panel/participant-volume-context.d.ts.map +0 -1
- package/dist/components/reconnecting-overlay/ReconnectingOverlay.d.ts.map +0 -1
- package/dist/components/recording-history/RecordingHistoryPanel.d.ts.map +0 -1
- package/dist/components/space-header/CallDetails.d.ts.map +0 -1
- package/dist/components/space-header/LayoutMenu.d.ts.map +0 -1
- package/dist/components/space-header/SpaceHeader.d.ts.map +0 -1
- package/dist/components/space-header/call-diagnostics.d.ts.map +0 -1
- package/dist/components/space-header/share-qr.d.ts.map +0 -1
- package/dist/components/space-header/space-header-contract.d.ts.map +0 -1
- package/dist/components/space-header/useCallShortcuts.d.ts.map +0 -1
- package/dist/components/space-view/RecordingSpaceView.d.ts.map +0 -1
- package/dist/components/space-view/SpacePresentation.d.ts.map +0 -1
- package/dist/components/space-view/SpaceView.d.ts.map +0 -1
- package/dist/components/space-view/useDrawerPresence.d.ts.map +0 -1
- package/dist/components/stage/SpaceStage.d.ts.map +0 -1
- package/dist/components/stage/Stage.d.ts.map +0 -1
- package/dist/components/stage/StageContentTile.d.ts.map +0 -1
- package/dist/components/stage/StageIcon.d.ts.map +0 -1
- package/dist/components/stage/StageMotion.d.ts.map +0 -1
- package/dist/components/stage/stage-items.d.ts.map +0 -1
- package/dist/components/stage/stage-layout.d.ts.map +0 -1
- package/dist/components/stage/useStageDimensions.d.ts.map +0 -1
- package/dist/components/toast-stack/CallEventIcon.d.ts.map +0 -1
- package/dist/components/toast-stack/ToastStack.d.ts.map +0 -1
- package/dist/components/toast-stack/call-events.d.ts.map +0 -1
- package/dist/components/toast-stack/useCallToasts.d.ts.map +0 -1
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/whiteboard-view/RecordingWhiteboardView.d.ts.map +0 -1
- package/dist/components/whiteboard-view/WhiteboardView.d.ts.map +0 -1
- package/dist/components/whiteboard-view/recording-whiteboard-state.d.ts.map +0 -1
- package/dist/headless.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/call-motion.d.ts.map +0 -1
- package/dist/internal/sound-cues.d.ts.map +0 -1
- package/dist/internal/useEpisodeDuration.d.ts.map +0 -1
- package/dist/internal/useHaptics.d.ts.map +0 -1
- package/dist/internal/useMediaQuery.d.ts.map +0 -1
- package/dist/internal/useMirrorSetting.d.ts.map +0 -1
- package/dist/internal/useSoundCues.d.ts.map +0 -1
- package/dist/internal/useSoundsSetting.d.ts.map +0 -1
- package/dist/internal/useWhiteboardSceneSubscription.d.ts.map +0 -1
- package/dist/public-surface.contract.d.ts.map +0 -1
- package/dist/selectors/space-selectors.d.ts.map +0 -1
- package/dist/test-support/index.d.ts.map +0 -1
- package/dist/test-support/preview-client.d.ts.map +0 -1
- package/dist/test-support/preview-devices.d.ts.map +0 -1
- package/dist/test-support/preview-fixtures.d.ts.map +0 -1
- package/dist/theme.d.ts.map +0 -1
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/colorGenerator.d.ts.map +0 -1
- package/dist/utils/icons.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/theme.d.ts.map +0 -1
- package/dist/whiteboard/wire-adapters.d.ts.map +0 -1
|
@@ -55,11 +55,13 @@ function fitGrid(box, ids, options, wideIds = []) {
|
|
|
55
55
|
let plan = null;
|
|
56
56
|
let overflowCount = 0;
|
|
57
57
|
const weight = (id) => wideIds.includes(id) ? 2 : 1;
|
|
58
|
-
|
|
58
|
+
const lastContent = ids.reduce((last, id, index2) => wideIds.includes(id) ? index2 : last, -1);
|
|
59
|
+
const fewest = Math.min(ids.length, Math.max(wideIds.includes(ids[0] ?? "") ? 2 : 1, lastContent + 2));
|
|
60
|
+
for (let count = Math.min(ids.length, Math.floor(options.maxPerPage)); count >= 1; count -= 1) {
|
|
59
61
|
overflowCount = count < ids.length ? ids.length - count + 1 : 0;
|
|
60
62
|
keys = overflowCount ? [...ids.slice(0, count - 1), MORE_TILE_ID] : ids;
|
|
61
63
|
plan = rowPlan(box, keys.map(weight), options);
|
|
62
|
-
if (plan && (plan.minWidth >= options.minTileWidth && plan.height >= options.minTileHeight || count <=
|
|
64
|
+
if (plan && (plan.minWidth >= options.minTileWidth && plan.height >= options.minTileHeight || count <= fewest)) break;
|
|
63
65
|
}
|
|
64
66
|
if (!plan) return EMPTY_GEOMETRY;
|
|
65
67
|
let height = plan.height;
|
|
@@ -89,15 +91,52 @@ function contain(box, aspect) {
|
|
|
89
91
|
const width = Math.min(box.width, box.height * aspect);
|
|
90
92
|
return { width, height: width / aspect };
|
|
91
93
|
}
|
|
94
|
+
var FLOAT_SPEAKER = { width: 120, height: 68 };
|
|
95
|
+
var FLOAT_PERSON = { width: 76, height: 44 };
|
|
96
|
+
var FLOAT_MAX_PEOPLE = 3;
|
|
97
|
+
var FLOAT_TOP = 56;
|
|
98
|
+
var FLOAT_BOTTOM = 8 + 64 + 60;
|
|
99
|
+
function floatPeople(box, primaryId, stripIds, options) {
|
|
100
|
+
const content = stripIds.filter((id) => options.wideIds?.includes(id));
|
|
101
|
+
const people = stripIds.filter((id) => !content.includes(id));
|
|
102
|
+
const speaker = options.speakerId && options.speakerId !== options.localId && people.includes(options.speakerId) ? options.speakerId : null;
|
|
103
|
+
const local = options.localId && people.includes(options.localId) ? options.localId : null;
|
|
104
|
+
const others = people.filter((id) => id !== speaker && id !== local);
|
|
105
|
+
const ordered = [...speaker ? [speaker] : [], ...others, ...local ? [local] : []];
|
|
106
|
+
const fold = (max2) => {
|
|
107
|
+
if (content.length + ordered.length <= max2) return [...content, ...ordered];
|
|
108
|
+
const shares = content.slice(0, max2 - 1);
|
|
109
|
+
const slots = max2 - 1 - shares.length;
|
|
110
|
+
const faces = ordered.length <= slots ? ordered : slots > 0 ? [...ordered.slice(0, slots - 1), ...ordered.slice(-1)] : [];
|
|
111
|
+
return [...shares, ...faces, MORE_TILE_ID];
|
|
112
|
+
};
|
|
113
|
+
const sizeOf = (id) => id === speaker || content.includes(id) ? FLOAT_SPEAKER : FLOAT_PERSON;
|
|
114
|
+
const bottomOf = (ids) => ids.reduce((y2, id) => y2 + sizeOf(id).height + options.gap, FLOAT_TOP) - options.gap;
|
|
115
|
+
let max = Math.max(1, Math.min(content.length + FLOAT_MAX_PEOPLE, options.maxPerPage ?? Infinity));
|
|
116
|
+
const minimum = Number.isFinite(options.maxPerPage) ? 1 : content.length + 1;
|
|
117
|
+
while (max > minimum && bottomOf(fold(max)) > box.height - FLOAT_BOTTOM) max -= 1;
|
|
118
|
+
const column = fold(max);
|
|
119
|
+
if (bottomOf(column) > box.height - FLOAT_BOTTOM) return null;
|
|
120
|
+
let y = FLOAT_TOP;
|
|
121
|
+
const floats = column.map((id) => {
|
|
122
|
+
const size = sizeOf(id);
|
|
123
|
+
const frame = { id, role: "float", page: 0, x: box.width - 12 - size.width, y, ...size };
|
|
124
|
+
y += size.height + options.gap;
|
|
125
|
+
return frame;
|
|
126
|
+
});
|
|
127
|
+
const shown = floats.filter((frame) => frame.id !== MORE_TILE_ID).length;
|
|
128
|
+
return { frames: [{ id: primaryId, role: "primary", page: 0, x: 0, y: 0, ...box }, ...floats], pageCount: 1, perPage: floats.length, overflowCount: stripIds.length - shown };
|
|
129
|
+
}
|
|
92
130
|
function fitSpotlight(box, primaryId, stripIds, options) {
|
|
93
131
|
const phone = box.width <= 640;
|
|
132
|
+
const maxPerPage = Math.floor(options.maxPerPage ?? Infinity);
|
|
94
133
|
const aspect = options.primaryAspect === void 0 ? WIDESCREEN : options.primaryAspect;
|
|
95
|
-
if (!stripIds.length) {
|
|
134
|
+
if (!stripIds.length || maxPerPage <= 0) {
|
|
96
135
|
const aspect2 = clamp(box.width / box.height, 4 / 3, WIDESCREEN);
|
|
97
136
|
const fitted = contain(box, aspect2);
|
|
98
137
|
const width = options.content || phone ? box.width : Math.min(box.width * 0.56, fitted.width);
|
|
99
138
|
const height = options.content || phone ? box.height : width / aspect2;
|
|
100
|
-
return { frames: [{ id: primaryId, role: "primary", page: 0, x: (box.width - width) / 2, y: (box.height - height) / 2, width, height }], pageCount: 1, perPage: 0 };
|
|
139
|
+
return { frames: [{ id: primaryId, role: "primary", page: 0, x: (box.width - width) / 2, y: (box.height - height) / 2, width, height }], pageCount: 1, perPage: 0, overflowCount: stripIds.length };
|
|
101
140
|
}
|
|
102
141
|
if (phone && stripIds.length === 1 && !options.content) {
|
|
103
142
|
return {
|
|
@@ -109,14 +148,17 @@ function fitSpotlight(box, primaryId, stripIds, options) {
|
|
|
109
148
|
perPage: 1
|
|
110
149
|
};
|
|
111
150
|
}
|
|
112
|
-
const
|
|
151
|
+
const floating = phone && options.floatingPhonePeople ? floatPeople(box, primaryId, stripIds, { ...options, maxPerPage }) : null;
|
|
152
|
+
if (floating) return floating;
|
|
153
|
+
const slim = phone && options.slimPhoneStrip === true;
|
|
154
|
+
const strip = slim ? 52 : phone ? Math.round(box.height * 0.3) : clamp(box.height * options.stripRatio, options.minStripHeight, options.maxStripHeight);
|
|
113
155
|
const column = phone && options.content ? 120 : clamp(box.width * 0.15, 180, 260);
|
|
114
156
|
const belowMain = options.content ? contain({ width: box.width, height: box.height - strip - options.gap }, aspect) : { width: box.width, height: box.height - strip - options.gap };
|
|
115
157
|
const besideMain = options.content ? contain({ width: box.width - column - options.gap, height: box.height }, aspect) : { width: box.width - column - options.gap, height: box.height };
|
|
116
158
|
const beside = options.content ? besideMain.width * besideMain.height > belowMain.width * belowMain.height * 1.005 : !phone && Math.abs(Math.log(besideMain.width / besideMain.height / WIDESCREEN)) < Math.abs(Math.log(belowMain.width / belowMain.height / WIDESCREEN));
|
|
117
159
|
const main = { width: beside ? besideMain.width : box.width, height: beside ? box.height : belowMain.height };
|
|
118
160
|
const remaining = { width: beside ? box.width - main.width - options.gap : box.width, height: beside ? box.height : box.height - main.height - options.gap };
|
|
119
|
-
const people = fitGrid(remaining, stripIds, { ...DEFAULT_GRID_OPTIONS, minTileWidth: phone ? 88 : 150, minTileHeight: phone ? 72 : 96, maxPerPage
|
|
161
|
+
const people = fitGrid(remaining, stripIds, { ...DEFAULT_GRID_OPTIONS, minTileWidth: phone ? 88 : 150, minTileHeight: slim ? 52 : phone ? 72 : 96, maxPerPage }, options.wideIds);
|
|
120
162
|
return {
|
|
121
163
|
...people,
|
|
122
164
|
frames: [{ id: primaryId, role: "primary", page: 0, x: 0, y: 0, ...main }, ...people.frames.map((frame) => ({ ...frame, role: "strip", x: frame.x + (beside ? main.width + options.gap : 0), y: frame.y + (beside ? 0 : main.height + options.gap) }))]
|
|
@@ -180,6 +222,12 @@ function choosePrimary(items, context) {
|
|
|
180
222
|
if (content) return content;
|
|
181
223
|
return participantWhere(items, (participant) => participant.isActiveSpeaker === true) ?? participantWhere(items, (participant) => participant.isSpeaking === true) ?? (context.lastSpeakerId ? items.find((item) => item.kind === "participant" && item.id === context.lastSpeakerId) : void 0) ?? participantWhere(items, (participant) => !participant.isLocal) ?? participantWhere(items, () => true) ?? items[0] ?? null;
|
|
182
224
|
}
|
|
225
|
+
function speakingParticipantId(items, accept = () => true) {
|
|
226
|
+
return (participantWhere(items, (participant) => accept(participant) && participant.isActiveSpeaker === true) ?? participantWhere(items, (participant) => accept(participant) && participant.isSpeaking === true))?.id;
|
|
227
|
+
}
|
|
228
|
+
function floatingSpeakerId(items, lastRemoteSpeakerId) {
|
|
229
|
+
return speakingParticipantId(items, (participant) => !participant.isLocal) ?? lastRemoteSpeakerId;
|
|
230
|
+
}
|
|
183
231
|
function gridOrder(items, pinnedId) {
|
|
184
232
|
if (!pinnedId) return [...items];
|
|
185
233
|
const pinned = items.find((item) => item.id === pinnedId);
|
|
@@ -199,5 +247,7 @@ export {
|
|
|
199
247
|
isContentItem,
|
|
200
248
|
stabilizeOrder,
|
|
201
249
|
choosePrimary,
|
|
250
|
+
speakingParticipantId,
|
|
251
|
+
floatingSpeakerId,
|
|
202
252
|
gridOrder
|
|
203
253
|
};
|
|
@@ -15,4 +15,3 @@ export interface AvatarProps {
|
|
|
15
15
|
seed?: number | string;
|
|
16
16
|
}
|
|
17
17
|
export declare const Avatar: React.MemoExoticComponent<({ name, src, size, status, className, style, gradientPreference, generated, animated }: AvatarProps) => React.JSX.Element>;
|
|
18
|
-
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -8,4 +8,3 @@ interface HandRaiseIndicatorProps {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const HandRaiseIndicator: React.MemoExoticComponent<({ raised, animated, position, size, className }: HandRaiseIndicatorProps) => React.JSX.Element | null>;
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=HandRaiseIndicator.d.ts.map
|
|
@@ -11,4 +11,3 @@ export interface ReactionBubbleProps {
|
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
13
|
export declare const ReactionBubble: React.MemoExoticComponent<({ emoji, participantName, onComplete, duration: baseDuration, animated, className }: ReactionBubbleProps) => React.JSX.Element | null>;
|
|
14
|
-
//# sourceMappingURL=ReactionBubble.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ChalkWhiteboardView } from "@q9labsai/chalk-client";
|
|
2
|
+
import type { Participant } from "../participant-grid/ParticipantGrid";
|
|
3
|
+
import type { WhiteboardViewProps } from "../whiteboard-view/WhiteboardView";
|
|
4
|
+
import { type CallTheme } from "./board-model";
|
|
5
|
+
export type BoardProps = {
|
|
6
|
+
readonly board: WhiteboardViewProps;
|
|
7
|
+
/** False for the Grid tile: the live drawing with no controls. */
|
|
8
|
+
readonly primary: boolean;
|
|
9
|
+
readonly visible: boolean;
|
|
10
|
+
readonly colorScheme: CallTheme;
|
|
11
|
+
readonly people: readonly Participant[];
|
|
12
|
+
readonly following: string | null;
|
|
13
|
+
readonly onFollow: (participantId: string | null) => void;
|
|
14
|
+
/** Absent, or answering false, when the board service does not share views. */
|
|
15
|
+
readonly sendView?: (view: ChalkWhiteboardView) => boolean;
|
|
16
|
+
readonly onClose?: () => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Chalk's board: Excalidraw draws, and every control around it is the call's own. Each person picks their own
|
|
20
|
+
* surface and island place; the drawing, the cursors and the views are shared.
|
|
21
|
+
*/
|
|
22
|
+
export declare function Board({ board, primary, visible, colorScheme, people, following, onFollow, sendView, onClose }: BoardProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
import { type Camera } from "./board-model";
|
|
3
|
+
export type RemoteCursor = {
|
|
4
|
+
readonly participantId: string;
|
|
5
|
+
readonly displayName: string;
|
|
6
|
+
readonly x: number;
|
|
7
|
+
readonly y: number;
|
|
8
|
+
readonly occurredAt: string;
|
|
9
|
+
};
|
|
10
|
+
/** Pruning belongs to receipt too: grid boards do not mount the cursor layer. */
|
|
11
|
+
export declare function rememberCursor(cursors: Map<string, RemoteCursor>, cursor: RemoteCursor): void;
|
|
12
|
+
/**
|
|
13
|
+
* Remote people's cursors over the board: a rounded arrow, the Facehash and the name, in the person's colour.
|
|
14
|
+
* Updates arrive about 15 times a second and unevenly, so each shown cursor is a spring chasing the newest one.
|
|
15
|
+
*/
|
|
16
|
+
export declare function BoardCursors({ cursorsRef, cameraRef, colorFor, hidden }: {
|
|
17
|
+
readonly cursorsRef: MutableRefObject<Map<string, RemoteCursor>>;
|
|
18
|
+
readonly cameraRef: MutableRefObject<Camera>;
|
|
19
|
+
readonly colorFor: (participantId: string) => string;
|
|
20
|
+
readonly hidden: boolean;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const GLYPHS: {
|
|
2
|
+
readonly select: import("react").JSX.Element;
|
|
3
|
+
readonly hand: import("react").JSX.Element;
|
|
4
|
+
readonly pen: import("react").JSX.Element;
|
|
5
|
+
readonly highlighter: import("react").JSX.Element;
|
|
6
|
+
readonly rectangle: import("react").JSX.Element;
|
|
7
|
+
readonly ellipse: import("react").JSX.Element;
|
|
8
|
+
readonly diamond: import("react").JSX.Element;
|
|
9
|
+
readonly arrow: import("react").JSX.Element;
|
|
10
|
+
readonly line: import("react").JSX.Element;
|
|
11
|
+
readonly text: import("react").JSX.Element;
|
|
12
|
+
readonly note: import("react").JSX.Element;
|
|
13
|
+
readonly eraser: import("react").JSX.Element;
|
|
14
|
+
readonly laser: import("react").JSX.Element;
|
|
15
|
+
readonly undo: import("react").JSX.Element;
|
|
16
|
+
readonly redo: import("react").JSX.Element;
|
|
17
|
+
readonly minus: import("react").JSX.Element;
|
|
18
|
+
readonly plus: import("react").JSX.Element;
|
|
19
|
+
readonly fit: import("react").JSX.Element;
|
|
20
|
+
readonly download: import("react").JSX.Element;
|
|
21
|
+
readonly copy: import("react").JSX.Element;
|
|
22
|
+
readonly trash: import("react").JSX.Element;
|
|
23
|
+
readonly close: import("react").JSX.Element;
|
|
24
|
+
readonly check: import("react").JSX.Element;
|
|
25
|
+
readonly target: import("react").JSX.Element;
|
|
26
|
+
readonly eye: import("react").JSX.Element;
|
|
27
|
+
readonly wifiOff: import("react").JSX.Element;
|
|
28
|
+
readonly lock: import("react").JSX.Element;
|
|
29
|
+
readonly more: import("react").JSX.Element;
|
|
30
|
+
readonly chevron: import("react").JSX.Element;
|
|
31
|
+
};
|
|
32
|
+
export type BoardGlyph = keyof typeof GLYPHS;
|
|
33
|
+
export declare function BoardIcon({ name, size, className }: {
|
|
34
|
+
readonly name: BoardGlyph;
|
|
35
|
+
readonly size?: number;
|
|
36
|
+
readonly className?: string;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
/** Six dots in two columns: the island's drag handle. */
|
|
39
|
+
export declare function GripIcon({ className }: {
|
|
40
|
+
readonly className?: string;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
/** The remote cursor: a rounded arrow with a white outline, filled in the person's colour. */
|
|
43
|
+
export declare function CursorArrow({ color }: {
|
|
44
|
+
readonly color: string;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BoardSurface, type BoardTool, type CallTheme, type IslandPlace, type PenColor, type PenWidth, type ShapeTool } from "./board-model";
|
|
2
|
+
export type IslandProps = {
|
|
3
|
+
readonly tool: BoardTool;
|
|
4
|
+
readonly shape: ShapeTool;
|
|
5
|
+
readonly onTool: (tool: BoardTool) => void;
|
|
6
|
+
readonly color: PenColor;
|
|
7
|
+
readonly width: PenWidth;
|
|
8
|
+
readonly onColor: (color: PenColor) => void;
|
|
9
|
+
readonly onWidth: (width: PenWidth) => void;
|
|
10
|
+
readonly surface: BoardSurface;
|
|
11
|
+
readonly theme: CallTheme;
|
|
12
|
+
readonly canUndo: boolean;
|
|
13
|
+
readonly canRedo: boolean;
|
|
14
|
+
readonly onUndo: () => void;
|
|
15
|
+
readonly onRedo: () => void;
|
|
16
|
+
readonly place: IslandPlace;
|
|
17
|
+
readonly onPlace: (place: IslandPlace, announce: boolean) => void;
|
|
18
|
+
readonly compact: boolean;
|
|
19
|
+
};
|
|
20
|
+
/** The tool island: a pill of tools that docks at the bottom, the top or the left, or one pen button when compact. */
|
|
21
|
+
export declare function BoardIsland(props: IslandProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WhoCanDraw } from "./board-draw-policy";
|
|
2
|
+
import { type BoardSurface, type IslandPlace } from "./board-model";
|
|
3
|
+
export type BoardMenuProps = {
|
|
4
|
+
readonly surface: BoardSurface;
|
|
5
|
+
readonly onSurface: (surface: BoardSurface) => void;
|
|
6
|
+
/** Offered outside a phone, to people who can draw. */
|
|
7
|
+
readonly place?: IslandPlace;
|
|
8
|
+
readonly onPlace: (place: IslandPlace) => void;
|
|
9
|
+
readonly onDownload: () => void;
|
|
10
|
+
readonly onCopy: () => void;
|
|
11
|
+
/** Offered to hosts. */
|
|
12
|
+
readonly whoCanDraw?: WhoCanDraw;
|
|
13
|
+
readonly onBring?: () => void;
|
|
14
|
+
readonly onClear?: () => void;
|
|
15
|
+
readonly onClose?: () => void;
|
|
16
|
+
};
|
|
17
|
+
/** The board's own menu: export, the person's own appearance, and the host's board actions. */
|
|
18
|
+
export declare function BoardMenu({ surface, onSurface, place, onPlace, onDownload, onCopy, whoCanDraw, onBring, onClear, onClose }: BoardMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChalkWhiteboardDrawPolicy } from "@q9labsai/chalk-client";
|
|
2
|
+
import type { BoardToast } from "./board-toasts";
|
|
3
|
+
export type WhoCanDraw = {
|
|
4
|
+
readonly policy: ChalkWhiteboardDrawPolicy;
|
|
5
|
+
/** Everyone in the call who is not a host, because hosts can always draw under hosts only and picked people. */
|
|
6
|
+
readonly people: readonly {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly picked: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
readonly onPolicy: (policy: ChalkWhiteboardDrawPolicy) => void;
|
|
12
|
+
readonly onPick: (id: string, picked: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
/** The host's call-wide drawing control. Undefined for people who aren't hosts and on Sync servers without draw_policy_v1. */
|
|
15
|
+
export declare function useWhoCanDraw(toast: (toast: BoardToast) => void): WhoCanDraw | undefined;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WhiteboardEngineHandle } from "@q9labsai/chalk-whiteboard/react";
|
|
2
|
+
import { type BoardSurface, type BoardTool, type CallTheme, type Camera, type PenColor, type PenWidth } from "./board-model";
|
|
3
|
+
/** The pen the person has chosen, and the surface it is drawn on. */
|
|
4
|
+
export type PenChoice = {
|
|
5
|
+
readonly color: PenColor;
|
|
6
|
+
readonly width: PenWidth;
|
|
7
|
+
readonly surface: BoardSurface;
|
|
8
|
+
readonly theme: CallTheme;
|
|
9
|
+
};
|
|
10
|
+
export declare function applyTool(engine: WhiteboardEngineHandle, tool: BoardTool, pen: PenChoice): void;
|
|
11
|
+
type PenChanges = {
|
|
12
|
+
readonly color?: PenColor;
|
|
13
|
+
readonly width?: PenWidth;
|
|
14
|
+
};
|
|
15
|
+
/** A colour or width change applies to what is selected, as well as to the next stroke. */
|
|
16
|
+
export declare function restyleSelection(engine: WhiteboardEngineHandle, pen: PenChoice, changes: PenChanges): boolean;
|
|
17
|
+
/** Places a plain sticky note centred on the board point and opens its text at once. */
|
|
18
|
+
export declare function placeNote(engine: WhiteboardEngineHandle, container: HTMLElement, point: {
|
|
19
|
+
readonly x: number;
|
|
20
|
+
readonly y: number;
|
|
21
|
+
}, color: PenColor): void;
|
|
22
|
+
/** Text written in a note sits at its top left, like the mockup's notes. */
|
|
23
|
+
export declare function settleNoteText(engine: WhiteboardEngineHandle): void;
|
|
24
|
+
/** Undo and redo have no engine call, so the board presses the engine's own keys. */
|
|
25
|
+
export declare function pressHistory(container: HTMLElement, redo: boolean): void;
|
|
26
|
+
export declare function readCamera(engine: WhiteboardEngineHandle): Camera;
|
|
27
|
+
export declare function setCamera(engine: WhiteboardEngineHandle, camera: Camera): void;
|
|
28
|
+
export declare function hasContent(engine: WhiteboardEngineHandle): boolean;
|
|
29
|
+
export declare function boardImage(engine: WhiteboardEngineHandle, background: string): Promise<Blob>;
|
|
30
|
+
export declare function sceneSignature(engine: WhiteboardEngineHandle): number;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type MutableRefObject } from "react";
|
|
2
|
+
import { type WhiteboardEngineHandle } from "@q9labsai/chalk-whiteboard/react";
|
|
3
|
+
/** Reads the engine's stacks; never counts host mutations. */
|
|
4
|
+
export declare function useEngineHistory(root: MutableRefObject<HTMLElement | null>, engine: WhiteboardEngineHandle | null): {
|
|
5
|
+
canUndo: boolean;
|
|
6
|
+
canRedo: boolean;
|
|
7
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type ChalkWhiteboardDrawPolicy, type ChalkWhiteboardView } from "@q9labsai/chalk-client";
|
|
2
|
+
/** design.md, "The board": every colour, size and key the board's own controls use. */
|
|
3
|
+
export type BoardSurface = "chalkboard" | "paper" | "dots";
|
|
4
|
+
export type IslandPlace = "bottom" | "top" | "left";
|
|
5
|
+
export type CallTheme = "light" | "dark";
|
|
6
|
+
export type PenColor = "ink" | "red" | "orange" | "green" | "blue" | "violet";
|
|
7
|
+
export type PenWidth = "thin" | "medium" | "thick";
|
|
8
|
+
export type ShapeTool = "rectangle" | "ellipse" | "diamond" | "arrow" | "line";
|
|
9
|
+
export type BoardTool = "selection" | "hand" | "pen" | "highlighter" | ShapeTool | "text" | "note" | "eraser" | "laser";
|
|
10
|
+
export declare const SURFACES: readonly {
|
|
11
|
+
readonly id: BoardSurface;
|
|
12
|
+
readonly label: string;
|
|
13
|
+
}[];
|
|
14
|
+
export declare const ISLAND_PLACES: readonly {
|
|
15
|
+
readonly id: IslandPlace;
|
|
16
|
+
readonly label: string;
|
|
17
|
+
}[];
|
|
18
|
+
export declare const DRAW_POLICIES: readonly {
|
|
19
|
+
readonly id: ChalkWhiteboardDrawPolicy;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
}[];
|
|
22
|
+
export declare const PEN_COLORS: readonly {
|
|
23
|
+
readonly id: PenColor;
|
|
24
|
+
readonly label: string;
|
|
25
|
+
}[];
|
|
26
|
+
export declare const NOTE_FILL: Record<PenColor, string>;
|
|
27
|
+
/** Note text is a hair off Ink's canonical colour, so it never turns light with the surface. */
|
|
28
|
+
export declare const NOTE_TEXT = "#1b1c1e";
|
|
29
|
+
export declare const NOTE_SIZE: {
|
|
30
|
+
readonly width: 170;
|
|
31
|
+
readonly height: 150;
|
|
32
|
+
};
|
|
33
|
+
/** A 4px corner, as in the mockup; the engine's default rounding is 32px. */
|
|
34
|
+
export declare const NOTE_ROUNDNESS: {
|
|
35
|
+
readonly type: 3;
|
|
36
|
+
readonly value: 4;
|
|
37
|
+
};
|
|
38
|
+
export declare const PEN_WIDTHS: readonly {
|
|
39
|
+
readonly id: PenWidth;
|
|
40
|
+
readonly label: string;
|
|
41
|
+
readonly units: number;
|
|
42
|
+
}[];
|
|
43
|
+
export declare const SHAPES: readonly {
|
|
44
|
+
readonly id: ShapeTool;
|
|
45
|
+
readonly label: string;
|
|
46
|
+
readonly key: string;
|
|
47
|
+
}[];
|
|
48
|
+
export declare const TOOL_KEYS: Readonly<Record<string, BoardTool>>;
|
|
49
|
+
export declare function personColor(index: number): string;
|
|
50
|
+
export declare function isDarkSurface(surface: BoardSurface, theme: CallTheme): boolean;
|
|
51
|
+
/** The surface's own ink, which is what Ink looks like on it. */
|
|
52
|
+
export declare function surfaceInk(surface: BoardSurface, theme: CallTheme): string;
|
|
53
|
+
/** The fill behind the drawing, also used as the background of an exported image. */
|
|
54
|
+
export declare function surfaceFill(surface: BoardSurface, theme: CallTheme): string;
|
|
55
|
+
export declare function selectionColor(surface: BoardSurface, theme: CallTheme): string;
|
|
56
|
+
export declare function penHex(color: PenColor, surface: BoardSurface, theme: CallTheme): string;
|
|
57
|
+
/** The highlighter has no Ink: it draws orange instead, four times as wide at 40% opacity. */
|
|
58
|
+
export declare function highlighterStyle(color: PenColor, width: PenWidth): {
|
|
59
|
+
readonly strokeColor: string;
|
|
60
|
+
readonly strokeWidth: number;
|
|
61
|
+
readonly opacity: number;
|
|
62
|
+
};
|
|
63
|
+
export declare function engineStrokeWidth(px: number, freehand: boolean): number;
|
|
64
|
+
export declare function widthUnits(width: PenWidth): number;
|
|
65
|
+
export declare const MIN_ZOOM = 0.1;
|
|
66
|
+
export declare const MAX_ZOOM = 4;
|
|
67
|
+
export declare function clampZoom(zoom: number): number;
|
|
68
|
+
export type Camera = {
|
|
69
|
+
readonly scrollX: number;
|
|
70
|
+
readonly scrollY: number;
|
|
71
|
+
readonly zoom: number;
|
|
72
|
+
};
|
|
73
|
+
export type Viewport = {
|
|
74
|
+
readonly width: number;
|
|
75
|
+
readonly height: number;
|
|
76
|
+
};
|
|
77
|
+
/** The part of the board this camera shows, in board coordinates. */
|
|
78
|
+
export declare function visibleView(camera: Camera, viewport: Viewport): Omit<ChalkWhiteboardView, "bring">;
|
|
79
|
+
/** The camera that fits someone else's view into this viewport, centred. */
|
|
80
|
+
export declare function cameraForView(view: Omit<ChalkWhiteboardView, "bring">, viewport: Viewport): Camera;
|
|
81
|
+
/** The camera after zooming to `zoom` around the viewport's centre. */
|
|
82
|
+
export declare function zoomAroundCentre(camera: Camera, viewport: Viewport, zoom: number): Camera;
|
|
83
|
+
export declare function sameCamera(left: Camera, right: Camera): boolean;
|
|
84
|
+
export declare function mixCamera(from: Camera, to: Camera, progress: number): Camera;
|
|
85
|
+
/** A critically damped spring step, exact for any frame time. Returns the new offset from the target and the new velocity. */
|
|
86
|
+
export declare function springStep(offset: number, velocity: number, rate: number, seconds: number): readonly [number, number];
|
|
87
|
+
export declare function readStored<T extends string>(key: string, allowed: readonly {
|
|
88
|
+
readonly id: T;
|
|
89
|
+
}[], fallback: T): T;
|
|
90
|
+
export declare function writeStored(key: string, value: string): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Toast } from "../toast-stack/ToastStack";
|
|
2
|
+
export type BoardToast = Omit<Toast, "id">;
|
|
3
|
+
/** Null drops the board lifetime’s toasts, including their action callbacks.
|
|
4
|
+
* Board events join the call's own toast stack, so they look, sit and time out like every other toast. */
|
|
5
|
+
export declare const BoardToastContext: import("react").Context<(toast: BoardToast | null) => void>;
|
|
6
|
+
export declare function useBoardToast(lifetime: object | null): (toast: BoardToast) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChalkWhiteboardViewVersions as ViewVersions } from "@q9labsai/chalk-client";
|
|
@@ -16,4 +16,3 @@ export interface CallCardProps {
|
|
|
16
16
|
* where it came from. Panels keep their own landmarks, so the drawer itself carries no role.
|
|
17
17
|
*/
|
|
18
18
|
export declare function CallCard({ state, onClose, interactive, children, panel, onPanelChange, peopleCount, chatEnabled, participantsEnabled }: CallCardProps): import("react").JSX.Element | null;
|
|
19
|
-
//# sourceMappingURL=CallCard.d.ts.map
|
|
@@ -18,7 +18,8 @@ export interface CallLimboProps {
|
|
|
18
18
|
readonly initiallyCovered?: boolean;
|
|
19
19
|
readonly theme?: ChalkTheme;
|
|
20
20
|
readonly blocking?: boolean;
|
|
21
|
+
/** Extra classes for the message card, such as a fixed width around a form. */
|
|
22
|
+
readonly className?: string;
|
|
21
23
|
}
|
|
22
24
|
/** One surface for joining, admission and connection recovery. Never renders participant data. */
|
|
23
|
-
export declare function CallLimbo({ spaceName, message, detail, action, children, overlay, active, initiallyCovered, theme, recorded, blocking }: CallLimboProps): React.JSX.Element;
|
|
24
|
-
//# sourceMappingURL=CallLimbo.d.ts.map
|
|
25
|
+
export declare function CallLimbo({ spaceName, message, detail, action, children, overlay, active, initiallyCovered, theme, recorded, blocking, className }: CallLimboProps): React.JSX.Element;
|
|
@@ -43,6 +43,10 @@ export type ChalkProps = SpaceIntegration & SpaceEventCallbacks & {
|
|
|
43
43
|
readonly theme?: ChalkTheme;
|
|
44
44
|
readonly shareUrl?: string;
|
|
45
45
|
readonly onReportProblem?: import("../space-header/SpaceHeader").SpaceHeaderProps["onReportProblem"];
|
|
46
|
+
/** Opens an app-owned dialog that can outlive this call view. */
|
|
47
|
+
readonly onOpenReportProblem?: () => void;
|
|
48
|
+
/** Hides new report actions and disables Send without discarding an open report. */
|
|
49
|
+
readonly reportUnavailableReason?: string;
|
|
46
50
|
readonly onColorSchemeChange?: (colorScheme: ChalkColorScheme) => void;
|
|
47
51
|
readonly pickChatFiles?: () => Promise<readonly ChatUploadFile[]>;
|
|
48
52
|
readonly spaceName?: string;
|
|
@@ -59,4 +63,3 @@ export type ChalkProps = SpaceIntegration & SpaceEventCallbacks & {
|
|
|
59
63
|
};
|
|
60
64
|
export declare function Chalk(props: ChalkProps): React.JSX.Element;
|
|
61
65
|
export {};
|
|
62
|
-
//# sourceMappingURL=Chalk.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { ChalkProps } from "./Chalk";
|
|
3
|
+
/** The call report form for app-owned terminal screens outside Chalk. */
|
|
4
|
+
export declare function ReportProblemDialog({ open, onClose, onReportProblem, colorScheme, focusScope, diagnostics, unavailableReason, }: {
|
|
5
|
+
readonly diagnostics?: string;
|
|
6
|
+
readonly unavailableReason?: string;
|
|
7
|
+
readonly open: boolean;
|
|
8
|
+
readonly onClose: () => void;
|
|
9
|
+
readonly onReportProblem: NonNullable<ChalkProps["onReportProblem"]>;
|
|
10
|
+
readonly colorScheme: "light" | "dark";
|
|
11
|
+
readonly focusScope: RefObject<HTMLElement | null>;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
+
import { type ClientFailure, type ErrorCode } from "@q9labsai/chalk-client";
|
|
2
3
|
import { type ChalkTheme } from "../../theme";
|
|
3
4
|
export type StatusSurfacePhase = "entering" | "left" | "episode-ended" | "failed" | "removed" | "full" | "elsewhere";
|
|
4
5
|
export interface StatusSurfaceProps {
|
|
5
6
|
readonly phase: StatusSurfacePhase;
|
|
6
7
|
readonly callName?: string;
|
|
7
8
|
readonly reason?: string;
|
|
9
|
+
readonly errorCode?: ErrorCode;
|
|
10
|
+
readonly sync?: ClientFailure["sync"];
|
|
8
11
|
readonly theme?: ChalkTheme;
|
|
9
12
|
readonly onRejoin?: () => void;
|
|
10
13
|
readonly onHome?: () => void;
|
|
@@ -14,5 +17,4 @@ export interface StatusSurfaceProps {
|
|
|
14
17
|
readonly retryPending?: boolean;
|
|
15
18
|
}
|
|
16
19
|
/** All terminal call states share the same quiet page and host-owned navigation. */
|
|
17
|
-
export declare function StatusSurface({ phase, callName, reason, theme, onRejoin, onHome, onRetry, onReportProblem, rejoinDisabled, retryPending }: StatusSurfaceProps): React.JSX.Element;
|
|
18
|
-
//# sourceMappingURL=StatusSurface.d.ts.map
|
|
20
|
+
export declare function StatusSurface({ phase, callName, reason, errorCode, sync, theme, onRejoin, onHome, onRetry, onReportProblem, rejoinDisabled, retryPending }: StatusSurfaceProps): React.JSX.Element;
|
|
@@ -4,4 +4,3 @@ export interface ChalkAlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
readonly tone?: ChalkTone;
|
|
5
5
|
}
|
|
6
6
|
export declare const ChalkAlert: import("react").ForwardRefExoticComponent<ChalkAlertProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
//# sourceMappingURL=ChalkAlert.d.ts.map
|
|
@@ -4,4 +4,3 @@ export interface ChalkBackdropProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
readonly tone?: ChalkTone;
|
|
5
5
|
}
|
|
6
6
|
export declare const ChalkBackdrop: import("react").ForwardRefExoticComponent<ChalkBackdropProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
//# sourceMappingURL=ChalkBackdrop.d.ts.map
|
|
@@ -8,4 +8,3 @@ export interface ChalkBadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
8
8
|
readonly showZero?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export declare const ChalkBadge: import("react").ForwardRefExoticComponent<ChalkBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
-
//# sourceMappingURL=ChalkBadge.d.ts.map
|
|
@@ -6,4 +6,3 @@ export interface ChalkButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEl
|
|
|
6
6
|
readonly loading?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const ChalkButton: import("react").ForwardRefExoticComponent<ChalkButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
//# sourceMappingURL=ChalkButton.d.ts.map
|
|
@@ -4,4 +4,3 @@ export interface ChalkDialogPanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
readonly tone?: ChalkTone;
|
|
5
5
|
}
|
|
6
6
|
export declare const ChalkDialogPanel: import("react").ForwardRefExoticComponent<ChalkDialogPanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
//# sourceMappingURL=ChalkDialogPanel.d.ts.map
|
|
@@ -4,4 +4,3 @@ export interface ChalkDividerProps extends HTMLAttributes<HTMLHRElement> {
|
|
|
4
4
|
readonly tone?: ChalkTone;
|
|
5
5
|
}
|
|
6
6
|
export declare const ChalkDivider: import("react").ForwardRefExoticComponent<ChalkDividerProps & import("react").RefAttributes<HTMLHRElement>>;
|
|
7
|
-
//# sourceMappingURL=ChalkDivider.d.ts.map
|
|
@@ -6,4 +6,3 @@ export interface ChalkEmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement
|
|
|
6
6
|
readonly tone?: ChalkTone;
|
|
7
7
|
}
|
|
8
8
|
export declare const ChalkEmptyState: import("react").ForwardRefExoticComponent<ChalkEmptyStateProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
-
//# sourceMappingURL=ChalkEmptyState.d.ts.map
|