@liveblocks/core 3.19.2 → 3.19.4-test1
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 +742 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +122 -10
- package/dist/index.d.ts +122 -10
- package/dist/index.js +672 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -427,6 +427,8 @@ declare const OpCode: Readonly<{
|
|
|
427
427
|
DELETE_OBJECT_KEY: 6;
|
|
428
428
|
CREATE_MAP: 7;
|
|
429
429
|
CREATE_REGISTER: 8;
|
|
430
|
+
CREATE_TEXT: 9;
|
|
431
|
+
UPDATE_TEXT: 10;
|
|
430
432
|
}>;
|
|
431
433
|
declare namespace OpCode {
|
|
432
434
|
type INIT = typeof OpCode.INIT;
|
|
@@ -438,13 +440,35 @@ declare namespace OpCode {
|
|
|
438
440
|
type DELETE_OBJECT_KEY = typeof OpCode.DELETE_OBJECT_KEY;
|
|
439
441
|
type CREATE_MAP = typeof OpCode.CREATE_MAP;
|
|
440
442
|
type CREATE_REGISTER = typeof OpCode.CREATE_REGISTER;
|
|
443
|
+
type CREATE_TEXT = typeof OpCode.CREATE_TEXT;
|
|
444
|
+
type UPDATE_TEXT = typeof OpCode.UPDATE_TEXT;
|
|
441
445
|
}
|
|
446
|
+
type TextAttributes = Record<string, Json>;
|
|
447
|
+
type LiveTextDelta = {
|
|
448
|
+
text: string;
|
|
449
|
+
attributes?: TextAttributes;
|
|
450
|
+
}[];
|
|
451
|
+
type TextOperation = {
|
|
452
|
+
type: "insert";
|
|
453
|
+
index: number;
|
|
454
|
+
text: string;
|
|
455
|
+
attributes?: TextAttributes;
|
|
456
|
+
} | {
|
|
457
|
+
type: "delete";
|
|
458
|
+
index: number;
|
|
459
|
+
length: number;
|
|
460
|
+
} | {
|
|
461
|
+
type: "format";
|
|
462
|
+
index: number;
|
|
463
|
+
length: number;
|
|
464
|
+
attributes: Record<string, Json | null>;
|
|
465
|
+
};
|
|
442
466
|
/**
|
|
443
467
|
* These operations are the payload for {@link UpdateStorageServerMsg} messages
|
|
444
468
|
* only.
|
|
445
469
|
*/
|
|
446
|
-
type Op = CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
|
|
447
|
-
type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp;
|
|
470
|
+
type Op = CreateOp | UpdateObjectOp | UpdateTextOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
|
|
471
|
+
type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp | CreateTextOp;
|
|
448
472
|
type UpdateObjectOp = {
|
|
449
473
|
readonly opId?: string;
|
|
450
474
|
readonly id: string;
|
|
@@ -489,6 +513,26 @@ type CreateRegisterOp = {
|
|
|
489
513
|
readonly parentKey: string;
|
|
490
514
|
readonly data: Json;
|
|
491
515
|
};
|
|
516
|
+
type CreateTextOp = {
|
|
517
|
+
readonly opId?: string;
|
|
518
|
+
readonly id: string;
|
|
519
|
+
readonly intent?: "set";
|
|
520
|
+
readonly deletedId?: string;
|
|
521
|
+
readonly type: OpCode.CREATE_TEXT;
|
|
522
|
+
readonly parentId: string;
|
|
523
|
+
readonly parentKey: string;
|
|
524
|
+
readonly data: LiveTextDelta;
|
|
525
|
+
readonly version: number;
|
|
526
|
+
};
|
|
527
|
+
type UpdateTextOp = {
|
|
528
|
+
readonly opId?: string;
|
|
529
|
+
readonly id: string;
|
|
530
|
+
readonly type: OpCode.UPDATE_TEXT;
|
|
531
|
+
readonly baseVersion: number;
|
|
532
|
+
readonly version?: number;
|
|
533
|
+
readonly ops: TextOperation[];
|
|
534
|
+
readonly metadata?: JsonObject;
|
|
535
|
+
};
|
|
492
536
|
type DeleteCrdtOp = {
|
|
493
537
|
readonly opId?: string;
|
|
494
538
|
readonly id: string;
|
|
@@ -616,15 +660,17 @@ declare const CrdtType: Readonly<{
|
|
|
616
660
|
LIST: 1;
|
|
617
661
|
MAP: 2;
|
|
618
662
|
REGISTER: 3;
|
|
663
|
+
TEXT: 4;
|
|
619
664
|
}>;
|
|
620
665
|
declare namespace CrdtType {
|
|
621
666
|
type OBJECT = typeof CrdtType.OBJECT;
|
|
622
667
|
type LIST = typeof CrdtType.LIST;
|
|
623
668
|
type MAP = typeof CrdtType.MAP;
|
|
624
669
|
type REGISTER = typeof CrdtType.REGISTER;
|
|
670
|
+
type TEXT = typeof CrdtType.TEXT;
|
|
625
671
|
}
|
|
626
672
|
type SerializedCrdt = SerializedRootObject | SerializedChild;
|
|
627
|
-
type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister;
|
|
673
|
+
type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedText;
|
|
628
674
|
type SerializedRootObject = {
|
|
629
675
|
readonly type: CrdtType.OBJECT;
|
|
630
676
|
readonly data: JsonObject;
|
|
@@ -653,13 +699,21 @@ type SerializedRegister = {
|
|
|
653
699
|
readonly parentKey: string;
|
|
654
700
|
readonly data: Json;
|
|
655
701
|
};
|
|
702
|
+
type SerializedText = {
|
|
703
|
+
readonly type: CrdtType.TEXT;
|
|
704
|
+
readonly parentId: string;
|
|
705
|
+
readonly parentKey: string;
|
|
706
|
+
readonly data: LiveTextDelta;
|
|
707
|
+
readonly version: number;
|
|
708
|
+
};
|
|
656
709
|
type StorageNode = RootStorageNode | ChildStorageNode;
|
|
657
|
-
type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode;
|
|
710
|
+
type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | TextStorageNode;
|
|
658
711
|
type RootStorageNode = [id: "root", value: SerializedRootObject];
|
|
659
712
|
type ObjectStorageNode = [id: string, value: SerializedObject];
|
|
660
713
|
type ListStorageNode = [id: string, value: SerializedList];
|
|
661
714
|
type MapStorageNode = [id: string, value: SerializedMap];
|
|
662
715
|
type RegisterStorageNode = [id: string, value: SerializedRegister];
|
|
716
|
+
type TextStorageNode = [id: string, value: SerializedText];
|
|
663
717
|
type NodeMap = Map<string, SerializedCrdt>;
|
|
664
718
|
type NodeStream = Iterable<StorageNode>;
|
|
665
719
|
declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
|
|
@@ -667,8 +721,9 @@ declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode
|
|
|
667
721
|
declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
|
|
668
722
|
declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
|
|
669
723
|
declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
|
|
724
|
+
declare function isTextStorageNode(node: StorageNode): node is TextStorageNode;
|
|
670
725
|
type CompactNode = CompactRootNode | CompactChildNode;
|
|
671
|
-
type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode;
|
|
726
|
+
type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactTextNode;
|
|
672
727
|
type CompactRootNode = readonly [id: "root", data: JsonObject];
|
|
673
728
|
type CompactObjectNode = readonly [
|
|
674
729
|
id: string,
|
|
@@ -696,6 +751,14 @@ type CompactRegisterNode = readonly [
|
|
|
696
751
|
parentKey: string,
|
|
697
752
|
data: Json
|
|
698
753
|
];
|
|
754
|
+
type CompactTextNode = readonly [
|
|
755
|
+
id: string,
|
|
756
|
+
type: CrdtType.TEXT,
|
|
757
|
+
parentId: string,
|
|
758
|
+
parentKey: string,
|
|
759
|
+
data: LiveTextDelta,
|
|
760
|
+
version: number
|
|
761
|
+
];
|
|
699
762
|
declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
|
|
700
763
|
declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
|
|
701
764
|
|
|
@@ -853,16 +916,60 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
853
916
|
clone(): LiveObject<O>;
|
|
854
917
|
}
|
|
855
918
|
|
|
919
|
+
declare function applyLiveTextOperations(delta: LiveTextDelta, ops: readonly TextOperation[]): LiveTextDelta;
|
|
920
|
+
|
|
921
|
+
type LiveTextAttributes = TextAttributes;
|
|
922
|
+
type LiveTextAttributesPatch = Readonly<Record<string, Json | null>>;
|
|
923
|
+
|
|
924
|
+
type LiveTextChange = {
|
|
925
|
+
readonly type: "insert";
|
|
926
|
+
readonly index: number;
|
|
927
|
+
readonly text: string;
|
|
928
|
+
readonly attributes?: TextAttributes;
|
|
929
|
+
} | {
|
|
930
|
+
readonly type: "delete";
|
|
931
|
+
readonly index: number;
|
|
932
|
+
readonly length: number;
|
|
933
|
+
readonly deletedText: string;
|
|
934
|
+
} | {
|
|
935
|
+
readonly type: "format";
|
|
936
|
+
readonly index: number;
|
|
937
|
+
readonly length: number;
|
|
938
|
+
readonly attributes: LiveTextAttributesPatch;
|
|
939
|
+
};
|
|
940
|
+
type LiveTextUpdates = {
|
|
941
|
+
type: "LiveText";
|
|
942
|
+
node: LiveText;
|
|
943
|
+
version: number;
|
|
944
|
+
updates: LiveTextChange[];
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
declare class LiveText extends AbstractCrdt {
|
|
948
|
+
#private;
|
|
949
|
+
constructor(textOrDelta?: string | LiveTextDelta, version?: number);
|
|
950
|
+
get version(): number;
|
|
951
|
+
get length(): number;
|
|
952
|
+
insert(index: number, text: string, attributes?: TextAttributes): void;
|
|
953
|
+
delete(index: number, length: number): void;
|
|
954
|
+
replace(index: number, length: number, text: string, attributes?: TextAttributes): void;
|
|
955
|
+
format(index: number, length: number, attributes: LiveTextAttributesPatch): void;
|
|
956
|
+
toString(): string;
|
|
957
|
+
toDelta(): LiveTextDelta;
|
|
958
|
+
toJSON(): LiveTextDelta;
|
|
959
|
+
clone(): LiveText;
|
|
960
|
+
}
|
|
961
|
+
|
|
856
962
|
type StorageCallback = (updates: StorageUpdate[]) => void;
|
|
857
963
|
type LiveMapUpdate = LiveMapUpdates<string, Lson>;
|
|
858
964
|
type LiveObjectUpdate = LiveObjectUpdates<LsonObject>;
|
|
859
965
|
type LiveListUpdate = LiveListUpdates<Lson>;
|
|
966
|
+
type LiveTextUpdate = LiveTextUpdates;
|
|
860
967
|
/**
|
|
861
968
|
* The payload of notifications sent (in-client) when LiveStructures change.
|
|
862
969
|
* Messages of this kind are not originating from the network, but are 100%
|
|
863
970
|
* in-client.
|
|
864
971
|
*/
|
|
865
|
-
type StorageUpdate = LiveMapUpdate | LiveObjectUpdate | LiveListUpdate;
|
|
972
|
+
type StorageUpdate = LiveMapUpdate | LiveObjectUpdate | LiveListUpdate | LiveTextUpdate;
|
|
866
973
|
|
|
867
974
|
/**
|
|
868
975
|
* The managed pool is a namespace registry (i.e. a context) that "owns" all
|
|
@@ -1076,7 +1183,7 @@ declare class LiveRegister<TValue extends Json> extends AbstractCrdt {
|
|
|
1076
1183
|
clone(): TValue;
|
|
1077
1184
|
}
|
|
1078
1185
|
|
|
1079
|
-
type LiveStructure = LiveObject<LsonObject> | LiveList<Lson> | LiveMap<string, Lson
|
|
1186
|
+
type LiveStructure = LiveObject<LsonObject> | LiveList<Lson> | LiveMap<string, Lson> | LiveText;
|
|
1080
1187
|
/**
|
|
1081
1188
|
* Think of Lson as a sibling of the Json data tree, except that the nested
|
|
1082
1189
|
* data structure can contain a mix of Json values and LiveStructure instances.
|
|
@@ -1112,7 +1219,7 @@ type ToJson<L extends Lson | LsonObject> = L extends LiveList<infer I extends Ls
|
|
|
1112
1219
|
readonly [K in keyof O]: ToJson<Exclude<O[K], undefined>> | (undefined extends O[K] ? undefined : never);
|
|
1113
1220
|
} : L extends LiveMap<infer KS extends string, infer V extends Lson> ? Lson extends V ? ReadonlyJsonObject : {
|
|
1114
1221
|
readonly [K in KS]: ToJson<V>;
|
|
1115
|
-
} : L extends LsonObject ? string extends keyof L ? ReadonlyJsonObject : {
|
|
1222
|
+
} : L extends LiveText ? LiveTextDelta : L extends LsonObject ? string extends keyof L ? ReadonlyJsonObject : {
|
|
1116
1223
|
readonly [K in keyof L]: ToJson<Exclude<L[K], undefined>> | (undefined extends L[K] ? undefined : never);
|
|
1117
1224
|
} : L extends Json ? L : never;
|
|
1118
1225
|
|
|
@@ -4961,7 +5068,12 @@ type PlainLsonList = {
|
|
|
4961
5068
|
liveblocksType: "LiveList";
|
|
4962
5069
|
data: PlainLson[];
|
|
4963
5070
|
};
|
|
4964
|
-
type
|
|
5071
|
+
type PlainLsonText = {
|
|
5072
|
+
liveblocksType: "LiveText";
|
|
5073
|
+
data: LiveTextDelta;
|
|
5074
|
+
version?: number;
|
|
5075
|
+
};
|
|
5076
|
+
type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | PlainLsonText | Json;
|
|
4965
5077
|
|
|
4966
5078
|
/**
|
|
4967
5079
|
* Returns PlainLson for a given Json or LiveStructure, suitable for calling the storage init api
|
|
@@ -5669,4 +5781,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
|
|
|
5669
5781
|
[K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
|
|
5670
5782
|
};
|
|
5671
5783
|
|
|
5672
|
-
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 DFM, type DFMD, 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 Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, 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 ReadonlyJson, type ReadonlyJsonObject, 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 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, 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 };
|
|
5784
|
+
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 CompactTextNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CreateTextOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DFM, type DFMD, 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 Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, 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, LiveText, type LiveTextAttributes, type LiveTextAttributesPatch, type LiveTextChange, type LiveTextDelta, type TextOperation as LiveTextOperation, type LiveTextUpdate, type LiveTextUpdates, 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 PlainLsonText, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type ReadonlyJson, type ReadonlyJsonObject, 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 SerializedText, 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, type TextAttributes, TextEditorType, type TextOperation, type TextStorageNode, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateTextOp, 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, applyLiveTextOperations, 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, isTextStorageNode, isUrl, kInternal, keys, 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
|
@@ -427,6 +427,8 @@ declare const OpCode: Readonly<{
|
|
|
427
427
|
DELETE_OBJECT_KEY: 6;
|
|
428
428
|
CREATE_MAP: 7;
|
|
429
429
|
CREATE_REGISTER: 8;
|
|
430
|
+
CREATE_TEXT: 9;
|
|
431
|
+
UPDATE_TEXT: 10;
|
|
430
432
|
}>;
|
|
431
433
|
declare namespace OpCode {
|
|
432
434
|
type INIT = typeof OpCode.INIT;
|
|
@@ -438,13 +440,35 @@ declare namespace OpCode {
|
|
|
438
440
|
type DELETE_OBJECT_KEY = typeof OpCode.DELETE_OBJECT_KEY;
|
|
439
441
|
type CREATE_MAP = typeof OpCode.CREATE_MAP;
|
|
440
442
|
type CREATE_REGISTER = typeof OpCode.CREATE_REGISTER;
|
|
443
|
+
type CREATE_TEXT = typeof OpCode.CREATE_TEXT;
|
|
444
|
+
type UPDATE_TEXT = typeof OpCode.UPDATE_TEXT;
|
|
441
445
|
}
|
|
446
|
+
type TextAttributes = Record<string, Json>;
|
|
447
|
+
type LiveTextDelta = {
|
|
448
|
+
text: string;
|
|
449
|
+
attributes?: TextAttributes;
|
|
450
|
+
}[];
|
|
451
|
+
type TextOperation = {
|
|
452
|
+
type: "insert";
|
|
453
|
+
index: number;
|
|
454
|
+
text: string;
|
|
455
|
+
attributes?: TextAttributes;
|
|
456
|
+
} | {
|
|
457
|
+
type: "delete";
|
|
458
|
+
index: number;
|
|
459
|
+
length: number;
|
|
460
|
+
} | {
|
|
461
|
+
type: "format";
|
|
462
|
+
index: number;
|
|
463
|
+
length: number;
|
|
464
|
+
attributes: Record<string, Json | null>;
|
|
465
|
+
};
|
|
442
466
|
/**
|
|
443
467
|
* These operations are the payload for {@link UpdateStorageServerMsg} messages
|
|
444
468
|
* only.
|
|
445
469
|
*/
|
|
446
|
-
type Op = CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
|
|
447
|
-
type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp;
|
|
470
|
+
type Op = CreateOp | UpdateObjectOp | UpdateTextOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
|
|
471
|
+
type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp | CreateTextOp;
|
|
448
472
|
type UpdateObjectOp = {
|
|
449
473
|
readonly opId?: string;
|
|
450
474
|
readonly id: string;
|
|
@@ -489,6 +513,26 @@ type CreateRegisterOp = {
|
|
|
489
513
|
readonly parentKey: string;
|
|
490
514
|
readonly data: Json;
|
|
491
515
|
};
|
|
516
|
+
type CreateTextOp = {
|
|
517
|
+
readonly opId?: string;
|
|
518
|
+
readonly id: string;
|
|
519
|
+
readonly intent?: "set";
|
|
520
|
+
readonly deletedId?: string;
|
|
521
|
+
readonly type: OpCode.CREATE_TEXT;
|
|
522
|
+
readonly parentId: string;
|
|
523
|
+
readonly parentKey: string;
|
|
524
|
+
readonly data: LiveTextDelta;
|
|
525
|
+
readonly version: number;
|
|
526
|
+
};
|
|
527
|
+
type UpdateTextOp = {
|
|
528
|
+
readonly opId?: string;
|
|
529
|
+
readonly id: string;
|
|
530
|
+
readonly type: OpCode.UPDATE_TEXT;
|
|
531
|
+
readonly baseVersion: number;
|
|
532
|
+
readonly version?: number;
|
|
533
|
+
readonly ops: TextOperation[];
|
|
534
|
+
readonly metadata?: JsonObject;
|
|
535
|
+
};
|
|
492
536
|
type DeleteCrdtOp = {
|
|
493
537
|
readonly opId?: string;
|
|
494
538
|
readonly id: string;
|
|
@@ -616,15 +660,17 @@ declare const CrdtType: Readonly<{
|
|
|
616
660
|
LIST: 1;
|
|
617
661
|
MAP: 2;
|
|
618
662
|
REGISTER: 3;
|
|
663
|
+
TEXT: 4;
|
|
619
664
|
}>;
|
|
620
665
|
declare namespace CrdtType {
|
|
621
666
|
type OBJECT = typeof CrdtType.OBJECT;
|
|
622
667
|
type LIST = typeof CrdtType.LIST;
|
|
623
668
|
type MAP = typeof CrdtType.MAP;
|
|
624
669
|
type REGISTER = typeof CrdtType.REGISTER;
|
|
670
|
+
type TEXT = typeof CrdtType.TEXT;
|
|
625
671
|
}
|
|
626
672
|
type SerializedCrdt = SerializedRootObject | SerializedChild;
|
|
627
|
-
type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister;
|
|
673
|
+
type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedText;
|
|
628
674
|
type SerializedRootObject = {
|
|
629
675
|
readonly type: CrdtType.OBJECT;
|
|
630
676
|
readonly data: JsonObject;
|
|
@@ -653,13 +699,21 @@ type SerializedRegister = {
|
|
|
653
699
|
readonly parentKey: string;
|
|
654
700
|
readonly data: Json;
|
|
655
701
|
};
|
|
702
|
+
type SerializedText = {
|
|
703
|
+
readonly type: CrdtType.TEXT;
|
|
704
|
+
readonly parentId: string;
|
|
705
|
+
readonly parentKey: string;
|
|
706
|
+
readonly data: LiveTextDelta;
|
|
707
|
+
readonly version: number;
|
|
708
|
+
};
|
|
656
709
|
type StorageNode = RootStorageNode | ChildStorageNode;
|
|
657
|
-
type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode;
|
|
710
|
+
type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | TextStorageNode;
|
|
658
711
|
type RootStorageNode = [id: "root", value: SerializedRootObject];
|
|
659
712
|
type ObjectStorageNode = [id: string, value: SerializedObject];
|
|
660
713
|
type ListStorageNode = [id: string, value: SerializedList];
|
|
661
714
|
type MapStorageNode = [id: string, value: SerializedMap];
|
|
662
715
|
type RegisterStorageNode = [id: string, value: SerializedRegister];
|
|
716
|
+
type TextStorageNode = [id: string, value: SerializedText];
|
|
663
717
|
type NodeMap = Map<string, SerializedCrdt>;
|
|
664
718
|
type NodeStream = Iterable<StorageNode>;
|
|
665
719
|
declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
|
|
@@ -667,8 +721,9 @@ declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode
|
|
|
667
721
|
declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
|
|
668
722
|
declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
|
|
669
723
|
declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
|
|
724
|
+
declare function isTextStorageNode(node: StorageNode): node is TextStorageNode;
|
|
670
725
|
type CompactNode = CompactRootNode | CompactChildNode;
|
|
671
|
-
type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode;
|
|
726
|
+
type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactTextNode;
|
|
672
727
|
type CompactRootNode = readonly [id: "root", data: JsonObject];
|
|
673
728
|
type CompactObjectNode = readonly [
|
|
674
729
|
id: string,
|
|
@@ -696,6 +751,14 @@ type CompactRegisterNode = readonly [
|
|
|
696
751
|
parentKey: string,
|
|
697
752
|
data: Json
|
|
698
753
|
];
|
|
754
|
+
type CompactTextNode = readonly [
|
|
755
|
+
id: string,
|
|
756
|
+
type: CrdtType.TEXT,
|
|
757
|
+
parentId: string,
|
|
758
|
+
parentKey: string,
|
|
759
|
+
data: LiveTextDelta,
|
|
760
|
+
version: number
|
|
761
|
+
];
|
|
699
762
|
declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
|
|
700
763
|
declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
|
|
701
764
|
|
|
@@ -853,16 +916,60 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
853
916
|
clone(): LiveObject<O>;
|
|
854
917
|
}
|
|
855
918
|
|
|
919
|
+
declare function applyLiveTextOperations(delta: LiveTextDelta, ops: readonly TextOperation[]): LiveTextDelta;
|
|
920
|
+
|
|
921
|
+
type LiveTextAttributes = TextAttributes;
|
|
922
|
+
type LiveTextAttributesPatch = Readonly<Record<string, Json | null>>;
|
|
923
|
+
|
|
924
|
+
type LiveTextChange = {
|
|
925
|
+
readonly type: "insert";
|
|
926
|
+
readonly index: number;
|
|
927
|
+
readonly text: string;
|
|
928
|
+
readonly attributes?: TextAttributes;
|
|
929
|
+
} | {
|
|
930
|
+
readonly type: "delete";
|
|
931
|
+
readonly index: number;
|
|
932
|
+
readonly length: number;
|
|
933
|
+
readonly deletedText: string;
|
|
934
|
+
} | {
|
|
935
|
+
readonly type: "format";
|
|
936
|
+
readonly index: number;
|
|
937
|
+
readonly length: number;
|
|
938
|
+
readonly attributes: LiveTextAttributesPatch;
|
|
939
|
+
};
|
|
940
|
+
type LiveTextUpdates = {
|
|
941
|
+
type: "LiveText";
|
|
942
|
+
node: LiveText;
|
|
943
|
+
version: number;
|
|
944
|
+
updates: LiveTextChange[];
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
declare class LiveText extends AbstractCrdt {
|
|
948
|
+
#private;
|
|
949
|
+
constructor(textOrDelta?: string | LiveTextDelta, version?: number);
|
|
950
|
+
get version(): number;
|
|
951
|
+
get length(): number;
|
|
952
|
+
insert(index: number, text: string, attributes?: TextAttributes): void;
|
|
953
|
+
delete(index: number, length: number): void;
|
|
954
|
+
replace(index: number, length: number, text: string, attributes?: TextAttributes): void;
|
|
955
|
+
format(index: number, length: number, attributes: LiveTextAttributesPatch): void;
|
|
956
|
+
toString(): string;
|
|
957
|
+
toDelta(): LiveTextDelta;
|
|
958
|
+
toJSON(): LiveTextDelta;
|
|
959
|
+
clone(): LiveText;
|
|
960
|
+
}
|
|
961
|
+
|
|
856
962
|
type StorageCallback = (updates: StorageUpdate[]) => void;
|
|
857
963
|
type LiveMapUpdate = LiveMapUpdates<string, Lson>;
|
|
858
964
|
type LiveObjectUpdate = LiveObjectUpdates<LsonObject>;
|
|
859
965
|
type LiveListUpdate = LiveListUpdates<Lson>;
|
|
966
|
+
type LiveTextUpdate = LiveTextUpdates;
|
|
860
967
|
/**
|
|
861
968
|
* The payload of notifications sent (in-client) when LiveStructures change.
|
|
862
969
|
* Messages of this kind are not originating from the network, but are 100%
|
|
863
970
|
* in-client.
|
|
864
971
|
*/
|
|
865
|
-
type StorageUpdate = LiveMapUpdate | LiveObjectUpdate | LiveListUpdate;
|
|
972
|
+
type StorageUpdate = LiveMapUpdate | LiveObjectUpdate | LiveListUpdate | LiveTextUpdate;
|
|
866
973
|
|
|
867
974
|
/**
|
|
868
975
|
* The managed pool is a namespace registry (i.e. a context) that "owns" all
|
|
@@ -1076,7 +1183,7 @@ declare class LiveRegister<TValue extends Json> extends AbstractCrdt {
|
|
|
1076
1183
|
clone(): TValue;
|
|
1077
1184
|
}
|
|
1078
1185
|
|
|
1079
|
-
type LiveStructure = LiveObject<LsonObject> | LiveList<Lson> | LiveMap<string, Lson
|
|
1186
|
+
type LiveStructure = LiveObject<LsonObject> | LiveList<Lson> | LiveMap<string, Lson> | LiveText;
|
|
1080
1187
|
/**
|
|
1081
1188
|
* Think of Lson as a sibling of the Json data tree, except that the nested
|
|
1082
1189
|
* data structure can contain a mix of Json values and LiveStructure instances.
|
|
@@ -1112,7 +1219,7 @@ type ToJson<L extends Lson | LsonObject> = L extends LiveList<infer I extends Ls
|
|
|
1112
1219
|
readonly [K in keyof O]: ToJson<Exclude<O[K], undefined>> | (undefined extends O[K] ? undefined : never);
|
|
1113
1220
|
} : L extends LiveMap<infer KS extends string, infer V extends Lson> ? Lson extends V ? ReadonlyJsonObject : {
|
|
1114
1221
|
readonly [K in KS]: ToJson<V>;
|
|
1115
|
-
} : L extends LsonObject ? string extends keyof L ? ReadonlyJsonObject : {
|
|
1222
|
+
} : L extends LiveText ? LiveTextDelta : L extends LsonObject ? string extends keyof L ? ReadonlyJsonObject : {
|
|
1116
1223
|
readonly [K in keyof L]: ToJson<Exclude<L[K], undefined>> | (undefined extends L[K] ? undefined : never);
|
|
1117
1224
|
} : L extends Json ? L : never;
|
|
1118
1225
|
|
|
@@ -4961,7 +5068,12 @@ type PlainLsonList = {
|
|
|
4961
5068
|
liveblocksType: "LiveList";
|
|
4962
5069
|
data: PlainLson[];
|
|
4963
5070
|
};
|
|
4964
|
-
type
|
|
5071
|
+
type PlainLsonText = {
|
|
5072
|
+
liveblocksType: "LiveText";
|
|
5073
|
+
data: LiveTextDelta;
|
|
5074
|
+
version?: number;
|
|
5075
|
+
};
|
|
5076
|
+
type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | PlainLsonText | Json;
|
|
4965
5077
|
|
|
4966
5078
|
/**
|
|
4967
5079
|
* Returns PlainLson for a given Json or LiveStructure, suitable for calling the storage init api
|
|
@@ -5669,4 +5781,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
|
|
|
5669
5781
|
[K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
|
|
5670
5782
|
};
|
|
5671
5783
|
|
|
5672
|
-
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 DFM, type DFMD, 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 Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, 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 ReadonlyJson, type ReadonlyJsonObject, 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 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, 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 };
|
|
5784
|
+
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 CompactTextNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CreateTextOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DFM, type DFMD, 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 Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, 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, LiveText, type LiveTextAttributes, type LiveTextAttributesPatch, type LiveTextChange, type LiveTextDelta, type TextOperation as LiveTextOperation, type LiveTextUpdate, type LiveTextUpdates, 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 PlainLsonText, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type ReadonlyJson, type ReadonlyJsonObject, 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 SerializedText, 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, type TextAttributes, TextEditorType, type TextOperation, type TextStorageNode, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateTextOp, 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, applyLiveTextOperations, 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, isTextStorageNode, isUrl, kInternal, keys, 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 };
|