import type { Component } from 'vue'; import type { Editor, Range } from '@tiptap/core'; import { TextEditorState } from '../types'; export interface EditorAction { id: string; title: string; description?: string; icon?: string; iconFillType?: 'fill' | 'line' | 'none'; swatchColor?: string; activeIcon?: (editor: Editor) => { icon: string; iconFillType?: 'fill' | 'line' | 'none'; } | undefined; keywords?: string[]; toolbarAction?: (editor: Editor, value?: string) => void; slashCommandAction?: (ctx: { editor: Editor; range: Range; }) => void; isActive?: (editor: Editor) => boolean; isEnabled?: (editor: Editor) => boolean; showInToolbar?: boolean; showInSlashCommands?: boolean; menuCloseOnClick?: boolean; menuEnforceDropOnMobile?: boolean; menuComponent?: Component; menuComponentAttrs?: (editor: Editor, closeMenu: () => void) => Record; childActions?: EditorAction[]; } export interface EditorActionGroup { id: string; title: string; actions: EditorAction[]; } export declare function useEditorActions(state: TextEditorState): { undo: () => EditorAction; redo: () => EditorAction; zoomIn: () => EditorAction; zoomOut: () => EditorAction; zoomReset: () => EditorAction; zoomMenu: () => EditorAction; print: () => EditorAction; toggleSourceMode: () => EditorAction; heading: () => EditorAction; paragraph: () => EditorAction; heading1: () => EditorAction; heading2: () => EditorAction; heading3: () => EditorAction; heading4: () => EditorAction; fontSize: () => EditorAction; textColor: () => EditorAction; textAlign: () => EditorAction; alignLeft: () => EditorAction; alignCenter: () => EditorAction; alignRight: () => EditorAction; alignJustify: () => EditorAction; backgroundColor: () => EditorAction; bold: () => EditorAction; italic: () => EditorAction; underline: () => EditorAction; strikethrough: () => EditorAction; subscript: () => EditorAction; superscript: () => EditorAction; codeInline: () => EditorAction; lineHeight: () => EditorAction; blockquote: () => EditorAction; codeBlock: () => EditorAction; bulletList: () => EditorAction; orderedList: () => EditorAction; taskList: () => EditorAction; link: () => EditorAction; image: () => EditorAction; menuEmoji: () => EditorAction; menuSearchAndReplace: () => EditorAction; imageUrl: () => EditorAction; imageUpload: () => EditorAction; imageCloud: () => EditorAction; horizontalRule: () => EditorAction; frontmatter: () => EditorAction; createTable: () => EditorAction; addRowBefore: () => EditorAction; addRowAfter: () => EditorAction; deleteRow: () => EditorAction; addColumnBefore: () => EditorAction; addColumnAfter: () => EditorAction; deleteColumn: () => EditorAction; toggleHeaderRow: () => EditorAction; deleteTable: () => EditorAction; };