@tldraw/editor 3.13.0-canary.409fd05a1a56 → 3.13.0-canary.40f213d4510c

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,8 +1,8 @@
1
- const version = "3.13.0-canary.409fd05a1a56";
1
+ const version = "3.13.0-canary.40f213d4510c";
2
2
  const publishDates = {
3
3
  major: "2024-09-13T14:36:29.063Z",
4
- minor: "2025-05-14T13:34:58.456Z",
5
- patch: "2025-05-14T13:34:58.456Z"
4
+ minor: "2025-05-21T10:35:32.428Z",
5
+ patch: "2025-05-21T10:35:32.428Z"
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.13.0-canary.409fd05a1a56'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-05-14T13:34:58.456Z',\n\tpatch: '2025-05-14T13:34:58.456Z',\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.13.0-canary.40f213d4510c'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-05-21T10:35:32.428Z',\n\tpatch: '2025-05-21T10:35:32.428Z',\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.13.0-canary.409fd05a1a56",
4
+ "version": "3.13.0-canary.40f213d4510c",
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.13.0-canary.409fd05a1a56",
52
- "@tldraw/state-react": "3.13.0-canary.409fd05a1a56",
53
- "@tldraw/store": "3.13.0-canary.409fd05a1a56",
54
- "@tldraw/tlschema": "3.13.0-canary.409fd05a1a56",
55
- "@tldraw/utils": "3.13.0-canary.409fd05a1a56",
56
- "@tldraw/validate": "3.13.0-canary.409fd05a1a56",
51
+ "@tldraw/state": "3.13.0-canary.40f213d4510c",
52
+ "@tldraw/state-react": "3.13.0-canary.40f213d4510c",
53
+ "@tldraw/store": "3.13.0-canary.40f213d4510c",
54
+ "@tldraw/tlschema": "3.13.0-canary.40f213d4510c",
55
+ "@tldraw/utils": "3.13.0-canary.40f213d4510c",
56
+ "@tldraw/validate": "3.13.0-canary.40f213d4510c",
57
57
  "@types/core-js": "^2.5.8",
58
58
  "@use-gesture/react": "^10.3.1",
59
59
  "classnames": "^2.5.1",
@@ -10284,6 +10284,36 @@ export class Editor extends EventEmitter<TLEventMap> {
10284
10284
  const { x: cx, y: cy, z: cz } = unsafe__withoutCapture(() => this.getCamera())
10285
10285
  const { x: dx, y: dy, z: dz = 0 } = info.delta
10286
10286
 
10287
+ if (this.inputs.keys.has('KeyV')) {
10288
+ const selectedShapeIds = this.getSelectedShapeIds()
10289
+ if (selectedShapeIds.length > 0) {
10290
+ const instanceState = this.getInstanceState()
10291
+ if (!instanceState.isChangingStyle) {
10292
+ this.updateInstanceState({ isChangingStyle: true })
10293
+ }
10294
+ clearTimeout(this._isChangingStyleTimeout)
10295
+ this._isChangingStyleTimeout = this.timers.setTimeout(() => {
10296
+ this._updateInstanceState({ isChangingStyle: false }, { history: 'ignore' })
10297
+ }, 1000)
10298
+ this.updateShapes(
10299
+ compact(
10300
+ selectedShapeIds.map((id) => {
10301
+ const shape = this.getShape(id)
10302
+ if (!shape) return
10303
+ if (hasOwnProperty(shape.props, 'scale')) {
10304
+ const scale = (shape.props as any)['scale'] as number
10305
+ const change = info.delta.y / 100
10306
+ const next = scale + change
10307
+
10308
+ return { ...shape, props: { scale: Math.max(0.01, next) } }
10309
+ }
10310
+ })
10311
+ )
10312
+ )
10313
+ return
10314
+ }
10315
+ }
10316
+
10287
10317
  let behavior = wheelBehavior
10288
10318
 
10289
10319
  // If the camera behavior is "zoom" and the ctrl key is pressed, then pan;
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.13.0-canary.409fd05a1a56'
4
+ export const version = '3.13.0-canary.40f213d4510c'
5
5
  export const publishDates = {
6
6
  major: '2024-09-13T14:36:29.063Z',
7
- minor: '2025-05-14T13:34:58.456Z',
8
- patch: '2025-05-14T13:34:58.456Z',
7
+ minor: '2025-05-21T10:35:32.428Z',
8
+ patch: '2025-05-21T10:35:32.428Z',
9
9
  }