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

View File

@@ -27,11 +27,11 @@ export const insertSurfaceRefBlockCommand: Command<
reference,
};
const surface = getSurfaceBlock(std.doc);
const surface = getSurfaceBlock(std.store);
if (!surface) return;
const element = surface.getElementById(reference);
const blockModel = std.doc.getBlock(reference)?.model ?? null;
const blockModel = std.store.getBlock(reference)?.model ?? null;
if (element?.type === 'group') {
surfaceRefProps.refFlavour = 'group';
@@ -42,7 +42,7 @@ export const insertSurfaceRefBlockCommand: Command<
return;
}
const result = std.doc.addSiblingBlocks(
const result = std.store.addSiblingBlocks(
targetModel,
[surfaceRefProps],
place
@@ -50,7 +50,7 @@ export const insertSurfaceRefBlockCommand: Command<
if (result.length === 0) return;
if (removeEmptyLine && targetModel.text?.length === 0) {
std.doc.deleteBlock(targetModel);
std.store.deleteBlock(targetModel);
}
next({

View File

@@ -460,7 +460,7 @@ export class SurfaceRefBlockComponent extends BlockComponent<SurfaceRefBlockMode
override mounted() {
const crud = this.std.get(EdgelessCRUDExtension);
const { _disposable } = this;
const surfaceModel = getSurfaceBlock(this.std.doc);
const surfaceModel = getSurfaceBlock(this.std.store);
if (!surfaceModel) return;
const referenceElement = crud.getElementById(referenceId);