@naviedu/room-platform-react 0.0.2 → 0.0.5
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/index.d.ts +1042 -32
- package/index.esm.js +11476 -1232
- package/package.json +4 -7
- package/styles.css +584 -0
- package/assets/ATTRIBUTION.md +0 -46
- package/assets/presets/alpine-lake-mirror.jpg +0 -0
- package/assets/presets/alpine-lake.jpg +0 -0
- package/assets/presets/canyon-view-mirror.jpg +0 -0
- package/assets/presets/canyon-view.jpg +0 -0
- package/assets/presets/desert-dunes-mirror.jpg +0 -0
- package/assets/presets/desert-dunes.jpg +0 -0
- package/assets/presets/flower-meadow-mirror.jpg +0 -0
- package/assets/presets/flower-meadow.jpg +0 -0
- package/assets/presets/forest-road-mirror.jpg +0 -0
- package/assets/presets/forest-road.jpg +0 -0
- package/assets/presets/naviedu-mirror.jpg +0 -0
- package/assets/presets/naviedu.jpg +0 -0
- package/assets/presets/ocean-cliffs-mirror.jpg +0 -0
- package/assets/presets/ocean-cliffs.jpg +0 -0
- package/assets/presets/tropical-beach-mirror.jpg +0 -0
- package/assets/presets/tropical-beach.jpg +0 -0
- package/assets/presets/waterfall-mist-mirror.jpg +0 -0
- package/assets/presets/waterfall-mist.jpg +0 -0
- package/extensions/room-platform-extensions.d.ts +0 -8
- package/room-action-button.d.ts +0 -11
- package/room-participant-actions.d.ts +0 -9
- package/room-participant-list.d.ts +0 -7
- package/room-participant-tab.d.ts +0 -6
- package/room-platform-active-speaker.d.ts +0 -4
- package/room-platform-background-settings.d.ts +0 -15
- package/room-platform-camera-background-presets.d.ts +0 -8
- package/room-platform-camera-background-storage.d.ts +0 -38
- package/room-platform-control-anchor.d.ts +0 -10
- package/room-platform-control-bar.d.ts +0 -11
- package/room-platform-control-state.d.ts +0 -12
- package/room-platform-current-operation-strip.d.ts +0 -13
- package/room-platform-device-selection.d.ts +0 -7
- package/room-platform-device-settings.d.ts +0 -8
- package/room-platform-local-preview.d.ts +0 -6
- package/room-platform-media-controls.d.ts +0 -1
- package/room-platform-media-runtime.d.ts +0 -2
- package/room-platform-monitor-stage.d.ts +0 -7
- package/room-platform-monitor-video-tile.d.ts +0 -20
- package/room-platform-monitor-viewer.d.ts +0 -8
- package/room-platform-private-room-connection.d.ts +0 -11
- package/room-platform-private-room-context.d.ts +0 -8
- package/room-platform-private-room-control-bar.d.ts +0 -12
- package/room-platform-private-room-experience.d.ts +0 -14
- package/room-platform-private-room-overlay.d.ts +0 -7
- package/room-platform-private-room-stage.d.ts +0 -9
- package/room-platform-private-room-status-banner.d.ts +0 -8
- package/room-platform-provider.d.ts +0 -35
- package/room-platform-room.d.ts +0 -2
- package/room-platform-screen-share-whiteboard-frame.d.ts +0 -11
- package/room-platform-shell.d.ts +0 -17
- package/room-platform-speak-queue.d.ts +0 -16
- package/room-platform-stage-selection.d.ts +0 -14
- package/room-platform-stage.d.ts +0 -13
- package/room-platform-surface-boundary.d.ts +0 -13
- package/room-platform-top-bar.d.ts +0 -7
- package/room-platform-types.d.ts +0 -154
- package/room-platform-ui-primitives.d.ts +0 -60
- package/room-platform-video-tile.d.ts +0 -13
- package/room-platform-video-tracks.d.ts +0 -6
- package/use-room-platform-camera-background.d.ts +0 -34
- package/use-room-platform-private-room-control-actions.d.ts +0 -21
- package/use-room-platform-private-room.d.ts +0 -43
- package/use-room-platform-stage.d.ts +0 -2
- package/use-room-presence.d.ts +0 -2
package/room-action-button.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,9 +0,0 @@
|
|
|
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;
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,6 +0,0 @@
|
|
|
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;
|
|
@@ -1,15 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|
|
@@ -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,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 {};
|
package/room-platform-room.d.ts
DELETED
|
@@ -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 {};
|
package/room-platform-shell.d.ts
DELETED
|
@@ -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;
|
package/room-platform-stage.d.ts
DELETED
|
@@ -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;
|
package/room-platform-types.d.ts
DELETED
|
@@ -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
|
-
};
|