mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-31 17:19:56 +08:00
f0a233368d
Closes: BS-3209 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced mind map view and store extensions, enhancing mind map integration and conversion to plain text and markdown formats. - Added priority property to quick tools, allowing for custom ordering in the toolbar. - **Improvements** - Toolbar quick tools are now sorted by priority for a more intuitive user experience. - Updated toolbar and extension configurations to streamline available tools and extensions. - **Bug Fixes** - Conditional registration of certain components ensures correct behavior in edgeless mode. - **Chores** - Updated dependencies and project references to improve module integration and maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { effects } from './effects';
|
|
import { MindmapElementRendererExtension } from './element-renderer';
|
|
import { MindMapIndicatorOverlay } from './indicator-overlay';
|
|
import { MindMapDragExtension } from './interactivity';
|
|
import {
|
|
mindmapToolbarExtension,
|
|
shapeMindmapToolbarExtension,
|
|
} from './toolbar/config';
|
|
import { mindMapSeniorTool } from './toolbar/senior-tool';
|
|
import { MindMapView } from './view/view';
|
|
|
|
export class MindmapViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-mindmap-gfx';
|
|
|
|
override effect(): void {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
context.register(MindmapElementRendererExtension);
|
|
context.register(mindMapSeniorTool);
|
|
context.register(mindmapToolbarExtension);
|
|
context.register(shapeMindmapToolbarExtension);
|
|
context.register(MindMapView);
|
|
context.register(MindMapDragExtension);
|
|
context.register(MindMapIndicatorOverlay);
|
|
}
|
|
}
|