mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
@@ -1,8 +1,4 @@
|
||||
import { FileDropExtension } from '@blocksuite/affine-components/drop-indicator';
|
||||
import {
|
||||
TextElementRendererExtension,
|
||||
TextElementView,
|
||||
} from '@blocksuite/affine-gfx-text';
|
||||
import { NoteBlockSchema } from '@blocksuite/affine-model';
|
||||
import {
|
||||
AutoClearSelectionService,
|
||||
@@ -29,17 +25,6 @@ import { builtinToolbarConfig } from '../configs/toolbar';
|
||||
import { fallbackKeymap } from '../keyboard/keymap';
|
||||
import { viewportOverlayWidget } from './widgets';
|
||||
|
||||
/**
|
||||
* Why do we add these extensions into CommonSpecs?
|
||||
* Because in some cases we need to create edgeless elements in page mode.
|
||||
* And these view may contain some logic when elements initialize.
|
||||
*/
|
||||
const EdgelessElementViews = [TextElementView];
|
||||
|
||||
export const EdgelessElementRendererExtension: ExtensionType[] = [
|
||||
TextElementRendererExtension,
|
||||
];
|
||||
|
||||
export const CommonSpecs: ExtensionType[] = [
|
||||
FlavourExtension('affine:page'),
|
||||
DocModeService,
|
||||
@@ -52,8 +37,6 @@ export const CommonSpecs: ExtensionType[] = [
|
||||
AutoClearSelectionService,
|
||||
...RootBlockAdapterExtensions,
|
||||
...clipboardConfigs,
|
||||
...EdgelessElementViews,
|
||||
...EdgelessElementRendererExtension,
|
||||
SlashMenuExtension,
|
||||
linkedDocWidget,
|
||||
dragHandleWidget,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { textToolbarExtension } from '@blocksuite/affine-gfx-text';
|
||||
import { ToolbarModuleExtension } from '@blocksuite/affine-shared/services';
|
||||
import { BlockFlavourIdentifier } from '@blocksuite/std';
|
||||
import type { ExtensionType } from '@blocksuite/store';
|
||||
@@ -6,8 +5,6 @@ import type { ExtensionType } from '@blocksuite/store';
|
||||
import { builtinLockedToolbarConfig, builtinMiscToolbarConfig } from './misc';
|
||||
|
||||
export const EdgelessElementToolbarExtension: ExtensionType[] = [
|
||||
textToolbarExtension,
|
||||
|
||||
ToolbarModuleExtension({
|
||||
id: BlockFlavourIdentifier('affine:surface:*'),
|
||||
config: builtinMiscToolbarConfig,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { effects as gfxCanvasTextEffects } from '@blocksuite/affine-gfx-text/effects';
|
||||
import { effects as widgetEdgelessToolbarEffects } from '@blocksuite/affine-widget-edgeless-toolbar/effects';
|
||||
import { effects as widgetMobileToolbarEffects } from '@blocksuite/affine-widget-keyboard-toolbar/effects';
|
||||
import { effects as widgetLinkedDocEffects } from '@blocksuite/affine-widget-linked-doc/effects';
|
||||
@@ -54,7 +53,6 @@ export function effects() {
|
||||
|
||||
// Register components by category
|
||||
registerRootComponents();
|
||||
registerGfxEffects();
|
||||
registerWidgets();
|
||||
registerEdgelessToolbarComponents();
|
||||
registerMiscComponents();
|
||||
@@ -70,10 +68,6 @@ function registerRootComponents() {
|
||||
);
|
||||
}
|
||||
|
||||
function registerGfxEffects() {
|
||||
gfxCanvasTextEffects();
|
||||
}
|
||||
|
||||
function registerWidgets() {
|
||||
customElements.define(
|
||||
AFFINE_PAGE_DRAGGING_AREA_WIDGET,
|
||||
|
||||
Reference in New Issue
Block a user