mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 03:19:52 +08:00
refactor(editor): reorg block specs (#9421)
This commit is contained in:
@@ -64,19 +64,28 @@ export const pageRootWidgetViewMap = {
|
||||
[AFFINE_SCROLL_ANCHORING_WIDGET]: literal`${unsafeStatic(AFFINE_SCROLL_ANCHORING_WIDGET)}`,
|
||||
};
|
||||
|
||||
export const PageRootBlockSpec: ExtensionType[] = [
|
||||
const PageCommonExtension: ExtensionType[] = [
|
||||
FlavourExtension('affine:page'),
|
||||
PageRootService,
|
||||
DocModeService,
|
||||
ThemeService,
|
||||
EmbedOptionService,
|
||||
CommandExtension(commands),
|
||||
DocDisplayMetaService,
|
||||
PageViewportServiceExtension,
|
||||
];
|
||||
|
||||
export const PageRootBlockSpec: ExtensionType[] = [
|
||||
...PageCommonExtension,
|
||||
BlockViewExtension('affine:page', literal`affine-page-root`),
|
||||
CommandExtension(commands),
|
||||
WidgetViewMapExtension('affine:page', pageRootWidgetViewMap),
|
||||
ExportManagerExtension,
|
||||
DNDAPIExtension,
|
||||
PageViewportServiceExtension,
|
||||
DocDisplayMetaService,
|
||||
RootBlockAdapterExtensions,
|
||||
FileDropExtension,
|
||||
].flat();
|
||||
|
||||
export const PreviewPageRootBlockSpec: ExtensionType[] = [
|
||||
...PageCommonExtension,
|
||||
BlockViewExtension('affine:page', literal`affine-preview-root`),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user