@tuoyuan/code-editor 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +424 -357
- package/dist/JavascriptEditor.vue.d.ts +319 -0
- package/dist/JsonEditor.vue.d.ts +322 -0
- package/dist/SqlEditor.vue.d.ts +319 -0
- package/dist/{cssMode-BfZeZ0sl.js → cssMode-BpY2QZKm.js} +1 -1
- package/dist/{cssMode-CroponXs.cjs → cssMode-Opz_JLpw.cjs} +1 -1
- package/dist/{freemarker2-CpMdvAfd.cjs → freemarker2-B09dYp00.cjs} +1 -1
- package/dist/{freemarker2-DVRVJu0B.js → freemarker2-uBVO2rOF.js} +1 -1
- package/dist/{handlebars-8AMUT0_r.cjs → handlebars-DA1mbfg8.cjs} +1 -1
- package/dist/{handlebars-cspegSxe.js → handlebars-DCXZu403.js} +1 -1
- package/dist/{html-zabMn0fr.js → html-DaWChHgh.js} +1 -1
- package/dist/{html-Bvlf1Z20.cjs → html-DqYDmf6m.cjs} +1 -1
- package/dist/{htmlMode-jXZ-OnTX.js → htmlMode-BmaRbaUb.js} +1 -1
- package/dist/{htmlMode-B3y58LIC.cjs → htmlMode-OnZuz9_d.cjs} +1 -1
- package/dist/{index-BvnET_j2.js → index-CGIln256.js} +18264 -17748
- package/dist/{index-CjGIE44E.cjs → index-CkYrsRHd.cjs} +198 -194
- package/dist/index.d.ts +6 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +6 -3
- package/dist/{javascript-QgWqIxzo.cjs → javascript-CZ5LkNUz.cjs} +1 -1
- package/dist/{javascript-BF91TgD3.js → javascript-kyQzET-h.js} +1 -1
- package/dist/{jsonMode-Chpjh-RM.cjs → jsonMode-BjlrCQBF.cjs} +1 -1
- package/dist/{jsonMode-DD3uMliY.js → jsonMode-DkgDlnQP.js} +1 -1
- package/dist/{liquid-CsQKIvsE.cjs → liquid-BV_g9ldr.cjs} +1 -1
- package/dist/{liquid-DxypC1q6.js → liquid-DBmQt-Su.js} +1 -1
- package/dist/{mdx-DZRrNJcb.js → mdx-CMn_WqRG.js} +1 -1
- package/dist/{mdx-BvsKvd6j.cjs → mdx-CnlGeQWI.cjs} +1 -1
- package/dist/{python-CXOcTmBp.js → python-CIMw6KAi.js} +1 -1
- package/dist/{python-CDI0D2Kf.cjs → python-jV8ElUmA.cjs} +1 -1
- package/dist/{razor-CAIWGDkN.cjs → razor-B0mOsBYm.cjs} +1 -1
- package/dist/{razor-Do5Lpn1p.js → razor-BMsZkT51.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{tsMode-D7bHvHeH.cjs → tsMode-CVcmC_63.cjs} +1 -1
- package/dist/{tsMode-DiYbk3vf.js → tsMode-m-l3aETM.js} +1 -1
- package/dist/types.d.ts +28 -0
- package/dist/{typescript-DFdjl8Xj.js → typescript-DEwfjYff.js} +1 -1
- package/dist/{typescript-CI6w3N2S.cjs → typescript-I5zQzQ1C.cjs} +1 -1
- package/dist/{xml-CJndgX4z.js → xml-43tWDt_9.js} +1 -1
- package/dist/{xml-CO5xAOVk.cjs → xml-BGfSJ1L-.cjs} +1 -1
- package/dist/{yaml-BYk2IWKs.cjs → yaml-B1huN312.cjs} +1 -1
- package/dist/{yaml--krIkoJ8.js → yaml-CdouwYEZ.js} +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { editor } from 'monaco-editor';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
3
|
+
export interface JavascriptEditorProps {
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
theme?: 'vs' | 'vs-dark' | 'hc-black';
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
showToolbar?: boolean;
|
|
9
|
+
options?: editor.IStandaloneEditorConstructionOptions;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<JavascriptEditorProps, {
|
|
12
|
+
formatJavascript: () => Promise<void>;
|
|
13
|
+
minifyJavascript: () => void;
|
|
14
|
+
saveJavascript: () => void;
|
|
15
|
+
getValue: () => string;
|
|
16
|
+
setValue: (value: string) => void;
|
|
17
|
+
refresh: () => void;
|
|
18
|
+
editor: import('vue').Ref<{
|
|
19
|
+
updateOptions: (newOptions: editor.IEditorOptions & editor.IGlobalEditorOptions) => void;
|
|
20
|
+
addCommand: (keybinding: number, handler: editor.ICommandHandler, context?: string) => string | null;
|
|
21
|
+
createContextKey: <T extends editor.ContextKeyValue = editor.ContextKeyValue>(key: string, defaultValue: T) => editor.IContextKey<T>;
|
|
22
|
+
addAction: (descriptor: editor.IActionDescriptor) => monaco.IDisposable;
|
|
23
|
+
readonly onDidChangeModelContent: monaco.IEvent<editor.IModelContentChangedEvent>;
|
|
24
|
+
readonly onDidChangeModelLanguage: monaco.IEvent<editor.IModelLanguageChangedEvent>;
|
|
25
|
+
readonly onDidChangeModelLanguageConfiguration: monaco.IEvent<editor.IModelLanguageConfigurationChangedEvent>;
|
|
26
|
+
readonly onDidChangeModelOptions: monaco.IEvent<editor.IModelOptionsChangedEvent>;
|
|
27
|
+
readonly onDidChangeConfiguration: monaco.IEvent<editor.ConfigurationChangedEvent>;
|
|
28
|
+
readonly onDidChangeCursorPosition: monaco.IEvent<editor.ICursorPositionChangedEvent>;
|
|
29
|
+
readonly onDidChangeCursorSelection: monaco.IEvent<editor.ICursorSelectionChangedEvent>;
|
|
30
|
+
readonly onWillChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
31
|
+
readonly onDidChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
32
|
+
readonly onDidChangeModelDecorations: monaco.IEvent<editor.IModelDecorationsChangedEvent>;
|
|
33
|
+
readonly onDidFocusEditorText: monaco.IEvent<void>;
|
|
34
|
+
readonly onDidBlurEditorText: monaco.IEvent<void>;
|
|
35
|
+
readonly onDidFocusEditorWidget: monaco.IEvent<void>;
|
|
36
|
+
readonly onDidBlurEditorWidget: monaco.IEvent<void>;
|
|
37
|
+
readonly onDidCompositionStart: monaco.IEvent<void>;
|
|
38
|
+
readonly onDidCompositionEnd: monaco.IEvent<void>;
|
|
39
|
+
readonly onDidAttemptReadOnlyEdit: monaco.IEvent<void>;
|
|
40
|
+
readonly onDidPaste: monaco.IEvent<editor.IPasteEvent>;
|
|
41
|
+
readonly onMouseUp: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
42
|
+
readonly onMouseDown: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
43
|
+
readonly onContextMenu: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
44
|
+
readonly onMouseMove: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
45
|
+
readonly onMouseLeave: monaco.IEvent<editor.IPartialEditorMouseEvent>;
|
|
46
|
+
readonly onKeyUp: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
47
|
+
readonly onKeyDown: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
48
|
+
readonly onDidLayoutChange: monaco.IEvent<editor.EditorLayoutInfo>;
|
|
49
|
+
readonly onDidContentSizeChange: monaco.IEvent<editor.IContentSizeChangedEvent>;
|
|
50
|
+
readonly onDidScrollChange: monaco.IEvent<monaco.IScrollEvent>;
|
|
51
|
+
readonly onDidChangeHiddenAreas: monaco.IEvent<void>;
|
|
52
|
+
readonly onBeginUpdate: monaco.IEvent<void>;
|
|
53
|
+
readonly onEndUpdate: monaco.IEvent<void>;
|
|
54
|
+
saveViewState: () => editor.ICodeEditorViewState | null;
|
|
55
|
+
restoreViewState: (state: editor.ICodeEditorViewState | null) => void;
|
|
56
|
+
hasWidgetFocus: () => boolean;
|
|
57
|
+
getContribution: <T extends editor.IEditorContribution>(id: string) => T | null;
|
|
58
|
+
getModel: () => editor.ITextModel | null;
|
|
59
|
+
setModel: (model: editor.ITextModel | null) => void;
|
|
60
|
+
getOptions: () => editor.IComputedEditorOptions;
|
|
61
|
+
getOption: <T extends editor.EditorOption>(id: T) => editor.FindComputedEditorOptionValueById<T>;
|
|
62
|
+
getRawOptions: () => editor.IEditorOptions;
|
|
63
|
+
getValue: (options?: {
|
|
64
|
+
preserveBOM: boolean;
|
|
65
|
+
lineEnding: string;
|
|
66
|
+
}) => string;
|
|
67
|
+
setValue: (newValue: string) => void;
|
|
68
|
+
getContentWidth: () => number;
|
|
69
|
+
getScrollWidth: () => number;
|
|
70
|
+
getScrollLeft: () => number;
|
|
71
|
+
getContentHeight: () => number;
|
|
72
|
+
getScrollHeight: () => number;
|
|
73
|
+
getScrollTop: () => number;
|
|
74
|
+
setScrollLeft: (newScrollLeft: number, scrollType?: editor.ScrollType) => void;
|
|
75
|
+
setScrollTop: (newScrollTop: number, scrollType?: editor.ScrollType) => void;
|
|
76
|
+
setScrollPosition: (position: editor.INewScrollPosition, scrollType?: editor.ScrollType) => void;
|
|
77
|
+
hasPendingScrollAnimation: () => boolean;
|
|
78
|
+
getAction: (id: string) => editor.IEditorAction | null;
|
|
79
|
+
executeCommand: (source: string | null | undefined, command: editor.ICommand) => void;
|
|
80
|
+
pushUndoStop: () => boolean;
|
|
81
|
+
popUndoStop: () => boolean;
|
|
82
|
+
executeEdits: (source: string | null | undefined, edits: editor.IIdentifiedSingleEditOperation[], endCursorState?: editor.ICursorStateComputer | monaco.Selection[]) => boolean;
|
|
83
|
+
executeCommands: (source: string | null | undefined, commands: (editor.ICommand | null)[]) => void;
|
|
84
|
+
getLineDecorations: (lineNumber: number) => editor.IModelDecoration[] | null;
|
|
85
|
+
getDecorationsInRange: (range: monaco.Range) => editor.IModelDecoration[] | null;
|
|
86
|
+
deltaDecorations: (oldDecorations: string[], newDecorations: editor.IModelDeltaDecoration[]) => string[];
|
|
87
|
+
removeDecorations: (decorationIds: string[]) => void;
|
|
88
|
+
getLayoutInfo: () => editor.EditorLayoutInfo;
|
|
89
|
+
getVisibleRanges: () => monaco.Range[];
|
|
90
|
+
getTopForLineNumber: (lineNumber: number, includeViewZones?: boolean) => number;
|
|
91
|
+
getBottomForLineNumber: (lineNumber: number) => number;
|
|
92
|
+
getTopForPosition: (lineNumber: number, column: number) => number;
|
|
93
|
+
writeScreenReaderContent: (reason: string) => void;
|
|
94
|
+
getContainerDomNode: () => HTMLElement;
|
|
95
|
+
getDomNode: () => HTMLElement | null;
|
|
96
|
+
addContentWidget: (widget: editor.IContentWidget) => void;
|
|
97
|
+
layoutContentWidget: (widget: editor.IContentWidget) => void;
|
|
98
|
+
removeContentWidget: (widget: editor.IContentWidget) => void;
|
|
99
|
+
addOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
100
|
+
layoutOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
101
|
+
removeOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
102
|
+
addGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
103
|
+
layoutGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
104
|
+
removeGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
105
|
+
changeViewZones: (callback: (accessor: editor.IViewZoneChangeAccessor) => void) => void;
|
|
106
|
+
getOffsetForColumn: (lineNumber: number, column: number) => number;
|
|
107
|
+
render: (forceRedraw?: boolean) => void;
|
|
108
|
+
getTargetAtClientPoint: (clientX: number, clientY: number) => editor.IMouseTarget | null;
|
|
109
|
+
getScrolledVisiblePosition: (position: monaco.IPosition) => {
|
|
110
|
+
top: number;
|
|
111
|
+
left: number;
|
|
112
|
+
height: number;
|
|
113
|
+
} | null;
|
|
114
|
+
applyFontInfo: (target: HTMLElement) => void;
|
|
115
|
+
setBanner: (bannerDomNode: HTMLElement | null, height: number) => void;
|
|
116
|
+
handleInitialized?: (() => void) | undefined;
|
|
117
|
+
onDidDispose: (listener: () => void) => monaco.IDisposable;
|
|
118
|
+
dispose: () => void;
|
|
119
|
+
getId: () => string;
|
|
120
|
+
getEditorType: () => string;
|
|
121
|
+
layout: (dimension?: editor.IDimension, postponeRendering?: boolean) => void;
|
|
122
|
+
focus: () => void;
|
|
123
|
+
hasTextFocus: () => boolean;
|
|
124
|
+
getSupportedActions: () => editor.IEditorAction[];
|
|
125
|
+
getVisibleColumnFromPosition: (position: monaco.IPosition) => number;
|
|
126
|
+
getPosition: () => monaco.Position | null;
|
|
127
|
+
setPosition: (position: monaco.IPosition, source?: string) => void;
|
|
128
|
+
revealLine: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
129
|
+
revealLineInCenter: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
130
|
+
revealLineInCenterIfOutsideViewport: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
131
|
+
revealLineNearTop: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
132
|
+
revealPosition: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
133
|
+
revealPositionInCenter: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
134
|
+
revealPositionInCenterIfOutsideViewport: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
135
|
+
revealPositionNearTop: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
136
|
+
getSelection: () => monaco.Selection | null;
|
|
137
|
+
getSelections: () => monaco.Selection[] | null;
|
|
138
|
+
setSelection: {
|
|
139
|
+
(selection: monaco.IRange, source?: string): void;
|
|
140
|
+
(selection: monaco.Range, source?: string): void;
|
|
141
|
+
(selection: monaco.ISelection, source?: string): void;
|
|
142
|
+
(selection: monaco.Selection, source?: string): void;
|
|
143
|
+
};
|
|
144
|
+
setSelections: (selections: readonly monaco.ISelection[], source?: string) => void;
|
|
145
|
+
revealLines: (startLineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
146
|
+
revealLinesInCenter: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
147
|
+
revealLinesInCenterIfOutsideViewport: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
148
|
+
revealLinesNearTop: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
149
|
+
revealRange: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
150
|
+
revealRangeInCenter: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
151
|
+
revealRangeAtTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
152
|
+
revealRangeInCenterIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
153
|
+
revealRangeNearTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
154
|
+
revealRangeNearTopIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
155
|
+
trigger: (source: string | null | undefined, handlerId: string, payload: any) => void;
|
|
156
|
+
createDecorationsCollection: (decorations?: editor.IModelDeltaDecoration[]) => editor.IEditorDecorationsCollection;
|
|
157
|
+
} | null, editor.IStandaloneCodeEditor | {
|
|
158
|
+
updateOptions: (newOptions: editor.IEditorOptions & editor.IGlobalEditorOptions) => void;
|
|
159
|
+
addCommand: (keybinding: number, handler: editor.ICommandHandler, context?: string) => string | null;
|
|
160
|
+
createContextKey: <T extends editor.ContextKeyValue = editor.ContextKeyValue>(key: string, defaultValue: T) => editor.IContextKey<T>;
|
|
161
|
+
addAction: (descriptor: editor.IActionDescriptor) => monaco.IDisposable;
|
|
162
|
+
readonly onDidChangeModelContent: monaco.IEvent<editor.IModelContentChangedEvent>;
|
|
163
|
+
readonly onDidChangeModelLanguage: monaco.IEvent<editor.IModelLanguageChangedEvent>;
|
|
164
|
+
readonly onDidChangeModelLanguageConfiguration: monaco.IEvent<editor.IModelLanguageConfigurationChangedEvent>;
|
|
165
|
+
readonly onDidChangeModelOptions: monaco.IEvent<editor.IModelOptionsChangedEvent>;
|
|
166
|
+
readonly onDidChangeConfiguration: monaco.IEvent<editor.ConfigurationChangedEvent>;
|
|
167
|
+
readonly onDidChangeCursorPosition: monaco.IEvent<editor.ICursorPositionChangedEvent>;
|
|
168
|
+
readonly onDidChangeCursorSelection: monaco.IEvent<editor.ICursorSelectionChangedEvent>;
|
|
169
|
+
readonly onWillChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
170
|
+
readonly onDidChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
171
|
+
readonly onDidChangeModelDecorations: monaco.IEvent<editor.IModelDecorationsChangedEvent>;
|
|
172
|
+
readonly onDidFocusEditorText: monaco.IEvent<void>;
|
|
173
|
+
readonly onDidBlurEditorText: monaco.IEvent<void>;
|
|
174
|
+
readonly onDidFocusEditorWidget: monaco.IEvent<void>;
|
|
175
|
+
readonly onDidBlurEditorWidget: monaco.IEvent<void>;
|
|
176
|
+
readonly onDidCompositionStart: monaco.IEvent<void>;
|
|
177
|
+
readonly onDidCompositionEnd: monaco.IEvent<void>;
|
|
178
|
+
readonly onDidAttemptReadOnlyEdit: monaco.IEvent<void>;
|
|
179
|
+
readonly onDidPaste: monaco.IEvent<editor.IPasteEvent>;
|
|
180
|
+
readonly onMouseUp: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
181
|
+
readonly onMouseDown: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
182
|
+
readonly onContextMenu: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
183
|
+
readonly onMouseMove: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
184
|
+
readonly onMouseLeave: monaco.IEvent<editor.IPartialEditorMouseEvent>;
|
|
185
|
+
readonly onKeyUp: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
186
|
+
readonly onKeyDown: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
187
|
+
readonly onDidLayoutChange: monaco.IEvent<editor.EditorLayoutInfo>;
|
|
188
|
+
readonly onDidContentSizeChange: monaco.IEvent<editor.IContentSizeChangedEvent>;
|
|
189
|
+
readonly onDidScrollChange: monaco.IEvent<monaco.IScrollEvent>;
|
|
190
|
+
readonly onDidChangeHiddenAreas: monaco.IEvent<void>;
|
|
191
|
+
readonly onBeginUpdate: monaco.IEvent<void>;
|
|
192
|
+
readonly onEndUpdate: monaco.IEvent<void>;
|
|
193
|
+
saveViewState: () => editor.ICodeEditorViewState | null;
|
|
194
|
+
restoreViewState: (state: editor.ICodeEditorViewState | null) => void;
|
|
195
|
+
hasWidgetFocus: () => boolean;
|
|
196
|
+
getContribution: <T extends editor.IEditorContribution>(id: string) => T | null;
|
|
197
|
+
getModel: () => editor.ITextModel | null;
|
|
198
|
+
setModel: (model: editor.ITextModel | null) => void;
|
|
199
|
+
getOptions: () => editor.IComputedEditorOptions;
|
|
200
|
+
getOption: <T extends editor.EditorOption>(id: T) => editor.FindComputedEditorOptionValueById<T>;
|
|
201
|
+
getRawOptions: () => editor.IEditorOptions;
|
|
202
|
+
getValue: (options?: {
|
|
203
|
+
preserveBOM: boolean;
|
|
204
|
+
lineEnding: string;
|
|
205
|
+
}) => string;
|
|
206
|
+
setValue: (newValue: string) => void;
|
|
207
|
+
getContentWidth: () => number;
|
|
208
|
+
getScrollWidth: () => number;
|
|
209
|
+
getScrollLeft: () => number;
|
|
210
|
+
getContentHeight: () => number;
|
|
211
|
+
getScrollHeight: () => number;
|
|
212
|
+
getScrollTop: () => number;
|
|
213
|
+
setScrollLeft: (newScrollLeft: number, scrollType?: editor.ScrollType) => void;
|
|
214
|
+
setScrollTop: (newScrollTop: number, scrollType?: editor.ScrollType) => void;
|
|
215
|
+
setScrollPosition: (position: editor.INewScrollPosition, scrollType?: editor.ScrollType) => void;
|
|
216
|
+
hasPendingScrollAnimation: () => boolean;
|
|
217
|
+
getAction: (id: string) => editor.IEditorAction | null;
|
|
218
|
+
executeCommand: (source: string | null | undefined, command: editor.ICommand) => void;
|
|
219
|
+
pushUndoStop: () => boolean;
|
|
220
|
+
popUndoStop: () => boolean;
|
|
221
|
+
executeEdits: (source: string | null | undefined, edits: editor.IIdentifiedSingleEditOperation[], endCursorState?: editor.ICursorStateComputer | monaco.Selection[]) => boolean;
|
|
222
|
+
executeCommands: (source: string | null | undefined, commands: (editor.ICommand | null)[]) => void;
|
|
223
|
+
getLineDecorations: (lineNumber: number) => editor.IModelDecoration[] | null;
|
|
224
|
+
getDecorationsInRange: (range: monaco.Range) => editor.IModelDecoration[] | null;
|
|
225
|
+
deltaDecorations: (oldDecorations: string[], newDecorations: editor.IModelDeltaDecoration[]) => string[];
|
|
226
|
+
removeDecorations: (decorationIds: string[]) => void;
|
|
227
|
+
getLayoutInfo: () => editor.EditorLayoutInfo;
|
|
228
|
+
getVisibleRanges: () => monaco.Range[];
|
|
229
|
+
getTopForLineNumber: (lineNumber: number, includeViewZones?: boolean) => number;
|
|
230
|
+
getBottomForLineNumber: (lineNumber: number) => number;
|
|
231
|
+
getTopForPosition: (lineNumber: number, column: number) => number;
|
|
232
|
+
writeScreenReaderContent: (reason: string) => void;
|
|
233
|
+
getContainerDomNode: () => HTMLElement;
|
|
234
|
+
getDomNode: () => HTMLElement | null;
|
|
235
|
+
addContentWidget: (widget: editor.IContentWidget) => void;
|
|
236
|
+
layoutContentWidget: (widget: editor.IContentWidget) => void;
|
|
237
|
+
removeContentWidget: (widget: editor.IContentWidget) => void;
|
|
238
|
+
addOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
239
|
+
layoutOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
240
|
+
removeOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
241
|
+
addGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
242
|
+
layoutGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
243
|
+
removeGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
244
|
+
changeViewZones: (callback: (accessor: editor.IViewZoneChangeAccessor) => void) => void;
|
|
245
|
+
getOffsetForColumn: (lineNumber: number, column: number) => number;
|
|
246
|
+
render: (forceRedraw?: boolean) => void;
|
|
247
|
+
getTargetAtClientPoint: (clientX: number, clientY: number) => editor.IMouseTarget | null;
|
|
248
|
+
getScrolledVisiblePosition: (position: monaco.IPosition) => {
|
|
249
|
+
top: number;
|
|
250
|
+
left: number;
|
|
251
|
+
height: number;
|
|
252
|
+
} | null;
|
|
253
|
+
applyFontInfo: (target: HTMLElement) => void;
|
|
254
|
+
setBanner: (bannerDomNode: HTMLElement | null, height: number) => void;
|
|
255
|
+
handleInitialized?: (() => void) | undefined;
|
|
256
|
+
onDidDispose: (listener: () => void) => monaco.IDisposable;
|
|
257
|
+
dispose: () => void;
|
|
258
|
+
getId: () => string;
|
|
259
|
+
getEditorType: () => string;
|
|
260
|
+
layout: (dimension?: editor.IDimension, postponeRendering?: boolean) => void;
|
|
261
|
+
focus: () => void;
|
|
262
|
+
hasTextFocus: () => boolean;
|
|
263
|
+
getSupportedActions: () => editor.IEditorAction[];
|
|
264
|
+
getVisibleColumnFromPosition: (position: monaco.IPosition) => number;
|
|
265
|
+
getPosition: () => monaco.Position | null;
|
|
266
|
+
setPosition: (position: monaco.IPosition, source?: string) => void;
|
|
267
|
+
revealLine: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
268
|
+
revealLineInCenter: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
269
|
+
revealLineInCenterIfOutsideViewport: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
270
|
+
revealLineNearTop: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
271
|
+
revealPosition: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
272
|
+
revealPositionInCenter: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
273
|
+
revealPositionInCenterIfOutsideViewport: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
274
|
+
revealPositionNearTop: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
275
|
+
getSelection: () => monaco.Selection | null;
|
|
276
|
+
getSelections: () => monaco.Selection[] | null;
|
|
277
|
+
setSelection: {
|
|
278
|
+
(selection: monaco.IRange, source?: string): void;
|
|
279
|
+
(selection: monaco.Range, source?: string): void;
|
|
280
|
+
(selection: monaco.ISelection, source?: string): void;
|
|
281
|
+
(selection: monaco.Selection, source?: string): void;
|
|
282
|
+
};
|
|
283
|
+
setSelections: (selections: readonly monaco.ISelection[], source?: string) => void;
|
|
284
|
+
revealLines: (startLineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
285
|
+
revealLinesInCenter: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
286
|
+
revealLinesInCenterIfOutsideViewport: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
287
|
+
revealLinesNearTop: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
288
|
+
revealRange: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
289
|
+
revealRangeInCenter: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
290
|
+
revealRangeAtTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
291
|
+
revealRangeInCenterIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
292
|
+
revealRangeNearTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
293
|
+
revealRangeNearTopIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
294
|
+
trigger: (source: string | null | undefined, handlerId: string, payload: any) => void;
|
|
295
|
+
createDecorationsCollection: (decorations?: editor.IModelDeltaDecoration[]) => editor.IEditorDecorationsCollection;
|
|
296
|
+
} | null>;
|
|
297
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
298
|
+
"update:modelValue": (value: string) => any;
|
|
299
|
+
change: (value: string) => any;
|
|
300
|
+
blur: (value: string) => any;
|
|
301
|
+
format: (value: string) => any;
|
|
302
|
+
minify: (value: string) => any;
|
|
303
|
+
save: (value: string) => any;
|
|
304
|
+
}, string, import('vue').PublicProps, Readonly<JavascriptEditorProps> & Readonly<{
|
|
305
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
306
|
+
onChange?: ((value: string) => any) | undefined;
|
|
307
|
+
onBlur?: ((value: string) => any) | undefined;
|
|
308
|
+
onFormat?: ((value: string) => any) | undefined;
|
|
309
|
+
onMinify?: ((value: string) => any) | undefined;
|
|
310
|
+
onSave?: ((value: string) => any) | undefined;
|
|
311
|
+
}>, {
|
|
312
|
+
modelValue: string;
|
|
313
|
+
height: string;
|
|
314
|
+
theme: "vs" | "vs-dark" | "hc-black";
|
|
315
|
+
readonly: boolean;
|
|
316
|
+
showToolbar: boolean;
|
|
317
|
+
options: editor.IStandaloneEditorConstructionOptions;
|
|
318
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
319
|
+
export default _default;
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { editor } from 'monaco-editor';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
3
|
+
export interface JsonEditorProps {
|
|
4
|
+
modelValue?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
theme?: 'vs' | 'vs-dark' | 'hc-black';
|
|
7
|
+
readonly?: boolean;
|
|
8
|
+
showToolbar?: boolean;
|
|
9
|
+
options?: editor.IStandaloneEditorConstructionOptions;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<JsonEditorProps, {
|
|
12
|
+
formatJson: () => Promise<void>;
|
|
13
|
+
minifyJson: () => void;
|
|
14
|
+
validateJson: () => boolean;
|
|
15
|
+
saveJson: () => void;
|
|
16
|
+
getValue: () => string;
|
|
17
|
+
setValue: (value: string) => void;
|
|
18
|
+
refresh: () => void;
|
|
19
|
+
editor: import('vue').Ref<{
|
|
20
|
+
updateOptions: (newOptions: editor.IEditorOptions & editor.IGlobalEditorOptions) => void;
|
|
21
|
+
addCommand: (keybinding: number, handler: editor.ICommandHandler, context?: string) => string | null;
|
|
22
|
+
createContextKey: <T extends editor.ContextKeyValue = editor.ContextKeyValue>(key: string, defaultValue: T) => editor.IContextKey<T>;
|
|
23
|
+
addAction: (descriptor: editor.IActionDescriptor) => monaco.IDisposable;
|
|
24
|
+
readonly onDidChangeModelContent: monaco.IEvent<editor.IModelContentChangedEvent>;
|
|
25
|
+
readonly onDidChangeModelLanguage: monaco.IEvent<editor.IModelLanguageChangedEvent>;
|
|
26
|
+
readonly onDidChangeModelLanguageConfiguration: monaco.IEvent<editor.IModelLanguageConfigurationChangedEvent>;
|
|
27
|
+
readonly onDidChangeModelOptions: monaco.IEvent<editor.IModelOptionsChangedEvent>;
|
|
28
|
+
readonly onDidChangeConfiguration: monaco.IEvent<editor.ConfigurationChangedEvent>;
|
|
29
|
+
readonly onDidChangeCursorPosition: monaco.IEvent<editor.ICursorPositionChangedEvent>;
|
|
30
|
+
readonly onDidChangeCursorSelection: monaco.IEvent<editor.ICursorSelectionChangedEvent>;
|
|
31
|
+
readonly onWillChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
32
|
+
readonly onDidChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
33
|
+
readonly onDidChangeModelDecorations: monaco.IEvent<editor.IModelDecorationsChangedEvent>;
|
|
34
|
+
readonly onDidFocusEditorText: monaco.IEvent<void>;
|
|
35
|
+
readonly onDidBlurEditorText: monaco.IEvent<void>;
|
|
36
|
+
readonly onDidFocusEditorWidget: monaco.IEvent<void>;
|
|
37
|
+
readonly onDidBlurEditorWidget: monaco.IEvent<void>;
|
|
38
|
+
readonly onDidCompositionStart: monaco.IEvent<void>;
|
|
39
|
+
readonly onDidCompositionEnd: monaco.IEvent<void>;
|
|
40
|
+
readonly onDidAttemptReadOnlyEdit: monaco.IEvent<void>;
|
|
41
|
+
readonly onDidPaste: monaco.IEvent<editor.IPasteEvent>;
|
|
42
|
+
readonly onMouseUp: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
43
|
+
readonly onMouseDown: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
44
|
+
readonly onContextMenu: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
45
|
+
readonly onMouseMove: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
46
|
+
readonly onMouseLeave: monaco.IEvent<editor.IPartialEditorMouseEvent>;
|
|
47
|
+
readonly onKeyUp: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
48
|
+
readonly onKeyDown: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
49
|
+
readonly onDidLayoutChange: monaco.IEvent<editor.EditorLayoutInfo>;
|
|
50
|
+
readonly onDidContentSizeChange: monaco.IEvent<editor.IContentSizeChangedEvent>;
|
|
51
|
+
readonly onDidScrollChange: monaco.IEvent<monaco.IScrollEvent>;
|
|
52
|
+
readonly onDidChangeHiddenAreas: monaco.IEvent<void>;
|
|
53
|
+
readonly onBeginUpdate: monaco.IEvent<void>;
|
|
54
|
+
readonly onEndUpdate: monaco.IEvent<void>;
|
|
55
|
+
saveViewState: () => editor.ICodeEditorViewState | null;
|
|
56
|
+
restoreViewState: (state: editor.ICodeEditorViewState | null) => void;
|
|
57
|
+
hasWidgetFocus: () => boolean;
|
|
58
|
+
getContribution: <T extends editor.IEditorContribution>(id: string) => T | null;
|
|
59
|
+
getModel: () => editor.ITextModel | null;
|
|
60
|
+
setModel: (model: editor.ITextModel | null) => void;
|
|
61
|
+
getOptions: () => editor.IComputedEditorOptions;
|
|
62
|
+
getOption: <T extends editor.EditorOption>(id: T) => editor.FindComputedEditorOptionValueById<T>;
|
|
63
|
+
getRawOptions: () => editor.IEditorOptions;
|
|
64
|
+
getValue: (options?: {
|
|
65
|
+
preserveBOM: boolean;
|
|
66
|
+
lineEnding: string;
|
|
67
|
+
}) => string;
|
|
68
|
+
setValue: (newValue: string) => void;
|
|
69
|
+
getContentWidth: () => number;
|
|
70
|
+
getScrollWidth: () => number;
|
|
71
|
+
getScrollLeft: () => number;
|
|
72
|
+
getContentHeight: () => number;
|
|
73
|
+
getScrollHeight: () => number;
|
|
74
|
+
getScrollTop: () => number;
|
|
75
|
+
setScrollLeft: (newScrollLeft: number, scrollType?: editor.ScrollType) => void;
|
|
76
|
+
setScrollTop: (newScrollTop: number, scrollType?: editor.ScrollType) => void;
|
|
77
|
+
setScrollPosition: (position: editor.INewScrollPosition, scrollType?: editor.ScrollType) => void;
|
|
78
|
+
hasPendingScrollAnimation: () => boolean;
|
|
79
|
+
getAction: (id: string) => editor.IEditorAction | null;
|
|
80
|
+
executeCommand: (source: string | null | undefined, command: editor.ICommand) => void;
|
|
81
|
+
pushUndoStop: () => boolean;
|
|
82
|
+
popUndoStop: () => boolean;
|
|
83
|
+
executeEdits: (source: string | null | undefined, edits: editor.IIdentifiedSingleEditOperation[], endCursorState?: editor.ICursorStateComputer | monaco.Selection[]) => boolean;
|
|
84
|
+
executeCommands: (source: string | null | undefined, commands: (editor.ICommand | null)[]) => void;
|
|
85
|
+
getLineDecorations: (lineNumber: number) => editor.IModelDecoration[] | null;
|
|
86
|
+
getDecorationsInRange: (range: monaco.Range) => editor.IModelDecoration[] | null;
|
|
87
|
+
deltaDecorations: (oldDecorations: string[], newDecorations: editor.IModelDeltaDecoration[]) => string[];
|
|
88
|
+
removeDecorations: (decorationIds: string[]) => void;
|
|
89
|
+
getLayoutInfo: () => editor.EditorLayoutInfo;
|
|
90
|
+
getVisibleRanges: () => monaco.Range[];
|
|
91
|
+
getTopForLineNumber: (lineNumber: number, includeViewZones?: boolean) => number;
|
|
92
|
+
getBottomForLineNumber: (lineNumber: number) => number;
|
|
93
|
+
getTopForPosition: (lineNumber: number, column: number) => number;
|
|
94
|
+
writeScreenReaderContent: (reason: string) => void;
|
|
95
|
+
getContainerDomNode: () => HTMLElement;
|
|
96
|
+
getDomNode: () => HTMLElement | null;
|
|
97
|
+
addContentWidget: (widget: editor.IContentWidget) => void;
|
|
98
|
+
layoutContentWidget: (widget: editor.IContentWidget) => void;
|
|
99
|
+
removeContentWidget: (widget: editor.IContentWidget) => void;
|
|
100
|
+
addOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
101
|
+
layoutOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
102
|
+
removeOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
103
|
+
addGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
104
|
+
layoutGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
105
|
+
removeGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
106
|
+
changeViewZones: (callback: (accessor: editor.IViewZoneChangeAccessor) => void) => void;
|
|
107
|
+
getOffsetForColumn: (lineNumber: number, column: number) => number;
|
|
108
|
+
render: (forceRedraw?: boolean) => void;
|
|
109
|
+
getTargetAtClientPoint: (clientX: number, clientY: number) => editor.IMouseTarget | null;
|
|
110
|
+
getScrolledVisiblePosition: (position: monaco.IPosition) => {
|
|
111
|
+
top: number;
|
|
112
|
+
left: number;
|
|
113
|
+
height: number;
|
|
114
|
+
} | null;
|
|
115
|
+
applyFontInfo: (target: HTMLElement) => void;
|
|
116
|
+
setBanner: (bannerDomNode: HTMLElement | null, height: number) => void;
|
|
117
|
+
handleInitialized?: (() => void) | undefined;
|
|
118
|
+
onDidDispose: (listener: () => void) => monaco.IDisposable;
|
|
119
|
+
dispose: () => void;
|
|
120
|
+
getId: () => string;
|
|
121
|
+
getEditorType: () => string;
|
|
122
|
+
layout: (dimension?: editor.IDimension, postponeRendering?: boolean) => void;
|
|
123
|
+
focus: () => void;
|
|
124
|
+
hasTextFocus: () => boolean;
|
|
125
|
+
getSupportedActions: () => editor.IEditorAction[];
|
|
126
|
+
getVisibleColumnFromPosition: (position: monaco.IPosition) => number;
|
|
127
|
+
getPosition: () => monaco.Position | null;
|
|
128
|
+
setPosition: (position: monaco.IPosition, source?: string) => void;
|
|
129
|
+
revealLine: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
130
|
+
revealLineInCenter: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
131
|
+
revealLineInCenterIfOutsideViewport: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
132
|
+
revealLineNearTop: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
133
|
+
revealPosition: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
134
|
+
revealPositionInCenter: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
135
|
+
revealPositionInCenterIfOutsideViewport: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
136
|
+
revealPositionNearTop: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
137
|
+
getSelection: () => monaco.Selection | null;
|
|
138
|
+
getSelections: () => monaco.Selection[] | null;
|
|
139
|
+
setSelection: {
|
|
140
|
+
(selection: monaco.IRange, source?: string): void;
|
|
141
|
+
(selection: monaco.Range, source?: string): void;
|
|
142
|
+
(selection: monaco.ISelection, source?: string): void;
|
|
143
|
+
(selection: monaco.Selection, source?: string): void;
|
|
144
|
+
};
|
|
145
|
+
setSelections: (selections: readonly monaco.ISelection[], source?: string) => void;
|
|
146
|
+
revealLines: (startLineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
147
|
+
revealLinesInCenter: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
148
|
+
revealLinesInCenterIfOutsideViewport: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
149
|
+
revealLinesNearTop: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
150
|
+
revealRange: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
151
|
+
revealRangeInCenter: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
152
|
+
revealRangeAtTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
153
|
+
revealRangeInCenterIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
154
|
+
revealRangeNearTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
155
|
+
revealRangeNearTopIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
156
|
+
trigger: (source: string | null | undefined, handlerId: string, payload: any) => void;
|
|
157
|
+
createDecorationsCollection: (decorations?: editor.IModelDeltaDecoration[]) => editor.IEditorDecorationsCollection;
|
|
158
|
+
} | null, editor.IStandaloneCodeEditor | {
|
|
159
|
+
updateOptions: (newOptions: editor.IEditorOptions & editor.IGlobalEditorOptions) => void;
|
|
160
|
+
addCommand: (keybinding: number, handler: editor.ICommandHandler, context?: string) => string | null;
|
|
161
|
+
createContextKey: <T extends editor.ContextKeyValue = editor.ContextKeyValue>(key: string, defaultValue: T) => editor.IContextKey<T>;
|
|
162
|
+
addAction: (descriptor: editor.IActionDescriptor) => monaco.IDisposable;
|
|
163
|
+
readonly onDidChangeModelContent: monaco.IEvent<editor.IModelContentChangedEvent>;
|
|
164
|
+
readonly onDidChangeModelLanguage: monaco.IEvent<editor.IModelLanguageChangedEvent>;
|
|
165
|
+
readonly onDidChangeModelLanguageConfiguration: monaco.IEvent<editor.IModelLanguageConfigurationChangedEvent>;
|
|
166
|
+
readonly onDidChangeModelOptions: monaco.IEvent<editor.IModelOptionsChangedEvent>;
|
|
167
|
+
readonly onDidChangeConfiguration: monaco.IEvent<editor.ConfigurationChangedEvent>;
|
|
168
|
+
readonly onDidChangeCursorPosition: monaco.IEvent<editor.ICursorPositionChangedEvent>;
|
|
169
|
+
readonly onDidChangeCursorSelection: monaco.IEvent<editor.ICursorSelectionChangedEvent>;
|
|
170
|
+
readonly onWillChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
171
|
+
readonly onDidChangeModel: monaco.IEvent<editor.IModelChangedEvent>;
|
|
172
|
+
readonly onDidChangeModelDecorations: monaco.IEvent<editor.IModelDecorationsChangedEvent>;
|
|
173
|
+
readonly onDidFocusEditorText: monaco.IEvent<void>;
|
|
174
|
+
readonly onDidBlurEditorText: monaco.IEvent<void>;
|
|
175
|
+
readonly onDidFocusEditorWidget: monaco.IEvent<void>;
|
|
176
|
+
readonly onDidBlurEditorWidget: monaco.IEvent<void>;
|
|
177
|
+
readonly onDidCompositionStart: monaco.IEvent<void>;
|
|
178
|
+
readonly onDidCompositionEnd: monaco.IEvent<void>;
|
|
179
|
+
readonly onDidAttemptReadOnlyEdit: monaco.IEvent<void>;
|
|
180
|
+
readonly onDidPaste: monaco.IEvent<editor.IPasteEvent>;
|
|
181
|
+
readonly onMouseUp: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
182
|
+
readonly onMouseDown: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
183
|
+
readonly onContextMenu: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
184
|
+
readonly onMouseMove: monaco.IEvent<editor.IEditorMouseEvent>;
|
|
185
|
+
readonly onMouseLeave: monaco.IEvent<editor.IPartialEditorMouseEvent>;
|
|
186
|
+
readonly onKeyUp: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
187
|
+
readonly onKeyDown: monaco.IEvent<monaco.IKeyboardEvent>;
|
|
188
|
+
readonly onDidLayoutChange: monaco.IEvent<editor.EditorLayoutInfo>;
|
|
189
|
+
readonly onDidContentSizeChange: monaco.IEvent<editor.IContentSizeChangedEvent>;
|
|
190
|
+
readonly onDidScrollChange: monaco.IEvent<monaco.IScrollEvent>;
|
|
191
|
+
readonly onDidChangeHiddenAreas: monaco.IEvent<void>;
|
|
192
|
+
readonly onBeginUpdate: monaco.IEvent<void>;
|
|
193
|
+
readonly onEndUpdate: monaco.IEvent<void>;
|
|
194
|
+
saveViewState: () => editor.ICodeEditorViewState | null;
|
|
195
|
+
restoreViewState: (state: editor.ICodeEditorViewState | null) => void;
|
|
196
|
+
hasWidgetFocus: () => boolean;
|
|
197
|
+
getContribution: <T extends editor.IEditorContribution>(id: string) => T | null;
|
|
198
|
+
getModel: () => editor.ITextModel | null;
|
|
199
|
+
setModel: (model: editor.ITextModel | null) => void;
|
|
200
|
+
getOptions: () => editor.IComputedEditorOptions;
|
|
201
|
+
getOption: <T extends editor.EditorOption>(id: T) => editor.FindComputedEditorOptionValueById<T>;
|
|
202
|
+
getRawOptions: () => editor.IEditorOptions;
|
|
203
|
+
getValue: (options?: {
|
|
204
|
+
preserveBOM: boolean;
|
|
205
|
+
lineEnding: string;
|
|
206
|
+
}) => string;
|
|
207
|
+
setValue: (newValue: string) => void;
|
|
208
|
+
getContentWidth: () => number;
|
|
209
|
+
getScrollWidth: () => number;
|
|
210
|
+
getScrollLeft: () => number;
|
|
211
|
+
getContentHeight: () => number;
|
|
212
|
+
getScrollHeight: () => number;
|
|
213
|
+
getScrollTop: () => number;
|
|
214
|
+
setScrollLeft: (newScrollLeft: number, scrollType?: editor.ScrollType) => void;
|
|
215
|
+
setScrollTop: (newScrollTop: number, scrollType?: editor.ScrollType) => void;
|
|
216
|
+
setScrollPosition: (position: editor.INewScrollPosition, scrollType?: editor.ScrollType) => void;
|
|
217
|
+
hasPendingScrollAnimation: () => boolean;
|
|
218
|
+
getAction: (id: string) => editor.IEditorAction | null;
|
|
219
|
+
executeCommand: (source: string | null | undefined, command: editor.ICommand) => void;
|
|
220
|
+
pushUndoStop: () => boolean;
|
|
221
|
+
popUndoStop: () => boolean;
|
|
222
|
+
executeEdits: (source: string | null | undefined, edits: editor.IIdentifiedSingleEditOperation[], endCursorState?: editor.ICursorStateComputer | monaco.Selection[]) => boolean;
|
|
223
|
+
executeCommands: (source: string | null | undefined, commands: (editor.ICommand | null)[]) => void;
|
|
224
|
+
getLineDecorations: (lineNumber: number) => editor.IModelDecoration[] | null;
|
|
225
|
+
getDecorationsInRange: (range: monaco.Range) => editor.IModelDecoration[] | null;
|
|
226
|
+
deltaDecorations: (oldDecorations: string[], newDecorations: editor.IModelDeltaDecoration[]) => string[];
|
|
227
|
+
removeDecorations: (decorationIds: string[]) => void;
|
|
228
|
+
getLayoutInfo: () => editor.EditorLayoutInfo;
|
|
229
|
+
getVisibleRanges: () => monaco.Range[];
|
|
230
|
+
getTopForLineNumber: (lineNumber: number, includeViewZones?: boolean) => number;
|
|
231
|
+
getBottomForLineNumber: (lineNumber: number) => number;
|
|
232
|
+
getTopForPosition: (lineNumber: number, column: number) => number;
|
|
233
|
+
writeScreenReaderContent: (reason: string) => void;
|
|
234
|
+
getContainerDomNode: () => HTMLElement;
|
|
235
|
+
getDomNode: () => HTMLElement | null;
|
|
236
|
+
addContentWidget: (widget: editor.IContentWidget) => void;
|
|
237
|
+
layoutContentWidget: (widget: editor.IContentWidget) => void;
|
|
238
|
+
removeContentWidget: (widget: editor.IContentWidget) => void;
|
|
239
|
+
addOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
240
|
+
layoutOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
241
|
+
removeOverlayWidget: (widget: editor.IOverlayWidget) => void;
|
|
242
|
+
addGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
243
|
+
layoutGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
244
|
+
removeGlyphMarginWidget: (widget: editor.IGlyphMarginWidget) => void;
|
|
245
|
+
changeViewZones: (callback: (accessor: editor.IViewZoneChangeAccessor) => void) => void;
|
|
246
|
+
getOffsetForColumn: (lineNumber: number, column: number) => number;
|
|
247
|
+
render: (forceRedraw?: boolean) => void;
|
|
248
|
+
getTargetAtClientPoint: (clientX: number, clientY: number) => editor.IMouseTarget | null;
|
|
249
|
+
getScrolledVisiblePosition: (position: monaco.IPosition) => {
|
|
250
|
+
top: number;
|
|
251
|
+
left: number;
|
|
252
|
+
height: number;
|
|
253
|
+
} | null;
|
|
254
|
+
applyFontInfo: (target: HTMLElement) => void;
|
|
255
|
+
setBanner: (bannerDomNode: HTMLElement | null, height: number) => void;
|
|
256
|
+
handleInitialized?: (() => void) | undefined;
|
|
257
|
+
onDidDispose: (listener: () => void) => monaco.IDisposable;
|
|
258
|
+
dispose: () => void;
|
|
259
|
+
getId: () => string;
|
|
260
|
+
getEditorType: () => string;
|
|
261
|
+
layout: (dimension?: editor.IDimension, postponeRendering?: boolean) => void;
|
|
262
|
+
focus: () => void;
|
|
263
|
+
hasTextFocus: () => boolean;
|
|
264
|
+
getSupportedActions: () => editor.IEditorAction[];
|
|
265
|
+
getVisibleColumnFromPosition: (position: monaco.IPosition) => number;
|
|
266
|
+
getPosition: () => monaco.Position | null;
|
|
267
|
+
setPosition: (position: monaco.IPosition, source?: string) => void;
|
|
268
|
+
revealLine: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
269
|
+
revealLineInCenter: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
270
|
+
revealLineInCenterIfOutsideViewport: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
271
|
+
revealLineNearTop: (lineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
272
|
+
revealPosition: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
273
|
+
revealPositionInCenter: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
274
|
+
revealPositionInCenterIfOutsideViewport: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
275
|
+
revealPositionNearTop: (position: monaco.IPosition, scrollType?: editor.ScrollType) => void;
|
|
276
|
+
getSelection: () => monaco.Selection | null;
|
|
277
|
+
getSelections: () => monaco.Selection[] | null;
|
|
278
|
+
setSelection: {
|
|
279
|
+
(selection: monaco.IRange, source?: string): void;
|
|
280
|
+
(selection: monaco.Range, source?: string): void;
|
|
281
|
+
(selection: monaco.ISelection, source?: string): void;
|
|
282
|
+
(selection: monaco.Selection, source?: string): void;
|
|
283
|
+
};
|
|
284
|
+
setSelections: (selections: readonly monaco.ISelection[], source?: string) => void;
|
|
285
|
+
revealLines: (startLineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
286
|
+
revealLinesInCenter: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
287
|
+
revealLinesInCenterIfOutsideViewport: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
288
|
+
revealLinesNearTop: (lineNumber: number, endLineNumber: number, scrollType?: editor.ScrollType) => void;
|
|
289
|
+
revealRange: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
290
|
+
revealRangeInCenter: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
291
|
+
revealRangeAtTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
292
|
+
revealRangeInCenterIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
293
|
+
revealRangeNearTop: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
294
|
+
revealRangeNearTopIfOutsideViewport: (range: monaco.IRange, scrollType?: editor.ScrollType) => void;
|
|
295
|
+
trigger: (source: string | null | undefined, handlerId: string, payload: any) => void;
|
|
296
|
+
createDecorationsCollection: (decorations?: editor.IModelDeltaDecoration[]) => editor.IEditorDecorationsCollection;
|
|
297
|
+
} | null>;
|
|
298
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
299
|
+
"update:modelValue": (value: string) => any;
|
|
300
|
+
change: (value: string) => any;
|
|
301
|
+
blur: (value: string) => any;
|
|
302
|
+
format: (value: string) => any;
|
|
303
|
+
minify: (value: string) => any;
|
|
304
|
+
save: (value: string) => any;
|
|
305
|
+
validate: (isValid: boolean, error?: string | undefined) => any;
|
|
306
|
+
}, string, import('vue').PublicProps, Readonly<JsonEditorProps> & Readonly<{
|
|
307
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
308
|
+
onChange?: ((value: string) => any) | undefined;
|
|
309
|
+
onBlur?: ((value: string) => any) | undefined;
|
|
310
|
+
onFormat?: ((value: string) => any) | undefined;
|
|
311
|
+
onMinify?: ((value: string) => any) | undefined;
|
|
312
|
+
onSave?: ((value: string) => any) | undefined;
|
|
313
|
+
onValidate?: ((isValid: boolean, error?: string | undefined) => any) | undefined;
|
|
314
|
+
}>, {
|
|
315
|
+
modelValue: string;
|
|
316
|
+
height: string;
|
|
317
|
+
theme: "vs" | "vs-dark" | "hc-black";
|
|
318
|
+
readonly: boolean;
|
|
319
|
+
showToolbar: boolean;
|
|
320
|
+
options: editor.IStandaloneEditorConstructionOptions;
|
|
321
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
322
|
+
export default _default;
|