@mrksbnc/livekit-vue 0.0.3 → 1.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 +46 -30
- package/dist/background/BackgroundEffectSelect.vue.d.cts +55 -0
- package/dist/background/BackgroundEffectSelect.vue.d.mts +55 -0
- package/dist/background/index.d.cts +3 -0
- package/dist/background/index.d.mts +3 -0
- package/dist/background.cjs +2 -0
- package/dist/background.cjs.map +1 -0
- package/dist/background.js +239 -0
- package/dist/background.js.map +1 -0
- package/dist/components/chat/ChatEntry.vue.d.cts +16 -0
- package/dist/components/chat/ChatEntry.vue.d.mts +16 -0
- package/dist/components/chat/chat.utils.d.cts +3 -0
- package/dist/components/chat/chat.utils.d.mts +3 -0
- package/dist/components/chat/index.d.cts +3 -0
- package/dist/components/chat/index.d.mts +3 -0
- package/dist/components/chat/render-node.d.cts +8 -0
- package/dist/components/chat/render-node.d.mts +8 -0
- package/dist/components/context/ParticipantContextProvider.vue.d.cts +16 -0
- package/dist/components/context/ParticipantContextProvider.vue.d.mts +16 -0
- package/dist/components/context/RoomContextProvider.vue.d.cts +16 -0
- package/dist/components/context/RoomContextProvider.vue.d.mts +16 -0
- package/dist/components/context/SessionProvider.vue.d.cts +16 -0
- package/dist/components/context/SessionProvider.vue.d.mts +16 -0
- package/dist/components/context/TrackRefContextProvider.vue.d.cts +16 -0
- package/dist/components/context/TrackRefContextProvider.vue.d.mts +16 -0
- package/dist/components/context/index.d.cts +4 -0
- package/dist/components/context/index.d.mts +4 -0
- package/dist/components/controls/ChatToggle.vue.d.cts +17 -0
- package/dist/components/controls/ChatToggle.vue.d.mts +17 -0
- package/dist/components/controls/ClearPinButton.vue.d.cts +22 -0
- package/dist/components/controls/ClearPinButton.vue.d.mts +22 -0
- package/dist/components/controls/DisconnectButton.vue.d.cts +18 -0
- package/dist/components/controls/DisconnectButton.vue.d.mts +18 -0
- package/dist/components/controls/FocusToggle.vue.d.cts +19 -0
- package/dist/components/controls/FocusToggle.vue.d.mts +19 -0
- package/dist/components/controls/MediaDeviceSelect.vue.d.cts +45 -0
- package/dist/components/controls/MediaDeviceSelect.vue.d.mts +45 -0
- package/dist/components/controls/PaginationControl.vue.d.cts +18 -0
- package/dist/components/controls/PaginationControl.vue.d.mts +18 -0
- package/dist/components/controls/PaginationIndicator.vue.d.cts +8 -0
- package/dist/components/controls/PaginationIndicator.vue.d.mts +8 -0
- package/dist/components/controls/SettingsMenuToggle.vue.d.cts +16 -0
- package/dist/components/controls/SettingsMenuToggle.vue.d.mts +16 -0
- package/dist/components/controls/StartAudio.vue.d.cts +21 -0
- package/dist/components/controls/StartAudio.vue.d.mts +21 -0
- package/dist/components/controls/StartMediaButton.vue.d.cts +24 -0
- package/dist/components/controls/StartMediaButton.vue.d.mts +24 -0
- package/dist/components/controls/TrackToggle.vue.d.cts +43 -0
- package/dist/components/controls/TrackToggle.vue.d.mts +43 -0
- package/dist/components/controls/VideoQualitySelect.vue.d.cts +33 -0
- package/dist/components/controls/VideoQualitySelect.vue.d.mts +33 -0
- package/dist/components/controls/index.d.cts +24 -0
- package/dist/components/controls/index.d.mts +24 -0
- package/dist/components/icons/CameraDisabledIcon.vue.d.cts +3 -0
- package/dist/components/icons/CameraDisabledIcon.vue.d.mts +3 -0
- package/dist/components/icons/CameraIcon.vue.d.cts +3 -0
- package/dist/components/icons/CameraIcon.vue.d.mts +3 -0
- package/dist/components/icons/ChatCloseIcon.vue.d.cts +3 -0
- package/dist/components/icons/ChatCloseIcon.vue.d.mts +3 -0
- package/dist/components/icons/ChatIcon.vue.d.cts +3 -0
- package/dist/components/icons/ChatIcon.vue.d.mts +3 -0
- package/dist/components/icons/ChevronIcon.vue.d.cts +3 -0
- package/dist/components/icons/ChevronIcon.vue.d.mts +3 -0
- package/dist/components/icons/FocusToggleIcon.vue.d.cts +3 -0
- package/dist/components/icons/FocusToggleIcon.vue.d.mts +3 -0
- package/dist/components/icons/GearIcon.vue.d.cts +3 -0
- package/dist/components/icons/GearIcon.vue.d.mts +3 -0
- package/dist/components/icons/LeaveIcon.vue.d.cts +3 -0
- package/dist/components/icons/LeaveIcon.vue.d.mts +3 -0
- package/dist/components/icons/LockLockedIcon.vue.d.cts +3 -0
- package/dist/components/icons/LockLockedIcon.vue.d.mts +3 -0
- package/dist/components/icons/MicDisabledIcon.vue.d.cts +3 -0
- package/dist/components/icons/MicDisabledIcon.vue.d.mts +3 -0
- package/dist/components/icons/MicIcon.vue.d.cts +3 -0
- package/dist/components/icons/MicIcon.vue.d.mts +3 -0
- package/dist/components/icons/ParticipantPlaceholder.vue.d.cts +3 -0
- package/dist/components/icons/ParticipantPlaceholder.vue.d.mts +3 -0
- package/dist/components/icons/QualityExcellentIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityExcellentIcon.vue.d.mts +3 -0
- package/dist/components/icons/QualityGoodIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityGoodIcon.vue.d.mts +3 -0
- package/dist/components/icons/QualityPoorIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityPoorIcon.vue.d.mts +3 -0
- package/dist/components/icons/QualityUnknownIcon.vue.d.cts +3 -0
- package/dist/components/icons/QualityUnknownIcon.vue.d.mts +3 -0
- package/dist/components/icons/ScreenShareIcon.vue.d.cts +3 -0
- package/dist/components/icons/ScreenShareIcon.vue.d.mts +3 -0
- package/dist/components/icons/ScreenShareStopIcon.vue.d.cts +3 -0
- package/dist/components/icons/ScreenShareStopIcon.vue.d.mts +3 -0
- package/dist/components/icons/SpinnerIcon.vue.d.cts +3 -0
- package/dist/components/icons/SpinnerIcon.vue.d.mts +3 -0
- package/dist/components/icons/UnfocusToggleIcon.vue.d.cts +3 -0
- package/dist/components/icons/UnfocusToggleIcon.vue.d.mts +3 -0
- package/dist/components/icons/index.d.cts +21 -0
- package/dist/components/icons/index.d.mts +21 -0
- package/dist/components/icons/utils.d.cts +4 -0
- package/dist/components/icons/utils.d.mts +4 -0
- package/dist/components/index.d.cts +9 -0
- package/dist/components/index.d.mts +9 -0
- package/dist/components/layout/CarouselLayout.vue.d.cts +24 -0
- package/dist/components/layout/CarouselLayout.vue.d.mts +24 -0
- package/dist/components/layout/FocusLayout.vue.d.cts +16 -0
- package/dist/components/layout/FocusLayout.vue.d.mts +16 -0
- package/dist/components/layout/FocusLayoutContainer.vue.d.cts +14 -0
- package/dist/components/layout/FocusLayoutContainer.vue.d.mts +14 -0
- package/dist/components/layout/GridLayout.vue.d.cts +24 -0
- package/dist/components/layout/GridLayout.vue.d.mts +24 -0
- package/dist/components/layout/LayoutContextProvider.vue.d.cts +27 -0
- package/dist/components/layout/LayoutContextProvider.vue.d.mts +27 -0
- package/dist/components/layout/index.d.cts +10 -0
- package/dist/components/layout/index.d.mts +10 -0
- package/dist/components/participant/AudioTrack.vue.d.cts +17 -0
- package/dist/components/participant/AudioTrack.vue.d.mts +17 -0
- package/dist/components/participant/AudioVisualizer.vue.d.cts +10 -0
- package/dist/components/participant/AudioVisualizer.vue.d.mts +10 -0
- package/dist/components/participant/BarVisualizer.vue.d.cts +46 -0
- package/dist/components/participant/BarVisualizer.vue.d.mts +46 -0
- package/dist/components/participant/ConnectionQualityIndicator.vue.d.cts +19 -0
- package/dist/components/participant/ConnectionQualityIndicator.vue.d.mts +19 -0
- package/dist/components/participant/ParticipantAudioTile.vue.d.cts +23 -0
- package/dist/components/participant/ParticipantAudioTile.vue.d.mts +23 -0
- package/dist/components/participant/ParticipantAvatar.vue.d.cts +10 -0
- package/dist/components/participant/ParticipantAvatar.vue.d.mts +10 -0
- package/dist/components/participant/ParticipantName.vue.d.cts +17 -0
- package/dist/components/participant/ParticipantName.vue.d.mts +17 -0
- package/dist/components/participant/ParticipantTile.vue.d.cts +27 -0
- package/dist/components/participant/ParticipantTile.vue.d.mts +27 -0
- package/dist/components/participant/TrackMutedIndicator.vue.d.cts +22 -0
- package/dist/components/participant/TrackMutedIndicator.vue.d.mts +22 -0
- package/dist/components/participant/VideoTrack.vue.d.cts +17 -0
- package/dist/components/participant/VideoTrack.vue.d.mts +17 -0
- package/dist/components/participant/index.d.cts +19 -0
- package/dist/components/participant/index.d.mts +19 -0
- package/dist/components/prefabs/AudioConference.vue.d.cts +26 -0
- package/dist/components/prefabs/AudioConference.vue.d.mts +26 -0
- package/dist/components/prefabs/Chat.vue.d.cts +36 -0
- package/dist/components/prefabs/Chat.vue.d.mts +36 -0
- package/dist/components/prefabs/ControlBar.vue.d.cts +52 -0
- package/dist/components/prefabs/ControlBar.vue.d.mts +52 -0
- package/dist/components/prefabs/MediaDeviceMenu.vue.d.cts +46 -0
- package/dist/components/prefabs/MediaDeviceMenu.vue.d.mts +46 -0
- package/dist/components/prefabs/PreJoin.vue.d.cts +45 -0
- package/dist/components/prefabs/PreJoin.vue.d.mts +45 -0
- package/dist/components/prefabs/VideoConference.vue.d.cts +28 -0
- package/dist/components/prefabs/VideoConference.vue.d.mts +28 -0
- package/dist/components/prefabs/VoiceAssistantControlBar.vue.d.cts +33 -0
- package/dist/components/prefabs/VoiceAssistantControlBar.vue.d.mts +33 -0
- package/dist/components/prefabs/index.d.cts +14 -0
- package/dist/components/prefabs/index.d.mts +14 -0
- package/dist/components/room/ConnectionStateToast.vue.d.cts +8 -0
- package/dist/components/room/ConnectionStateToast.vue.d.mts +8 -0
- package/dist/components/room/ConnectionStatus.vue.d.cts +19 -0
- package/dist/components/room/ConnectionStatus.vue.d.mts +19 -0
- package/dist/components/room/LiveKitRoom.vue.d.cts +47 -0
- package/dist/components/room/LiveKitRoom.vue.d.mts +47 -0
- package/dist/components/room/ParticipantLoop.vue.d.cts +18 -0
- package/dist/components/room/ParticipantLoop.vue.d.mts +18 -0
- package/dist/components/room/RoomAudioRenderer.vue.d.cts +13 -0
- package/dist/components/room/RoomAudioRenderer.vue.d.mts +13 -0
- package/dist/components/room/RoomName.vue.d.cts +20 -0
- package/dist/components/room/RoomName.vue.d.mts +20 -0
- package/dist/components/room/Toast.vue.d.cts +14 -0
- package/dist/components/room/Toast.vue.d.mts +14 -0
- package/dist/components/room/TrackLoop.vue.d.cts +18 -0
- package/dist/components/room/TrackLoop.vue.d.mts +18 -0
- package/dist/components/room/index.d.cts +16 -0
- package/dist/components/room/index.d.mts +16 -0
- package/dist/components/style.d.cts +11 -0
- package/dist/components/style.d.mts +11 -0
- package/dist/composables/index.d.cts +66 -0
- package/dist/composables/index.d.mts +66 -0
- package/dist/composables/useAgent.d.cts +67 -0
- package/dist/composables/useAgent.d.mts +67 -0
- package/dist/composables/useAgentExpression.d.cts +20 -0
- package/dist/composables/useAgentExpression.d.mts +20 -0
- package/dist/composables/useAudioPlayback.d.cts +10 -0
- package/dist/composables/useAudioPlayback.d.mts +10 -0
- package/dist/composables/useBackgroundEffect.d.cts +43 -0
- package/dist/composables/useBackgroundEffect.d.mts +43 -0
- package/dist/composables/useBarAnimator.d.cts +11 -0
- package/dist/composables/useBarAnimator.d.mts +11 -0
- package/dist/composables/useChat.d.cts +13 -0
- package/dist/composables/useChat.d.mts +13 -0
- package/dist/composables/useChatToggle.d.cts +13 -0
- package/dist/composables/useChatToggle.d.mts +13 -0
- package/dist/composables/useClearPinButton.d.cts +14 -0
- package/dist/composables/useClearPinButton.d.mts +14 -0
- package/dist/composables/useConnectionQualityIndicator.d.cts +9 -0
- package/dist/composables/useConnectionQualityIndicator.d.mts +9 -0
- package/dist/composables/useConnectionState.d.cts +13 -0
- package/dist/composables/useConnectionState.d.mts +13 -0
- package/dist/composables/useConnectionStatus.d.cts +16 -0
- package/dist/composables/useConnectionStatus.d.mts +16 -0
- package/dist/composables/useDataChannel.d.cts +14 -0
- package/dist/composables/useDataChannel.d.mts +14 -0
- package/dist/composables/useDisconnectButton.d.cts +9 -0
- package/dist/composables/useDisconnectButton.d.mts +9 -0
- package/dist/composables/useEvents.d.cts +15 -0
- package/dist/composables/useEvents.d.mts +15 -0
- package/dist/composables/useFacingMode.d.cts +17 -0
- package/dist/composables/useFacingMode.d.mts +17 -0
- package/dist/composables/useFocusToggle.d.cts +14 -0
- package/dist/composables/useFocusToggle.d.mts +14 -0
- package/dist/composables/useGridLayout.d.cts +13 -0
- package/dist/composables/useGridLayout.d.mts +13 -0
- package/dist/composables/useIsEncrypted.d.cts +10 -0
- package/dist/composables/useIsEncrypted.d.mts +10 -0
- package/dist/composables/useIsMuted.d.cts +11 -0
- package/dist/composables/useIsMuted.d.mts +11 -0
- package/dist/composables/useIsRecording.d.cts +9 -0
- package/dist/composables/useIsRecording.d.mts +9 -0
- package/dist/composables/useIsSpeaking.d.cts +9 -0
- package/dist/composables/useIsSpeaking.d.mts +9 -0
- package/dist/composables/useKrispNoiseFilter.d.cts +16 -0
- package/dist/composables/useKrispNoiseFilter.d.mts +16 -0
- package/dist/composables/useLiveKitRoom.d.cts +15 -0
- package/dist/composables/useLiveKitRoom.d.mts +15 -0
- package/dist/composables/useLocalParticipant.d.cts +16 -0
- package/dist/composables/useLocalParticipant.d.mts +16 -0
- package/dist/composables/useLocalParticipantPermissions.d.cts +13 -0
- package/dist/composables/useLocalParticipantPermissions.d.mts +13 -0
- package/dist/composables/useMediaDeviceSelect.d.cts +16 -0
- package/dist/composables/useMediaDeviceSelect.d.mts +16 -0
- package/dist/composables/useMediaDevices.d.cts +12 -0
- package/dist/composables/useMediaDevices.d.mts +12 -0
- package/dist/composables/useMediaTrackBySourceOrName.d.cts +30 -0
- package/dist/composables/useMediaTrackBySourceOrName.d.mts +30 -0
- package/dist/composables/usePagination.d.cts +26 -0
- package/dist/composables/usePagination.d.mts +26 -0
- package/dist/composables/useParticipantAttributes.d.cts +14 -0
- package/dist/composables/useParticipantAttributes.d.mts +14 -0
- package/dist/composables/useParticipantAvatar.d.cts +17 -0
- package/dist/composables/useParticipantAvatar.d.mts +17 -0
- package/dist/composables/useParticipantInfo.d.cts +14 -0
- package/dist/composables/useParticipantInfo.d.mts +14 -0
- package/dist/composables/useParticipantPermissions.d.cts +10 -0
- package/dist/composables/useParticipantPermissions.d.mts +10 -0
- package/dist/composables/useParticipantTile.d.cts +22 -0
- package/dist/composables/useParticipantTile.d.mts +22 -0
- package/dist/composables/useParticipantTracks.d.cts +12 -0
- package/dist/composables/useParticipantTracks.d.mts +12 -0
- package/dist/composables/useParticipants.d.cts +11 -0
- package/dist/composables/useParticipants.d.mts +11 -0
- package/dist/composables/usePersistentUserChoices.d.cts +16 -0
- package/dist/composables/usePersistentUserChoices.d.mts +16 -0
- package/dist/composables/usePinnedTracks.d.cts +10 -0
- package/dist/composables/usePinnedTracks.d.mts +10 -0
- package/dist/composables/usePreviewTracks.d.cts +15 -0
- package/dist/composables/usePreviewTracks.d.mts +15 -0
- package/dist/composables/useRemoteParticipant.d.cts +14 -0
- package/dist/composables/useRemoteParticipant.d.mts +14 -0
- package/dist/composables/useRemoteParticipants.d.cts +10 -0
- package/dist/composables/useRemoteParticipants.d.mts +10 -0
- package/dist/composables/useRoomInfo.d.cts +13 -0
- package/dist/composables/useRoomInfo.d.mts +13 -0
- package/dist/composables/useRpc.d.cts +18 -0
- package/dist/composables/useRpc.d.mts +18 -0
- package/dist/composables/useSequentialRoomConnectDisconnect.d.cts +10 -0
- package/dist/composables/useSequentialRoomConnectDisconnect.d.mts +10 -0
- package/dist/composables/useSession.d.cts +83 -0
- package/dist/composables/useSession.d.mts +83 -0
- package/dist/composables/useSessionMessages.d.cts +22 -0
- package/dist/composables/useSessionMessages.d.mts +22 -0
- package/dist/composables/useSettingsToggle.d.cts +10 -0
- package/dist/composables/useSettingsToggle.d.mts +10 -0
- package/dist/composables/useSortedParticipants.d.cts +9 -0
- package/dist/composables/useSortedParticipants.d.mts +9 -0
- package/dist/composables/useSpeakingParticipants.d.cts +6 -0
- package/dist/composables/useSpeakingParticipants.d.mts +6 -0
- package/dist/composables/useStartAudio.d.cts +10 -0
- package/dist/composables/useStartAudio.d.mts +10 -0
- package/dist/composables/useStartVideo.d.cts +10 -0
- package/dist/composables/useStartVideo.d.mts +10 -0
- package/dist/composables/useSwipe.d.cts +16 -0
- package/dist/composables/useSwipe.d.mts +16 -0
- package/dist/composables/useTextStream.d.cts +27 -0
- package/dist/composables/useTextStream.d.mts +27 -0
- package/dist/composables/useToast.d.cts +9 -0
- package/dist/composables/useToast.d.mts +9 -0
- package/dist/composables/useToken.d.cts +23 -0
- package/dist/composables/useToken.d.mts +23 -0
- package/dist/composables/useTrack.d.cts +12 -0
- package/dist/composables/useTrack.d.mts +12 -0
- package/dist/composables/useTrackByName.d.cts +11 -0
- package/dist/composables/useTrackByName.d.mts +11 -0
- package/dist/composables/useTrackMutedIndicator.d.cts +9 -0
- package/dist/composables/useTrackMutedIndicator.d.mts +9 -0
- package/dist/composables/useTrackRefBySource.d.cts +9 -0
- package/dist/composables/useTrackRefBySource.d.mts +9 -0
- package/dist/composables/useTrackRefBySourceOrName.d.cts +7 -0
- package/dist/composables/useTrackRefBySourceOrName.d.mts +7 -0
- package/dist/composables/useTrackSyncTime.d.cts +13 -0
- package/dist/composables/useTrackSyncTime.d.mts +13 -0
- package/dist/composables/useTrackToggle.d.cts +28 -0
- package/dist/composables/useTrackToggle.d.mts +28 -0
- package/dist/composables/useTrackTranscription.d.cts +15 -0
- package/dist/composables/useTrackTranscription.d.mts +15 -0
- package/dist/composables/useTrackVolume.d.cts +39 -0
- package/dist/composables/useTrackVolume.d.mts +39 -0
- package/dist/composables/useTracks.d.cts +18 -0
- package/dist/composables/useTracks.d.mts +18 -0
- package/dist/composables/useTranscriptions.d.cts +12 -0
- package/dist/composables/useTranscriptions.d.mts +12 -0
- package/dist/composables/useVideoQuality.d.cts +29 -0
- package/dist/composables/useVideoQuality.d.mts +29 -0
- package/dist/composables/useVisualStableUpdate.d.cts +13 -0
- package/dist/composables/useVisualStableUpdate.d.mts +13 -0
- package/dist/composables/useVoiceAssistant.d.cts +16 -0
- package/dist/composables/useVoiceAssistant.d.mts +16 -0
- package/dist/context/connection-state.context.d.cts +18 -0
- package/dist/context/connection-state.context.d.mts +18 -0
- package/dist/context/error.d.cts +3 -0
- package/dist/context/error.d.mts +3 -0
- package/dist/context/feature.context.d.cts +8 -0
- package/dist/context/feature.context.d.mts +8 -0
- package/dist/context/index.d.cts +9 -0
- package/dist/context/index.d.mts +9 -0
- package/dist/context/layout.context.d.cts +15 -0
- package/dist/context/layout.context.d.mts +15 -0
- package/dist/context/participant.context.d.cts +8 -0
- package/dist/context/participant.context.d.mts +8 -0
- package/dist/context/pin.context.d.cts +21 -0
- package/dist/context/pin.context.d.mts +21 -0
- package/dist/context/room.context.d.cts +8 -0
- package/dist/context/room.context.d.mts +8 -0
- package/dist/context/session.context.d.cts +8 -0
- package/dist/context/session.context.d.mts +8 -0
- package/dist/context/toast.context.d.cts +17 -0
- package/dist/context/toast.context.d.mts +17 -0
- package/dist/context/track-reference.context.d.cts +8 -0
- package/dist/context/track-reference.context.d.mts +8 -0
- package/dist/context/widget.context.d.cts +21 -0
- package/dist/context/widget.context.d.mts +21 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.mts +6 -0
- package/dist/internal/emitter.d.cts +17 -0
- package/dist/internal/emitter.d.mts +17 -0
- package/dist/internal/index.d.cts +4 -0
- package/dist/internal/index.d.mts +4 -0
- package/dist/internal/observable.d.cts +3 -0
- package/dist/internal/observable.d.mts +3 -0
- package/dist/internal/permissions.d.cts +4 -0
- package/dist/internal/permissions.d.mts +4 -0
- package/dist/internal/refs.d.cts +1 -0
- package/dist/internal/refs.d.mts +1 -0
- package/dist/krisp/index.d.cts +1 -0
- package/dist/krisp/index.d.mts +1 -0
- package/dist/krisp.cjs +2 -0
- package/dist/krisp.cjs.map +1 -0
- package/dist/krisp.js +62 -0
- package/dist/krisp.js.map +1 -0
- package/dist/livekit-vue.cjs +2 -0
- package/dist/livekit-vue.cjs.map +1 -0
- package/dist/livekit-vue.js +5095 -20519
- package/dist/livekit-vue.js.map +1 -0
- package/dist/livekit-vue.umd.js +4 -0
- package/dist/livekit-vue.umd.js.map +1 -0
- package/dist/style-CDggj9VO.js +14 -0
- package/dist/style-CDggj9VO.js.map +1 -0
- package/dist/style-CkQyDSsh.cjs +2 -0
- package/dist/style-CkQyDSsh.cjs.map +1 -0
- package/dist/styles.css +2 -0
- package/dist/types/agent.types.d.cts +2 -0
- package/dist/types/agent.types.d.mts +2 -0
- package/dist/types/index.d.cts +3 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/livekit-room.types.d.cts +19 -0
- package/dist/types/livekit-room.types.d.mts +19 -0
- package/dist/types/participant.types.d.cts +2 -0
- package/dist/types/participant.types.d.mts +2 -0
- package/dist/useLocalParticipant-ByBAgL8i.js +50 -0
- package/dist/useLocalParticipant-ByBAgL8i.js.map +1 -0
- package/dist/useLocalParticipant-Dn5NE_KM.cjs +2 -0
- package/dist/useLocalParticipant-Dn5NE_KM.cjs.map +1 -0
- package/dist/utils/media-choices.utils.d.cts +7 -0
- package/dist/utils/media-choices.utils.d.mts +7 -0
- package/dist/{src/utils/room.utils.d.ts → utils/room.utils.d.cts} +1 -1
- package/dist/utils/room.utils.d.mts +1 -0
- package/package.json +103 -66
- package/dist/favicon.ico +0 -0
- package/dist/index.css +0 -1
- package/dist/livekit-vue.umd.cjs +0 -62
- package/dist/src/assets/index.d.ts +0 -0
- package/dist/src/components/controls/TrackToggle.vue.d.ts +0 -3
- package/dist/src/components/controls/buttons.d.ts +0 -4
- package/dist/src/components/controls/index.d.ts +0 -3
- package/dist/src/components/controls/track_toggle.d.ts +0 -12
- package/dist/src/components/icons/ParticipantPlaceholderIcon.vue.d.ts +0 -2
- package/dist/src/components/icons/TrackIcon.vue.d.ts +0 -7
- package/dist/src/components/index.d.ts +0 -3
- package/dist/src/components/participant/audio_track.d.ts +0 -7
- package/dist/src/composables/index.d.ts +0 -37
- package/dist/src/composables/private/useObservableState.d.ts +0 -8
- package/dist/src/composables/useAudioPlayback.d.ts +0 -11
- package/dist/src/composables/useClearPinButton.d.ts +0 -5
- package/dist/src/composables/useConnectionQualityIndicator.d.ts +0 -10
- package/dist/src/composables/useConnectionState.d.ts +0 -3
- package/dist/src/composables/useDataChannel.d.ts +0 -15
- package/dist/src/composables/useDisconnectButton.d.ts +0 -5
- package/dist/src/composables/useFacingMode.d.ts +0 -10
- package/dist/src/composables/useFocusToggle.d.ts +0 -11
- package/dist/src/composables/useGridLayout.d.ts +0 -10
- package/dist/src/composables/useIsEncrypted.d.ts +0 -8
- package/dist/src/composables/useIsMuted.d.ts +0 -7
- package/dist/src/composables/useIsRecording.d.ts +0 -5
- package/dist/src/composables/useIsSpeaking.d.ts +0 -5
- package/dist/src/composables/useLiveKitRoom.d.ts +0 -8
- package/dist/src/composables/useLocalParticipant.d.ts +0 -16
- package/dist/src/composables/useParticipantTile.d.ts +0 -11
- package/dist/src/composables/useParticipantTracks.d.ts +0 -4
- package/dist/src/composables/useParticipants.d.ts +0 -7
- package/dist/src/composables/usePersistentUserChoices.d.ts +0 -16
- package/dist/src/composables/usePinnedTracks.d.ts +0 -4
- package/dist/src/composables/useRemoteParticipant.d.ts +0 -7
- package/dist/src/composables/useRemoteParticipants.d.ts +0 -7
- package/dist/src/composables/useRoomInfo.d.ts +0 -13
- package/dist/src/composables/useSortedParticipants.d.ts +0 -3
- package/dist/src/composables/useSpeakingParticipants.d.ts +0 -3
- package/dist/src/composables/useStartAudio.d.ts +0 -11
- package/dist/src/composables/useStartVideo.d.ts +0 -11
- package/dist/src/composables/useToken.d.ts +0 -10
- package/dist/src/composables/useTrack.d.ts +0 -3
- package/dist/src/composables/useTrackByName.d.ts +0 -3
- package/dist/src/composables/useTrackMutedIndicator.d.ts +0 -6
- package/dist/src/composables/useTrackRefBySourceOrName.d.ts +0 -4
- package/dist/src/composables/useTrackSyncTime.d.ts +0 -6
- package/dist/src/composables/useTrackToggle.d.ts +0 -21
- package/dist/src/composables/useTrackVolume.d.ts +0 -28
- package/dist/src/composables/useTracks.d.ts +0 -10
- package/dist/src/composables/useVisualStableUpdate.d.ts +0 -8
- package/dist/src/context/index.d.ts +0 -6
- package/dist/src/context/layout.context.d.ts +0 -28
- package/dist/src/context/participant.context.d.ts +0 -9
- package/dist/src/context/pin.context.d.ts +0 -26
- package/dist/src/context/room.context.d.ts +0 -9
- package/dist/src/context/track_reference.context.d.ts +0 -6
- package/dist/src/context/widget.context.d.ts +0 -7
- package/dist/src/index.d.ts +0 -3
- package/dist/src/types/livekit_room.types.d.ts +0 -68
- package/src/assets/icons/chevron-down.svg +0 -4
- package/src/assets/icons/chevron-up.svg +0 -4
- package/src/assets/icons/frown.svg +0 -7
- package/src/assets/icons/heart.svg +0 -6
- package/src/assets/icons/mic-off.svg +0 -8
- package/src/assets/icons/mic.svg +0 -7
- package/src/assets/icons/phone-hang-up.svg +0 -9
- package/src/assets/icons/share-screen-off.svg +0 -6
- package/src/assets/icons/share-screen.svg +0 -7
- package/src/assets/icons/smile.svg +0 -7
- package/src/assets/icons/thumbs-down.svg +0 -6
- package/src/assets/icons/thumbs-up.svg +0 -6
- package/src/assets/icons/video-off.svg +0 -5
- package/src/assets/icons/video.svg +0 -5
- package/src/assets/index.ts +0 -1
- package/src/assets/placeholders/participant.svg +0 -8
- package/src/components/controls/TrackToggle.vue +0 -20
- package/src/components/controls/buttons.ts +0 -5
- package/src/components/controls/index.ts +0 -3
- package/src/components/controls/track_toggle.ts +0 -13
- package/src/components/icons/ParticipantPlaceholderIcon.vue +0 -7
- package/src/components/icons/TrackIcon.vue +0 -55
- package/src/components/index.ts +0 -3
- package/src/components/participant/AudioTrack.vue +0 -17
- package/src/components/participant/audio_track.ts +0 -8
- package/src/composables/index.ts +0 -89
- package/src/composables/private/useObservableState.ts +0 -44
- package/src/composables/useAudioPlayback.ts +0 -42
- package/src/composables/useClearPinButton.ts +0 -41
- package/src/composables/useConnectionQualityIndicator.ts +0 -39
- package/src/composables/useConnectionState.ts +0 -21
- package/src/composables/useDataChannel.ts +0 -56
- package/src/composables/useDisconnectButton.ts +0 -28
- package/src/composables/useFacingMode.ts +0 -28
- package/src/composables/useFocusToggle.ts +0 -38
- package/src/composables/useGridLayout.ts +0 -44
- package/src/composables/useIsEncrypted.ts +0 -34
- package/src/composables/useIsMuted.ts +0 -56
- package/src/composables/useIsRecording.ts +0 -30
- package/src/composables/useIsSpeaking.ts +0 -23
- package/src/composables/useLiveKitRoom.ts +0 -219
- package/src/composables/useLocalParticipant.ts +0 -64
- package/src/composables/useParticipantTile.ts +0 -68
- package/src/composables/useParticipantTracks.ts +0 -36
- package/src/composables/useParticipants.ts +0 -25
- package/src/composables/usePersistentUserChoices.ts +0 -64
- package/src/composables/usePinnedTracks.ts +0 -16
- package/src/composables/useRemoteParticipant.ts +0 -42
- package/src/composables/useRemoteParticipants.ts +0 -27
- package/src/composables/useRoomInfo.ts +0 -42
- package/src/composables/useSortedParticipants.ts +0 -21
- package/src/composables/useSpeakingParticipants.ts +0 -22
- package/src/composables/useStartAudio.ts +0 -53
- package/src/composables/useStartVideo.ts +0 -53
- package/src/composables/useToken.ts +0 -40
- package/src/composables/useTrack.ts +0 -11
- package/src/composables/useTrackByName.ts +0 -11
- package/src/composables/useTrackMutedIndicator.ts +0 -34
- package/src/composables/useTrackRefBySourceOrName.ts +0 -39
- package/src/composables/useTrackSyncTime.ts +0 -32
- package/src/composables/useTrackToggle.ts +0 -110
- package/src/composables/useTrackVolume.ts +0 -268
- package/src/composables/useTracks.ts +0 -122
- package/src/composables/useVisualStableUpdate.ts +0 -57
- package/src/context/index.ts +0 -6
- package/src/context/layout.context.ts +0 -46
- package/src/context/participant.context.ts +0 -33
- package/src/context/pin.context.ts +0 -50
- package/src/context/room.context.ts +0 -31
- package/src/context/track_reference.context.ts +0 -29
- package/src/context/widget.context.ts +0 -17
- package/src/index.css +0 -1
- package/src/index.ts +0 -5
- package/src/types/livekit_room.types.ts +0 -78
- package/src/utils/room.utils.ts +0 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
|
+
import { LayoutContext } from '../context/layout.context.mjs';
|
|
4
|
+
export interface UsePinnedTracks {
|
|
5
|
+
readonly pinnedTracks: ComputedRef<TrackReferenceOrPlaceholder[]>;
|
|
6
|
+
}
|
|
7
|
+
export interface UsePinnedTracksProps {
|
|
8
|
+
readonly context?: LayoutContext;
|
|
9
|
+
}
|
|
10
|
+
export declare function usePinnedTracks(props: UsePinnedTracksProps): UsePinnedTracks;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AudioCaptureOptions, LocalAudioTrack, LocalTrack, LocalVideoTrack, VideoCaptureOptions } from 'livekit-client';
|
|
2
|
+
import { ComputedRef, Ref, ShallowRef } from 'vue';
|
|
3
|
+
export interface UsePreviewTracksProps {
|
|
4
|
+
readonly audio?: boolean | AudioCaptureOptions;
|
|
5
|
+
readonly video?: boolean | VideoCaptureOptions;
|
|
6
|
+
readonly onError?: (error: Error) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface UsePreviewTracks {
|
|
9
|
+
readonly tracks: ShallowRef<LocalTrack[]>;
|
|
10
|
+
readonly audioTrack: ComputedRef<LocalAudioTrack | undefined>;
|
|
11
|
+
readonly videoTrack: ComputedRef<LocalVideoTrack | undefined>;
|
|
12
|
+
readonly isLoading: Ref<boolean>;
|
|
13
|
+
readonly error: Ref<Error | null>;
|
|
14
|
+
}
|
|
15
|
+
export declare function usePreviewTracks(props?: UsePreviewTracksProps): UsePreviewTracks;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AudioCaptureOptions, LocalAudioTrack, LocalTrack, LocalVideoTrack, VideoCaptureOptions } from 'livekit-client';
|
|
2
|
+
import { ComputedRef, Ref, ShallowRef } from 'vue';
|
|
3
|
+
export interface UsePreviewTracksProps {
|
|
4
|
+
readonly audio?: boolean | AudioCaptureOptions;
|
|
5
|
+
readonly video?: boolean | VideoCaptureOptions;
|
|
6
|
+
readonly onError?: (error: Error) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface UsePreviewTracks {
|
|
9
|
+
readonly tracks: ShallowRef<LocalTrack[]>;
|
|
10
|
+
readonly audioTrack: ComputedRef<LocalAudioTrack | undefined>;
|
|
11
|
+
readonly videoTrack: ComputedRef<LocalVideoTrack | undefined>;
|
|
12
|
+
readonly isLoading: Ref<boolean>;
|
|
13
|
+
readonly error: Ref<Error | null>;
|
|
14
|
+
}
|
|
15
|
+
export declare function usePreviewTracks(props?: UsePreviewTracksProps): UsePreviewTracks;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ParticipantIdentifier } from '@livekit/components-core';
|
|
2
|
+
import { ParticipantEvent, RemoteParticipant } from 'livekit-client';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
export interface UseRemoteParticipantOptions {
|
|
5
|
+
readonly updateOnlyOn?: ParticipantEvent[];
|
|
6
|
+
}
|
|
7
|
+
export interface UseRemoteParticipantProps {
|
|
8
|
+
readonly identityOrIdentifier: string | ParticipantIdentifier;
|
|
9
|
+
readonly options: UseRemoteParticipantOptions;
|
|
10
|
+
}
|
|
11
|
+
export interface UseRemoteParticipant {
|
|
12
|
+
readonly participant: Ref<RemoteParticipant | undefined>;
|
|
13
|
+
}
|
|
14
|
+
export declare function useRemoteParticipant(props: UseRemoteParticipantProps): UseRemoteParticipant;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ParticipantIdentifier } from '@livekit/components-core';
|
|
2
|
+
import { ParticipantEvent, RemoteParticipant } from 'livekit-client';
|
|
3
|
+
import { Ref } from 'vue';
|
|
4
|
+
export interface UseRemoteParticipantOptions {
|
|
5
|
+
readonly updateOnlyOn?: ParticipantEvent[];
|
|
6
|
+
}
|
|
7
|
+
export interface UseRemoteParticipantProps {
|
|
8
|
+
readonly identityOrIdentifier: string | ParticipantIdentifier;
|
|
9
|
+
readonly options: UseRemoteParticipantOptions;
|
|
10
|
+
}
|
|
11
|
+
export interface UseRemoteParticipant {
|
|
12
|
+
readonly participant: Ref<RemoteParticipant | undefined>;
|
|
13
|
+
}
|
|
14
|
+
export declare function useRemoteParticipant(props: UseRemoteParticipantProps): UseRemoteParticipant;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RemoteParticipant, Room, RoomEvent } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export interface UseRemoteParticipantsProps {
|
|
4
|
+
readonly updateOnlyOn?: RoomEvent[];
|
|
5
|
+
readonly room?: Room;
|
|
6
|
+
}
|
|
7
|
+
export interface UseRemoteParticipants {
|
|
8
|
+
readonly participants: ShallowRef<RemoteParticipant[]>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useRemoteParticipants(props?: UseRemoteParticipantsProps): UseRemoteParticipants;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RemoteParticipant, Room, RoomEvent } from 'livekit-client';
|
|
2
|
+
import { ShallowRef } from 'vue';
|
|
3
|
+
export interface UseRemoteParticipantsProps {
|
|
4
|
+
readonly updateOnlyOn?: RoomEvent[];
|
|
5
|
+
readonly room?: Room;
|
|
6
|
+
}
|
|
7
|
+
export interface UseRemoteParticipants {
|
|
8
|
+
readonly participants: ShallowRef<RemoteParticipant[]>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useRemoteParticipants(props?: UseRemoteParticipantsProps): UseRemoteParticipants;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseRoomInfoProps {
|
|
4
|
+
readonly room?: Room;
|
|
5
|
+
}
|
|
6
|
+
export interface RoomInfo {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly metadata: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface UseRoomInfo {
|
|
11
|
+
readonly info: Ref<RoomInfo>;
|
|
12
|
+
}
|
|
13
|
+
export declare function useRoomInfo(props?: UseRoomInfoProps): UseRoomInfo;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseRoomInfoProps {
|
|
4
|
+
readonly room?: Room;
|
|
5
|
+
}
|
|
6
|
+
export interface RoomInfo {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly metadata: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface UseRoomInfo {
|
|
11
|
+
readonly info: Ref<RoomInfo>;
|
|
12
|
+
}
|
|
13
|
+
export declare function useRoomInfo(props?: UseRoomInfoProps): UseRoomInfo;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PerformRpcParams, RpcInvocationData, Serializer } from 'livekit-client';
|
|
2
|
+
import { UseSession } from './useSession.cjs';
|
|
3
|
+
export type RpcHandler<Input, Output> = (payload: Input, data: RpcInvocationData) => Promise<Output>;
|
|
4
|
+
export interface RpcCallParams<Payload> extends Omit<PerformRpcParams, 'payload'> {
|
|
5
|
+
readonly payload: Payload;
|
|
6
|
+
}
|
|
7
|
+
export interface UseRpcProps<Input = unknown, Output = unknown> {
|
|
8
|
+
readonly session?: UseSession;
|
|
9
|
+
readonly method?: string;
|
|
10
|
+
readonly handler?: RpcHandler<Input, Output>;
|
|
11
|
+
readonly fromIdentity?: string;
|
|
12
|
+
readonly serializer?: Serializer<Input, Output>;
|
|
13
|
+
}
|
|
14
|
+
export interface UseRpc {
|
|
15
|
+
readonly perform: (params: PerformRpcParams) => Promise<string>;
|
|
16
|
+
readonly performWith: <Response, Payload>(params: RpcCallParams<Payload>, serializer: Serializer<Response, Payload>) => Promise<Response>;
|
|
17
|
+
}
|
|
18
|
+
export declare function useRpc<Input = unknown, Output = unknown>(props?: UseRpcProps<Input, Output>): UseRpc;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PerformRpcParams, RpcInvocationData, Serializer } from 'livekit-client';
|
|
2
|
+
import { UseSession } from './useSession.mjs';
|
|
3
|
+
export type RpcHandler<Input, Output> = (payload: Input, data: RpcInvocationData) => Promise<Output>;
|
|
4
|
+
export interface RpcCallParams<Payload> extends Omit<PerformRpcParams, 'payload'> {
|
|
5
|
+
readonly payload: Payload;
|
|
6
|
+
}
|
|
7
|
+
export interface UseRpcProps<Input = unknown, Output = unknown> {
|
|
8
|
+
readonly session?: UseSession;
|
|
9
|
+
readonly method?: string;
|
|
10
|
+
readonly handler?: RpcHandler<Input, Output>;
|
|
11
|
+
readonly fromIdentity?: string;
|
|
12
|
+
readonly serializer?: Serializer<Input, Output>;
|
|
13
|
+
}
|
|
14
|
+
export interface UseRpc {
|
|
15
|
+
readonly perform: (params: PerformRpcParams) => Promise<string>;
|
|
16
|
+
readonly performWith: <Response, Payload>(params: RpcCallParams<Payload>, serializer: Serializer<Response, Payload>) => Promise<Response>;
|
|
17
|
+
}
|
|
18
|
+
export declare function useRpc<Input = unknown, Output = unknown>(props?: UseRpcProps<Input, Output>): UseRpc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
type ConnectArgs = Parameters<Room['connect']>;
|
|
4
|
+
type DisconnectArgs = Parameters<Room['disconnect']>;
|
|
5
|
+
export interface UseSequentialRoomConnectDisconnect {
|
|
6
|
+
readonly connect: (...args: ConnectArgs) => Promise<void>;
|
|
7
|
+
readonly disconnect: (...args: DisconnectArgs) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useSequentialRoomConnectDisconnect(room: MaybeRefOrGetter<Room | undefined>): UseSequentialRoomConnectDisconnect;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
3
|
+
type ConnectArgs = Parameters<Room['connect']>;
|
|
4
|
+
type DisconnectArgs = Parameters<Room['disconnect']>;
|
|
5
|
+
export interface UseSequentialRoomConnectDisconnect {
|
|
6
|
+
readonly connect: (...args: ConnectArgs) => Promise<void>;
|
|
7
|
+
readonly disconnect: (...args: DisconnectArgs) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useSequentialRoomConnectDisconnect(room: MaybeRefOrGetter<Room | undefined>): UseSequentialRoomConnectDisconnect;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { TrackReference } from '@livekit/components-core';
|
|
2
|
+
import { ConnectionState, Room, TokenSourceConfigurable, BaseE2EEManager, BaseKeyProvider, RoomConnectOptions, TokenSourceFetchOptions, TokenSourceFixed, TrackPublishOptions } from 'livekit-client';
|
|
3
|
+
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
4
|
+
import { TypedEmitter } from '../internal/index.cjs';
|
|
5
|
+
import { AgentTimeoutStore, UseAgent } from './useAgent.cjs';
|
|
6
|
+
export type SessionEvent = (typeof SESSION_EVENT)[keyof typeof SESSION_EVENT];
|
|
7
|
+
export interface SessionCallbacks {
|
|
8
|
+
readonly connectionStateChanged: (state: ConnectionState) => void;
|
|
9
|
+
readonly mediaDevicesError: (error: Error) => void;
|
|
10
|
+
readonly encryptionError: (error: Error) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface SessionTrackOptions {
|
|
13
|
+
readonly enabled?: boolean;
|
|
14
|
+
readonly publishOptions?: TrackPublishOptions;
|
|
15
|
+
}
|
|
16
|
+
export interface SessionTracks {
|
|
17
|
+
readonly microphone?: SessionTrackOptions;
|
|
18
|
+
readonly camera?: SessionTrackOptions;
|
|
19
|
+
readonly screenShare?: SessionTrackOptions;
|
|
20
|
+
}
|
|
21
|
+
export interface SessionConnectOptions {
|
|
22
|
+
readonly signal?: AbortSignal;
|
|
23
|
+
readonly tracks?: SessionTracks;
|
|
24
|
+
readonly roomConnectOptions?: RoomConnectOptions;
|
|
25
|
+
}
|
|
26
|
+
export interface UseSessionKeyEncryptionOptions {
|
|
27
|
+
readonly key: string | ArrayBuffer | BaseKeyProvider;
|
|
28
|
+
readonly worker: Worker;
|
|
29
|
+
readonly e2eeManager?: undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface UseSessionManagerEncryptionOptions {
|
|
32
|
+
readonly key?: undefined;
|
|
33
|
+
readonly worker?: undefined;
|
|
34
|
+
readonly e2eeManager: BaseE2EEManager;
|
|
35
|
+
}
|
|
36
|
+
export type UseSessionEncryptionOptions = UseSessionKeyEncryptionOptions | UseSessionManagerEncryptionOptions;
|
|
37
|
+
export interface UseSessionCommonOptions {
|
|
38
|
+
readonly agentConnectTimeoutMilliseconds?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface UseSessionGivenRoomOptions {
|
|
41
|
+
readonly room: Room;
|
|
42
|
+
readonly encryption?: never;
|
|
43
|
+
}
|
|
44
|
+
export interface UseSessionCreatedRoomOptions {
|
|
45
|
+
readonly room?: never;
|
|
46
|
+
readonly encryption?: UseSessionEncryptionOptions;
|
|
47
|
+
}
|
|
48
|
+
export type UseSessionRoomOptions = UseSessionGivenRoomOptions | UseSessionCreatedRoomOptions;
|
|
49
|
+
export type UseSessionConfigurableOptions = UseSessionCommonOptions & UseSessionRoomOptions & TokenSourceFetchOptions;
|
|
50
|
+
export type UseSessionFixedOptions = UseSessionCommonOptions & UseSessionRoomOptions;
|
|
51
|
+
export type UseSessionOptions = UseSessionConfigurableOptions | UseSessionFixedOptions;
|
|
52
|
+
export interface SessionInternal {
|
|
53
|
+
readonly emitter: TypedEmitter<SessionCallbacks>;
|
|
54
|
+
readonly tokenSource: TokenSourceConfigurable | TokenSourceFixed;
|
|
55
|
+
readonly agentTimeout: AgentTimeoutStore;
|
|
56
|
+
readonly agent: UseAgent;
|
|
57
|
+
}
|
|
58
|
+
export interface UseSessionLocalTracks {
|
|
59
|
+
readonly cameraTrack: ComputedRef<TrackReference | undefined>;
|
|
60
|
+
readonly microphoneTrack: ComputedRef<TrackReference | undefined>;
|
|
61
|
+
readonly screenShareTrack: ComputedRef<TrackReference | undefined>;
|
|
62
|
+
}
|
|
63
|
+
export interface UseSession {
|
|
64
|
+
readonly room: Room;
|
|
65
|
+
readonly connectionState: Readonly<Ref<ConnectionState>>;
|
|
66
|
+
readonly isConnected: ComputedRef<boolean>;
|
|
67
|
+
readonly local: UseSessionLocalTracks;
|
|
68
|
+
readonly internal: SessionInternal;
|
|
69
|
+
readonly waitUntilConnected: (signal?: AbortSignal) => Promise<void>;
|
|
70
|
+
readonly waitUntilDisconnected: (signal?: AbortSignal) => Promise<void>;
|
|
71
|
+
readonly prepareConnection: () => Promise<void>;
|
|
72
|
+
readonly start: (options?: SessionConnectOptions) => Promise<void>;
|
|
73
|
+
readonly end: () => Promise<void>;
|
|
74
|
+
readonly setEncryptionEnabled: (enabled: boolean) => Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
export declare const SESSION_EVENT: {
|
|
77
|
+
readonly CONNECTION_STATE_CHANGED: "connectionStateChanged";
|
|
78
|
+
readonly MEDIA_DEVICES_ERROR: "mediaDevicesError";
|
|
79
|
+
readonly ENCRYPTION_ERROR: "encryptionError";
|
|
80
|
+
};
|
|
81
|
+
export declare function isUseSession(value: unknown): value is UseSession;
|
|
82
|
+
export declare function useSession(tokenSource: TokenSourceConfigurable, options?: MaybeRefOrGetter<UseSessionConfigurableOptions>): UseSession;
|
|
83
|
+
export declare function useSession(tokenSource: TokenSourceFixed, options?: MaybeRefOrGetter<UseSessionFixedOptions>): UseSession;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { TrackReference } from '@livekit/components-core';
|
|
2
|
+
import { ConnectionState, Room, TokenSourceConfigurable, BaseE2EEManager, BaseKeyProvider, RoomConnectOptions, TokenSourceFetchOptions, TokenSourceFixed, TrackPublishOptions } from 'livekit-client';
|
|
3
|
+
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
4
|
+
import { TypedEmitter } from '../internal/index.mjs';
|
|
5
|
+
import { AgentTimeoutStore, UseAgent } from './useAgent.mjs';
|
|
6
|
+
export type SessionEvent = (typeof SESSION_EVENT)[keyof typeof SESSION_EVENT];
|
|
7
|
+
export interface SessionCallbacks {
|
|
8
|
+
readonly connectionStateChanged: (state: ConnectionState) => void;
|
|
9
|
+
readonly mediaDevicesError: (error: Error) => void;
|
|
10
|
+
readonly encryptionError: (error: Error) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface SessionTrackOptions {
|
|
13
|
+
readonly enabled?: boolean;
|
|
14
|
+
readonly publishOptions?: TrackPublishOptions;
|
|
15
|
+
}
|
|
16
|
+
export interface SessionTracks {
|
|
17
|
+
readonly microphone?: SessionTrackOptions;
|
|
18
|
+
readonly camera?: SessionTrackOptions;
|
|
19
|
+
readonly screenShare?: SessionTrackOptions;
|
|
20
|
+
}
|
|
21
|
+
export interface SessionConnectOptions {
|
|
22
|
+
readonly signal?: AbortSignal;
|
|
23
|
+
readonly tracks?: SessionTracks;
|
|
24
|
+
readonly roomConnectOptions?: RoomConnectOptions;
|
|
25
|
+
}
|
|
26
|
+
export interface UseSessionKeyEncryptionOptions {
|
|
27
|
+
readonly key: string | ArrayBuffer | BaseKeyProvider;
|
|
28
|
+
readonly worker: Worker;
|
|
29
|
+
readonly e2eeManager?: undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface UseSessionManagerEncryptionOptions {
|
|
32
|
+
readonly key?: undefined;
|
|
33
|
+
readonly worker?: undefined;
|
|
34
|
+
readonly e2eeManager: BaseE2EEManager;
|
|
35
|
+
}
|
|
36
|
+
export type UseSessionEncryptionOptions = UseSessionKeyEncryptionOptions | UseSessionManagerEncryptionOptions;
|
|
37
|
+
export interface UseSessionCommonOptions {
|
|
38
|
+
readonly agentConnectTimeoutMilliseconds?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface UseSessionGivenRoomOptions {
|
|
41
|
+
readonly room: Room;
|
|
42
|
+
readonly encryption?: never;
|
|
43
|
+
}
|
|
44
|
+
export interface UseSessionCreatedRoomOptions {
|
|
45
|
+
readonly room?: never;
|
|
46
|
+
readonly encryption?: UseSessionEncryptionOptions;
|
|
47
|
+
}
|
|
48
|
+
export type UseSessionRoomOptions = UseSessionGivenRoomOptions | UseSessionCreatedRoomOptions;
|
|
49
|
+
export type UseSessionConfigurableOptions = UseSessionCommonOptions & UseSessionRoomOptions & TokenSourceFetchOptions;
|
|
50
|
+
export type UseSessionFixedOptions = UseSessionCommonOptions & UseSessionRoomOptions;
|
|
51
|
+
export type UseSessionOptions = UseSessionConfigurableOptions | UseSessionFixedOptions;
|
|
52
|
+
export interface SessionInternal {
|
|
53
|
+
readonly emitter: TypedEmitter<SessionCallbacks>;
|
|
54
|
+
readonly tokenSource: TokenSourceConfigurable | TokenSourceFixed;
|
|
55
|
+
readonly agentTimeout: AgentTimeoutStore;
|
|
56
|
+
readonly agent: UseAgent;
|
|
57
|
+
}
|
|
58
|
+
export interface UseSessionLocalTracks {
|
|
59
|
+
readonly cameraTrack: ComputedRef<TrackReference | undefined>;
|
|
60
|
+
readonly microphoneTrack: ComputedRef<TrackReference | undefined>;
|
|
61
|
+
readonly screenShareTrack: ComputedRef<TrackReference | undefined>;
|
|
62
|
+
}
|
|
63
|
+
export interface UseSession {
|
|
64
|
+
readonly room: Room;
|
|
65
|
+
readonly connectionState: Readonly<Ref<ConnectionState>>;
|
|
66
|
+
readonly isConnected: ComputedRef<boolean>;
|
|
67
|
+
readonly local: UseSessionLocalTracks;
|
|
68
|
+
readonly internal: SessionInternal;
|
|
69
|
+
readonly waitUntilConnected: (signal?: AbortSignal) => Promise<void>;
|
|
70
|
+
readonly waitUntilDisconnected: (signal?: AbortSignal) => Promise<void>;
|
|
71
|
+
readonly prepareConnection: () => Promise<void>;
|
|
72
|
+
readonly start: (options?: SessionConnectOptions) => Promise<void>;
|
|
73
|
+
readonly end: () => Promise<void>;
|
|
74
|
+
readonly setEncryptionEnabled: (enabled: boolean) => Promise<void>;
|
|
75
|
+
}
|
|
76
|
+
export declare const SESSION_EVENT: {
|
|
77
|
+
readonly CONNECTION_STATE_CHANGED: "connectionStateChanged";
|
|
78
|
+
readonly MEDIA_DEVICES_ERROR: "mediaDevicesError";
|
|
79
|
+
readonly ENCRYPTION_ERROR: "encryptionError";
|
|
80
|
+
};
|
|
81
|
+
export declare function isUseSession(value: unknown): value is UseSession;
|
|
82
|
+
export declare function useSession(tokenSource: TokenSourceConfigurable, options?: MaybeRefOrGetter<UseSessionConfigurableOptions>): UseSession;
|
|
83
|
+
export declare function useSession(tokenSource: TokenSourceFixed, options?: MaybeRefOrGetter<UseSessionFixedOptions>): UseSession;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReceivedChatMessage, ReceivedMessage } from '@livekit/components-core';
|
|
2
|
+
import { SendTextOptions } from 'livekit-client';
|
|
3
|
+
import { ComputedRef, Ref } from 'vue';
|
|
4
|
+
import { TypedEmitter } from '../internal/emitter.cjs';
|
|
5
|
+
import { UseSession } from './useSession.cjs';
|
|
6
|
+
export declare const MESSAGES_EVENT: {
|
|
7
|
+
readonly MESSAGE_RECEIVED: "messageReceived";
|
|
8
|
+
};
|
|
9
|
+
export type MessagesEvent = (typeof MESSAGES_EVENT)[keyof typeof MESSAGES_EVENT];
|
|
10
|
+
export interface MessagesCallbacks {
|
|
11
|
+
readonly messageReceived: (message: ReceivedMessage) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface UseSessionMessagesInternal {
|
|
14
|
+
readonly emitter: TypedEmitter<MessagesCallbacks>;
|
|
15
|
+
}
|
|
16
|
+
export interface UseSessionMessages {
|
|
17
|
+
readonly messages: ComputedRef<ReceivedMessage[]>;
|
|
18
|
+
readonly isSending: Ref<boolean>;
|
|
19
|
+
readonly send: (message: string, options?: SendTextOptions) => Promise<ReceivedChatMessage>;
|
|
20
|
+
readonly internal: UseSessionMessagesInternal;
|
|
21
|
+
}
|
|
22
|
+
export declare function useSessionMessages(session?: UseSession): UseSessionMessages;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReceivedChatMessage, ReceivedMessage } from '@livekit/components-core';
|
|
2
|
+
import { SendTextOptions } from 'livekit-client';
|
|
3
|
+
import { ComputedRef, Ref } from 'vue';
|
|
4
|
+
import { TypedEmitter } from '../internal/emitter.mjs';
|
|
5
|
+
import { UseSession } from './useSession.mjs';
|
|
6
|
+
export declare const MESSAGES_EVENT: {
|
|
7
|
+
readonly MESSAGE_RECEIVED: "messageReceived";
|
|
8
|
+
};
|
|
9
|
+
export type MessagesEvent = (typeof MESSAGES_EVENT)[keyof typeof MESSAGES_EVENT];
|
|
10
|
+
export interface MessagesCallbacks {
|
|
11
|
+
readonly messageReceived: (message: ReceivedMessage) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface UseSessionMessagesInternal {
|
|
14
|
+
readonly emitter: TypedEmitter<MessagesCallbacks>;
|
|
15
|
+
}
|
|
16
|
+
export interface UseSessionMessages {
|
|
17
|
+
readonly messages: ComputedRef<ReceivedMessage[]>;
|
|
18
|
+
readonly isSending: Ref<boolean>;
|
|
19
|
+
readonly send: (message: string, options?: SendTextOptions) => Promise<ReceivedChatMessage>;
|
|
20
|
+
readonly internal: UseSessionMessagesInternal;
|
|
21
|
+
}
|
|
22
|
+
export declare function useSessionMessages(session?: UseSession): UseSessionMessages;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
export interface SettingsToggleAttributes {
|
|
3
|
+
readonly 'aria-pressed': string;
|
|
4
|
+
}
|
|
5
|
+
export interface UseSettingsToggle {
|
|
6
|
+
readonly isVisible: ComputedRef<boolean>;
|
|
7
|
+
readonly toggle: () => void;
|
|
8
|
+
readonly attributes: ComputedRef<SettingsToggleAttributes>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useSettingsToggle(): UseSettingsToggle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
export interface SettingsToggleAttributes {
|
|
3
|
+
readonly 'aria-pressed': string;
|
|
4
|
+
}
|
|
5
|
+
export interface UseSettingsToggle {
|
|
6
|
+
readonly isVisible: ComputedRef<boolean>;
|
|
7
|
+
readonly toggle: () => void;
|
|
8
|
+
readonly attributes: ComputedRef<SettingsToggleAttributes>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useSettingsToggle(): UseSettingsToggle;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Participant } from 'livekit-client';
|
|
2
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
3
|
+
export interface UseSortedParticipants {
|
|
4
|
+
readonly sortedParticipants: ComputedRef<Participant[]>;
|
|
5
|
+
}
|
|
6
|
+
export interface UseSortedParticipantsProps {
|
|
7
|
+
readonly participants: MaybeRefOrGetter<Participant[]>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useSortedParticipants(props: UseSortedParticipantsProps): UseSortedParticipants;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Participant } from 'livekit-client';
|
|
2
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
3
|
+
export interface UseSortedParticipants {
|
|
4
|
+
readonly sortedParticipants: ComputedRef<Participant[]>;
|
|
5
|
+
}
|
|
6
|
+
export interface UseSortedParticipantsProps {
|
|
7
|
+
readonly participants: MaybeRefOrGetter<Participant[]>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useSortedParticipants(props: UseSortedParticipantsProps): UseSortedParticipants;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseStartAudioProps {
|
|
4
|
+
readonly room?: Room;
|
|
5
|
+
}
|
|
6
|
+
export interface UseStartAudio {
|
|
7
|
+
readonly canPlayAudio: Ref<boolean>;
|
|
8
|
+
readonly onClick: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useStartAudio(props?: UseStartAudioProps): UseStartAudio;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseStartAudioProps {
|
|
4
|
+
readonly room?: Room;
|
|
5
|
+
}
|
|
6
|
+
export interface UseStartAudio {
|
|
7
|
+
readonly canPlayAudio: Ref<boolean>;
|
|
8
|
+
readonly onClick: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useStartAudio(props?: UseStartAudioProps): UseStartAudio;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseStartVideoProps {
|
|
4
|
+
readonly room?: Room;
|
|
5
|
+
}
|
|
6
|
+
export interface UseStartVideo {
|
|
7
|
+
readonly canPlayVideo: Ref<boolean>;
|
|
8
|
+
readonly onClick: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useStartVideo(props?: UseStartVideoProps): UseStartVideo;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Room } from 'livekit-client';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
export interface UseStartVideoProps {
|
|
4
|
+
readonly room?: Room;
|
|
5
|
+
}
|
|
6
|
+
export interface UseStartVideo {
|
|
7
|
+
readonly canPlayVideo: Ref<boolean>;
|
|
8
|
+
readonly onClick: () => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useStartVideo(props?: UseStartVideoProps): UseStartVideo;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export interface UseSwipeOptions {
|
|
3
|
+
readonly minSwipeDistance?: number;
|
|
4
|
+
readonly onLeftSwipe?: () => void;
|
|
5
|
+
readonly onRightSwipe?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface UseSwipeProps {
|
|
8
|
+
readonly element: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
9
|
+
readonly options: UseSwipeOptions;
|
|
10
|
+
}
|
|
11
|
+
export interface UseSwipe {
|
|
12
|
+
readonly onTouchStart: (event: TouchEvent) => void;
|
|
13
|
+
readonly onTouchMove: (event: TouchEvent) => void;
|
|
14
|
+
readonly onTouchEnd: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function useSwipe(props: UseSwipeProps): UseSwipe;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
export interface UseSwipeOptions {
|
|
3
|
+
readonly minSwipeDistance?: number;
|
|
4
|
+
readonly onLeftSwipe?: () => void;
|
|
5
|
+
readonly onRightSwipe?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface UseSwipeProps {
|
|
8
|
+
readonly element: MaybeRefOrGetter<HTMLElement | null | undefined>;
|
|
9
|
+
readonly options: UseSwipeOptions;
|
|
10
|
+
}
|
|
11
|
+
export interface UseSwipe {
|
|
12
|
+
readonly onTouchStart: (event: TouchEvent) => void;
|
|
13
|
+
readonly onTouchMove: (event: TouchEvent) => void;
|
|
14
|
+
readonly onTouchEnd: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function useSwipe(props: UseSwipeProps): UseSwipe;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TextStreamData } from '@livekit/components-core';
|
|
2
|
+
import { Room, TextStreamHandler, TextStreamWriter } from 'livekit-client';
|
|
3
|
+
import { ComputedRef, ShallowRef } from 'vue';
|
|
4
|
+
export interface TextStreamInfo {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly topic: string;
|
|
7
|
+
readonly timestamp: number;
|
|
8
|
+
readonly size?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface UseTextStreamProps {
|
|
11
|
+
readonly topic: string;
|
|
12
|
+
readonly room?: Room;
|
|
13
|
+
readonly onMessage?: TextStreamHandler;
|
|
14
|
+
readonly autoCloseStreams?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface UseTextStream {
|
|
17
|
+
readonly textStreams: Readonly<ShallowRef<TextStreamData[]>>;
|
|
18
|
+
readonly isSending: ComputedRef<boolean>;
|
|
19
|
+
readonly activeWriter: ComputedRef<TextStreamWriter | null>;
|
|
20
|
+
readonly topic: ComputedRef<string>;
|
|
21
|
+
readonly sendText: (text: string) => Promise<TextStreamInfo>;
|
|
22
|
+
readonly streamText: () => Promise<TextStreamWriter>;
|
|
23
|
+
readonly registerHandler: (handler: TextStreamHandler) => void;
|
|
24
|
+
readonly unregisterHandler: () => void;
|
|
25
|
+
readonly closeActiveStream: () => Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare function useTextStream(props: UseTextStreamProps): UseTextStream;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TextStreamData } from '@livekit/components-core';
|
|
2
|
+
import { Room, TextStreamHandler, TextStreamWriter } from 'livekit-client';
|
|
3
|
+
import { ComputedRef, ShallowRef } from 'vue';
|
|
4
|
+
export interface TextStreamInfo {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly topic: string;
|
|
7
|
+
readonly timestamp: number;
|
|
8
|
+
readonly size?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface UseTextStreamProps {
|
|
11
|
+
readonly topic: string;
|
|
12
|
+
readonly room?: Room;
|
|
13
|
+
readonly onMessage?: TextStreamHandler;
|
|
14
|
+
readonly autoCloseStreams?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface UseTextStream {
|
|
17
|
+
readonly textStreams: Readonly<ShallowRef<TextStreamData[]>>;
|
|
18
|
+
readonly isSending: ComputedRef<boolean>;
|
|
19
|
+
readonly activeWriter: ComputedRef<TextStreamWriter | null>;
|
|
20
|
+
readonly topic: ComputedRef<string>;
|
|
21
|
+
readonly sendText: (text: string) => Promise<TextStreamInfo>;
|
|
22
|
+
readonly streamText: () => Promise<TextStreamWriter>;
|
|
23
|
+
readonly registerHandler: (handler: TextStreamHandler) => void;
|
|
24
|
+
readonly unregisterHandler: () => void;
|
|
25
|
+
readonly closeActiveStream: () => Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export declare function useTextStream(props: UseTextStreamProps): UseTextStream;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ToastMessage } from '../context/toast.context.cjs';
|
|
3
|
+
export interface UseToast {
|
|
4
|
+
readonly messages: ComputedRef<ToastMessage[]>;
|
|
5
|
+
readonly addToast: (message: string, type?: ToastMessage['type'], timeout?: number) => string;
|
|
6
|
+
readonly removeToast: (id: string) => void;
|
|
7
|
+
readonly clearToasts: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useToast(): UseToast;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ToastMessage } from '../context/toast.context.mjs';
|
|
3
|
+
export interface UseToast {
|
|
4
|
+
readonly messages: ComputedRef<ToastMessage[]>;
|
|
5
|
+
readonly addToast: (message: string, type?: ToastMessage['type'], timeout?: number) => string;
|
|
6
|
+
readonly removeToast: (id: string) => void;
|
|
7
|
+
readonly clearToasts: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useToast(): UseToast;
|