@tldraw/editor 3.8.0-canary.7764274c3dd2 → 3.8.0-canary.79362534f1d1

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.
@@ -29,7 +29,6 @@ export interface TldrawOptions {
29
29
  readonly dragDistanceSquared: number
30
30
  readonly defaultSvgPadding: number
31
31
  readonly cameraSlideFriction: number
32
- readonly maxPointsPerDrawShape: number
33
32
  readonly gridSteps: readonly {
34
33
  readonly min: number
35
34
  readonly mid: number
@@ -66,11 +65,6 @@ export interface TldrawOptions {
66
65
  * external context providers. By default, this is `React.Fragment`.
67
66
  */
68
67
  readonly exportProvider: ComponentType<{ children: React.ReactNode }>
69
- /**
70
- * How should the note shape resize? By default it does not resize (except automatically based on its text content),
71
- * but you can set it to be user-resizable using scale.
72
- */
73
- readonly noteShapeResizeMode: 'none' | 'scale'
74
68
  /**
75
69
  * By default, the toolbar items are accessible via number shortcuts according to their order. To disable this, set this option to false.
76
70
  */
@@ -90,7 +84,6 @@ export const defaultTldrawOptions = {
90
84
  dragDistanceSquared: 16, // 4 squared
91
85
  defaultSvgPadding: 32,
92
86
  cameraSlideFriction: 0.09,
93
- maxPointsPerDrawShape: 500,
94
87
  gridSteps: [
95
88
  { min: -1, mid: 0.15, step: 64 },
96
89
  { min: 0.05, mid: 0.375, step: 16 },
@@ -120,6 +113,5 @@ export const defaultTldrawOptions = {
120
113
  actionShortcutsLocation: 'swap',
121
114
  createTextOnCanvasDoubleClick: true,
122
115
  exportProvider: Fragment,
123
- noteShapeResizeMode: 'none',
124
116
  enableToolbarKeyboardShortcuts: true,
125
117
  } as const satisfies TldrawOptions
@@ -90,3 +90,15 @@ export const setStyleProperty = (
90
90
  if (!elm) return
91
91
  elm.style.setProperty(property, value as string)
92
92
  }
93
+
94
+ const INPUTS = ['input', 'select', 'button', 'textarea']
95
+
96
+ /** @internal */
97
+ export function activeElementShouldCaptureKeys() {
98
+ const { activeElement } = document
99
+ return !!(
100
+ activeElement &&
101
+ (activeElement.getAttribute('contenteditable') ||
102
+ INPUTS.indexOf(activeElement.tagName.toLowerCase()) > -1)
103
+ )
104
+ }
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.8.0-canary.7764274c3dd2'
4
+ export const version = '3.8.0-canary.79362534f1d1'
5
5
  export const publishDates = {
6
6
  major: '2024-09-13T14:36:29.063Z',
7
- minor: '2025-02-06T16:06:45.875Z',
8
- patch: '2025-02-06T16:06:45.875Z',
7
+ minor: '2025-02-11T14:22:58.700Z',
8
+ patch: '2025-02-11T14:22:58.700Z',
9
9
  }