default: Readonly<{ action: renderer/core/action; api: renderer/support/api; args: renderer/support/args; base: renderer/services/base; components: renderer/context/components; directives: __module; doc: renderer/services/document; editor: renderer/services/editor; embed: renderer/support/embed; env: renderer/support/env; export: renderer/services/export; getExtensionInitialized: (() => boolean); getExtensionLoadStatus: ((id: string) => ExtensionLoadStatus); getPluginApi: (<T>(name: string) => T); getPremium: (() => boolean); i18n: renderer/services/i18n; ioc: renderer/core/ioc; keybinding: renderer/core/keybinding; layout: renderer/services/layout; lib: renderer/context/lib; markdown: renderer/services/markdown; registerHook: (<T>(type: T,
fun: HookFun<BuildInHookTypes[T]>,
once?: boolean) => void); removeHook: (<T>(type: T,
fun: HookFun<BuildInHookTypes[T]>) => void); renderer: renderer/services/renderer; routines: renderer/services/routines; runner: renderer/services/runner; setting: renderer/services/setting; showExtensionManager: ((id?: string) => void); showPremium: ((tab?: PremiumTab) => void); statusBar: renderer/services/status-bar; storage: renderer/utils/storage; store: { getters: { isSaved: ComputedRef<boolean>; }; state: { autoPreview: boolean; currentContent: string; currentFile: undefined | null | { absolutePath?: string; content?: string; contentHash?: string; name: string; passwordHash?: string; path: string; plain?: boolean; repo: string; stat?: { birthtime: number; mtime: number; size: number; }; status?: | "unsaved" | "saved" | "save-failed" | "loaded"; title?: string; type: "dir" | "file"; writeable?: boolean; }; currentRepo: undefined | { name: string; path: string; }; editor: string; editorPreviewExclusive: boolean; inComposition: boolean; isFullscreen: boolean; presentation: boolean; previewer: string; recentOpenTime: Record<string, number>; showEditor: boolean; showExport: boolean; showOutline: boolean; showSetting: boolean; showSide: boolean; showView: boolean; showXterm: boolean; syncScroll: boolean; tabs: { class?: string; description?: string; fixed?: boolean; key: string; label: string; payload: { file: null | { absolutePath?: string; content?: string; contentHash?: string; name: string; passwordHash?: string; path: string; plain?: boolean; repo: string; stat?: { birthtime: ...
; mtime: ...
; size: ...
; }; status?: | "unsaved" | "saved" | "save-failed" | "loaded"; title?: string; type: "dir" | "file"; writeable?: boolean; }; }; temporary?: boolean; }[]; tree: null | { birthtime?: number; children?: { mtime?: number | undefined; birthtime?: number | undefined; marked?: boolean | undefined; children?: ...[] | undefined; level: number; name: string; repo: string; path: string; type: "dir" | "file"; }[]
; level: number; marked?: boolean; mtime?: number; name: string; path: string; repo: string; type: "dir" | "file"; }[]; treeSort: { by: | "name" | "mtime" | "birthtime" | "serial"; order: "desc" | "asc"; }; typewriterMode: boolean; wordWrap: "on" | "off"; }; watch: { <T, Immediate>(source: WatchSource<T>,
cb: WatchCallback<T, MaybeUndefined<T, Immediate>>,
options?: WatchOptions<Immediate>): WatchStopHandle; <T, Immediate>(sources: T | readonly [T],
cb: [T] extends [ReactiveMarker] ? WatchCallback<T<T>, MaybeUndefined<T<T>, Immediate>> : WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>,
options?: WatchOptions<Immediate>): WatchStopHandle; <T, Immediate>(sources: [...T[]],
cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>,
options?: WatchOptions<Immediate>): WatchStopHandle; <T, Immediate>(source: T,
cb: WatchCallback<T, MaybeUndefined<T, Immediate>>,
options?: WatchOptions<Immediate>): WatchStopHandle; }; watchEffect: ((effect: WatchEffect,
options?: WatchOptionsBase) => WatchStopHandle); }; theme: renderer/services/theme; tree: renderer/services/tree; triggerHook: { <T>(type: T): Promise<void>; <T>(type: T,
arg: undefined,
options: { breakable: true; }): Promise<void>; <T>(type: T,
arg: BuildInHookTypes[T]): Promise<void>; <T>(type: T,
arg: BuildInHookTypes[T],
options: { breakable: true; ignoreError?: boolean; }): Promise<boolean>; <T>(type: T,
arg: BuildInHookTypes[T],
options?: { breakable?: false; ignoreError?: boolean; }): Promise<void>; }; ui: { useContextMenu: (() => Instance); useModal: (() => Instance); useQuickFilter: (() => Instance); useToast: (() => Instance); }; utils: renderer/utils; version: string; view: renderer/services/view; workbench: renderer/services/workbench; }> = ... Type declaration
directives: __module
getExtensionInitialized: (() => boolean)
- (): boolean
Returns boolean
getExtensionLoadStatus: ((id: string) => ExtensionLoadStatus)
getPluginApi: (<T>(name: string) => T)
getPremium: (() => boolean)
- (): boolean
Returns boolean
registerHook: (<T>(type: T, fun: HookFun<BuildInHookTypes[T]>, once?: boolean) => void)
- <T>(type, fun, once?): void
Returns void
- <T>(type, fun): void
Returns void
showExtensionManager: ((id?: string) => void)
showPremium: ((tab?: PremiumTab) => void)
store: {
getters: {
isSaved: ComputedRef<boolean>;
};
state: {
autoPreview: boolean;
currentContent: string;
currentFile: undefined | null | {
absolutePath?: string;
content?: string;
contentHash?: string;
name: string;
passwordHash?: string;
path: string;
plain?: boolean;
repo: string;
stat?: {
birthtime: number;
mtime: number;
size: number;
};
status?:
| "unsaved"
| "saved"
| "save-failed"
| "loaded";
title?: string;
type: "dir" | "file";
writeable?: boolean;
};
currentRepo: undefined | {
name: string;
path: string;
};
editor: string;
editorPreviewExclusive: boolean;
inComposition: boolean;
isFullscreen: boolean;
presentation: boolean;
previewer: string;
recentOpenTime: Record<string, number>;
showEditor: boolean;
showExport: boolean;
showOutline: boolean;
showSetting: boolean;
showSide: boolean;
showView: boolean;
showXterm: boolean;
syncScroll: boolean;
tabs: {
class?: string;
description?: string;
fixed?: boolean;
key: string;
label: string;
payload: {
file: null | {
absolutePath?: string;
content?: string;
contentHash?: string;
name: string;
passwordHash?: string;
path: string;
plain?: boolean;
repo: string;
stat?: {
birthtime: ...;
mtime: ...;
size: ...;
};
status?:
| "unsaved"
| "saved"
| "save-failed"
| "loaded";
title?: string;
type: "dir" | "file";
writeable?: boolean;
};
};
temporary?: boolean;
}[];
tree: null | {
birthtime?: number;
children?: { mtime?: number | undefined; birthtime?: number | undefined; marked?: boolean | undefined; children?: ...[] | undefined; level: number; name: string; repo: string; path: string; type: "dir" | "file"; }[];
level: number;
marked?: boolean;
mtime?: number;
name: string;
path: string;
repo: string;
type: "dir" | "file";
}[];
treeSort: {
by:
| "name"
| "mtime"
| "birthtime"
| "serial";
order: "desc" | "asc";
};
typewriterMode: boolean;
wordWrap: "on" | "off";
};
watch: {
<T, Immediate>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
<T, Immediate>(sources: T | readonly [T], cb: [T] extends [ReactiveMarker]
? WatchCallback<T<T>, MaybeUndefined<T<T>, Immediate>>
: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
<T, Immediate>(sources: [...T[]], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
<T, Immediate>(source: T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
};
watchEffect: ((effect: WatchEffect, options?: WatchOptionsBase) => WatchStopHandle);
}
getters: {
isSaved: ComputedRef<boolean>;
}
state: {
autoPreview: boolean;
currentContent: string;
currentFile: undefined | null | {
absolutePath?: string;
content?: string;
contentHash?: string;
name: string;
passwordHash?: string;
path: string;
plain?: boolean;
repo: string;
stat?: {
birthtime: number;
mtime: number;
size: number;
};
status?:
| "unsaved"
| "saved"
| "save-failed"
| "loaded";
title?: string;
type: "dir" | "file";
writeable?: boolean;
};
currentRepo: undefined | {
name: string;
path: string;
};
editor: string;
editorPreviewExclusive: boolean;
inComposition: boolean;
isFullscreen: boolean;
presentation: boolean;
previewer: string;
recentOpenTime: Record<string, number>;
showEditor: boolean;
showExport: boolean;
showOutline: boolean;
showSetting: boolean;
showSide: boolean;
showView: boolean;
showXterm: boolean;
syncScroll: boolean;
tabs: {
class?: string;
description?: string;
fixed?: boolean;
key: string;
label: string;
payload: {
file: null | {
absolutePath?: string;
content?: string;
contentHash?: string;
name: string;
passwordHash?: string;
path: string;
plain?: boolean;
repo: string;
stat?: {
birthtime: ...;
mtime: ...;
size: ...;
};
status?:
| "unsaved"
| "saved"
| "save-failed"
| "loaded";
title?: string;
type: "dir" | "file";
writeable?: boolean;
};
};
temporary?: boolean;
}[];
tree: null | {
birthtime?: number;
children?: { mtime?: number | undefined; birthtime?: number | undefined; marked?: boolean | undefined; children?: ...[] | undefined; level: number; name: string; repo: string; path: string; type: "dir" | "file"; }[];
level: number;
marked?: boolean;
mtime?: number;
name: string;
path: string;
repo: string;
type: "dir" | "file";
}[];
treeSort: {
by:
| "name"
| "mtime"
| "birthtime"
| "serial";
order: "desc" | "asc";
};
typewriterMode: boolean;
wordWrap: "on" | "off";
}
autoPreview: boolean
currentContent: string
currentFile: undefined | null | {
absolutePath?: string;
content?: string;
contentHash?: string;
name: string;
passwordHash?: string;
path: string;
plain?: boolean;
repo: string;
stat?: {
birthtime: number;
mtime: number;
size: number;
};
status?:
| "unsaved"
| "saved"
| "save-failed"
| "loaded";
title?: string;
type: "dir" | "file";
writeable?: boolean;
}
currentRepo: undefined | {
name: string;
path: string;
}
editor: string
editorPreviewExclusive: boolean
inComposition: boolean
isFullscreen: boolean
presentation: boolean
previewer: string
recentOpenTime: Record<string, number>
showEditor: boolean
showExport: boolean
showOutline: boolean
showSetting: boolean
showSide: boolean
showView: boolean
showXterm: boolean
syncScroll: boolean
tabs: {
class?: string;
description?: string;
fixed?: boolean;
key: string;
label: string;
payload: {
file: null | {
absolutePath?: string;
content?: string;
contentHash?: string;
name: string;
passwordHash?: string;
path: string;
plain?: boolean;
repo: string;
stat?: {
birthtime: ...;
mtime: ...;
size: ...;
};
status?:
| "unsaved"
| "saved"
| "save-failed"
| "loaded";
title?: string;
type: "dir" | "file";
writeable?: boolean;
};
};
temporary?: boolean;
}[]
tree: null | {
birthtime?: number;
children?: { mtime?: number | undefined; birthtime?: number | undefined; marked?: boolean | undefined; children?: ...[] | undefined; level: number; name: string; repo: string; path: string; type: "dir" | "file"; }[];
level: number;
marked?: boolean;
mtime?: number;
name: string;
path: string;
repo: string;
type: "dir" | "file";
}[]
treeSort: {
by:
| "name"
| "mtime"
| "birthtime"
| "serial";
order: "desc" | "asc";
}
by:
| "name"
| "mtime"
| "birthtime"
| "serial"
order: "desc" | "asc"
typewriterMode: boolean
wordWrap: "on" | "off"
- <T, Immediate>(source, cb, options?): WatchStopHandle
Type Parameters
- T
- Immediate extends Readonly<boolean> = false
- <T, Immediate>(sources, cb, options?): WatchStopHandle
Type Parameters
- T extends readonly (object | WatchSource<unknown>)[]
- Immediate extends Readonly<boolean> = false
- <T, Immediate>(sources, cb, options?): WatchStopHandle
Type Parameters
- T extends MultiWatchSources
- Immediate extends Readonly<boolean> = false
- <T, Immediate>(source, cb, options?): WatchStopHandle
Type Parameters
- T extends object
- Immediate extends Readonly<boolean> = false
triggerHook: {
<T>(type: T): Promise<void>;
<T>(type: T, arg: undefined, options: {
breakable: true;
}): Promise<void>;
<T>(type: T, arg: BuildInHookTypes[T]): Promise<void>;
<T>(type: T, arg: BuildInHookTypes[T], options: {
breakable: true;
ignoreError?: boolean;
}): Promise<boolean>;
<T>(type: T, arg: BuildInHookTypes[T], options?: {
breakable?: false;
ignoreError?: boolean;
}): Promise<void>;
}
- <T>(type): Promise<void>
Returns Promise<void>
- <T>(type, arg, options): Promise<void>
Parameters
- type: T
- arg: undefined
- options: {
breakable: true;
}
Returns Promise<void>
- <T>(type, arg): Promise<void>
Type Parameters
- T extends
| "GLOBAL_KEYDOWN"
| "GLOBAL_KEYUP"
| "DEEP_LINK_OPEN"
| "ACTION_BEFORE_RUN"
| "ACTION_AFTER_RUN"
| "THEME_CHANGE"
| "EDITOR_PASTE_IMAGE"
| "MARKDOWN_BEFORE_RENDER"
| "VIEW_ELEMENT_CLICK"
| "VIEW_ELEMENT_DBCLICK"
| "VIEW_KEY_DOWN"
| "VIEW_SCROLL"
| "VIEW_PREVIEWER_CHANGE"
| "VIEW_RENDER_IFRAME_READY"
| "EXPORT_BEFORE_PREPARE"
| "EXPORT_AFTER_PREPARE"
| "VIEW_ON_GET_HTML_FILTER_NODE"
| "TREE_NODE_SELECT"
| "TREE_NODE_DBLCLICK"
| "MONACO_BEFORE_INIT"
| "MONACO_READY"
| "EDITOR_READY"
| "EDITOR_CUSTOM_EDITOR_CHANGE"
| "EDITOR_CURRENT_EDITOR_CHANGE"
| "EDITOR_CONTENT_CHANGE"
| "DOC_CREATED"
| "DOC_DELETED"
| "DOC_MOVED"
| "DOC_PRE_SWITCH"
| "DOC_BEFORE_SAVE"
| "DOC_SAVED"
| "DOC_BEFORE_SWITCH"
| "DOC_SWITCHING"
| "DOC_SWITCHED"
| "DOC_SWITCH_FAILED"
| "DOC_SWITCH_SKIPPED"
| "DOC_CHANGED"
| "I18N_CHANGE_LANGUAGE"
| "SETTING_PANEL_BEFORE_SHOW"
| "SETTING_CHANGED"
| "SETTING_FETCHED"
| "SETTING_BEFORE_WRITE"
| "EXTENSION_READY"
| "CODE_RUNNER_CHANGE"
| "PLUGIN_HOOK"
Returns Promise<void>
- <T>(type, arg, options): Promise<boolean>
Type Parameters
- T extends
| "GLOBAL_KEYDOWN"
| "GLOBAL_KEYUP"
| "DEEP_LINK_OPEN"
| "ACTION_BEFORE_RUN"
| "ACTION_AFTER_RUN"
| "THEME_CHANGE"
| "EDITOR_PASTE_IMAGE"
| "MARKDOWN_BEFORE_RENDER"
| "VIEW_ELEMENT_CLICK"
| "VIEW_ELEMENT_DBCLICK"
| "VIEW_KEY_DOWN"
| "VIEW_SCROLL"
| "VIEW_PREVIEWER_CHANGE"
| "VIEW_RENDER_IFRAME_READY"
| "EXPORT_BEFORE_PREPARE"
| "EXPORT_AFTER_PREPARE"
| "VIEW_ON_GET_HTML_FILTER_NODE"
| "TREE_NODE_SELECT"
| "TREE_NODE_DBLCLICK"
| "MONACO_BEFORE_INIT"
| "MONACO_READY"
| "EDITOR_READY"
| "EDITOR_CUSTOM_EDITOR_CHANGE"
| "EDITOR_CURRENT_EDITOR_CHANGE"
| "EDITOR_CONTENT_CHANGE"
| "DOC_CREATED"
| "DOC_DELETED"
| "DOC_MOVED"
| "DOC_PRE_SWITCH"
| "DOC_BEFORE_SAVE"
| "DOC_SAVED"
| "DOC_BEFORE_SWITCH"
| "DOC_SWITCHING"
| "DOC_SWITCHED"
| "DOC_SWITCH_FAILED"
| "DOC_SWITCH_SKIPPED"
| "DOC_CHANGED"
| "I18N_CHANGE_LANGUAGE"
| "SETTING_PANEL_BEFORE_SHOW"
| "SETTING_CHANGED"
| "SETTING_FETCHED"
| "SETTING_BEFORE_WRITE"
| "EXTENSION_READY"
| "CODE_RUNNER_CHANGE"
| "PLUGIN_HOOK"
Parameters
- type: T
- arg: BuildInHookTypes[T]
- options: {
breakable: true;
ignoreError?: boolean;
}breakable: true
Optional
ignoreError?: boolean
Returns Promise<boolean>
- <T>(type, arg, options?): Promise<void>
Type Parameters
- T extends
| "GLOBAL_KEYDOWN"
| "GLOBAL_KEYUP"
| "DEEP_LINK_OPEN"
| "ACTION_BEFORE_RUN"
| "ACTION_AFTER_RUN"
| "THEME_CHANGE"
| "EDITOR_PASTE_IMAGE"
| "MARKDOWN_BEFORE_RENDER"
| "VIEW_ELEMENT_CLICK"
| "VIEW_ELEMENT_DBCLICK"
| "VIEW_KEY_DOWN"
| "VIEW_SCROLL"
| "VIEW_PREVIEWER_CHANGE"
| "VIEW_RENDER_IFRAME_READY"
| "EXPORT_BEFORE_PREPARE"
| "EXPORT_AFTER_PREPARE"
| "VIEW_ON_GET_HTML_FILTER_NODE"
| "TREE_NODE_SELECT"
| "TREE_NODE_DBLCLICK"
| "MONACO_BEFORE_INIT"
| "MONACO_READY"
| "EDITOR_READY"
| "EDITOR_CUSTOM_EDITOR_CHANGE"
| "EDITOR_CURRENT_EDITOR_CHANGE"
| "EDITOR_CONTENT_CHANGE"
| "DOC_CREATED"
| "DOC_DELETED"
| "DOC_MOVED"
| "DOC_PRE_SWITCH"
| "DOC_BEFORE_SAVE"
| "DOC_SAVED"
| "DOC_BEFORE_SWITCH"
| "DOC_SWITCHING"
| "DOC_SWITCHED"
| "DOC_SWITCH_FAILED"
| "DOC_SWITCH_SKIPPED"
| "DOC_CHANGED"
| "I18N_CHANGE_LANGUAGE"
| "SETTING_PANEL_BEFORE_SHOW"
| "SETTING_CHANGED"
| "SETTING_FETCHED"
| "SETTING_BEFORE_WRITE"
| "EXTENSION_READY"
| "CODE_RUNNER_CHANGE"
| "PLUGIN_HOOK"
Parameters
- type: T
- arg: BuildInHookTypes[T]
Optional
options: {
breakable?: false;
ignoreError?: boolean;
}Optional
breakable?: false
Optional
ignoreError?: boolean
Returns Promise<void>
ui: {
useContextMenu: (() => Instance);
useModal: (() => Instance);
useQuickFilter: (() => Instance);
useToast: (() => Instance);
}
version: string
Get a plugin exported api.