@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.
Files changed (48) hide show
  1. package/README.md +25 -1
  2. package/package.json +3 -1
  3. package/release/dev/kustoMode-d3f9e09a.js +1818 -0
  4. package/release/dev/kustoMode.js +4 -2040
  5. package/release/dev/kustoWorker.js +49 -90
  6. package/release/dev/{main-1587ba64.js → main-f36cb42f.js} +2 -2
  7. package/release/dev/monaco.contribution.js +254 -214
  8. package/release/dev/{schema-a5230652.js → schema-077630e6.js} +13 -2
  9. package/release/esm/extendedGlobalApi/getRangeHtml.d.ts +2 -0
  10. package/release/esm/extendedGlobalApi/getRangeHtml.js +11 -0
  11. package/release/esm/extendedGlobalApi/index.d.ts +1 -0
  12. package/release/esm/extendedGlobalApi/index.js +1 -0
  13. package/release/esm/globals.d.ts +1 -0
  14. package/release/esm/globals.js +1 -0
  15. package/release/esm/kusto.worker.js +39 -91
  16. package/release/esm/kustoMode-349f5467.js +957 -0
  17. package/release/esm/kustoMode.d.ts +4 -8
  18. package/release/esm/kustoMode.js +94 -104
  19. package/release/esm/kustoWorker.d.ts +2 -5
  20. package/release/esm/kustoWorker.js +2 -5
  21. package/release/esm/languageFeatures.d.ts +1 -14
  22. package/release/esm/languageFeatures.js +0 -299
  23. package/release/esm/languageServiceManager/kustoLanguageService.d.ts +2 -4
  24. package/release/esm/languageServiceManager/kustoLanguageService.js +58 -71
  25. package/release/esm/languageServiceManager/schema.d.ts +2 -2
  26. package/release/esm/languageServiceManager/settings.d.ts +0 -2
  27. package/release/esm/monaco.contribution.d.ts +1 -6
  28. package/release/esm/monaco.contribution.js +64 -88
  29. package/release/esm/{schema-c006895b.js → schema-b8f0ba9b.js} +12 -2
  30. package/release/esm/syntaxHighlighting/SemanticTokensProvider.d.ts +18 -0
  31. package/release/esm/syntaxHighlighting/SemanticTokensProvider.js +78 -0
  32. package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.d.ts +2 -0
  33. package/release/esm/syntaxHighlighting/kustoMonarchLanguageDefinition.js +401 -0
  34. package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.d.ts +6 -0
  35. package/release/esm/syntaxHighlighting/semanticTokensProviderRegistrar.js +23 -0
  36. package/release/esm/syntaxHighlighting/themes.d.ts +11 -0
  37. package/release/esm/syntaxHighlighting/themes.js +103 -0
  38. package/release/esm/syntaxHighlighting/types.d.ts +41 -0
  39. package/release/esm/syntaxHighlighting/types.js +55 -0
  40. package/release/min/kustoMode-2dd4a01e.js +7 -0
  41. package/release/min/kustoMode.js +2 -2
  42. package/release/min/kustoWorker.js +4 -4
  43. package/release/min/{main-75aa3e71.js → main-86d6c837.js} +2 -2
  44. package/release/min/monaco.contribution.js +2 -2
  45. package/release/min/schema-a60c216c.js +7 -0
  46. package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.d.ts +0 -2
  47. package/release/esm/languageServiceManager/kustoMonarchLanguageDefinition.js +0 -211
  48. package/release/min/schema-192b3175.js +0 -7
package/README.md CHANGED
@@ -85,6 +85,30 @@ Every PR should come with a test that checks it.
85
85
 
86
86
  ## Changelog
87
87
 
88
+ ### 12.0.0
89
+
90
+ - fix: Resolved a race condition to ensure the semantic tokens provider is registered after setting the language server schema.
91
+ - fix: Fixed an issue where semantic highlighting didn't work on schema change by properly handling provider registration.
92
+ - fix: Disposed of the existing provider whenever a new one is registered to prevent memory leaks.
93
+
94
+ ### 12.0.0
95
+
96
+ ### Breaking Changes
97
+
98
+ - Replaced syntax highlighting in Monaco-Kusto. The old method injected CSS for each KQL classified block, causing copy-to-clipboard issues. The new implementation uses:
99
+ - **Monarch Tokens**: Efficient syntax highlighting leveraging Monaco Editor capabilities.
100
+ - **Semantic Syntax Highlighting**: Uses Kusto Language Service for context-aware highlighting.
101
+ - Removed `useSemanticColorization` and `useTokenColorization` settings.
102
+ - Renamed `kusto-dark2` theme to `kusto-dark`
103
+ - To enable new highlighting, add the following flag when creating the Monaco editor:
104
+ ```javascript
105
+ monaco.editor.create(document.getElementById('editor'), {
106
+ // current flags...
107
+ 'semanticHighlighting.enabled': true,
108
+ });
109
+ ```
110
+ - `getRangeHtml` is a new public API for retrieving HTML content with syntax highlighting for clipboard data.
111
+
88
112
  ### 11.4.0
89
113
 
90
114
  - feat: IntelliSense completion items now maintain the original order from the language service, with the most relevant option automatically focused based on the user's input.
@@ -97,7 +121,7 @@ Every PR should come with a test that checks it.
97
121
 
98
122
  - feat: Upgrade language-service-next to 11.6.1.
99
123
 
100
- - ### 11.2.0
124
+ ### 11.2.0
101
125
 
102
126
  - feat: Fix bugs related to last version upgrade.
103
127
  - feat: Upgrade language-service-next to 11.6.0.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kusto/monaco-kusto",
3
- "version": "11.4.0",
3
+ "version": "12.0.1",
4
4
  "description": "CSL, KQL plugin for the Monaco Editor",
5
5
  "author": {
6
6
  "name": "Microsoft"
@@ -52,11 +52,13 @@
52
52
  "@rollup/plugin-terser": "^0.4.3",
53
53
  "@rollup/plugin-virtual": "^3.0.1",
54
54
  "@tsconfig/node20": "^20.1.2",
55
+ "@types/color-convert": "^2.0.3",
55
56
  "@types/jest": "^29.5.12",
56
57
  "@types/lodash-es": "^4.17.9",
57
58
  "@types/node": "^20.6.3",
58
59
  "@types/xregexp": "^4.4.0",
59
60
  "browser-sync": "^3.0.2",
61
+ "color-convert": "^2.0.1",
60
62
  "concurrently": "^8.2.1",
61
63
  "http-server": "^14.1.1",
62
64
  "jest": "^29.7.0",