@tldraw/editor 4.4.0-canary.ac3507ffc12d → 4.4.0-canary.afdcafe834b3
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 +1 -1
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/editor/Editor.js +8 -9
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +1 -1
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/editor/Editor.mjs +8 -9
- 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/editor.css +0 -5
- package/package.json +7 -7
- package/src/lib/editor/Editor.ts +8 -17
- package/src/version.ts +3 -3
package/dist-esm/version.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const version = "4.4.0-canary.
|
|
1
|
+
const version = "4.4.0-canary.afdcafe834b3";
|
|
2
2
|
const publishDates = {
|
|
3
3
|
major: "2025-09-18T14:39:22.803Z",
|
|
4
|
-
minor: "2026-02-
|
|
5
|
-
patch: "2026-02-
|
|
4
|
+
minor: "2026-02-04T08:49:09.694Z",
|
|
5
|
+
patch: "2026-02-04T08:49:09.694Z"
|
|
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.4.0-canary.
|
|
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.4.0-canary.afdcafe834b3'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2026-02-04T08:49:09.694Z',\n\tpatch: '2026-02-04T08:49:09.694Z',\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/editor.css
CHANGED
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
|
|
61
61
|
/* Misc */
|
|
62
62
|
--tl-zoom: 1;
|
|
63
|
-
--tl-tab-size: 2;
|
|
64
63
|
|
|
65
64
|
/* Cursor SVGs */
|
|
66
65
|
--tl-cursor-none: none;
|
|
@@ -896,10 +895,6 @@ input,
|
|
|
896
895
|
/* white-space: break-spaces; */
|
|
897
896
|
}
|
|
898
897
|
|
|
899
|
-
.tl-rich-text {
|
|
900
|
-
tab-size: var(--tl-tab-size, 2);
|
|
901
|
-
}
|
|
902
|
-
|
|
903
898
|
.tl-rich-text p {
|
|
904
899
|
margin: 0;
|
|
905
900
|
/* Depending on the extensions, <p> tags can be empty, without a <br />. */
|
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.4.0-canary.
|
|
4
|
+
"version": "4.4.0-canary.afdcafe834b3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"@tiptap/core": "^3.12.1",
|
|
51
51
|
"@tiptap/pm": "^3.12.1",
|
|
52
52
|
"@tiptap/react": "^3.12.1",
|
|
53
|
-
"@tldraw/state": "4.4.0-canary.
|
|
54
|
-
"@tldraw/state-react": "4.4.0-canary.
|
|
55
|
-
"@tldraw/store": "4.4.0-canary.
|
|
56
|
-
"@tldraw/tlschema": "4.4.0-canary.
|
|
57
|
-
"@tldraw/utils": "4.4.0-canary.
|
|
58
|
-
"@tldraw/validate": "4.4.0-canary.
|
|
53
|
+
"@tldraw/state": "4.4.0-canary.afdcafe834b3",
|
|
54
|
+
"@tldraw/state-react": "4.4.0-canary.afdcafe834b3",
|
|
55
|
+
"@tldraw/store": "4.4.0-canary.afdcafe834b3",
|
|
56
|
+
"@tldraw/tlschema": "4.4.0-canary.afdcafe834b3",
|
|
57
|
+
"@tldraw/utils": "4.4.0-canary.afdcafe834b3",
|
|
58
|
+
"@tldraw/validate": "4.4.0-canary.afdcafe834b3",
|
|
59
59
|
"@use-gesture/react": "^10.3.1",
|
|
60
60
|
"classnames": "^2.5.1",
|
|
61
61
|
"eventemitter3": "^4.0.7",
|
package/src/lib/editor/Editor.ts
CHANGED
|
@@ -443,7 +443,6 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
443
443
|
const deletedShapeIds = new Set<TLShapeId>()
|
|
444
444
|
const invalidParents = new Set<TLShapeId>()
|
|
445
445
|
let invalidBindingTypes = new Set<TLBinding['type']>()
|
|
446
|
-
|
|
447
446
|
this.disposables.add(
|
|
448
447
|
this.sideEffects.registerOperationCompleteHandler(() => {
|
|
449
448
|
// this needs to be cleared here because further effects may delete more shapes
|
|
@@ -4181,25 +4180,23 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
4181
4180
|
// unmount / remount in the DOM, which is expensive; and computing visibility is
|
|
4182
4181
|
// also expensive in large projects. For this reason, we use a second bounding
|
|
4183
4182
|
// box just for rendering, and we only update after the camera stops moving.
|
|
4183
|
+
private _cameraState = atom('camera state', 'idle' as 'idle' | 'moving')
|
|
4184
4184
|
private _cameraStateTimeoutRemaining = 0
|
|
4185
4185
|
private _decayCameraStateTimeout(elapsed: number) {
|
|
4186
4186
|
this._cameraStateTimeoutRemaining -= elapsed
|
|
4187
4187
|
if (this._cameraStateTimeoutRemaining > 0) return
|
|
4188
4188
|
this.off('tick', this._decayCameraStateTimeout)
|
|
4189
|
-
this.
|
|
4189
|
+
this._cameraState.set('idle')
|
|
4190
4190
|
}
|
|
4191
4191
|
private _tickCameraState() {
|
|
4192
4192
|
// always reset the timeout
|
|
4193
4193
|
this._cameraStateTimeoutRemaining = this.options.cameraMovingTimeoutMs
|
|
4194
4194
|
// If the state is idle, then start the tick
|
|
4195
|
-
if (this.
|
|
4196
|
-
this.
|
|
4195
|
+
if (this._cameraState.__unsafe__getWithoutCapture() !== 'idle') return
|
|
4196
|
+
this._cameraState.set('moving')
|
|
4197
4197
|
this._debouncedZoomLevel.set(unsafe__withoutCapture(() => this.getCamera().z))
|
|
4198
4198
|
this.on('tick', this._decayCameraStateTimeout)
|
|
4199
4199
|
}
|
|
4200
|
-
private _setCameraState(cameraState: 'idle' | 'moving') {
|
|
4201
|
-
this.updateInstanceState({ cameraState }, { history: 'ignore' })
|
|
4202
|
-
}
|
|
4203
4200
|
|
|
4204
4201
|
/**
|
|
4205
4202
|
* Whether the camera is moving or idle.
|
|
@@ -4212,7 +4209,7 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
4212
4209
|
* @public
|
|
4213
4210
|
*/
|
|
4214
4211
|
getCameraState() {
|
|
4215
|
-
return this.
|
|
4212
|
+
return this._cameraState.get()
|
|
4216
4213
|
}
|
|
4217
4214
|
|
|
4218
4215
|
/**
|
|
@@ -10424,10 +10421,9 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
10424
10421
|
if (inputs.getIsPinching()) return
|
|
10425
10422
|
|
|
10426
10423
|
if (!inputs.getIsEditing()) {
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
this._selectedShapeIdsAtPointerDown = [...pageState.selectedShapeIds]
|
|
10424
|
+
if (!this._selectedShapeIdsAtPointerDown.length) {
|
|
10425
|
+
this._selectedShapeIdsAtPointerDown = [...pageState.selectedShapeIds]
|
|
10426
|
+
}
|
|
10431
10427
|
|
|
10432
10428
|
this._didPinch = true
|
|
10433
10429
|
|
|
@@ -10738,11 +10734,6 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
10738
10734
|
this.setCurrentTool(this._restoreToolId)
|
|
10739
10735
|
}
|
|
10740
10736
|
}
|
|
10741
|
-
|
|
10742
|
-
// Clear the stashed selection so the next pinch captures fresh state.
|
|
10743
|
-
// This fixes Safari pinch zoom restoring outdated selections.
|
|
10744
|
-
this._selectedShapeIdsAtPointerDown = []
|
|
10745
|
-
|
|
10746
10737
|
break
|
|
10747
10738
|
}
|
|
10748
10739
|
}
|
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.4.0-canary.
|
|
4
|
+
export const version = '4.4.0-canary.afdcafe834b3'
|
|
5
5
|
export const publishDates = {
|
|
6
6
|
major: '2025-09-18T14:39:22.803Z',
|
|
7
|
-
minor: '2026-02-
|
|
8
|
-
patch: '2026-02-
|
|
7
|
+
minor: '2026-02-04T08:49:09.694Z',
|
|
8
|
+
patch: '2026-02-04T08:49:09.694Z',
|
|
9
9
|
}
|