feat(dictionary): add Hachidori backend support

- Add backend selection, setup gating, Anki integration, and external host support
- Add launcher flags, documentation, packaging, and focused tests
- Open on-demand overlay modals on the first attempt
This commit is contained in:
2026-09-22 00:21:19 -07:00
parent 1508863dbb
commit d9fdc7ef6d
446 changed files with 109060 additions and 244 deletions
+13
View File
@@ -0,0 +1,13 @@
// Pin the add-on independently so older extensions and vendored copies keep
// downloading the relay they were tested with.
// SPDX-License-Identifier: GPL-3.0-or-later
export const ANKI_ADDON_FILE_NAME = "hachidori-relay.ankiaddon";
export const ANKI_ADDON_VERSION = "0.0.4";
export const ANKI_ADDON_URL = `https://github.com/bee-san/hachidori-anki/releases/download/v${ANKI_ADDON_VERSION}/${ANKI_ADDON_FILE_NAME}`;
export async function fetchAnkiAddon(request = globalThis.fetch) {
const response = await request(ANKI_ADDON_URL);
if (!response.ok) throw new Error(`GitHub returned HTTP ${response.status}. Try again.`);
return response.blob();
}