mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 00:06:09 +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 -->
35 lines
995 B
TypeScript
35 lines
995 B
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { effects } from './effects';
|
|
import {
|
|
HighlighterElementRendererExtension,
|
|
ShapeElementRendererExtension,
|
|
} from './element-renderer';
|
|
import { ShapeElementView } from './element-view';
|
|
import { ShapeTool } from './shape-tool';
|
|
import { shapeSeniorTool, shapeToolbarExtension } from './toolbar';
|
|
|
|
export class ShapeViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-shape-gfx';
|
|
|
|
override effect(): void {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
if (this.isEdgeless(context.scope)) {
|
|
context.register(HighlighterElementRendererExtension);
|
|
context.register(ShapeElementRendererExtension);
|
|
context.register(ShapeElementView);
|
|
context.register(ShapeTool);
|
|
context.register(shapeSeniorTool);
|
|
context.register(shapeToolbarExtension);
|
|
}
|
|
}
|
|
}
|