|
|
|
@ -17,9 +17,8 @@ import {RemixHighLightProvider} from './providers/highlightProvider' |
|
|
|
|
import {RemixDefinitionProvider} from './providers/definitionProvider' |
|
|
|
|
import {RemixCodeActionProvider} from './providers/codeActionProvider' |
|
|
|
|
import './remix-ui-editor.css' |
|
|
|
|
import { circomLanguageConfig, circomTokensProvider } from './syntaxes/circom' |
|
|
|
|
import { IPosition } from 'monaco-editor' |
|
|
|
|
|
|
|
|
|
import {circomLanguageConfig, circomTokensProvider} from './syntaxes/circom' |
|
|
|
|
import {IPosition} from 'monaco-editor' |
|
|
|
|
|
|
|
|
|
enum MarkerSeverity { |
|
|
|
|
Hint = 1, |
|
|
|
@ -109,7 +108,7 @@ export type EditorAPIType = { |
|
|
|
|
clearDecorationsByPlugin: (filePath: string, plugin: string, typeOfDecoration: string, registeredDecorations: any, currentDecorations: any) => DecorationsReturn |
|
|
|
|
keepDecorationsFor: (filePath: string, plugin: string, typeOfDecoration: string, registeredDecorations: any, currentDecorations: any) => DecorationsReturn |
|
|
|
|
addErrorMarker: (errors: errorMarker[], from: string) => void |
|
|
|
|
clearErrorMarkers: (sources: string[] | {[fileName: string]: any}, from: string) => void, |
|
|
|
|
clearErrorMarkers: (sources: string[] | {[fileName: string]: any}, from: string) => void |
|
|
|
|
getPositionAt: (offset: number) => monacoTypes.IPosition |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -553,11 +552,10 @@ export const EditorUI = (props: EditorUIProps) => { |
|
|
|
|
if (!editorRef.current) return |
|
|
|
|
return editorRef.current.getOption(43).fontSize |
|
|
|
|
} |
|
|
|
|
props.editorAPI.getPositionAt = (offset: number): IPosition => { |
|
|
|
|
return editorRef.current.getModel().getPositionAt(offset); |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
;(window as any).addRemixBreakpoint = (position) => { |
|
|
|
|
props.editorAPI.getPositionAt = (offset: number): IPosition => { |
|
|
|
|
return editorRef.current.getModel().getPositionAt(offset) |
|
|
|
|
} |
|
|
|
|
;(window as any).addRemixBreakpoint = (position) => { |
|
|
|
|
// make it available from e2e testing...
|
|
|
|
|
const model = editorRef.current.getModel() |
|
|
|
|
if (model) { |
|
|
|
|