mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
59d4942d9b
Closes: BS-3226 Closes: BS-3227 Closes: BS-3228 Closes: BS-3229 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced new view extensions for remote selection, scroll anchoring, slash menu, and toolbar widgets, enhancing customization and integration capabilities. - **Refactor** - Updated export paths and module structure for widget-related packages to improve modularity and accessibility. - Reorganized internal dependencies and removed redundant widget imports from core block packages. - Refactored edgeless-related widgets and components to use a standardized scope interface for improved context and state management. - Centralized graphics controller access and slot management through standardized context objects. - **Chores** - Added and updated dependencies to streamline extension loading and workspace management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
28 lines
650 B
TypeScript
28 lines
650 B
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { effects } from './effects';
|
|
import {
|
|
docRemoteSelectionWidget,
|
|
edgelessRemoteSelectionWidget,
|
|
} from './index';
|
|
|
|
export class RemoteSelectionViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-remote-selection-widget';
|
|
|
|
override effect() {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
context.register(docRemoteSelectionWidget);
|
|
if (context.scope === 'edgeless') {
|
|
context.register(edgelessRemoteSelectionWidget);
|
|
}
|
|
}
|
|
}
|