@celestia-island/hikari 0.50.4 → 0.51.2

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.50.4",
3
+ "version": "0.51.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari Vue 3 component library — production-grade UI components based on shittim-chest design system",
@@ -31,7 +31,7 @@
31
31
  // handle hasn't resolved yet — zIndex briefly starts at 0).
32
32
  z-index: 0;
33
33
  background: var(--hk-modal-overlay-bg, rgba(0, 0, 0, 0.45));
34
- backdrop-filter: var(--hk-modal-overlay-blur, blur(6px));
34
+ backdrop-filter: var(--hk-modal-overlay-blur, blur(3px));
35
35
  pointer-events: auto;
36
36
  }
37
37
 
@@ -40,10 +40,10 @@
40
40
  // viewport in place, never sliding or scaling with the content frame.
41
41
  @include sf.scrim-fade(
42
42
  "hk-modal-overlay",
43
- $enter-duration: var(--hk-modal-duration, 0.3s),
44
- $enter-ease: var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
45
- $leave-duration: var(--hk-modal-duration, 0.3s),
46
- $leave-ease: var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1))
43
+ $enter-duration: var(--hk-modal-duration, 0.42s),
44
+ $enter-ease: var(--hk-modal-ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
45
+ $leave-duration: var(--hk-modal-duration, 0.42s),
46
+ $leave-ease: var(--hk-modal-ease-in, cubic-bezier(0.45, 0, 0.55, 1))
47
47
  );
48
48
 
49
49
  // ------
@@ -72,7 +72,7 @@
72
72
  height var(--duration-fast, 0.15s) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1)),
73
73
  max-height var(--duration-fast, 0.15s) var(--ease-standard, cubic-bezier(0.4, 0, 0.2, 1));
74
74
  background: var(--hk-modal-bg, var(--hi-color-surface, rgba(240,244,248,0.95)));
75
- backdrop-filter: var(--hk-modal-blur, blur(12px));
75
+ backdrop-filter: var(--hk-modal-blur, none);
76
76
  border: 1px solid var(--hk-modal-border-color, var(--hi-color-border, rgba(100,100,100,0.08)));
77
77
  border-radius: var(--hk-modal-radius, var(--radius-lg, 12px));
78
78
  box-shadow:
@@ -109,12 +109,12 @@
109
109
  @media (min-width: 768px) {
110
110
  .hk-modal-content-enter-active {
111
111
  transition:
112
- opacity var(--hk-modal-duration, 0.3s)
113
- var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
114
- transform var(--hk-modal-duration, 0.3s)
115
- var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
116
- clip-path var(--hk-modal-duration, 0.3s)
117
- var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
112
+ opacity var(--hk-modal-duration, 0.42s)
113
+ var(--hk-modal-ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
114
+ transform var(--hk-modal-duration, 0.42s)
115
+ var(--hk-modal-ease-out, cubic-bezier(0.33, 1, 0.68, 1)),
116
+ clip-path var(--hk-modal-duration, 0.42s)
117
+ var(--hk-modal-ease-out, cubic-bezier(0.33, 1, 0.68, 1));
118
118
  will-change: transform, opacity, clip-path;
119
119
  }
120
120
 
@@ -125,16 +125,11 @@
125
125
  // (user report 2026-09-14).
126
126
  .hk-modal-content-leave-active {
127
127
  transition:
128
- opacity var(--hk-modal-duration, 0.25s)
129
- var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1)),
130
- transform var(--hk-modal-duration, 0.25s)
131
- var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1));
128
+ opacity var(--hk-modal-duration, 0.32s)
129
+ var(--hk-modal-ease-in, cubic-bezier(0.45, 0, 0.55, 1)),
130
+ transform var(--hk-modal-duration, 0.32s)
131
+ var(--hk-modal-ease-in, cubic-bezier(0.45, 0, 0.55, 1));
132
132
  will-change: transform, opacity;
