import type { EditEnv } from '../doc/index.js'; import { type Selection } from '../caret/index.js'; import { type HtmlBuilders, type ImportOptions, type ParseNode } from '../html/index.js'; import { type Command, type CommandArgs } from './commands.js'; import { type NabiChange } from './signal.js'; import { type Ask } from './ask.js'; import { type Toast } from './toast.js'; export type CommandHand = 'keyboard' | 'pointer'; export interface NabiOptions { readonly doc?: unknown; readonly allowLocalUrls?: boolean; readonly ask?: Partial; readonly toast?: Toast; readonly toastMs?: number; readonly toastMax?: number; readonly onError?: (error: unknown) => void; readonly undoLimit?: number; readonly typingMergeMs?: number; readonly locale?: string; } export interface NabiCoreOptions extends NabiOptions { readonly env: EditEnv; readonly commands?: Readonly>; readonly builders?: HtmlBuilders; readonly parseHtml?: (html: string) => readonly ParseNode[]; readonly claim?: ImportOptions['claim']; } export interface Nabi { readonly sessionId: string; getJson(): unknown[]; setJson(value: unknown): boolean; getHtml(): string; getEditorHtml(): string; setHtml(html: string): boolean; applyCommand(name: string, args?: CommandArgs, by?: CommandHand): boolean; select(sel: Selection): boolean; getSelection(): Selection; undo(): boolean; redo(): boolean; group(fn: () => void): void; onChange(fn: (change: NabiChange) => void): () => void; isChanged(): boolean; } export declare function createNabi(options: NabiCoreOptions): Nabi; //# sourceMappingURL=nabi.d.ts.map