@liveblocks/react 1.2.1 → 1.2.2-comments1

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/dist/index.d.mts CHANGED
@@ -1,7 +1,9 @@
1
+ import * as React$1 from 'react';
1
2
  import { ReactElement, ReactNode } from 'react';
3
+ import * as _liveblocks_core from '@liveblocks/core';
4
+ import { CommentBody, BaseMetadata, ThreadData, Resolve, ToImmutable, CommentData, RoomInitializers } from '@liveblocks/core';
2
5
  import { JsonObject, LsonObject, BaseUserMeta, LiveObject, User, Others, Json, Room, Status, BroadcastOptions, LostConnectionEvent, History, Client } from '@liveblocks/client';
3
6
  export { Json, JsonObject, shallow } from '@liveblocks/client';
4
- import { ToImmutable, Resolve, RoomInitializers } from '@liveblocks/core';
5
7
 
6
8
  declare type Props = {
7
9
  fallback: NonNullable<ReactNode> | null;
@@ -26,6 +28,66 @@ declare type Props = {
26
28
  */
27
29
  declare function ClientSideSuspense(props: Props): ReactElement;
28
30
 
31
+ declare type CreateThreadOptions<TMetadata extends BaseMetadata> = [
32
+ TMetadata
33
+ ] extends [never] ? {
34
+ body: CommentBody;
35
+ } : {
36
+ body: CommentBody;
37
+ metadata: TMetadata;
38
+ };
39
+ declare type EditThreadMetadataOptions<TMetadata extends BaseMetadata> = [
40
+ TMetadata
41
+ ] extends [never] ? {
42
+ threadId: string;
43
+ } : {
44
+ threadId: string;
45
+ metadata: Partial<TMetadata>;
46
+ };
47
+ declare type CreateCommentOptions = {
48
+ threadId: string;
49
+ body: CommentBody;
50
+ };
51
+ declare type EditCommentOptions = {
52
+ threadId: string;
53
+ commentId: string;
54
+ body: CommentBody;
55
+ };
56
+ declare type DeleteCommentOptions = {
57
+ threadId: string;
58
+ commentId: string;
59
+ };
60
+ declare type RoomThreads<TThreadMetadata extends BaseMetadata> = {
61
+ isLoading: true;
62
+ threads?: never;
63
+ error?: never;
64
+ } | {
65
+ isLoading: false;
66
+ threads?: never;
67
+ error: Error;
68
+ } | {
69
+ isLoading: false;
70
+ threads: ThreadData<TThreadMetadata>[];
71
+ error?: never;
72
+ };
73
+
74
+ declare type UserState<T> = {
75
+ user?: never;
76
+ isLoading: true;
77
+ error?: never;
78
+ } | {
79
+ user?: T;
80
+ isLoading: false;
81
+ error?: never;
82
+ } | {
83
+ user?: never;
84
+ isLoading: false;
85
+ error: Error;
86
+ };
87
+ declare type UserStateSuspense<T> = Resolve<Extract<UserState<T>, {
88
+ isLoading: false;
89
+ error?: never;
90
+ }>>;
29
91
  declare type RoomProviderProps<TPresence extends JsonObject, TStorage extends LsonObject> = Resolve<{
30
92
  /**
31
93
  * The id of the room you want to connect to
@@ -70,7 +132,7 @@ declare type MutationContext<TPresence extends JsonObject, TStorage extends Lson
70
132
  addToHistory: boolean;
71
133
  }) => void;
72
134
  };
73
- declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends LsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json> = {
135
+ declare type RoomContextBundleShared<TPresence extends JsonObject, TStorage extends LsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json, TThreadMetadata extends BaseMetadata> = {
74
136
  /**
75
137
  * You normally don't need to directly interact with the RoomContext, but
76
138
  * it can be necessary if you're building an advanced app where you need to
@@ -175,39 +237,6 @@ declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends Ls
175
237
  * Returns whether there are any operations to redo.
176
238
  */
177
239
  useCanRedo(): boolean;
178
- /**
179
- * Returns the LiveList associated with the provided key.
180
- * The hook triggers a re-render if the LiveList is updated, however it does not triggers a re-render if a nested CRDT is updated.
181
- *
182
- * @param key The storage key associated with the LiveList
183
- * @returns null while the storage is loading, otherwise, returns the LiveList associated to the storage
184
- *
185
- * @example
186
- * const animals = useList("animals"); // e.g. [] or ["🦁", "🐍", "🦍"]
187
- */
188
- useList<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey] | null;
189
- /**
190
- * Returns the LiveMap associated with the provided key. If the LiveMap does not exist, a new empty LiveMap will be created.
191
- * The hook triggers a re-render if the LiveMap is updated, however it does not triggers a re-render if a nested CRDT is updated.
192
- *
193
- * @param key The storage key associated with the LiveMap
194
- * @returns null while the storage is loading, otherwise, returns the LiveMap associated to the storage
195
- *
196
- * @example
197
- * const shapesById = useMap("shapes");
198
- */
199
- useMap<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey] | null;
200
- /**
201
- * Returns the LiveObject associated with the provided key.
202
- * The hook triggers a re-render if the LiveObject is updated, however it does not triggers a re-render if a nested CRDT is updated.
203
- *
204
- * @param key The storage key associated with the LiveObject
205
- * @returns null while the storage is loading, otherwise, returns the LveObject associated to the storage
206
- *
207
- * @example
208
- * const object = useObject("obj");
209
- */
210
- useObject<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey] | null;
211
240
  /**
212
241
  * Returns the mutable (!) Storage root. This hook exists for
213
242
  * backward-compatible reasons.
@@ -217,75 +246,82 @@ declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends Ls
217
246
  */
218
247
  useStorageRoot(): [root: LiveObject<TStorage> | null];
219
248
  /**
220
- * Extract arbitrary data from the Liveblocks Storage state, using an
221
- * arbitrary selector function.
222
- *
223
- * The selector function will get re-evaluated any time something changes in
224
- * Storage. The value returned by your selector function will also be the
225
- * value returned by the hook.
226
- *
227
- * The `root` value that gets passed to your selector function is
228
- * a immutable/readonly version of your Liveblocks storage root.
249
+ * Returns the presence of the current user of the current room, and a function to update it.
250
+ * It is different from the setState function returned by the useState hook from React.
251
+ * You don't need to pass the full presence object to update it.
229
252
  *
230
- * The component that uses this hook will automatically re-render if the
231
- * returned value changes.
253
+ * @example
254
+ * const [myPresence, updateMyPresence] = useMyPresence();
255
+ * updateMyPresence({ x: 0 });
256
+ * updateMyPresence({ y: 0 });
232
257
  *
233
- * By default `useStorage()` uses strict `===` to check for equality. Take
234
- * extra care when returning a computed object or list, for example when you
235
- * return the result of a .map() or .filter() call from the selector. In
236
- * those cases, you'll probably want to use a `shallow` comparison check.
258
+ * // At the next render, "myPresence" will be equal to "{ x: 0, y: 0 }"
237
259
  */
