@tldraw/editor 4.6.0-canary.db8dea43f13b → 4.6.0-canary.dcaf0f7cb726

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
@@ -376,7 +376,7 @@ var import_LocalIndexedDb = require("./lib/utils/sync/LocalIndexedDb");
376
376
  var import_uniq = require("./lib/utils/uniq");
377
377
  (0, import_utils.registerTldrawLibraryVersion)(
378
378
  "@tldraw/editor",
379
- "4.6.0-canary.db8dea43f13b",
379
+ "4.6.0-canary.dcaf0f7cb726",
380
380
  "cjs"
381
381
  );
382
382
  //# sourceMappingURL=index.js.map
@@ -22,10 +22,10 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const version = "4.6.0-canary.db8dea43f13b";
25
+ const version = "4.6.0-canary.dcaf0f7cb726";
26
26
  const publishDates = {
27
27
  major: "2025-09-18T14:39:22.803Z",
28
- minor: "2026-03-26T14:30:01.734Z",
29
- patch: "2026-03-26T14:30:01.734Z"
28
+ minor: "2026-03-27T10:03:08.610Z",
29
+ patch: "2026-03-27T10:03:08.610Z"
30
30
  };
31
31
  //# sourceMappingURL=version.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '4.6.0-canary.db8dea43f13b'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2026-03-26T14:30:01.734Z',\n\tpatch: '2026-03-26T14:30:01.734Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '4.6.0-canary.dcaf0f7cb726'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2026-03-27T10:03:08.610Z',\n\tpatch: '2026-03-27T10:03:08.610Z',\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
@@ -313,7 +313,7 @@ import { LocalIndexedDb, Table } from "./lib/utils/sync/LocalIndexedDb.mjs";
313
313
  import { uniq } from "./lib/utils/uniq.mjs";
314
314
  registerTldrawLibraryVersion(
315
315
  "@tldraw/editor",
316
- "4.6.0-canary.db8dea43f13b",
316
+ "4.6.0-canary.dcaf0f7cb726",
317
317
  "esm"
318
318
  );
319
319
  export {
@@ -1,8 +1,8 @@
1
- const version = "4.6.0-canary.db8dea43f13b";
1
+ const version = "4.6.0-canary.dcaf0f7cb726";
2
2
  const publishDates = {
3
3
  major: "2025-09-18T14:39:22.803Z",
4
- minor: "2026-03-26T14:30:01.734Z",
5
- patch: "2026-03-26T14:30:01.734Z"
4
+ minor: "2026-03-27T10:03:08.610Z",
5
+ patch: "2026-03-27T10:03:08.610Z"
6
6
  };
7
7
  export {
8
8
  publishDates,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '4.6.0-canary.db8dea43f13b'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2026-03-26T14:30:01.734Z',\n\tpatch: '2026-03-26T14:30:01.734Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '4.6.0-canary.dcaf0f7cb726'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2026-03-27T10:03:08.610Z',\n\tpatch: '2026-03-27T10:03:08.610Z',\n}\n"],
5
5
  "mappings": "AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tldraw/editor",
3
3
  "description": "tldraw infinite canvas SDK (editor).",
4
- "version": "4.6.0-canary.db8dea43f13b",
4
+ "version": "4.6.0-canary.dcaf0f7cb726",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -49,12 +49,12 @@
49
49
  "@tiptap/core": "^3.12.1",
50
50
  "@tiptap/pm": "^3.12.1",
51
51
  "@tiptap/react": "^3.12.1",
52
- "@tldraw/state": "4.6.0-canary.db8dea43f13b",
53
- "@tldraw/state-react": "4.6.0-canary.db8dea43f13b",
54
- "@tldraw/store": "4.6.0-canary.db8dea43f13b",
55
- "@tldraw/tlschema": "4.6.0-canary.db8dea43f13b",
56
- "@tldraw/utils": "4.6.0-canary.db8dea43f13b",
57
- "@tldraw/validate": "4.6.0-canary.db8dea43f13b",
52
+ "@tldraw/state": "4.6.0-canary.dcaf0f7cb726",
53
+ "@tldraw/state-react": "4.6.0-canary.dcaf0f7cb726",
54
+ "@tldraw/store": "4.6.0-canary.dcaf0f7cb726",
55
+ "@tldraw/tlschema": "4.6.0-canary.dcaf0f7cb726",
56
+ "@tldraw/utils": "4.6.0-canary.dcaf0f7cb726",
57
+ "@tldraw/validate": "4.6.0-canary.dcaf0f7cb726",
58
58
  "@use-gesture/react": "^10.3.1",
59
59
  "classnames": "^2.5.1",
60
60
  "eventemitter3": "^4.0.7",
@@ -728,4 +728,34 @@ describe('Box', () => {
728
728
  expect(result).not.toBe(zeroBox) // different object
729
729
  })
730
730
  })
