@naviedu/room-platform-react 0.0.2 → 0.0.4

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.
Files changed (50) hide show
  1. package/index.d.ts +1042 -32
  2. package/index.esm.js +11476 -1232
  3. package/package.json +4 -7
  4. package/styles.css +584 -0
  5. package/extensions/room-platform-extensions.d.ts +0 -8
  6. package/room-action-button.d.ts +0 -11
  7. package/room-participant-actions.d.ts +0 -9
  8. package/room-participant-list.d.ts +0 -7
  9. package/room-participant-tab.d.ts +0 -6
  10. package/room-platform-active-speaker.d.ts +0 -4
  11. package/room-platform-background-settings.d.ts +0 -15
  12. package/room-platform-camera-background-presets.d.ts +0 -8
  13. package/room-platform-camera-background-storage.d.ts +0 -38
  14. package/room-platform-control-anchor.d.ts +0 -10
  15. package/room-platform-control-bar.d.ts +0 -11
  16. package/room-platform-control-state.d.ts +0 -12
  17. package/room-platform-current-operation-strip.d.ts +0 -13
  18. package/room-platform-device-selection.d.ts +0 -7
  19. package/room-platform-device-settings.d.ts +0 -8
  20. package/room-platform-local-preview.d.ts +0 -6
  21. package/room-platform-media-controls.d.ts +0 -1
  22. package/room-platform-media-runtime.d.ts +0 -2
  23. package/room-platform-monitor-stage.d.ts +0 -7
  24. package/room-platform-monitor-video-tile.d.ts +0 -20
  25. package/room-platform-monitor-viewer.d.ts +0 -8
  26. package/room-platform-private-room-connection.d.ts +0 -11
  27. package/room-platform-private-room-context.d.ts +0 -8
  28. package/room-platform-private-room-control-bar.d.ts +0 -12
  29. package/room-platform-private-room-experience.d.ts +0 -14
  30. package/room-platform-private-room-overlay.d.ts +0 -7
  31. package/room-platform-private-room-stage.d.ts +0 -9
  32. package/room-platform-private-room-status-banner.d.ts +0 -8
  33. package/room-platform-provider.d.ts +0 -35
  34. package/room-platform-room.d.ts +0 -2
  35. package/room-platform-screen-share-whiteboard-frame.d.ts +0 -11
  36. package/room-platform-shell.d.ts +0 -17
  37. package/room-platform-speak-queue.d.ts +0 -16
  38. package/room-platform-stage-selection.d.ts +0 -14
  39. package/room-platform-stage.d.ts +0 -13
  40. package/room-platform-surface-boundary.d.ts +0 -13
  41. package/room-platform-top-bar.d.ts +0 -7
  42. package/room-platform-types.d.ts +0 -154
  43. package/room-platform-ui-primitives.d.ts +0 -60
  44. package/room-platform-video-tile.d.ts +0 -13
  45. package/room-platform-video-tracks.d.ts +0 -6
  46. package/use-room-platform-camera-background.d.ts +0 -34
  47. package/use-room-platform-private-room-control-actions.d.ts +0 -21
  48. package/use-room-platform-private-room.d.ts +0 -43
  49. package/use-room-platform-stage.d.ts +0 -2
  50. package/use-room-presence.d.ts +0 -2
