@kusto/monaco-kusto 7.0.1 → 7.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/globalApi.d.ts +40 -1
- package/package.json +3 -6
- package/release/dev/Kusto.Language.Bridge.min.js +1 -1
- package/release/dev/kusto.javascript.client.min.js +1 -1
- package/release/dev/kustoMode.js +2 -2
- package/release/dev/kustoWorker.js +2 -2
- package/release/dev/{main-a33ab1e1.js → main-919033b0.js} +2 -2
- package/release/dev/monaco.contribution.js +21 -8
- package/release/dev/{schema-0bb01ba6.js → schema-ee65b25b.js} +2 -2
- package/release/esm/kusto.worker.js +2 -2
- package/release/esm/kustoMode.js +1 -1
- package/release/esm/monaco.contribution.d.ts +5 -0
- package/release/esm/monaco.contribution.js +21 -10
- package/release/esm/{schema-cdbe085f.js → schema-cdd9848d.js} +1 -1
- package/release/min/Kusto.Language.Bridge.min.js +1 -1
- package/release/min/kusto.javascript.client.min.js +1 -1
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +2 -2
- package/release/min/{main-8cd8c26d.js → main-c7341389.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/{schema-d831c44f.js → schema-d866b467.js} +2 -2
package/release/dev/kustoMode.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-
|
|
8
|
+
define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-919033b0'], (function (exports, monaco, main) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/kustoWorker', ['exports', './main-
|
|
8
|
+
define('vs/language/kusto/kustoWorker', ['exports', './main-919033b0', './schema-ee65b25b'], (function (exports, main, schema) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
11
11
|
function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/main-
|
|
8
|
+
define('vs/language/kusto/main-919033b0', ['exports'], (function (exports) { 'use strict';
|
|
9
9
|
|
|
10
10
|
/* --------------------------------------------------------------------------------------------
|
|
11
11
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-
|
|
8
|
+
define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-ee65b25b'], (function (require, exports, monaco, schema) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -269,6 +269,11 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
269
269
|
new Promise(function (resolve, reject) { require(['./kustoMode'], resolve, reject); }).then(callback);
|
|
270
270
|
}
|
|
271
271
|
var kustoDefaults = new LanguageServiceDefaultsImpl(defaultLanguageSettings);
|
|
272
|
+
var themeNames = {
|
|
273
|
+
light: 'kusto-light',
|
|
274
|
+
dark: 'kusto-dark',
|
|
275
|
+
dark2: 'kusto-dark2'
|
|
276
|
+
};
|
|
272
277
|
monaco__namespace.languages.onLanguage('kusto', function () {
|
|
273
278
|
withMode(function (mode) {
|
|
274
279
|
return mode.setupMode(kustoDefaults, monaco__namespace);
|
|
@@ -278,7 +283,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
278
283
|
id: 'kusto',
|
|
279
284
|
extensions: ['.csl', '.kql']
|
|
280
285
|
});
|
|
281
|
-
monaco__namespace.editor.defineTheme(
|
|
286
|
+
monaco__namespace.editor.defineTheme(themeNames.light, {
|
|
282
287
|
base: 'vs',
|
|
283
288
|
inherit: true,
|
|
284
289
|
rules: [{
|
|
@@ -362,7 +367,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
362
367
|
}],
|
|
363
368
|
colors: {}
|
|
364
369
|
});
|
|
365
|
-
monaco__namespace.editor.defineTheme(
|
|
370
|
+
monaco__namespace.editor.defineTheme(themeNames.dark, {
|
|
366
371
|
base: 'vs-dark',
|
|
367
372
|
inherit: true,
|
|
368
373
|
rules: [{
|
|
@@ -448,7 +453,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
448
453
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
449
454
|
}
|
|
450
455
|
});
|
|
451
|
-
monaco__namespace.editor.defineTheme(
|
|
456
|
+
monaco__namespace.editor.defineTheme(themeNames.dark2, {
|
|
452
457
|
base: 'vs-dark',
|
|
453
458
|
inherit: true,
|
|
454
459
|
rules: [],
|
|
@@ -463,8 +468,14 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
463
468
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
|
464
469
|
// Most other language features are initialized in kustoMode.ts
|
|
465
470
|
monaco__namespace.editor.onDidCreateEditor(function (editor) {
|
|
466
|
-
|
|
467
|
-
|
|
471
|
+
var _window$MonacoEnviron;
|
|
472
|
+
if ((_window$MonacoEnviron = window.MonacoEnvironment) !== null && _window$MonacoEnviron !== void 0 && _window$MonacoEnviron.globalAPI) {
|
|
473
|
+
// hook up extension methods to editor.
|
|
474
|
+
extend(editor);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// TODO: asked if there's a cleaner way to register an editor contribution. looks like monaco has an internal contribution registrar but it's no exposed in the API.
|
|
478
|
+
// https://stackoverflow.com/questions/46700245/how-to-add-an-ieditorcontribution-to-monaco-editor
|
|
468
479
|
new KustoCommandHighlighter(editor);
|
|
469
480
|
if (isStandaloneCodeEditor(editor)) {
|
|
470
481
|
new KustoCommandFormatter(editor);
|
|
@@ -505,7 +516,8 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
505
516
|
getEntityDataTypeFromCslType: schema.getEntityDataTypeFromCslType,
|
|
506
517
|
kustoDefaults: kustoDefaults,
|
|
507
518
|
getKustoWorker: getKustoWorker,
|
|
508
|
-
getCurrentCommandRange: getCurrentCommandRange
|
|
519
|
+
getCurrentCommandRange: getCurrentCommandRange,
|
|
520
|
+
themeNames: themeNames
|
|
509
521
|
};
|
|
510
522
|
monaco__namespace.languages.kusto = globalApi;
|
|
511
523
|
|
|
@@ -521,5 +533,6 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
521
533
|
exports.getCurrentCommandRange = getCurrentCommandRange;
|
|
522
534
|
exports.getKustoWorker = getKustoWorker;
|
|
523
535
|
exports.kustoDefaults = kustoDefaults;
|
|
536
|
+
exports.themeNames = themeNames;
|
|
524
537
|
|
|
525
538
|
}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
|
-
define('vs/language/kusto/schema-
|
|
8
|
+
define('vs/language/kusto/schema-ee65b25b', ['exports'], (function (exports) { 'use strict';
|
|
9
9
|
|
|
10
10
|
// Definition of schema object in the context of language services. This model is exposed to consumers of this library.
|
|
11
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as worker from 'monaco-editor/esm/vs/editor/editor.worker';
|
|
9
9
|
import * as ls from 'vscode-languageserver-types';
|
|
10
10
|
import XRegExp from 'xregexp';
|
|
11
|
-
import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-
|
|
11
|
+
import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-cdd9848d.js';
|
|
12
12
|
import '@kusto/language-service/bridge.min';
|
|
13
13
|
import '@kusto/language-service/Kusto.JavaScript.Client.min';
|
|
14
14
|
import '@kusto/language-service/newtonsoft.json.min';
|
package/release/esm/kustoMode.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
@@ -19,3 +19,8 @@ declare class LanguageServiceDefaultsImpl implements LanguageServiceDefaults {
|
|
|
19
19
|
}
|
|
20
20
|
export declare function getKustoWorker(): Promise<WorkerAccessor>;
|
|
21
21
|
export declare const kustoDefaults: LanguageServiceDefaultsImpl;
|
|
22
|
+
export declare const themeNames: {
|
|
23
|
+
light: string;
|
|
24
|
+
dark: string;
|
|
25
|
+
dark2: string;
|
|
26
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
7
|
|
|
8
8
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
9
|
-
import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-
|
|
10
|
-
export { s as showSchema } from './schema-
|
|
9
|
+
import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-cdd9848d.js';
|
|
10
|
+
export { s as showSchema } from './schema-cdd9848d.js';
|
|
11
11
|
|
|
12
12
|
function getCurrentCommandRange(editor, cursorPosition) {
|
|
13
13
|
const zeroBasedCursorLineNumber = cursorPosition.lineNumber - 1;
|
|
@@ -205,6 +205,11 @@ function withMode(callback) {
|
|
|
205
205
|
import('./kustoMode.js').then(callback);
|
|
206
206
|
}
|
|
207
207
|
const kustoDefaults = new LanguageServiceDefaultsImpl(defaultLanguageSettings);
|
|
208
|
+
const themeNames = {
|
|
209
|
+
light: 'kusto-light',
|
|
210
|
+
dark: 'kusto-dark',
|
|
211
|
+
dark2: 'kusto-dark2'
|
|
212
|
+
};
|
|
208
213
|
monaco.languages.onLanguage('kusto', () => {
|
|
209
214
|
withMode(mode => mode.setupMode(kustoDefaults, monaco));
|
|
210
215
|
});
|
|
@@ -212,7 +217,7 @@ monaco.languages.register({
|
|
|
212
217
|
id: 'kusto',
|
|
213
218
|
extensions: ['.csl', '.kql']
|
|
214
219
|
});
|
|
215
|
-
monaco.editor.defineTheme(
|
|
220
|
+
monaco.editor.defineTheme(themeNames.light, {
|
|
216
221
|
base: 'vs',
|
|
217
222
|
inherit: true,
|
|
218
223
|
rules: [{
|
|
@@ -296,7 +301,7 @@ monaco.editor.defineTheme('kusto-light', {
|
|
|
296
301
|
}],
|
|
297
302
|
colors: {}
|
|
298
303
|
});
|
|
299
|
-
monaco.editor.defineTheme(
|
|
304
|
+
monaco.editor.defineTheme(themeNames.dark, {
|
|
300
305
|
base: 'vs-dark',
|
|
301
306
|
inherit: true,
|
|
302
307
|
rules: [{
|
|
@@ -382,7 +387,7 @@ monaco.editor.defineTheme('kusto-dark', {
|
|
|
382
387
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
383
388
|
}
|
|
384
389
|
});
|
|
385
|
-
monaco.editor.defineTheme(
|
|
390
|
+
monaco.editor.defineTheme(themeNames.dark2, {
|
|
386
391
|
base: 'vs-dark',
|
|
387
392
|
inherit: true,
|
|
388
393
|
rules: [],
|
|
@@ -397,8 +402,13 @@ monaco.editor.defineTheme('kusto-dark2', {
|
|
|
397
402
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
|
398
403
|
// Most other language features are initialized in kustoMode.ts
|
|
399
404
|
monaco.editor.onDidCreateEditor(editor => {
|
|
400
|
-
|
|
401
|
-
|
|
405
|
+
if (window.MonacoEnvironment?.globalAPI) {
|
|
406
|
+
// hook up extension methods to editor.
|
|
407
|
+
extend(editor);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// TODO: asked if there's a cleaner way to register an editor contribution. looks like monaco has an internal contribution registrar but it's no exposed in the API.
|
|
411
|
+
// https://stackoverflow.com/questions/46700245/how-to-add-an-ieditorcontribution-to-monaco-editor
|
|
402
412
|
new KustoCommandHighlighter(editor);
|
|
403
413
|
if (isStandaloneCodeEditor(editor)) {
|
|
404
414
|
new KustoCommandFormatter(editor);
|
|
@@ -437,8 +447,9 @@ const globalApi = {
|
|
|
437
447
|
getEntityDataTypeFromCslType,
|
|
438
448
|
kustoDefaults,
|
|
439
449
|
getKustoWorker,
|
|
440
|
-
getCurrentCommandRange
|
|
450
|
+
getCurrentCommandRange,
|
|
451
|
+
themeNames
|
|
441
452
|
};
|
|
442
453
|
monaco.languages.kusto = globalApi;
|
|
443
454
|
|
|
444
|
-
export { getCallName, getCslTypeNameFromClrType, getCurrentCommandRange, getEntityDataTypeFromCslType, getExpression, getInputParametersAsCslString, getKustoWorker, kustoDefaults };
|
|
455
|
+
export { getCallName, getCslTypeNameFromClrType, getCurrentCommandRange, getEntityDataTypeFromCslType, getExpression, getInputParametersAsCslString, getKustoWorker, kustoDefaults, themeNames };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 7.
|
|
3
|
+
* monaco-kusto version: 7.2.1(b1d17bbed02ccac9d22a492d16d5e01efa6a263d)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|