chore(editor): rename std.doc to std.store (#9596)

This commit is contained in:
Saul-Mirone
2025-01-09 04:16:28 +00:00
parent 58ce86533e
commit d21ef47ae8
89 changed files with 359 additions and 348 deletions
@@ -75,7 +75,7 @@ export class EdgelessCRUDExtension extends Extension {
index: gfx.layer.generateIndex(),
};
return this.std.doc.addBlock(
return this.std.store.addBlock(
flavour as never,
nProps,
parentId,
@@ -123,14 +123,14 @@ export class EdgelessCRUDExtension extends Extension {
return;
}
const block = this.std.doc.getBlockById(id);
const block = this.std.store.getBlockById(id);
if (block) {
const key = getLastPropsKey(
block.flavour as BlockSuite.EdgelessModelKeys,
{ ...block.yBlock.toJSON(), ...props }
);
key && this.std.get(EditPropsStore).recordLastProps(key, props);
this.std.doc.updateBlock(block, props);
this.std.store.updateBlock(block, props);
}
};
@@ -141,7 +141,7 @@ export class EdgelessCRUDExtension extends Extension {
}
const el =
surface.getElementById(id) ??
(this.std.doc.getBlockById(
(this.std.store.getBlockById(
id
) as BlockSuite.EdgelessBlockModelType | null);
return el;