@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
package/index.d.ts CHANGED
@@ -1,32 +1,1042 @@
1
- export * from './extensions/room-platform-extensions';
2
- export * from './room-participant-actions';
3
- export * from './room-participant-list';
4
- export * from './room-participant-tab';
5
- export * from './room-action-button';
6
- export * from './room-platform-active-speaker';
7
- export * from './room-platform-control-anchor';
8
- export * from './room-platform-control-bar';
9
- export * from './room-platform-current-operation-strip';
10
- export * from './room-platform-local-preview';
11
- export * from './room-platform-media-controls';
12
- export * from './room-platform-media-runtime';
13
- export * from './room-platform-monitor-stage';
14
- export * from './room-platform-monitor-video-tile';
15
- export * from './room-platform-monitor-viewer';
16
- export * from './room-platform-provider';
17
- export * from './room-platform-private-room-connection';
18
- export * from './room-platform-private-room-control-bar';
19
- export * from './room-platform-private-room-experience';
20
- export * from './room-platform-private-room-overlay';
21
- export * from './room-platform-private-room-stage';
22
- export * from './room-platform-private-room-status-banner';
23
- export * from './room-platform-room';
24
- export * from './room-platform-shell';
25
- export * from './room-platform-speak-queue';
26
- export * from './room-platform-top-bar';
27
- export * from './room-platform-types';
28
- export * from './room-platform-video-tile';
29
- export * from './room-platform-video-tracks';
30
- export * from './use-room-presence';
31
- export * from './use-room-platform-private-room';
32
- export * from './use-room-platform-private-room-control-actions';
1
+ import type { ComponentProps } from 'react';
2
+ import type { ComponentType } from 'react';
3
+ import type { CSSProperties } from 'react';
4
+ import { JSX } from 'react/jsx-runtime';
5
+ import { LocalVideoTrack } from 'livekit-client';
6
+ import { PropsWithChildren } from 'react';
7
+ import * as React_2 from 'react';
8
+ import { ReactNode } from 'react';
9
+ import { Room } from 'livekit-client';
10
+ import { TrackReference } from '@livekit/components-react';
11
+
12
+ declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
13
+ asChild?: boolean;
14
+ }): JSX.Element;
15
+
16
+ declare const buttonVariants: (props?: {
17
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost";
18
+ size?: "xs" | "sm" | "lg" | "default" | "xl" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-xl";
19
+ } & ClassProp) => string;
20
+
21
+ declare type ChatClassNames = {
22
+ root?: string;
23
+ roomList?: string;
24
+ roomTab?: string;
25
+ panel?: string;
26
+ messageList?: string;
27
+ messageItem?: string;
28
+ composer?: string;
29
+ forwardDialog?: string;
30
+ connectionStatus?: string;
31
+ };
32
+
33
+ declare interface ChatForwardedFromDto {
34
+ sourceAppId: string;
35
+ sourceWorkspaceId: string;
36
+ sourceRoomId: string;
37
+ sourceMessageId: string;
38
+ sourceAuthorSnapshot: {
39
+ subject: string;
40
+ displayName?: string;
41
+ };
42
+ sourceCreatedAt: string;
43
+ }
44
+
45
+ declare interface ChatMessageDto {
46
+ id: string;
47
+ appId: string;
48
+ workspaceId: string;
49
+ roomId: string;
50
+ authorSubject: string;
51
+ authorDisplayName?: string;
52
+ text: string;
53
+ status: 'active' | 'deleted' | 'hidden';
54
+ createdAt: string;
55
+ updatedAt?: string;
56
+ forwardedFrom?: ChatForwardedFromDto;
57
+ }
58
+
59
+ declare type ChatPermission = (typeof chatPermissions)[number];
60
+
61
+ declare const chatPermissions: readonly ["read", "send", "delete_own", "edit_own", "moderate", "forward", "manage_room"];
62
+
63
+ declare type ChatProviderProps = {
64
+ endpoint: string;
65
+ realtimeEndpoint: string;
66
+ token: string;
67
+ tokenExpiresAt?: string;
68
+ refreshToken: string;
69
+ refreshTokenExpiresAt?: string;
70
+ rooms: ChatRoomDescriptor[];
71
+ currentRoomId?: string;
72
+ mode?: 'tabs' | 'compact' | 'full_panel' | 'readonly';
73
+ className?: string;
74
+ classNames?: ChatClassNames;
75
+ tokens?: ChatThemeTokens;
76
+ historyPageSize?: number;
77
+ isVisible?: boolean;
78
+ initialMessages?: Record<string, ChatMessageDto[]>;
79
+ messageActionWindowMs?: number;
80
+ now?: () => Date;
81
+ onError?: (error: Error) => void;
82
+ children?: ReactNode;
83
+ };
84
+
85
+ declare interface ChatRoomDescriptor {
86
+ roomId: string;
87
+ roomType: ChatRoomType;
88
+ label?: string;
89
+ permissions: ChatPermission[];
90
+ }
91
+
92
+ declare type ChatRoomType = (typeof chatRoomTypes)[number];
93
+
94
+ declare const chatRoomTypes: readonly ["group", "direct", "staff", "system"];
95
+
96
+ declare type ChatThemeTokens = {
97
+ colorPrimary?: string;
98
+ colorSurface?: string;
99
+ colorBorder?: string;
100
+ colorText?: string;
101
+ radius?: string | number;
102
+ fontFamily?: string;
103
+ };
104
+
105
+ declare type ClassProp = {
106
+ class: ClassValue;
107
+ className?: never;
108
+ } | {
109
+ class?: never;
110
+ className: ClassValue;
111
+ } | {
112
+ class?: never;
113
+ className?: never;
114
+ };
115
+
116
+ declare type ClassValue = CLSX.ClassValue;
117
+
118
+ declare namespace CLSX {
119
+ export {
120
+
121
+ }
122
+ }
123
+
124
+ export declare const getParticipantTabTitle: (participantTab: RoomPlatformExtensions["participantTab"]) => string;
125
+
126
+ export declare function getRoomPlatformPrivateRoomStatusBanner({ privateRoom, isCaller, canMountPrivateRoom, isAcceptingPrivateRoom, isEndingPrivateRoom, privateRoomReturnedNoticeId, }: {
127
+ privateRoom?: RoomPrivateRoomState;
128
+ isCaller: boolean;
129
+ canMountPrivateRoom: boolean;
130
+ isAcceptingPrivateRoom: boolean;
131
+ isEndingPrivateRoom: boolean;
132
+ privateRoomReturnedNoticeId?: string;
133
+ }): RoomPlatformPrivateRoomBannerState | undefined;
134
+
135
+ export declare const monitorCameraVideoClassName = "h-full w-full object-cover -scale-x-100";
136
+
137
+ declare type OmitUndefined<T> = T extends undefined ? never : T;
138
+
139
+ declare interface OperationCommittedEvent {
140
+ boardId: string;
141
+ revision: number;
142
+ operation: WhiteboardCommittedOperation;
143
+ }
144
+
145
+ export declare function RoomActionButton({ icon, state, ...props }: ComponentProps<typeof Button> & {
146
+ icon: ReactNode;
147
+ state: RoomActionState;
148
+ }): JSX.Element;
149
+
150
+ declare type RoomActionName = (typeof roomActionNames)[number];
151
+
152
+ declare const roomActionNames: readonly [RoomPlatformAction.PRIVATE_ROOM_INVITE, RoomPlatformAction.PRIVATE_ROOM_RESPOND, RoomPlatformAction.PRIVATE_ROOM_CLOSE, RoomPlatformAction.PRIVATE_ROOM_SCREEN_SHARE_START, RoomPlatformAction.PRIVATE_ROOM_SCREEN_SHARE_STOP, RoomPlatformAction.MONITOR_START, RoomPlatformAction.MONITOR_STOP, RoomPlatformAction.MODERATION_MUTE, RoomPlatformAction.MODERATION_REMOVE, RoomPlatformAction.MODERATION_LOWER_HAND, RoomPlatformAction.WHITEBOARD_CLEAR, RoomPlatformAction.SPEAK_REQUEST, RoomPlatformAction.SPEAK_CANCEL, RoomPlatformAction.SPEAK_APPROVE, RoomPlatformAction.SPEAK_REJECT, RoomPlatformAction.SPEAKER_SET, RoomPlatformAction.SPEAKER_CLEAR];
153
+
154
+ export declare type RoomActionState = {
155
+ label: string;
156
+ pendingLabel: string;
157
+ status: 'disabled' | 'idle' | 'pending';
158
+ };
159
+
160
+ declare interface RoomControlState {
161
+ revision: string;
162
+ raisedHandParticipantIdentities: string[];
163
+ activeSpeakerParticipantIdentity?: string;
164
+ monitorActive: boolean;
165
+ monitorViewerCount: number;
166
+ }
167
+
168
+ export declare type RoomLaunchTicketRenewalReason = 'launch_ticket_invalid' | 'access_session_expired' | 'livekit_token_expired' | 'reconnect_authorization_failed';
169
+
170
+ export declare function RoomParticipantActions({ isActiveSpeaker, isLocal, isOnline, participant, participantIdentity, }: RoomParticipantActionsProps): JSX.Element;
171
+
172
+ export declare type RoomParticipantActionsProps = {
173
+ isActiveSpeaker?: boolean;
174
+ isLocal?: boolean;
175
+ isOnline?: boolean;
176
+ participant: RoomParticipantRosterEntry;
177
+ participantIdentity?: string;
178
+ };
179
+
180
+ export declare function RoomParticipantList({ extensionProps, presenceByExternalActorId, roster }: RoomParticipantListProps): JSX.Element;
181
+
182
+ export declare type RoomParticipantListProps = {
183
+ extensionProps: RoomPlatformExtensionProps;
184
+ presenceByExternalActorId?: ReadonlyMap<string, RoomParticipantPresence>;
185
+ roster: readonly RoomParticipantRosterEntry[];
186
+ };
187
+
188
+ export declare type RoomParticipantPresence = {
189
+ canPublishAudio: boolean;
190
+ canPublishVideo: boolean;
191
+ participantIdentity: string;
192
+ externalActorId?: string;
193
+ handRaisedAt?: string;
194
+ hasAudio: boolean;
195
+ hasVideo: boolean;
196
+ isActiveSpeaker: boolean;
197
+ isHandRaised: boolean;
198
+ isLocal: boolean;
199
+ isSpeaking: boolean;
200
+ name?: string;
201
+ };
202
+
203
+ export declare type RoomParticipantPresenceState = {
204
+ isActiveSpeaker?: boolean;
205
+ isHandRaised?: boolean;
206
+ isLocal?: boolean;
207
+ online: boolean;
208
+ participantIdentity?: string;
209
+ };
210
+
211
+ export declare type RoomParticipantRosterEntry = {
212
+ externalActorId: string;
213
+ displayName: string;
214
+ avatarUrl?: string;
215
+ subtitle?: string;
216
+ supplement?: ComponentType<RoomParticipantRowSupplementProps>;
217
+ };
218
+
219
+ export declare type RoomParticipantRowSupplementProps = RoomPlatformExtensionProps & {
220
+ participant: RoomParticipantRosterEntry;
221
+ presence: RoomParticipantPresenceState;
222
+ };
223
+
224
+ export declare function RoomParticipantTab({ extensionProps, roster }: RoomParticipantTabProps): JSX.Element;
225
+
226
+ export declare type RoomParticipantTabProps = {
227
+ extensionProps: RoomPlatformExtensionProps;
228
+ roster?: readonly RoomParticipantRosterEntry[];
229
+ };
230
+
231
+ declare enum RoomPlatformAction {
232
+ PRIVATE_ROOM_INVITE = "private_room.invite",
233
+ PRIVATE_ROOM_RESPOND = "private_room.respond",
234
+ PRIVATE_ROOM_CLOSE = "private_room.close",
235
+ PRIVATE_ROOM_SCREEN_SHARE_START = "private_room.screen_share.start",
236
+ PRIVATE_ROOM_SCREEN_SHARE_STOP = "private_room.screen_share.stop",
237
+ MONITOR_START = "monitor.start",
238
+ MONITOR_STOP = "monitor.stop",
239
+ MODERATION_MUTE = "moderation.mute",
240
+ MODERATION_REMOVE = "moderation.remove",
241
+ MODERATION_LOWER_HAND = "moderation.lower_hand",
242
+ WHITEBOARD_CLEAR = "whiteboard.clear",
243
+ SPEAK_REQUEST = "speak.request",
244
+ SPEAK_CANCEL = "speak.cancel",
245
+ SPEAK_APPROVE = "speak.approve",
246
+ SPEAK_REJECT = "speak.reject",
247
+ SPEAKER_SET = "speaker.set",
248
+ SPEAKER_CLEAR = "speaker.clear"
249
+ }
250
+
251
+ export declare type RoomPlatformActionName = RoomActionName;
252
+
253
+ export declare type RoomPlatformActions = {
254
+ hasCapability: (capability: RoomPlatformCapabilityName) => boolean;
255
+ isPending: (name: RoomPlatformActionName, payload?: Record<string, string>) => boolean;
256
+ perform: (name: RoomPlatformActionName, payload?: Record<string, string>) => Promise<void>;
257
+ };
258
+
259
+ export declare type RoomPlatformActiveDevices = Record<RoomPlatformDeviceKind, string | undefined>;
260
+
261
+ export declare function RoomPlatformActiveSpeaker({ trackRef }: {
262
+ trackRef?: TrackReference;
263
+ }): JSX.Element;
264
+
265
+ declare type RoomPlatformCameraBackgroundRuntime = ReturnType<typeof useRoomPlatformCameraBackground>;
266
+
267
+ declare type RoomPlatformCameraBackgroundState = {
268
+ mode: 'none' | 'blur' | 'preset' | 'upload';
269
+ blurLevel: 'light' | 'strong';
270
+ presetId?: string;
271
+ uploadAssetId?: string;
272
+ isSupported: boolean;
273
+ isApplying: boolean;
274
+ error: string | null;
275
+ };
276
+
277
+ declare type RoomPlatformCameraBackgroundUploadPreview = {
278
+ id: string;
279
+ name: string;
280
+ createdAt: string;
281
+ previewUrl: string;
282
+ };
283
+
284
+ declare const RoomPlatformCapability: {
285
+ readonly ROOM_JOIN: "room:join";
286
+ readonly CHAT_SEND: "chat:send";
287
+ readonly MEDIA_SUBSCRIBE: "media:subscribe";
288
+ readonly MEDIA_PUBLISH_AUDIO: "media:publish_audio";
289
+ readonly MEDIA_PUBLISH_VIDEO: "media:publish_video";
290
+ readonly MEDIA_SHARE_SCREEN: "media:share_screen";
291
+ readonly DATA_PUBLISH: "data:publish";
292
+ readonly ROOM_SPEAK_REQUEST: "room:speak_request";
293
+ readonly ROOM_MODERATE: "room:moderate";
294
+ readonly MONITOR_MANAGE: "monitor:manage";
295
+ readonly PRIVATE_ROOM_INVITE: "private_room:invite";
296
+ readonly PRIVATE_ROOM_RESPOND: "private_room:respond";
297
+ readonly PRIVATE_ROOM_CLOSE: "private_room:close";
298
+ readonly WHITEBOARD_CLEAR: "whiteboard:clear";
299
+ };
300
+
301
+ declare type RoomPlatformCapabilityName = (typeof RoomPlatformCapability)[keyof typeof RoomPlatformCapability];
302
+
303
+ export declare type RoomPlatformConnectionStatus = 'connecting' | 'connected' | 'reconnecting' | 'error';
304
+
305
+ declare type RoomPlatformContextValue = {
306
+ access?: RoomPlatformGatewayAccess;
307
+ activeDevices: RoomPlatformActiveDevices;
308
+ actionError?: Error;
309
+ controlState?: RoomControlState;
310
+ error?: Error;
311
+ hasCapability: (capability: RoomPlatformCapabilityName) => boolean;
312
+ isActionPending: (name: RoomPlatformActionName, payload?: Record<string, string>) => boolean;
313
+ isLocalMediaPending: (kind: RoomPlatformLocalMediaKind) => boolean;
314
+ localCameraTrack: LocalVideoTrack | null;
315
+ localPreviewTrack: LocalVideoTrack | null;
316
+ localMedia: RoomPlatformLocalMediaState;
317
+ performAction: (name: RoomPlatformActionName, payload?: Record<string, string>) => Promise<void>;
318
+ room: Room | null;
319
+ setLocalMediaEnabled: (kind: RoomPlatformLocalMediaKind, enabled: boolean) => Promise<void>;
320
+ status: RoomPlatformConnectionStatus;
321
+ switchActiveDevice: (kind: RoomPlatformDeviceKind, deviceId: string) => Promise<void>;
322
+ };
323
+
324
+ export declare function RoomPlatformControlAnchor({ anchorKind, children, controlBar, anchorScope, className, style, }: RoomPlatformControlAnchorProps): JSX.Element;
325
+
326
+ export declare type RoomPlatformControlAnchorProps = {
327
+ anchorKind?: 'video-frame' | 'main-panel';
328
+ children: ReactNode;
329
+ controlBar: ReactNode;
330
+ anchorScope?: 'frame' | 'panel';
331
+ className?: string;
332
+ style?: CSSProperties;
333
+ };
334
+
335
+ declare function RoomPlatformControlBar({ cameraBackground, isFullscreen, isTheaterMode, onExit, onToggleFullscreen, onToggleTheaterMode, }: RoomPlatformControlBarProps): JSX.Element;
336
+ export { RoomPlatformControlBar }
337
+ export { RoomPlatformControlBar as RoomPlatformMediaControls }
338
+
339
+ declare type RoomPlatformControlBarProps = {
340
+ cameraBackground?: RoomPlatformCameraBackgroundRuntime;
341
+ isFullscreen?: boolean;
342
+ isTheaterMode?: boolean;
343
+ onExit?: () => void;
344
+ onToggleFullscreen?: () => void;
345
+ onToggleTheaterMode?: () => void;
346
+ };
347
+
348
+ export declare function RoomPlatformCurrentOperationStrip({ activeSpeakerParticipantIdentity, canClearActiveSpeaker, isClearingActiveSpeaker, onClearActiveSpeaker, currentPrivateRoomOperation, onCancelPrivateRoom, participants, }: {
349
+ activeSpeakerParticipantIdentity?: string;
350
+ canClearActiveSpeaker?: boolean;
351
+ isClearingActiveSpeaker?: boolean;
352
+ onClearActiveSpeaker?: () => void;
353
+ currentPrivateRoomOperation?: {
354
+ status: 'ringing' | 'active';
355
+ studentExternalActorId: string;
356
+ };
357
+ onCancelPrivateRoom?: () => Promise<void> | void;
358
+ participants: readonly Pick<RoomParticipantPresence, 'name' | 'participantIdentity' | 'externalActorId' | 'isLocal'>[];
359
+ }): JSX.Element;
360
+
361
+ export declare type RoomPlatformDeviceKind = 'audioinput' | 'audiooutput' | 'videoinput';
362
+
363
+ export declare type RoomPlatformErrorEvent = {
364
+ error: Error;
365
+ recoverable: boolean;
366
+ scope: RoomPlatformErrorScope;
367
+ };
368
+
369
+ export declare type RoomPlatformErrorScope = 'action' | 'connection' | 'media';
370
+
371
+ export declare type RoomPlatformEvent = {
372
+ type: 'connected';
373
+ roomId: string;
374
+ } | {
375
+ type: 'reconnecting';
376
+ reason: RoomLaunchTicketRenewalReason;
377
+ } | {
378
+ type: 'error';
379
+ error: Error;
380
+ };
381
+
382
+ export declare type RoomPlatformExtensionProps = {
383
+ actions: RoomPlatformActions;
384
+ capabilities: readonly RoomPlatformCapabilityName[];
385
+ connectionStatus: RoomPlatformConnectionStatus;
386
+ currentParticipant?: RoomParticipantPresence;
387
+ presentation: RoomPlatformPresentation;
388
+ roomId?: string;
389
+ };
390
+
391
+ export declare type RoomPlatformExtensions = {
392
+ topBarLeading?: ComponentType<RoomPlatformExtensionProps>;
393
+ topBarTrailing?: ComponentType<RoomPlatformExtensionProps>;
394
+ monitor?: {
395
+ roster: readonly RoomParticipantRosterEntry[];
396
+ roomEligible: boolean;
397
+ };
398
+ mainWorkspace?: {
399
+ placement: 'overlay' | 'alongside-stage';
400
+ component: ComponentType<RoomPlatformExtensionProps>;
401
+ };
402
+ sidebarTabs?: readonly {
403
+ id: string;
404
+ title: string;
405
+ component: ComponentType<RoomPlatformExtensionProps>;
406
+ }[];
407
+ participantTab?: {
408
+ mode: 'default';
409
+ roster?: readonly RoomParticipantRosterEntry[];
410
+ } | {
411
+ mode: 'replace';
412
+ title?: string;
413
+ component: ComponentType<RoomPlatformExtensionProps>;
414
+ };
415
+ };
416
+
417
+ export declare function RoomPlatformExtensionZone({ component: Extension, extensionProps }: RoomPlatformExtensionZoneProps): JSX.Element;
418
+
419
+ export declare type RoomPlatformExtensionZoneProps = {
420
+ component: ComponentType<RoomPlatformExtensionProps>;
421
+ extensionProps: RoomPlatformExtensionProps;
422
+ };
423
+
424
+ export declare type RoomPlatformGatewayAccess = {
425
+ accessSessionExpiresAt: string;
426
+ accessSessionToken: string;
427
+ capabilities: RoomPlatformCapabilityName[];
428
+ liveKit: {
429
+ participantIdentity: string;
430
+ roomName: string;
431
+ token: string;
432
+ wsUrl: string;
433
+ };
434
+ roomId: string;
435
+ };
436
+
437
+ export declare const RoomPlatformGatewayErrorCode: {
438
+ readonly ACCESS_SESSION_INVALID: "ROOM_PLATFORM_ACCESS_SESSION_INVALID";
439
+ readonly LAUNCH_TICKET_INVALID: "ROOM_PLATFORM_LAUNCH_TICKET_INVALID";
440
+ };
441
+
442
+ export declare type RoomPlatformIntegrations = {
443
+ chat?: Pick<ChatProviderProps, 'endpoint' | 'realtimeEndpoint' | 'token' | 'tokenExpiresAt' | 'refreshToken' | 'refreshTokenExpiresAt' | 'rooms' | 'currentRoomId'>;
444
+ whiteboard?: {
445
+ joinState: WhiteboardJoinState;
446
+ runtime: Pick<WhiteboardRuntimeOptions, 'realtimeEndpoint' | 'recoveryPort'>;
447
+ };
448
+ };
449
+
450
+ export declare type RoomPlatformLifecycleEvent = 'exchange.succeeded' | 'exchange.failed' | 'renewal.succeeded' | 'renewal.failed' | 'reconnect.succeeded' | 'reconnect.failed';
451
+
452
+ export declare type RoomPlatformLocalMediaKind = 'microphone' | 'camera' | 'screenShare';
453
+
454
+ declare type RoomPlatformLocalMediaState = Record<RoomPlatformLocalMediaKind, boolean>;
455
+
456
+ export declare function RoomPlatformLocalPreview({ trackRef, localPreviewTrack, }: {
457
+ trackRef?: TrackReference;
458
+ localPreviewTrack?: LocalVideoTrack | null;
459
+ }): JSX.Element;
460
+
461
+ export declare function RoomPlatformMediaRuntime({ children }: PropsWithChildren): JSX.Element;
462
+
463
+ export declare function RoomPlatformMonitorSidebarVideoTile(props: RoomPlatformMonitorSidebarVideoTileProps): JSX.Element;
464
+
465
+ export declare type RoomPlatformMonitorSidebarVideoTileProps = Omit<RoomPlatformMonitorVideoTileProps, 'testId'> & {
466
+ testId: string;
467
+ };
468
+
469
+ export declare function RoomPlatformMonitorStage({ roster, pageSize }: RoomPlatformMonitorStageProps): JSX.Element;
470
+
471
+ declare type RoomPlatformMonitorStageProps = {
472
+ roster: readonly RoomParticipantRosterEntry[];
473
+ pageSize?: number;
474
+ };
475
+
476
+ export declare function RoomPlatformMonitorVideoTile({ testId, label, statusLabel, notice, media, mediaClassName, fallback, fallbackClassName, showEmptyIcon, className, labelPosition, }: RoomPlatformMonitorVideoTileProps): JSX.Element;
477
+
478
+ export declare type RoomPlatformMonitorVideoTileProps = {
479
+ testId: string;
480
+ label: string;
481
+ statusLabel?: string;
482
+ notice?: ReactNode;
483
+ media?: ReactNode;
484
+ mediaClassName?: string;
485
+ fallback?: ReactNode;
486
+ fallbackClassName?: string;
487
+ showEmptyIcon?: boolean;
488
+ className?: string;
489
+ labelPosition?: 'top-left' | 'bottom-left';
490
+ };
491
+
492
+ declare type RoomPlatformMonitorViewerProps = {
493
+ enabled: boolean;
494
+ onStartError?: () => void;
495
+ performAction: (name: typeof RoomPlatformAction.MONITOR_START | typeof RoomPlatformAction.MONITOR_STOP) => Promise<void>;
496
+ };
497
+
498
+ export declare type RoomPlatformPresentation = {
499
+ kind: 'empty';
500
+ } | {
501
+ kind: 'participant';
502
+ participantIdentity: string;
503
+ } | {
504
+ kind: 'screen-share';
505
+ participantIdentity: string;
506
+ } | {
507
+ kind: 'whiteboard';
508
+ } | {
509
+ kind: 'workspace';
510
+ placement: 'overlay' | 'alongside-stage';
511
+ };
512
+
513
+ export declare type RoomPlatformPrivateRoomBannerState = Omit<RoomPlatformPrivateRoomStatusBannerProps, 'message'> & {
514
+ message: string;
515
+ tone?: RoomPlatformPrivateRoomStatusBannerTone;
516
+ };
517
+
518
+ export declare function RoomPlatformPrivateRoomConnection({ state, connection, currentExternalActorId, onRefresh, onDisconnected, children, }: RoomPlatformPrivateRoomConnectionProps): JSX.Element;
519
+
520
+ export declare type RoomPlatformPrivateRoomConnectionProps = {
521
+ state: RoomPrivateRoomState;
522
+ connection: RoomPrivateRoomConnection;
523
+ currentExternalActorId: string;
524
+ onRefresh: () => Promise<void>;
525
+ onDisconnected?: () => void;
526
+ children: ReactNode;
527
+ };
528
+
529
+ export declare function RoomPlatformPrivateRoomControlBar({ publishEnabled, permissions, screenShareDisabled, onStartScreenShare, onStopScreenShare, onEnd, onEndingChange, onEnded, }: RoomPlatformPrivateRoomControlBarProps): JSX.Element;
530
+
531
+ export declare type RoomPlatformPrivateRoomControlBarProps = {
532
+ publishEnabled: boolean;
533
+ permissions: RoomPrivateRoomPermission[];
534
+ screenShareDisabled: boolean;
535
+ onStartScreenShare: () => Promise<void>;
536
+ onStopScreenShare: () => Promise<void>;
537
+ onEnd: () => Promise<void> | void;
538
+ onEndingChange?: (isEnding: boolean) => void;
539
+ onEnded?: () => void;
540
+ };
541
+
542
+ export declare function RoomPlatformPrivateRoomExperience({ state, connection, currentExternalActorId, onEnd, onEndingChange, onEnded, onStartScreenShare, onStopScreenShare, whiteboard, }: RoomPlatformPrivateRoomExperienceProps): JSX.Element;
543
+
544
+ export declare type RoomPlatformPrivateRoomExperienceProps = {
545
+ state: RoomPrivateRoomState;
546
+ connection: RoomPrivateRoomConnection;
547
+ currentExternalActorId: string;
548
+ onEnd: () => Promise<void>;
549
+ onEndingChange?: (isEnding: boolean) => void;
550
+ onEnded?: () => void;
551
+ onStartScreenShare: () => Promise<void>;
552
+ onStopScreenShare: () => Promise<void>;
553
+ whiteboard?: ReactNode;
554
+ };
555
+
556
+ export declare function RoomPlatformPrivateRoomOverlay({ roomStatusBanner, statusSlot, ...experienceProps }: RoomPlatformPrivateRoomOverlayProps): JSX.Element;
557
+
558
+ export declare type RoomPlatformPrivateRoomOverlayProps = RoomPlatformPrivateRoomExperienceProps & {
559
+ roomStatusBanner?: RoomPlatformPrivateRoomStatusBannerProps;
560
+ statusSlot?: ReactNode;
561
+ };
562
+
563
+ export declare type RoomPlatformPrivateRoomRuntimeState = {
564
+ actorExternalId?: string;
565
+ canMountPrivateRoom: boolean;
566
+ currentPrivateRoomOperation?: {
567
+ status: 'ringing' | 'active';
568
+ studentExternalActorId: string;
569
+ };
570
+ hasIncomingPrivateRoom: boolean;
571
+ isAcceptingPrivateRoom: boolean;
572
+ isCaller: boolean;
573
+ privateRoom?: RoomPrivateRoomState;
574
+ privateRoomConnection?: RoomPrivateRoomConnection;
575
+ privateRoomReturnedNoticeId?: string;
576
+ privateRoomStatusBanner?: RoomPlatformPrivateRoomBannerState;
577
+ acceptPrivateRoom: () => Promise<void>;
578
+ declinePrivateRoom: () => Promise<void>;
579
+ cancelPrivateRoom: () => Promise<void>;
580
+ endPrivateRoom: () => Promise<void>;
581
+ startPrivateScreenShare: () => Promise<void>;
582
+ stopPrivateScreenShare: () => Promise<void>;
583
+ markPrivateRoomEnded: () => void;
584
+ setIsAcceptingPrivateRoom: (value: boolean) => void;
585
+ };
586
+
587
+ export declare function RoomPlatformPrivateRoomStage({ callerExternalActorId, studentExternalActorId, activeScreenShareExternalActorId, controlBar, whiteboard, }: RoomPlatformPrivateRoomStageProps): JSX.Element;
588
+
589
+ export declare type RoomPlatformPrivateRoomStageProps = {
590
+ callerExternalActorId: string;
591
+ studentExternalActorId: string;
592
+ activeScreenShareExternalActorId?: string;
593
+ controlBar?: ReactNode;
594
+ whiteboard?: ReactNode;
595
+ };
596
+
597
+ export declare function RoomPlatformPrivateRoomStatusBanner({ message, detail, status, tone, }: RoomPlatformPrivateRoomStatusBannerProps): JSX.Element;
598
+
599
+ export declare type RoomPlatformPrivateRoomStatusBannerProps = {
600
+ message?: string;
601
+ detail?: string;
602
+ status?: 'active' | 'pending';
603
+ tone?: RoomPlatformPrivateRoomStatusBannerTone;
604
+ };
605
+
606
+ export declare type RoomPlatformPrivateRoomStatusBannerTone = 'info' | 'warning' | 'success';
607
+
608
+ export declare function RoomPlatformProvider({ apiBaseUrl, children, launchToken, onError, onLifecycleEvent, onLaunchTicketRequired, }: RoomPlatformProviderProps): JSX.Element;
609
+
610
+ export declare type RoomPlatformProviderProps = PropsWithChildren<{
611
+ apiBaseUrl: string;
612
+ launchToken: string;
613
+ onError?: (event: RoomPlatformErrorEvent) => void;
614
+ onLifecycleEvent?: (event: RoomPlatformLifecycleEvent) => void;
615
+ onLaunchTicketRequired: (reason: RoomLaunchTicketRenewalReason) => Promise<{
616
+ launchToken: string;
617
+ }>;
618
+ }>;
619
+
620
+ export declare function RoomPlatformRoom({ children, extensions, integrations, isPracticeMode, onExit, primaryCameraSelector, showLocalPreview, ...providerProps }: RoomPlatformRoomProps): JSX.Element;
621
+
622
+ export declare type RoomPlatformRoomProps = {
623
+ apiBaseUrl: string;
624
+ extensions?: RoomPlatformExtensions;
625
+ integrations?: RoomPlatformIntegrations;
626
+ launchToken: string;
627
+ isPracticeMode?: boolean;
628
+ primaryCameraSelector?: (cameraTracks: readonly TrackReference[], activeSpeakerParticipantIdentity?: string) => TrackReference | null;
629
+ showLocalPreview?: boolean;
630
+ onError?: (event: RoomPlatformErrorEvent) => void;
631
+ onLifecycleEvent?: (event: RoomPlatformLifecycleEvent) => void;
632
+ onExit?: () => void;
633
+ onLaunchTicketRequired: (reason: RoomLaunchTicketRenewalReason) => Promise<{
634
+ launchToken: string;
635
+ }>;
636
+ children?: ReactNode;
637
+ };
638
+
639
+ export declare const RoomPlatformRuntimeErrorCode: {
640
+ readonly LIVEKIT_TOKEN_EXPIRED: "LIVEKIT_TOKEN_EXPIRED";
641
+ };
642
+
643
+ export declare function RoomPlatformShell({ mainPanel, sidebar, topBar }: RoomPlatformShellProps): JSX.Element;
644
+
645
+ export declare type RoomPlatformShellControls = {
646
+ isTheaterMode: boolean;
647
+ isSidebarOpen: boolean;
648
+ isFullscreen: boolean;
649
+ isMobileFullscreen: boolean;
650
+ onToggleTheaterMode: () => void;
651
+ onToggleFullscreen: () => void;
652
+ onOpenSidebar: () => void;
653
+ onCloseSidebar: () => void;
654
+ };
655
+
656
+ export declare type RoomPlatformShellProps = {
657
+ topBar: ReactNode;
658
+ mainPanel: ReactNode | ((controls: RoomPlatformShellControls) => ReactNode);
659
+ sidebar: ReactNode;
660
+ };
661
+
662
+ export declare function RoomPlatformSpeakQueue({ activeSpeakerParticipantIdentity, activeSpeakerSlot, canApproveSpeak, canClearActiveSpeaker, canRejectSpeak, isClearingActiveSpeaker, isPracticeMode, onApproveSpeakRequest, onClearActiveSpeaker, onRejectSpeakRequest, participants, raisedHandParticipantIdentities, }: {
663
+ activeSpeakerParticipantIdentity?: string;
664
+ activeSpeakerSlot?: ReactNode;
665
+ canApproveSpeak?: boolean;
666
+ canClearActiveSpeaker?: boolean;
667
+ canRejectSpeak?: boolean;
668
+ isClearingActiveSpeaker?: boolean;
669
+ isPracticeMode?: boolean;
670
+ onApproveSpeakRequest?: (participantIdentity: string) => Promise<void> | void;
671
+ onClearActiveSpeaker?: () => void;
672
+ onRejectSpeakRequest?: (participantIdentity: string) => Promise<void> | void;
673
+ participants: readonly Pick<RoomParticipantPresence, 'name' | 'participantIdentity' | 'isLocal'>[];
674
+ raisedHandParticipantIdentities: readonly string[];
675
+ }): JSX.Element;
676
+
677
+ export declare function RoomPlatformTopBar({ monitorSelector, topBarLeading, topBarTrailing }: RoomPlatformTopBarProps): JSX.Element;
678
+
679
+ export declare type RoomPlatformTopBarProps = {
680
+ monitorSelector?: ReactNode;
681
+ topBarLeading?: ReactNode;
682
+ topBarTrailing?: ReactNode;
683
+ };
684
+
685
+ export declare function RoomPlatformVideoTile({ kind, label, trackRef, className, media, mediaClassName, labelPosition, }: RoomPlatformVideoTileProps): JSX.Element;
686
+
687
+ export declare type RoomPlatformVideoTileKind = 'active-speaker' | 'overlay' | 'preview' | 'stage';
688
+
689
+ export declare type RoomPlatformVideoTileProps = {
690
+ kind: RoomPlatformVideoTileKind;
691
+ label?: string;
692
+ trackRef?: TrackReference;
693
+ className?: string;
694
+ media?: ReactNode;
695
+ mediaClassName?: string;
696
+ labelPosition?: 'bottom-left' | 'top-left';
697
+ };
698
+
699
+ export declare function RoomPlatformVideoTracks({ status }: RoomPlatformVideoTracksProps): JSX.Element;
700
+
701
+ declare type RoomPlatformVideoTracksProps = {
702
+ status?: RoomPlatformConnectionStatus;
703
+ };
704
+
705
+ declare interface RoomPrivateRoomConnection {
706
+ roomName: string;
707
+ token: string;
708
+ wsUrl: string;
709
+ tokenExpiresAt: string;
710
+ publishEnabled: boolean;
711
+ permissions: RoomPrivateRoomPermission[];
712
+ }
713
+
714
+ declare type RoomPrivateRoomPermission = 'media:publish' | 'media:subscribe' | 'media:share_screen';
715
+
716
+ declare interface RoomPrivateRoomState {
717
+ id: string;
718
+ status: RoomPrivateRoomStatus;
719
+ callerExternalActorId: string;
720
+ studentExternalActorId: string;
721
+ roomName: string;
722
+ activeScreenShareExternalActorId?: string;
723
+ requestedAt: string;
724
+ acceptedAt?: string;
725
+ expiresAt: string;
726
+ }
727
+
728
+ declare type RoomPrivateRoomStatus = 'ringing' | 'active';
729
+
730
+ declare interface SocketLike {
731
+ auth?: unknown;
732
+ connect: () => void;
733
+ disconnect: () => void;
734
+ emit: (event: string, payload?: unknown, acknowledgement?: (response: unknown) => void) => void;
735
+ on: (event: string, handler: (payload: unknown) => void) => void;
736
+ }
737
+
738
+ export declare function useRoomPlatform(): RoomPlatformContextValue;
739
+
740
+ declare function useRoomPlatformCameraBackground({ localVideoTrack }: UseRoomPlatformCameraBackgroundInput): {
741
+ state: RoomPlatformCameraBackgroundState;
742
+ uploadItems: RoomPlatformCameraBackgroundUploadPreview[];
743
+ uploadPreviewUrl: string;
744
+ setBackgroundOff: () => Promise<void>;
745
+ setBlurLevel: (blurLevel: "light" | "strong") => Promise<void>;
746
+ setBlur: () => Promise<void>;
747
+ setPreset: (presetId: string) => Promise<void>;
748
+ selectUploaded: (uploadAssetId: string) => Promise<void>;
749
+ setUploaded: () => Promise<void>;
750
+ setUpload: (file: File) => Promise<void>;
751
+ removeUploaded: (uploadAssetId: string) => Promise<void>;
752
+ clearError: () => void;
753
+ };
754
+
755
+ declare type UseRoomPlatformCameraBackgroundInput = {
756
+ localVideoTrack: LocalVideoTrack | null;
757
+ };
758
+
759
+ export declare function useRoomPlatformMonitorViewer({ enabled, onStartError, performAction, }: RoomPlatformMonitorViewerProps): void;
760
+
761
+ export declare function useRoomPlatformPrivateRoom(): RoomPlatformPrivateRoomRuntimeState;
762
+
763
+ export declare function useRoomPlatformPrivateRoomControlActions({ canShareScreen, isScreenSharing, onStartScreenShare, onStopScreenShare, onEnd, onScreenSharingChange, setLocalScreenShareEnabled, onEndingChange, onEnded, }: UseRoomPlatformPrivateRoomControlActionsInput): UseRoomPlatformPrivateRoomControlActionsResult;
764
+
765
+ export declare type UseRoomPlatformPrivateRoomControlActionsInput = {
766
+ canShareScreen: boolean;
767
+ isScreenSharing: boolean;
768
+ onStartScreenShare: () => Promise<void>;
769
+ onStopScreenShare: () => Promise<void>;
770
+ onEnd: () => Promise<void> | void;
771
+ onScreenSharingChange?: (isScreenSharing: boolean) => void;
772
+ setLocalScreenShareEnabled?: (enabled: boolean) => Promise<void>;
773
+ onEndingChange?: (isEnding: boolean) => void;
774
+ onEnded?: () => void;
775
+ };
776
+
777
+ export declare type UseRoomPlatformPrivateRoomControlActionsResult = {
778
+ isScreenSharing: boolean;
779
+ isScreenSharePending: boolean;
780
+ isEnding: boolean;
781
+ canToggleScreenShare: boolean;
782
+ startScreenShare: () => Promise<void>;
783
+ stopScreenShare: () => Promise<void>;
784
+ endPrivateRoom: () => Promise<void>;
785
+ };
786
+
787
+ export declare function useRoomPlatformPrivateRoomPendingState(): {
788
+ acceptPending: boolean;
789
+ declinePending: boolean;
790
+ endPending: boolean;
791
+ };
792
+
793
+ export declare function useRoomPresence(): RoomParticipantPresence[];
794
+
795
+ declare type VariantProps<Component extends (...args: any) => any> = Omit<OmitUndefined<Parameters<Component>[0]>, "class" | "className">;
796
+
797
+ declare const WHITEBOARD_ANNOTATION_ERASE_OPERATION: "annotation.object.erase";
798
+
799
+ declare const WHITEBOARD_ANNOTATION_UPSERT_OPERATION: "annotation.object.upsert";
800
+
801
+ declare const WHITEBOARD_CLEAR_OPERATION: "clear";
802
+
803
+ declare const WHITEBOARD_RESTORE_CLEAR_OPERATION: "restore_clear";
804
+
805
+ declare interface WhiteboardAnnotationEraseOperation extends WhiteboardOperationEnvelope {
806
+ type: typeof WHITEBOARD_ANNOTATION_ERASE_OPERATION;
807
+ payload: WhiteboardAnnotationErasePayload;
808
+ }
809
+
810
+ declare interface WhiteboardAnnotationErasePayload extends Record<string, unknown> {
811
+ objectId: string;
812
+ }
813
+
814
+ declare type WhiteboardAnnotationSceneObject = WhiteboardAnnotationStrokeSceneObject | WhiteboardAnnotationShapeSceneObject;
815
+
816
+ declare type WhiteboardAnnotationShapeSceneObject = WhiteboardSceneObject & {
817
+ objectType: 'annotation.shape';
818
+ payload: WhiteboardShapeObjectPayload;
819
+ };
820
+
821
+ declare type WhiteboardAnnotationStrokeSceneObject = WhiteboardSceneObject & {
822
+ objectType: 'annotation.stroke';
823
+ payload: WhiteboardStrokeObjectPayload;
824
+ };
825
+
826
+ declare interface WhiteboardAnnotationUpsertOperation extends WhiteboardOperationEnvelope {
827
+ type: typeof WHITEBOARD_ANNOTATION_UPSERT_OPERATION;
828
+ payload: WhiteboardAnnotationUpsertPayload;
829
+ }
830
+
831
+ declare interface WhiteboardAnnotationUpsertPayload extends Record<string, unknown> {
832
+ object: WhiteboardAnnotationSceneObject;
833
+ }
834
+
835
+ declare interface WhiteboardBootstrapRequest {
836
+ token: string;
837
+ boardId: string;
838
+ }
839
+
840
+ declare interface WhiteboardBootstrapResponse {
841
+ boardId: string;
842
+ shareSessionKey: string;
843
+ headRevision: number;
844
+ objects: WhiteboardSceneObject[];
845
+ }
846
+
847
+ declare interface WhiteboardClearOperation extends WhiteboardOperationEnvelope {
848
+ type: typeof WHITEBOARD_CLEAR_OPERATION;
849
+ payload?: undefined;
850
+ }
851
+
852
+ declare type WhiteboardCommittedOperation = WhiteboardAnnotationUpsertOperation | WhiteboardAnnotationEraseOperation | WhiteboardClearOperation | WhiteboardRestoreClearOperation;
853
+
854
+ declare interface WhiteboardDeltaItem {
855
+ revision: number;
856
+ createdAt: string;
857
+ actorSubject?: string | null;
858
+ operation: WhiteboardCommittedOperation;
859
+ }
860
+
861
+ declare interface WhiteboardDeltaRequest {
862
+ token: string;
863
+ boardId: string;
864
+ afterRevision: number;
865
+ limit?: number;
866
+ }
867
+
868
+ declare interface WhiteboardDeltaResponse {
869
+ boardId: string;
870
+ fromRevision: number;
871
+ toRevision: number;
872
+ headRevision: number;
873
+ hasMore: boolean;
874
+ operations: WhiteboardDeltaItem[];
875
+ }
876
+
877
+ declare type WhiteboardFreehandKind = (typeof whiteboardFreehandKinds)[number];
878
+
879
+ declare const whiteboardFreehandKinds: readonly ["pen", "highlighter", "marker"];
880
+
881
+ declare interface WhiteboardJoinAuth {
882
+ permissions: WhiteboardPermission[];
883
+ token: string;
884
+ tokenExpiresAt: string;
885
+ }
886
+
887
+ declare type WhiteboardJoinState = {
888
+ available: true;
889
+ auth: WhiteboardJoinAuth;
890
+ } | {
891
+ available: false;
892
+ unavailableReason: WhiteboardUnavailableReason;
893
+ };
894
+
895
+ declare interface WhiteboardNormalizedPoint {
896
+ x: number;
897
+ y: number;
898
+ }
899
+
900
+ declare interface WhiteboardOperationEnvelope {
901
+ operationId: string;
902
+ type: string;
903
+ payload?: Record<string, unknown>;
904
+ }
905
+
906
+ declare type WhiteboardPermission = (typeof whiteboardPermissions)[number];
907
+
908
+ declare const whiteboardPermissions: readonly ["whiteboard:view", "whiteboard:write", "whiteboard:clear"];
909
+
910
+ declare interface WhiteboardRecoveryPort {
911
+ bootstrap: (request: WhiteboardBootstrapRequest, signal: AbortSignal) => Promise<WhiteboardBootstrapResponse>;
912
+ delta: (request: WhiteboardDeltaRequest, signal: AbortSignal) => Promise<WhiteboardDeltaResponse>;
913
+ }
914
+
915
+ declare interface WhiteboardRecoveryState {
916
+ bootstrap: WhiteboardBootstrapResponse;
917
+ deltas: WhiteboardDeltaResponse[];
918
+ discardLocalHistory?: boolean;
919
+ mode?: 'incremental' | 'replace';
920
+ settledOperationIds?: string[];
921
+ }
922
+
923
+ declare interface WhiteboardRestoreClearOperation extends WhiteboardOperationEnvelope {
924
+ type: typeof WHITEBOARD_RESTORE_CLEAR_OPERATION;
925
+ payload: {
926
+ clearOperationId: string;
927
+ objects: WhiteboardAnnotationSceneObject[];
928
+ };
929
+ }
930
+
931
+ declare interface WhiteboardRuntimeBoardState {
932
+ activeShareSessionKey?: string;
933
+ boardId?: string;
934
+ confirmedRevision: number;
935
+ headRevision: number;
936
+ pendingOperationCount: number;
937
+ }
938
+
939
+ declare interface WhiteboardRuntimeCommittedEvent extends OperationCommittedEvent {
940
+ reconcileStrategy: 'replayable';
941
+ }
942
+
943
+ declare type WhiteboardRuntimeDiagnostic = {
944
+ type: 'submit_ack';
945
+ operationId: string;
946
+ revision: number;
947
+ latencyMs: number;
948
+ queueDepth: number;
949
+ } | {
950
+ type: 'relay_echo';
951
+ operationId: string;
952
+ revision: number;
953
+ latencyMs: number;
954
+ } | {
955
+ type: 'delta_request';
956
+ reason: 'initial_gap' | 'reconnect' | 'runtime_gap';
957
+ afterRevision: number;
958
+ } | {
959
+ type: 'queue_depth';
960
+ depth: number;
961
+ } | {
962
+ type: 'terminal_rollback';
963
+ operationCount: number;
964
+ };
965
+
966
+ declare interface WhiteboardRuntimeOptions {
967
+ onBoardStateChange?: (state: WhiteboardRuntimeBoardState) => void;
968
+ onCommittedEvent?: (event: WhiteboardRuntimeCommittedEvent) => void;
969
+ onDiagnostic?: (diagnostic: WhiteboardRuntimeDiagnostic) => void;
970
+ onRecoveryStateChange?: (recovery: WhiteboardRecoveryState | undefined) => void;
971
+ onRecoveryStatusChange?: (status: 'idle' | 'restoring' | 'recovered' | 'failed') => void;
972
+ onSubmitStatusChange?: (status: WhiteboardSubmitStatus) => void;
973
+ realtimeEndpoint?: string;
974
+ recoveryPort?: WhiteboardRecoveryPort;
975
+ socketFactory?: (endpoint: string, options: {
976
+ auth: {
977
+ token: string;
978
+ };
979
+ path: string;
980
+ }) => SocketLike;
981
+ }
982
+
983
+ declare interface WhiteboardSceneObject {
984
+ objectId: string;
985
+ objectType: string;
986
+ latestRevision: number;
987
+ payload: Record<string, unknown>;
988
+ }
989
+
990
+ declare type WhiteboardShapeKind = (typeof whiteboardShapeKinds)[number];
991
+
992
+ declare const whiteboardShapeKinds: readonly ["line", "arrow", "double-arrow", "rectangle", "shaded-rectangle", "filled-rectangle", "circle", "shaded-circle", "filled-circle", "diamond", "shaded-diamond", "filled-diamond"];
993
+
994
+ declare interface WhiteboardShapeObjectPayload extends Record<string, unknown> {
995
+ kind: WhiteboardShapeKind;
996
+ color: string;
997
+ widthPreset: WhiteboardStrokeWidthPreset;
998
+ start: WhiteboardNormalizedPoint;
999
+ end: WhiteboardNormalizedPoint;
1000
+ }
1001
+
1002
+ declare interface WhiteboardStrokeObjectPayload extends Record<string, unknown> {
1003
+ kind: WhiteboardFreehandKind;
1004
+ color: string;
1005
+ widthPreset: WhiteboardStrokeWidthPreset;
1006
+ points: WhiteboardNormalizedPoint[];
1007
+ vanishAt?: string;
1008
+ }
1009
+
1010
+ declare type WhiteboardStrokeWidthPreset = (typeof whiteboardStrokeWidthPresets)[number];
1011
+
1012
+ declare const whiteboardStrokeWidthPresets: readonly ["xs", "sm", "md", "lg"];
1013
+
1014
+ declare type WhiteboardSubmitStatus = {
1015
+ state: 'idle';
1016
+ } | {
1017
+ state: 'submitting';
1018
+ operationId: string;
1019
+ } | {
1020
+ state: 'accepted';
1021
+ operationId: string;
1022
+ } | {
1023
+ state: 'conflict';
1024
+ operationId: string;
1025
+ expectedBaseRevision: number;
1026
+ } | {
1027
+ state: 'forbidden';
1028
+ operationId: string;
1029
+ } | {
1030
+ state: 'board_not_ready';
1031
+ operationId: string;
1032
+ } | {
1033
+ state: 'unavailable';
1034
+ operationId: string;
1035
+ retryAfterMs?: number;
1036
+ };
1037
+
1038
+ declare type WhiteboardUnavailableReason = (typeof whiteboardUnavailableReasons)[number];
1039
+
1040
+ declare const whiteboardUnavailableReasons: readonly ["TOKEN_EXCHANGE_FAILED", "WHITEBOARD_UNAVAILABLE"];
1041
+
1042
+ export { }