@celestia-island/hikari 0.55.488 → 0.55.492
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/types/components/HkAdminHeader.d.ts +1 -1
- package/dist/types/components/HkAffixPicker.d.ts +2 -2
- package/dist/types/components/HkColorSchemeEditor.d.ts +50 -0
- package/dist/types/components/HkCurrencySelect.d.ts +1 -1
- package/dist/types/components/HkHeaderPicker.d.ts +1 -1
- package/dist/types/components/HkTable.d.ts +1 -1
- package/dist/types/components/HkTagInput.d.ts +1 -1
- package/dist/types/i18n/localeCatalog.d.ts +8 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/theme/index.d.ts +2 -0
- package/dist/types/theme/presets.d.ts +12 -0
- package/dist/types/theme/themeName.d.ts +13 -0
- package/dist/types/theme/useTheme.d.ts +2 -0
- package/package.json +3 -2
- package/src/components/HkColorSchemeEditor.test.ts +71 -0
- package/src/components/HkColorSchemeEditor.tsx +81 -7
- package/src/components/HkMenu.test.ts +39 -0
- package/src/components/HkMenu.tsx +43 -10
- package/src/components/HkThemePanelContent.names.test.ts +95 -0
- package/src/components/HkThemePanelContent.tsx +13 -6
- package/src/i18n/localeCatalog.parity.test.ts +41 -0
- package/src/i18n/localeCatalog.ts +34 -0
- package/src/i18n/locales/ar/components.json +1 -0
- package/src/i18n/locales/de/components.json +1 -0
- package/src/i18n/locales/en/components.json +1 -0
- package/src/i18n/locales/es/components.json +1 -0
- package/src/i18n/locales/fr/components.json +1 -0
- package/src/i18n/locales/ja/components.json +1 -0
- package/src/i18n/locales/ko/components.json +1 -0
- package/src/i18n/locales/pt/components.json +1 -0
- package/src/i18n/locales/ru/components.json +1 -0
- package/src/i18n/locales/zh-Hans/components.json +1 -0
- package/src/i18n/locales/zh-Hant/components.json +1 -0
- package/src/index.ts +6 -0
- package/src/plugins/boot-landing.scss +1 -1
- package/src/plugins/boot-recovery.js +2 -2
- package/src/plugins/bootLandingCss.d.ts +1 -1
- package/src/plugins/bootLandingCss.test.ts +1 -1
- package/src/plugins/bootLandingDetailsCss.d.ts +1 -1
- package/src/res/authoredResScripts.test.ts +229 -0
- package/src/res/preBootScriptsBehaviour.test.ts +225 -0
- package/src/res/tauriTitlebarBehaviour.test.ts +332 -0
- package/src/res/themeLoaderBehaviour.test.ts +291 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/presets.ts +12 -0
- package/src/theme/stock-preset.json +1 -1
- package/src/theme/themeLoaderContract.test.ts +46 -0
- package/src/theme/themeName.test.ts +69 -0
- package/src/theme/themeName.ts +80 -0
|
@@ -447,14 +447,40 @@ export default defineComponent({
|
|
|
447
447
|
const rowRefs = ref<Record<string, HTMLElement | null>>({});
|
|
448
448
|
const anchorCache = new Map<string, PanelAnchor>();
|
|
449
449
|
|
|
450
|
+
/** Measured width (root visual px) of an already-mounted cascade
|
|
451
|
+
* panel, 0 while it has not laid out yet (the first positioning
|
|
452
|
+
* pass runs before the DOM settles). The flipped side hangs the
|
|
453
|
+
* panel's near EDGE off the trigger, so the visual gap between the
|
|
454
|
+
* panel and the trigger is the anchor offset itself — not the
|
|
455
|
+
* leftover of the width estimate. Subtracting the bare
|
|
456
|
+
* CASCADE_PANEL_W guess left every flipped cascade floating ~
|
|
457
|
+
* (224 − real width) px away from its trigger (2026-11-25 user
|
|
458
|
+
* report: the docs-site language popup sat ~50px left of its
|
|
459
|
+
* button; on a narrow window the guess also slammed the panel
|
|
460
|
+
* against the viewport's leading edge, detaching it entirely).
|
|
461
|
+
* offsetWidth is local and transform-agnostic; the zoom factor
|
|
462
|
+
* lifts it into the root visual space the anchor math runs in.
|
|
463
|
+
* HkSelectPanel repositions after the DOM settles, so the first
|
|
464
|
+
* pass (estimate fallback) is corrected by the second — no
|
|
465
|
+
* feedback loop: the anchor only READS the width, and positioning
|
|
466
|
+
* changes where the panel is, never how wide it is. */
|
|
467
|
+
function measuredCascadeWidth(level: number): number {
|
|
468
|
+
const el = panelInsts.value[level]?.panelEl?.() ?? null;
|
|
469
|
+
if (!el) return 0;
|
|
470
|
+
const w = el.offsetWidth;
|
|
471
|
+
return w > 0 ? w * ancestorZoom(el) : 0;
|
|
472
|
+
}
|
|
473
|
+
|
|
450
474
|
/** Synthetic anchor placing a sub-panel beside its parent row:
|
|
451
475
|
* popout to the right, flipping to the left when the viewport runs
|
|
452
476
|
* out (classic menubar cascade). The rect stays LIVE — HkSelectPanel
|
|
453
|
-
* re-reads it on every reposition (open, resize). The
|
|
454
|
-
* width
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
477
|
+
* re-reads it on every reposition (open, resize). The measured
|
|
478
|
+
* panel width places the flip (estimate only until the panel has
|
|
479
|
+
* laid out); the fixed panel width stays a LOCAL constant for the
|
|
480
|
+
* side decision's worst case while the row rect and the viewport
|
|
481
|
+
* are in the root VISUAL space (standardized zoom applies ancestor
|
|
482
|
+
* zoom to gBCR and innerWidth alike), so the width is scaled by
|
|
483
|
+
* the cumulative zoom before the flip comparison. */
|
|
458
484
|
function rowAnchor(level: number, key: string): PanelAnchor {
|
|
459
485
|
const id = `${level}:${key}`;
|
|
460
486
|
let anchor = anchorCache.get(id);
|
|
@@ -465,7 +491,9 @@ export default defineComponent({
|
|
|
465
491
|
if (!row) return pointRect(0, 0);
|
|
466
492
|
const r = row.getBoundingClientRect();
|
|
467
493
|
if (!r.width && !r.height) return pointRect(0, 0); // detached
|
|
468
|
-
const
|
|
494
|
+
const z = ancestorZoom(document.body);
|
|
495
|
+
const cascadeW =
|
|
496
|
+
measuredCascadeWidth(level + 1) || CASCADE_PANEL_W * z;
|
|
469
497
|
// Shared viewport gutter (--viewport-gutter: 8 mobile / 16 desktop).
|
|
470
498
|
const pad = viewportGutterPx();
|
|
471
499
|
const frame = popupViewportRect();
|
|
@@ -481,8 +509,12 @@ export default defineComponent({
|
|
|
481
509
|
}
|
|
482
510
|
|
|
483
511
|
/** Synthetic anchor for root placements HkSelectPanel does not model
|
|
484
|
-
* natively (right-/left-start): the panel hangs off the
|
|
485
|
-
*
|
|
512
|
+
* natively (right-/left-start): the panel hangs off the trigger's
|
|
513
|
+
* near edge at the anchor offset — its left edge at the trigger's
|
|
514
|
+
* right + gap when it opens right, its right edge at the trigger's
|
|
515
|
+
* left − gap when it flips (measured panel width; estimate until
|
|
516
|
+
* the panel has laid out, corrected by HkSelectPanel's settle
|
|
517
|
+
* reposition). */
|
|
486
518
|
function rootCascadeAnchor(side: "right" | "left"): PanelAnchor {
|
|
487
519
|
return {
|
|
488
520
|
getBoundingClientRect: () => {
|
|
@@ -491,7 +523,8 @@ export default defineComponent({
|
|
|
491
523
|
const r = real.getBoundingClientRect();
|
|
492
524
|
if (!r.width && !r.height) return pointRect(0, 0);
|
|
493
525
|
const gap = props.offset; // visual-space gap, same as the native placements
|
|
494
|
-
const
|
|
526
|
+
const z = ancestorZoom(document.body);
|
|
527
|
+
const cascadeW = measuredCascadeWidth(0) || CASCADE_PANEL_W * z;
|
|
495
528
|
// Shared viewport gutter (--viewport-gutter: 8 mobile / 16 desktop).
|
|
496
529
|
const pad = viewportGutterPx();
|
|
497
530
|
const frame = popupViewportRect();
|
|
@@ -499,7 +532,7 @@ export default defineComponent({
|
|
|
499
532
|
const left =
|
|
500
533
|
side === "right" && openRight
|
|
501
534
|
? r.right + gap
|
|
502
|
-
: Math.max(frame.x + pad, r.left -
|
|
535
|
+
: Math.max(frame.x + pad, r.left - gap - cascadeW);
|
|
503
536
|
return pointRect(left, r.top);
|
|
504
537
|
},
|
|
505
538
|
contains: (node) => !!props.anchorRef?.contains(node),
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HkThemePanelContent × theme-name i18n (2026-11-25 user direction:
|
|
3
|
+
* theme names are i18n citizens on every host). The row name resolves
|
|
4
|
+
* through THREE answers — the theme's own nameI18n map (authored in the
|
|
5
|
+
* scheme editor's localized-name input), the message-key convention
|
|
6
|
+
* (the stock preset ships `hikari::theme.defaultThemeName`), then the
|
|
7
|
+
* raw name. The negative direction is pinned because it is the silent
|
|
8
|
+
* English leak the user reported: a face switched to 简体中文 must not
|
|
9
|
+
* show "Default".
|
|
10
|
+
*/
|
|
11
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
12
|
+
import { createApp, defineComponent, h, nextTick } from "vue";
|
|
13
|
+
|
|
14
|
+
import { HkThemePanelContent } from "./HkThemePanelContent";
|
|
15
|
+
import { setLocale } from "../i18n/context";
|
|
16
|
+
import { useTheme, themePresets, type ThemeSchemeTokens } from "../theme";
|
|
17
|
+
|
|
18
|
+
const mounts: Array<{ app: ReturnType<typeof createApp>; container: HTMLElement }> = [];
|
|
19
|
+
|
|
20
|
+
async function settle(): Promise<void> {
|
|
21
|
+
await nextTick();
|
|
22
|
+
await new Promise((resolve) => setTimeout(resolve, 20));
|
|
23
|
+
await nextTick();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function rowNames(): string[] {
|
|
27
|
+
return [
|
|
28
|
+
...document.body.querySelectorAll<HTMLElement>(
|
|
29
|
+
".s-theme-menu .s-theme-item-row .s-theme-item-name",
|
|
30
|
+
),
|
|
31
|
+
].map((el) => el.textContent?.trim() ?? "");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function mountPanel(): HTMLElement {
|
|
35
|
+
const container = document.createElement("div");
|
|
36
|
+
document.body.appendChild(container);
|
|
37
|
+
const Host = defineComponent({
|
|
38
|
+
name: "NamesPanelHost",
|
|
39
|
+
setup() {
|
|
40
|
+
return () => h(HkThemePanelContent, { externalCustomize: true });
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const app = createApp(Host);
|
|
44
|
+
app.mount(container);
|
|
45
|
+
mounts.push({ app, container });
|
|
46
|
+
return container;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
afterEach(async () => {
|
|
50
|
+
for (const { app, container } of mounts.splice(0)) {
|
|
51
|
+
app.unmount();
|
|
52
|
+
container.remove();
|
|
53
|
+
}
|
|
54
|
+
// Custom themes live in localStorage — wipe what a test added.
|
|
55
|
+
for (const id of ["names-i18n", "names-keyed"]) {
|
|
56
|
+
useTheme().removeCustomTheme(id);
|
|
57
|
+
}
|
|
58
|
+
await setLocale("en");
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe("HkThemePanelContent theme-name i18n", () => {
|
|
62
|
+
it("shows the per-locale name of a custom theme and follows locale switches", async () => {
|
|
63
|
+
useTheme().addCustomTheme({
|
|
64
|
+
id: "names-i18n",
|
|
65
|
+
name: "Midnight",
|
|
66
|
+
nameI18n: { en: "Midnight", "zh-Hans": "午夜" },
|
|
67
|
+
dark: themePresets.default.dark as ThemeSchemeTokens,
|
|
68
|
+
light: themePresets.default.light as ThemeSchemeTokens,
|
|
69
|
+
});
|
|
70
|
+
await setLocale("en");
|
|
71
|
+
mountPanel();
|
|
72
|
+
await settle();
|
|
73
|
+
expect(rowNames()).toContain("Midnight");
|
|
74
|
+
|
|
75
|
+
await setLocale("zh-Hans");
|
|
76
|
+
await settle();
|
|
77
|
+
expect(rowNames()).toContain("午夜");
|
|
78
|
+
expect(rowNames()).not.toContain("hikari::");
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("localizes the stock default row on a non-English face", async () => {
|
|
82
|
+
// The stock preset's name IS the catalog key (2026-11-25): under
|
|
83
|
+
// zh-Hans the factory row reads 默认, never the bare English word.
|
|
84
|
+
// MUT:hk1562-m3 — reverting stock-preset.json's name field to the
|
|
85
|
+
// literal "Default" turns this case red (`expected [ 'Default' ] to
|
|
86
|
+
// include '默认'`; R3 evidence, PR #1562 — the Rust side of the same
|
|
87
|
+
// lock is pinned by stock_snapshot's byte equality).
|
|
88
|
+
await setLocale("zh-Hans");
|
|
89
|
+
mountPanel();
|
|
90
|
+
await settle();
|
|
91
|
+
const names = rowNames();
|
|
92
|
+
expect(names).toContain("默认");
|
|
93
|
+
expect(names).not.toContain("Default");
|
|
94
|
+
});
|
|
95
|
+
});
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
themePresets,
|
|
11
11
|
useI18n,
|
|
12
12
|
useTheme,
|
|
13
|
+
resolveThemeDisplayNameT,
|
|
13
14
|
type CustomThemePreset,
|
|
14
15
|
type ThemeId,
|
|
15
16
|
type ThemePreset,
|
|
@@ -330,12 +331,18 @@ export const HkThemePanelContent = defineComponent({
|
|
|
330
331
|
const nameSuffixSlot = slots["item-name-suffix"];
|
|
331
332
|
const trailingSlot = slots["item-trailing"];
|
|
332
333
|
// A preset/custom name may be a message key into hikari's own
|
|
333
|
-
// catalog (the documented ThemePreset.name convention —
|
|
334
|
-
//
|
|
335
|
-
//
|
|
336
|
-
//
|
|
337
|
-
//
|
|
338
|
-
|
|
334
|
+
// catalog (the documented ThemePreset.name convention — the
|
|
335
|
+
// stock preset ships "hikari::theme.defaultThemeName"), and a
|
|
336
|
+
// custom theme may carry per-locale translations authored in
|
|
337
|
+
// the scheme editor's localized-name input. Resolution order:
|
|
338
|
+
// the theme's own nameI18n map (family fallbacks), then the
|
|
339
|
+
// keyed/literal name through t() — `t()` falls back to the raw
|
|
340
|
+
// string for anything that is not a key. The reactive message
|
|
341
|
+
// lookup re-renders rows on locale switches.
|
|
342
|
+
const displayName = resolveThemeDisplayNameT(
|
|
343
|
+
th.name,
|
|
344
|
+
scope.preset?.nameI18n,
|
|
345
|
+
);
|
|
339
346
|
const isActive = currentTheme.value === th.id;
|
|
340
347
|
// Default lane anatomy: the host's `itemActions` builder wins;
|
|
341
348
|
// a host that renders `item-trailing` owns the affordance
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
|
|
3
|
+
import { HK_LOCALE_CATALOG } from "./localeCatalog";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Catalog↔bundle parity (the TS mirror of the hikari-i18n crate's
|
|
7
|
+
* `Language::ALL`): every language hikari ships message bundles for must
|
|
8
|
+
* appear in the catalog, and every catalog entry must have a bundle —
|
|
9
|
+
* the same two-directional guard flatKeyParity.test.ts runs for keys.
|
|
10
|
+
* A locale added to `locales/` without a catalog entry is uneditable in
|
|
11
|
+
* every HkLocalizedInput that rides the default catalog; a catalog entry
|
|
12
|
+
* without a bundle offers a language the UI cannot translate into.
|
|
13
|
+
*/
|
|
14
|
+
const modules = import.meta.glob<{ default: Record<string, unknown> }>(
|
|
15
|
+
"./locales/*/*.json",
|
|
16
|
+
{ eager: true },
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const bundledLocales = new Set(
|
|
20
|
+
Object.keys(modules).map((p) => p.match(/\.\/locales\/([^/]+)\//)?.[1] ?? ""),
|
|
21
|
+
);
|
|
22
|
+
const catalogCodes = new Set(HK_LOCALE_CATALOG.map((e) => e.code));
|
|
23
|
+
|
|
24
|
+
describe("hikari locale catalog", () => {
|
|
25
|
+
it("covers every shipped locale bundle", () => {
|
|
26
|
+
const missing = [...bundledLocales].filter((c) => !catalogCodes.has(c));
|
|
27
|
+
expect(missing, "locale bundles missing from HK_LOCALE_CATALOG").toEqual([]);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it("offers no language without a bundle", () => {
|
|
31
|
+
const extra = [...catalogCodes].filter((c) => !bundledLocales.has(c));
|
|
32
|
+
expect(extra, "catalog entries without a message bundle").toEqual([]);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("stays in sync with the documented language set", () => {
|
|
36
|
+
// The exact 11-language set the hikari-i18n crate pins (Language::ALL).
|
|
37
|
+
expect([...catalogCodes].sort()).toEqual(
|
|
38
|
+
["ar", "de", "en", "es", "fr", "ja", "ko", "pt", "ru", "zh-Hans", "zh-Hant"],
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// The hikari locale catalog — the ONE list of languages hikari ships
|
|
2
|
+
// (codes + endonyms), mirrored from the `hikari-i18n` crate's
|
|
3
|
+
// `Language::ALL` / `native_name()` (packages/i18n/src/lib.rs). Consumers
|
|
4
|
+
// feed it to per-language editors (HkLocalizedInput's `localeOptions`
|
|
5
|
+
// default) and to any surface that needs "every language hikari speaks"
|
|
6
|
+
// without owning an app-level i18n config — a static docs site has no
|
|
7
|
+
// such config, and hand-copying the list per host is how catalogs drift.
|
|
8
|
+
//
|
|
9
|
+
// The order and endonyms MUST stay byte-identical with the Rust enum:
|
|
10
|
+
// `localeCatalog.parity.test.ts` pins both directions (every catalog
|
|
11
|
+
// entry has a locale bundle, every locale bundle has a catalog entry),
|
|
12
|
+
// and the Rust-side snapshot pins the enum itself.
|
|
13
|
+
|
|
14
|
+
/** One catalog entry: the locale code (`setLocale` accepts it verbatim)
|
|
15
|
+
* and the language's endonym — its own name for itself, the SAME text a
|
|
16
|
+
* language switcher row shows. */
|
|
17
|
+
export interface HkLocaleCatalogEntry {
|
|
18
|
+
code: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const HK_LOCALE_CATALOG: readonly HkLocaleCatalogEntry[] = [
|
|
23
|
+
{ code: "en", label: "English" },
|
|
24
|
+
{ code: "zh-Hans", label: "简体中文" },
|
|
25
|
+
{ code: "zh-Hant", label: "繁體中文" },
|
|
26
|
+
{ code: "ja", label: "日本語" },
|
|
27
|
+
{ code: "ko", label: "한국어" },
|
|
28
|
+
{ code: "fr", label: "Français" },
|
|
29
|
+
{ code: "de", label: "Deutsch" },
|
|
30
|
+
{ code: "es", label: "Español" },
|
|
31
|
+
{ code: "pt", label: "Português" },
|
|
32
|
+
{ code: "ru", label: "Русский" },
|
|
33
|
+
{ code: "ar", label: "العربية" },
|
|
34
|
+
];
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "فاتح",
|
|
246
246
|
"hikari::theme.save": "حفظ",
|
|
247
247
|
"hikari::theme.themeName": "اسم السمة",
|
|
248
|
+
"hikari::theme.nameTranslations": "ترجمات الاسم",
|
|
248
249
|
"hikari::theme.themes": "السمات",
|
|
249
250
|
"hikari::timePicker.am": "ص",
|
|
250
251
|
"hikari::timePicker.clear": "مسح الوقت",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "Hell",
|
|
246
246
|
"hikari::theme.save": "Speichern",
|
|
247
247
|
"hikari::theme.themeName": "Themenname",
|
|
248
|
+
"hikari::theme.nameTranslations": "Namensübersetzungen",
|
|
248
249
|
"hikari::theme.themes": "Themen",
|
|
249
250
|
"hikari::timePicker.am": "Vorm.",
|
|
250
251
|
"hikari::timePicker.clear": "Uhrzeit löschen",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "Light",
|
|
246
246
|
"hikari::theme.save": "Save",
|
|
247
247
|
"hikari::theme.themeName": "Theme name",
|
|
248
|
+
"hikari::theme.nameTranslations": "Name translations",
|
|
248
249
|
"hikari::theme.themes": "Themes",
|
|
249
250
|
"hikari::timePicker.am": "AM",
|
|
250
251
|
"hikari::timePicker.clear": "Clear time",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "Claro",
|
|
246
246
|
"hikari::theme.save": "Guardar",
|
|
247
247
|
"hikari::theme.themeName": "Nombre del tema",
|
|
248
|
+
"hikari::theme.nameTranslations": "Traducciones del nombre",
|
|
248
249
|
"hikari::theme.themes": "Temas",
|
|
249
250
|
"hikari::timePicker.am": "a. m.",
|
|
250
251
|
"hikari::timePicker.clear": "Borrar hora",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "Clair",
|
|
246
246
|
"hikari::theme.save": "Enregistrer",
|
|
247
247
|
"hikari::theme.themeName": "Nom du thème",
|
|
248
|
+
"hikari::theme.nameTranslations": "Traductions du nom",
|
|
248
249
|
"hikari::theme.themes": "Thèmes",
|
|
249
250
|
"hikari::timePicker.am": "AM",
|
|
250
251
|
"hikari::timePicker.clear": "Effacer l'heure",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "ライト",
|
|
246
246
|
"hikari::theme.save": "保存",
|
|
247
247
|
"hikari::theme.themeName": "テーマ名",
|
|
248
|
+
"hikari::theme.nameTranslations": "名前の翻訳",
|
|
248
249
|
"hikari::theme.themes": "テーマ",
|
|
249
250
|
"hikari::timePicker.am": "午前",
|
|
250
251
|
"hikari::timePicker.clear": "時刻をクリア",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "라이트",
|
|
246
246
|
"hikari::theme.save": "저장",
|
|
247
247
|
"hikari::theme.themeName": "테마 이름",
|
|
248
|
+
"hikari::theme.nameTranslations": "이름 번역",
|
|
248
249
|
"hikari::theme.themes": "테마",
|
|
249
250
|
"hikari::timePicker.am": "오전",
|
|
250
251
|
"hikari::timePicker.clear": "시간 지우기",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "Claro",
|
|
246
246
|
"hikari::theme.save": "Salvar",
|
|
247
247
|
"hikari::theme.themeName": "Nome do tema",
|
|
248
|
+
"hikari::theme.nameTranslations": "Traduções do nome",
|
|
248
249
|
"hikari::theme.themes": "Temas",
|
|
249
250
|
"hikari::timePicker.am": "AM",
|
|
250
251
|
"hikari::timePicker.clear": "Limpar horário",
|
|
@@ -245,6 +245,7 @@
|
|
|
245
245
|
"hikari::theme.modeLight": "Светлая",
|
|
246
246
|
"hikari::theme.save": "Сохранить",
|
|
247
247
|
"hikari::theme.themeName": "Название темы",
|
|
248
|
+
"hikari::theme.nameTranslations": "Переводы названия",
|
|
248
249
|
"hikari::theme.themes": "Темы",
|
|
249
250
|
"hikari::timePicker.am": "ДП",
|
|
250
251
|
"hikari::timePicker.clear": "Очистить время",
|
|
@@ -249,6 +249,7 @@
|
|
|
249
249
|
"hikari::theme.modeLight": "浅色",
|
|
250
250
|
"hikari::theme.save": "保存",
|
|
251
251
|
"hikari::theme.themeName": "主题名称",
|
|
252
|
+
"hikari::theme.nameTranslations": "名称翻译",
|
|
252
253
|
"hikari::theme.themes": "主题",
|
|
253
254
|
"hikari::timePicker.am": "上午",
|
|
254
255
|
"hikari::timePicker.clear": "清除时间",
|
|
@@ -249,6 +249,7 @@
|
|
|
249
249
|
"hikari::theme.modeLight": "淺色",
|
|
250
250
|
"hikari::theme.save": "儲存",
|
|
251
251
|
"hikari::theme.themeName": "主題名稱",
|
|
252
|
+
"hikari::theme.nameTranslations": "名稱翻譯",
|
|
252
253
|
"hikari::theme.themes": "主題",
|
|
253
254
|
"hikari::timePicker.am": "上午",
|
|
254
255
|
"hikari::timePicker.clear": "清除時間",
|
package/src/index.ts
CHANGED
|
@@ -337,9 +337,11 @@ export {
|
|
|
337
337
|
solarManualLocation, setSolarManualLocation, manualLocationOf,
|
|
338
338
|
listTimeZones, systemTimeZoneId,
|
|
339
339
|
initFontContext, applyFontContext, resetFontContext, useFontContext,
|
|
340
|
+
resolveThemeDisplayName, resolveThemeDisplayNameT,
|
|
340
341
|
HIKARI_FONT_SANS, HIKARI_FONT_MONO, HIKARI_FONT_READING,
|
|
341
342
|
type ThemeTokenRGB, type ThemeSchemeTokens, type ThemePreset, type ThemeMode,
|
|
342
343
|
type ThemeId, type ThemeTokens, type CustomThemePreset, type TimePeriod,
|
|
344
|
+
type ThemeNameI18n,
|
|
343
345
|
type GeoLocation, type GeoLocationProvider,
|
|
344
346
|
type SolarLocationStrategy, type SolarHemisphere, type SolarManualLocation,
|
|
345
347
|
type ThemeTokenGroupValues, type ThemeTokenGroupModes, type ThemeTokenValue,
|
|
@@ -541,6 +543,10 @@ export {
|
|
|
541
543
|
activeLocale,
|
|
542
544
|
mergeMessages,
|
|
543
545
|
} from "./i18n/context";
|
|
546
|
+
// The shipped language catalog (codes + endonyms, mirrored from the
|
|
547
|
+
// hikari-i18n crate) — the default `localeOptions` of per-language
|
|
548
|
+
// editors and the list hosts without an app i18n config offer.
|
|
549
|
+
export { HK_LOCALE_CATALOG, type HkLocaleCatalogEntry } from "./i18n/localeCatalog";
|
|
544
550
|
|
|
545
551
|
// ── Generic utils ───────────────────────────────────────────────
|
|
546
552
|
export { fuzzyScore, fuzzyScoreFields, fuzzySearch } from "./utils/fuzzy";
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// button carries it, and a host-invented button style
|
|
19
19
|
// would drift from the app's).
|
|
20
20
|
//
|
|
21
|
-
// scripts/gen-boot-landing-css.
|
|
21
|
+
// scripts/gen-boot-landing-css.ts compiles this file (compressed, ASCII) into
|
|
22
22
|
// src/plugins/bootLandingCss.js, which the generated boot script inlines so
|
|
23
23
|
// the panel needs no second network round-trip. bootLandingCss.test.ts
|
|
24
24
|
// recompiles this entry and fails on drift, so editing the component sheets
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
* `__desc` + `__actions` with an `.hk-btn-primary` action), and its
|
|
40
40
|
* stylesheet is compiled from the LIVE component sheets — theme/channels,
|
|
41
41
|
* theme/scale, `HkErrorLanding.scss` and `HkButton.scss` — into
|
|
42
|
-
* `./bootLandingCss.js` by `scripts/gen-boot-landing-css.
|
|
42
|
+
* `./bootLandingCss.js` by `scripts/gen-boot-landing-css.ts`.
|
|
43
43
|
* `bootLandingCss.test.ts` recompiles that entry and fails whenever the
|
|
44
44
|
* checked-in sheet drifts, so the boot surface cannot fork away from the app's
|
|
45
45
|
* error landing (the pre-0.55.3xx panel hand-rolled `.hk-boot-recovery`
|
|
@@ -1327,7 +1327,7 @@ function htmlFileMatches(filename, htmlFiles) {
|
|
|
1327
1327
|
* classes, and the stylesheet is compiled from the LIVE component sources
|
|
1328
1328
|
* (`boot-landing.scss`: theme/channels + theme/scale + HkErrorLanding +
|
|
1329
1329
|
* HkButton) into `./bootLandingCss.js` by
|
|
1330
|
-
* `scripts/gen-boot-landing-css.
|
|
1330
|
+
* `scripts/gen-boot-landing-css.ts`. `bootLandingCss.test.ts` recompiles
|
|
1331
1331
|
* the entry and fails whenever the checked-in sheet drifts from the
|
|
1332
1332
|
* components, so the boot surface cannot fork away from the app's error
|
|
1333
1333
|
* landing again (the pre-0.55.3xx panel hand-rolled `.hk-boot-recovery`
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Types for `bootLandingCss.js` — the generated boot failure panel sheet
|
|
7
|
-
* (compiled from `boot-landing.scss` by `scripts/gen-boot-landing-css.
|
|
7
|
+
* (compiled from `boot-landing.scss` by `scripts/gen-boot-landing-css.ts`;
|
|
8
8
|
* do not edit the module by hand).
|
|
9
9
|
*/
|
|
10
10
|
export declare const BOOT_LANDING_CSS: string;
|
|
@@ -20,7 +20,7 @@ import { BOOT_LANDING_DETAILS_CSS } from "./bootLandingDetailsCss.js";
|
|
|
20
20
|
* as hikari's in-app error landing. So instead of hand-copying token values
|
|
21
21
|
* (the pre-0.55.3xx `.hk-boot-recovery` card did), the panel ships the LIVE
|
|
22
22
|
* component sheets: `boot-landing.scss` @uses theme/channels, theme/scale,
|
|
23
|
-
* HkErrorLanding and HkButton, and `scripts/gen-boot-landing-css.
|
|
23
|
+
* HkErrorLanding and HkButton, and `scripts/gen-boot-landing-css.ts`
|
|
24
24
|
* compiles that entry into `bootLandingCss.js`, which the plugin inlines.
|
|
25
25
|
*
|
|
26
26
|
* This suite recompiles the entry with the same sass a consumer uses and
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Types for `bootLandingDetailsCss.js` — the generated boot failure panel's
|
|
7
7
|
* DETAILS sheet (compiled from `boot-landing-details.scss` by
|
|
8
|
-
* `scripts/gen-boot-landing-css.
|
|
8
|
+
* `scripts/gen-boot-landing-css.ts`; do not edit the module by hand).
|
|
9
9
|
*
|
|
10
10
|
* A second artifact on purpose: this sheet is inlined into the generated
|
|
11
11
|
* script only when the host opts into the raw-details pane
|