Finish editor in Playground Code Editor

This commit is contained in:
2024-01-08 00:16:08 +08:00
parent 82b5e75046
commit d526d913b9
14 changed files with 484 additions and 78 deletions

View File

@@ -4,7 +4,7 @@ import { editor } from 'monaco-editor'
export interface IFile {
name: string
value: string
language: string
language: 'javascript' | 'typescript' | 'json' | 'css'
active?: boolean
hidden?: boolean
}
@@ -13,7 +13,7 @@ export interface IFiles {
[key: string]: IFile
}
export type ITheme = 'light' | 'dark'
export type ITheme = 'light' | 'vs-dark'
export type IImportMap = { imports: Record<string, string> }
@@ -26,7 +26,7 @@ export interface ICustomFiles {
hidden?: boolean
}
}
export type IEditorOptions = editor.IStandaloneEditorConstructionOptions & any
export type IEditorOptions = editor.IStandaloneEditorConstructionOptions
export interface IEditorContainer {
showFileSelector?: boolean
fileSelectorReadOnly?: boolean