238
- useStorage<T>(selector: (root: ToImmutable<TStorage>) => T, isEqual?: (prev: T | null, curr: T | null) => boolean): T | null;
260
+ useMyPresence(): [
261
+ TPresence,
262
+ (patch: Partial<TPresence>, options?: {
263
+ addToHistory: boolean;
264
+ }) => void
265
+ ];
239
266
  /**
240
- * Gets the current user once it is connected to the room.
267
+ * useUpdateMyPresence is similar to useMyPresence but it only returns the function to update the current user presence.
268
+ * If you don't use the current user presence in your component, but you need to update it (e.g. live cursor), it's better to use useUpdateMyPresence to avoid unnecessary renders.
241
269
  *
242
270
  * @example
243
- * const me = useSelf();
244
- * const { x, y } = me.presence.cursor;
271
+ * const updateMyPresence = useUpdateMyPresence();
272
+ * updateMyPresence({ x: 0 });
273
+ * updateMyPresence({ y: 0 });
274
+ *
275
+ * // At the next render, the presence of the current user will be equal to "{ x: 0, y: 0 }"
245
276
  */
246
- useSelf(): User<TPresence, TUserMeta> | null;
277
+ useUpdateMyPresence(): (patch: Partial<TPresence>, options?: {
278
+ addToHistory: boolean;
279
+ }) => void;
247
280
  /**
248
- * Extract arbitrary data based on the current user.
281
+ * Create a callback function that lets you mutate Liveblocks state.
249
282
  *
250
- * The selector function will get re-evaluated any time your presence data
251
- * changes.
283
+ * The first argument that gets passed into your callback will be
284
+ * a "mutation context", which exposes the following:
252
285
  *
253
- * The component that uses this hook will automatically re-render if your
254
- * selector function returns a different value from its previous run.
286
+ * - `root` - The mutable Storage root.
287
+ * You can normal mutation on Live structures with this, for
288
+ * example: root.get('layers').get('layer1').set('fill',
289
+ * 'red')
255
290
  *
256
- * By default `useSelf()` uses strict `===` to check for equality. Take extra
257
- * care when returning a computed object or list, for example when you return
258
- * the result of a .map() or .filter() call from the selector. In those
259
- * cases, you'll probably want to use a `shallow` comparison check.
291
+ * - `setMyPresence` - Call this with a new (partial) Presence value.
260
292
  *
261
- * Will return `null` while Liveblocks isn't connected to a room yet.
293
+ * - `self` - A read-only version of the latest self, if you need it to
294
+ * compute the next state.
262
295
  *
263
- * @example
264
- * const cursor = useSelf(me => me.presence.cursor);
265
- * if (cursor !== null) {
266
- * const { x, y } = cursor;
267
- * }
296
+ * - `others` - A read-only version of the latest others list, if you
297
+ * need it to compute the next state.
268
298
  *
269
- */
270
- useSelf<T>(selector: (me: User<TPresence, TUserMeta>) => T, isEqual?: (prev: T, curr: T) => boolean): T | null;
271
- /**
272
- * Returns the presence of the current user of the current room, and a function to update it.
273
- * It is different from the setState function returned by the useState hook from React.
274
- * You don't need to pass the full presence object to update it.
299
+ * useMutation is like React's useCallback, except that the first argument
300
+ * that gets passed into your callback will be a "mutation context".
301
+ *
302
+ * If you want get access to the immutable root somewhere in your mutation,
303
+ * you can use `root.ToImmutable()`.
275
304
  *
276
305
  * @example
277
- * const [myPresence, updateMyPresence] = useMyPresence();
278
- * updateMyPresence({ x: 0 });
279
- * updateMyPresence({ y: 0 });
306
+ * const fillLayers = useMutation(
307
+ * ({ root }, color: Color) => {
308
+ * ...
309
+ * },
310
+ * [],
311
+ * );
280
312
  *
281
- * // At the next render, "myPresence" will be equal to "{ x: 0, y: 0 }"
313
+ * fillLayers('red');
314
+ *
315
+ * const deleteLayers = useMutation(
316
+ * ({ root }) => {
317
+ * ...
318
+ * },
319
+ * [],
320
+ * );
321
+ *
322
+ * deleteLayers();
282
323
  */
283
- useMyPresence(): [
284
- TPresence,
285
- (patch: Partial<TPresence>, options?: {
286
- addToHistory: boolean;
287
- }) => void
288
- ];
324
+ useMutation<F extends (context: MutationContext<TPresence, TStorage, TUserMeta>, ...args: any[]) => any>(callback: F, deps: readonly unknown[]): OmitFirstArg<F>;
289
325
  /**
290
326
  * Returns an object that lets you get information about all the users
291
327
  * currently connected in the room.
@@ -379,176 +415,155 @@ declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends Ls
379
415
  */
380
416
  useOther<T>(connectionId: number, selector: (other: User<TPresence, TUserMeta>) => T, isEqual?: (prev: T, curr: T) => boolean): T;
381
417
  /**
382
- * useUpdateMyPresence is similar to useMyPresence but it only returns the function to update the current user presence.
383
- * If you don't use the current user presence in your component, but you need to update it (e.g. live cursor), it's better to use useUpdateMyPresence to avoid unnecessary renders.
418
+ * Returns a function that creates a thread with an initial comment, and optionally some metadata.
384
419
  *
385
420
  * @example
386
- * const updateMyPresence = useUpdateMyPresence();
387
- * updateMyPresence({ x: 0 });
388
- * updateMyPresence({ y: 0 });
421
+ * const createThread = useCreateThread();
422
+ * createThread({ body: {}, metadata: {} });
423
+ */
424
+ useCreateThread(): (options: CreateThreadOptions<TThreadMetadata>) => ThreadData<TThreadMetadata>;
425
+ /**
426
+ * Returns a function that edits a thread's metadata.
389
427
  *
390
- * // At the next render, the presence of the current user will be equal to "{ x: 0, y: 0 }"
428
+ * @example
429
+ * const editThreadMetadata = useEditThreadMetadata();
430
+ * editThreadMetadata({ threadId: "th_xxx", metadata: {} } })
391
431
  */