133
- // Collapse toward the frame's own top edge: the height shrink reads as
134
- // the box folding upward (the unveil's reverse), not as a centered
135
- // shrink — and the top-of-content (header) keeps its anchor while the
136
- // rest eases down and out with the fade.
137
- transform-origin: 50% 0;
138
133
  }
139
134
 
140
135
  .hk-modal-content-enter-from {
@@ -153,12 +148,12 @@
153
148
 
154
149
  .hk-modal-content-leave-from {
155
150
  opacity: 1;
156
- transform: translate(-50%, -50%) scaleY(1);
151
+ transform: translate(-50%, -50%);
157
152
  }
158
153
 
159
154
  .hk-modal-content-leave-to {
160
155
  opacity: 0;
161
- transform: translate(-50%, -50%) scaleY(0.9);
156
+ transform: translate(-50%, -50%) translateY(5%);
162
157
  }
163
158
  }
164
159
 
@@ -445,17 +440,17 @@
445
440
  // Sheet slide reveal replaces the height-clip reveal on mobile.
446
441
  .hk-modal-content-enter-active {
447
442
  transition:
448
- opacity var(--hk-modal-duration, 0.3s) ease-out,
449
- transform var(--hk-modal-duration, 0.3s)
450
- var(--hk-modal-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
443
+ opacity var(--hk-modal-duration, 0.42s) ease-out,
444
+ transform var(--hk-modal-duration, 0.42s)
445
+ var(--hk-modal-ease-out, cubic-bezier(0.33, 1, 0.68, 1));
451
446
  will-change: transform, opacity;
452
447
  }
453
448
 
454
449
  .hk-modal-content-leave-active {
455
450
  transition:
456
- opacity var(--hk-modal-duration, 0.25s) ease-in,
457
- transform var(--hk-modal-duration, 0.25s)
458
- var(--hk-modal-ease-in, cubic-bezier(0.4, 0, 1, 1));
451
+ opacity var(--hk-modal-duration, 0.32s) ease-in,
452
+ transform var(--hk-modal-duration, 0.32s)
453
+ var(--hk-modal-ease-in, cubic-bezier(0.45, 0, 0.55, 1));
459
454
  will-change: transform, opacity;
460
455
  }
461
456
 
@@ -474,13 +469,8 @@
474
469
  padding: 0.625rem 1rem 0.625rem;
475
470
  }
476
471
 
