@tldraw/editor 5.2.0-canary.e09b35094c3c → 5.2.0-canary.f9f58b0449dd

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
@@ -379,7 +379,7 @@ var import_uniq = require("./lib/utils/uniq");
379
379
  var import_defaultThemes2 = require("./lib/editor/managers/ThemeManager/defaultThemes");
380
380
  (0, import_utils.registerTldrawLibraryVersion)(
381
381
  "@tldraw/editor",
382
- "5.2.0-canary.e09b35094c3c",
382
+ "5.2.0-canary.f9f58b0449dd",
383
383
  "cjs"
384
384
  );
385
385
  //# 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 = "5.2.0-canary.e09b35094c3c";
25
+ const version = "5.2.0-canary.f9f58b0449dd";
26
26
  const publishDates = {
27
27
  major: "2026-05-06T16:28:18.473Z",
28
- minor: "2026-06-09T11:11:10.037Z",
29
- patch: "2026-06-09T11:11:10.037Z"
28
+ minor: "2026-06-09T13:40:31.971Z",
29
+ patch: "2026-06-09T13:40:31.971Z"
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 = '5.2.0-canary.e09b35094c3c'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-06-09T11:11:10.037Z',\n\tpatch: '2026-06-09T11:11:10.037Z',\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 = '5.2.0-canary.f9f58b0449dd'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-06-09T13:40:31.971Z',\n\tpatch: '2026-06-09T13:40:31.971Z',\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
  }
@@ -297,7 +297,7 @@ import { LocalIndexedDb, Table } from "./lib/utils/sync/LocalIndexedDb.mjs";
297
297
  import { uniq } from "./lib/utils/uniq.mjs";
298
298
  registerTldrawLibraryVersion(
299
299
  "@tldraw/editor",
300
- "5.2.0-canary.e09b35094c3c",
300
+ "5.2.0-canary.f9f58b0449dd",
301
301
  "esm"
302
302
  );
303
303
  import { getColorValue } from "./lib/editor/managers/ThemeManager/defaultThemes.mjs";
@@ -1,8 +1,8 @@
1
- const version = "5.2.0-canary.e09b35094c3c";
1
+ const version = "5.2.0-canary.f9f58b0449dd";
2
2
  const publishDates = {
3
3
  major: "2026-05-06T16:28:18.473Z",
4
- minor: "2026-06-09T11:11:10.037Z",
5
- patch: "2026-06-09T11:11:10.037Z"
4
+ minor: "2026-06-09T13:40:31.971Z",
5
+ patch: "2026-06-09T13:40:31.971Z"
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 = '5.2.0-canary.e09b35094c3c'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-06-09T11:11:10.037Z',\n\tpatch: '2026-06-09T11:11:10.037Z',\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 = '5.2.0-canary.f9f58b0449dd'\nexport const publishDates = {\n\tmajor: '2026-05-06T16:28:18.473Z',\n\tminor: '2026-06-09T13:40:31.971Z',\n\tpatch: '2026-06-09T13:40:31.971Z',\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": "5.2.0-canary.e09b35094c3c",
4
+ "version": "5.2.0-canary.f9f58b0449dd",
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": "5.2.0-canary.e09b35094c3c",
53
- "@tldraw/state-react": "5.2.0-canary.e09b35094c3c",
54
- "@tldraw/store": "5.2.0-canary.e09b35094c3c",
55
- "@tldraw/tlschema": "5.2.0-canary.e09b35094c3c",
56
- "@tldraw/utils": "5.2.0-canary.e09b35094c3c",
57
- "@tldraw/validate": "5.2.0-canary.e09b35094c3c",
52
+ "@tldraw/state": "5.2.0-canary.f9f58b0449dd",
53
+ "@tldraw/state-react": "5.2.0-canary.f9f58b0449dd",
54
+ "@tldraw/store": "5.2.0-canary.f9f58b0449dd",
55
+ "@tldraw/tlschema": "5.2.0-canary.f9f58b0449dd",
56
+ "@tldraw/utils": "5.2.0-canary.f9f58b0449dd",
57
+ "@tldraw/validate": "5.2.0-canary.f9f58b0449dd",
58
58
  "classnames": "^2.5.1",
59
59
  "eventemitter3": "^4.0.7",
60
60
  "idb": "^7.1.1",
@@ -80,7 +80,7 @@
80
80
  "react": "^19.2.1",
81
81
  "react-dom": "^19.2.1",
82
82
  "resize-observer-polyfill": "^1.5.1",
83
- "vitest": "^3.2.4"
83
+ "vitest": "^4.1.7"
84
84
  },
85
85
  "module": "dist-esm/index.mjs",
86
86
  "source": "src/index.ts",
@@ -15,12 +15,14 @@ import { FontManager } from './FontManager'
15
15
  vi.mock('../../Editor')
16
16
 
17
17
  // Mock globals
18
- global.FontFace = vi.fn().mockImplementation((family, src, descriptors) => ({
19
- family,
20
- src,
21
- ...descriptors,
22
- load: vi.fn(() => Promise.resolve()),
23
- }))
18
+ global.FontFace = vi.fn().mockImplementation(function (family: any, src: any, descriptors: any) {
19
+ return {
20
+ family,
21
+ src,
22
+ ...descriptors,
23
+ load: vi.fn(() => Promise.resolve()),
24
+ }
25
+ })
24
26
 
25
27
  Object.defineProperty(global.document, 'fonts', {
26
28
  value: {
@@ -200,9 +202,11 @@ describe('FontManager', () => {
200
202
  const font = createMockFont()
201
203
  const error = new Error('Font load failed')
202
204
 
203
- ;(global.FontFace as Mock).mockReturnValue({
204
- family: font.family,
205
- load: vi.fn(() => Promise.reject(error)),
205
+ ;(global.FontFace as Mock).mockImplementationOnce(function () {
206
+ return {
207
+ family: font.family,
208
+ load: vi.fn(() => Promise.reject(error)),
209
+ }
206
210
  })
207
211
 
208
212
  const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
@@ -82,20 +82,22 @@ const mockEditor = {
82
82
  getContainerDocument: vi.fn(() => mockDocument),
83
83
  } as unknown as Editor
84
84
 
85
- global.Range = vi.fn(() => ({
86
- setStart: vi.fn(),
87
- setEnd: vi.fn(),
88
- getClientRects: vi.fn(() => [
89
- {
90
- width: 10,
91
- height: 16,
92
- left: 0,
93
- top: 0,
94
- right: 10,
95
- bottom: 16,
96
- },
97
- ]),
98
- })) as any
85
+ global.Range = vi.fn(function () {
86
+ return {
87
+ setStart: vi.fn(),
88
+ setEnd: vi.fn(),
89
+ getClientRects: vi.fn(() => [
90
+ {
91
+ width: 10,
92
+ height: 16,
93
+ left: 0,
94
+ top: 0,
95
+ right: 10,
96
+ bottom: 16,
97
+ },
98
+ ]),
99
+ }
100
+ }) as any
99
101
 
100
102
  describe('TextManager', () => {
101
103
  let textManager: TextManager
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 = '5.2.0-canary.e09b35094c3c'
4
+ export const version = '5.2.0-canary.f9f58b0449dd'
5
5
  export const publishDates = {
6
6
  major: '2026-05-06T16:28:18.473Z',
7
- minor: '2026-06-09T11:11:10.037Z',
8
- patch: '2026-06-09T11:11:10.037Z',
7
+ minor: '2026-06-09T13:40:31.971Z',
8
+ patch: '2026-06-09T13:40:31.971Z',
9
9
  }