@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
|
@@ -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
|
}
|
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 = "3.14.0-canary.
|
|
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-
|
|
29
|
-
patch: "2025-06-
|
|
28
|
+
minor: "2025-06-24T15:01:38.014Z",
|
|
29
|
+
patch: "2025-06-24T15:01:38.014Z"
|
|
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 = '3.14.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 = '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
|
}
|
package/dist-esm/index.d.mts
CHANGED
package/dist-esm/index.mjs
CHANGED
|
@@ -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) {
|