@coldsmirk/inkstone-monaco 0.34.2 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as toMonacoTokens, d as lineAfter, i as defaultMetadata, r as colorIdsFor, s as applyStateDiff } from "./bounds-CZ_iAUoc.js";
|
|
2
|
-
import { CODE_FONT_FAMILY, highlighterSources, inkstoneRadius, inkstoneShadow } from "@coldsmirk/inkstone-core";
|
|
2
|
+
import { CODE_FONT_FAMILY, INKSTONE_DARK_THEME, INKSTONE_LIGHT_THEME, highlighterSources, inkstoneRadius, inkstoneShadow, subscribeEditorColors } from "@coldsmirk/inkstone-core";
|
|
3
3
|
import { EncodedTokenMetadata, INITIAL } from "@shikijs/vscode-textmate";
|
|
4
4
|
//#region src/auto-imports.ts
|
|
5
5
|
const MISSING_LOOKUP_REJECTION$1 = "Missing requestHandler or method: getAutoImportCompletionsAtPosition";
|
|
@@ -1158,6 +1158,18 @@ function registerShikiHighlighting(monaco, highlighter) {
|
|
|
1158
1158
|
throw error;
|
|
1159
1159
|
}
|
|
1160
1160
|
registry.set(monaco, bridge);
|
|
1161
|
+
subscribeEditorColors(() => {
|
|
1162
|
+
relight(monaco, bridge);
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
function relight(monaco, bridge) {
|
|
1166
|
+
for (const themeId of [INKSTONE_LIGHT_THEME, INKSTONE_DARK_THEME]) {
|
|
1167
|
+
if (!bridge.themes.has(themeId)) continue;
|
|
1168
|
+
const theme = monacoThemeOf(bridge.highlighter.getTheme(themeId));
|
|
1169
|
+
bridge.themes.set(themeId, theme);
|
|
1170
|
+
if (bridge.theme === themeId) adoptTheme(bridge, themeId);
|
|
1171
|
+
monaco.editor.defineTheme(themeId, theme);
|
|
1172
|
+
}
|
|
1161
1173
|
}
|
|
1162
1174
|
function registerShikiLanguage(monaco, highlighter, language) {
|
|
1163
1175
|
const registry = bridges();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldsmirk/inkstone-monaco",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Framework-agnostic Monaco assembly: lazy offline host (all language workers bundled, no CDN), opt-in Simplified-Chinese UI via monaco's official NLS catalog, a streaming editor controller for AI-typed content, and the shared Shiki highlighting bridge.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"monaco",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@shikijs/vscode-textmate": "^10.0.2",
|
|
43
43
|
"shiki": "^4.5.0",
|
|
44
|
-
"@coldsmirk/inkstone-core": "^0.
|
|
44
|
+
"@coldsmirk/inkstone-core": "^0.36.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"monaco-editor": "^0.57.0",
|