import { WidgetComponent } from '@blocksuite/std'; import { nothing } from 'lit'; import { createCustomModal } from './custom-modal.js'; export const AFFINE_MODAL_WIDGET = 'affine-modal-widget'; export class AffineModalWidget extends WidgetComponent { open(options: Parameters[0]) { return createCustomModal(options, this.ownerDocument.body); } override render() { return nothing; } } declare global { interface HTMLElementTagNameMap { [AFFINE_MODAL_WIDGET]: AffineModalWidget; } }