@tldraw/sync-core 3.14.0 → 3.14.2

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-cjs/index.js CHANGED
@@ -39,18 +39,18 @@ __export(index_exports, {
39
39
  });
40
40
  module.exports = __toCommonJS(index_exports);
41
41
  var import_utils = require("@tldraw/utils");
42
+ var import_chunk = require("./lib/chunk");
42
43
  var import_ClientWebSocketAdapter = require("./lib/ClientWebSocketAdapter");
44
+ var import_diff = require("./lib/diff");
45
+ var import_protocol = require("./lib/protocol");
43
46
  var import_RoomSession = require("./lib/RoomSession");
44
47
  var import_TLRemoteSyncError = require("./lib/TLRemoteSyncError");
45
48
  var import_TLSocketRoom = require("./lib/TLSocketRoom");
46
49
  var import_TLSyncClient = require("./lib/TLSyncClient");
47
50
  var import_TLSyncRoom = require("./lib/TLSyncRoom");
48
- var import_chunk = require("./lib/chunk");
49
- var import_diff = require("./lib/diff");
50
- var import_protocol = require("./lib/protocol");
51
51
  (0, import_utils.registerTldrawLibraryVersion)(
52
52
  "@tldraw/sync-core",
53
- "3.14.0",
53
+ "3.14.2",
54
54
  "cjs"
55
55
  );
56
56
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { ClientWebSocketAdapter, ReconnectManager } from './lib/ClientWebSocketAdapter'\nexport { RoomSessionState, type RoomSession } from './lib/RoomSession'\nexport type { WebSocketMinimal } from './lib/ServerSocketAdapter'\nexport { TLRemoteSyncError } from './lib/TLRemoteSyncError'\nexport { TLSocketRoom, type OmitVoid, type TLSyncLog } from './lib/TLSocketRoom'\nexport {\n\tTLSyncClient,\n\tTLSyncErrorCloseEventCode,\n\tTLSyncErrorCloseEventReason,\n\ttype SubscribingFn,\n\ttype TLPersistentClientSocket,\n\ttype TLPersistentClientSocketStatus,\n\ttype TLSocketStatusListener,\n\ttype TlSocketStatusChangeEvent,\n} from './lib/TLSyncClient'\nexport {\n\tDocumentState,\n\tTLSyncRoom,\n\ttype RoomSnapshot,\n\ttype RoomStoreMethods,\n\ttype TLRoomSocket,\n} from './lib/TLSyncRoom'\nexport { chunk } from './lib/chunk'\nexport {\n\tRecordOpType,\n\tValueOpType,\n\tapplyObjectDiff,\n\tdiffRecord,\n\tgetNetworkDiff,\n\ttype AppendOp,\n\ttype DeleteOp,\n\ttype NetworkDiff,\n\ttype ObjectDiff,\n\ttype PatchOp,\n\ttype PutOp,\n\ttype RecordOp,\n\ttype ValueOp,\n} from './lib/diff'\nexport {\n\tTLIncompatibilityReason,\n\tgetTlsyncProtocolVersion,\n\ttype TLConnectRequest,\n\ttype TLPingRequest,\n\ttype TLPushRequest,\n\ttype TLSocketClientSentEvent,\n\ttype TLSocketServerSentDataEvent,\n\ttype TLSocketServerSentEvent,\n} from './lib/protocol'\nexport type { PersistedRoomSnapshotForSupabase } from './lib/server-types'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAC7C,oCAAyD;AACzD,yBAAmD;AAEnD,+BAAkC;AAClC,0BAA4D;AAC5D,0BASO;AACP,wBAMO;AACP,mBAAsB;AACtB,kBAcO;AACP,sBASO;AAAA,IAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { chunk } from './lib/chunk'\nexport { ClientWebSocketAdapter, ReconnectManager } from './lib/ClientWebSocketAdapter'\nexport {\n\tapplyObjectDiff,\n\tdiffRecord,\n\tgetNetworkDiff,\n\tRecordOpType,\n\tValueOpType,\n\ttype AppendOp,\n\ttype DeleteOp,\n\ttype NetworkDiff,\n\ttype ObjectDiff,\n\ttype PatchOp,\n\ttype PutOp,\n\ttype RecordOp,\n\ttype ValueOp,\n} from './lib/diff'\nexport {\n\tgetTlsyncProtocolVersion,\n\tTLIncompatibilityReason,\n\ttype TLConnectRequest,\n\ttype TLPingRequest,\n\ttype TLPushRequest,\n\ttype TLSocketClientSentEvent,\n\ttype TLSocketServerSentDataEvent,\n\ttype TLSocketServerSentEvent,\n} from './lib/protocol'\nexport { RoomSessionState, type RoomSession } from './lib/RoomSession'\nexport type { PersistedRoomSnapshotForSupabase } from './lib/server-types'\nexport type { WebSocketMinimal } from './lib/ServerSocketAdapter'\nexport { TLRemoteSyncError } from './lib/TLRemoteSyncError'\nexport { TLSocketRoom, type OmitVoid, type TLSyncLog } from './lib/TLSocketRoom'\nexport {\n\tTLSyncClient,\n\tTLSyncErrorCloseEventCode,\n\tTLSyncErrorCloseEventReason,\n\ttype SubscribingFn,\n\ttype TLPersistentClientSocket,\n\ttype TLPersistentClientSocketStatus,\n\ttype TlSocketStatusChangeEvent,\n\ttype TLSocketStatusListener,\n} from './lib/TLSyncClient'\nexport {\n\tDocumentState,\n\tTLSyncRoom,\n\ttype RoomSnapshot,\n\ttype RoomStoreMethods,\n\ttype TLRoomSocket,\n} from './lib/TLSyncRoom'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA6C;AAC7C,mBAAsB;AACtB,oCAAyD;AACzD,kBAcO;AACP,sBASO;AACP,yBAAmD;AAGnD,+BAAkC;AAClC,0BAA4D;AAC5D,0BASO;AACP,wBAMO;AAAA,IAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,17 @@
1
1
  import { registerTldrawLibraryVersion } from "@tldraw/utils";
