@celestia-island/hikari 0.55.462 → 0.55.463

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.462",
3
+ "version": "0.55.463",
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",
@@ -1,3 +1,7 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
1
5
  import { afterEach, describe, expect, it, vi } from "vitest";
2
6
  import { createApp, h } from "vue";
3
7
 
@@ -239,6 +243,33 @@ describe("HkSignInCard", () => {
239
243
  expect(c.querySelectorAll(".f-row")).toHaveLength(1);
240
244
  });
241
245
 
246
+ it("carries its own column rhythm at any nesting depth (spacing regression pin)", () => {
247
+ // 2026-11-24 user report: the username field and the submit button
248
+ // sat GLUED together on every HkLoginFlow surface — the stable-shell
249
+ // refactor moved the form inside the inner transition container, so
250
+ // the `.s-auth-form > form` sibling gap no longer reached it. The
251
+ // class travels with the form; the stylesheet pin below keeps the
252
+ // rule that grants it.
253
+ // MUT:r-spacing-class-drop (removing the class from credentialBody's
254
+ // form, or the `.s-auth-credentials` arm from the rule, leaves the
255
+ // bare-fragment form gap-less — both halves redden).
256
+ const bare = mount(
257
+ h(HkSignInCard, { bare: true }, { footer: () => h("div", "f") }),
258
+ );
259
+ const bareForm = bare.querySelector("form")!;
260
+ expect(bareForm.classList.contains("s-auth-credentials")).toBe(true);
261
+ const shell = mount(h(HkSignInCard, { title: "T" }));
262
+ expect(
263
+ shell.querySelector("form")!.classList.contains("s-auth-credentials"),
264
+ ).toBe(true);
265
+
266
+ const here = dirname(fileURLToPath(import.meta.url));
267
+ const scss = readFileSync(join(here, "../styles/admin-tokens.scss"), "utf-8");
268
+ const rule = scss.match(/\.s-auth-form > form,\s*\.s-auth-form > \*,\s*\.s-auth-credentials\s*{[^}]*}/)?.[0] ?? "";
269
+ expect(rule, "the credentials rhythm rule must keep its class arm").toBeTruthy();
270
+ expect(rule).toContain("gap: var(--space-16, 1rem)");
271
+ });
272
+
242
273
  it("renders no footer wrapper at all when no footer slot was passed (dead-space guard)", () => {
243
274
  // The footer half of the methods dead-space rule, made symmetric
244
275
  // after R4 caught the unconditional forwarding: a methods-less,
@@ -127,7 +127,10 @@ export const HkSignInCard = defineComponent({
127
127
  * host-owned shell. */
128
128
  const credentialBody = (withBlocks: boolean) => (
129
129
  <>
130
- <form onSubmit={(e: Event) => { e.preventDefault(); attemptSubmit(); }}>
130
+ <form
131
+ class="s-auth-credentials"
132
+ onSubmit={(e: Event) => { e.preventDefault(); attemptSubmit(); }}
133
+ >
131
134
  <HkInput
132
135
  modelValue={username.value}
133
136
  onUpdate:modelValue={(v: string) => (username.value = v)}
@@ -1243,8 +1243,17 @@
1243
1243
  gap: var(--space-16, 1rem);
1244
1244
  }
1245
1245
 
1246
+ /* The form column rhythm (2026-11-24 user report: the username field
1247
+ and the submit button sat GLUED together on every HkLoginFlow
1248
+ surface). The `.s-auth-credentials` arm is the load-bearing one:
1249
+ since the stable-shell refactor the form renders inside the inner
1250
+ transition container (`.hk-login-flow-body > … > .hk-crossfade-item
1251
+ > form`), so the sibling arms no longer reach it — the class
1252
+ travels with the form at ANY nesting depth, standalone card and
1253
+ bare fragment alike. */
1246
1254
  .s-auth-form > form,
1247
- .s-auth-form > * {
1255
+ .s-auth-form > *,
1256
+ .s-auth-credentials {
1248
1257
  display: flex;
1249
1258
  flex-direction: column;
1250
1259
  gap: var(--space-16, 1rem);