@naviedu/room-platform-react 0.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.
Files changed (88) hide show
  1. package/assets/ATTRIBUTION.md +46 -0
  2. package/assets/presets/alpine-lake-mirror.jpg +0 -0
  3. package/assets/presets/alpine-lake.jpg +0 -0
  4. package/assets/presets/canyon-view-mirror.jpg +0 -0
  5. package/assets/presets/canyon-view.jpg +0 -0
  6. package/assets/presets/desert-dunes-mirror.jpg +0 -0
  7. package/assets/presets/desert-dunes.jpg +0 -0
  8. package/assets/presets/flower-meadow-mirror.jpg +0 -0
  9. package/assets/presets/flower-meadow.jpg +0 -0
  10. package/assets/presets/forest-road-mirror.jpg +0 -0
  11. package/assets/presets/forest-road.jpg +0 -0
  12. package/assets/presets/naviedu-mirror.jpg +0 -0
  13. package/assets/presets/naviedu.jpg +0 -0
  14. package/assets/presets/ocean-cliffs-mirror.jpg +0 -0
  15. package/assets/presets/ocean-cliffs.jpg +0 -0
  16. package/assets/presets/tropical-beach-mirror.jpg +0 -0
  17. package/assets/presets/tropical-beach.jpg +0 -0
  18. package/assets/presets/waterfall-mist-mirror.jpg +0 -0
  19. package/assets/presets/waterfall-mist.jpg +0 -0
  20. package/assets/room-backgrounds/ATTRIBUTION.md +46 -0
  21. package/assets/room-backgrounds/presets/alpine-lake-mirror.jpg +0 -0
  22. package/assets/room-backgrounds/presets/alpine-lake.jpg +0 -0
  23. package/assets/room-backgrounds/presets/canyon-view-mirror.jpg +0 -0
  24. package/assets/room-backgrounds/presets/canyon-view.jpg +0 -0
  25. package/assets/room-backgrounds/presets/desert-dunes-mirror.jpg +0 -0
  26. package/assets/room-backgrounds/presets/desert-dunes.jpg +0 -0
  27. package/assets/room-backgrounds/presets/flower-meadow-mirror.jpg +0 -0
  28. package/assets/room-backgrounds/presets/flower-meadow.jpg +0 -0
  29. package/assets/room-backgrounds/presets/forest-road-mirror.jpg +0 -0
  30. package/assets/room-backgrounds/presets/forest-road.jpg +0 -0
  31. package/assets/room-backgrounds/presets/naviedu-mirror.jpg +0 -0
  32. package/assets/room-backgrounds/presets/naviedu.jpg +0 -0
  33. package/assets/room-backgrounds/presets/ocean-cliffs-mirror.jpg +0 -0
  34. package/assets/room-backgrounds/presets/ocean-cliffs.jpg +0 -0
  35. package/assets/room-backgrounds/presets/tropical-beach-mirror.jpg +0 -0
  36. package/assets/room-backgrounds/presets/tropical-beach.jpg +0 -0
  37. package/assets/room-backgrounds/presets/waterfall-mist-mirror.jpg +0 -0
  38. package/assets/room-backgrounds/presets/waterfall-mist.jpg +0 -0
  39. package/extensions/room-platform-extensions.d.ts +8 -0
  40. package/index.d.ts +32 -0
  41. package/index.esm.js +17790 -0
  42. package/package.json +42 -0
  43. package/room-action-button.d.ts +11 -0
  44. package/room-participant-actions.d.ts +9 -0
  45. package/room-participant-list.d.ts +7 -0
  46. package/room-participant-tab.d.ts +6 -0
  47. package/room-platform-active-speaker.d.ts +4 -0
  48. package/room-platform-background-settings.d.ts +15 -0
  49. package/room-platform-camera-background-presets.d.ts +8 -0
  50. package/room-platform-camera-background-storage.d.ts +38 -0
  51. package/room-platform-control-anchor.d.ts +10 -0
  52. package/room-platform-control-bar.d.ts +11 -0
  53. package/room-platform-control-state.d.ts +12 -0
  54. package/room-platform-current-operation-strip.d.ts +13 -0
  55. package/room-platform-device-selection.d.ts +7 -0
  56. package/room-platform-device-settings.d.ts +8 -0
  57. package/room-platform-local-preview.d.ts +6 -0
  58. package/room-platform-media-controls.d.ts +1 -0
  59. package/room-platform-media-runtime.d.ts +2 -0
  60. package/room-platform-monitor-stage.d.ts +7 -0
  61. package/room-platform-monitor-video-tile.d.ts +20 -0
  62. package/room-platform-monitor-viewer.d.ts +8 -0
  63. package/room-platform-private-room-connection.d.ts +11 -0
  64. package/room-platform-private-room-context.d.ts +8 -0
  65. package/room-platform-private-room-control-bar.d.ts +12 -0
  66. package/room-platform-private-room-experience.d.ts +14 -0
  67. package/room-platform-private-room-overlay.d.ts +7 -0
  68. package/room-platform-private-room-stage.d.ts +9 -0
  69. package/room-platform-private-room-status-banner.d.ts +8 -0
  70. package/room-platform-provider.d.ts +35 -0
  71. package/room-platform-room.d.ts +2 -0
  72. package/room-platform-screen-share-whiteboard-frame.d.ts +11 -0
  73. package/room-platform-shell.d.ts +17 -0
  74. package/room-platform-speak-queue.d.ts +16 -0
  75. package/room-platform-stage-selection.d.ts +14 -0
  76. package/room-platform-stage.d.ts +13 -0
  77. package/room-platform-surface-boundary.d.ts +13 -0
  78. package/room-platform-top-bar.d.ts +7 -0
  79. package/room-platform-types.d.ts +154 -0
  80. package/room-platform-ui-primitives.d.ts +60 -0
  81. package/room-platform-video-tile.d.ts +13 -0
  82. package/room-platform-video-tracks.d.ts +6 -0
  83. package/styles.css +598 -0
  84. package/use-room-platform-camera-background.d.ts +34 -0
  85. package/use-room-platform-private-room-control-actions.d.ts +21 -0
  86. package/use-room-platform-private-room.d.ts +43 -0
  87. package/use-room-platform-stage.d.ts +2 -0
  88. package/use-room-presence.d.ts +2 -0
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@naviedu/room-platform-react",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "main": "./index.esm.js",
6
+ "module": "./index.esm.js",
7
+ "types": "./index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./index.d.ts",
11
+ "import": "./index.esm.js"
12
+ },
13
+ "./styles.css": "./styles.css"
14
+ },
15
+ "sideEffects": [
16
+ "*.css"
17
+ ],
18
+ "files": [
19
+ "*.js",
20
+ "*.d.ts",
21
+ "*.css",
22
+ "assets",
23
+ "extensions",
24
+ "README.md"
25
+ ],
26
+ "peerDependencies": {
27
+ "react": ">=18 <20",
28
+ "react-dom": ">=18 <20"
29
+ },
30
+ "dependencies": {
31
+ "@livekit/components-react": "^2.9.21",
32
+ "@livekit/track-processors": "^0.7.2",
33
+ "@navi/chat-react": "0.0.0",
34
+ "@navi/feature-room-platform": "0.0.1",
35
+ "@navi/whiteboard-core": "0.0.1",
36
+ "@navi/whiteboard-react": "0.0.1",
37
+ "sonner": "^2.0.7",
38
+ "lucide-react": "^1.7.0",
39
+ "radix-ui": "^1.4.3",
40
+ "livekit-client": "^2.19.1"
41
+ }
42
+ }
@@ -0,0 +1,11 @@
1
+ import { Button } from '@navi/ui';
2
+ import type { ComponentProps, ReactNode } from 'react';
3
+ export type RoomActionState = {
4
+ label: string;
5
+ pendingLabel: string;
6
+ status: 'disabled' | 'idle' | 'pending';
7
+ };
8
+ export declare function RoomActionButton({ icon, state, ...props }: ComponentProps<typeof Button> & {
9
+ icon: ReactNode;
10
+ state: RoomActionState;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { RoomParticipantRosterEntry } from './room-platform-types';
2
+ export type RoomParticipantActionsProps = {
3
+ isActiveSpeaker?: boolean;
4
+ isLocal?: boolean;
5
+ isOnline?: boolean;
6
+ participant: RoomParticipantRosterEntry;
7
+ participantIdentity?: string;
8
+ };
9
+ export declare function RoomParticipantActions({ isActiveSpeaker, isLocal, isOnline, participant, participantIdentity, }: RoomParticipantActionsProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { RoomParticipantPresence, RoomParticipantRosterEntry, RoomPlatformExtensionProps } from './room-platform-types';
2
+ export type RoomParticipantListProps = {
3
+ extensionProps: RoomPlatformExtensionProps;
4
+ presenceByExternalActorId?: ReadonlyMap<string, RoomParticipantPresence>;
5
+ roster: readonly RoomParticipantRosterEntry[];
6
+ };
7
+ export declare function RoomParticipantList({ extensionProps, presenceByExternalActorId, roster }: RoomParticipantListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { RoomParticipantRosterEntry, RoomPlatformExtensionProps } from './room-platform-types';
2
+ export type RoomParticipantTabProps = {
3
+ extensionProps: RoomPlatformExtensionProps;
4
+ roster?: readonly RoomParticipantRosterEntry[];
5
+ };
6
+ export declare function RoomParticipantTab({ extensionProps, roster }: RoomParticipantTabProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { TrackReference } from '@livekit/components-react';
2
+ export declare function RoomPlatformActiveSpeaker({ trackRef }: {
3
+ trackRef?: TrackReference;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { RoomPlatformCameraBackgroundPreset } from './room-platform-camera-background-presets';
2
+ import type { RoomPlatformCameraBackgroundState, RoomPlatformCameraBackgroundUploadPreview } from './use-room-platform-camera-background';
3
+ type RoomPlatformBackgroundSettingsProps = {
4
+ state: RoomPlatformCameraBackgroundState;
5
+ presets: RoomPlatformCameraBackgroundPreset[];
6
+ uploadItems: RoomPlatformCameraBackgroundUploadPreview[];
7
+ onSelectNoBackground: () => void;
8
+ onSelectBlurLevel: (level: 'light' | 'strong') => void;
9
+ onSelectPreset: (presetId: string) => void;
10
+ onSelectUploaded: (uploadAssetId: string) => void;
11
+ onDeleteUploaded: (uploadAssetId: string) => void;
12
+ onUpload: (file: File) => void;
13
+ };
14
+ export declare function RoomPlatformBackgroundSettings({ state, presets, uploadItems, onSelectNoBackground, onSelectBlurLevel, onSelectPreset, onSelectUploaded, onDeleteUploaded, onUpload, }: RoomPlatformBackgroundSettingsProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,8 @@
1
+ export type RoomPlatformCameraBackgroundPreset = {
2
+ id: 'naviedu' | 'alpine-lake' | 'forest-road' | 'tropical-beach' | 'ocean-cliffs' | 'desert-dunes' | 'canyon-view' | 'waterfall-mist' | 'flower-meadow';
3
+ label: string;
4
+ imageUrl: string;
5
+ processorImageUrl: string;
6
+ };
7
+ export declare const ROOM_PLATFORM_CAMERA_BACKGROUND_PRESETS: RoomPlatformCameraBackgroundPreset[];
8
+ export declare const findRoomPlatformCameraBackgroundPreset: (presetId?: string) => RoomPlatformCameraBackgroundPreset;
@@ -0,0 +1,38 @@
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
+ }>;
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,11 @@
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 {};
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,8 @@
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 {};
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1 @@
1
+ export { RoomPlatformControlBar as RoomPlatformMediaControls } from './room-platform-control-bar';
@@ -0,0 +1,2 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ export declare function RoomPlatformMediaRuntime({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
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 {};
@@ -0,0 +1,20 @@
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;
@@ -0,0 +1,8 @@
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 {};
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,35 @@
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 {};
@@ -0,0 +1,2 @@
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;
@@ -0,0 +1,11 @@
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 {};
@@ -0,0 +1,17 @@
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;
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,13 @@
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 {};
@@ -0,0 +1,13 @@
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 {};
@@ -0,0 +1,7 @@
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;