@tldraw/sync-core 4.3.0-canary.fd6b7f2a8adc → 4.3.0-next.2b3bfbba757b

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
@@ -51,7 +51,7 @@ var import_TLSyncClient = require("./lib/TLSyncClient");
51
51
  var import_TLSyncRoom = require("./lib/TLSyncRoom");
52
52
  (0, import_utils.registerTldrawLibraryVersion)(
53
53
  "@tldraw/sync-core",
54
- "4.3.0-canary.fd6b7f2a8adc",
54
+ "4.3.0-next.2b3bfbba757b",
55
55
  "cjs"
56
56
  );
57
57
  //# sourceMappingURL=index.js.map
@@ -26,7 +26,7 @@ import {
26
26
  } from "./lib/TLSyncRoom.mjs";
27
27
  registerTldrawLibraryVersion(
28
28
  "@tldraw/sync-core",
29
- "4.3.0-canary.fd6b7f2a8adc",
29
+ "4.3.0-next.2b3bfbba757b",
30
30
  "esm"
31
31
  );
32
32
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tldraw/sync-core",
3
3
  "description": "tldraw infinite canvas SDK (multiplayer sync).",
4
- "version": "4.3.0-canary.fd6b7f2a8adc",
4
+ "version": "4.3.0-next.2b3bfbba757b",
5
5
  "author": {
6
6
  "name": "tldraw GB Ltd.",
7
7
  "email": "hello@tldraw.com"
@@ -48,17 +48,17 @@
48
48
  "@types/uuid-readable": "^0.0.3",
49
49
  "react": "^18.3.1",
50
50
  "react-dom": "^18.3.1",
51
- "tldraw": "4.3.0-canary.fd6b7f2a8adc",
51
+ "tldraw": "4.3.0-next.2b3bfbba757b",
52
52
  "typescript": "^5.8.3",
53
53
  "uuid-by-string": "^4.0.0",
54
54
  "uuid-readable": "^0.0.2",
55
55
  "vitest": "^3.2.4"
56
56
  },
57
57
  "dependencies": {
58
- "@tldraw/state": "4.3.0-canary.fd6b7f2a8adc",
59
- "@tldraw/store": "4.3.0-canary.fd6b7f2a8adc",
60
- "@tldraw/tlschema": "4.3.0-canary.fd6b7f2a8adc",
61
- "@tldraw/utils": "4.3.0-canary.fd6b7f2a8adc",
58
+ "@tldraw/state": "4.3.0-next.2b3bfbba757b",
59
+ "@tldraw/store": "4.3.0-next.2b3bfbba757b",
60
+ "@tldraw/tlschema": "4.3.0-next.2b3bfbba757b",
61
+ "@tldraw/utils": "4.3.0-next.2b3bfbba757b",
62
62
  "nanoevents": "^7.0.1",
63
63
  "ws": "^8.18.0"
64
64
  },
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  Editor,
3
3
  PageRecordType,
4
+ TLArrowBinding,
4
5
  TLPage,
5
6
  TLPageId,
6
7
  TLShape,
@@ -40,8 +41,8 @@ export type Op =
40
41
  }
41
42
  | {
42
43
  type: 'create-arrow'
43
- start: VecModel
44
- end: VecModel
44
+ start: TLArrowBinding | VecModel
45
+ end: TLArrowBinding | VecModel
45
46
  }
46
47
  | {
47
48
  type: 'delete-shape'
@@ -314,8 +315,8 @@ export class FuzzEditor extends RandomSource {
314
315
  x: 0,
315
316
  y: 0,
316
317
  props: {
317
- start: op.start as any,
318
- end: op.end as any,
318
+ start: op.start,
319
+ end: op.end,
319
320
  },
320
321
  })
321
322
  break
@@ -169,7 +169,7 @@ describe('TLSyncRoom', () => {
169
169
 
170
170
  const room = new TLSyncRoom({
171
171
  schema,
172
- snapshot: makeSnapshot([...records, oldArrow as any], {
172
+ snapshot: makeSnapshot([...records, oldArrow], {
173
173
  schema: oldSerializedSchema,
174
174
  }),
175
175
  })
@@ -1,5 +1,7 @@
1
1
  import {
2
2
  Editor,
3
+ TLArrowBinding,
4
+ TLArrowShape,
3
5
  TLRecord,
4
6
  TLStore,
5
7
  computed,
@@ -109,9 +111,9 @@ let totalNumShapes = 0
109
111
  let totalNumPages = 0
110
112
 
111
113
  function arrowsAreSound(editor: Editor) {
112
- const arrows = editor.getCurrentPageShapes().filter((s) => s.type === 'arrow')
114
+ const arrows = editor.getCurrentPageShapes().filter((s): s is TLArrowShape => s.type === 'arrow')
113
115
  for (const arrow of arrows) {
114
- const bindings = editor.getBindingsFromShape(arrow, 'arrow')
116
+ const bindings = editor.getBindingsFromShape<TLArrowBinding>(arrow, 'arrow')
115
117
  const terminalsSeen = new Set()
116
118
  for (const binding of bindings) {
117
119
  if (terminalsSeen.has(binding.props.terminal)) {