@kusto/monaco-kusto 4.1.6 → 4.1.7
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/package.json
CHANGED
|
@@ -277,8 +277,8 @@ define('vs/language/kusto/monaco.contribution',["require", "exports", "./command
|
|
|
277
277
|
],
|
|
278
278
|
colors: {
|
|
279
279
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
280
|
-
'
|
|
281
|
-
'editorSuggestWidget.
|
|
280
|
+
'editor.background': '#1B1A19',
|
|
281
|
+
'editorSuggestWidget.selectedBackground': '#004E8C',
|
|
282
282
|
},
|
|
283
283
|
});
|
|
284
284
|
monacoInstance.editor.defineTheme('kusto-dark2', {
|
|
@@ -286,10 +286,9 @@ define('vs/language/kusto/monaco.contribution',["require", "exports", "./command
|
|
|
286
286
|
inherit: true,
|
|
287
287
|
rules: [],
|
|
288
288
|
colors: {
|
|
289
|
-
'editor.background': '#1B1A19',
|
|
290
289
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
291
|
-
'
|
|
292
|
-
'editorSuggestWidget.
|
|
290
|
+
'editor.background': '#1B1A19',
|
|
291
|
+
'editorSuggestWidget.selectedBackground': '#004E8C',
|
|
293
292
|
},
|
|
294
293
|
});
|
|
295
294
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
|
@@ -140,8 +140,8 @@ export function setupMonacoKusto(monacoInstance) {
|
|
|
140
140
|
],
|
|
141
141
|
colors: {
|
|
142
142
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
143
|
-
'
|
|
144
|
-
'editorSuggestWidget.
|
|
143
|
+
'editor.background': '#1B1A19',
|
|
144
|
+
'editorSuggestWidget.selectedBackground': '#004E8C',
|
|
145
145
|
},
|
|
146
146
|
});
|
|
147
147
|
monacoInstance.editor.defineTheme('kusto-dark2', {
|
|
@@ -149,10 +149,9 @@ export function setupMonacoKusto(monacoInstance) {
|
|
|
149
149
|
inherit: true,
|
|
150
150
|
rules: [],
|
|
151
151
|
colors: {
|
|
152
|
-
'editor.background': '#1B1A19',
|
|
153
152
|
// see: https://code.visualstudio.com/api/references/theme-color#editor-widget-colors
|
|
154
|
-
'
|
|
155
|
-
'editorSuggestWidget.
|
|
153
|
+
'editor.background': '#1B1A19',
|
|
154
|
+
'editorSuggestWidget.selectedBackground': '#004E8C',
|
|
156
155
|
},
|
|
157
156
|
});
|
|
158
157
|
// Initialize kusto specific language features that don't currently have a natural way to extend using existing apis.
|
package/release/min/kustoMode.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 4.1.
|
|
3
|
+
* monaco-kusto version: 4.1.7(undefined)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 4.1.
|
|
3
|
+
* monaco-kusto version: 4.1.7(undefined)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* monaco-kusto version: 4.1.
|
|
3
|
+
* monaco-kusto version: 4.1.7(undefined)
|
|
4
4
|
* Released under the MIT license
|
|
5
5
|
* https://https://github.com/Azure/monaco-kusto/blob/master/README.md
|
|
6
6
|
*-----------------------------------------------------------------------------*/
|
|
7
|
-
define("vs/language/kusto/commandHighlighter",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function(){function e(e){var o=this;this.editor=e,this.disposables=[],this.decorations=[],this.editor.onDidChangeCursorSelection((function(e){"kusto"===o.editor.getModel().getModeId()&&o.highlightCommandUnderCursor(e)}))}return e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.disposables.forEach((function(e){return e.dispose()}))},e.prototype.highlightCommandUnderCursor=function(o){if(o.selection.isEmpty()){var t=[{range:this.editor.getCurrentCommandRange(o.selection.getStartPosition()),options:e.CURRENT_COMMAND_HIGHLIGHT}];this.decorations=this.editor.deltaDecorations(this.decorations,t)}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},e.ID="editor.contrib.kustoCommandHighliter",e.CURRENT_COMMAND_HIGHLIGHT={className:"selectionHighlight"},e}();o.default=t})),define("vs/language/kusto/commandFormatter",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function(e){var o=this;this.editor=e,this.actionAdded=!1,e.onDidChangeCursorSelection((function(t){"kusto"===o.editor.getModel().getModeId()&&(o.actionAdded||(e.addAction({id:"editor.action.kusto.formatCurrentCommand",label:"Format Command Under Cursor",keybindings:[monaco.KeyMod.chord(monaco.KeyMod.CtrlCmd|monaco.KeyCode.KEY_K,monaco.KeyMod.CtrlCmd|monaco.KeyCode.KEY_F)],run:function(o){e.trigger("KustoCommandFormatter","editor.action.formatSelection",null)},contextMenuGroupId:"1_modification"}),o.actionAdded=!0))}))};o.default=t})),define("vs/language/kusto/extendedEditor",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.extend=void 0,o.extend=function(e){Object.getPrototypeOf(e).getCurrentCommandRange=function(e){for(var o=e.lineNumber-1,t=this.getModel().getLinesContent(),n=0,r=[],i=0;i<t.length;i++){if(""===t[i].trim()?r.push({commandOrdinal:n++,lineNumber:i}):r.push({commandOrdinal:n,lineNumber:i}),i>o&&n>r[o].commandOrdinal)break}var
|
|
7
|
+
define("vs/language/kusto/commandHighlighter",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function(){function e(e){var o=this;this.editor=e,this.disposables=[],this.decorations=[],this.editor.onDidChangeCursorSelection((function(e){"kusto"===o.editor.getModel().getModeId()&&o.highlightCommandUnderCursor(e)}))}return e.prototype.getId=function(){return e.ID},e.prototype.dispose=function(){this.disposables.forEach((function(e){return e.dispose()}))},e.prototype.highlightCommandUnderCursor=function(o){if(o.selection.isEmpty()){var t=[{range:this.editor.getCurrentCommandRange(o.selection.getStartPosition()),options:e.CURRENT_COMMAND_HIGHLIGHT}];this.decorations=this.editor.deltaDecorations(this.decorations,t)}else this.decorations=this.editor.deltaDecorations(this.decorations,[])},e.ID="editor.contrib.kustoCommandHighliter",e.CURRENT_COMMAND_HIGHLIGHT={className:"selectionHighlight"},e}();o.default=t})),define("vs/language/kusto/commandFormatter",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function(e){var o=this;this.editor=e,this.actionAdded=!1,e.onDidChangeCursorSelection((function(t){"kusto"===o.editor.getModel().getModeId()&&(o.actionAdded||(e.addAction({id:"editor.action.kusto.formatCurrentCommand",label:"Format Command Under Cursor",keybindings:[monaco.KeyMod.chord(monaco.KeyMod.CtrlCmd|monaco.KeyCode.KEY_K,monaco.KeyMod.CtrlCmd|monaco.KeyCode.KEY_F)],run:function(o){e.trigger("KustoCommandFormatter","editor.action.formatSelection",null)},contextMenuGroupId:"1_modification"}),o.actionAdded=!0))}))};o.default=t})),define("vs/language/kusto/extendedEditor",["require","exports"],(function(e,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.extend=void 0,o.extend=function(e){Object.getPrototypeOf(e).getCurrentCommandRange=function(e){for(var o=e.lineNumber-1,t=this.getModel().getLinesContent(),n=0,r=[],i=0;i<t.length;i++){if(""===t[i].trim()?r.push({commandOrdinal:n++,lineNumber:i}):r.push({commandOrdinal:n,lineNumber:i}),i>o&&n>r[o].commandOrdinal)break}var a=r[o].commandOrdinal,d=r.filter((function(e){return e.commandOrdinal===a})),u=d[0].lineNumber+1,s=d[d.length-1].lineNumber+1,g=t[s-1].length+1;return new monaco.Range(u,1,s,g)}}})),define("vs/language/kusto/monaco.contribution",["require","exports","./commandHighlighter","./commandFormatter","./extendedEditor"],(function(e,o,t,n,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.setupMonacoKusto=o.LanguageServiceDefaultsImpl=void 0;var i=monaco.Emitter,a=function(){function e(e){this._onDidChange=new i,this.setLanguageSettings(e),this._workerMaxIdleTime=0}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageSettings",{get:function(){return this._languageSettings},enumerable:!1,configurable:!0}),e.prototype.setLanguageSettings=function(e){this._languageSettings=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setMaximumWorkerIdleTime=function(e){this._workerMaxIdleTime=e},e.prototype.getWorkerMaxIdleTime=function(){return this._workerMaxIdleTime},e}();o.LanguageServiceDefaultsImpl=a;var d={includeControlCommands:!0,newlineAfterPipe:!0,openSuggestionDialogAfterPreviousSuggestionAccepted:!0,useIntellisenseV2:!0,useSemanticColorization:!0,useTokenColorization:!0,enableHover:!0,formatter:{indentationSize:4,pipeOperatorStyle:"Smart"},syntaxErrorAsMarkDown:{enableSyntaxErrorAsMarkDown:!1}};function u(){return new Promise((function(e,o){s((function(t){t.getKustoWorker().then(e,o)}))}))}function s(o){e(["vs/language/kusto/kustoMode"],o)}function g(e){var o=new a(d);e.languages.kusto={kustoDefaults:o,getKustoWorker:u},e.languages.onLanguage("kusto",(function(){s((function(t){return t.setupMode(o,e)}))})),e.languages.register({id:"kusto",extensions:[".csl",".kql"]}),e.editor.defineTheme("kusto-light",{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"008000"},{token:"variable.predefined",foreground:"800080"},{token:"function",foreground:"0000FF"},{token:"operator.sql",foreground:"CC3700"},{token:"string",foreground:"B22222"},{token:"operator.scss",foreground:"0000FF"},{token:"variable",foreground:"C71585"},{token:"variable.parameter",foreground:"9932CC"},{token:"",foreground:"000000"},{token:"type",foreground:"0000FF"},{token:"tag",foreground:"0000FF"},{token:"annotation",foreground:"2B91AF"},{token:"keyword",foreground:"0000FF"},{token:"number",foreground:"191970"},{token:"annotation",foreground:"9400D3"},{token:"invalid",background:"cd3131"}],colors:{"editorSuggestWidget.selectedBackground":"#93CFFB","editorSuggestWidget.background":"#FAF9F8"}}),e.editor.defineTheme("kusto-dark",{base:"vs-dark",inherit:!0,rules:[{token:"comment",foreground:"608B4E"},{token:"variable.predefined",foreground:"4ec9b0"},{token:"function",foreground:"dcdcaa"},{token:"operator.sql",foreground:"9cdcfe"},{token:"string",foreground:"ce9178"},{token:"operator.scss",foreground:"569cd6"},{token:"variable",foreground:"4ec9b0"},{token:"variable.parameter",foreground:"c586c0"},{token:"",foreground:"d4d4d4"},{token:"type",foreground:"569cd6"},{token:"tag",foreground:"569cd6"},{token:"annotation",foreground:"9cdcfe"},{token:"keyword",foreground:"569cd6"},{token:"number",foreground:"d7ba7d"},{token:"annotation",foreground:"b5cea8"},{token:"invalid",background:"cd3131"}],colors:{"editor.background":"#1B1A19","editorSuggestWidget.selectedBackground":"#004E8C"}}),e.editor.defineTheme("kusto-dark2",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1B1A19","editorSuggestWidget.selectedBackground":"#004E8C"}}),e.editor.onDidCreateEditor((function(e){r.extend(e),new t.default(e),function(e){return void 0!==e.addAction}(e)&&new n.default(e),function(e){e.onDidChangeCursorSelection((function(t){if(o&&o.languageSettings&&o.languageSettings.openSuggestionDialogAfterPreviousSuggestionAccepted){if(!("modelChange"===t.source&&t.reason===monaco.editor.CursorChangeReason.RecoverFromMarkers))return;t.selection;var n=e.getModel().getValueInRange(t.selection);" "===n[n.length-1]&&setTimeout((function(){return e.trigger("monaco-kusto","editor.action.triggerSuggest",{})}),10)}}))}(e)}))}o.setupMonacoKusto=g,monaco.editor&&g(monaco)}));
|