import { type RefObject } from "react"; import { type EditorView } from "@codemirror/view"; /** * Where the selection goes when the controlled value is replaced from outside. * * - `"clamp"` keeps the current selection, clamped into the new document's bounds. * - `"end"` puts the cursor at the end of the new document — for editors whose external replaces * mean "a new document" (an applied example, a re-format), where the old offset is meaningless * and a subsequent insert-at-cursor should append rather than land at a stale position. * * @internal */ export type ExternalChangeSelection = "clamp" | "end"; export declare function useCodemirrorChange(viewRef: RefObject, value: string, externalChangeSelection?: ExternalChangeSelection): void; //# sourceMappingURL=useCodemirrorChange.d.ts.map