feat(editor): gfx link extension (#12046)

Closes: BS-3368

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

## Summary by CodeRabbit

- **New Features**
  - Introduced a new link tool extension, enabling enhanced link-related functionality within the edgeless workspace.
  - Added a new view extension for link tools, improving integration and usability in edgeless mode.

- **Chores**
  - Added a new package for link tool functionality with appropriate dependencies and exports.
  - Registered new custom elements for edgeless toolbars and link tools to support modular UI components.
  - Updated project configurations and workspace dependencies to include the new link tool module.

- **Refactor**
  - Removed unused quick tool exports and toolbar component registrations to streamline the edgeless extension codebase.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saul-Mirone
2025-04-29 03:19:37 +00:00
parent be28038e94
commit 4c84e6bac7
21 changed files with 181 additions and 28 deletions
@@ -12,9 +12,6 @@ import {
EDGELESS_SELECTED_RECT_WIDGET,
EdgelessSelectedRectWidget,
} from './edgeless/components/rects/edgeless-selected-rect.js';
import { EdgelessSlideMenu } from './edgeless/components/toolbar/common/slide-menu.js';
import { ToolbarArrowUpIcon } from './edgeless/components/toolbar/common/toolbar-arrow-up-icon.js';
import { EdgelessLinkToolButton } from './edgeless/components/toolbar/link/link-tool-button.js';
import {
EdgelessRootBlockComponent,
EdgelessRootPreviewBlockComponent,
@@ -25,7 +22,6 @@ import {
export function effects() {
// Register components by category
registerRootComponents();
registerEdgelessToolbarComponents();
registerMiscComponents();
}
@@ -39,17 +35,6 @@ function registerRootComponents() {
);
}
function registerEdgelessToolbarComponents() {
// Tool buttons
customElements.define('edgeless-link-tool-button', EdgelessLinkToolButton);
// Menus
customElements.define('edgeless-slide-menu', EdgelessSlideMenu);
// Toolbar components
customElements.define('toolbar-arrow-up-icon', ToolbarArrowUpIcon);
}
function registerMiscComponents() {
// Auto-complete components
customElements.define(
@@ -81,9 +66,6 @@ declare global {
'note-slicer': NoteSlicer;
'edgeless-dragging-area-rect': EdgelessDraggingAreaRectWidget;
'edgeless-selected-rect': EdgelessSelectedRectWidget;
'edgeless-slide-menu': EdgelessSlideMenu;
'toolbar-arrow-up-icon': ToolbarArrowUpIcon;
'edgeless-link-tool-button': EdgelessLinkToolButton;
'affine-page-root': PageRootBlockComponent;
}
}