@liveblocks/react 1.2.2-comments3 → 1.2.2-comments4

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