@q9labsai/chalk-react 4.1.17 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -64
- package/THIRD_PARTY_NOTICES.md +1 -2
- package/dist/bindings/hooks.d.ts +21 -2
- package/dist/bindings/hooks.d.ts.map +1 -1
- package/dist/chunk-4U7QZC72.js +298 -0
- package/dist/chunk-NPOO7BOX.js +974 -0
- package/dist/chunk-WRAEH24P.js +203 -0
- package/dist/chunk-XN2E352E.js +8146 -0
- package/dist/components/admission-panel/AdmissionPanel.d.ts.map +1 -1
- package/dist/components/atomic/AudioIndicator.d.ts +1 -1
- package/dist/components/atomic/AudioIndicator.d.ts.map +1 -1
- package/dist/components/atomic/Avatar.d.ts +1 -1
- package/dist/components/atomic/Avatar.d.ts.map +1 -1
- package/dist/components/atomic/HandRaiseIndicator.d.ts +1 -1
- package/dist/components/atomic/HandRaiseIndicator.d.ts.map +1 -1
- package/dist/components/atomic/NameTag.d.ts +1 -1
- package/dist/components/atomic/NameTag.d.ts.map +1 -1
- package/dist/components/atomic/ReactionBubble.d.ts +1 -1
- package/dist/components/atomic/ReactionBubble.d.ts.map +1 -1
- package/dist/components/atomic/StatusBadge.d.ts +1 -1
- package/dist/components/atomic/StatusBadge.d.ts.map +1 -1
- package/dist/components/atomic/VolumeSlider.d.ts.map +1 -1
- package/dist/components/atomic/Waveform.d.ts +1 -1
- package/dist/components/atomic/Waveform.d.ts.map +1 -1
- package/dist/components/atomic/index.d.ts +0 -7
- package/dist/components/atomic/index.d.ts.map +1 -1
- package/dist/components/call-card/CallCard.d.ts +19 -0
- package/dist/components/call-card/CallCard.d.ts.map +1 -0
- package/dist/components/call-card/CallCardStyles.d.ts +2 -0
- package/dist/components/call-card/CallCardStyles.d.ts.map +1 -0
- package/dist/components/call-limbo/CallLimbo.d.ts +24 -0
- package/dist/components/call-limbo/CallLimbo.d.ts.map +1 -0
- package/dist/components/call-limbo/CallReady.d.ts +7 -0
- package/dist/components/call-limbo/CallReady.d.ts.map +1 -0
- package/dist/components/call-limbo/qr-code.d.ts +5 -0
- package/dist/components/call-limbo/qr-code.d.ts.map +1 -0
- package/dist/components/call-limbo/useCallLink.d.ts +6 -0
- package/dist/components/call-limbo/useCallLink.d.ts.map +1 -0
- package/dist/components/chalk/Chalk.d.ts +14 -15
- package/dist/components/chalk/Chalk.d.ts.map +1 -1
- package/dist/components/chalk/StatusSurface.d.ts +12 -14
- package/dist/components/chalk/StatusSurface.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkAlert.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkAlert.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkBackdrop.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkBackdrop.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkBadge.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkBadge.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkButton.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkButton.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkCopyButton.d.ts +7 -0
- package/dist/components/chalk-ui/ChalkCopyButton.d.ts.map +1 -0
- package/dist/components/chalk-ui/ChalkDialogPanel.d.ts +1 -4
- package/dist/components/chalk-ui/ChalkDialogPanel.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkDivider.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkDivider.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkEmptyState.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkEmptyState.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkIconButton.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkIconButton.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkInput.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkInput.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkMenu.d.ts +16 -12
- package/dist/components/chalk-ui/ChalkMenu.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkPanel.d.ts +1 -4
- package/dist/components/chalk-ui/ChalkPanel.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkPopover.d.ts +12 -0
- package/dist/components/chalk-ui/ChalkPopover.d.ts.map +1 -0
- package/dist/components/chalk-ui/ChalkSegmentedControl.d.ts +11 -0
- package/dist/components/chalk-ui/ChalkSegmentedControl.d.ts.map +1 -0
- package/dist/components/chalk-ui/ChalkSheet.d.ts +12 -0
- package/dist/components/chalk-ui/ChalkSheet.d.ts.map +1 -0
- package/dist/components/chalk-ui/ChalkSpinner.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkSpinner.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkTextarea.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkTextarea.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkToast.d.ts +14 -0
- package/dist/components/chalk-ui/ChalkToast.d.ts.map +1 -0
- package/dist/components/chalk-ui/ChalkToggle.d.ts +1 -3
- package/dist/components/chalk-ui/ChalkToggle.d.ts.map +1 -1
- package/dist/components/chalk-ui/ChalkTooltip.d.ts +6 -0
- package/dist/components/chalk-ui/ChalkTooltip.d.ts.map +1 -0
- package/dist/components/chalk-ui/common.d.ts +1 -5
- package/dist/components/chalk-ui/common.d.ts.map +1 -1
- package/dist/components/chalk-ui/index.d.ts +8 -15
- package/dist/components/chalk-ui/index.d.ts.map +1 -1
- package/dist/components/composite/ChatPanel.d.ts +5 -6
- package/dist/components/composite/ChatPanel.d.ts.map +1 -1
- package/dist/components/composite/CommandErrorAlert.d.ts +1 -1
- package/dist/components/composite/CommandErrorAlert.d.ts.map +1 -1
- package/dist/components/composite/MessageBubble.d.ts +4 -1
- package/dist/components/composite/MessageBubble.d.ts.map +1 -1
- package/dist/components/composite/ReactionPicker.d.ts +3 -1
- package/dist/components/composite/ReactionPicker.d.ts.map +1 -1
- package/dist/components/composite/ReactionTray.d.ts +3 -1
- package/dist/components/composite/ReactionTray.d.ts.map +1 -1
- package/dist/components/composite/ReactionsOverlay.d.ts +8 -3
- package/dist/components/composite/ReactionsOverlay.d.ts.map +1 -1
- package/dist/components/composite/ScreenShareView.d.ts +23 -19
- package/dist/components/composite/ScreenShareView.d.ts.map +1 -1
- package/dist/components/composite/reaction-float.d.ts +0 -8
- package/dist/components/composite/reaction-float.d.ts.map +1 -1
- package/dist/components/control-bar/CallLinkIcon.d.ts +2 -0
- package/dist/components/control-bar/CallLinkIcon.d.ts.map +1 -0
- package/dist/components/control-bar/ControlBar.d.ts +4 -11
- package/dist/components/control-bar/ControlBar.d.ts.map +1 -1
- package/dist/components/control-bar/DockLayout.d.ts +7 -0
- package/dist/components/control-bar/DockLayout.d.ts.map +1 -0
- package/dist/components/control-bar/LeaveMenu.d.ts +10 -0
- package/dist/components/control-bar/LeaveMenu.d.ts.map +1 -0
- package/dist/components/control-bar/ShareControl.d.ts +7 -0
- package/dist/components/control-bar/ShareControl.d.ts.map +1 -0
- package/dist/components/control-bar/ShellIcon.d.ts +29 -0
- package/dist/components/control-bar/ShellIcon.d.ts.map +1 -0
- package/dist/components/control-bar/ShellStyles.d.ts +2 -0
- package/dist/components/control-bar/ShellStyles.d.ts.map +1 -0
- package/dist/components/control-bar/command-failure.d.ts +3 -0
- package/dist/components/control-bar/command-failure.d.ts.map +1 -0
- package/dist/components/control-bar/control-bar-behavior.d.ts +35 -31
- package/dist/components/control-bar/control-bar-behavior.d.ts.map +1 -1
- package/dist/components/control-bar/control-bar-button.d.ts +1 -3
- package/dist/components/control-bar/control-bar-button.d.ts.map +1 -1
- package/dist/components/control-bar/next-camera.d.ts +3 -0
- package/dist/components/control-bar/next-camera.d.ts.map +1 -0
- package/dist/components/device-popover/DevicePopover.d.ts +10 -9
- package/dist/components/device-popover/DevicePopover.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -9
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +21 -28
- package/dist/components/lazy.d.ts +0 -6
- package/dist/components/lazy.d.ts.map +1 -1
- package/dist/components/logo/Logo.d.ts +1 -3
- package/dist/components/logo/Logo.d.ts.map +1 -1
- package/dist/components/media-request-dialog/MediaRequestDialog.d.ts +2 -2
- package/dist/components/media-request-dialog/MediaRequestDialog.d.ts.map +1 -1
- package/dist/components/offline-actions/OfflineActions.d.ts +7 -15
- package/dist/components/offline-actions/OfflineActions.d.ts.map +1 -1
- package/dist/components/participant-grid/ParticipantGrid.d.ts +10 -3
- package/dist/components/participant-grid/ParticipantGrid.d.ts.map +1 -1
- package/dist/components/participant-tile/ParticipantTile.d.ts +8 -2
- package/dist/components/participant-tile/ParticipantTile.d.ts.map +1 -1
- package/dist/components/participant-tile/TileShell.d.ts +5 -14
- package/dist/components/participant-tile/TileShell.d.ts.map +1 -1
- package/dist/components/participant-tile/useVideoTrack.d.ts.map +1 -1
- package/dist/components/participants-panel/ParticipantsPanel.d.ts +24 -0
- package/dist/components/participants-panel/ParticipantsPanel.d.ts.map +1 -1
- package/dist/components/participants-panel/participant-options-menu-contract.d.ts +2 -0
- package/dist/components/participants-panel/participant-options-menu-contract.d.ts.map +1 -1
- package/dist/components/participants-panel/participant-options-menu.d.ts +1 -1
- package/dist/components/participants-panel/participant-options-menu.d.ts.map +1 -1
- package/dist/components/participants-panel/participant-row.d.ts +4 -2
- package/dist/components/participants-panel/participant-row.d.ts.map +1 -1
- package/dist/components/reconnecting-overlay/ReconnectingOverlay.d.ts +2 -4
- package/dist/components/reconnecting-overlay/ReconnectingOverlay.d.ts.map +1 -1
- package/dist/components/space-header/CallDetails.d.ts +17 -0
- package/dist/components/space-header/CallDetails.d.ts.map +1 -0
- package/dist/components/space-header/LayoutMenu.d.ts +4 -1023
- package/dist/components/space-header/LayoutMenu.d.ts.map +1 -1
- package/dist/components/space-header/SpaceHeader.d.ts.map +1 -1
- package/dist/components/space-header/call-diagnostics.d.ts +6 -0
- package/dist/components/space-header/call-diagnostics.d.ts.map +1 -0
- package/dist/components/space-header/share-qr.d.ts +3 -0
- package/dist/components/space-header/share-qr.d.ts.map +1 -0
- package/dist/components/space-header/space-header-contract.d.ts +33 -6
- package/dist/components/space-header/space-header-contract.d.ts.map +1 -1
- package/dist/components/space-header/useCallShortcuts.d.ts +3 -0
- package/dist/components/space-header/useCallShortcuts.d.ts.map +1 -0
- package/dist/components/space-view/RecordingSpaceView.d.ts.map +1 -1
- package/dist/components/space-view/SpacePresentation.d.ts +4 -6
- package/dist/components/space-view/SpacePresentation.d.ts.map +1 -1
- package/dist/components/space-view/SpaceView.d.ts +12 -29
- package/dist/components/space-view/SpaceView.d.ts.map +1 -1
- package/dist/components/stage/SpaceStage.d.ts +23 -0
- package/dist/components/stage/SpaceStage.d.ts.map +1 -0
- package/dist/components/stage/Stage.d.ts +6 -4
- package/dist/components/stage/Stage.d.ts.map +1 -1
- package/dist/components/stage/StageContentTile.d.ts +6 -3
- package/dist/components/stage/StageContentTile.d.ts.map +1 -1
- package/dist/components/stage/StageIcon.d.ts +9 -0
- package/dist/components/stage/StageIcon.d.ts.map +1 -0
- package/dist/components/stage/StageMotion.d.ts +22 -0
- package/dist/components/stage/StageMotion.d.ts.map +1 -0
- package/dist/components/stage/stage-items.d.ts +2 -5
- package/dist/components/stage/stage-items.d.ts.map +1 -1
- package/dist/components/stage/stage-layout.d.ts +10 -32
- package/dist/components/stage/stage-layout.d.ts.map +1 -1
- package/dist/components/stage/useStageDimensions.d.ts +7 -0
- package/dist/components/stage/useStageDimensions.d.ts.map +1 -0
- package/dist/components/toast-stack/CallEventIcon.d.ts +5 -0
- package/dist/components/toast-stack/CallEventIcon.d.ts.map +1 -0
- package/dist/components/toast-stack/ToastStack.d.ts +8 -24
- package/dist/components/toast-stack/ToastStack.d.ts.map +1 -1
- package/dist/components/toast-stack/call-events.d.ts +6 -0
- package/dist/components/toast-stack/call-events.d.ts.map +1 -0
- package/dist/components/toast-stack/useCallToasts.d.ts +9 -0
- package/dist/components/toast-stack/useCallToasts.d.ts.map +1 -0
- package/dist/headless.js +1 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -26
- package/dist/internal/call-motion.d.ts +8 -0
- package/dist/internal/call-motion.d.ts.map +1 -0
- package/dist/internal/sound-cues.d.ts +6 -18
- package/dist/internal/sound-cues.d.ts.map +1 -1
- package/dist/internal/useMirrorSetting.d.ts +2 -0
- package/dist/internal/useMirrorSetting.d.ts.map +1 -0
- package/dist/internal/useSoundCues.d.ts +3 -2
- package/dist/internal/useSoundCues.d.ts.map +1 -1
- package/dist/internal/useSoundsSetting.d.ts +2 -0
- package/dist/internal/useSoundsSetting.d.ts.map +1 -0
- package/dist/public-surface.contract.d.ts +5 -10
- package/dist/public-surface.contract.d.ts.map +1 -1
- package/dist/selectors/space-selectors.d.ts +1 -1
- package/dist/selectors/space-selectors.d.ts.map +1 -1
- package/dist/test-support/index.d.ts +1 -6
- package/dist/test-support/index.d.ts.map +1 -1
- package/dist/test-support/index.js +27 -193
- package/dist/test-support/preview-client.d.ts +3 -0
- package/dist/test-support/preview-client.d.ts.map +1 -1
- package/dist/test-support/preview-fixtures.d.ts +2 -42
- package/dist/test-support/preview-fixtures.d.ts.map +1 -1
- package/dist/theme.d.ts +106 -73
- package/dist/theme.d.ts.map +1 -1
- package/dist/utils/icons.d.ts +34 -45
- package/dist/utils/icons.d.ts.map +1 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +132 -207
- package/package.json +9 -13
- package/dist/chunk-C7PNVYDZ.js +0 -13389
- package/dist/chunk-FFPNO2MY.js +0 -131
- package/dist/chunk-OLBFC6RS.js +0 -1422
- package/dist/chunk-S6OVGZD5.js +0 -3164
- package/dist/chunk-VLAZKVNN.js +0 -182
- package/dist/components/admission-panel/ClassicAdmissionPanel.d.ts +0 -7
- package/dist/components/admission-panel/ClassicAdmissionPanel.d.ts.map +0 -1
- package/dist/components/atomic/CaptionLine.d.ts +0 -10
- package/dist/components/atomic/CaptionLine.d.ts.map +0 -1
- package/dist/components/atomic/ClassicAudioIndicator.d.ts +0 -11
- package/dist/components/atomic/ClassicAudioIndicator.d.ts.map +0 -1
- package/dist/components/atomic/ClassicAvatar.d.ts +0 -4
- package/dist/components/atomic/ClassicAvatar.d.ts.map +0 -1
- package/dist/components/atomic/ClassicCaptionLine.d.ts +0 -4
- package/dist/components/atomic/ClassicCaptionLine.d.ts.map +0 -1
- package/dist/components/atomic/ClassicConnectionQuality.d.ts +0 -4
- package/dist/components/atomic/ClassicConnectionQuality.d.ts.map +0 -1
- package/dist/components/atomic/ClassicHandRaiseIndicator.d.ts +0 -11
- package/dist/components/atomic/ClassicHandRaiseIndicator.d.ts.map +0 -1
- package/dist/components/atomic/ClassicNameTag.d.ts +0 -4
- package/dist/components/atomic/ClassicNameTag.d.ts.map +0 -1
- package/dist/components/atomic/ClassicReactionBubble.d.ts +0 -12
- package/dist/components/atomic/ClassicReactionBubble.d.ts.map +0 -1
- package/dist/components/atomic/ClassicReleaseBadge.d.ts +0 -4
- package/dist/components/atomic/ClassicReleaseBadge.d.ts.map +0 -1
- package/dist/components/atomic/ClassicStatusBadge.d.ts +0 -4
- package/dist/components/atomic/ClassicStatusBadge.d.ts.map +0 -1
- package/dist/components/atomic/ClassicTourTooltip.d.ts +0 -4
- package/dist/components/atomic/ClassicTourTooltip.d.ts.map +0 -1
- package/dist/components/atomic/ClassicTranscriptLine.d.ts +0 -4
- package/dist/components/atomic/ClassicTranscriptLine.d.ts.map +0 -1
- package/dist/components/atomic/ClassicVolumeSlider.d.ts +0 -4
- package/dist/components/atomic/ClassicVolumeSlider.d.ts.map +0 -1
- package/dist/components/atomic/ClassicWaveform.d.ts +0 -4
- package/dist/components/atomic/ClassicWaveform.d.ts.map +0 -1
- package/dist/components/atomic/ClassicWhatsNewTrigger.d.ts +0 -4
- package/dist/components/atomic/ClassicWhatsNewTrigger.d.ts.map +0 -1
- package/dist/components/atomic/ConnectionQuality.d.ts +0 -9
- package/dist/components/atomic/ConnectionQuality.d.ts.map +0 -1
- package/dist/components/atomic/ReleaseBadge.d.ts +0 -7
- package/dist/components/atomic/ReleaseBadge.d.ts.map +0 -1
- package/dist/components/atomic/TourHighlight.d.ts +0 -10
- package/dist/components/atomic/TourHighlight.d.ts.map +0 -1
- package/dist/components/atomic/TourTooltip.d.ts +0 -16
- package/dist/components/atomic/TourTooltip.d.ts.map +0 -1
- package/dist/components/atomic/TranscriptLine.d.ts +0 -20
- package/dist/components/atomic/TranscriptLine.d.ts.map +0 -1
- package/dist/components/atomic/WhatsNewTrigger.d.ts +0 -22
- package/dist/components/atomic/WhatsNewTrigger.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkCheckbox.d.ts +0 -11
- package/dist/components/chalk-ui/ChalkCheckbox.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkChrome.d.ts +0 -21
- package/dist/components/chalk-ui/ChalkChrome.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkControlGroup.d.ts +0 -6
- package/dist/components/chalk-ui/ChalkControlGroup.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkRadio.d.ts +0 -11
- package/dist/components/chalk-ui/ChalkRadio.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkSelect.d.ts +0 -11
- package/dist/components/chalk-ui/ChalkSelect.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkSlider.d.ts +0 -12
- package/dist/components/chalk-ui/ChalkSlider.d.ts.map +0 -1
- package/dist/components/chalk-ui/ChalkTooltipPanel.d.ts +0 -9
- package/dist/components/chalk-ui/ChalkTooltipPanel.d.ts.map +0 -1
- package/dist/components/chalk-ui/prng.d.ts +0 -5
- package/dist/components/chalk-ui/prng.d.ts.map +0 -1
- package/dist/components/chalk-ui/rough.d.ts +0 -13
- package/dist/components/chalk-ui/rough.d.ts.map +0 -1
- package/dist/components/chalk-ui/shapes.d.ts +0 -23
- package/dist/components/chalk-ui/shapes.d.ts.map +0 -1
- package/dist/components/chalk-ui/texture.d.ts +0 -12
- package/dist/components/chalk-ui/texture.d.ts.map +0 -1
- package/dist/components/chalk-ui/useResizeObserver.d.ts +0 -12
- package/dist/components/chalk-ui/useResizeObserver.d.ts.map +0 -1
- package/dist/components/composite/BackgroundEffectsPicker.d.ts +0 -21
- package/dist/components/composite/BackgroundEffectsPicker.d.ts.map +0 -1
- package/dist/components/composite/ClassicBackgroundEffectsPicker.d.ts +0 -4
- package/dist/components/composite/ClassicBackgroundEffectsPicker.d.ts.map +0 -1
- package/dist/components/composite/ClassicChatPanel.d.ts +0 -27
- package/dist/components/composite/ClassicChatPanel.d.ts.map +0 -1
- package/dist/components/composite/ClassicCommandErrorAlert.d.ts +0 -4
- package/dist/components/composite/ClassicCommandErrorAlert.d.ts.map +0 -1
- package/dist/components/composite/ClassicDeviceSelector.d.ts +0 -4
- package/dist/components/composite/ClassicDeviceSelector.d.ts.map +0 -1
- package/dist/components/composite/ClassicMessageBubble.d.ts +0 -4
- package/dist/components/composite/ClassicMessageBubble.d.ts.map +0 -1
- package/dist/components/composite/ClassicNoiseSuppressionToggle.d.ts +0 -4
- package/dist/components/composite/ClassicNoiseSuppressionToggle.d.ts.map +0 -1
- package/dist/components/composite/ClassicReactionPicker.d.ts +0 -4
- package/dist/components/composite/ClassicReactionPicker.d.ts.map +0 -1
- package/dist/components/composite/ClassicReactionsOverlay.d.ts +0 -11
- package/dist/components/composite/ClassicReactionsOverlay.d.ts.map +0 -1
- package/dist/components/composite/ClassicScreenShareView.d.ts +0 -7
- package/dist/components/composite/ClassicScreenShareView.d.ts.map +0 -1
- package/dist/components/composite/ClassicSettingsDialog.d.ts +0 -4
- package/dist/components/composite/ClassicSettingsDialog.d.ts.map +0 -1
- package/dist/components/composite/ClassicSettingsPanel.d.ts +0 -7
- package/dist/components/composite/ClassicSettingsPanel.d.ts.map +0 -1
- package/dist/components/composite/DeviceSelector.d.ts +0 -19
- package/dist/components/composite/DeviceSelector.d.ts.map +0 -1
- package/dist/components/composite/NoiseSuppressionToggle.d.ts +0 -11
- package/dist/components/composite/NoiseSuppressionToggle.d.ts.map +0 -1
- package/dist/components/composite/SettingsDialog.d.ts +0 -5
- package/dist/components/composite/SettingsDialog.d.ts.map +0 -1
- package/dist/components/composite/SettingsPanel.d.ts +0 -14
- package/dist/components/composite/SettingsPanel.d.ts.map +0 -1
- package/dist/components/composite/settings-dialog-behavior.d.ts +0 -645
- package/dist/components/composite/settings-dialog-behavior.d.ts.map +0 -1
- package/dist/components/control-bar/ClassicControlBar.d.ts +0 -8
- package/dist/components/control-bar/ClassicControlBar.d.ts.map +0 -1
- package/dist/components/control-bar/ClassicControlBarButton.d.ts +0 -24
- package/dist/components/control-bar/ClassicControlBarButton.d.ts.map +0 -1
- package/dist/components/device-popover/ClassicDevicePopover.d.ts +0 -4
- package/dist/components/device-popover/ClassicDevicePopover.d.ts.map +0 -1
- package/dist/components/entrance/ClassicEntranceSurface.d.ts +0 -8
- package/dist/components/entrance/ClassicEntranceSurface.d.ts.map +0 -1
- package/dist/components/entrance/Entrance.d.ts +0 -30
- package/dist/components/entrance/Entrance.d.ts.map +0 -1
- package/dist/components/entrance/EntranceDeviceControls.d.ts +0 -15
- package/dist/components/entrance/EntranceDeviceControls.d.ts.map +0 -1
- package/dist/components/entrance/EntranceParticipantPreview.d.ts +0 -9
- package/dist/components/entrance/EntranceParticipantPreview.d.ts.map +0 -1
- package/dist/components/entrance/EntranceSurface.d.ts +0 -27
- package/dist/components/entrance/EntranceSurface.d.ts.map +0 -1
- package/dist/components/entrance/types.d.ts +0 -20
- package/dist/components/entrance/types.d.ts.map +0 -1
- package/dist/components/feedback/FeedbackDialog.d.ts +0 -12
- package/dist/components/feedback/FeedbackDialog.d.ts.map +0 -1
- package/dist/components/invite-dialog/ClassicInviteDialog.d.ts +0 -4
- package/dist/components/invite-dialog/ClassicInviteDialog.d.ts.map +0 -1
- package/dist/components/invite-dialog/InviteDialog.d.ts +0 -13
- package/dist/components/invite-dialog/InviteDialog.d.ts.map +0 -1
- package/dist/components/join-failed-screen/ClassicJoinFailedScreen.d.ts +0 -8
- package/dist/components/join-failed-screen/ClassicJoinFailedScreen.d.ts.map +0 -1
- package/dist/components/join-failed-screen/JoinFailedScreen.d.ts +0 -10
- package/dist/components/join-failed-screen/JoinFailedScreen.d.ts.map +0 -1
- package/dist/components/leave-dialog/ClassicLeaveDialog.d.ts +0 -4
- package/dist/components/leave-dialog/ClassicLeaveDialog.d.ts.map +0 -1
- package/dist/components/leave-dialog/LeaveDialog.d.ts +0 -19
- package/dist/components/leave-dialog/LeaveDialog.d.ts.map +0 -1
- package/dist/components/logo/LogoSource.d.ts +0 -9
- package/dist/components/logo/LogoSource.d.ts.map +0 -1
- package/dist/components/media-request-dialog/ClassicMediaRequestDialog.d.ts +0 -4
- package/dist/components/media-request-dialog/ClassicMediaRequestDialog.d.ts.map +0 -1
- package/dist/components/offline-actions/OfflineActionsSetting.d.ts +0 -4
- package/dist/components/offline-actions/OfflineActionsSetting.d.ts.map +0 -1
- package/dist/components/offline-actions/offline-actions-policy.d.ts +0 -4
- package/dist/components/offline-actions/offline-actions-policy.d.ts.map +0 -1
- package/dist/components/participant-tile/ClassicParticipantTile.d.ts +0 -5
- package/dist/components/participant-tile/ClassicParticipantTile.d.ts.map +0 -1
- package/dist/components/participants-panel/ClassicParticipantOptionsMenu.d.ts +0 -3
- package/dist/components/participants-panel/ClassicParticipantOptionsMenu.d.ts.map +0 -1
- package/dist/components/participants-panel/ClassicParticipantRow.d.ts +0 -3
- package/dist/components/participants-panel/ClassicParticipantRow.d.ts.map +0 -1
- package/dist/components/participants-panel/ClassicParticipantsPanel.d.ts +0 -4
- package/dist/components/participants-panel/ClassicParticipantsPanel.d.ts.map +0 -1
- package/dist/components/reconnecting-overlay/ClassicReconnectingOverlay.d.ts +0 -4
- package/dist/components/reconnecting-overlay/ClassicReconnectingOverlay.d.ts.map +0 -1
- package/dist/components/reconnecting-overlay/ReconnectingNotice.d.ts +0 -6
- package/dist/components/reconnecting-overlay/ReconnectingNotice.d.ts.map +0 -1
- package/dist/components/skin-context.d.ts +0 -10
- package/dist/components/skin-context.d.ts.map +0 -1
- package/dist/components/space-header/ClassicSpaceHeader.d.ts +0 -4
- package/dist/components/space-header/ClassicSpaceHeader.d.ts.map +0 -1
- package/dist/components/space-info-dialog/ClassicSpaceInfoDialog.d.ts +0 -9
- package/dist/components/space-info-dialog/ClassicSpaceInfoDialog.d.ts.map +0 -1
- package/dist/components/space-info-dialog/SpaceInfoContent.d.ts +0 -10
- package/dist/components/space-info-dialog/SpaceInfoContent.d.ts.map +0 -1
- package/dist/components/space-info-dialog/SpaceInfoDialog.d.ts +0 -29
- package/dist/components/space-info-dialog/SpaceInfoDialog.d.ts.map +0 -1
- package/dist/components/space-view/ClassicSpaceView.d.ts +0 -4
- package/dist/components/space-view/ClassicSpaceView.d.ts.map +0 -1
- package/dist/components/space-view/SpaceDrawer.d.ts +0 -15
- package/dist/components/space-view/SpaceDrawer.d.ts.map +0 -1
- package/dist/components/space-view/SpaceStage.d.ts +0 -17
- package/dist/components/space-view/SpaceStage.d.ts.map +0 -1
- package/dist/components/space-view/useContentLayoutSwitch.d.ts +0 -8
- package/dist/components/space-view/useContentLayoutSwitch.d.ts.map +0 -1
- package/dist/components/stage/StagePager.d.ts +0 -17
- package/dist/components/stage/StagePager.d.ts.map +0 -1
- package/dist/components/theme.d.ts +0 -131
- package/dist/components/theme.d.ts.map +0 -1
- package/dist/components/toast-stack/ClassicToastStack.d.ts +0 -4
- package/dist/components/toast-stack/ClassicToastStack.d.ts.map +0 -1
- package/dist/components/transcript-panel/ClassicTranscriptPanel.d.ts +0 -4
- package/dist/components/transcript-panel/ClassicTranscriptPanel.d.ts.map +0 -1
- package/dist/components/transcript-panel/TranscriptPanel.d.ts +0 -5
- package/dist/components/transcript-panel/TranscriptPanel.d.ts.map +0 -1
- package/dist/components/transcript-panel/transcript-panel-behavior.d.ts +0 -84
- package/dist/components/transcript-panel/transcript-panel-behavior.d.ts.map +0 -1
- package/dist/internal/episode-diagnostic-render-observer.d.ts +0 -2
- package/dist/internal/episode-diagnostic-render-observer.d.ts.map +0 -1
- package/dist/internal/thumbnail.d.ts +0 -11
- package/dist/internal/thumbnail.d.ts.map +0 -1
- package/dist/test-support/preview-feedback.d.ts +0 -3
- package/dist/test-support/preview-feedback.d.ts.map +0 -1
- package/dist/utils/animated-icon-renderer.d.ts +0 -6
- package/dist/utils/animated-icon-renderer.d.ts.map +0 -1
- package/dist/utils/animated-icon-runtime.d.ts +0 -19
- package/dist/utils/animated-icon-runtime.d.ts.map +0 -1
- package/dist/utils/animated-icons/arrow-left-02.d.ts +0 -11
- package/dist/utils/animated-icons/arrow-left-02.d.ts.map +0 -1
- package/dist/utils/animated-icons/cancel-01.d.ts +0 -11
- package/dist/utils/animated-icons/cancel-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/clock-01.d.ts +0 -11
- package/dist/utils/animated-icons/clock-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/copy-01.d.ts +0 -13
- package/dist/utils/animated-icons/copy-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/crown.d.ts +0 -11
- package/dist/utils/animated-icons/crown.d.ts.map +0 -1
- package/dist/utils/animated-icons/download-01.d.ts +0 -11
- package/dist/utils/animated-icons/download-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/edit-02.d.ts +0 -11
- package/dist/utils/animated-icons/edit-02.d.ts.map +0 -1
- package/dist/utils/animated-icons/home-01.d.ts +0 -11
- package/dist/utils/animated-icons/home-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/image-01.d.ts +0 -13
- package/dist/utils/animated-icons/image-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/index.d.ts +0 -85
- package/dist/utils/animated-icons/index.d.ts.map +0 -1
- package/dist/utils/animated-icons/information-circle.d.ts +0 -11
- package/dist/utils/animated-icons/information-circle.d.ts.map +0 -1
- package/dist/utils/animated-icons/link-01.d.ts +0 -11
- package/dist/utils/animated-icons/link-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/mail-01.d.ts +0 -11
- package/dist/utils/animated-icons/mail-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/maximize-screen.d.ts +0 -11
- package/dist/utils/animated-icons/maximize-screen.d.ts.map +0 -1
- package/dist/utils/animated-icons/message-01.d.ts +0 -11
- package/dist/utils/animated-icons/message-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/mic-01.d.ts +0 -11
- package/dist/utils/animated-icons/mic-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/moon-02.d.ts +0 -11
- package/dist/utils/animated-icons/moon-02.d.ts.map +0 -1
- package/dist/utils/animated-icons/more-horizontal.d.ts +0 -11
- package/dist/utils/animated-icons/more-horizontal.d.ts.map +0 -1
- package/dist/utils/animated-icons/more-vertical.d.ts +0 -11
- package/dist/utils/animated-icons/more-vertical.d.ts.map +0 -1
- package/dist/utils/animated-icons/pause.d.ts +0 -11
- package/dist/utils/animated-icons/pause.d.ts.map +0 -1
- package/dist/utils/animated-icons/pin.d.ts +0 -11
- package/dist/utils/animated-icons/pin.d.ts.map +0 -1
- package/dist/utils/animated-icons/play.d.ts +0 -11
- package/dist/utils/animated-icons/play.d.ts.map +0 -1
- package/dist/utils/animated-icons/plus-sign.d.ts +0 -11
- package/dist/utils/animated-icons/plus-sign.d.ts.map +0 -1
- package/dist/utils/animated-icons/qr-code-01.d.ts +0 -11
- package/dist/utils/animated-icons/qr-code-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/refresh.d.ts +0 -11
- package/dist/utils/animated-icons/refresh.d.ts.map +0 -1
- package/dist/utils/animated-icons/search-01.d.ts +0 -11
- package/dist/utils/animated-icons/search-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/sent.d.ts +0 -11
- package/dist/utils/animated-icons/sent.d.ts.map +0 -1
- package/dist/utils/animated-icons/settings-01.d.ts +0 -11
- package/dist/utils/animated-icons/settings-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/share-08.d.ts +0 -11
- package/dist/utils/animated-icons/share-08.d.ts.map +0 -1
- package/dist/utils/animated-icons/shield-02.d.ts +0 -11
- package/dist/utils/animated-icons/shield-02.d.ts.map +0 -1
- package/dist/utils/animated-icons/smile.d.ts +0 -11
- package/dist/utils/animated-icons/smile.d.ts.map +0 -1
- package/dist/utils/animated-icons/sparkles.d.ts +0 -11
- package/dist/utils/animated-icons/sparkles.d.ts.map +0 -1
- package/dist/utils/animated-icons/star.d.ts +0 -11
- package/dist/utils/animated-icons/star.d.ts.map +0 -1
- package/dist/utils/animated-icons/thumbs-up.d.ts +0 -11
- package/dist/utils/animated-icons/thumbs-up.d.ts.map +0 -1
- package/dist/utils/animated-icons/upload-01.d.ts +0 -11
- package/dist/utils/animated-icons/upload-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/user-add-01.d.ts +0 -11
- package/dist/utils/animated-icons/user-add-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/user-group.d.ts +0 -11
- package/dist/utils/animated-icons/user-group.d.ts.map +0 -1
- package/dist/utils/animated-icons/user-remove-01.d.ts +0 -11
- package/dist/utils/animated-icons/user-remove-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/video-01.d.ts +0 -11
- package/dist/utils/animated-icons/video-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/volume-high.d.ts +0 -11
- package/dist/utils/animated-icons/volume-high.d.ts.map +0 -1
- package/dist/utils/animated-icons/volume-mute-01.d.ts +0 -11
- package/dist/utils/animated-icons/volume-mute-01.d.ts.map +0 -1
- package/dist/utils/animated-icons/zoom-in-area.d.ts +0 -11
- package/dist/utils/animated-icons/zoom-in-area.d.ts.map +0 -1
- package/dist/utils/animated-icons/zoom-out-area.d.ts +0 -11
- package/dist/utils/animated-icons/zoom-out-area.d.ts.map +0 -1
- package/dist/utils/feedback.d.ts +0 -5
- package/dist/utils/feedback.d.ts.map +0 -1
|
@@ -0,0 +1,974 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createRecordingWhiteboardCursor,
|
|
3
|
+
recordingWhiteboardFileAssetId,
|
|
4
|
+
recordingWhiteboardFileIds,
|
|
5
|
+
recordingWhiteboardSceneAppState
|
|
6
|
+
} from "./chunk-VHM3SYMY.js";
|
|
7
|
+
import {
|
|
8
|
+
CallCard,
|
|
9
|
+
CallDialog,
|
|
10
|
+
CallLimbo,
|
|
11
|
+
ChalkBadge,
|
|
12
|
+
ChalkButton,
|
|
13
|
+
ChalkEmptyState,
|
|
14
|
+
ChalkPanel,
|
|
15
|
+
ChalkProvider,
|
|
16
|
+
ChatPanelPresentation,
|
|
17
|
+
ControlBarPresentation,
|
|
18
|
+
MediaRequestDialog,
|
|
19
|
+
ParticipantTileSurface,
|
|
20
|
+
QuietSpace,
|
|
21
|
+
ReactionsOverlayPresentation,
|
|
22
|
+
ScreenSharePresentation,
|
|
23
|
+
ShellStyles,
|
|
24
|
+
SpacePresentation,
|
|
25
|
+
SpaceView,
|
|
26
|
+
Stage,
|
|
27
|
+
StageContentTileSurface,
|
|
28
|
+
StatusSurface,
|
|
29
|
+
WhiteboardView,
|
|
30
|
+
chalkThemeStyle,
|
|
31
|
+
useCan,
|
|
32
|
+
useConnection,
|
|
33
|
+
useMedia,
|
|
34
|
+
useRecording,
|
|
35
|
+
useSpaceClient,
|
|
36
|
+
useWhiteboard
|
|
37
|
+
} from "./chunk-XN2E352E.js";
|
|
38
|
+
import {
|
|
39
|
+
WHITEBOARD_ITEM_ID,
|
|
40
|
+
screenShareItemId
|
|
41
|
+
} from "./chunk-WRAEH24P.js";
|
|
42
|
+
import {
|
|
43
|
+
Download01Icon,
|
|
44
|
+
FileTextIcon,
|
|
45
|
+
Loading01Icon,
|
|
46
|
+
PlayIcon,
|
|
47
|
+
RefreshIcon,
|
|
48
|
+
Video01Icon,
|
|
49
|
+
cn
|
|
50
|
+
} from "./chunk-4U7QZC72.js";
|
|
51
|
+
|
|
52
|
+
// src/components/chalk/Chalk.tsx
|
|
53
|
+
import { createSpaceClient } from "@q9labsai/chalk-client";
|
|
54
|
+
import { preloadWhiteboardStylesheet } from "@q9labsai/chalk-whiteboard/react";
|
|
55
|
+
import { useCallback, useEffect as useEffect2, useMemo, useRef, useState as useState2 } from "react";
|
|
56
|
+
|
|
57
|
+
// src/internal/useWhiteboardSceneSubscription.ts
|
|
58
|
+
import { useEffect, useState } from "react";
|
|
59
|
+
var errorMessage = (cause) => cause instanceof Error ? cause : new Error("Whiteboard could not connect.");
|
|
60
|
+
var summaryError = (summary) => summary.error ? new Error(summary.error.message) : errorMessage(void 0);
|
|
61
|
+
var MAX_RECOVERY_ATTEMPTS = 3;
|
|
62
|
+
var recoveryDelayMs = (attempt) => 250 * 2 ** attempt;
|
|
63
|
+
function useWhiteboardSceneSubscription(transport, active) {
|
|
64
|
+
const [subscription, setSubscription] = useState({ status: "closed" });
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (!active || !transport) {
|
|
67
|
+
setSubscription({ status: "closed" });
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
let disposed = false;
|
|
71
|
+
let starting = false;
|
|
72
|
+
let startupSettled = false;
|
|
73
|
+
let ready = false;
|
|
74
|
+
let recoveryAttempts = 0;
|
|
75
|
+
let recoveryTimer;
|
|
76
|
+
let latestSummary;
|
|
77
|
+
const observesSummary = transport.subscribeSummary !== void 0;
|
|
78
|
+
const clearRecoveryTimer = () => {
|
|
79
|
+
if (recoveryTimer === void 0) return;
|
|
80
|
+
globalThis.clearTimeout(recoveryTimer);
|
|
81
|
+
recoveryTimer = void 0;
|
|
82
|
+
};
|
|
83
|
+
const recover = (cause) => {
|
|
84
|
+
if (disposed || recoveryTimer !== void 0 || starting) return;
|
|
85
|
+
if (recoveryAttempts >= MAX_RECOVERY_ATTEMPTS) {
|
|
86
|
+
setSubscription({ status: "failed", error: errorMessage(cause) });
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const attempt = recoveryAttempts++;
|
|
90
|
+
setSubscription({ status: "loading" });
|
|
91
|
+
recoveryTimer = globalThis.setTimeout(() => {
|
|
92
|
+
recoveryTimer = void 0;
|
|
93
|
+
start();
|
|
94
|
+
}, recoveryDelayMs(attempt));
|
|
95
|
+
};
|
|
96
|
+
const handleSummary = (summary) => {
|
|
97
|
+
latestSummary = summary;
|
|
98
|
+
if (disposed) return;
|
|
99
|
+
if (summary.status === "unsubscribed") {
|
|
100
|
+
setSubscription({ status: "loading" });
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (summary.status === "ready") {
|
|
104
|
+
if (!starting || startupSettled) {
|
|
105
|
+
recoveryAttempts = 0;
|
|
106
|
+
ready = true;
|
|
107
|
+
setSubscription({ status: "ready", transport });
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (summary.status === "loading" || summary.status === "recovering") {
|
|
112
|
+
if (!ready) setSubscription({ status: "loading" });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (summary.status === "failed") {
|
|
116
|
+
starting = false;
|
|
117
|
+
setSubscription({ status: "loading" });
|
|
118
|
+
recover(summaryError(summary));
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const start = () => {
|
|
122
|
+
if (disposed || starting) return;
|
|
123
|
+
clearRecoveryTimer();
|
|
124
|
+
starting = true;
|
|
125
|
+
startupSettled = false;
|
|
126
|
+
setSubscription({ status: "loading" });
|
|
127
|
+
void Promise.resolve().then(() => transport.startSceneSubscription()).then(
|
|
128
|
+
() => {
|
|
129
|
+
starting = false;
|
|
130
|
+
startupSettled = true;
|
|
131
|
+
if (disposed) return;
|
|
132
|
+
if (!latestSummary || latestSummary.status === "ready") {
|
|
133
|
+
recoveryAttempts = 0;
|
|
134
|
+
ready = true;
|
|
135
|
+
setSubscription({ status: "ready", transport });
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
(cause) => {
|
|
139
|
+
starting = false;
|
|
140
|
+
if (!disposed && observesSummary) recover(cause);
|
|
141
|
+
else if (!disposed) setSubscription({ status: "failed", error: errorMessage(cause) });
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
};
|
|
145
|
+
setSubscription({ status: "loading" });
|
|
146
|
+
const unsubscribeSummary = transport.subscribeSummary?.(handleSummary);
|
|
147
|
+
start();
|
|
148
|
+
return () => {
|
|
149
|
+
disposed = true;
|
|
150
|
+
clearRecoveryTimer();
|
|
151
|
+
unsubscribeSummary?.();
|
|
152
|
+
void Promise.resolve(transport.stopSceneSubscription());
|
|
153
|
+
};
|
|
154
|
+
}, [active, transport]);
|
|
155
|
+
return subscription;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// src/whiteboard/wire-adapters.ts
|
|
159
|
+
function fromWhiteboardWireElement(element) {
|
|
160
|
+
return {
|
|
161
|
+
id: element.id,
|
|
162
|
+
type: element.type,
|
|
163
|
+
version: element.version,
|
|
164
|
+
versionNonce: element.version_nonce,
|
|
165
|
+
index: element.index,
|
|
166
|
+
isDeleted: element.is_deleted,
|
|
167
|
+
payload: element.payload
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function toWhiteboardWireElement(element) {
|
|
171
|
+
return {
|
|
172
|
+
id: element.id,
|
|
173
|
+
type: element.type,
|
|
174
|
+
version: element.version,
|
|
175
|
+
version_nonce: element.versionNonce,
|
|
176
|
+
index: element.index,
|
|
177
|
+
is_deleted: element.isDeleted,
|
|
178
|
+
payload: element.payload
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function toWhiteboardCollaborationEvent(event) {
|
|
182
|
+
if (event.type === "snapshot" || event.type === "update") {
|
|
183
|
+
return {
|
|
184
|
+
...event,
|
|
185
|
+
elements: event.elements.map(toWhiteboardWireElement)
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
if (event.type === "cursor") {
|
|
189
|
+
return {
|
|
190
|
+
type: "cursor",
|
|
191
|
+
participantId: event.participantId,
|
|
192
|
+
displayName: event.displayName,
|
|
193
|
+
x: event.x,
|
|
194
|
+
y: event.y,
|
|
195
|
+
occurredAt: event.occurredAt
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return event;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// src/components/chalk/Chalk.tsx
|
|
202
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
203
|
+
function Chalk(props) {
|
|
204
|
+
const [localColorScheme, setLocalColorScheme] = useState2("dark");
|
|
205
|
+
const colorScheme = props.theme?.colorScheme ?? localColorScheme;
|
|
206
|
+
const changeColorScheme = (next) => {
|
|
207
|
+
setLocalColorScheme(next);
|
|
208
|
+
props.onColorSchemeChange?.(next);
|
|
209
|
+
};
|
|
210
|
+
const [reportOpen, setReportOpen] = useState2(false);
|
|
211
|
+
const reportTrigger = useRef(null);
|
|
212
|
+
const openReport = props.onReportProblem ? () => {
|
|
213
|
+
reportTrigger.current = document.activeElement instanceof HTMLButtonElement ? document.activeElement : null;
|
|
214
|
+
setReportOpen(true);
|
|
215
|
+
} : void 0;
|
|
216
|
+
const suppliedClient = props.client;
|
|
217
|
+
const getAccessRef = useRef(props.getAccess);
|
|
218
|
+
getAccessRef.current = props.getAccess;
|
|
219
|
+
const getLatestAccess = useCallback((context) => {
|
|
220
|
+
const latestGetAccess = getAccessRef.current;
|
|
221
|
+
if (!latestGetAccess) return Promise.reject(new Error("Chalk cannot refresh access after getAccess was removed."));
|
|
222
|
+
return latestGetAccess(context);
|
|
223
|
+
}, []);
|
|
224
|
+
const ownedClient = useMemo(() => {
|
|
225
|
+
if (suppliedClient) return null;
|
|
226
|
+
if (!props.space || !getAccessRef.current) throw new Error("Chalk requires either client or both space and getAccess.");
|
|
227
|
+
return createSpaceClient({ space: props.space, getAccess: getLatestAccess });
|
|
228
|
+
}, [getLatestAccess, props.space, suppliedClient]);
|
|
229
|
+
const client = suppliedClient ?? ownedClient;
|
|
230
|
+
useEffect2(() => {
|
|
231
|
+
if (!ownedClient) return;
|
|
232
|
+
return () => {
|
|
233
|
+
void ownedClient.leave().catch(() => void 0).finally(() => ownedClient.dispose());
|
|
234
|
+
};
|
|
235
|
+
}, [ownedClient]);
|
|
236
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("div", { "data-chalk": true, "data-chalk-theme": colorScheme, className: "chalk-root h-full min-h-0 w-full", style: chalkThemeStyle(props.theme, colorScheme), children: /* @__PURE__ */ jsxs(ChalkProvider, { client, children: [
|
|
237
|
+
/* @__PURE__ */ jsx(SpaceExperience, { ...props, theme: { ...props.theme, colorScheme }, onColorSchemeChange: changeColorScheme, resolvedColorScheme: colorScheme, onOpenReport: openReport }),
|
|
238
|
+
props.onReportProblem ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
239
|
+
/* @__PURE__ */ jsx(ShellStyles, {}),
|
|
240
|
+
/* @__PURE__ */ jsx(CallDialog, { kind: reportOpen ? "report" : null, onClose: () => setReportOpen(false), onReportProblem: props.onReportProblem, diagnostics: `Call: ${props.spaceName ?? props.space ?? "Call"}
|
|
241
|
+
Status: ${client.getSnapshot().connection.status}`, returnFocus: reportTrigger })
|
|
242
|
+
] }) : null
|
|
243
|
+
] }) }) });
|
|
244
|
+
}
|
|
245
|
+
function SpaceExperience(props) {
|
|
246
|
+
const client = useSpaceClient();
|
|
247
|
+
const connection = useConnection();
|
|
248
|
+
const recorded = useRecording().current?.status === "recording";
|
|
249
|
+
const previousStatus = useRef(connection.status);
|
|
250
|
+
const hasObservedStatus = useRef(false);
|
|
251
|
+
const autoJoinAttempted = useRef(false);
|
|
252
|
+
const previousClient = useRef(client);
|
|
253
|
+
const [joinError, setJoinError] = useState2(null);
|
|
254
|
+
const [retryPending, setRetryPending] = useState2(false);
|
|
255
|
+
const [episodeEnded, setEpisodeEnded] = useState2(false);
|
|
256
|
+
const [handledTerminal, setHandledTerminal] = useState2(void 0);
|
|
257
|
+
useEffect2(() => setHandledTerminal(void 0), [props.terminalState]);
|
|
258
|
+
const spaceName = props.spaceName ?? props.space ?? "Space";
|
|
259
|
+
if (previousClient.current !== client) {
|
|
260
|
+
previousClient.current = client;
|
|
261
|
+
previousStatus.current = connection.status;
|
|
262
|
+
hasObservedStatus.current = false;
|
|
263
|
+
autoJoinAttempted.current = false;
|
|
264
|
+
}
|
|
265
|
+
useClientEvents(client, props);
|
|
266
|
+
const join = useCallback(
|
|
267
|
+
async (settings) => {
|
|
268
|
+
try {
|
|
269
|
+
setJoinError(null);
|
|
270
|
+
await client.join(settings);
|
|
271
|
+
} catch (cause) {
|
|
272
|
+
setJoinError(cause instanceof Error ? cause.message : "Could not enter this Space.");
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
[client]
|
|
276
|
+
);
|
|
277
|
+
const retryAutomaticJoin = useCallback(() => {
|
|
278
|
+
autoJoinAttempted.current = true;
|
|
279
|
+
setHandledTerminal(props.terminalState);
|
|
280
|
+
setRetryPending(true);
|
|
281
|
+
void join(defaultJoinOptions(props)).finally(() => setRetryPending(false));
|
|
282
|
+
}, [join, props]);
|
|
283
|
+
useEffect2(() => setJoinError(null), [client]);
|
|
284
|
+
useEffect2(() => {
|
|
285
|
+
setEpisodeEnded(false);
|
|
286
|
+
}, [client]);
|
|
287
|
+
useEffect2(
|
|
288
|
+
() => client.on("episodeEnded", () => {
|
|
289
|
+
setEpisodeEnded(true);
|
|
290
|
+
}),
|
|
291
|
+
[client]
|
|
292
|
+
);
|
|
293
|
+
useEffect2(() => {
|
|
294
|
+
if (connection.status !== "idle" || autoJoinAttempted.current) return;
|
|
295
|
+
autoJoinAttempted.current = true;
|
|
296
|
+
void join(defaultJoinOptions(props));
|
|
297
|
+
}, [connection.status, join, props.defaults?.camera, props.defaults?.microphone, props.displayName]);
|
|
298
|
+
useEffect2(() => {
|
|
299
|
+
const previous = previousStatus.current;
|
|
300
|
+
if (hasObservedStatus.current) {
|
|
301
|
+
if (connection.status === "live" && previous !== "live" && previous !== "reconnecting") props.onJoined?.();
|
|
302
|
+
if (connection.status === "left" && previous !== "left") props.onLeft?.();
|
|
303
|
+
}
|
|
304
|
+
previousStatus.current = connection.status;
|
|
305
|
+
hasObservedStatus.current = true;
|
|
306
|
+
}, [connection.status, props.onJoined, props.onLeft]);
|
|
307
|
+
const callName = props.spaceName ?? props.space;
|
|
308
|
+
const statusTheme = { ...props.theme, colorScheme: props.resolvedColorScheme };
|
|
309
|
+
if (props.terminalState && props.terminalState !== handledTerminal) return /* @__PURE__ */ jsx(StatusSurface, { phase: props.terminalState, callName, theme: statusTheme, onRejoin: props.onRejoin ?? retryAutomaticJoin, onHome: props.onHome, onReportProblem: props.onOpenReport, retryPending });
|
|
310
|
+
if (connection.status === "idle")
|
|
311
|
+
return /* @__PURE__ */ jsx(CallLimbo, { theme: { ...props.theme, colorScheme: props.resolvedColorScheme }, recorded, spaceName, message: joinError ?? `Joining ${spaceName}\u2026`, action: joinError ? { label: "Try again", onClick: retryAutomaticJoin, disabled: retryPending } : void 0 });
|
|
312
|
+
if (connection.status === "joining") return /* @__PURE__ */ jsx(CallLimbo, { theme: { ...props.theme, colorScheme: props.resolvedColorScheme }, recorded, spaceName, message: `Joining ${spaceName}\u2026` });
|
|
313
|
+
if (connection.status === "failed" && connection.lastError?.code === "episode.ended") return /* @__PURE__ */ jsx(StatusSurface, { phase: "episode-ended", callName, theme: statusTheme, onHome: props.onHome, onReportProblem: props.onOpenReport });
|
|
314
|
+
if (connection.status === "failed") {
|
|
315
|
+
return /* @__PURE__ */ jsx(StatusSurface, { phase: "failed", callName, theme: statusTheme, onHome: props.onHome, onReportProblem: props.onOpenReport, onRetry: retryAutomaticJoin, retryPending });
|
|
316
|
+
}
|
|
317
|
+
if (connection.status === "leaving" || connection.status === "left")
|
|
318
|
+
return /* @__PURE__ */ jsx(StatusSurface, { phase: episodeEnded ? "episode-ended" : "left", callName, theme: statusTheme, onReportProblem: props.onOpenReport, onRejoin: props.onRejoin ?? retryAutomaticJoin, rejoinDisabled: connection.status === "leaving" || retryPending, onHome: props.onHome });
|
|
319
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative h-full min-h-0", children: [
|
|
320
|
+
/* @__PURE__ */ jsx(SpaceSurface, { ...props, spaceName }),
|
|
321
|
+
/* @__PURE__ */ jsx(CallLimbo, { overlay: true, active: false, initiallyCovered: true, message: "" })
|
|
322
|
+
] });
|
|
323
|
+
}
|
|
324
|
+
function SpaceSurface(props) {
|
|
325
|
+
const client = useSpaceClient();
|
|
326
|
+
const connection = useConnection();
|
|
327
|
+
const media = useMedia();
|
|
328
|
+
const whiteboardState = useWhiteboard();
|
|
329
|
+
const canEndEpisode = useCan("endEpisode");
|
|
330
|
+
const canDrawWhiteboard = useCan("drawWhiteboard");
|
|
331
|
+
const [commandError, setCommandError] = useState2(() => connection.lastError?.recoverable && connection.lastError.code.startsWith("media.") ? connection.lastError.message : null);
|
|
332
|
+
const runCommand = useCallback(async (command) => {
|
|
333
|
+
try {
|
|
334
|
+
await command();
|
|
335
|
+
setCommandError(null);
|
|
336
|
+
} catch (cause) {
|
|
337
|
+
setCommandError(cause instanceof Error ? cause.message : "This command could not be completed.");
|
|
338
|
+
}
|
|
339
|
+
}, []);
|
|
340
|
+
const whiteboardTransport = client.whiteboard.transport();
|
|
341
|
+
const whiteboardAvailable = props.features?.whiteboard !== false;
|
|
342
|
+
useEffect2(() => {
|
|
343
|
+
if (whiteboardAvailable) preloadWhiteboardStylesheet();
|
|
344
|
+
}, [whiteboardAvailable]);
|
|
345
|
+
const whiteboardSubscription = useWhiteboardSceneSubscription(whiteboardTransport, whiteboardAvailable);
|
|
346
|
+
const setWhiteboardPresentation = whiteboardSubscription.status === "ready" ? bindWhiteboardPresentation(whiteboardSubscription.transport) : void 0;
|
|
347
|
+
useEffect2(() => {
|
|
348
|
+
if (whiteboardSubscription.status === "failed") setCommandError(whiteboardSubscription.error.message);
|
|
349
|
+
else if (whiteboardSubscription.status === "loading" || whiteboardSubscription.status === "ready") setCommandError(null);
|
|
350
|
+
}, [whiteboardSubscription]);
|
|
351
|
+
const whiteboard = whiteboardAvailable && whiteboardState.engine.presenting && whiteboardSubscription.status === "ready" ? {
|
|
352
|
+
isOpen: true,
|
|
353
|
+
props: {
|
|
354
|
+
canDraw: canDrawWhiteboard,
|
|
355
|
+
collab: {
|
|
356
|
+
canDraw: canDrawWhiteboard,
|
|
357
|
+
subscribe: (listener) => whiteboardSubscription.transport.subscribe((event) => listener(toWhiteboardCollaborationEvent(event))),
|
|
358
|
+
submitUpdate: async (input) => whiteboardSubscription.transport.submitUpdate({ sceneId: input.sceneId, syncAll: input.syncAll, elements: input.elements.map(fromWhiteboardWireElement) }),
|
|
359
|
+
sendCursor: (input) => whiteboardSubscription.transport.sendCursor(input),
|
|
360
|
+
requestSnapshot: () => whiteboardSubscription.transport.requestSnapshot(),
|
|
361
|
+
onSubmissionError: (cause) => setCommandError(cause instanceof Error ? cause.message : "Whiteboard could not sync."),
|
|
362
|
+
clear: () => whiteboardSubscription.transport.clear(),
|
|
363
|
+
presignDownload: (fileId) => whiteboardSubscription.transport.files.getDownloadUrl(fileId)
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
} : void 0;
|
|
367
|
+
return /* @__PURE__ */ jsx(
|
|
368
|
+
SpaceView,
|
|
369
|
+
{
|
|
370
|
+
colorScheme: props.resolvedColorScheme,
|
|
371
|
+
shareUrl: props.shareUrl,
|
|
372
|
+
onReportProblem: props.onReportProblem,
|
|
373
|
+
onColorSchemeChange: props.onColorSchemeChange,
|
|
374
|
+
spaceName: props.spaceName,
|
|
375
|
+
inviteLink: props.inviteLink,
|
|
376
|
+
pickChatFiles: props.pickChatFiles,
|
|
377
|
+
commandError: commandError ?? void 0,
|
|
378
|
+
onDismissCommandError: () => setCommandError(null),
|
|
379
|
+
layout: props.layout,
|
|
380
|
+
onLayoutChange: props.onLayoutChange,
|
|
381
|
+
features: props.features,
|
|
382
|
+
whiteboard,
|
|
383
|
+
onToggleWhiteboard: canDrawWhiteboard && setWhiteboardPresentation ? () => void runCommand(() => setWhiteboardPresentation(!whiteboardState.engine.presenting)) : void 0,
|
|
384
|
+
onLeft: () => runCommand(() => client.leave()),
|
|
385
|
+
onEndEpisode: canEndEpisode ? () => runCommand(() => client.endEpisode()) : void 0,
|
|
386
|
+
reconnecting: { isVisible: connection.status === "reconnecting", status: "reconnecting", showNotice: false },
|
|
387
|
+
overlay: /* @__PURE__ */ jsx(Fragment, { children: media.incomingRequests[0] ? /* @__PURE__ */ jsx(MediaRequestDialog, { request: media.incomingRequests[0], onDecline: () => void runCommand(() => client.media.declineRequest(media.incomingRequests[0].requestId)), onAllow: () => void runCommand(() => client.media.acceptRequest(media.incomingRequests[0].requestId)) }) : null })
|
|
388
|
+
}
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
function bindWhiteboardPresentation(transport) {
|
|
392
|
+
const setPresentation = transport.setPresentation;
|
|
393
|
+
if (!setPresentation) return void 0;
|
|
394
|
+
return (presenting) => setPresentation.call(transport, presenting);
|
|
395
|
+
}
|
|
396
|
+
function defaultJoinOptions(props) {
|
|
397
|
+
const displayName = props.displayName?.trim();
|
|
398
|
+
return { ...displayName ? { displayName } : {}, microphone: props.defaults?.microphone ?? true, camera: props.defaults?.camera ?? true };
|
|
399
|
+
}
|
|
400
|
+
function useClientEvents(client, callbacks) {
|
|
401
|
+
useEffect2(() => client.on("participantJoined", (event) => callbacks.onParticipantJoined?.(event)), [callbacks.onParticipantJoined, client]);
|
|
402
|
+
useEffect2(() => client.on("participantLeft", (event) => callbacks.onParticipantLeft?.(event)), [callbacks.onParticipantLeft, client]);
|
|
403
|
+
useEffect2(() => client.on("episodeEnded", (event) => callbacks.onEpisodeEnded?.(event)), [callbacks.onEpisodeEnded, client]);
|
|
404
|
+
useEffect2(() => client.on("screenShareStarted", (event) => callbacks.onScreenShareStarted?.(event)), [callbacks.onScreenShareStarted, client]);
|
|
405
|
+
useEffect2(() => client.on("screenShareStopped", (event) => callbacks.onScreenShareStopped?.(event)), [callbacks.onScreenShareStopped, client]);
|
|
406
|
+
useEffect2(() => client.on("error", (event) => callbacks.onError?.(event)), [callbacks.onError, client]);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// src/components/space-view/RecordingSpaceView.tsx
|
|
410
|
+
import { CHALK_CHAT_ATTACHMENT_MIME_TYPES } from "@q9labsai/chalk-client";
|
|
411
|
+
import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
|
|
412
|
+
var RECORDING_TOOLBAR_BUTTONS = ["record", "participants", "chat", "reactions", "whiteboard"];
|
|
413
|
+
var CHAT_ATTACHMENT_MIME_TYPES = new Set(CHALK_CHAT_ATTACHMENT_MIME_TYPES);
|
|
414
|
+
function hasRenderableMedia(media) {
|
|
415
|
+
return media !== null && media !== void 0 && media !== false;
|
|
416
|
+
}
|
|
417
|
+
function isChatAttachmentMimeType(value) {
|
|
418
|
+
return CHAT_ATTACHMENT_MIME_TYPES.has(value);
|
|
419
|
+
}
|
|
420
|
+
function toChatMessages(frame) {
|
|
421
|
+
const displayTimes = /* @__PURE__ */ new Map();
|
|
422
|
+
const attachmentAssets = /* @__PURE__ */ new Map();
|
|
423
|
+
const messages = frame.chat.messages.map((message) => {
|
|
424
|
+
displayTimes.set(message.id, message.displayTime);
|
|
425
|
+
const attachments = message.attachments.map((attachment) => {
|
|
426
|
+
if (!isChatAttachmentMimeType(attachment.contentType)) throw new TypeError(`unsupported recording chat attachment content type: ${attachment.contentType}`);
|
|
427
|
+
attachmentAssets.set(attachment.id, attachment.assetId);
|
|
428
|
+
return {
|
|
429
|
+
attachmentId: attachment.id,
|
|
430
|
+
fileName: attachment.fileName,
|
|
431
|
+
mimeType: attachment.contentType,
|
|
432
|
+
byteLength: attachment.byteSize
|
|
433
|
+
};
|
|
434
|
+
});
|
|
435
|
+
return {
|
|
436
|
+
messageId: message.id,
|
|
437
|
+
clientMessageId: message.id,
|
|
438
|
+
sequence: String(message.sequence),
|
|
439
|
+
participantId: message.participantId,
|
|
440
|
+
displayName: message.displayName,
|
|
441
|
+
text: message.text,
|
|
442
|
+
// The supplied displayTime is authoritative. This stable ISO value only
|
|
443
|
+
// satisfies the shared chat model and is never formatted for presentation.
|
|
444
|
+
createdAt: new Date(message.createdAtMs).toISOString(),
|
|
445
|
+
attachments
|
|
446
|
+
};
|
|
447
|
+
});
|
|
448
|
+
return { messages, displayTimes, attachmentAssets };
|
|
449
|
+
}
|
|
450
|
+
function toParticipant(participant, resolveAssetUrl) {
|
|
451
|
+
return {
|
|
452
|
+
id: participant.id,
|
|
453
|
+
displayName: participant.displayName,
|
|
454
|
+
isSpeaking: participant.speaking,
|
|
455
|
+
isActiveSpeaker: participant.activeSpeaker,
|
|
456
|
+
isMuted: participant.microphoneMuted,
|
|
457
|
+
isVideoEnabled: participant.cameraEnabled,
|
|
458
|
+
isScreenSharing: participant.screenShareEnabled,
|
|
459
|
+
isHandRaised: participant.handRaised,
|
|
460
|
+
avatarUrl: participant.avatarAssetId ? resolveAssetUrl(participant.avatarAssetId) : void 0
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
function RecordingSpaceView({ frame, resolveMedia, resolveAssetUrl, renderWhiteboard, renderToken, className }) {
|
|
464
|
+
const sharedContent = frame.sharedContent;
|
|
465
|
+
const joinedParticipants = [...frame.participants.filter((participant) => participant.joined)].sort((left, right) => left.joinOrdinal - right.joinOrdinal || left.id.localeCompare(right.id));
|
|
466
|
+
const recordingParticipantsById = new Map(joinedParticipants.map((participant) => [participant.id, participant]));
|
|
467
|
+
const participantsById = new Map(joinedParticipants.map((participant) => [participant.id, toParticipant(participant, resolveAssetUrl)]));
|
|
468
|
+
const visibleMedia = frame.media.filter((source) => source.visible);
|
|
469
|
+
const mediaNodes = /* @__PURE__ */ new Map();
|
|
470
|
+
for (const source of visibleMedia) {
|
|
471
|
+
const participant = recordingParticipantsById.get(source.participantId);
|
|
472
|
+
if (!participant) continue;
|
|
473
|
+
mediaNodes.set(source.sourceId, resolveMedia(source, { participant, placement: source.kind === "camera" ? "camera" : "shared_content" }));
|
|
474
|
+
}
|
|
475
|
+
const cameraByParticipant = new Map(visibleMedia.filter((source) => source.kind === "camera").map((source) => [source.participantId, source]));
|
|
476
|
+
const items = joinedParticipants.map((participant) => ({ kind: "participant", id: participant.id, participant: participantsById.get(participant.id) }));
|
|
477
|
+
if (sharedContent.kind === "screen_share") {
|
|
478
|
+
const participant = participantsById.get(sharedContent.participantId);
|
|
479
|
+
const source = visibleMedia.find((candidate) => candidate.sourceId === sharedContent.sourceId && candidate.kind === "screen_share");
|
|
480
|
+
if (!participant || !source) throw new TypeError("recording screen share does not resolve to a joined participant and visible source");
|
|
481
|
+
items.push({ kind: "screen-share", id: screenShareItemId(participant.id), participant });
|
|
482
|
+
} else if (sharedContent.kind === "whiteboard") {
|
|
483
|
+
items.push({ kind: "whiteboard", id: WHITEBOARD_ITEM_ID });
|
|
484
|
+
}
|
|
485
|
+
const { messages, displayTimes, attachmentAssets } = toChatMessages(frame);
|
|
486
|
+
const participantNames = Object.fromEntries(frame.participants.map((participant) => [participant.id, participant.displayName]));
|
|
487
|
+
const durationSeconds = Math.floor(frame.elapsedMs / 1e3);
|
|
488
|
+
const renderContent = (item) => {
|
|
489
|
+
if (item.kind === "whiteboard") {
|
|
490
|
+
const content = sharedContent.kind === "whiteboard" ? renderWhiteboard?.(sharedContent) : null;
|
|
491
|
+
return /* @__PURE__ */ jsx2(StageContentTileSurface, { item, media: content, mediaVisible: hasRenderableMedia(content), className: "h-full w-full" });
|
|
492
|
+
}
|
|
493
|
+
if (sharedContent.kind !== "screen_share") throw new TypeError("recording stage contains a screen share without shared-content state");
|
|
494
|
+
const source = visibleMedia.find((candidate) => candidate.sourceId === sharedContent.sourceId);
|
|
495
|
+
if (!source) throw new TypeError("recording screen share source is not visible");
|
|
496
|
+
const media = mediaNodes.get(source.sourceId);
|
|
497
|
+
return /* @__PURE__ */ jsx2(ScreenSharePresentation, { sharedByName: item.participant.displayName, media, mediaVisible: hasRenderableMedia(media) });
|
|
498
|
+
};
|
|
499
|
+
const layout = frame.view.layout === "grid" ? "grid" : "focus";
|
|
500
|
+
return /* @__PURE__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsx2(
|
|
501
|
+
SpacePresentation,
|
|
502
|
+
{
|
|
503
|
+
colorScheme: frame.profile.theme.colorScheme,
|
|
504
|
+
stageBackground: frame.profile.theme.stageBackground,
|
|
505
|
+
header: {
|
|
506
|
+
spaceName: frame.space.name,
|
|
507
|
+
duration: durationSeconds,
|
|
508
|
+
isRecording: true,
|
|
509
|
+
layout
|
|
510
|
+
},
|
|
511
|
+
stage: /* @__PURE__ */ jsx2(
|
|
512
|
+
Stage,
|
|
513
|
+
{
|
|
514
|
+
items,
|
|
515
|
+
layout,
|
|
516
|
+
interactive: false,
|
|
517
|
+
animate: false,
|
|
518
|
+
generatedAvatars: frame.profile.theme.generatedAvatars,
|
|
519
|
+
emptyState: /* @__PURE__ */ jsx2(QuietSpace, {}),
|
|
520
|
+
renderParticipant: (item, context) => {
|
|
521
|
+
const source = cameraByParticipant.get(item.participant.id);
|
|
522
|
+
const media = source ? mediaNodes.get(source.sourceId) : null;
|
|
523
|
+
return /* @__PURE__ */ jsx2(
|
|
524
|
+
ParticipantTileSurface,
|
|
525
|
+
{
|
|
526
|
+
participant: item.participant,
|
|
527
|
+
media,
|
|
528
|
+
mediaVisible: item.participant.isVideoEnabled === true && hasRenderableMedia(media),
|
|
529
|
+
aspectRatio: "fill",
|
|
530
|
+
pinned: context.pinned,
|
|
531
|
+
style: context.style,
|
|
532
|
+
hidden: context.hidden,
|
|
533
|
+
generatedAvatars: frame.profile.theme.generatedAvatars,
|
|
534
|
+
animatedAvatars: false
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
},
|
|
538
|
+
renderContentTile: (item, context) => {
|
|
539
|
+
const media = item.kind === "whiteboard" && frame.sharedContent.kind === "whiteboard" ? renderWhiteboard?.(frame.sharedContent) : frame.sharedContent.kind === "screen_share" ? mediaNodes.get(frame.sharedContent.sourceId) : null;
|
|
540
|
+
return /* @__PURE__ */ jsx2(StageContentTileSurface, { item, media, mediaVisible: hasRenderableMedia(media), pinned: context.pinned, style: context.style, hidden: context.hidden });
|
|
541
|
+
},
|
|
542
|
+
renderPrimaryContent: renderContent,
|
|
543
|
+
className: "h-full"
|
|
544
|
+
}
|
|
545
|
+
),
|
|
546
|
+
controls: /* @__PURE__ */ jsx2(ControlBarPresentation, { density: "comfortable", buttons: RECORDING_TOOLBAR_BUTTONS, isRecording: true, isChatOpen: true, isWhiteboardOpen: sharedContent.kind === "whiteboard", expanded: true, detectDevices: false, displayOnly: true }),
|
|
547
|
+
stageOverlay: /* @__PURE__ */ jsx2(ReactionsOverlayPresentation, { reactions: frame.reactions, elapsedMs: frame.elapsedMs }),
|
|
548
|
+
sidebar: /* @__PURE__ */ jsx2(CallCard, { state: "open", interactive: false, children: /* @__PURE__ */ jsx2(
|
|
549
|
+
ChatPanelPresentation,
|
|
550
|
+
{
|
|
551
|
+
messages,
|
|
552
|
+
participantNames,
|
|
553
|
+
onResolveAttachmentUrl: async (attachmentId) => {
|
|
554
|
+
const assetId = attachmentAssets.get(attachmentId);
|
|
555
|
+
if (!assetId) throw new TypeError(`recording chat attachment is unknown: ${attachmentId}`);
|
|
556
|
+
return resolveAssetUrl(assetId);
|
|
557
|
+
},
|
|
558
|
+
messageDisplayTime: (message) => displayTimes.get(message.messageId) ?? "",
|
|
559
|
+
autoScrollBehavior: "auto",
|
|
560
|
+
generatedAvatars: frame.profile.theme.generatedAvatars,
|
|
561
|
+
disabled: true
|
|
562
|
+
}
|
|
563
|
+
) }),
|
|
564
|
+
renderToken,
|
|
565
|
+
interactive: false,
|
|
566
|
+
className
|
|
567
|
+
}
|
|
568
|
+
) });
|
|
569
|
+
}
|
|
570
|
+
RecordingSpaceView.displayName = "RecordingSpaceView";
|
|
571
|
+
|
|
572
|
+
// src/components/recording-history/RecordingHistoryPanel.tsx
|
|
573
|
+
import "react";
|
|
574
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
575
|
+
function RecordingHistoryPanel({
|
|
576
|
+
recordings,
|
|
577
|
+
isLoading = false,
|
|
578
|
+
error,
|
|
579
|
+
hasMore = false,
|
|
580
|
+
downloadingRecordingId,
|
|
581
|
+
readingTranscriptRecordingId,
|
|
582
|
+
refreshingExportRecordingId,
|
|
583
|
+
requestingExportRecordingId,
|
|
584
|
+
requestingTranscriptRecordingId,
|
|
585
|
+
onDownload,
|
|
586
|
+
onLoadMore,
|
|
587
|
+
onReadTranscript,
|
|
588
|
+
onRefreshExport,
|
|
589
|
+
onRequestExport,
|
|
590
|
+
onRequestTranscript,
|
|
591
|
+
onRetry,
|
|
592
|
+
onWatch,
|
|
593
|
+
className
|
|
594
|
+
}) {
|
|
595
|
+
return /* @__PURE__ */ jsxs2(ChalkPanel, { className: cn("h-full min-h-0 w-full overflow-hidden bg-[var(--chalk-app-panel)] p-0", className), contentClassName: "flex h-full min-h-0 flex-col", role: "region", "aria-label": "Recording history", children: [
|
|
596
|
+
/* @__PURE__ */ jsxs2("header", { className: "flex items-center justify-between gap-3 border-b border-[var(--chalk-app-line)] px-4 py-3", children: [
|
|
597
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
598
|
+
/* @__PURE__ */ jsx3("h2", { className: "text-base font-semibold", children: "Recordings" }),
|
|
599
|
+
/* @__PURE__ */ jsx3("p", { className: "mt-0.5 text-xs text-[var(--chalk-app-text-muted)]", children: "Captured Episode activity" })
|
|
600
|
+
] }),
|
|
601
|
+
isLoading ? /* @__PURE__ */ jsx3(Loading01Icon, { className: "size-4 animate-spin text-[var(--chalk-app-text-muted)]", "aria-label": "Loading recordings" }) : null
|
|
602
|
+
] }),
|
|
603
|
+
/* @__PURE__ */ jsx3("div", { className: "min-h-0 flex-1 overflow-y-auto p-3", children: error ? /* @__PURE__ */ jsx3(ChalkEmptyState, { title: "Recordings could not be loaded", description: error, tone: "danger", children: onRetry ? /* @__PURE__ */ jsxs2(ChalkButton, { className: "mt-4", onClick: onRetry, tone: "danger", children: [
|
|
604
|
+
/* @__PURE__ */ jsx3(RefreshIcon, { className: "size-4" }),
|
|
605
|
+
"Try again"
|
|
606
|
+
] }) : null }) : recordings.length === 0 && !isLoading ? /* @__PURE__ */ jsx3(ChalkEmptyState, { title: "No recordings yet", description: "Captured Episode activity will appear here.", children: /* @__PURE__ */ jsx3(Video01Icon, { className: "mx-auto mt-4 size-8 text-[var(--chalk-app-text-muted)]", "aria-hidden": "true" }) }) : /* @__PURE__ */ jsx3("ul", { className: "grid gap-2", "aria-label": "Recordings", children: recordings.map((recording) => /* @__PURE__ */ jsx3(
|
|
607
|
+
RecordingHistoryRow,
|
|
608
|
+
{
|
|
609
|
+
recording,
|
|
610
|
+
downloading: downloadingRecordingId === recording.id,
|
|
611
|
+
readingTranscript: readingTranscriptRecordingId === recording.id,
|
|
612
|
+
refreshingExport: refreshingExportRecordingId === recording.id,
|
|
613
|
+
requestingExport: requestingExportRecordingId === recording.id,
|
|
614
|
+
requestingTranscript: requestingTranscriptRecordingId === recording.id,
|
|
615
|
+
onDownload,
|
|
616
|
+
onReadTranscript,
|
|
617
|
+
onRefreshExport,
|
|
618
|
+
onRequestExport,
|
|
619
|
+
onRequestTranscript,
|
|
620
|
+
onWatch
|
|
621
|
+
},
|
|
622
|
+
recording.id
|
|
623
|
+
)) }) }),
|
|
624
|
+
hasMore && !error ? /* @__PURE__ */ jsx3("footer", { className: "border-t border-[var(--chalk-app-line)] p-3", children: /* @__PURE__ */ jsx3(ChalkButton, { className: "w-full", disabled: isLoading || !onLoadMore, loading: isLoading, onClick: onLoadMore, children: "Load more" }) }) : null
|
|
625
|
+
] });
|
|
626
|
+
}
|
|
627
|
+
function RecordingHistoryRow({ downloading, onDownload, onReadTranscript, onRefreshExport, onRequestExport, onRequestTranscript, onWatch, readingTranscript, recording, refreshingExport, requestingExport, requestingTranscript }) {
|
|
628
|
+
return /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsxs2(ChalkPanel, { className: "p-3", contentClassName: "flex items-start gap-3", children: [
|
|
629
|
+
/* @__PURE__ */ jsx3("span", { className: "grid size-10 shrink-0 place-items-center rounded-full bg-[var(--chalk-app-control)] text-[var(--chalk-app-text-muted)]", "aria-hidden": "true", children: /* @__PURE__ */ jsx3(Video01Icon, { className: "size-5" }) }),
|
|
630
|
+
/* @__PURE__ */ jsxs2("div", { className: "min-w-0 flex-1", children: [
|
|
631
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
632
|
+
/* @__PURE__ */ jsxs2("span", { className: "truncate text-sm font-medium", children: [
|
|
633
|
+
"Episode ",
|
|
634
|
+
shortId(recording.episode_id)
|
|
635
|
+
] }),
|
|
636
|
+
recording.export ? null : /* @__PURE__ */ jsx3(StatusBadge, { label: legacyStatusLabel(recording.status), tone: legacyStatusTone(recording.status) })
|
|
637
|
+
] }),
|
|
638
|
+
/* @__PURE__ */ jsx3("p", { className: "mt-1 text-xs text-[var(--chalk-app-text-muted)]", children: /* @__PURE__ */ jsx3("time", { dateTime: recording.created_at, children: formatTimestamp(recording.created_at) }) }),
|
|
639
|
+
recording.export ? /* @__PURE__ */ jsx3(
|
|
640
|
+
RecordingArtifactStatus,
|
|
641
|
+
{
|
|
642
|
+
downloading,
|
|
643
|
+
onDownload,
|
|
644
|
+
onReadTranscript,
|
|
645
|
+
onRefreshExport,
|
|
646
|
+
onRequestExport,
|
|
647
|
+
onRequestTranscript,
|
|
648
|
+
onWatch,
|
|
649
|
+
readingTranscript,
|
|
650
|
+
recording,
|
|
651
|
+
refreshingExport,
|
|
652
|
+
requestingExport,
|
|
653
|
+
requestingTranscript
|
|
654
|
+
}
|
|
655
|
+
) : /* @__PURE__ */ jsx3(LegacyRecordingActions, { downloading, onDownload, recording })
|
|
656
|
+
] })
|
|
657
|
+
] }) });
|
|
658
|
+
}
|
|
659
|
+
function RecordingArtifactStatus({ downloading, onDownload, onReadTranscript, onRefreshExport, onRequestExport, onRequestTranscript, onWatch, readingTranscript, recording, refreshingExport, requestingExport, requestingTranscript }) {
|
|
660
|
+
const video = recording.export;
|
|
661
|
+
if (!video) throw new Error("Recording export is required when rendering artifact status");
|
|
662
|
+
const transcriptStatus = recording.transcript?.status === "none" && recording.transcript.requestable ? "requestable" : recording.transcript?.status;
|
|
663
|
+
return /* @__PURE__ */ jsxs2("div", { className: "mt-3 grid gap-2 border-t border-[var(--chalk-app-line)] pt-3", children: [
|
|
664
|
+
recording.source ? /* @__PURE__ */ jsx3(ArtifactStatus, { icon: /* @__PURE__ */ jsx3(Video01Icon, { className: "size-4" }), label: "Capture", detail: sourceDetail(recording.source), status: sourceLabel(recording.source.status), tone: sourceTone(recording.source.status) }) : null,
|
|
665
|
+
transcriptStatus ? /* @__PURE__ */ jsx3(ArtifactStatus, { icon: /* @__PURE__ */ jsx3(FileTextIcon, { className: "size-4" }), label: "Transcript", detail: transcriptDetail(transcriptStatus), status: transcriptLabel(transcriptStatus), tone: transcriptTone(transcriptStatus) }) : null,
|
|
666
|
+
recording.transcript ? /* @__PURE__ */ jsx3(TranscriptContent, { onReadTranscript, onRequestTranscript, reading: readingTranscript, recording, requestingTranscript }) : null,
|
|
667
|
+
/* @__PURE__ */ jsx3(ArtifactStatus, { icon: /* @__PURE__ */ jsx3(Video01Icon, { className: "size-4" }), label: "Video", detail: exportDetail(video), status: exportLabel(video.status), tone: exportTone(video.status) }),
|
|
668
|
+
video.status === "ready" ? /* @__PURE__ */ jsx3(ReadyVideoActions, { downloading, onDownload, onWatch, recording }) : null,
|
|
669
|
+
video.status === "pending" ? /* @__PURE__ */ jsx3(PendingVideoActions, { onRefreshExport, recording, refreshingExport, requestingExport }) : null,
|
|
670
|
+
canRequestExport(video) ? /* @__PURE__ */ jsx3(RequestedVideoActions, { onRequestExport, recording, requestingExport }) : null
|
|
671
|
+
] });
|
|
672
|
+
}
|
|
673
|
+
function TranscriptContent({ onReadTranscript, onRequestTranscript, reading, recording, requestingTranscript }) {
|
|
674
|
+
const transcript = recording.transcript;
|
|
675
|
+
if (!transcript) return null;
|
|
676
|
+
if ((transcript.status === "none" || transcript.status === "requestable") && transcript.requestable && onRequestTranscript) {
|
|
677
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-1", children: /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Request transcript ${shortId(recording.id)}`, disabled: requestingTranscript, loading: requestingTranscript, onClick: () => onRequestTranscript(recording), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
678
|
+
/* @__PURE__ */ jsx3(FileTextIcon, { className: "size-4" }),
|
|
679
|
+
"Request transcript"
|
|
680
|
+
] }) });
|
|
681
|
+
}
|
|
682
|
+
if (transcript.status !== "completed") return null;
|
|
683
|
+
if (transcript.text !== void 0) {
|
|
684
|
+
return /* @__PURE__ */ jsxs2("details", { className: "rounded border border-[var(--chalk-app-line)] p-2", children: [
|
|
685
|
+
/* @__PURE__ */ jsx3("summary", { className: "cursor-pointer text-xs font-medium", children: "Transcript" }),
|
|
686
|
+
/* @__PURE__ */ jsx3("p", { className: "mt-2 whitespace-pre-wrap text-xs leading-5 text-[var(--chalk-app-text-muted)]", children: transcript.text })
|
|
687
|
+
] });
|
|
688
|
+
}
|
|
689
|
+
if (!onReadTranscript) return null;
|
|
690
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-1", children: /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Read transcript ${shortId(recording.id)}`, disabled: reading, loading: reading, onClick: () => onReadTranscript(recording), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
691
|
+
/* @__PURE__ */ jsx3(FileTextIcon, { className: "size-4" }),
|
|
692
|
+
"Read transcript"
|
|
693
|
+
] }) });
|
|
694
|
+
}
|
|
695
|
+
function ArtifactStatus({ detail, icon, label, status, tone }) {
|
|
696
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-2 text-xs", children: [
|
|
697
|
+
/* @__PURE__ */ jsx3("span", { className: "mt-0.5 text-[var(--chalk-app-text-muted)]", "aria-hidden": "true", children: icon }),
|
|
698
|
+
/* @__PURE__ */ jsxs2("div", { className: "min-w-0 flex-1", children: [
|
|
699
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
700
|
+
/* @__PURE__ */ jsx3("span", { className: "font-medium", children: label }),
|
|
701
|
+
/* @__PURE__ */ jsx3(StatusBadge, { label: status, tone })
|
|
702
|
+
] }),
|
|
703
|
+
/* @__PURE__ */ jsx3("p", { className: "mt-0.5 text-[var(--chalk-app-text-muted)]", children: detail })
|
|
704
|
+
] })
|
|
705
|
+
] });
|
|
706
|
+
}
|
|
707
|
+
function StatusBadge({ label, tone }) {
|
|
708
|
+
return /* @__PURE__ */ jsx3(ChalkBadge, { tone, children: label });
|
|
709
|
+
}
|
|
710
|
+
function ReadyVideoActions({ downloading, onDownload, onWatch, recording }) {
|
|
711
|
+
if (!onDownload && !onWatch) return null;
|
|
712
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap gap-2 pt-1", children: [
|
|
713
|
+
onWatch ? /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Watch recording ${shortId(recording.id)}`, onClick: () => onWatch(recording), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
714
|
+
/* @__PURE__ */ jsx3(PlayIcon, { className: "size-4" }),
|
|
715
|
+
"Watch"
|
|
716
|
+
] }) : null,
|
|
717
|
+
onDownload ? /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Download recording ${shortId(recording.id)}`, disabled: downloading, loading: downloading, onClick: () => onDownload(recording), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
718
|
+
/* @__PURE__ */ jsx3(Download01Icon, { className: "size-4" }),
|
|
719
|
+
"Download"
|
|
720
|
+
] }) : null
|
|
721
|
+
] });
|
|
722
|
+
}
|
|
723
|
+
function PendingVideoActions({ onRefreshExport, recording, refreshingExport, requestingExport }) {
|
|
724
|
+
if (!onRefreshExport) return null;
|
|
725
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-1", children: /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Check video status ${shortId(recording.id)}`, disabled: refreshingExport || requestingExport, loading: refreshingExport || requestingExport, onClick: () => onRefreshExport(recording), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
726
|
+
/* @__PURE__ */ jsx3(RefreshIcon, { className: "size-4" }),
|
|
727
|
+
"Check video status"
|
|
728
|
+
] }) });
|
|
729
|
+
}
|
|
730
|
+
function RequestedVideoActions({ onRequestExport, recording, requestingExport }) {
|
|
731
|
+
if (!onRequestExport) return null;
|
|
732
|
+
if (recording.export?.status === "failed") {
|
|
733
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-1", children: /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Retry Export ${shortId(recording.id)}`, disabled: requestingExport, loading: requestingExport, onClick: () => onRequestExport(recording, "retry"), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
734
|
+
/* @__PURE__ */ jsx3(RefreshIcon, { className: "size-4" }),
|
|
735
|
+
"Retry Export"
|
|
736
|
+
] }) });
|
|
737
|
+
}
|
|
738
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap gap-2 pt-1", children: [
|
|
739
|
+
/* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Watch recording ${shortId(recording.id)}`, disabled: requestingExport, loading: requestingExport, onClick: () => onRequestExport(recording, "watch"), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
740
|
+
/* @__PURE__ */ jsx3(PlayIcon, { className: "size-4" }),
|
|
741
|
+
"Watch"
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Download recording ${shortId(recording.id)}`, disabled: requestingExport, loading: requestingExport, onClick: () => onRequestExport(recording, "download"), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
744
|
+
/* @__PURE__ */ jsx3(Download01Icon, { className: "size-4" }),
|
|
745
|
+
"Download"
|
|
746
|
+
] })
|
|
747
|
+
] });
|
|
748
|
+
}
|
|
749
|
+
function LegacyRecordingActions({ downloading, onDownload, recording }) {
|
|
750
|
+
if (recording.status !== "completed" || !onDownload) return null;
|
|
751
|
+
return /* @__PURE__ */ jsx3("div", { className: "pt-3", children: /* @__PURE__ */ jsxs2(ChalkButton, { "aria-label": `Download recording ${shortId(recording.id)}`, disabled: downloading, loading: downloading, onClick: () => onDownload(recording), variant: "ghost", className: "shrink-0 px-3", children: [
|
|
752
|
+
/* @__PURE__ */ jsx3(Download01Icon, { className: "size-4" }),
|
|
753
|
+
/* @__PURE__ */ jsx3("span", { className: "hidden sm:inline", children: "Download" })
|
|
754
|
+
] }) });
|
|
755
|
+
}
|
|
756
|
+
function canRequestExport(value) {
|
|
757
|
+
return value.status === "none" || value.status === "failed" && value.retryable;
|
|
758
|
+
}
|
|
759
|
+
function legacyStatusLabel(status) {
|
|
760
|
+
if (status === "pending") return "Pending";
|
|
761
|
+
if (status === "processing") return "Processing";
|
|
762
|
+
if (status === "completed") return "Ready";
|
|
763
|
+
return "Failed";
|
|
764
|
+
}
|
|
765
|
+
function legacyStatusTone(status) {
|
|
766
|
+
if (status === "pending") return "neutral";
|
|
767
|
+
if (status === "processing") return "accent";
|
|
768
|
+
if (status === "completed") return "success";
|
|
769
|
+
return "danger";
|
|
770
|
+
}
|
|
771
|
+
function sourceDetail(source) {
|
|
772
|
+
if (source.status === "available") return source.expires_at ? `Available until ${formatTimestamp(source.expires_at)}.` : "Available for transcript processing and a video request.";
|
|
773
|
+
if (source.status === "pending") return "Capture is still being stored.";
|
|
774
|
+
if (source.status === "failed") return "Capture failed. A transcript and video cannot be created.";
|
|
775
|
+
return "Capture is no longer available.";
|
|
776
|
+
}
|
|
777
|
+
function transcriptDetail(status) {
|
|
778
|
+
if (status === "none") return "Transcript was not enabled for this Episode.";
|
|
779
|
+
if (status === "requestable") return "Transcript can be requested from this Capture.";
|
|
780
|
+
if (status === "unavailable") return "Transcript cannot be requested from this Capture.";
|
|
781
|
+
if (status === "pending") return "Transcript is waiting to be prepared.";
|
|
782
|
+
if (status === "processing") return "Transcript is being prepared.";
|
|
783
|
+
if (status === "completed") return "Transcript is ready.";
|
|
784
|
+
return "Transcript could not be created.";
|
|
785
|
+
}
|
|
786
|
+
function exportDetail(value) {
|
|
787
|
+
if (value.status === "none") return "A video will be prepared when you watch or download.";
|
|
788
|
+
if (value.status === "pending") return "Video is being prepared.";
|
|
789
|
+
if (value.status === "ready") return "Video is ready to watch or download.";
|
|
790
|
+
if (value.status === "failed") return value.failure_message ?? "Video could not be prepared.";
|
|
791
|
+
return "Video cannot be created because the capture is unavailable.";
|
|
792
|
+
}
|
|
793
|
+
function sourceTone(status) {
|
|
794
|
+
if (status === "available") return "success";
|
|
795
|
+
if (status === "pending") return "accent";
|
|
796
|
+
return "danger";
|
|
797
|
+
}
|
|
798
|
+
function sourceLabel(status) {
|
|
799
|
+
if (status === "pending") return "Saving";
|
|
800
|
+
if (status === "available") return "Available";
|
|
801
|
+
if (status === "failed") return "Failed";
|
|
802
|
+
return "Expired";
|
|
803
|
+
}
|
|
804
|
+
function transcriptTone(status) {
|
|
805
|
+
if (status === "none" || status === "requestable") return "neutral";
|
|
806
|
+
if (status === "unavailable") return "danger";
|
|
807
|
+
if (status === "completed") return "success";
|
|
808
|
+
if (status === "failed") return "danger";
|
|
809
|
+
return "accent";
|
|
810
|
+
}
|
|
811
|
+
function transcriptLabel(status) {
|
|
812
|
+
if (status === "none") return "Not enabled";
|
|
813
|
+
if (status === "requestable") return "Can request";
|
|
814
|
+
if (status === "unavailable") return "Unavailable";
|
|
815
|
+
if (status === "pending") return "Waiting";
|
|
816
|
+
if (status === "processing") return "Preparing";
|
|
817
|
+
if (status === "completed") return "Ready";
|
|
818
|
+
return "Failed";
|
|
819
|
+
}
|
|
820
|
+
function exportTone(status) {
|
|
821
|
+
if (status === "ready") return "success";
|
|
822
|
+
if (status === "none") return "neutral";
|
|
823
|
+
if (status === "pending") return "accent";
|
|
824
|
+
return "danger";
|
|
825
|
+
}
|
|
826
|
+
function exportLabel(status) {
|
|
827
|
+
if (status === "none") return "Not requested";
|
|
828
|
+
if (status === "pending") return "Preparing";
|
|
829
|
+
if (status === "ready") return "Ready";
|
|
830
|
+
if (status === "failed") return "Failed";
|
|
831
|
+
return "Unavailable";
|
|
832
|
+
}
|
|
833
|
+
function shortId(value) {
|
|
834
|
+
return value.slice(0, 8);
|
|
835
|
+
}
|
|
836
|
+
function formatTimestamp(value) {
|
|
837
|
+
const date = new Date(value);
|
|
838
|
+
if (Number.isNaN(date.getTime())) return value;
|
|
839
|
+
const datePart = date.toISOString().slice(0, 10);
|
|
840
|
+
const timePart = date.toISOString().slice(11, 16);
|
|
841
|
+
return `${datePart} ${timePart} UTC`;
|
|
842
|
+
}
|
|
843
|
+
RecordingHistoryPanel.displayName = "RecordingHistoryPanel";
|
|
844
|
+
|
|
845
|
+
// src/components/whiteboard-view/RecordingWhiteboardView.tsx
|
|
846
|
+
import { fromWireElement } from "@q9labsai/chalk-whiteboard";
|
|
847
|
+
import { useCallback as useCallback2, useEffect as useEffect3, useMemo as useMemo2, useState as useState3 } from "react";
|
|
848
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
849
|
+
function RecordingWhiteboardView({ state: stateValue, files, expectedSceneId, expectedRevision, theme, excalidrawCssPath, onLoadError, onPresented, className }) {
|
|
850
|
+
const cursor = useMemo2(() => createRecordingWhiteboardCursor(stateValue), [stateValue]);
|
|
851
|
+
const state = useMemo2(() => cursor.at(expectedRevision), [cursor, expectedRevision]);
|
|
852
|
+
const elements = useMemo2(() => state.elements.map(fromWireElement), [state.elements]);
|
|
853
|
+
const resolvedTheme = theme ?? "light";
|
|
854
|
+
const [ready, setReady] = useState3(null);
|
|
855
|
+
const [presentedState, setPresentedState] = useState3(null);
|
|
856
|
+
const handleReady = useCallback2((api) => setReady(Object.freeze({ api, defaultViewBackgroundColor: api.getAppState().viewBackgroundColor })), []);
|
|
857
|
+
const requiredFileIds = recordingWhiteboardFileIds(state);
|
|
858
|
+
if (expectedSceneId !== void 0 && state.sceneId !== expectedSceneId) throw new TypeError("recording whiteboard scene does not match the presentation frame");
|
|
859
|
+
if (expectedRevision !== void 0 && state.revision !== expectedRevision) throw new TypeError("recording whiteboard revision does not match the presentation frame");
|
|
860
|
+
for (const fileId of requiredFileIds) {
|
|
861
|
+
if (!Object.hasOwn(files ?? {}, fileId)) throw new TypeError(`recording whiteboard file is missing: ${recordingWhiteboardFileAssetId(fileId)}`);
|
|
862
|
+
}
|
|
863
|
+
useEffect3(() => {
|
|
864
|
+
if (!ready) return;
|
|
865
|
+
setPresentedState(null);
|
|
866
|
+
const installScene = () => {
|
|
867
|
+
if (files) ready.api.addFiles(Object.values(files));
|
|
868
|
+
ready.api.updateScene({ elements, appState: recordingWhiteboardSceneAppState(state, ready.defaultViewBackgroundColor), captureUpdate: "NEVER" });
|
|
869
|
+
};
|
|
870
|
+
installScene();
|
|
871
|
+
const visibleElements = elements.filter((element) => !element.isDeleted);
|
|
872
|
+
let presentedFrameRef;
|
|
873
|
+
const reconcileFrame = requestAnimationFrame(() => {
|
|
874
|
+
installScene();
|
|
875
|
+
if (visibleElements.length > 0) ready.api.scrollToContent(visibleElements, { fitToContent: true, animate: false, viewportZoomFactor: 0.9 });
|
|
876
|
+
const presentedFrame = requestAnimationFrame(() => setPresentedState(state));
|
|
877
|
+
presentedFrameRef = presentedFrame;
|
|
878
|
+
});
|
|
879
|
+
return () => {
|
|
880
|
+
cancelAnimationFrame(reconcileFrame);
|
|
881
|
+
if (presentedFrameRef !== void 0) cancelAnimationFrame(presentedFrameRef);
|
|
882
|
+
};
|
|
883
|
+
}, [elements, files, ready, state]);
|
|
884
|
+
useEffect3(() => {
|
|
885
|
+
if (presentedState !== state || onPresented === void 0) return;
|
|
886
|
+
onPresented(state);
|
|
887
|
+
}, [onPresented, presentedState, state]);
|
|
888
|
+
return /* @__PURE__ */ jsx4(WhiteboardView, { canDraw: false, className: cn("h-full w-full !min-h-0 !border-0", className), excalidrawCssPath, onExcalidrawApiReady: handleReady, onLoadError, theme: resolvedTheme });
|
|
889
|
+
}
|
|
890
|
+
RecordingWhiteboardView.displayName = "RecordingWhiteboardView";
|
|
891
|
+
|
|
892
|
+
// src/components/logo/Logo.tsx
|
|
893
|
+
import { useId } from "react";
|
|
894
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
895
|
+
var DEFAULT_COLOR = "#1A332B";
|
|
896
|
+
var DEFAULT_HEIGHT = 32;
|
|
897
|
+
var DEFAULT_VARIANT = "wordmark";
|
|
898
|
+
var WORDMARK_VIEW_BOX = "0 0 200 80";
|
|
899
|
+
var MARK_VIEW_BOX = "0 0 68 80";
|
|
900
|
+
function gradientId(prefix, name) {
|
|
901
|
+
return `${prefix}-${name}`;
|
|
902
|
+
}
|
|
903
|
+
function Logo({ accessibilityLabel = "Chalk", color = DEFAULT_COLOR, height = DEFAULT_HEIGHT, variant = DEFAULT_VARIANT }) {
|
|
904
|
+
const generatedId = useId().replace(/[^a-zA-Z0-9_-]/gu, "");
|
|
905
|
+
const idPrefix = `chalk-logo-${generatedId}`;
|
|
906
|
+
const isWordmark = variant === "wordmark";
|
|
907
|
+
const viewBox = isWordmark ? WORDMARK_VIEW_BOX : MARK_VIEW_BOX;
|
|
908
|
+
const width = isWordmark ? height * 2.5 : height * (68 / 80);
|
|
909
|
+
const accessible = accessibilityLabel !== null;
|
|
910
|
+
return /* @__PURE__ */ jsxs3(
|
|
911
|
+
"svg",
|
|
912
|
+
{
|
|
913
|
+
"aria-hidden": accessible ? void 0 : true,
|
|
914
|
+
"aria-label": accessible ? accessibilityLabel : void 0,
|
|
915
|
+
className: "chalk-logo",
|
|
916
|
+
color,
|
|
917
|
+
"data-chalk-logo": "true",
|
|
918
|
+
focusable: "false",
|
|
919
|
+
height,
|
|
920
|
+
role: accessible ? "img" : void 0,
|
|
921
|
+
viewBox,
|
|
922
|
+
width,
|
|
923
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
924
|
+
fill: "none",
|
|
925
|
+
children: [
|
|
926
|
+
/* @__PURE__ */ jsxs3("defs", { children: [
|
|
927
|
+
/* @__PURE__ */ jsxs3("linearGradient", { id: gradientId(idPrefix, "green"), x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
928
|
+
/* @__PURE__ */ jsx5("stop", { offset: "0%", stopColor: "#C5E5C0" }),
|
|
929
|
+
/* @__PURE__ */ jsx5("stop", { offset: "100%", stopColor: "#80B879" })
|
|
930
|
+
] }),
|
|
931
|
+
/* @__PURE__ */ jsxs3("linearGradient", { id: gradientId(idPrefix, "yellow"), x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
932
|
+
/* @__PURE__ */ jsx5("stop", { offset: "0%", stopColor: "#FCEAB3" }),
|
|
933
|
+
/* @__PURE__ */ jsx5("stop", { offset: "100%", stopColor: "#D9B641" })
|
|
934
|
+
] }),
|
|
935
|
+
/* @__PURE__ */ jsxs3("linearGradient", { id: gradientId(idPrefix, "blue"), x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
936
|
+
/* @__PURE__ */ jsx5("stop", { offset: "0%", stopColor: "#B2E0F0" }),
|
|
937
|
+
/* @__PURE__ */ jsx5("stop", { offset: "100%", stopColor: "#55AAC9" })
|
|
938
|
+
] }),
|
|
939
|
+
/* @__PURE__ */ jsxs3("linearGradient", { id: gradientId(idPrefix, "pink"), x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
940
|
+
/* @__PURE__ */ jsx5("stop", { offset: "0%", stopColor: "#F8CACA" }),
|
|
941
|
+
/* @__PURE__ */ jsx5("stop", { offset: "100%", stopColor: "#D67B7B" })
|
|
942
|
+
] })
|
|
943
|
+
] }),
|
|
944
|
+
/* @__PURE__ */ jsxs3("g", { transform: "translate(2, 2) scale(0.95)", children: [
|
|
945
|
+
/* @__PURE__ */ jsx5("g", { className: "chalk-logo__stick chalk-logo__stick--green", children: /* @__PURE__ */ jsxs3("g", { transform: "rotate(-15 20 60)", children: [
|
|
946
|
+
/* @__PURE__ */ jsx5("path", { d: "M9,20 L21,20 L22,63 A7,7 0 0 1 8,63 Z", fill: `url(#${gradientId(idPrefix, "green")})` }),
|
|
947
|
+
/* @__PURE__ */ jsx5("ellipse", { cx: "15", cy: "20", rx: "6", ry: "2.5", fill: "#D8ECD4" })
|
|
948
|
+
] }) }),
|
|
949
|
+
/* @__PURE__ */ jsx5("g", { className: "chalk-logo__stick chalk-logo__stick--yellow", children: /* @__PURE__ */ jsxs3("g", { transform: "rotate(-8 32 55)", children: [
|
|
950
|
+
/* @__PURE__ */ jsx5("path", { d: "M23,15 L35,15 L36,60 A7,7 0 0 1 22,60 Z", fill: `url(#${gradientId(idPrefix, "yellow")})` }),
|
|
951
|
+
/* @__PURE__ */ jsx5("ellipse", { cx: "29", cy: "15", rx: "6", ry: "2.5", fill: "#FEF3D1" })
|
|
952
|
+
] }) }),
|
|
953
|
+
/* @__PURE__ */ jsx5("g", { className: "chalk-logo__stick chalk-logo__stick--blue", children: /* @__PURE__ */ jsxs3("g", { transform: "rotate(12 60 30)", children: [
|
|
954
|
+
/* @__PURE__ */ jsx5("path", { d: "M36,8 L48,8 L49,56 A7,7 0 0 1 35,56 Z", fill: `url(#${gradientId(idPrefix, "blue")})` }),
|
|
955
|
+
/* @__PURE__ */ jsx5("ellipse", { cx: "42", cy: "8", rx: "6", ry: "2.5", fill: "#D0EDF8" })
|
|
956
|
+
] }) }),
|
|
957
|
+
/* @__PURE__ */ jsx5("g", { className: "chalk-logo__stick chalk-logo__stick--pink", children: /* @__PURE__ */ jsxs3("g", { transform: "rotate(5 55 50)", children: [
|
|
958
|
+
/* @__PURE__ */ jsx5("path", { d: "M49,70 L61,70 L62,29 A7,7 0 0 0 48,29 Z", fill: `url(#${gradientId(idPrefix, "pink")})` }),
|
|
959
|
+
/* @__PURE__ */ jsx5("ellipse", { cx: "55", cy: "70", rx: "6", ry: "2.5", fill: "#FBE4E4" })
|
|
960
|
+
] }) })
|
|
961
|
+
] }),
|
|
962
|
+
isWordmark ? /* @__PURE__ */ jsx5("text", { className: "chalk-logo__wordmark", x: "90", y: "52", fontFamily: "system-ui, -apple-system, BlinkMacSystemFont, sans-serif", fontSize: "38", fontWeight: "600", letterSpacing: "-0.02em", fill: "currentColor", children: "chalk" }) : null
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
export {
|
|
969
|
+
Chalk,
|
|
970
|
+
RecordingSpaceView,
|
|
971
|
+
RecordingHistoryPanel,
|
|
972
|
+
RecordingWhiteboardView,
|
|
973
|
+
Logo
|
|
974
|
+
};
|