mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-20 19:42:04 +08:00
31 lines
639 B
TypeScript
31 lines
639 B
TypeScript
import type { BlockStdScope, EditorHost } from '@blocksuite/block-std';
|
|
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
|
import type { BlockModel, Doc } from '@blocksuite/store';
|
|
|
|
export abstract class MenuContext {
|
|
abstract get doc(): Doc;
|
|
|
|
get firstElement(): GfxModel | null {
|
|
return null;
|
|
}
|
|
|
|
abstract get host(): EditorHost;
|
|
|
|
abstract get selectedBlockModels(): BlockModel[];
|
|
|
|
abstract get std(): BlockStdScope;
|
|
|
|
// Sometimes we need to close the menu.
|
|
close() {}
|
|
|
|
isElement() {
|
|
return false;
|
|
}
|
|
|
|
abstract isEmpty(): boolean;
|
|
|
|
abstract isMultiple(): boolean;
|
|
|
|
abstract isSingle(): boolean;
|
|
}
|