Files
AFFiNE-Mirror/blocksuite/affine/blocks/root/src/effects.ts
T
Saul-Mirone 3a2fe0bf91 refactor(editor): extract widgets (#12304)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced two new widgets: Edgeless Dragging Area and Note Slicer, now available for use.
  - Added extension support for these widgets, enabling enhanced interaction and integration within the application.

- **Chores**
  - Updated package configurations and workspace settings to include the new widgets and their dependencies.
  - Added project references and configuration files to support modular development and build processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-15 10:44:41 +00:00

29 lines
776 B
TypeScript

import {
EdgelessRootBlockComponent,
EdgelessRootPreviewBlockComponent,
PageRootBlockComponent,
PreviewRootBlockComponent,
} from './index.js';
export function effects() {
// Register components by category
registerRootComponents();
}
function registerRootComponents() {
customElements.define('affine-page-root', PageRootBlockComponent);
customElements.define('affine-preview-root', PreviewRootBlockComponent);
customElements.define('affine-edgeless-root', EdgelessRootBlockComponent);
customElements.define(
'affine-edgeless-root-preview',
EdgelessRootPreviewBlockComponent
);
}
declare global {
interface HTMLElementTagNameMap {
'affine-edgeless-root': EdgelessRootBlockComponent;
'affine-page-root': PageRootBlockComponent;
}
}