@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
@@ -0,0 +1,154 @@
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
+ };
@@ -0,0 +1,60 @@
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 {};
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,6 @@
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 {};