392
- useUpdateMyPresence(): (patch: Partial<TPresence>, options?: {
393
- addToHistory: boolean;
394
- }) => void;
432
+ useEditThreadMetadata(): (options: EditThreadMetadataOptions<TThreadMetadata>) => void;
395
433
  /**
396
- * Create a callback function that lets you mutate Liveblocks state.
434
+ * Returns a function that adds a comment to a thread.
397
435
  *
398
- * The first argument that gets passed into your callback will be a "mutation
399
- * context", which exposes the following:
436
+ * @example
437
+ * const createComment = useCreateComment();
438
+ * createComment({ threadId: "th_xxx", body: { {} } });
439
+ */
440
+ useCreateComment(): (options: CreateCommentOptions) => CommentData;
441
+ /**
442
+ * Returns a function that edits a comment's body.
400
443
  *
401
- * - `root` - The mutable Storage root.
402
- * You can normal mutation on Live structures with this, for
403
- * example: root.get('layers').get('layer1').set('fill', 'red')
444
+ * @example
445
+ * const editComment = useEditComment()
446
+ * editComment({ threadId: "th_xxx", commentId: "cm_xxx", body: {} })
447
+ */
448
+ useEditComment(): (options: EditCommentOptions) => void;
449
+ /**
450
+ * Returns a function that deletes a comment.
451
+ * If it is the last non-deleted comment, the thread also gets deleted.
404
452
  *
405
- * - `setMyPresence` - Call this with a new (partial) Presence value.
453
+ * @example
454
+ * const deleteComment = useDeleteComment();
455
+ * deleteComment({ threadId: "th_xxx", commentId: "cm_xxx" })
456
+ */
457
+ useDeleteComment(): (options: DeleteCommentOptions) => void;
458
+ };
459
+ declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends LsonObject, TUserMeta extends BaseUserMeta, TRoomEvent extends Json, TThreadMetadata extends BaseMetadata> = Resolve<RoomContextBundleShared<TPresence, TStorage, TUserMeta, TRoomEvent, TThreadMetadata> & {
460
+ /**
461
+ * Extract arbitrary data from the Liveblocks Storage state, using an
462
+ * arbitrary selector function.
406
463
  *
407
- * - `self` - A read-only version of the latest self, if you need it to
408
- * compute the next state.
464
+ * The selector function will get re-evaluated any time something changes in
465
+ * Storage. The value returned by your selector function will also be the
466
+ * value returned by the hook.
409
467
  *
410
- * - `others` - A read-only version of the latest others list, if you need
411
- * it to compute the next state.
468
+ * The `root` value that gets passed to your selector function is
469
+ * a immutable/readonly version of your Liveblocks storage root.
412
470
  *
413
- * useMutation is like React's useCallback, except that the first argument
414
- * that gets passed into your callback will be a "mutation context".
471
+ * The component that uses this hook will automatically re-render if the
472
+ * returned value changes.
415
473
  *
416
- * If you want get access to the immutable root somewhere in your mutation,
417
- * you can use `root.ToImmutable()`.
474
+ * By default `useStorage()` uses strict `===` to check for equality. Take
475
+ * extra care when returning a computed object or list, for example when you
476
+ * return the result of a .map() or .filter() call from the selector. In
477
+ * those cases, you'll probably want to use a `shallow` comparison check.
478
+ */
479
+ useStorage<T>(selector: (root: ToImmutable<TStorage>) => T, isEqual?: (prev: T | null, curr: T | null) => boolean): T | null;
480
+ /**
481
+ * Gets the current user once it is connected to the room.
418
482
  *
419
483
  * @example
420
- * const fillLayers = useMutation(
421
- * ({ root }, color: Color) => {
422
- * ...
423
- * },
424
- * [],
425
- * );
484
+ * const me = useSelf();
485
+ * const { x, y } = me.presence.cursor;
486
+ */
487
+ useSelf(): User<TPresence, TUserMeta> | null;
488
+ /**
489
+ * Extract arbitrary data based on the current user.
426
490
  *
427
- * fillLayers('red');
491
+ * The selector function will get re-evaluated any time your presence data
492
+ * changes.
428
493
  *
429
- * const deleteLayers = useMutation(
430
- * ({ root }) => {
431
- * ...
432
- * },
433
- * [],
434
- * );
494
+ * The component that uses this hook will automatically re-render if your
495
+ * selector function returns a different value from its previous run.
496
+ *
497
+ * By default `useSelf()` uses strict `===` to check for equality. Take extra
498
+ * care when returning a computed object or list, for example when you return
499
+ * the result of a .map() or .filter() call from the selector. In those
500
+ * cases, you'll probably want to use a `shallow` comparison check.
501
+ *
502
+ * Will return `null` while Liveblocks isn't connected to a room yet.
503
+ *
504
+ * @example
505
+ * const cursor = useSelf(me => me.presence.cursor);
506
+ * if (cursor !== null) {
507
+ * const { x, y } = cursor;
508
+ * }
435
509
  *
436
- * deleteLayers();
437
510
  */
438
- useMutation<F extends (context: MutationContext<TPresence, TStorage, TUserMeta>, ...args: any[]) => any>(callback: F, deps: readonly unknown[]): OmitFirstArg<F>;
439
- suspense: {
440
- /**
441
- * You normally don't need to directly interact with the RoomContext, but
442
- * it can be necessary if you're building an advanced app where you need to
443
- * set up a context bridge between two React renderers.
444
- */
445
- RoomContext: React.Context<Room<TPresence, TStorage, TUserMeta, TRoomEvent> | null>;
446
- /**
447
- * Makes a Room available in the component hierarchy below.
448
- * When this component is unmounted, the current user leave the room.
449
- * That means that you can't have 2 RoomProvider with the same room id in your react tree.
450
- */
451
- RoomProvider(props: RoomProviderProps<TPresence, TStorage>): JSX.Element;
452
- /**
453
- * Returns the Room of the nearest RoomProvider above in the React component
454
- * tree.
455
- */
456
- useRoom(): Room<TPresence, TStorage, TUserMeta, TRoomEvent>;
457
- /**
458
- * Returns the current connection status for the Room, and triggers
459
- * a re-render whenever it changes. Can be used to render a status badge.
460
- */
461
- useStatus(): Status;
462
- /**
463
- * Returns a function that batches modifications made during the given function.
464
- * All the modifications are sent to other clients in a single message.
465
- * All the modifications are merged in a single history item (undo/redo).
466
- * All the subscribers are called only after the batch is over.
467
- */
468
- useBatch<T>(): (callback: () => T) => T;
469
- /**
470
- * Returns a callback that lets you broadcast custom events to other users in the room
471
- *
472
- * @example
473
- * const broadcast = useBroadcastEvent();
474
- *
475
- * broadcast({ type: "CUSTOM_EVENT", data: { x: 0, y: 0 } });
476
- */
477
- useBroadcastEvent(): (event: TRoomEvent, options?: BroadcastOptions) => void;
478
- /**
479
- * Get informed when reconnecting to the Liveblocks servers is taking
480
- * longer than usual. This typically is a sign of a client that has lost
481
- * internet connectivity.
482
- *
483
- * This isn't problematic (because the Liveblocks client is still trying to
484
- * reconnect), but it's typically a good idea to inform users about it if
485
- * the connection takes too long to recover.
486
- *
487
- * @example
488
- * useLostConnectionListener(event => {
489
- * if (event === 'lost') {
490
- * toast.warn('Reconnecting to the Liveblocks servers is taking longer than usual...')
491
- * } else if (event === 'failed') {
492
- * toast.warn('Reconnecting to the Liveblocks servers failed.')
493
- * } else if (event === 'restored') {
494
- * toast.clear();
495
- * }
496
- * })
497
- */
498
- useLostConnectionListener(callback: (event: LostConnectionEvent) => void): void;
499
- /**
500
- * useErrorListener is a react hook that lets you react to potential room connection errors.
501
- *
502
- * @example
503
- * useErrorListener(er => {
504
- * console.error(er);
505
- * })
506
- */
507
- useErrorListener(callback: (err: Error) => void): void;
508
- /**
509
- * useEventListener is a react hook that lets you react to event broadcasted by other users in the room.
510
- *
511
- * @example
512
- * useEventListener(({ connectionId, event }) => {
513
- * if (event.type === "CUSTOM_EVENT") {
514
- * // Do something
515
- * }
516
- * });
517
- */
518
- useEventListener(callback: (eventData: {
519
- connectionId: number;
520
- event: TRoomEvent;
521
- }) => void): void;
522
- /**
523
- * Returns the room.history
524
- */
525
- useHistory(): History;
526
- /**
527
- * Returns a function that undoes the last operation executed by the current client.
528
- * It does not impact operations made by other clients.
529
- */
530
- useUndo(): () => void;
531
- /**
532
- * Returns a function that redoes the last operation executed by the current client.
533
- * It does not impact operations made by other clients.
534
- */
535
- useRedo(): () => void;
536
- /**
537
- * Returns whether there are any operations to undo.
538
- */
539
- useCanUndo(): boolean;
540
- /**
541
- * Returns whether there are any operations to redo.
542
- */
543
- useCanRedo(): boolean;
544
- /**
545
- * Returns the mutable (!) Storage root. This hook exists for
546
- * backward-compatible reasons.
547
- *
548
- * @example
549
- * const [root] = useStorageRoot();
550
- */
551
- useStorageRoot(): [root: LiveObject<TStorage> | null];
511
+ useSelf<T>(selector: (me: User<TPresence, TUserMeta>) => T, isEqual?: (prev: T, curr: T) => boolean): T | null;
512
+ /**
513
+ * Returns the threads within the current room.
514
+ *
515
+ * @example
516
+ * const { threads, error, isLoading } = useThreads();
517
+ */
518
+ useThreads(): RoomThreads<TThreadMetadata>;
519
+ /**
520
+ * Returns user info from a given user ID.
521
+ *
522
+ * @example
523
+ * const { user, error, isLoading } = useUser("user-id");
524
+ */
525
+ useUser(userId: string): UserState<TUserMeta["info"]>;
526
+ /**
527
+ * @private
528
+ */
529
+ useMentionSuggestions(search?: string): string[] | undefined;
530
+ /**
531
+ * Returns the LiveList associated with the provided key. The hook triggers
532
+ * a re-render if the LiveList is updated, however it does not triggers
533
+ * a re-render if a nested CRDT is updated.
534
+ *
535
+ * @param key The storage key associated with the LiveList
536
+ * @returns null while the storage is loading, otherwise, returns the LiveList associated to the storage
537
+ *
538
+ * @example
539
+ * const animals = useList("animals"); // e.g. [] or ["🦁", "🐍", "🦍"]
540
+ */
541
+ useList<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey] | null;
542
+ /**
543
+ * Returns the LiveMap associated with the provided key. If the LiveMap
544
+ * does not exist, a new empty LiveMap will be created. The hook triggers
545
+ * a re-render if the LiveMap is updated, however it does not triggers
546
+ * a re-render if a nested CRDT is updated.
547
+ *
548
+ * @param key The storage key associated with the LiveMap
549
+ * @returns null while the storage is loading, otherwise, returns the LiveMap associated to the storage
550
+ *
551
+ * @example
552
+ * const shapesById = useMap("shapes");
553
+ */
554
+ useMap<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey] | null;
555
+ /**
556
+ * Returns the LiveObject associated with the provided key.
557
+ * The hook triggers a re-render if the LiveObject is updated, however it does not triggers a re-render if a nested CRDT is updated.
558
+ *
559
+ * @param key The storage key associated with the LiveObject
560
+ * @returns null while the storage is loading, otherwise, returns the LveObject associated to the storage
561
+ *
562
+ * @example
563
+ * const object = useObject("obj");
564
+ */
565
+ useObject<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey] | null;
566
+ suspense: Resolve<RoomContextBundleShared<TPresence, TStorage, TUserMeta, TRoomEvent, TThreadMetadata> & {
552
567
  /**
553
568
  * Extract arbitrary data from the Liveblocks Storage state, using an
554
569
  * arbitrary selector function.
@@ -602,175 +617,19 @@ declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends Ls
602
617
  */
603
618
  useSelf<T>(selector: (me: User<TPresence, TUserMeta>) => T, isEqual?: (prev: T, curr: T) => boolean): T;
604
619
  /**
605
- * Returns the presence of the current user of the current room, and a function to update it.
606
- * It is different from the setState function returned by the useState hook from React.
607
- * You don't need to pass the full presence object to update it.
608
- *
609
- * @example
610
- * const [myPresence, updateMyPresence] = useMyPresence();
611
- * updateMyPresence({ x: 0 });
612
- * updateMyPresence({ y: 0 });
613
- *
614
- * // At the next render, "myPresence" will be equal to "{ x: 0, y: 0 }"
615
- */
616
- useMyPresence(): [
617
- TPresence,
618
- (patch: Partial<TPresence>, options?: {
619
- addToHistory: boolean;
620
- }) => void
621
- ];
622
- /**
623
- * Returns an object that lets you get information about all the users
624
- * currently connected in the room.
625
- *
626
- * @example
627
- * const others = useOthers();
628
- *
629
- * // Example to map all cursors in JSX
630
- * return (
631
- * <>
632
- * {others.map((user) => {
633
- * if (user.presence.cursor == null) {
634
- * return null;
635
- * }
636
- * return <Cursor key={user.connectionId} cursor={user.presence.cursor} />
637
- * })}
638
- * </>
639
- * )
640
- */
641
- useOthers(): Others<TPresence, TUserMeta>;
642
- /**
643
- * Extract arbitrary data based on all the users currently connected in the
644
- * room (except yourself).
645
- *
646
- * The selector function will get re-evaluated any time a user enters or
647
- * leaves the room, as well as whenever their presence data changes.
648
- *
649
- * The component that uses this hook will automatically re-render if your
650
- * selector function returns a different value from its previous run.
651
- *
652
- * By default `useOthers()` uses strict `===` to check for equality. Take
653
- * extra care when returning a computed object or list, for example when you
654
- * return the result of a .map() or .filter() call from the selector. In
655
- * those cases, you'll probably want to use a `shallow` comparison check.
620
+ * Returns the threads within the current room.
656
621
  *
657
622
  * @example
658
- * const avatars = useOthers(users => users.map(u => u.info.avatar), shallow);
659
- * const cursors = useOthers(users => users.map(u => u.presence.cursor), shallow);
660
- * const someoneIsTyping = useOthers(users => users.some(u => u.presence.isTyping));
661
- *
623
+ * const threads = useThreads();
662
624
  */
663
- useOthers<T>(selector: (others: Others<TPresence, TUserMeta>) => T, isEqual?: (prev: T, curr: T) => boolean): T;
625
+ useThreads(): ThreadData<TThreadMetadata>[];
664
626
  /**
665
- * Returns an array of connection IDs. This matches the values you'll get by
666
- * using the `useOthers()` hook.
667
- *
668
- * Roughly equivalent to:
669
- * useOthers((others) => others.map(other => other.connectionId), shallow)
670
- *
671
- * This is useful in particular to implement efficiently rendering components
672
- * for each user in the room, e.g. cursors.
627
+ * Returns user info from a given user ID.
673
628
  *
674
629
  * @example
675
- * const ids = useOthersConnectionIds();
676
- * // [2, 4, 7]
630
+ * const { user, error, isLoading } = useUser("user-id");
677
631
  */
678
- useOthersConnectionIds(): readonly number[];
679
- /**
680
- * Related to useOthers(), but optimized for selecting only "subsets" of
681
- * others. This is useful for performance reasons in particular, because
682
- * selecting only a subset of users also means limiting the number of
683
- * re-renders that will be triggered.
684
- *
685
- * @example
686
- * const avatars = useOthersMapped(user => user.info.avatar);
687
- * // ^^^^^^^
688
- * // { connectionId: number; data: string }[]
689
- *
690
- * The selector function you pass to useOthersMapped() is called an "item
691
- * selector", and operates on a single user at a time. If you provide an
692
- * (optional) "item comparison" function, it will be used to compare each
693
- * item pairwise.
694
- *
695
- * For example, to select multiple properties:
696
- *
697
- * @example
698
- * const avatarsAndCursors = useOthersMapped(
699
- * user => [u.info.avatar, u.presence.cursor],
700
- * shallow, // 👈
701
- * );
702
- */
703
- useOthersMapped<T>(itemSelector: (other: User<TPresence, TUserMeta>) => T, itemIsEqual?: (prev: T, curr: T) => boolean): ReadonlyArray<readonly [connectionId: number, data: T]>;
704
- /**
705
- * Given a connection ID (as obtained by using `useOthersConnectionIds`),
706
- * you can call this selector deep down in your component stack to only
707
- * have the component re-render if properties for this particular user
708
- * change.
709
- *
710
- * @example
711
- * // Returns only the selected values re-renders whenever that selection changes)
712
- * const { x, y } = useOther(2, user => user.presence.cursor);
713
- */
714
- useOther<T>(connectionId: number, selector: (other: User<TPresence, TUserMeta>) => T, isEqual?: (prev: T, curr: T) => boolean): T;
715
- /**
716
- * useUpdateMyPresence is similar to useMyPresence but it only returns the function to update the current user presence.
717
- * If you don't use the current user presence in your component, but you need to update it (e.g. live cursor), it's better to use useUpdateMyPresence to avoid unnecessary renders.
718
- *
719
- * @example
720
- * const updateMyPresence = useUpdateMyPresence();
721
- * updateMyPresence({ x: 0 });
722
- * updateMyPresence({ y: 0 });
723
- *
724
- * // At the next render, the presence of the current user will be equal to "{ x: 0, y: 0 }"
725
- */
726
- useUpdateMyPresence(): (patch: Partial<TPresence>, options?: {
727
- addToHistory: boolean;
728
- }) => void;
729
- /**
730
- * Create a callback function that lets you mutate Liveblocks state.
731
- *
732
- * The first argument that gets passed into your callback will be
733
- * a "mutation context", which exposes the following:
734
- *
735
- * - `root` - The mutable Storage root.
736
- * You can normal mutation on Live structures with this, for
737
- * example: root.get('layers').get('layer1').set('fill',
738
- * 'red')
739
- *
740
- * - `setMyPresence` - Call this with a new (partial) Presence value.
741
- *
742
- * - `self` - A read-only version of the latest self, if you need it to
743
- * compute the next state.
744
- *
745
- * - `others` - A read-only version of the latest others list, if you
746
- * need it to compute the next state.
747
- *
748
- * useMutation is like React's useCallback, except that the first argument
749
- * that gets passed into your callback will be a "mutation context".
750
- *
751
- * If you want get access to the immutable root somewhere in your mutation,
752
- * you can use `root.ToImmutable()`.
753
- *
754
- * @example
755
- * const fillLayers = useMutation(
756
- * ({ root }, color: Color) => {
757
- * ...
758
- * },
759
- * [],
760
- * );
761
- *
762
- * fillLayers('red');
763
- *
764
- * const deleteLayers = useMutation(
765
- * ({ root }) => {
766
- * ...
767
- * },
768
- * [],
769
- * );
770
- *
771
- * deleteLayers();
772
- */
773
- useMutation<F extends (context: MutationContext<TPresence, TStorage, TUserMeta>, ...args: any[]) => any>(callback: F, deps: readonly unknown[]): OmitFirstArg<F>;
632
+ useUser(userId: string): UserStateSuspense<TUserMeta["info"]>;
774
633
  /**
775
634
  * Returns the LiveList associated with the provided key. The hook triggers
776
635
  * a re-render if the LiveList is updated, however it does not triggers
@@ -807,9 +666,736 @@ declare type RoomContextBundle<TPresence extends JsonObject, TStorage extends Ls
807
666
  * const object = useObject("obj");
808
667
  */
809
668
  useObject<TKey extends Extract<keyof TStorage, string>>(key: TKey): TStorage[TKey];
669
+ }>;
670
+ }>;
671
+
672
+ declare type Options<TUserMeta extends BaseUserMeta> = {
673
+ /**
674
+ * An asynchronous function that returns user info from a user ID.
675
+ */
676
+ resolveUser?: (userId: string) => Promise<TUserMeta["info"] | undefined>;
677
+ /**
678
+ * An asynchronous function that returns a list of user IDs matching a string.
679
+ */
680
+ resolveMentionSuggestions?: (search: string) => Promise<string[]>;
681
+ };
682
+ declare function useRoomContextBundle(): {
683
+ RoomContext: React$1.Context<Room<JsonObject, LsonObject, BaseUserMeta, never> | null>;
684
+ RoomProvider: (props: {
685
+ id: string;
686
+ children: React$1.ReactNode;
687
+ shouldInitiallyConnect?: boolean | undefined;
688
+ unstable_batchedUpdates?: ((cb: () => void) => void) | undefined;
689
+ initialPresence: JsonObject | ((roomId: string) => JsonObject);
690
+ initialStorage?: LsonObject | ((roomId: string) => LsonObject) | undefined;
691
+ }) => JSX.Element;
692
+ useRoom: () => Room<JsonObject, LsonObject, BaseUserMeta, never>;
693
+ useStatus: () => Status;
694
+ useBatch: <T>() => (callback: () => T) => T;
695
+ useBroadcastEvent: () => (event: never, options?: BroadcastOptions | undefined) => void;
696
+ useLostConnectionListener: (callback: (event: LostConnectionEvent) => void) => void;
697
+ useErrorListener: (callback: (err: Error) => void) => void;
698
+ useEventListener: (callback: (eventData: {
699
+ connectionId: number;
700
+ event: never;
701
+ }) => void) => void;
702
+ useHistory: () => History;
703
+ useUndo: () => () => void;
704
+ useRedo: () => () => void;
705
+ useCanUndo: () => boolean;
706
+ useCanRedo: () => boolean;
707
+ useStorageRoot: () => [root: LiveObject<LsonObject> | null];
708
+ useMyPresence: () => [JsonObject, (patch: Partial<JsonObject>, options?: {
709
+ addToHistory: boolean;
710
+ } | undefined) => void];
711
+ useUpdateMyPresence: () => (patch: Partial<JsonObject>, options?: {
712
+ addToHistory: boolean;
713
+ } | undefined) => void;
714
+ useMutation: <F extends (context: MutationContext<JsonObject, LsonObject, BaseUserMeta>, ...args: any[]) => any>(callback: F, deps: readonly unknown[]) => OmitFirstArg<F>;
715
+ useOthers: {
716
+ (): Others<JsonObject, BaseUserMeta>;
717
+ <T_1>(selector: (others: Others<JsonObject, BaseUserMeta>) => T_1, isEqual?: ((prev: T_1, curr: T_1) => boolean) | undefined): T_1;
718
+ };
719
+ useOthersConnectionIds: () => readonly number[];
720
+ useOthersMapped: <T_2>(itemSelector: (other: User<JsonObject, BaseUserMeta>) => T_2, itemIsEqual?: ((prev: T_2, curr: T_2) => boolean) | undefined) => readonly (readonly [connectionId: number, data: T_2])[];
721
+ useOther: <T_3>(connectionId: number, selector: (other: User<JsonObject, BaseUserMeta>) => T_3, isEqual?: ((prev: T_3, curr: T_3) => boolean) | undefined) => T_3;
722
+ useCreateThread: () => (options: {
723
+ body: _liveblocks_core.CommentBody;
724
+ metadata: BaseMetadata;
725
+ }) => _liveblocks_core.ThreadData<BaseMetadata>;
726
+ useEditThreadMetadata: () => (options: {
727
+ threadId: string;
728
+ metadata: Partial<BaseMetadata>;
729
+ }) => void;
730
+ useCreateComment: () => (options: CreateCommentOptions) => CommentData;
731
+ useEditComment: () => (options: EditCommentOptions) => void;
732
+ useDeleteComment: () => (options: DeleteCommentOptions) => void;
733
+ useStorage: <T_4>(selector: (root: {
734
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
735
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
736
+ })[] | {
737
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
738
+ })[] | {
739
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
740
+ })[] | {
741
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
742
+ })[] | {
743
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
744
+ })[] | {
745
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
746
+ })[] | {
747
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
748
+ })[] | {
749
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
750
+ })[] | {
751
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
752
+ })[] | {
753
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
754
+ })[] | {
755
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
756
+ })[] | {
757
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
758
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
759
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
760
+ })[] | {
761
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
762
+ })[] | {
763
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
764
+ })[] | {
765
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
766
+ })[] | {
767
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
768
+ })[] | {
769
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
770
+ })[] | {
771
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
772
+ })[] | {
773
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
774
+ })[] | {
775
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
776
+ })[] | {
777
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
778
+ })[] | {
779
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
780
+ })[] | {
781
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
782
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
783
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
784
+ })[] | {
785
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
786
+ })[] | {
787
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
788
+ })[] | {
789
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
790
+ })[] | {
791
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
792
+ })[] | {
793
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
794
+ })[] | {
795
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
796
+ })[] | {
797
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
798
+ })[] | {
799
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
800
+ })[] | {
801
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
802
+ })[] | {
803
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
804
+ })[] | {
805
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
806
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
807
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
808
+ })[] | {
809
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
810
+ })[] | {
811
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
812
+ })[] | {
813
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
814
+ })[] | {
815
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
816
+ })[] | {
817
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
818
+ })[] | {
819
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
820
+ })[] | {
821
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
822
+ })[] | {
823
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
824
+ })[] | {
825
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
826
+ })[] | {
827
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
828
+ })[] | {
829
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
830
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
831
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
832
+ })[] | {
833
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
834
+ })[] | {
835
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
836
+ })[] | {
837
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
838
+ })[] | {
839
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
840
+ })[] | {
841
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
842
+ })[] | {
843
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
844
+ })[] | {
845
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
846
+ })[] | {
847
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
848
+ })[] | {
849
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
850
+ })[] | {
851
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
852
+ })[] | {
853
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
854
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
855
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
856
+ })[] | {
857
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
858
+ })[] | {
859
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
860
+ })[] | {
861
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
862
+ })[] | {
863
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
864
+ })[] | {
865
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
866
+ })[] | {
867
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
868
+ })[] | {
869
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
870
+ })[] | {
871
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
872
+ })[] | {
873
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
874
+ })[] | {
875
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
876
+ })[] | {
877
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
878
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
879
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
880
+ })[] | {
881
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
882
+ })[] | {
883
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
884
+ })[] | {
885
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
886
+ })[] | {
887
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
888
+ })[] | {
889
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
890
+ })[] | {
891
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
892
+ })[] | {
893
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
894
+ })[] | {
895
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
896
+ })[] | {
897
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
898
+ })[] | {
899
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
900
+ })[] | {
901
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
902
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
903
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
904
+ })[] | {
905
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
906
+ })[] | {
907
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
908
+ })[] | {
909
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
910
+ })[] | {
911
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
912
+ })[] | {
913
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
914
+ })[] | {
915
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
916
+ })[] | {
917
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
918
+ })[] | {
919
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
920
+ })[] | {
921
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
922
+ })[] | {
923
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
924
+ })[] | {
925
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
926
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
927
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
928
+ })[] | {
929
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
930
+ })[] | {
931
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
932
+ })[] | {
933
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
934
+ })[] | {
935
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
936
+ })[] | {
937
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
938
+ })[] | {
939
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
940
+ })[] | {
941
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
942
+ })[] | {
943
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
944
+ })[] | {
945
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
946
+ })[] | {
947
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
948
+ })[] | {
949
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
950
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
951
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
952
+ })[] | {
953
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
954
+ })[] | {
955
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
956
+ })[] | {
957
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
958
+ })[] | {
959
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
960
+ })[] | {
961
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
962
+ })[] | {
963
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
964
+ })[] | {
965
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
966
+ })[] | {
967
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
968
+ })[] | {
969
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
970
+ })[] | {
971
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
972
+ })[] | {
973
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
974
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
975
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
976
+ })[] | {
977
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
978
+ })[] | {
979
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
980
+ })[] | {
981
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
982
+ })[] | {
983
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
984
+ })[] | {
985
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
986
+ })[] | {
987
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
988
+ })[] | {
989
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
990
+ })[] | {
991
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
992
+ })[] | {
993
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
994
+ })[] | {
995
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
996
+ })[] | {
997
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
998
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
999
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1000
+ })[] | {
1001
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1002
+ })[] | {
1003
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1004
+ })[] | {
1005
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1006
+ })[] | {
1007
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1008
+ })[] | {
1009
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1010
+ })[] | {
1011
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1012
+ })[] | {
1013
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1014
+ })[] | {
1015
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1016
+ })[] | {
1017
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1018
+ })[] | {
1019
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1020
+ })[] | {
1021
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1022
+ } | undefined;
1023
+ }) => T_4, isEqual?: ((prev: T_4 | null, curr: T_4 | null) => boolean) | undefined) => T_4 | null;
1024
+ useSelf: {
1025
+ (): User<JsonObject, BaseUserMeta> | null;
1026
+ <T_5>(selector: (me: User<JsonObject, BaseUserMeta>) => T_5, isEqual?: ((prev: T_5, curr: T_5) => boolean) | undefined): T_5 | null;
1027
+ };
1028
+ useThreads: () => RoomThreads<BaseMetadata>;
1029
+ useUser: (userId: string) => UserState<{
1030
+ [key: string]: Json | undefined;
1031
+ name?: string | undefined;
1032
+ avatar?: string | undefined;
1033
+ } | undefined>;
1034
+ useMentionSuggestions: (search?: string | undefined) => string[] | undefined;
1035
+ useList: <TKey extends string>(key: TKey) => _liveblocks_core.Lson | undefined;
1036
+ useMap: <TKey_1 extends string>(key: TKey_1) => _liveblocks_core.Lson | undefined;
1037
+ useObject: <TKey_2 extends string>(key: TKey_2) => _liveblocks_core.Lson | undefined;
1038
+ suspense: {
1039
+ RoomContext: React$1.Context<Room<JsonObject, LsonObject, BaseUserMeta, never> | null>;
1040
+ RoomProvider: (props: {
1041
+ id: string;
1042
+ children: React$1.ReactNode;
1043
+ shouldInitiallyConnect?: boolean | undefined;
1044
+ unstable_batchedUpdates?: ((cb: () => void) => void) | undefined;
1045
+ initialPresence: JsonObject | ((roomId: string) => JsonObject);
1046
+ initialStorage?: LsonObject | ((roomId: string) => LsonObject) | undefined;
1047
+ }) => JSX.Element;
1048
+ useRoom: () => Room<JsonObject, LsonObject, BaseUserMeta, never>;
1049
+ useStatus: () => Status;
1050
+ useBatch: <T>() => (callback: () => T) => T;
1051
+ useBroadcastEvent: () => (event: never, options?: BroadcastOptions | undefined) => void;
1052
+ useLostConnectionListener: (callback: (event: LostConnectionEvent) => void) => void;
1053
+ useErrorListener: (callback: (err: Error) => void) => void;
1054
+ useEventListener: (callback: (eventData: {
1055
+ connectionId: number;
1056
+ event: never;
1057
+ }) => void) => void;
1058
+ useHistory: () => History;
1059
+ useUndo: () => () => void;
1060
+ useRedo: () => () => void;
1061
+ useCanUndo: () => boolean;
1062
+ useCanRedo: () => boolean;
1063
+ useStorageRoot: () => [root: LiveObject<LsonObject> | null];
1064
+ useMyPresence: () => [JsonObject, (patch: Partial<JsonObject>, options?: {
1065
+ addToHistory: boolean;
1066
+ } | undefined) => void];
1067
+ useUpdateMyPresence: () => (patch: Partial<JsonObject>, options?: {
1068
+ addToHistory: boolean;
1069
+ } | undefined) => void;
1070
+ useMutation: <F extends (context: MutationContext<JsonObject, LsonObject, BaseUserMeta>, ...args: any[]) => any>(callback: F, deps: readonly unknown[]) => OmitFirstArg<F>;
1071
+ useOthers: {
1072
+ (): Others<JsonObject, BaseUserMeta>;
1073
+ <T_1>(selector: (others: Others<JsonObject, BaseUserMeta>) => T_1, isEqual?: ((prev: T_1, curr: T_1) => boolean) | undefined): T_1;
1074
+ };
1075
+ useOthersConnectionIds: () => readonly number[];
1076
+ useOthersMapped: <T_2>(itemSelector: (other: User<JsonObject, BaseUserMeta>) => T_2, itemIsEqual?: ((prev: T_2, curr: T_2) => boolean) | undefined) => readonly (readonly [connectionId: number, data: T_2])[];
1077
+ useOther: <T_3>(connectionId: number, selector: (other: User<JsonObject, BaseUserMeta>) => T_3, isEqual?: ((prev: T_3, curr: T_3) => boolean) | undefined) => T_3;
1078
+ useCreateThread: () => (options: {
1079
+ body: _liveblocks_core.CommentBody;
1080
+ metadata: BaseMetadata;
1081
+ }) => _liveblocks_core.ThreadData<BaseMetadata>;
1082
+ useEditThreadMetadata: () => (options: {
1083
+ threadId: string;
1084
+ metadata: Partial<BaseMetadata>;
1085
+ }) => void;
1086
+ useCreateComment: () => (options: CreateCommentOptions) => CommentData;
1087
+ useEditComment: () => (options: EditCommentOptions) => void;
1088
+ useDeleteComment: () => (options: DeleteCommentOptions) => void;
1089
+ useStorage: <T_6>(selector: (root: {
1090
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | ReadonlyMap<string, _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1091
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1092
+ })[] | {
1093
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1094
+ })[] | {
1095
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1096
+ })[] | {
1097
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1098
+ })[] | {
1099
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1100
+ })[] | {
1101
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1102
+ })[] | {
1103
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1104
+ })[] | {
1105
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1106
+ })[] | {
1107
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1108
+ })[] | {
1109
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1110
+ })[] | {
1111
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1112
+ })[] | {
1113
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1114
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1115
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1116
+ })[] | {
1117
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1118
+ })[] | {
1119
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1120
+ })[] | {
1121
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1122
+ })[] | {
1123
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1124
+ })[] | {
1125
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1126
+ })[] | {
1127
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1128
+ })[] | {
1129
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1130
+ })[] | {
1131
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1132
+ })[] | {
1133
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1134
+ })[] | {
1135
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1136
+ })[] | {
1137
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1138
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1139
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1140
+ })[] | {
1141
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1142
+ })[] | {
1143
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1144
+ })[] | {
1145
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1146
+ })[] | {
1147
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1148
+ })[] | {
1149
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1150
+ })[] | {
1151
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1152
+ })[] | {
1153
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1154
+ })[] | {
1155
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1156
+ })[] | {
1157
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1158
+ })[] | {
1159
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1160
+ })[] | {
1161
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1162
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1163
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1164
+ })[] | {
1165
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1166
+ })[] | {
1167
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1168
+ })[] | {
1169
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1170
+ })[] | {
1171
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1172
+ })[] | {
1173
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1174
+ })[] | {
1175
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1176
+ })[] | {
1177
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1178
+ })[] | {
1179
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1180
+ })[] | {
1181
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1182
+ })[] | {
1183
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1184
+ })[] | {
1185
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1186
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1187
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1188
+ })[] | {
1189
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1190
+ })[] | {
1191
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1192
+ })[] | {
1193
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1194
+ })[] | {
1195
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1196
+ })[] | {
1197
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1198
+ })[] | {
1199
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1200
+ })[] | {
1201
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1202
+ })[] | {
1203
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1204
+ })[] | {
1205
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1206
+ })[] | {
1207
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1208
+ })[] | {
1209
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1210
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1211
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1212
+ })[] | {
1213
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1214
+ })[] | {
1215
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1216
+ })[] | {
1217
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1218
+ })[] | {
1219
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1220
+ })[] | {
1221
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1222
+ })[] | {
1223
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1224
+ })[] | {
1225
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1226
+ })[] | {
1227
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1228
+ })[] | {
1229
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1230
+ })[] | {
1231
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1232
+ })[] | {
1233
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1234
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1235
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1236
+ })[] | {
1237
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1238
+ })[] | {
1239
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1240
+ })[] | {
1241
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1242
+ })[] | {
1243
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1244
+ })[] | {
1245
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1246
+ })[] | {
1247
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1248
+ })[] | {
1249
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1250
+ })[] | {
1251
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1252
+ })[] | {
1253
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1254
+ })[] | {
1255
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1256
+ })[] | {
1257
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1258
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1259
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1260
+ })[] | {
1261
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1262
+ })[] | {
1263
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1264
+ })[] | {
1265
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1266
+ })[] | {
1267
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1268
+ })[] | {
1269
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1270
+ })[] | {
1271
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1272
+ })[] | {
1273
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1274
+ })[] | {
1275
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1276
+ })[] | {
1277
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1278
+ })[] | {
1279
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1280
+ })[] | {
1281
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1282
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1283
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1284
+ })[] | {
1285
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1286
+ })[] | {
1287
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1288
+ })[] | {
1289
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1290
+ })[] | {
1291
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1292
+ })[] | {
1293
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1294
+ })[] | {
1295
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1296
+ })[] | {
1297
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1298
+ })[] | {
1299
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1300
+ })[] | {
1301
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1302
+ })[] | {
1303
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1304
+ })[] | {
1305
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1306
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1307
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1308
+ })[] | {
1309
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1310
+ })[] | {
1311
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1312
+ })[] | {
1313
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1314
+ })[] | {
1315
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1316
+ })[] | {
1317
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1318
+ })[] | {
1319
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1320
+ })[] | {
1321
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1322
+ })[] | {
1323
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1324
+ })[] | {
1325
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1326
+ })[] | {
1327
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1328
+ })[] | {
1329
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1330
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1331
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1332
+ })[] | {
1333
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1334
+ })[] | {
1335
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1336
+ })[] | {
1337
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1338
+ })[] | {
1339
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1340
+ })[] | {
1341
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1342
+ })[] | {
1343
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1344
+ })[] | {
1345
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1346
+ })[] | {
1347
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1348
+ })[] | {
1349
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1350
+ })[] | {
1351
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1352
+ })[] | {
1353
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1354
+ }> | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | readonly (_liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | any | any | {
1355
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1356
+ })[] | {
1357
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1358
+ })[] | {
1359
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1360
+ })[] | {
1361
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1362
+ })[] | {
1363
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1364
+ })[] | {
1365
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1366
+ })[] | {
1367
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1368
+ })[] | {
1369
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1370
+ })[] | {
1371
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1372
+ })[] | {
1373
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1374
+ })[] | {
1375
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1376
+ })[] | {
1377
+ readonly [x: string]: _liveblocks_core.JsonScalar | _liveblocks_core.JsonArray | any | undefined;
1378
+ } | undefined;
1379
+ }) => T_6, isEqual?: ((prev: T_6, curr: T_6) => boolean) | undefined) => T_6;
1380
+ useSelf: {
1381
+ (): User<JsonObject, BaseUserMeta>;
1382
+ <T_7>(selector: (me: User<JsonObject, BaseUserMeta>) => T_7, isEqual?: ((prev: T_7, curr: T_7) => boolean) | undefined): T_7;
1383
+ };
1384
+ useThreads: () => _liveblocks_core.ThreadData<BaseMetadata>[];
1385
+ useUser: (userId: string) => {
1386
+ user?: {
1387
+ [key: string]: Json | undefined;
1388
+ name?: string | undefined;
1389
+ avatar?: string | undefined;
1390
+ } | undefined;
1391
+ isLoading: false;
1392
+ error?: undefined;
1393
+ };
1394
+ useList: <TKey_3 extends string>(key: TKey_3) => _liveblocks_core.Lson | undefined;
1395
+ useMap: <TKey_4 extends string>(key: TKey_4) => _liveblocks_core.Lson | undefined;
1396
+ useObject: <TKey_5 extends string>(key: TKey_5) => _liveblocks_core.Lson | undefined;
810
1397
  };
811
1398
  };
1399
+ declare function createRoomContext<TPresence extends JsonObject, TStorage extends LsonObject = LsonObject, TUserMeta extends BaseUserMeta = BaseUserMeta, TRoomEvent extends Json = never, TThreadMetadata extends BaseMetadata = never>(client: Client, options?: Options<TUserMeta>): RoomContextBundle<TPresence, TStorage, TUserMeta, TRoomEvent, TThreadMetadata>;
812
1400
 
813
- declare function createRoomContext<TPresence extends JsonObject, TStorage extends LsonObject = LsonObject, TUserMeta extends BaseUserMeta = BaseUserMeta, TRoomEvent extends Json = never>(client: Client): RoomContextBundle<TPresence, TStorage, TUserMeta, TRoomEvent>;
814
-
815
- export { ClientSideSuspense, MutationContext, createRoomContext };
1401
+ export { ClientSideSuspense, MutationContext, createRoomContext, useRoomContextBundle };