import { DOMOutputSpec, Node as ProseMirrorNode } from 'prosemirror-model'; import { EditorView } from 'prosemirror-view'; import { SylApi } from '../api'; import { Types } from '../libs'; import { IEventHandler } from './controller'; import { Atom, SylSchema } from './schema'; interface ICardConfig extends SylSchema { sylCard?: boolean; draggable?: boolean; props?: IEventHandler; getText?: boolean; excludeMarks?: string; fixCursor?: boolean; } declare type IViewMap = Types.StringMap; declare class BaseCardView = any> { dom: HTMLElement; template: HTMLElement; mask: HTMLElement; attrs: Structure; adapter: SylApi; root?: HTMLElement; isSelected: boolean; traceSelection: boolean; renderer: any; getPos: () => number; constructor(adapter: SylApi, node: ProseMirrorNode, view: EditorView, getPos: boolean | (() => number)); update({ attrs, isSelected, isText }: { attrs: Structure; isSelected?: boolean; isText?: boolean; }): boolean; selectNode(): boolean; deselectNode(): void; mount({ ViewMap, layers }: { ViewMap: Types.StringMap; layers?: Types.StringMap; }): void; traceSelect: () => void; afterMount(name: string): void; fixCursor(name: string): void; getNode: () => ProseMirrorNode | null | undefined; getBoundingClientRect(): Types.BoundingStatic; dispatchUpdate(attrs: Structure): void; ignoreMutation(event: MutationRecord | { type: 'selection'; target: Element; }): any; stopEvent(): any; destroy(): any; } declare class BlockCardView extends BaseCardView { dom: HTMLElement; } declare class InlineCardView extends BaseCardView { dom: HTMLElement; } declare class BaseCard extends Atom { sylCard: boolean; getText?: boolean; excludeMarks?: string; fixCursor?: boolean; ViewMap: IViewMap; layers: IViewMap; } declare class Card extends BaseCard { group: string; isolating: boolean; tagName(node: ProseMirrorNode): string; toDOM: (node: ProseMirrorNode) => DOMOutputSpec; } declare class InlineCard extends BaseCard { group: string; inline: boolean; tagName(node: ProseMirrorNode): string; toDOM: (node: ProseMirrorNode) => DOMOutputSpec; } declare const configuration: (_config: ICardConfig) => (card: any) => any; export { BaseCard, BaseCardView, BlockCardView, Card, configuration, ICardConfig, InlineCard, InlineCardView };