Files
AFFiNE-Mirror/blocksuite/affine/widgets/remote-selection/src/view.ts
T
Saul-Mirone 59d4942d9b feat(editor): slash menu and toolbar widget extensions (#12002)
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 -->
2025-04-26 23:28:49 +08:00

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);
}
}
}