@tldraw/editor 3.14.0-canary.ee7f3d43f08d → 3.14.0-canary.efa8f9545620

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.
@@ -6002,6 +6002,7 @@ export declare interface TLCropInfo<T extends TLShape> {
6002
6002
  w: number;
6003
6003
  };
6004
6004
  initialShape: T;
6005
+ aspectRatioLocked?: boolean;
6005
6006
  }
6006
6007
 
6007
6008
  /** @public */
@@ -6529,6 +6530,10 @@ export declare interface TLEventMap {
6529
6530
  };
6530
6531
  shapeId: TLShapeId;
6531
6532
  }];
6533
+ 'created-shapes': [TLRecord[]];
6534
+ 'edited-shapes': [TLRecord[]];
6535
+ 'deleted-shapes': [TLShapeId[]];
6536
+ edit: [];
6532
6537
  }
6533
6538
 
6534
6539
  /** @public */
@@ -6784,6 +6789,7 @@ export declare interface TLMeasureTextOpts {
6784
6789
  fontWeight: string;
6785
6790
  fontFamily: string;
6786
6791
  fontSize: number;
6792
+ /** This must be a number, e.g. 1.35, not a pixel value. */
6787
6793
  lineHeight: number;
6788
6794
  /**
6789
6795
  * When maxWidth is a number, the text will be wrapped to that maxWidth. When maxWidth
package/dist-cjs/index.js CHANGED
@@ -361,7 +361,7 @@ function debugEnableLicensing() {
361
361
  }
362
362
  (0, import_utils.registerTldrawLibraryVersion)(
363
363
  "@tldraw/editor",
364
- "3.14.0-canary.ee7f3d43f08d",
364
+ "3.14.0-canary.efa8f9545620",
365
365
  "cjs"
366
366
  );
367
367
  //# sourceMappingURL=index.js.map
@@ -5866,6 +5866,8 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
5866
5866
  ...shape.meta
5867
5867
  };
5868
5868
  });
5869
+ this.emit("created-shapes", shapeRecordsToCreate);
5870
+ this.emit("edit");
5869
5871
  this.store.put(shapeRecordsToCreate);
5870
5872
  });
5871
5873
  return this;
@@ -6107,6 +6109,8 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
6107
6109
  updated = this.getShapeUtil(shape).onBeforeUpdate?.(shape, updated) ?? updated;
6108
6110
  updates.push(updated);
6109
6111
  }
6112
+ this.emit("edited-shapes", updates);
6113
+ this.emit("edit");
6110
6114
  this.store.put(updates);
6111
6115
  });
6112
6116
  }
@@ -6128,6 +6132,8 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
6128
6132
  allShapeIdsToDelete.add(childId);
6129
6133
  });
6130
6134
  }
6135
+ this.emit("deleted-shapes", [...allShapeIdsToDelete]);
6136
+ this.emit("edit");
6131
6137
  return this.run(() => this.store.remove([...allShapeIdsToDelete]));
6132
6138
  }
6133
6139
  deleteShape(_id) {