@celestia-island/hikari 0.55.369 → 0.55.371
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 +4 -3
- package/src/animation/registerAnimations.ts +6 -0
- package/src/components/HkEmergencyAlert.layering.contract.test.ts +160 -0
- package/src/components/HkEmergencyAlert.scss +298 -0
- package/src/components/HkEmergencyAlert.test.tsx +249 -0
- package/src/components/HkEmergencyAlert.tsx +232 -0
- package/src/i18n/locales/ar/components.json +5 -1
- package/src/i18n/locales/de/components.json +5 -1
- package/src/i18n/locales/en/components.json +5 -1
- package/src/i18n/locales/es/components.json +5 -1
- package/src/i18n/locales/fr/components.json +5 -1
- package/src/i18n/locales/ja/components.json +5 -1
- package/src/i18n/locales/ko/components.json +5 -1
- package/src/i18n/locales/pt/components.json +5 -1
- package/src/i18n/locales/ru/components.json +5 -1
- package/src/i18n/locales/zh-Hans/components.json +5 -1
- package/src/i18n/locales/zh-Hant/components.json +5 -1
- package/src/i18n/usageSurface.test.ts +6 -0
- package/src/index.ts +12 -0
- package/src/mermaid/index.ts +1 -0
- package/src/mermaid/wasmEngine.test.ts +36 -0
- package/src/mermaid/wasmEngine.ts +43 -0
- package/src/overlay/hudRoot.ts +1 -0
- package/src/overlay/overlayRoot.styles.test.ts +19 -0
- package/src/overlay/overlayRoot.ts +1 -1
- package/src/plugins/boot-recovery.details.test.ts +1 -1
- package/src/plugins/boot-recovery.diagnostics.test.ts +1 -1
- package/src/plugins/boot-recovery.locales.test.ts +1 -1
- package/src/plugins/bootLandingCss.js +1 -1
- package/src/runtime/index.ts +1 -0
- package/src/runtime/useEmergencyAlert.test.ts +121 -0
- package/src/runtime/useEmergencyAlert.ts +219 -0
- package/src/scale.scss +8 -1
- package/src/scene3d/holographicFleetSpec.ts +5 -1
- package/src/scene3d/wasmFleetSpec.ts +61 -0
- package/src/styles/theme/scale.scss +8 -1
- package/src/utils/qr/qrEncoder.test.ts +1 -0
- package/src/utils/qr/qrEncoder.ts +24 -16
- package/src/wasm/mermaid/hikari_wasm_mermaid.d.ts +21 -0
- package/src/wasm/mermaid/hikari_wasm_mermaid.js +6144 -0
- package/src/wasm/mermaid/interfaces/hikari-mermaid-types.d.ts +4 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-environment.d.ts +2 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-exit.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-stderr.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-stdin.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-stdout.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-terminal-input.d.ts +8 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-terminal-output.d.ts +8 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-terminal-stderr.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-terminal-stdin.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-cli-terminal-stdout.d.ts +3 -0
- package/src/wasm/mermaid/interfaces/wasi-clocks-monotonic-clock.d.ts +4 -0
- package/src/wasm/mermaid/interfaces/wasi-io-error.d.ts +8 -0
- package/src/wasm/mermaid/interfaces/wasi-io-poll.d.ts +10 -0
- package/src/wasm/mermaid/interfaces/wasi-io-streams.d.ts +38 -0
- package/src/wasm/mermaid/interfaces/wasi-random-insecure-seed.d.ts +2 -0
- package/src/wasm/qr/hikari_wasm_qr.d.ts +27 -0
- package/src/wasm/qr/hikari_wasm_qr.js +6173 -0
- package/src/wasm/qr/interfaces/hikari-qr-types.d.ts +24 -0
- package/src/wasm/qr/interfaces/wasi-cli-environment.d.ts +2 -0
- package/src/wasm/qr/interfaces/wasi-cli-exit.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-cli-stderr.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-cli-stdin.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-cli-stdout.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-cli-terminal-input.d.ts +8 -0
- package/src/wasm/qr/interfaces/wasi-cli-terminal-output.d.ts +8 -0
- package/src/wasm/qr/interfaces/wasi-cli-terminal-stderr.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-cli-terminal-stdin.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-cli-terminal-stdout.d.ts +3 -0
- package/src/wasm/qr/interfaces/wasi-clocks-monotonic-clock.d.ts +4 -0
- package/src/wasm/qr/interfaces/wasi-io-error.d.ts +8 -0
- package/src/wasm/qr/interfaces/wasi-io-poll.d.ts +10 -0
- package/src/wasm/qr/interfaces/wasi-io-streams.d.ts +38 -0
- package/src/wasm/scene3d/hikari_wasm_scene3d.d.ts +22 -0
- package/src/wasm/scene3d/hikari_wasm_scene3d.js +6403 -0
- package/src/wasm/scene3d/interfaces/hikari-scene3d-types.d.ts +33 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-environment.d.ts +2 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-exit.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-stderr.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-stdin.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-stdout.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-terminal-input.d.ts +8 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-terminal-output.d.ts +8 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-terminal-stderr.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-terminal-stdin.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-cli-terminal-stdout.d.ts +3 -0
- package/src/wasm/scene3d/interfaces/wasi-clocks-monotonic-clock.d.ts +4 -0
- package/src/wasm/scene3d/interfaces/wasi-io-error.d.ts +8 -0
- package/src/wasm/scene3d/interfaces/wasi-io-poll.d.ts +10 -0
- package/src/wasm/scene3d/interfaces/wasi-io-streams.d.ts +38 -0
- package/src/wasm/scene3d/interfaces/wasi-random-insecure-seed.d.ts +2 -0
- package/src/utils/qr/qrcode-generator.d.ts +0 -19
- package/src/utils/qr/qrcode-generator.js +0 -2289
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celestia-island/hikari",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.371",
|
|
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",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@types/three": "^0.185",
|
|
74
|
+
"pinia": "^3",
|
|
74
75
|
"three": "^0.185",
|
|
75
|
-
"vue": "^3"
|
|
76
|
-
"pinia": "^3"
|
|
76
|
+
"vue": "^3"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@celestia-island/tairitsu-transport": "^0.2",
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"marked": "^18"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
+
"@bytecodealliance/preview2-shim": "^0.31",
|
|
89
90
|
"@types/node": "^*",
|
|
90
91
|
"@types/three": "^0.185",
|
|
91
92
|
"@vitejs/plugin-vue": "^*",
|
|
@@ -151,3 +151,9 @@ registerCssAnimation("hk-badge-dot-pulse", { infinite: true });
|
|
|
151
151
|
// Reduced motion keeps the band and drops the loop (house pattern, see
|
|
152
152
|
// HkSkeleton); the global CSS-animation switch pauses it as usual.
|
|
153
153
|
registerCssAnimation("hk-edge-glow-breathe", { infinite: true });
|
|
154
|
+
// components/HkEmergencyAlert.scss — the takeover band's steady-state
|
|
155
|
+
// life signs: the tone badge breathe and the hairline edge signal pulse
|
|
156
|
+
// (both loop forever while the alert stands). Reduced motion keeps the
|
|
157
|
+
// band and drops the loops (house pattern, see HkSkeleton).
|
|
158
|
+
registerCssAnimation("hk-emergency-breathe", { infinite: true });
|
|
159
|
+
registerCssAnimation("hk-emergency-signal", { infinite: true });
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source contract: the emergency takeover is a document-space top
|
|
3
|
+
* owner with TWO legs (the same contract HkModal rides, pinned by
|
|
4
|
+
* chromeBand.contract tests on the chest side):
|
|
5
|
+
*
|
|
6
|
+
* 1. z leg — `var(--hk-z-emergency, 96000)` sits above the error
|
|
7
|
+
* landing (95000) and strictly below the window titlebar
|
|
8
|
+
* (100001): the band demands attention but must NEVER cover the
|
|
9
|
+
* titlebar (user direction 2026-11-13).
|
|
10
|
+
* 2. geometry leg — the layer insets below the host chrome band via
|
|
11
|
+
* `var(--hk-chrome-band-inset, 0px)` so a native shell's titlebar
|
|
12
|
+
* strip stays visible, draggable and clickable.
|
|
13
|
+
*
|
|
14
|
+
* Plus the width and blocking doctrines: the band spans edge to edge
|
|
15
|
+
* (no viewport gutter — user direction 2026-11-13) and the layer
|
|
16
|
+
* itself is pointer-transparent (only the band intercepts), so the
|
|
17
|
+
* emergency never blocks work happening underneath.
|
|
18
|
+
*/
|
|
19
|
+
import { describe, expect, it } from "vitest";
|
|
20
|
+
import { readFileSync } from "node:fs";
|
|
21
|
+
import { dirname, join } from "node:path";
|
|
22
|
+
import { fileURLToPath } from "node:url";
|
|
23
|
+
|
|
24
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
25
|
+
|
|
26
|
+
function sheet(): string {
|
|
27
|
+
const raw = readFileSync(join(here, "HkEmergencyAlert.scss"), "utf-8");
|
|
28
|
+
// Comments are stripped before ANY assertion (the registerAnimations
|
|
29
|
+
// parity convention): a commented-out declaration is not a
|
|
30
|
+
// declaration. Block comments first (a leftover `/* scrim */` fed
|
|
31
|
+
// the dark-ink pin — R4), then // comments ANYWHERE on a line —
|
|
32
|
+
// trailing `position: relative; // --hk-emergency-scrim: …` fed the
|
|
33
|
+
// pins with the real declaration gone (R7). The whitespace anchor
|
|
34
|
+
// keeps `https://` inside a value alive.
|
|
35
|
+
return raw
|
|
36
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
37
|
+
.replace(/(^|\s)\/\/.*$/gm, "$1");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** EVERY `.hk-emergency { … }` root rule, brace-balanced (each may
|
|
41
|
+
* nest the webkit scrollbar rule). Assertions about the LAYER must
|
|
42
|
+
* bind to these blocks — the band's pseudo-elements carry their own
|
|
43
|
+
* `pointer-events: none` lines (R3 M6), and a SECOND root block later
|
|
44
|
+
* in the sheet silently overrides the first (R7's white-scrim append),
|
|
45
|
+
* so the tests below also require the collection to hold exactly one.
|
|
46
|
+
* Comment-blindness is handled upstream in sheet(); braces inside
|
|
47
|
+
* comments are gone before the walk runs. */
|
|
48
|
+
function rootBlocks(css: string): string[] {
|
|
49
|
+
const marker = ".hk-emergency {";
|
|
50
|
+
const blocks: string[] = [];
|
|
51
|
+
let from = 0;
|
|
52
|
+
for (;;) {
|
|
53
|
+
const start = css.indexOf(marker, from);
|
|
54
|
+
if (start < 0) break;
|
|
55
|
+
let depth = 0;
|
|
56
|
+
let end = -1;
|
|
57
|
+
for (let i = start; i < css.length; i++) {
|
|
58
|
+
if (css[i] === "{") depth++;
|
|
59
|
+
else if (css[i] === "}") {
|
|
60
|
+
depth--;
|
|
61
|
+
if (depth === 0) {
|
|
62
|
+
end = i + 1;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (end < 0) throw new Error("unbalanced braces in a .hk-emergency root rule");
|
|
68
|
+
blocks.push(css.slice(start, end));
|
|
69
|
+
from = end;
|
|
70
|
+
}
|
|
71
|
+
return blocks;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** The single root rule, or a thrown failure naming the drift. */
|
|
75
|
+
function rootBlock(css: string): string {
|
|
76
|
+
const blocks = rootBlocks(css);
|
|
77
|
+
if (blocks.length !== 1) {
|
|
78
|
+
throw new Error(`expected exactly one .hk-emergency root rule, found ${blocks.length}`);
|
|
79
|
+
}
|
|
80
|
+
return blocks[0];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
describe("emergency alert layering contract", () => {
|
|
84
|
+
it("pins the document-space z band between error landing and titlebar", () => {
|
|
85
|
+
const css = sheet();
|
|
86
|
+
expect(css).toContain("z-index: var(--hk-z-emergency, 96000);");
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("pins the chrome-band geometry leg on the top edge", () => {
|
|
90
|
+
const css = sheet();
|
|
91
|
+
expect(css).toContain("inset: var(--hk-chrome-band-inset, 0px) 0 0 0;");
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it("the band spans the full width — no viewport gutter on it", () => {
|
|
95
|
+
const css = sheet();
|
|
96
|
+
// The band (not the reading column) is width:100%…
|
|
97
|
+
expect(css).toContain("width: 100%;");
|
|
98
|
+
// …and the sheet never insets the band from the screen edges.
|
|
99
|
+
expect(css).not.toMatch(/inset-inline-(start|end):\s*var\(--viewport-gutter/);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("the layer is pointer-transparent; only the band is interactive", () => {
|
|
103
|
+
const css = sheet();
|
|
104
|
+
// Root rule: transparent (the scrim never blocks work) — bound to
|
|
105
|
+
// the ROOT block because the band pseudo-elements also carry
|
|
106
|
+
// pointer-events:none lines that would mask its deletion (M6).
|
|
107
|
+
expect(rootBlock(css)).toContain("pointer-events: none;");
|
|
108
|
+
expect(rootBlock(css)).not.toContain("pointer-events: auto;");
|
|
109
|
+
// …and exactly ONE rule in the whole sheet opts back in — the band.
|
|
110
|
+
expect(css.match(/pointer-events:\s*auto;/g)?.length).toBe(1);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("the scrim stays dark ink — never a mode-inverting background token", () => {
|
|
114
|
+
// 0.55.370 pointed the scrim at --color-background: a WHITE veil in
|
|
115
|
+
// light themes, so the page never darkened and the takeover read
|
|
116
|
+
// as a pastel banner (2026-11-14 field report). Darkening is what
|
|
117
|
+
// a scrim does, in every mode — pin the ink and ban the inversion
|
|
118
|
+
// vector outright (R3 M1 replayed the bug with every test green).
|
|
119
|
+
const css = sheet();
|
|
120
|
+
// A second root block would silently override the first (R7).
|
|
121
|
+
expect(rootBlocks(css)).toHaveLength(1);
|
|
122
|
+
const root = rootBlock(css);
|
|
123
|
+
expect(root).not.toContain("var(--color-background");
|
|
124
|
+
// Dark-ink DIRECTION, not a literal: every RGB channel must be
|
|
125
|
+
// dark (<60) and the veil substantial (alpha >= 40%). A future
|
|
126
|
+
// retune (55%→52%, 9 11 16→12 14 20) passes; a light recolor
|
|
127
|
+
// (200 210 220) fails on semantics, not on mismatched text.
|
|
128
|
+
// EXACTLY ONE declaration per property, counted by NAME in any
|
|
129
|
+
// value form: a later duplicate wins the cascade silently, so a
|
|
130
|
+
// first-match-is-dark pin let `white` / var() forms slip past
|
|
131
|
+
// (R5's rgb probe; R6's white/var probes). Counting the name also
|
|
132
|
+
// guards the wash the same way (R6: an old tone-form wash could be
|
|
133
|
+
// appended under a correct color-mix line).
|
|
134
|
+
expect(root.match(/--hk-emergency-scrim\s*:/g)?.length, "exactly one --hk-emergency-scrim declaration").toBe(1);
|
|
135
|
+
// The one declaration must be a LITERAL dark rgb ink (darkening is
|
|
136
|
+
// mode-independent; symbolic or token forms may invert in light
|
|
137
|
+
// themes — the 0.55.370 bug).
|
|
138
|
+
const scrim = root.match(/--hk-emergency-scrim:\s*rgb\(\s*(\d+)\s+(\d+)\s+(\d+)\s*\/\s*(\d+)%\s*\);/);
|
|
139
|
+
expect(scrim, "the scrim must be a literal rgb(…) dark ink").not.toBeNull();
|
|
140
|
+
const [, r, g, b, a] = scrim!.map(Number) as unknown as number[];
|
|
141
|
+
expect(Math.max(r, g, b)).toBeLessThan(60);
|
|
142
|
+
expect(a).toBeGreaterThanOrEqual(40);
|
|
143
|
+
// Wash: exactly one, and it derives from the LINE (the theme's
|
|
144
|
+
// authoritative signal color) — R2's derivation-mismatch finding.
|
|
145
|
+
expect(root.match(/--hk-emergency-wash\s*:/g)?.length, "exactly one --hk-emergency-wash declaration").toBe(1);
|
|
146
|
+
expect(root).toMatch(/--hk-emergency-wash:\s*color-mix\(in srgb, var\(--hk-emergency-line\)/);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it("long content stays reachable: the layer scrolls and the band safe-centers", () => {
|
|
150
|
+
// A fixed full-height layer never grows the document, so clipped
|
|
151
|
+
// content would strand the actions forever (R2 finding 5). The
|
|
152
|
+
// layer must scroll, and the band must center via margin-block
|
|
153
|
+
// (align-items:center on the LAYER clips both ends with no way
|
|
154
|
+
// back; the icon/actions rows may still center their own content).
|
|
155
|
+
const css = sheet();
|
|
156
|
+
expect(css).toContain("overflow-y: auto;");
|
|
157
|
+
expect(css).toContain("margin-block: auto;");
|
|
158
|
+
expect(css).not.toMatch(/\.hk-emergency\s*\{[^}]*align-items\s*:/s);
|
|
159
|
+
});
|
|
160
|
+
});
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
// HkEmergencyAlert — the toast family's full-screen takeover member.
|
|
2
|
+
//
|
|
3
|
+
// Token strategy: severity colors read the host's RGB-triplet theme
|
|
4
|
+
// channels (--color-error / --color-warning) with neutral fallbacks,
|
|
5
|
+
// mirroring HkErrorLanding so the band renders correctly standalone
|
|
6
|
+
// and adapts to host themes. Themes customize through the exposed
|
|
7
|
+
// --hk-emergency-* variable family (line / wash / band / scrim) —
|
|
8
|
+
// geometry (full-width band, circle badge, inset, z) is component
|
|
9
|
+
// owned and never theme-overridable.
|
|
10
|
+
|
|
11
|
+
@use "../styles/polyfill" as *;
|
|
12
|
+
|
|
13
|
+
.hk-emergency {
|
|
14
|
+
// Severity defaults; a theme re-points these per band state. The
|
|
15
|
+
// LINE is the theme's authoritative signal color: line-soft /
|
|
16
|
+
// edge-glow / wash all derive from it through color-mix, so a
|
|
17
|
+
// re-point (endfield's hazard yellow) carries soft edges, glow AND
|
|
18
|
+
// wash with it — no mismatched token pair. --hk-emergency-tone
|
|
19
|
+
// stays the ICON's ink (deliberately tied to the HkErrorLanding
|
|
20
|
+
// recipe's token colors).
|
|
21
|
+
--hk-emergency-tone: rgb(var(--color-error, 226 84 84));
|
|
22
|
+
--hk-emergency-line: var(--hk-emergency-tone);
|
|
23
|
+
--hk-emergency-line-soft: color-mix(in srgb, var(--hk-emergency-line) 55%, transparent);
|
|
24
|
+
--hk-emergency-edge-glow: color-mix(in srgb, var(--hk-emergency-line) 22%, transparent);
|
|
25
|
+
--hk-emergency-wash: color-mix(in srgb, var(--hk-emergency-line) 14%, transparent);
|
|
26
|
+
--hk-emergency-band-bg: rgb(var(--color-surface, 24 26 32) / 96%);
|
|
27
|
+
// The scrim is DARK INK ON PURPOSE — theme-independent. Pointing it
|
|
28
|
+
// at --color-background (the 0.55.370 default) makes it a WHITE veil
|
|
29
|
+
// in light themes: the page never darkens, and the takeover reads as
|
|
30
|
+
// a pastel banner on plain paper (2026-11-14 field report). A scrim
|
|
31
|
+
// darkens what is behind it; that is mode-independent.
|
|
32
|
+
--hk-emergency-scrim: rgb(9 11 16 / 55%);
|
|
33
|
+
|
|
34
|
+
position: fixed;
|
|
35
|
+
// Chrome-band leg: in native hosts the window titlebar owns the top
|
|
36
|
+
// strip (--hk-chrome-band-inset, e.g. the 3rem header); the layer
|
|
37
|
+
// starts BELOW it so the bar stays visible and draggable. Browser
|
|
38
|
+
// hosts leave the var unset → 0px → true full-screen.
|
|
39
|
+
inset: var(--hk-chrome-band-inset, 0px) 0 0 0;
|
|
40
|
+
// Document-space z band (scale.scss): above error landing (95000),
|
|
41
|
+
// strictly below the window titlebar (100001) — the alert never
|
|
42
|
+
// covers the titlebar (user direction 2026-11-13).
|
|
43
|
+
z-index: var(--hk-z-emergency, 96000);
|
|
44
|
+
display: flex;
|
|
45
|
+
// Safe centering: the band centers through margin-block:auto (below)
|
|
46
|
+
// instead of a flex align rule — when long content (wrapped actions,
|
|
47
|
+
// tall description) outgrows the viewport the same rules let the
|
|
48
|
+
// layer SCROLL to it, where flex centering would clip both ends with
|
|
49
|
+
// no way back (fixed layers never grow the document). The wheel
|
|
50
|
+
// reaches this container only over the band itself (pointer
|
|
51
|
+
// transparency elsewhere), and an overflowing band covers the layer
|
|
52
|
+
// anyway — so the actions are always reachable. The native bar is
|
|
53
|
+
// hidden per the family scrollbar invariant (scrolling is the
|
|
54
|
+
// rare tall-content escape hatch, not part of the look).
|
|
55
|
+
overflow-y: auto;
|
|
56
|
+
scrollbar-width: none;
|
|
57
|
+
&::-webkit-scrollbar {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
// The scrim never blocks work (user direction 2026-11-13): the
|
|
61
|
+
// layer itself lets pointers through; only the band is interactive.
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.hk-emergency.is-warning {
|
|
66
|
+
--hk-emergency-tone: rgb(var(--color-warning, 222 168 62));
|
|
67
|
+
--hk-emergency-line: var(--hk-emergency-tone);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hk-emergency-scrim {
|
|
71
|
+
position: absolute;
|
|
72
|
+
inset: 0;
|
|
73
|
+
background: var(--hk-emergency-scrim);
|
|
74
|
+
@include backdrop-filter(blur(2px));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hk-emergency-band {
|
|
78
|
+
position: relative;
|
|
79
|
+
pointer-events: auto;
|
|
80
|
+
// The other half of safe centering: margin-block:auto centers the
|
|
81
|
+
// band when it fits and collapses to flush-top when it overflows
|
|
82
|
+
// (the layer then scrolls — see .hk-emergency).
|
|
83
|
+
margin-block: auto;
|
|
84
|
+
// Edge to edge — no viewport gutter, the emergency band spans the
|
|
85
|
+
// full width by design (user direction 2026-11-13); only the inner
|
|
86
|
+
// column constrains reading width.
|
|
87
|
+
width: 100%;
|
|
88
|
+
padding: clamp(1.75rem, 4vh, 2.75rem) var(--space-20, 1.25rem);
|
|
89
|
+
background:
|
|
90
|
+
linear-gradient(to bottom, var(--hk-emergency-wash), transparent 34%, transparent 66%, var(--hk-emergency-wash)),
|
|
91
|
+
var(--hk-emergency-band-bg);
|
|
92
|
+
border-top: 2px solid var(--hk-emergency-line);
|
|
93
|
+
border-bottom: 2px solid var(--hk-emergency-line);
|
|
94
|
+
// Elevation: the band is the one LIT surface over a darkened page —
|
|
95
|
+
// a deep soft shadow lifts it off the scrim so the takeover reads
|
|
96
|
+
// as layered, not pasted (0.55.370 field note: without this the
|
|
97
|
+
// light band floated flat on the light page).
|
|
98
|
+
box-shadow: 0 24px 72px rgb(3 5 9 / 42%);
|
|
99
|
+
text-align: center;
|
|
100
|
+
color: rgb(var(--color-text, 236 238 242));
|
|
101
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
102
|
+
|
|
103
|
+
// FUI double line: a second, fainter signal line hugging each edge
|
|
104
|
+
// just inside the solid one — reads as instrument chrome, not a
|
|
105
|
+
// decorative frame. The hairline carries a soft tone glow so the
|
|
106
|
+
// edges read as EMISSIVE signal lines (the restrained FUI note):
|
|
107
|
+
// light emitted by the alert, not decoration painted on.
|
|
108
|
+
&::before,
|
|
109
|
+
&::after {
|
|
110
|
+
content: "";
|
|
111
|
+
position: absolute;
|
|
112
|
+
left: 0;
|
|
113
|
+
right: 0;
|
|
114
|
+
height: 1px;
|
|
115
|
+
background: var(--hk-emergency-line-soft);
|
|
116
|
+
box-shadow: 0 0 14px var(--hk-emergency-edge-glow);
|
|
117
|
+
pointer-events: none;
|
|
118
|
+
}
|
|
119
|
+
&::before {
|
|
120
|
+
top: 4px;
|
|
121
|
+
}
|
|
122
|
+
&::after {
|
|
123
|
+
bottom: 4px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.hk-emergency-inner {
|
|
128
|
+
max-width: 680px;
|
|
129
|
+
margin-inline: auto;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// The tone circular badge — the HkErrorLanding __icon recipe scaled
|
|
133
|
+
// up for the band: gradient disc, hairline ring, layered halo plus a
|
|
134
|
+
// long soft drop shadow. A circle is the one badge shape legal across
|
|
135
|
+
// every shipped theme language (instrument dial / circles-stay-
|
|
136
|
+
// circles / measure-circle), so no rounded-square variant exists.
|
|
137
|
+
.hk-emergency-icon {
|
|
138
|
+
width: 72px;
|
|
139
|
+
height: 72px;
|
|
140
|
+
margin: 0 auto var(--space-14, 0.875rem);
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
color: var(--hk-emergency-tone);
|
|
146
|
+
background: linear-gradient(145deg, rgb(var(--color-error, 226 84 84) / 18%), rgb(var(--color-error, 226 84 84) / 6%));
|
|
147
|
+
border: 1px solid rgb(var(--color-error, 226 84 84) / 26%);
|
|
148
|
+
box-shadow:
|
|
149
|
+
0 0 0 8px rgb(var(--color-error, 226 84 84) / 5%),
|
|
150
|
+
0 10px 28px -12px rgb(var(--color-error, 226 84 84) / 45%);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.is-warning .hk-emergency-icon {
|
|
154
|
+
background: linear-gradient(145deg, rgb(var(--color-warning, 222 168 62) / 20%), rgb(var(--color-warning, 222 168 62) / 7%));
|
|
155
|
+
border-color: rgb(var(--color-warning, 222 168 62) / 28%);
|
|
156
|
+
box-shadow:
|
|
157
|
+
0 0 0 8px rgb(var(--color-warning, 222 168 62) / 6%),
|
|
158
|
+
0 10px 28px -12px rgb(var(--color-warning, 222 168 62) / 45%);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.hk-emergency-meta {
|
|
162
|
+
display: flex;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
margin-bottom: var(--space-8, 0.5rem);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// FUI micro-label: mono, wide tracking, tone ink — the "PLATFORM LINK
|
|
168
|
+
// LOST // 01" line above the headline. Decorative duplicate of the
|
|
169
|
+
// severity, hence aria-hidden in the tsx.
|
|
170
|
+
.hk-emergency-kicker {
|
|
171
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
172
|
+
font-size: 0.75rem;
|
|
173
|
+
font-weight: 600;
|
|
174
|
+
letter-spacing: 0.28em;
|
|
175
|
+
text-transform: uppercase;
|
|
176
|
+
color: var(--hk-emergency-tone);
|
|
177
|
+
margin-bottom: var(--space-6, 0.375rem);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.hk-emergency-title {
|
|
181
|
+
margin: 0 0 var(--space-8, 0.5rem);
|
|
182
|
+
font-size: clamp(1.75rem, 4vw, 2.5rem);
|
|
183
|
+
font-weight: 700;
|
|
184
|
+
line-height: 1.2;
|
|
185
|
+
letter-spacing: 0.01em;
|
|
186
|
+
color: rgb(var(--color-text, 236 238 242));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.hk-emergency-desc {
|
|
190
|
+
margin: 0 auto var(--space-10, 0.625rem);
|
|
191
|
+
max-width: 56ch;
|
|
192
|
+
font-size: clamp(1rem, 2vw, 1.125rem);
|
|
193
|
+
line-height: 1.6;
|
|
194
|
+
color: rgb(var(--color-muted, 158 162 170));
|
|
195
|
+
white-space: pre-line;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.hk-emergency-more {
|
|
199
|
+
margin: 0 0 var(--space-10, 0.625rem);
|
|
200
|
+
font-family: var(--font-mono, ui-monospace, monospace);
|
|
201
|
+
font-size: 0.8125rem;
|
|
202
|
+
letter-spacing: 0.08em;
|
|
203
|
+
color: rgb(var(--color-muted, 158 162 170));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.hk-emergency-actions {
|
|
207
|
+
display: flex;
|
|
208
|
+
justify-content: center;
|
|
209
|
+
flex-wrap: wrap;
|
|
210
|
+
gap: var(--space-12, 0.75rem);
|
|
211
|
+
margin-top: var(--space-14, 0.875rem);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ── Motion ────────────────────────────────────────────────────────────
|
|
215
|
+
// Enter/leave: the band draws its signal edges and lifts into place;
|
|
216
|
+
// leave mirrors it. Steady state stays ALIVE but quiet — the badge
|
|
217
|
+
// breathes ±2% and the hairline edges pulse — the cinematic klaxon
|
|
218
|
+
// turned down to instrument level. All motion dies under
|
|
219
|
+
// reduced-motion (OS level and the .reduce-motion class), matching
|
|
220
|
+
// the theme packages' dual kill-switch convention.
|
|
221
|
+
|
|
222
|
+
@keyframes hk-emergency-breathe {
|
|
223
|
+
0%,
|
|
224
|
+
100% {
|
|
225
|
+
transform: scale(1);
|
|
226
|
+
}
|
|
227
|
+
50% {
|
|
228
|
+
transform: scale(1.02);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@keyframes hk-emergency-signal {
|
|
233
|
+
0%,
|
|
234
|
+
100% {
|
|
235
|
+
opacity: 0.45;
|
|
236
|
+
}
|
|
237
|
+
50% {
|
|
238
|
+
opacity: 1;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.hk-emergency-icon {
|
|
243
|
+
animation: hk-emergency-breathe 2.8s ease-in-out infinite;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.hk-emergency-band::before,
|
|
247
|
+
.hk-emergency-band::after {
|
|
248
|
+
animation: hk-emergency-signal 2.8s ease-in-out infinite;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.hk-emergency-enter-active,
|
|
252
|
+
.hk-emergency-leave-active {
|
|
253
|
+
transition: opacity 240ms var(--ease-out, cubic-bezier(0.4, 0, 0.2, 1));
|
|
254
|
+
|
|
255
|
+
.hk-emergency-band {
|
|
256
|
+
transition: transform 320ms var(--ease-out-expo, cubic-bezier(0.19, 1, 0.22, 1));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.hk-emergency-enter-from,
|
|
261
|
+
.hk-emergency-leave-to {
|
|
262
|
+
opacity: 0;
|
|
263
|
+
|
|
264
|
+
.hk-emergency-band {
|
|
265
|
+
transform: scaleY(0.72);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@media (prefers-reduced-motion: reduce) {
|
|
270
|
+
.hk-emergency-enter-active,
|
|
271
|
+
.hk-emergency-leave-active,
|
|
272
|
+
.hk-emergency-enter-active .hk-emergency-band,
|
|
273
|
+
.hk-emergency-leave-active .hk-emergency-band {
|
|
274
|
+
transition: none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.hk-emergency-icon,
|
|
278
|
+
.hk-emergency-band::before,
|
|
279
|
+
.hk-emergency-band::after {
|
|
280
|
+
animation: none;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
html.reduce-motion {
|
|
285
|
+
.hk-emergency-enter-active,
|
|
286
|
+
.hk-emergency-leave-active,
|
|
287
|
+
.hk-emergency-enter-active .hk-emergency-band,
|
|
288
|
+
.hk-emergency-leave-active .hk-emergency-band {
|
|
289
|
+
transition: none;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.hk-emergency-icon,
|
|
293
|
+
.hk-emergency-band::before,
|
|
294
|
+
.hk-emergency-band::after {
|
|
295
|
+
animation: none;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|