477
- // The gutter contract retunes here too — the covers and the inner's
478
- // padding both consume the vars, so one override moves both.
479
- .hk-modal-body {
480
- --hk-scroll-pad-top: 1rem;
481
- --hk-scroll-pad-right: 1rem;
482
- --hk-scroll-pad-bottom: 1rem;
483
- --hk-scroll-pad-left: 1rem;
472
+ .hk-modal-body-inner {
473
+ padding: 1rem;
484
474
  }
485
475
 
486
476
  // Lift the desktop 70vh body cap on phones: with a docked sheet the cap
@@ -491,6 +481,13 @@
491
481
  // scrolls, and the footer always sits on the sheet's bottom edge.
492
482
  .hk-modal-body {
493
483
  max-height: none;
484
+
485
+ // The gutter contract retunes here too — the covers and the inner's
486
+ // padding both consume the vars, so one override moves both.
487
+ --hk-scroll-pad-top: 1rem;
488
+ --hk-scroll-pad-right: 1rem;
489
+ --hk-scroll-pad-bottom: 1rem;
490
+ --hk-scroll-pad-left: 1rem;
494
491
  }
495
492
 
496
493
  .hk-modal-footer {
@@ -21,6 +21,7 @@
21
21
  // import them granularly only for legacy compositions. The previous
22
22
  // version of this file re-exported packages/theme + packages/components
23
23
  // through paths that escape the npm package and did not compile.
24
+ @use "./reset.scss";
24
25
  @use "./theme/channels.scss";
25
26
  @use "./theme/scale.scss";
26
27
  @use "./admin-tokens.scss";
@@ -0,0 +1,60 @@
1
+ /* ── Host reset (L2) ────────────────────────────────────────────────────
2
+ * The base normalization every hikari host needs and none of them should
3
+ * have to hand-roll. Component sheets self-declare their critical box
4
+ * geometry (`.hk-input-element`'s border-box, borders, appearance), but
5
+ * the wrappers and the native controls they contain still inherit the
6
+ * UA's default typography chain — measured 2026-09-14 in the flasher on
7
+ * hikari 0.49: without a host reset the sign-in fields render ~100px
8
+ * (min-height 2.5rem plus UA line-height/font inflation of the in-flow
9
+ * content), with one exactly ~40px. The chest webui historically rode
10
+ * UnoCSS with preflight planned around it; hosts without a utility
11
+ * layer had nothing. This sheet is that nothing: preflight-equivalent,
12
+ * token-aware, and part of the canonical composition (index.scss).
13
+ *
14
+ * Order: FIRST in the composition. It only ever lowers UA defaults;
15
+ * component sheets and host styles override it by specificity/order. */
16
+
17
+ *,
18
+ *::before,
19
+ *::after {
20
+ box-sizing: border-box;
21
+ border-width: 0;
22
+ border-style: solid;
23
+ border-color: rgb(var(--color-border, 120 120 120) / 40%);
24
+ }
25
+
26
+ html {
27
+ line-height: 1.5;
28
+ }
29
+
30
+ body {
31
+ margin: 0;
32
+ font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif);
33
+ }
34
+
35
+ button,
36
+ input,
37
+ optgroup,
38
+ select,
39
+ textarea {
40
+ margin: 0;
41
+ padding: 0;
42
+ font: inherit;
43
+ line-height: inherit;
44
+ color: inherit;
45
+ background: none;
46
+ }
47
+
48
+ button,
49
+ [type='button'],
50
+ [type='reset'],
51
+ [type='submit'] {
52
+ cursor: pointer;
53
+ }
54
+
55
+ img,
56
+ svg,
57
+ canvas {
58
+ display: block;
59
+ max-width: 100%;
60
+ }
@@ -0,0 +1,43 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ import { describe, expect, it } from "vitest";
6
+
7
+ /**
8
+ * Host-reset composition guard.
9
+ *
10
+ * reset.scss is the base normalization every hikari host needs (measured
11
+ * 2026-09-14 in the flasher: without it the UA typography chain inflates
12
+ * the component wrappers — sign-in fields ~100px vs ~40px with it). Hosts
13
+ * that historically rode a utility-layer preflight (chest: UnoCSS, with
14
+ * preflight later disabled) no longer need a hand-rolled equivalent.
15
+ *
16
+ * The contract under test: the canonical composition (index.scss) loads
17
+ * the reset FIRST, and the reset actually normalizes the native control
18
+ * typography chain — the exact rules the flasher regression hinged on.
19
+ */
20
+
21
+ const stylesDir = resolve(dirname(fileURLToPath(import.meta.url)));
22
+
23
+ function read(path: string): string {
24
+ return readFileSync(resolve(stylesDir, path), "utf8").replace(/\r\n/g, "\n");
25
+ }
26
+
27
+ describe("host reset sheet", () => {
28
+ it("loads first in the canonical composition", () => {
29
+ const index = read("index.scss");
30
+ const first = index.match(/^@use "([^"]+)";/m)?.[1];
31
+ expect(first).toBe("./reset.scss");
32
+ });
33
+
34
+ it("normalizes the native control typography chain", () => {
35
+ const reset = read("reset.scss");
36
+ for (const selector of ["button,", "input,", "textarea"]) {
37
+ expect(reset).toContain(selector);
38
+ }
39
+ expect(reset).toContain("font: inherit");
40
+ expect(reset).toContain("line-height: inherit");
41
+ expect(reset).toContain("box-sizing: border-box");
42
+ });
43
+ });