import type { Editor } from "@tiptap/core"; import { type TableAction, type TableActionParams, type TableState } from "@pixerate/editor"; export type { TableAction, TableActionParams, TableState } from "@pixerate/editor"; export interface SvelteTableMenu { /** The table state at the selection (replaced only when it changes). */ readonly current: TableState; /** Runs a table action (focusing the editor); `false` when it cannot run. */ run(action: TableAction, params?: TableActionParams): boolean; /** `true`, or why the action cannot run with these params. */ check(action: TableAction, params?: TableActionParams): true | string; destroy(): void; } /** * Reactive table state for Svelte 5 (the counterpart of React's * `useTableMenu`): whether the selection is in a table, its size, header * state, cell alignment/background and the enablement (with reasons) of every * table action. Call `destroy()` when done (or create it inside a * component's `$effect`). */ export declare function createTableMenu(editor: Editor | null | undefined): SvelteTableMenu;