mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 19:41:25 -08:00
refactor(docs): [SITE-03] migrate desktop editor and integrate typed generation
This commit is contained in:
1 parent
a468cb2c39
commit
2f130c58f1
37 files changed
+1921
-305
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import type * as Monaco from 'monaco-editor'
|
||||
import type {
|
||||
createLibraryLoader,
|
||||
exampleSource,
|
||||
parameters,
|
||||
} from './loader.ts'
|
||||
|
||||
export interface EditorPlayer {
|
||||
destroy: (removeHtml?: boolean) => unknown
|
||||
}
|
||||
export interface AmdLoader {
|
||||
(
|
||||
modules: string[],
|
||||
ready: () => void,
|
||||
failed: (error: unknown) => void,
|
||||
): void
|
||||
config: (options: { paths: { vs: string } }) => void
|
||||
}
|
||||
export type EditorHost = Window & {
|
||||
console: Console
|
||||
Artplayer: {
|
||||
DEBUG: boolean
|
||||
utils: { isMobile: boolean }
|
||||
instances: EditorPlayer[]
|
||||
}
|
||||
monaco: typeof Monaco
|
||||
require: AmdLoader
|
||||
consoleLog: (element: HTMLElement) => void
|
||||
ArtplayerDocsLoader: ReturnType<typeof createLibraryLoader> & {
|
||||
exampleSource: typeof exampleSource
|
||||
parameters: typeof parameters
|
||||
}
|
||||
art: EditorPlayer | undefined
|
||||
}
|
||||
|
||||
export type Editor = Monaco.editor.IStandaloneCodeEditor
|
||||
Reference in new issue
Block a user