@liveblocks/core 1.0.2 → 1.0.6-test2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -13
- package/dist/index.js +747 -421
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -685,27 +685,27 @@ declare type CustomEvent<TRoomEvent extends Json> = {
|
|
|
685
685
|
event: TRoomEvent;
|
|
686
686
|
};
|
|
687
687
|
declare type Connection = {
|
|
688
|
-
|
|
688
|
+
status: "closed";
|
|
689
689
|
} | {
|
|
690
|
-
|
|
690
|
+
status: "authenticating";
|
|
691
691
|
} | {
|
|
692
|
-
|
|
692
|
+
status: "connecting";
|
|
693
693
|
id: number;
|
|
694
694
|
userId?: string;
|
|
695
695
|
userInfo?: Json;
|
|
696
696
|
isReadOnly: boolean;
|
|
697
697
|
} | {
|
|
698
|
-
|
|
698
|
+
status: "open";
|
|
699
699
|
id: number;
|
|
700
700
|
userId?: string;
|
|
701
701
|
userInfo?: Json;
|
|
702
702
|
isReadOnly: boolean;
|
|
703
703
|
} | {
|
|
704
|
-
|
|
704
|
+
status: "unavailable";
|
|
705
705
|
} | {
|
|
706
|
-
|
|
706
|
+
status: "failed";
|
|
707
707
|
};
|
|
708
|
-
declare type
|
|
708
|
+
declare type ConnectionStatus = Connection["status"];
|
|
709
709
|
declare type StorageStatus = "not-loaded" | "loading" | "synchronizing" | "synchronized";
|
|
710
710
|
interface History {
|
|
711
711
|
/**
|
|
@@ -802,7 +802,7 @@ declare type Room<TPresence extends JsonObject, TStorage extends LsonObject, TUs
|
|
|
802
802
|
* metadata and connection ID (from the auth server).
|
|
803
803
|
*/
|
|
804
804
|
isSelfAware(): boolean;
|
|
805
|
-
getConnectionState():
|
|
805
|
+
getConnectionState(): ConnectionStatus;
|
|
806
806
|
readonly subscribe: {
|
|
807
807
|
/**
|
|
808
808
|
* Subscribe to the current user presence updates.
|
|
@@ -858,7 +858,7 @@ declare type Room<TPresence extends JsonObject, TStorage extends LsonObject, TUs
|
|
|
858
858
|
* @returns Unsubscribe function.
|
|
859
859
|
*
|
|
860
860
|
*/
|
|
861
|
-
(type: "connection", listener: Callback<
|
|
861
|
+
(type: "connection", listener: Callback<ConnectionStatus>): () => void;
|
|
862
862
|
/**
|
|
863
863
|
* Subscribes to changes made on a Live structure. Returns an unsubscribe function.
|
|
864
864
|
* In a future version, we will also expose what exactly changed in the Live structure.
|
|
@@ -1014,7 +1014,7 @@ declare type Room<TPresence extends JsonObject, TStorage extends LsonObject, TUs
|
|
|
1014
1014
|
event: OthersEvent<TPresence, TUserMeta>;
|
|
1015
1015
|
}>;
|
|
1016
1016
|
error: Observable<Error>;
|
|
1017
|
-
connection: Observable<
|
|
1017
|
+
connection: Observable<ConnectionStatus>;
|
|
1018
1018
|
storage: Observable<StorageUpdate[]>;
|
|
1019
1019
|
history: Observable<HistoryEvent>;
|
|
1020
1020
|
/**
|
|
@@ -1611,7 +1611,7 @@ declare type ClientToPanelMessage =
|
|
|
1611
1611
|
| {
|
|
1612
1612
|
msg: "room::sync::full";
|
|
1613
1613
|
roomId: string;
|
|
1614
|
-
status:
|
|
1614
|
+
status: ConnectionStatus;
|
|
1615
1615
|
storage: readonly LsonTreeNode[] | null;
|
|
1616
1616
|
me: UserTreeNode | null;
|
|
1617
1617
|
others: readonly UserTreeNode[];
|
|
@@ -1622,7 +1622,7 @@ declare type ClientToPanelMessage =
|
|
|
1622
1622
|
| {
|
|
1623
1623
|
msg: "room::sync::partial";
|
|
1624
1624
|
roomId: string;
|
|
1625
|
-
status?:
|
|
1625
|
+
status?: ConnectionStatus;
|
|
1626
1626
|
storage?: readonly LsonTreeNode[];
|
|
1627
1627
|
me?: UserTreeNode;
|
|
1628
1628
|
others?: readonly UserTreeNode[];
|
|
@@ -1673,4 +1673,4 @@ declare type EnsureJson<T> = [
|
|
|
1673
1673
|
[K in keyof T]: EnsureJson<T[K]>;
|
|
1674
1674
|
};
|
|
1675
1675
|
|
|
1676
|
-
export { AckOp, AppOnlyAuthToken, AuthToken, BaseUserMeta, BroadcastEventClientMsg, BroadcastOptions, BroadcastedEventServerMsg, Client, ClientMsg, ClientMsgCode,
|
|
1676
|
+
export { AckOp, AppOnlyAuthToken, AuthToken, BaseUserMeta, BroadcastEventClientMsg, BroadcastOptions, BroadcastedEventServerMsg, Client, ClientMsg, ClientMsgCode, ConnectionStatus, CrdtType, CreateChildOp, CreateListOp, CreateMapOp, CreateObjectOp, CreateOp, CreateRegisterOp, CreateRootObjectOp, DeleteCrdtOp, DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, EnsureJson, FetchStorageClientMsg, History, IdTuple, Immutable, InitialDocumentStateServerMsg, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveNode, LiveObject, LiveStructure, Lson, LsonObject, NodeMap, Op, OpCode, Others, ParentToChildNodeMap, PlainLson, PlainLsonFields, PlainLsonList, PlainLsonMap, PlainLsonObject, RejectedStorageOpServerMsg, Resolve, Room, RoomAuthToken, RoomInitializers, RoomStateServerMsg, SerializedChild, SerializedCrdt, SerializedList, SerializedMap, SerializedObject, SerializedRegister, SerializedRootObject, ServerMsg, ServerMsgCode, SetParentKeyOp, StorageStatus, StorageUpdate, ToImmutable, ToJson, UpdateObjectOp, UpdatePresenceClientMsg, UpdatePresenceServerMsg, UpdateStorageClientMsg, UpdateStorageServerMsg, User, UserJoinServerMsg, UserLeftServerMsg, WebsocketCloseCodes, asArrayWithLegacyMethods, assert, assertNever, b64decode, comparePosition, createClient, deprecate, deprecateIf, errorIf, freeze, isAppOnlyAuthToken, isAuthToken, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isPlainObject, isRoomAuthToken, isRootCrdt, legacy_patchImmutableObject, lsonToJson, makePosition, nn, patchLiveObjectKey, shallow, throwUsageError, tryParseJson };
|