Files
AFFiNE-Mirror/blocksuite/affine/blocks/frame/src/effects.ts
T
Saul-Mirone 59d4942d9b feat(editor): slash menu and toolbar widget extensions (#12002)
Closes: BS-3226
Closes: BS-3227
Closes: BS-3228
Closes: BS-3229

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

- **New Features**
  - Introduced new view extensions for remote selection, scroll anchoring, slash menu, and toolbar widgets, enhancing customization and integration capabilities.

- **Refactor**
  - Updated export paths and module structure for widget-related packages to improve modularity and accessibility.
  - Reorganized internal dependencies and removed redundant widget imports from core block packages.
  - Refactored edgeless-related widgets and components to use a standardized scope interface for improved context and state management.
  - Centralized graphics controller access and slot management through standardized context objects.

- **Chores**
  - Added and updated dependencies to streamline extension loading and workspace management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-04-26 23:28:49 +08:00

48 lines
2.0 KiB
TypeScript

import { EdgelessFrameMenu, EdgelessFrameToolButton } from './edgeless-toolbar';
import { PresentationToolbar } from './edgeless-toolbar/presentation-toolbar';
import { FrameBlockComponent } from './frame-block';
import { EdgelessFrameOrderButton } from './present/frame-order-button';
import { EdgelessFrameOrderMenu } from './present/frame-order-menu';
import {
EDGELESS_NAVIGATOR_BLACK_BACKGROUND_WIDGET,
EdgelessNavigatorBlackBackgroundWidget,
} from './present/navigator-bg-widget';
import { EdgelessNavigatorSettingButton } from './present/navigator-setting-button';
import { EdgelessPresentButton } from './present/present-button';
export function effects() {
customElements.define('affine-frame', FrameBlockComponent);
customElements.define('edgeless-frame-tool-button', EdgelessFrameToolButton);
customElements.define('edgeless-frame-menu', EdgelessFrameMenu);
customElements.define(
'edgeless-frame-order-button',
EdgelessFrameOrderButton
);
customElements.define('edgeless-frame-order-menu', EdgelessFrameOrderMenu);
customElements.define(
'edgeless-navigator-setting-button',
EdgelessNavigatorSettingButton
);
customElements.define('edgeless-present-button', EdgelessPresentButton);
customElements.define('presentation-toolbar', PresentationToolbar);
// Navigation components
customElements.define(
EDGELESS_NAVIGATOR_BLACK_BACKGROUND_WIDGET,
EdgelessNavigatorBlackBackgroundWidget
);
}
declare global {
interface HTMLElementTagNameMap {
'affine-frame': FrameBlockComponent;
'edgeless-frame-tool-button': EdgelessFrameToolButton;
'edgeless-frame-menu': EdgelessFrameMenu;
'edgeless-frame-order-button': EdgelessFrameOrderButton;
'edgeless-frame-order-menu': EdgelessFrameOrderMenu;
'edgeless-navigator-setting-button': EdgelessNavigatorSettingButton;
'edgeless-present-button': EdgelessPresentButton;
'presentation-toolbar': PresentationToolbar;
'edgeless-navigator-black-background': EdgelessNavigatorBlackBackgroundWidget;
}
}