UNPKG

@yuntijs/ui

Version:

☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps

36 lines (35 loc) 1.92 kB
import type { Variant } from 'antd/es/config-provider'; import React from 'react'; import type { IDiffMonacoEditorProps, IGeneralManacoEditorProps, ISingleMonacoEditorProps } from './base/helper'; export { type EditorMeta, Controller as MonacoController } from './base/controller'; export interface BaseMonacoEditorProps extends IGeneralManacoEditorProps { /** Should the editor be read only. See also domReadOnly. Defaults to false. */ readOnly?: boolean; /** Control the rendering of line numbers. Defaults to on. */ lineNumbers?: 'on' | 'off' | 'relative' | 'interval' | ((lineNumber: number) => string); /** Control the wrapping of the editor. Defaults to off. */ wordWrap?: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; /** Enable custom contextmenu. Defaults to true. */ contextmenu?: boolean; /** Enable the rendering of the minimap. Defaults to false. */ minimapEnabled?: boolean; /** Control the version of monaco-editor be loaded. Defaults to 0.45.0 */ version?: string; /** An event emitted when the content of the current model has changed. */ onChange?: (input: string, event: any) => void; /** Variants of Editor, Defaults to outlined. */ variant?: Variant; } export declare const BaseMonacoEditor: React.FC<BaseMonacoEditorProps & { /** Only for BaseMonacoEditor. */ type?: 'single' | 'diff'; /** Is show fullscreen button */ supportFullScreen?: boolean; }>; export type MonacoEditorProps = ISingleMonacoEditorProps & BaseMonacoEditorProps; export declare const MonacoEditor: React.FC<MonacoEditorProps>; export type MonacoDiffEditorProps = IDiffMonacoEditorProps & BaseMonacoEditorProps & { /** Render the differences in one editor. Defaults to off, render the differences in two side-by-side editors */ inlineView?: 'on' | 'off' | 'auto'; }; export declare const MonacoDiffEditor: React.FC<MonacoDiffEditorProps>;