feat(editor): add page dragging area widget extension (#12045)

Closes: BS-3364

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new "Page Dragging Area" widget, enabling enhanced block selection and drag area detection within the user interface.
  - Added utilities for more precise block selection based on rectangular selection areas.

- **Improvements**
  - Integrated the new widget into the view extension system for consistent behavior across supported views.
  - Enhanced clipboard handling with comprehensive adapter configurations for various data types.

- **Refactor**
  - Streamlined widget registration and block selection logic for improved maintainability and modularity.
  - Removed legacy widget exports and registrations to centralize widget management.

- **Chores**
  - Updated workspace and TypeScript configurations to support the new widget module.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saul-Mirone
2025-04-29 01:44:59 +00:00
parent f177c64ca1
commit d82d37b53d
18 changed files with 305 additions and 161 deletions

View File

@@ -56,6 +56,7 @@ export const PackageList = [
'blocksuite/affine/widgets/frame-title',
'blocksuite/affine/widgets/keyboard-toolbar',
'blocksuite/affine/widgets/linked-doc',
'blocksuite/affine/widgets/page-dragging-area',
'blocksuite/affine/widgets/remote-selection',
'blocksuite/affine/widgets/scroll-anchoring',
'blocksuite/affine/widgets/slash-menu',
@@ -899,6 +900,19 @@ export const PackageList = [
'blocksuite/framework/store',
],
},
{
location: 'blocksuite/affine/widgets/page-dragging-area',
name: '@blocksuite/affine-widget-page-dragging-area',
workspaceDependencies: [
'blocksuite/affine/components',
'blocksuite/affine/ext-loader',
'blocksuite/affine/model',
'blocksuite/affine/shared',
'blocksuite/framework/global',
'blocksuite/framework/std',
'blocksuite/framework/store',
],
},
{
location: 'blocksuite/affine/widgets/remote-selection',
name: '@blocksuite/affine-widget-remote-selection',
@@ -1386,6 +1400,7 @@ export type PackageName =
| '@blocksuite/affine-widget-frame-title'
| '@blocksuite/affine-widget-keyboard-toolbar'
| '@blocksuite/affine-widget-linked-doc'
| '@blocksuite/affine-widget-page-dragging-area'
| '@blocksuite/affine-widget-remote-selection'
| '@blocksuite/affine-widget-scroll-anchoring'
| '@blocksuite/affine-widget-slash-menu'