mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
chore(editor): rename std.doc to std.store (#9596)
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user