@kusto/monaco-kusto 11.4.0 → 12.0.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.
- package/README.md +19 -1
- package/package.json +3 -1
- package/release/dev/globals-0aacfe72.js +46 -0
- package/release/dev/kustoMode.js +214 -497
- package/release/dev/kustoWorker.js +49 -90
- package/release/dev/{main-1587ba64.js → main-b690e47e.js} +2 -2
- package/release/dev/monaco.contribution.js +235 -201
- package/release/dev/{schema-a5230652.js → schema-957f5e9b.js} +13 -2
- package/release/esm/extendedGlobalApi/getRangeHtml.d.ts +2 -0
- package/release/esm/extendedGlobalApi/getRangeHtml.js +11 -0
- package/release/esm/extendedGlobalApi/index.d.ts +1 -0
- package/release/esm/extendedGlobalApi/index.js +1 -0
- package/release/esm/globals-88d92b64.js +40 -0
- package/release/esm/globals.d.ts +1 -0
- package/release/esm/globals.js +1 -0
- package/release/esm/kusto.worker.js +39 -91
- package/release/esm/kustoMode.js +39 -29
- package/release/esm/kustoWorker.d.ts +2 -5
- package/release/esm/kustoWorker.js +2 -5
- package/release/esm/languageFeatures.d.ts +0 -13
- package/release/esm/languageFeatures.js +0 -299
- package/release/esm/languageServiceManager/kustoLanguageService.d.ts +2 -4
- package/release/esm/languageServiceManager/kustoLanguageService.js +58 -71
- package/release/esm/languageServiceManager/settings.d.ts +0 -2
- package/release/esm/monaco.contribution.d.ts +1 -6
- package/release/esm/monaco.contribution.js +22 -79
- package/release/esm/{schema-c006895b.js → schema-66580db4.js} +12 -2
- package/release/esm/syntaxHighlighting/SemanticTokensProvider.d.ts +18 -0
- package/release/esm/syntaxHighlighting/SemanticTokensProvider.js +78 -0
- package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.d.ts +2 -0
- package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.js +401 -0
- package/release/esm/syntaxHighlighting/themes.d.ts +11 -0
- package/release/esm/syntaxHighlighting/themes.js +103 -0
- package/release/esm/syntaxHighlighting/types.d.ts +41 -0
- package/release/esm/syntaxHighlighting/types.js +55 -0
- package/release/min/globals-cce7b304.js +7 -0
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-75aa3e71.js → main-13659fc4.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/schema-ab3cbb28.js +7 -0
- package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.d.ts +0 -2
- package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.js +0 -211
- package/release/min/schema-192b3175.js +0 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version:
|
|
3
|
+
* monaco-kusto version: 12.0.0(2f1838c12bdb98562467acf51b6fd3e396182e86)
|
|
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', './globals-0aacfe72', './schema-957f5e9b'], (function (require, exports, monaco, globals, schema) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -181,7 +181,231 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
181
181
|
});
|
|
182
182
|
});
|
|
183
183
|
|
|
184
|
+
var ThemeName = /*#__PURE__*/function (ThemeName) {
|
|
185
|
+
ThemeName["light"] = "kusto-light";
|
|
186
|
+
ThemeName["dark"] = "kusto-dark";
|
|
187
|
+
return ThemeName;
|
|
188
|
+
}({});
|
|
189
|
+
var colors = {
|
|
190
|
+
white: '#DCDCDC',
|
|
191
|
+
lightGoldenrodYellow: '#FAFAD2',
|
|
192
|
+
softGold: '#D7BA7D',
|
|
193
|
+
paleChestnut: '#D69D85',
|
|
194
|
+
paleVioletRed: '#DB7093',
|
|
195
|
+
firebrick: '#B22222',
|
|
196
|
+
orangeRed: '#FF4500',
|
|
197
|
+
mediumVioletRed: '#C71585',
|
|
198
|
+
magenta: '#FF00FF',
|
|
199
|
+
// for debugging
|
|
200
|
+
darkOrchid: '#9932CC',
|
|
201
|
+
darkViolet: '#9400D3',
|
|
202
|
+
midnightBlue: '#191970',
|
|
203
|
+
blue: '#0000FF',
|
|
204
|
+
blueSapphire: '#004E8C',
|
|
205
|
+
tealBlue: '#2B91AF',
|
|
206
|
+
skyBlue: '#569CD6',
|
|
207
|
+
lightSkyBlue: '#92CAF4',
|
|
208
|
+
mediumTurquoise: '#4EC9B0',
|
|
209
|
+
oliveDrab: '#608B4E',
|
|
210
|
+
green: '#008000',
|
|
211
|
+
jetBlack: '#1B1A19',
|
|
212
|
+
black: '#000000'
|
|
213
|
+
};
|
|
214
|
+
var light = {
|
|
215
|
+
base: 'vs',
|
|
216
|
+
inherit: true,
|
|
217
|
+
rules: [{
|
|
218
|
+
token: '',
|
|
219
|
+
foreground: colors.black
|
|
220
|
+
}, {
|
|
221
|
+
token: globals.Token.PlainText,
|
|
222
|
+
foreground: colors.black
|
|
223
|
+
}, {
|
|
224
|
+
token: globals.Token.Comment,
|
|
225
|
+
foreground: colors.green
|
|
226
|
+
}, {
|
|
227
|
+
token: globals.Token.Punctuation,
|
|
228
|
+
foreground: colors.black
|
|
229
|
+
}, {
|
|
230
|
+
token: globals.Token.Directive,
|
|
231
|
+
foreground: colors.darkViolet
|
|
232
|
+
}, {
|
|
233
|
+
token: globals.Token.Literal,
|
|
234
|
+
foreground: colors.black
|
|
235
|
+
}, {
|
|
236
|
+
token: globals.Token.StringLiteral,
|
|
237
|
+
foreground: colors.firebrick
|
|
238
|
+
}, {
|
|
239
|
+
token: globals.Token.Type,
|
|
240
|
+
foreground: colors.blue
|
|
241
|
+
}, {
|
|
242
|
+
token: globals.Token.Column,
|
|
243
|
+
foreground: colors.mediumVioletRed
|
|
244
|
+
}, {
|
|
245
|
+
token: globals.Token.Table,
|
|
246
|
+
foreground: colors.darkOrchid
|
|
247
|
+
}, {
|
|
248
|
+
token: globals.Token.Database,
|
|
249
|
+
foreground: colors.darkOrchid
|
|
250
|
+
}, {
|
|
251
|
+
token: globals.Token.Function,
|
|
252
|
+
foreground: colors.blue
|
|
253
|
+
}, {
|
|
254
|
+
token: globals.Token.Parameter,
|
|
255
|
+
foreground: colors.midnightBlue
|
|
256
|
+
}, {
|
|
257
|
+
token: globals.Token.Variable,
|
|
258
|
+
foreground: colors.midnightBlue
|
|
259
|
+
}, {
|
|
260
|
+
token: globals.Token.Identifier,
|
|
261
|
+
foreground: colors.black
|
|
262
|
+
}, {
|
|
263
|
+
token: globals.Token.ClientParameter,
|
|
264
|
+
foreground: colors.tealBlue
|
|
265
|
+
}, {
|
|
266
|
+
token: globals.Token.QueryParameter,
|
|
267
|
+
foreground: colors.tealBlue
|
|
268
|
+
}, {
|
|
269
|
+
token: globals.Token.ScalarParameter,
|
|
270
|
+
foreground: colors.blue
|
|
271
|
+
}, {
|
|
272
|
+
token: globals.Token.MathOperator,
|
|
273
|
+
foreground: colors.black
|
|
274
|
+
}, {
|
|
275
|
+
token: globals.Token.QueryOperator,
|
|
276
|
+
foreground: colors.orangeRed
|
|
277
|
+
}, {
|
|
278
|
+
token: globals.Token.Command,
|
|
279
|
+
foreground: colors.blue
|
|
280
|
+
}, {
|
|
281
|
+
token: globals.Token.Keyword,
|
|
282
|
+
foreground: colors.blue
|
|
283
|
+
}, {
|
|
284
|
+
token: globals.Token.MaterializedView,
|
|
285
|
+
foreground: colors.darkOrchid
|
|
286
|
+
}, {
|
|
287
|
+
token: globals.Token.SchemaMember,
|
|
288
|
+
foreground: colors.black
|
|
289
|
+
}, {
|
|
290
|
+
token: globals.Token.SignatureParameter,
|
|
291
|
+
foreground: colors.black
|
|
292
|
+
}, {
|
|
293
|
+
token: globals.Token.Option,
|
|
294
|
+
foreground: colors.black
|
|
295
|
+
}],
|
|
296
|
+
colors: {}
|
|
297
|
+
};
|
|
298
|
+
var dark = {
|
|
299
|
+
base: 'vs-dark',
|
|
300
|
+
inherit: true,
|
|
301
|
+
rules: [{
|
|
302
|
+
token: '',
|
|
303
|
+
foreground: colors.white
|
|
304
|
+
}, {
|
|
305
|
+
token: globals.Token.PlainText,
|
|
306
|
+
foreground: colors.white
|
|
307
|
+
}, {
|
|
308
|
+
token: globals.Token.Comment,
|
|
309
|
+
foreground: colors.oliveDrab
|
|
310
|
+
}, {
|
|
311
|
+
token: globals.Token.Punctuation,
|
|
312
|
+
foreground: colors.white
|
|
313
|
+
}, {
|
|
314
|
+
token: globals.Token.Directive,
|
|
315
|
+
foreground: colors.lightGoldenrodYellow
|
|
316
|
+
}, {
|
|
317
|
+
token: globals.Token.Literal,
|
|
318
|
+
foreground: colors.white
|
|
319
|
+
}, {
|
|
320
|
+
token: globals.Token.StringLiteral,
|
|
321
|
+
foreground: colors.paleChestnut
|
|
322
|
+
}, {
|
|
323
|
+
token: globals.Token.Type,
|
|
324
|
+
foreground: colors.skyBlue
|
|
325
|
+
}, {
|
|
326
|
+
token: globals.Token.Column,
|
|
327
|
+
foreground: colors.paleVioletRed
|
|
328
|
+
}, {
|
|
329
|
+
token: globals.Token.Table,
|
|
330
|
+
foreground: colors.softGold
|
|
331
|
+
}, {
|
|
332
|
+
token: globals.Token.Database,
|
|
333
|
+
foreground: colors.softGold
|
|
334
|
+
}, {
|
|
335
|
+
token: globals.Token.Function,
|
|
336
|
+
foreground: colors.skyBlue
|
|
337
|
+
}, {
|
|
338
|
+
token: globals.Token.Parameter,
|
|
339
|
+
foreground: colors.lightSkyBlue
|
|
340
|
+
}, {
|
|
341
|
+
token: globals.Token.Variable,
|
|
342
|
+
foreground: colors.lightSkyBlue
|
|
343
|
+
}, {
|
|
344
|
+
token: globals.Token.Identifier,
|
|
345
|
+
foreground: colors.white
|
|
346
|
+
}, {
|
|
347
|
+
token: globals.Token.ClientParameter,
|
|
348
|
+
foreground: colors.tealBlue
|
|
349
|
+
}, {
|
|
350
|
+
token: globals.Token.QueryParameter,
|
|
351
|
+
foreground: colors.tealBlue
|
|
352
|
+
}, {
|
|
353
|
+
token: globals.Token.ScalarParameter,
|
|
354
|
+
foreground: colors.skyBlue
|
|
355
|
+
}, {
|
|
356
|
+
token: globals.Token.MathOperator,
|
|
357
|
+
foreground: colors.white
|
|
358
|
+
}, {
|
|
359
|
+
token: globals.Token.QueryOperator,
|
|
360
|
+
foreground: colors.mediumTurquoise
|
|
361
|
+
}, {
|
|
362
|
+
token: globals.Token.Command,
|
|
363
|
+
foreground: colors.skyBlue
|
|
364
|
+
}, {
|
|
365
|
+
token: globals.Token.Keyword,
|
|
366
|
+
foreground: colors.skyBlue
|
|
367
|
+
}, {
|
|
368
|
+
token: globals.Token.MaterializedView,
|
|
369
|
+
foreground: colors.softGold
|
|
370
|
+
}, {
|
|
371
|
+
token: globals.Token.SchemaMember,
|
|
372
|
+
foreground: colors.black
|
|
373
|
+
}, {
|
|
374
|
+
token: globals.Token.SignatureParameter,
|
|
375
|
+
foreground: colors.black
|
|
376
|
+
}, {
|
|
377
|
+
token: globals.Token.Option,
|
|
378
|
+
foreground: colors.black
|
|
379
|
+
}],
|
|
380
|
+
colors: {
|
|
381
|
+
'editor.background': colors.jetBlack,
|
|
382
|
+
'editorSuggestWidget.selectedBackground': colors.blueSapphire
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
var themes = [{
|
|
386
|
+
name: ThemeName.light,
|
|
387
|
+
data: light
|
|
388
|
+
}, {
|
|
389
|
+
name: ThemeName.dark,
|
|
390
|
+
data: dark
|
|
391
|
+
}];
|
|
392
|
+
|
|
393
|
+
function getRangeHtml(model, range) {
|
|
394
|
+
var startLineNumber = range.startLineNumber,
|
|
395
|
+
endLineNumber = range.endLineNumber,
|
|
396
|
+
endColumn = range.endColumn;
|
|
397
|
+
var isLastLineEmpty = endColumn === 1;
|
|
398
|
+
var actualLastLine = isLastLineEmpty ? endLineNumber - 1 : endLineNumber;
|
|
399
|
+
var totalLines = actualLastLine - startLineNumber + 1;
|
|
400
|
+
var colorizedLines = new Array(totalLines).fill(undefined).map(function (_, index) {
|
|
401
|
+
return monaco.editor.colorizeModelLine(model, startLineNumber + index);
|
|
402
|
+
});
|
|
403
|
+
return colorizedLines.join('<br/>');
|
|
404
|
+
}
|
|
405
|
+
|
|
184
406
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
407
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
408
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
185
409
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
186
410
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
187
411
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -239,8 +463,6 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
239
463
|
includeControlCommands: true,
|
|
240
464
|
newlineAfterPipe: true,
|
|
241
465
|
openSuggestionDialogAfterPreviousSuggestionAccepted: true,
|
|
242
|
-
useSemanticColorization: true,
|
|
243
|
-
useTokenColorization: false,
|
|
244
466
|
enableHover: true,
|
|
245
467
|
formatter: {
|
|
246
468
|
indentationSize: 4,
|
|
@@ -269,200 +491,19 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
269
491
|
new Promise(function (resolve, reject) { require(['./kustoMode'], resolve, reject); }).then(callback);
|
|
270
492
|
}
|
|
271
493
|
var kustoDefaults = new LanguageServiceDefaultsImpl(defaultLanguageSettings);
|
|
272
|
-
var themeNames = {
|
|
273
|
-
light: 'kusto-light',
|
|
274
|
-
dark: 'kusto-dark',
|
|
275
|
-
dark2: 'kusto-dark2'
|
|
276
|
-
};
|
|
277
494
|
monaco__namespace.languages.onLanguage('kusto', function () {
|
|
278
495
|
withMode(function (mode) {
|
|
279
496
|
return mode.setupMode(kustoDefaults, monaco__namespace);
|
|
280
497
|
});
|
|
281
498
|
});
|
|
282
499
|
monaco__namespace.languages.register({
|
|
283
|
-
id:
|
|
500
|
+
id: globals.LANGUAGE_ID,
|
|
284
501
|
extensions: ['.csl', '.kql']
|
|
285
502
|
});
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
token: 'comment',
|
|
291
|
-
foreground: '008000'
|
|
292
|
-
},
|
|
293
|
-
// CommentToken Green
|
|
294
|
-
{
|
|
295
|
-
token: 'variable.predefined',
|
|
296
|
-
foreground: '800080'
|
|
297
|
-
},
|
|
298
|
-
// CalculatedColumnToken Purple
|
|
299
|
-
{
|
|
300
|
-
token: 'function',
|
|
301
|
-
foreground: '0000FF'
|
|
302
|
-
},
|
|
303
|
-
// FunctionNameToken Blue
|
|
304
|
-
{
|
|
305
|
-
token: 'operator.sql',
|
|
306
|
-
foreground: 'CC3700'
|
|
307
|
-
},
|
|
308
|
-
// _WAS_ OperatorToken OrangeRed, but wasn't accessible.
|
|
309
|
-
{
|
|
310
|
-
token: 'string',
|
|
311
|
-
foreground: 'B22222'
|
|
312
|
-
},
|
|
313
|
-
// StringLiteralToken Firebrick
|
|
314
|
-
{
|
|
315
|
-
token: 'operator.scss',
|
|
316
|
-
foreground: '0000FF'
|
|
317
|
-
},
|
|
318
|
-
// SubOperatorToken Blue
|
|
319
|
-
{
|
|
320
|
-
token: 'variable',
|
|
321
|
-
foreground: 'C71585'
|
|
322
|
-
},
|
|
323
|
-
// TableColumnToken MediumVioletRed
|
|
324
|
-
{
|
|
325
|
-
token: 'variable.parameter',
|
|
326
|
-
foreground: '9932CC'
|
|
327
|
-
},
|
|
328
|
-
// TableToken DarkOrchid
|
|
329
|
-
{
|
|
330
|
-
token: '',
|
|
331
|
-
foreground: '000000'
|
|
332
|
-
},
|
|
333
|
-
// UnknownToken, PlainTextToken Black
|
|
334
|
-
{
|
|
335
|
-
token: 'type',
|
|
336
|
-
foreground: '0000FF'
|
|
337
|
-
},
|
|
338
|
-
// DataTypeToken Blue
|
|
339
|
-
{
|
|
340
|
-
token: 'tag',
|
|
341
|
-
foreground: '0000FF'
|
|
342
|
-
},
|
|
343
|
-
// ControlCommandToken Blue
|
|
344
|
-
{
|
|
345
|
-
token: 'annotation',
|
|
346
|
-
foreground: '2B91AF'
|
|
347
|
-
},
|
|
348
|
-
// QueryParametersToken FF2B91AF
|
|
349
|
-
{
|
|
350
|
-
token: 'keyword',
|
|
351
|
-
foreground: '0000FF'
|
|
352
|
-
},
|
|
353
|
-
// CslCommandToken, PluginToken Blue
|
|
354
|
-
{
|
|
355
|
-
token: 'number',
|
|
356
|
-
foreground: '191970'
|
|
357
|
-
},
|
|
358
|
-
// LetVariablesToken MidnightBlue
|
|
359
|
-
{
|
|
360
|
-
token: 'annotation',
|
|
361
|
-
foreground: '9400D3'
|
|
362
|
-
},
|
|
363
|
-
// ClientDirectiveToken DarkViolet
|
|
364
|
-
{
|
|
365
|
-
token: 'invalid',
|
|
366
|
-
background: 'cd3131'
|
|
367
|
-
}],
|
|
368
|
-
colors: {}
|
|
369
|
-
});
|
|
370
|
-
monaco__namespace.editor.defineTheme(themeNames.dark, {
|
|
371
|
-
base: 'vs-dark',
|
|
372
|
-
inherit: true,
|
|
373
|
-
rules: [{
|
|
374
|
-
token: 'comment',
|
|
375
|
-
foreground: '608B4E'
|
|
376
|
-
},
|
|
377
|
-
// CommentToken Green
|
|
378
|
-
{
|
|
379
|
-
token: 'variable.predefined',
|
|
380
|
-
foreground: '4ec9b0'
|
|
381
|
-
},
|
|
382
|
-
// CalculatedColumnToken Purple
|
|
383
|
-
{
|
|
384
|
-
token: 'function',
|
|
385
|
-
foreground: 'dcdcaa'
|
|
386
|
-
},
|
|
387
|
-
// FunctionNameToken Blue
|
|
388
|
-
{
|
|
389
|
-
token: 'operator.sql',
|
|
390
|
-
foreground: '9cdcfe'
|
|
391
|
-
},
|
|
392
|
-
// OperatorToken OrangeRed
|
|
393
|
-
{
|
|
394
|
-
token: 'string',
|
|
395
|
-
foreground: 'ce9178'
|
|
396
|
-
},
|
|
397
|
-
// StringLiteralToken Firebrick
|
|
398
|
-
{
|
|
399
|
-
token: 'operator.scss',
|
|
400
|
-
foreground: '569cd6'
|
|
401
|
-
},
|
|
402
|
-
// SubOperatorToken Blue
|
|
403
|
-
{
|
|
404
|
-
token: 'variable',
|
|
405
|
-
foreground: '4ec9b0'
|
|
406
|
-
},
|
|
407
|
-
// TableColumnToken MediumVioletRed
|
|
408
|
-
{
|
|
409
|
-
token: 'variable.parameter',
|
|
410
|
-
foreground: 'c586c0'
|
|
411
|
-
},
|
|
412
|
-
// TableToken DarkOrchid
|
|
413
|
-
{
|
|
414
|
-
token: '',
|
|
415
|
-
foreground: 'd4d4d4'
|
|
416
|
-
},
|
|
417
|
-
// UnknownToken, PlainTextToken Black
|
|
418
|
-
{
|
|
419
|
-
token: 'type',
|
|
420
|
-
foreground: '569cd6'
|
|
421
|
-
},
|
|
422
|
-
// DataTypeToken Blue
|
|
423
|
-
{
|
|
424
|
-
token: 'tag',
|
|
425
|
-
foreground: '569cd6'
|
|
426
|
-
},
|
|
427
|
-
// ControlCommandToken Blue
|
|
428
|
-
{
|
|
429
|
-
token: 'annotation',
|
|
430
|
-
foreground: '9cdcfe'
|
|
431
|
-
},
|
|
432
|
-
// QueryParametersToken FF2B91AF
|
|
433
|
-
{
|
|
434
|
-
token: 'keyword',
|
|
435
|
-
foreground: '569cd6'
|
|
436
|
-
},
|
|
437
|
-
// CslCommandToken, PluginToken Blue
|
|
438
|
-
{
|
|
439
|
-
token: 'number',
|
|
440
|
-
foreground: 'd7ba7d'
|
|
441
|
-
},
|
|
442
|
-
// LetVariablesToken MidnightBlue
|
|
443
|
-
{
|
|
444
|
-
token: 'annotation',
|
|
445
|
-
foreground: 'b5cea8'
|
|
446
|
-
},
|
|
447
|
-
// ClientDirectiveToken DarkViolet
|
|
448
|
-
{
|
|
449
|
-
token: 'invalid',
|
|
450
|
-
background: 'cd3131'
|
|
451
|
-
}],
|
|
452
|
-
colors: {
|
|
453
|
-
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
monaco__namespace.editor.defineTheme(themeNames.dark2, {
|
|
457
|
-
base: 'vs-dark',
|
|
458
|
-
inherit: true,
|
|
459
|
-
rules: [],
|
|
460
|
-
colors: {
|
|
461
|
-
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
462
|
-
'editor.background': '#1B1A19',
|
|
463
|
-
// gray 200
|
|
464
|
-
'editorSuggestWidget.selectedBackground': '#004E8C'
|
|
465
|
-
}
|
|
503
|
+
themes.forEach(function (_ref) {
|
|
504
|
+
var name = _ref.name,
|
|
505
|
+
data = _ref.data;
|
|
506
|
+
return monaco__namespace.editor.defineTheme(name, data);
|
|
466
507
|
});
|
|
467
508
|
|
|
468
509
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
|
@@ -508,17 +549,11 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
508
549
|
function isStandaloneCodeEditor(editor) {
|
|
509
550
|
return editor.addAction !== undefined;
|
|
510
551
|
}
|
|
511
|
-
var globalApi = {
|
|
512
|
-
getCslTypeNameFromClrType: schema.getCslTypeNameFromClrType,
|
|
513
|
-
getCallName: schema.getCallName,
|
|
514
|
-
getExpression: schema.getExpression,
|
|
515
|
-
getInputParametersAsCslString: schema.getInputParametersAsCslString,
|
|
516
|
-
getEntityDataTypeFromCslType: schema.getEntityDataTypeFromCslType,
|
|
552
|
+
var globalApi = _objectSpread(_objectSpread({}, schema.schema), {}, {
|
|
517
553
|
kustoDefaults: kustoDefaults,
|
|
518
554
|
getKustoWorker: getKustoWorker,
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
};
|
|
555
|
+
getRangeHtml: getRangeHtml
|
|
556
|
+
});
|
|
522
557
|
monaco__namespace.languages.kusto = globalApi;
|
|
523
558
|
|
|
524
559
|
exports.getCallName = schema.getCallName;
|
|
@@ -527,9 +562,8 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
527
562
|
exports.getExpression = schema.getExpression;
|
|
528
563
|
exports.getInputParametersAsCslString = schema.getInputParametersAsCslString;
|
|
529
564
|
exports.showSchema = schema.showSchema;
|
|
530
|
-
exports.getCurrentCommandRange = getCurrentCommandRange;
|
|
531
565
|
exports.getKustoWorker = getKustoWorker;
|
|
566
|
+
exports.getRangeHtml = getRangeHtml;
|
|
532
567
|
exports.kustoDefaults = kustoDefaults;
|
|
533
|
-
exports.themeNames = themeNames;
|
|
534
568
|
|
|
535
569
|
}));
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version:
|
|
3
|
+
* monaco-kusto version: 12.0.0(2f1838c12bdb98562467acf51b6fd3e396182e86)
|
|
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-957f5e9b', ['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
|
|
|
@@ -99,11 +99,22 @@ define('vs/language/kusto/schema-a5230652', ['exports'], (function (exports) { '
|
|
|
99
99
|
*/
|
|
100
100
|
var showSchema;
|
|
101
101
|
|
|
102
|
+
var schema = /*#__PURE__*/Object.freeze({
|
|
103
|
+
__proto__: null,
|
|
104
|
+
getCallName: getCallName,
|
|
105
|
+
getCslTypeNameFromClrType: getCslTypeNameFromClrType,
|
|
106
|
+
getEntityDataTypeFromCslType: getEntityDataTypeFromCslType,
|
|
107
|
+
getExpression: getExpression,
|
|
108
|
+
getInputParametersAsCslString: getInputParametersAsCslString,
|
|
109
|
+
showSchema: showSchema
|
|
110
|
+
});
|
|
111
|
+
|
|
102
112
|
exports.getCallName = getCallName;
|
|
103
113
|
exports.getCslTypeNameFromClrType = getCslTypeNameFromClrType;
|
|
104
114
|
exports.getEntityDataTypeFromCslType = getEntityDataTypeFromCslType;
|
|
105
115
|
exports.getExpression = getExpression;
|
|
106
116
|
exports.getInputParametersAsCslString = getInputParametersAsCslString;
|
|
117
|
+
exports.schema = schema;
|
|
107
118
|
exports.showSchema = showSchema;
|
|
108
119
|
|
|
109
120
|
}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { editor } from 'monaco-editor/esm/vs/editor/editor.api';
|
|
2
|
+
export function getRangeHtml(model, range) {
|
|
3
|
+
var startLineNumber = range.startLineNumber, endLineNumber = range.endLineNumber, endColumn = range.endColumn;
|
|
4
|
+
var isLastLineEmpty = endColumn === 1;
|
|
5
|
+
var actualLastLine = isLastLineEmpty ? endLineNumber - 1 : endLineNumber;
|
|
6
|
+
var totalLines = actualLastLine - startLineNumber + 1;
|
|
7
|
+
var colorizedLines = new Array(totalLines)
|
|
8
|
+
.fill(undefined)
|
|
9
|
+
.map(function (_, index) { return editor.colorizeModelLine(model, startLineNumber + index); });
|
|
10
|
+
return colorizedLines.join('<br/>');
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getRangeHtml';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './getRangeHtml';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*!-----------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* monaco-kusto version: 12.0.0(2f1838c12bdb98562467acf51b6fd3e396182e86)
|
|
4
|
+
* Released under the MIT license
|
|
5
|
+
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
|
+
*-----------------------------------------------------------------------------*/
|
|
7
|
+
|
|
8
|
+
let Token = /*#__PURE__*/function (Token) {
|
|
9
|
+
Token["PlainText"] = "plainText";
|
|
10
|
+
Token["Comment"] = "comment";
|
|
11
|
+
Token["Punctuation"] = "punctuation";
|
|
12
|
+
Token["Directive"] = "directive";
|
|
13
|
+
Token["Literal"] = "literal";
|
|
14
|
+
Token["StringLiteral"] = "stringLiteral";
|
|
15
|
+
Token["Type"] = "type";
|
|
16
|
+
Token["Column"] = "column";
|
|
17
|
+
Token["Table"] = "table";
|
|
18
|
+
Token["Database"] = "database";
|
|
19
|
+
Token["Function"] = "function";
|
|
20
|
+
Token["Parameter"] = "parameter";
|
|
21
|
+
Token["Variable"] = "variable";
|
|
22
|
+
Token["Identifier"] = "identifier";
|
|
23
|
+
Token["ClientParameter"] = "clientParameter";
|
|
24
|
+
Token["QueryParameter"] = "queryParameter";
|
|
25
|
+
Token["ScalarParameter"] = "scalarParameter";
|
|
26
|
+
Token["MathOperator"] = "mathOperator";
|
|
27
|
+
Token["QueryOperator"] = "queryOperator";
|
|
28
|
+
Token["Command"] = "command";
|
|
29
|
+
Token["Keyword"] = "keyword";
|
|
30
|
+
Token["MaterializedView"] = "materializedView";
|
|
31
|
+
Token["SchemaMember"] = "schemaMember";
|
|
32
|
+
Token["SignatureParameter"] = "signatureParameter";
|
|
33
|
+
Token["Option"] = "option";
|
|
34
|
+
return Token;
|
|
35
|
+
}({});
|
|
36
|
+
const tokenTypes = [Token.PlainText, Token.Comment, Token.Punctuation, Token.Directive, Token.Literal, Token.StringLiteral, Token.Type, Token.Column, Token.Table, Token.Database, Token.Function, Token.Parameter, Token.Variable, Token.Identifier, Token.ClientParameter, Token.QueryParameter, Token.ScalarParameter, Token.MathOperator, Token.QueryOperator, Token.Command, Token.Keyword, Token.MaterializedView, Token.SchemaMember, Token.SignatureParameter, Token.Option];
|
|
37
|
+
|
|
38
|
+
const LANGUAGE_ID = 'kusto';
|
|
39
|
+
|
|
40
|
+
export { LANGUAGE_ID as L, Token as T, tokenTypes as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LANGUAGE_ID = "kusto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var LANGUAGE_ID = 'kusto';
|