@tldraw/editor 3.12.0-canary.764765a8d3b4 → 3.12.0-canary.8444e138c852

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.
Files changed (35) hide show
  1. package/dist-cjs/index.d.ts +1 -0
  2. package/dist-cjs/index.js +1 -1
  3. package/dist-cjs/lib/TldrawEditor.js +1 -0
  4. package/dist-cjs/lib/TldrawEditor.js.map +2 -2
  5. package/dist-cjs/lib/components/default-components/DefaultCanvas.js +10 -1
  6. package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
  7. package/dist-cjs/lib/editor/managers/FocusManager.js +1 -1
  8. package/dist-cjs/lib/editor/managers/FocusManager.js.map +2 -2
  9. package/dist-cjs/lib/editor/shapes/ShapeUtil.js +3 -0
  10. package/dist-cjs/lib/editor/shapes/ShapeUtil.js.map +2 -2
  11. package/dist-cjs/lib/license/Watermark.js +1 -0
  12. package/dist-cjs/lib/license/Watermark.js.map +2 -2
  13. package/dist-cjs/version.js +3 -3
  14. package/dist-cjs/version.js.map +1 -1
  15. package/dist-esm/index.d.mts +1 -0
  16. package/dist-esm/index.mjs +1 -1
  17. package/dist-esm/lib/TldrawEditor.mjs +1 -0
  18. package/dist-esm/lib/TldrawEditor.mjs.map +2 -2
  19. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +10 -1
  20. package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
  21. package/dist-esm/lib/editor/managers/FocusManager.mjs +1 -1
  22. package/dist-esm/lib/editor/managers/FocusManager.mjs.map +2 -2
  23. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs +3 -0
  24. package/dist-esm/lib/editor/shapes/ShapeUtil.mjs.map +2 -2
  25. package/dist-esm/lib/license/Watermark.mjs +1 -0
  26. package/dist-esm/lib/license/Watermark.mjs.map +2 -2
  27. package/dist-esm/version.mjs +3 -3
  28. package/dist-esm/version.mjs.map +1 -1
  29. package/package.json +7 -7
  30. package/src/lib/TldrawEditor.tsx +1 -0
  31. package/src/lib/components/default-components/DefaultCanvas.tsx +6 -1
  32. package/src/lib/editor/managers/FocusManager.ts +1 -1
  33. package/src/lib/editor/shapes/ShapeUtil.ts +4 -0
  34. package/src/lib/license/Watermark.tsx +1 -0
  35. package/src/version.ts +3 -3
@@ -1,8 +1,8 @@
1
- const version = "3.12.0-canary.764765a8d3b4";
1
+ const version = "3.12.0-canary.8444e138c852";
2
2
  const publishDates = {
3
3
  major: "2024-09-13T14:36:29.063Z",
4
- minor: "2025-04-07T15:00:46.173Z",
5
- patch: "2025-04-07T15:00:46.173Z"
4
+ minor: "2025-04-10T11:48:02.173Z",
5
+ patch: "2025-04-10T11:48:02.173Z"
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 = '3.12.0-canary.764765a8d3b4'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-04-07T15:00:46.173Z',\n\tpatch: '2025-04-07T15:00:46.173Z',\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 = '3.12.0-canary.8444e138c852'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-04-10T11:48:02.173Z',\n\tpatch: '2025-04-10T11:48:02.173Z',\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": "A tiny little drawing app (editor).",
4
- "version": "3.12.0-canary.764765a8d3b4",
4
+ "version": "3.12.0-canary.8444e138c852",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -48,12 +48,12 @@
48
48
  "@tiptap/core": "^2.9.1",
49
49
  "@tiptap/pm": "^2.9.1",
50
50
  "@tiptap/react": "^2.9.1",
51
- "@tldraw/state": "3.12.0-canary.764765a8d3b4",
52
- "@tldraw/state-react": "3.12.0-canary.764765a8d3b4",
53
- "@tldraw/store": "3.12.0-canary.764765a8d3b4",
54
- "@tldraw/tlschema": "3.12.0-canary.764765a8d3b4",
55
- "@tldraw/utils": "3.12.0-canary.764765a8d3b4",
56
- "@tldraw/validate": "3.12.0-canary.764765a8d3b4",
51
+ "@tldraw/state": "3.12.0-canary.8444e138c852",
52
+ "@tldraw/state-react": "3.12.0-canary.8444e138c852",
53
+ "@tldraw/store": "3.12.0-canary.8444e138c852",
54
+ "@tldraw/tlschema": "3.12.0-canary.8444e138c852",
55
+ "@tldraw/utils": "3.12.0-canary.8444e138c852",
56
+ "@tldraw/validate": "3.12.0-canary.8444e138c852",
57
57
  "@types/core-js": "^2.5.8",
58
58
  "@use-gesture/react": "^10.3.1",
59
59
  "classnames": "^2.5.1",
@@ -284,6 +284,7 @@ export const TldrawEditor = memo(function TldrawEditor({
284
284
  className={classNames(`${TL_CONTAINER_CLASS} tl-theme__light`, className)}
285
285
  onPointerDown={stopEventPropagation}
286
286
  tabIndex={-1}
287
+ role="application"
287
288
  >
288
289
  <OptionalErrorBoundary
289
290
  fallback={ErrorFallback}
@@ -361,7 +361,12 @@ function HandleWrapper({
361
361
  if (!Handle) return null
362
362
 
363
363
  return (
364
- <g aria-label="handle" transform={`translate(${handle.x}, ${handle.y})`} {...events}>
364
+ <g
365
+ role="button"
366
+ aria-label="handle"
367
+ transform={`translate(${handle.x}, ${handle.y})`}
368
+ {...events}
369
+ >
365
370
  <Handle shapeId={shapeId} handle={handle} zoom={zoom} isCoarse={isCoarse} />
366
371
  </g>
367
372
  )
@@ -58,7 +58,7 @@ export class FocusManager {
58
58
 
59
59
  private handleKeyDown(keyEvent: KeyboardEvent) {
60
60
  const container = this.editor.getContainer()
61
- if (keyEvent.key === 'Tab') {
61
+ if (['Tab', 'ArrowUp', 'ArrowDown'].includes(keyEvent.key)) {
62
62
  container.classList.remove('tl-container__no-focus-ring')
63
63
  }
64
64
  }
@@ -448,6 +448,10 @@ export abstract class ShapeUtil<Shape extends TLUnknownShape = TLUnknownShape> {
448
448
  return undefined
449
449
  }
450
450
 
451
+ getAriaDescriptor(_shape: Shape): string | undefined {
452
+ return undefined
453
+ }
454
+
451
455
  // Events
452
456
 
453
457
  /**
@@ -111,6 +111,7 @@ To remove the watermark, please purchase a license at tldraw.dev.
111
111
  color: var(--color-text);
112
112
  opacity: .38;
113
113
  border: 0;
114
+ padding: 0;
114
115
  background-color: currentColor;
115
116
  }
116
117
 
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 = '3.12.0-canary.764765a8d3b4'
4
+ export const version = '3.12.0-canary.8444e138c852'
5
5
  export const publishDates = {
6
6
  major: '2024-09-13T14:36:29.063Z',
7
- minor: '2025-04-07T15:00:46.173Z',
8
- patch: '2025-04-07T15:00:46.173Z',
7
+ minor: '2025-04-10T11:48:02.173Z',
8
+ patch: '2025-04-10T11:48:02.173Z',
9
9
  }