@finos/legend-lego
Version:
Legend code editor support
40 lines • 1.94 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { editor as monacoEditorAPI } from 'monaco-editor';
import { type CODE_EDITOR_LANGUAGE, CODE_EDITOR_THEME } from '@finos/legend-code-editor';
import { type GenericLegendApplicationStore } from '@finos/legend-application';
import type { CompilationError, ParserError } from '@finos/legend-graph';
export declare const configureCodeEditorComponent: (applicationStore: GenericLegendApplicationStore) => Promise<void>;
/**
* Normally `monaco-editor` worker disposes after 5 minutes staying idle, but we fasten
* this pace just in case the usage of the editor causes memory-leak somehow
*/
export declare const disposeCodeEditor: (editor: monacoEditorAPI.IStandaloneCodeEditor) => void;
export declare const CodeEditor: React.FC<{
inputValue: string;
isReadOnly?: boolean | undefined;
lightTheme?: CODE_EDITOR_THEME;
language: CODE_EDITOR_LANGUAGE;
hideMinimap?: boolean | undefined;
hideGutter?: boolean | undefined;
hidePadding?: boolean | undefined;
hideActionBar?: boolean | undefined;
updateInput?: ((val: string) => void) | undefined;
lineToScroll?: number | undefined;
extraEditorOptions?: (monacoEditorAPI.IEditorOptions & monacoEditorAPI.IGlobalEditorOptions) | undefined;
error?: ParserError | CompilationError | undefined;
}>;
//# sourceMappingURL=CodeEditor.d.ts.map