@@ -1,38 +0,0 @@
1
- export type RoomPlatformCameraBackgroundMode = 'none' | 'blur' | 'preset' | 'upload';
2
- export type RoomPlatformCameraBackgroundBlurLevel = 'light' | 'strong';
3
- export type RoomPlatformCameraBackgroundSettings = {
4
- mode: RoomPlatformCameraBackgroundMode;
5
- blurLevel: RoomPlatformCameraBackgroundBlurLevel;
6
- presetId?: string;
7
- uploadAssetId?: string;
8
- updatedAt: string;
9
- };
10
- export type RoomPlatformCameraBackgroundUploadGallery = {
11
- assetIds: string[];
12
- updatedAt: string;
13
- };
14
- export type RoomPlatformCameraBackgroundUploadAsset = {
15
- id: string;
16
- name: string;
17
- mimeType: string;
18
- size: number;
19
- originalBlob: Blob;
20
- mirroredBlob?: Blob;
21
- createdAt: string;
22
- };
23
- export declare const MAX_UPLOAD_GALLERY_SIZE = 9;
24
- export declare const DEFAULT_ROOM_PLATFORM_CAMERA_BACKGROUND_SETTINGS: RoomPlatformCameraBackgroundSettings;
25
- export declare const loadRoomPlatformCameraBackgroundSettings: () => RoomPlatformCameraBackgroundSettings;
26
- export declare const saveRoomPlatformCameraBackgroundSettings: (input: Pick<RoomPlatformCameraBackgroundSettings, "mode"> & Partial<Pick<RoomPlatformCameraBackgroundSettings, "blurLevel" | "presetId" | "uploadAssetId">>) => RoomPlatformCameraBackgroundSettings;
27
- export declare const saveRoomPlatformUploadAsset: (file: File) => Promise<RoomPlatformCameraBackgroundUploadAsset>;
28
- export declare const loadRoomPlatformUploadAsset: (id: string) => Promise<RoomPlatformCameraBackgroundUploadAsset | null>;
29
- export declare const removeRoomPlatformUploadAsset: (id: string) => Promise<void>;
30
- export declare const loadLastUploadedAssetId: () => string | null;
31
- export declare const loadRoomPlatformUploadAssetIds: () => Promise<string[]>;
32
- export declare const appendRoomPlatformUploadAssetId: (assetId: string) => Promise<string[]>;
33
- export declare const removeRoomPlatformUploadAssetId: (assetId: string) => Promise<string[]>;
34
- export declare const saveRoomPlatformUploadAndSelect: (file: File) => Promise<{
35
- asset: RoomPlatformCameraBackgroundUploadAsset;
36
- galleryAssetIds: string[];
37
- settings: RoomPlatformCameraBackgroundSettings;
38
- }>;
@@ -1,10 +0,0 @@
1
- import type { CSSProperties, ReactNode } from 'react';
2
- export type RoomPlatformControlAnchorProps = {
3
- anchorKind?: 'video-frame' | 'main-panel';
4
- children: ReactNode;
5
- controlBar: ReactNode;
6
- anchorScope?: 'frame' | 'panel';
7
- className?: string;
8
- style?: CSSProperties;
9
- };
10
- export declare function RoomPlatformControlAnchor({ anchorKind, children, controlBar, anchorScope, className, style, }: RoomPlatformControlAnchorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import type { RoomPlatformCameraBackgroundRuntime } from './use-room-platform-camera-background';
2
- type RoomPlatformControlBarProps = {
3
- cameraBackground?: RoomPlatformCameraBackgroundRuntime;
4
- isFullscreen?: boolean;
5
- isTheaterMode?: boolean;
6
- onExit?: () => void;
7
- onToggleFullscreen?: () => void;
8
- onToggleTheaterMode?: () => void;
9
- };
10
- export declare function RoomPlatformControlBar({ cameraBackground, isFullscreen, isTheaterMode, onExit, onToggleFullscreen, onToggleTheaterMode, }: RoomPlatformControlBarProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,12 +0,0 @@
1
- import { type RoomControlRealtimeEvent, type RoomControlState } from '@navi/feature-room-platform';
2
- export declare const roomPlatformControlStateTopic = "room-platform.actions";
3
- export type RoomControlStateReduction = {
4
- kind: 'ignored';
5
- } | {
6
- kind: 'applied';
7
- state: RoomControlState;
8
- } | {
9
- kind: 'gap';
10
- };
11
- export declare const parseRoomControlRealtimeEvent: (payload: Uint8Array, topic: string | undefined) => RoomControlRealtimeEvent | undefined;
12
- export declare const reduceRoomControlState: (current: RoomControlState | undefined, next: RoomControlState) => RoomControlStateReduction;
@@ -1,13 +0,0 @@
1
- import type { RoomParticipantPresence } from './room-platform-types';
2
- export declare function RoomPlatformCurrentOperationStrip({ activeSpeakerParticipantIdentity, canClearActiveSpeaker, isClearingActiveSpeaker, onClearActiveSpeaker, currentPrivateRoomOperation, onCancelPrivateRoom, participants, }: {
3
- activeSpeakerParticipantIdentity?: string;
4
- canClearActiveSpeaker?: boolean;
5
- isClearingActiveSpeaker?: boolean;
6
- onClearActiveSpeaker?: () => void;
7
- currentPrivateRoomOperation?: {
8
- status: 'ringing' | 'active';
9
- studentExternalActorId: string;
10
- };
11
- onCancelPrivateRoom?: () => Promise<void> | void;
12
- participants: readonly Pick<RoomParticipantPresence, 'name' | 'participantIdentity' | 'externalActorId' | 'isLocal'>[];
13
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- export type RoomPlatformDeviceFallback = {
2
- label: string;
3
- value: string;
4
- };
5
- export declare const getDeviceValue: (device: MediaDeviceInfo, index: number) => string;
6
- export declare const getSelectedDeviceValue: (current: string, devices: MediaDeviceInfo[], fallback: RoomPlatformDeviceFallback) => string;
7
- export declare const getSelectedDevice: (devices: MediaDeviceInfo[], selectedValue: string) => MediaDeviceInfo;
@@ -1,8 +0,0 @@
1
- import type { RoomPlatformCameraBackgroundRuntime } from './use-room-platform-camera-background';
2
- type RoomPlatformDeviceSettingsProps = {
3
- cameraBackground?: RoomPlatformCameraBackgroundRuntime;
4
- open: boolean;
5
- onClose: () => void;
6
- };
7
- export declare function RoomPlatformDeviceSettings({ cameraBackground, open, onClose }: RoomPlatformDeviceSettingsProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,6 +0,0 @@
1
- import type { TrackReference } from '@livekit/components-react';
2
- import type { LocalVideoTrack } from 'livekit-client';
3
- export declare function RoomPlatformLocalPreview({ trackRef, localPreviewTrack, }: {
4
- trackRef?: TrackReference;
5
- localPreviewTrack?: LocalVideoTrack | null;
6
- }): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export { RoomPlatformControlBar as RoomPlatformMediaControls } from './room-platform-control-bar';
@@ -1,2 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- export declare function RoomPlatformMediaRuntime({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { RoomParticipantRosterEntry } from './room-platform-types';
2
- type RoomPlatformMonitorStageProps = {
3
- roster: readonly RoomParticipantRosterEntry[];
4
- pageSize?: number;
5
- };
6
- export declare function RoomPlatformMonitorStage({ roster, pageSize }: RoomPlatformMonitorStageProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,20 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export type RoomPlatformMonitorVideoTileProps = {
3
- testId: string;
4
- label: string;
5
- statusLabel?: string;
6
- notice?: ReactNode;
7
- media?: ReactNode;
8
- mediaClassName?: string;
9
- fallback?: ReactNode;
10
- fallbackClassName?: string;
11
- showEmptyIcon?: boolean;
12
- className?: string;
13
- labelPosition?: 'top-left' | 'bottom-left';
14
- };
15
- export declare function RoomPlatformMonitorVideoTile({ testId, label, statusLabel, notice, media, mediaClassName, fallback, fallbackClassName, showEmptyIcon, className, labelPosition, }: RoomPlatformMonitorVideoTileProps): import("react/jsx-runtime").JSX.Element;
16
- export declare const monitorCameraVideoClassName = "h-full w-full object-cover -scale-x-100";
17
- export type RoomPlatformMonitorSidebarVideoTileProps = Omit<RoomPlatformMonitorVideoTileProps, 'testId'> & {
18
- testId: string;
19
- };
20
- export declare function RoomPlatformMonitorSidebarVideoTile(props: RoomPlatformMonitorSidebarVideoTileProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { RoomPlatformAction } from '@navi/feature-room-platform';
2
- type RoomPlatformMonitorViewerProps = {
3
- enabled: boolean;
4
- onStartError?: () => void;
5
- performAction: (name: typeof RoomPlatformAction.MONITOR_START | typeof RoomPlatformAction.MONITOR_STOP) => Promise<void>;
6
- };
7
- export declare function useRoomPlatformMonitorViewer({ enabled, onStartError, performAction, }: RoomPlatformMonitorViewerProps): void;
8
- export {};
@@ -1,11 +0,0 @@
1
- import type { RoomPrivateRoomConnection, RoomPrivateRoomState } from '@navi/feature-room-platform';
2
- import type { ReactNode } from 'react';
3
- export type RoomPlatformPrivateRoomConnectionProps = {
4
- state: RoomPrivateRoomState;
5
- connection: RoomPrivateRoomConnection;
6
- currentExternalActorId: string;
7
- onRefresh: () => Promise<void>;
8
- onDisconnected?: () => void;
9
- children: ReactNode;
10
- };
11
- export declare function RoomPlatformPrivateRoomConnection({ state, connection, currentExternalActorId, onRefresh, onDisconnected, children, }: RoomPlatformPrivateRoomConnectionProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import type { RoomPrivateRoomConnection, RoomPrivateRoomState } from '@navi/feature-room-platform';
2
- export type RoomPlatformPrivateRoomContextValue = {
3
- privateRoom?: RoomPrivateRoomState;
4
- privateRoomConnection?: RoomPrivateRoomConnection;
5
- refreshControlState: () => Promise<void>;
6
- };
7
- export declare const RoomPlatformPrivateRoomContext: import("react").Context<RoomPlatformPrivateRoomContextValue>;
8
- export declare function useRoomPlatformPrivateRoomContext(): RoomPlatformPrivateRoomContextValue;
@@ -1,12 +0,0 @@
1
- import type { RoomPrivateRoomPermission } from '@navi/feature-room-platform';
2
- export type RoomPlatformPrivateRoomControlBarProps = {
3
- publishEnabled: boolean;
4
- permissions: RoomPrivateRoomPermission[];
5
- screenShareDisabled: boolean;
6
- onStartScreenShare: () => Promise<void>;
7
- onStopScreenShare: () => Promise<void>;
8
- onEnd: () => Promise<void> | void;
9
- onEndingChange?: (isEnding: boolean) => void;
10
- onEnded?: () => void;
11
- };
12
- export declare function RoomPlatformPrivateRoomControlBar({ publishEnabled, permissions, screenShareDisabled, onStartScreenShare, onStopScreenShare, onEnd, onEndingChange, onEnded, }: RoomPlatformPrivateRoomControlBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import type { RoomPrivateRoomConnection, RoomPrivateRoomState } from '@navi/feature-room-platform';
2
- import type { ReactNode } from 'react';
3
- export type RoomPlatformPrivateRoomExperienceProps = {
4
- state: RoomPrivateRoomState;
5
- connection: RoomPrivateRoomConnection;
6
- currentExternalActorId: string;
7
- onEnd: () => Promise<void>;
8
- onEndingChange?: (isEnding: boolean) => void;
9
- onEnded?: () => void;
10
- onStartScreenShare: () => Promise<void>;
11
- onStopScreenShare: () => Promise<void>;
12
- whiteboard?: ReactNode;
13
- };
14
- export declare function RoomPlatformPrivateRoomExperience({ state, connection, currentExternalActorId, onEnd, onEndingChange, onEnded, onStartScreenShare, onStopScreenShare, whiteboard, }: RoomPlatformPrivateRoomExperienceProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { RoomPlatformPrivateRoomExperienceProps } from './room-platform-private-room-experience';
3
- export type RoomPlatformPrivateRoomOverlayProps = RoomPlatformPrivateRoomExperienceProps & {
4
- roomStatusBanner?: import('./room-platform-private-room-status-banner').RoomPlatformPrivateRoomStatusBannerProps;
5
- statusSlot?: ReactNode;
6
- };
7
- export declare function RoomPlatformPrivateRoomOverlay({ roomStatusBanner, statusSlot, ...experienceProps }: RoomPlatformPrivateRoomOverlayProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export type RoomPlatformPrivateRoomStageProps = {
3
- callerExternalActorId: string;
4
- studentExternalActorId: string;
5
- activeScreenShareExternalActorId?: string;
6
- controlBar?: ReactNode;
7
- whiteboard?: ReactNode;
8
- };
9
- export declare function RoomPlatformPrivateRoomStage({ callerExternalActorId, studentExternalActorId, activeScreenShareExternalActorId, controlBar, whiteboard, }: RoomPlatformPrivateRoomStageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- export type RoomPlatformPrivateRoomStatusBannerTone = 'info' | 'warning' | 'success';
2
- export type RoomPlatformPrivateRoomStatusBannerProps = {
3
- message?: string;
4
- detail?: string;
5
- status?: 'active' | 'pending';
6
- tone?: RoomPlatformPrivateRoomStatusBannerTone;
7
- };
8
- export declare function RoomPlatformPrivateRoomStatusBanner({ message, detail, status, tone, }: RoomPlatformPrivateRoomStatusBannerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +0,0 @@
1
- import { type RoomControlState, type RoomPlatformCapabilityName } from '@navi/feature-room-platform';
2
- import { type LocalVideoTrack, Room } from 'livekit-client';
3
- import { type PropsWithChildren } from 'react';
4
- import { type RoomLaunchTicketRenewalReason, type RoomPlatformActionName, type RoomPlatformActiveDevices, type RoomPlatformConnectionStatus, type RoomPlatformDeviceKind, type RoomPlatformErrorEvent, type RoomPlatformGatewayAccess, type RoomPlatformLifecycleEvent, type RoomPlatformLocalMediaKind } from './room-platform-types';
5
- type RoomPlatformLocalMediaState = Record<RoomPlatformLocalMediaKind, boolean>;
6
- type RoomPlatformContextValue = {
7
- access?: RoomPlatformGatewayAccess;
8
- activeDevices: RoomPlatformActiveDevices;
9
- actionError?: Error;
10
- controlState?: RoomControlState;
11
- error?: Error;
12
- hasCapability: (capability: RoomPlatformCapabilityName) => boolean;
13
- isActionPending: (name: RoomPlatformActionName, payload?: Record<string, string>) => boolean;
14
- isLocalMediaPending: (kind: RoomPlatformLocalMediaKind) => boolean;
15
- localCameraTrack: LocalVideoTrack | null;
16
- localPreviewTrack: LocalVideoTrack | null;
17
- localMedia: RoomPlatformLocalMediaState;
18
- performAction: (name: RoomPlatformActionName, payload?: Record<string, string>) => Promise<void>;
19
- room: Room | null;
20
- setLocalMediaEnabled: (kind: RoomPlatformLocalMediaKind, enabled: boolean) => Promise<void>;
21
- status: RoomPlatformConnectionStatus;
22
- switchActiveDevice: (kind: RoomPlatformDeviceKind, deviceId: string) => Promise<void>;
23
- };
24
- export type RoomPlatformProviderProps = PropsWithChildren<{
25
- apiBaseUrl: string;
26
- launchToken: string;
27
- onError?: (event: RoomPlatformErrorEvent) => void;
28
- onLifecycleEvent?: (event: RoomPlatformLifecycleEvent) => void;
29
- onLaunchTicketRequired: (reason: RoomLaunchTicketRenewalReason) => Promise<{
30
- launchToken: string;
31
- }>;
32
- }>;
33
- export declare function RoomPlatformProvider({ apiBaseUrl, children, launchToken, onError, onLifecycleEvent, onLaunchTicketRequired, }: RoomPlatformProviderProps): import("react/jsx-runtime").JSX.Element;
34
- export declare function useRoomPlatform(): RoomPlatformContextValue;
35
- export {};
@@ -1,2 +0,0 @@
1
- import type { RoomPlatformRoomProps } from './room-platform-types';
2
- export declare function RoomPlatformRoom({ children, extensions, integrations, isPracticeMode, onExit, primaryCameraSelector, showLocalPreview, ...providerProps }: RoomPlatformRoomProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { type TrackReference } from '@livekit/components-react';
2
- import type { ReactEventHandler, ReactNode } from 'react';
3
- type RoomPlatformScreenShareWhiteboardFrameProps = {
4
- aspectRatio: string;
5
- children?: ReactNode;
6
- onLoadedMetadata?: ReactEventHandler<HTMLVideoElement>;
7
- onResize?: ReactEventHandler<HTMLVideoElement>;
8
- trackRef: TrackReference;
9
- };
10
- export declare function RoomPlatformScreenShareWhiteboardFrame({ aspectRatio, children, onLoadedMetadata, onResize, trackRef, }: RoomPlatformScreenShareWhiteboardFrameProps): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,17 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- export type RoomPlatformShellControls = {
3
- isTheaterMode: boolean;
4
- isSidebarOpen: boolean;
5
- isFullscreen: boolean;
6
- isMobileFullscreen: boolean;
7
- onToggleTheaterMode: () => void;
8
- onToggleFullscreen: () => void;
9
- onOpenSidebar: () => void;
10
- onCloseSidebar: () => void;
11
- };
12
- export type RoomPlatformShellProps = {
13
- topBar: ReactNode;
14
- mainPanel: ReactNode | ((controls: RoomPlatformShellControls) => ReactNode);
15
- sidebar: ReactNode;
16
- };
17
- export declare function RoomPlatformShell({ mainPanel, sidebar, topBar }: RoomPlatformShellProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { RoomParticipantPresence } from './room-platform-types';
3
- export declare function RoomPlatformSpeakQueue({ activeSpeakerParticipantIdentity, activeSpeakerSlot, canApproveSpeak, canClearActiveSpeaker, canRejectSpeak, isClearingActiveSpeaker, isPracticeMode, onApproveSpeakRequest, onClearActiveSpeaker, onRejectSpeakRequest, participants, raisedHandParticipantIdentities, }: {
4
- activeSpeakerParticipantIdentity?: string;
5
- activeSpeakerSlot?: ReactNode;
6
- canApproveSpeak?: boolean;
7
- canClearActiveSpeaker?: boolean;
8
- canRejectSpeak?: boolean;
9
- isClearingActiveSpeaker?: boolean;
10
- isPracticeMode?: boolean;
11
- onApproveSpeakRequest?: (participantIdentity: string) => Promise<void> | void;
12
- onClearActiveSpeaker?: () => void;
13
- onRejectSpeakRequest?: (participantIdentity: string) => Promise<void> | void;
14
- participants: readonly Pick<RoomParticipantPresence, 'name' | 'participantIdentity' | 'isLocal'>[];
15
- raisedHandParticipantIdentities: readonly string[];
16
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import type { TrackReference } from '@livekit/components-react';
2
- import type { RoomPlatformPresentation } from './room-platform-types';
3
- export type RoomPlatformStageModel = {
4
- primary?: TrackReference;
5
- cameraOverlay?: TrackReference;
6
- localPreview?: TrackReference;
7
- activeSpeaker?: TrackReference;
8
- mediaPresentation: RoomPlatformPresentation;
9
- };
10
- export type RoomPlatformPrimaryCameraSelector = (cameraTracks: readonly TrackReference[], activeSpeakerParticipantIdentity?: string) => TrackReference | null;
11
- export declare function selectRoomPlatformStage(tracks: readonly TrackReference[], { activeSpeakerParticipantIdentity, primaryCameraSelector, }?: {
12
- activeSpeakerParticipantIdentity?: string;
13
- primaryCameraSelector?: RoomPlatformPrimaryCameraSelector;
14
- }): RoomPlatformStageModel;
@@ -1,13 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { RoomPlatformStageModel } from './room-platform-stage-selection';
3
- import type { RoomPlatformConnectionStatus } from './room-platform-types';
4
- type RoomPlatformStageProps = {
5
- controlBar?: ReactNode;
6
- layout?: 'camera-overlay' | 'stage';
7
- model: RoomPlatformStageModel;
8
- overlayTrack?: RoomPlatformStageModel['cameraOverlay'];
9
- status: RoomPlatformConnectionStatus;
10
- whiteboard?: ReactNode;
11
- };
12
- export declare function RoomPlatformStage({ controlBar, layout, model, overlayTrack, status, whiteboard, }: RoomPlatformStageProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,13 +0,0 @@
1
- import { Component, type ReactNode } from 'react';
2
- type RoomPlatformSurfaceBoundaryProps = {
3
- children: ReactNode;
4
- };
5
- type RoomPlatformSurfaceBoundaryState = {
6
- hasError: boolean;
7
- };
8
- export declare class RoomPlatformSurfaceBoundary extends Component<RoomPlatformSurfaceBoundaryProps, RoomPlatformSurfaceBoundaryState> {
9
- state: RoomPlatformSurfaceBoundaryState;
10
- static getDerivedStateFromError(): RoomPlatformSurfaceBoundaryState;
11
- render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>> | import("react/jsx-runtime").JSX.Element;
12
- }
13
- export {};
@@ -1,7 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- export type RoomPlatformTopBarProps = {
3
- monitorSelector?: ReactNode;
4
- topBarLeading?: ReactNode;
5
- topBarTrailing?: ReactNode;
6
- };
7
- export declare function RoomPlatformTopBar({ monitorSelector, topBarLeading, topBarTrailing }: RoomPlatformTopBarProps): import("react/jsx-runtime").JSX.Element;
@@ -1,154 +0,0 @@
1
- import type { ChatProviderProps } from '@navi/chat-react';
2
- import type { RoomActionName, RoomLaunchTicketRenewalReason, RoomPlatformCapabilityName } from '@navi/feature-room-platform';
3
- import type { WhiteboardJoinState } from '@navi/whiteboard-core';
4
- import type { WhiteboardRuntimeOptions } from '@navi/whiteboard-react';
5
- import type { ComponentType, ReactNode } from 'react';
6
- export type { RoomLaunchTicketRenewalReason };
7
- export declare const RoomPlatformGatewayErrorCode: {
8
- readonly ACCESS_SESSION_INVALID: "ROOM_PLATFORM_ACCESS_SESSION_INVALID";
9
- readonly LAUNCH_TICKET_INVALID: "ROOM_PLATFORM_LAUNCH_TICKET_INVALID";
10
- };
11
- export declare const RoomPlatformRuntimeErrorCode: {
12
- readonly LIVEKIT_TOKEN_EXPIRED: "LIVEKIT_TOKEN_EXPIRED";
13
- };
14
- export type RoomPlatformConnectionStatus = 'connecting' | 'connected' | 'reconnecting' | 'error';
15
- export type RoomPlatformLocalMediaKind = 'microphone' | 'camera' | 'screenShare';
16
- export type RoomPlatformDeviceKind = 'audioinput' | 'audiooutput' | 'videoinput';
17
- export type RoomPlatformActiveDevices = Record<RoomPlatformDeviceKind, string | undefined>;
18
- export type RoomPlatformActionName = RoomActionName;
19
- export type RoomPlatformErrorScope = 'action' | 'connection' | 'media';
20
- export type RoomPlatformErrorEvent = {
21
- error: Error;
22
- recoverable: boolean;
23
- scope: RoomPlatformErrorScope;
24
- };
25
- export type RoomPlatformPresentation = {
26
- kind: 'empty';
27
- } | {
28
- kind: 'participant';
29
- participantIdentity: string;
30
- } | {
31
- kind: 'screen-share';
32
- participantIdentity: string;
33
- } | {
34
- kind: 'whiteboard';
35
- } | {
36
- kind: 'workspace';
37
- placement: 'overlay' | 'alongside-stage';
38
- };
39
- export type RoomPlatformActions = {
40
- hasCapability: (capability: RoomPlatformCapabilityName) => boolean;
41
- isPending: (name: RoomPlatformActionName, payload?: Record<string, string>) => boolean;
42
- perform: (name: RoomPlatformActionName, payload?: Record<string, string>) => Promise<void>;
43
- };
44
- export type RoomPlatformIntegrations = {
45
- chat?: Pick<ChatProviderProps, 'endpoint' | 'realtimeEndpoint' | 'token' | 'tokenExpiresAt' | 'refreshToken' | 'refreshTokenExpiresAt' | 'rooms' | 'currentRoomId'>;
46
- whiteboard?: {
47
- joinState: WhiteboardJoinState;
48
- runtime: Pick<WhiteboardRuntimeOptions, 'realtimeEndpoint' | 'recoveryPort'>;
49
- };
50
- };
51
- export type RoomParticipantPresence = {
52
- canPublishAudio: boolean;
53
- canPublishVideo: boolean;
54
- participantIdentity: string;
55
- externalActorId?: string;
56
- handRaisedAt?: string;
57
- hasAudio: boolean;
58
- hasVideo: boolean;
59
- isActiveSpeaker: boolean;
60
- isHandRaised: boolean;
61
- isLocal: boolean;
62
- isSpeaking: boolean;
63
- name?: string;
64
- };
65
- export type RoomParticipantPresenceState = {
66
- isActiveSpeaker?: boolean;
67
- isHandRaised?: boolean;
68
- isLocal?: boolean;
69
- online: boolean;
70
- participantIdentity?: string;
71
- };
72
- export type RoomParticipantRowSupplementProps = RoomPlatformExtensionProps & {
73
- participant: RoomParticipantRosterEntry;
74
- presence: RoomParticipantPresenceState;
75
- };
76
- export type RoomParticipantRosterEntry = {
77
- externalActorId: string;
78
- displayName: string;
79
- avatarUrl?: string;
80
- subtitle?: string;
81
- supplement?: ComponentType<RoomParticipantRowSupplementProps>;
82
- };
83
- export type RoomPlatformExtensionProps = {
84
- actions: RoomPlatformActions;
85
- capabilities: readonly RoomPlatformCapabilityName[];
86
- connectionStatus: RoomPlatformConnectionStatus;
87
- currentParticipant?: RoomParticipantPresence;
88
- presentation: RoomPlatformPresentation;
89
- roomId?: string;
90
- };
91
- export type RoomPlatformExtensions = {
92
- topBarLeading?: ComponentType<RoomPlatformExtensionProps>;
93
- topBarTrailing?: ComponentType<RoomPlatformExtensionProps>;
94
- monitor?: {
95
- roster: readonly RoomParticipantRosterEntry[];
96
- roomEligible: boolean;
97
- };
98
- mainWorkspace?: {
99
- placement: 'overlay' | 'alongside-stage';
100
- component: ComponentType<RoomPlatformExtensionProps>;
101
- };
102
- sidebarTabs?: readonly {
103
- id: string;
104
- title: string;
105
- component: ComponentType<RoomPlatformExtensionProps>;
106
- }[];
107
- participantTab?: {
108
- mode: 'default';
109
- roster?: readonly RoomParticipantRosterEntry[];
110
- } | {
111
- mode: 'replace';
112
- title?: string;
113
- component: ComponentType<RoomPlatformExtensionProps>;
114
- };
115
- };
116
- export type RoomPlatformRoomProps = {
117
- apiBaseUrl: string;
118
- extensions?: RoomPlatformExtensions;
119
- integrations?: RoomPlatformIntegrations;
120
- launchToken: string;
121
- isPracticeMode?: boolean;
122
- primaryCameraSelector?: (cameraTracks: readonly import('@livekit/components-react').TrackReference[], activeSpeakerParticipantIdentity?: string) => import('@livekit/components-react').TrackReference | null;
123
- showLocalPreview?: boolean;
124
- onError?: (event: RoomPlatformErrorEvent) => void;
125
- onLifecycleEvent?: (event: RoomPlatformLifecycleEvent) => void;
126
- onExit?: () => void;
127
- onLaunchTicketRequired: (reason: RoomLaunchTicketRenewalReason) => Promise<{
128
- launchToken: string;
129
- }>;
130
- children?: ReactNode;
131
- };
132
- export type RoomPlatformLifecycleEvent = 'exchange.succeeded' | 'exchange.failed' | 'renewal.succeeded' | 'renewal.failed' | 'reconnect.succeeded' | 'reconnect.failed';
133
- export type RoomPlatformEvent = {
134
- type: 'connected';
135
- roomId: string;
136
- } | {
137
- type: 'reconnecting';
138
- reason: RoomLaunchTicketRenewalReason;
139
- } | {
140
- type: 'error';
141
- error: Error;
142
- };
143
- export type RoomPlatformGatewayAccess = {
144
- accessSessionExpiresAt: string;
145
- accessSessionToken: string;
146
- capabilities: RoomPlatformCapabilityName[];
147
- liveKit: {
148
- participantIdentity: string;
149
- roomName: string;
150
- token: string;
151
- wsUrl: string;
152
- };
153
- roomId: string;
154
- };
@@ -1,60 +0,0 @@
1
- import { Dialog as DialogPrimitive, Select as SelectPrimitive, Tabs as TabsPrimitive, Tooltip as TooltipPrimitive } from 'radix-ui';
2
- import * as React from 'react';
3
- type ClassName = string | false | null | undefined;
4
- export declare const cn: (...classes: ClassName[]) => string;
5
- export type RoomPlatformSurfaceProps = React.PropsWithChildren<React.HTMLAttributes<HTMLElement>>;
6
- export declare function RoomPlatformSurface({ children, className, ...props }: RoomPlatformSurfaceProps): import("react/jsx-runtime").JSX.Element;
7
- export type RoomPlatformPanelProps = React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>;
8
- export declare function RoomPlatformPanel({ children, className, ...props }: RoomPlatformPanelProps): import("react/jsx-runtime").JSX.Element;
9
- export type RoomPlatformButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
10
- tone?: 'default' | 'quiet' | 'danger';
11
- };
12
- export declare function RoomPlatformButton({ className, tone, type, ...props }: RoomPlatformButtonProps): import("react/jsx-runtime").JSX.Element;
13
- type ButtonVariant = 'default' | 'outline' | 'secondary' | 'ghost' | 'destructive' | 'link';
14
- type ButtonSize = 'default' | 'xs' | 'sm' | 'lg' | 'xl' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg' | 'icon-xl';
15
- export declare function Button({ className, variant, size, asChild, type, ...props }: React.ComponentProps<'button'> & {
16
- asChild?: boolean;
17
- size?: ButtonSize;
18
- variant?: ButtonVariant;
19
- }): import("react/jsx-runtime").JSX.Element;
20
- export declare function Dialog(props: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
- export declare function DialogTrigger(props: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
22
- export declare function DialogPortal(props: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
23
- export declare function DialogClose(props: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
24
- export declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
25
- export declare function DialogContent({ className, children, showCloseButton, maximizable, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
26
- maximizable?: boolean;
27
- showCloseButton?: boolean;
28
- }): import("react/jsx-runtime").JSX.Element;
29
- export declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
30
- export declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<'div'> & {
31
- showCloseButton?: boolean;
32
- }): import("react/jsx-runtime").JSX.Element;
33
- export declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
34
- export declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
35
- export declare function Tabs({ className, orientation, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
36
- type TabsListVariant = 'default' | 'line';
37
- export declare const tabsListVariants: (variant?: TabsListVariant) => string;
38
- export declare function TabsList({ className, variant, ...props }: React.ComponentProps<typeof TabsPrimitive.List> & {
39
- variant?: TabsListVariant;
40
- }): import("react/jsx-runtime").JSX.Element;
41
- export declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
42
- export declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
43
- export declare function Select(props: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
44
- export declare function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
45
- export declare function SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
46
- export declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
47
- size?: 'default' | 'sm';
48
- }): import("react/jsx-runtime").JSX.Element;
49
- export declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
50
- export declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
51
- export declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
52
- export declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
53
- export declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
54
- export declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
55
- export declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
56
- export declare function Tooltip(props: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
57
- export declare function TooltipTrigger(props: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
58
- export declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
59
- export declare function Spinner({ className, ...props }: React.ComponentProps<'svg'>): import("react/jsx-runtime").JSX.Element;
60
- export {};
@@ -1,13 +0,0 @@
1
- import { type TrackReference } from '@livekit/components-react';
2
- import type { ReactNode } from 'react';
3
- export type RoomPlatformVideoTileKind = 'active-speaker' | 'overlay' | 'preview' | 'stage';
4
- export type RoomPlatformVideoTileProps = {
5
- kind: RoomPlatformVideoTileKind;
6
- label?: string;
7
- trackRef?: TrackReference;
8
- className?: string;
9
- media?: ReactNode;
10
- mediaClassName?: string;
11
- labelPosition?: 'bottom-left' | 'top-left';
12
- };
13
- export declare function RoomPlatformVideoTile({ kind, label, trackRef, className, media, mediaClassName, labelPosition, }: RoomPlatformVideoTileProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +0,0 @@
1
- import type { RoomPlatformConnectionStatus } from './room-platform-types';
2
- type RoomPlatformVideoTracksProps = {
3
- status?: RoomPlatformConnectionStatus;
4
- };
5
- export declare function RoomPlatformVideoTracks({ status }: RoomPlatformVideoTracksProps): import("react/jsx-runtime").JSX.Element;
6
- export {};