@tldraw/editor 4.3.0-next.be1d118d2056 → 4.3.0-next.cc9c0708ca5c
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.d.ts +2 -0
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +4 -0
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +2 -0
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +4 -0
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/package.json +7 -7
- package/src/lib/components/default-components/DefaultCanvas.tsx +1 -0
- package/src/lib/editor/Editor.ts +4 -0
- package/src/lib/editor/types/emit-types.ts +3 -1
- package/src/version.ts +3 -3
package/dist-esm/version.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const version = "4.3.0-next.
|
|
1
|
+
const version = "4.3.0-next.cc9c0708ca5c";
|
|
2
2
|
const publishDates = {
|
|
3
3
|
major: "2025-09-18T14:39:22.803Z",
|
|
4
|
-
minor: "2025-
|
|
5
|
-
patch: "2025-
|
|
4
|
+
minor: "2025-12-02T12:14:36.796Z",
|
|
5
|
+
patch: "2025-12-02T12:14:36.796Z"
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
publishDates,
|
package/dist-esm/version.mjs.map
CHANGED
|
@@ -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 = '4.3.0-next.
|
|
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.3.0-next.cc9c0708ca5c'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2025-12-02T12:14:36.796Z',\n\tpatch: '2025-12-02T12:14:36.796Z',\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": "4.3.0-next.
|
|
4
|
+
"version": "4.3.0-next.cc9c0708ca5c",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"@tiptap/core": "^3.6.2",
|
|
51
51
|
"@tiptap/pm": "^3.6.2",
|
|
52
52
|
"@tiptap/react": "^3.6.2",
|
|
53
|
-
"@tldraw/state": "4.3.0-next.
|
|
54
|
-
"@tldraw/state-react": "4.3.0-next.
|
|
55
|
-
"@tldraw/store": "4.3.0-next.
|
|
56
|
-
"@tldraw/tlschema": "4.3.0-next.
|
|
57
|
-
"@tldraw/utils": "4.3.0-next.
|
|
58
|
-
"@tldraw/validate": "4.3.0-next.
|
|
53
|
+
"@tldraw/state": "4.3.0-next.cc9c0708ca5c",
|
|
54
|
+
"@tldraw/state-react": "4.3.0-next.cc9c0708ca5c",
|
|
55
|
+
"@tldraw/store": "4.3.0-next.cc9c0708ca5c",
|
|
56
|
+
"@tldraw/tlschema": "4.3.0-next.cc9c0708ca5c",
|
|
57
|
+
"@tldraw/utils": "4.3.0-next.cc9c0708ca5c",
|
|
58
|
+
"@tldraw/validate": "4.3.0-next.cc9c0708ca5c",
|
|
59
59
|
"@types/core-js": "^2.5.8",
|
|
60
60
|
"@use-gesture/react": "^10.3.1",
|
|
61
61
|
"classnames": "^2.5.1",
|
|
@@ -86,6 +86,7 @@ export function DefaultCanvas({ className }: TLCanvasComponentProps) {
|
|
|
86
86
|
const transform = `scale(${toDomPrecision(z)}) translate(${toDomPrecision(
|
|
87
87
|
x + offset
|
|
88
88
|
)}px,${toDomPrecision(y + offset)}px)`
|
|
89
|
+
|
|
89
90
|
setStyleProperty(rHtmlLayer.current, 'transform', transform)
|
|
90
91
|
setStyleProperty(rHtmlLayer2.current, 'transform', transform)
|
|
91
92
|
},
|
package/src/lib/editor/Editor.ts
CHANGED
|
@@ -969,6 +969,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
969
969
|
this.disposables.clear()
|
|
970
970
|
this.store.dispose()
|
|
971
971
|
this.isDisposed = true
|
|
972
|
+
this.emit('dispose')
|
|
972
973
|
}
|
|
973
974
|
|
|
974
975
|
/* ------------------- Shape Utils ------------------ */
|
|
@@ -3631,16 +3632,19 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
3631
3632
|
if (_willSetInitialBounds) {
|
|
3632
3633
|
// If we have just received the initial bounds, don't center the camera.
|
|
3633
3634
|
this.updateInstanceState({ screenBounds: screenBounds.toJson(), insets })
|
|
3635
|
+
this.emit('resize', screenBounds.toJson())
|
|
3634
3636
|
this.setCamera(this.getCamera())
|
|
3635
3637
|
} else {
|
|
3636
3638
|
if (center && !this.getInstanceState().followingUserId) {
|
|
3637
3639
|
// Get the page center before the change, make the change, and restore it
|
|
3638
3640
|
const before = this.getViewportPageBounds().center
|
|
3639
3641
|
this.updateInstanceState({ screenBounds: screenBounds.toJson(), insets })
|
|
3642
|
+
this.emit('resize', screenBounds.toJson())
|
|
3640
3643
|
this.centerOnPoint(before)
|
|
3641
3644
|
} else {
|
|
3642
3645
|
// Otherwise,
|
|
3643
3646
|
this.updateInstanceState({ screenBounds: screenBounds.toJson(), insets })
|
|
3647
|
+
this.emit('resize', screenBounds.toJson())
|
|
3644
3648
|
this._setCamera(Vec.From({ ...this.getCamera() }))
|
|
3645
3649
|
}
|
|
3646
3650
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HistoryEntry } from '@tldraw/store'
|
|
2
|
-
import { TLPageId, TLRecord, TLShapeId } from '@tldraw/tlschema'
|
|
2
|
+
import { BoxModel, TLPageId, TLRecord, TLShapeId } from '@tldraw/tlschema'
|
|
3
3
|
import { TLEventInfo } from './event-types'
|
|
4
4
|
|
|
5
5
|
/** @public */
|
|
@@ -16,12 +16,14 @@ export interface TLEventMap {
|
|
|
16
16
|
event: [TLEventInfo]
|
|
17
17
|
tick: [number]
|
|
18
18
|
frame: [number]
|
|
19
|
+
resize: [BoxModel]
|
|
19
20
|
'select-all-text': [{ shapeId: TLShapeId }]
|
|
20
21
|
'place-caret': [{ shapeId: TLShapeId; point: { x: number; y: number } }]
|
|
21
22
|
'created-shapes': [TLRecord[]]
|
|
22
23
|
'edited-shapes': [TLRecord[]]
|
|
23
24
|
'deleted-shapes': [TLShapeId[]]
|
|
24
25
|
edit: []
|
|
26
|
+
dispose: []
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
/** @public */
|
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 = '4.3.0-next.
|
|
4
|
+
export const version = '4.3.0-next.cc9c0708ca5c'
|
|
5
5
|
export const publishDates = {
|
|
6
6
|
major: '2025-09-18T14:39:22.803Z',
|
|
7
|
-
minor: '2025-
|
|
8
|
-
patch: '2025-
|
|
7
|
+
minor: '2025-12-02T12:14:36.796Z',
|
|
8
|
+
patch: '2025-12-02T12:14:36.796Z',
|
|
9
9
|
}
|