-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Expand file tree
/
Copy pathace-modules.d.ts
More file actions
4777 lines (4776 loc) · 197 KB
/
Copy pathace-modules.d.ts
File metadata and controls
4777 lines (4776 loc) · 197 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* This file is generated using `npm run update-types` */
declare module "ace-code/src/layer/font_metrics" {
export class FontMetrics {
constructor(parentEl: HTMLElement);
el: HTMLDivElement;
checkForSizeChanges(size: any): void;
charSizes: any;
allowBoldFonts: boolean;
setPolling(val: boolean): void;
getCharacterWidth(ch: any): any;
destroy(): void;
els: any[] | HTMLElement | Text;
transformCoordinates(clientPos: any, elPos: any): any[];
}
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
}
export interface FontMetrics extends Ace.EventEmitter<any> {
}
}
declare module "ace-code/src/apply_delta" {
export function applyDelta(docLines: string[], delta: import("ace-code").Ace.Delta, doNotValidate?: any): void;
}
declare module "ace-code/src/document" {
/**
* Contains the text of the document. Document can be attached to several [[EditSession `EditSession`]]s.
* At its core, `Document`s are just an array of strings, with each row in the document matching up to the array index.
**/
export class Document {
/**
*
* Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
* @param {String | String[]} textOrLines text The starting text
**/
constructor(textOrLines: string | string[]);
/**
* Replaces all the lines in the current `Document` with the value of `text`.
*
* @param {String} text The text to use
**/
setValue(text: string): void;
/**
* Returns all the lines in the document as a single string, joined by the new line character.
**/
getValue(): string;
/**
* Creates a new `Anchor` to define a floating point in the document.
* @param {Number} row The row number to use
* @param {Number} column The column number to use
**/
createAnchor(row: number, column: number): Anchor;
/**
* Returns the newline character that's being used, depending on the value of `newLineMode`.
* @returns {String} If `newLineMode == windows`, `\r\n` is returned.
* If `newLineMode == unix`, `\n` is returned.
* If `newLineMode == auto`, the value of `autoNewLine` is returned.
*
**/
getNewLineCharacter(): string;
/**
* [Sets the new line mode.]{: #Document.setNewLineMode.desc}
* @param {NewLineMode} newLineMode [The newline mode to use; can be either `windows`, `unix`, or `auto`]
**/
setNewLineMode(newLineMode: NewLineMode): void;
/**
* Returns the type of newlines being used; either `windows`, `unix`, or `auto`
**/
getNewLineMode(): NewLineMode;
/**
* Returns `true` if `text` is a newline character (either `\r\n`, `\r`, or `\n`).
* @param {String} text The text to check
**/
isNewLine(text: string): boolean;
/**
* Returns a verbatim copy of the given line as it is in the document
* @param {Number} row The row index to retrieve
**/
getLine(row: number): string;
/**
* Returns an array of strings of the rows between `firstRow` and `lastRow`. This function is inclusive of `lastRow`.
* @param {Number} firstRow The first row index to retrieve
* @param {Number} lastRow The final row index to retrieve
**/
getLines(firstRow: number, lastRow: number): string[];
/**
* Returns all lines in the document as string array.
**/
getAllLines(): string[];
/**
* Returns the number of rows in the document.
**/
getLength(): number;
/**
* Returns all the text within `range` as a single string.
* @param {IRange} range The range to work with.
*
**/
getTextRange(range: IRange): string;
/**
* Returns all the text within `range` as an array of lines.
* @param {IRange} range The range to work with.
*
**/
getLinesForRange(range: IRange): string[];
/**
* @deprecated
*/
insertLines(row: any, lines: any): void;
/**
* @deprecated
*/
removeLines(firstRow: any, lastRow: any): string[];
/**
* @deprecated
*/
insertNewLine(position: any): Point;
/**
* Inserts a block of `text` at the indicated `position`.
* @param {Point} position The position to start inserting at; it's an object that looks like `{ row: row, column: column}`
* @param {String} text A chunk of text to insert
* @returns {Point} The position ({row, column}) of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
**/
insert(position: Point, text: string): Point;
/**
* Inserts `text` into the `position` at the current row. This method also triggers the `"change"` event.
*
* This differs from the `insert` method in two ways:
* 1. This does NOT handle newline characters (single-line text only).
* 2. This is faster than the `insert` method for single-line text insertions.
*
* @param {Point} position The position to insert at; it's an object that looks like `{ row: row, column: column}`
* @param {String} text A chunk of text without new lines
* @returns {Point} Returns the position of the end of the inserted text
**/
insertInLine(position: Point, text: string): Point;
clippedPos(row: number, column: number): Point;
clonePos(pos: Point): Point;
pos(row: number, column: number): Point;
/**
* Inserts the elements in `lines` into the document as full lines (does not merge with existing line), starting at the row index given by `row`. This method also triggers the `"change"` event.
* @param {Number} row The index of the row to insert at
* @param {string[]} lines An array of strings
**/
insertFullLines(row: number, lines: string[]): void;
/**
* Inserts the elements in `lines` into the document, starting at the position index given by `row`. This method also triggers the `"change"` event.
* @param {string[]} lines An array of strings
* @returns {Point} Contains the final row and column, like this:
* ```
* {row: endRow, column: 0}
* ```
* If `lines` is empty, this function returns an object containing the current row, and column, like this:
* ```
* {row: row, column: 0}
* ```
**/
insertMergedLines(position: Point, lines: string[]): Point;
/**
* Removes the `range` from the document.
* @param {IRange} range A specified Range to remove
* @returns {Point} Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`.
**/
remove(range: IRange): Point;
/**
* Removes the specified columns from the `row`. This method also triggers a `"change"` event.
* @param {Number} row The row to remove from
* @param {Number} startColumn The column to start removing at
* @param {Number} endColumn The column to stop removing at
* @returns {Point} Returns an object containing `startRow` and `startColumn`, indicating the new row and column values.<br/>If `startColumn` is equal to `endColumn`, this function returns nothing.
**/
removeInLine(row: number, startColumn: number, endColumn: number): Point;
/**
* Removes a range of full lines. This method also triggers the `"change"` event.
* @param {Number} firstRow The first row to be removed
* @param {Number} lastRow The last row to be removed
* @returns {String[]} Returns all the removed lines.
**/
removeFullLines(firstRow: number, lastRow: number): string[];
/**
* Removes the new line between `row` and the row immediately following it. This method also triggers the `"change"` event.
* @param {Number} row The row to check
*
**/
removeNewLine(row: number): void;
/**
* Replaces a range in the document with the new `text`.
* @param {Range | IRange} range A specified Range to replace
* @param {String} text The new text to use as a replacement
* @returns {Point} Returns an object containing the final row and column, like this:
* {row: endRow, column: 0}
* If the text and range are empty, this function returns an object containing the current `range.start` value.
* If the text is the exact same as what currently exists, this function returns an object containing the current `range.end` value.
*
**/
replace(range: Range | IRange, text: string): Point;
/**
* Applies all changes in `deltas` to the document.
* @param {Delta[]} deltas An array of delta objects (can include "insert" and "remove" actions)
**/
applyDeltas(deltas: Delta[]): void;
/**
* Reverts all changes in `deltas` from the document.
* @param {Delta[]} deltas An array of delta objects (can include "insert" and "remove" actions)
**/
revertDeltas(deltas: Delta[]): void;
/**
* Applies `delta` to the document.
* @param {Delta} delta A delta object (can include "insert" and "remove" actions)
**/
applyDelta(delta: Delta, doNotValidate?: boolean): void;
/**
* Reverts `delta` from the document.
* @param {Delta} delta A delta object (can include "insert" and "remove" actions)
**/
revertDelta(delta: Delta): void;
/**
* Converts an index position in a document to a `{row, column}` object.
*
* Index refers to the "absolute position" of a character in the document. For example:
*
* ```javascript
* var x = 0; // 10 characters, plus one for newline
* var y = -1;
* ```
*
* Here, `y` is an index 15: 11 characters for the first row, and 5 characters until `y` in the second.
*
* @param {Number} index An index to convert
* @param {Number} [startRow=0] The row from which to start the conversion
* @returns {Point} A `{row, column}` object of the `index` position
*/
indexToPosition(index: number, startRow?: number): Point;
/**
* Converts the `{row, column}` position in a document to the character's index.
*
* Index refers to the "absolute position" of a character in the document. For example:
*
* ```javascript
* var x = 0; // 10 characters, plus one for newline
* var y = -1;
* ```
*
* Here, `y` is an index 15: 11 characters for the first row, and 5 characters until `y` in the second.
*
* @param {Point} pos The `{row, column}` to convert
* @param {Number} [startRow=0] The row from which to start the conversion
* @returns {Number} The index position in the document
*/
positionToIndex(pos: Point, startRow?: number): number;
}
export type Delta = import("ace-code").Ace.Delta;
export type Point = import("ace-code").Ace.Point;
export type IRange = import("ace-code").Ace.IRange;
export type NewLineMode = import("ace-code").Ace.NewLineMode;
import { Anchor } from "ace-code/src/anchor";
import { Range } from "ace-code/src/range";
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
type DocumentEvents = import("ace-code").Ace.DocumentEvents;
}
export interface Document extends Ace.EventEmitter<Ace.DocumentEvents> {
}
}
declare module "ace-code/src/anchor" {
/**
* Defines a floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the anchor is updated.
**/
export class Anchor {
/**
* Creates a new `Anchor` and associates it with a document.
*
* @param {Document} doc The document to associate with the anchor
* @param {Number|import("ace-code").Ace.Point} row The starting row position
* @param {Number} [column] The starting column position
**/
constructor(doc: Document, row: number | import("ace-code").Ace.Point, column?: number);
/**
* Returns an object identifying the `row` and `column` position of the current anchor.
**/
getPosition(): import("ace-code").Ace.Point;
/**
*
* Returns the current document.
**/
getDocument(): Document;
/**
* Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
* @param {Number} row The row index to move the anchor to
* @param {Number} column The column index to move the anchor to
* @param {Boolean} [noClip] Identifies if you want the position to be clipped
**/
setPosition(row: number, column: number, noClip?: boolean): void;
row: any;
column: number;
/**
* When called, the `"change"` event listener is removed.
*
**/
detach(): void;
/**
* When called, the `"change"` event listener is appended.
* @param {Document} doc The document to associate with
*
**/
attach(doc: Document): void;
document: Document;
markerId?: number;
}
export type Document = import("ace-code/src/document").Document;
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
type AnchorEvents = import("ace-code").Ace.AnchorEvents;
type Document = import("ace-code").Ace.Document;
}
export interface Anchor extends Ace.EventEmitter<Ace.AnchorEvents> {
markerId?: number;
document: Ace.Document;
}
}
declare module "ace-code/src/config" {
const _exports: {
defineOptions(obj: any, path: string, options: {
[key: string]: any;
}): import("ace-code").Ace.AppConfig;
resetOptions(obj: any): void;
setDefaultValue(path: string, name: string, value: any): boolean;
setDefaultValues(path: string, optionHash: {
[key: string]: any;
}): void;
setMessages(value: any, options?: {
placeholders?: "dollarSigns" | "curlyBrackets";
}): void;
nls(key: string, defaultString: string, params?: {
[x: string]: any;
}): any;
warn: (message: any, ...args: any[]) => void;
reportError: (msg: any, data: any) => void;
once<K extends string | number | symbol>(name: K, callback: any): void;
setDefaultHandler(name: string, callback: Function): void;
removeDefaultHandler(name: string, callback: Function): void;
on<K extends string | number | symbol>(name: K, callback: any, capturing?: boolean): any;
addEventListener<K extends string | number | symbol>(name: K, callback: any, capturing?: boolean): any;
off<K extends string | number | symbol>(name: K, callback: any): void;
removeListener<K extends string | number | symbol>(name: K, callback: any): void;
removeEventListener<K extends string | number | symbol>(name: K, callback: any): void;
removeAllListeners(name?: string): void;
/**
* @param {K} key - The key of the config option to retrieve.
* @returns {import("ace-code").Ace.ConfigOptions[K]} - The value of the config option.
*/
get: <K extends keyof import("ace-code").Ace.ConfigOptions>(key: K) => import("ace-code").Ace.ConfigOptions[K];
set: <K extends keyof import("ace-code").Ace.ConfigOptions>(key: K, value: import("ace-code").Ace.ConfigOptions[K]) => void;
all: () => import("ace-code").Ace.ConfigOptions;
/**
* module loading
*/
moduleUrl: (name: string, component?: string) => string;
setModuleUrl: (name: string, subst: string) => string;
/** @arg {(name: string, callback: (error: any, module: any) => void) => void} cb */
setLoader: (cb: (name: string, callback: (error: any, module: any) => void) => void) => void;
dynamicModules: any;
loadModule: (moduleId: string | [
string,
string
], onLoad: (module: any) => void) => void;
setModuleLoader: (moduleName: any, onLoad: any) => void;
version: "1.37.1";
};
export = _exports;
}
declare module "ace-code/src/layer/lines" {
export type EditSession = import("ace-code/src/edit_session").EditSession;
export type LayerConfig = import("ace-code").Ace.LayerConfig;
export class Lines {
constructor(element: HTMLElement, canvasHeight?: number);
element: HTMLElement;
canvasHeight: number;
cells: any[];
cellCache: any[];
moveContainer(config: LayerConfig): void;
pageChanged(oldConfig: LayerConfig, newConfig: LayerConfig): boolean;
computeLineTop(row: number, config: Partial<LayerConfig>, session: EditSession): number;
computeLineHeight(row: number, config: LayerConfig, session: EditSession): number;
getLength(): number;
get(index: number): any;
shift(): void;
pop(): void;
push(cell: any): void;
unshift(cell: any): void;
last(): any;
createCell(row: any, config: any, session: any, initElement: any): any;
}
}
declare module "ace-code/src/layer/gutter" {
export class Gutter {
constructor(parentEl: HTMLElement);
element: HTMLDivElement;
gutterWidth: number;
setSession(session: EditSession): void;
session: import("ace-code/src/edit_session").EditSession;
addGutterDecoration(row: number, className: string): void;
removeGutterDecoration(row: number, className: string): void;
setAnnotations(annotations: any[]): void;
update(config: LayerConfig): void;
config: import("ace-code").Ace.LayerConfig;
oldLastRow: number;
updateLineHighlight(): void;
scrollLines(config: LayerConfig): void;
setHighlightGutterLine(highlightGutterLine: boolean): void;
setShowLineNumbers(show: boolean): void;
getShowLineNumbers(): boolean;
setShowFoldWidgets(show?: boolean): void;
getShowFoldWidgets(): boolean;
getRegion(point: {
x: number;
}): "markers" | "foldWidgets";
}
export type EditSession = import("ace-code/src/edit_session").EditSession;
export type LayerConfig = import("ace-code").Ace.LayerConfig;
import { Lines } from "ace-code/src/layer/lines";
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
type GutterEvents = import("ace-code").Ace.GutterEvents;
}
export interface Gutter extends Ace.EventEmitter<Ace.GutterEvents> {
}
}
declare module "ace-code/src/layer/marker" {
export type EditSession = import("ace-code/src/edit_session").EditSession;
export type LayerConfig = import("ace-code").Ace.LayerConfig;
export class Marker {
constructor(parentEl: HTMLElement);
element: HTMLDivElement;
setPadding(padding: number): void;
setSession(session: EditSession): void;
session: import("ace-code/src/edit_session").EditSession;
setMarkers(markers: {
[x: number]: import("ace-code").Ace.MarkerLike;
}): void;
markers: {
[x: number]: import("ace-code").Ace.MarkerLike;
};
elt(className: string, css: string): void;
i: number;
update(config: LayerConfig): void;
config: import("ace-code").Ace.LayerConfig;
drawTextMarker(stringBuilder: undefined, range: Range, clazz: string, layerConfig: Partial<LayerConfig>, extraStyle?: string): void;
drawMultiLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: LayerConfig, extraStyle?: string): void;
drawSingleLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial<LayerConfig>, extraLength?: number, extraStyle?: string): void;
drawBidiSingleLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial<LayerConfig>, extraLength: number, extraStyle: string): void;
drawFullLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial<LayerConfig>, extraStyle?: undefined): void;
drawScreenLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial<LayerConfig>, extraStyle?: undefined): void;
}
import { Range } from "ace-code/src/range";
}
declare module "ace-code/src/layer/text_util" {
export function isTextToken(tokenType: any): boolean;
}
declare module "ace-code/src/layer/text" {
export class Text {
constructor(parentEl: HTMLElement);
dom: typeof dom;
element: HTMLDivElement;
EOL_CHAR: any;
setPadding(padding: number): void;
getLineHeight(): number;
getCharacterWidth(): number;
checkForSizeChanges(): void;
setSession(session: EditSession): void;
session: EditSession;
setShowInvisibles(showInvisibles: string): boolean;
showInvisibles: any;
showSpaces: boolean;
showTabs: boolean;
showEOL: boolean;
setDisplayIndentGuides(display: boolean): boolean;
displayIndentGuides: any;
setHighlightIndentGuides(highlight: boolean): boolean;
tabSize: number;
updateLines(config: LayerConfig, firstRow: number, lastRow: number): void;
config: import("ace-code").Ace.LayerConfig;
scrollLines(config: LayerConfig): void;
update(config: LayerConfig): void;
renderIndentGuide(parent: any, value: any, max: any): any;
EOF_CHAR: string;
EOL_CHAR_LF: string;
EOL_CHAR_CRLF: string;
TAB_CHAR: string;
SPACE_CHAR: string;
MAX_LINE_LENGTH: number;
destroy: {};
onChangeTabSize: () => void;
}
export type LayerConfig = import("ace-code").Ace.LayerConfig;
export type EditSession = import("ace-code/src/edit_session").EditSession;
import dom = require("ace-code/src/lib/dom");
import { Lines } from "ace-code/src/layer/lines";
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
type TextEvents = import("ace-code").Ace.TextEvents;
type LayerConfig = import("ace-code").Ace.LayerConfig;
}
export interface Text extends Ace.EventEmitter<Ace.TextEvents> {
config: Ace.LayerConfig;
}
}
declare module "ace-code/src/layer/cursor" {
export class Cursor {
constructor(parentEl: HTMLElement);
element: HTMLDivElement;
isVisible: boolean;
isBlinking: boolean;
blinkInterval: number;
smoothBlinking: boolean;
cursors: any[];
cursor: HTMLDivElement;
setPadding(padding: number): void;
setSession(session: EditSession): void;
session: import("ace-code/src/edit_session").EditSession;
setBlinking(blinking: boolean): void;
setBlinkInterval(blinkInterval: number): void;
setSmoothBlinking(smoothBlinking: boolean): void;
addCursor(): HTMLDivElement;
removeCursor(): any;
hideCursor(): void;
showCursor(): void;
restartTimer(): void;
intervalId: number;
getPixelPosition(position?: import("ace-code").Ace.Point, onScreen?: boolean): {
left: number;
top: number;
};
isCursorInView(pixelPos: any, config: any): boolean;
update(config: any): void;
config: any;
overwrite: any;
destroy(): void;
drawCursor: any;
timeoutId?: number;
}
export type EditSession = import("ace-code/src/edit_session").EditSession;
export interface Cursor {
timeoutId?: number;
}
}
declare module "ace-code/src/scrollbar" {
const VScrollBar_base: typeof Scrollbar;
/**
* Represents a vertical scroll bar.
**/
export class VScrollBar extends Scrollbar {
/**
* Creates a new `VScrollBar`. `parent` is the owner of the scroll bar.
* @param {Element} parent A DOM element
* @param {Object} renderer An editor renderer
**/
constructor(parent: Element, renderer: any);
scrollTop: number;
scrollHeight: number;
width: number;
/**
* Returns the width of the scroll bar.
**/
getWidth(): number;
/**
* Sets the height of the scroll bar, in pixels.
* @param {Number} height The new height
**/
setHeight(height: number): void;
/**
* Sets the scroll height of the scroll bar, in pixels.
* @param {Number} height The new scroll height
**/
setScrollHeight(height: number): void;
/**
* Sets the scroll top of the scroll bar.
* @param {Number} scrollTop The new scroll top
**/
setScrollTop(scrollTop: number): void;
/**
* Sets the inner height of the scroll bar, in pixels.
* @param {Number} height The new inner height
* @deprecated Use setScrollHeight instead
**/
setInnerHeight: (height: number) => void;
}
const HScrollBar_base: typeof Scrollbar;
/**
* Represents a horisontal scroll bar.
**/
export class HScrollBar extends Scrollbar {
/**
* Creates a new `HScrollBar`. `parent` is the owner of the scroll bar.
* @param {Element} parent A DOM element
* @param {Object} renderer An editor renderer
**/
constructor(parent: Element, renderer: any);
scrollLeft: number;
height: any;
/**
* Returns the height of the scroll bar.
**/
getHeight(): number;
/**
* Sets the width of the scroll bar, in pixels.
* @param {Number} width The new width
**/
setWidth(width: number): void;
/**
* Sets the inner width of the scroll bar, in pixels.
* @param {Number} width The new inner width
* @deprecated Use setScrollWidth instead
**/
setInnerWidth(width: number): void;
/**
* Sets the scroll width of the scroll bar, in pixels.
* @param {Number} width The new scroll width
**/
setScrollWidth(width: number): void;
/**
* Sets the scroll left of the scroll bar.
* @param {Number} scrollLeft The new scroll left
**/
setScrollLeft(scrollLeft: number): void;
}
/**
* An abstract class representing a native scrollbar control.
**/
class Scrollbar {
/**
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
* @param {Element} parent A DOM element
**/
constructor(parent: Element, classSuffix: string);
element: HTMLDivElement;
inner: HTMLDivElement;
skipEvent: boolean;
setVisible(isVisible: any): void;
isVisible: any;
coeff: number;
}
export { VScrollBar as ScrollBar, VScrollBar as ScrollBarV, HScrollBar as ScrollBarH };
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
}
export interface VScrollBar extends Ace.EventEmitter<any> {
}
export interface HScrollBar extends Ace.EventEmitter<any> {
}
}
declare module "ace-code/src/scrollbar_custom" {
const VScrollBar_base: typeof ScrollBar;
/**
* Represents a vertical scroll bar.
* @class VScrollBar
**/
/**
* Creates a new `VScrollBar`. `parent` is the owner of the scroll bar.
* @param {Element} parent A DOM element
* @param {Object} renderer An editor renderer
*
* @constructor
**/
export class VScrollBar extends ScrollBar {
constructor(parent: any, renderer: any);
scrollTop: number;
scrollHeight: number;
parent: any;
width: number;
renderer: any;
getHeight(): number;
/**
* Returns new top for scroll thumb
**/
scrollTopFromThumbTop(thumbTop: number): number;
/**
* Returns the width of the scroll bar.
**/
getWidth(): number;
/**
* Sets the height of the scroll bar, in pixels.
* @param {Number} height The new height
**/
setHeight(height: number): void;
height: number;
slideHeight: number;
viewHeight: number;
/**
* Sets the inner and scroll height of the scroll bar, in pixels.
* @param {Number} height The new inner height
*
* @param {boolean} force Forcely update height
**/
setScrollHeight(height: number, force: boolean): void;
pageHeight: any;
thumbHeight: number;
/**
* Sets the scroll top of the scroll bar.
* @param {Number} scrollTop The new scroll top
**/
setScrollTop(scrollTop: number): void;
thumbTop: number;
setInnerHeight: (height: number, force: boolean) => void;
}
const HScrollBar_base: typeof ScrollBar;
/**
* Represents a horizontal scroll bar.
**/
export class HScrollBar extends ScrollBar {
/**
* Creates a new `HScrollBar`. `parent` is the owner of the scroll bar.
* @param {Element} parent A DOM element
* @param {Object} renderer An editor renderer
**/
constructor(parent: Element, renderer: any);
scrollLeft: number;
scrollWidth: number;
height: number;
renderer: any;
/**
* Returns the height of the scroll bar.
**/
getHeight(): number;
/**
* Returns new left for scroll thumb
**/
scrollLeftFromThumbLeft(thumbLeft: number): number;
/**
* Sets the width of the scroll bar, in pixels.
* @param {Number} width The new width
**/
setWidth(width: number): void;
width: number;
slideWidth: number;
viewWidth: number;
/**
* Sets the inner and scroll width of the scroll bar, in pixels.
* @param {Number} width The new inner width
* @param {boolean} force Forcely update width
**/
setScrollWidth(width: number, force: boolean): void;
pageWidth: any;
thumbWidth: number;
/**
* Sets the scroll left of the scroll bar.
* @param {Number} scrollLeft The new scroll left
**/
setScrollLeft(scrollLeft: number): void;
thumbLeft: number;
setInnerWidth: (width: number, force: boolean) => void;
}
/**
* An abstract class representing a native scrollbar control.
**/
class ScrollBar {
/**
* Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
* @param {Element} parent A DOM element
**/
constructor(parent: Element, classSuffix: string);
element: HTMLDivElement;
inner: HTMLDivElement;
VScrollWidth: number;
HScrollHeight: number;
skipEvent: boolean;
setVisible(isVisible: any): void;
isVisible: any;
coeff: number;
}
export { VScrollBar as ScrollBar, VScrollBar as ScrollBarV, HScrollBar as ScrollBarH };
namespace Ace {
type EventEmitter<T extends {
[K in keyof T]: (...args: any[]) => any;
}> = import("ace-code").Ace.EventEmitter<T>;
}
export interface VScrollBar extends Ace.EventEmitter<any> {
}
export interface HScrollBar extends Ace.EventEmitter<any> {
}
}
declare module "ace-code/src/renderloop" {
/**
* Batches changes (that force something to be redrawn) in the background.
**/
export class RenderLoop {
constructor(onRender: any, win: any);
onRender: any;
pending: boolean;
changes: number;
window: any;
schedule(change: any): void;
clear(change: any): number;
}
}
declare module "ace-code/src/css/editor-css" {
const _exports: string;
export = _exports;
}
declare module "ace-code/src/layer/decorators" {
export class Decorator {
constructor(parent: any, renderer: any);
canvas: HTMLCanvasElement;
renderer: any;
pixelRatio: number;
maxHeight: any;
lineHeight: any;
canvasHeight: any;
heightRatio: number;
canvasWidth: any;
minDecorationHeight: number;
halfMinDecorationHeight: number;
colors: {};
compensateFoldRows(row: any, foldData: any): number;
}
}
declare module "ace-code/src/virtual_renderer" {
/**
* The class that is responsible for drawing everything you see on the screen!
* @related editor.renderer
**/
export class VirtualRenderer {
/**
* Constructs a new `VirtualRenderer` within the `container` specified, applying the given `theme`.
* @param {HTMLElement | null} [container] The root element of the editor
* @param {String} [theme] The starting theme
**/
constructor(container?: HTMLElement | null, theme?: string);
container: HTMLElement;
scroller: HTMLElement;
content: HTMLElement;
canvas: HTMLDivElement;
scrollBar: VScrollBar;
scrollBarV: import("ace-code").Ace.VScrollbar;
scrollBarH: import("ace-code").Ace.HScrollbar;
scrollTop: number;
scrollLeft: number;
cursorPos: {
row: number;
column: number;
};
layerConfig: {
width: number;
padding: number;
firstRow: number;
firstRowScreen: number;
lastRow: number;
lineHeight: number;
characterWidth: number;
minHeight: number;
maxHeight: number;
offset: number;
height: number;
gutterOffset: number;
};
scrollMargin: {
left: number;
right: number;
top: number;
bottom: number;
v: number;
h: number;
};
margin: {
left: number;
right: number;
top: number;
bottom: number;
v: number;
h: number;
};
updateCharacterSize(): void;
characterWidth: number;
lineHeight: number;
/**
*
* Associates the renderer with an [[EditSession `EditSession`]].
* @param {EditSession} session The session to associate with
**/
setSession(session: EditSession): void;
session: import("ace-code").Ace.EditSession;
/**
* Triggers a partial update of the text, from the range given by the two parameters.
* @param {Number} firstRow The first row to update
* @param {Number} lastRow The last row to update
**/
updateLines(firstRow: number, lastRow: number, force?: boolean): void;
/**
* Triggers a full update of the text, for all the rows.
**/
updateText(): void;
/**
* Triggers a full update of all the layers, for all the rows.
* @param {Boolean} [force] If `true`, forces the changes through
**/
updateFull(force?: boolean): void;
/**
* Updates the font size.
**/
updateFontSize(): void;
resizing: number;
gutterWidth: any;
/**
* Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
**/
adjustWrapLimit(): boolean;
/**
* Identifies whether you want to have an animated scroll or not.
* @param {Boolean} shouldAnimate Set to `true` to show animated scrolls
**/
setAnimatedScroll(shouldAnimate: boolean): void;
/**
* Returns whether an animated scroll happens or not.
**/
getAnimatedScroll(): boolean;
/**
* Identifies whether you want to show invisible characters or not.
* @param {Boolean} showInvisibles Set to `true` to show invisibles
**/
setShowInvisibles(showInvisibles: boolean): void;
/**
* Returns whether invisible characters are being shown or not.
**/
getShowInvisibles(): boolean;
getDisplayIndentGuides(): boolean;
setDisplayIndentGuides(display: boolean): void;
getHighlightIndentGuides(): boolean;
setHighlightIndentGuides(highlight: boolean): void;
/**
* Identifies whether you want to show the print margin or not.
* @param {Boolean} showPrintMargin Set to `true` to show the print margin
**/
setShowPrintMargin(showPrintMargin: boolean): void;
/**
* Returns whether the print margin is being shown or not.
**/
getShowPrintMargin(): boolean;
/**
* Identifies whether you want to show the print margin column or not.
* @param {number} printMarginColumn Set to `true` to show the print margin column
**/
setPrintMarginColumn(printMarginColumn: number): void;
/**
* Returns whether the print margin column is being shown or not.
**/
getPrintMarginColumn(): number;
/**
* Returns `true` if the gutter is being shown.
**/
getShowGutter(): boolean;
/**
* Identifies whether you want to show the gutter or not.
* @param {Boolean} show Set to `true` to show the gutter
**/
setShowGutter(show: boolean): void;
getFadeFoldWidgets(): boolean;
setFadeFoldWidgets(show: boolean): void;
setHighlightGutterLine(shouldHighlight: boolean): void;
getHighlightGutterLine(): boolean;
/**
*
* Returns the root element containing this renderer.
**/
getContainerElement(): HTMLElement;
/**
*
* Returns the element that the mouse events are attached to
**/
getMouseEventTarget(): HTMLElement;
/**
*
* Returns the element to which the hidden text area is added.
**/
getTextAreaContainer(): HTMLElement;
/**
* [Returns the index of the first visible row.]{: #VirtualRenderer.getFirstVisibleRow}
**/
getFirstVisibleRow(): number;
/**
*
* Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
**/
getFirstFullyVisibleRow(): number;
/**
*
* Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
**/
getLastFullyVisibleRow(): number;