2
+ import { chunk } from "./lib/chunk.mjs";
2
3
  import { ClientWebSocketAdapter, ReconnectManager } from "./lib/ClientWebSocketAdapter.mjs";
4
+ import {
5
+ applyObjectDiff,
6
+ diffRecord,
7
+ getNetworkDiff,
8
+ RecordOpType,
9
+ ValueOpType
10
+ } from "./lib/diff.mjs";
11
+ import {
12
+ getTlsyncProtocolVersion,
13
+ TLIncompatibilityReason
14
+ } from "./lib/protocol.mjs";
3
15
  import { RoomSessionState } from "./lib/RoomSession.mjs";
4
16
  import { TLRemoteSyncError } from "./lib/TLRemoteSyncError.mjs";
5
17
  import { TLSocketRoom } from "./lib/TLSocketRoom.mjs";
@@ -12,21 +24,9 @@ import {
12
24
  DocumentState,
13
25
  TLSyncRoom
14
26
  } from "./lib/TLSyncRoom.mjs";
15
- import { chunk } from "./lib/chunk.mjs";
16
- import {
17
- RecordOpType,
18
- ValueOpType,
19
- applyObjectDiff,
20
- diffRecord,
21
- getNetworkDiff
22
- } from "./lib/diff.mjs";
23
- import {
24
- TLIncompatibilityReason,
25
- getTlsyncProtocolVersion
26
- } from "./lib/protocol.mjs";
27
27
  registerTldrawLibraryVersion(
28
28
  "@tldraw/sync-core",
29
- "3.14.0",
29
+ "3.14.2",
30
30
  "esm"
31
31
  );
