@kusto/monaco-kusto 12.0.20 → 12.0.21

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 CHANGED
@@ -85,6 +85,11 @@ Every PR should come with a test that checks it.
85
85
 
86
86
  ## Changelog
87
87
 
88
+ ## 12.0.21
89
+
90
+ - fix: support multiline bracketed strings in semantic tokenization (improves syntax highlighting).
91
+ - fix: include hyphenated words in IntelliSense logic to avoid resetting suggestions when typing "-".
92
+
88
93
  ### 12.0.20
89
94
 
90
95
  - feat: Upgrade language-service-next to 11.7.6.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kusto/monaco-kusto",
3
- "version": "12.0.20",
3
+ "version": "12.0.21",
4
4
  "description": "CSL, KQL plugin for the Monaco Editor",
5
5
  "author": {
6
6
  "name": "Microsoft"
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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-0c93dbfd', './types-9a78a5dc'], (function (exports, monaco, main, types$1) { 'use strict';
8
+ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-0178d28d', './types-9685532e'], (function (exports, monaco, main, types$1) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -672,14 +672,14 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
672
672
  return firstMatchingItem !== null && firstMatchingItem !== void 0 ? firstMatchingItem : firstCompletionItem;
673
673
  }
674
674
 
675
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
675
+ function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$2(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
676
676
  function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "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$3(o); }
677
- function _toConsumableArray$1(r) { return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1(); }
677
+ function _toConsumableArray$1(r) { return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$1(); }
678
678
  function _nonIterableSpread$1() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
679
- function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
679
+ function _unsupportedIterableToArray$2(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$2(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0; } }
680
680
  function _iterableToArray$1(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
681
- function _arrayWithoutHoles$1(r) { if (Array.isArray(r)) return _arrayLikeToArray$1(r); }
682
- function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
681
+ function _arrayWithoutHoles$1(r) { if (Array.isArray(r)) return _arrayLikeToArray$2(r); }
682
+ function _arrayLikeToArray$2(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
683
683
  function _regeneratorRuntime$3() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$3 = 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$3(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$3(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; }
684
684
  function asyncGeneratorStep$3(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); }
685
685
  function _asyncToGenerator$3(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$3(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$3(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
@@ -1370,7 +1370,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1370
1370
  var resourceEdits = [];
1371
1371
  for (var uri in edit.changes) {
1372
1372
  var _uri = monaco__namespace.Uri.parse(uri);
1373
- var _iterator = _createForOfIteratorHelper(edit.changes[uri]),
1373
+ var _iterator = _createForOfIteratorHelper$1(edit.changes[uri]),
1374
1374
  _step;
1375
1375
  try {
1376
1376
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -1541,6 +1541,13 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1541
1541
 
1542
1542
  function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "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$2(o); }
1543
1543
  function _regeneratorRuntime$2() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$2 = 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$2(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$2(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; }
1544
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest(); }
1545
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1546
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
1547
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1548
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$1(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
1549
+ function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
1550
+ function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1544
1551
  function asyncGeneratorStep$2(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); }
1545
1552
  function _asyncToGenerator$2(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep$2(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep$2(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
1546
1553
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -1565,7 +1572,7 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1565
1572
  key: "provideDocumentSemanticTokens",
1566
1573
  value: function () {
1567
1574
  var _provideDocumentSemanticTokens = _asyncToGenerator$2( /*#__PURE__*/_regeneratorRuntime$2().mark(function _callee(model) {
1568
- var resource, classifications, semanticTokens;
1575
+ var resource, classifications, tokens, prevLine, prevChar, _iterator, _step, classification, parts, _i, _parts, part, _part, absLine, absChar, length, kind, modifiers, deltaLine, deltaChar;
1569
1576
  return _regeneratorRuntime$2().wrap(function _callee$(_context) {
1570
1577
  while (1) switch (_context.prev = _context.next) {
1571
1578
  case 0:
@@ -1574,15 +1581,34 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1574
1581
  return this.classificationsGetter(resource);
1575
1582
  case 3:
1576
1583
  classifications = _context.sent;
1577
- semanticTokens = classifications.map(function (classification, index) {
1578
- var previousClassification = classifications[index - 1];
1579
- return semanticTokenMaker(classification, previousClassification);
1580
- });
1584
+ tokens = [];
1585
+ prevLine = 0;
1586
+ prevChar = 0;
1587
+ _iterator = _createForOfIteratorHelper(classifications);
1588
+ try {
1589
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
1590
+ classification = _step.value;
1591
+ parts = toSemanticTokens(classification, model);
1592
+ for (_i = 0, _parts = parts; _i < _parts.length; _i++) {
1593
+ part = _parts[_i];
1594
+ _part = _slicedToArray(part, 5), absLine = _part[0], absChar = _part[1], length = _part[2], kind = _part[3], modifiers = _part[4];
1595
+ deltaLine = absLine - prevLine;
1596
+ deltaChar = deltaLine === 0 ? absChar - prevChar : absChar;
1597
+ tokens.push([deltaLine, deltaChar, length, kind, modifiers]);
1598
+ prevLine = absLine;
1599
+ prevChar = absChar;
1600
+ }
1601
+ }
1602
+ } catch (err) {
1603
+ _iterator.e(err);
1604
+ } finally {
1605
+ _iterator.f();
1606
+ }
1581
1607
  return _context.abrupt("return", {
1582
- data: new Uint32Array(semanticTokens.flat()),
1608
+ data: new Uint32Array(tokens.flat(2)),
1583
1609
  resultId: model.getVersionId().toString()
1584
1610
  });
1585
- case 6:
1611
+ case 10:
1586
1612
  case "end":
1587
1613
  return _context.stop();
1588
1614
  }
@@ -1598,21 +1624,25 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1598
1624
  value: function releaseDocumentSemanticTokens() {}
1599
1625
  }]);
1600
1626
  }();
1601
- var emptyClassification = {
1602
- line: 0,
1603
- character: 0,
1604
- length: 0,
1605
- kind: 0
1606
- };
1607
- function semanticTokenMaker(classification) {
1608
- var previousClassification = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : emptyClassification;
1627
+ function toSemanticTokens(classification, model) {
1609
1628
  var line = classification.line,
1610
1629
  character = classification.character,
1611
1630
  length = classification.length,
1612
1631
  kind = classification.kind;
1613
- var deltaLine = line - previousClassification.line;
1614
- var deltaStart = deltaLine ? character : character - previousClassification.character;
1615
- return [deltaLine, deltaStart, length, kind, 0];
1632
+ var tokens = [];
1633
+ var remainingLength = length;
1634
+ var currentLine = line;
1635
+ var currentChar = character;
1636
+ while (remainingLength > 0 && currentLine < model.getLineCount()) {
1637
+ var lineLength = model.getLineLength(currentLine + 1);
1638
+ var available = lineLength - currentChar + 1;
1639
+ var tokenLength = Math.min(remainingLength, available);
1640
+ tokens.push([currentLine, currentChar, tokenLength, kind, 0]);
1641
+ remainingLength -= tokenLength;
1642
+ currentLine++;
1643
+ currentChar = 0; // reset for next line
1644
+ }
1645
+ return tokens;
1616
1646
  }
1617
1647
 
1618
1648
  function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "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$1(o); }
@@ -1802,7 +1832,8 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1802
1832
  notIn: ['string', 'comment']
1803
1833
  }],
1804
1834
  brackets: [['[', ']'], ['{', '}'], ['(', ')']],
1805
- colorizedBracketPairs: []
1835
+ colorizedBracketPairs: [],
1836
+ wordPattern: /[a-zA-Z0-9\-_]+/g
1806
1837
  };
1807
1838
 
1808
1839
  exports.getKustoWorker = getKustoWorker;
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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-0c93dbfd', './schema-d4f597db'], (function (exports, main, schema) { 'use strict';
8
+ define('vs/language/kusto/kustoWorker', ['exports', './main-0178d28d', './schema-74b7f1a0'], (function (exports, main, schema) { 'use strict';
9
9
 
10
10
  function _slicedToArray$2(r, e) { return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$3(r, e) || _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: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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-0c93dbfd', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/main-0178d28d', ['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: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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', './types-9a78a5dc', './schema-d4f597db'], (function (require, exports, monaco, types, schema) { 'use strict';
8
+ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './types-9685532e', './schema-74b7f1a0'], (function (require, exports, monaco, types, schema) { '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: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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-d4f597db', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/schema-74b7f1a0', ['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,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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/types-9a78a5dc', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/types-9685532e', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  var LANGUAGE_ID = 'kusto';
11
11
 
@@ -36,7 +36,7 @@ define('vs/language/kusto/types-9a78a5dc', ['exports'], (function (exports) { 'u
36
36
  Token["SignatureParameter"] = "signatureParameter";
37
37
  Token["Option"] = "option";
38
38
  return Token;
39
- }({});
39
+ }({}); // 24
40
40
  var 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];
41
41
 
42
42
  exports.LANGUAGE_ID = LANGUAGE_ID;
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -32,7 +32,7 @@ let Token = /*#__PURE__*/function (Token) {
32
32
  Token["SignatureParameter"] = "signatureParameter";
33
33
  Token["Option"] = "option";
34
34
  return Token;
35
- }({});
35
+ }({}); // 24
36
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
37
 
38
38
  const LANGUAGE_ID = 'kusto';
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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-07d7d0de.js';
11
+ import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-586ea18b.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: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -9,7 +9,7 @@ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
9
9
  import { languages } from 'monaco-editor/esm/vs/editor/editor.api';
10
10
  import * as ls from 'vscode-languageserver-types';
11
11
  import debounce from 'lodash-es/debounce';
12
- import { L as LANGUAGE_ID, T as Token, t as tokenTypes } from './globals-2607bc09.js';
12
+ import { L as LANGUAGE_ID, T as Token, t as tokenTypes } from './globals-b5f7046e.js';
13
13
 
14
14
  class WorkerManager {
15
15
  constructor(_monacoInstance, defaults) {
@@ -804,33 +804,48 @@ class SemanticTokensProvider {
804
804
  async provideDocumentSemanticTokens(model) {
805
805
  const resource = model.uri;
806
806
  const classifications = await this.classificationsGetter(resource);
807
- const semanticTokens = classifications.map((classification, index) => {
808
- const previousClassification = classifications[index - 1];
809
- return semanticTokenMaker(classification, previousClassification);
810
- });
807
+ const tokens = [];
808
+ let prevLine = 0;
809
+ let prevChar = 0;
810
+ for (const classification of classifications) {
811
+ const parts = toSemanticTokens(classification, model);
812
+ for (const part of parts) {
813
+ const [absLine, absChar, length, kind, modifiers] = part;
814
+ const deltaLine = absLine - prevLine;
815
+ const deltaChar = deltaLine === 0 ? absChar - prevChar : absChar;
816
+ tokens.push([deltaLine, deltaChar, length, kind, modifiers]);
817
+ prevLine = absLine;
818
+ prevChar = absChar;
819
+ }
820
+ }
811
821
  return {
812
- data: new Uint32Array(semanticTokens.flat()),
822
+ data: new Uint32Array(tokens.flat(2)),
813
823
  resultId: model.getVersionId().toString()
814
824
  };
815
825
  }
816
826
  releaseDocumentSemanticTokens() {}
817
827
  }
818
- const emptyClassification = {
819
- line: 0,
820
- character: 0,
821
- length: 0,
822
- kind: 0
823
- };
824
- function semanticTokenMaker(classification, previousClassification = emptyClassification) {
828
+ function toSemanticTokens(classification, model) {
825
829
  const {
826
830
  line,
827
831
  character,
828
832
  length,
829
833
  kind
830
834
  } = classification;
831
- const deltaLine = line - previousClassification.line;
832
- const deltaStart = deltaLine ? character : character - previousClassification.character;
833
- return [deltaLine, deltaStart, length, kind, 0];
835
+ const tokens = [];
836
+ let remainingLength = length;
837
+ let currentLine = line;
838
+ let currentChar = character;
839
+ while (remainingLength > 0 && currentLine < model.getLineCount()) {
840
+ const lineLength = model.getLineLength(currentLine + 1);
841
+ const available = lineLength - currentChar + 1;
842
+ const tokenLength = Math.min(remainingLength, available);
843
+ tokens.push([currentLine, currentChar, tokenLength, kind, 0]);
844
+ remainingLength -= tokenLength;
845
+ currentLine++;
846
+ currentChar = 0; // reset for next line
847
+ }
848
+ return tokens;
834
849
  }
835
850
 
836
851
  // Registers semantic token provider that utilizes the language service
@@ -950,7 +965,8 @@ const languageConfiguration = {
950
965
  notIn: ['string', 'comment']
951
966
  }],
952
967
  brackets: [['[', ']'], ['{', '}'], ['(', ')']],
953
- colorizedBracketPairs: []
968
+ colorizedBracketPairs: [],
969
+ wordPattern: /[a-zA-Z0-9\-_]+/g
954
970
  };
955
971
 
956
972
  export { getKustoWorker, setupMode };
@@ -1,15 +1,15 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
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
9
  import { editor } from 'monaco-editor/esm/vs/editor/editor.api';
10
- import { T as Token, L as LANGUAGE_ID } from './globals-2607bc09.js';
11
- import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-07d7d0de.js';
12
- export { s as showSchema } from './schema-07d7d0de.js';
10
+ import { T as Token, L as LANGUAGE_ID } from './globals-b5f7046e.js';
11
+ import { g as getCslTypeNameFromClrType, a as getCallName, b as getExpression, c as getInputParametersAsCslString, d as getEntityDataTypeFromCslType } from './schema-586ea18b.js';
12
+ export { s as showSchema } from './schema-586ea18b.js';
13
13
 
14
14
  function getCurrentCommandRange(editor, cursorPosition) {
15
15
  const zeroBasedCursorLineNumber = cursorPosition.lineNumber - 1;
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 12.0.20(83a02790913f0606a91a23aaeadadb21b1b7c2d3)
3
+ * monaco-kusto version: 12.0.21(8c2d356700acab848f5c3305e75e50962d036689)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -44,20 +44,32 @@ var SemanticTokensProvider = /** @class */ (function () {
44
44
  };
45
45
  SemanticTokensProvider.prototype.provideDocumentSemanticTokens = function (model) {
46
46
  return __awaiter(this, void 0, void 0, function () {
47
- var resource, classifications, semanticTokens;
48
- return __generator(this, function (_a) {
49
- switch (_a.label) {
47
+ var resource, classifications, tokens, prevLine, prevChar, _i, classifications_1, classification, parts, _a, parts_1, part, absLine, absChar, length_1, kind, modifiers, deltaLine, deltaChar;
48
+ return __generator(this, function (_b) {
49
+ switch (_b.label) {
50
50
  case 0:
51
51
  resource = model.uri;
52
52
  return [4 /*yield*/, this.classificationsGetter(resource)];
53
53
  case 1:
54
- classifications = _a.sent();
55
- semanticTokens = classifications.map(function (classification, index) {
56
- var previousClassification = classifications[index - 1];
57
- return semanticTokenMaker(classification, previousClassification);
58
- });
54
+ classifications = _b.sent();
55
+ tokens = [];
56
+ prevLine = 0;
57
+ prevChar = 0;
58
+ for (_i = 0, classifications_1 = classifications; _i < classifications_1.length; _i++) {
59
+ classification = classifications_1[_i];
60
+ parts = toSemanticTokens(classification, model);
61
+ for (_a = 0, parts_1 = parts; _a < parts_1.length; _a++) {
62
+ part = parts_1[_a];
63
+ absLine = part[0], absChar = part[1], length_1 = part[2], kind = part[3], modifiers = part[4];
64
+ deltaLine = absLine - prevLine;
65
+ deltaChar = deltaLine === 0 ? absChar - prevChar : absChar;
66
+ tokens.push([deltaLine, deltaChar, length_1, kind, modifiers]);
67
+ prevLine = absLine;
68
+ prevChar = absChar;
69
+ }
70
+ }
59
71
  return [2 /*return*/, {
60
- data: new Uint32Array(semanticTokens.flat()),
72
+ data: new Uint32Array(tokens.flat(2)),
61
73
  resultId: model.getVersionId().toString(),
62
74
  }];
63
75
  }
@@ -68,11 +80,20 @@ var SemanticTokensProvider = /** @class */ (function () {
68
80
  return SemanticTokensProvider;
69
81
  }());
70
82
  export { SemanticTokensProvider };
71
- var emptyClassification = { line: 0, character: 0, length: 0, kind: 0 };
72
- function semanticTokenMaker(classification, previousClassification) {
73
- if (previousClassification === void 0) { previousClassification = emptyClassification; }
83
+ function toSemanticTokens(classification, model) {
74
84
  var line = classification.line, character = classification.character, length = classification.length, kind = classification.kind;
75
- var deltaLine = line - previousClassification.line;
76
- var deltaStart = deltaLine ? character : character - previousClassification.character;
77
- return [deltaLine, deltaStart, length, kind, 0];
85
+ var tokens = [];
86
+ var remainingLength = length;
87
+ var currentLine = line;
88
+ var currentChar = character;
89
+ while (remainingLength > 0 && currentLine < model.getLineCount()) {
90
+ var lineLength = model.getLineLength(currentLine + 1);
91
+ var available = lineLength - currentChar + 1;
92
+ var tokenLength = Math.min(remainingLength, available);
93
+ tokens.push([currentLine, currentChar, tokenLength, kind, 0]);
94
+ remainingLength -= tokenLength;
95
+ currentLine++;
96
+ currentChar = 0; // reset for next line
97
+ }
98
+ return tokens;
78
99
  }
@@ -1,30 +1,30 @@
1
1
  /// <reference types="@kusto/language-service-next/Kusto.Language.Bridge" />
2
2
  export type ClassificationKind = Kusto.Language.Editor.ClassificationKind;
3
3
  export declare enum Token {
4
- PlainText = "plainText",
5
- Comment = "comment",
6
- Punctuation = "punctuation",
7
- Directive = "directive",
8
- Literal = "literal",
9
- StringLiteral = "stringLiteral",
10
- Type = "type",
11
- Column = "column",
12
- Table = "table",
13
- Database = "database",
14
- Function = "function",
15
- Parameter = "parameter",
16
- Variable = "variable",
17
- Identifier = "identifier",
18
- ClientParameter = "clientParameter",
19
- QueryParameter = "queryParameter",
20
- ScalarParameter = "scalarParameter",
21
- MathOperator = "mathOperator",
22
- QueryOperator = "queryOperator",
23
- Command = "command",
24
- Keyword = "keyword",
25
- MaterializedView = "materializedView",
26
- SchemaMember = "schemaMember",
27
- SignatureParameter = "signatureParameter",
4
+ PlainText = "plainText",// 0
5
+ Comment = "comment",// 1
6
+ Punctuation = "punctuation",// 2
7
+ Directive = "directive",// 3
8
+ Literal = "literal",// 4
9
+ StringLiteral = "stringLiteral",// 5
10
+ Type = "type",// 6
11
+ Column = "column",// 7
12
+ Table = "table",// 8
13
+ Database = "database",// 9
14
+ Function = "function",// 10
15
+ Parameter = "parameter",// 11
16
+ Variable = "variable",// 12
17
+ Identifier = "identifier",// 13
18
+ ClientParameter = "clientParameter",// 14
19
+ QueryParameter = "queryParameter",// 15
20
+ ScalarParameter = "scalarParameter",// 16
21
+ MathOperator = "mathOperator",// 17
22
+ QueryOperator = "queryOperator",// 18
23
+ Command = "command",// 19
24
+ Keyword = "keyword",// 20
25
+ MaterializedView = "materializedView",// 21
26
+ SchemaMember = "schemaMember",// 22
27
+ SignatureParameter = "signatureParameter",// 23
28
28
  Option = "option"
29
29
  }
30
30
  export declare const tokenTypes: Token[];