tldraw 4.0.0 → 4.0.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/lib/ui/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.0.0'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:32:28.865Z',\n\tminor: '2025-09-18T14:32:28.865Z',\n\tpatch: '2025-09-18T14:32:28.865Z',\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.0.2'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:32:28.865Z',\n\tminor: '2025-09-18T14:32:28.865Z',\n\tpatch: '2025-09-19T11:04:14.309Z',\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",
3
3
  "description": "A tiny little drawing editor.",
4
- "version": "4.0.0",
4
+ "version": "4.0.2",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -55,8 +55,8 @@
55
55
  "@tiptap/pm": "^2.9.1",
56
56
  "@tiptap/react": "^2.9.1",
57
57
  "@tiptap/starter-kit": "^2.9.1",
58
- "@tldraw/editor": "4.0.0",
59
- "@tldraw/store": "4.0.0",
58
+ "@tldraw/editor": "4.0.2",
59
+ "@tldraw/store": "4.0.2",
60
60
  "classnames": "^2.5.1",
61
61
  "hotkeys-js": "^3.13.9",
62
62
  "idb": "^7.1.1",
@@ -165,13 +165,9 @@ export function PreferencesGroup() {
165
165
  <TogglePasteAtCursorItem />
166
166
  <ToggleDebugModeItem />
167
167
  </TldrawUiMenuGroup>
168
- <TldrawUiMenuGroup id="input-mode">
168
+ <TldrawUiMenuGroup id="user-interface-submenus">
169
169
  <InputModeMenu />
170
- </TldrawUiMenuGroup>
171
- <TldrawUiMenuGroup id="color-scheme">
172
170
  <ColorSchemeMenu />
173
- </TldrawUiMenuGroup>
174
- <TldrawUiMenuGroup id="accessibility-menu">
175
171
  <AccessibilityMenu />
176
172
  </TldrawUiMenuGroup>
177
173
  </TldrawUiMenuSubmenu>
@@ -1344,6 +1344,28 @@ export function ActionsProvider({ overrides, children }: ActionsProviderProps) {
1344
1344
  }
1345
1345
  },
1346
1346
  },
1347
+ {
1348
+ id: 'toggle-focus-mode',
1349
+ label: {
1350
+ default: 'action.toggle-focus-mode',
1351
+ menu: 'action.toggle-focus-mode.menu',
1352
+ },
1353
+ readonlyOk: true,
1354
+ kbd: 'cmd+.,ctrl+.',
1355
+ checkbox: true,
1356
+ onSelect(source) {
1357
+ // this needs to be deferred because it causes the menu
1358
+ // UI to unmount which puts us in a dodgy state
1359
+ editor.timers.requestAnimationFrame(() => {
1360
+ editor.run(() => {
1361
+ trackEvent('toggle-focus-mode', { source })
1362
+ helpers.clearDialogs()
1363
+ helpers.clearToasts()
1364
+ editor.updateInstanceState({ isFocusMode: !editor.getInstanceState().isFocusMode })
1365
+ })
1366
+ })
1367
+ },
1368
+ },
1347
1369
  {
1348
1370
  id: 'toggle-grid',
1349
1371
  label: {
@@ -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.0.0'
4
+ export const version = '4.0.2'
5
5
  export const publishDates = {
6
6
  major: '2025-09-18T14:32:28.865Z',
7
7
  minor: '2025-09-18T14:32:28.865Z',
8
- patch: '2025-09-18T14:32:28.865Z',
8
+ patch: '2025-09-19T11:04:14.309Z',
9
9
  }