From c2c2695e5f851fa13bf663cac363d920f208eda3 Mon Sep 17 00:00:00 2001 From: gua Date: Mon, 26 Oct 2026 09:20:30 +0800 Subject: [PATCH] chore(release): prepare version 0.1.1 --- CHANGELOG.md | 11 +++++++++++ CONTRIBUTING.md | 2 ++ README.md | 2 +- README.zh-CN.md | 2 +- manifest.json | 4 ++-- package-lock.json | 24 ++++++++++++------------ package.json | 4 ++-- src/ui/toolbar.ts | 4 +++- tests/release.test.ts | 4 ++-- versions.json | 3 ++- 10 files changed, 38 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 055214c..d3ffdb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ Notable changes to Hover Bar, grouped by release. +## 0.1.1 — 2026-10-26 + +### Changed + +- Lower the minimum supported desktop Obsidian version to 1.8.7 after host compatibility validation. +- Use each version's changelog section for GitHub release notes. + +### Fixed + +- Keep the note picker focused when clicking a result so the selected link is inserted before the picker closes. + ## 0.1.0 — 2026-10-24 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 508c667..69f37a0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,6 +8,8 @@ Use Node.js 24, run `npm ci`, then `npm run dev` for a watch build. Start with t For a production build, run `npm ci` followed by `npm run build`. These developer instructions belong here; the README is written for users installing from Obsidian's community directory. +Obsidian API types are pinned to the minimum supported app version, currently 1.8.7, so type checking catches newer API usage. Verify editor changes in the minimum supported Obsidian app as well as running the automated checks. + ## Report a problem Include the Obsidian and plugin versions, OS, editing mode, theme, a small synthetic Markdown example, reproduction steps, and expected versus actual results. Explain whether the problem reproduces with other community plugins disabled. Never attach private notes, vaults, credentials, or unredacted logs. diff --git a/README.md b/README.md index fadfe8b..02b487b 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Click outside the toolbar or press Esc to close it. For keyboard access, use **S ## Compatibility and limitations -Requires desktop Obsidian **1.14.4 or later**, in Live Preview or Source mode. Reading view and mobile selection menus are not supported. +Requires desktop Obsidian **1.8.7 or later**, in Live Preview or Source mode. Reading view and mobile selection menus are not supported. Use a single text fragment within one logical line, including text in a heading, list item, or blockquote. Keep structural markers outside your selection. Complex mixed formatting, partial HTML spans, multiple selections, tables, code blocks, math, and frontmatter will not be rewritten. Unsupported actions explain their limitation. diff --git a/README.zh-CN.md b/README.zh-CN.md index 1f0bc01..2b3a720 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -42,7 +42,7 @@ ## 兼容性与限制 -需要桌面端 Obsidian **1.14.4 或更高版本**,支持实时预览和源码模式。阅读视图与移动端触摸选区不提供工具条。 +需要桌面端 Obsidian **1.8.7 或更高版本**,支持实时预览和源码模式。阅读视图与移动端触摸选区不提供工具条。 格式操作支持同一逻辑行中的单一文本片段,包括标题、列表项和引用中的文字;请选择文字内容,不包含结构标记。复杂混合格式、部分 HTML 标签跨度、多选区、表格、代码块、数学公式和 YAML 不直接改写;不可用动作会说明原因。 diff --git a/manifest.json b/manifest.json index d5dcef6..40adcf1 100644 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,8 @@ { "id": "hover-bar", "name": "Hover Bar", - "version": "0.1.0", - "minAppVersion": "1.14.4", + "version": "0.1.1", + "minAppVersion": "1.8.7", "description": "Format selected text with a floating toolbar, text colors, highlights, and internal links.", "author": "gua", "authorUrl": "https://github.com/saltcoffee", diff --git a/package-lock.json b/package-lock.json index 1927a30..610129d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hover-bar", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hover-bar", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "entities": "8.1.0" @@ -23,7 +23,7 @@ "@types/node": "26.6.5", "esbuild": "0.28.2", "eslint": "10.13.0", - "obsidian": "1.14.4", + "obsidian": "1.8.7", "typescript": "6.0.3", "typescript-eslint": "8.72.0", "vitest": "5.0.5" @@ -2462,9 +2462,9 @@ } }, "node_modules/moment": { - "version": "2.31.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.31.0.tgz", - "integrity": "sha512-0acOTfMiWOheYS4eoWb80yYMb/JLvVv9SHbs2PehaDzfUG0Bw855SKyk0IKTnPGa5+U2bmi3W68l1+sGLX/pvw==", + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", "dev": true, "license": "MIT", "engines": { @@ -2506,18 +2506,18 @@ "license": "MIT" }, "node_modules/obsidian": { - "version": "1.14.4", - "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.14.4.tgz", - "integrity": "sha512-Kyo+5t0wFW2On5irLOPrgtwWDnaJsvE9n/P1OVvdPytx+NqeHJXvxVqADNOqLp9bU1+I64B6i+dHb0fxR/ss3w==", + "version": "1.8.7", + "resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.8.7.tgz", + "integrity": "sha512-h4bWwNFAGRXlMlMAzdEiIM2ppTGlrh7uGOJS6w4gClrsjc+ei/3YAtU2VdFUlCiPuTHpY4aBpFJJW75S1Tl/JA==", "dev": true, "license": "MIT", "dependencies": { "@types/codemirror": "5.60.8", - "moment": "2.31.0" + "moment": "2.29.4" }, "peerDependencies": { - "@codemirror/state": "6.7.6", - "@codemirror/view": "6.43.13" + "@codemirror/state": "^6.0.0", + "@codemirror/view": "^6.0.0" } }, "node_modules/obug": { diff --git a/package.json b/package.json index 20dbe47..0cafc8f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hover-bar", - "version": "0.1.0", + "version": "0.1.1", "description": "Format selected text with a floating toolbar, text colors, highlights, and internal links.", "type": "module", "private": true, @@ -37,7 +37,7 @@ "@types/node": "26.6.5", "esbuild": "0.28.2", "eslint": "10.13.0", - "obsidian": "1.14.4", + "obsidian": "1.8.7", "typescript": "6.0.3", "typescript-eslint": "8.72.0", "vitest": "5.0.5" diff --git a/src/ui/toolbar.ts b/src/ui/toolbar.ts index 619241f..8249998 100644 --- a/src/ui/toolbar.ts +++ b/src/ui/toolbar.ts @@ -48,7 +48,9 @@ export class Toolbar { this.controls.set(key, button); this.bar.append(button); } this.root.addEventListener('pointerdown', event => { - if (event.button === 0 && event.composedPath().some(node => (node as HTMLElement).tagName === 'BUTTON')) event.preventDefault(); + // Keep focus inside the toolbar until a button or note option handles its click. + if (event.button === 0 && event.composedPath().some(node => + (node as Element).tagName === 'BUTTON' || (node as Element).getAttribute?.('role') === 'option')) event.preventDefault(); }); this.root.addEventListener('keydown', event => this.onKey(event)); document.body.append(this.root); diff --git a/tests/release.test.ts b/tests/release.test.ts index 4ed953f..3be4601 100644 --- a/tests/release.test.ts +++ b/tests/release.test.ts @@ -38,10 +38,10 @@ beforeEach(() => { for (const file of ['main.js', 'styles.css', 'LICENSE', 'THIRD_PARTY_NOTICES.md', 'README.md', 'README.zh-CN.md', 'CONTRIBUTING.md']) { fixture.files.set(file, 'Synthetic release fixture.'); } - json('manifest.json', { id: 'hover-bar', version: '0.1.0', minAppVersion: '1.14.4', isDesktopOnly: true, description: 'Format selected text.' }); + json('manifest.json', { id: 'hover-bar', version: '0.1.0', minAppVersion: '1.8.7', isDesktopOnly: true, description: 'Format selected text.' }); json('package.json', { version: '0.1.0' }); json('package-lock.json', { version: '0.1.0', packages: { '': { version: '0.1.0' } } }); - json('versions.json', { '0.1.0': '1.14.4' }); + json('versions.json', { '0.1.0': '1.8.7' }); fixture.files.set('CHANGELOG.md', '## 0.1.0\n\n- Initial release.\n'); fixture.tree = [...fixture.files.keys()].filter(file => file !== 'main.js'); fixture.head = fixture.tag = '1'.repeat(40); diff --git a/versions.json b/versions.json index 5ceea0f..66fb794 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,4 @@ { - "0.1.0": "1.14.4" + "0.1.0": "1.14.4", + "0.1.1": "1.8.7" }