mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
6052743671
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced the Edgeless Selected Rectangle widget, providing enhanced selection and interaction capabilities in edgeless mode. - Added rotation-aware resize cursors for improved usability when resizing selections. - Integrated new autocomplete panels and selection components for a smoother user experience. - **Refactor** - Modularized the Edgeless Selected Rectangle widget as a standalone package for better maintainability and integration. - Updated internal references and imports to utilize the new widget package. - **Chores** - Updated project and package configurations to include the new widget and ensure proper build and type-checking across the workspace. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
24 lines
577 B
TypeScript
24 lines
577 B
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { effects } from './effects';
|
|
import { edgelessSelectedRectWidget } from './spec';
|
|
|
|
export class EdgelessSelectedRectViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-edgeless-selected-rect-widget';
|
|
|
|
override effect() {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
if (this.isEdgeless(context.scope)) {
|
|
context.register(edgelessSelectedRectWidget);
|
|
}
|
|
}
|
|
}
|