@liveblocks/core 3.16.0-flow1 → 3.16.0-flow2
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.cjs +863 -651
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +102 -7
- package/dist/index.d.ts +102 -7
- package/dist/index.js +810 -598
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -595,6 +595,52 @@ type PlainLsonList = {
|
|
|
595
595
|
};
|
|
596
596
|
type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | Json;
|
|
597
597
|
|
|
598
|
+
declare function lsonToJson(value: Lson): Json;
|
|
599
|
+
/**
|
|
600
|
+
* Per-key sync configuration for node/edge `data` properties.
|
|
601
|
+
*
|
|
602
|
+
* true
|
|
603
|
+
* Sync this property to Liveblocks Storage. Arrays and objects in the value
|
|
604
|
+
* will be stored as LiveLists and LiveObjects, enabling fine-grained
|
|
605
|
+
* conflict-free merging. This is the default for all keys.
|
|
606
|
+
*
|
|
607
|
+
* false
|
|
608
|
+
* Don't sync this property. It stays local to the current client. This
|
|
609
|
+
* property will be `undefined` on other clients.
|
|
610
|
+
*
|
|
611
|
+
* "atomic"
|
|
612
|
+
* Sync this property, but treat it as an indivisible value. The entire value
|
|
613
|
+
* is replaced as a whole (last-writer-wins) instead of being recursively
|
|
614
|
+
* converted to LiveObjects/LiveLists. Use this when clients always replace
|
|
615
|
+
* the value entirely and never need concurrent sub-key merging.
|
|
616
|
+
*
|
|
617
|
+
* { ... }
|
|
618
|
+
* A nested config object for recursively configuring sub-keys of an object.
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* ```ts
|
|
622
|
+
* const sync: SyncConfig = {
|
|
623
|
+
* label: true, // sync (default)
|
|
624
|
+
* createdAt: false, // local-only
|
|
625
|
+
* shape: "atomic", // replaced as a whole, no deep merge
|
|
626
|
+
* nested: { // recursive config
|
|
627
|
+
* deep: false,
|
|
628
|
+
* },
|
|
629
|
+
* };
|
|
630
|
+
* ```
|
|
631
|
+
*/
|
|
632
|
+
type SyncMode = boolean | "atomic" | SyncConfig;
|
|
633
|
+
type SyncConfig = {
|
|
634
|
+
[key: string]: SyncMode | undefined;
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Recursively converts all nested plain objects to LiveObjects and all nested
|
|
638
|
+
* arrays to LiveLists. Expects a plain object at the top level.
|
|
639
|
+
*/
|
|
640
|
+
declare function deepLiveifyObject(obj: JsonObject, config?: SyncConfig): LiveObject<LsonObject>;
|
|
641
|
+
declare function legacy_patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
|
|
642
|
+
declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
|
|
643
|
+
|
|
598
644
|
type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
|
|
599
645
|
declare const CrdtType: Readonly<{
|
|
600
646
|
OBJECT: 0;
|
|
@@ -684,6 +730,23 @@ type CompactRegisterNode = readonly [
|
|
|
684
730
|
declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
|
|
685
731
|
declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
|
|
686
732
|
|
|
733
|
+
/**
|
|
734
|
+
* Extracts only the explicitly-named string keys of a type, filtering out
|
|
735
|
+
* any index signature (e.g. `[key: string]: ...`).
|
|
736
|
+
*/
|
|
737
|
+
type KnownKeys<T> = keyof {
|
|
738
|
+
[K in keyof T as {} extends Record<K, 1> ? never : K]: true;
|
|
739
|
+
} & string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Optional keys of O whose non-undefined type is plain Json (not a
|
|
743
|
+
* LiveStructure). These are the only keys eligible for setLocal().
|
|
744
|
+
* Uses KnownKeys to only consider explicitly-named keys, not index signatures.
|
|
745
|
+
* Checks optionality inline to avoid index signature pollution of OptionalKeys.
|
|
746
|
+
*/
|
|
747
|
+
type OptionalJsonKeys<O> = {
|
|
748
|
+
[K in KnownKeys<O>]: undefined extends O[K] ? Exclude<O[K], undefined> extends Json ? K : never : never;
|
|
749
|
+
}[KnownKeys<O>];
|
|
687
750
|
type LiveObjectUpdateDelta<O extends {
|
|
688
751
|
[key: string]: unknown;
|
|
689
752
|
}> = {
|
|
@@ -718,6 +781,8 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
718
781
|
/** @private Do not use this API directly */
|
|
719
782
|
static _fromItems<O extends LsonObject>(nodes: NodeStream, pool: ManagedPool): LiveObject<O>;
|
|
720
783
|
constructor(obj?: O);
|
|
784
|
+
/** @private */
|
|
785
|
+
keys(): Set<string>;
|
|
721
786
|
/**
|
|
722
787
|
* Transform the LiveObject into a javascript object
|
|
723
788
|
*/
|
|
@@ -728,6 +793,17 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
728
793
|
* @param value The value of the property to add
|
|
729
794
|
*/
|
|
730
795
|
set<TKey extends keyof O>(key: TKey, value: O[TKey]): void;
|
|
796
|
+
/**
|
|
797
|
+
* @experimental
|
|
798
|
+
*
|
|
799
|
+
* Sets a local-only property that is not synchronized over the wire.
|
|
800
|
+
* The value will be visible via get(), toObject(), and toImmutable() on
|
|
801
|
+
* this client only. Other clients and the server will see `undefined`
|
|
802
|
+
* for this key.
|
|
803
|
+
*
|
|
804
|
+
* Caveat: this method will not add changes to the undo/redo stack.
|
|
805
|
+
*/
|
|
806
|
+
setLocal<TKey extends OptionalJsonKeys<O>>(key: TKey, value: Extract<Exclude<O[TKey], undefined>, Json>): void;
|
|
731
807
|
/**
|
|
732
808
|
* Returns a specified property from the LiveObject.
|
|
733
809
|
* @param key The key of the property to get
|
|
@@ -743,6 +819,12 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
743
819
|
* @param patch The object used to overrides properties
|
|
744
820
|
*/
|
|
745
821
|
update(patch: Partial<O>): void;
|
|
822
|
+
/**
|
|
823
|
+
* Reconciles a LiveObject tree to match the given JSON object and sync
|
|
824
|
+
* config. Only mutates keys that actually changed. Recursively reconciles
|
|
825
|
+
* the entire Live tree below it.
|
|
826
|
+
*/
|
|
827
|
+
reconcile(jsonObj: JsonObject, config?: SyncConfig): void;
|
|
746
828
|
toImmutable(): ToImmutable<O>;
|
|
747
829
|
clone(): LiveObject<O>;
|
|
748
830
|
}
|
|
@@ -908,6 +990,12 @@ declare function createManagedPool(roomId: string, options: CreateManagedPoolOpt
|
|
|
908
990
|
declare abstract class AbstractCrdt {
|
|
909
991
|
#private;
|
|
910
992
|
get roomId(): string | null;
|
|
993
|
+
/**
|
|
994
|
+
* @private
|
|
995
|
+
* Returns true if the cached immutable snapshot exists and is
|
|
996
|
+
* reference-equal to the given value. Does not trigger a recompute.
|
|
997
|
+
*/
|
|
998
|
+
immutableIs(value: unknown): boolean;
|
|
911
999
|
/**
|
|
912
1000
|
* Return an immutable snapshot of this Live node and its children.
|
|
913
1001
|
*/
|
|
@@ -1601,12 +1689,20 @@ declare enum TextEditorType {
|
|
|
1601
1689
|
}
|
|
1602
1690
|
type BadgeLocation = "top-right" | "bottom-right" | "bottom-left" | "top-left";
|
|
1603
1691
|
|
|
1604
|
-
|
|
1692
|
+
/**
|
|
1693
|
+
* Extracts the optional keys (whose values are allowed to be `undefined`).
|
|
1694
|
+
*/
|
|
1695
|
+
type OptionalKeys<T> = Extract<{
|
|
1605
1696
|
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1606
|
-
}[keyof T]
|
|
1697
|
+
}[keyof T], string>;
|
|
1607
1698
|
type MakeOptionalFieldsNullable<T> = {
|
|
1608
1699
|
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1609
1700
|
};
|
|
1701
|
+
/**
|
|
1702
|
+
* Like Partial<T>, but also allows `null` for optional fields. Useful for
|
|
1703
|
+
* representing patches where `null` means "remove this field" and `undefined`
|
|
1704
|
+
* means "leave this field unchanged".
|
|
1705
|
+
*/
|
|
1610
1706
|
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1611
1707
|
|
|
1612
1708
|
interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
|
|
@@ -3087,6 +3183,9 @@ interface History {
|
|
|
3087
3183
|
* // room.getPresence() equals { cursor: { x: 0, y: 0 } }
|
|
3088
3184
|
*/
|
|
3089
3185
|
resume: () => void;
|
|
3186
|
+
readonly [kInternal]: {
|
|
3187
|
+
withoutHistory: <T>(fn: () => T) => T;
|
|
3188
|
+
};
|
|
3090
3189
|
}
|
|
3091
3190
|
type HistoryEvent = {
|
|
3092
3191
|
canUndo: boolean;
|
|
@@ -4627,10 +4726,6 @@ ChildStorageNode[]>;
|
|
|
4627
4726
|
declare function isLiveNode(value: unknown): value is LiveNode;
|
|
4628
4727
|
declare function cloneLson<L extends Lson | undefined>(value: L): L;
|
|
4629
4728
|
|
|
4630
|
-
declare function lsonToJson(value: Lson): Json;
|
|
4631
|
-
declare function patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
|
|
4632
|
-
declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
|
|
4633
|
-
|
|
4634
4729
|
/**
|
|
4635
4730
|
* Like `new AbortController()`, but where the result can be unpacked
|
|
4636
4731
|
* safely, i.e. `const { signal, abort } = makeAbortController()`.
|
|
@@ -5320,4 +5415,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
|
|
|
5320
5415
|
[K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
|
|
5321
5416
|
};
|
|
5322
5417
|
|
|
5323
|
-
export { type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RegisterStorageNode, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactNodesToNodeStream, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery,
|
|
5418
|
+
export { type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RegisterStorageNode, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncConfig, type SyncMode, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactNodesToNodeStream, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, deepLiveifyObject, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, legacy_patchLiveObjectKey, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
|
package/dist/index.d.ts
CHANGED
|
@@ -595,6 +595,52 @@ type PlainLsonList = {
|
|
|
595
595
|
};
|
|
596
596
|
type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | Json;
|
|
597
597
|
|
|
598
|
+
declare function lsonToJson(value: Lson): Json;
|
|
599
|
+
/**
|
|
600
|
+
* Per-key sync configuration for node/edge `data` properties.
|
|
601
|
+
*
|
|
602
|
+
* true
|
|
603
|
+
* Sync this property to Liveblocks Storage. Arrays and objects in the value
|
|
604
|
+
* will be stored as LiveLists and LiveObjects, enabling fine-grained
|
|
605
|
+
* conflict-free merging. This is the default for all keys.
|
|
606
|
+
*
|
|
607
|
+
* false
|
|
608
|
+
* Don't sync this property. It stays local to the current client. This
|
|
609
|
+
* property will be `undefined` on other clients.
|
|
610
|
+
*
|
|
611
|
+
* "atomic"
|
|
612
|
+
* Sync this property, but treat it as an indivisible value. The entire value
|
|
613
|
+
* is replaced as a whole (last-writer-wins) instead of being recursively
|
|
614
|
+
* converted to LiveObjects/LiveLists. Use this when clients always replace
|
|
615
|
+
* the value entirely and never need concurrent sub-key merging.
|
|
616
|
+
*
|
|
617
|
+
* { ... }
|
|
618
|
+
* A nested config object for recursively configuring sub-keys of an object.
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* ```ts
|
|
622
|
+
* const sync: SyncConfig = {
|
|
623
|
+
* label: true, // sync (default)
|
|
624
|
+
* createdAt: false, // local-only
|
|
625
|
+
* shape: "atomic", // replaced as a whole, no deep merge
|
|
626
|
+
* nested: { // recursive config
|
|
627
|
+
* deep: false,
|
|
628
|
+
* },
|
|
629
|
+
* };
|
|
630
|
+
* ```
|
|
631
|
+
*/
|
|
632
|
+
type SyncMode = boolean | "atomic" | SyncConfig;
|
|
633
|
+
type SyncConfig = {
|
|
634
|
+
[key: string]: SyncMode | undefined;
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Recursively converts all nested plain objects to LiveObjects and all nested
|
|
638
|
+
* arrays to LiveLists. Expects a plain object at the top level.
|
|
639
|
+
*/
|
|
640
|
+
declare function deepLiveifyObject(obj: JsonObject, config?: SyncConfig): LiveObject<LsonObject>;
|
|
641
|
+
declare function legacy_patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
|
|
642
|
+
declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
|
|
643
|
+
|
|
598
644
|
type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
|
|
599
645
|
declare const CrdtType: Readonly<{
|
|
600
646
|
OBJECT: 0;
|
|
@@ -684,6 +730,23 @@ type CompactRegisterNode = readonly [
|
|
|
684
730
|
declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
|
|
685
731
|
declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
|
|
686
732
|
|
|
733
|
+
/**
|
|
734
|
+
* Extracts only the explicitly-named string keys of a type, filtering out
|
|
735
|
+
* any index signature (e.g. `[key: string]: ...`).
|
|
736
|
+
*/
|
|
737
|
+
type KnownKeys<T> = keyof {
|
|
738
|
+
[K in keyof T as {} extends Record<K, 1> ? never : K]: true;
|
|
739
|
+
} & string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Optional keys of O whose non-undefined type is plain Json (not a
|
|
743
|
+
* LiveStructure). These are the only keys eligible for setLocal().
|
|
744
|
+
* Uses KnownKeys to only consider explicitly-named keys, not index signatures.
|
|
745
|
+
* Checks optionality inline to avoid index signature pollution of OptionalKeys.
|
|
746
|
+
*/
|
|
747
|
+
type OptionalJsonKeys<O> = {
|
|
748
|
+
[K in KnownKeys<O>]: undefined extends O[K] ? Exclude<O[K], undefined> extends Json ? K : never : never;
|
|
749
|
+
}[KnownKeys<O>];
|
|
687
750
|
type LiveObjectUpdateDelta<O extends {
|
|
688
751
|
[key: string]: unknown;
|
|
689
752
|
}> = {
|
|
@@ -718,6 +781,8 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
718
781
|
/** @private Do not use this API directly */
|
|
719
782
|
static _fromItems<O extends LsonObject>(nodes: NodeStream, pool: ManagedPool): LiveObject<O>;
|
|
720
783
|
constructor(obj?: O);
|
|
784
|
+
/** @private */
|
|
785
|
+
keys(): Set<string>;
|
|
721
786
|
/**
|
|
722
787
|
* Transform the LiveObject into a javascript object
|
|
723
788
|
*/
|
|
@@ -728,6 +793,17 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
728
793
|
* @param value The value of the property to add
|
|
729
794
|
*/
|
|
730
795
|
set<TKey extends keyof O>(key: TKey, value: O[TKey]): void;
|
|
796
|
+
/**
|
|
797
|
+
* @experimental
|
|
798
|
+
*
|
|
799
|
+
* Sets a local-only property that is not synchronized over the wire.
|
|
800
|
+
* The value will be visible via get(), toObject(), and toImmutable() on
|
|
801
|
+
* this client only. Other clients and the server will see `undefined`
|
|
802
|
+
* for this key.
|
|
803
|
+
*
|
|
804
|
+
* Caveat: this method will not add changes to the undo/redo stack.
|
|
805
|
+
*/
|
|
806
|
+
setLocal<TKey extends OptionalJsonKeys<O>>(key: TKey, value: Extract<Exclude<O[TKey], undefined>, Json>): void;
|
|
731
807
|
/**
|
|
732
808
|
* Returns a specified property from the LiveObject.
|
|
733
809
|
* @param key The key of the property to get
|
|
@@ -743,6 +819,12 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
743
819
|
* @param patch The object used to overrides properties
|
|
744
820
|
*/
|
|
745
821
|
update(patch: Partial<O>): void;
|
|
822
|
+
/**
|
|
823
|
+
* Reconciles a LiveObject tree to match the given JSON object and sync
|
|
824
|
+
* config. Only mutates keys that actually changed. Recursively reconciles
|
|
825
|
+
* the entire Live tree below it.
|
|
826
|
+
*/
|
|
827
|
+
reconcile(jsonObj: JsonObject, config?: SyncConfig): void;
|
|
746
828
|
toImmutable(): ToImmutable<O>;
|
|
747
829
|
clone(): LiveObject<O>;
|
|
748
830
|
}
|
|
@@ -908,6 +990,12 @@ declare function createManagedPool(roomId: string, options: CreateManagedPoolOpt
|
|
|
908
990
|
declare abstract class AbstractCrdt {
|
|
909
991
|
#private;
|
|
910
992
|
get roomId(): string | null;
|
|
993
|
+
/**
|
|
994
|
+
* @private
|
|
995
|
+
* Returns true if the cached immutable snapshot exists and is
|
|
996
|
+
* reference-equal to the given value. Does not trigger a recompute.
|
|
997
|
+
*/
|
|
998
|
+
immutableIs(value: unknown): boolean;
|
|
911
999
|
/**
|
|
912
1000
|
* Return an immutable snapshot of this Live node and its children.
|
|
913
1001
|
*/
|
|
@@ -1601,12 +1689,20 @@ declare enum TextEditorType {
|
|
|
1601
1689
|
}
|
|
1602
1690
|
type BadgeLocation = "top-right" | "bottom-right" | "bottom-left" | "top-left";
|
|
1603
1691
|
|
|
1604
|
-
|
|
1692
|
+
/**
|
|
1693
|
+
* Extracts the optional keys (whose values are allowed to be `undefined`).
|
|
1694
|
+
*/
|
|
1695
|
+
type OptionalKeys<T> = Extract<{
|
|
1605
1696
|
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1606
|
-
}[keyof T]
|
|
1697
|
+
}[keyof T], string>;
|
|
1607
1698
|
type MakeOptionalFieldsNullable<T> = {
|
|
1608
1699
|
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1609
1700
|
};
|
|
1701
|
+
/**
|
|
1702
|
+
* Like Partial<T>, but also allows `null` for optional fields. Useful for
|
|
1703
|
+
* representing patches where `null` means "remove this field" and `undefined`
|
|
1704
|
+
* means "leave this field unchanged".
|
|
1705
|
+
*/
|
|
1610
1706
|
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1611
1707
|
|
|
1612
1708
|
interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
|
|
@@ -3087,6 +3183,9 @@ interface History {
|
|
|
3087
3183
|
* // room.getPresence() equals { cursor: { x: 0, y: 0 } }
|
|
3088
3184
|
*/
|
|
3089
3185
|
resume: () => void;
|
|
3186
|
+
readonly [kInternal]: {
|
|
3187
|
+
withoutHistory: <T>(fn: () => T) => T;
|
|
3188
|
+
};
|
|
3090
3189
|
}
|
|
3091
3190
|
type HistoryEvent = {
|
|
3092
3191
|
canUndo: boolean;
|
|
@@ -4627,10 +4726,6 @@ ChildStorageNode[]>;
|
|
|
4627
4726
|
declare function isLiveNode(value: unknown): value is LiveNode;
|
|
4628
4727
|
declare function cloneLson<L extends Lson | undefined>(value: L): L;
|
|
4629
4728
|
|
|
4630
|
-
declare function lsonToJson(value: Lson): Json;
|
|
4631
|
-
declare function patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
|
|
4632
|
-
declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
|
|
4633
|
-
|
|
4634
4729
|
/**
|
|
4635
4730
|
* Like `new AbortController()`, but where the result can be unpacked
|
|
4636
4731
|
* safely, i.e. `const { signal, abort } = makeAbortController()`.
|
|
@@ -5320,4 +5415,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
|
|
|
5320
5415
|
[K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
|
|
5321
5416
|
};
|
|
5322
5417
|
|
|
5323
|
-
export { type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RegisterStorageNode, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactNodesToNodeStream, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery,
|
|
5418
|
+
export { type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RegisterStorageNode, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncConfig, type SyncMode, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactNodesToNodeStream, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, deepLiveifyObject, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, legacy_patchLiveObjectKey, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
|