@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.
- package/dist-cjs/index.d.ts +4 -0
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/editor/Editor.js +6 -0
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/types/emit-types.js.map +1 -1
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +4 -0
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/editor/Editor.mjs +6 -0
- 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/package.json +7 -7
- package/src/lib/editor/Editor.ts +6 -0
- package/src/lib/editor/types/emit-types.ts +4 -0
- package/src/version.ts +3 -3
package/dist-cjs/index.d.ts
CHANGED
package/dist-cjs/index.js
CHANGED
|
@@ -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) {
|