1 | import * as monaco from "monaco-editor/esm/vs/editor/editor.api";
|
2 | import * as PropTypes from "prop-types";
|
3 | import * as React from "react";
|
4 | import { MonacoEditorProps } from "./types";
|
5 | import { noop } from "./utils";
|
6 | declare class MonacoEditor extends React.Component<MonacoEditorProps> {
|
7 | static propTypes: {
|
8 | width: PropTypes.Requireable<string | number>;
|
9 | height: PropTypes.Requireable<string | number>;
|
10 | value: PropTypes.Requireable<string>;
|
11 | defaultValue: PropTypes.Requireable<string>;
|
12 | language: PropTypes.Requireable<string>;
|
13 | theme: PropTypes.Requireable<string>;
|
14 | options: PropTypes.Requireable<object>;
|
15 | overrideServices: PropTypes.Requireable<object>;
|
16 | editorDidMount: PropTypes.Requireable<(...args: any[]) => any>;
|
17 | editorWillMount: PropTypes.Requireable<(...args: any[]) => any>;
|
18 | onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
19 | className: PropTypes.Requireable<string>;
|
20 | };
|
21 | static defaultProps: {
|
22 | width: string;
|
23 | height: string;
|
24 | value: any;
|
25 | defaultValue: string;
|
26 | language: string;
|
27 | theme: any;
|
28 | options: {};
|
29 | overrideServices: {};
|
30 | editorDidMount: typeof noop;
|
31 | editorWillMount: typeof noop;
|
32 | onChange: typeof noop;
|
33 | className: any;
|
34 | };
|
35 | editor?: monaco.editor.IStandaloneCodeEditor;
|
36 | private containerElement?;
|
37 | private _subscription;
|
38 | private __prevent_trigger_change_event?;
|
39 | constructor(props: MonacoEditorProps);
|
40 | componentDidMount(): void;
|
41 | componentDidUpdate(prevProps: MonacoEditorProps): void;
|
42 | componentWillUnmount(): void;
|
43 | assignRef: (component: HTMLDivElement) => void;
|
44 | destroyMonaco(): void;
|
45 | initMonaco(): void;
|
46 | editorWillMount(): monaco.editor.IStandaloneEditorConstructionOptions;
|
47 | editorDidMount(editor: monaco.editor.IStandaloneCodeEditor): void;
|
48 | render(): JSX.Element;
|
49 | }
|
50 | export default MonacoEditor;
|