@coldsmirk/inkstone-monaco 0.27.3 → 0.28.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 +9 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -205,6 +205,14 @@ function installQuickInputGeometryFix() {
|
|
|
205
205
|
style.textContent = ".monaco-editor .quick-input-list { position: relative; }";
|
|
206
206
|
document.head.append(style);
|
|
207
207
|
}
|
|
208
|
+
const HOVER_FOCUS_STYLE_SELECTOR = "style[data-inkstone=\"monaco-hover-focus\"]";
|
|
209
|
+
function installHoverFocusFix() {
|
|
210
|
+
if (document.querySelector(HOVER_FOCUS_STYLE_SELECTOR)) return;
|
|
211
|
+
const style = document.createElement("style");
|
|
212
|
+
style.dataset.inkstone = "monaco-hover-focus";
|
|
213
|
+
style.textContent = ".monaco-editor .monaco-hover .hover-row[tabindex=\"0\"]:focus { outline: none; } .monaco-editor .monaco-hover:focus-within { outline: 1px solid var(--vscode-focusBorder); outline-offset: -1px; }";
|
|
214
|
+
document.head.append(style);
|
|
215
|
+
}
|
|
208
216
|
//#endregion
|
|
209
217
|
//#region src/host.ts
|
|
210
218
|
const HOST_PROMISE_KEY = Symbol.for("coldsmirk.inkstone.monaco.hostPromise");
|
|
@@ -276,6 +284,7 @@ function ensureMonacoHost(options = {}) {
|
|
|
276
284
|
installHoverGeometryFix();
|
|
277
285
|
installSuggestGeometryFix();
|
|
278
286
|
installQuickInputGeometryFix();
|
|
287
|
+
installHoverFocusFix();
|
|
279
288
|
const monaco = await import("monaco-editor");
|
|
280
289
|
globalThis.MonacoEnvironment = { getWorker: (workerId, label) => getWorker?.(workerId, label) ?? builtinGetWorker(label) };
|
|
281
290
|
if (locale === "zh-cn") monaco.editor.onDidCreateEditor(localizeActionDescriptions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coldsmirk/inkstone-monaco",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@shikijs/vscode-textmate": "^10.0.2",
|
|
43
|
-
"@coldsmirk/inkstone-core": "^0.
|
|
43
|
+
"@coldsmirk/inkstone-core": "^0.28.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"monaco-editor": "^0.56.0",
|