Files
AFFiNE-Mirror/blocksuite/affine/widgets/edgeless-toolbar/src/view.ts
T
Saul-Mirone 25a2b94a43 feat(editor): edgeless auto connect widget extension (#11990)
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 -->
2025-04-26 01:21:49 +00:00

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