mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
25a2b94a43
Closes: BS-3221 Closes: BS-3222 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced extensions that conditionally register edgeless auto-connect and toolbar widgets with associated effects based on the view context. - Added new exports for edgeless auto-connect and toolbar widget views, making them available for external use. - **Chores** - Updated dependencies and project references to include the extension loader for improved module integration. - Refined workspace configuration to reflect new package dependencies. - **Refactor** - Streamlined registration and effect logic by removing legacy integration points for edgeless auto-connect and toolbar widgets. - Reorganized widget export paths to a more modular directory structure. - **Bug Fixes** - Disabled pointer events on the edgeless navigator black background to prevent interaction interference. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
24 lines
568 B
TypeScript
24 lines
568 B
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { edgelessToolbarWidget } from './edgeless-toolbar';
|
|
import { effects } from './effects';
|
|
|
|
export class EdgelessToolbarViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-edgeless-toolbar-widget';
|
|
|
|
override effect() {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
if (this.isEdgeless(context.scope)) {
|
|
context.register(edgelessToolbarWidget);
|
|
}
|
|
}
|
|
}
|