@celestia-island/hikari 0.55.525 → 0.55.526

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/hikari",
3
- "version": "0.55.525",
3
+ "version": "0.55.526",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari UI library, Vue 3 runtime — one design system for Vue 3 and Rust/WASM applications",
@@ -61,7 +61,10 @@ describe("HkAuthHandoff", () => {
61
61
  }),
62
62
  );
63
63
  expect(c.querySelector(".hk-auth-handoff-title")?.textContent).toBe("Bind failed");
64
- expect(c.querySelector(".hk-auth-handoff-description")?.textContent).toBe("Use another account");
64
+ // A failed handoff renders the description through the icon-led alert
65
+ // (the standard error surface), so the description's TEXT rides the
66
+ // alert's message instead of the plain subtitle paragraph.
67
+ expect(c.querySelector(".hk-alert")?.textContent).toContain("Use another account");
65
68
  const logo = c.querySelector<HTMLImageElement>(".hk-auth-handoff-logo");
66
69
  expect(logo?.getAttribute("src")).toBe("/logo.svg");
67
70
  // MUT:handoff-logo-announced (a decorative logo with a non-empty alt
@@ -105,6 +108,37 @@ describe("HkAuthHandoff", () => {
105
108
  expect(titled.querySelector(".hk-auth-handoff-state .hk-badge")?.textContent).toContain("Signed in");
106
109
  });
107
110
 
111
+ it("a failed handoff's body carries the actions and NO stray text", () => {
112
+ // MUT:handoff-leaked-jsx-comment — a bare `//` comment inside the JSX
113
+ // children rendered VERBATIM on every non-transient handoff screen
114
+ // (ayane's login failure card, 2026-12-02 user screenshot). The body's
115
+ // own text content must be exactly the actions' labels; the
116
+ // button-label lookup table is the only prose the body may carry.
117
+ const c = mount(h(HkAuthHandoff, { status: "failed", onRetry: vi.fn(), onBack: vi.fn() }));
118
+ const body = c.querySelector(".hk-auth-handoff-body");
119
+ expect(body).toBeTruthy();
120
+ // One button, no loose text nodes between them.
121
+ const buttons = body!.querySelectorAll("button");
122
+ expect(buttons.length).toBe(1);
123
+ expect(body!.textContent!.trim()).toBe(buttons[0]!.textContent!.trim());
124
+ expect(body!.textContent).not.toContain("With the default title");
125
+ });
126
+
127
+ it("a failed handoff's HEADER carries title + description and no leaked prose", () => {
128
+ // The leak was in the header's description block; the body pin above
129
+ // covers the body — this covers the header's own text.
130
+ const c = mount(
131
+ h(HkAuthHandoff, {
132
+ status: "failed",
133
+ title: "Bind failed",
134
+ description: "Use another account",
135
+ }),
136
+ );
137
+ const header = c.querySelector(".hk-auth-handoff-header");
138
+ expect(header).toBeTruthy();
139
+ expect(header!.textContent!.trim()).toBe("Bind failedUse another account");
140
+ });
141
+
108
142
  it("default actions: back for failed/expired, none otherwise; each emits", async () => {
109
143
  const onRetry = vi.fn();
110
144
  const onBack = vi.fn();
@@ -11,6 +11,7 @@ import {
11
11
  } from "vue";
12
12
 
13
13
  import { useI18n } from "../i18n/context";
14
+ import HkAlert from "./HkAlert";
14
15
  import HkBadge from "./HkBadge";
15
16
  import HkButton from "./HkButton";
16
17
  import { HkAuthScreen } from "./HkAuthScreen";
@@ -179,13 +180,19 @@ export const HkAuthHandoff = defineComponent({
179
180
  ) : null}
180
181
  <h1 class="s-auth-title hk-auth-handoff-title">{title}</h1>
181
182
  {description ? (
182
- <p class="s-auth-subtitle hk-auth-handoff-description">{description}</p>
183
+ failed ? (
184
+ // A failed/expired handoff is an ERROR surface: the
185
+ // description rides the family's icon-led alert
186
+ // (role="alert" below is the semantics; this is the
187
+ // matching visuals).
188
+ <HkAlert variant="error" message={description} />
189
+ ) : (
190
+ <p class="s-auth-subtitle hk-auth-handoff-description">{description}</p>
191
+ )
183
192
  ) : null}
184
193
  </div>
185
194
  <div class="hk-auth-handoff-body">
186
195
  {transient ? <HkSpinner center /> : null}
187
- // With the default title the heading already names the
188
- // state; the badge repeats it only under a host title.
189
196
  {props.status === "success" && props.title ? (
190
197
  <div class="hk-auth-handoff-state">
191
198
  <HkBadge variant="success" size="md">
@@ -1,7 +1,7 @@
1
1
  <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
- <meta name="hk-error-landing" content="v1 0.55.525 <dev>">
4
+ <meta name="hk-error-landing" content="v1 0.55.526 <dev>">
5
5
  <meta charset="utf-8" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
7
  <meta name="robots" content="noindex" />