32
32
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { ClientWebSocketAdapter, ReconnectManager } from './lib/ClientWebSocketAdapter'\nexport { RoomSessionState, type RoomSession } from './lib/RoomSession'\nexport type { WebSocketMinimal } from './lib/ServerSocketAdapter'\nexport { TLRemoteSyncError } from './lib/TLRemoteSyncError'\nexport { TLSocketRoom, type OmitVoid, type TLSyncLog } from './lib/TLSocketRoom'\nexport {\n\tTLSyncClient,\n\tTLSyncErrorCloseEventCode,\n\tTLSyncErrorCloseEventReason,\n\ttype SubscribingFn,\n\ttype TLPersistentClientSocket,\n\ttype TLPersistentClientSocketStatus,\n\ttype TLSocketStatusListener,\n\ttype TlSocketStatusChangeEvent,\n} from './lib/TLSyncClient'\nexport {\n\tDocumentState,\n\tTLSyncRoom,\n\ttype RoomSnapshot,\n\ttype RoomStoreMethods,\n\ttype TLRoomSocket,\n} from './lib/TLSyncRoom'\nexport { chunk } from './lib/chunk'\nexport {\n\tRecordOpType,\n\tValueOpType,\n\tapplyObjectDiff,\n\tdiffRecord,\n\tgetNetworkDiff,\n\ttype AppendOp,\n\ttype DeleteOp,\n\ttype NetworkDiff,\n\ttype ObjectDiff,\n\ttype PatchOp,\n\ttype PutOp,\n\ttype RecordOp,\n\ttype ValueOp,\n} from './lib/diff'\nexport {\n\tTLIncompatibilityReason,\n\tgetTlsyncProtocolVersion,\n\ttype TLConnectRequest,\n\ttype TLPingRequest,\n\ttype TLPushRequest,\n\ttype TLSocketClientSentEvent,\n\ttype TLSocketServerSentDataEvent,\n\ttype TLSocketServerSentEvent,\n} from './lib/protocol'\nexport type { PersistedRoomSnapshotForSupabase } from './lib/server-types'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
- "mappings": "AAAA,SAAS,oCAAoC;AAC7C,SAAS,wBAAwB,wBAAwB;AACzD,SAAS,wBAA0C;AAEnD,SAAS,yBAAyB;AAClC,SAAS,oBAAmD;AAC5D;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAMM;AACP;AAAA,EACC;AAAA,EACA;AAAA,OAIM;AACP,SAAS,aAAa;AACtB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASM;AACP;AAAA,EACC;AAAA,EACA;AAAA,OAOM;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from '@tldraw/utils'\nexport { chunk } from './lib/chunk'\nexport { ClientWebSocketAdapter, ReconnectManager } from './lib/ClientWebSocketAdapter'\nexport {\n\tapplyObjectDiff,\n\tdiffRecord,\n\tgetNetworkDiff,\n\tRecordOpType,\n\tValueOpType,\n\ttype AppendOp,\n\ttype DeleteOp,\n\ttype NetworkDiff,\n\ttype ObjectDiff,\n\ttype PatchOp,\n\ttype PutOp,\n\ttype RecordOp,\n\ttype ValueOp,\n} from './lib/diff'\nexport {\n\tgetTlsyncProtocolVersion,\n\tTLIncompatibilityReason,\n\ttype TLConnectRequest,\n\ttype TLPingRequest,\n\ttype TLPushRequest,\n\ttype TLSocketClientSentEvent,\n\ttype TLSocketServerSentDataEvent,\n\ttype TLSocketServerSentEvent,\n} from './lib/protocol'\nexport { RoomSessionState, type RoomSession } from './lib/RoomSession'\nexport type { PersistedRoomSnapshotForSupabase } from './lib/server-types'\nexport type { WebSocketMinimal } from './lib/ServerSocketAdapter'\nexport { TLRemoteSyncError } from './lib/TLRemoteSyncError'\nexport { TLSocketRoom, type OmitVoid, type TLSyncLog } from './lib/TLSocketRoom'\nexport {\n\tTLSyncClient,\n\tTLSyncErrorCloseEventCode,\n\tTLSyncErrorCloseEventReason,\n\ttype SubscribingFn,\n\ttype TLPersistentClientSocket,\n\ttype TLPersistentClientSocketStatus,\n\ttype TlSocketStatusChangeEvent,\n\ttype TLSocketStatusListener,\n} from './lib/TLSyncClient'\nexport {\n\tDocumentState,\n\tTLSyncRoom,\n\ttype RoomSnapshot,\n\ttype RoomStoreMethods,\n\ttype TLRoomSocket,\n} from './lib/TLSyncRoom'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
+ "mappings": "AAAA,SAAS,oCAAoC;AAC7C,SAAS,aAAa;AACtB,SAAS,wBAAwB,wBAAwB;AACzD;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASM;AACP;AAAA,EACC;AAAA,EACA;AAAA,OAOM;AACP,SAAS,wBAA0C;AAGnD,SAAS,yBAAyB;AAClC,SAAS,oBAAmD;AAC5D;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAMM;AACP;AAAA,EACC;AAAA,EACA;AAAA,OAIM;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tldraw/sync-core",
3
3
  "description": "A tiny little drawing app (multiplayer sync).",
4
- "version": "3.14.0",
4
+ "version": "3.14.2",
5
5
  "author": {
6
6
  "name": "tldraw GB Ltd.",
7
7
  "email": "hello@tldraw.com"
@@ -46,8 +46,8 @@
46
46
  "@types/uuid-readable": "^0.0.3",
47
47
  "react": "^18.3.1",
48
48
  "react-dom": "^18.3.1",
49
- "tldraw": "3.14.0",
50
- "typescript": "~5.4.5",
49
+ "tldraw": "3.14.2",
50
+ "typescript": "^5.8.3",
51
51
  "uuid-by-string": "^4.0.0",
52
52
  "uuid-readable": "^0.0.2"
53
53
  },
