@tldraw/editor 3.14.0-canary.d1b8a584b27c → 3.14.0-canary.d3680a84375b

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/lib/editor/types/emit-types.ts"],
4
- "sourcesContent": ["import { HistoryEntry } from '@tldraw/store'\nimport { TLPageId, TLRecord, TLShapeId } from '@tldraw/tlschema'\nimport { TLEventInfo } from './event-types'\n\n/** @public */\nexport interface TLEventMap {\n\t// Lifecycle / Internal\n\tmount: []\n\t'max-shapes': [{ name: string; pageId: TLPageId; count: number }]\n\tchange: [HistoryEntry<TLRecord>]\n\tupdate: []\n\tcrash: [{ error: unknown }]\n\t'stop-camera-animation': []\n\t'stop-following': []\n\t'before-event': [TLEventInfo]\n\tevent: [TLEventInfo]\n\ttick: [number]\n\tframe: [number]\n\t'select-all-text': [{ shapeId: TLShapeId }]\n\t'place-caret': [{ shapeId: TLShapeId; point: { x: number; y: number } }]\n}\n\n/** @public */\nexport type TLEventMapHandler<T extends keyof TLEventMap> = (...args: TLEventMap[T]) => void\n"],
4
+ "sourcesContent": ["import { HistoryEntry } from '@tldraw/store'\nimport { TLPageId, TLRecord, TLShapeId } from '@tldraw/tlschema'\nimport { TLEventInfo } from './event-types'\n\n/** @public */\nexport interface TLEventMap {\n\t// Lifecycle / Internal\n\tmount: []\n\t'max-shapes': [{ name: string; pageId: TLPageId; count: number }]\n\tchange: [HistoryEntry<TLRecord>]\n\tupdate: []\n\tcrash: [{ error: unknown }]\n\t'stop-camera-animation': []\n\t'stop-following': []\n\t'before-event': [TLEventInfo]\n\tevent: [TLEventInfo]\n\ttick: [number]\n\tframe: [number]\n\t'select-all-text': [{ shapeId: TLShapeId }]\n\t'place-caret': [{ shapeId: TLShapeId; point: { x: number; y: number } }]\n\t'created-shapes': [TLRecord[]]\n\t'edited-shapes': [TLRecord[]]\n\t'deleted-shapes': [TLShapeId[]]\n\tedit: []\n}\n\n/** @public */\nexport type TLEventMapHandler<T extends keyof TLEventMap> = (...args: TLEventMap[T]) => void\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -22,10 +22,10 @@ __export(version_exports, {
22
22
  version: () => version
23
23
  });
24
24
  module.exports = __toCommonJS(version_exports);
25
- const version = "3.14.0-canary.d1b8a584b27c";
25
+ const version = "3.14.0-canary.d3680a84375b";
26
26
  const publishDates = {
27
27
  major: "2024-09-13T14:36:29.063Z",
28
- minor: "2025-06-23T14:58:35.827Z",
29
- patch: "2025-06-23T14:58:35.827Z"
28
+ minor: "2025-06-24T15:01:38.014Z",
29
+ patch: "2025-06-24T15:01:38.014Z"
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 = '3.14.0-canary.d1b8a584b27c'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-06-23T14:58:35.827Z',\n\tpatch: '2025-06-23T14:58:35.827Z',\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 = '3.14.0-canary.d3680a84375b'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-06-24T15:01:38.014Z',\n\tpatch: '2025-06-24T15:01:38.014Z',\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
  }
@@ -6530,6 +6530,10 @@ export declare interface TLEventMap {
6530
6530
  };
6531
6531
  shapeId: TLShapeId;
6532
6532
  }];
6533
+ 'created-shapes': [TLRecord[]];
6534
+ 'edited-shapes': [TLRecord[]];
6535
+ 'deleted-shapes': [TLShapeId[]];
6536
+ edit: [];
6533
6537
  }
6534
6538
 
6535
6539
  /** @public */
@@ -292,7 +292,7 @@ function debugEnableLicensing() {
292
292
  }
293
293
  registerTldrawLibraryVersion(
294
294
  "@tldraw/editor",
295
- "3.14.0-canary.d1b8a584b27c",
295
+ "3.14.0-canary.d3680a84375b",
296
296
  "esm"
297
297
  );
298
298
  export {
@@ -5900,6 +5900,8 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
5900
5900
  ...shape.meta
5901
5901
  };
5902
5902
  });
5903
+ this.emit("created-shapes", shapeRecordsToCreate);
5904
+ this.emit("edit");
5903
5905
  this.store.put(shapeRecordsToCreate);
5904
5906
  });
5905
5907
  return this;
@@ -6141,6 +6143,8 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
6141
6143
  updated = this.getShapeUtil(shape).onBeforeUpdate?.(shape, updated) ?? updated;
6142
6144
  updates.push(updated);
6143
6145
  }
6146
+ this.emit("edited-shapes", updates);
6147
+ this.emit("edit");
6144
6148
  this.store.put(updates);
6145
6149
  });
6146
6150
  }
@@ -6162,6 +6166,8 @@ class Editor extends (_a = EventEmitter, _getIsShapeHiddenCache_dec = [computed]
6162
6166
  allShapeIdsToDelete.add(childId);
6163
6167
  });
6164
6168
  }
6169
+ this.emit("deleted-shapes", [...allShapeIdsToDelete]);
6170
+ this.emit("edit");
6165
6171
  return this.run(() => this.store.remove([...allShapeIdsToDelete]));
6166
6172
  }
6167
6173
  deleteShape(_id) {