@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-cjs/version.js
CHANGED
|
@@ -22,10 +22,10 @@ __export(version_exports, {
|
|
|
22
22
|
version: () => version
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(version_exports);
|
|
25
|
-
const version = "4.4.0-canary.
|
|
25
|
+
const version = "4.4.0-canary.afdcafe834b3";
|
|
26
26
|
const publishDates = {
|
|
27
27
|
major: "2025-09-18T14:39:22.803Z",
|
|
28
|
-
minor: "2026-02-
|
|
29
|
-
patch: "2026-02-
|
|
28
|
+
minor: "2026-02-04T08:49:09.694Z",
|
|
29
|
+
patch: "2026-02-04T08:49:09.694Z"
|
|
30
30
|
};
|
|
31
31
|
//# sourceMappingURL=version.js.map
|
package/dist-cjs/version.js.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": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist-esm/index.d.mts
CHANGED
|
@@ -2259,10 +2259,10 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
2259
2259
|
*/
|
|
2260
2260
|
stopFollowingUser(): this;
|
|
2261
2261
|
/* Excluded from this release type: getUnorderedRenderingShapes */
|
|
2262
|
+
private _cameraState;
|
|
2262
2263
|
private _cameraStateTimeoutRemaining;
|
|
2263
2264
|
private _decayCameraStateTimeout;
|
|
2264
2265
|
private _tickCameraState;
|
|
2265
|
-
private _setCameraState;
|
|
2266
2266
|
/**
|
|
2267
2267
|
* Whether the camera is moving or idle.
|
|
2268
2268
|
*
|
package/dist-esm/index.mjs
CHANGED
|
@@ -300,7 +300,7 @@ import { uniq } from "./lib/utils/uniq.mjs";
|
|
|
300
300
|
import { openWindow } from "./lib/utils/window-open.mjs";
|
|
301
301
|
registerTldrawLibraryVersion(
|
|
302
302
|
"@tldraw/editor",
|
|
303
|
-
"4.4.0-canary.
|
|
303
|
+
"4.4.0-canary.afdcafe834b3",
|
|
304
304
|
"esm"
|
|
305
305
|
);
|
|
306
306
|
export {
|
|
@@ -331,6 +331,7 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
331
331
|
// unmount / remount in the DOM, which is expensive; and computing visibility is
|
|
332
332
|
// also expensive in large projects. For this reason, we use a second bounding
|
|
333
333
|
// box just for rendering, and we only update after the camera stops moving.
|
|
334
|
+
__publicField(this, "_cameraState", atom("camera state", "idle"));
|
|
334
335
|
__publicField(this, "_cameraStateTimeoutRemaining", 0);
|
|
335
336
|
/* @internal */
|
|
336
337
|
__publicField(this, "_currentPageShapeIds");
|
|
@@ -3120,18 +3121,15 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
3120
3121
|
this._cameraStateTimeoutRemaining -= elapsed;
|
|
3121
3122
|
if (this._cameraStateTimeoutRemaining > 0) return;
|
|
3122
3123
|
this.off("tick", this._decayCameraStateTimeout);
|
|
3123
|
-
this.
|
|
3124
|
+
this._cameraState.set("idle");
|
|
3124
3125
|
}
|
|
3125
3126
|
_tickCameraState() {
|
|
3126
3127
|
this._cameraStateTimeoutRemaining = this.options.cameraMovingTimeoutMs;
|
|
3127
|
-
if (this.
|
|
3128
|
-
this.
|
|
3128
|
+
if (this._cameraState.__unsafe__getWithoutCapture() !== "idle") return;
|
|
3129
|
+
this._cameraState.set("moving");
|
|
3129
3130
|
this._debouncedZoomLevel.set(unsafe__withoutCapture(() => this.getCamera().z));
|
|
3130
3131
|
this.on("tick", this._decayCameraStateTimeout);
|
|
3131
3132
|
}
|
|
3132
|
-
_setCameraState(cameraState) {
|
|
3133
|
-
this.updateInstanceState({ cameraState }, { history: "ignore" });
|
|
3134
|
-
}
|
|
3135
3133
|
/**
|
|
3136
3134
|
* Whether the camera is moving or idle.
|
|
3137
3135
|
*
|
|
@@ -3143,7 +3141,7 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
3143
3141
|
* @public
|
|
3144
3142
|
*/
|
|
3145
3143
|
getCameraState() {
|
|
3146
|
-
return this.
|
|
3144
|
+
return this._cameraState.get();
|
|
3147
3145
|
}
|
|
3148
3146
|
getRenderingShapes() {
|
|
3149
3147
|
const renderingShapes = this.getUnorderedRenderingShapes(true);
|
|
@@ -7602,7 +7600,9 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
7602
7600
|
case "pinch_start": {
|
|
7603
7601
|
if (inputs.getIsPinching()) return;
|
|
7604
7602
|
if (!inputs.getIsEditing()) {
|
|
7605
|
-
this._selectedShapeIdsAtPointerDown
|
|
7603
|
+
if (!this._selectedShapeIdsAtPointerDown.length) {
|
|
7604
|
+
this._selectedShapeIdsAtPointerDown = [...pageState.selectedShapeIds];
|
|
7605
|
+
}
|
|
7606
7606
|
this._didPinch = true;
|
|
7607
7607
|
inputs.setIsPinching(true);
|
|
7608
7608
|
this.interrupt();
|
|
@@ -7817,7 +7817,6 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
|
|
|
7817
7817
|
this.setCurrentTool(this._restoreToolId);
|
|
7818
7818
|
}
|
|
7819
7819
|
}
|
|
7820
|
-
this._selectedShapeIdsAtPointerDown = [];
|
|
7821
7820
|
break;
|
|
7822
7821
|
}
|
|
7823
7822
|
}
|