@@ -66,10 +66,10 @@
66
66
  ]
67
67
  },
68
68
  "dependencies": {
69
- "@tldraw/state": "3.14.0",
70
- "@tldraw/store": "3.14.0",
71
- "@tldraw/tlschema": "3.14.0",
72
- "@tldraw/utils": "3.14.0",
69
+ "@tldraw/state": "3.14.2",
70
+ "@tldraw/store": "3.14.2",
71
+ "@tldraw/tlschema": "3.14.2",
72
+ "@tldraw/utils": "3.14.2",
73
73
  "nanoevents": "^7.0.1",
74
74
  "ws": "^8.18.0"
75
75
  },
package/src/index.ts CHANGED
@@ -1,33 +1,12 @@
1
1
  import { registerTldrawLibraryVersion } from '@tldraw/utils'
2
- export { ClientWebSocketAdapter, ReconnectManager } from './lib/ClientWebSocketAdapter'
3
- export { RoomSessionState, type RoomSession } from './lib/RoomSession'
4
- export type { WebSocketMinimal } from './lib/ServerSocketAdapter'
5
- export { TLRemoteSyncError } from './lib/TLRemoteSyncError'
6
- export { TLSocketRoom, type OmitVoid, type TLSyncLog } from './lib/TLSocketRoom'
7
- export {
8
- TLSyncClient,
9
- TLSyncErrorCloseEventCode,
10
- TLSyncErrorCloseEventReason,
11
- type SubscribingFn,
12
- type TLPersistentClientSocket,
13
- type TLPersistentClientSocketStatus,
14
- type TLSocketStatusListener,
15
- type TlSocketStatusChangeEvent,
16
- } from './lib/TLSyncClient'
17
- export {
18
- DocumentState,
19
- TLSyncRoom,
20
- type RoomSnapshot,
21
- type RoomStoreMethods,
22
- type TLRoomSocket,
23
- } from './lib/TLSyncRoom'
24
2
  export { chunk } from './lib/chunk'
3
+ export { ClientWebSocketAdapter, ReconnectManager } from './lib/ClientWebSocketAdapter'
25
4
  export {
26
- RecordOpType,
27
- ValueOpType,
28
5
  applyObjectDiff,
29
6
  diffRecord,
30
7
  getNetworkDiff,
8
+ RecordOpType,
9
+ ValueOpType,
31
10
  type AppendOp,
32
11
  type DeleteOp,
33
12
  type NetworkDiff,
@@ -38,8 +17,8 @@ export {
38
17
  type ValueOp,
39
18
  } from './lib/diff'
40
19
  export {
41
- TLIncompatibilityReason,
42
20
  getTlsyncProtocolVersion,
21
+ TLIncompatibilityReason,
43
22
  type TLConnectRequest,
44
23
  type TLPingRequest,
45
24
  type TLPushRequest,
@@ -47,7 +26,28 @@ export {
47
26
  type TLSocketServerSentDataEvent,
48
27
  type TLSocketServerSentEvent,
49
28
  } from './lib/protocol'
29
+ export { RoomSessionState, type RoomSession } from './lib/RoomSession'
50
30
  export type { PersistedRoomSnapshotForSupabase } from './lib/server-types'
31
+ export type { WebSocketMinimal } from './lib/ServerSocketAdapter'
32
+ export { TLRemoteSyncError } from './lib/TLRemoteSyncError'
33
+ export { TLSocketRoom, type OmitVoid, type TLSyncLog } from './lib/TLSocketRoom'
34
+ export {
35
+ TLSyncClient,
36
+ TLSyncErrorCloseEventCode,
37
+ TLSyncErrorCloseEventReason,
38
+ type SubscribingFn,
39
+ type TLPersistentClientSocket,
40
+ type TLPersistentClientSocketStatus,
41
+ type TlSocketStatusChangeEvent,
42
+ type TLSocketStatusListener,
43
+ } from './lib/TLSyncClient'
44
+ export {
45
+ DocumentState,
46
+ TLSyncRoom,
47
+ type RoomSnapshot,
48
+ type RoomStoreMethods,
49
+ type TLRoomSocket,
50
+ } from './lib/TLSyncRoom'
51
51
 
52
52
  registerTldrawLibraryVersion(
53
53
  (globalThis as any).TLDRAW_LIBRARY_NAME,