@kusto/monaco-kusto 11.4.0 → 12.0.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 +25 -1
- package/package.json +3 -1
- package/release/dev/kustoMode-d3f9e09a.js +1818 -0
- package/release/dev/kustoMode.js +4 -2040
- package/release/dev/kustoWorker.js +49 -90
- package/release/dev/{main-1587ba64.js → main-f36cb42f.js} +2 -2
- package/release/dev/monaco.contribution.js +254 -214
- package/release/dev/{schema-a5230652.js → schema-077630e6.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.d.ts +1 -0
- package/release/esm/globals.js +1 -0
- package/release/esm/kusto.worker.js +39 -91
- package/release/esm/kustoMode-349f5467.js +957 -0
- package/release/esm/kustoMode.d.ts +4 -8
- package/release/esm/kustoMode.js +94 -104
- package/release/esm/kustoWorker.d.ts +2 -5
- package/release/esm/kustoWorker.js +2 -5
- package/release/esm/languageFeatures.d.ts +1 -14
- 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/schema.d.ts +2 -2
- package/release/esm/languageServiceManager/settings.d.ts +0 -2
- package/release/esm/monaco.contribution.d.ts +1 -6
- package/release/esm/monaco.contribution.js +64 -88
- package/release/esm/{schema-c006895b.js → schema-b8f0ba9b.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/semanticTokensProviderRegistrar.d.ts +6 -0
- package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.js +23 -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/kustoMode-2dd4a01e.js +7 -0
- package/release/min/kustoMode.js +2 -2
- package/release/min/kustoWorker.js +4 -4
- package/release/min/{main-75aa3e71.js → main-86d6c837.js} +2 -2
- package/release/min/monaco.contribution.js +2 -2
- package/release/min/schema-a60c216c.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.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
|
|
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', ['
|
|
8
|
+
define('vs/language/kusto/monaco.contribution', ['exports', 'vs/editor/editor.main', './kustoMode-d3f9e09a', './schema-077630e6', './main-f36cb42f'], (function (exports, monaco, kustoMode, schema, main) { 'use strict';
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
11
|
var n = Object.create(null);
|
|
@@ -181,15 +181,240 @@ 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: kustoMode.Token.PlainText,
|
|
222
|
+
foreground: colors.black
|
|
223
|
+
}, {
|
|
224
|
+
token: kustoMode.Token.Comment,
|
|
225
|
+
foreground: colors.green
|
|
226
|
+
}, {
|
|
227
|
+
token: kustoMode.Token.Punctuation,
|
|
228
|
+
foreground: colors.black
|
|
229
|
+
}, {
|
|
230
|
+
token: kustoMode.Token.Directive,
|
|
231
|
+
foreground: colors.darkViolet
|
|
232
|
+
}, {
|
|
233
|
+
token: kustoMode.Token.Literal,
|
|
234
|
+
foreground: colors.black
|
|
235
|
+
}, {
|
|
236
|
+
token: kustoMode.Token.StringLiteral,
|
|
237
|
+
foreground: colors.firebrick
|
|
238
|
+
}, {
|
|
239
|
+
token: kustoMode.Token.Type,
|
|
240
|
+
foreground: colors.blue
|
|
241
|
+
}, {
|
|
242
|
+
token: kustoMode.Token.Column,
|
|
243
|
+
foreground: colors.mediumVioletRed
|
|
244
|
+
}, {
|
|
245
|
+
token: kustoMode.Token.Table,
|
|
246
|
+
foreground: colors.darkOrchid
|
|
247
|
+
}, {
|
|
248
|
+
token: kustoMode.Token.Database,
|
|
249
|
+
foreground: colors.darkOrchid
|
|
250
|
+
}, {
|
|
251
|
+
token: kustoMode.Token.Function,
|
|
252
|
+
foreground: colors.blue
|
|
253
|
+
}, {
|
|
254
|
+
token: kustoMode.Token.Parameter,
|
|
255
|
+
foreground: colors.midnightBlue
|
|
256
|
+
}, {
|
|
257
|
+
token: kustoMode.Token.Variable,
|
|
258
|
+
foreground: colors.midnightBlue
|
|
259
|
+
}, {
|
|
260
|
+
token: kustoMode.Token.Identifier,
|
|
261
|
+
foreground: colors.black
|
|
262
|
+
}, {
|
|
263
|
+
token: kustoMode.Token.ClientParameter,
|
|
264
|
+
foreground: colors.tealBlue
|
|
265
|
+
}, {
|
|
266
|
+
token: kustoMode.Token.QueryParameter,
|
|
267
|
+
foreground: colors.tealBlue
|
|
268
|
+
}, {
|
|
269
|
+
token: kustoMode.Token.ScalarParameter,
|
|
270
|
+
foreground: colors.blue
|
|
271
|
+
}, {
|
|
272
|
+
token: kustoMode.Token.MathOperator,
|
|
273
|
+
foreground: colors.black
|
|
274
|
+
}, {
|
|
275
|
+
token: kustoMode.Token.QueryOperator,
|
|
276
|
+
foreground: colors.orangeRed
|
|
277
|
+
}, {
|
|
278
|
+
token: kustoMode.Token.Command,
|
|
279
|
+
foreground: colors.blue
|
|
280
|
+
}, {
|
|
281
|
+
token: kustoMode.Token.Keyword,
|
|
282
|
+
foreground: colors.blue
|
|
283
|
+
}, {
|
|
284
|
+
token: kustoMode.Token.MaterializedView,
|
|
285
|
+
foreground: colors.darkOrchid
|
|
286
|
+
}, {
|
|
287
|
+
token: kustoMode.Token.SchemaMember,
|
|
288
|
+
foreground: colors.black
|
|
289
|
+
}, {
|
|
290
|
+
token: kustoMode.Token.SignatureParameter,
|
|
291
|
+
foreground: colors.black
|
|
292
|
+
}, {
|
|
293
|
+
token: kustoMode.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: kustoMode.Token.PlainText,
|
|
306
|
+
foreground: colors.white
|
|
307
|
+
}, {
|
|
308
|
+
token: kustoMode.Token.Comment,
|
|
309
|
+
foreground: colors.oliveDrab
|
|
310
|
+
}, {
|
|
311
|
+
token: kustoMode.Token.Punctuation,
|
|
312
|
+
foreground: colors.white
|
|
313
|
+
}, {
|
|
314
|
+
token: kustoMode.Token.Directive,
|
|
315
|
+
foreground: colors.lightGoldenrodYellow
|
|
316
|
+
}, {
|
|
317
|
+
token: kustoMode.Token.Literal,
|
|
318
|
+
foreground: colors.white
|
|
319
|
+
}, {
|
|
320
|
+
token: kustoMode.Token.StringLiteral,
|
|
321
|
+
foreground: colors.paleChestnut
|
|
322
|
+
}, {
|
|
323
|
+
token: kustoMode.Token.Type,
|
|
324
|
+
foreground: colors.skyBlue
|
|
325
|
+
}, {
|
|
326
|
+
token: kustoMode.Token.Column,
|
|
327
|
+
foreground: colors.paleVioletRed
|
|
328
|
+
}, {
|
|
329
|
+
token: kustoMode.Token.Table,
|
|
330
|
+
foreground: colors.softGold
|
|
331
|
+
}, {
|
|
332
|
+
token: kustoMode.Token.Database,
|
|
333
|
+
foreground: colors.softGold
|
|
334
|
+
}, {
|
|
335
|
+
token: kustoMode.Token.Function,
|
|
336
|
+
foreground: colors.skyBlue
|
|
337
|
+
}, {
|
|
338
|
+
token: kustoMode.Token.Parameter,
|
|
339
|
+
foreground: colors.lightSkyBlue
|
|
340
|
+
}, {
|
|
341
|
+
token: kustoMode.Token.Variable,
|
|
342
|
+
foreground: colors.lightSkyBlue
|
|
343
|
+
}, {
|
|
344
|
+
token: kustoMode.Token.Identifier,
|
|
345
|
+
foreground: colors.white
|
|
346
|
+
}, {
|
|
347
|
+
token: kustoMode.Token.ClientParameter,
|
|
348
|
+
foreground: colors.tealBlue
|
|
349
|
+
}, {
|
|
350
|
+
token: kustoMode.Token.QueryParameter,
|
|
351
|
+
foreground: colors.tealBlue
|
|
352
|
+
}, {
|
|
353
|
+
token: kustoMode.Token.ScalarParameter,
|
|
354
|
+
foreground: colors.skyBlue
|
|
355
|
+
}, {
|
|
356
|
+
token: kustoMode.Token.MathOperator,
|
|
357
|
+
foreground: colors.white
|
|
358
|
+
}, {
|
|
359
|
+
token: kustoMode.Token.QueryOperator,
|
|
360
|
+
foreground: colors.mediumTurquoise
|
|
361
|
+
}, {
|
|
362
|
+
token: kustoMode.Token.Command,
|
|
363
|
+
foreground: colors.skyBlue
|
|
364
|
+
}, {
|
|
365
|
+
token: kustoMode.Token.Keyword,
|
|
366
|
+
foreground: colors.skyBlue
|
|
367
|
+
}, {
|
|
368
|
+
token: kustoMode.Token.MaterializedView,
|
|
369
|
+
foreground: colors.softGold
|
|
370
|
+
}, {
|
|
371
|
+
token: kustoMode.Token.SchemaMember,
|
|
372
|
+
foreground: colors.black
|
|
373
|
+
}, {
|
|
374
|
+
token: kustoMode.Token.SignatureParameter,
|
|
375
|
+
foreground: colors.black
|
|
376
|
+
}, {
|
|
377
|
+
token: kustoMode.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
|
+
|
|
406
|
+
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
184
407
|
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); }
|
|
408
|
+
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; }
|
|
409
|
+
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; }
|
|
410
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
411
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
185
412
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
186
413
|
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
414
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
188
415
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
189
416
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
190
417
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
191
|
-
|
|
192
|
-
// --- Kusto configuration and defaults ---------
|
|
193
418
|
var LanguageServiceDefaultsImpl = /*#__PURE__*/function () {
|
|
194
419
|
// in milliseconds. For example - this is 2 minutes 2 * 60 * 1000
|
|
195
420
|
|
|
@@ -239,8 +464,6 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
239
464
|
includeControlCommands: true,
|
|
240
465
|
newlineAfterPipe: true,
|
|
241
466
|
openSuggestionDialogAfterPreviousSuggestionAccepted: true,
|
|
242
|
-
useSemanticColorization: true,
|
|
243
|
-
useTokenColorization: false,
|
|
244
467
|
enableHover: true,
|
|
245
468
|
formatter: {
|
|
246
469
|
indentationSize: 4,
|
|
@@ -259,210 +482,34 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
259
482
|
}
|
|
260
483
|
};
|
|
261
484
|
function getKustoWorker() {
|
|
262
|
-
return
|
|
263
|
-
withMode(function (mode) {
|
|
264
|
-
mode.getKustoWorker().then(resolve, reject);
|
|
265
|
-
});
|
|
266
|
-
});
|
|
485
|
+
return _getKustoWorker.apply(this, arguments);
|
|
267
486
|
}
|
|
268
|
-
function
|
|
269
|
-
|
|
487
|
+
function _getKustoWorker() {
|
|
488
|
+
_getKustoWorker = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
489
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
490
|
+
while (1) switch (_context.prev = _context.next) {
|
|
491
|
+
case 0:
|
|
492
|
+
return _context.abrupt("return", kustoMode.getKustoWorker());
|
|
493
|
+
case 1:
|
|
494
|
+
case "end":
|
|
495
|
+
return _context.stop();
|
|
496
|
+
}
|
|
497
|
+
}, _callee);
|
|
498
|
+
}));
|
|
499
|
+
return _getKustoWorker.apply(this, arguments);
|
|
270
500
|
}
|
|
271
501
|
var kustoDefaults = new LanguageServiceDefaultsImpl(defaultLanguageSettings);
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
dark: 'kusto-dark',
|
|
275
|
-
dark2: 'kusto-dark2'
|
|
276
|
-
};
|
|
277
|
-
monaco__namespace.languages.onLanguage('kusto', function () {
|
|
278
|
-
withMode(function (mode) {
|
|
279
|
-
return mode.setupMode(kustoDefaults, monaco__namespace);
|
|
280
|
-
});
|
|
502
|
+
monaco__namespace.languages.onLanguage(kustoMode.LANGUAGE_ID, function () {
|
|
503
|
+
kustoMode.setupMode(kustoDefaults, monaco__namespace);
|
|
281
504
|
});
|
|
282
505
|
monaco__namespace.languages.register({
|
|
283
|
-
id:
|
|
506
|
+
id: kustoMode.LANGUAGE_ID,
|
|
284
507
|
extensions: ['.csl', '.kql']
|
|
285
508
|
});
|
|
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
|
-
}
|
|
509
|
+
themes.forEach(function (_ref) {
|
|
510
|
+
var name = _ref.name,
|
|
511
|
+
data = _ref.data;
|
|
512
|
+
return monaco__namespace.editor.defineTheme(name, data);
|
|
466
513
|
});
|
|
467
514
|
|
|
468
515
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
|
@@ -508,17 +555,11 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
508
555
|
function isStandaloneCodeEditor(editor) {
|
|
509
556
|
return editor.addAction !== undefined;
|
|
510
557
|
}
|
|
511
|
-
var globalApi = {
|
|
512
|
-
getCslTypeNameFromClrType: schema.getCslTypeNameFromClrType,
|
|
513
|
-
getCallName: schema.getCallName,
|
|
514
|
-
getExpression: schema.getExpression,
|
|
515
|
-
getInputParametersAsCslString: schema.getInputParametersAsCslString,
|
|
516
|
-
getEntityDataTypeFromCslType: schema.getEntityDataTypeFromCslType,
|
|
558
|
+
var globalApi = _objectSpread(_objectSpread({}, schema.schema), {}, {
|
|
517
559
|
kustoDefaults: kustoDefaults,
|
|
518
560
|
getKustoWorker: getKustoWorker,
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
};
|
|
561
|
+
getRangeHtml: getRangeHtml
|
|
562
|
+
});
|
|
522
563
|
monaco__namespace.languages.kusto = globalApi;
|
|
523
564
|
|
|
524
565
|
exports.getCallName = schema.getCallName;
|
|
@@ -527,9 +568,8 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
|
|
|
527
568
|
exports.getExpression = schema.getExpression;
|
|
528
569
|
exports.getInputParametersAsCslString = schema.getInputParametersAsCslString;
|
|
529
570
|
exports.showSchema = schema.showSchema;
|
|
530
|
-
exports.getCurrentCommandRange = getCurrentCommandRange;
|
|
531
571
|
exports.getKustoWorker = getKustoWorker;
|
|
572
|
+
exports.getRangeHtml = getRangeHtml;
|
|
532
573
|
exports.kustoDefaults = kustoDefaults;
|
|
533
|
-
exports.themeNames = themeNames;
|
|
534
574
|
|
|
535
575
|
}));
|
|
@@ -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.1(56b90ce0fd31e7d6792f5098d1e8204274966b6e)
|
|
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-077630e6', ['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 @@
|
|
|
1
|
+
export declare const LANGUAGE_ID = "kusto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var LANGUAGE_ID = 'kusto';
|