@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.
@@ -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.ac3507ffc12d";
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-04T12:47:25.448Z",
29
- patch: "2026-02-04T12:47:25.448Z"
28
+ minor: "2026-02-04T08:49:09.694Z",
29
+ patch: "2026-02-04T08:49:09.694Z"
30
30
  };
31
31
  //# sourceMappingURL=version.js.map
@@ -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.ac3507ffc12d'\nexport const publishDates = {\n\tmajor: '2025-09-18T14:39:22.803Z',\n\tminor: '2026-02-04T12:47:25.448Z',\n\tpatch: '2026-02-04T12:47:25.448Z',\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 = '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
  }
@@ -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
  *
@@ -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.ac3507ffc12d",
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._setCameraState("idle");
3124
+ this._cameraState.set("idle");
3124
3125
  }
3125
3126
  _tickCameraState() {
3126
3127
  this._cameraStateTimeoutRemaining = this.options.cameraMovingTimeoutMs;
3127
- if (this.getInstanceState().cameraState !== "idle") return;
3128
- this._setCameraState("moving");
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.getInstanceState().cameraState;
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 = [...pageState.selectedShapeIds];
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
  }