Files
AFFiNE-Mirror/blocksuite/affine/widgets/edgeless-selected-rect/src/view.ts
T
Saul-Mirone 6052743671 refactor(editor): extract selected rect widget (#12290)
<!-- 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 -->
2025-05-15 04:25:07 +00:00

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