From 690052db9e7a56ced8dfd87fc9864943f77584b4 Mon Sep 17 00:00:00 2001
From: Azat Alimov <32402726+mkslanc@users.noreply.github.com>
Date: Sat, 23 Nov 2024 17:40:01 +0400
Subject: [PATCH] Generate public types from ace-internal.d.ts (#5427)
---
.github/workflows/nodejs.yml | 15 +-
Makefile.dryice.js | 45 +-
ace-extensions.d.ts | 20 -
ace-internal.d.ts | 8 -
ace-modes.d.ts | 852 ++---
ace.d.ts | 2162 ++++++------
demo/test_package/index.ts | 114 +
demo/test_package/package.json | 16 +
demo/test_package/tsconfig.json | 26 +
package.json | 8 +-
src/autocomplete.js | 50 +-
src/autocomplete_test.js | 8 +
src/config.js | 3 +
src/document.js | 4 +-
src/edit_session.js | 2 +-
src/ext/prompt.js | 2 +-
src/keyboard/hash_handler.js | 6 +-
src/lib/dom.js | 5 +
src/lib/event.js | 10 +-
src/lib/lang.js | 12 +-
src/mode/behaviour/css.js | 1 -
tool/ace_declaration_generator.js | 662 ++++
tool/modes-declaration-generator.js | 3 +-
tool/test-npm-package.sh | 36 +
tsconfig.json | 7 +-
types/ace-ext.d.ts | 610 ++++
types/ace-lib.d.ts | 221 ++
types/ace-modules.d.ts | 4745 +++++++++++++++++++++++++++
types/ace-snippets.d.ts | 402 +++
types/ace-theme.d.ts | 437 +++
30 files changed, 8781 insertions(+), 1711 deletions(-)
delete mode 100644 ace-extensions.d.ts
create mode 100644 demo/test_package/index.ts
create mode 100644 demo/test_package/package.json
create mode 100644 demo/test_package/tsconfig.json
create mode 100644 tool/ace_declaration_generator.js
create mode 100755 tool/test-npm-package.sh
create mode 100644 types/ace-ext.d.ts
create mode 100644 types/ace-lib.d.ts
create mode 100644 types/ace-modules.d.ts
create mode 100644 types/ace-snippets.d.ts
create mode 100644 types/ace-theme.d.ts
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index 2eb07029b0b..50d9f943b0a 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -52,10 +52,17 @@ jobs:
fi
fi
# check types
- - run: npm run update-types
- - run: node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts
- - run: npm run typecheck
- - run: git diff --exit-code ./ace-modes.d.ts ./ace.d.ts
+ - run: |
+ set -x;
+ npx tsc -v;
+ npm run update-types;
+ git diff --color --exit-code ./ace*d.ts;
+ npm run typecheck;
+ node_modules/.bin/tsc --noImplicitAny --strict --noUnusedLocals --noImplicitReturns --noUnusedParameters --noImplicitThis ace.d.ts;
+ - run: |
+ set -x;
+ ./tool/test-npm-package.sh
+ # upload to codecov
- uses: codecov/codecov-action@v3
with:
token: d8edca4b-8e97-41e5-b54e-34c7cf3b2d47
diff --git a/Makefile.dryice.js b/Makefile.dryice.js
index 7ac4d0cb023..5c4eeaef012 100755
--- a/Makefile.dryice.js
+++ b/Makefile.dryice.js
@@ -35,6 +35,11 @@ var fs = require("fs");
var path = require("path");
var copy = require('architect-build/copy');
var build = require('architect-build/build');
+var {
+ updateDeclarationModuleNames,
+ generateDeclaration,
+ SEPARATE_MODULES
+} = require('./tool/ace_declaration_generator');
var ACE_HOME = __dirname;
var BUILD_DIR = ACE_HOME + "/build";
@@ -174,20 +179,30 @@ function ace() {
}
}
+function correctDeclarationsForBuild(path, additionalDeclarations) {
+ var definitions = fs.readFileSync(path, 'utf8');
+ var newDefinitions = updateDeclarationModuleNames(definitions);
+ if (additionalDeclarations) {
+ newDefinitions = newDefinitions + '\n' + additionalDeclarations;
+ }
+ fs.writeFileSync(path, newDefinitions);
+}
+
function buildTypes() {
- var aceCodeModeDefinitions = '/// ';
- var aceCodeExtensionDefinitions = '/// ';
// ace-builds package has different structure and can't use mode types defined for the ace-code.
- // ace-builds modes are declared along with other modules in the ace-modules.d.ts file below.
- var definitions = fs.readFileSync(ACE_HOME + '/ace.d.ts', 'utf8').replace(aceCodeModeDefinitions, '').replace(aceCodeExtensionDefinitions, '');
var paths = fs.readdirSync(BUILD_DIR + '/src-noconflict');
- var moduleRef = '/// ';
+
+ var typeDir = BUILD_DIR + "/types";
+
+ if (!fs.existsSync(typeDir)) {
+ fs.mkdirSync(typeDir);
+ }
fs.readdirSync(BUILD_DIR + '/src-noconflict/snippets').forEach(function(path) {
paths.push("snippets/" + path);
});
- var moduleNameRegex = /^(mode|theme|ext|keybinding)-|^snippets\//;
+ var moduleNameRegex = /^(keybinding)-/;
var pathModules = [
"declare module 'ace-builds/webpack-resolver';",
@@ -199,9 +214,21 @@ function buildTypes() {
return "declare module 'ace-builds/src-noconflict/" + moduleName + "';";
}
}).filter(Boolean)).join("\n") + "\n";
-
- fs.writeFileSync(BUILD_DIR + '/ace.d.ts', moduleRef + '\n' + definitions);
- fs.writeFileSync(BUILD_DIR + '/ace-modules.d.ts', pathModules);
+
+ fs.copyFileSync(ACE_HOME + '/ace-internal.d.ts', BUILD_DIR + '/ace.d.ts');
+ generateDeclaration(BUILD_DIR + '/ace.d.ts');
+ fs.copyFileSync(ACE_HOME + '/ace-modes.d.ts', BUILD_DIR + '/ace-modes.d.ts');
+ correctDeclarationsForBuild(BUILD_DIR + '/ace.d.ts', pathModules);
+ correctDeclarationsForBuild(BUILD_DIR + '/ace-modes.d.ts');
+
+ let allModules = SEPARATE_MODULES;
+ allModules.push("modules"); // core modules
+ allModules.forEach(function (key) {
+ let fileName = '/ace-' + key + '.d.ts';
+ fs.copyFileSync(ACE_HOME + '/types' + fileName, BUILD_DIR + '/types' + fileName);
+ correctDeclarationsForBuild(BUILD_DIR + '/types' + fileName);
+ });
+
var esmUrls = [];
var loader = paths.map(function(path) {
diff --git a/ace-extensions.d.ts b/ace-extensions.d.ts
deleted file mode 100644
index d6988579647..00000000000
--- a/ace-extensions.d.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-declare module "ace-code/src/ext/simple_tokenizer" {
- export type TokenizeResult = Array>
- export function tokenize(content: string, highlightRules: import("./ace").Ace.HighlightRules): TokenizeResult;
-}
-
-declare module "ace-code/src/ext/modelist" {
- export type Mode = {
- name: string;
- caption: string;
- mode: string;
- extensions: string;
- supportsFile(filename: string): boolean;
- }
- export function getModeForPath(path: string): Mode;
- export const modes: Mode[];
- export const modesByName: Record;
-}
diff --git a/ace-internal.d.ts b/ace-internal.d.ts
index 65783e456d7..154614fd961 100644
--- a/ace-internal.d.ts
+++ b/ace-internal.d.ts
@@ -1335,7 +1335,6 @@ declare module "./src/edit_session" {
$useWorker?: boolean,
$wrapAsCode?: boolean,
$indentedSoftWrap?: boolean,
- widgetManager?: any,
$bracketHighlight?: any,
$selectionMarker?: number,
lineWidgetsWidth?: number,
@@ -1357,12 +1356,6 @@ declare module "./src/edit_session" {
$occurMatchingLines?: any,
$useEmacsStyleLineStart?: boolean,
$selectLongWords?: boolean,
- curOp?: {
- command: {},
- args: string,
- scrollTop: number,
- [key: string]: any;
- },
getSelectionMarkers(): any[],
}
@@ -1375,7 +1368,6 @@ declare module "./src/edit_session/fold" {
}
}
-// @ts-expect-error
declare module "./src/placeholder" {
export interface PlaceHolder extends Ace.EventEmitter {
}
diff --git a/ace-modes.d.ts b/ace-modes.d.ts
index f2da9f47c56..93c4d8f8fe4 100644
--- a/ace-modes.d.ts
+++ b/ace-modes.d.ts
@@ -1,290 +1,290 @@
declare module "ace-code/src/mode/abap_highlight_rules" {
- export const AbapHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AbapHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/abap" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/abc_highlight_rules" {
- export const ABCHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ABCHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/abc" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/actionscript_highlight_rules" {
- export const ActionScriptHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ActionScriptHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/actionscript" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ada_highlight_rules" {
- export const AdaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AdaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/ada" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/alda_highlight_rules" {
- export const AldaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AldaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/alda" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/apache_conf_highlight_rules" {
- export const ApacheConfHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ApacheConfHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/apache_conf" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/apex_highlight_rules" {
- export const ApexHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ApexHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/apex" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/applescript_highlight_rules" {
- export const AppleScriptHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AppleScriptHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/applescript" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/aql_highlight_rules" {
- export const AqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/aql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/asciidoc_highlight_rules" {
- export const AsciidocHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AsciidocHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/asciidoc" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/asl_highlight_rules" {
- export const ASLHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ASLHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/asl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/assembly_arm32_highlight_rules" {
- export const AssemblyARM32HighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AssemblyARM32HighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/assembly_arm32" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/assembly_x86_highlight_rules" {
- export const AssemblyX86HighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AssemblyX86HighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/assembly_x86" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/astro_highlight_rules" {
- export const AstroHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AstroHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/astro" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/autohotkey_highlight_rules" {
- export const AutoHotKeyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const AutoHotKeyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/autohotkey" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/basic_highlight_rules" {
- export const BasicHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const BasicHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/basic" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/batchfile_highlight_rules" {
- export const BatchFileHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const BatchFileHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/batchfile" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/behaviour" {
- export const Behaviour: new () => import(".").Ace.Behaviour;
+ export const Behaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/css" {
- export const CssBehaviour: new () => import(".").Ace.Behaviour;
+ export const CssBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/cstyle" {
- export const CstyleBehaviour: new () => import(".").Ace.Behaviour;
+ export const CstyleBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/html" {
- export const HtmlBehaviour: new () => import(".").Ace.Behaviour;
+ export const HtmlBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/javascript" {
- export const JavaScriptBehaviour: new () => import(".").Ace.Behaviour;
+ export const JavaScriptBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/liquid" {
- export const LiquidBehaviour: new () => import(".").Ace.Behaviour;
+ export const LiquidBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/xml" {
- export const XmlBehaviour: new () => import(".").Ace.Behaviour;
+ export const XmlBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/behaviour/xquery" {
- export const XQueryBehaviour: new () => import(".").Ace.Behaviour;
+ export const XQueryBehaviour: new () => import("ace-code").Ace.Behaviour;
}
declare module "ace-code/src/mode/bibtex_highlight_rules" {
- export const BibTeXHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const BibTeXHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/bibtex" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/c_cpp_highlight_rules" {
export const cFunctions: string;
- export const c_cppHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const c_cppHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/c_cpp" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/c9search_highlight_rules" {
- export const C9SearchHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const C9SearchHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/c9search" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/cirru_highlight_rules" {
- export const CirruHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CirruHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/cirru" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/clojure_highlight_rules" {
- export const ClojureHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ClojureHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/clojure" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/cobol_highlight_rules" {
- export const CobolHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CobolHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/cobol" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/coffee_highlight_rules" {
- export const CoffeeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CoffeeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/coffee" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/coldfusion_highlight_rules" {
- export const ColdfusionHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ColdfusionHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/coldfusion" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/crystal_highlight_rules" {
- export const CrystalHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CrystalHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/crystal" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/csharp_highlight_rules" {
- export const CSharpHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CSharpHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/csharp" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/csound_document_highlight_rules" {
- export const CsoundDocumentHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CsoundDocumentHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/csound_document" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/csound_orchestra_highlight_rules" {
- export const CsoundOrchestraHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CsoundOrchestraHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/csound_orchestra" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/csound_preprocessor_highlight_rules" {
- export const CsoundPreprocessorHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CsoundPreprocessorHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/csound_score_highlight_rules" {
- export const CsoundScoreHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CsoundScoreHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/csound_score" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/csp_highlight_rules" {
- export const CspHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CspHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/csp" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/css_completions" {
- export const CssCompletions: new () => import(".").Ace.Completion;
+ export const CssCompletions: new () => import("ace-code").Ace.Completion;
}
declare module "ace-code/src/mode/css_highlight_rules" {
@@ -296,1042 +296,1042 @@ declare module "ace-code/src/mode/css_highlight_rules" {
export const numRe: string;
export const pseudoElements: string;
export const pseudoClasses: string;
- export const CssHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CssHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/css" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/curly_highlight_rules" {
- export const CurlyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CurlyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/curly" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/cuttlefish_highlight_rules" {
- export const CuttlefishHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CuttlefishHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/cuttlefish" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/d_highlight_rules" {
- export const DHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/d" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/dart_highlight_rules" {
- export const DartHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DartHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/dart" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/diff_highlight_rules" {
- export const DiffHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DiffHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/diff" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/django" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/doc_comment_highlight_rules" {
- export const DocCommentHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DocCommentHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/dockerfile_highlight_rules" {
- export const DockerfileHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DockerfileHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/dockerfile" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/dot_highlight_rules" {
- export const DotHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DotHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/dot" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/drools_highlight_rules" {
- export const DroolsHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const DroolsHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/drools" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/edifact_highlight_rules" {
- export const EdifactHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const EdifactHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/edifact" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/eiffel_highlight_rules" {
- export const EiffelHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const EiffelHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/eiffel" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ejs" {
- export const EjsHighlightRules: new () => import(".").Ace.HighlightRules;
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const EjsHighlightRules: new () => import("ace-code").Ace.HighlightRules;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/elixir_highlight_rules" {
- export const ElixirHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ElixirHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/elixir" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/elm_highlight_rules" {
- export const ElmHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ElmHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/elm" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/erlang_highlight_rules" {
- export const ErlangHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ErlangHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/erlang" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/flix_highlight_rules" {
- export const FlixHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const FlixHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/flix" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/folding/asciidoc" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/basic" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/c9search" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/coffee" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/csharp" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/cstyle" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/diff" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/drools" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/fold_mode" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/haskell_cabal" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/html" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/ini" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/java" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/javascript" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/latex" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/lua" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/markdown" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/mixed" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/php" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/pythonic" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/ruby" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/sql" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/sqlserver" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/vbscript" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/velocity" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/xml" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/folding/yaml" {
- export const FoldMode: new () => import(".").Ace.Folding;
+ export const FoldMode: new () => import("ace-code").Ace.Folding;
}
declare module "ace-code/src/mode/forth_highlight_rules" {
- export const ForthHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ForthHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/forth" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/fortran_highlight_rules" {
- export const FortranHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const FortranHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/fortran" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/fsharp_highlight_rules" {
- export const FSharpHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const FSharpHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/fsharp" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/fsl_highlight_rules" {
- export const FSLHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const FSLHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/fsl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ftl_highlight_rules" {
- export const FtlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const FtlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/ftl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/gcode_highlight_rules" {
- export const GcodeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GcodeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/gcode" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/gherkin_highlight_rules" {
- export const GherkinHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GherkinHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/gherkin" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/gitignore_highlight_rules" {
- export const GitignoreHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GitignoreHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/gitignore" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/glsl_highlight_rules" {
- export const glslHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const glslHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/glsl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/gobstones_highlight_rules" {
- export const GobstonesHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GobstonesHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/gobstones" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/golang_highlight_rules" {
- export const GolangHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GolangHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/golang" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/graphqlschema_highlight_rules" {
- export const GraphQLSchemaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GraphQLSchemaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/graphqlschema" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/groovy_highlight_rules" {
- export const GroovyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const GroovyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/groovy" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/haml_highlight_rules" {
- export const HamlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HamlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/haml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/handlebars_highlight_rules" {
- export const HandlebarsHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HandlebarsHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/handlebars" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/haskell_cabal_highlight_rules" {
- export const CabalHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const CabalHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/haskell_cabal" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/haskell_highlight_rules" {
- export const HaskellHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HaskellHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/haskell" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/haxe_highlight_rules" {
- export const HaxeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HaxeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/haxe" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/hjson_highlight_rules" {
- export const HjsonHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HjsonHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/hjson" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/html_completions" {
- export const HtmlCompletions: new () => import(".").Ace.Completion;
+ export const HtmlCompletions: new () => import("ace-code").Ace.Completion;
}
declare module "ace-code/src/mode/html_elixir_highlight_rules" {
- export const HtmlElixirHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HtmlElixirHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/html_elixir" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/html_highlight_rules" {
- export const HtmlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HtmlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/html_ruby_highlight_rules" {
- export const HtmlRubyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HtmlRubyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/html_ruby" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/html" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ini_highlight_rules" {
- export const IniHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const IniHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/ini" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/io_highlight_rules" {
- export const IoHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const IoHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/io" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ion_highlight_rules" {
- export const IonHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const IonHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/ion" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/jack_highlight_rules" {
- export const JackHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JackHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jack" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/jade_highlight_rules" {
- export const JadeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JadeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jade" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/java_highlight_rules" {
- export const JavaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JavaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/java" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/javascript_highlight_rules" {
- export const JavaScriptHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JavaScriptHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/javascript" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/jexl_highlight_rules" {
- export const JexlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JexlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jexl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/js_regex_highlight_rules" {
- export const JsRegexHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JsRegexHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jsdoc_comment_highlight_rules" {
- export const JsDocCommentHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JsDocCommentHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/json_highlight_rules" {
- export const JsonHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JsonHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/json" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/json5_highlight_rules" {
- export const Json5HighlightRules: new () => import(".").Ace.HighlightRules;
+ export const Json5HighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/json5" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/jsp_highlight_rules" {
- export const JspHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JspHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jsp" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/jssm_highlight_rules" {
- export const JSSMHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JSSMHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jssm" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/jsx_highlight_rules" {
- export const JsxHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JsxHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/jsx" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/julia_highlight_rules" {
- export const JuliaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const JuliaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/julia" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/kotlin_highlight_rules" {
- export const KotlinHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const KotlinHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/kotlin" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/latex_highlight_rules" {
- export const LatexHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LatexHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/latex" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/latte_highlight_rules" {
- export const LatteHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LatteHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/latte" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/less_highlight_rules" {
- export const LessHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LessHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/less" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/liquid_highlight_rules" {
- export const LiquidHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LiquidHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/liquid" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/lisp_highlight_rules" {
- export const LispHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LispHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/lisp" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/livescript" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/logiql_highlight_rules" {
- export const LogiQLHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LogiQLHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/logiql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/logtalk_highlight_rules" {
- export const LogtalkHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LogtalkHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/logtalk" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/lsl_highlight_rules" {
- export const LSLHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LSLHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/lsl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/lua_highlight_rules" {
- export const LuaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LuaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/lua" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/luapage_highlight_rules" {
- export const LuaPageHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LuaPageHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/luapage" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/lucene_highlight_rules" {
- export const LuceneHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const LuceneHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/lucene" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/makefile_highlight_rules" {
- export const MakefileHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MakefileHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/makefile" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/markdown_highlight_rules" {
- export const MarkdownHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MarkdownHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/markdown" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mask_highlight_rules" {
- export const MaskHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MaskHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mask" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/matching_brace_outdent" {
- export const MatchingBraceOutdent: new () => import(".").Ace.Outdent;
+ export const MatchingBraceOutdent: new () => import("ace-code").Ace.Outdent;
}
declare module "ace-code/src/mode/matching_parens_outdent" {
- export const MatchingParensOutdent: new () => import(".").Ace.Outdent;
+ export const MatchingParensOutdent: new () => import("ace-code").Ace.Outdent;
}
declare module "ace-code/src/mode/matlab_highlight_rules" {
- export const MatlabHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MatlabHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/matlab" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/maze_highlight_rules" {
- export const MazeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MazeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/maze" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mediawiki_highlight_rules" {
- export const MediaWikiHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MediaWikiHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mediawiki" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mel_highlight_rules" {
- export const MELHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MELHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mel" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mips_highlight_rules" {
- export const MIPSHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MIPSHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mips" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mixal_highlight_rules" {
- export const MixalHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MixalHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mixal" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mushcode_highlight_rules" {
- export const MushCodeRules: new () => import(".").Ace.HighlightRules;
+ export const MushCodeRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mushcode" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/mysql_highlight_rules" {
- export const MysqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const MysqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/mysql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/nasal_highlight_rules" {
- export const NasalHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const NasalHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/nasal" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/nginx_highlight_rules" {
- export const NginxHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const NginxHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/nginx" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/nim_highlight_rules" {
- export const NimHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const NimHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/nim" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/nix_highlight_rules" {
- export const NixHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const NixHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/nix" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/nsis_highlight_rules" {
- export const NSISHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const NSISHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/nsis" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/nunjucks_highlight_rules" {
- export const NunjucksHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const NunjucksHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/nunjucks" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/objectivec_highlight_rules" {
- export const ObjectiveCHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ObjectiveCHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/objectivec" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ocaml_highlight_rules" {
- export const OcamlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const OcamlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/ocaml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/odin_highlight_rules" {
- export const OdinHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const OdinHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/odin" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/partiql_highlight_rules" {
- export const PartiqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PartiqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/partiql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/pascal_highlight_rules" {
- export const PascalHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PascalHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/pascal" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/perl_highlight_rules" {
- export const PerlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PerlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/perl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/pgsql_highlight_rules" {
- export const PgsqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PgsqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/pgsql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/php_completions" {
- export const PhpCompletions: new () => import(".").Ace.Completion;
+ export const PhpCompletions: new () => import("ace-code").Ace.Completion;
}
declare module "ace-code/src/mode/php_highlight_rules" {
- export const PhpHighlightRules: new () => import(".").Ace.HighlightRules;
- export const PhpLangHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PhpHighlightRules: new () => import("ace-code").Ace.HighlightRules;
+ export const PhpLangHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/php_laravel_blade_highlight_rules" {
- export const PHPLaravelBladeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PHPLaravelBladeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/php_laravel_blade" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/php" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/pig_highlight_rules" {
- export const PigHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PigHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/pig" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/plain_text" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/plsql_highlight_rules" {
- export const plsqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const plsqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/plsql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/powershell_highlight_rules" {
- export const PowershellHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PowershellHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/powershell" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/praat_highlight_rules" {
- export const PraatHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PraatHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/praat" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/prisma_highlight_rules" {
- export const PrismaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PrismaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/prisma" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/prolog_highlight_rules" {
- export const PrologHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PrologHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/prolog" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/properties_highlight_rules" {
- export const PropertiesHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PropertiesHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/properties" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/protobuf_highlight_rules" {
- export const ProtobufHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ProtobufHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/protobuf" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/prql_highlight_rules" {
- export const PrqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PrqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/prql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/puppet_highlight_rules" {
- export const PuppetHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PuppetHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/puppet" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/python_highlight_rules" {
- export const PythonHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const PythonHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/python" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/qml_highlight_rules" {
- export const QmlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const QmlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/qml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/r_highlight_rules" {
- export const RHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/r" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/raku_highlight_rules" {
- export const RakuHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RakuHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/raku" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/razor_completions" {
- export const RazorCompletions: new () => import(".").Ace.Completion;
+ export const RazorCompletions: new () => import("ace-code").Ace.Completion;
}
declare module "ace-code/src/mode/razor_highlight_rules" {
- export const RazorHighlightRules: new () => import(".").Ace.HighlightRules;
- export const RazorLangHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RazorHighlightRules: new () => import("ace-code").Ace.HighlightRules;
+ export const RazorLangHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/razor" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/rdoc_highlight_rules" {
- export const RDocHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RDocHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/rdoc" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/red_highlight_rules" {
- export const RedHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RedHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/red" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/redshift_highlight_rules" {
- export const RedshiftHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RedshiftHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/redshift" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/rhtml_highlight_rules" {
- export const RHtmlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RHtmlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/rhtml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/robot_highlight_rules" {
- export const RobotHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RobotHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/robot" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/rst_highlight_rules" {
- export const RSTHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RSTHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/rst" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/ruby_highlight_rules" {
@@ -1347,362 +1347,362 @@ declare module "ace-code/src/mode/ruby_highlight_rules" {
export const constantNumericComplex: { token: string; regex: RegExp; };
export const constantNumericFloat: { token: string; regex: string; };
export const instanceVariable: { token: string; regex: string; };
- export const RubyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RubyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/ruby" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/rust_highlight_rules" {
- export const RustHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const RustHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/rust" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sac_highlight_rules" {
- export const sacHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const sacHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sac" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sass_highlight_rules" {
- export const SassHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SassHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sass" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/scad_highlight_rules" {
- export const scadHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const scadHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/scad" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/scala_highlight_rules" {
- export const ScalaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ScalaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/scala" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/scheme_highlight_rules" {
- export const SchemeHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SchemeHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/scheme" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/scrypt_highlight_rules" {
- export const scryptHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const scryptHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/scrypt" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/scss_highlight_rules" {
- export const ScssHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ScssHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/scss" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sh_highlight_rules" {
export const reservedKeywords: string;
export const languageConstructs: string;
- export const ShHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ShHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sh" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sjs_highlight_rules" {
- export const SJSHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SJSHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sjs" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/slim_highlight_rules" {
- export const SlimHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SlimHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/slim" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/smarty_highlight_rules" {
- export const SmartyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SmartyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/smarty" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/smithy_highlight_rules" {
- export const SmithyHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SmithyHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/smithy" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/snippets" {
- export const SnippetHighlightRules: new () => import(".").Ace.HighlightRules;
- export const SnippetGroupHighlightRules: new () => import(".").Ace.HighlightRules;
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const SnippetHighlightRules: new () => import("ace-code").Ace.HighlightRules;
+ export const SnippetGroupHighlightRules: new () => import("ace-code").Ace.HighlightRules;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/soy_template_highlight_rules" {
- export const SoyTemplateHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SoyTemplateHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/soy_template" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/space_highlight_rules" {
- export const SpaceHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SpaceHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/space" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sparql_highlight_rules" {
- export const SPARQLHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SPARQLHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sparql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sql_highlight_rules" {
- export const SqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sql" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/sqlserver_highlight_rules" {
- export const SqlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SqlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/sqlserver" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/stylus_highlight_rules" {
- export const StylusHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const StylusHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/stylus" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/svg_highlight_rules" {
- export const SvgHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const SvgHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/svg" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/swift_highlight_rules" {
- export const HighlightRules: new () => import(".").Ace.HighlightRules;
- export const SwiftHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const HighlightRules: new () => import("ace-code").Ace.HighlightRules;
+ export const SwiftHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/swift" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/tcl_highlight_rules" {
- export const TclHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TclHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/tcl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/terraform_highlight_rules" {
- export const TerraformHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TerraformHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/terraform" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/tex_highlight_rules" {
- export const TexHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TexHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/tex" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/text_highlight_rules" {
- export const TextHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TextHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/text" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/textile_highlight_rules" {
- export const TextileHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TextileHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/textile" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/toml_highlight_rules" {
- export const TomlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TomlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/toml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/tsx_highlight_rules" {
- export const TsxHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TsxHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/tsx" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/turtle_highlight_rules" {
- export const TurtleHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TurtleHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/turtle" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/twig_highlight_rules" {
- export const TwigHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TwigHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/twig" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/typescript_highlight_rules" {
- export const TypeScriptHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const TypeScriptHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/typescript" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/vala_highlight_rules" {
- export const ValaHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ValaHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/vala" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/vbscript_highlight_rules" {
- export const VBScriptHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const VBScriptHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/vbscript" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/velocity_highlight_rules" {
- export const VelocityHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const VelocityHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/velocity" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/verilog_highlight_rules" {
- export const VerilogHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const VerilogHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/verilog" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/vhdl_highlight_rules" {
- export const VHDLHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const VHDLHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/vhdl" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/visualforce_highlight_rules" {
- export const VisualforceHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const VisualforceHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/visualforce" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/vue_highlight_rules" {
- export const VueHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const VueHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/vue" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/wollok_highlight_rules" {
- export const WollokHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const WollokHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/wollok" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/xml_highlight_rules" {
- export const XmlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const XmlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/xml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/yaml_highlight_rules" {
- export const YamlHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const YamlHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/yaml" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/zeek_highlight_rules" {
- export const ZeekHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ZeekHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/zeek" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
declare module "ace-code/src/mode/zig_highlight_rules" {
- export const ZigHighlightRules: new () => import(".").Ace.HighlightRules;
+ export const ZigHighlightRules: new () => import("ace-code").Ace.HighlightRules;
}
declare module "ace-code/src/mode/zig" {
- export const Mode: new () => import(".").Ace.SyntaxMode;
+ export const Mode: new () => import("ace-code").Ace.SyntaxMode;
}
\ No newline at end of file
diff --git a/ace.d.ts b/ace.d.ts
index 659d31b780c..190a64cf866 100644
--- a/ace.d.ts
+++ b/ace.d.ts
@@ -1,1201 +1,965 @@
-///
-///
-
-export namespace Ace {
- export type NewLineMode = 'auto' | 'unix' | 'windows';
-
- export interface Anchor extends EventEmitter {
- getPosition(): Position;
- getDocument(): Document;
- setPosition(row: number, column: number, noClip?: boolean): void;
- detach(): void;
- attach(doc: Document): void;
- }
-
- export interface Document extends EventEmitter {
- setValue(text: string): void;
- getValue(): string;
- createAnchor(row: number, column: number): Anchor;
- getNewLineCharacter(): string;
- setNewLineMode(newLineMode: NewLineMode): void;
- getNewLineMode(): NewLineMode;
- isNewLine(text: string): boolean;
- getLine(row: number): string;
- getLines(firstRow: number, lastRow: number): string[];
- getAllLines(): string[];
- getLength(): number;
- getTextRange(range: Range): string;
- getLinesForRange(range: Range): string[];
- insert(position: Position, text: string): Position;
- insert(position: {row: number, column: number}, text: string): Position;
- insertInLine(position: Position, text: string): Position;
- insertNewLine(position: Point): Point;
- clippedPos(row: number, column: number): Point;
- clonePos(pos: Point): Point;
- pos(row: number, column: number): Point;
- insertFullLines(row: number, lines: string[]): void;
- insertMergedLines(position: Position, lines: string[]): Point;
- remove(range: Range): Position;
- removeInLine(row: number, startColumn: number, endColumn: number): Position;
- removeFullLines(firstRow: number, lastRow: number): string[];
- removeNewLine(row: number): void;
- replace(range: Range, text: string): Position;
- applyDeltas(deltas: Delta[]): void;
- revertDeltas(deltas: Delta[]): void;
- applyDelta(delta: Delta, doNotValidate?: boolean): void;
- revertDelta(delta: Delta): void;
- indexToPosition(index: number, startRow: number): Position;
- positionToIndex(pos: Position, startRow?: number): number;
- }
-
- export interface FoldLine {
- folds: Fold[];
- range: Range;
- start: Point;
- end: Point;
-
- shiftRow(shift: number): void;
- addFold(fold: Fold): void;
- containsRow(row: number): boolean;
- walk(callback: Function, endRow?: number, endColumn?: number): void;
- getNextFoldTo(row: number, column: number): null | { fold: Fold, kind: string };
- addRemoveChars(row: number, column: number, len: number): void;
- split(row: number, column: number): FoldLine;
- merge(foldLineNext: FoldLine): void;
- idxToPosition(idx: number): Point;
- }
-
- export interface Fold {
- range: Range;
- start: Point;
- end: Point;
- foldLine?: FoldLine;
- sameRow: boolean;
- subFolds: Fold[];
-
- setFoldLine(foldLine: FoldLine): void;
- clone(): Fold;
- addSubFold(fold: Fold): Fold;
- restoreRange(range: Range): void;
- }
-
- interface Folding {
- getFoldAt(row: number, column: number, side: number): Fold;
- getFoldsInRange(range: Range): Fold[];
- getFoldsInRangeList(ranges: Range[]): Fold[];
- getAllFolds(): Fold[];
- getFoldStringAt(row: number,
- column: number,
- trim?: number,
- foldLine?: FoldLine): string | null;
- getFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null;
- getNextFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null;
- getFoldedRowCount(first: number, last: number): number;
- addFold(placeholder: string | Fold, range?: Range): Fold;
- addFolds(folds: Fold[]): void;
- removeFold(fold: Fold): void;
- removeFolds(folds: Fold[]): void;
- expandFold(fold: Fold): void;
- expandFolds(folds: Fold[]): void;
- unfold(location: null | number | Point | Range,
- expandInner?: boolean): Fold[] | undefined;
- isRowFolded(docRow: number, startFoldRow?: FoldLine): boolean;
- getFoldRowEnd(docRow: number, startFoldRow?: FoldLine): number;
- getFoldRowStart(docRow: number, startFoldRow?: FoldLine): number;
- getFoldDisplayLine(foldLine: FoldLine,
- endRow: number | null,
- endColumn: number | null,
- startRow: number | null,
- startColumn: number | null): string;
- getDisplayLine(row: number,
- endColumn: number | null,
- startRow: number | null,
- startColumn: number | null): string;
- toggleFold(tryToUnfold?: boolean): void;
- getCommentFoldRange(row: number,
- column: number,
- dir: number): Range | undefined;
- foldAll(startRow?: number, endRow?: number, depth?: number): void;
- setFoldStyle(style: string): void;
- getParentFoldRangeData(row: number, ignoreCurrent?: boolean): {
- range?: Range,
- firstRange: Range
- };
- toggleFoldWidget(toggleParent?: boolean): void;
- updateFoldWidgets(delta: Delta): void;
- }
-
- export interface Range {
- start: Point;
- end: Point;
-
- isEqual(range: Range): boolean;
- toString(): string;
- contains(row: number, column: number): boolean;
- compareRange(range: Range): number;
- comparePoint(p: Point): number;
- containsRange(range: Range): boolean;
- intersects(range: Range): boolean;
- isEnd(row: number, column: number): boolean;
- isStart(row: number, column: number): boolean;
- setStart(row: number, column: number): void;
- setEnd(row: number, column: number): void;
- inside(row: number, column: number): boolean;
- insideStart(row: number, column: number): boolean;
- insideEnd(row: number, column: number): boolean;
- compare(row: number, column: number): number;
- compareStart(row: number, column: number): number;
- compareEnd(row: number, column: number): number;
- compareInside(row: number, column: number): number;
- clipRows(firstRow: number, lastRow: number): Range;
- extend(row: number, column: number): Range;
- isEmpty(): boolean;
- isMultiLine(): boolean;
- clone(): Range;
- collapseRows(): Range;
- toScreenRange(session: EditSession): Range;
- moveBy(row: number, column: number): void;
- }
-
- export interface EditSessionOptions {
- wrap: "off" | "free" | "printmargin" | boolean | number;
- wrapMethod: 'code' | 'text' | 'auto';
- indentedSoftWrap: boolean;
- firstLineNumber: number;
- useWorker: boolean;
- useSoftTabs: boolean;
- tabSize: number;
- navigateWithinSoftTabs: boolean;
- foldStyle: 'markbegin' | 'markbeginend' | 'manual';
- overwrite: boolean;
- newLineMode: NewLineMode;
- mode: string;
- }
-
- export interface VirtualRendererOptions {
- animatedScroll: boolean;
- showInvisibles: boolean;
- showPrintMargin: boolean;
- printMarginColumn: number;
- printMargin: boolean | number;
- showGutter: boolean;
- fadeFoldWidgets: boolean;
- showFoldWidgets: boolean;
- showLineNumbers: boolean;
- displayIndentGuides: boolean;
- highlightIndentGuides: boolean;
- highlightGutterLine: boolean;
- hScrollBarAlwaysVisible: boolean;
- vScrollBarAlwaysVisible: boolean;
- fontSize: number;
- fontFamily: string;
- maxLines: number;
- minLines: number;
- scrollPastEnd: number;
- fixedWidthGutter: boolean;
- customScrollbar: boolean;
- theme: string;
- hasCssTransforms: boolean;
- maxPixelHeight: number;
- useSvgGutterIcons: boolean;
- showFoldedAnnotations: boolean;
- }
-
- export interface MouseHandlerOptions {
- scrollSpeed: number;
- dragDelay: number;
- dragEnabled: boolean;
- focusTimeout: number;
- tooltipFollowsMouse: boolean;
- }
-
- export interface EditorOptions extends EditSessionOptions,
- MouseHandlerOptions,
- VirtualRendererOptions {
- selectionStyle: string;
- highlightActiveLine: boolean;
- highlightSelectedWord: boolean;
- readOnly: boolean;
- copyWithEmptySelection: boolean;
- cursorStyle: 'ace' | 'slim' | 'smooth' | 'wide';
- mergeUndoDeltas: true | false | 'always';
- behavioursEnabled: boolean;
- wrapBehavioursEnabled: boolean;
- enableAutoIndent: boolean;
- enableBasicAutocompletion: boolean | Completer[];
- enableLiveAutocompletion: boolean | Completer[];
- liveAutocompletionDelay: number;
- liveAutocompletionThreshold: number;
- enableSnippets: boolean;
- autoScrollEditorIntoView: boolean;
- keyboardHandler: string | null;
- placeholder: string;
- value: string;
- session: EditSession;
- relativeLineNumbers: boolean;
- enableMultiselect: boolean;
- enableKeyboardAccessibility: boolean;
- textInputAriaLabel: string;
- enableMobileMenu: boolean;
- }
-
- export interface SearchOptions {
- needle: string | RegExp;
- preventScroll: boolean;
- backwards: boolean;
- start: Range;
- skipCurrent: boolean;
- range: Range;
- preserveCase: boolean;
- regExp: boolean;
- wholeWord: boolean;
- caseSensitive: boolean;
- wrap: boolean;
- }
-
- export interface EventEmitter {
- once(name: string, callback: Function): void;
- setDefaultHandler(name: string, callback: Function): void;
- removeDefaultHandler(name: string, callback: Function): void;
- on(name: string, callback: Function, capturing?: boolean): void;
- addEventListener(name: string, callback: Function, capturing?: boolean): void;
- off(name: string, callback: Function): void;
- removeListener(name: string, callback: Function): void;
- removeEventListener(name: string, callback: Function): void;
- removeAllListeners(name?: string): void;
- }
-
- export interface Point {
- row: number;
- column: number;
- }
-
- export interface Delta {
- action: 'insert' | 'remove';
- start: Point;
- end: Point;
- lines: string[];
- }
-
- export interface Annotation {
- row?: number;
- column?: number;
- text: string;
- type: string;
- }
-
- export interface MarkerGroupItem {
- range: Range;
- className: string;
- }
-
- export class MarkerGroup {
- constructor(session: EditSession, options?: {markerType?: "fullLine" | "line"});
- setMarkers(markers: MarkerGroupItem[]): void;
- getMarkerAtPosition(pos: Position): MarkerGroupItem | undefined;
- }
-
-
- export interface Command {
- name?: string;
- bindKey?: string | { mac?: string, win?: string };
- readOnly?: boolean;
- exec: (editor: Editor, args?: any) => void;
- }
-
- export type CommandLike = Command | ((editor: Editor) => void);
-
- export interface KeyboardHandler {
- handleKeyboard: Function;
- }
-
- export interface MarkerLike {
- range?: Range;
- type: string;
- renderer?: MarkerRenderer;
- clazz: string;
- inFront: boolean;
- id: number;
- update?: (html: string[],
- // TODO maybe define Marker class
- marker: any,
- session: EditSession,
- config: any) => void;
- }
-
- export type MarkerRenderer = (html: string[],
- range: Range,
- left: number,
- top: number,
- config: any) => void;
-
- export interface Token {
- type: string;
- value: string;
- index?: number;
- start?: number;
- }
-
- interface BaseCompletion {
- score?: number;
- meta?: string;
- caption?: string;
- docHTML?: string;
- docText?: string;
- completerId?: string;
- }
-
- export interface SnippetCompletion extends BaseCompletion {
- snippet: string;
- }
-
- export interface ValueCompletion extends BaseCompletion {
- value: string;
- }
-
- export type Completion = SnippetCompletion | ValueCompletion
-
- export interface Tokenizer {
- removeCapturingGroups(src: string): string;
- createSplitterRegexp(src: string, flag?: string): RegExp;
- getLineTokens(line: string, startState: string | string[]): Token[];
- }
-
- interface TokenIterator {
- getCurrentToken(): Token;
- getCurrentTokenColumn(): number;
- getCurrentTokenRow(): number;
- getCurrentTokenPosition(): Point;
- getCurrentTokenRange(): Range;
- stepBackward(): Token;
- stepForward(): Token;
- }
-
- export type HighlightRule = {defaultToken: string} | {include: string} | {todo: string} | {
- token: string | string[] | ((value: string) => string);
- regex: string | RegExp;
- next?: string;
- push?: string;
- comment?: string;
- caseInsensitive?: boolean;
- }
-
- export type HighlightRulesMap = Record;
-
- export type KeywordMapper = (keyword: string) => string;
-
- export interface HighlightRules {
- addRules(rules: HighlightRulesMap, prefix?: string): void;
- getRules(): HighlightRulesMap;
- embedRules(rules: (new () => HighlightRules) | HighlightRulesMap, prefix: string, escapeRules?: boolean, append?: boolean): void;
- getEmbeds(): string[];
- normalizeRules(): void;
- createKeywordMapper(map: Record, defaultToken?: string, ignoreCase?: boolean, splitChar?: string): KeywordMapper;
- }
-
- export interface FoldMode {
- foldingStartMarker: RegExp;
- foldingStopMarker?: RegExp;
- getFoldWidget(session: EditSession, foldStyle: string, row: number): string;
- getFoldWidgetRange(session: EditSession, foldStyle: string, row: number, forceMultiline?: boolean): Range | undefined;
- indentationBlock(session: EditSession, row: number, column?: number): Range | undefined;
- openingBracketBlock(session: EditSession, bracket: string, row: number, column: number, typeRe?: RegExp): Range | undefined;
- closingBracketBlock(session: EditSession, bracket: string, row: number, column: number, typeRe?: RegExp): Range | undefined;
- }
-
- type BehaviorAction = (state: string, action: string, editor: Editor, session: EditSession, text: string) => {text: string, selection: number[]} | Range | undefined;
- type BehaviorMap = Record>;
-
- export interface Behaviour {
- add(name: string, action: string, callback: BehaviorAction): void;
- addBehaviours(behaviours: BehaviorMap): void;
- remove(name: string): void;
- inherit(mode: SyntaxMode | (new () => SyntaxMode), filter: string[]): void;
- getBehaviours(filter: string[]): BehaviorMap;
- }
-
- export interface Outdent {
- checkOutdent(line: string, input: string): boolean;
- autoOutdent(doc: Document, row: number): number | undefined;
- }
-
- export interface SyntaxMode {
- HighlightRules: new () => HighlightRules;
- foldingRules?: FoldMode;
- $behaviour?: Behaviour;
- $defaultBehaviour?: Behaviour;
- lineCommentStart?: string;
- getTokenizer(): Tokenizer;
- toggleCommentLines(state: any,
- session: EditSession,
- startRow: number,
- endRow: number): void;
- toggleBlockComment(state: any,
- session: EditSession,
- range: Range,
- cursor: Point): void;
- getNextLineIndent(state: any, line: string, tab: string): string;
- checkOutdent(state: any, line: string, input: string): boolean;
- autoOutdent(state: any, doc: Document, row: number): void;
- // TODO implement WorkerClient types
- createWorker(session: EditSession): any;
- createModeDelegates(mapping: { [key: string]: string }): void;
- transformAction: BehaviorAction;
- getKeywords(append?: boolean): Array;
- getCompletions(state: string,
- session: EditSession,
- pos: Point,
- prefix: string): Completion[];
- }
-
- type AfterLoadCallback = (err: Error | null, module: unknown) => void;
- type LoaderFunction = (moduleName: string, afterLoad: AfterLoadCallback) => void;
-
- export interface Config {
- get(key: string): any;
- set(key: string, value: any): void;
- all(): { [key: string]: any };
- moduleUrl(name: string, component?: string): string;
- setModuleUrl(name: string, subst: string): string;
- setLoader(cb: LoaderFunction): void;
- setModuleLoader(name: string, onLoad: Function): void;
- loadModule(moduleName: string | [string, string],
- onLoad?: (module: any) => void): void;
- init(packaged: any): any;
- defineOptions(obj: any, path: string, options: { [key: string]: any }): Config;
- resetOptions(obj: any): void;
- setDefaultValue(path: string, name: string, value: any): void;
- setDefaultValues(path: string, optionHash: { [key: string]: any }): void;
- }
-
- export interface OptionsProvider {
- setOptions(optList: { [key: string]: any }): void;
- getOptions(optionNames?: string[] | { [key: string]: any }): { [key: string]: any };
- setOption(name: string, value: any): void;
- getOption(name: string): any;
- }
-
- export interface UndoManager {
- addSession(session: EditSession): void;
- add(delta: Delta, allowMerge: boolean, session: EditSession): void;
- addSelection(selection: string, rev?: number): void;
- startNewGroup(): void;
- markIgnored(from: number, to?: number): void;
- getSelection(rev: number, after?: boolean): { value: string, rev: number };
- getRevision(): number;
- getDeltas(from: number, to?: number): Delta[];
- undo(session: EditSession, dontSelect?: boolean): void;
- redo(session: EditSession, dontSelect?: boolean): void;
- reset(): void;
- canUndo(): boolean;
- canRedo(): boolean;
- bookmark(rev?: number): void;
- isAtBookmark(): boolean;
- hasUndo(): boolean;
- hasRedo(): boolean;
- isClean(): boolean;
- markClean(rev?: number): void;
- toJSON(): object;
- fromJSON(json: object): void;
- }
+/* This file is generated using `npm run update-types` */
- export interface Position {
- row: number,
- column: number
- }
-
- export interface EditSession extends EventEmitter, OptionsProvider, Folding {
- selection: Selection;
- curOp?: {
- docChanged?: boolean;
- selectionChanged?: boolean;
- command?: {
- name?: string;
- };
- };
- widgetManager:WidgetManager;
- // TODO: define BackgroundTokenizer
-
- on(name: 'changeFold',
- callback: (obj: { data: Fold, action: string }) => void): Function;
- on(name: 'changeScrollLeft', callback: (scrollLeft: number) => void): Function;
- on(name: 'changeScrollTop', callback: (scrollTop: number) => void): Function;
- on(name: 'tokenizerUpdate',
- callback: (obj: { data: { first: number, last: number } }) => void): Function;
- on(name: 'change', callback: () => void): Function;
- on(name: 'changeTabSize', callback: () => void): Function;
- on(name: "beforeEndOperation", callback: () => void): Function;
-
- setOption(name: T, value: EditSessionOptions[T]): void;
- getOption(name: T): EditSessionOptions[T];
-
- readonly doc: Document;
-
- setDocument(doc: Document): void;
- getDocument(): Document;
- resetCaches(): void;
- setValue(text: string): void;
- getValue(): string;
- getSelection(): Selection;
- getState(row: number): string;
- getTokens(row: number): Token[];
- getTokenAt(row: number, column: number): Token | null;
- setUndoManager(undoManager: UndoManager): void;
- markUndoGroup(): void;
- getUndoManager(): UndoManager;
- getTabString(): string;
- setUseSoftTabs(val: boolean): void;
- getUseSoftTabs(): boolean;
- setTabSize(tabSize: number): void;
- getTabSize(): number;
- isTabStop(position: Position): boolean;
- setNavigateWithinSoftTabs(navigateWithinSoftTabs: boolean): void;
- getNavigateWithinSoftTabs(): boolean;
- setOverwrite(overwrite: boolean): void;
- getOverwrite(): boolean;
- toggleOverwrite(): void;
- addGutterDecoration(row: number, className: string): void;
- removeGutterDecoration(row: number, className: string): void;
- getBreakpoints(): string[];
- setBreakpoints(rows: number[]): void;
- clearBreakpoints(): void;
- setBreakpoint(row: number, className: string): void;
- clearBreakpoint(row: number): void;
- addMarker(range: Range,
- className: string,
- type: "fullLine" | "screenLine" | "text" | MarkerRenderer,
- inFront?: boolean): number;
- addDynamicMarker(marker: MarkerLike, inFront: boolean): MarkerLike;
- removeMarker(markerId: number): void;
- getMarkers(inFront?: boolean): {[id: number]: MarkerLike};
- highlight(re: RegExp): void;
- highlightLines(startRow: number,
- endRow: number,
- className: string,
- inFront?: boolean): Range;
- setAnnotations(annotations: Annotation[]): void;
- getAnnotations(): Annotation[];
- clearAnnotations(): void;
- getWordRange(row: number, column: number): Range;
- getAWordRange(row: number, column: number): Range;
- setNewLineMode(newLineMode: NewLineMode): void;
- getNewLineMode(): NewLineMode;
- setUseWorker(useWorker: boolean): void;
- getUseWorker(): boolean;
- setMode(mode: string | SyntaxMode, callback?: () => void): void;
- getMode(): SyntaxMode;
- setScrollTop(scrollTop: number): void;
- getScrollTop(): number;
- setScrollLeft(scrollLeft: number): void;
- getScrollLeft(): number;
- getScreenWidth(): number;
- getLineWidgetMaxWidth(): number;
- getLine(row: number): string;
- getLines(firstRow: number, lastRow: number): string[];
- getLength(): number;
- getTextRange(range: Range): string;
- insert(position: Position, text: string): void;
- remove(range: Range): void;
- removeFullLines(firstRow: number, lastRow: number): void;
- undoChanges(deltas: Delta[], dontSelect?: boolean): void;
- redoChanges(deltas: Delta[], dontSelect?: boolean): void;
- setUndoSelect(enable: boolean): void;
- replace(range: Range, text: string): void;
- moveText(fromRange: Range, toPosition: Position, copy?: boolean): void;
- indentRows(startRow: number, endRow: number, indentString: string): void;
- outdentRows(range: Range): void;
- moveLinesUp(firstRow: number, lastRow: number): void;
- moveLinesDown(firstRow: number, lastRow: number): void;
- duplicateLines(firstRow: number, lastRow: number): void;
- setUseWrapMode(useWrapMode: boolean): void;
- getUseWrapMode(): boolean;
- setWrapLimitRange(min: number, max: number): void;
- adjustWrapLimit(desiredLimit: number): boolean;
- getWrapLimit(): number;
- setWrapLimit(limit: number): void;
- getWrapLimitRange(): { min: number, max: number };
- getRowLineCount(row: number): number;
- getRowWrapIndent(screenRow: number): number;
- getScreenLastRowColumn(screenRow: number): number;
- getDocumentLastRowColumn(docRow: number, docColumn: number): number;
- getdocumentLastRowColumnPosition(docRow: number, docColumn: number): Position;
- getRowSplitData(row: number): string | undefined;
- getScreenTabSize(screenColumn: number): number;
- screenToDocumentRow(screenRow: number, screenColumn: number): number;
- screenToDocumentColumn(screenRow: number, screenColumn: number): number;
- screenToDocumentPosition(screenRow: number,
- screenColumn: number,
- offsetX?: number): Position;
- documentToScreenPosition(docRow: number, docColumn: number): Position;
- documentToScreenPosition(position: Position): Position;
- documentToScreenColumn(row: number, docColumn: number): number;
- documentToScreenRow(docRow: number, docColumn: number): number;
- getScreenLength(): number;
- getPrecedingCharacter(): string;
- startOperation(commandEvent: {command: {name: string}}): void;
- endOperation(): void;
- toJSON(): Object;
- destroy(): void;
- }
-
- export interface KeyBinding {
- setDefaultHandler(handler: KeyboardHandler): void;
- setKeyboardHandler(handler: KeyboardHandler): void;
- addKeyboardHandler(handler: KeyboardHandler, pos?: number): void;
- removeKeyboardHandler(handler: KeyboardHandler): boolean;
- getKeyboardHandler(): KeyboardHandler;
- getStatusText(): string;
- onCommandKey(e: any, hashId: number, keyCode: number): boolean;
- onTextInput(text: string): boolean;
- }
-
- interface CommandMap {
- [name: string]: Command;
- }
-
- type execEventHandler = (obj: {
- editor: Editor,
- command: Command,
- args: any[]
- }) => void;
-
- export interface CommandManager extends EventEmitter {
- byName: CommandMap,
- commands: CommandMap,
- on(name: 'exec', callback: execEventHandler): Function;
- on(name: 'afterExec', callback: execEventHandler): Function;
- once(name: string, callback: Function): void;
- setDefaultHandler(name: string, callback: Function): void;
- removeDefaultHandler(name: string, callback: Function): void;
- on(name: string, callback: Function, capturing?: boolean): void;
- addEventListener(name: string, callback: Function, capturing?: boolean): void;
- off(name: string, callback: Function): void;
- removeListener(name: string, callback: Function): void;
- removeEventListener(name: string, callback: Function): void;
-
- exec(command: string | string[] | Command, editor: Editor, args: any): boolean;
- canExecute(command: string | Command, editor: Editor): boolean;
- toggleRecording(editor: Editor): void;
- replay(editor: Editor): void;
- addCommand(command: Command): void;
- addCommands(command: Command[]): void;
- removeCommand(command: Command | string, keepCommand?: boolean): void;
- removeCommands(command: Command[]): void;
- bindKey(key: string | { mac?: string, win?: string},
- command: CommandLike,
- position?: number): void;
- bindKeys(keys: {[s: string]: Function}): void;
- parseKeys(keyPart: string): {key: string, hashId: number};
- findKeyCommand(hashId: number, keyString: string): string | undefined;
- handleKeyboard(data: {}, hashId: number, keyString: string, keyCode: string | number): void | {command: string};
- getStatusText(editor: Editor, data: {}): string;
- }
-
- export interface VirtualRenderer extends OptionsProvider, EventEmitter {
- readonly container: HTMLElement;
- readonly scroller: HTMLElement;
- readonly content: HTMLElement;
- readonly characterWidth: number;
- readonly lineHeight: number;
- readonly scrollLeft: number;
- readonly scrollTop: number;
- readonly $padding: number;
-
- setOption(name: T, value: VirtualRendererOptions[T]): void;
- getOption(name: T): VirtualRendererOptions[T];
-
- setSession(session: EditSession): void;
- updateLines(firstRow: number, lastRow: number, force?: boolean): void;
- updateText(): void;
- updateFull(force?: boolean): void;
- updateFontSize(): void;
- adjustWrapLimit(): boolean;
- setAnimatedScroll(shouldAnimate: boolean): void;
- getAnimatedScroll(): boolean;
- setShowInvisibles(showInvisibles: boolean): void;
- getShowInvisibles(): boolean;
- setDisplayIndentGuides(display: boolean): void;
- getDisplayIndentGuides(): boolean;
- setShowPrintMargin(showPrintMargin: boolean): void;
- getShowPrintMargin(): boolean;
- setPrintMarginColumn(showPrintMargin: boolean): void;
- getPrintMarginColumn(): boolean;
- setShowGutter(show: boolean): void;
- getShowGutter(): boolean;
- setFadeFoldWidgets(show: boolean): void;
- getFadeFoldWidgets(): boolean;
- setHighlightGutterLine(shouldHighlight: boolean): void;
- getHighlightGutterLine(): boolean;
- getContainerElement(): HTMLElement;
- getMouseEventTarget(): HTMLElement;
- getTextAreaContainer(): HTMLElement;
- getFirstVisibleRow(): number;
- getFirstFullyVisibleRow(): number;
- getLastFullyVisibleRow(): number;
- getLastVisibleRow(): number;
- setPadding(padding: number): void;
- setScrollMargin(top: number,
- bottom: number,
- left: number,
- right: number): void;
- setHScrollBarAlwaysVisible(alwaysVisible: boolean): void;
- getHScrollBarAlwaysVisible(): boolean;
- setVScrollBarAlwaysVisible(alwaysVisible: boolean): void;
- getVScrollBarAlwaysVisible(): boolean;
- freeze(): void;
- unfreeze(): void;
- updateFrontMarkers(): void;
- updateBackMarkers(): void;
- updateBreakpoints(): void;
- setAnnotations(annotations: Annotation[]): void;
- updateCursor(): void;
- hideCursor(): void;
- showCursor(): void;
- scrollSelectionIntoView(anchor: Position,
- lead: Position,
- offset?: number): void;
- scrollCursorIntoView(cursor: Position, offset?: number): void;
- getScrollTop(): number;
- getScrollLeft(): number;
- getScrollTopRow(): number;
- getScrollBottomRow(): number;
- scrollToRow(row: number): void;
- alignCursor(cursor: Position | number, alignment: number): number;
- scrollToLine(line: number,
- center: boolean,
- animate: boolean,
- callback: () => void): void;
- animateScrolling(fromValue: number, callback: () => void): void;
- scrollToY(scrollTop: number): void;
- scrollToX(scrollLeft: number): void;
- scrollTo(x: number, y: number): void;
- scrollBy(deltaX: number, deltaY: number): void;
- isScrollableBy(deltaX: number, deltaY: number): boolean;
- textToScreenCoordinates(row: number, column: number): { pageX: number, pageY: number};
- pixelToScreenCoordinates(x: number, y: number): {row: number, column: number, side: 1|-1, offsetX: number};
- visualizeFocus(): void;
- visualizeBlur(): void;
- showComposition(position: number): void;
- setCompositionText(text: string): void;
- hideComposition(): void;
- setGhostText(text: string, position: Point): void;
- removeGhostText(): void;
- setTheme(theme: string, callback?: () => void): void;
- getTheme(): string;
- setStyle(style: string, include?: boolean): void;
- unsetStyle(style: string): void;
- setCursorStyle(style: string): void;
- setMouseCursor(cursorStyle: string): void;
- attachToShadowRoot(): void;
- destroy(): void;
- }
-
-
- export interface Selection extends EventEmitter {
- moveCursorWordLeft(): void;
- moveCursorWordRight(): void;
- fromOrientedRange(range: Range): void;
- setSelectionRange(match: any): void;
- getAllRanges(): Range[];
- addRange(range: Range): void;
- isEmpty(): boolean;
- isMultiLine(): boolean;
- setCursor(row: number, column: number): void;
- setAnchor(row: number, column: number): void;
- getAnchor(): Position;
- getCursor(): Position;
- isBackwards(): boolean;
- getRange(): Range;
- clearSelection(): void;
- selectAll(): void;
- setRange(range: Range, reverse?: boolean): void;
- selectTo(row: number, column: number): void;
- selectToPosition(pos: any): void;
- selectUp(): void;
- selectDown(): void;
- selectRight(): void;
- selectLeft(): void;
- selectLineStart(): void;
- selectLineEnd(): void;
- selectFileEnd(): void;
- selectFileStart(): void;
- selectWordRight(): void;
- selectWordLeft(): void;
- getWordRange(): void;
- selectWord(): void;
- selectAWord(): void;
- selectLine(): void;
- moveCursorUp(): void;
- moveCursorDown(): void;
- moveCursorLeft(): void;
- moveCursorRight(): void;
- moveCursorLineStart(): void;
- moveCursorLineEnd(): void;
- moveCursorFileEnd(): void;
- moveCursorFileStart(): void;
- moveCursorLongWordRight(): void;
- moveCursorLongWordLeft(): void;
- moveCursorBy(rows: number, chars: number): void;
- moveCursorToPosition(position: any): void;
- moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean): void;
- moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean): void;
-
- toJSON(): SavedSelection | SavedSelection[];
- fromJSON(selection: SavedSelection | SavedSelection[]): void;
- }
- interface SavedSelection {
- start: Point;
- end: Point;
- isBackwards: boolean;
- }
-
- var Selection: {
- new(session: EditSession): Selection;
- }
-
- export interface TextInput {
- resetSelection(): void;
- setAriaOption(activeDescendant: string, role: string): void;
- }
-
- export interface Editor extends OptionsProvider, EventEmitter {
- container: HTMLElement;
- renderer: VirtualRenderer;
- id: string;
- commands: CommandManager;
- keyBinding: KeyBinding;
- session: EditSession;
- selection: Selection;
- textInput: TextInput;
-
- on(name: 'blur', callback: (e: Event) => void): void;
- on(name: 'input', callback: () => void): void;
- on(name: 'change', callback: (delta: Delta) => void): void;
- on(name: 'changeSelectionStyle', callback: (obj: { data: string }) => void): void;
- on(name: 'changeSession',
- callback: (obj: { session: EditSession, oldSession: EditSession }) => void): void;
- on(name: 'copy', callback: (obj: { text: string }) => void): void;
- on(name: 'focus', callback: (e: Event) => void): void;
- on(name: 'paste', callback: (obj: { text: string }) => void): void;
- on(name: 'mousemove', callback: (e: any) => void): void;
- on(name: 'mouseup', callback: (e: any) => void): void;
- on(name: 'mousewheel', callback: (e: any) => void): void;
- on(name: 'click', callback: (e: any) => void): void;
- on(name: 'guttermousedown', callback: (e: any) => void): void;
- on(name: 'gutterkeydown', callback: (e: any) => void): void;
-
- onPaste(text: string, event: any): void;
-
- setOption(name: T, value: EditorOptions[T]): void;
- getOption(name: T): EditorOptions[T];
-
- setKeyboardHandler(keyboardHandler: string, callback?: () => void): void;
- setKeyboardHandler(keyboardHandler: KeyboardHandler|null): void;
- getKeyboardHandler(): string;
- setSession(session: EditSession | undefined): void;
- getSession(): EditSession;
- setValue(val: string, cursorPos?: number): string;
- getValue(): string;
- getSelection(): Selection;
- resize(force?: boolean): void;
- setTheme(theme: string, callback?: () => void): void;
- getTheme(): string;
- setStyle(style: string): void;
- unsetStyle(style: string): void;
- getFontSize(): string;
- setFontSize(size: number|string): void;
- focus(): void;
- isFocused(): boolean;
- blur(): void;
- getSelectedText(): string;
- getCopyText(): string;
- execCommand(command: string | string[], args?: any): boolean;
- insert(text: string, pasted?: boolean): void;
- setOverwrite(overwrite: boolean): void;
- getOverwrite(): boolean;
- toggleOverwrite(): void;
- setScrollSpeed(speed: number): void;
- getScrollSpeed(): number;
- setDragDelay(dragDelay: number): void;
- getDragDelay(): number;
- setSelectionStyle(val: string): void;
- getSelectionStyle(): string;
- setHighlightActiveLine(shouldHighlight: boolean): void;
- getHighlightActiveLine(): boolean;
- setHighlightGutterLine(shouldHighlight: boolean): void;
- getHighlightGutterLine(): boolean;
- setHighlightSelectedWord(shouldHighlight: boolean): void;
- getHighlightSelectedWord(): boolean;
- setAnimatedScroll(shouldAnimate: boolean): void;
- getAnimatedScroll(): boolean;
- setShowInvisibles(showInvisibles: boolean): void;
- getShowInvisibles(): boolean;
- setDisplayIndentGuides(display: boolean): void;
- getDisplayIndentGuides(): boolean;
- setShowPrintMargin(showPrintMargin: boolean): void;
- getShowPrintMargin(): boolean;
- setPrintMarginColumn(showPrintMargin: number): void;
- getPrintMarginColumn(): number;
- setReadOnly(readOnly: boolean): void;
- getReadOnly(): boolean;
- setBehavioursEnabled(enabled: boolean): void;
- getBehavioursEnabled(): boolean;
- setWrapBehavioursEnabled(enabled: boolean): void;
- getWrapBehavioursEnabled(): boolean;
- setShowFoldWidgets(show: boolean): void;
- getShowFoldWidgets(): boolean;
- setFadeFoldWidgets(fade: boolean): void;
- getFadeFoldWidgets(): boolean;
- remove(dir?: 'left' | 'right'): void;
- removeWordRight(): void;
- removeWordLeft(): void;
- removeLineToEnd(): void;
- splitLine(): void;
- setGhostText(text: string, position: Point): void;
- removeGhostText(): void;
- transposeLetters(): void;
- toLowerCase(): void;
- toUpperCase(): void;
- indent(): void;
- blockIndent(): void;
- blockOutdent(): void;
- sortLines(): void;
- toggleCommentLines(): void;
- toggleBlockComment(): void;
- modifyNumber(amount: number): void;
- removeLines(): void;
- duplicateSelection(): void;
- moveLinesDown(): void;
- moveLinesUp(): void;
- moveText(range: Range, toPosition: Point, copy?: boolean): Range;
- copyLinesUp(): void;
- copyLinesDown(): void;
- getFirstVisibleRow(): number;
- getLastVisibleRow(): number;
- isRowVisible(row: number): boolean;
- isRowFullyVisible(row: number): boolean;
- selectPageDown(): void;
- selectPageUp(): void;
- gotoPageDown(): void;
- gotoPageUp(): void;
- scrollPageDown(): void;
- scrollPageUp(): void;
- scrollToRow(row: number): void;
- scrollToLine(line: number, center: boolean, animate: boolean, callback: () => void): void;
- centerSelection(): void;
- getCursorPosition(): Point;
- getCursorPositionScreen(): Point;
- getSelectionRange(): Range;
- selectAll(): void;
- clearSelection(): void;
- moveCursorTo(row: number, column: number): void;
- moveCursorToPosition(pos: Point): void;
- jumpToMatching(select: boolean, expand: boolean): void;
- gotoLine(lineNumber: number, column: number, animate: boolean): void;
- navigateTo(row: number, column: number): void;
- navigateUp(times?: number): void;
- navigateDown(times?: number): void;
- navigateLeft(times?: number): void;
- navigateRight(times?: number): void;
- navigateLineStart(): void;
- navigateLineEnd(): void;
- navigateFileEnd(): void;
- navigateFileStart(): void;
- navigateWordRight(): void;
- navigateWordLeft(): void;
- replace(replacement: string, options?: Partial): number;
- replaceAll(replacement: string, options?: Partial): number;
- getLastSearchOptions(): Partial;
- find(needle: string | RegExp, options?: Partial, animate?: boolean): Ace.Range | undefined;
- findNext(options?: Partial, animate?: boolean): void;
- findPrevious(options?: Partial, animate?: boolean): void;
- findAll(needle: string | RegExp, options?: Partial, additive?: boolean): number;
- undo(): void;
- redo(): void;
- destroy(): void;
- setAutoScrollEditorIntoView(enable: boolean): void;
- completers: Completer[];
- }
-
- type CompleterCallback = (error: any, completions: Completion[]) => void;
-
- interface Completer {
- identifierRegexps?: Array,
- getCompletions(editor: Editor,
- session: EditSession,
- position: Point,
- prefix: string,
- callback: CompleterCallback): void;
- getDocTooltip?(item: Completion): undefined | string | Completion;
- onSeen?: (editor: Ace.Editor, completion: Completion) => void;
- onInsert?: (editor: Ace.Editor, completion: Completion) => void;
- cancel?(): void;
- id?: string;
- triggerCharacters?: string[];
- hideInlinePreview?: boolean;
- }
-
- export class AceInline {
- show(editor: Editor, completion: Completion, prefix: string): void;
- isOpen(): void;
- hide(): void;
- destroy(): void;
- }
-
- interface CompletionOptions {
- matches?: Completion[];
- }
-
- type CompletionProviderOptions = {
- exactMatch?: boolean;
- ignoreCaption?: boolean;
- }
-
- type CompletionRecord = {
- all: Completion[];
- filtered: Completion[];
- filterText: string;
- } | CompletionProviderOptions
-
- type GatherCompletionRecord = {
- prefix: string;
- matches: Completion[];
- finished: boolean;
- }
-
- type CompletionCallbackFunction = (err: Error | undefined, data: GatherCompletionRecord) => void;
- type CompletionProviderCallback = (err: Error | undefined, completions: CompletionRecord, finished: boolean) => void;
-
- export class CompletionProvider {
- insertByIndex(editor: Editor, index: number, options: CompletionProviderOptions): boolean;
- insertMatch(editor: Editor, data: Completion, options: CompletionProviderOptions): boolean;
- completions: CompletionRecord;
- gatherCompletions(editor: Editor, callback: CompletionCallbackFunction): boolean;
- provideCompletions(editor: Editor, options: CompletionProviderOptions, callback: CompletionProviderCallback): void;
- detach(): void;
- }
-
- export class Autocomplete {
- constructor();
- autoInsert?: boolean;
- autoSelect?: boolean;
- autoShown?: boolean;
- exactMatch?: boolean;
- inlineEnabled?: boolean;
- parentNode?: HTMLElement;
- setSelectOnHover?: Boolean;
- stickySelectionDelay?: Number;
- ignoreCaption?: Boolean;
- showLoadingState?: Boolean;
- emptyMessage?(prefix: String): String;
- getPopup(): AcePopup;
- showPopup(editor: Editor, options: CompletionOptions): void;
- detach(): void;
- destroy(): void;
- }
-
- type AcePopupNavigation = "up" | "down" | "start" | "end";
-
- export class AcePopup {
- constructor(parentNode: HTMLElement);
- setData(list: Completion[], filterText: string): void;
- getData(row: number): Completion;
- getRow(): number;
- getRow(line: number): void;
- hide(): void;
- show(pos: Point, lineHeight: number, topdownOnly: boolean): void;
- tryShow(pos: Point, lineHeight: number, anchor: "top" | "bottom" | undefined, forceShow?: boolean): boolean;
- goTo(where: AcePopupNavigation): void;
- }
-
- export interface LineWidget {
- el: HTMLElement;
- row: number;
- rowCount?: number;
- hidden?: boolean;
- editor?: Editor;
- session?: EditSession;
- column?: number;
- className?: string;
- coverGutter?: boolean;
- pixelHeight?: number;
- fixedWidth?: boolean;
- fullWidth?: boolean;
- screenWidth?: number;
- }
-
- export class WidgetManager {
- constructor(session: EditSession);
- addLineWidget(w: LineWidget): LineWidget;
- removeLineWidget(w: LineWidget): void;
- }
-}
-
-
-export const version: string;
-export const config: Ace.Config;
-export function require(name: string): any;
-export function edit(el: Element | string, options?: Partial): Ace.Editor;
-export function createEditSession(text: Ace.Document | string, mode: Ace.SyntaxMode): Ace.EditSession;
-export const VirtualRenderer: {
- new(container: HTMLElement, theme?: string): Ace.VirtualRenderer;
-};
-export const EditSession: {
- new(text: string | Ace.Document, mode?: Ace.SyntaxMode): Ace.EditSession;
-};
-export const UndoManager: {
- new(): Ace.UndoManager;
-};
-export const Editor: {
- new(): Ace.Editor;
-};
-export const Range: {
- new(startRow: number, startColumn: number, endRow: number, endColumn: number): Ace.Range;
- fromPoints(start: Ace.Point, end: Ace.Point): Ace.Range;
- comparePoints(p1: Ace.Point, p2: Ace.Point): number;
-};
-
-
-type InlineAutocompleteAction = "prev" | "next" | "first" | "last";
-
-type TooltipCommandFunction = (editor: Ace.Editor) => T;
-
-interface TooltipCommand extends Ace.Command {
- enabled: TooltipCommandFunction | boolean,
- getValue?: TooltipCommandFunction,
- type: "button" | "text" | "checkbox"
- iconCssClass: string,
- cssClass: string
-}
-
-export class InlineAutocomplete {
- constructor();
- getInlineRenderer(): Ace.AceInline;
- getInlineTooltip(): CommandBarTooltip;
- getCompletionProvider(): Ace.CompletionProvider;
- show(editor: Ace.Editor): void;
- isOpen(): boolean;
- detach(): void;
- destroy(): void;
- goTo(action: InlineAutocompleteAction): void;
- tooltipEnabled: boolean;
- commands: Record
- getIndex(): number;
- setIndex(value: number): void;
- getLength(): number;
- getData(index?: number): Ace.Completion | undefined;
- updateCompletions(options: Ace.CompletionOptions): void;
-}
-
-export class CommandBarTooltip {
- constructor(parentElement: HTMLElement);
- registerCommand(id: string, command: TooltipCommand): void;
- attach(editor: Ace.Editor): void;
- updatePosition(): void;
- update(): void;
- isShown(): boolean;
- getAlwaysShow(): boolean;
- setAlwaysShow(alwaysShow: boolean): void;
- detach(): void;
- destroy(): void;
+///
+///
+///
+///
+///
+///
+declare module "ace-code" {
+ export namespace Ace {
+ type Anchor = import("ace-code/src/anchor").Anchor;
+ type Editor = import("ace-code/src/editor").Editor;
+ type EditSession = import("ace-code/src/edit_session").EditSession;
+ type Document = import("ace-code/src/document").Document;
+ type Fold = import("ace-code/src/edit_session/fold").Fold;
+ type FoldLine = import("ace-code/src/edit_session/fold_line").FoldLine;
+ type Range = import("ace-code/src/range").Range;
+ type VirtualRenderer = import("ace-code/src/virtual_renderer").VirtualRenderer;
+ type UndoManager = import("ace-code/src/undomanager").UndoManager;
+ type Tokenizer = import("ace-code/src/tokenizer").Tokenizer;
+ type TokenIterator = import("ace-code/src/token_iterator").TokenIterator;
+ type Selection = import("ace-code/src/selection").Selection;
+ type Autocomplete = import("ace-code/src/autocomplete").Autocomplete;
+ type InlineAutocomplete = import("ace-code/src/ext/inline_autocomplete").InlineAutocomplete;
+ type CompletionProvider = import("ace-code/src/autocomplete").CompletionProvider;
+ type AcePopup = import("ace-code/src/autocomplete/popup").AcePopup;
+ type AceInline = import("ace-code/src/autocomplete/inline").AceInline;
+ type MouseEvent = import("ace-code/src/mouse/mouse_event").MouseEvent;
+ type RangeList = import("ace-code/src/range_list").RangeList;
+ type FilteredList = import("ace-code/src/autocomplete").FilteredList;
+ type LineWidgets = import("ace-code/src/line_widgets").LineWidgets;
+ type SearchBox = import("ace-code/src/ext/searchbox").SearchBox;
+ type Occur = import("ace-code/src/occur").Occur;
+ type DefaultHandlers = import("ace-code/src/mouse/default_handlers").DefaultHandlers;
+ type GutterHandler = import("ace-code/src/mouse/default_gutter_handler").GutterHandler;
+ type DragdropHandler = import("ace-code/src/mouse/dragdrop_handler").DragdropHandler;
+ type AppConfig = import("ace-code/src/lib/app_config").AppConfig;
+ type Config = typeof import("ace-code/src/config");
+ type AfterLoadCallback = (err: Error | null, module: unknown) => void;
+ type LoaderFunction = (moduleName: string, afterLoad: AfterLoadCallback) => void;
+ export interface ConfigOptions {
+ packaged: boolean;
+ workerPath: string | null;
+ modePath: string | null;
+ themePath: string | null;
+ basePath: string;
+ suffix: string;
+ loadWorkerFromBlob: boolean;
+ sharedPopups: boolean;
+ useStrictCSP: boolean | null;
+ }
+ interface Theme {
+ cssClass?: string;
+ cssText?: string;
+ padding?: number | string;
+ isDark?: boolean;
+ }
+ interface ScrollBar {
+ setVisible(visible: boolean): void;
+ [key: string]: any;
+ }
+ interface HScrollbar extends ScrollBar {
+ setWidth(width: number): void;
+ }
+ interface VScrollbar extends ScrollBar {
+ setHeight(width: number): void;
+ }
+ interface 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;
+ }
+ interface HardWrapOptions {
+ startRow: number;
+ endRow: number;
+ allowMerge?: boolean;
+ column?: number;
+ }
+ interface CommandBarOptions {
+ maxElementsOnTooltip: number;
+ alwaysShow: boolean;
+ showDelay: number;
+ hideDelay: number;
+ }
+ interface ScreenCoordinates {
+ row: number;
+ column: number;
+ side?: 1 | -1;
+ offsetX?: number;
+ }
+ interface Folding {
+ /**
+ * Looks up a fold at a given row/column. Possible values for side:
+ * -1: ignore a fold if fold.start = row/column
+ * +1: ignore a fold if fold.end = row/column
+ **/
+ getFoldAt(row: number, column: number, side?: number): Ace.Fold;
+ /**
+ * Returns all folds in the given range. Note, that this will return folds
+ **/
+ getFoldsInRange(range: Ace.Range | Ace.Delta): Ace.Fold[];
+ getFoldsInRangeList(ranges: Ace.Range[] | Ace.Range): Ace.Fold[];
+ /**
+ * Returns all folds in the document
+ */
+ getAllFolds(): Ace.Fold[];
+ /**
+ * Returns the string between folds at the given position.
+ * E.g.
+ * foob|arwolrd -> "bar"
+ * foobarwol|rd -> "world"
+ * foobarwolrd ->
+ *
+ * where | means the position of row/column
+ *
+ * The trim option determs if the return string should be trimed according
+ * to the "side" passed with the trim value:
+ *
+ * E.g.
+ * foob|arwolrd -trim=-1> "b"
+ * foobarwol|rd -trim=+1> "rld"
+ * fo|obarwolrd -trim=00> "foo"
+ */
+ getFoldStringAt(row: number, column: number, trim?: number, foldLine?: Ace.FoldLine): string | null;
+ getFoldLine(docRow: number, startFoldLine?: Ace.FoldLine): null | Ace.FoldLine;
+ /**
+ * Returns the fold which starts after or contains docRow
+ */
+ getNextFoldLine(docRow: number, startFoldLine?: Ace.FoldLine): null | Ace.FoldLine;
+ getFoldedRowCount(first: number, last: number): number;
+ /**
+ * Adds a new fold.
+ * The new created Fold object or an existing fold object in case the
+ * passed in range fits an existing fold exactly.
+ */
+ addFold(placeholder: Ace.Fold | string, range?: Ace.Range): Ace.Fold;
+ addFolds(folds: Ace.Fold[]): void;
+ removeFold(fold: Ace.Fold): void;
+ removeFolds(folds: Ace.Fold[]): void;
+ expandFold(fold: Ace.Fold): void;
+ expandFolds(folds: Ace.Fold[]): void;
+ unfold(location?: number | null | Ace.Point | Ace.Range | Ace.Range[], expandInner?: boolean): Ace.Fold[] | undefined;
+ /**
+ * Checks if a given documentRow is folded. This is true if there are some
+ * folded parts such that some parts of the line is still visible.
+ **/
+ isRowFolded(docRow: number, startFoldRow?: Ace.FoldLine): boolean;
+ getRowFoldEnd(docRow: number, startFoldRow?: Ace.FoldLine): number;
+ getRowFoldStart(docRow: number, startFoldRow?: Ace.FoldLine): number;
+ getFoldDisplayLine(foldLine: Ace.FoldLine, endRow?: number | null, endColumn?: number | null, startRow?: number | null, startColumn?: number | null): string;
+ getDisplayLine(row: number, endColumn: number | null, startRow: number | null, startColumn: number | null): string;
+ toggleFold(tryToUnfold?: boolean): void;
+ getCommentFoldRange(row: number, column: number, dir?: number): Ace.Range | undefined;
+ foldAll(startRow?: number | null, endRow?: number | null, depth?: number | null, test?: Function): void;
+ foldToLevel(level: number): void;
+ foldAllComments(): void;
+ setFoldStyle(style: string): void;
+ foldWidgets: any[];
+ getFoldWidget: any;
+ getFoldWidgetRange: any;
+ getParentFoldRangeData(row: number, ignoreCurrent?: boolean): {
+ range?: Ace.Range;
+ firstRange?: Ace.Range;
+ };
+ onFoldWidgetClick(row: number, e: any): void;
+ toggleFoldWidget(toggleParent?: boolean): void;
+ updateFoldWidgets(delta: Ace.Delta): void;
+ tokenizerUpdateFoldWidgets(e: any): void;
+ }
+ interface BracketMatch {
+ findMatchingBracket: (position: Point, chr?: string) => Point;
+ getBracketRange: (pos: Point) => null | Range;
+ /**
+ * Returns:
+ * * null if there is no any bracket at `pos`;
+ * * two Ranges if there is opening and closing brackets;
+ * * one Range if there is only one bracket
+ */
+ getMatchingBracketRanges: (pos: Point, isBackwards?: boolean) => null | Range[];
+ /**
+ * Returns [[Range]]'s for matching tags and tag names, if there are any
+ */
+ getMatchingTags: (pos: Point) => {
+ closeTag: Range;
+ closeTagName: Range;
+ openTag: Range;
+ openTagName: Range;
+ };
+ }
+ interface IRange {
+ start: Point;
+ end: Point;
+ }
+ interface LineWidget {
+ editor?: Editor;
+ el?: HTMLElement;
+ rowCount?: number;
+ hidden?: boolean;
+ column?: number;
+ row: number;
+ session?: EditSession;
+ html?: string;
+ text?: string;
+ className?: string;
+ coverGutter?: boolean;
+ pixelHeight?: number;
+ type?: any;
+ destroy?: () => void;
+ coverLine?: boolean;
+ fixedWidth?: boolean;
+ fullWidth?: boolean;
+ screenWidth?: number;
+ rowsAbove?: number;
+ lenses?: any[];
+ }
+ type NewLineMode = "auto" | "unix" | "windows";
+ interface EditSessionOptions {
+ wrap: "off" | "free" | "printmargin" | boolean | number;
+ wrapMethod: "code" | "text" | "auto";
+ indentedSoftWrap: boolean;
+ firstLineNumber: number;
+ useWorker: boolean;
+ useSoftTabs: boolean;
+ tabSize: number;
+ navigateWithinSoftTabs: boolean;
+ foldStyle: "markbegin" | "markbeginend" | "manual";
+ overwrite: boolean;
+ newLineMode: NewLineMode;
+ mode: string;
+ }
+ interface VirtualRendererOptions {
+ animatedScroll: boolean;
+ showInvisibles: boolean;
+ showPrintMargin: boolean;
+ printMarginColumn: number;
+ printMargin: boolean | number;
+ showGutter: boolean;
+ fadeFoldWidgets: boolean;
+ showFoldWidgets: boolean;
+ showLineNumbers: boolean;
+ displayIndentGuides: boolean;
+ highlightIndentGuides: boolean;
+ highlightGutterLine: boolean;
+ hScrollBarAlwaysVisible: boolean;
+ vScrollBarAlwaysVisible: boolean;
+ fontSize: string | number;
+ fontFamily: string;
+ maxLines: number;
+ minLines: number;
+ scrollPastEnd: number;
+ fixedWidthGutter: boolean;
+ customScrollbar: boolean;
+ theme: string;
+ hasCssTransforms: boolean;
+ maxPixelHeight: number;
+ useSvgGutterIcons: boolean;
+ showFoldedAnnotations: boolean;
+ useResizeObserver: boolean;
+ }
+ interface MouseHandlerOptions {
+ scrollSpeed: number;
+ dragDelay: number;
+ dragEnabled: boolean;
+ focusTimeout: number;
+ tooltipFollowsMouse: boolean;
+ }
+ interface EditorOptions extends EditSessionOptions, MouseHandlerOptions, VirtualRendererOptions {
+ selectionStyle: "fullLine" | "screenLine" | "text" | "line";
+ highlightActiveLine: boolean;
+ highlightSelectedWord: boolean;
+ readOnly: boolean;
+ copyWithEmptySelection: boolean;
+ cursorStyle: "ace" | "slim" | "smooth" | "wide";
+ mergeUndoDeltas: true | false | "always";
+ behavioursEnabled: boolean;
+ wrapBehavioursEnabled: boolean;
+ enableAutoIndent: boolean;
+ enableBasicAutocompletion: boolean | Completer[];
+ enableLiveAutocompletion: boolean | Completer[];
+ liveAutocompletionDelay: number;
+ liveAutocompletionThreshold: number;
+ enableSnippets: boolean;
+ autoScrollEditorIntoView: boolean;
+ keyboardHandler: string | null;
+ placeholder: string;
+ value: string;
+ session: EditSession;
+ relativeLineNumbers: boolean;
+ enableMultiselect: boolean;
+ enableKeyboardAccessibility: boolean;
+ enableCodeLens: boolean;
+ textInputAriaLabel: string;
+ enableMobileMenu: boolean;
+ }
+ interface EventsBase {
+ [key: string]: any;
+ }
+ interface EditSessionEvents {
+ /**
+ * Emitted when the document changes.
+ */
+ "change": (delta: Delta) => void;
+ /**
+ * Emitted when the tab size changes, via [[EditSession.setTabSize]].
+ */
+ "changeTabSize": () => void;
+ /**
+ * Emitted when the ability to overwrite text changes, via [[EditSession.setOverwrite]].
+ */
+ "changeOverwrite": (overwrite: boolean) => void;
+ /**
+ * Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+ */
+ "changeBreakpoint": (e?: {
+ row?: number;
+ breakpoint?: boolean;
+ }) => void;
+ /**
+ * Emitted when a front marker changes.
+ */
+ "changeFrontMarker": () => void;
+ /**
+ * Emitted when a back marker changes.
+ */
+ "changeBackMarker": () => void;
+ /**
+ * Emitted when an annotation changes, like through [[EditSession.setAnnotations]].
+ */
+ "changeAnnotation": (e: {}) => void;
+ /**
+ * Emitted when a background tokenizer asynchronously processes new rows.
+ */
+ "tokenizerUpdate": (e: {
+ data: {
+ first: number;
+ last: number;
+ };
+ }) => void;
+ /**
+ * Emitted when the current mode changes.
+ */
+ "changeMode": (e: any) => void;
+ /**
+ * Emitted when the wrap mode changes.
+ */
+ "changeWrapMode": (e: any) => void;
+ /**
+ * Emitted when the wrapping limit changes.
+ */
+ "changeWrapLimit": (e: any) => void;
+ /**
+ * Emitted when a code fold is added or removed.
+ */
+ "changeFold": (e: any, session?: EditSession) => void;
+ /**
+ * Emitted when the scroll top changes.
+ * @param scrollTop The new scroll top value
+ **/
+ "changeScrollTop": (scrollTop: number) => void;
+ /**
+ * Emitted when the scroll left changes.
+ * @param scrollLeft The new scroll left value
+ **/
+ "changeScrollLeft": (scrollLeft: number) => void;
+ "changeEditor": (e: {
+ editor?: Editor;
+ oldEditor?: Editor;
+ }) => void;
+ "changeSelection": () => void;
+ "startOperation": (op?: {
+ command?: {
+ name?: string;
+ };
+ args?: any;
+ }) => void;
+ "endOperation": (op?: any) => void;
+ "beforeEndOperation": () => void;
+ }
+ interface EditorEvents {
+ "change": (delta: Delta) => void;
+ "changeSelection": () => void;
+ "input": () => void;
+ /**
+ * Emitted whenever the [[EditSession]] changes.
+ * @param e An object with two properties, `oldSession` and `session`, that represent the old and new [[EditSession]]s.
+ **/
+ "changeSession": (e: {
+ oldSession: EditSession;
+ session: EditSession;
+ }) => void;
+ "blur": (e: any) => void;
+ "mousedown": (e: MouseEvent) => void;
+ "mousemove": (e: MouseEvent & {
+ scrollTop?: any;
+ }, editor?: Editor) => void;
+ "changeStatus": (e: any) => void;
+ "keyboardActivity": (e: any) => void;
+ "mousewheel": (e: MouseEvent) => void;
+ "mouseup": (e: MouseEvent) => void;
+ "beforeEndOperation": (e: any) => void;
+ "nativecontextmenu": (e: any) => void;
+ "destroy": (e: any) => void;
+ "focus": (e?: any) => void;
+ /**
+ * Emitted when text is copied.
+ * @param text The copied text
+ **/
+ "copy": (e: {
+ text: string;
+ }) => void;
+ /**
+ * Emitted when text is pasted.
+ **/
+ "paste": (text: string, event: any) => void;
+ /**
+ * Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
+ * @param data Contains one property, `data`, which indicates the new selection style
+ **/
+ "changeSelectionStyle": (data: "fullLine" | "screenLine" | "text" | "line") => void;
+ "changeMode": (e: {
+ mode?: Ace.SyntaxMode;
+ oldMode?: Ace.SyntaxMode;
+ }) => void;
+ //from searchbox extension
+ "findSearchBox": (e: {
+ match: boolean;
+ }) => void;
+ //from code_lens extension
+ "codeLensClick": (e: any) => void;
+ "select": () => void;
+ }
+ interface AcePopupEvents {
+ "click": (e: MouseEvent) => void;
+ "dblclick": (e: MouseEvent) => void;
+ "tripleclick": (e: MouseEvent) => void;
+ "quadclick": (e: MouseEvent) => void;
+ "show": () => void;
+ "hide": () => void;
+ "select": (hide: boolean) => void;
+ "changeHoverMarker": (e: any) => void;
+ }
+ interface DocumentEvents {
+ /**
+ * Fires whenever the document changes.
+ * Several methods trigger different `"change"` events. Below is a list of each action type, followed by each property that's also available:
+ * * `"insert"`
+ * * `range`: the [[Range]] of the change within the document
+ * * `lines`: the lines being added
+ * * `"remove"`
+ * * `range`: the [[Range]] of the change within the document
+ * * `lines`: the lines being removed
+ *
+ **/
+ "change": (e: Delta) => void;
+ "changeNewLineMode": () => void;
+ }
+ interface AnchorEvents {
+ /**
+ * Fires whenever the anchor position changes.
+ * Both of these objects have a `row` and `column` property corresponding to the position.
+ * Events that can trigger this function include [[Anchor.setPosition `setPosition()`]].
+ * @param {Object} e An object containing information about the anchor position. It has two properties:
+ * - `old`: An object describing the old Anchor position
+ * - `value`: An object describing the new Anchor position
+ **/
+ "change": (e: {
+ old: Point;
+ value: Point;
+ }) => void;
+ }
+ interface BackgroundTokenizerEvents {
+ /**
+ * Fires whenever the background tokeniziers between a range of rows are going to be updated.
+ * @param e An object containing two properties, `first` and `last`, which indicate the rows of the region being updated.
+ **/
+ "update": (e: {
+ data: {
+ first: number;
+ last: number;
+ };
+ }) => void;
+ }
+ interface SelectionEvents {
+ /**
+ * Emitted when the cursor position changes.
+ **/
+ "changeCursor": () => void;
+ /**
+ * Emitted when the cursor selection changes.
+ **/
+ "changeSelection": () => void;
+ }
+ interface MultiSelectionEvents extends SelectionEvents {
+ "multiSelect": () => void;
+ "addRange": (e: {
+ range: Range;
+ }) => void;
+ "removeRange": (e: {
+ ranges: Range[];
+ }) => void;
+ "singleSelect": () => void;
+ }
+ interface PlaceHolderEvents {
+ "cursorEnter": (e: any) => void;
+ "cursorLeave": (e: any) => void;
+ }
+ interface GutterEvents {
+ "changeGutterWidth": (width: number) => void;
+ "afterRender": () => void;
+ }
+ interface TextEvents {
+ "changeCharacterSize": (e: any) => void;
+ }
+ interface VirtualRendererEvents {
+ "afterRender": (e?: any, renderer?: VirtualRenderer) => void;
+ "beforeRender": (e: any, renderer?: VirtualRenderer) => void;
+ "themeLoaded": (e: {
+ theme: string | Theme;
+ }) => void;
+ "themeChange": (e: {
+ theme: string | Theme;
+ }) => void;
+ "scrollbarVisibilityChanged": () => void;
+ "changeCharacterSize": (e: any) => void;
+ "resize": (e?: any) => void;
+ "autosize": () => void;
+ }
+ class EventEmitter {
+ once(name: K, callback: T[K]): void;
+ setDefaultHandler(name: string, callback: Function): void;
+ removeDefaultHandler(name: string, callback: Function): void;
+ on(name: K, callback: T[K], capturing?: boolean): T[K];
+ addEventListener(name: K, callback: T[K], capturing?: boolean): T[K];
+ off(name: K, callback: T[K]): void;
+ removeListener(name: K, callback: T[K]): void;
+ removeEventListener(name: K, callback: T[K]): void;
+ removeAllListeners(name?: string): void;
+ }
+ interface SearchOptions {
+ /**The string or regular expression you're looking for*/
+ needle: string | RegExp;
+ preventScroll: boolean;
+ /**Whether to search backwards from where cursor currently is*/
+ backwards: boolean;
+ /**The starting [[Range]] or cursor position to begin the search*/
+ start: Range;
+ /**Whether or not to include the current line in the search*/
+ skipCurrent: boolean;
+ /**The [[Range]] to search within. Set this to `null` for the whole document*/
+ range: Range | null;
+ preserveCase: boolean;
+ /**Whether the search is a regular expression or not*/
+ regExp: boolean;
+ /**Whether the search matches only on whole words*/
+ wholeWord: boolean;
+ /**Whether the search ought to be case-sensitive*/
+ caseSensitive: boolean;
+ /**Whether to wrap the search back to the beginning when it hits the end*/
+ wrap: boolean;
+ re: any;
+ }
+ interface Point {
+ row: number;
+ column: number;
+ }
+ type Position = Point;
+ interface Delta {
+ action: "insert" | "remove";
+ start: Point;
+ end: Point;
+ lines: string[];
+ id?: number;
+ folds?: Fold[];
+ }
+ interface Annotation {
+ row: number;
+ column: number;
+ text: string;
+ type: string;
+ }
+ export interface MarkerGroupItem {
+ range: Range;
+ className: string;
+ }
+ type MarkerGroup = import("ace-code/src/marker_group").MarkerGroup;
+ export interface Command {
+ name?: string;
+ bindKey?: string | {
+ mac?: string;
+ win?: string;
+ };
+ readOnly?: boolean;
+ exec?: (editor?: Editor | any, args?: any) => void;
+ isAvailable?: (editor: Editor) => boolean;
+ description?: string;
+ multiSelectAction?: "forEach" | "forEachLine" | Function;
+ scrollIntoView?: true | "cursor" | "center" | "selectionPart" | "animate" | "selection" | "none";
+ aceCommandGroup?: string;
+ passEvent?: boolean;
+ level?: number;
+ action?: string;
+ }
+ type CommandLike = Command | ((editor: Editor) => void) | ((sb: SearchBox) => void);
+ type KeyboardHandler = Partial & {
+ attach?: (editor: Editor) => void;
+ detach?: (editor: Editor) => void;
+ getStatusText?: (editor?: any, data?: any) => string;
+ };
+ export interface MarkerLike {
+ range?: Range;
+ type: string;
+ renderer?: MarkerRenderer;
+ clazz: string;
+ inFront?: boolean;
+ id?: number;
+ update?: (html: string[],
+ // TODO maybe define Marker class
+ marker: any, session: EditSession, config: any) => void;
+ [key: string]: any;
+ }
+ type MarkerRenderer = (html: string[], range: Range, left: number, top: number, config: any) => void;
+ interface Token {
+ type: string;
+ value: string;
+ index?: number;
+ start?: number;
+ }
+ type BaseCompletion = import("ace-code/src/autocomplete").BaseCompletion;
+ type SnippetCompletion = import("ace-code/src/autocomplete").SnippetCompletion;
+ type ValueCompletion = import("ace-code/src/autocomplete").ValueCompletion;
+ type Completion = import("ace-code/src/autocomplete").Completion;
+ type HighlightRule = ({
+ defaultToken: string;
+ } | {
+ include: string;
+ } | {
+ todo: string;
+ } | {
+ token: string | string[] | ((value: string) => string);
+ regex: string | RegExp;
+ next?: string | (() => void);
+ push?: string;
+ comment?: string;
+ caseInsensitive?: boolean;
+ nextState?: string;
+ }) & {
+ [key: string]: any;
+ };
+ type HighlightRulesMap = Record;
+ type KeywordMapper = (keyword: string) => string;
+ interface HighlightRules {
+ addRules(rules: HighlightRulesMap, prefix?: string): void;
+ getRules(): HighlightRulesMap;
+ embedRules(rules: (new () => HighlightRules) | HighlightRulesMap, prefix: string, escapeRules?: boolean, append?: boolean): void;
+ getEmbeds(): string[];
+ normalizeRules(): void;
+ createKeywordMapper(map: Record, defaultToken?: string, ignoreCase?: boolean, splitChar?: string): KeywordMapper;
+ }
+ type FoldWidget = "start" | "end" | "";
+ interface FoldMode {
+ foldingStartMarker: RegExp;
+ foldingStopMarker?: RegExp;
+ getFoldWidget(session: EditSession, foldStyle: string, row: number): FoldWidget;
+ getFoldWidgetRange(session: EditSession, foldStyle: string, row: number): Range | undefined;
+ indentationBlock(session: EditSession, row: number, column?: number): Range | undefined;
+ openingBracketBlock(session: EditSession, bracket: string, row: number, column: number, typeRe?: RegExp): Range | undefined;
+ closingBracketBlock(session: EditSession, bracket: string, row: number, column: number, typeRe?: RegExp): Range | undefined;
+ }
+ type BehaviorAction = (state: string | string[], action: string, editor: Editor, session: EditSession, text: string | Range) => ({
+ text: string;
+ selection: number[];
+ } | Range) & {
+ [key: string]: any;
+ } | undefined;
+ type BehaviorMap = Record>;
+ interface Behaviour {
+ add(name: string, action: string, callback: BehaviorAction): void;
+ addBehaviours(behaviours: BehaviorMap): void;
+ remove(name: string): void;
+ inherit(mode: SyntaxMode | (new () => SyntaxMode), filter: string[]): void;
+ getBehaviours(filter?: string[]): BehaviorMap;
+ }
+ interface Outdent {
+ checkOutdent(line: string, input: string): boolean;
+ autoOutdent(doc: Document, row: number): number | undefined;
+ }
+ interface SyntaxMode {
+ HighlightRules: {
+ new(config: any): HighlightRules;
+ }; //TODO: fix this
+ foldingRules?: FoldMode;
+ /**
+ * characters that indicate the start of a line comment
+ */
+ lineCommentStart?: string;
+ /**
+ * characters that indicate the start and end of a block comment
+ */
+ blockComment?: {
+ start: string;
+ end: string;
+ };
+ tokenRe?: RegExp;
+ nonTokenRe?: RegExp;
+ completionKeywords: string[];
+ transformAction: BehaviorAction;
+ path?: string;
+ getTokenizer(): Tokenizer;
+ toggleCommentLines(state: string | string[], session: EditSession, startRow: number, endRow: number): void;
+ toggleBlockComment(state: string | string[], session: EditSession, range: Range, cursor: Point): void;
+ getNextLineIndent(state: string | string[], line: string, tab: string): string;
+ checkOutdent(state: string | string[], line: string, input: string): boolean;
+ autoOutdent(state: string | string[], doc: EditSession, row: number): void;
+ // TODO implement WorkerClient types
+ createWorker(session: EditSession): any;
+ createModeDelegates(mapping: {
+ [key: string]: string;
+ }): void;
+ getKeywords(append?: boolean): Array;
+ getCompletions(state: string | string[], session: EditSession, pos: Point, prefix: string): Completion[];
+ }
+ interface OptionsBase {
+ [key: string]: any;
+ }
+ class OptionsProvider {
+ setOptions(optList: Partial): void;
+ getOptions(optionNames?: Array | Partial): Partial;
+ setOption(name: K, value: T[K]): void;
+ getOption(name: K): T[K];
+ }
+ type KeyBinding = import("ace-code/src/keyboard/keybinding").KeyBinding;
+ interface CommandMap {
+ [name: string]: Command;
+ }
+ type execEventHandler = (obj: {
+ editor: Editor;
+ command: Command;
+ args: any[];
+ }) => void;
+ interface CommandManagerEvents {
+ on(name: "exec", callback: execEventHandler): Function;
+ on(name: "afterExec", callback: execEventHandler): Function;
+ }
+ type CommandManager = import("ace-code/src/commands/command_manager").CommandManager;
+ interface SavedSelection {
+ start: Point;
+ end: Point;
+ isBackwards: boolean;
+ }
+ var Selection: {
+ new(session: EditSession): Selection;
+ };
+ interface TextInput {
+ resetSelection(): void;
+ setAriaOption(options?: {
+ activeDescendant: string;
+ role: string;
+ setLabel: any;
+ }): void;
+ }
+ type CompleterCallback = (error: any, completions: Completion[]) => void;
+ interface Completer {
+ identifierRegexps?: Array;
+ getCompletions(editor: Editor, session: EditSession, position: Point, prefix: string, callback: CompleterCallback): void;
+ getDocTooltip?(item: Completion): void | string | Completion;
+ onSeen?: (editor: Ace.Editor, completion: Completion) => void;
+ onInsert?: (editor: Ace.Editor, completion: Completion) => void;
+ cancel?(): void;
+ id?: string;
+ triggerCharacters?: string[];
+ hideInlinePreview?: boolean;
+ insertMatch?: (editor: Editor, data: Completion) => void;
+ }
+ interface CompletionOptions {
+ matches?: Completion[];
+ }
+ type CompletionProviderOptions = {
+ exactMatch?: boolean;
+ ignoreCaption?: boolean;
+ };
+ type GatherCompletionRecord = {
+ prefix: string;
+ matches: Completion[];
+ finished: boolean;
+ };
+ type CompletionCallbackFunction = (err: Error | undefined, data: GatherCompletionRecord) => void;
+ type CompletionProviderCallback = (this: import("ace-code/src/autocomplete").Autocomplete, err: Error | undefined, completions: import("ace-code/src/autocomplete").FilteredList, finished: boolean) => void;
+ type AcePopupNavigation = "up" | "down" | "start" | "end";
+ interface EditorMultiSelectProperties {
+ inMultiSelectMode?: boolean;
+ /**
+ * Updates the cursor and marker layers.
+ **/
+ updateSelectionMarkers: () => void;
+ /**
+ * Adds the selection and cursor.
+ * @param orientedRange A range containing a cursor
+ **/
+ addSelectionMarker: (orientedRange: Ace.Range & {
+ marker?: any;
+ }) => Ace.Range & {
+ marker?: any;
+ };
+ /**
+ * Removes the selection marker.
+ * @param range The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
+ **/
+ removeSelectionMarker: (range: Ace.Range & {
+ marker?: any;
+ }) => void;
+ removeSelectionMarkers: (ranges: (Ace.Range & {
+ marker?: any;
+ })[]) => void;
+ /**
+ * Executes a command for each selection range.
+ * @param cmd The command to execute
+ * @param [args] Any arguments for the command
+ **/
+ forEachSelection: (cmd: Object, args?: string, options?: Object) => void;
+ /**
+ * Removes all the selections except the last added one.
+ **/
+ exitMultiSelectMode: () => void;
+ getSelectedText: () => string;
+ /**
+ * Finds and selects all the occurrences of `needle`.
+ * @param needle The text to find
+ * @param options The search options
+ * @param additive keeps
+ * @returns {Number} The cumulative count of all found matches
+ **/
+ findAll: (needle?: string, options?: Partial, additive?: boolean) => number;
+ /**
+ * Adds a cursor above or below the active cursor.
+ * @param dir The direction of lines to select: -1 for up, 1 for down
+ * @param [skip] If `true`, removes the active selection range
+ */
+ selectMoreLines: (dir: number, skip?: boolean) => void;
+ /**
+ * Transposes the selected ranges.
+ * @param {Number} dir The direction to rotate selections
+ **/
+ transposeSelections: (dir: number) => void;
+ /**
+ * Finds the next occurrence of text in an active selection and adds it to the selections.
+ * @param {Number} dir The direction of lines to select: -1 for up, 1 for down
+ * @param {Boolean} [skip] If `true`, removes the active selection range
+ **/
+ selectMore: (dir: number, skip?: boolean, stopAtFirst?: boolean) => void;
+ /**
+ * Aligns the cursors or selected text.
+ **/
+ alignCursors: () => void;
+ multiSelect?: any;
+ }
+ interface CodeLenseProvider {
+ provideCodeLenses: (session: EditSession, callback: (err: any, payload: CodeLense[]) => void) => void;
+ }
+ interface CodeLense {
+ start: Point;
+ command: any;
+ }
+ interface CodeLenseEditorExtension {
+ codeLensProviders?: CodeLenseProvider[];
+ }
+ interface ElasticTabstopsEditorExtension {
+ elasticTabstops?: import("ace-code/src/ext/elastic_tabstops_lite").ElasticTabstopsLite;
+ }
+ interface TextareaEditorExtension {
+ setDisplaySettings?: (settings: any) => void;
+ }
+ interface PromptEditorExtension {
+ cmdLine?: Editor;
+ }
+ interface OptionsEditorExtension {
+ }
+ interface MultiSelectProperties {
+ ranges: Ace.Range[] | null;
+ rangeList: Ace.RangeList | null;
+ /**
+ * Adds a range to a selection by entering multiselect mode, if necessary.
+ * @param {Ace.Range} range The new range to add
+ * @param {Boolean} [$blockChangeEvents] Whether or not to block changing events
+ **/
+ addRange(range: Ace.Range, $blockChangeEvents?: boolean): any;
+ inMultiSelectMode: boolean;
+ toSingleRange(range?: Ace.Range): void;
+ /**
+ * Removes a Range containing pos (if it exists).
+ * @param {Ace.Point} pos The position to remove, as a `{row, column}` object
+ **/
+ substractPoint(pos: Ace.Point): any;
+ /**
+ * Merges overlapping ranges ensuring consistency after changes
+ **/
+ mergeOverlappingRanges(): void;
+ rangeCount: number;
+ /**
+ * Returns a concatenation of all the ranges.
+ **/
+ getAllRanges(): Ace.Range[];
+ /**
+ * Splits all the ranges into lines.
+ **/
+ splitIntoLines(): void;
+ joinSelections(): void;
+ toggleBlockSelection(): void;
+ /**
+ *
+ * Gets list of ranges composing rectangular block on the screen
+ *
+ * @param {Ace.ScreenCoordinates} screenCursor The cursor to use
+ * @param {Ace.ScreenCoordinates} screenAnchor The anchor to use
+ * @param {Boolean} [includeEmptyLines] If true, this includes ranges inside the block which are empty due to clipping
+ **/
+ rectangularRangeBlock(screenCursor: Ace.ScreenCoordinates, screenAnchor: Ace.ScreenCoordinates, includeEmptyLines?: boolean): Ace.Range[];
+ index?: number;
+ }
+ type AcePopupEventsCombined = Ace.EditorEvents & Ace.AcePopupEvents;
+ type AcePopupWithEditor = Ace.EventEmitter & Ace.Editor;
+ type InlineAutocompleteAction = "prev" | "next" | "first" | "last";
+ type TooltipCommandFunction = (editor: Ace.Editor) => T;
+ export interface TooltipCommand extends Ace.Command {
+ enabled?: TooltipCommandFunction | boolean;
+ getValue?: TooltipCommandFunction;
+ type: "button" | "text" | "checkbox";
+ iconCssClass?: string;
+ cssClass?: string;
+ }
+ export type CommandBarTooltip = import("ace-code/src/ext/command_bar").CommandBarTooltip;
+ export type TokenizeResult = Array>;
+ export interface StaticHighlightOptions {
+ mode?: string | SyntaxMode;
+ theme?: string | Theme;
+ trim?: boolean;
+ firstLineNumber?: number;
+ showGutter?: boolean;
+ }
+ }
+ export const config: typeof import("ace-code/src/config");
+ export function edit(el?: string | (HTMLElement & {
+ env?: any;
+ value?: any;
+ }) | null, options?: any): Editor;
+ export function createEditSession(text: import("ace-code/src/document").Document | string, mode?: import("ace-code").Ace.SyntaxMode): EditSession;
+ import { Editor } from "ace-code/src/editor";
+ import { EditSession } from "ace-code/src/edit_session";
+ import { Range } from "ace-code/src/range";
+ import { UndoManager } from "ace-code/src/undomanager";
+ import { VirtualRenderer as Renderer } from "ace-code/src/virtual_renderer";
+ export var version: "1.36.5";
+ export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer };
}
diff --git a/demo/test_package/index.ts b/demo/test_package/index.ts
new file mode 100644
index 00000000000..b1e62243572
--- /dev/null
+++ b/demo/test_package/index.ts
@@ -0,0 +1,114 @@
+import * as ace from "ace-code";
+import {Range} from "ace-code";
+import {Autocomplete} from "ace-code/src/autocomplete";
+import {beautify} from "ace-code/src/ext/beautify";
+import {registerCodeLensProvider, setLenses} from "ace-code/src/ext/code_lens";
+import {CommandBarTooltip} from "ace-code/src/ext/command_bar";
+import {ElasticTabstopsLite} from "ace-code/src/ext/elastic_tabstops_lite";
+import {MarkerGroup, MarkerGroupItem} from "ace-code/src/marker_group";
+import {HoverTooltip} from "ace-code/src/tooltip";
+import {hardWrap} from "ace-code/src/ext/hardwrap";
+import {SearchBox} from "ace-code/src/ext/searchbox";
+
+import("ace-code/src/ext/language_tools");
+import "../../src/test/mockdom.js";
+import {tokenize} from "ace-code/src/ext/simple_tokenizer";
+import {JavaScriptHighlightRules} from "ace-code/src/mode/javascript_highlight_rules";
+import {highlight} from "ace-code/src/ext/static_highlight";
+
+// TODO this does not work in node
+// import "ace-code/esm-resolver";
+import { config } from "ace-code";
+config.setLoader(async function(moduleName, cb) {
+ moduleName = moduleName.replace("ace/", "ace-code/src/")
+ let module = await import(moduleName);
+ cb(null, module);
+});
+
+const editor = ace.edit(null); // should not be an error
+editor.setTheme("ace/theme/monokai");
+editor.session.setMode("ace/mode/javascript");
+
+function configure(config: ace.Ace.Config) {
+ config.setDefaultValues("editor", {
+ fontSize: 14,
+ showPrintMargin: false,
+ })
+}
+
+configure(ace.config) // should not be a error
+
+Autocomplete.for(editor).getCompletionProvider() // should not be an error
+
+const markerGroup = new MarkerGroup(editor.session);
+const markers: MarkerGroupItem[] = [
+ {
+ range: new Range(0, 0, 10, 10),
+ className: "test-class"
+ }
+]
+markerGroup.setMarkers(markers);
+markerGroup.markers.every(marker => {
+ console.log(marker.range);
+ return true;
+});
+
+const hover = new HoverTooltip();
+hover.setDataProvider((e, editor) => {
+ const domNode = document.createElement("div");
+ hover.showForRange(editor, new Range(1, 3, 3, 1), domNode, e);
+});
+hover.addToEditor(editor);
+
+beautify(editor.session);
+
+registerCodeLensProvider(editor, {
+ provideCodeLenses: function (session, callback) {
+ const lenses = [{
+ start: {row: 2, column: 1},
+ command: {title: "2"}
+ }];
+ setTimeout(function () {
+ callback(null, [{
+ start: {row: 2, column: 1},
+ command: {title: "2"}
+ }]);
+
+ setLenses(session, lenses);
+ });
+ }
+});
+
+var commandBar = new CommandBarTooltip(editor.container);
+var command: ace.Ace.TooltipCommand = {
+ name: "test",
+ exec: function (editor: ace.Editor) {
+ alert(editor.getValue());
+ },
+ type: "checkbox"
+}
+commandBar.registerCommand("test", command);
+
+const elasticTabStopLite = new ElasticTabstopsLite(editor);
+elasticTabStopLite.processRows([1, 2, 4]);
+
+
+hardWrap(editor, {
+ startRow: 1,
+ endRow: 2,
+});
+
+
+const searchBox = new SearchBox(editor);
+
+searchBox.show("Test", true);
+
+tokenize("some content", new JavaScriptHighlightRules());
+highlight(editor.container, {
+ mode: "ace/mode/abap",
+ showGutter: true
+})
+
+setTimeout(function() {
+ editor.destroy();
+}, 20)
\ No newline at end of file
diff --git a/demo/test_package/package.json b/demo/test_package/package.json
new file mode 100644
index 00000000000..a0c3782e21c
--- /dev/null
+++ b/demo/test_package/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "ace-test-package",
+ "version": "1.0.0",
+ "description": "Test package for Ace",
+ "main": "index.js",
+ "scripts": {
+ "build": "tsc -p tsconfig.json",
+ "test": "node index.js"
+ },
+ "dependencies": {
+ "ace-code": "file:../../ace-code-latest.tgz"
+ },
+ "devDependencies": {
+ "typescript": "^5.6.2"
+ }
+}
diff --git a/demo/test_package/tsconfig.json b/demo/test_package/tsconfig.json
new file mode 100644
index 00000000000..1f23bf07327
--- /dev/null
+++ b/demo/test_package/tsconfig.json
@@ -0,0 +1,26 @@
+{
+ "compilerOptions": {
+ "strict": true,
+ "noImplicitAny": true,
+ "strictNullChecks": true,
+ "strictFunctionTypes": true,
+ "strictBindCallApply": true,
+ "strictPropertyInitialization": true,
+ "noImplicitThis": true,
+ "alwaysStrict": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true,
+ "noUncheckedIndexedAccess": true,
+ "noImplicitOverride": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "module": "commonjs",
+ "target": "es2020",
+ "moduleResolution": "node"
+ },
+ "include": ["*.ts"],
+ "exclude": ["node_modules"]
+}
diff --git a/package.json b/package.json
index 26fe8060271..ca6d03ad47d 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
"eslint": "^8.20.0",
"istanbul": "^0.4.5",
"standard-version": "^9.3.2",
- "typescript": "^5.2.2"
+ "typescript": "^5.6.3"
},
"mappings": {
"ace": "."
@@ -32,7 +32,7 @@
"styles",
"ace.d.ts",
"ace-modes.d.ts",
- "ace-extensions.d.ts",
+ "types",
"esm-resolver.js",
"translations",
"!**/*_test.js",
@@ -45,9 +45,9 @@
"lint": "eslint \"src/**/*.js\" \"*.js\"",
"fix": "npm run lint -- --fix",
"typecheck": "tsc -p tsconfig.json",
- "update-types": "node ./tool/modes-declaration-generator.js",
+ "update-types": "node ./tool/ace_declaration_generator.js",
"changelog": "standard-version",
- "prepack": "node tool/esm_resolver_generator.js && node Makefile.dryice.js css --target build-styles && rm -rf styles && mv build-styles/css styles"
+ "prepack": "node tool/esm_resolver_generator.js && node tool/ace_declaration_generator.js && node Makefile.dryice.js css --target build-styles && rm -rf styles && mv build-styles/css styles"
},
"standard-version": {
"skip": {
diff --git a/src/autocomplete.js b/src/autocomplete.js
index a46dfc3704b..75a96e2f527 100644
--- a/src/autocomplete.js
+++ b/src/autocomplete.js
@@ -39,14 +39,14 @@ var preventParentScroll = require("./lib/scroll").preventParentScroll;
/**
* @typedef {BaseCompletion & {snippet: string}} SnippetCompletion
- * @property {string} snippet
+ * @property {string} snippet
* @property {string} [value]
* @export
*/
/**
* @typedef {BaseCompletion & {value: string}} ValueCompletion
- * @property {string} value
+ * @property {string} value
* @property {string} [snippet]
* @export
*/
@@ -83,7 +83,7 @@ class Autocomplete {
/**
* @property {Boolean} showLoadingState - A boolean indicating whether the loading states of the Autocompletion should be shown to the end-user. If enabled
* it shows a loading indicator on the popup while autocomplete is loading.
- *
+ *
* Experimental: This visualisation is not yet considered stable and might change in the future.
*/
this.showLoadingState = false;
@@ -130,7 +130,7 @@ class Autocomplete {
$init() {
/**@type {AcePopup}**/
- this.popup = new AcePopup(this.parentNode || document.body || document.documentElement);
+ this.popup = new AcePopup(this.parentNode || document.body || document.documentElement);
this.popup.on("click", function(e) {
this.insertMatch();
e.stop();
@@ -306,7 +306,7 @@ class Autocomplete {
if (this.popup.tryShow(pos, lineHeight, "top")) {
return;
}
-
+
this.popup.show(pos, lineHeight);
}
@@ -339,17 +339,17 @@ class Autocomplete {
}
editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
-
+
var newRow;
if (this.stickySelection)
- newRow = this.popup.data.indexOf(previousSelectedItem);
- if (!newRow || newRow === -1)
+ newRow = this.popup.data.indexOf(previousSelectedItem);
+ if (!newRow || newRow === -1)
newRow = 0;
-
+
this.popup.setRow(this.autoSelect ? newRow : -1);
-
+
// If we stay on the same row, but the content is different, we want to update the popup.
- if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow])
+ if (newRow === oldRow && previousSelectedItem !== this.completions.filtered[newRow])
this.$onPopupChange();
// If we stay on the same line and have inlinePreview enabled, we want to make sure the
@@ -472,7 +472,7 @@ class Autocomplete {
this.detach();
return result;
}
-
+
/**
* This is the entry point for the autocompletion class, triggers the actions which collect and display suggestions
* @param {Editor} editor
@@ -539,7 +539,7 @@ class Autocomplete {
this.openPopup(this.editor, prefix, keepPopupPosition);
return;
}
-
+
if (options && options.matches) {
var pos = this.editor.getSelectionRange().start;
this.base = this.editor.session.doc.createAnchor(pos.row, pos.column);
@@ -602,7 +602,7 @@ class Autocomplete {
}
// If showLoadingState is true and there is still a completer loading, show 'Loading...'
// in the top row of the completer popup.
- this.completions = !finished && this.showLoadingState ?
+ this.completions = !finished && this.showLoadingState ?
new FilteredList(
Autocomplete.completionsForLoading.concat(filtered), completions.filterText
) :
@@ -630,7 +630,7 @@ class Autocomplete {
var doc = null;
if (!selected || !this.editor || !this.popup.isOpen)
return this.hideDocTooltip();
-
+
var completersLength = this.editor.completers.length;
for (var i = 0; i < completersLength; i++) {
var completer = this.editor.completers[i];
@@ -819,7 +819,7 @@ Autocomplete.startCommand = {
* This class is responsible for providing completions and inserting them to the editor
*/
class CompletionProvider {
-
+
/**
* @param {{pos: Position, prefix: string}} [initialPosition]
@@ -859,7 +859,7 @@ class CompletionProvider {
// TODO add support for options.deleteSuffix
if (!this.completions)
return false;
-
+
var replaceBefore = this.completions.filterText.length;
var replaceAfter = 0;
if (data.range && data.range.start.row === data.range.end.row) {
@@ -882,7 +882,7 @@ class CompletionProvider {
editor.session.remove(range);
}
}
-
+
if (data.snippet) {
snippetManager.insertSnippet(editor, data.snippet);
}
@@ -892,7 +892,7 @@ class CompletionProvider {
if (data.completer && data.completer.onInsert && typeof data.completer.onInsert == "function") {
data.completer.onInsert(editor, data);
}
-
+
if (data.command && data.command === "startAutocomplete") {
editor.execCommand(data.command);
}
@@ -917,9 +917,9 @@ class CompletionProvider {
gatherCompletions(editor, callback) {
var session = editor.getSession();
var pos = editor.getCursorPosition();
-
+
var prefix = util.getCompletionPrefix(editor);
-
+
var matches = [];
this.completers = editor.completers;
var total = editor.completers.length;
@@ -993,7 +993,7 @@ class CompletionProvider {
processResults(results);
}.bind(this));
-
+
isImmediate = false;
if (immediateResults) {
var results = immediateResults;
@@ -1020,7 +1020,7 @@ class FilteredList {
this.exactMatch = false;
this.ignoreCaption = false;
}
-
+
setFilter(str) {
if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)
var matches = this.filtered;
@@ -1030,7 +1030,7 @@ class FilteredList {
this.filterText = str;
matches = this.filterCompletions(matches, this.filterText);
matches = matches.sort(function(a, b) {
- return b.exactMatch - a.exactMatch || b.$score - a.$score
+ return b.exactMatch - a.exactMatch || b.$score - a.$score
|| (a.caption || a.value).localeCompare(b.caption || b.value);
});
@@ -1045,7 +1045,7 @@ class FilteredList {
this.filtered = matches;
}
-
+
filterCompletions(items, needle) {
var results = [];
var upper = needle.toUpperCase();
diff --git a/src/autocomplete_test.js b/src/autocomplete_test.js
index b48ec080b21..c9a5f5e0f83 100644
--- a/src/autocomplete_test.js
+++ b/src/autocomplete_test.js
@@ -12,6 +12,7 @@ var user = require("./test/user");
var Range = require("./range").Range;
require("./ext/language_tools");
var Autocomplete = require("./autocomplete").Autocomplete;
+var config = require("./config");
var MouseEvent = function(type, opts){
var e = document.createEvent("MouseEvents");
@@ -1542,6 +1543,13 @@ module.exports = {
// Popup should be closed now
assert.equal(completer.popup.isOpen, false);
+ },
+ "test: should set create shared Autocomplete with sharedPopups on": function() {
+ assert.equal(Autocomplete.$sharedInstance == undefined, true);
+ config.set("sharedPopups", true);
+ var editor = initEditor("");
+ var completer = Autocomplete.for(editor);
+ assert.equal(Autocomplete.$sharedInstance == undefined, false);
}
};
diff --git a/src/config.js b/src/config.js
index a3e621980c0..a00a27ff614 100644
--- a/src/config.js
+++ b/src/config.js
@@ -1,4 +1,5 @@
"no use strict";
+
var lang = require("./lib/lang");
var net = require("./lib/net");
var dom = require("./lib/dom");
@@ -103,6 +104,8 @@ var loader = function(moduleName, cb) {
console.error("loader is not configured");
};
var customLoader;
+
+/** @arg {(name: string, callback: (error: any, module: any) => void) => void} cb */
exports.setLoader = function(cb) {
customLoader = cb;
};
diff --git a/src/document.js b/src/document.js
index 0d8d243f107..8501e1027fc 100644
--- a/src/document.js
+++ b/src/document.js
@@ -95,7 +95,7 @@ class Document {
/**
* [Sets the new line mode.]{: #Document.setNewLineMode.desc}
- * @param {NewLineMode} newLineMode [The newline mode to use; can be either `windows`, `unix`, or `auto`]{: #Document.setNewLineMode.param}
+ * @param {NewLineMode} newLineMode [The newline mode to use; can be either `windows`, `unix`, or `auto`]
**/
setNewLineMode(newLineMode) {
@@ -107,7 +107,7 @@ class Document {
}
/**
- * [Returns the type of newlines being used; either `windows`, `unix`, or `auto`]{: #Document.getNewLineMode}
+ * Returns the type of newlines being used; either `windows`, `unix`, or `auto`
* @returns {NewLineMode}
**/
getNewLineMode() {
diff --git a/src/edit_session.js b/src/edit_session.js
index f9717aa4779..f7364e0c4be 100644
--- a/src/edit_session.js
+++ b/src/edit_session.js
@@ -1199,7 +1199,7 @@ class EditSession {
/**
* Reverts previous changes to your document.
* @param {Delta[]} deltas An array of previous changes
- * @param {Boolean} [dontSelect] [If `true`, doesn't select the range of where the change occured]{: #dontSelect}
+ * @param {Boolean} [dontSelect] If `true`, doesn't select the range of where the change occured
**/
undoChanges(deltas, dontSelect) {
if (!deltas.length)
diff --git a/src/ext/prompt.js b/src/ext/prompt.js
index 620fb8c9e69..9dc7e46e36f 100644
--- a/src/ext/prompt.js
+++ b/src/ext/prompt.js
@@ -21,7 +21,7 @@ var openPrompt;
* @typedef PromptOptions
* @property {String} name Prompt name.
* @property {String} $type Use prompt of specific type (gotoLine|commands|modes or default if empty).
- * @property {[start: number, end: number]} selection Defines which part of the predefined value should be highlited.
+ * @property {[number, number]} selection Defines which part of the predefined value should be highlighted.
* @property {Boolean} hasDescription Set to true if prompt has description below input box.
* @property {String} prompt Description below input box.
* @property {String} placeholder Placeholder for value.
diff --git a/src/keyboard/hash_handler.js b/src/keyboard/hash_handler.js
index d445f5f2924..fb9eca6afdb 100644
--- a/src/keyboard/hash_handler.js
+++ b/src/keyboard/hash_handler.js
@@ -167,7 +167,7 @@ class MultiHashHandler {
}
/**
- * @param {Record} commands
+ * @param {Record} commands
*/
removeCommands(commands) {
Object.keys(commands).forEach(function(name) {
@@ -176,7 +176,7 @@ class MultiHashHandler {
}
/**
- * @param {Record} keyList
+ * @param {Record} keyList
*/
bindKeys(keyList) {
Object.keys(keyList).forEach(function(key) {
@@ -230,7 +230,7 @@ class MultiHashHandler {
}
/**
- * @param {{ $keyChain: string | any[]; }} data
+ * @param {any} data
* @param {number} hashId
* @param {string} keyString
* @param {number} keyCode
diff --git a/src/lib/dom.js b/src/lib/dom.js
index 6a53ef8ae11..8ed64b6dd21 100644
--- a/src/lib/dom.js
+++ b/src/lib/dom.js
@@ -230,6 +230,11 @@ function insertPendingStyles() {
});
}
+/**
+ * @param {string} cssText
+ * @param {string} [id]
+ * @param {any} [target]
+ */
function importCssString(cssText, id, target) {
if (typeof document == "undefined")
return;
diff --git a/src/lib/event.js b/src/lib/event.js
index 6025acfc17a..95e250f4cf3 100644
--- a/src/lib/event.js
+++ b/src/lib/event.js
@@ -35,7 +35,15 @@ EventListener.prototype.destroy = function() {
this.elem = this.type = this.callback = undefined;
};
-var addListener = exports.addListener = function(elem, type, callback, /**@type{any?}*/destroyer) {
+/**
+ * Adds an event listener to the specified element.
+ *
+ * @param {any} elem - The element to add the event listener to.
+ * @param {string} type - The type of event to listen for.
+ * @param {any} callback - The callback function to be executed when the event is triggered.
+ * @param {any} [destroyer] - An optional object that will have the created EventListener instance added to its $toDestroy array, allowing it to be easily destroyed later.
+ */
+var addListener = exports.addListener = function(elem, type, callback, destroyer) {
elem.addEventListener(type, callback, getListenerOptions());
if (destroyer)
destroyer.$toDestroy.push(new EventListener(elem, type, callback));
diff --git a/src/lib/lang.js b/src/lib/lang.js
index 857f1525839..9cd2d58b67d 100644
--- a/src/lib/lang.js
+++ b/src/lib/lang.js
@@ -143,19 +143,25 @@ exports.deferredCall = function(fcn) {
return deferred;
};
-
+/**
+ * @param {number} [defaultTimeout]
+ */
exports.delayedCall = function(fcn, defaultTimeout) {
var timer = null;
var callback = function() {
timer = null;
fcn();
};
-
+ /**
+ * @param {number} [timeout]
+ */
var _self = function(timeout) {
if (timer == null)
timer = setTimeout(callback, timeout || defaultTimeout);
};
-
+ /**
+ * @param {number} [timeout]
+ */
_self.delay = function(timeout) {
timer && clearTimeout(timer);
timer = setTimeout(callback, timeout || defaultTimeout);
diff --git a/src/mode/behaviour/css.js b/src/mode/behaviour/css.js
index 2f05f7919d8..39da652cc38 100644
--- a/src/mode/behaviour/css.js
+++ b/src/mode/behaviour/css.js
@@ -1,5 +1,4 @@
"use strict";
-
var oop = require("../../lib/oop");
var Behaviour = require("../behaviour").Behaviour;
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
diff --git a/tool/ace_declaration_generator.js b/tool/ace_declaration_generator.js
new file mode 100644
index 00000000000..40b4b8bd44d
--- /dev/null
+++ b/tool/ace_declaration_generator.js
@@ -0,0 +1,662 @@
+const ts = require('typescript');
+const fs = require("fs");
+const path = require("path");
+
+const SEPARATE_MODULES = ["ext", "theme", "snippets", "lib"]; // adjust this list for more granularity
+
+const AUTO_GENERATED_HEADER = "/* This file is generated using `npm run update-types` */\n\n";
+
+const defaultFormatCodeSettings = {
+ baseIndentSize: 0,
+ indentSize: 4,
+ tabSize: 4,
+ indentStyle: ts.IndentStyle.Smart,
+ newLineCharacter: "\n",
+ convertTabsToSpaces: true,
+ insertSpaceAfterCommaDelimiter: true,
+ insertSpaceAfterSemicolonInForStatements: true,
+ insertSpaceBeforeAndAfterBinaryOperators: true,
+ insertSpaceAfterConstructor: false,
+ insertSpaceAfterKeywordsInControlFlowStatements: true,
+ insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
+ insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true,
+ insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
+ insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
+ insertSpaceAfterTypeAssertion: false,
+ insertSpaceBeforeFunctionParenthesis: false,
+ placeOpenBraceOnNewLineForFunctions: false,
+ placeOpenBraceOnNewLineForControlBlocks: false,
+ insertSpaceBeforeTypeAnnotation: false
+};
+
+/**
+ * @param {string} directoryPath
+ */
+function getParsedConfigFromDirectory(directoryPath) {
+ const configPath = ts.findConfigFile(directoryPath, ts.sys.fileExists, 'tsconfig.json');
+ if (!configPath) throw new Error("Could not find tsconfig.json");
+
+ const configFile = ts.readConfigFile(configPath, ts.sys.readFile);
+ const parseConfigHost = {
+ fileExists: ts.sys.fileExists,
+ readFile: ts.sys.readFile,
+ readDirectory: ts.sys.readDirectory,
+ useCaseSensitiveFileNames: true
+ };
+ configFile.config.compilerOptions.noEmit = false;
+ configFile.config.compilerOptions.emitDeclarationOnly = true;
+ configFile.config.compilerOptions.outFile = "./types/index.d.ts";
+
+ return ts.parseJsonConfigFileContent(configFile.config, parseConfigHost, directoryPath);
+}
+
+/**
+ * @return {string}
+ */
+function generateInitialDeclaration(excludeDir) {
+ const baseDirectory = path.resolve(__dirname, '..');
+ const parsedConfig = getParsedConfigFromDirectory(baseDirectory);
+ const defaultCompilerHost = ts.createCompilerHost({});
+ let fileContent;
+
+ const customCompilerHost = {
+ ...defaultCompilerHost,
+ writeFile: function (fileName, content) {
+ fileContent = content;
+ return;
+ },
+ getSourceFile: function (fileName, languageVersion, onError, shouldCreateNewSourceFile) {
+ if (fileName.includes(excludeDir)) {
+ return undefined;
+ }
+ return defaultCompilerHost.getSourceFile(fileName, languageVersion, onError, shouldCreateNewSourceFile);
+ }
+ };
+
+ const program = ts.createProgram(parsedConfig.fileNames, parsedConfig.options, customCompilerHost);
+ program.emit();
+ return fileContent;
+}
+
+/**
+ * Creates a custom TypeScript compiler host that uses the provided source file content instead of reading from the file system.
+ * @param {string} fileName - The name of the source file.
+ * @param {string} content - The content of the source file.
+ * @returns {ts.CompilerHost} - A custom compiler host that uses the provided source file content.
+ */
+function createCustomCompilerHost(fileName, content) {
+ const newSourceFile = ts.createSourceFile(fileName, content, ts.ScriptTarget.Latest, false, ts.ScriptKind.TS);
+
+ const defaultCompilerHost = ts.createCompilerHost({});
+ return {
+ ...defaultCompilerHost,
+ getSourceFile: (name, languageVersion) => {
+ if (name === fileName) {
+ return newSourceFile;
+ }
+ return defaultCompilerHost.getSourceFile(name, languageVersion);
+ },
+ fileExists: (name) => {
+ if (name === fileName) {
+ return true;
+ }
+ return defaultCompilerHost.fileExists(name);
+ },
+ readFile: (name) => {
+ if (name === fileName) {
+ return content;
+ }
+ return defaultCompilerHost.readFile(name);
+ }
+ };
+}
+
+function updateMainAceModule(node) {
+ if (node.body && ts.isModuleBlock(node.body)) {
+ const updatedStatements = node.body.statements.map(statement => {
+ //create type alias for config
+ if (ts.isVariableStatement(statement) && statement.declarationList.declarations[0]?.name?.text
+ === "config") {
+
+ const originalDeclaration = statement.declarationList.declarations[0];
+
+ const importTypeNode = ts.factory.createImportTypeNode(
+ ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral('ace-code/src/config')), undefined,
+ undefined, false
+ );
+
+ const typeOfImportTypeNode = ts.factory.createTypeOperatorNode(
+ ts.SyntaxKind.TypeOfKeyword, importTypeNode);
+
+ return ts.factory.updateVariableStatement(statement, statement.modifiers,
+ ts.factory.updateVariableDeclarationList(statement.declarationList, [
+ ts.factory.updateVariableDeclaration(originalDeclaration, originalDeclaration.name,
+ originalDeclaration.exclamationToken, typeOfImportTypeNode, undefined
+ )
+ ])
+ );
+ }
+ return statement;
+ });
+
+ return ts.factory.updateModuleDeclaration(node, node.modifiers, node.name,
+ ts.factory.createModuleBlock(updatedStatements)
+ );
+ }
+}
+
+/**
+ * Updates the module declaration for the "keys" and "linking" modules by adding the corresponding internal statements
+ * to support mixins (EventEmitter, OptionsProvider, etc.).
+ *
+ * @param {ts.ModuleDeclaration} node - The module declaration node to update.
+ * @param {Object} internalStatements - An object containing the internal statements to add to the module.
+ * @returns {ts.ModuleDeclaration} - The updated module declaration.
+ */
+function updateKeysAndLinksStatements(node, internalStatements) {
+ let statements = [];
+ if (internalStatements[node.name.text]) {
+ statements = internalStatements[node.name.text];
+ }
+ const newBody = ts.factory.createModuleBlock(statements);
+ return ts.factory.updateModuleDeclaration(node, node.modifiers, node.name, newBody);
+}
+
+/**
+ * Updates a module declaration by adding internal statements to support mixins (EventEmitter, OptionsProvider, etc.).
+ *
+ * @param {ts.ModuleDeclaration} node - The module declaration node to update.
+ * @param {Object} internalStatements - An object containing the internal statements to add to the module.
+ * @returns {ts.ModuleDeclaration} - The updated module declaration.
+ */
+function updateModuleWithInternalStatements(node, internalStatements) {
+ const newBody = ts.factory.createModuleBlock(
+ node.body.statements.concat(internalStatements[node.name.text]).filter(statement => {
+ if (node.name.text.endsWith("autocomplete")) {
+ return !(ts.isModuleDeclaration(statement) && statement.name.text === 'Autocomplete');
+ }
+ return true;
+ }));
+ return ts.factory.updateModuleDeclaration(node, node.modifiers, node.name, newBody);
+}
+
+/**
+ * Fixes interfaces with empty extends clauses by either removing the entire interface declaration if it has no members,
+ * or by removing the empty extends clause.
+ *
+ * @param {ts.InterfaceDeclaration} node - The interface declaration node to fix.
+ * @param {ts.TransformationContext} context - The transformation context.
+ * @returns {ts.InterfaceDeclaration} - The updated interface declaration.
+ */
+function fixWrongInterfaces(node, context) {
+ for (const clause of node.heritageClauses) {
+ if (clause.token === ts.SyntaxKind.ExtendsKeyword && clause.types.length === 0) {
+ if (node.members.length === 0) {
+ return; // remove entire interface declaration
+ }
+ // Remove the extends clause if it's empty
+ return context.factory.updateInterfaceDeclaration(node, node.modifiers, node.name, node.typeParameters, [],
+ node.members
+ );
+ }
+ }
+ return node;
+}
+
+/**
+ * Fixes heritage clauses in class declarations by removing any inheritance from undefined types.
+ *
+ * @param {ts.ClassDeclaration} node - The class declaration node to fix.
+ * @param {ts.TransformationContext} context - The transformation context.
+ * @param {ts.TypeChecker} checker - The TypeScript type checker.
+ * @returns {ts.ClassDeclaration} - The updated class declaration with fixed heritage clauses.
+ */
+function fixWrongHeritageClauses(node, context, checker) {
+ let updatedHeritageClauses = [];
+ // remove inheritances from undefined types
+ for (let i = 0; i < node.heritageClauses.length; i++) {
+ let clause = node.heritageClauses[i];
+ if (clause.token === ts.SyntaxKind.ExtendsKeyword) {
+ const updatedTypes = clause.types.filter(type => {
+ const symbol = checker.getSymbolAtLocation(type.expression);
+ if (symbol) {
+ const declaredType = checker.getDeclaredTypeOfSymbol(symbol);
+
+ return declaredType.flags !== ts.TypeFlags.Undefined && declaredType["intrinsicName"] !== "error";
+ }
+ return true; // keep the type if the symbol can't be resolved
+ });
+ if (updatedTypes.length === 0) {
+ continue;
+ }
+ var updatedHeritageClause = clause;
+ if (updatedTypes.length !== clause.types.length) {
+ updatedHeritageClause = context.factory.createHeritageClause(
+ ts.SyntaxKind.ExtendsKeyword, updatedTypes);
+ }
+ }
+ if (updatedHeritageClause) {
+ updatedHeritageClauses.push(updatedHeritageClause);
+ }
+ else {
+ updatedHeritageClauses.push(clause);
+ }
+ }
+ return context.factory.updateClassDeclaration(node, node.modifiers, node.name, node.typeParameters,
+ updatedHeritageClauses, node.members
+ );
+}
+
+/**
+ * @param {string} content
+ * @param {string} aceNamespacePath
+ */
+function fixDeclaration(content, aceNamespacePath) {
+ const temporaryName = "temp.d.ts";
+ const customCompilerHost = createCustomCompilerHost(temporaryName, content);
+ const program = ts.createProgram([temporaryName], {
+ noEmit: true
+ }, customCompilerHost);
+
+ var checker = program.getTypeChecker();
+ let internalStatements = collectStatements(aceNamespacePath);
+ const finalDeclarations = [];
+
+ /**
+ * Transforms the source file by updating certain module declarations and interface/class heritage clauses.
+ *
+ * @param {ts.TransformationContext} context - The transformation context.
+ * @returns {function(ts.SourceFile): ts.SourceFile} - A function that transforms the source file.
+ */
+ function transformer(context) {
+ return (sourceFile) => {
+ function visit(node) {
+ let updatedNode = node;
+ // Update module declarations for certain module names
+ if (ts.isModuleDeclaration(node) && ts.isStringLiteral(node.name)) {
+ if (node.name.text === "ace-code") {
+ return updateMainAceModule(node);
+ } else if (node.name.text.endsWith("lib/keys") || node.name.text.endsWith("linking")) {
+ updatedNode = updateKeysAndLinksStatements(node, internalStatements);
+ } else if (internalStatements[node.name.text]) {
+ updatedNode = updateModuleWithInternalStatements(node, internalStatements);
+ } else if (node.name.text.endsWith("static_highlight")) {
+ if (node.body && ts.isModuleBlock(node.body)) {
+ const newBody = ts.factory.createModuleBlock(node.body.statements.filter(statement => {
+ return !ts.isExportAssignment(statement);
+ }));
+ updatedNode = ts.factory.updateModuleDeclaration(node, node.modifiers, node.name, newBody);
+ }
+ }
+ }
+ // Fix wrong interface and class heritage clauses
+ else if (ts.isInterfaceDeclaration(node) && node.heritageClauses) {
+ return fixWrongInterfaces(node, context);
+ } else if (ts.isClassDeclaration(node) && node.heritageClauses) {
+ return fixWrongHeritageClauses(node, context, checker);
+ }
+ return ts.visitEachChild(updatedNode, visit, context);
+ };
+
+ return ts.visitNode(sourceFile, visit);
+ };
+ }
+
+ function pathBasedTransformer(context) {
+ return (sourceFile) => {
+ const moduleOutputs = {};
+
+ function visit(node) {
+ if (ts.isModuleDeclaration(node) && ts.isStringLiteral(node.name)) {
+ let pathKey = 'modules';
+ if (node.name.text === "ace-code") {
+ pathKey = "ace";
+ if (!moduleOutputs[pathKey]) {
+ moduleOutputs[pathKey] = [];
+ } //TODO:
+ moduleOutputs[pathKey].push(node);
+ }
+ else {
+ SEPARATE_MODULES.some(module => {
+ if (node.name.text.includes("/" + module + "/")) {
+ pathKey = module;
+ return true;
+ }
+ });
+ if (!moduleOutputs[pathKey]) {
+ moduleOutputs[pathKey] = [];
+ }
+ moduleOutputs[pathKey].push(node);
+ }
+
+ return node;
+ }
+ return ts.visitEachChild(node, visit, context);
+ }
+
+ ts.visitNode(sourceFile, visit);
+
+ // Generate new source files for each module path
+ let modules = Object.keys(moduleOutputs);
+
+ modules.forEach(key => {
+ const newSourceFile = context.factory.updateSourceFile(sourceFile, moduleOutputs[key]);
+ const dirPath = path.dirname(aceNamespacePath.replace("ace-internal", "ace"));
+ if (!fs.existsSync(dirPath)) {
+ fs.mkdirSync(dirPath);
+ }
+ const outputName = key === "ace" ? `${dirPath}/ace.d.ts` : `${dirPath}/types/ace-${key}.d.ts`;
+ finalDeclarations.push(outputName);
+
+ const printer = ts.createPrinter({newLine: ts.NewLineKind.LineFeed}, {
+ substituteNode(hint, node) {
+ if (ts.isModuleDeclaration(node) && ts.isStringLiteral(node.name) && node.name.text === "ace-code/src/ext/textarea") {
+ return ts.factory.createNotEmittedStatement(node);
+ } else
+ // remove all private members
+ if (ts.isMethodDeclaration(node) || ts.isMethodSignature(node) || ts.isPropertyDeclaration(node)
+ || ts.isPropertySignature(node)) {
+ const isPrivate = node.modifiers?.some(
+ modifier => modifier.kind === ts.SyntaxKind.PrivateKeyword);
+
+ const startsWithDollar = ts.isIdentifier(node.name) && /^[$_]/.test(node.name.text);
+
+ if (isPrivate || startsWithDollar || hasInternalTag(node)) {
+ return ts.factory.createNotEmittedStatement(node);
+ }
+ }
+ else if (ts.isVariableStatement(node)) {
+ if (node.text && node.getText().indexOf("export const $") > -1) {
+ return ts.factory.createNotEmittedStatement(node);
+ }
+ // Remove variable statements like 'const {any_identifier}_base: undefined;'
+ const declarations = node.declarationList.declarations;
+
+ // Filter out declarations that match the pattern
+ const filteredDeclarations = declarations.filter(declaration => {
+ if (ts.isIdentifier(declaration.name) && /_base\w*$/.test(declaration.name.text)
+ && /:\s*undefined$/.test(declaration.getText())) {
+ return false;
+ }
+ return true;
+ });
+
+ if (filteredDeclarations.length === 0) {
+ return ts.factory.createNotEmittedStatement(node);
+ }
+ else if (filteredDeclarations.length < declarations.length) {
+ return ts.factory.updateVariableStatement(node, node.modifiers,
+ ts.factory.updateVariableDeclarationList(node.declarationList, filteredDeclarations)
+ );
+ }
+ }
+ //remove empty exports
+ else if (ts.isExportDeclaration(node) && /export\s*{\s*}/.test(node.getText())) {
+ return ts.factory.createNotEmittedStatement(node);
+ }
+ }
+ });
+ let output = printer.printFile(newSourceFile);
+ if (key === "ace") {
+ let referencePaths = modules.filter((el) => el != "ace").map((el) => {
+ return `/// `;
+ });
+ let allReferences = referencePaths.join("\n") + "\n/// \n";
+ output = allReferences + output;
+ }
+ output = correctImportStatements(output);
+ output = cleanComments(output);
+ output = formatDts(outputName, output);
+ output = AUTO_GENERATED_HEADER + output;
+ fs.writeFileSync(outputName, output);
+ });
+
+ return sourceFile;
+ };
+ }
+
+ const sourceCode = program.getSourceFile(temporaryName);
+ const result = ts.transform(sourceCode, [transformer, pathBasedTransformer]);
+
+ result.dispose();
+
+ checkFinalDeclaration(finalDeclarations);
+}
+
+/**
+ * Corrects the import statements in the provided text by replacing the old-style
+ * `require()` imports with modern ES6 `import` statements.
+ */
+function correctImportStatements(text) {
+ text = text.replace(
+ /import\s*\w+_\d+\s*=\s*require\(([\w\/"-]+)\);?.\s*import\s*(\w+)\s*=\s*\w+_\d+\.(\w+);?/gs,
+ (match, path, importName, exportName) => {
+ if (importName !== exportName) {
+ return `import {${exportName} as ${importName}} from ${path};`;
+ }
+ return `import {${exportName}} from ${path};`;
+ }
+ );
+ return text;
+}
+
+function cleanComments(text) {
+ text = text.replace(/^\s*\*\s*@(param|template|returns?|this|typedef)\s*({.+})?(\s*\[?[$\w]+\]?)?\s*$/gm, '');
+ text = text.replace(/@type\s*({.+})/g, '');
+ text = text.replace(/\/\*(\s|\*)*\*\//g, '');
+ text = text.replace(/^\s*[\r\n]/gm, '');
+
+ return text;
+}
+
+function hasInternalTag(node) {
+ const sourceFile = node.getSourceFile();
+ if (!sourceFile) return false;
+
+ const jsDocs = ts.getJSDocTags(node).filter(tag => tag.tagName.text === 'internal');
+ return jsDocs.length > 0;
+}
+
+function createMinimalLanguageServiceHost() {
+ return {
+ files: {},
+ addFile(fileName, text) {
+ this.files[fileName] = ts.ScriptSnapshot.fromString(text);
+ },
+ "getCompilationSettings": function () {
+ return ts.getDefaultCompilerOptions();
+ },
+ "getScriptFileNames": function () {
+ return Object.keys(this.files);
+ },
+ "getScriptVersion": function (_fileName) {
+ return "0";
+ },
+ "getScriptSnapshot": function (fileName) {
+ return this.files[fileName];
+ },
+ "getCurrentDirectory": function () {
+ return "";
+ }
+ };
+
+}
+
+function formatDts(filename, text) {
+ var host = createMinimalLanguageServiceHost();
+ host.addFile(filename, text);
+ const languageService = ts.createLanguageService(host);
+ let formatEdits = languageService.getFormattingEditsForDocument(filename, defaultFormatCodeSettings);
+ formatEdits
+ .sort((a, b) => a.span.start - b.span.start)
+ .reverse()
+ .forEach(edit => {
+ const head = text.slice(0, edit.span.start);
+ const tail = text.slice(edit.span.start + edit.span.length);
+ text = `${head}${edit.newText}${tail}`;
+ });
+ return text;
+}
+
+
+/**
+ * @param {string[]} declarationNames
+ */
+function checkFinalDeclaration(declarationNames) {
+ const program = ts.createProgram(declarationNames, {
+ noEmit: true,
+ target: ts.ScriptTarget.ES2019,
+ lib: ["lib.es2019.d.ts", "lib.dom.d.ts"]
+ });
+ const diagnostics = ts.getPreEmitDiagnostics(program);
+
+ diagnostics.forEach(diagnostic => {
+ if (diagnostic.file) {
+ const {
+ line,
+ character
+ } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start);
+ const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
+ console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
+ }
+ else {
+ console.log(ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'));
+ }
+ });
+}
+
+/**
+ * Collect statements (interfaces and function declarations) from the ace-internal.
+ * @param {string} aceNamespacePath
+ */
+function collectStatements(aceNamespacePath) {
+ const program = ts.createProgram([aceNamespacePath], {
+ noEmit: true
+ });
+ const sourceFile = program.getSourceFile(aceNamespacePath);
+ const result = {};
+ const printer = ts.createPrinter();
+ let packageName = "ace-code";
+
+ function visit(node) {
+ if (node && ts.isModuleDeclaration(node) && ts.isStringLiteral(node.name)) {
+ let nodes = [];
+ if (node.body && ts.isModuleBlock(node.body)) {
+ ts.forEachChild(node.body, (child) => {
+ if (ts.isInterfaceDeclaration(child) || ts.isFunctionDeclaration(child)) nodes.push(child);
+ });
+ }
+ if (nodes.length > 0) {
+ const interfaceStrings = nodes.map(
+ interfaceNode => printer.printNode(ts.EmitHint.Unspecified, interfaceNode, sourceFile));
+
+ let concatenatedInterfaceStrings = interfaceStrings.join('\n\n');
+ let identifiers = concatenatedInterfaceStrings.match(/Ace\.[\w]+/g);
+ if (identifiers && identifiers.length > 0) {
+ identifiers = [...new Set(identifiers)];
+ let importAlias = '';
+ identifiers.forEach(identifier => {
+ let typeName = identifier.replace("Ace.", "");
+
+ if (typeName.includes("<")) {
+ typeName = typeName + "T>";
+ }
+ importAlias += "type " + typeName + " = import(\"" + packageName + "\").Ace." + typeName
+ + ";\n\n";
+ });
+ concatenatedInterfaceStrings = "namespace Ace {" + importAlias + "}" + concatenatedInterfaceStrings;
+ }
+
+ const newSourceFile = ts.createSourceFile(
+ 'temp.d.ts', concatenatedInterfaceStrings, ts.ScriptTarget.Latest, false, ts.ScriptKind.TS);
+ nodes = newSourceFile.statements;
+ }
+ result[node.name.text.replace("./", packageName + "/")] = nodes;
+ }
+ ts.forEachChild(node, visit);
+ }
+
+ visit(sourceFile);
+
+ return result;
+}
+
+/**
+ * @param {string} aceNamespacePath
+ * @return {string}
+ */
+function cloneAceNamespace(aceNamespacePath) {
+
+ const program = ts.createProgram([aceNamespacePath], {
+ noEmit: true
+ });
+ const sourceFile = program.getSourceFile(aceNamespacePath);
+ if (!sourceFile) {
+ throw new Error("Could not find ace.d.ts");
+ }
+ const printer = ts.createPrinter();
+ for (let i = 0; i < sourceFile.statements.length; i++) {
+ const node = sourceFile.statements[i];
+ if (ts.isModuleDeclaration(node) && node.name.text == "Ace") {
+ let aceModule = printer.printNode(ts.EmitHint.Unspecified, node, sourceFile);
+ aceModule = aceModule.replace(/"\.\/src/g, "\"ace-code/src");
+ aceModule = '\n' + aceModule + '\n';
+ return aceModule;
+ }
+ }
+}
+
+/**
+ * @param {string} [aceNamespacePath]
+ */
+function generateDeclaration(aceNamespacePath) {
+ if (!aceNamespacePath) {
+ aceNamespacePath = __dirname + "/../ace-internal.d.ts";
+ }
+ const excludeDir = "src/mode"; //TODO: remove, when modes are ES6
+
+ let data = generateInitialDeclaration(excludeDir);
+ let packageName = "ace-code";
+
+ let updatedContent = data.replace(/(declare module ")/g, "$1" + packageName + "/src/");
+
+ updatedContent = updatedContent.replace(/(require\(")/g, "$1" + packageName + "/src/");
+ updatedContent = updatedContent.replace(/(import\(")[./]*ace(?:\-internal)?("\).Ace)/g, "$1" + packageName + "$2");
+ updatedContent = updatedContent.replace(/(import\(")(?:[./]*)(?!(?:ace\-code))/g, "$1" + packageName + "/src/");
+ updatedContent = updatedContent.replace(/ace\-(?:code|builds)(\/src)?\/ace(?:\-internal)?/g, packageName);
+ let aceModule = cloneAceNamespace(aceNamespacePath);
+
+ updatedContent = updatedContent.replace(/(declare\s+module\s+"ace-(?:code|builds)"\s+{)/, "$1" + aceModule);
+ updatedContent = updatedContent.replace(/(?:export)?\snamespace(?!\sAce)/g, "export namespace");
+ fixDeclaration(updatedContent, aceNamespacePath);
+}
+
+/**
+ * Updates the declaration module names in the provided content.
+ * This function replaces references to "ace-code" with "ace-builds" and "ace-builds-internal" as appropriate.
+ *
+ * @param {string} content - The content to update.
+ * @returns {string} The updated content with the module names replaced.
+ */
+function updateDeclarationModuleNames(content) {
+ let output = content.replace(
+ /ace\-code(?:\/src)?\/(mode(?!\/(?:matching_brace_outdent|matching_parens_outdent|behaviour|folding))|theme|ext|keybinding|snippets)\//g,
+ "ace-builds/src-noconflict/$1-"
+ );
+ output = output.replace(/"ace\-code"/g, "\"ace-builds\"");
+ output = output.replace(/ace\-code(?:\/src)?/g, "ace-builds-internal");
+ return output;
+}
+
+
+if (!module.parent) {
+ require("./modes-declaration-generator");
+ generateDeclaration();
+}
+else {
+ exports.generateDeclaration = generateDeclaration;
+ exports.updateDeclarationModuleNames = updateDeclarationModuleNames;
+ exports.SEPARATE_MODULES = SEPARATE_MODULES;
+}
diff --git a/tool/modes-declaration-generator.js b/tool/modes-declaration-generator.js
index 372a5f818e1..8a326a9c1bb 100644
--- a/tool/modes-declaration-generator.js
+++ b/tool/modes-declaration-generator.js
@@ -100,7 +100,8 @@ function getExportType(exportName) {
aceType = "Outdent";
}
- return ts.factory.createImportTypeNode(ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral(".")),
+ return ts.factory.createImportTypeNode(
+ ts.factory.createLiteralTypeNode(ts.factory.createStringLiteral("ace-code")),
undefined,
ts.factory.createQualifiedName(ts.factory.createIdentifier("Ace"), ts.factory.createIdentifier(aceType)),
undefined, false
diff --git a/tool/test-npm-package.sh b/tool/test-npm-package.sh
new file mode 100755
index 00000000000..abbe623b48e
--- /dev/null
+++ b/tool/test-npm-package.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -euxo pipefail
+
+# Navigate to the ace repository root
+cd "$(dirname "$0")/.."
+
+# npm pack the ace repository
+npm pack
+
+rm -f ace-code-latest.tgz
+
+# Get the name of the packed file
+PACKAGE_FILE=$(ls ace-*.tgz | sort -V | tail -n 1)
+
+mv "$PACKAGE_FILE" ace-code-latest.tgz
+
+
+# Install the ace package from the npm pack result
+# npm install "../../$PACKAGE_FILE"
+
+cd demo/test_package
+
+# Clean up previous installation
+rm -rf node_modules/ace-code
+rm -f package-lock.json
+
+# Install TypeScript
+npm install
+
+# Run TypeScript type checking
+npm run build
+npm run test
+
+# Clean up
+cd ../..
+rm ace-code-latest.tgz
diff --git a/tsconfig.json b/tsconfig.json
index 2f50ebab64c..dee9e071dae 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,8 +8,7 @@
"allowJs": true,
"checkJs": true,
"declaration": true,
- "emitDeclarationOnly": true,
- "outFile": "./types/index.d.ts"
+ "noEmit": true,
},
"exclude": [
"node_modules",
@@ -21,10 +20,12 @@
"src/keyboard/vscode.js",
"src/mode",
"./ace-internal.d.ts",
+ "./ace-modes.d.ts",
"src/**/* *"
],
"include": [
"./src/**/*",
- "./ace.d.ts"
+ "./ace.d.ts",
+ "./types/ace_*.d.ts"
]
}
diff --git a/types/ace-ext.d.ts b/types/ace-ext.d.ts
new file mode 100644
index 00000000000..984dcdce743
--- /dev/null
+++ b/types/ace-ext.d.ts
@@ -0,0 +1,610 @@
+/* This file is generated using `npm run update-types` */
+
+declare module "ace-code/src/ext/command_bar" {
+ /**
+ * Displays a command tooltip above the currently active line selection, with clickable elements.
+ *
+ * Internally it is a composite of two tooltips, one for the main tooltip and one for the
+ * overflowing commands.
+ * The commands are added sequentially in registration order.
+ * When attached to an editor, it is either always shown or only when the active line is hovered
+ * with mouse, depending on the alwaysShow property.
+ */
+ export class CommandBarTooltip {
+ constructor(parentNode: HTMLElement, options?: Partial);
+ parentNode: HTMLElement;
+ tooltip: Tooltip;
+ moreOptions: Tooltip;
+ maxElementsOnTooltip: number;
+ eventListeners: {};
+ elements: {};
+ commands: {};
+ tooltipEl: any[] | HTMLElement | Text;
+ moreOptionsEl: any[] | HTMLElement | Text;
+ /**
+ * Registers a command on the command bar tooltip.
+ *
+ * The commands are added in sequential order. If there is not enough space on the main
+ * toolbar, the remaining elements are added to the overflow menu.
+ *
+ */
+ registerCommand(id: string, command: TooltipCommand): void;
+ isShown(): boolean;
+ isMoreOptionsShown(): boolean;
+ getAlwaysShow(): boolean;
+ /**
+ * Sets the display mode of the tooltip
+ *
+ * When true, the tooltip is always displayed while it is attached to an editor.
+ * When false, the tooltip is displayed only when the mouse hovers over the active editor line.
+ *
+ */
+ setAlwaysShow(alwaysShow: boolean): void;
+ /**
+ * Attaches the clickable command bar tooltip to an editor
+ *
+ * Depending on the alwaysShow parameter it either displays the tooltip immediately,
+ * or subscribes to the necessary events to display the tooltip on hover.
+ *
+ */
+ attach(editor: Editor): void;
+ editor: import("ace-code/src/editor").Editor;
+ /**
+ * Updates the position of the command bar tooltip. It aligns itself above the active line in the editor.
+ */
+ updatePosition(): void;
+ /**
+ * Updates each command element in the tooltip.
+ *
+ * This is automatically called on certain events, but can be called manually as well.
+ */
+ update(): void;
+ /**
+ * Detaches the tooltip from the editor.
+ */
+ detach(): void;
+ destroy(): void;
+ }
+ export type Editor = import("ace-code/src/editor").Editor;
+ export type TooltipCommand = import("ace-code").Ace.TooltipCommand;
+ import { Tooltip } from "ace-code/src/tooltip";
+ export var TOOLTIP_CLASS_NAME: string;
+ export var BUTTON_CLASS_NAME: string;
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ }
+ export interface CommandBarTooltip extends Ace.EventEmitter {
+ }
+}
+declare module "ace-code/src/ext/language_tools" {
+ export function setCompleters(val: any): void;
+ export function addCompleter(completer: any): void;
+ import textCompleter = require("ace-code/src/autocomplete/text_completer");
+ export var keyWordCompleter: import("ace-code").Ace.Completer;
+ export var snippetCompleter: import("ace-code").Ace.Completer;
+ export { textCompleter };
+}
+declare module "ace-code/src/ext/inline_autocomplete" {
+ /**
+ * This class controls the inline-only autocompletion components and their lifecycle.
+ * This is more lightweight than the popup-based autocompletion, as it can only work with exact prefix matches.
+ * There is an inline ghost text renderer and an optional command bar tooltip inside.
+ */
+ export class InlineAutocomplete {
+ constructor(editor: Editor);
+ editor: Editor;
+ keyboardHandler: HashHandler;
+ blurListener(e: any): void;
+ changeListener(e: any): void;
+ changeTimer: {
+ (timeout?: number): void;
+ delay(timeout?: number): void;
+ schedule: any;
+ call(): void;
+ cancel(): void;
+ isPending(): any;
+ };
+ getInlineRenderer(): AceInline;
+ inlineRenderer: AceInline;
+ getInlineTooltip(): CommandBarTooltip;
+ inlineTooltip: CommandBarTooltip;
+ /**
+ * This function is the entry point to the class. This triggers the gathering of the autocompletion and displaying the results;
+ */
+ show(options: import("ace-code").Ace.CompletionOptions): void;
+ activated: boolean;
+ insertMatch(): boolean;
+ goTo(where: import("ace-code").Ace.InlineAutocompleteAction): void;
+ getLength(): any;
+ getData(index?: number): import("ace-code").Ace.Completion | undefined;
+ getIndex(): number;
+ isOpen(): boolean;
+ setIndex(value: number): void;
+ getCompletionProvider(initialPosition: any): CompletionProvider;
+ completionProvider: CompletionProvider;
+ updateCompletions(options?: import("ace-code").Ace.CompletionOptions): void;
+ base: import("ace-code/src/anchor").Anchor;
+ completions: FilteredList;
+ detach(): void;
+ destroy(): void;
+ updateDocTooltip(): void;
+ commands: {
+ [key: string]: import("ace-code").Ace.Command;
+ };
+ }
+ export namespace InlineAutocomplete {
+ function _for(editor: any): any;
+ export { _for as for };
+ export namespace startCommand {
+ let name: string;
+ function exec(editor: any, options: any): void;
+ export namespace bindKey {
+ let win: string;
+ let mac: string;
+ }
+ }
+ /**
+ * Factory method to create a command bar tooltip for inline autocomplete.
+ *
+ * @param {HTMLElement} parentEl The parent element where the tooltip HTML elements will be added.
+ * @returns {CommandBarTooltip} The command bar tooltip for inline autocomplete
+ */
+ export function createInlineTooltip(parentEl: HTMLElement): CommandBarTooltip;
+ }
+ import { Editor } from "ace-code/src/editor";
+ import { HashHandler } from "ace-code/src/keyboard/hash_handler";
+ import { AceInline } from "ace-code/src/autocomplete/inline";
+ import { CommandBarTooltip } from "ace-code/src/ext/command_bar";
+ import { CompletionProvider } from "ace-code/src/autocomplete";
+ import { FilteredList } from "ace-code/src/autocomplete";
+}
+declare module "ace-code/src/ext/searchbox-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/ext/searchbox" {
+ export function Search(editor: Editor, isReplace?: boolean): void;
+ export type Editor = import("ace-code/src/editor").Editor;
+ export class SearchBox {
+ constructor(editor: Editor, range?: never, showReplaceForm?: never);
+ activeInput: any;
+ element: any;
+ setSession(e: any): void;
+ setEditor(editor: Editor): void;
+ editor: Editor;
+ searchRange: any;
+ searchBox: HTMLElement;
+ replaceBox: HTMLElement;
+ searchOption: HTMLInputElement;
+ replaceOption: HTMLInputElement;
+ regExpOption: HTMLInputElement;
+ caseSensitiveOption: HTMLInputElement;
+ wholeWordOption: HTMLInputElement;
+ searchInput: HTMLInputElement;
+ replaceInput: HTMLInputElement;
+ searchCounter: HTMLElement;
+ setSearchRange(range: any): void;
+ searchRangeMarker: number;
+ highlight(re?: RegExp): void;
+ find(skipCurrent: boolean, backwards: boolean, preventScroll?: any): void;
+ updateCounter(): void;
+ findNext(): void;
+ findPrev(): void;
+ findAll(): void;
+ replace(): void;
+ replaceAndFindNext(): void;
+ replaceAll(): void;
+ hide(): void;
+ active: boolean;
+ show(value: string, isReplace?: boolean): void;
+ isFocused(): boolean;
+ }
+ import { HashHandler } from "ace-code/src/keyboard/hash_handler";
+}
+declare module "ace-code/src/ext/elastic_tabstops_lite" {
+ export class ElasticTabstopsLite {
+ constructor(editor: Editor);
+ onAfterExec: () => void;
+ onExec: () => void;
+ onChange: (delta: any) => void;
+ processRows(rows: number[]): void;
+ }
+ import { Editor } from "ace-code/src/editor";
+}
+declare module "ace-code/src/ext/error_marker" {
+ export function showErrorMarker(editor: import("ace-code/src/editor").Editor, dir: number): void;
+}
+declare module "ace-code/src/ext/beautify" {
+ export const singletonTags: string[];
+ export const blockTags: string[];
+ export const formatOptions: {
+ lineBreaksAfterCommasInCurlyBlock?: boolean;
+ };
+ export function beautify(session: import("ace-code/src/edit_session").EditSession): void;
+ export const commands: {
+ name: string;
+ description: string;
+ exec: (editor: any) => void;
+ bindKey: string;
+ }[];
+}
+declare module "ace-code/src/ext/code_lens" {
+ export function setLenses(session: EditSession, lenses: import("ace-code").Ace.CodeLense[]): number;
+ export function registerCodeLensProvider(editor: import("ace-code/src/editor").Editor, codeLensProvider: import("ace-code").Ace.CodeLenseProvider): void;
+ export function clear(session: EditSession): void;
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type VirtualRenderer = import("ace-code/src/virtual_renderer").VirtualRenderer & {
+ };
+ import { Editor } from "ace-code/src/editor";
+}
+declare module "ace-code/src/ext/emmet" {
+ export const commands: HashHandler;
+ export function runEmmetCommand(editor: Editor): number | boolean;
+ export function updateCommands(editor: Editor, enabled?: boolean): void;
+ export function isSupportedMode(mode: any): boolean;
+ export function isAvailable(editor: Editor, command: string): boolean;
+ export function load(cb: any): boolean;
+ export function setCore(e: any): void;
+ import { HashHandler } from "ace-code/src/keyboard/hash_handler";
+ import { Editor } from "ace-code/src/editor";
+ /**
+ * Implementation of {@link IEmmetEditor} interface for Ace
+ */
+ export class AceEmmetEditor {
+ setupContext(editor: Editor): void;
+ ace: Editor;
+ indentation: string;
+ /**
+ * Returns character indexes of selected text: object with start
+ * and end
properties. If there's no selection, should return
+ * object with start
and end
properties referring
+ * to current caret position
+ * @example
+ * var selection = editor.getSelectionRange();
+ * alert(selection.start + ', ' + selection.end);
+ */
+ getSelectionRange(): any;
+ /**
+ * Creates selection from start
to end
character
+ * indexes. If end
is ommited, this method should place caret
+ * and start
index
+ * @example
+ * editor.createSelection(10, 40);
+ *
+ * //move caret to 15th character
+ * editor.createSelection(15);
+ */
+ createSelection(start: number, end?: number): void;
+ /**
+ * Returns current line's start and end indexes as object with start
+ * and end
properties
+ * @example
+ * var range = editor.getCurrentLineRange();
+ * alert(range.start + ', ' + range.end);
+ */
+ getCurrentLineRange(): any;
+ /**
+ * Returns current caret position
+ */
+ getCaretPos(): number | null;
+ /**
+ * Set new caret position
+ * @param {Number} index Caret position
+ */
+ setCaretPos(index: number): void;
+ /**
+ * Returns content of current line
+ */
+ getCurrentLine(): string;
+ /**
+ * Replace editor's content or it's part (from start
to
+ * end
index). If value
contains
+ * caret_placeholder
, the editor will put caret into
+ * this position. If you skip start
and end
+ * arguments, the whole target's content will be replaced with
+ * value
.
+ *
+ * If you pass start
argument only,
+ * the value
will be placed at start
string
+ * index of current content.
+ *
+ * If you pass start
and end
arguments,
+ * the corresponding substring of current target's content will be
+ * replaced with value
.
+ * @param {String} value Content you want to paste
+ * @param {Number} [start] Start index of editor's content
+ * @param {Number} [end] End index of editor's content
+ * @param {Boolean} [noIndent] Do not auto indent value
+ */
+ replaceContent(value: string, start?: number, end?: number, noIndent?: boolean): void;
+ /**
+ * Returns editor's content
+ */
+ getContent(): string;
+ /**
+ * Returns current editor's syntax mode
+ */
+ getSyntax(): string;
+ /**
+ * Returns current output profile name (@see emmet#setupProfile)
+ */
+ getProfileName(): string;
+ /**
+ * Ask user to enter something
+ * @param {String} title Dialog title
+ * @return {String} Entered data
+ * @since 0.65
+ */
+ prompt(title: string): string;
+ /**
+ * Returns current selection
+ * @since 0.65
+ */
+ getSelection(): string;
+ /**
+ * Returns current editor's file path
+ * @since 0.65
+ */
+ getFilePath(): string;
+ }
+}
+declare module "ace-code/src/ext/hardwrap" {
+ export function hardWrap(editor: import("ace-code/src/editor").Editor, options: import("ace-code").Ace.HardWrapOptions): void;
+ import { Editor } from "ace-code/src/editor";
+}
+declare module "ace-code/src/ext/menu_tools/settings_menu.css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/ext/menu_tools/overlay_page" {
+ export function overlayPage(editor: any, contentElement: HTMLElement, callback?: any): {
+ close: () => void;
+ setIgnoreFocusOut: (ignore: boolean) => void;
+ };
+}
+declare module "ace-code/src/ext/menu_tools/get_editor_keyboard_shortcuts" {
+ export function getEditorKeybordShortcuts(editor: import("ace-code/src/editor").Editor): any[];
+}
+declare module "ace-code/src/ext/keybinding_menu" {
+ export function init(editor: Editor): void;
+ import { Editor } from "ace-code/src/editor";
+}
+declare module "ace-code/src/ext/linking" { }
+declare module "ace-code/src/ext/modelist" {
+ /**
+ * Suggests a mode based on the file extension present in the given path
+ * @param {string} path The path to the file
+ * @returns {Mode} Returns an object containing information about the
+ * suggested mode.
+ */
+ export function getModeForPath(path: string): Mode;
+ export var modes: any[];
+ export var modesByName: {};
+ class Mode {
+ constructor(name: string, caption: string, extensions: string);
+ name: string;
+ caption: string;
+ mode: string;
+ extensions: string;
+ extRe: RegExp;
+ supportsFile(filename: string): RegExpMatchArray;
+ }
+}
+declare module "ace-code/src/ext/themelist" {
+ export const themesByName: {};
+ export const themes: {
+ caption: string;
+ theme: string;
+ isDark: boolean;
+ name: string;
+ }[];
+}
+declare module "ace-code/src/ext/options" {
+ export class OptionPanel {
+ constructor(editor: Editor, element?: HTMLElement);
+ editor: import("ace-code/src/editor").Editor;
+ container: HTMLElement;
+ groups: any[];
+ options: {};
+ add(config: any): void;
+ render(): void;
+ renderOptionGroup(group: any): any[];
+ renderOptionControl(key: string, option: any): any;
+ renderOption(key: any, option: any): (string | any[] | {
+ class: string;
+ })[];
+ setOption(option: string | number | any, value: string | number | boolean): void;
+ getOption(option: any): any;
+ }
+ export type Editor = import("ace-code/src/editor").Editor;
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ }
+ export interface OptionPanel extends Ace.EventEmitter {
+ }
+}
+declare module "ace-code/src/ext/prompt" {
+ export type PromptOptions = {
+ /**
+ * Prompt name.
+ */
+ name: string;
+ /**
+ * Defines which part of the predefined value should be highlighted.
+ */
+ selection: [
+ number,
+ number
+ ];
+ /**
+ * Set to true if prompt has description below input box.
+ */
+ hasDescription: boolean;
+ /**
+ * Description below input box.
+ */
+ prompt: string;
+ /**
+ * Placeholder for value.
+ */
+ placeholder: string;
+ /**
+ * Set to true to keep the prompt open when focus moves to another part of the editor.
+ */
+ ignoreFocusOut: boolean;
+ /**
+ * Function for defining list of options for value.
+ */
+ getCompletions: Function;
+ /**
+ * Function for defining current value prefix.
+ */
+ getPrefix: Function;
+ /**
+ * Function called when Enter is pressed.
+ */
+ onAccept: Function;
+ /**
+ * Function called when input is added to prompt input box.
+ */
+ onInput: Function;
+ /**
+ * Function called when Esc|Shift-Esc is pressed.
+ */
+ onCancel: Function;
+ /**
+ * Function for defining history list.
+ */
+ history: Function;
+ maxHistoryCount: number;
+ addToHistory: Function;
+ };
+ export type Editor = import("ace-code/src/editor").Editor;
+ /**
+ * @property {String} name Prompt name.
+ * @property {String} $type Use prompt of specific type (gotoLine|commands|modes or default if empty).
+ * @property {[number, number]} selection Defines which part of the predefined value should be highlighted.
+ * @property {Boolean} hasDescription Set to true if prompt has description below input box.
+ * @property {String} prompt Description below input box.
+ * @property {String} placeholder Placeholder for value.
+ * @property {Object} $rules Specific rules for input like password or regexp.
+ * @property {Boolean} ignoreFocusOut Set to true to keep the prompt open when focus moves to another part of the editor.
+ * @property {Function} getCompletions Function for defining list of options for value.
+ * @property {Function} getPrefix Function for defining current value prefix.
+ * @property {Function} onAccept Function called when Enter is pressed.
+ * @property {Function} onInput Function called when input is added to prompt input box.
+ * @property {Function} onCancel Function called when Esc|Shift-Esc is pressed.
+ * @property {Function} history Function for defining history list.
+ * @property {number} maxHistoryCount
+ * @property {Function} addToHistory
+ */
+ /**
+ * Prompt plugin is used for getting input from user.
+ *
+ * @param {Editor} editor Ouside editor related to this prompt. Will be blurred when prompt is open.
+ * @param {String | Partial} message Predefined value of prompt input box.
+ * @param {Partial} options Cusomizable options for this prompt.
+ * @param {Function} [callback] Function called after done.
+ * */
+ export function prompt(editor: Editor, message: string | Partial, options: Partial, callback?: Function): any;
+ export namespace prompt {
+ function gotoLine(editor: Editor, callback?: Function): void;
+ function commands(editor: Editor, callback?: Function): void;
+ function modes(editor: Editor, callback?: Function): void;
+ }
+}
+declare module "ace-code/src/ext/rtl" {
+}
+declare module "ace-code/src/ext/settings_menu" {
+ export function init(): void;
+}
+declare module "ace-code/src/ext/simple_tokenizer" {
+ /**
+ * Parses provided content according to provided highlighting rules and return tokens.
+ * Tokens either have the className set according to Ace themes or have no className if they are just pure text tokens.
+ * Result is a list of list of tokens, where each line from the provided content is a separate list of tokens.
+ *
+ * @param {string} content to tokenize
+ * @param {import("ace-code").Ace.HighlightRules} highlightRules defining the language grammar
+ * @returns {import("ace-code").Ace.TokenizeResult} tokenization result containing a list of token for each of the lines from content
+ */
+ export function tokenize(content: string, highlightRules: import("ace-code").Ace.HighlightRules): import("ace-code").Ace.TokenizeResult;
+}
+declare module "ace-code/src/ext/spellcheck" {
+ export function contextMenuHandler(e: any): void;
+}
+declare module "ace-code/src/ext/split" {
+ const _exports: typeof import("ace-code/src/split");
+ export = _exports;
+}
+declare module "ace-code/src/ext/static-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/ext/static_highlight" {
+ function highlight(el: HTMLElement, opts: import("ace-code").Ace.StaticHighlightOptions, callback?: any): boolean;
+ export namespace highlight {
+ export { render, renderSync, highlight, SyntaxMode, Theme };
+ }
+ /**
+ * Transforms a given input code snippet into HTML using the given mode
+ *
+ * @param {string} input Code snippet
+ * @param {string | SyntaxMode} mode String specifying the mode to load such as
+ * `ace/mode/javascript` or, a mode loaded from `/ace/mode`
+ * (use 'ServerSideHiglighter.getMode').
+ * @param {string | Theme} theme String specifying the theme to load such as
+ * `ace/theme/twilight` or, a theme loaded from `/ace/theme`.
+ * @param {number} lineStart A number indicating the first line number. Defaults
+ * to 1.
+ * @param {boolean} disableGutter Specifies whether or not to disable the gutter.
+ * `true` disables the gutter, `false` enables the gutter. Defaults to `false`.
+ * @param {function} [callback] When specifying the mode or theme as a string,
+ * this method has no return value and you must specify a callback function. The
+ * callback will receive the rendered object containing the properties `html`
+ * and `css`.
+ * @returns {object} An object containing the properties `html` and `css`.
+ */
+ function render(input: string, mode: string | SyntaxMode, theme: string | Theme, lineStart: number, disableGutter: boolean, callback?: Function): object;
+ /**
+ * Transforms a given input code snippet into HTML using the given mode
+ * @param {string} input Code snippet
+ * @param {SyntaxMode | string} mode Mode loaded from /ace/mode (use 'ServerSideHiglighter.getMode')
+ * @returns {object} An object containing: html, css
+ */
+ function renderSync(input: string, mode: SyntaxMode | string, theme: Theme, lineStart: any, disableGutter: boolean): object;
+ type SyntaxMode = import("ace-code").Ace.SyntaxMode;
+ type Theme = import("ace-code").Ace.Theme;
+}
+declare module "ace-code/src/ext/statusbar" {
+ export type Editor = import("ace-code/src/editor").Editor;
+ /** simple statusbar **/
+ export class StatusBar {
+ constructor(editor: Editor, parentNode: HTMLElement);
+ element: HTMLDivElement;
+ updateStatus(editor: Editor): void;
+ }
+}
+declare module "ace-code/src/ext/whitespace" {
+ export function $detectIndentation(lines: string[], fallback?: any): {
+ ch?: string;
+ length?: number;
+ };
+ export function detectIndentation(session: EditSession): {
+ ch?: string;
+ length?: number;
+ } | {};
+ export function trimTrailingSpace(session: EditSession, options: {
+ trimEmpty?: boolean;
+ keepCursorPosition?: boolean;
+ }): void;
+ export function convertIndentation(session: EditSession, ch: string, len: number): void;
+ export function $parseStringArg(text: string): {};
+ export function $parseArg(arg: any): any;
+ export const commands: {
+ name: string;
+ description: string;
+ exec: (editor: any, args: any) => void;
+ }[];
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+}
diff --git a/types/ace-lib.d.ts b/types/ace-lib.d.ts
new file mode 100644
index 00000000000..6135bd4d95b
--- /dev/null
+++ b/types/ace-lib.d.ts
@@ -0,0 +1,221 @@
+/* This file is generated using `npm run update-types` */
+
+declare module "ace-code/src/lib/useragent" {
+ export namespace OS {
+ let LINUX: string;
+ let MAC: string;
+ let WINDOWS: string;
+ }
+ export function getOS(): string;
+ export const isWin: boolean;
+ export const isMac: boolean;
+ export const isLinux: boolean;
+ export const isIE: number;
+ export const isOldIE: boolean;
+ export const isGecko: any;
+ export const isMozilla: any;
+ export const isOpera: boolean;
+ export const isWebKit: number;
+ export const isChrome: number;
+ export const isSafari: true;
+ export const isEdge: number;
+ export const isAIR: boolean;
+ export const isAndroid: boolean;
+ export const isChromeOS: boolean;
+ export const isIOS: boolean;
+ export const isMobile: boolean;
+}
+declare module "ace-code/src/lib/dom" {
+ export function buildDom(arr: any, parent?: HTMLElement, refs?: any): HTMLElement | Text | any[];
+ export function getDocumentHead(doc?: Document): HTMLHeadElement | HTMLElement;
+ export function createElement(tag: T | string, ns?: string): HTMLElementTagNameMap[T];
+ export function removeChildren(element: HTMLElement): void;
+ export function createTextNode(textContent: string, element?: HTMLElement): Text;
+ export function createFragment(element?: HTMLElement): DocumentFragment;
+ export function hasCssClass(el: HTMLElement, name: string): boolean;
+ export function addCssClass(el: HTMLElement, name: string): void;
+ export function removeCssClass(el: HTMLElement, name: string): void;
+ export function toggleCssClass(el: HTMLElement, name: string): boolean;
+ export function setCssClass(node: HTMLElement, className: string, include: boolean): void;
+ export function hasCssString(id: string, doc?: Document): boolean;
+ export function removeElementById(id: string, doc?: Document): void;
+ export function useStrictCSP(value: any): void;
+ export function importCssStylsheet(uri: string, doc?: Document): void;
+ export function scrollbarWidth(doc?: Document): number;
+ export function computedStyle(element: Element, style?: any): Partial;
+ export function setStyle(styles: CSSStyleDeclaration, property: string, value: string): void;
+ export const HAS_CSS_ANIMATION: boolean;
+ export const HAS_CSS_TRANSFORMS: boolean;
+ export const HI_DPI: boolean;
+ export function translate(element: any, tx: any, ty: any): void;
+ export function importCssString(cssText: string, id?: string, target?: any): number;
+}
+declare module "ace-code/src/lib/oop" {
+ export function inherits(ctor: any, superCtor: any): void;
+ export function mixin(obj: T, mixin: any): T & any;
+ export function implement(proto: T, mixin: any): T & any;
+}
+declare module "ace-code/src/lib/deep_copy" {
+ export function deepCopy(obj: any): any;
+}
+declare module "ace-code/src/lib/lang" {
+ export function last(a: any): any;
+ export function stringReverse(string: string): string;
+ export function stringRepeat(string: any, count: any): string;
+ export function stringTrimLeft(string: any): any;
+ export function stringTrimRight(string: any): any;
+ export function copyObject(obj: T): T;
+ export function copyArray(array: any): any[];
+ export const deepCopy: (obj: any) => any;
+ export function arrayToMap(arr: any): {};
+ export function createMap(props: any): any;
+ export function arrayRemove(array: any, value: any): void;
+ export function escapeRegExp(str: any): any;
+ export function escapeHTML(str: any): string;
+ export function getMatchOffsets(string: any, regExp: any): any[];
+ export function deferredCall(fcn: any): {
+ (timeout: any): any;
+ schedule: any;
+ call(): any;
+ cancel(): any;
+ isPending(): any;
+ };
+ export function delayedCall(fcn: any, defaultTimeout?: number): {
+ (timeout?: number): void;
+ delay(timeout?: number): void;
+ schedule: any;
+ call(): void;
+ cancel(): void;
+ isPending(): any;
+ };
+ export function supportsLookbehind(): boolean;
+ export function skipEmptyMatch(line: any, last: any, supportsUnicodeFlag: any): 1 | 2;
+}
+declare module "ace-code/src/lib/keys" {
+ export function keyCodeToString(keyCode: number): string;
+}
+declare module "ace-code/src/lib/event" {
+ export function addListener(elem: any, type: string, callback: any, destroyer?: any): void;
+ export function removeListener(elem: any, type: any, callback: any): void;
+ export function stopEvent(e: any): boolean;
+ export function stopPropagation(e: any): void;
+ export function preventDefault(e: any): void;
+ export function getButton(e: any): any;
+ export function capture(el: any, eventHandler: any, releaseCaptureHandler: any): (e: any) => void;
+ export function addMouseWheelListener(el: any, callback: any, destroyer?: any): void;
+ export function addMultiMouseDownListener(elements: any, timeouts: any, eventHandler: any, callbackName: any, destroyer?: any): void;
+ export function getModifierString(e: KeyboardEvent | MouseEvent): any;
+ export function addCommandKeyListener(el: EventTarget, callback: (e: KeyboardEvent, hashId: number, keyCode: number) => void, destroyer?: any): void;
+ export function nextTick(callback: any, win: any): void;
+ export const $idleBlocked: boolean;
+ export function onIdle(cb: any, timeout: any): number;
+ export const $idleBlockId: number;
+ export function blockIdle(delay: any): void;
+ export const nextFrame: any;
+}
+declare module "ace-code/src/lib/event_emitter" {
+ export var EventEmitter: any;
+}
+declare module "ace-code/src/lib/net" {
+ export function get(url: any, callback: any): void;
+ export function loadScript(path: any, callback: any): void;
+ export function qualifyURL(url: any): string;
+}
+declare module "ace-code/src/lib/report_error" {
+ export function reportError(msg: any, data: any): void;
+}
+declare module "ace-code/src/lib/default_english_messages" {
+ export var defaultEnglishMessages: {
+ "autocomplete.popup.aria-roledescription": string;
+ "autocomplete.popup.aria-label": string;
+ "autocomplete.popup.item.aria-roledescription": string;
+ "autocomplete.loading": string;
+ "editor.scroller.aria-roledescription": string;
+ "editor.scroller.aria-label": string;
+ "editor.gutter.aria-roledescription": string;
+ "editor.gutter.aria-label": string;
+ "error-marker.good-state": string;
+ "prompt.recently-used": string;
+ "prompt.other-commands": string;
+ "prompt.no-matching-commands": string;
+ "search-box.find.placeholder": string;
+ "search-box.find-all.text": string;
+ "search-box.replace.placeholder": string;
+ "search-box.replace-next.text": string;
+ "search-box.replace-all.text": string;
+ "search-box.toggle-replace.title": string;
+ "search-box.toggle-regexp.title": string;
+ "search-box.toggle-case.title": string;
+ "search-box.toggle-whole-word.title": string;
+ "search-box.toggle-in-selection.title": string;
+ "search-box.search-counter": string;
+ "text-input.aria-roledescription": string;
+ "text-input.aria-label": string;
+ "gutter.code-folding.range.aria-label": string;
+ "gutter.code-folding.closed.aria-label": string;
+ "gutter.code-folding.open.aria-label": string;
+ "gutter.code-folding.closed.title": string;
+ "gutter.code-folding.open.title": string;
+ "gutter.annotation.aria-label.error": string;
+ "gutter.annotation.aria-label.warning": string;
+ "gutter.annotation.aria-label.info": string;
+ "inline-fold.closed.title": string;
+ "gutter-tooltip.aria-label.error.singular": string;
+ "gutter-tooltip.aria-label.error.plural": string;
+ "gutter-tooltip.aria-label.warning.singular": string;
+ "gutter-tooltip.aria-label.warning.plural": string;
+ "gutter-tooltip.aria-label.info.singular": string;
+ "gutter-tooltip.aria-label.info.plural": string;
+ "gutter.annotation.aria-label.security": string;
+ "gutter.annotation.aria-label.hint": string;
+ "gutter-tooltip.aria-label.security.singular": string;
+ "gutter-tooltip.aria-label.security.plural": string;
+ "gutter-tooltip.aria-label.hint.singular": string;
+ "gutter-tooltip.aria-label.hint.plural": string;
+ };
+}
+declare module "ace-code/src/lib/app_config" {
+ export class AppConfig {
+ 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: typeof warn;
+ reportError: (msg: any, data: any) => void;
+ }
+ function warn(message: any, ...args: any[]): void;
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ }
+ export interface AppConfig extends Ace.EventEmitter {
+ }
+}
+declare module "ace-code/src/lib/scroll" {
+ export function preventParentScroll(event: any): void;
+}
+declare module "ace-code/src/lib/bidiutil" {
+ export const ON_R: 3;
+ export const AN: 4;
+ export const R_H: 5;
+ export const B: 6;
+ export const RLE: 7;
+ export const DOT: "·";
+ export function doBidiReorder(text: string, textCharTypes: any[], isRtl: boolean): any;
+ export function hasBidiCharacters(text: string, textCharTypes: any[]): boolean;
+ export function getVisualFromLogicalIdx(logIdx: number, rowMap: any): number;
+ export var L: number;
+ export var R: number;
+ export var EN: number;
+}
+declare module "ace-code/src/lib/fixoldbrowsers" {
+}
diff --git a/types/ace-modules.d.ts b/types/ace-modules.d.ts
new file mode 100644
index 00000000000..dcd0faae0cd
--- /dev/null
+++ b/types/ace-modules.d.ts
@@ -0,0 +1,4745 @@
+/* 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 = import("ace-code").Ace.EventEmitter;
+ }
+ export interface FontMetrics extends Ace.EventEmitter {
+ }
+}
+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.
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 = import("ace-code").Ace.EventEmitter;
+ type DocumentEvents = import("ace-code").Ace.DocumentEvents;
+ }
+ export interface Document extends Ace.EventEmitter {
+ }
+}
+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 = import("ace-code").Ace.EventEmitter;
+ type AnchorEvents = import("ace-code").Ace.AnchorEvents;
+ type Document = import("ace-code").Ace.Document;
+ }
+ export interface Anchor extends Ace.EventEmitter {
+ 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(name: K, callback: any): void;
+ setDefaultHandler(name: string, callback: Function): void;
+ removeDefaultHandler(name: string, callback: Function): void;
+ on(name: K, callback: any, capturing?: boolean): any;
+ addEventListener(name: K, callback: any, capturing?: boolean): any;
+ off(name: K, callback: any): void;
+ removeListener(name: K, callback: any): void;
+ removeEventListener(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: (key: K) => import("ace-code").Ace.ConfigOptions[K];
+ set: (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.36.5";
+ };
+ 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, 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 = import("ace-code").Ace.EventEmitter;
+ type GutterEvents = import("ace-code").Ace.GutterEvents;
+ }
+ export interface Gutter extends Ace.EventEmitter {
+ }
+}
+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, extraStyle?: string): void;
+ drawMultiLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: LayerConfig, extraStyle?: string): void;
+ drawSingleLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial, extraLength?: number, extraStyle?: string): void;
+ drawBidiSingleLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial, extraLength: number, extraStyle: string): void;
+ drawFullLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial, extraStyle?: undefined): void;
+ drawScreenLineMarker(stringBuilder: undefined, range: Range, clazz: string, config: Partial, 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 = import("ace-code").Ace.EventEmitter;
+ type TextEvents = import("ace-code").Ace.TextEvents;
+ type LayerConfig = import("ace-code").Ace.LayerConfig;
+ }
+ export interface Text extends Ace.EventEmitter {
+ 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 = import("ace-code").Ace.EventEmitter;
+ }
+ export interface VScrollBar extends Ace.EventEmitter {
+ }
+ export interface HScrollBar extends Ace.EventEmitter {
+ }
+}
+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 = import("ace-code").Ace.EventEmitter;
+ }
+ export interface VScrollBar extends Ace.EventEmitter {
+ }
+ export interface HScrollBar extends Ace.EventEmitter {
+ }
+}
+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;
+ /**
+ *
+ * [Returns the index of the last visible row.]{: #VirtualRenderer.getLastVisibleRow}
+ **/
+ getLastVisibleRow(): number;
+ /**
+ * Sets the padding for all the layers.
+ * @param {Number} padding A new padding value (in pixels)
+ **/
+ setPadding(padding: number): void;
+ setScrollMargin(top?: number, bottom?: number, left?: number, right?: number): void;
+ setMargin(top?: number, bottom?: number, left?: number, right?: number): void;
+ /**
+ * Returns whether the horizontal scrollbar is set to be always visible.
+ **/
+ getHScrollBarAlwaysVisible(): boolean;
+ /**
+ * Identifies whether you want to show the horizontal scrollbar or not.
+ * @param {Boolean} alwaysVisible Set to `true` to make the horizontal scroll bar visible
+ **/
+ setHScrollBarAlwaysVisible(alwaysVisible: boolean): void;
+ /**
+ * Returns whether the horizontal scrollbar is set to be always visible.
+ **/
+ getVScrollBarAlwaysVisible(): boolean;
+ /**
+ * Identifies whether you want to show the horizontal scrollbar or not.
+ * @param {Boolean} alwaysVisible Set to `true` to make the horizontal scroll bar visible
+ **/
+ setVScrollBarAlwaysVisible(alwaysVisible: boolean): void;
+ freeze(): void;
+ unfreeze(): void;
+ desiredHeight: any;
+ /**
+ * Schedules an update to all the front markers in the document.
+ **/
+ updateFrontMarkers(): void;
+ /**
+ *
+ * Schedules an update to all the back markers in the document.
+ **/
+ updateBackMarkers(): void;
+ /**
+ *
+ * Deprecated; (moved to [[EditSession]])
+ * @deprecated
+ **/
+ addGutterDecoration(row: any, className: any): void;
+ /**
+ * Deprecated; (moved to [[EditSession]])
+ * @deprecated
+ **/
+ removeGutterDecoration(row: any, className: any): void;
+ /**
+ *
+ * Redraw breakpoints.
+ */
+ updateBreakpoints(rows?: any): void;
+ /**
+ * Sets annotations for the gutter.
+ * @param {import("ace-code").Ace.Annotation[]} annotations An array containing annotations
+ *
+ **/
+ setAnnotations(annotations: import("ace-code").Ace.Annotation[]): void;
+ /**
+ *
+ * Updates the cursor icon.
+ **/
+ updateCursor(): void;
+ /**
+ *
+ * Hides the cursor icon.
+ **/
+ hideCursor(): void;
+ /**
+ *
+ * Shows the cursor icon.
+ **/
+ showCursor(): void;
+ scrollSelectionIntoView(anchor: Point, lead: Point, offset?: number): void;
+ /**
+ *
+ * Scrolls the cursor into the first visibile area of the editor
+ */
+ scrollCursorIntoView(cursor?: Point, offset?: number, $viewMargin?: {
+ top?: any;
+ bottom?: any;
+ }): void;
+ /**
+ * {:EditSession.getScrollTop}
+ * @related EditSession.getScrollTop
+ **/
+ getScrollTop(): number;
+ /**
+ * {:EditSession.getScrollLeft}
+ * @related EditSession.getScrollLeft
+ **/
+ getScrollLeft(): number;
+ /**
+ * Returns the first visible row, regardless of whether it's fully visible or not.
+ **/
+ getScrollTopRow(): number;
+ /**
+ * Returns the last visible row, regardless of whether it's fully visible or not.
+ **/
+ getScrollBottomRow(): number;
+ /**
+ * Gracefully scrolls from the top of the editor to the row indicated.
+ * @param {Number} row A row id
+ *
+ * @related EditSession.setScrollTop
+ **/
+ scrollToRow(row: number): void;
+ alignCursor(cursor: Point, alignment?: number): number;
+ /**
+ * Gracefully scrolls the editor to the row indicated.
+ * @param {Number} line A line number
+ * @param {Boolean} center If `true`, centers the editor the to indicated line
+ * @param {Boolean} animate If `true` animates scrolling
+ * @param {() => void} [callback] Function to be called after the animation has finished
+ **/
+ scrollToLine(line: number, center: boolean, animate: boolean, callback?: () => void): void;
+ animateScrolling(fromValue: any, callback?: any): void;
+ /**
+ * Scrolls the editor to the y pixel indicated.
+ * @param {Number} scrollTop The position to scroll to
+ **/
+ scrollToY(scrollTop: number): void;
+ /**
+ * Scrolls the editor across the x-axis to the pixel indicated.
+ * @param {Number} scrollLeft The position to scroll to
+ **/
+ scrollToX(scrollLeft: number): void;
+ /**
+ * Scrolls the editor across both x- and y-axes.
+ * @param {Number} x The x value to scroll to
+ * @param {Number} y The y value to scroll to
+ **/
+ scrollTo(x: number, y: number): void;
+ /**
+ * Scrolls the editor across both x- and y-axes.
+ * @param {Number} deltaX The x value to scroll by
+ * @param {Number} deltaY The y value to scroll by
+ **/
+ scrollBy(deltaX: number, deltaY: number): void;
+ /**
+ * Returns `true` if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
+ * @param {Number} deltaX The x value to scroll by
+ * @param {Number} deltaY The y value to scroll by
+ *
+ **/
+ isScrollableBy(deltaX: number, deltaY: number): boolean;
+ pixelToScreenCoordinates(x: number, y: number): import("ace-code").Ace.ScreenCoordinates;
+ screenToTextCoordinates(x: number, y: number): Point;
+ /**
+ * Returns an object containing the `pageX` and `pageY` coordinates of the document position.
+ * @param {Number} row The document row position
+ * @param {Number} column The document column position
+ *
+ **/
+ textToScreenCoordinates(row: number, column: number): {
+ pageX: number;
+ pageY: number;
+ };
+ /**
+ *
+ * Focuses the current container.
+ **/
+ visualizeFocus(): void;
+ /**
+ *
+ * Blurs the current container.
+ **/
+ visualizeBlur(): void;
+ showComposition(composition: any): void;
+ /**
+ * @param {String} text A string of text to use
+ *
+ * Sets the inner text of the current composition to `text`.
+ **/
+ setCompositionText(text: string): void;
+ /**
+ *
+ * Hides the current composition.
+ **/
+ hideComposition(): void;
+ setGhostText(text: string, position?: Point): void;
+ removeGhostText(): void;
+ addToken(text: string, type: string, row: number, column?: number): void;
+ hideTokensAfterPosition(row: any, column: any): {
+ type: string;
+ value: string;
+ }[];
+ removeExtraToken(row: any, column: any): void;
+ /**
+ * [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
+ * @param {String | Theme} [theme] The path to a theme
+ * @param {() => void} [cb] optional callback
+ **/
+ setTheme(theme?: string | Theme, cb?: () => void): void;
+ /**
+ * [Returns the path of the current theme.]{: #VirtualRenderer.getTheme}
+ **/
+ getTheme(): string;
+ /**
+ * [Adds a new class, `style`, to the editor.]{: #VirtualRenderer.setStyle}
+ * @param {String} style A class name
+ **/
+ setStyle(style: string, include?: boolean): void;
+ /**
+ * [Removes the class `style` from the editor.]{: #VirtualRenderer.unsetStyle}
+ * @param {String} style A class name
+ *
+ **/
+ unsetStyle(style: string): void;
+ setCursorStyle(style: string): void;
+ /**
+ * @param {String} cursorStyle A css cursor style
+ **/
+ setMouseCursor(cursorStyle: string): void;
+ attachToShadowRoot(): void;
+ /**
+ * Destroys the text and cursor layers for this renderer.
+ **/
+ destroy(): void;
+ CHANGE_CURSOR: number;
+ CHANGE_MARKER: number;
+ CHANGE_GUTTER: number;
+ CHANGE_SCROLL: number;
+ CHANGE_LINES: number;
+ CHANGE_TEXT: number;
+ CHANGE_SIZE: number;
+ CHANGE_MARKER_BACK: number;
+ CHANGE_MARKER_FRONT: number;
+ CHANGE_FULL: number;
+ CHANGE_H_SCROLL: number;
+ STEPS: number;
+ textarea?: HTMLTextAreaElement;
+ enableKeyboardAccessibility?: boolean;
+ showInvisibles?: boolean;
+ theme?: any;
+ destroyed?: boolean;
+ keyboardFocusClassName?: string;
+ }
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Point = import("ace-code").Ace.Point;
+ export type Theme = import("ace-code").Ace.Theme;
+ import { Gutter as GutterLayer } from "ace-code/src/layer/gutter";
+ import { Marker as MarkerLayer } from "ace-code/src/layer/marker";
+ import { Text as TextLayer } from "ace-code/src/layer/text";
+ import { Cursor as CursorLayer } from "ace-code/src/layer/cursor";
+ import { VScrollBar } from "ace-code/src/scrollbar";
+ import { FontMetrics } from "ace-code/src/layer/font_metrics";
+ import { RenderLoop } from "ace-code/src/renderloop";
+ import { Decorator } from "ace-code/src/layer/decorators";
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ type VirtualRendererEvents = import("ace-code").Ace.VirtualRendererEvents;
+ type OptionsProvider = import("ace-code").Ace.OptionsProvider;
+ type VirtualRendererOptions = import("ace-code").Ace.VirtualRendererOptions;
+ type EditSession = import("ace-code").Ace.EditSession;
+ }
+ export interface VirtualRenderer extends Ace.EventEmitter, Ace.OptionsProvider {
+ textarea?: HTMLTextAreaElement;
+ enableKeyboardAccessibility?: boolean;
+ showInvisibles?: boolean;
+ theme?: any;
+ destroyed?: boolean;
+ session: Ace.EditSession;
+ keyboardFocusClassName?: string;
+ }
+}
+declare module "ace-code/src/selection" {
+ export class Selection {
+ /**
+ * Creates a new `Selection` object.
+ * @param {EditSession} session The session to use
+ * @constructor
+ **/
+ constructor(session: EditSession);
+ session: EditSession;
+ doc: import("ace-code/src/document").Document;
+ cursor: Anchor;
+ lead: Anchor;
+ anchor: Anchor;
+ /**
+ * Returns `true` if the selection is empty.
+ **/
+ isEmpty(): boolean;
+ /**
+ * Returns `true` if the selection is a multi-line.
+ **/
+ isMultiLine(): boolean;
+ /**
+ * Returns an object containing the `row` and `column` current position of the cursor.
+ **/
+ getCursor(): Point;
+ /**
+ * Sets the row and column position of the anchor. This function also emits the `'changeSelection'` event.
+ * @param {Number} row The new row
+ * @param {Number} column The new column
+ *
+ **/
+ setAnchor(row: number, column: number): void;
+ /**
+ * Returns an object containing the `row` and `column` of the calling selection anchor.
+ *
+ * @related Anchor.getPosition
+ **/
+ getAnchor(): Point;
+ /**
+ * Returns an object containing the `row` and `column` of the calling selection lead.
+ **/
+ getSelectionLead(): any;
+ /**
+ * Returns `true` if the selection is going backwards in the document.
+ **/
+ isBackwards(): boolean;
+ /**
+ * [Returns the [[Range]] for the selected text.]{: #Selection.getRange}
+ **/
+ getRange(): Range;
+ /**
+ * [Empties the selection (by de-selecting it). This function also emits the `'changeSelection'` event.]{: #Selection.clearSelection}
+ **/
+ clearSelection(): void;
+ /**
+ * Selects all the text in the document.
+ **/
+ selectAll(): void;
+ /**
+ * Sets the selection to the provided range.
+ * @param {import("ace-code").Ace.IRange} range The range of text to select
+ * @param {Boolean} [reverse] Indicates if the range should go backwards (`true`) or not
+ **/
+ setRange(range: import("ace-code").Ace.IRange, reverse?: boolean): void;
+ /**
+ * Moves the selection cursor to the indicated row and column.
+ * @param {Number} row The row to select to
+ * @param {Number} column The column to select to
+ **/
+ selectTo(row: number, column: number): void;
+ /**
+ * Moves the selection cursor to the row and column indicated by `pos`.
+ * @param {Point} pos An object containing the row and column
+ **/
+ selectToPosition(pos: Point): void;
+ /**
+ * Moves the selection cursor to the indicated row and column.
+ * @param {Number} row The row to select to
+ * @param {Number} column The column to select to
+ **/
+ moveTo(row: number, column: number): void;
+ /**
+ * Moves the selection cursor to the row and column indicated by `pos`.
+ * @param {Object} pos An object containing the row and column
+ **/
+ moveToPosition(pos: any): void;
+ /**
+ * Moves the selection up one row.
+ **/
+ selectUp(): void;
+ /**
+ * Moves the selection down one row.
+ **/
+ selectDown(): void;
+ /**
+ * Moves the selection right one column.
+ **/
+ selectRight(): void;
+ /**
+ * Moves the selection left one column.
+ **/
+ selectLeft(): void;
+ /**
+ * Moves the selection to the beginning of the current line.
+ **/
+ selectLineStart(): void;
+ /**
+ * Moves the selection to the end of the current line.
+ **/
+ selectLineEnd(): void;
+ /**
+ * Moves the selection to the end of the file.
+ **/
+ selectFileEnd(): void;
+ /**
+ * Moves the selection to the start of the file.
+ **/
+ selectFileStart(): void;
+ /**
+ * Moves the selection to the first word on the right.
+ **/
+ selectWordRight(): void;
+ /**
+ * Moves the selection to the first word on the left.
+ **/
+ selectWordLeft(): void;
+ /**
+ * Moves the selection to highlight the entire word.
+ * @related EditSession.getWordRange
+ **/
+ getWordRange(row: any, column: any): Range;
+ /**
+ * Selects an entire word boundary.
+ **/
+ selectWord(): void;
+ /**
+ * Selects a word, including its right whitespace.
+ * @related EditSession.getAWordRange
+ **/
+ selectAWord(): void;
+ getLineRange(row: any, excludeLastChar: any): Range;
+ /**
+ * Selects the entire line.
+ **/
+ selectLine(): void;
+ /**
+ * Moves the cursor up one row.
+ **/
+ moveCursorUp(): void;
+ /**
+ * Moves the cursor down one row.
+ **/
+ moveCursorDown(): void;
+ /**
+ *
+ * Returns `true` if moving the character next to the cursor in the specified direction is a soft tab.
+ * @param {Point} cursor the current cursor position
+ * @param {Number} tabSize the tab size
+ * @param {Number} direction 1 for right, -1 for left
+ */
+ wouldMoveIntoSoftTab(cursor: Point, tabSize: number, direction: number): boolean;
+ /**
+ * Moves the cursor left one column.
+ **/
+ moveCursorLeft(): void;
+ /**
+ * Moves the cursor right one column.
+ **/
+ moveCursorRight(): void;
+ /**
+ * Moves the cursor to the start of the line.
+ **/
+ moveCursorLineStart(): void;
+ /**
+ * Moves the cursor to the end of the line.
+ **/
+ moveCursorLineEnd(): void;
+ /**
+ * Moves the cursor to the end of the file.
+ **/
+ moveCursorFileEnd(): void;
+ /**
+ * Moves the cursor to the start of the file.
+ **/
+ moveCursorFileStart(): void;
+ /**
+ * Moves the cursor to the word on the right.
+ **/
+ moveCursorLongWordRight(): void;
+ /**
+ *
+ * Moves the cursor to the word on the left.
+ **/
+ moveCursorLongWordLeft(): void;
+ moveCursorShortWordRight(): void;
+ moveCursorShortWordLeft(): void;
+ moveCursorWordRight(): void;
+ moveCursorWordLeft(): void;
+ /**
+ * Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
+ * @param {Number} rows The number of rows to move by
+ * @param {Number} chars The number of characters to move by
+ *
+ * @related EditSession.documentToScreenPosition
+ **/
+ moveCursorBy(rows: number, chars: number): void;
+ /**
+ * Moves the selection to the position indicated by its `row` and `column`.
+ * @param {Point} position The position to move to
+ **/
+ moveCursorToPosition(position: Point): void;
+ /**
+ * Moves the cursor to the row and column provided. [If `preventUpdateDesiredColumn` is `true`, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc}
+ * @param {Number} row The row to move to
+ * @param {Number} column The column to move to
+ **/
+ moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean): void;
+ /**
+ * Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc}
+ * @param {Number} row The row to move to
+ * @param {Number} column The column to move to
+ **/
+ moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean): void;
+ detach(): void;
+ fromOrientedRange(range: Range & {
+ desiredColumn?: number;
+ }): void;
+ toOrientedRange(range?: Range & {
+ desiredColumn?: number;
+ }): Range & {
+ desiredColumn?: number;
+ };
+ /**
+ * Saves the current cursor position and calls `func` that can change the cursor
+ * postion. The result is the range of the starting and eventual cursor position.
+ * Will reset the cursor position.
+ * @param {Function} func The callback that should change the cursor position
+ **/
+ getRangeOfMovements(func: Function): Range;
+ toJSON(): Range | Range[];
+ fromJSON(data: any): void;
+ isEqual(data: any): boolean;
+ /**
+ * Left for backward compatibility
+ * @deprecated
+ */
+ setSelectionAnchor: (row: number, column: number) => void;
+ /**
+ * Left for backward compatibility
+ * @deprecated
+ */
+ getSelectionAnchor: () => Point;
+ setSelectionRange: (range: import("ace-code").Ace.IRange, reverse?: boolean) => void;
+ }
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Anchor = import("ace-code/src/anchor").Anchor;
+ export type Point = import("ace-code").Ace.Point;
+ import { Range } from "ace-code/src/range";
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ type MultiSelectionEvents = import("ace-code").Ace.MultiSelectionEvents;
+ type MultiSelectProperties = import("ace-code").Ace.MultiSelectProperties;
+ }
+ export interface Selection extends Ace.EventEmitter, Ace.MultiSelectProperties {
+ }
+}
+declare module "ace-code/src/clipboard" {
+ export let lineMode: string | false;
+ export function pasteCancelled(): boolean;
+ export function cancel(): void;
+}
+declare module "ace-code/src/keyboard/textinput" {
+ export function $setUserAgentForTests(_isMobile: any, _isIOS: any): void;
+ export var TextInput: any;
+}
+declare module "ace-code/src/mouse/mouse_event" {
+ export class MouseEvent {
+ constructor(domEvent: any, editor: any);
+ speed: number;
+ wheelX: number;
+ wheelY: number;
+ domEvent: any;
+ editor: any;
+ x: any;
+ clientX: any;
+ y: any;
+ clientY: any;
+ propagationStopped: boolean;
+ defaultPrevented: boolean;
+ stopPropagation(): void;
+ preventDefault(): void;
+ stop(): void;
+ /**
+ * Get the document position below the mouse cursor
+ *
+ * @return {Object} 'row' and 'column' of the document position
+ */
+ getDocumentPosition(): any;
+ /**
+ * Get the relative position within the gutter.
+ *
+ * @return {Number} 'row' within the gutter.
+ */
+ getGutterRow(): number;
+ /**
+ * Check if the mouse cursor is inside of the text selection
+ *
+ * @return {Boolean} whether the mouse cursor is inside of the selection
+ */
+ inSelection(): boolean;
+ /**
+ * Get the clicked mouse button
+ *
+ * @return {Number} 0 for left button, 1 for middle button, 2 for right button
+ */
+ getButton(): number;
+ /**
+ * @return {Boolean} whether the shift key was pressed when the event was emitted
+ */
+ getShiftKey(): boolean;
+ getAccelKey(): any;
+ time?: number;
+ }
+ export interface MouseEvent {
+ time?: number;
+ }
+}
+declare module "ace-code/src/mouse/default_handlers" {
+ export type MouseHandler = import("ace-code/src/mouse/mouse_handler").MouseHandler;
+ export type MouseEvent = import("ace-code/src/mouse/mouse_event").MouseEvent;
+ export class DefaultHandlers {
+ constructor(mouseHandler: MouseHandler);
+ onMouseDown(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, ev: MouseEvent): void;
+ mousedownEvent: import("ace-code/src/mouse/mouse_event").MouseEvent;
+ startSelect(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, pos?: import("ace-code").Ace.Position, waitForClickSelection?: boolean): void;
+ select(this: import("ace-code/src/mouse/mouse_handler").MouseHandler): void;
+ extendSelectionBy(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, unitName: string | number): void;
+ selectByLinesEnd(this: import("ace-code/src/mouse/mouse_handler").MouseHandler): void;
+ focusWait(this: import("ace-code/src/mouse/mouse_handler").MouseHandler): void;
+ onDoubleClick(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, ev: MouseEvent): void;
+ onTripleClick(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, ev: MouseEvent): void;
+ onQuadClick(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, ev: MouseEvent): void;
+ onMouseWheel(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, ev: MouseEvent): void;
+ selectEnd: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler) => void;
+ selectAllEnd: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler) => void;
+ selectByWordsEnd: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler) => void;
+ }
+}
+declare module "ace-code/src/tooltip" {
+ export class HoverTooltip extends Tooltip {
+ constructor(parentNode?: HTMLElement);
+ timeout: number;
+ lastT: number;
+ idleTime: number;
+ lastEvent: import("ace-code/src/mouse/mouse_event").MouseEvent;
+ waitForHover(): void;
+ addToEditor(editor: Editor): void;
+ removeFromEditor(editor: Editor): void;
+ isOutsideOfText(e: MouseEvent): boolean;
+ setDataProvider(value: (event: MouseEvent, editor: Editor) => void): void;
+ showForRange(editor: Editor, range: Range, domNode: HTMLElement, startingEvent: MouseEvent): void;
+ range: Range;
+ addMarker(range: Range, session?: EditSession): void;
+ marker: number;
+ row: number;
+ }
+ export type Editor = import("ace-code/src/editor").Editor;
+ export type MouseEvent = import("ace-code/src/mouse/mouse_event").MouseEvent;
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export var popupManager: PopupManager;
+ export class Tooltip {
+ constructor(parentNode: Element);
+ isOpen: boolean;
+ getElement(): HTMLElement;
+ setText(text: string): void;
+ setHtml(html: string): void;
+ setPosition(x: number, y: number): void;
+ setClassName(className: string): void;
+ setTheme(theme: import("ace-code").Ace.Theme): void;
+ show(text?: string, x?: number, y?: number): void;
+ hide(e: any): void;
+ getHeight(): number;
+ getWidth(): number;
+ destroy(): void;
+ }
+ import { Range } from "ace-code/src/range";
+ class PopupManager {
+ popups: Tooltip[];
+ addPopup(popup: Tooltip): void;
+ removePopup(popup: Tooltip): void;
+ updatePopups(): void;
+ doPopupsOverlap(popupA: Tooltip, popupB: Tooltip): boolean;
+ }
+ export interface HoverTooltip {
+ row: number;
+ }
+}
+declare module "ace-code/src/mouse/default_gutter_handler" {
+ export function GutterHandler(this: import("ace-code/src/mouse/mouse_handler").MouseHandler, mouseHandler: MouseHandler): void;
+ export interface GutterHandler {
+ }
+ export type MouseHandler = import("ace-code/src/mouse/mouse_handler").MouseHandler;
+ export class GutterTooltip extends Tooltip {
+ static get annotationLabels(): {
+ error: {
+ singular: any;
+ plural: any;
+ };
+ security: {
+ singular: any;
+ plural: any;
+ };
+ warning: {
+ singular: any;
+ plural: any;
+ };
+ info: {
+ singular: any;
+ plural: any;
+ };
+ hint: {
+ singular: any;
+ plural: any;
+ };
+ };
+ static annotationsToSummaryString(annotations: any): string;
+ constructor(editor: any);
+ editor: any;
+ setPosition(x: any, y: any): void;
+ showTooltip(row: any): void;
+ hideTooltip(): void;
+ }
+ import { Tooltip } from "ace-code/src/tooltip";
+ export interface GutterHandler {
+ }
+}
+declare module "ace-code/src/mouse/dragdrop_handler" {
+ export type MouseHandler = import("ace-code/src/mouse/mouse_handler").MouseHandler;
+ export function DragdropHandler(mouseHandler: MouseHandler): void;
+ export class DragdropHandler {
+ constructor(mouseHandler: MouseHandler);
+ onDragStart: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler, e: any) => any;
+ onDragEnd: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler, e: any) => any;
+ onDragEnter: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler, e: any) => any;
+ onDragOver: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler, e: any) => any;
+ onDragLeave: (e: any) => void;
+ onDrop: (this: import("ace-code/src/mouse/mouse_handler").MouseHandler, e: any) => any;
+ }
+}
+declare module "ace-code/src/mouse/touch_handler" {
+ export function addTouchListeners(el: any, editor: any): void;
+}
+declare module "ace-code/src/mouse/mouse_handler" {
+ export class MouseHandler {
+ constructor(editor: Editor);
+ mouseEvent: MouseEvent;
+ editor: import("ace-code/src/editor").Editor;
+ onMouseEvent(name: any, e: any): void;
+ onMouseMove(name: any, e: any): void;
+ onMouseWheel(name: any, e: {
+ wheelX: number;
+ wheelY: number;
+ }): void;
+ setState(state: any): void;
+ state: any;
+ captureMouse(ev: any, mouseMoveHandler: any): number;
+ x: any;
+ y: any;
+ isMousePressed: boolean;
+ releaseMouse: (e: any) => void;
+ cancelContextMenu(): void;
+ destroy(): void;
+ cancelDrag?: boolean;
+ mousedownEvent?: import("ace-code").Ace.MouseEvent;
+ startSelect?: (pos?: import("ace-code").Ace.Point, waitForClickSelection?: boolean) => void;
+ select?: () => void;
+ selectEnd?: () => void;
+ }
+ export type Editor = import("ace-code/src/editor").Editor;
+ import { MouseEvent } from "ace-code/src/mouse/mouse_event";
+ namespace Ace {
+ type Range = import("ace-code").Ace.Range;
+ type MouseEvent = import("ace-code").Ace.MouseEvent;
+ type Point = import("ace-code").Ace.Point;
+ }
+ export interface MouseHandler {
+ cancelDrag?: boolean;
+ mousedownEvent?: Ace.MouseEvent;
+ startSelect?: (pos?: Ace.Point, waitForClickSelection?: boolean) => void;
+ select?: () => void;
+ selectEnd?: () => void;
+ }
+}
+declare module "ace-code/src/mouse/fold_handler" {
+ export class FoldHandler {
+ constructor(editor: any);
+ }
+}
+declare module "ace-code/src/keyboard/keybinding" {
+ export type Editor = import("ace-code/src/editor").Editor;
+ export type KeyboardHandler = import("ace-code").Ace.KeyboardHandler;
+ export class KeyBinding {
+ constructor(editor: Editor);
+ setDefaultHandler(kb: KeyboardHandler): void;
+ setKeyboardHandler(kb: KeyboardHandler): void;
+ addKeyboardHandler(kb?: KeyboardHandler & {
+ attach?: (editor: any) => void;
+ detach?: (editor: any) => void;
+ }, pos?: number): void;
+ removeKeyboardHandler(kb: KeyboardHandler & {
+ attach?: (editor: any) => void;
+ detach?: (editor: any) => void;
+ }): boolean;
+ getKeyboardHandler(): KeyboardHandler;
+ getStatusText(): string;
+ }
+}
+declare module "ace-code/src/search" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type SearchOptions = import("ace-code").Ace.SearchOptions;
+ /**
+ * A class designed to handle all sorts of text searches within a [[Document `Document`]].
+ **/
+ export class Search {
+ /**
+ * Sets the search options via the `options` parameter.
+ * @param {Partial} options An object containing all the new search properties
+ * @chainable
+ **/
+ set(options: Partial): Search;
+ /**
+ * [Returns an object containing all the search options.]{: #Search.getOptions}
+ **/
+ getOptions(): Partial;
+ /**
+ * Sets the search options via the `options` parameter.
+ * @param {Partial} options object containing all the search propertie
+ * @related Search.set
+ **/
+ setOptions(options: Partial): void;
+ /**
+ * Searches for `options.needle`. If found, this method returns the [[Range `Range`]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
+ * @param {EditSession} session The session to search with
+ **/
+ find(session: EditSession): Range | false;
+ /**
+ * Searches for all occurrances `options.needle`. If found, this method returns an array of [[Range `Range`s]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
+ * @param {EditSession} session The session to search with
+ **/
+ findAll(session: EditSession): Range[];
+ /**
+ * Searches for `options.needle` in `input`, and, if found, replaces it with `replacement`.
+ * @param {String} input The text to search in
+ * @param {any} replacement The replacing text
+ * + (String): If `options.regExp` is `true`, this function returns `input` with the replacement already made. Otherwise, this function just returns `replacement`.
+ * If `options.needle` was not found, this function returns `null`.
+ *
+ *
+ **/
+ replace(input: string, replacement: any): string;
+ }
+ import { Range } from "ace-code/src/range";
+}
+declare module "ace-code/src/keyboard/hash_handler" {
+ export type Command = import("ace-code").Ace.Command;
+ export type CommandLike = import("ace-code").Ace.CommandLike;
+ export class HashHandler extends MultiHashHandler {
+ }
+ export namespace HashHandler {
+ function call(thisArg: any, config: any, platform: any): void;
+ }
+ export class MultiHashHandler {
+ constructor(config?: Record | Command[], platform?: string);
+ platform: string;
+ commands: Record;
+ commandKeyBinding: {};
+ addCommand(command: Command): void;
+ removeCommand(command: Command | string, keepCommand?: boolean): void;
+ bindKey(key: string | {
+ win?: string;
+ mac?: string;
+ position?: number;
+ }, command: CommandLike | string, position?: number): void;
+ addCommands(commands?: Record | Command[]): void;
+ removeCommands(commands: Record): void;
+ bindKeys(keyList: Record): void;
+ /**
+ * Accepts keys in the form ctrl+Enter or ctrl-Enter
+ * keys without modifiers or shift only
+ */
+ parseKeys(keys: string): {
+ key: string;
+ hashId: number;
+ } | false;
+ findKeyCommand(hashId: number, keyString: string): Command;
+ handleKeyboard(data: any, hashId: number, keyString: string, keyCode: number): {
+ command: string;
+ } | void;
+ getStatusText(editor?: any, data?: any): string;
+ }
+ export namespace MultiHashHandler {
+ function call(thisArg: any, config: any, platform: any): void;
+ }
+}
+declare module "ace-code/src/commands/command_manager" {
+ const CommandManager_base: typeof MultiHashHandler;
+ export class CommandManager extends MultiHashHandler {
+ /**
+ * new CommandManager(platform, commands)
+ * @param {String} platform Identifier for the platform; must be either `"mac"` or `"win"`
+ * @param {any[]} commands A list of commands
+ **/
+ constructor(platform: string, commands: any[]);
+ byName: Record;
+ exec(command: string | string[] | import("ace-code").Ace.Command, editor: Editor, args: any): boolean;
+ canExecute(command: string | import("ace-code").Ace.Command, editor: Editor): boolean;
+ toggleRecording(editor: Editor): boolean;
+ macro: any;
+ recording: boolean;
+ oldMacro: any;
+ replay(editor: Editor): boolean;
+ trimMacro(m: any): any;
+ }
+ export type Editor = import("ace-code/src/editor").Editor;
+ import { MultiHashHandler } from "ace-code/src/keyboard/hash_handler";
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ }
+ export interface CommandManager extends Ace
+ .EventEmitter {
+ }
+}
+declare module "ace-code/src/commands/default_commands" {
+ export const commands: import("ace-code").Ace.Command[];
+}
+declare module "ace-code/src/token_iterator" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ /**
+ * This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
+ **/
+ export class TokenIterator {
+ /**
+ * Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
+ * @param {EditSession} session The session to associate with
+ * @param {Number} initialRow The row to start the tokenizing at
+ * @param {Number} initialColumn The column to start the tokenizing at
+ **/
+ constructor(session: EditSession, initialRow: number, initialColumn: number);
+ /**
+ * Moves iterator position to the start of previous token.
+ **/
+ stepBackward(): import("ace-code").Ace.Token | null;
+ /**
+ * Moves iterator position to the start of next token.
+ **/
+ stepForward(): import("ace-code").Ace.Token | null;
+ /**
+ *
+ * Returns current token.
+ **/
+ getCurrentToken(): import("ace-code").Ace.Token;
+ /**
+ *
+ * Returns the current row.
+ **/
+ getCurrentTokenRow(): number;
+ /**
+ *
+ * Returns the current column.
+ **/
+ getCurrentTokenColumn(): number;
+ /**
+ * Return the current token position.
+ */
+ getCurrentTokenPosition(): import("ace-code").Ace.Point;
+ /**
+ * Return the current token range.
+ */
+ getCurrentTokenRange(): Range;
+ }
+ import { Range } from "ace-code/src/range";
+}
+declare module "ace-code/src/keyboard/gutter_handler" {
+ export class GutterKeyboardHandler {
+ constructor(editor: any);
+ editor: any;
+ gutterLayer: any;
+ element: any;
+ lines: any;
+ activeRowIndex: any;
+ activeLane: string;
+ annotationTooltip: GutterTooltip;
+ addListener(): void;
+ removeListener(): void;
+ lane: any;
+ }
+ export class GutterKeyboardEvent {
+ constructor(domEvent: any, gutterKeyboardHandler: any);
+ gutterKeyboardHandler: any;
+ domEvent: any;
+ /**
+ * Returns the key that was presssed.
+ *
+ * @return {string} the key that was pressed.
+ */
+ getKey(): string;
+ /**
+ * Returns the row in the gutter that was focused after the keyboard event was handled.
+ *
+ * @return {number} the key that was pressed.
+ */
+ getRow(): number;
+ /**
+ * Returns whether focus is on the annotation lane after the keyboard event was handled.
+ *
+ * @return {boolean} true if focus was on the annotation lane after the keyboard event.
+ */
+ isInAnnotationLane(): boolean;
+ /**
+ * Returns whether focus is on the fold lane after the keyboard event was handled.
+ *
+ * @return {boolean} true if focus was on the fold lane after the keyboard event.
+ */
+ isInFoldLane(): boolean;
+ }
+ import { GutterTooltip } from "ace-code/src/mouse/default_gutter_handler";
+}
+declare module "ace-code/src/editor" {
+ /**
+ * The main entry point into the Ace functionality.
+ *
+ * The `Editor` manages the [[EditSession]] (which manages [[Document]]s), as well as the [[VirtualRenderer]], which draws everything to the screen.
+ *
+ * Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them.
+ **/
+ export class Editor {
+ /**
+ * Creates a new `Editor` object.
+ *
+ * @param {VirtualRenderer} renderer Associated `VirtualRenderer` that draws everything
+ * @param {EditSession} [session] The `EditSession` to refer to
+ * @param {Partial} [options] The default options
+ **/
+ constructor(renderer: VirtualRenderer, session?: EditSession, options?: Partial);
+ session: EditSession;
+ container: HTMLElement & {
+ env?: any;
+ value?: any;
+ };
+ renderer: VirtualRenderer;
+ id: string;
+ commands: CommandManager;
+ textInput: any;
+ keyBinding: KeyBinding;
+ startOperation(commandEvent: any): void;
+ /**
+ * @arg e
+ */
+ endOperation(e: any): void;
+ onStartOperation(commandEvent: any): void;
+ curOp: {};
+ prevOp: {};
+ previousCommand: any;
+ /**
+ * @arg e
+ */
+ onEndOperation(e: any): void;
+ mergeNextCommand: boolean;
+ sequenceStartTime: number;
+ /**
+ * Sets a new key handler, such as "vim" or "windows".
+ * @param {String | import("ace-code").Ace.KeyboardHandler | null} keyboardHandler The new key handler
+ **/
+ setKeyboardHandler(keyboardHandler: string | import("ace-code").Ace.KeyboardHandler | null, cb?: () => void): void;
+ /**
+ * Returns the keyboard handler, such as "vim" or "windows".
+ **/
+ getKeyboardHandler(): any;
+ /**
+ * Sets a new editsession to use. This method also emits the `'changeSession'` event.
+ * @param {EditSession} [session] The new session to use
+ **/
+ setSession(session?: EditSession): void;
+ selection: import("ace-code/src/selection").Selection;
+ /**
+ * Returns the current session being used.
+ **/
+ getSession(): EditSession;
+ /**
+ * Sets the current document to `val`.
+ * @param {String} val The new value to set for the document
+ * @param {Number} [cursorPos] Where to set the new value. `undefined` or 0 is selectAll, -1 is at the document start, and 1 is at the end
+ *
+ * @returns {String} The current document value
+ * @related Document.setValue
+ **/
+ setValue(val: string, cursorPos?: number): string;
+ /**
+ * Returns the current session's content.
+ *
+ * @related EditSession.getValue
+ **/
+ getValue(): string;
+ /**
+ *
+ * Returns the currently highlighted selection.
+ * @returns {Selection} The selection object
+ **/
+ getSelection(): Selection;
+ /**
+ * {:VirtualRenderer.onResize}
+ * @param {Boolean} [force] If `true`, recomputes the size, even if the height and width haven't changed
+ * @related VirtualRenderer.onResize
+ **/
+ resize(force?: boolean): void;
+ /**
+ * {:VirtualRenderer.setTheme}
+ * @param {string | import("ace-code").Ace.Theme} theme The path to a theme
+ * @param {() => void} [cb] optional callback called when theme is loaded
+ **/
+ setTheme(theme: string | import("ace-code").Ace.Theme, cb?: () => void): void;
+ /**
+ * {:VirtualRenderer.getTheme}
+ *
+ * @returns {String} The set theme
+ * @related VirtualRenderer.getTheme
+ **/
+ getTheme(): string;
+ /**
+ * {:VirtualRenderer.setStyle}
+ * @param {String} style A class name
+ * @related VirtualRenderer.setStyle
+ **/
+ setStyle(style: string): void;
+ /**
+ * {:VirtualRenderer.unsetStyle}
+ * @related VirtualRenderer.unsetStyle
+ */
+ unsetStyle(style: string): void;
+ /**
+ * Gets the current font size of the editor text.
+ */
+ getFontSize(): string | number;
+ /**
+ * Set a new font size (in pixels) for the editor text.
+ * @param {String | number} size A font size ( _e.g._ "12px")
+ **/
+ setFontSize(size: string | number): void;
+ /**
+ *
+ * Brings the current `textInput` into focus.
+ **/
+ focus(): void;
+ /**
+ * Returns `true` if the current `textInput` is in focus.
+ **/
+ isFocused(): boolean;
+ /**
+ *
+ * Blurs the current `textInput`.
+ **/
+ blur(): void;
+ /**
+ * Returns the string of text currently highlighted.
+ **/
+ getCopyText(): string;
+ execCommand(command: string | string[], args?: any): boolean;
+ /**
+ * Inserts `text` into wherever the cursor is pointing.
+ * @param {String} text The new text to add
+ **/
+ insert(text: string, pasted?: boolean): void;
+ autoIndent(): void;
+ applyComposition(text?: string, composition?: any): void;
+ /**
+ * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emits the `changeOverwrite` event.
+ * @param {Boolean} overwrite Defines whether or not to set overwrites
+ * @related EditSession.setOverwrite
+ **/
+ setOverwrite(overwrite: boolean): void;
+ /**
+ * Returns `true` if overwrites are enabled; `false` otherwise.
+ * @related EditSession.getOverwrite
+ **/
+ getOverwrite(): boolean;
+ /**
+ * Sets the value of overwrite to the opposite of whatever it currently is.
+ * @related EditSession.toggleOverwrite
+ **/
+ toggleOverwrite(): void;
+ /**
+ * Sets how fast the mouse scrolling should do.
+ * @param {Number} speed A value indicating the new speed (in milliseconds)
+ **/
+ setScrollSpeed(speed: number): void;
+ /**
+ * Returns the value indicating how fast the mouse scroll speed is (in milliseconds).
+ **/
+ getScrollSpeed(): number;
+ /**
+ * Sets the delay (in milliseconds) of the mouse drag.
+ * @param {Number} dragDelay A value indicating the new delay
+ **/
+ setDragDelay(dragDelay: number): void;
+ /**
+ * Returns the current mouse drag delay.
+ **/
+ getDragDelay(): number;
+ /**
+ * Draw selection markers spanning whole line, or only over selected text. Default value is "line"
+ * @param {"fullLine" | "screenLine" | "text" | "line"} val The new selection style "line"|"text"
+ **/
+ setSelectionStyle(val: "fullLine" | "screenLine" | "text" | "line"): void;
+ /**
+ * Returns the current selection style.
+ **/
+ getSelectionStyle(): import("ace-code").Ace.EditorOptions["selectionStyle"];
+ /**
+ * Determines whether or not the current line should be highlighted.
+ * @param {Boolean} shouldHighlight Set to `true` to highlight the current line
+ **/
+ setHighlightActiveLine(shouldHighlight: boolean): void;
+ /**
+ * Returns `true` if current lines are always highlighted.
+ **/
+ getHighlightActiveLine(): boolean;
+ setHighlightGutterLine(shouldHighlight: boolean): void;
+ getHighlightGutterLine(): boolean;
+ /**
+ * Determines if the currently selected word should be highlighted.
+ * @param {Boolean} shouldHighlight Set to `true` to highlight the currently selected word
+ **/
+ setHighlightSelectedWord(shouldHighlight: boolean): void;
+ /**
+ * Returns `true` if currently highlighted words are to be highlighted.
+ **/
+ getHighlightSelectedWord(): boolean;
+ setAnimatedScroll(shouldAnimate: boolean): void;
+ getAnimatedScroll(): boolean;
+ /**
+ * If `showInvisibles` is set to `true`, invisible characters—like spaces or new lines—are show in the editor.
+ * @param {Boolean} showInvisibles Specifies whether or not to show invisible characters
+ **/
+ setShowInvisibles(showInvisibles: boolean): void;
+ /**
+ * Returns `true` if invisible characters are being shown.
+ **/
+ getShowInvisibles(): boolean;
+ setDisplayIndentGuides(display: boolean): void;
+ getDisplayIndentGuides(): boolean;
+ setHighlightIndentGuides(highlight: boolean): void;
+ getHighlightIndentGuides(): boolean;
+ /**
+ * If `showPrintMargin` is set to `true`, the print margin is shown in the editor.
+ * @param {Boolean} showPrintMargin Specifies whether or not to show the print margin
+ *
+ **/
+ setShowPrintMargin(showPrintMargin: boolean): void;
+ /**
+ * Returns `true` if the print margin is being shown.
+ **/
+ getShowPrintMargin(): boolean;
+ /**
+ * Sets the column defining where the print margin should be.
+ * @param {Number} showPrintMargin Specifies the new print margin
+ *
+ **/
+ setPrintMarginColumn(showPrintMargin: number): void;
+ /**
+ * Returns the column number of where the print margin is.
+ **/
+ getPrintMarginColumn(): number;
+ /**
+ * If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change.
+ * @param {Boolean} readOnly Specifies whether the editor can be modified or not
+ **/
+ setReadOnly(readOnly: boolean): void;
+ /**
+ * Returns `true` if the editor is set to read-only mode.
+ **/
+ getReadOnly(): boolean;
+ /**
+ * Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef}
+ * @param {Boolean} enabled Enables or disables behaviors
+ **/
+ setBehavioursEnabled(enabled: boolean): void;
+ /**
+ * Returns `true` if the behaviors are currently enabled. {:BehaviorsDef}
+ **/
+ getBehavioursEnabled(): boolean;
+ /**
+ * Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
+ * when such a character is typed in.
+ * @param {Boolean} enabled Enables or disables wrapping behaviors
+ **/
+ setWrapBehavioursEnabled(enabled: boolean): void;
+ /**
+ * Returns `true` if the wrapping behaviors are currently enabled.
+ **/
+ getWrapBehavioursEnabled(): boolean;
+ /**
+ * Indicates whether the fold widgets should be shown or not.
+ * @param {Boolean} show Specifies whether the fold widgets are shown
+ **/
+ setShowFoldWidgets(show: boolean): void;
+ /**
+ * Returns `true` if the fold widgets are shown.
+ **/
+ getShowFoldWidgets(): boolean;
+ setFadeFoldWidgets(fade: boolean): void;
+ getFadeFoldWidgets(): boolean;
+ /**
+ * Removes the current selection or one character.
+ * @param {'left' | 'right'} [dir] The direction of the deletion to occur, either "left" or "right"
+ **/
+ remove(dir?: "left" | "right"): void;
+ /**
+ * Removes the word directly to the right of the current selection.
+ **/
+ removeWordRight(): void;
+ /**
+ * Removes the word directly to the left of the current selection.
+ **/
+ removeWordLeft(): void;
+ /**
+ * Removes all the words to the left of the current selection, until the start of the line.
+ **/
+ removeToLineStart(): void;
+ /**
+ * Removes all the words to the right of the current selection, until the end of the line.
+ **/
+ removeToLineEnd(): void;
+ /**
+ * Splits the line at the current selection (by inserting an `'\n'`).
+ **/
+ splitLine(): void;
+ /**
+ * Set the "ghost" text in provided position. "Ghost" text is a kind of
+ * preview text inside the editor which can be used to preview some code
+ * inline in the editor such as, for example, code completions.
+ *
+ * @param {String} text Text to be inserted as "ghost" text
+ * @param {Point} [position] Position to insert text to
+ */
+ setGhostText(text: string, position?: Point): void;
+ /**
+ * Removes "ghost" text currently displayed in the editor.
+ */
+ removeGhostText(): void;
+ /**
+ * Transposes current line.
+ **/
+ transposeLetters(): void;
+ /**
+ * Converts the current selection entirely into lowercase.
+ **/
+ toLowerCase(): void;
+ /**
+ * Converts the current selection entirely into uppercase.
+ **/
+ toUpperCase(): void;
+ /**
+ * Inserts an indentation into the current cursor position or indents the selected lines.
+ *
+ * @related EditSession.indentRows
+ **/
+ indent(): void;
+ /**
+ * Indents the current line.
+ * @related EditSession.indentRows
+ **/
+ blockIndent(): void;
+ /**
+ * Outdents the current line.
+ * @related EditSession.outdentRows
+ **/
+ blockOutdent(): void;
+ sortLines(): void;
+ /**
+ * Given the currently selected range, this function either comments all the lines, or uncomments all of them.
+ **/
+ toggleCommentLines(): void;
+ toggleBlockComment(): void;
+ /**
+ * Works like [[EditSession.getTokenAt]], except it returns a number.
+ **/
+ getNumberAt(row: any, column: any): any;
+ /**
+ * If the character before the cursor is a number, this functions changes its value by `amount`.
+ * @param {Number} amount The value to change the numeral by (can be negative to decrease value)
+ **/
+ modifyNumber(amount: number): void;
+ toggleWord(): void;
+ /**
+ * Finds link at defined {row} and {column}
+ **/
+ findLinkAt(row: any, column: any): string;
+ /**
+ * Open valid url under cursor in another tab
+ **/
+ openLink(): boolean;
+ /**
+ * Removes all the lines in the current selection
+ * @related EditSession.remove
+ **/
+ removeLines(): void;
+ duplicateSelection(): void;
+ /**
+ * Shifts all the selected lines down one row.
+ *
+ * @related EditSession.moveLinesUp
+ **/
+ moveLinesDown(): void;
+ /**
+ * Shifts all the selected lines up one row.
+ * @related EditSession.moveLinesDown
+ **/
+ moveLinesUp(): void;
+ /**
+ * Moves a range of text from the given range to the given position. `toPosition` is an object that looks like this:
+ * ```json
+ * { row: newRowLocation, column: newColumnLocation }
+ * ```
+ * @param {Range} range The range of text you want moved within the document
+ * @param {Point} toPosition The location (row and column) where you want to move the text to
+ *
+ * @returns {Range} The new range where the text was moved to.
+ * @related EditSession.moveText
+ **/
+ moveText(range: Range, toPosition: Point, copy?: boolean): Range;
+ /**
+ * Copies all the selected lines up one row.
+ *
+ **/
+ copyLinesUp(): void;
+ /**
+ * Copies all the selected lines down one row.
+ * @related EditSession.duplicateLines
+ *
+ **/
+ copyLinesDown(): void;
+ inVirtualSelectionMode: boolean;
+ /**
+ * {:VirtualRenderer.getFirstVisibleRow}
+ *
+ * @related VirtualRenderer.getFirstVisibleRow
+ **/
+ getFirstVisibleRow(): number;
+ /**
+ * {:VirtualRenderer.getLastVisibleRow}
+ *
+ * @related VirtualRenderer.getLastVisibleRow
+ **/
+ getLastVisibleRow(): number;
+ /**
+ * Indicates if the row is currently visible on the screen.
+ * @param {Number} row The row to check
+ *
+ **/
+ isRowVisible(row: number): boolean;
+ /**
+ * Indicates if the entire row is currently visible on the screen.
+ * @param {Number} row The row to check
+ *
+ *
+ **/
+ isRowFullyVisible(row: number): boolean;
+ /**
+ * Selects the text from the current position of the document until where a "page down" finishes.
+ **/
+ selectPageDown(): void;
+ /**
+ * Selects the text from the current position of the document until where a "page up" finishes.
+ **/
+ selectPageUp(): void;
+ /**
+ * Shifts the document to wherever "page down" is, as well as moving the cursor position.
+ **/
+ gotoPageDown(): void;
+ /**
+ * Shifts the document to wherever "page up" is, as well as moving the cursor position.
+ **/
+ gotoPageUp(): void;
+ /**
+ * Scrolls the document to wherever "page down" is, without changing the cursor position.
+ **/
+ scrollPageDown(): void;
+ /**
+ * Scrolls the document to wherever "page up" is, without changing the cursor position.
+ **/
+ scrollPageUp(): void;
+ /**
+ * Moves the editor to the specified row.
+ * @related VirtualRenderer.scrollToRow
+ */
+ scrollToRow(row: number): void;
+ /**
+ * Scrolls to a line. If `center` is `true`, it puts the line in middle of screen (or attempts to).
+ * @param {Number} line The line to scroll to
+ * @param {Boolean} center If `true`
+ * @param {Boolean} animate If `true` animates scrolling
+ * @param {() => void} [callback] Function to be called when the animation has finished
+ *
+ * @related VirtualRenderer.scrollToLine
+ **/
+ scrollToLine(line: number, center: boolean, animate: boolean, callback?: () => void): void;
+ /**
+ * Attempts to center the current selection on the screen.
+ **/
+ centerSelection(): void;
+ /**
+ * Gets the current position of the cursor.
+ * @returns {Point} An object that looks something like this:
+ *
+ * ```json
+ * { row: currRow, column: currCol }
+ * ```
+ *
+ * @related Selection.getCursor
+ **/
+ getCursorPosition(): Point;
+ /**
+ * Returns the screen position of the cursor.
+ * @related EditSession.documentToScreenPosition
+ **/
+ getCursorPositionScreen(): Point;
+ /**
+ * {:Selection.getRange}
+ * @related Selection.getRange
+ **/
+ getSelectionRange(): Range;
+ /**
+ * Selects all the text in editor.
+ * @related Selection.selectAll
+ **/
+ selectAll(): void;
+ /**
+ * {:Selection.clearSelection}
+ * @related Selection.clearSelection
+ **/
+ clearSelection(): void;
+ /**
+ * Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
+ * @param {Number} row The new row number
+ * @param {Number} column The new column number
+ * @related Selection.moveCursorTo
+ **/
+ moveCursorTo(row: number, column: number): void;
+ /**
+ * Moves the cursor to the position indicated by `pos.row` and `pos.column`.
+ * @param {Point} pos An object with two properties, row and column
+ * @related Selection.moveCursorToPosition
+ **/
+ moveCursorToPosition(pos: Point): void;
+ /**
+ * Moves the cursor's row and column to the next matching bracket or HTML tag.
+ */
+ jumpToMatching(select?: boolean, expand?: boolean): void;
+ /**
+ * Moves the cursor to the specified line number, and also into the indicated column.
+ * @param {Number} lineNumber The line number to go to
+ * @param {Number} [column] A column number to go to
+ * @param {Boolean} [animate] If `true` animates scolling
+ **/
+ gotoLine(lineNumber: number, column?: number, animate?: boolean): void;
+ /**
+ * Moves the cursor to the specified row and column. Note that this does de-select the current selection.
+ * @param {Number} row The new row number
+ * @param {Number} column The new column number
+ *
+ * @related Editor.moveCursorTo
+ **/
+ navigateTo(row: number, column: number): void;
+ /**
+ * Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} [times] The number of times to change navigation
+ *
+ **/
+ navigateUp(times?: number): void;
+ /**
+ * Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} [times] The number of times to change navigation
+ *
+ **/
+ navigateDown(times?: number): void;
+ /**
+ * Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} [times] The number of times to change navigation
+ *
+ **/
+ navigateLeft(times?: number): void;
+ /**
+ * Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} [times] The number of times to change navigation
+ *
+ **/
+ navigateRight(times?: number): void;
+ /**
+ *
+ * Moves the cursor to the start of the current line. Note that this does de-select the current selection.
+ **/
+ navigateLineStart(): void;
+ /**
+ *
+ * Moves the cursor to the end of the current line. Note that this does de-select the current selection.
+ **/
+ navigateLineEnd(): void;
+ /**
+ *
+ * Moves the cursor to the end of the current file. Note that this does de-select the current selection.
+ **/
+ navigateFileEnd(): void;
+ /**
+ *
+ * Moves the cursor to the start of the current file. Note that this does de-select the current selection.
+ **/
+ navigateFileStart(): void;
+ /**
+ *
+ * Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
+ **/
+ navigateWordRight(): void;
+ /**
+ *
+ * Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
+ **/
+ navigateWordLeft(): void;
+ /**
+ * Replaces the first occurrence of `options.needle` with the value in `replacement`.
+ * @param {String} [replacement] The text to replace with
+ * @param {Partial} [options] The [[Search `Search`]] options to use
+ **/
+ replace(replacement?: string, options?: Partial): number;
+ /**
+ * Replaces all occurrences of `options.needle` with the value in `replacement`.
+ * @param {String} [replacement] The text to replace with
+ * @param {Partial} [options] The [[Search `Search`]] options to use
+ **/
+ replaceAll(replacement?: string, options?: Partial): number;
+ /**
+ * {:Search.getOptions} For more information on `options`, see [[Search `Search`]].
+ * @related Search.getOptions
+ **/
+ getLastSearchOptions(): Partial;
+ /**
+ * Attempts to find `needle` within the document. For more information on `options`, see [[Search `Search`]].
+ * @param {String|RegExp|Object} needle The text to search for (optional)
+ * @param {Partial} [options] An object defining various search properties
+ * @param {Boolean} [animate] If `true` animate scrolling
+ * @related Search.find
+ **/
+ find(needle: string | RegExp | any, options?: Partial, animate?: boolean): false | Range;
+ /**
+ * Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]].
+ * @param {Partial} [options] search options
+ * @param {Boolean} [animate] If `true` animate scrolling
+ *
+ * @related Editor.find
+ **/
+ findNext(options?: Partial, animate?: boolean): void;
+ /**
+ * Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]].
+ * @param {Partial} [options] search options
+ * @param {Boolean} [animate] If `true` animate scrolling
+ *
+ * @related Editor.find
+ **/
+ findPrevious(options?: Partial, animate?: boolean): void;
+ revealRange(range: Range, animate?: boolean): void;
+ /**
+ * {:UndoManager.undo}
+ * @related UndoManager.undo
+ **/
+ undo(): void;
+ /**
+ * {:UndoManager.redo}
+ * @related UndoManager.redo
+ **/
+ redo(): void;
+ /**
+ *
+ * Cleans up the entire editor.
+ **/
+ destroy(): void;
+ /**
+ * Enables automatic scrolling of the cursor into view when editor itself is inside scrollable element
+ * @param {Boolean} enable default true
+ **/
+ setAutoScrollEditorIntoView(enable: boolean): void;
+ /**
+ * opens a prompt displaying message
+ **/
+ prompt(message: any, options: any, callback: any): void;
+ env?: any;
+ widgetManager?: import("ace-code").Ace.LineWidgets;
+ completer?: import("ace-code").Ace.Autocomplete | import("ace-code").Ace.InlineAutocomplete;
+ completers: import("ace-code").Ace.Completer[];
+ showKeyboardShortcuts?: () => void;
+ showSettingsMenu?: () => void;
+ searchBox?: import("ace-code").Ace.SearchBox;
+ }
+ export namespace Editor {
+ export { $uid };
+ }
+ export type VirtualRenderer = import("ace-code/src/virtual_renderer").VirtualRenderer;
+ export type Selection = import("ace-code/src/selection").Selection;
+ export type Point = import("ace-code").Ace.Point;
+ export type SearchOptions = import("ace-code").Ace.SearchOptions;
+ import { EditSession } from "ace-code/src/edit_session";
+ import { CommandManager } from "ace-code/src/commands/command_manager";
+ import { MouseHandler } from "ace-code/src/mouse/mouse_handler";
+ import { KeyBinding } from "ace-code/src/keyboard/keybinding";
+ import { Search } from "ace-code/src/search";
+ import { Range } from "ace-code/src/range";
+ var $uid: number;
+ namespace Ace {
+ type EditorMultiSelectProperties = import("ace-code").Ace.EditorMultiSelectProperties;
+ type OptionsProvider = import("ace-code").Ace.OptionsProvider;
+ type EditorOptions = import("ace-code").Ace.EditorOptions;
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ type EditorEvents = import("ace-code").Ace.EditorEvents;
+ type CodeLenseEditorExtension = import("ace-code").Ace.CodeLenseEditorExtension;
+ type ElasticTabstopsEditorExtension = import("ace-code").Ace.ElasticTabstopsEditorExtension;
+ type TextareaEditorExtension = import("ace-code").Ace.TextareaEditorExtension;
+ type PromptEditorExtension = import("ace-code").Ace.PromptEditorExtension;
+ type OptionsEditorExtension = import("ace-code").Ace.OptionsEditorExtension;
+ type EditSession = import("ace-code").Ace.EditSession;
+ type LineWidgets = import("ace-code").Ace.LineWidgets;
+ type Autocomplete = import("ace-code").Ace.Autocomplete;
+ type InlineAutocomplete = import("ace-code").Ace.InlineAutocomplete;
+ type Completer = import("ace-code").Ace.Completer;
+ type SearchBox = import("ace-code").Ace.SearchBox;
+ }
+ export interface Editor extends Ace.EditorMultiSelectProperties, Ace.OptionsProvider, Ace.EventEmitter, Ace.CodeLenseEditorExtension, Ace.ElasticTabstopsEditorExtension, Ace.TextareaEditorExtension, Ace.PromptEditorExtension, Ace.OptionsEditorExtension {
+ session: Ace.EditSession;
+ env?: any;
+ widgetManager?: Ace.LineWidgets;
+ completer?: Ace.Autocomplete | Ace.InlineAutocomplete;
+ completers: Ace.Completer[];
+ showKeyboardShortcuts?: () => void;
+ showSettingsMenu?: () => void;
+ searchBox?: Ace.SearchBox;
+ }
+}
+declare module "ace-code/src/undomanager" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Delta = import("ace-code").Ace.Delta;
+ export type Point = import("ace-code").Ace.Point;
+ export type IRange = import("ace-code").Ace.IRange;
+ /**
+ * This object maintains the undo stack for an [[EditSession `EditSession`]].
+ **/
+ export class UndoManager {
+ addSession(session: EditSession): void;
+ /**
+ * Provides a means for implementing your own undo manager. `options` has one property, `args`, an [[Array `Array`]], with two elements:
+ *
+ * - `args[0]` is an array of deltas
+ * - `args[1]` is the document to associate with
+ *
+ **/
+ add(delta: import("ace-code").Ace.Delta, allowMerge: boolean, session?: EditSession): void;
+ lastDeltas: any[];
+ addSelection(selection: any, rev?: number): void;
+ startNewGroup(): any;
+ markIgnored(from: number, to?: number): void;
+ getSelection(rev: number, after?: boolean): {
+ value: string;
+ rev: number;
+ };
+ getRevision(): number;
+ getDeltas(from: number, to?: number): import("ace-code").Ace.Delta[];
+ getChangedRanges(from: number, to?: number): void;
+ getChangedLines(from: number, to?: number): void;
+ /**
+ * [Perform an undo operation on the document, reverting the last change.]{: #UndoManager.undo}
+ **/
+ undo(session: EditSession, dontSelect?: boolean): void;
+ /**
+ * [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}
+ *
+ **/
+ redo(session: EditSession, dontSelect?: boolean): void;
+ /**
+ * Destroys the stack of undo and redo redo operations.
+ **/
+ reset(): void;
+ mark: number;
+ selections: any[];
+ /**
+ * Returns `true` if there are undo operations left to perform.
+ **/
+ canUndo(): boolean;
+ /**
+ * Returns `true` if there are redo operations left to perform.
+ **/
+ canRedo(): boolean;
+ /**
+ * Marks the current status clean
+ */
+ bookmark(rev?: number): void;
+ /**
+ * Returns if the current status is clean
+ **/
+ isAtBookmark(): boolean;
+ /**
+ * Returns an object which can be safely stringified into JSON
+ */
+ toJSON(): object;
+ /**
+ * Takes in an object which was returned from the toJSON method above,
+ * and resets the current undoManager instance to use the previously exported
+ * instance state.
+ */
+ fromJSON(json: object): void;
+ hasUndo: () => boolean;
+ hasRedo: () => boolean;
+ isClean: () => boolean;
+ markClean: (rev?: number) => void;
+ }
+}
+declare module "ace-code/src/tokenizer" {
+ /**
+ * This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see [the wiki on extending highlighters](https://github.com/ajaxorg/ace/wiki/Creating-or-Extending-an-Edit-Mode#wiki-extendingTheHighlighter).
+ **/
+ export class Tokenizer {
+ /**
+ * Constructs a new tokenizer based on the given rules and flags.
+ * @param {Object} rules The highlighting rules
+ **/
+ constructor(rules: any);
+ splitRegex: RegExp;
+ states: any;
+ regExps: {};
+ matchMappings: {};
+ removeCapturingGroups(src: string): string;
+ createSplitterRegexp(src: string, flag: string): RegExp;
+ /**
+ * Returns an object containing two properties: `tokens`, which contains all the tokens; and `state`, the current state.
+ */
+ getLineTokens(line: string, startState: string | string[]): {
+ tokens: import("ace-code").Ace.Token[];
+ state: string | string[];
+ };
+ reportError: (msg: any, data: any) => void;
+ }
+}
+declare module "ace-code/src/autocomplete/popup" {
+ /**
+ * This object is used in some places where needed to show popups - like prompt; autocomplete etc.
+ */
+ export class AcePopup {
+ /**
+ * Creates and renders single line editor in popup window. If `parentNode` param is isset, then attaching it to this element.
+ */
+ constructor(parentNode?: Element);
+ setSelectOnHover: (val: boolean) => void;
+ setRow: (line: number) => void;
+ getRow: () => number;
+ getHoveredRow: () => number;
+ filterText: string;
+ isOpen: boolean;
+ isTopdown: boolean;
+ autoSelect: boolean;
+ data: import("ace-code").Ace.Completion[];
+ setData: (data: import("ace-code").Ace.Completion[], filterText: string) => void;
+ getData: (row: number) => import("ace-code").Ace.Completion;
+ hide: () => void;
+ anchor: "top" | "bottom";
+ anchorPosition: import("ace-code").Ace.Point;
+ tryShow: (pos: any, lineHeight: number, anchor: "top" | "bottom", forceShow?: boolean) => boolean;
+ show: (pos: any, lineHeight: number, topdownOnly?: boolean) => void;
+ goTo: (where: import("ace-code").Ace.AcePopupNavigation) => void;
+ getTextLeftOffset: () => number;
+ anchorPos: any;
+ isMouseOver?: boolean;
+ selectedNode?: HTMLElement;
+ }
+ export function $singleLineEditor(el?: HTMLElement): Editor;
+ export function getAriaId(index: any): string;
+ import { Editor } from "ace-code/src/editor";
+ namespace Ace {
+ type AcePopupWithEditor = import("ace-code").Ace.AcePopupWithEditor;
+ type Completion = import("ace-code").Ace.Completion;
+ type Point = import("ace-code").Ace.Point;
+ type AcePopupNavigation = import("ace-code").Ace.AcePopupNavigation;
+ }
+ export interface AcePopup extends Ace.AcePopupWithEditor {
+ setSelectOnHover: (val: boolean) => void;
+ setRow: (line: number) => void;
+ getRow: () => number;
+ getHoveredRow: () => number;
+ filterText: string;
+ isOpen: boolean;
+ isTopdown: boolean;
+ autoSelect: boolean;
+ data: Ace.Completion[];
+ setData: (data: Ace.Completion[], filterText: string) => void;
+ getData: (row: number) => Ace.Completion;
+ hide: () => void;
+ anchor: "top" | "bottom";
+ anchorPosition: Ace.Point;
+ tryShow: (pos: any, lineHeight: number, anchor: "top" | "bottom", forceShow?: boolean) => boolean;
+ show: (pos: any, lineHeight: number, topdownOnly?: boolean) => void;
+ goTo: (where: Ace.AcePopupNavigation) => void;
+ getTextLeftOffset: () => number;
+ anchorPos: any;
+ isMouseOver?: boolean;
+ selectedNode?: HTMLElement;
+ }
+}
+declare module "ace-code/src/range_list" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Point = import("ace-code").Ace.Point;
+ export class RangeList {
+ ranges: any[];
+ pointIndex(pos: Point, excludeEdges?: boolean, startIndex?: number): number;
+ add(range: Range): any[];
+ addList(list: Range[]): any[];
+ substractPoint(pos: Point): any[];
+ merge(): any[];
+ contains(row: number, column: number): boolean;
+ containsPoint(pos: Point): boolean;
+ rangeAtPoint(pos: Point): any;
+ clipRows(startRow: number, endRow: number): any[];
+ removeAll(): any[];
+ attach(session: EditSession): void;
+ session: import("ace-code/src/edit_session").EditSession;
+ onChange: any;
+ detach(): void;
+ comparePoints: (p1: import("ace-code/src/range").Point, p2: import("ace-code/src/range").Point) => number;
+ }
+ import { Range } from "ace-code/src/range";
+}
+declare module "ace-code/src/snippets" {
+ export const snippetManager: SnippetManager;
+ export type Snippet = {
+ content?: string;
+ replaceBefore?: string;
+ replaceAfter?: string;
+ startRe?: RegExp;
+ endRe?: RegExp;
+ triggerRe?: RegExp;
+ endTriggerRe?: RegExp;
+ trigger?: string;
+ endTrigger?: string;
+ matchBefore?: string[];
+ matchAfter?: string[];
+ name?: string;
+ tabTrigger?: string;
+ guard?: string;
+ endGuard?: string;
+ };
+ class SnippetManager {
+ snippetMap: {};
+ snippetNameMap: {};
+ variables: {
+ CURRENT_WORD: (editor: any) => any;
+ SELECTION: (editor: any, name: any, indentation: any) => any;
+ CURRENT_LINE: (editor: any) => any;
+ PREV_LINE: (editor: any) => any;
+ LINE_INDEX: (editor: any) => any;
+ LINE_NUMBER: (editor: any) => any;
+ SOFT_TABS: (editor: any) => "YES" | "NO";
+ TAB_SIZE: (editor: any) => any;
+ CLIPBOARD: (editor: any) => any;
+ FILENAME: (editor: any) => string;
+ FILENAME_BASE: (editor: any) => string;
+ DIRECTORY: (editor: any) => string;
+ FILEPATH: (editor: any) => string;
+ WORKSPACE_NAME: () => string;
+ FULLNAME: () => string;
+ BLOCK_COMMENT_START: (editor: any) => any;
+ BLOCK_COMMENT_END: (editor: any) => any;
+ LINE_COMMENT: (editor: any) => any;
+ CURRENT_YEAR: any;
+ CURRENT_YEAR_SHORT: any;
+ CURRENT_MONTH: any;
+ CURRENT_MONTH_NAME: any;
+ CURRENT_MONTH_NAME_SHORT: any;
+ CURRENT_DATE: any;
+ CURRENT_DAY_NAME: any;
+ CURRENT_DAY_NAME_SHORT: any;
+ CURRENT_HOUR: any;
+ CURRENT_MINUTE: any;
+ CURRENT_SECOND: any;
+ };
+ getTokenizer(): Tokenizer;
+ createTokenizer(): any;
+ tokenizeTmSnippet(str: any, startState: any): (string | import("ace-code").Ace.Token)[];
+ getVariableValue(editor: any, name: any, indentation: any): any;
+ tmStrFormat(str: any, ch: any, editor: any): any;
+ tmFormatFunction(str: any, ch: any, editor: any): any;
+ resolveVariables(snippet: any, editor: any): any[];
+ getDisplayTextForSnippet(editor: any, snippetText: any): any;
+ insertSnippetForSelection(editor: any, snippetText: any, options?: {}): void;
+ insertSnippet(editor: any, snippetText: any, options?: {}): void;
+ getActiveScopes(editor: any): any[];
+ expandWithTab(editor: any, options: any): any;
+ expandSnippetForSelection(editor: any, options: any): boolean;
+ findMatchingSnippet(snippetList: Snippet[], before: string, after: string): Snippet;
+ register(snippets: any[], scope: string): void;
+ unregister(snippets: any, scope: any): void;
+ parseSnippetFile(str: any): Snippet[];
+ getSnippetByName(name: any, editor: any): undefined;
+ }
+ import { Tokenizer } from "ace-code/src/tokenizer";
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ }
+ interface SnippetManager extends Ace.EventEmitter {
+ }
+}
+declare module "ace-code/src/autocomplete/inline_screenreader" {
+ /**
+ * This object is used to communicate inline code completions rendered into an editor with ghost text to screen reader users.
+ */
+ export class AceInlineScreenReader {
+ /**
+ * Creates the off-screen div in which the ghost text content in redered and which the screen reader reads.
+ */
+ constructor(editor: import("ace-code/src/editor").Editor);
+ editor: import("ace-code/src/editor").Editor;
+ screenReaderDiv: HTMLDivElement;
+ /**
+ * Set the ghost text content to the screen reader div
+ */
+ setScreenReaderContent(content: string): void;
+ popup: import("ace-code/src/autocomplete/popup").AcePopup;
+ destroy(): void;
+ /**
+ * Take this._lines, render it as blocks and add those to the screen reader div.
+ */
+ createCodeBlock(): HTMLPreElement;
+ }
+}
+declare module "ace-code/src/autocomplete/inline" {
+ export type Editor = import("ace-code/src/editor").Editor;
+ /**
+ * This object is used to manage inline code completions rendered into an editor with ghost text.
+ */
+ export class AceInline {
+ editor: any;
+ /**
+ * Renders the completion as ghost text to the current cursor position
+ * @returns {boolean} True if the completion could be rendered to the editor, false otherwise
+ */
+ show(editor: Editor, completion: import("ace-code").Ace.Completion, prefix: string): boolean;
+ inlineScreenReader: AceInlineScreenReader;
+ isOpen(): boolean;
+ hide(): boolean;
+ destroy(): void;
+ }
+ import { AceInlineScreenReader } from "ace-code/src/autocomplete/inline_screenreader";
+}
+declare module "ace-code/src/autocomplete/util" {
+ export function parForEach(array: any, fn: any, callback: any): void;
+ export function retrievePrecedingIdentifier(text: any, pos: any, regex: any): string;
+ export function retrieveFollowingIdentifier(text: any, pos: any, regex: any): any[];
+ export function getCompletionPrefix(editor: any): string;
+ export function triggerAutocomplete(editor: Editor, previousChar?: string): boolean;
+ export type Editor = import("ace-code/src/editor").Editor;
+}
+declare module "ace-code/src/autocomplete" {
+ /**
+ * This object controls the autocompletion components and their lifecycle.
+ * There is an autocompletion popup, an optional inline ghost text renderer and a docuent tooltip popup inside.
+ */
+ export class Autocomplete {
+ static get completionsForLoading(): {
+ caption: any;
+ value: string;
+ }[];
+ static for(editor: Editor): Autocomplete;
+ autoInsert: boolean;
+ autoSelect: boolean;
+ autoShown: boolean;
+ exactMatch: boolean;
+ inlineEnabled: boolean;
+ keyboardHandler: HashHandler;
+ parentNode: any;
+ setSelectOnHover: boolean;
+ /**
+ * @property {Boolean} showLoadingState - A boolean indicating whether the loading states of the Autocompletion should be shown to the end-user. If enabled
+ * it shows a loading indicator on the popup while autocomplete is loading.
+ *
+ * Experimental: This visualisation is not yet considered stable and might change in the future.
+ */
+ showLoadingState: boolean;
+ /**
+ * @property {number} stickySelectionDelay - a numerical value that determines after how many ms the popup selection will become 'sticky'.
+ * Normally, when new elements are added to an open popup, the selection is reset to the first row of the popup. If sticky, the focus will remain
+ * on the currently selected item when new items are added to the popup. Set to a negative value to disable this feature and never set selection to sticky.
+ */
+ stickySelectionDelay: number;
+ blurListener(e: any): void;
+ changeListener(e: any): void;
+ mousedownListener(e: any): void;
+ mousewheelListener(e: any): void;
+ changeTimer: {
+ (timeout?: number): void;
+ delay(timeout?: number): void;
+ schedule: any;
+ call(): void;
+ cancel(): void;
+ isPending(): any;
+ };
+ tooltipTimer: {
+ (timeout?: number): void;
+ delay(timeout?: number): void;
+ schedule: any;
+ call(): void;
+ cancel(): void;
+ isPending(): any;
+ };
+ popupTimer: {
+ (timeout?: number): void;
+ delay(timeout?: number): void;
+ schedule: any;
+ call(): void;
+ cancel(): void;
+ isPending(): any;
+ };
+ stickySelectionTimer: {
+ (timeout?: number): void;
+ delay(timeout?: number): void;
+ schedule: any;
+ call(): void;
+ cancel(): void;
+ isPending(): any;
+ };
+ popup: AcePopup;
+ inlineRenderer: AceInline;
+ getPopup(): AcePopup;
+ stickySelection: boolean;
+ observeLayoutChanges(): void;
+ unObserveLayoutChanges(): void;
+ openPopup(editor: Editor, prefix: string, keepPopupPosition?: boolean): void;
+ /**
+ * Detaches all elements from the editor, and cleans up the data for the session
+ */
+ detach(): void;
+ activated: boolean;
+ completionProvider: CompletionProvider;
+ completions: FilteredList;
+ base: import("ace-code/src/anchor").Anchor;
+ mouseOutListener(e: any): void;
+ goTo(where: any): void;
+ insertMatch(data: Completion, options?: undefined): boolean | void;
+ /**
+ * This is the entry point for the autocompletion class, triggers the actions which collect and display suggestions
+ */
+ showPopup(editor: Editor, options?: CompletionOptions): void;
+ editor: import("ace-code/src/editor").Editor;
+ getCompletionProvider(initialPosition?: {
+ pos: Position;
+ prefix: string;
+ }): CompletionProvider;
+ /**
+ * This method is deprecated, it is only kept for backwards compatibility.
+ * Use the same method include CompletionProvider instead for the same functionality.
+ * @deprecated
+ */
+ gatherCompletions(editor: any, callback: any): boolean;
+ updateCompletions(keepPopupPosition: boolean, options?: CompletionOptions): void;
+ cancelContextMenu(): void;
+ updateDocTooltip(): void;
+ showDocTooltip(item: any): void;
+ tooltipNode: HTMLDivElement;
+ hideDocTooltip(): void;
+ destroy(): void;
+ commands: {
+ Up: (editor: any) => void;
+ Down: (editor: any) => void;
+ "Ctrl-Up|Ctrl-Home": (editor: any) => void;
+ "Ctrl-Down|Ctrl-End": (editor: any) => void;
+ Esc: (editor: any) => void;
+ Return: (editor: any) => any;
+ "Shift-Return": (editor: any) => void;
+ Tab: (editor: any) => any;
+ Backspace: (editor: any) => void;
+ PageUp: (editor: any) => void;
+ PageDown: (editor: any) => void;
+ };
+ emptyMessage?: Function;
+ }
+ /**
+ * This class is responsible for providing completions and inserting them to the editor
+ */
+ export class CompletionProvider {
+ constructor(initialPosition?: {
+ pos: Position;
+ prefix: string;
+ });
+ initialPosition: {
+ pos: Position;
+ prefix: string;
+ };
+ active: boolean;
+ insertByIndex(editor: Editor, index: number, options?: CompletionProviderOptions): boolean;
+ insertMatch(editor: Editor, data: Completion, options?: CompletionProviderOptions): boolean;
+ gatherCompletions(editor: Editor, callback: import("ace-code").Ace.CompletionCallbackFunction): boolean;
+ completers: import("ace-code").Ace.Completer[];
+ /**
+ * This is the entry point to the class, it gathers, then provides the completions asynchronously via callback.
+ * The callback function may be called multiple times, the last invokation is marked with a `finished` flag
+ */
+ provideCompletions(editor: Editor, options: CompletionProviderOptions, callback: (err: Error | undefined, completions: FilteredList | [
+ ], finished: boolean) => void): void;
+ detach(): void;
+ completions: import("ace-code").Ace.FilteredList;
+ }
+ export type Editor = import("ace-code/src/editor").Editor;
+ export type CompletionProviderOptions = import("ace-code").Ace.CompletionProviderOptions;
+ export type CompletionOptions = import("ace-code").Ace.CompletionOptions;
+ export type Position = import("ace-code").Ace.Position;
+ export type BaseCompletion = {
+ /**
+ * - a numerical value that determines the order in which completions would be displayed.
+ * A lower score means that the completion would be displayed further from the start
+ */
+ score?: number;
+ /**
+ * - a short description of the completion
+ */
+ meta?: string;
+ /**
+ * - the text that would be displayed in the completion list. If omitted, value or snippet
+ * would be shown instead.
+ */
+ caption?: string;
+ /**
+ * - an HTML string that would be displayed as an additional popup
+ */
+ docHTML?: string;
+ /**
+ * - a plain text that would be displayed as an additional popup. If `docHTML` exists,
+ * it would be used instead of `docText`.
+ */
+ docText?: string;
+ /**
+ * - the identifier of the completer
+ */
+ completerId?: string;
+ /**
+ * - An object specifying the range of text to be replaced with the new completion value (experimental)
+ */
+ range?: import("ace-code").Ace.IRange;
+ /**
+ * - A command to be executed after the completion is inserted (experimental)
+ */
+ command?: string;
+ /**
+ * - a text snippet that would be inserted when the completion is selected
+ */
+ snippet?: string;
+ /**
+ * - The text that would be inserted when selecting this completion.
+ */
+ value?: string;
+ completer?: import("ace-code").Ace.Completer;
+ hideInlinePreview?: boolean;
+ };
+ export type SnippetCompletion = BaseCompletion & {
+ snippet: string;
+ };
+ export type ValueCompletion = BaseCompletion & {
+ value: string;
+ };
+ /**
+ * Represents a suggested text snippet intended to complete a user's input
+ */
+ export type Completion = SnippetCompletion | ValueCompletion;
+ import { HashHandler } from "ace-code/src/keyboard/hash_handler";
+ import { AcePopup } from "ace-code/src/autocomplete/popup";
+ import { AceInline } from "ace-code/src/autocomplete/inline";
+ export class FilteredList {
+ constructor(array: any, filterText: any);
+ all: any;
+ filtered: any;
+ filterText: any;
+ exactMatch: boolean;
+ ignoreCaption: boolean;
+ setFilter(str: any): void;
+ filterCompletions(items: any, needle: any): any[];
+ }
+ export namespace startCommand {
+ let name: string;
+ function exec(editor: any, options: any): void;
+ let bindKey: string;
+ }
+ namespace Ace {
+ type AcePopup = import("ace-code").Ace.AcePopup;
+ type FilteredList = import("ace-code").Ace.FilteredList;
+ }
+ export interface Autocomplete {
+ popup: Ace.AcePopup;
+ emptyMessage?: Function;
+ }
+ export interface CompletionProvider {
+ completions: Ace.FilteredList;
+ }
+}
+declare module "ace-code/src/autocomplete/text_completer" {
+ export function getCompletions(editor: any, session: any, pos: any, prefix: any, callback: any): void;
+}
+declare module "ace-code/src/line_widgets" {
+ export class LineWidgets {
+ constructor(session: EditSession);
+ session: import("ace-code/src/edit_session").EditSession;
+ updateOnChange(delta: import("ace-code").Ace.Delta): void;
+ renderWidgets(e: any, renderer: VirtualRenderer): void;
+ measureWidgets(e: any, renderer: VirtualRenderer): void;
+ getRowLength(row: number): number;
+ attach(editor: Editor): void;
+ editor: Editor;
+ detach(e: any): void;
+ updateOnFold(e: any, session: EditSession): void;
+ addLineWidget(w: LineWidget): LineWidget;
+ removeLineWidget(w: LineWidget): void;
+ getWidgetsAtRow(row: number): LineWidget[];
+ firstRow: number;
+ lastRow: number;
+ lineWidgets: import("ace-code").Ace.LineWidget[];
+ }
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Editor = import("ace-code/src/editor").Editor;
+ export type VirtualRenderer = import("ace-code/src/virtual_renderer").VirtualRenderer;
+ export type LineWidget = import("ace-code").Ace.LineWidget;
+ namespace Ace {
+ type LineWidget = import("ace-code").Ace.LineWidget;
+ type Editor = import("ace-code").Ace.Editor;
+ }
+ export interface LineWidgets {
+ lineWidgets: Ace.LineWidget[];
+ editor: Ace.Editor;
+ }
+}
+declare module "ace-code/src/search_highlight" {
+ export type Marker = import("ace-code/src/layer/marker").Marker;
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export class SearchHighlight {
+ constructor(regExp: any, clazz: string, type?: string);
+ clazz: string;
+ type: string;
+ setRegexp(regExp: any): void;
+ regExp: any;
+ cache: any[];
+ update(html: any, markerLayer: Marker, session: EditSession, config: Partial): void;
+ MAX_RANGES: number;
+ }
+}
+declare module "ace-code/src/occur" {
+ export type Editor = import("ace-code/src/editor").Editor;
+ export type Point = import("ace-code").Ace.Point;
+ export type SearchOptions = import("ace-code").Ace.SearchOptions;
+ /**
+ * Finds all lines matching a search term in the current [[Document
+ * `Document`]] and displays them instead of the original `Document`. Keeps
+ * track of the mapping between the occur doc and the original doc.
+ **/
+ export class Occur extends Search {
+ /**
+ * Enables occur mode. expects that `options.needle` is a search term.
+ * This search term is used to filter out all the lines that include it
+ * and these are then used as the content of a new [[Document
+ * `Document`]]. The current cursor position of editor will be translated
+ * so that the cursor is on the matching row/column as it was before.
+ * @param {Object} options options.needle should be a String
+ * @return {Boolean} Whether occur activation was successful
+ *
+ **/
+ enter(editor: Editor, options: any): boolean;
+ /**
+ * Disables occur mode. Resets the [[Sessions `EditSession`]] [[Document
+ * `Document`]] back to the original doc. If options.translatePosition is
+ * truthy also maps the [[Editors `Editor`]] cursor position accordingly.
+ * @param {Object} options options.translatePosition
+ * @return {Boolean} Whether occur deactivation was successful
+ *
+ **/
+ exit(editor: Editor, options: any): boolean;
+ highlight(sess: EditSession, regexp: RegExp): void;
+ displayOccurContent(editor: Editor, options: Partial): void;
+ displayOriginalContent(editor: Editor): void;
+ /**
+ * Translates the position from the original document to the occur lines in
+ * the document or the beginning if the doc {row: 0, column: 0} if not
+ * found.
+ * @param {EditSession} session The occur session
+ * @param {Point} pos The position in the original document
+ * @return {Point} position in occur doc
+ **/
+ originalToOccurPosition(session: EditSession, pos: Point): Point;
+ /**
+ * Translates the position from the occur document to the original document
+ * or `pos` if not found.
+ * @param {EditSession} session The occur session
+ * @param {Point} pos The position in the occur session document
+ **/
+ occurToOriginalPosition(session: EditSession, pos: Point): Point;
+ matchingLines(session: EditSession, options: Partial): any[];
+ }
+ import { Search } from "ace-code/src/search";
+ import { EditSession } from "ace-code/src/edit_session";
+}
+declare module "ace-code/src/marker_group" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type MarkerGroupItem = {
+ range: import("ace-code/src/range").Range;
+ className: string;
+ };
+ export type LayerConfig = import("ace-code").Ace.LayerConfig;
+ export type Marker = import("ace-code/src/layer/marker").Marker;
+ export class MarkerGroup {
+ /**
+ * @param {{markerType: "fullLine" | "line" | undefined}} [options] Options controlling the behvaiour of the marker.
+ * User `markerType` to control how the markers which are part of this group will be rendered:
+ * - `undefined`: uses `text` type markers where only text characters within the range will be highlighted.
+ * - `fullLine`: will fully highlight all the rows within the range, including the characters before and after the range on the respective rows.
+ * - `line`: will fully highlight the lines within the range but will only cover the characters between the start and end of the range.
+ */
+ constructor(session: EditSession, options?: {
+ markerType: "fullLine" | "line" | undefined;
+ });
+ markerType: "line" | "fullLine";
+ markers: import("ace-code").Ace.MarkerGroupItem[];
+ session: EditSession;
+ /**
+ * Finds the first marker containing pos
+ */
+ getMarkerAtPosition(pos: import("ace-code").Ace.Point): import("ace-code").Ace.MarkerGroupItem | undefined;
+ /**
+ * Comparator for Array.sort function, which sorts marker definitions by their positions
+ *
+ * @param {MarkerGroupItem} a first marker.
+ * @param {MarkerGroupItem} b second marker.
+ * @returns {number} negative number if a should be before b, positive number if b should be before a, 0 otherwise.
+ */
+ markersComparator(a: MarkerGroupItem, b: MarkerGroupItem): number;
+ /**
+ * Sets marker definitions to be rendered. Limits the number of markers at MAX_MARKERS.
+ * @param {MarkerGroupItem[]} markers an array of marker definitions.
+ */
+ setMarkers(markers: MarkerGroupItem[]): void;
+ update(html: any, markerLayer: Marker, session: EditSession, config: LayerConfig): void;
+ MAX_MARKERS: number;
+ }
+}
+declare module "ace-code/src/edit_session/fold" {
+ export class Fold extends RangeList {
+ constructor(range: Range, placeholder: any);
+ foldLine: import("ace-code/src/edit_session/fold_line").FoldLine;
+ placeholder: any;
+ range: import("ace-code/src/range").Range;
+ start: import("ace-code").Ace.Point;
+ end: import("ace-code").Ace.Point;
+ sameRow: boolean;
+ subFolds: Fold[];
+ setFoldLine(foldLine: FoldLine): void;
+ clone(): Fold;
+ addSubFold(fold: Fold): any;
+ restoreRange(range: IRange): void;
+ collapseChildren?: number;
+ }
+ export type FoldLine = import("ace-code/src/edit_session/fold_line").FoldLine;
+ export type Range = import("ace-code/src/range").Range;
+ export type Point = import("ace-code").Ace.Point;
+ export type IRange = import("ace-code").Ace.IRange;
+ import { RangeList } from "ace-code/src/range_list";
+ export interface Fold {
+ collapseChildren?: number;
+ }
+}
+declare module "ace-code/src/edit_session/fold_line" {
+ export type Fold = import("ace-code/src/edit_session/fold").Fold;
+ export class FoldLine {
+ /**
+ * If an array is passed in, the folds are expected to be sorted already.
+ */
+ constructor(foldData: FoldLine[], folds: Fold[] | Fold);
+ foldData: FoldLine[];
+ folds: Fold[];
+ range: Range;
+ start: import("ace-code").Ace.Point;
+ end: import("ace-code").Ace.Point;
+ /**
+ * Note: This doesn't update wrapData!
+ */
+ shiftRow(shift: number): void;
+ addFold(fold: Fold): void;
+ containsRow(row: number): boolean;
+ walk(callback: Function, endRow: number, endColumn: number): void;
+ getNextFoldTo(row: number, column: number): {
+ fold: Fold;
+ kind: string;
+ } | null;
+ addRemoveChars(row: number, column: number, len: number): void;
+ split(row: number, column: number): FoldLine | null;
+ merge(foldLineNext: FoldLine): void;
+ toString(): string;
+ idxToPosition(idx: number): import("ace-code").Ace.Point;
+ }
+ import { Range } from "ace-code/src/range";
+}
+declare module "ace-code/src/bidihandler" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ /**
+ * This object is used to ensure Bi-Directional support (for languages with text flowing from right to left, like Arabic or Hebrew)
+ * including correct caret positioning, text selection mouse and keyboard arrows functioning
+ **/
+ export class BidiHandler {
+ /**
+ * Creates a new `BidiHandler` object
+ * @param {EditSession} session The session to use
+ **/
+ constructor(session: EditSession);
+ session: import("ace-code/src/edit_session").EditSession;
+ bidiMap: {};
+ currentRow: any;
+ bidiUtil: typeof bidiUtil;
+ charWidths: any[];
+ EOL: string;
+ showInvisibles: boolean;
+ isRtlDir: boolean;
+ line: string;
+ wrapIndent: number;
+ EOF: string;
+ RLE: string;
+ contentWidth: number;
+ fontMetrics: any;
+ rtlLineOffset: number;
+ wrapOffset: number;
+ isMoveLeftOperation: boolean;
+ seenBidi: boolean;
+ /**
+ * Returns 'true' if row contains Bidi characters, in such case
+ * creates Bidi map to be used in operations related to selection
+ * (keyboard arrays, mouse click, select)
+ * @param {Number} screenRow the screen row to be checked
+ * @param {Number} [docRow] the document row to be checked [optional]
+ * @param {Number} [splitIndex] the wrapped screen line index [ optional]
+ **/
+ isBidiRow(screenRow: number, docRow?: number, splitIndex?: number): any;
+ getDocumentRow(): number;
+ getSplitIndex(): number;
+ updateRowLine(docRow: any, splitIndex: any): void;
+ updateBidiMap(): void;
+ /**
+ * Resets stored info related to current screen row
+ **/
+ markAsDirty(): void;
+ /**
+ * Updates array of character widths
+ * @param {Object} fontMetrics metrics
+ *
+ **/
+ updateCharacterWidths(fontMetrics: any): void;
+ characterWidth: any;
+ setShowInvisibles(showInvisibles: any): void;
+ setEolChar(eolChar: any): void;
+ setContentWidth(width: any): void;
+ isRtlLine(row: any): boolean;
+ setRtlDirection(editor: any, isRtlDir: any): void;
+ /**
+ * Returns offset of character at position defined by column.
+ * @param {Number} col the screen column position
+ *
+ * @return {Number} horizontal pixel offset of given screen column
+ **/
+ getPosLeft(col: number): number;
+ /**
+ * Returns 'selections' - array of objects defining set of selection rectangles
+ * @param {Number} startCol the start column position
+ * @param {Number} endCol the end column position
+ *
+ * @return {Object[]} Each object contains 'left' and 'width' values defining selection rectangle.
+ **/
+ getSelections(startCol: number, endCol: number): any[];
+ /**
+ * Converts character coordinates on the screen to respective document column number
+ * @param {Number} posX character horizontal offset
+ *
+ * @return {Number} screen column number corresponding to given pixel offset
+ **/
+ offsetToCol(posX: number): number;
+ }
+ import bidiUtil = require("ace-code/src/lib/bidiutil");
+}
+declare module "ace-code/src/background_tokenizer" {
+ /**
+ * Tokenizes the current [[Document `Document`]] in the background, and caches the tokenized rows for future use.
+ *
+ * If a certain row is changed, everything below that row is re-tokenized.
+ **/
+ export class BackgroundTokenizer {
+ /**
+ * Creates a new `BackgroundTokenizer` object.
+ * @param {Tokenizer} tokenizer The tokenizer to use
+ * @param {EditSession} [session] The editor session to associate with
+ **/
+ constructor(tokenizer: Tokenizer, session?: EditSession);
+ running: false | number;
+ lines: any[];
+ states: string[] | string[][];
+ currentLine: number;
+ tokenizer: import("ace-code/src/tokenizer").Tokenizer;
+ /**
+ * Sets a new tokenizer for this object.
+ * @param {Tokenizer} tokenizer The new tokenizer to use
+ **/
+ setTokenizer(tokenizer: Tokenizer): void;
+ /**
+ * Sets a new document to associate with this object.
+ * @param {Document} doc The new document to associate with
+ **/
+ setDocument(doc: Document): void;
+ doc: import("ace-code/src/document").Document;
+ /**
+ * Emits the `'update'` event. `firstRow` and `lastRow` are used to define the boundaries of the region to be updated.
+ * @param {Number} firstRow The starting row region
+ * @param {Number} lastRow The final row region
+ **/
+ fireUpdateEvent(firstRow: number, lastRow: number): void;
+ /**
+ * Starts tokenizing at the row indicated.
+ * @param {Number} startRow The row to start at
+ **/
+ start(startRow: number): void;
+ /**
+ * Sets pretty long delay to prevent the tokenizer from interfering with the user
+ */
+ scheduleStart(): void;
+ /**
+ * Stops tokenizing.
+ **/
+ stop(): void;
+ /**
+ * Gives list of [[Token]]'s of the row. (tokens are cached)
+ * @param {Number} row The row to get tokens at
+ **/
+ getTokens(row: number): import("ace-code").Ace.Token[];
+ /**
+ * Returns the state of tokenization at the end of a row.
+ * @param {Number} row The row to get state at
+ **/
+ getState(row: number): string | string[];
+ cleanup(): void;
+ }
+ export type Document = import("ace-code/src/document").Document;
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Tokenizer = import("ace-code/src/tokenizer").Tokenizer;
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ type BackgroundTokenizerEvents = import("ace-code").Ace.BackgroundTokenizerEvents;
+ }
+ export interface BackgroundTokenizer extends Ace.EventEmitter {
+ }
+}
+declare module "ace-code/src/edit_session/folding" {
+ export type IFolding = import("ace-code/src/edit_session").EditSession & import("ace-code").Ace.Folding;
+ export type Delta = import("ace-code").Ace.Delta;
+ export function Folding(this: IFolding): void;
+ export class Folding {
+ /**
+ * Looks up a fold at a given row/column. Possible values for side:
+ * -1: ignore a fold if fold.start = row/column
+ * +1: ignore a fold if fold.end = row/column
+ **/
+ getFoldAt: (row: number, column: number, side?: number) => import("ace-code").Ace.Fold;
+ /**
+ * Returns all folds in the given range. Note, that this will return folds
+ **/
+ getFoldsInRange: (range: import("ace-code").Ace.Range | import("ace-code").Ace.Delta) => import("ace-code").Ace.Fold[];
+ getFoldsInRangeList: (ranges: import("ace-code").Ace.Range[] | import("ace-code").Ace.Range) => import("ace-code").Ace.Fold[];
+ /**
+ * Returns all folds in the document
+ */
+ getAllFolds: () => import("ace-code").Ace.Fold[];
+ /**
+ * Returns the string between folds at the given position.
+ * E.g.
+ * foob|arwolrd -> "bar"
+ * foobarwol|rd -> "world"
+ * foobarwolrd ->
+ *
+ * where | means the position of row/column
+ *
+ * The trim option determs if the return string should be trimed according
+ * to the "side" passed with the trim value:
+ *
+ * E.g.
+ * foob|arwolrd -trim=-1> "b"
+ * foobarwol|rd -trim=+1> "rld"
+ * fo|obarwolrd -trim=00> "foo"
+ */
+ getFoldStringAt: (row: number, column: number, trim?: number, foldLine?: import("ace-code").Ace.FoldLine) => string | null;
+ getFoldLine: (docRow: number, startFoldLine?: import("ace-code").Ace.FoldLine) => null | import("ace-code").Ace.FoldLine;
+ /**
+ * Returns the fold which starts after or contains docRow
+ */
+ getNextFoldLine: (docRow: number, startFoldLine?: import("ace-code").Ace.FoldLine) => null | import("ace-code").Ace.FoldLine;
+ getFoldedRowCount: (first: number, last: number) => number;
+ /**
+ * Adds a new fold.
+ *
+ * The new created Fold object or an existing fold object in case the
+ * passed in range fits an existing fold exactly.
+ */
+ addFold: (placeholder: import("ace-code").Ace.Fold | string, range?: import("ace-code").Ace.Range) => import("ace-code").Ace.Fold;
+ addFolds: (folds: import("ace-code").Ace.Fold[]) => void;
+ removeFold: (fold: import("ace-code").Ace.Fold) => void;
+ removeFolds: (folds: import("ace-code").Ace.Fold[]) => void;
+ expandFold: (fold: import("ace-code").Ace.Fold) => void;
+ expandFolds: (folds: import("ace-code").Ace.Fold[]) => void;
+ unfold: (location?: number | null | import("ace-code").Ace.Point | import("ace-code").Ace.Range | import("ace-code").Ace.Range[], expandInner?: boolean) => import("ace-code").Ace.Fold[] | undefined;
+ /**
+ * Checks if a given documentRow is folded. This is true if there are some
+ * folded parts such that some parts of the line is still visible.
+ **/
+ isRowFolded: (docRow: number, startFoldRow?: import("ace-code").Ace.FoldLine) => boolean;
+ getRowFoldEnd: (docRow: number, startFoldRow?: import("ace-code").Ace.FoldLine) => number;
+ getRowFoldStart: (docRow: number, startFoldRow?: import("ace-code").Ace.FoldLine) => number;
+ getFoldDisplayLine: (foldLine: import("ace-code").Ace.FoldLine, endRow?: number | null, endColumn?: number | null, startRow?: number | null, startColumn?: number | null) => string;
+ getDisplayLine: (row: number, endColumn: number | null, startRow: number | null, startColumn: number | null) => string;
+ toggleFold: (tryToUnfold?: boolean) => void;
+ getCommentFoldRange: (row: number, column: number, dir?: number) => import("ace-code").Ace.Range | undefined;
+ foldAll: (startRow?: number | null, endRow?: number | null, depth?: number | null, test?: Function) => void;
+ foldToLevel: (level: number) => void;
+ foldAllComments: () => void;
+ setFoldStyle: (style: string) => void;
+ getParentFoldRangeData: (row: number, ignoreCurrent?: boolean) => {
+ range?: import("ace-code").Ace.Range;
+ firstRange?: import("ace-code").Ace.Range;
+ };
+ onFoldWidgetClick: (row: number, e: any) => void;
+ toggleFoldWidget: (toggleParent?: boolean) => void;
+ updateFoldWidgets: (delta: import("ace-code").Ace.Delta) => void;
+ tokenizerUpdateFoldWidgets: (e: any) => void;
+ }
+}
+declare module "ace-code/src/edit_session/bracket_match" {
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type Point = import("ace-code/src/edit_session").Point;
+ export function BracketMatch(): void;
+ export class BracketMatch {
+ findMatchingBracket: (this: import("ace-code/src/edit_session").EditSession, position: Point, chr?: string) => import("ace-code").Ace.Point;
+ getBracketRange: (this: import("ace-code/src/edit_session").EditSession, pos: Point) => null | Range;
+ /**
+ * Returns:
+ * * null if there is no any bracket at `pos`;
+ * * two Ranges if there is opening and closing brackets;
+ * * one Range if there is only one bracket
+ *
+ */
+ getMatchingBracketRanges: (this: import("ace-code/src/edit_session").EditSession, pos: Point, isBackwards?: boolean) => null | Range[];
+ /**
+ * Returns [[Range]]'s for matching tags and tag names, if there are any
+ */
+ getMatchingTags: (this: import("ace-code/src/edit_session").EditSession, pos: Point) => {
+ closeTag: Range;
+ closeTagName: Range;
+ openTag: Range;
+ openTagName: Range;
+ } | undefined;
+ }
+ import { Range } from "ace-code/src/range";
+}
+declare module "ace-code/src/edit_session" {
+ /**
+ * Stores all the data about [[Editor `Editor`]] state providing easy way to change editors state.
+ *
+ * `EditSession` can be attached to only one [[Document `Document`]]. Same `Document` can be attached to several `EditSession`s.
+ **/
+ export class EditSession {
+ /**
+ * Returns a new instance of EditSession with state from JSON.
+ * @method fromJSON
+ * @param {string|object} session The EditSession state.
+ */
+ static fromJSON(session: string | object): EditSession;
+ /**
+ * Sets up a new `EditSession` and associates it with the given `Document` and `Mode`.
+ **/
+ constructor(text?: Document | string, mode?: SyntaxMode);
+ doc: Document;
+ prevOp: {};
+ id: string;
+ bgTokenizer: BackgroundTokenizer;
+ selection: Selection;
+ destroyed: boolean;
+ curOp: {
+ command: {
+ name?: string;
+ };
+ args: any;
+ };
+ /**
+ * Start an Ace operation, which will then batch all the subsequent changes (to either content or selection) under a single atomic operation.
+ * @param {{command?: {name?: string}, args?: any}|undefined} [commandEvent] Optional name for the operation
+ */
+ startOperation(commandEvent?: {
+ command?: {
+ name?: string;
+ };
+ args?: any;
+ } | undefined): void;
+ /**
+ * End current Ace operation.
+ * Emits "beforeEndOperation" event just before clearing everything, where the current operation can be accessed through `curOp` property.
+ */
+ endOperation(e: any): void;
+ /**
+ * Sets the `EditSession` to point to a new `Document`. If a `BackgroundTokenizer` exists, it also points to `doc`.
+ *
+ * @param {Document} doc The new `Document` to use
+ *
+ **/
+ setDocument(doc: Document): void;
+ /**
+ * Returns the `Document` associated with this session.
+ **/
+ getDocument(): Document;
+ /**
+ * Set "widgetManager" in EditSession
+ *
+ */
+ set widgetManager(value: LineWidgets);
+ /**
+ * Get "widgetManager" from EditSession
+ *
+ */
+ get widgetManager(): LineWidgets;
+ resetCaches(): void;
+ mergeUndoDeltas: boolean;
+ onSelectionChange(): void;
+ /**
+ * Sets the session text.
+ * @param {String} text The new text to place
+ **/
+ setValue(text: string): void;
+ /**
+ * Returns the current edit session.
+ * @method toJSON
+ */
+ toJSON(): any;
+ /**
+ * Returns selection object.
+ **/
+ getSelection(): Selection;
+ /**
+ * {:BackgroundTokenizer.getState}
+ * @param {Number} row The row to start at
+ * @related BackgroundTokenizer.getState
+ **/
+ getState(row: number): string | string[];
+ /**
+ * Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
+ * @param {Number} row The row to start at
+ **/
+ getTokens(row: number): import("ace-code").Ace.Token[];
+ /**
+ * Returns an object indicating the token at the current row. The object has two properties: `index` and `start`.
+ * @param {Number} row The row number to retrieve from
+ * @param {Number} column The column number to retrieve from
+ *
+ **/
+ getTokenAt(row: number, column: number): import("ace-code").Ace.Token;
+ /**
+ * Sets the undo manager.
+ * @param {UndoManager} undoManager The new undo manager
+ **/
+ setUndoManager(undoManager: UndoManager): void;
+ /**
+ * starts a new group in undo history
+ **/
+ markUndoGroup(): void;
+ /**
+ * Returns the current undo manager.
+ **/
+ getUndoManager(): UndoManager;
+ /**
+ * Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`.
+ **/
+ getTabString(): string;
+ /**
+ * Pass `true` to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (`'\t'`).
+ * @param {Boolean} val Value indicating whether or not to use soft tabs
+ **/
+ setUseSoftTabs(val: boolean): void;
+ /**
+ * Returns `true` if soft tabs are being used, `false` otherwise.
+ **/
+ getUseSoftTabs(): boolean;
+ /**
+ * Set the number of spaces that define a soft tab; for example, passing in `4` transforms the soft tabs to be equivalent to four spaces. This function also emits the `changeTabSize` event.
+ * @param {Number} tabSize The new tab size
+ **/
+ setTabSize(tabSize: number): void;
+ /**
+ * Returns the current tab size.
+ **/
+ getTabSize(): number;
+ /**
+ * Returns `true` if the character at the position is a soft tab.
+ * @param {Point} position The position to check
+ **/
+ isTabStop(position: Point): boolean;
+ /**
+ * Set whether keyboard navigation of soft tabs moves the cursor within the soft tab, rather than over
+ * @param {Boolean} navigateWithinSoftTabs Value indicating whether or not to navigate within soft tabs
+ **/
+ setNavigateWithinSoftTabs(navigateWithinSoftTabs: boolean): void;
+ /**
+ * Returns `true` if keyboard navigation moves the cursor within soft tabs, `false` if it moves the cursor over soft tabs.
+ **/
+ getNavigateWithinSoftTabs(): boolean;
+ /**
+ * Pass in `true` to enable overwrites in your session, or `false` to disable.
+ *
+ * If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emits the `changeOverwrite` event.
+ *
+ * @param {Boolean} overwrite Defines whether or not to set overwrites
+ *
+ **/
+ setOverwrite(overwrite: boolean): void;
+ /**
+ * Returns `true` if overwrites are enabled; `false` otherwise.
+ **/
+ getOverwrite(): boolean;
+ /**
+ * Sets the value of overwrite to the opposite of whatever it currently is.
+ **/
+ toggleOverwrite(): void;
+ /**
+ * Adds `className` to the `row`, to be used for CSS stylings and whatnot.
+ * @param {Number} row The row number
+ * @param {String} className The class to add
+ **/
+ addGutterDecoration(row: number, className: string): void;
+ /**
+ * Removes `className` from the `row`.
+ * @param {Number} row The row number
+ * @param {String} className The class to add
+ **/
+ removeGutterDecoration(row: number, className: string): void;
+ /**
+ * Returns an array of strings, indicating the breakpoint class (if any) applied to each row.
+ **/
+ getBreakpoints(): string[];
+ /**
+ * Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
+ * @param {number[]} rows An array of row indices
+ **/
+ setBreakpoints(rows: number[]): void;
+ /**
+ * Removes all breakpoints on the rows. This function also emits the `'changeBreakpoint'` event.
+ **/
+ clearBreakpoints(): void;
+ /**
+ * Sets a breakpoint on the row number given by `row`. This function also emits the `'changeBreakpoint'` event.
+ * @param {Number} row A row index
+ * @param {String} className Class of the breakpoint
+ **/
+ setBreakpoint(row: number, className: string): void;
+ /**
+ * Removes a breakpoint on the row number given by `row`. This function also emits the `'changeBreakpoint'` event.
+ * @param {Number} row A row index
+ **/
+ clearBreakpoint(row: number): void;
+ /**
+ * Adds a new marker to the given `Range`. If `inFront` is `true`, a front marker is defined, and the `'changeFrontMarker'` event fires; otherwise, the `'changeBackMarker'` event fires.
+ * @param {Range} range Define the range of the marker
+ * @param {String} clazz Set the CSS class for the marker
+ * @param {import("ace-code").Ace.MarkerRenderer | "fullLine" | "screenLine" | "text" | "line"} [type] Identify the renderer type of the marker. If string provided, corresponding built-in renderer is used. Supported string types are "fullLine", "screenLine", "text" or "line". If a Function is provided, that Function is used as renderer.
+ * @param {Boolean} [inFront] Set to `true` to establish a front marker
+ *
+ * @return {Number} The new marker id
+ **/
+ addMarker(range: Range, clazz: string, type?: import("ace-code").Ace.MarkerRenderer | "fullLine" | "screenLine" | "text" | "line", inFront?: boolean): number;
+ /**
+ * Adds a dynamic marker to the session.
+ * @param {import("ace-code").Ace.MarkerLike} marker object with update method
+ * @param {Boolean} [inFront] Set to `true` to establish a front marker
+ *
+ * @return {import("ace-code").Ace.MarkerLike} The added marker
+ **/
+ addDynamicMarker(marker: import("ace-code").Ace.MarkerLike, inFront?: boolean): import("ace-code").Ace.MarkerLike;
+ /**
+ * Removes the marker with the specified ID. If this marker was in front, the `'changeFrontMarker'` event is emitted. If the marker was in the back, the `'changeBackMarker'` event is emitted.
+ * @param {Number} markerId A number representing a marker
+ **/
+ removeMarker(markerId: number): void;
+ /**
+ * Returns an object containing all of the markers, either front or back.
+ * @param {Boolean} [inFront] If `true`, indicates you only want front markers; `false` indicates only back markers
+ *
+ **/
+ getMarkers(inFront?: boolean): {
+ [id: number]: import("ace-code").Ace.MarkerLike;
+ };
+ highlight(re: RegExp): void;
+ /**
+ * experimental
+ */
+ highlightLines(startRow: number, endRow: number, clazz: string, inFront?: boolean): Range;
+ /**
+ * Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event.
+ * @param {import("ace-code").Ace.Annotation[]} annotations A list of annotations
+ **/
+ setAnnotations(annotations: import("ace-code").Ace.Annotation[]): void;
+ /**
+ * Returns the annotations for the `EditSession`.
+ **/
+ getAnnotations(): import("ace-code").Ace.Annotation[];
+ /**
+ * Clears all the annotations for this session. This function also triggers the `'changeAnnotation'` event.
+ **/
+ clearAnnotations(): void;
+ /**
+ * Given a starting row and column, this method returns the `Range` of the first word boundary it finds.
+ * @param {Number} row The row to start at
+ * @param {Number} column The column to start at
+ *
+ **/
+ getWordRange(row: number, column: number): Range;
+ /**
+ * Gets the range of a word, including its right whitespace.
+ * @param {Number} row The row number to start from
+ * @param {Number} column The column number to start from
+ *
+ **/
+ getAWordRange(row: number, column: number): Range;
+ /**
+ * {:Document.setNewLineMode.desc}
+ *
+ *
+ * @related Document.setNewLineMode
+ **/
+ setNewLineMode(newLineMode: import("ace-code").Ace.NewLineMode): void;
+ /**
+ *
+ * Returns the current new line mode.
+ * @related Document.getNewLineMode
+ **/
+ getNewLineMode(): import("ace-code").Ace.NewLineMode;
+ /**
+ * Identifies if you want to use a worker for the `EditSession`.
+ * @param {Boolean} useWorker Set to `true` to use a worker
+ **/
+ setUseWorker(useWorker: boolean): void;
+ /**
+ * Returns `true` if workers are being used.
+ **/
+ getUseWorker(): boolean;
+ /**
+ * Sets a new text mode for the `EditSession`. This method also emits the `'changeMode'` event. If a [[BackgroundTokenizer `BackgroundTokenizer`]] is set, the `'tokenizerUpdate'` event is also emitted.
+ * @param {SyntaxMode | string} mode Set a new text mode
+ * @param {() => void} [cb] optional callback
+ **/
+ setMode(mode: SyntaxMode | string, cb?: () => void): void;
+ tokenRe: RegExp;
+ nonTokenRe: RegExp;
+ /**
+ * Returns the current text mode.
+ * @returns {TextMode} The current text mode
+ **/
+ getMode(): TextMode;
+ /**
+ * This function sets the scroll top value. It also emits the `'changeScrollTop'` event.
+ * @param {Number} scrollTop The new scroll top value
+ **/
+ setScrollTop(scrollTop: number): void;
+ /**
+ * [Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop}
+ **/
+ getScrollTop(): number;
+ /**
+ * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft}
+ */
+ setScrollLeft(scrollLeft: number): void;
+ /**
+ * [Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft}
+ **/
+ getScrollLeft(): number;
+ /**
+ * Returns the width of the screen.
+ **/
+ getScreenWidth(): number;
+ getLineWidgetMaxWidth(): number;
+ lineWidgetWidth: number;
+ screenWidth: any;
+ /**
+ * Returns a verbatim copy of the given line as it is in the document
+ * @param {Number} row The row to retrieve from
+ **/
+ 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 the number of rows in the document.
+ **/
+ getLength(): number;
+ /**
+ * {:Document.getTextRange.desc}
+ * @param {IRange} [range] The range to work with
+ *
+ **/
+ getTextRange(range?: IRange): string;
+ /**
+ * Inserts a block of `text` and the indicated `position`.
+ * @param {Point} position The position {row, column} to start inserting at
+ * @param {String} text A chunk of text to insert
+ * @returns {Point} The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
+ **/
+ insert(position: Point, text: string): Point;
+ /**
+ * Removes the `range` from the document.
+ * @param {IRange} range A specified Range to remove
+ * @returns {Point} 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 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.
+ *
+ * @related Document.removeFullLines
+ *
+ **/
+ removeFullLines(firstRow: number, lastRow: number): string[];
+ /**
+ * Reverts previous changes to your document.
+ * @param {Delta[]} deltas An array of previous changes
+ * @param {Boolean} [dontSelect] If `true`, doesn't select the range of where the change occured
+ **/
+ undoChanges(deltas: Delta[], dontSelect?: boolean): void;
+ /**
+ * Re-implements a previously undone change to your document.
+ * @param {Delta[]} deltas An array of previous changes
+ **/
+ redoChanges(deltas: Delta[], dontSelect?: boolean): void;
+ /**
+ * Enables or disables highlighting of the range where an undo occurred.
+ * @param {Boolean} enable If `true`, selects the range of the reinserted change
+ *
+ **/
+ setUndoSelect(enable: boolean): void;
+ /**
+ * Replaces a range in the document with the new `text`.
+ *
+ * @param {IRange} range A specified Range to replace
+ * @param {String} text The new text to use as a replacement
+ * @returns {Point} 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.
+ *
+ * @related Document.replace
+ **/
+ replace(range: IRange, text: string): Point;
+ /**
+ * Moves a range of text from the given range to the given position. `toPosition` is an object that looks like this:
+ * ```json
+ * { row: newRowLocation, column: newColumnLocation }
+ * ```
+ * @param {Range} fromRange The range of text you want moved within the document
+ * @param {Point} toPosition The location (row and column) where you want to move the text to
+ * @returns {Range} The new range where the text was moved to.
+ **/
+ moveText(fromRange: Range, toPosition: Point, copy?: boolean): Range;
+ /**
+ * Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`.
+ *
+ * If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[EditSession.getTabString `getTabString()`]].
+ * @param {Number} startRow Starting row
+ * @param {Number} endRow Ending row
+ * @param {String} indentString The indent token
+ **/
+ indentRows(startRow: number, endRow: number, indentString: string): void;
+ /**
+ * Outdents all the rows defined by the `start` and `end` properties of `range`.
+ * @param {Range} range A range of rows
+ **/
+ outdentRows(range: Range): void;
+ /**
+ * Shifts all the lines in the document up one, starting from `firstRow` and ending at `lastRow`.
+ * @param {Number} firstRow The starting row to move up
+ * @param {Number} lastRow The final row to move up
+ * @returns {Number} If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.
+ **/
+ moveLinesUp(firstRow: number, lastRow: number): number;
+ /**
+ * Shifts all the lines in the document down one, starting from `firstRow` and ending at `lastRow`.
+ * @param {Number} firstRow The starting row to move down
+ * @param {Number} lastRow The final row to move down
+ * @returns {Number} If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.
+ **/
+ moveLinesDown(firstRow: number, lastRow: number): number;
+ /**
+ * Duplicates all the text between `firstRow` and `lastRow`.
+ * @param {Number} firstRow The starting row to duplicate
+ * @param {Number} lastRow The final row to duplicate
+ * @returns {Number} Returns the number of new rows added; in other words, `lastRow - firstRow + 1`.
+ **/
+ duplicateLines(firstRow: number, lastRow: number): number;
+ /**
+ * Sets whether or not line wrapping is enabled. If `useWrapMode` is different than the current value, the `'changeWrapMode'` event is emitted.
+ * @param {Boolean} useWrapMode Enable (or disable) wrap mode
+ **/
+ setUseWrapMode(useWrapMode: boolean): void;
+ /**
+ * Returns `true` if wrap mode is being used; `false` otherwise.
+ **/
+ getUseWrapMode(): boolean;
+ /**
+ * Sets the boundaries of wrap. Either value can be `null` to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for `min` or `max` are different, this method also emits the `'changeWrapMode'` event.
+ * @param {Number} min The minimum wrap value (the left side wrap)
+ * @param {Number} max The maximum wrap value (the right side wrap)
+ **/
+ setWrapLimitRange(min: number, max: number): void;
+ /**
+ * This should generally only be called by the renderer when a resize is detected.
+ * @param {Number} desiredLimit The new wrap limit
+ **/
+ adjustWrapLimit(desiredLimit: number, $printMargin?: any): boolean;
+ /**
+ * Returns the value of wrap limit.
+ * @returns {Number} The wrap limit.
+ **/
+ getWrapLimit(): number;
+ /**
+ * Sets the line length for soft wrap in the editor. Lines will break
+ * at a minimum of the given length minus 20 chars and at a maximum
+ * of the given number of chars.
+ * @param {number} limit The maximum line length in chars, for soft wrapping lines.
+ */
+ setWrapLimit(limit: number): void;
+ /**
+ * Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
+ *
+ * { min: wrapLimitRange_min, max: wrapLimitRange_max }
+ *
+ **/
+ getWrapLimitRange(): {
+ min: number;
+ max: number;
+ };
+ /**
+ * Returns number of screenrows in a wrapped line.
+ * @param {Number} row The row number to check
+ **/
+ getRowLength(row: number): number;
+ getRowLineCount(row: number): number;
+ getRowWrapIndent(screenRow: number): number;
+ /**
+ * Returns the position (on screen) for the last character in the provided screen row.
+ * @param {Number} screenRow The screen row to check
+ *
+ * @related EditSession.documentToScreenColumn
+ **/
+ getScreenLastRowColumn(screenRow: number): number;
+ /**
+ * For the given document row and column, this returns the column position of the last screen row.
+ **/
+ getDocumentLastRowColumn(docRow: number, docColumn: number): number;
+ /**
+ * For the given document row and column, this returns the document position of the last row.
+ **/
+ getDocumentLastRowColumnPosition(docRow: number, docColumn: number): Point;
+ /**
+ * For the given row, this returns the split data.
+ */
+ getRowSplitData(row: number): string | undefined;
+ /**
+ * The distance to the next tab stop at the specified screen column.
+ * @param {Number} screenColumn The screen column to check
+ *
+ **/
+ getScreenTabSize(screenColumn: number): number;
+ screenToDocumentRow(screenRow: number, screenColumn: number): number;
+ screenToDocumentColumn(screenRow: number, screenColumn: number): number;
+ /**
+ * Converts characters coordinates on the screen to characters coordinates within the document. [This takes into account code folding, word wrap, tab size, and any other visual modifications.]{: #conversionConsiderations}
+ * @param {Number} screenRow The screen row to check
+ * @param {Number} screenColumn The screen column to check
+ * @param {Number} [offsetX] screen character x-offset [optional]
+ *
+ * @returns {Point} The object returned has two properties: `row` and `column`.
+ *
+ * @related EditSession.documentToScreenPosition
+ **/
+ screenToDocumentPosition(screenRow: number, screenColumn: number, offsetX?: number): Point;
+ /**
+ * Converts document coordinates to screen coordinates. {:conversionConsiderations}
+ * @param {Number|Point} docRow The document row to check
+ * @param {Number|undefined} [docColumn] The document column to check
+ * @returns {Point} The object returned by this method has two properties: `row` and `column`.
+ *
+ * @related EditSession.screenToDocumentPosition
+ **/
+ documentToScreenPosition(docRow: number | Point, docColumn?: number | undefined): Point;
+ /**
+ * For the given document row and column, returns the screen column.
+ **/
+ documentToScreenColumn(row: number | Point, docColumn?: number): number;
+ /**
+ * For the given document row and column, returns the screen row.
+ **/
+ documentToScreenRow(docRow: number | Point, docColumn?: number): number;
+ /**
+ * Returns the length of the screen.
+ **/
+ getScreenLength(): number;
+ /**
+ * @returns {string} the last character preceding the cursor in the editor
+ */
+ getPrecedingCharacter(): string;
+ destroy(): void;
+ /**
+ * Returns the current [[Document `Document`]] as a string.
+ * @method getValue
+ * @alias EditSession.toString
+ **/
+ getValue: () => string;
+ lineWidgets: null | import("ace-code").Ace.LineWidget[];
+ isFullWidth: typeof isFullWidth;
+ lineWidgetsWidth?: number;
+ gutterRenderer?: any;
+ selectionMarkerCount?: number;
+ multiSelect?: any;
+ getSelectionMarkers(): any[];
+ }
+ export namespace EditSession {
+ export { $uid };
+ }
+ export type FontMetrics = import("ace-code/src/layer/font_metrics").FontMetrics;
+ export type FoldLine = import("ace-code/src/edit_session/fold_line").FoldLine;
+ export type Point = import("ace-code").Ace.Point;
+ export type Delta = import("ace-code").Ace.Delta;
+ export type IRange = import("ace-code").Ace.IRange;
+ export type SyntaxMode = import("ace-code").Ace.SyntaxMode;
+ export type LineWidget = import("ace-code").Ace.LineWidget;
+ export type TextMode = SyntaxMode;
+ import { Document } from "ace-code/src/document";
+ import { BackgroundTokenizer } from "ace-code/src/background_tokenizer";
+ import { Selection } from "ace-code/src/selection";
+ import { BidiHandler } from "ace-code/src/bidihandler";
+ import { Range } from "ace-code/src/range";
+ import { LineWidgets } from "ace-code/src/line_widgets";
+ import { UndoManager } from "ace-code/src/undomanager";
+ function isFullWidth(c: any): boolean;
+ var $uid: number;
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ type EditSessionEvents = import("ace-code").Ace.EditSessionEvents;
+ type OptionsProvider = import("ace-code").Ace.OptionsProvider;
+ type EditSessionOptions = import("ace-code").Ace.EditSessionOptions;
+ type Folding = import("ace-code").Ace.Folding;
+ type BracketMatch = import("ace-code").Ace.BracketMatch;
+ type Document = import("ace-code").Ace.Document;
+ type Point = import("ace-code").Ace.Point;
+ type Occur = import("ace-code").Ace.Occur;
+ }
+ export interface EditSession extends Ace.EventEmitter, Ace.OptionsProvider, Ace.Folding, Ace.BracketMatch {
+ doc: Ace.Document;
+ lineWidgetsWidth?: number;
+ gutterRenderer?: any;
+ selectionMarkerCount?: number;
+ multiSelect?: any;
+ getSelectionMarkers(): any[];
+ }
+}
+declare module "ace-code/src/range" {
+ /**
+ * This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogous to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
+ **/
+ export class Range {
+ /**
+ * Creates a new `Range` object with the given starting and ending rows and columns.
+ * @param {Number} [startRow] The starting row
+ * @param {Number} [startColumn] The starting column
+ * @param {Number} [endRow] The ending row
+ * @param {Number} [endColumn] The ending column
+ * @constructor
+ **/
+ constructor(startRow?: number, startColumn?: number, endRow?: number, endColumn?: number);
+ start: Point;
+ end: Point;
+ /**
+ * Returns `true` if and only if the starting row and column, and ending row and column, are equivalent to those given by `range`.
+ * @param {IRange} range A range to check against
+ **/
+ isEqual(range: IRange): boolean;
+ /**
+ * Returns a string containing the range's row and column information, given like this:
+ * ```
+ * [start.row/start.column] -> [end.row/end.column]
+ * ```
+ **/
+ toString(): string;
+ /**
+ * Returns `true` if the `row` and `column` provided are within the given range. This can better be expressed as returning `true` if:
+ * ```javascript
+ * this.start.row <= row <= this.end.row &&
+ * this.start.column <= column <= this.end.column
+ * ```
+ * @param {Number} row A row to check for
+ * @param {Number} column A column to check for
+ * @related [[Range.compare]]
+ **/
+ contains(row: number, column: number): boolean;
+ /**
+ * Compares `this` range (A) with another range (B).
+ * @param {IRange} range A range to compare with
+ * @related [[Range.compare]]
+ * @returns {Number} This method returns one of the following numbers:
+ * * `-2`: (B) is in front of (A), and doesn't intersect with (A)
+ * * `-1`: (B) begins before (A) but ends inside of (A)
+ * * `0`: (B) is completely inside of (A)
+ * * `+1`: (B) begins inside of (A) but ends outside of (A)
+ * * `+2`: (B) is after (A) and doesn't intersect with (A)
+ * * `42`: FTW state: (B) ends in (A) but starts outside of (A)
+ **/
+ compareRange(range: IRange): number;
+ /**
+ * Compares the row and column of `p` with the starting and ending [[Point]]'s of the calling range (by calling [[Range.compare]]).
+ * @param {Point} p A point to compare with
+ * @related [[Range.compare]]
+ **/
+ comparePoint(p: Point): number;
+ /**
+ * Checks the start and end [[Point]]'s of `range` and compares them to the calling range. Returns `true` if the `range` is contained within the caller's range.
+ * @param {IRange} range A range to compare with
+ * @related [[Range.comparePoint]]
+ **/
+ containsRange(range: IRange): boolean;
+ /**
+ * Returns `true` if passed in `range` intersects with the one calling this method.
+ * @param {IRange} range A range to compare with
+ **/
+ intersects(range: IRange): boolean;
+ /**
+ * Returns `true` if the caller's ending row is the same as `row`, and if the caller's ending column is the same as `column`.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ **/
+ isEnd(row: number, column: number): boolean;
+ /**
+ * Returns `true` if the caller's starting row is the same as `row`, and if the caller's starting column is the same as `column`.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ **/
+ isStart(row: number, column: number): boolean;
+ /**
+ * Sets the starting row and column for the range.
+ * @param {Number|Point} row A row to set
+ * @param {Number} [column] A column to set
+ *
+ **/
+ setStart(row: number | Point, column?: number): void;
+ /**
+ * Sets the starting row and column for the range.
+ * @param {Number|Point} row A row to set
+ * @param {Number} [column] A column to set
+ *
+ **/
+ setEnd(row: number | Point, column?: number): void;
+ /**
+ * Returns `true` if the `row` and `column` are within the given range.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @related [[Range.compare]]
+ **/
+ inside(row: number, column: number): boolean;
+ /**
+ * Returns `true` if the `row` and `column` are within the given range's starting [[Point]].
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @related [[Range.compare]]
+ **/
+ insideStart(row: number, column: number): boolean;
+ /**
+ * Returns `true` if the `row` and `column` are within the given range's ending [[Point]].
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @related [[Range.compare]]
+ *
+ **/
+ insideEnd(row: number, column: number): boolean;
+ /**
+ * Compares the `row` and `column` with the starting and ending [[Point]]'s of the calling range.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @returns {Number} This method returns one of the following numbers:
+ * * `1` if `row` is greater than the calling range
+ * * `-1` if `row` is less then the calling range
+ * * `0` otherwise
+ *
+ * If the starting row of the calling range is equal to `row`, and:
+ * * `column` is greater than or equal to the calling range's starting column, this returns `0`
+ * * Otherwise, it returns -1
+ *
+ * If the ending row of the calling range is equal to `row`, and:
+ * * `column` is less than or equal to the calling range's ending column, this returns `0`
+ * * Otherwise, it returns 1
+ **/
+ compare(row: number, column: number): number;
+ /**
+ * Compares the `row` and `column` with the starting and ending [[Point]]'s of the calling range.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @returns {Number} This method returns one of the following numbers:
+ * * `-1` if calling range's starting column and calling range's starting row are equal `row` and `column`
+ * * Otherwise, it returns the value after calling [[Range.compare `compare()`]].
+ **/
+ compareStart(row: number, column: number): number;
+ /**
+ * Compares the `row` and `column` with the starting and ending [[Point]]'s of the calling range.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @returns {Number} This method returns one of the following numbers:
+ * * `1` if calling range's ending column and calling range's ending row are equal `row` and `column`.
+ * * Otherwise, it returns the value after calling [[Range.compare `compare()`]].
+ */
+ compareEnd(row: number, column: number): number;
+ /**
+ * Compares the `row` and `column` with the start and end [[Point]]'s of the calling range.
+ * @param {Number} row A row to compare with
+ * @param {Number} column A column to compare with
+ * @returns {Number} This method returns one of the following numbers:
+ * * `1` if the ending row of the calling range is equal to `row`, and the ending column of the calling range is equal to `column`
+ * * `-1` if the starting row of the calling range is equal to `row`, and the starting column of the calling range is equal to `column`
+ * * Otherwise, it returns the value after calling [[Range.compare `compare()`]].
+ **/
+ compareInside(row: number, column: number): number;
+ /**
+ * Returns the part of the current `Range` that occurs within the boundaries of `firstRow` and `lastRow` as a new `Range` object.
+ * @param {Number} firstRow The starting row
+ * @param {Number} lastRow The ending row
+ **/
+ clipRows(firstRow: number, lastRow: number): Range;
+ /**
+ * Changes the `row` and `column` for the calling range for both the starting and ending [[Point]]'s.
+ * @param {Number} row A new row to extend to
+ * @param {Number} column A new column to extend to
+ * @returns {Range} The original range with the new row
+ **/
+ extend(row: number, column: number): Range;
+ /**
+ * Returns `true` if the calling range is empty (starting [[Point]] == ending [[Point]]).
+ **/
+ isEmpty(): boolean;
+ /**
+ * Returns `true` if the range spans across multiple lines.
+ **/
+ isMultiLine(): boolean;
+ /**
+ * Returns a duplicate of the calling range.
+ **/
+ clone(): Range;
+ /**
+ * Returns a range containing the starting and ending rows of the original range, but with a column value of `0`.
+ **/
+ collapseRows(): Range;
+ /**
+ * Given the current `Range`, this function converts those starting and ending [[Point]]'s into screen positions, and then returns a new `Range` object.
+ * @param {EditSession} session The `EditSession` to retrieve coordinates from
+ **/
+ toScreenRange(session: EditSession): Range;
+ /**
+ * Shift the calling range by `row` and `column` values.
+ * @experimental
+ */
+ moveBy(row: number, column: number): void;
+ id?: number;
+ cursor?: import("ace-code").Ace.Point;
+ isBackwards?: boolean;
+ }
+ export namespace Range {
+ export { fromPoints, comparePoints };
+ }
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ export type IRange = import("ace-code").Ace.IRange;
+ export type Point = import("ace-code").Ace.Point;
+ /**
+ * Creates and returns a new `Range` based on the `start` [[Point]] and `end` [[Point]] of the given parameters.
+ * @param {Point} start A starting point to use
+ * @param {Point} end An ending point to use
+ **/
+ function fromPoints(start: Point, end: Point): Range;
+ /**
+ * Compares `p1` and `p2` [[Point]]'s, useful for sorting
+ */
+ function comparePoints(p1: Point, p2: Point): number;
+ namespace Ace {
+ type Point = import("ace-code").Ace.Point;
+ }
+ export interface Range {
+ id?: number;
+ cursor?: Ace.Point;
+ isBackwards?: boolean;
+ }
+}
+declare module "ace-code/src/worker/worker_client" {
+ export var WorkerClient: any;
+}
+declare module "ace-code/src/placeholder" {
+ export class PlaceHolder {
+ constructor(session: EditSession, length: number, pos: import("ace-code").Ace.Point, others: any[], mainClass: string, othersClass: string);
+ length: number;
+ session: import("ace-code/src/edit_session").EditSession;
+ doc: import("ace-code/src/document").Document;
+ mainClass: string;
+ othersClass: string;
+ /**
+ * PlaceHolder.setup()
+ *
+ * TODO
+ *
+ **/
+ setup(): void;
+ selectionBefore: Range | Range[];
+ pos: import("ace-code/src/anchor").Anchor;
+ others: any[];
+ /**
+ * PlaceHolder.showOtherMarkers()
+ *
+ * TODO
+ *
+ **/
+ showOtherMarkers(): void;
+ othersActive: boolean;
+ /**
+ * PlaceHolder.hideOtherMarkers()
+ *
+ * Hides all over markers in the [[EditSession `EditSession`]] that are not the currently selected one.
+ *
+ **/
+ hideOtherMarkers(): void;
+ updateAnchors(delta: import("ace-code").Ace.Delta): void;
+ updateMarkers(): void;
+ /**
+ * PlaceHolder.detach()
+ *
+ * TODO
+ *
+ **/
+ detach(): void;
+ /**
+ * PlaceHolder.cancel()
+ *
+ * TODO
+ *
+ **/
+ cancel(): void;
+ }
+ export type EditSession = import("ace-code/src/edit_session").EditSession;
+ import { Range } from "ace-code/src/range";
+ namespace Ace {
+ type EventEmitter = import("ace-code").Ace.EventEmitter;
+ type PlaceHolderEvents = import("ace-code").Ace.PlaceHolderEvents;
+ }
+ export interface PlaceHolder extends Ace.EventEmitter {
+ }
+}
+declare module "ace-code/src/mouse/multi_select_handler" {
+ export function onMouseDown(e: any): any;
+}
+declare module "ace-code/src/commands/multi_select_commands" {
+ export const defaultCommands: import("ace-code").Ace.Command[];
+ export const multiSelectCommands: import("ace-code").Ace.Command[];
+ export const keyboardHandler: HashHandler;
+ import { HashHandler } from "ace-code/src/keyboard/hash_handler";
+}
+declare module "ace-code/src/multi_select" {
+ export const commands: import("ace-code").Ace.Command[];
+ export const onSessionChange: (e: any) => void;
+ export type Anchor = import("ace-code/src/anchor").Anchor;
+ export type Point = import("ace-code").Ace.Point;
+ export type ScreenCoordinates = import("ace-code").Ace.ScreenCoordinates;
+ export function MultiSelect(editor: Editor): void;
+ import { Editor } from "ace-code/src/editor";
+}
+declare module "ace-code/src/commands/occur_commands" {
+ export namespace occurStartCommand {
+ let name: string;
+ function exec(editor: any, options: any): void;
+ let readOnly: boolean;
+ }
+}
+declare module "ace-code/src/commands/incremental_search_commands" {
+ export const iSearchStartCommands: ({
+ name: string;
+ bindKey: {
+ win: string;
+ mac: string;
+ };
+ exec: (editor: any, options: any) => void;
+ readOnly: boolean;
+ } | {
+ name: string;
+ exec: (editor: any, jumpToNext: any) => void;
+ readOnly: boolean;
+ bindKey?: undefined;
+ })[];
+ export const iSearchCommands: ({
+ name: string;
+ bindKey: {
+ win: string;
+ mac: string;
+ };
+ exec: (iSearch: any, options: any) => void;
+ } | {
+ name: string;
+ exec: (iSearch: any, string: any) => void;
+ bindKey?: undefined;
+ } | {
+ name: string;
+ bindKey: string;
+ exec: (iSearch: any) => void;
+ })[];
+ export function IncrementalSearchKeyboardHandler(iSearch: any): void;
+ export class IncrementalSearchKeyboardHandler {
+ constructor(iSearch: any);
+ }
+}
+declare module "ace-code/src/incremental_search" {
+ /**
+ * Implements immediate searching while the user is typing. When incremental
+ * search is activated, keystrokes into the editor will be used for composing
+ * a search term. Immediately after every keystroke the search is updated:
+ * - so-far-matching characters are highlighted
+ * - the cursor is moved to the next match
+ *
+ **/
+ export class IncrementalSearch extends Search {
+ activate(editor: any, backwards: boolean): void;
+ deactivate(reset?: boolean): void;
+ selectionFix(editor: Editor): void;
+ highlight(regexp: RegExp): void;
+ cancelSearch(reset?: boolean): Range;
+ highlightAndFindWithNeedle(moveToNext: boolean, needleUpdateFunc: Function): false | Range;
+ addString(s: string): false | Range;
+ removeChar(c: any): false | Range;
+ next(options: any): false | Range;
+ convertNeedleToRegExp(): false | Range;
+ convertNeedleToString(): false | Range;
+ statusMessage(found: any): void;
+ message(msg: any): void;
+ }
+ import { Search } from "ace-code/src/search";
+ import iSearchCommandModule = require("ace-code/src/commands/incremental_search_commands");
+ import { Editor } from "ace-code/src/editor";
+ import { Range } from "ace-code/src/range";
+}
+declare module "ace-code/src/split" {
+ export type ISplit = import("ace-code").Ace.EventEmitter & {
+ [key: string]: any;
+ };
+ export var Split: any;
+}
+declare module "ace-code/src/tokenizer_dev" {
+ export class Tokenizer extends BaseTokenizer {
+ /**
+ * Returns an object containing two properties: `tokens`, which contains all the tokens; and `state`, the current state.
+ **/
+ getLineTokens(line: any, startState: any): any;
+ }
+ import { Tokenizer as BaseTokenizer } from "ace-code/src/tokenizer";
+}
+declare module "ace-code/src/unicode" {
+ export const wordChars: any;
+}
+declare module "ace-code/src/keyboard/textarea" {
+ export const handler: HashHandler;
+ import { HashHandler } from "ace-code/src/keyboard/hash_handler";
+}
diff --git a/types/ace-snippets.d.ts b/types/ace-snippets.d.ts
new file mode 100644
index 00000000000..a3a14cb8cbe
--- /dev/null
+++ b/types/ace-snippets.d.ts
@@ -0,0 +1,402 @@
+/* This file is generated using `npm run update-types` */
+
+declare module "ace-code/src/snippets/abc.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/abc" {
+ export const snippetText: string;
+ export const scope: "abc";
+}
+declare module "ace-code/src/snippets/actionscript.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/actionscript" {
+ export const snippetText: string;
+ export const scope: "actionscript";
+}
+declare module "ace-code/src/snippets/c_cpp.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/c_cpp" {
+ export const snippetText: string;
+ export const scope: "c_cpp";
+}
+declare module "ace-code/src/snippets/clojure.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/clojure" {
+ export const snippetText: string;
+ export const scope: "clojure";
+}
+declare module "ace-code/src/snippets/coffee.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/coffee" {
+ export const snippetText: string;
+ export const scope: "coffee";
+}
+declare module "ace-code/src/snippets/csound_document.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/csound_document" {
+ export const snippetText: string;
+ export const scope: "csound_document";
+}
+declare module "ace-code/src/snippets/csound_orchestra.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/csound_orchestra" {
+ export const snippetText: string;
+ export const scope: "csound_orchestra";
+}
+declare module "ace-code/src/snippets/css.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/css" {
+ export const snippetText: string;
+ export const scope: "css";
+}
+declare module "ace-code/src/snippets/dart.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/dart" {
+ export const snippetText: string;
+ export const scope: "dart";
+}
+declare module "ace-code/src/snippets/diff.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/diff" {
+ export const snippetText: string;
+ export const scope: "diff";
+}
+declare module "ace-code/src/snippets/django.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/django" {
+ export const snippetText: string;
+ export const scope: "django";
+}
+declare module "ace-code/src/snippets/drools.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/drools" {
+ export const snippetText: string;
+ export const scope: "drools";
+}
+declare module "ace-code/src/snippets/edifact.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/edifact" {
+ export const snippetText: string;
+ export const scope: "edifact";
+}
+declare module "ace-code/src/snippets/erlang.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/erlang" {
+ export const snippetText: string;
+ export const scope: "erlang";
+}
+declare module "ace-code/src/snippets/fsl.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/fsl" {
+ export const snippetText: string;
+ export const scope: "fsl";
+}
+declare module "ace-code/src/snippets/gobstones.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/gobstones" {
+ export const snippetText: string;
+ export const scope: "gobstones";
+}
+declare module "ace-code/src/snippets/graphqlschema.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/graphqlschema" {
+ export const snippetText: string;
+ export const scope: "graphqlschema";
+}
+declare module "ace-code/src/snippets/haml.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/haml" {
+ export const snippetText: string;
+ export const scope: "haml";
+}
+declare module "ace-code/src/snippets/haskell.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/haskell" {
+ export const snippetText: string;
+ export const scope: "haskell";
+}
+declare module "ace-code/src/snippets/html.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/html" {
+ export const snippetText: string;
+ export const scope: "html";
+}
+declare module "ace-code/src/snippets/io" {
+ export const snippets: ({
+ content: string;
+ name: string;
+ scope: string;
+ tabTrigger: string;
+ keyEquivalent?: undefined;
+ } | {
+ content: string;
+ keyEquivalent: string;
+ name: string;
+ scope: string;
+ tabTrigger: string;
+ } | {
+ content: string;
+ keyEquivalent: string;
+ name: string;
+ scope: string;
+ tabTrigger?: undefined;
+ })[];
+ export const scope: "io";
+}
+declare module "ace-code/src/snippets/java.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/java" {
+ export const snippetText: string;
+ export const scope: "java";
+}
+declare module "ace-code/src/snippets/javascript.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/javascript" {
+ export const snippetText: string;
+ export const scope: "javascript";
+}
+declare module "ace-code/src/snippets/jsp.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/jsp" {
+ export const snippetText: string;
+ export const scope: "jsp";
+}
+declare module "ace-code/src/snippets/liquid.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/liquid" {
+ export const snippetText: string;
+ export const scope: "liquid";
+}
+declare module "ace-code/src/snippets/lsl.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/lsl" {
+ export const snippetText: string;
+ export const scope: "lsl";
+}
+declare module "ace-code/src/snippets/lua.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/lua" {
+ export const snippetText: string;
+ export const scope: "lua";
+}
+declare module "ace-code/src/snippets/makefile.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/makefile" {
+ export const snippetText: string;
+ export const scope: "makefile";
+}
+declare module "ace-code/src/snippets/markdown.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/markdown" {
+ export const snippetText: string;
+ export const scope: "markdown";
+}
+declare module "ace-code/src/snippets/maze.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/maze" {
+ export const snippetText: string;
+ export const scope: "maze";
+}
+declare module "ace-code/src/snippets/perl.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/perl" {
+ export const snippetText: string;
+ export const scope: "perl";
+}
+declare module "ace-code/src/snippets/php.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/php" {
+ export const snippetText: string;
+ export const scope: "php";
+}
+declare module "ace-code/src/snippets/python.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/python" {
+ export const snippetText: string;
+ export const scope: "python";
+}
+declare module "ace-code/src/snippets/r.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/r" {
+ export const snippetText: string;
+ export const scope: "r";
+}
+declare module "ace-code/src/snippets/razor.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/razor" {
+ export const snippetText: string;
+ export const scope: "razor";
+}
+declare module "ace-code/src/snippets/robot.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/robot" {
+ export const snippetText: string;
+ export const scope: "robot";
+}
+declare module "ace-code/src/snippets/rst.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/rst" {
+ export const snippetText: string;
+ export const scope: "rst";
+}
+declare module "ace-code/src/snippets/ruby.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/ruby" {
+ export const snippetText: string;
+ export const scope: "ruby";
+}
+declare module "ace-code/src/snippets/sh.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/sh" {
+ export const snippetText: string;
+ export const scope: "sh";
+}
+declare module "ace-code/src/snippets/snippets.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/snippets" {
+ export const snippetText: string;
+ export const scope: "snippets";
+}
+declare module "ace-code/src/snippets/sql.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/sql" {
+ export const snippetText: string;
+ export const scope: "sql";
+}
+declare module "ace-code/src/snippets/sqlserver.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/sqlserver" {
+ export const snippetText: string;
+ export const scope: "sqlserver";
+}
+declare module "ace-code/src/snippets/tcl.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/tcl" {
+ export const snippetText: string;
+ export const scope: "tcl";
+}
+declare module "ace-code/src/snippets/tex.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/tex" {
+ export const snippetText: string;
+ export const scope: "tex";
+}
+declare module "ace-code/src/snippets/textile.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/textile" {
+ export const snippetText: string;
+ export const scope: "textile";
+}
+declare module "ace-code/src/snippets/vala" {
+ export const snippets: {
+ content: string;
+ name: string;
+ scope: string;
+ tabTrigger: string;
+ }[];
+ export const scope: "";
+}
+declare module "ace-code/src/snippets/velocity.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/velocity" {
+ export const snippetText: string;
+ export const scope: "velocity";
+ export const includeScopes: string[];
+}
+declare module "ace-code/src/snippets/wollok.snippets" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/snippets/wollok" {
+ export const snippetText: string;
+ export const scope: "wollok";
+}
diff --git a/types/ace-theme.d.ts b/types/ace-theme.d.ts
new file mode 100644
index 00000000000..363dd69b787
--- /dev/null
+++ b/types/ace-theme.d.ts
@@ -0,0 +1,437 @@
+/* This file is generated using `npm run update-types` */
+
+declare module "ace-code/src/theme/textmate-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/textmate" {
+ export const isDark: false;
+ export const cssClass: "ace-tm";
+ export const cssText: string;
+ export const $id: "ace/theme/textmate";
+}
+declare module "ace-code/src/theme/ambiance-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/ambiance" {
+ export const isDark: true;
+ export const cssClass: "ace-ambiance";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/chaos-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/chaos" {
+ export const isDark: true;
+ export const cssClass: "ace-chaos";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/chrome-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/chrome" {
+ export const isDark: false;
+ export const cssClass: "ace-chrome";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/cloud9_day-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/cloud9_day" {
+ export const isDark: false;
+ export const cssClass: "ace-cloud9-day";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/cloud9_night-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/cloud9_night" {
+ export const isDark: true;
+ export const cssClass: "ace-cloud9-night";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/cloud9_night_low_color-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/cloud9_night_low_color" {
+ export const isDark: true;
+ export const cssClass: "ace-cloud9-night-low-color";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/cloud_editor-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/cloud_editor" {
+ export const isDark: false;
+ export const cssClass: "ace-cloud_editor";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/cloud_editor_dark-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/cloud_editor_dark" {
+ export const isDark: true;
+ export const cssClass: "ace-cloud_editor_dark";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/clouds-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/clouds" {
+ export const isDark: false;
+ export const cssClass: "ace-clouds";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/clouds_midnight-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/clouds_midnight" {
+ export const isDark: true;
+ export const cssClass: "ace-clouds-midnight";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/cobalt-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/cobalt" {
+ export const isDark: true;
+ export const cssClass: "ace-cobalt";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/crimson_editor-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/crimson_editor" {
+ export const isDark: false;
+ export const cssText: string;
+ export const cssClass: "ace-crimson-editor";
+}
+declare module "ace-code/src/theme/dawn-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/dawn" {
+ export const isDark: false;
+ export const cssClass: "ace-dawn";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/dracula-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/dracula" {
+ export const isDark: true;
+ export const cssClass: "ace-dracula";
+ export const cssText: string;
+ export const $selectionColorConflict: true;
+}
+declare module "ace-code/src/theme/dreamweaver-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/dreamweaver" {
+ export const isDark: false;
+ export const cssClass: "ace-dreamweaver";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/eclipse-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/eclipse" {
+ export const isDark: false;
+ export const cssText: string;
+ export const cssClass: "ace-eclipse";
+}
+declare module "ace-code/src/theme/github-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/github" {
+ export const isDark: false;
+ export const cssClass: "ace-github";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/github_dark-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/github_dark" {
+ export const isDark: true;
+ export const cssClass: "ace-github-dark";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/github_light_default-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/github_light_default" {
+ export const isDark: false;
+ export const cssClass: "ace-github-light-default";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/gob-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/gob" {
+ export const isDark: true;
+ export const cssClass: "ace-gob";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/gruvbox-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/gruvbox" {
+ export const isDark: true;
+ export const cssClass: "ace-gruvbox";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/gruvbox_dark_hard-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/gruvbox_dark_hard" {
+ export const isDark: true;
+ export const cssClass: "ace-gruvbox-dark-hard";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/gruvbox_light_hard-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/gruvbox_light_hard" {
+ export const isDark: false;
+ export const cssClass: "ace-gruvbox-light-hard";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/idle_fingers-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/idle_fingers" {
+ export const isDark: true;
+ export const cssClass: "ace-idle-fingers";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/iplastic-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/iplastic" {
+ export const isDark: false;
+ export const cssClass: "ace-iplastic";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/katzenmilch-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/katzenmilch" {
+ export const isDark: false;
+ export const cssClass: "ace-katzenmilch";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/kr_theme-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/kr_theme" {
+ export const isDark: true;
+ export const cssClass: "ace-kr-theme";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/kuroir-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/kuroir" {
+ export const isDark: false;
+ export const cssClass: "ace-kuroir";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/merbivore-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/merbivore" {
+ export const isDark: true;
+ export const cssClass: "ace-merbivore";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/merbivore_soft-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/merbivore_soft" {
+ export const isDark: true;
+ export const cssClass: "ace-merbivore-soft";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/mono_industrial-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/mono_industrial" {
+ export const isDark: true;
+ export const cssClass: "ace-mono-industrial";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/monokai-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/monokai" {
+ export const isDark: true;
+ export const cssClass: "ace-monokai";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/nord_dark-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/nord_dark" {
+ export const isDark: true;
+ export const cssClass: "ace-nord-dark";
+ export const cssText: string;
+ export const $selectionColorConflict: true;
+}
+declare module "ace-code/src/theme/one_dark-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/one_dark" {
+ export const isDark: true;
+ export const cssClass: "ace-one-dark";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/pastel_on_dark-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/pastel_on_dark" {
+ export const isDark: true;
+ export const cssClass: "ace-pastel-on-dark";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/solarized_dark-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/solarized_dark" {
+ export const isDark: true;
+ export const cssClass: "ace-solarized-dark";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/solarized_light-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/solarized_light" {
+ export const isDark: false;
+ export const cssClass: "ace-solarized-light";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/sqlserver-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/sqlserver" {
+ export const isDark: false;
+ export const cssClass: "ace-sqlserver";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/terminal-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/terminal" {
+ export const isDark: true;
+ export const cssClass: "ace-terminal-theme";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/tomorrow-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/tomorrow" {
+ export const isDark: false;
+ export const cssClass: "ace-tomorrow";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/tomorrow_night-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/tomorrow_night" {
+ export const isDark: true;
+ export const cssClass: "ace-tomorrow-night";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/tomorrow_night_blue-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/tomorrow_night_blue" {
+ export const isDark: true;
+ export const cssClass: "ace-tomorrow-night-blue";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/tomorrow_night_bright-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/tomorrow_night_bright" {
+ export const isDark: true;
+ export const cssClass: "ace-tomorrow-night-bright";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/tomorrow_night_eighties-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/tomorrow_night_eighties" {
+ export const isDark: true;
+ export const cssClass: "ace-tomorrow-night-eighties";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/twilight-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/twilight" {
+ export const isDark: true;
+ export const cssClass: "ace-twilight";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/vibrant_ink-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/vibrant_ink" {
+ export const isDark: true;
+ export const cssClass: "ace-vibrant-ink";
+ export const cssText: string;
+}
+declare module "ace-code/src/theme/xcode-css" {
+ const _exports: string;
+ export = _exports;
+}
+declare module "ace-code/src/theme/xcode" {
+ export const isDark: false;
+ export const cssClass: "ace-xcode";
+ export const cssText: string;
+}