731
+
732
+ describe('Box.isValid', () => {
733
+ it('returns true for normal box', () => {
734
+ expect(new Box(10, 20, 100, 200).isValid()).toBe(true)
735
+ })
736
+
737
+ it('returns false when x is NaN', () => {
738
+ expect(new Box(NaN, 0, 100, 100).isValid()).toBe(false)
739
+ })
740
+
741
+ it('returns false when y is NaN', () => {
742
+ expect(new Box(0, NaN, 100, 100).isValid()).toBe(false)
743
+ })
744
+
745
+ it('returns false when w is NaN', () => {
746
+ expect(new Box(0, 0, NaN, 100).isValid()).toBe(false)
747
+ })
748
+
749
+ it('returns false when h is NaN', () => {
750
+ expect(new Box(0, 0, 100, NaN).isValid()).toBe(false)
751
+ })
752
+
753
+ it('returns false for Infinity', () => {
754
+ expect(new Box(Infinity, 0, 100, 100).isValid()).toBe(false)
755
+ })
756
+
757
+ it('returns true for zero-sized box', () => {
758
+ expect(new Box(0, 0, 0, 0).isValid()).toBe(true)
759
+ })
760
+ })
731
761
  })
@@ -1,5 +1,6 @@
1
1
  import { Mat } from '../Mat'
2
2
  import { Vec, VecLike } from '../Vec'
3
+ import { Edge2d } from './Edge2d'
3
4
  import { Geometry2dFilters } from './Geometry2d'
4
5
  import { Group2d } from './Group2d'
5
6
  import { Rectangle2d } from './Rectangle2d'
@@ -456,6 +457,26 @@ describe('Group2d getBoundsVertices', () => {
456
457
  })
457
458
  })
458
459
 
460
+ describe('interpolateAlongEdge', () => {
461
+ it('returns vertex when segment has zero length', () => {
462
+ const edge = new Edge2d({ start: new Vec(5, 5), end: new Vec(5, 5) })
463
+ const result = edge.interpolateAlongEdge(0.5)
464
+ expect(result.x).toBe(5)
465
+ expect(result.y).toBe(5)
466
+ expect(Number.isFinite(result.x)).toBe(true)
467
+ expect(Number.isFinite(result.y)).toBe(true)
468
+ })
469
+ })
470
+
471
+ describe('uninterpolateAlongEdge', () => {
472
+ it('returns 0 when geometry has zero length', () => {
473
+ const edge = new Edge2d({ start: new Vec(5, 5), end: new Vec(5, 5) })
474
+ const result = edge.uninterpolateAlongEdge(new Vec(5, 5))
475
+ expect(result).toBe(0)
476
+ expect(Number.isFinite(result)).toBe(true)
477
+ })
478
+ })
479
+
459
480
  function expectApproxMatch(a: VecLike, b: VecLike) {
460
481
  expect(a.x).toBeCloseTo(b.x, 0.0001)
461
482
  expect(a.y).toBeCloseTo(b.y, 0.0001)
package/src/version.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  // This file is automatically generated by internal/scripts/refresh-assets.ts.
2
2
  // Do not edit manually. Or do, I'm a comment, not a cop.
3
3
 
4
- export const version = '4.6.0-canary.db8dea43f13b'
4
+ export const version = '4.6.0-canary.dcaf0f7cb726'
5
5
  export const publishDates = {
6
6
  major: '2025-09-18T14:39:22.803Z',
7
- minor: '2026-03-26T14:30:01.734Z',
8
- patch: '2026-03-26T14:30:01.734Z',
7
+ minor: '2026-03-27T10:03:08.610Z',
8
+ patch: '2026-03-27T10:03:08.610Z',
9
9
  }