mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
3a2fe0bf91
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced two new widgets: Edgeless Dragging Area and Note Slicer, now available for use. - Added extension support for these widgets, enabling enhanced interaction and integration within the application. - **Chores** - Updated package configurations and workspace settings to include the new widgets and their dependencies. - Added project references and configuration files to support modular development and build processes. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
24 lines
543 B
TypeScript
24 lines
543 B
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { effects } from './effects';
|
|
import { noteSlicerWidget } from './note-slicer';
|
|
|
|
export class NoteSlicerViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-note-slicer-widget';
|
|
|
|
override effect() {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
if (this.isEdgeless(context.scope)) {
|
|
context.register(noteSlicerWidget);
|
|
}
|
|
}
|
|
}
|