acode-plugin-types 1.11.7-patch.1
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 +8 -0
- package/index.d.ts +91 -0
- package/package.json +26 -0
- package/src/ace/index.d.ts +1 -0
- package/src/ace/modelist.d.ts +22 -0
- package/src/acode.d.ts +437 -0
- package/src/components/collapsibleList.d.ts +11 -0
- package/src/components/contextMenu.d.ts +66 -0
- package/src/components/index.d.ts +10 -0
- package/src/components/inputhints.d.ts +45 -0
- package/src/components/page.d.ts +22 -0
- package/src/components/palette.d.ts +21 -0
- package/src/components/sideButton.d.ts +35 -0
- package/src/components/terminal/index.d.ts +1 -0
- package/src/components/terminal/terminalManager.d.ts +113 -0
- package/src/components/toast.d.ts +20 -0
- package/src/components/tutorial.d.ts +13 -0
- package/src/components/webComponents/index.d.ts +1 -0
- package/src/components/webComponents/wcPage.d.ts +85 -0
- package/src/dialogs/alert.d.ts +15 -0
- package/src/dialogs/box.d.ts +45 -0
- package/src/dialogs/color.d.ts +15 -0
- package/src/dialogs/confirm.d.ts +16 -0
- package/src/dialogs/index.d.ts +8 -0
- package/src/dialogs/loader.d.ts +44 -0
- package/src/dialogs/multiPrompt.d.ts +16 -0
- package/src/dialogs/prompt.d.ts +47 -0
- package/src/dialogs/select.d.ts +66 -0
- package/src/fileSystem.d.ts +113 -0
- package/src/handlers/index.d.ts +3 -0
- package/src/handlers/intent.d.ts +47 -0
- package/src/handlers/keyboard.d.ts +30 -0
- package/src/handlers/windowResize.d.ts +13 -0
- package/src/index.d.ts +12 -0
- package/src/lib/actionStack.d.ts +60 -0
- package/src/lib/editorFile.d.ts +344 -0
- package/src/lib/editorManager.d.ts +127 -0
- package/src/lib/fileList.d.ts +70 -0
- package/src/lib/fonts.d.ts +29 -0
- package/src/lib/index.d.ts +9 -0
- package/src/lib/openFolder.d.ts +102 -0
- package/src/lib/projects.d.ts +28 -0
- package/src/lib/selectionMenu.d.ts +19 -0
- package/src/lib/settings.d.ts +155 -0
- package/src/pages/fileBrowser/fileBrowser.d.ts +65 -0
- package/src/pages/fileBrowser/index.d.ts +1 -0
- package/src/pages/index.d.ts +1 -0
- package/src/plugins/customtabs/CustomTabs.d.ts +57 -0
- package/src/plugins/customtabs/index.d.ts +1 -0
- package/src/plugins/index.d.ts +4 -0
- package/src/plugins/system/System.d.ts +550 -0
- package/src/plugins/system/index.d.ts +1 -0
- package/src/plugins/terminal/Executor.d.ts +155 -0
- package/src/plugins/terminal/Terminal.d.ts +123 -0
- package/src/plugins/terminal/index.d.ts +2 -0
- package/src/plugins/websocket/WebSocket.d.ts +224 -0
- package/src/plugins/websocket/index.d.ts +1 -0
- package/src/sideBarApps.d.ts +39 -0
- package/src/test.ts +517 -0
- package/src/theme/builder.d.ts +188 -0
- package/src/theme/index.d.ts +2 -0
- package/src/theme/list.d.ts +29 -0
- package/src/utils/KeyboardEvent.d.ts +19 -0
- package/src/utils/Url.d.ts +65 -0
- package/src/utils/color.d.ts +51 -0
- package/src/utils/encodings.d.ts +24 -0
- package/src/utils/helpers.d.ts +102 -0
- package/src/utils/index.d.ts +5 -0
- package/types/ace/VERSION +1 -0
- package/types/ace/ace-modes.d.ts +1724 -0
- package/types/ace/index.d.ts +1176 -0
- package/types/ace/types/ace-ext.d.ts +720 -0
- package/types/ace/types/ace-lib.d.ts +302 -0
- package/types/ace/types/ace-modules.d.ts +5293 -0
- package/types/ace/types/ace-snippets.d.ts +406 -0
- package/types/ace/types/ace-theme.d.ts +437 -0
- package/types/html-tag-js.d.ts +680 -0
- package/types/require.d.ts +412 -0
- package/types/xterm.d.ts +1908 -0
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
/* This file is generated using `npm run update-types` */
|
|
2
|
+
|
|
3
|
+
declare module "ace/ext/command_bar" {
|
|
4
|
+
/**
|
|
5
|
+
* Displays a command tooltip above the currently active line selection, with clickable elements.
|
|
6
|
+
*
|
|
7
|
+
* Internally it is a composite of two tooltips, one for the main tooltip and one for the
|
|
8
|
+
* overflowing commands.
|
|
9
|
+
* The commands are added sequentially in registration order.
|
|
10
|
+
* When attached to an editor, it is either always shown or only when the active line is hovered
|
|
11
|
+
* with mouse, depending on the alwaysShow property.
|
|
12
|
+
*/
|
|
13
|
+
export class CommandBarTooltip {
|
|
14
|
+
constructor(
|
|
15
|
+
parentNode: HTMLElement,
|
|
16
|
+
options?: Partial<Ace.CommandBarOptions>,
|
|
17
|
+
);
|
|
18
|
+
parentNode: HTMLElement;
|
|
19
|
+
tooltip: Tooltip;
|
|
20
|
+
moreOptions: Tooltip;
|
|
21
|
+
maxElementsOnTooltip: number;
|
|
22
|
+
eventListeners: {};
|
|
23
|
+
elements: {};
|
|
24
|
+
commands: {};
|
|
25
|
+
tooltipEl: any[] | HTMLElement | Text;
|
|
26
|
+
moreOptionsEl: any[] | HTMLElement | Text;
|
|
27
|
+
/**
|
|
28
|
+
* Registers a command on the command bar tooltip.
|
|
29
|
+
*
|
|
30
|
+
* The commands are added in sequential order. If there is not enough space on the main
|
|
31
|
+
* toolbar, the remaining elements are added to the overflow menu.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
registerCommand(id: string, command: TooltipCommand): void;
|
|
35
|
+
isShown(): boolean;
|
|
36
|
+
isMoreOptionsShown(): boolean;
|
|
37
|
+
getAlwaysShow(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the display mode of the tooltip
|
|
40
|
+
*
|
|
41
|
+
* When true, the tooltip is always displayed while it is attached to an editor.
|
|
42
|
+
* When false, the tooltip is displayed only when the mouse hovers over the active editor line.
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
setAlwaysShow(alwaysShow: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* Attaches the clickable command bar tooltip to an editor
|
|
48
|
+
*
|
|
49
|
+
* Depending on the alwaysShow parameter it either displays the tooltip immediately,
|
|
50
|
+
* or subscribes to the necessary events to display the tooltip on hover.
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
attach(editor: Editor): void;
|
|
54
|
+
editor: import("ace/editor").Editor;
|
|
55
|
+
/**
|
|
56
|
+
* Updates the position of the command bar tooltip. It aligns itself above the active line in the editor.
|
|
57
|
+
*/
|
|
58
|
+
updatePosition(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Updates each command element in the tooltip.
|
|
61
|
+
*
|
|
62
|
+
* This is automatically called on certain events, but can be called manually as well.
|
|
63
|
+
*/
|
|
64
|
+
update(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Detaches the tooltip from the editor.
|
|
67
|
+
*/
|
|
68
|
+
detach(): void;
|
|
69
|
+
destroy(): void;
|
|
70
|
+
}
|
|
71
|
+
export type Editor = import("ace/editor").Editor;
|
|
72
|
+
export type TooltipCommand = Ace.TooltipCommand;
|
|
73
|
+
import { Tooltip } from "ace/tooltip";
|
|
74
|
+
export var TOOLTIP_CLASS_NAME: string;
|
|
75
|
+
export var BUTTON_CLASS_NAME: string;
|
|
76
|
+
namespace Ace {
|
|
77
|
+
type EventEmitter<
|
|
78
|
+
T extends {
|
|
79
|
+
[K in keyof T]: (...args: any[]) => any;
|
|
80
|
+
},
|
|
81
|
+
> = Ace.EventEmitter<T>;
|
|
82
|
+
type CommandBarEvents = Ace.CommandBarEvents;
|
|
83
|
+
}
|
|
84
|
+
export interface CommandBarTooltip
|
|
85
|
+
extends Ace.EventEmitter<Ace.CommandBarEvents> {}
|
|
86
|
+
}
|
|
87
|
+
declare module "ace/ext/language_tools" {
|
|
88
|
+
export function setCompleters(val: any): void;
|
|
89
|
+
export function addCompleter(completer: any): void;
|
|
90
|
+
import textCompleter = require("ace/autocomplete/text_completer");
|
|
91
|
+
export var keyWordCompleter: Ace.Completer;
|
|
92
|
+
export var snippetCompleter: Ace.Completer;
|
|
93
|
+
export { textCompleter };
|
|
94
|
+
}
|
|
95
|
+
declare module "ace/ext/inline_autocomplete" {
|
|
96
|
+
/**
|
|
97
|
+
* This class controls the inline-only autocompletion components and their lifecycle.
|
|
98
|
+
* This is more lightweight than the popup-based autocompletion, as it can only work with exact prefix matches.
|
|
99
|
+
* There is an inline ghost text renderer and an optional command bar tooltip inside.
|
|
100
|
+
*/
|
|
101
|
+
export class InlineAutocomplete {
|
|
102
|
+
constructor(editor: Editor);
|
|
103
|
+
editor: Editor;
|
|
104
|
+
keyboardHandler: HashHandler;
|
|
105
|
+
blurListener(e: any): void;
|
|
106
|
+
changeListener(e: any): void;
|
|
107
|
+
changeTimer: {
|
|
108
|
+
(timeout?: number): void;
|
|
109
|
+
delay(timeout?: number): void;
|
|
110
|
+
schedule: any;
|
|
111
|
+
call(): void;
|
|
112
|
+
cancel(): void;
|
|
113
|
+
isPending(): any;
|
|
114
|
+
};
|
|
115
|
+
getInlineRenderer(): AceInline;
|
|
116
|
+
inlineRenderer: AceInline;
|
|
117
|
+
getInlineTooltip(): CommandBarTooltip;
|
|
118
|
+
inlineTooltip: CommandBarTooltip;
|
|
119
|
+
/**
|
|
120
|
+
* This function is the entry point to the class. This triggers the gathering of the autocompletion and displaying the results;
|
|
121
|
+
*/
|
|
122
|
+
show(options: Ace.CompletionOptions): void;
|
|
123
|
+
activated: boolean;
|
|
124
|
+
insertMatch(): boolean;
|
|
125
|
+
goTo(where: Ace.InlineAutocompleteAction): void;
|
|
126
|
+
getLength(): any;
|
|
127
|
+
getData(index?: number): Ace.Completion | undefined;
|
|
128
|
+
getIndex(): number;
|
|
129
|
+
isOpen(): boolean;
|
|
130
|
+
setIndex(value: number): void;
|
|
131
|
+
getCompletionProvider(initialPosition: any): CompletionProvider;
|
|
132
|
+
completionProvider: CompletionProvider;
|
|
133
|
+
updateCompletions(options?: Ace.CompletionOptions): void;
|
|
134
|
+
base: import("ace/anchor").Anchor;
|
|
135
|
+
completions: FilteredList;
|
|
136
|
+
detach(): void;
|
|
137
|
+
destroy(): void;
|
|
138
|
+
updateDocTooltip(): void;
|
|
139
|
+
commands: {
|
|
140
|
+
[key: string]: Ace.Command;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export namespace InlineAutocomplete {
|
|
144
|
+
function _for(editor: any): any;
|
|
145
|
+
export { _for as for };
|
|
146
|
+
export namespace startCommand {
|
|
147
|
+
let name: string;
|
|
148
|
+
function exec(editor: any, options: any): void;
|
|
149
|
+
export namespace bindKey {
|
|
150
|
+
let win: string;
|
|
151
|
+
let mac: string;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Factory method to create a command bar tooltip for inline autocomplete.
|
|
156
|
+
*
|
|
157
|
+
* @param {HTMLElement} parentEl The parent element where the tooltip HTML elements will be added.
|
|
158
|
+
* @returns {CommandBarTooltip} The command bar tooltip for inline autocomplete
|
|
159
|
+
*/
|
|
160
|
+
export function createInlineTooltip(
|
|
161
|
+
parentEl: HTMLElement,
|
|
162
|
+
): CommandBarTooltip;
|
|
163
|
+
}
|
|
164
|
+
import { Editor } from "ace/editor";
|
|
165
|
+
import { HashHandler } from "ace/keyboard/hash_handler";
|
|
166
|
+
import { AceInline } from "ace/autocomplete/inline";
|
|
167
|
+
import { CommandBarTooltip } from "ace/ext/command_bar";
|
|
168
|
+
import { CompletionProvider } from "ace/autocomplete";
|
|
169
|
+
import { FilteredList } from "ace/autocomplete";
|
|
170
|
+
}
|
|
171
|
+
declare module "ace/ext/searchbox-css" {
|
|
172
|
+
const _exports: string;
|
|
173
|
+
export = _exports;
|
|
174
|
+
}
|
|
175
|
+
declare module "ace/ext/searchbox" {
|
|
176
|
+
export function Search(editor: Editor, isReplace?: boolean): void;
|
|
177
|
+
export type Editor = import("ace/editor").Editor;
|
|
178
|
+
export class SearchBox {
|
|
179
|
+
constructor(editor: Editor, range?: never, showReplaceForm?: never);
|
|
180
|
+
activeInput: any;
|
|
181
|
+
element: any;
|
|
182
|
+
setSession(e: any): void;
|
|
183
|
+
setEditor(editor: Editor): void;
|
|
184
|
+
editor: Editor;
|
|
185
|
+
searchRange: any;
|
|
186
|
+
searchBox: HTMLElement;
|
|
187
|
+
replaceBox: HTMLElement;
|
|
188
|
+
searchOption: HTMLInputElement;
|
|
189
|
+
replaceOption: HTMLInputElement;
|
|
190
|
+
regExpOption: HTMLInputElement;
|
|
191
|
+
caseSensitiveOption: HTMLInputElement;
|
|
192
|
+
wholeWordOption: HTMLInputElement;
|
|
193
|
+
searchInput: HTMLInputElement;
|
|
194
|
+
replaceInput: HTMLInputElement;
|
|
195
|
+
searchCounter: HTMLElement;
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @external
|
|
199
|
+
*/
|
|
200
|
+
$onChange: {
|
|
201
|
+
schedule: (timeout?: number) => void;
|
|
202
|
+
};
|
|
203
|
+
setSearchRange(range: any): void;
|
|
204
|
+
searchRangeMarker: number;
|
|
205
|
+
/**
|
|
206
|
+
* @external
|
|
207
|
+
*/
|
|
208
|
+
$syncOptions(preventScroll?: boolean): void;
|
|
209
|
+
highlight(re?: RegExp): void;
|
|
210
|
+
find(skipCurrent: boolean, backwards: boolean, preventScroll?: any): void;
|
|
211
|
+
updateCounter(): void;
|
|
212
|
+
findNext(): void;
|
|
213
|
+
findPrev(): void;
|
|
214
|
+
findAll(): void;
|
|
215
|
+
replace(): void;
|
|
216
|
+
replaceAndFindNext(): void;
|
|
217
|
+
replaceAll(): void;
|
|
218
|
+
hide(): void;
|
|
219
|
+
active: boolean;
|
|
220
|
+
show(value: string, isReplace?: boolean): void;
|
|
221
|
+
isFocused(): boolean;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
declare module "ace/ext/elastic_tabstops_lite" {
|
|
225
|
+
export class ElasticTabstopsLite {
|
|
226
|
+
constructor(editor: Editor);
|
|
227
|
+
onAfterExec: () => void;
|
|
228
|
+
onExec: () => void;
|
|
229
|
+
onChange: (delta: any) => void;
|
|
230
|
+
processRows(rows: number[]): void;
|
|
231
|
+
}
|
|
232
|
+
import { Editor } from "ace/editor";
|
|
233
|
+
}
|
|
234
|
+
declare module "ace/ext/error_marker" {
|
|
235
|
+
export function showErrorMarker(
|
|
236
|
+
editor: import("ace/editor").Editor,
|
|
237
|
+
dir: number,
|
|
238
|
+
): void;
|
|
239
|
+
}
|
|
240
|
+
declare module "ace/ext/beautify" {
|
|
241
|
+
export const singletonTags: string[];
|
|
242
|
+
export const blockTags: string[];
|
|
243
|
+
export const formatOptions: {
|
|
244
|
+
lineBreaksAfterCommasInCurlyBlock?: boolean;
|
|
245
|
+
};
|
|
246
|
+
export function beautify(
|
|
247
|
+
session: import("ace/edit_session").EditSession,
|
|
248
|
+
): void;
|
|
249
|
+
export const commands: {
|
|
250
|
+
name: string;
|
|
251
|
+
description: string;
|
|
252
|
+
exec: (editor: any) => void;
|
|
253
|
+
bindKey: string;
|
|
254
|
+
}[];
|
|
255
|
+
}
|
|
256
|
+
declare module "ace/ext/code_lens" {
|
|
257
|
+
export function setLenses(
|
|
258
|
+
session: EditSession,
|
|
259
|
+
lenses: Ace.CodeLense[],
|
|
260
|
+
): number;
|
|
261
|
+
export function registerCodeLensProvider(
|
|
262
|
+
editor: import("ace/editor").Editor,
|
|
263
|
+
codeLensProvider: Ace.CodeLenseProvider,
|
|
264
|
+
): void;
|
|
265
|
+
export function clear(session: EditSession): void;
|
|
266
|
+
export type EditSession = import("ace/edit_session").EditSession;
|
|
267
|
+
export type VirtualRenderer =
|
|
268
|
+
import("ace/virtual_renderer").VirtualRenderer & {};
|
|
269
|
+
import { Editor } from "ace/editor";
|
|
270
|
+
}
|
|
271
|
+
declare module "ace/ext/emmet" {
|
|
272
|
+
export const commands: HashHandler;
|
|
273
|
+
export function runEmmetCommand(
|
|
274
|
+
editor: Editor,
|
|
275
|
+
): ReturnType<typeof setTimeout> | boolean;
|
|
276
|
+
export function updateCommands(editor: Editor, enabled?: boolean): void;
|
|
277
|
+
export function isSupportedMode(mode: any): boolean;
|
|
278
|
+
export function isAvailable(editor: Editor, command: string): boolean;
|
|
279
|
+
export function load(cb: any): boolean;
|
|
280
|
+
export function setCore(e: any): void;
|
|
281
|
+
import { HashHandler } from "ace/keyboard/hash_handler";
|
|
282
|
+
import { Editor } from "ace/editor";
|
|
283
|
+
/**
|
|
284
|
+
* Implementation of {@link IEmmetEditor} interface for Ace
|
|
285
|
+
*/
|
|
286
|
+
export class AceEmmetEditor {
|
|
287
|
+
setupContext(editor: Editor): void;
|
|
288
|
+
ace: Editor;
|
|
289
|
+
indentation: string;
|
|
290
|
+
/**
|
|
291
|
+
* Returns character indexes of selected text: object with <code>start</code>
|
|
292
|
+
* and <code>end</code> properties. If there's no selection, should return
|
|
293
|
+
* object with <code>start</code> and <code>end</code> properties referring
|
|
294
|
+
* to current caret position
|
|
295
|
+
* @example
|
|
296
|
+
* var selection = editor.getSelectionRange();
|
|
297
|
+
* alert(selection.start + ', ' + selection.end);
|
|
298
|
+
*/
|
|
299
|
+
getSelectionRange(): any;
|
|
300
|
+
/**
|
|
301
|
+
* Creates selection from <code>start</code> to <code>end</code> character
|
|
302
|
+
* indexes. If <code>end</code> is ommited, this method should place caret
|
|
303
|
+
* and <code>start</code> index
|
|
304
|
+
* @example
|
|
305
|
+
* editor.createSelection(10, 40);
|
|
306
|
+
*
|
|
307
|
+
* //move caret to 15th character
|
|
308
|
+
* editor.createSelection(15);
|
|
309
|
+
*/
|
|
310
|
+
createSelection(start: number, end?: number): void;
|
|
311
|
+
/**
|
|
312
|
+
* Returns current line's start and end indexes as object with <code>start</code>
|
|
313
|
+
* and <code>end</code> properties
|
|
314
|
+
* @example
|
|
315
|
+
* var range = editor.getCurrentLineRange();
|
|
316
|
+
* alert(range.start + ', ' + range.end);
|
|
317
|
+
*/
|
|
318
|
+
getCurrentLineRange(): any;
|
|
319
|
+
/**
|
|
320
|
+
* Returns current caret position
|
|
321
|
+
*/
|
|
322
|
+
getCaretPos(): number | null;
|
|
323
|
+
/**
|
|
324
|
+
* Set new caret position
|
|
325
|
+
* @param {Number} index Caret position
|
|
326
|
+
*/
|
|
327
|
+
setCaretPos(index: number): void;
|
|
328
|
+
/**
|
|
329
|
+
* Returns content of current line
|
|
330
|
+
*/
|
|
331
|
+
getCurrentLine(): string;
|
|
332
|
+
/**
|
|
333
|
+
* Replace editor's content or it's part (from <code>start</code> to
|
|
334
|
+
* <code>end</code> index). If <code>value</code> contains
|
|
335
|
+
* <code>caret_placeholder</code>, the editor will put caret into
|
|
336
|
+
* this position. If you skip <code>start</code> and <code>end</code>
|
|
337
|
+
* arguments, the whole target's content will be replaced with
|
|
338
|
+
* <code>value</code>.
|
|
339
|
+
*
|
|
340
|
+
* If you pass <code>start</code> argument only,
|
|
341
|
+
* the <code>value</code> will be placed at <code>start</code> string
|
|
342
|
+
* index of current content.
|
|
343
|
+
*
|
|
344
|
+
* If you pass <code>start</code> and <code>end</code> arguments,
|
|
345
|
+
* the corresponding substring of current target's content will be
|
|
346
|
+
* replaced with <code>value</code>.
|
|
347
|
+
* @param {String} value Content you want to paste
|
|
348
|
+
* @param {Number} [start] Start index of editor's content
|
|
349
|
+
* @param {Number} [end] End index of editor's content
|
|
350
|
+
* @param {Boolean} [noIndent] Do not auto indent <code>value</code>
|
|
351
|
+
*/
|
|
352
|
+
replaceContent(
|
|
353
|
+
value: string,
|
|
354
|
+
start?: number,
|
|
355
|
+
end?: number,
|
|
356
|
+
noIndent?: boolean,
|
|
357
|
+
): void;
|
|
358
|
+
/**
|
|
359
|
+
* Returns editor's content
|
|
360
|
+
*/
|
|
361
|
+
getContent(): string;
|
|
362
|
+
/**
|
|
363
|
+
* Returns current editor's syntax mode
|
|
364
|
+
*/
|
|
365
|
+
getSyntax(): string;
|
|
366
|
+
/**
|
|
367
|
+
* Returns current output profile name (@see emmet#setupProfile)
|
|
368
|
+
*/
|
|
369
|
+
getProfileName(): string;
|
|
370
|
+
/**
|
|
371
|
+
* Ask user to enter something
|
|
372
|
+
* @param {String} title Dialog title
|
|
373
|
+
* @return {String} Entered data
|
|
374
|
+
* @since 0.65
|
|
375
|
+
*/
|
|
376
|
+
prompt(title: string): string;
|
|
377
|
+
/**
|
|
378
|
+
* Returns current selection
|
|
379
|
+
* @since 0.65
|
|
380
|
+
*/
|
|
381
|
+
getSelection(): string;
|
|
382
|
+
/**
|
|
383
|
+
* Returns current editor's file path
|
|
384
|
+
* @since 0.65
|
|
385
|
+
*/
|
|
386
|
+
getFilePath(): string;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
declare module "ace/ext/hardwrap" {
|
|
390
|
+
export function hardWrap(
|
|
391
|
+
editor: import("ace/editor").Editor,
|
|
392
|
+
options: Ace.HardWrapOptions,
|
|
393
|
+
): void;
|
|
394
|
+
import { Editor } from "ace/editor";
|
|
395
|
+
}
|
|
396
|
+
declare module "ace/ext/menu_tools/settings_menu.css" {
|
|
397
|
+
const _exports: string;
|
|
398
|
+
export = _exports;
|
|
399
|
+
}
|
|
400
|
+
declare module "ace/ext/menu_tools/overlay_page" {
|
|
401
|
+
export function overlayPage(
|
|
402
|
+
editor: any,
|
|
403
|
+
contentElement: HTMLElement,
|
|
404
|
+
callback?: any,
|
|
405
|
+
): {
|
|
406
|
+
close: () => void;
|
|
407
|
+
setIgnoreFocusOut: (ignore: boolean) => void;
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
declare module "ace/ext/menu_tools/get_editor_keyboard_shortcuts" {
|
|
411
|
+
export function getEditorKeybordShortcuts(
|
|
412
|
+
editor: import("ace/editor").Editor,
|
|
413
|
+
): any[];
|
|
414
|
+
}
|
|
415
|
+
declare module "ace/ext/keybinding_menu" {
|
|
416
|
+
export function init(editor: Editor): void;
|
|
417
|
+
import { Editor } from "ace/editor";
|
|
418
|
+
}
|
|
419
|
+
declare module "ace/ext/linking" {}
|
|
420
|
+
declare module "ace/ext/modelist" {
|
|
421
|
+
/**
|
|
422
|
+
* Suggests a mode based on the file extension present in the given path
|
|
423
|
+
* @param {string} path The path to the file
|
|
424
|
+
* @returns {Mode} Returns an object containing information about the
|
|
425
|
+
* suggested mode.
|
|
426
|
+
*/
|
|
427
|
+
export function getModeForPath(path: string): Mode;
|
|
428
|
+
export var modes: Mode[];
|
|
429
|
+
export var modesByName: Record<string, Mode>;
|
|
430
|
+
class Mode {
|
|
431
|
+
constructor(name: string, caption: string, extensions: string);
|
|
432
|
+
name: string;
|
|
433
|
+
caption: string;
|
|
434
|
+
mode: string;
|
|
435
|
+
extensions: string;
|
|
436
|
+
extRe: RegExp;
|
|
437
|
+
supportsFile(filename: string): RegExpMatchArray | null;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
declare module "ace/ext/themelist" {
|
|
441
|
+
export const themesByName: {
|
|
442
|
+
[x: string]: Theme;
|
|
443
|
+
};
|
|
444
|
+
export const themes: Theme[];
|
|
445
|
+
export type Theme = {
|
|
446
|
+
/**
|
|
447
|
+
* - The display caption of the theme.
|
|
448
|
+
*/
|
|
449
|
+
caption: string;
|
|
450
|
+
/**
|
|
451
|
+
* - The path or identifier for the ACE theme.
|
|
452
|
+
*/
|
|
453
|
+
theme: string;
|
|
454
|
+
/**
|
|
455
|
+
* - Indicates whether the theme is dark or light.
|
|
456
|
+
*/
|
|
457
|
+
isDark: boolean;
|
|
458
|
+
/**
|
|
459
|
+
* - The normalized name used as the key.
|
|
460
|
+
*/
|
|
461
|
+
name: string;
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
declare module "ace/ext/options" {
|
|
465
|
+
export class OptionPanel {
|
|
466
|
+
constructor(editor: Editor, element?: HTMLElement);
|
|
467
|
+
editor: import("ace/editor").Editor;
|
|
468
|
+
container: HTMLElement;
|
|
469
|
+
groups: any[];
|
|
470
|
+
options: {};
|
|
471
|
+
add(config: any): void;
|
|
472
|
+
render(): void;
|
|
473
|
+
renderOptionGroup(group: any): any[];
|
|
474
|
+
renderOptionControl(key: string, option: any): any;
|
|
475
|
+
renderOption(
|
|
476
|
+
key: any,
|
|
477
|
+
option: any,
|
|
478
|
+
): (
|
|
479
|
+
| string
|
|
480
|
+
| any[]
|
|
481
|
+
| {
|
|
482
|
+
class: string;
|
|
483
|
+
}
|
|
484
|
+
)[];
|
|
485
|
+
setOption(
|
|
486
|
+
option: string | number | any,
|
|
487
|
+
value: string | number | boolean,
|
|
488
|
+
): void;
|
|
489
|
+
getOption(option: any): any;
|
|
490
|
+
}
|
|
491
|
+
export type Editor = import("ace/editor").Editor;
|
|
492
|
+
namespace Ace {
|
|
493
|
+
type EventEmitter<
|
|
494
|
+
T extends {
|
|
495
|
+
[K in keyof T]: (...args: any[]) => any;
|
|
496
|
+
},
|
|
497
|
+
> = Ace.EventEmitter<T>;
|
|
498
|
+
type OptionPanelEvents = Ace.OptionPanelEvents;
|
|
499
|
+
}
|
|
500
|
+
export interface OptionPanel
|
|
501
|
+
extends Ace.EventEmitter<Ace.OptionPanelEvents> {}
|
|
502
|
+
}
|
|
503
|
+
declare module "ace/ext/prompt" {
|
|
504
|
+
export type PromptOptions = {
|
|
505
|
+
/**
|
|
506
|
+
* Prompt name.
|
|
507
|
+
*/
|
|
508
|
+
name: string;
|
|
509
|
+
/**
|
|
510
|
+
* Defines which part of the predefined value should be highlighted.
|
|
511
|
+
*/
|
|
512
|
+
selection: [number, number];
|
|
513
|
+
/**
|
|
514
|
+
* Set to true if prompt has description below input box.
|
|
515
|
+
*/
|
|
516
|
+
hasDescription: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Description below input box.
|
|
519
|
+
*/
|
|
520
|
+
prompt: string;
|
|
521
|
+
/**
|
|
522
|
+
* Placeholder for value.
|
|
523
|
+
*/
|
|
524
|
+
placeholder: string;
|
|
525
|
+
/**
|
|
526
|
+
* Set to true to keep the prompt open when focus moves to another part of the editor.
|
|
527
|
+
*/
|
|
528
|
+
ignoreFocusOut: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* Function for defining list of options for value.
|
|
531
|
+
*/
|
|
532
|
+
getCompletions: Function;
|
|
533
|
+
/**
|
|
534
|
+
* Function for defining current value prefix.
|
|
535
|
+
*/
|
|
536
|
+
getPrefix: Function;
|
|
537
|
+
/**
|
|
538
|
+
* Function called when Enter is pressed.
|
|
539
|
+
*/
|
|
540
|
+
onAccept: Function;
|
|
541
|
+
/**
|
|
542
|
+
* Function called when input is added to prompt input box.
|
|
543
|
+
*/
|
|
544
|
+
onInput: Function;
|
|
545
|
+
/**
|
|
546
|
+
* Function called when Esc|Shift-Esc is pressed.
|
|
547
|
+
*/
|
|
548
|
+
onCancel: Function;
|
|
549
|
+
/**
|
|
550
|
+
* Function for defining history list.
|
|
551
|
+
*/
|
|
552
|
+
history: Function;
|
|
553
|
+
maxHistoryCount: number;
|
|
554
|
+
addToHistory: Function;
|
|
555
|
+
};
|
|
556
|
+
export type Editor = import("ace/editor").Editor;
|
|
557
|
+
/**
|
|
558
|
+
* @property {String} name Prompt name.
|
|
559
|
+
* @property {String} $type Use prompt of specific type (gotoLine|commands|modes or default if empty).
|
|
560
|
+
* @property {[number, number]} selection Defines which part of the predefined value should be highlighted.
|
|
561
|
+
* @property {Boolean} hasDescription Set to true if prompt has description below input box.
|
|
562
|
+
* @property {String} prompt Description below input box.
|
|
563
|
+
* @property {String} placeholder Placeholder for value.
|
|
564
|
+
* @property {Object} $rules Specific rules for input like password or regexp.
|
|
565
|
+
* @property {Boolean} ignoreFocusOut Set to true to keep the prompt open when focus moves to another part of the editor.
|
|
566
|
+
* @property {Function} getCompletions Function for defining list of options for value.
|
|
567
|
+
* @property {Function} getPrefix Function for defining current value prefix.
|
|
568
|
+
* @property {Function} onAccept Function called when Enter is pressed.
|
|
569
|
+
* @property {Function} onInput Function called when input is added to prompt input box.
|
|
570
|
+
* @property {Function} onCancel Function called when Esc|Shift-Esc is pressed.
|
|
571
|
+
* @property {Function} history Function for defining history list.
|
|
572
|
+
* @property {number} maxHistoryCount
|
|
573
|
+
* @property {Function} addToHistory
|
|
574
|
+
*/
|
|
575
|
+
/**
|
|
576
|
+
* Prompt plugin is used for getting input from user.
|
|
577
|
+
*
|
|
578
|
+
* @param {Editor} editor Ouside editor related to this prompt. Will be blurred when prompt is open.
|
|
579
|
+
* @param {String | Partial<PromptOptions>} message Predefined value of prompt input box.
|
|
580
|
+
* @param {Partial<PromptOptions>} options Cusomizable options for this prompt.
|
|
581
|
+
* @param {Function} [callback] Function called after done.
|
|
582
|
+
* */
|
|
583
|
+
export function prompt(
|
|
584
|
+
editor: Editor,
|
|
585
|
+
message: string | Partial<PromptOptions>,
|
|
586
|
+
options: Partial<PromptOptions>,
|
|
587
|
+
callback?: Function,
|
|
588
|
+
): any;
|
|
589
|
+
export namespace prompt {
|
|
590
|
+
function gotoLine(editor: Editor, callback?: Function): void;
|
|
591
|
+
function commands(editor: Editor, callback?: Function): void;
|
|
592
|
+
function modes(editor: Editor, callback?: Function): void;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
declare module "ace/ext/rtl" {}
|
|
596
|
+
declare module "ace/ext/settings_menu" {
|
|
597
|
+
export function init(): void;
|
|
598
|
+
}
|
|
599
|
+
declare module "ace/ext/simple_tokenizer" {
|
|
600
|
+
/**
|
|
601
|
+
* Parses provided content according to provided highlighting rules and return tokens.
|
|
602
|
+
* Tokens either have the className set according to Ace themes or have no className if they are just pure text tokens.
|
|
603
|
+
* Result is a list of list of tokens, where each line from the provided content is a separate list of tokens.
|
|
604
|
+
*
|
|
605
|
+
* @param {string} content to tokenize
|
|
606
|
+
* @param {Ace.HighlightRules} highlightRules defining the language grammar
|
|
607
|
+
* @returns {Ace.TokenizeResult} tokenization result containing a list of token for each of the lines from content
|
|
608
|
+
*/
|
|
609
|
+
export function tokenize(
|
|
610
|
+
content: string,
|
|
611
|
+
highlightRules: Ace.HighlightRules,
|
|
612
|
+
): Ace.TokenizeResult;
|
|
613
|
+
}
|
|
614
|
+
declare module "ace/ext/spellcheck" {
|
|
615
|
+
export function contextMenuHandler(e: any): void;
|
|
616
|
+
}
|
|
617
|
+
declare module "ace/ext/split" {
|
|
618
|
+
const _exports: typeof import("ace/split");
|
|
619
|
+
export = _exports;
|
|
620
|
+
}
|
|
621
|
+
declare module "ace/ext/static-css" {
|
|
622
|
+
const _exports: string;
|
|
623
|
+
export = _exports;
|
|
624
|
+
}
|
|
625
|
+
declare module "ace/ext/static_highlight" {
|
|
626
|
+
function highlight(
|
|
627
|
+
el: HTMLElement,
|
|
628
|
+
opts: Ace.StaticHighlightOptions,
|
|
629
|
+
callback?: any,
|
|
630
|
+
): boolean;
|
|
631
|
+
export namespace highlight {
|
|
632
|
+
export { render, renderSync, highlight, SyntaxMode, Theme };
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* Transforms a given input code snippet into HTML using the given mode
|
|
636
|
+
*
|
|
637
|
+
* @param {string} input Code snippet
|
|
638
|
+
* @param {string | SyntaxMode} mode String specifying the mode to load such as
|
|
639
|
+
* `ace/mode/javascript` or, a mode loaded from `/ace/mode`
|
|
640
|
+
* (use 'ServerSideHiglighter.getMode').
|
|
641
|
+
* @param {string | Theme} theme String specifying the theme to load such as
|
|
642
|
+
* `ace/theme/twilight` or, a theme loaded from `/ace/theme`.
|
|
643
|
+
* @param {number} lineStart A number indicating the first line number. Defaults
|
|
644
|
+
* to 1.
|
|
645
|
+
* @param {boolean} disableGutter Specifies whether or not to disable the gutter.
|
|
646
|
+
* `true` disables the gutter, `false` enables the gutter. Defaults to `false`.
|
|
647
|
+
* @param {function} [callback] When specifying the mode or theme as a string,
|
|
648
|
+
* this method has no return value and you must specify a callback function. The
|
|
649
|
+
* callback will receive the rendered object containing the properties `html`
|
|
650
|
+
* and `css`.
|
|
651
|
+
* @returns {object} An object containing the properties `html` and `css`.
|
|
652
|
+
*/
|
|
653
|
+
function render(
|
|
654
|
+
input: string,
|
|
655
|
+
mode: string | SyntaxMode,
|
|
656
|
+
theme: string | Theme,
|
|
657
|
+
lineStart: number,
|
|
658
|
+
disableGutter: boolean,
|
|
659
|
+
callback?: Function,
|
|
660
|
+
): object;
|
|
661
|
+
/**
|
|
662
|
+
* Transforms a given input code snippet into HTML using the given mode
|
|
663
|
+
* @param {string} input Code snippet
|
|
664
|
+
* @param {SyntaxMode | string} mode Mode loaded from /ace/mode (use 'ServerSideHiglighter.getMode')
|
|
665
|
+
* @returns {object} An object containing: html, css
|
|
666
|
+
*/
|
|
667
|
+
function renderSync(
|
|
668
|
+
input: string,
|
|
669
|
+
mode: SyntaxMode | string,
|
|
670
|
+
theme: Theme,
|
|
671
|
+
lineStart: any,
|
|
672
|
+
disableGutter: boolean,
|
|
673
|
+
): object;
|
|
674
|
+
type SyntaxMode = Ace.SyntaxMode;
|
|
675
|
+
type Theme = Ace.Theme;
|
|
676
|
+
}
|
|
677
|
+
declare module "ace/ext/statusbar" {
|
|
678
|
+
export type Editor = import("ace/editor").Editor;
|
|
679
|
+
/** simple statusbar **/
|
|
680
|
+
export class StatusBar {
|
|
681
|
+
constructor(editor: Editor, parentNode: HTMLElement);
|
|
682
|
+
element: HTMLDivElement;
|
|
683
|
+
updateStatus(editor: Editor): void;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
declare module "ace/ext/whitespace" {
|
|
687
|
+
export function $detectIndentation(
|
|
688
|
+
lines: string[],
|
|
689
|
+
fallback?: any,
|
|
690
|
+
): {
|
|
691
|
+
ch?: string;
|
|
692
|
+
length?: number;
|
|
693
|
+
};
|
|
694
|
+
export function detectIndentation(session: EditSession):
|
|
695
|
+
| {
|
|
696
|
+
ch?: string;
|
|
697
|
+
length?: number;
|
|
698
|
+
}
|
|
699
|
+
| {};
|
|
700
|
+
export function trimTrailingSpace(
|
|
701
|
+
session: EditSession,
|
|
702
|
+
options: {
|
|
703
|
+
trimEmpty?: boolean;
|
|
704
|
+
keepCursorPosition?: boolean;
|
|
705
|
+
},
|
|
706
|
+
): void;
|
|
707
|
+
export function convertIndentation(
|
|
708
|
+
session: EditSession,
|
|
709
|
+
ch: string,
|
|
710
|
+
len: number,
|
|
711
|
+
): void;
|
|
712
|
+
export function $parseStringArg(text: string): {};
|
|
713
|
+
export function $parseArg(arg: any): any;
|
|
714
|
+
export const commands: {
|
|
715
|
+
name: string;
|
|
716
|
+
description: string;
|
|
717
|
+
exec: (editor: any, args: any) => void;
|
|
718
|
+
}[];
|
|
719
|
+
export type EditSession = import("ace/edit_session").EditSession;
|
|
720
|
+
}
|