@kusto/monaco-kusto 7.0.1 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-a33ab1e1'], (function (exports, monaco, main) { 'use strict';
8
+ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-a9bd6fdf'], (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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-a33ab1e1', './schema-0bb01ba6'], (function (exports, main, schema) { 'use strict';
8
+ define('vs/language/kusto/kustoWorker', ['exports', './main-a9bd6fdf', './schema-9cf94ce1'], (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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-a33ab1e1', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/main-a9bd6fdf', ['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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-0bb01ba6'], (function (require, exports, monaco, schema) { 'use strict';
8
+ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-9cf94ce1'], (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('kusto-light', {
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('kusto-dark', {
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('kusto-dark2', {
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
- // hook up extension methods to editor.
467
- extend(editor);
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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-0bb01ba6', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/schema-9cf94ce1', ['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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-cdbe085f.js';
11
+ import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-53127847.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';
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 7.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
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-cdbe085f.js';
10
- export { s as showSchema } from './schema-cdbe085f.js';
9
+ import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-53127847.js';
10
+ export { s as showSchema } from './schema-53127847.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('kusto-light', {
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('kusto-dark', {
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('kusto-dark2', {
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
- // hook up extension methods to editor.
401
- extend(editor);
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.0.1(d5a041ddb6e4a3a3ebcb2a1aa79da979a62b6da2)
3
+ * monaco-kusto version: 7.2.0(ff25adc61b13954e5ec288fcdc16c92483943ef5)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/