import * as monaco from 'monaco-editor'; import { type MaybeRefOrGetter } from 'vue'; import type { EditorModel, Path } from '../../../../v2/features/editor/helpers/model'; type MonacoEditorAction = { id: string; label: string; keybindings?: number[]; run: () => void | Promise; }; /** * Creates and manages a Monaco editor instance. * * @param element - The HTML element to mount the editor into. * @param onChange - A callback function to handle changes to the editor's value. * @param actions - An array of actions to add to the editor. * @param readOnly - Whether the editor should be read-only. * @param model - The editor model to use. * @returns An object containing the editor instance, model, and utility functions. */ export declare const useEditor: ({ element, onChange, actions, readOnly, model, }: { element: HTMLElement; readOnly?: MaybeRefOrGetter; onChange?: (e: string) => void; actions?: MonacoEditorAction[]; /** Editor model provided from outside; must implement EditorModel (model + getRangeFromPath). */ model: MaybeRefOrGetter; }) => { editor: monaco.editor.IStandaloneCodeEditor; model: MaybeRefOrGetter; highlightPath: (path: Path) => Promise; focusPath: (path: Path) => Promise; formatDocument: () => Promise; getValue: () => string; setValue: (nextValue: string, isProgrammaticUpdate?: boolean) => void; hasTextFocus: () => boolean; dispose: () => void; }; export {}; //# sourceMappingURL=use-editor.d.ts.map