mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 13:38:49 +08:00
refactor(editor): inner toolbar surface-ref block with extension (#11246)
This PR refactor `surface-ref` toolbar with `ToolbarExtension`
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import { SurfaceRefGenericBlockPortal } from './portal/generic-block.js';
|
||||
import { SurfaceRefNotePortal } from './portal/note.js';
|
||||
import { SurfaceRefBlockComponent } from './surface-ref-block.js';
|
||||
import { EdgelessSurfaceRefBlockComponent } from './surface-ref-block-edgeless.js';
|
||||
import {
|
||||
AFFINE_SURFACE_REF_TOOLBAR,
|
||||
AffineSurfaceRefToolbar,
|
||||
} from './widgets/surface-ref-toolbar.js';
|
||||
import { SurfaceRefToolbarTitle } from './components';
|
||||
import { SurfaceRefGenericBlockPortal } from './portal/generic-block';
|
||||
import { SurfaceRefNotePortal } from './portal/note';
|
||||
import { SurfaceRefBlockComponent } from './surface-ref-block';
|
||||
import { EdgelessSurfaceRefBlockComponent } from './surface-ref-block-edgeless';
|
||||
|
||||
export function effects() {
|
||||
customElements.define(
|
||||
@@ -18,5 +15,11 @@ export function effects() {
|
||||
EdgelessSurfaceRefBlockComponent
|
||||
);
|
||||
customElements.define('surface-ref-note-portal', SurfaceRefNotePortal);
|
||||
customElements.define(AFFINE_SURFACE_REF_TOOLBAR, AffineSurfaceRefToolbar);
|
||||
customElements.define('surface-ref-toolbar-title', SurfaceRefToolbarTitle);
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'surface-ref-toolbar-title': SurfaceRefToolbarTitle;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user