@making-sense/antlr-editor
Version:
ANTLR Typescript editor
28 lines (27 loc) • 1.01 kB
TypeScript
/// <reference types="react" />
import * as Monaco from "monaco-editor/esm/vs/editor/editor.api";
import { Tools, Error, Variables } from "./model";
export type CursorType = {
line: number;
column: number;
selectionLength: number;
};
type EditorProps = {
script?: string;
setScript?: (value: string) => void;
customFetcher?: (url: string) => Promise<any>;
variables?: Variables;
variablesInputURLs?: string[];
tools: Tools;
onListErrors?: (errors: Error[]) => void;
height?: string;
width?: string;
theme?: string;
options?: Monaco.editor.IStandaloneEditorConstructionOptions;
shortcuts: Record<string, () => void>;
FooterComponent?: React.FC<{
cursor: CursorType;
}>;
};
declare const Editor: ({ script, setScript, onListErrors, customFetcher, variables, variablesInputURLs, tools, height, width, theme, options, shortcuts, FooterComponent }: EditorProps) => import("react/jsx-runtime").JSX.Element | null;
export default Editor;