import type { Editor } from '@tiptap/core'; import type { Node as TiptapNode } from '@tiptap/pm/model'; import type { TiptapEditor } from './editor'; import type { EditorCommands } from './editorCommandsType'; import type { ModalConfig, ModalService } from './modalTypes'; import type { IEditorQuery } from './query'; export type IToolbarItem = { id: string; type: 'textColorIndicator' | 'toggle' | 'font' | 'imageSettings' | 'textType' | 'modal' | 'separator' | 'custom'; presentation?: Record; attributes: Record; commands: Record void>; }; export interface IContentResolver { id: string; resolve: (content: T, services?: any, editor?: Editor) => any; } export interface TiptapContentResolver { create: (id: string, resolve: IContentResolver['resolve']) => IContentResolver; } type Modify = Omit & R; export type TiptapCommand = ({ attributes, editorCommands, }: { attributes: any; editorCommands: any; editorQuery: IEditorQuery; }) => (args: any) => void; export type ToolbarItemAttributes = Record>; export type IToolbarItemConfigTiptap = Modify; }>; export type PluginToolbarButtonConfig = Modify void>; }>; export type FormattingToolbarButtonConfig = Modify; commands?: Record; command?: (args: { editorCommands: EditorCommands; editor: TiptapEditor; modalService: ModalService; editorQuery: IEditorQuery; }) => (args: Record) => boolean; modal?: ModalConfig; }>; export {}; //# sourceMappingURL=toolbarTypes.d.ts.map