import type { Ref } from "react"; import type { EditorApi, EditorMergeField, EditorTokenSyntax } from "./EditorProps"; import { type ChipContext } from "./editorTokens"; export type JoditLike = { value: string; editor: HTMLElement; s: { isInsideArea: boolean; range: Range; selectRange: (range: Range, focus?: boolean) => unknown; insertHTML: (html: string) => void; focus: () => unknown; }; events: { on: (events: string, handler: (event: never) => unknown) => unknown; }; synchronizeValues: () => void; waitForReady: () => Promise; }; type BridgeArgs = { value?: string; onChange?: (value: string) => void; onBlur?: (value: string, event: never) => void; mergeFields?: EditorMergeField[]; syntax: EditorTokenSyntax; chipLabel: (label: string) => string; apiRef?: Ref; onReady?: () => void; onUnknownTokens?: (paths: string[]) => void; }; export declare function useEditorBridge({ value, onChange, onBlur, mergeFields, syntax, chipLabel, apiRef, onReady, onUnknownTokens, }: BridgeArgs): { joditValue: string | undefined; attachEditor: (jodit: JoditLike) => void; api: EditorApi; instance: JoditLike | null; raw: string; unknown: string[]; ctx: ChipContext; }; export {};