Revert "Editor commands API / effects" (#1783)
Reverts tldraw/tldraw#1778. Fuzz testing picked up errors related to deleting pages and undo/redo which may doom this PR. ### Change Type - [x] `major` — Breaking change
This commit is contained in:
parent
e17074a8b3
commit
79fae186e4
139 changed files with 2705 additions and 3745 deletions
|
@ -33,7 +33,7 @@ export function createTLStore({ initialData, defaultName = '', ...rest }: TLStor
|
|||
'schema' in rest
|
||||
? rest.schema
|
||||
: createTLSchema({
|
||||
shapes: currentPageShapesToShapeMap(checkShapesAndAddCore(rest.shapeUtils)),
|
||||
shapes: shapesOnCurrentPageToShapeMap(checkShapesAndAddCore(rest.shapeUtils)),
|
||||
})
|
||||
return new Store({
|
||||
schema,
|
||||
|
@ -44,7 +44,7 @@ export function createTLStore({ initialData, defaultName = '', ...rest }: TLStor
|
|||
})
|
||||
}
|
||||
|
||||
function currentPageShapesToShapeMap(shapeUtils: TLShapeUtilConstructor<TLUnknownShape>[]) {
|
||||
function shapesOnCurrentPageToShapeMap(shapeUtils: TLShapeUtilConstructor<TLUnknownShape>[]) {
|
||||
return Object.fromEntries(
|
||||
shapeUtils.map((s): [string, SchemaShapeInfo] => [
|
||||
s.type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue