@celestia-island/hikari 0.55.400 → 0.55.401

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.400",
3
+ "version": "0.55.401",
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,13 +1,73 @@
1
1
  /**
2
2
  * HkDockBar.scss — the shared dock surface chrome (single source of
3
- * truth). `--hk-dock-inset` is declared by the foundation layer so every
4
- * dock reads a defined value; change it once, all surfaces move
5
- * together.
3
+ * truth).
4
+ *
5
+ * Geometry contract — the dock edge gap family (2026-11-15). A dock owns
6
+ * BOTH distances on its content side, and reads both from ONE token
7
+ * family:
8
+ *
9
+ * 1. RESTING INSET — how far the dock box sits from the viewport edge it
10
+ * hugs, plus that edge's safe-area inset (0 on desktop, so the gap is
11
+ * the visual distance everywhere a notch is absent);
12
+ * 2. CONTENT BAND — a transparent padding on the face that points at the
13
+ * content, so content never comes closer to the surface than the same
14
+ * gap.
15
+ *
16
+ * G(edge) = var(--hk-dock-gap-<edge>, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))))
17
+ *
18
+ * `--hk-dock-gap` is DECLARED exactly once, on `:root` in scale.scss (16px
19
+ * by default); `--hk-dock-gap-<edge>` and the older single-value
20
+ * `--hk-dock-inset` are override-only (any host ancestor, or inline), and
21
+ * the `gap` prop writes `--hk-dock-gap` inline on the dock itself.
22
+ *
23
+ * The per-edge public names are NEVER pre-declared: a custom property
24
+ * resolves on the element that DECLARES it, so a `:root`-level
25
+ * `--hk-dock-gap-bottom: var(--hk-dock-gap)` would freeze the bottom edge
26
+ * against every descendant `--hk-dock-gap` override (the cascade trap this
27
+ * contract exists to avoid). The four `--_hk-dock-gap-*` private names
28
+ * below are the ONLY place the fallback chain is written, and they are
29
+ * resolved on the dock element itself.
30
+ *
31
+ * Why the band lives in the DOCK's box, never in a view padding:
32
+ * - pin slot — the dock is a flex SIBLING of the scroll viewport, so the
33
+ * wrapper box IS the dock box (band + surface + inset) and the viewport
34
+ * yields the band by layout: the content end rests `gap` above the
35
+ * surface with NO view padding at all, so a content box that inflates
36
+ * itself to `min-height: 100%` cannot resurrect the phantom-scroll
37
+ * trap;
38
+ * - floating docks (page / plane) — the occupancy a host measures and
39
+ * publishes (its own getBoundingClientRect, which already includes
40
+ * padding) now contains the band, so a consumer's tail reservation
41
+ * automatically becomes "surface + inset + band" and no JS ever has to
42
+ * read a CSS length.
43
+ *
44
+ * Which is also why HkScrollContainer's measurement / gate formulas did not
45
+ * change: they read scrollHeight / clientHeight / gBCR, all decided by
46
+ * layout — this sheet only changes what the dock's own box contains.
47
+ *
48
+ * PHYSICAL bands on the inline faces (2026-11-15, review S1). The anchors are
49
+ * physical too: `left` / `right` and `env(safe-area-inset-left/right)` mean the
50
+ * literal edges, not the writing-mode ones. A logical band — a
51
+ * `padding-inline-start` / `padding-inline-end` — therefore flips under
52
+ * `dir="rtl"`: on a left-anchored dock it would land on the SAME side as the
53
+ * pinned edge (the surface pushed one gap further in, reading `gap + gap` from
54
+ * the edge) while the face that actually points at the content stays bare, so
55
+ * content touches the surface again. The block axis is direction-independent
56
+ * in the writing modes a dock lives in, so `padding-block-start/end` stay
57
+ * logical.
6
58
  */
7
59
 
8
60
  @use "../styles/polyfill" as *;
9
61
 
10
62
  .hk-dock-bar {
63
+ /* The edge gap family, resolved once per edge. Read by the anchor rules
64
+ * below (inset) and by the surface rules (max-width / max-height); never
65
+ * set by a host — a host overrides the PUBLIC names in the chain. */
66
+ --_hk-dock-gap-top: var(--hk-dock-gap-top, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))));
67
+ --_hk-dock-gap-right: var(--hk-dock-gap-right, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))));
68
+ --_hk-dock-gap-bottom: var(--hk-dock-gap-bottom, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))));
69
+ --_hk-dock-gap-left: var(--hk-dock-gap-left, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))));
70
+
11
71
  /* Transparent anchor box — never intercepts canvas gestures around
12
72
  * the docked surface. */
13
73
  pointer-events: none;
@@ -17,22 +77,25 @@
17
77
  gap: var(--space-4, 4px);
18
78
 
19
79
  /* ── page anchor (SOUTH edge): absolute bottom-center of the nearest
20
- * positioned ancestor, resting --hk-dock-inset above its content
21
- * floor. `bottom` below is the compass spelling of the same
22
- * geometry. */
80
+ * positioned ancestor, resting one bottom gap above its content
81
+ * floor; the block-start band is the content side. `bottom` below is
82
+ * the compass spelling of the same geometry. */
23
83
  &[data-anchor="page"] {
24
84
  position: absolute;
25
85
  left: 50%;
26
- bottom: var(--hk-dock-inset, 12px);
86
+ bottom: calc(var(--_hk-dock-gap-bottom) + env(safe-area-inset-bottom, 0px));
27
87
  transform: translateX(-50%);
28
88
  z-index: 50;
89
+ padding-block-start: var(--_hk-dock-gap-bottom);
29
90
  }
30
91
 
31
92
  /* ── plane anchor: in-flow inside a host plane (a fixed footer band);
32
93
  * the host owns the positioning, this container centers the
33
- * surface horizontally and lifts it by the shared dock inset. */
94
+ * surface horizontally, lifts it by one bottom gap and opens the
95
+ * same gap above it toward the content. */
34
96
  &[data-anchor="plane"] {
35
- margin: 0 auto var(--hk-dock-inset, 12px);
97
+ margin: 0 auto calc(var(--_hk-dock-gap-bottom) + env(safe-area-inset-bottom, 0px));
98
+ padding-block-start: var(--_hk-dock-gap-bottom);
36
99
  }
37
100
 
38
101
  /* ── horizontal edge anchors: north and the compass spelling of the
@@ -46,15 +109,19 @@
46
109
  }
47
110
 
48
111
  &[data-anchor="top"] {
49
- top: var(--hk-dock-inset, 12px);
112
+ top: calc(var(--_hk-dock-gap-top) + env(safe-area-inset-top, 0px));
113
+ padding-block-end: var(--_hk-dock-gap-top);
50
114
  }
51
115
 
52
116
  &[data-anchor="bottom"] {
53
- bottom: var(--hk-dock-inset, 12px);
117
+ bottom: calc(var(--_hk-dock-gap-bottom) + env(safe-area-inset-bottom, 0px));
118
+ padding-block-start: var(--_hk-dock-gap-bottom);
54
119
  }
55
120
 
56
121
  /* ── vertical edge anchors (west / east): the dock runs vertically,
57
- * centered on the edge midpoint. */
122
+ * centered on the edge midpoint, with the band on the PHYSICAL side
123
+ * that faces the content (see the header note: a logical padding would
124
+ * flip under dir="rtl" and leave the content face bare). */
58
125
  &[data-anchor="left"],
59
126
  &[data-anchor="right"] {
60
127
  position: absolute;
@@ -64,15 +131,19 @@
64
131
  }
65
132
 
66
133
  &[data-anchor="left"] {
67
- left: var(--hk-dock-inset, 12px);
134
+ left: calc(var(--_hk-dock-gap-left) + env(safe-area-inset-left, 0px));
135
+ padding-right: var(--_hk-dock-gap-left);
68
136
  }
69
137
 
70
138
  &[data-anchor="right"] {
71
- right: var(--hk-dock-inset, 12px);
139
+ right: calc(var(--_hk-dock-gap-right) + env(safe-area-inset-right, 0px));
140
+ padding-left: var(--_hk-dock-gap-right);
72
141
  }
73
142
 
74
- /* ── corner anchors: absolute attachment with the same inset, for
75
- * pagers, toolbars and HUD panels that live off-center. */
143
+ /* ── corner anchors: absolute attachment with both edge gaps, for
144
+ * pagers, toolbars and HUD panels that live off-center. The band opens
145
+ * on both content-facing sides — physical on the inline face, logical on
146
+ * the block one. */
76
147
  &[data-anchor="top-left"],
77
148
  &[data-anchor="top-right"],
78
149
  &[data-anchor="bottom-left"],
@@ -82,27 +153,35 @@
82
153
  }
83
154
 
84
155
  &[data-anchor="top-left"] {
85
- top: var(--hk-dock-inset, 12px);
86
- left: var(--hk-dock-inset, 12px);
156
+ top: calc(var(--_hk-dock-gap-top) + env(safe-area-inset-top, 0px));
157
+ left: calc(var(--_hk-dock-gap-left) + env(safe-area-inset-left, 0px));
87
158
  align-items: flex-start;
159
+ padding-block-end: var(--_hk-dock-gap-top);
160
+ padding-right: var(--_hk-dock-gap-left);
88
161
  }
89
162
 
90
163
  &[data-anchor="top-right"] {
91
- top: var(--hk-dock-inset, 12px);
92
- right: var(--hk-dock-inset, 12px);
164
+ top: calc(var(--_hk-dock-gap-top) + env(safe-area-inset-top, 0px));
165
+ right: calc(var(--_hk-dock-gap-right) + env(safe-area-inset-right, 0px));
93
166
  align-items: flex-end;
167
+ padding-block-end: var(--_hk-dock-gap-top);
168
+ padding-left: var(--_hk-dock-gap-right);
94
169
  }
95
170
 
96
171
  &[data-anchor="bottom-left"] {
97
- bottom: var(--hk-dock-inset, 12px);
98
- left: var(--hk-dock-inset, 12px);
172
+ bottom: calc(var(--_hk-dock-gap-bottom) + env(safe-area-inset-bottom, 0px));
173
+ left: calc(var(--_hk-dock-gap-left) + env(safe-area-inset-left, 0px));
99
174
  align-items: flex-start;
175
+ padding-block-start: var(--_hk-dock-gap-bottom);
176
+ padding-right: var(--_hk-dock-gap-left);
100
177
  }
101
178
 
102
179
  &[data-anchor="bottom-right"] {
103
- bottom: var(--hk-dock-inset, 12px);
104
- right: var(--hk-dock-inset, 12px);
180
+ bottom: calc(var(--_hk-dock-gap-bottom) + env(safe-area-inset-bottom, 0px));
181
+ right: calc(var(--_hk-dock-gap-right) + env(safe-area-inset-right, 0px));
105
182
  align-items: flex-end;
183
+ padding-block-start: var(--_hk-dock-gap-bottom);
184
+ padding-left: var(--_hk-dock-gap-right);
106
185
  }
107
186
  }
108
187
 
@@ -112,7 +191,10 @@
112
191
  flex-direction: column;
113
192
  align-items: stretch;
114
193
  width: var(--dock-width, auto);
115
- max-width: var(--dock-max-width, calc(100vw - var(--space-16, 16px)));
194
+ /* The viewport cap reads the same edge gaps as the anchoring rules: the
195
+ * surface may never come closer to a horizontal edge than the dock would
196
+ * rest from one. */
197
+ max-width: var(--dock-max-width, calc(100vw - var(--_hk-dock-gap-left) - var(--_hk-dock-gap-right)));
116
198
  max-height: var(--dock-max-height, none);
117
199
  padding: var(--dock-padding, var(--space-8, 8px) var(--space-12, 12px));
118
200
  background: rgb(var(--color-surface));
@@ -130,11 +212,13 @@
130
212
  }
131
213
 
132
214
  /* Vertical side docks (west / east edges) stack along the viewport's
133
- * tall axis — cap them viewport-aware by default so a tall dock never
134
- * runs off-screen; --dock-max-height still overrides. */
215
+ * tall axis — cap them viewport-aware by default so a tall dock never runs
216
+ * off-screen; the cap subtracts the top AND bottom gaps, so a side dock
217
+ * can never out-reach the resting inset of a dock on either horizontal
218
+ * edge. --dock-max-height still overrides. */
135
219
  .hk-dock-bar[data-anchor="left"] .hk-dock-bar-surface,
136
220
  .hk-dock-bar[data-anchor="right"] .hk-dock-bar-surface {
137
- max-height: var(--dock-max-height, calc(100dvh - var(--space-16, 16px)));
221
+ max-height: var(--dock-max-height, calc(100dvh - var(--_hk-dock-gap-top) - var(--_hk-dock-gap-bottom)));
138
222
  }
139
223
 
140
224
  /* Glass surface (default) — blur the page canvas behind the dock. */
@@ -0,0 +1,341 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ import { compile } from "sass";
6
+ import { describe, expect, it } from "vitest";
7
+
8
+ /**
9
+ * Compiled-stylesheet guard for the dock edge gap family (2026-11-15).
10
+ *
11
+ * The whole facility is CSS: `--hk-dock-gap` is declared ONCE by the
12
+ * foundation (scale.scss), every edge resolves it through one fallback
13
+ * chain declared once on the dock base class, and each anchor rule turns
14
+ * that resolved value into (a) its RESTING INSET from the viewport edge —
15
+ * gap plus that edge's safe-area inset — and (b) a transparent CONTENT BAND
16
+ * on the face that points at the content. Vitest stubs CSS, so
17
+ * HkDockBar.test.tsx can only read the SCSS source; this file compiles the
18
+ * real sheets and pins the emitted declarations, so a rule that silently
19
+ * regresses to a literal 12px inset, loses a band, or leaves the surface
20
+ * uncapped turns red here.
21
+ *
22
+ * The negative controls matter as much as the positive ones: a `:root`
23
+ * pre-declaration of `--hk-dock-gap-<edge>` would freeze that edge against
24
+ * every descendant `--hk-dock-gap` override (a custom property resolves on
25
+ * the element that DECLARES it), and a per-anchor re-spelling of the chain
26
+ * would let the family drift back into several mechanisms.
27
+ *
28
+ * Inline bands are PHYSICAL (`padding-right` / `padding-left`, review S1): the
29
+ * anchors are physical, so on a left-anchored dock a logical `padding-inline-
30
+ * end` resolves to the physical LEFT under `dir="rtl"` — the pinned side — and
31
+ * the surface reads `gap + gap` from the edge while the content face goes bare.
32
+ * The band table below therefore resolves each declaration under BOTH writing
33
+ * directions and demands the same content-facing side, which is only true for
34
+ * physical longhands.
35
+ */
36
+
37
+ const componentDir = resolve(dirname(fileURLToPath(import.meta.url)));
38
+ const srcDir = resolve(componentDir, "..");
39
+
40
+ const dockCss = compile(resolve(componentDir, "HkDockBar.scss"), {
41
+ style: "expanded",
42
+ }).css;
43
+ const scaleCss = compile(resolve(srcDir, "scale.scss"), { style: "expanded" }).css;
44
+ const scaleSource = readFileSync(resolve(srcDir, "scale.scss"), "utf8");
45
+
46
+ /** The sheet minus its block comments: the contract prose quotes the very
47
+ * declarations the negative controls scan for (the header comment spells the
48
+ * cascade trap as a literal `--hk-dock-gap-bottom` declaration), so the scans
49
+ * must only ever see real declarations. */
50
+ function withoutComments(css: string): string {
51
+ return css.replace(/\/\*[\s\S]*?\*\//g, "");
52
+ }
53
+
54
+ function escapeRe(text: string): string {
55
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
56
+ }
57
+
58
+ /** The compiled rule that is EXACTLY `selector` followed by its own block. A
59
+ * selector shared with a sibling (`.a, .b { … }`) does not count: the anchor
60
+ * assertions must read that anchor's own rule body, never a shared one. */
61
+ function ruleFor(css: string, selector: string): string {
62
+ const start = new RegExp(`(?:^|\\n)[ \\t]*${escapeRe(selector)}\\s*\\{`).exec(css);
63
+ expect(start, `${selector} present in the compiled sheet`).not.toBeNull();
64
+ return sliceRule(css, start!.index);
65
+ }
66
+
67
+ /** The compiled rule whose selector LIST starts with `selector` (a shared rule
68
+ * such as the two side-anchor caps, emitted as one `.left, .right { … }`). */
69
+ function groupRuleFor(css: string, selector: string): string {
70
+ const start = new RegExp(`(?:^|\\n)[ \\t]*${escapeRe(selector)}(?=[\\s,{])`).exec(css);
71
+ expect(start, `${selector} present in the compiled sheet`).not.toBeNull();
72
+ return sliceRule(css, start!.index);
73
+ }
74
+
75
+ /** The rule body that begins at `from` (`{` … first `}`). */
76
+ function sliceRule(css: string, from: number): string {
77
+ const open = css.indexOf("{", from);
78
+ const close = css.indexOf("}", open);
79
+ return css.slice(from, close + 1);
80
+ }
81
+
82
+ const EDGES = ["top", "right", "bottom", "left"] as const;
83
+
84
+ /** The private resolved gap one edge reads (declared once on the base). */
85
+ function gap(edge: string): string {
86
+ return `var(--_hk-dock-gap-${edge})`;
87
+ }
88
+
89
+ /** The resting inset of an anchored edge: the gap plus its safe-area. */
90
+ function inset(edge: string): string {
91
+ return `calc(${gap(edge)} + env(safe-area-inset-${edge}, 0px))`;
92
+ }
93
+
94
+ /**
95
+ * The §2 anchor table, transcribed — every one of the ten `data-anchor`
96
+ * values the component accepts (nine geometries; `bottom` is `page`'s
97
+ * compass alias). Each row is `[css side, edge]` for the resting inset and
98
+ * `[padding property, edge]` for the content band, so a missing anchor row,
99
+ * a missing rule, or a band on the wrong face fails.
100
+ */
101
+ type AnchorRow = {
102
+ anchor: string;
103
+ insets: [string, string][];
104
+ bands: [string, string][];
105
+ };
106
+
107
+ const ANCHOR_TABLE: AnchorRow[] = [
108
+ {
109
+ anchor: "page",
110
+ insets: [["bottom", "bottom"]],
111
+ bands: [["padding-block-start", "bottom"]],
112
+ },
113
+ {
114
+ anchor: "bottom",
115
+ insets: [["bottom", "bottom"]],
116
+ bands: [["padding-block-start", "bottom"]],
117
+ },
118
+ {
119
+ anchor: "plane",
120
+ insets: [["margin", "bottom"]],
121
+ bands: [["padding-block-start", "bottom"]],
122
+ },
123
+ { anchor: "top", insets: [["top", "top"]], bands: [["padding-block-end", "top"]] },
124
+ { anchor: "left", insets: [["left", "left"]], bands: [["padding-right", "left"]] },
125
+ { anchor: "right", insets: [["right", "right"]], bands: [["padding-left", "right"]] },
126
+ {
127
+ anchor: "top-left",
128
+ insets: [
129
+ ["top", "top"],
130
+ ["left", "left"],
131
+ ],
132
+ bands: [
133
+ ["padding-block-end", "top"],
134
+ ["padding-right", "left"],
135
+ ],
136
+ },
137
+ {
138
+ anchor: "top-right",
139
+ insets: [
140
+ ["top", "top"],
141
+ ["right", "right"],
142
+ ],
143
+ bands: [
144
+ ["padding-block-end", "top"],
145
+ ["padding-left", "right"],
146
+ ],
147
+ },
148
+ {
149
+ anchor: "bottom-left",
150
+ insets: [
151
+ ["bottom", "bottom"],
152
+ ["left", "left"],
153
+ ],
154
+ bands: [
155
+ ["padding-block-start", "bottom"],
156
+ ["padding-right", "left"],
157
+ ],
158
+ },
159
+ {
160
+ anchor: "bottom-right",
161
+ insets: [
162
+ ["bottom", "bottom"],
163
+ ["right", "right"],
164
+ ],
165
+ bands: [
166
+ ["padding-block-start", "bottom"],
167
+ ["padding-left", "right"],
168
+ ],
169
+ },
170
+ ];
171
+
172
+ describe("dock edge gap token — foundation declaration", () => {
173
+ it("declares --hk-dock-gap exactly once, defaulting to the 16px step", () => {
174
+ const root = ruleFor(scaleCss, ":root");
175
+ expect(root).toContain("--hk-dock-gap: var(--space-16, 1rem);");
176
+ expect(withoutComments(scaleCss).match(/--hk-dock-gap\s*:/g) ?? []).toHaveLength(1);
177
+ // …and NOT inside the mobile media query that halves other gutters: the
178
+ // dock gap is a product decision, not a breakpoint-dependent gutter.
179
+ expect(scaleCss.split("@media")[0]).toContain("--hk-dock-gap:");
180
+ });
181
+
182
+ it("never pre-declares a per-edge gap (cascade trap negative control)", () => {
183
+ // A custom property resolves on the element that declares it, so a
184
+ // :root-level `--hk-dock-gap-bottom: var(--hk-dock-gap)` would freeze the
185
+ // bottom edge against every descendant override. Per-edge names may only
186
+ // appear as READ-time fallbacks.
187
+ for (const [name, css] of [
188
+ ["scale.scss", scaleCss],
189
+ ["HkDockBar.scss", dockCss],
190
+ ] as const) {
191
+ expect(
192
+ withoutComments(css).match(/(^|[^\w-])--hk-dock-gap-(top|right|bottom|left)\s*:/m),
193
+ `${name} must not declare a per-edge gap`,
194
+ ).toBeNull();
195
+ }
196
+ expect(scaleSource.replace(/\/\*[\s\S]*?\*\//g, "")).not.toMatch(
197
+ /--hk-dock-gap-(top|right|bottom|left)\s*:/,
198
+ );
199
+ });
200
+ });
201
+
202
+ describe("dock edge gap token — one resolver per edge", () => {
203
+ it("declares the four resolved gaps on the base class, each reading the full chain", () => {
204
+ const base = ruleFor(dockCss, ".hk-dock-bar");
205
+ for (const edge of EDGES) {
206
+ expect(base).toContain(
207
+ `--_hk-dock-gap-${edge}: var(--hk-dock-gap-${edge}, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))));`,
208
+ );
209
+ }
210
+ // Exactly four declarations: the chain lives in ONE place (the base), not
211
+ // re-spelled per anchor.
212
+ expect(dockCss.match(/--_hk-dock-gap-(top|right|bottom|left):/g) ?? []).toHaveLength(4);
213
+ });
214
+ });
215
+
216
+ describe("dock edge gap — anchor geometry", () => {
217
+ it("covers every anchor the component accepts, and no other", () => {
218
+ // Completeness in both directions: a new anchor must get a row here, and
219
+ // the table may not carry an anchor the sheet does not style.
220
+ const styled = new Set(
221
+ [...withoutComments(dockCss).matchAll(/\[data-anchor=([a-z-]+)\]/g)].map((m) => m[1]),
222
+ );
223
+ expect([...styled].sort()).toEqual(ANCHOR_TABLE.map((row) => row.anchor).sort());
224
+ });
225
+
226
+ it.each(ANCHOR_TABLE)(
227
+ '$anchor: edge gap inset(s) + content band(s) from the same family',
228
+ ({ anchor, insets, bands }) => {
229
+ const rule = ruleFor(dockCss, `.hk-dock-bar[data-anchor=${anchor}]`);
230
+ for (const [side, edge] of insets) {
231
+ if (side === "margin") {
232
+ // The in-flow plane anchor rests by a margin, not a pinned edge.
233
+ expect(rule).toContain(`margin: 0 auto ${inset(edge)};`);
234
+ } else {
235
+ expect(rule).toContain(`${side}: ${inset(edge)};`);
236
+ }
237
+ }
238
+ for (const [property, edge] of bands) {
239
+ expect(rule).toContain(`${property}: ${gap(edge)};`);
240
+ }
241
+ // No literal fallback left behind: every distance is a resolved edge gap.
242
+ expect(rule).not.toContain("--space-16");
243
+ expect(rule).not.toContain("--hk-dock-inset");
244
+ },
245
+ );
246
+
247
+ it("opens exactly two bands on each corner and one elsewhere", () => {
248
+ for (const { anchor, bands } of ANCHOR_TABLE) {
249
+ const rule = ruleFor(dockCss, `.hk-dock-bar[data-anchor=${anchor}]`);
250
+ const padding = rule.match(/padding-(?:inline-|block-)?(?:start|end|left|right):/g) ?? [];
251
+ expect(padding, anchor).toHaveLength(bands.length);
252
+ }
253
+ });
254
+
255
+ it("resolves the same content-facing band side in BOTH writing directions", () => {
256
+ // What a browser does with a padding longhand depends on the writing
257
+ // direction — but only for LOGICAL longhands. Each band is therefore
258
+ // resolved under `dir="ltr"` and `dir="rtl"` and must land on the physical
259
+ // side that faces the content both times: that is what makes the band hold
260
+ // on an RTL page instead of flipping onto the pinned edge (review S1).
261
+ type Side = "left" | "right" | "block-start" | "block-end";
262
+ // The physical face each anchor's content sits on, per axis.
263
+ const CONTENT_SIDES: Record<string, Side[]> = {
264
+ page: ["block-start"],
265
+ bottom: ["block-start"],
266
+ plane: ["block-start"],
267
+ top: ["block-end"],
268
+ left: ["right"],
269
+ right: ["left"],
270
+ "top-left": ["block-end", "right"],
271
+ "top-right": ["block-end", "left"],
272
+ "bottom-left": ["block-start", "right"],
273
+ "bottom-right": ["block-start", "left"],
274
+ };
275
+ /** Where one declared padding longhand actually lands, per direction. */
276
+ function resolve(decl: string, dir: "ltr" | "rtl"): Side | null {
277
+ switch (decl) {
278
+ case "padding-left":
279
+ return "left";
280
+ case "padding-right":
281
+ return "right";
282
+ case "padding-block-start":
283
+ return "block-start";
284
+ case "padding-block-end":
285
+ return "block-end";
286
+ case "padding-inline-start":
287
+ return dir === "ltr" ? "left" : "right";
288
+ case "padding-inline-end":
289
+ return dir === "ltr" ? "right" : "left";
290
+ default:
291
+ return null;
292
+ }
293
+ }
294
+ for (const { anchor } of ANCHOR_TABLE) {
295
+ const rule = ruleFor(dockCss, `.hk-dock-bar[data-anchor=${anchor}]`);
296
+ const declared = [...rule.matchAll(/padding-(?:inline-|block-)?(start|end|left|right):/g)].map(
297
+ (m) => m[0].slice(0, -1),
298
+ );
299
+ expect(declared.length, anchor).toBe(CONTENT_SIDES[anchor].length);
300
+ for (const dir of ["ltr", "rtl"] as const) {
301
+ const resolved = declared.map((decl) => resolve(decl, dir));
302
+ expect(resolved, `${anchor} in dir=${dir}`).toEqual(CONTENT_SIDES[anchor]);
303
+ }
304
+ // …which can only hold for BOTH directions when no logical inline
305
+ // longhand is used at all: the negative control for the S1 defect.
306
+ expect(rule, anchor).not.toMatch(/padding-inline-(start|end)/);
307
+ }
308
+ });
309
+
310
+ it("every anchored rule adds the safe-area inset for its own edge only", () => {
311
+ for (const { anchor, insets } of ANCHOR_TABLE) {
312
+ const rule = ruleFor(dockCss, `.hk-dock-bar[data-anchor=${anchor}]`);
313
+ for (const [, edge] of insets) {
314
+ expect(rule, anchor).toContain(`env(safe-area-inset-${edge}, 0px)`);
315
+ }
316
+ for (const other of EDGES.filter((e) => !insets.some(([, edge]) => edge === e))) {
317
+ expect(rule, anchor).not.toContain(`safe-area-inset-${other}`);
318
+ }
319
+ }
320
+ });
321
+ });
322
+
323
+ describe("dock edge gap — surface caps read the same family", () => {
324
+ it("caps the surface width on both horizontal edge gaps", () => {
325
+ const base = ruleFor(dockCss, ".hk-dock-bar-surface");
326
+ expect(base).toContain(
327
+ `max-width: var(--dock-max-width, calc(100vw - ${gap("left")} - ${gap("right")}));`,
328
+ );
329
+ expect(base).not.toContain("--space-16");
330
+ });
331
+
332
+ it("caps vertical side docks by both block gaps", () => {
333
+ // Sass emits the two side anchors as one selector list; the cap rule body
334
+ // is what this pins.
335
+ const cap = groupRuleFor(dockCss, '.hk-dock-bar[data-anchor=left] .hk-dock-bar-surface');
336
+ expect(cap).toContain(
337
+ `max-height: var(--dock-max-height, calc(100dvh - ${gap("top")} - ${gap("bottom")}));`,
338
+ );
339
+ expect(cap).not.toContain("--space-16");
340
+ });
341
+ });
@@ -83,6 +83,17 @@ describe("HkDockBar", () => {
83
83
  expect(style.getPropertyValue("--dock-padding")).toBe("4px 6px");
84
84
  });
85
85
 
86
+ it("writes the gap prop to the shared --hk-dock-gap token", async () => {
87
+ // One CSS length in, the foundation token out: every edge of this dock
88
+ // (resting inset, content band, surface cap) then resolves the override
89
+ // through the sheet's own chain, so a host never re-declares per-edge.
90
+ const root = await mountDock({ gap: "1.5rem" });
91
+ expect(root.style.getPropertyValue("--hk-dock-gap")).toBe("1.5rem");
92
+ // An unset prop must not emit an empty declaration.
93
+ const bare = await mountDock();
94
+ expect(bare.getAttribute("style") ?? "").not.toContain("--hk-dock-gap");
95
+ });
96
+
86
97
  it("drops the blur on the solid surface", async () => {
87
98
  const root = await mountDock({ surface: "solid" });
88
99
  expect(root.dataset.surface).toBe("solid");
@@ -93,8 +104,9 @@ describe("HkDockBar", () => {
93
104
  // SCSS source contract (house pattern, cf. HkButton icon-only contract):
94
105
  // happy-dom does not lay out, so each compass direction's geometry is
95
106
  // pinned textually against HkDockBar.scss. Dropping any one direction's
96
- // rule — or regressing its mapping (inset side / centering transform) —
97
- // turns the matching assertion red.
107
+ // rule — or regressing its mapping (inset side / centering transform /
108
+ // content band) — turns the matching assertion red. The COMPILED
109
+ // declarations are pinned separately in HkDockBar.styles.test.ts.
98
110
 
99
111
  const here = dirname(fileURLToPath(import.meta.url));
100
112
  const scss = readFileSync(join(here, "HkDockBar.scss"), "utf8");
@@ -105,8 +117,29 @@ function rulesFor(anchor: string): string {
105
117
  return scss.match(re)?.join("\n") ?? "";
106
118
  }
107
119
 
120
+ /** The private resolved gap one edge reads (declared once on the base). */
121
+ function gap(edge: string): string {
122
+ return `var(--_hk-dock-gap-${edge})`;
123
+ }
124
+
125
+ /** The resting inset of an anchored edge: the gap plus its safe-area. */
126
+ function inset(edge: string): string {
127
+ return `calc(${gap(edge)} + env(safe-area-inset-${edge}, 0px))`;
128
+ }
129
+
108
130
  describe("HkDockBar anchor geometry contract", () => {
109
- const INSET = "var(--hk-dock-inset, 12px)";
131
+ it("declares the four resolved edge gaps on the base class", () => {
132
+ const base = scss.match(/\.hk-dock-bar\s*\{[^}]*\}/)?.[0];
133
+ expect(base, "base dock rule must exist").toBeTruthy();
134
+ for (const edge of ["top", "right", "bottom", "left"]) {
135
+ // One chain per edge, written ONCE: per-edge public names are read-time
136
+ // fallbacks (a `:root` pre-declaration would freeze them against any
137
+ // descendant override).
138
+ expect(base).toContain(
139
+ `--_hk-dock-gap-${edge}: var(--hk-dock-gap-${edge}, var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))))`,
140
+ );
141
+ }
142
+ });
110
143
 
111
144
  it.each(["page", "bottom"] as const)(
112
145
  "%s docks to the south edge, centered (the two spellings share geometry)",
@@ -115,8 +148,9 @@ describe("HkDockBar anchor geometry contract", () => {
115
148
  expect(rules, `${anchor} rules must exist`).toBeTruthy();
116
149
  expect(rules).toContain("position: absolute");
117
150
  expect(rules).toContain("left: 50%");
118
- expect(rules).toContain(`bottom: ${INSET}`);
151
+ expect(rules).toContain(`bottom: ${inset("bottom")}`);
119
152
  expect(rules).toContain("transform: translateX(-50%)");
153
+ expect(rules).toContain(`padding-block-start: ${gap("bottom")}`);
120
154
  },
121
155
  );
122
156
 
@@ -124,10 +158,11 @@ describe("HkDockBar anchor geometry contract", () => {
124
158
  const rules = rulesFor("top");
125
159
  expect(rules, "top rules must exist").toBeTruthy();
126
160
  expect(rules).toContain("position: absolute");
127
- expect(rules).toContain("top: " + INSET);
161
+ expect(rules).toContain("top: " + inset("top"));
128
162
  expect(rules).toContain("left: 50%");
129
163
  expect(rules).toContain("transform: translateX(-50%)");
130
- expect(rules).not.toContain(`bottom: ${INSET}`);
164
+ expect(rules).toContain(`padding-block-end: ${gap("top")}`);
165
+ expect(rules).not.toContain(`bottom: ${inset("bottom")}`);
131
166
  });
132
167
 
133
168
  it.each(["left", "right"] as const)(
@@ -137,7 +172,12 @@ describe("HkDockBar anchor geometry contract", () => {
137
172
  expect(rules, `${anchor} rules must exist`).toBeTruthy();
138
173
  expect(rules).toContain("position: absolute");
139
174
  expect(rules).toContain("top: 50%");
140
- expect(rules).toContain(`${anchor}: ${INSET}`);
175
+ expect(rules).toContain(`${anchor}: ${inset(anchor)}`);
176
+ // The anchor is a PHYSICAL edge, so the band is physical too: a logical
177
+ // longhand would flip under dir="rtl" onto the pinned side.
178
+ expect(rules).toContain(
179
+ `padding-${anchor === "left" ? "right" : "left"}: ${gap(anchor)}`,
180
+ );
141
181
  expect(rules).toContain("transform: translateY(-50%)");
142
182
  // A side dock must not pick up the horizontal-edge centering.
143
183
  expect(rules).not.toContain("transform: translateX(-50%)");
@@ -151,12 +191,18 @@ describe("HkDockBar anchor geometry contract", () => {
151
191
  ["bottom-left", "bottom", "left", "flex-start"],
152
192
  ["bottom-right", "bottom", "right", "flex-end"],
153
193
  ] as const,
154
- )("%s docks into its corner with both insets", (anchor, side1, side2, align) => {
194
+ )("%s docks into its corner with both insets and both bands", (anchor, side1, side2, align) => {
155
195
  const rules = rulesFor(anchor);
156
196
  expect(rules, `${anchor} rules must exist`).toBeTruthy();
157
197
  expect(rules).toContain("position: absolute");
158
- expect(rules).toContain(`${side1}: ${INSET}`);
159
- expect(rules).toContain(`${side2}: ${INSET}`);
198
+ expect(rules).toContain(`${side1}: ${inset(side1)}`);
199
+ expect(rules).toContain(`${side2}: ${inset(side2)}`);
200
+ expect(rules).toContain(
201
+ `padding-block-${side1 === "top" ? "end" : "start"}: ${gap(side1)}`,
202
+ );
203
+ expect(rules).toContain(
204
+ `padding-${side2 === "left" ? "right" : "left"}: ${gap(side2)}`,
205
+ );
160
206
  expect(rules).toContain(`align-items: ${align}`);
161
207
  });
162
208
 
@@ -166,6 +212,8 @@ describe("HkDockBar anchor geometry contract", () => {
166
212
  expect(page).toContain("position: absolute");
167
213
  expect(plane, "plane rule must exist").toBeTruthy();
168
214
  expect(plane).toContain("margin: 0 auto");
215
+ expect(plane).toContain(`margin: 0 auto ${inset("bottom")}`);
216
+ expect(plane).toContain(`padding-block-start: ${gap("bottom")}`);
169
217
  expect(plane).not.toContain("position: absolute");
170
218
  });
171
219
 
@@ -179,7 +227,10 @@ describe("HkDockBar anchor geometry contract", () => {
179
227
  const base = scss.match(/\.hk-dock-bar-surface\s*\{[^}]*\}/)?.[0];
180
228
  expect(base, "base surface rule must exist").toBeTruthy();
181
229
  expect(base).toContain("width: var(--dock-width, auto)");
182
- expect(base).toContain("max-width: var(--dock-max-width");
230
+ // The viewport cap reads the SAME edge gaps the anchoring rules read.
231
+ expect(base).toContain(
232
+ `max-width: var(--dock-max-width, calc(100vw - ${gap("left")} - ${gap("right")}))`,
233
+ );
183
234
  expect(base).toContain("max-height: var(--dock-max-height, none)");
184
235
  expect(base).toContain("padding: var(--dock-padding");
185
236
  });
@@ -189,7 +240,9 @@ describe("HkDockBar anchor geometry contract", () => {
189
240
  /\.hk-dock-bar\[data-anchor="left"\] \.hk-dock-bar-surface[^{]*\{[^}]*\}/,
190
241
  )?.[0];
191
242
  expect(sideCap, "side-anchor surface cap rule must exist").toBeTruthy();
192
- expect(sideCap).toContain("max-height: var(--dock-max-height");
243
+ expect(sideCap).toContain(
244
+ `max-height: var(--dock-max-height, calc(100dvh - ${gap("top")} - ${gap("bottom")}))`,
245
+ );
193
246
  expect(sideCap).toContain("100dvh");
194
247
  });
195
248
 
@@ -200,4 +253,36 @@ describe("HkDockBar anchor geometry contract", () => {
200
253
  expect(solid, "solid surface rule must exist").toBeTruthy();
201
254
  expect(solid).toContain("@include backdrop-filter(none)");
202
255
  });
256
+
257
+ it("keeps inline bands PHYSICAL so dir=rtl cannot flip them onto the pinned side", () => {
258
+ // The anchors are physical (`left:` / `right:` + `env(safe-area-inset-left/
259
+ // right)`), so an inline band must be physical too: `padding-inline-end` on
260
+ // a left-anchored dock resolves to the physical LEFT under `dir="rtl"` —
261
+ // the same side as the pinned edge (the surface pushed one extra gap in,
262
+ // reading `gap + gap` from the edge) while the content face stays bare, so
263
+ // content touches the surface again. Physical longhands are
264
+ // direction-independent, which is exactly what keeps the band on the
265
+ // content-facing face in both directions.
266
+ // Only declarations: the header prose explains the trap and names both
267
+ // logical longhands.
268
+ expect(scss.replace(/\/\*[\s\S]*?\*\//g, "")).not.toMatch(/padding-inline-(start|end)/);
269
+ for (const [anchor, band] of [
270
+ ["left", "padding-right"],
271
+ ["right", "padding-left"],
272
+ ] as const) {
273
+ expect(rulesFor(anchor)).toContain(`${band}: ${gap(anchor)}`);
274
+ }
275
+ });
276
+
277
+ it("reads the legacy single inset only inside the edge chain", () => {
278
+ // Wrapping-count guard: `--hk-dock-inset` may appear only as the second
279
+ // link of the four edge chains. A rule reading it directly would bypass
280
+ // the per-edge override and re-split the family into two mechanisms. The
281
+ // header comment quotes the chain, so only declarations are counted.
282
+ const code = scss.replace(/\/\*[\s\S]*?\*\//g, "");
283
+ const direct = code.match(/var\(--hk-dock-inset(?!, var\(--hk-dock-gap)/g) ?? [];
284
+ expect(direct).toHaveLength(0);
285
+ const chains = code.match(/var\(--hk-dock-inset, var\(--hk-dock-gap, /g) ?? [];
286
+ expect(chains).toHaveLength(4);
287
+ });
203
288
  });
@@ -23,22 +23,55 @@ export type HkDockBarSurface = "glass" | "solid";
23
23
  * (surface, blur, border, radius, reverse glow) means no dock surface
24
24
  * ever re-declares its own background or shadow again.
25
25
  *
26
+ * Edge gap contract (2026-11-15): a dock owns BOTH of its content-side
27
+ * distances, and reads both from one CSS token family — the resting
28
+ * inset from the viewport edge it hugs, and a transparent CONTENT BAND on
29
+ * the face that points at the content:
30
+ *
31
+ * G(edge) = var(--hk-dock-gap-<edge>,
32
+ * var(--hk-dock-inset, var(--hk-dock-gap, var(--space-16, 1rem))))
33
+ *
34
+ * `--hk-dock-gap` is declared once by the foundation layer (16px); a host
35
+ * overrides it through the `gap` prop (one CSS length, written inline as
36
+ * `--hk-dock-gap`), or per edge through `--hk-dock-gap-<edge>` /
37
+ * `--hk-dock-inset` on any ancestor. Every edge also adds its safe-area
38
+ * inset to the resting distance, so a notched device keeps the gap on top
39
+ * of the system inset while a desktop resolves it to 0.
40
+ *
41
+ * The band belongs to the DOCK, not to the view that hosts it, and that
42
+ * is what makes both placements self-consistent with no host recipe:
43
+ * - in a `HkScrollContainer` PIN slot the dock is a flex SIBLING of the
44
+ * scroll viewport, so the wrapper box (band + surface + inset) makes
45
+ * the viewport yield the band by layout: content ends `gap` above the
46
+ * surface with no view padding, so `min-height: 100%` content cannot
47
+ * resurrect the phantom-scroll trap;
48
+ * - a FLOATING dock (page / plane) is measured by its own
49
+ * getBoundingClientRect, which already includes padding — so the
50
+ * occupancy a host publishes to its content (the tail padding a
51
+ * consumer reads) automatically contains "surface + inset + band", and
52
+ * scrolling content stops `gap` short of the surface. Nothing in JS
53
+ * reads a CSS length.
54
+ *
26
55
  * Anchors — the full eight-way compass (4 edges + 4 corners):
27
56
  * - `page` (default) and `bottom`: absolute bottom-center of the
28
- * nearest positioned ancestor (the SOUTH edge), `--hk-dock-inset`
29
- * above its content floor. `page` is the 2026-09-02 spelling kept
30
- * for existing callers; `bottom` is its compass alias — identical
31
- * geometry, pick either.
32
- * - `top`: absolute top-center (north edge) with the same inset.
57
+ * nearest positioned ancestor (the SOUTH edge), one bottom gap above
58
+ * its content floor, with the band on the block-start side. `page` is
59
+ * the 2026-09-02 spelling kept for existing callers; `bottom` is its
60
+ * compass alias — identical geometry, pick either.
61
+ * - `top`: absolute top-center (north edge) with the top gap, band on
62
+ * the block-end side.
33
63
  * - `left` / `right`: absolute middle of the west / east edge — the
34
- * dock runs vertically and is centered with translateY; its surface
35
- * gets a viewport-aware default max-height.
64
+ * dock runs vertically and is centered with translateY; the band is
65
+ * on the inline content side and its surface gets a viewport-aware
66
+ * default max-height (both horizontal gaps subtracted).
36
67
  * - `top-left` / `top-right` / `bottom-left` / `bottom-right`:
37
- * absolute corner attachment with the same inset, for pagers,
38
- * toolbars and HUD panels that live off-center.
68
+ * absolute corner attachment with both edge gaps, for pagers,
69
+ * toolbars and HUD panels that live off-center; the band opens on
70
+ * both content-facing sides.
39
71
  * - `plane`: NOT a compass direction — in-flow; the host provides
40
72
  * the plane (e.g. a fixed footer band) and this container centers
41
- * the surface horizontally. Use it when the host owns positioning.
73
+ * the surface horizontally, lifts it by the bottom gap and opens the
74
+ * same gap above it. Use it when the host owns positioning.
42
75
  *
43
76
  * Relationship to HkScrollContainer: that component's dockTop /
44
77
  * dockBottom named slots are the contract for docks that live INSIDE a
@@ -95,6 +128,12 @@ const HkDockBar = defineComponent({
95
128
  maxHeight: { type: String, default: undefined },
96
129
  /** CSS padding override; defaults to the shared chrome rhythm. */
97
130
  padding: { type: String, default: undefined },
131
+ /** CSS length of this dock's edge gap (a larger-than-default dock
132
+ * passes e.g. `1.5rem`); inline `--hk-dock-gap`, which the sheet
133
+ * resolves per edge through `--hk-dock-gap-<edge>` →
134
+ * `--hk-dock-inset` → default. Leave unset to inherit the host's
135
+ * value (the foundation 16px when nothing overrides it). */
136
+ gap: { type: String, default: undefined },
98
137
  },
99
138
  setup(props, { slots }) {
100
139
  const style = computed(() => {
@@ -103,6 +142,7 @@ const HkDockBar = defineComponent({
103
142
  if (props.maxWidth) s["--dock-max-width"] = props.maxWidth;
104
143
  if (props.maxHeight) s["--dock-max-height"] = props.maxHeight;
105
144
  if (props.padding) s["--dock-padding"] = props.padding;
145
+ if (props.gap) s["--hk-dock-gap"] = props.gap;
106
146
  return s;
107
147
  });
108
148
 
@@ -1135,7 +1135,11 @@ export default defineComponent({
1135
1135
  * a consumer's content end-padding can clear the dock with breathing
1136
1136
  * room (padding-bottom: calc(var(--hk-scroll-dock-bottom, 0px) +
1137
1137
  * 2rem)) instead of hand-rolled px guesses that go stale when the dock
1138
- * reflows. In `dockMode="ride"` the same var IS the layout: the ride
1138
+ * reflows. The measured box is the dock's WHOLE box, so it already
1139
+ * contains the dock's own edge gap band and resting inset
1140
+ * (HkDockBar.scss, 2026-11-15): a consumer reserves the dock once and
1141
+ * never adds a dock inset on top. In `dockMode="ride"` the same var IS
1142
+ * the layout: the ride
1139
1143
  * spacer spends it as the one-dock-height air above the dock, so the
1140
1144
  * measurement feeds the geometry instead of only a consumer's padding
1141
1145
  * (see the dockMode prop doc). ResizeObserver keeps it live across
@@ -39,7 +39,7 @@ import { BOOT_LANDING_DETAILS_CSS } from "./bootLandingDetailsCss.js";
39
39
 
40
40
  /** The default script's bytes, pinned so an accidental default change fails. */
41
41
  const DEFAULT_SCRIPT_SHA256 =
42
- "070e2d6320eaaafeb9138ec390189fde61522d831a1eb78c46be1358f3be6d97";
42
+ "bc5d894de22ad8d5a262e5c5a222613bfcc5075807170ccd0027e11a8e8e556d";
43
43
  /** The heal-only script's bytes (the other shape a host may hash). */
44
44
  const HEAL_ONLY_SCRIPT_SHA256 =
45
45
  "bee06d4652e55708d8b130fec11ff8ede54d4eafb944ef0d18f7be5a76b3dca6";
@@ -34,7 +34,7 @@ import {
34
34
  */
35
35
 
36
36
  const GOLDEN_DEFAULT_SHA256 =
37
- "070e2d6320eaaafeb9138ec390189fde61522d831a1eb78c46be1358f3be6d97";
37
+ "bc5d894de22ad8d5a262e5c5a222613bfcc5075807170ccd0027e11a8e8e556d";
38
38
  const GOLDEN_HEAL_ONLY_SHA256 =
39
39
  "bee06d4652e55708d8b130fec11ff8ede54d4eafb944ef0d18f7be5a76b3dca6";
40
40
 
@@ -28,7 +28,7 @@ import { bootRecoveryScript } from "./boot-recovery.js";
28
28
  */
29
29
 
30
30
  const GOLDEN_DEFAULT_SHA256 =
31
- "070e2d6320eaaafeb9138ec390189fde61522d831a1eb78c46be1358f3be6d97";
31
+ "bc5d894de22ad8d5a262e5c5a222613bfcc5075807170ccd0027e11a8e8e556d";
32
32
  const GOLDEN_HEAL_ONLY_SHA256 =
33
33
  "bee06d4652e55708d8b130fec11ff8ede54d4eafb944ef0d18f7be5a76b3dca6";
34
34
 
@@ -11,4 +11,4 @@
11
11
  // HkErrorLanding, so it ships the component's real stylesheet instead of a
12
12
  // hand-copied palette. bootLandingCss.test.ts recompiles the entry and fails
13
13
  // on drift.
14
- export const BOOT_LANDING_CSS = ":root{--c-primary-faint: rgb(var(--color-primary, 122 162 247) / 5%);--c-primary-subtle: rgb(var(--color-primary, 122 162 247) / 8%);--c-primary-dim: rgb(var(--color-primary, 122 162 247) / 10%);--c-primary-light: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-overlay: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-medium: rgb(var(--color-primary, 122 162 247) / 25%);--c-primary-strong: rgb(var(--color-primary, 122 162 247) / 40%);--c-primary-intense: rgb(var(--color-primary, 122 162 247) / 40%);--c-error-dim: rgb(var(--color-error, 247 118 142) / 10%);--c-error-overlay: rgb(var(--color-error, 247 118 142) / 20%);--c-error-strong: rgb(var(--color-error, 247 118 142) / 50%);--shadow-elevated: 0 8px 32px rgb(0 0 0 / 15%);--shadow-dropdown: 0 4px 24px rgb(0 0 0 / 12%), 0 0 0 1px rgb(255 255 255 / 4%);--shadow-button: 0 4px 14px rgb(var(--color-primary, 122 162 247) / 35%);--shadow-button-danger: 0 4px 14px rgb(var(--color-error, 247 118 142) / 35%);--shadow-focus: 0 0 0 3px rgb(var(--color-primary, 122 162 247) / 12%);--shadow-focus-error: 0 0 0 3px rgb(var(--color-error, 247 118 142) / 12%);--border-input: rgb(var(--color-border, 100 100 100) / 15%);--border-faint: rgb(var(--color-border, 100 100 100) / 10%);--border-subtle: rgb(var(--color-border, 100 100 100) / 12%);--hi-icon-color: rgb(var(--color-text, 30 30 30));--hi-icon-size-xs: 0.75rem;--hi-icon-size-sm: 1rem;--hi-icon-size-md: 1.25rem;--hi-icon-size-lg: 1.5rem;--hi-duration-instant: var(--duration-instant, 0.1s);--hi-border-color-focus: rgb(var(--color-primary, 122 162 247));--hi-glow-color: transparent;--hi-bg-surface-dark: rgb(var(--color-muted, 108 108 108) / 12%);--hi-color-primary-dark: color-mix(in srgb, rgb(var(--color-primary, 122 162 247)) 82%, #000);--hi-color-secondary-dark: color-mix(in srgb, rgb(var(--color-secondary, 81 154 115)) 82%, #000);--hi-color-danger-dark: color-mix(in srgb, rgb(var(--color-error, 247 118 142)) 82%, #000);--hi-color-success-dark: color-mix(in srgb, rgb(var(--color-success, 14 184 64)) 82%, #000);--hi-color-text-on-secondary: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-danger: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-success: rgb(var(--color-on-solid, 255 255 255))}:root{--color-primary: 122 162 247;--color-on-primary: 255 255 255;--color-on-solid: 255 255 255;--color-on-solid-text: 255 255 255;--color-on-solid-icon: 255 255 255;--color-on-danger: 255 255 255;--color-on-success: 255 255 255;--color-on-warning: 0 0 0;--color-on-info: 0 0 0;--color-secondary: 81 154 115;--color-accent: 247 181 0;--color-text: 30 30 30;--color-text-secondary: 102 102 102;--color-text-tertiary: 140 140 140;--color-muted: 108 108 108;--color-border: 100 100 100;--color-focused-border: 122 162 247;--color-background: 255 255 255;--color-surface: 255 255 255;--color-selected-bg: 191 218 242;--color-selected-text: 30 30 30;--color-status-bar-bg: 240 244 248;--color-success: 14 184 64;--color-error: 247 118 142;--color-warning: 238 214 119;--color-info: 106 190 214;--hi-color-primary: rgb(var(--color-primary));--hi-color-secondary: rgb(var(--color-secondary));--hi-color-surface: rgb(var(--color-surface));--hi-color-background: rgb(var(--color-background));--hi-color-border: rgb(var(--color-border) / 15%);--hi-color-text-primary: rgb(var(--color-text));--hi-color-text-secondary: rgb(var(--color-text-secondary));--hi-color-muted: rgb(var(--color-muted));--hi-color-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-solid: rgb(var(--color-on-solid-text, 255 255 255));--hi-color-icon-on-solid: rgb(var(--color-on-solid-icon, 255 255 255));--hi-color-success: rgb(var(--color-success));--hi-color-error: rgb(var(--color-error));--hi-color-warning: rgb(var(--color-warning));--hi-color-info: rgb(var(--color-info));--hi-color-text-on-danger: rgb(var(--color-on-danger));--hi-color-text-on-success: rgb(var(--color-on-success));--hi-color-text-on-warning: rgb(var(--color-on-warning));--hi-color-text-on-info: rgb(var(--color-on-info));--hi-color-bg-subtle: rgb(var(--color-surface) / 0.5);--hi-color-bg-elevated: rgb(var(--color-surface));--hi-color-bg-canvas: rgb(var(--color-background));--hi-secondary-bg: rgb(var(--color-surface) / 0.5);--hi-color-accent: rgb(var(--color-accent));--hi-primary: var(--hi-color-primary);--hi-surface: var(--hi-color-surface);--hi-card-bg: var(--hi-color-surface)}:root{--space-1: 0.0625rem;--space-2: 0.125rem;--space-4: 0.25rem;--space-6: 0.375rem;--space-8: 0.5rem;--space-10: 0.625rem;--space-12: 0.75rem;--space-14: 0.875rem;--space-16: 1rem;--space-20: 1.25rem;--space-24: 1.5rem;--space-28: 1.75rem;--space-32: 2rem;--space-40: 2.5rem;--text-3xs: 0.5rem;--text-2xs: 0.625rem;--text-xs: 0.75rem;--text-sm: 0.8125rem;--text-base: 0.875rem;--text-md: 1rem;--text-lg: 1.125rem;--text-xl: 1.25rem;--text-2xl: 1.5rem;--radius-xs: 2px;--radius-sm: 4px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-full: 9999px;--blur-xs: 4px;--blur-sm: 8px;--blur-md: 16px;--blur-lg: 24px;--blur-xl: 24px;--opacity-half: 0.92;--duration-instant: 0.1s;--duration-short: 0.15s;--duration-fast: 0.15s;--duration-normal: 0.3s;--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);--ease-in: cubic-bezier(0.4, 0, 1, 1);--ease-elastic: cubic-bezier(0.16, 1, 0.3, 1);--hi-duration-fast: 0.15s;--hi-ease-default: cubic-bezier(0.4, 0, 0.2, 1);--hk-z-base: 0;--hk-z-above: 1;--hk-z-scrollbar: 10;--hk-z-fab: 40;--hk-z-toolbar: 50;--hk-z-header: 100;--hk-z-sidebar: 900;--hk-z-drag: 950;--hk-z-breadcrumb: 2500;--hk-z-float: 3000;--hk-z-toast: 4000;--hk-z-veil: 4100;--hk-z-modal: 5000;--hk-z-tooltip: 6000;--hk-z-debug-float: 80000;--hk-z-overlay-root: 90000;--hk-z-hud: 90050;--hk-z-error: 95000;--hk-z-emergency: 96000;--hk-z-titlebar: 100001;--viewport-gutter: 16px;--font-sans: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", sans-serif;--font-reading: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", sans-serif;--font-mono: ui-monospace, \"SF Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", \"Liberation Mono\", \"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", monospace}@media(max-width: 767px){:root{--viewport-gutter: 8px}}.hk-error-landing{--hel-background: var(--color-background, 246 247 249);--hel-surface: var(--color-surface, 255 255 255);--hel-text: var(--color-text, 30 32 36);--hel-muted: var(--color-muted, 118 122 128);--hel-border: var(--color-border, 222 224 228);--hel-primary: var(--color-primary, 58 118 236);--hel-error: var(--color-error, 226 84 84);--hel-warning: var(--color-warning, 222 168 62);width:100%;min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:var(--space-20, 1.25rem);background:rgb(var(--hel-background));color:rgb(var(--hel-text));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)}.hk-error-landing__card{position:relative;overflow:hidden;width:min(440px,100%);background:rgb(var(--hel-surface));border:1px solid rgb(var(--hel-border)/70%);border-radius:var(--radius-xl, 16px);box-shadow:var(--shadow-lg, 0 18px 48px rgba(0, 0, 0, 0.08));padding:2.25rem var(--space-28, 1.75rem) var(--space-28, 1.75rem);text-align:center}.hk-error-landing__card::before{content:\"\";position:absolute;inset:0 0 auto;height:150px;background:radial-gradient(58% 100% at 50% 0%, rgb(var(--hel-error)/8%), transparent 72%);pointer-events:none}.hk-error-landing.is-warning .hk-error-landing__card::before{background:radial-gradient(58% 100% at 50% 0%, rgb(var(--hel-warning)/10%), transparent 72%)}.hk-error-landing.is-info .hk-error-landing__card::before{background:radial-gradient(58% 100% at 50% 0%, rgb(var(--hel-primary)/7%), transparent 72%)}.hk-error-landing__brand{position:relative;display:flex;justify-content:center;margin-bottom:var(--space-16, 1rem)}.hk-error-landing__brand:empty{display:none}.hk-error-landing__icon{position:relative;width:64px;height:64px;margin:0 auto var(--space-14, 0.875rem);display:flex;align-items:center;justify-content:center;border-radius:50%}.hk-error-landing__icon,.hk-error-landing__icon svg{color:rgb(var(--hel-error))}.hk-error-landing__icon{background:linear-gradient(145deg, rgb(var(--hel-error)/18%), rgb(var(--hel-error)/6%));border:1px solid rgb(var(--hel-error)/26%);box-shadow:0 0 0 8px rgb(var(--hel-error)/5%),0 10px 28px -12px rgb(var(--hel-error)/45%)}.hk-error-landing.is-warning .hk-error-landing__icon,.hk-error-landing.is-warning .hk-error-landing__icon svg{color:rgb(var(--hel-warning))}.hk-error-landing.is-warning .hk-error-landing__icon{background:linear-gradient(145deg, rgb(var(--hel-warning)/20%), rgb(var(--hel-warning)/7%));border-color:rgb(var(--hel-warning)/28%);box-shadow:0 0 0 8px rgb(var(--hel-warning)/6%),0 10px 28px -12px rgb(var(--hel-warning)/45%)}.hk-error-landing.is-info .hk-error-landing__icon,.hk-error-landing.is-info .hk-error-landing__icon svg{color:rgb(var(--hel-primary))}.hk-error-landing.is-info .hk-error-landing__icon{background:linear-gradient(145deg, rgb(var(--hel-primary)/16%), rgb(var(--hel-primary)/5%));border-color:rgb(var(--hel-primary)/24%);box-shadow:0 0 0 8px rgb(var(--hel-primary)/5%),0 10px 28px -12px rgb(var(--hel-primary)/40%)}.hk-error-landing__meta{position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--space-6, 0.375rem);margin-bottom:var(--space-8, 0.5rem)}.hk-error-landing__meta .hk-badge:not(.hk-badge-muted){--hk-badge-text: rgb(var(--hel-error));--hk-badge-bg: rgb(var(--hel-error) / 10%);--hk-badge-border: rgb(var(--hel-error) / 22%)}.hk-error-landing.is-warning .hk-error-landing__meta .hk-badge:not(.hk-badge-muted){--hk-badge-text: rgb(var(--hel-warning));--hk-badge-bg: rgb(var(--hel-warning) / 12%);--hk-badge-border: rgb(var(--hel-warning) / 24%)}.hk-error-landing.is-info .hk-error-landing__meta .hk-badge:not(.hk-badge-muted){--hk-badge-text: rgb(var(--hel-primary));--hk-badge-bg: rgb(var(--hel-primary) / 10%);--hk-badge-border: rgb(var(--hel-primary) / 20%)}.hk-error-landing__meta .hk-badge-muted{--hk-badge-text: rgb(var(--hel-muted));--hk-badge-bg: rgb(var(--hel-muted) / 8%);--hk-badge-border: rgb(var(--hel-border) / 80%)}.hk-error-landing__title{position:relative;margin:0;font-size:var(--text-xl, 1.25rem);font-weight:650;letter-spacing:-0.01em;line-height:1.35;color:rgb(var(--hel-text));white-space:pre-line;overflow-wrap:anywhere}.hk-error-landing__desc{position:relative;margin:var(--space-8, 0.5rem) 0 0;font-size:var(--text-sm, 0.8125rem);line-height:1.6;color:rgb(var(--hel-muted));white-space:pre-line;overflow-wrap:anywhere}.hk-error-landing__details{position:relative;margin-top:var(--space-16, 1rem);text-align:start}.hk-error-landing__details-label{display:flex;align-items:center;gap:var(--space-4, 4px);padding:0 var(--space-2, 2px);font-size:var(--text-xs, 0.75rem);font-weight:500;letter-spacing:.02em;color:rgb(var(--hel-muted));-webkit-user-select:none;user-select:none}.hk-error-landing__details-pane{position:relative;margin-top:var(--space-6, 0.375rem);height:max(9rem,20vh);height:max(9rem,20dvh);border:1px solid rgb(var(--hel-border)/70%);border-radius:var(--radius-md, 8px);background:rgb(var(--hel-muted)/4%)}.hk-error-landing__details-body{height:100%;overflow:auto;border-radius:inherit;padding:var(--space-4, 0.25rem);scrollbar-width:none}.hk-error-landing__details-body::-webkit-scrollbar{display:none}.hk-error-landing .hk-error-landing__details-body .s-tool-json-tree{max-height:none;height:auto;overflow:visible;margin:0;padding:0;border:none;border-radius:0;background:rgba(0,0,0,0)}.hk-error-landing__actions{position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--space-8, 0.5rem);margin-top:var(--space-16, 1rem)}.hk-error-landing.is-inline{min-height:100%;padding:0 var(--space-12, 0.75rem);align-items:flex-start;background:rgba(0,0,0,0)}.hk-error-landing.is-inline.is-fill{flex:1 1 auto;min-height:0}.hk-error-landing.is-inline .hk-error-landing__card{margin:auto;padding:var(--space-16, 1rem) var(--space-28, 1.75rem) var(--space-24, 1.5rem);display:flex;flex-direction:column;max-height:100%;min-height:min-content}.hk-error-landing.is-inline .hk-error-landing__details{display:flex;flex-direction:column;min-height:0}.hk-error-landing.is-inline .hk-error-landing__details-pane{height:auto;flex-grow:0;flex-shrink:1;flex-basis:max(9rem,20vh);flex-basis:max(9rem,20dvh);min-height:6rem}@media(max-width: 480px){.hk-error-landing__card{padding:var(--space-28, 1.75rem) 1.125rem var(--space-24, 1.5rem)}}:root{--c-primary-faint: rgb(var(--color-primary, 122 162 247) / 5%);--c-primary-subtle: rgb(var(--color-primary, 122 162 247) / 8%);--c-primary-dim: rgb(var(--color-primary, 122 162 247) / 10%);--c-primary-light: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-overlay: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-medium: rgb(var(--color-primary, 122 162 247) / 25%);--c-primary-strong: rgb(var(--color-primary, 122 162 247) / 40%);--c-primary-intense: rgb(var(--color-primary, 122 162 247) / 40%);--c-error-dim: rgb(var(--color-error, 247 118 142) / 10%);--c-error-overlay: rgb(var(--color-error, 247 118 142) / 20%);--c-error-strong: rgb(var(--color-error, 247 118 142) / 50%);--shadow-elevated: 0 8px 32px rgb(0 0 0 / 15%);--shadow-dropdown: 0 4px 24px rgb(0 0 0 / 12%), 0 0 0 1px rgb(255 255 255 / 4%);--shadow-button: 0 4px 14px rgb(var(--color-primary, 122 162 247) / 35%);--shadow-button-danger: 0 4px 14px rgb(var(--color-error, 247 118 142) / 35%);--shadow-focus: 0 0 0 3px rgb(var(--color-primary, 122 162 247) / 12%);--shadow-focus-error: 0 0 0 3px rgb(var(--color-error, 247 118 142) / 12%);--border-input: rgb(var(--color-border, 100 100 100) / 15%);--border-faint: rgb(var(--color-border, 100 100 100) / 10%);--border-subtle: rgb(var(--color-border, 100 100 100) / 12%);--hi-icon-color: rgb(var(--color-text, 30 30 30));--hi-icon-size-xs: 0.75rem;--hi-icon-size-sm: 1rem;--hi-icon-size-md: 1.25rem;--hi-icon-size-lg: 1.5rem;--hi-duration-instant: var(--duration-instant, 0.1s);--hi-border-color-focus: rgb(var(--color-primary, 122 162 247));--hi-glow-color: transparent;--hi-bg-surface-dark: rgb(var(--color-muted, 108 108 108) / 12%);--hi-color-primary-dark: color-mix(in srgb, rgb(var(--color-primary, 122 162 247)) 82%, #000);--hi-color-secondary-dark: color-mix(in srgb, rgb(var(--color-secondary, 81 154 115)) 82%, #000);--hi-color-danger-dark: color-mix(in srgb, rgb(var(--color-error, 247 118 142)) 82%, #000);--hi-color-success-dark: color-mix(in srgb, rgb(var(--color-success, 14 184 64)) 82%, #000);--hi-color-text-on-secondary: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-danger: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-success: rgb(var(--color-on-solid, 255 255 255))}:root{--color-primary: 122 162 247;--color-on-primary: 255 255 255;--color-on-solid: 255 255 255;--color-on-solid-text: 255 255 255;--color-on-solid-icon: 255 255 255;--color-on-danger: 255 255 255;--color-on-success: 255 255 255;--color-on-warning: 0 0 0;--color-on-info: 0 0 0;--color-secondary: 81 154 115;--color-accent: 247 181 0;--color-text: 30 30 30;--color-text-secondary: 102 102 102;--color-text-tertiary: 140 140 140;--color-muted: 108 108 108;--color-border: 100 100 100;--color-focused-border: 122 162 247;--color-background: 255 255 255;--color-surface: 255 255 255;--color-selected-bg: 191 218 242;--color-selected-text: 30 30 30;--color-status-bar-bg: 240 244 248;--color-success: 14 184 64;--color-error: 247 118 142;--color-warning: 238 214 119;--color-info: 106 190 214;--hi-color-primary: rgb(var(--color-primary));--hi-color-secondary: rgb(var(--color-secondary));--hi-color-surface: rgb(var(--color-surface));--hi-color-background: rgb(var(--color-background));--hi-color-border: rgb(var(--color-border) / 15%);--hi-color-text-primary: rgb(var(--color-text));--hi-color-text-secondary: rgb(var(--color-text-secondary));--hi-color-muted: rgb(var(--color-muted));--hi-color-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-solid: rgb(var(--color-on-solid-text, 255 255 255));--hi-color-icon-on-solid: rgb(var(--color-on-solid-icon, 255 255 255));--hi-color-success: rgb(var(--color-success));--hi-color-error: rgb(var(--color-error));--hi-color-warning: rgb(var(--color-warning));--hi-color-info: rgb(var(--color-info));--hi-color-text-on-danger: rgb(var(--color-on-danger));--hi-color-text-on-success: rgb(var(--color-on-success));--hi-color-text-on-warning: rgb(var(--color-on-warning));--hi-color-text-on-info: rgb(var(--color-on-info));--hi-color-bg-subtle: rgb(var(--color-surface) / 0.5);--hi-color-bg-elevated: rgb(var(--color-surface));--hi-color-bg-canvas: rgb(var(--color-background));--hi-secondary-bg: rgb(var(--color-surface) / 0.5);--hi-color-accent: rgb(var(--color-accent));--hi-primary: var(--hi-color-primary);--hi-surface: var(--hi-color-surface);--hi-card-bg: var(--hi-color-surface)}.hk-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-6);font-family:inherit;font-weight:600;line-height:1;border:1px solid rgba(0,0,0,0);border-radius:var(--radius-md, 8px);cursor:pointer;transition-property:background-color,border-color,color,box-shadow,opacity,transform,filter;transition-duration:var(--duration-normal);transition-timing-function:var(--ease-standard);white-space:nowrap;-webkit-user-select:none;user-select:none;outline:none;position:relative}.hk-btn:focus-visible{box-shadow:0 0 0 2px rgb(var(--color-surface)),0 0 0 4px rgb(var(--color-primary))}.hk-btn:disabled{opacity:.5;cursor:not-allowed}.hk-btn-xs{padding:var(--space-4) var(--space-8);font-size:var(--text-xs);min-height:1.375rem}.hk-btn-sm{padding:var(--space-6) var(--space-12);font-size:var(--text-xs);min-height:1.75rem}.hk-btn-md{padding:var(--space-8) var(--space-16);font-size:var(--text-base);min-height:2.5rem}.hk-btn-lg{padding:var(--space-10) var(--space-24);font-size:var(--text-base);min-height:2.75rem}.hk-btn-xs .hk-btn-icon,.hk-btn-xs .hk-btn-suffix{inline-size:.8125rem;block-size:.8125rem}.hk-btn-xs .hk-btn-icon .hk-icon,.hk-btn-xs .hk-btn-suffix .hk-icon{inline-size:100%;block-size:100%}.hk-btn-icon,.hk-btn-suffix{display:inline-flex;align-items:center;justify-content:center;flex:none;inline-size:1rem;block-size:1rem;line-height:0}.hk-btn-icon svg,.hk-btn-suffix svg{display:block}.hk-btn>svg{flex:none}.hk-btn-icon-only{padding:0;box-sizing:border-box}.hk-btn-xs.hk-btn-icon-only{width:1.375rem}.hk-btn-sm.hk-btn-icon-only{width:1.75rem}.hk-btn-md.hk-btn-icon-only{width:2.5rem}.hk-btn-lg.hk-btn-icon-only{width:2.75rem}.hk-btn-block.hk-btn-icon-only{width:100%}.hk-btn-label{display:inline-flex;align-items:center;min-width:0}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}.hk-btn-primary{background:rgb(var(--color-primary));color:rgb(var(--color-on-solid))}.hk-btn-primary svg{color:rgb(var(--color-on-solid-icon, 255 255 255))}.hk-btn-primary:hover:not(:disabled):not(:focus-visible){filter:brightness(1.1);box-shadow:var(--shadow-button)}.hk-btn-primary:active:not(:disabled){filter:brightness(0.95)}.hk-btn-secondary{background:rgb(var(--color-surface));color:rgb(var(--color-text));border-color:rgb(var(--color-border)/20%);-webkit-backdrop-filter:var(--hk-btn-secondary-blur, blur(var(--blur-sm)));backdrop-filter:var(--hk-btn-secondary-blur, blur(var(--blur-sm)))}.hk-btn-secondary:hover:not(:disabled){border-color:var(--c-primary-strong)}.hk-btn-secondary:active:not(:disabled){filter:brightness(0.95)}.hk-btn-outline{background:rgba(0,0,0,0);color:rgb(var(--color-primary));border-color:var(--c-primary-intense)}.hk-btn-outline:hover:not(:disabled){background:var(--c-primary-light);border-color:rgb(var(--color-primary))}.hk-btn-outline:active:not(:disabled){filter:brightness(0.95)}.hk-btn-ghost{background:rgba(0,0,0,0);color:rgb(var(--color-text));border-color:rgba(0,0,0,0)}.hk-btn-ghost:hover:not(:disabled){background:var(--c-primary-light)}.hk-btn-ghost:active:not(:disabled){filter:brightness(0.95)}.hk-btn-danger{background:rgb(var(--color-error));color:rgb(var(--color-on-solid))}.hk-btn-danger:hover:not(:disabled):not(:focus-visible){filter:brightness(1.1);box-shadow:var(--shadow-button-danger)}.hk-btn-danger:active:not(:disabled){filter:brightness(0.95)}.hk-btn-block{width:100%}.hk-btn-loading{pointer-events:none}@media(prefers-color-scheme: dark){:root{--color-primary: 136 192 208;--color-on-solid: 46 52 64;--color-on-solid-text: 46 52 64;--color-on-solid-icon: 46 52 64;--color-text: 247 249 252;--color-muted: 180 180 180;--color-border: 128 128 128;--color-background: 22 27 38;--color-surface: 34 40 54;--color-error: 191 97 106}}";
14
+ export const BOOT_LANDING_CSS = ":root{--c-primary-faint: rgb(var(--color-primary, 122 162 247) / 5%);--c-primary-subtle: rgb(var(--color-primary, 122 162 247) / 8%);--c-primary-dim: rgb(var(--color-primary, 122 162 247) / 10%);--c-primary-light: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-overlay: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-medium: rgb(var(--color-primary, 122 162 247) / 25%);--c-primary-strong: rgb(var(--color-primary, 122 162 247) / 40%);--c-primary-intense: rgb(var(--color-primary, 122 162 247) / 40%);--c-error-dim: rgb(var(--color-error, 247 118 142) / 10%);--c-error-overlay: rgb(var(--color-error, 247 118 142) / 20%);--c-error-strong: rgb(var(--color-error, 247 118 142) / 50%);--shadow-elevated: 0 8px 32px rgb(0 0 0 / 15%);--shadow-dropdown: 0 4px 24px rgb(0 0 0 / 12%), 0 0 0 1px rgb(255 255 255 / 4%);--shadow-button: 0 4px 14px rgb(var(--color-primary, 122 162 247) / 35%);--shadow-button-danger: 0 4px 14px rgb(var(--color-error, 247 118 142) / 35%);--shadow-focus: 0 0 0 3px rgb(var(--color-primary, 122 162 247) / 12%);--shadow-focus-error: 0 0 0 3px rgb(var(--color-error, 247 118 142) / 12%);--border-input: rgb(var(--color-border, 100 100 100) / 15%);--border-faint: rgb(var(--color-border, 100 100 100) / 10%);--border-subtle: rgb(var(--color-border, 100 100 100) / 12%);--hi-icon-color: rgb(var(--color-text, 30 30 30));--hi-icon-size-xs: 0.75rem;--hi-icon-size-sm: 1rem;--hi-icon-size-md: 1.25rem;--hi-icon-size-lg: 1.5rem;--hi-duration-instant: var(--duration-instant, 0.1s);--hi-border-color-focus: rgb(var(--color-primary, 122 162 247));--hi-glow-color: transparent;--hi-bg-surface-dark: rgb(var(--color-muted, 108 108 108) / 12%);--hi-color-primary-dark: color-mix(in srgb, rgb(var(--color-primary, 122 162 247)) 82%, #000);--hi-color-secondary-dark: color-mix(in srgb, rgb(var(--color-secondary, 81 154 115)) 82%, #000);--hi-color-danger-dark: color-mix(in srgb, rgb(var(--color-error, 247 118 142)) 82%, #000);--hi-color-success-dark: color-mix(in srgb, rgb(var(--color-success, 14 184 64)) 82%, #000);--hi-color-text-on-secondary: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-danger: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-success: rgb(var(--color-on-solid, 255 255 255))}:root{--color-primary: 122 162 247;--color-on-primary: 255 255 255;--color-on-solid: 255 255 255;--color-on-solid-text: 255 255 255;--color-on-solid-icon: 255 255 255;--color-on-danger: 255 255 255;--color-on-success: 255 255 255;--color-on-warning: 0 0 0;--color-on-info: 0 0 0;--color-secondary: 81 154 115;--color-accent: 247 181 0;--color-text: 30 30 30;--color-text-secondary: 102 102 102;--color-text-tertiary: 140 140 140;--color-muted: 108 108 108;--color-border: 100 100 100;--color-focused-border: 122 162 247;--color-background: 255 255 255;--color-surface: 255 255 255;--color-selected-bg: 191 218 242;--color-selected-text: 30 30 30;--color-status-bar-bg: 240 244 248;--color-success: 14 184 64;--color-error: 247 118 142;--color-warning: 238 214 119;--color-info: 106 190 214;--hi-color-primary: rgb(var(--color-primary));--hi-color-secondary: rgb(var(--color-secondary));--hi-color-surface: rgb(var(--color-surface));--hi-color-background: rgb(var(--color-background));--hi-color-border: rgb(var(--color-border) / 15%);--hi-color-text-primary: rgb(var(--color-text));--hi-color-text-secondary: rgb(var(--color-text-secondary));--hi-color-muted: rgb(var(--color-muted));--hi-color-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-solid: rgb(var(--color-on-solid-text, 255 255 255));--hi-color-icon-on-solid: rgb(var(--color-on-solid-icon, 255 255 255));--hi-color-success: rgb(var(--color-success));--hi-color-error: rgb(var(--color-error));--hi-color-warning: rgb(var(--color-warning));--hi-color-info: rgb(var(--color-info));--hi-color-text-on-danger: rgb(var(--color-on-danger));--hi-color-text-on-success: rgb(var(--color-on-success));--hi-color-text-on-warning: rgb(var(--color-on-warning));--hi-color-text-on-info: rgb(var(--color-on-info));--hi-color-bg-subtle: rgb(var(--color-surface) / 0.5);--hi-color-bg-elevated: rgb(var(--color-surface));--hi-color-bg-canvas: rgb(var(--color-background));--hi-secondary-bg: rgb(var(--color-surface) / 0.5);--hi-color-accent: rgb(var(--color-accent));--hi-primary: var(--hi-color-primary);--hi-surface: var(--hi-color-surface);--hi-card-bg: var(--hi-color-surface)}:root{--space-1: 0.0625rem;--space-2: 0.125rem;--space-4: 0.25rem;--space-6: 0.375rem;--space-8: 0.5rem;--space-10: 0.625rem;--space-12: 0.75rem;--space-14: 0.875rem;--space-16: 1rem;--space-20: 1.25rem;--space-24: 1.5rem;--space-28: 1.75rem;--space-32: 2rem;--space-40: 2.5rem;--text-3xs: 0.5rem;--text-2xs: 0.625rem;--text-xs: 0.75rem;--text-sm: 0.8125rem;--text-base: 0.875rem;--text-md: 1rem;--text-lg: 1.125rem;--text-xl: 1.25rem;--text-2xl: 1.5rem;--radius-xs: 2px;--radius-sm: 4px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-full: 9999px;--blur-xs: 4px;--blur-sm: 8px;--blur-md: 16px;--blur-lg: 24px;--blur-xl: 24px;--opacity-half: 0.92;--duration-instant: 0.1s;--duration-short: 0.15s;--duration-fast: 0.15s;--duration-normal: 0.3s;--ease-standard: cubic-bezier(0.4, 0, 0.2, 1);--ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);--ease-in-expo: cubic-bezier(0.95, 0.05, 0.795, 0.035);--ease-in: cubic-bezier(0.4, 0, 1, 1);--ease-elastic: cubic-bezier(0.16, 1, 0.3, 1);--hi-duration-fast: 0.15s;--hi-ease-default: cubic-bezier(0.4, 0, 0.2, 1);--hk-z-base: 0;--hk-z-above: 1;--hk-z-scrollbar: 10;--hk-z-fab: 40;--hk-z-toolbar: 50;--hk-z-header: 100;--hk-z-sidebar: 900;--hk-z-drag: 950;--hk-z-breadcrumb: 2500;--hk-z-float: 3000;--hk-z-toast: 4000;--hk-z-veil: 4100;--hk-z-modal: 5000;--hk-z-tooltip: 6000;--hk-z-debug-float: 80000;--hk-z-overlay-root: 90000;--hk-z-hud: 90050;--hk-z-error: 95000;--hk-z-emergency: 96000;--hk-z-titlebar: 100001;--viewport-gutter: 16px;--hk-dock-gap: var(--space-16, 1rem);--font-sans: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", sans-serif;--font-reading: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"PingFang SC\", \"Hiragino Sans GB\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", sans-serif;--font-mono: ui-monospace, \"SF Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", \"Liberation Mono\", \"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", monospace}@media(max-width: 767px){:root{--viewport-gutter: 8px}}.hk-error-landing{--hel-background: var(--color-background, 246 247 249);--hel-surface: var(--color-surface, 255 255 255);--hel-text: var(--color-text, 30 32 36);--hel-muted: var(--color-muted, 118 122 128);--hel-border: var(--color-border, 222 224 228);--hel-primary: var(--color-primary, 58 118 236);--hel-error: var(--color-error, 226 84 84);--hel-warning: var(--color-warning, 222 168 62);width:100%;min-height:100vh;min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:var(--space-20, 1.25rem);background:rgb(var(--hel-background));color:rgb(var(--hel-text));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)}.hk-error-landing__card{position:relative;overflow:hidden;width:min(440px,100%);background:rgb(var(--hel-surface));border:1px solid rgb(var(--hel-border)/70%);border-radius:var(--radius-xl, 16px);box-shadow:var(--shadow-lg, 0 18px 48px rgba(0, 0, 0, 0.08));padding:2.25rem var(--space-28, 1.75rem) var(--space-28, 1.75rem);text-align:center}.hk-error-landing__card::before{content:\"\";position:absolute;inset:0 0 auto;height:150px;background:radial-gradient(58% 100% at 50% 0%, rgb(var(--hel-error)/8%), transparent 72%);pointer-events:none}.hk-error-landing.is-warning .hk-error-landing__card::before{background:radial-gradient(58% 100% at 50% 0%, rgb(var(--hel-warning)/10%), transparent 72%)}.hk-error-landing.is-info .hk-error-landing__card::before{background:radial-gradient(58% 100% at 50% 0%, rgb(var(--hel-primary)/7%), transparent 72%)}.hk-error-landing__brand{position:relative;display:flex;justify-content:center;margin-bottom:var(--space-16, 1rem)}.hk-error-landing__brand:empty{display:none}.hk-error-landing__icon{position:relative;width:64px;height:64px;margin:0 auto var(--space-14, 0.875rem);display:flex;align-items:center;justify-content:center;border-radius:50%}.hk-error-landing__icon,.hk-error-landing__icon svg{color:rgb(var(--hel-error))}.hk-error-landing__icon{background:linear-gradient(145deg, rgb(var(--hel-error)/18%), rgb(var(--hel-error)/6%));border:1px solid rgb(var(--hel-error)/26%);box-shadow:0 0 0 8px rgb(var(--hel-error)/5%),0 10px 28px -12px rgb(var(--hel-error)/45%)}.hk-error-landing.is-warning .hk-error-landing__icon,.hk-error-landing.is-warning .hk-error-landing__icon svg{color:rgb(var(--hel-warning))}.hk-error-landing.is-warning .hk-error-landing__icon{background:linear-gradient(145deg, rgb(var(--hel-warning)/20%), rgb(var(--hel-warning)/7%));border-color:rgb(var(--hel-warning)/28%);box-shadow:0 0 0 8px rgb(var(--hel-warning)/6%),0 10px 28px -12px rgb(var(--hel-warning)/45%)}.hk-error-landing.is-info .hk-error-landing__icon,.hk-error-landing.is-info .hk-error-landing__icon svg{color:rgb(var(--hel-primary))}.hk-error-landing.is-info .hk-error-landing__icon{background:linear-gradient(145deg, rgb(var(--hel-primary)/16%), rgb(var(--hel-primary)/5%));border-color:rgb(var(--hel-primary)/24%);box-shadow:0 0 0 8px rgb(var(--hel-primary)/5%),0 10px 28px -12px rgb(var(--hel-primary)/40%)}.hk-error-landing__meta{position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--space-6, 0.375rem);margin-bottom:var(--space-8, 0.5rem)}.hk-error-landing__meta .hk-badge:not(.hk-badge-muted){--hk-badge-text: rgb(var(--hel-error));--hk-badge-bg: rgb(var(--hel-error) / 10%);--hk-badge-border: rgb(var(--hel-error) / 22%)}.hk-error-landing.is-warning .hk-error-landing__meta .hk-badge:not(.hk-badge-muted){--hk-badge-text: rgb(var(--hel-warning));--hk-badge-bg: rgb(var(--hel-warning) / 12%);--hk-badge-border: rgb(var(--hel-warning) / 24%)}.hk-error-landing.is-info .hk-error-landing__meta .hk-badge:not(.hk-badge-muted){--hk-badge-text: rgb(var(--hel-primary));--hk-badge-bg: rgb(var(--hel-primary) / 10%);--hk-badge-border: rgb(var(--hel-primary) / 20%)}.hk-error-landing__meta .hk-badge-muted{--hk-badge-text: rgb(var(--hel-muted));--hk-badge-bg: rgb(var(--hel-muted) / 8%);--hk-badge-border: rgb(var(--hel-border) / 80%)}.hk-error-landing__title{position:relative;margin:0;font-size:var(--text-xl, 1.25rem);font-weight:650;letter-spacing:-0.01em;line-height:1.35;color:rgb(var(--hel-text));white-space:pre-line;overflow-wrap:anywhere}.hk-error-landing__desc{position:relative;margin:var(--space-8, 0.5rem) 0 0;font-size:var(--text-sm, 0.8125rem);line-height:1.6;color:rgb(var(--hel-muted));white-space:pre-line;overflow-wrap:anywhere}.hk-error-landing__details{position:relative;margin-top:var(--space-16, 1rem);text-align:start}.hk-error-landing__details-label{display:flex;align-items:center;gap:var(--space-4, 4px);padding:0 var(--space-2, 2px);font-size:var(--text-xs, 0.75rem);font-weight:500;letter-spacing:.02em;color:rgb(var(--hel-muted));-webkit-user-select:none;user-select:none}.hk-error-landing__details-pane{position:relative;margin-top:var(--space-6, 0.375rem);height:max(9rem,20vh);height:max(9rem,20dvh);border:1px solid rgb(var(--hel-border)/70%);border-radius:var(--radius-md, 8px);background:rgb(var(--hel-muted)/4%)}.hk-error-landing__details-body{height:100%;overflow:auto;border-radius:inherit;padding:var(--space-4, 0.25rem);scrollbar-width:none}.hk-error-landing__details-body::-webkit-scrollbar{display:none}.hk-error-landing .hk-error-landing__details-body .s-tool-json-tree{max-height:none;height:auto;overflow:visible;margin:0;padding:0;border:none;border-radius:0;background:rgba(0,0,0,0)}.hk-error-landing__actions{position:relative;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--space-8, 0.5rem);margin-top:var(--space-16, 1rem)}.hk-error-landing.is-inline{min-height:100%;padding:0 var(--space-12, 0.75rem);align-items:flex-start;background:rgba(0,0,0,0)}.hk-error-landing.is-inline.is-fill{flex:1 1 auto;min-height:0}.hk-error-landing.is-inline .hk-error-landing__card{margin:auto;padding:var(--space-16, 1rem) var(--space-28, 1.75rem) var(--space-24, 1.5rem);display:flex;flex-direction:column;max-height:100%;min-height:min-content}.hk-error-landing.is-inline .hk-error-landing__details{display:flex;flex-direction:column;min-height:0}.hk-error-landing.is-inline .hk-error-landing__details-pane{height:auto;flex-grow:0;flex-shrink:1;flex-basis:max(9rem,20vh);flex-basis:max(9rem,20dvh);min-height:6rem}@media(max-width: 480px){.hk-error-landing__card{padding:var(--space-28, 1.75rem) 1.125rem var(--space-24, 1.5rem)}}:root{--c-primary-faint: rgb(var(--color-primary, 122 162 247) / 5%);--c-primary-subtle: rgb(var(--color-primary, 122 162 247) / 8%);--c-primary-dim: rgb(var(--color-primary, 122 162 247) / 10%);--c-primary-light: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-overlay: rgb(var(--color-primary, 122 162 247) / 15%);--c-primary-medium: rgb(var(--color-primary, 122 162 247) / 25%);--c-primary-strong: rgb(var(--color-primary, 122 162 247) / 40%);--c-primary-intense: rgb(var(--color-primary, 122 162 247) / 40%);--c-error-dim: rgb(var(--color-error, 247 118 142) / 10%);--c-error-overlay: rgb(var(--color-error, 247 118 142) / 20%);--c-error-strong: rgb(var(--color-error, 247 118 142) / 50%);--shadow-elevated: 0 8px 32px rgb(0 0 0 / 15%);--shadow-dropdown: 0 4px 24px rgb(0 0 0 / 12%), 0 0 0 1px rgb(255 255 255 / 4%);--shadow-button: 0 4px 14px rgb(var(--color-primary, 122 162 247) / 35%);--shadow-button-danger: 0 4px 14px rgb(var(--color-error, 247 118 142) / 35%);--shadow-focus: 0 0 0 3px rgb(var(--color-primary, 122 162 247) / 12%);--shadow-focus-error: 0 0 0 3px rgb(var(--color-error, 247 118 142) / 12%);--border-input: rgb(var(--color-border, 100 100 100) / 15%);--border-faint: rgb(var(--color-border, 100 100 100) / 10%);--border-subtle: rgb(var(--color-border, 100 100 100) / 12%);--hi-icon-color: rgb(var(--color-text, 30 30 30));--hi-icon-size-xs: 0.75rem;--hi-icon-size-sm: 1rem;--hi-icon-size-md: 1.25rem;--hi-icon-size-lg: 1.5rem;--hi-duration-instant: var(--duration-instant, 0.1s);--hi-border-color-focus: rgb(var(--color-primary, 122 162 247));--hi-glow-color: transparent;--hi-bg-surface-dark: rgb(var(--color-muted, 108 108 108) / 12%);--hi-color-primary-dark: color-mix(in srgb, rgb(var(--color-primary, 122 162 247)) 82%, #000);--hi-color-secondary-dark: color-mix(in srgb, rgb(var(--color-secondary, 81 154 115)) 82%, #000);--hi-color-danger-dark: color-mix(in srgb, rgb(var(--color-error, 247 118 142)) 82%, #000);--hi-color-success-dark: color-mix(in srgb, rgb(var(--color-success, 14 184 64)) 82%, #000);--hi-color-text-on-secondary: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-danger: rgb(var(--color-on-solid, 255 255 255));--hi-color-text-on-success: rgb(var(--color-on-solid, 255 255 255))}:root{--color-primary: 122 162 247;--color-on-primary: 255 255 255;--color-on-solid: 255 255 255;--color-on-solid-text: 255 255 255;--color-on-solid-icon: 255 255 255;--color-on-danger: 255 255 255;--color-on-success: 255 255 255;--color-on-warning: 0 0 0;--color-on-info: 0 0 0;--color-secondary: 81 154 115;--color-accent: 247 181 0;--color-text: 30 30 30;--color-text-secondary: 102 102 102;--color-text-tertiary: 140 140 140;--color-muted: 108 108 108;--color-border: 100 100 100;--color-focused-border: 122 162 247;--color-background: 255 255 255;--color-surface: 255 255 255;--color-selected-bg: 191 218 242;--color-selected-text: 30 30 30;--color-status-bar-bg: 240 244 248;--color-success: 14 184 64;--color-error: 247 118 142;--color-warning: 238 214 119;--color-info: 106 190 214;--hi-color-primary: rgb(var(--color-primary));--hi-color-secondary: rgb(var(--color-secondary));--hi-color-surface: rgb(var(--color-surface));--hi-color-background: rgb(var(--color-background));--hi-color-border: rgb(var(--color-border) / 15%);--hi-color-text-primary: rgb(var(--color-text));--hi-color-text-secondary: rgb(var(--color-text-secondary));--hi-color-muted: rgb(var(--color-muted));--hi-color-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-primary: rgb(var(--color-on-primary));--hi-color-text-on-solid: rgb(var(--color-on-solid-text, 255 255 255));--hi-color-icon-on-solid: rgb(var(--color-on-solid-icon, 255 255 255));--hi-color-success: rgb(var(--color-success));--hi-color-error: rgb(var(--color-error));--hi-color-warning: rgb(var(--color-warning));--hi-color-info: rgb(var(--color-info));--hi-color-text-on-danger: rgb(var(--color-on-danger));--hi-color-text-on-success: rgb(var(--color-on-success));--hi-color-text-on-warning: rgb(var(--color-on-warning));--hi-color-text-on-info: rgb(var(--color-on-info));--hi-color-bg-subtle: rgb(var(--color-surface) / 0.5);--hi-color-bg-elevated: rgb(var(--color-surface));--hi-color-bg-canvas: rgb(var(--color-background));--hi-secondary-bg: rgb(var(--color-surface) / 0.5);--hi-color-accent: rgb(var(--color-accent));--hi-primary: var(--hi-color-primary);--hi-surface: var(--hi-color-surface);--hi-card-bg: var(--hi-color-surface)}.hk-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-6);font-family:inherit;font-weight:600;line-height:1;border:1px solid rgba(0,0,0,0);border-radius:var(--radius-md, 8px);cursor:pointer;transition-property:background-color,border-color,color,box-shadow,opacity,transform,filter;transition-duration:var(--duration-normal);transition-timing-function:var(--ease-standard);white-space:nowrap;-webkit-user-select:none;user-select:none;outline:none;position:relative}.hk-btn:focus-visible{box-shadow:0 0 0 2px rgb(var(--color-surface)),0 0 0 4px rgb(var(--color-primary))}.hk-btn:disabled{opacity:.5;cursor:not-allowed}.hk-btn-xs{padding:var(--space-4) var(--space-8);font-size:var(--text-xs);min-height:1.375rem}.hk-btn-sm{padding:var(--space-6) var(--space-12);font-size:var(--text-xs);min-height:1.75rem}.hk-btn-md{padding:var(--space-8) var(--space-16);font-size:var(--text-base);min-height:2.5rem}.hk-btn-lg{padding:var(--space-10) var(--space-24);font-size:var(--text-base);min-height:2.75rem}.hk-btn-xs .hk-btn-icon,.hk-btn-xs .hk-btn-suffix{inline-size:.8125rem;block-size:.8125rem}.hk-btn-xs .hk-btn-icon .hk-icon,.hk-btn-xs .hk-btn-suffix .hk-icon{inline-size:100%;block-size:100%}.hk-btn-icon,.hk-btn-suffix{display:inline-flex;align-items:center;justify-content:center;flex:none;inline-size:1rem;block-size:1rem;line-height:0}.hk-btn-icon svg,.hk-btn-suffix svg{display:block}.hk-btn>svg{flex:none}.hk-btn-icon-only{padding:0;box-sizing:border-box}.hk-btn-xs.hk-btn-icon-only{width:1.375rem}.hk-btn-sm.hk-btn-icon-only{width:1.75rem}.hk-btn-md.hk-btn-icon-only{width:2.5rem}.hk-btn-lg.hk-btn-icon-only{width:2.75rem}.hk-btn-block.hk-btn-icon-only{width:100%}.hk-btn-label{display:inline-flex;align-items:center;min-width:0}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 639.98px){.hk-btn-label-collapse-sm.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-sm.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 767.98px){.hk-btn-label-collapse-md.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-md.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 1023.98px){.hk-btn-label-collapse-lg.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-lg.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-xs .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-xs{padding:0;box-sizing:border-box;width:1.375rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-sm .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-sm{padding:0;box-sizing:border-box;width:1.75rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-md .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-md{padding:0;box-sizing:border-box;width:2.5rem}}@media(max-width: 1279.98px){.hk-btn-label-collapse-xl.hk-btn-lg .hk-btn-label{display:none}.hk-btn-label-collapse-xl.hk-btn-lg{padding:0;box-sizing:border-box;width:2.75rem}}.hk-btn-primary{background:rgb(var(--color-primary));color:rgb(var(--color-on-solid))}.hk-btn-primary svg{color:rgb(var(--color-on-solid-icon, 255 255 255))}.hk-btn-primary:hover:not(:disabled):not(:focus-visible){filter:brightness(1.1);box-shadow:var(--shadow-button)}.hk-btn-primary:active:not(:disabled){filter:brightness(0.95)}.hk-btn-secondary{background:rgb(var(--color-surface));color:rgb(var(--color-text));border-color:rgb(var(--color-border)/20%);-webkit-backdrop-filter:var(--hk-btn-secondary-blur, blur(var(--blur-sm)));backdrop-filter:var(--hk-btn-secondary-blur, blur(var(--blur-sm)))}.hk-btn-secondary:hover:not(:disabled){border-color:var(--c-primary-strong)}.hk-btn-secondary:active:not(:disabled){filter:brightness(0.95)}.hk-btn-outline{background:rgba(0,0,0,0);color:rgb(var(--color-primary));border-color:var(--c-primary-intense)}.hk-btn-outline:hover:not(:disabled){background:var(--c-primary-light);border-color:rgb(var(--color-primary))}.hk-btn-outline:active:not(:disabled){filter:brightness(0.95)}.hk-btn-ghost{background:rgba(0,0,0,0);color:rgb(var(--color-text));border-color:rgba(0,0,0,0)}.hk-btn-ghost:hover:not(:disabled){background:var(--c-primary-light)}.hk-btn-ghost:active:not(:disabled){filter:brightness(0.95)}.hk-btn-danger{background:rgb(var(--color-error));color:rgb(var(--color-on-solid))}.hk-btn-danger:hover:not(:disabled):not(:focus-visible){filter:brightness(1.1);box-shadow:var(--shadow-button-danger)}.hk-btn-danger:active:not(:disabled){filter:brightness(0.95)}.hk-btn-block{width:100%}.hk-btn-loading{pointer-events:none}@media(prefers-color-scheme: dark){:root{--color-primary: 136 192 208;--color-on-solid: 46 52 64;--color-on-solid-text: 46 52 64;--color-on-solid-icon: 46 52 64;--color-text: 247 249 252;--color-muted: 180 180 180;--color-border: 128 128 128;--color-background: 22 27 38;--color-surface: 34 40 54;--color-error: 191 97 106}}";
package/src/scale.scss CHANGED
@@ -126,6 +126,17 @@
126
126
  * reads the same token so the JS clamps and the CSS caps never drift). */
127
127
  --viewport-gutter: 16px;
128
128
 
129
+ /* Dock edge gap — the ONE minimum distance a dock keeps from the viewport
130
+ * edge it hugs AND from the content it covers (the dock's own content
131
+ * band), 16px by default. Per-dock / per-edge overrides use
132
+ * `--hk-dock-gap-<top|right|bottom|left>` or the older single-value
133
+ * `--hk-dock-inset`; the resolver chain lives in HkDockBar.scss. This is
134
+ * the ONLY place a gap token is DECLARED — a custom property resolves on
135
+ * its declaring element, so pre-declaring `--hk-dock-gap-<edge>` here
136
+ * would freeze that edge against every descendant `--hk-dock-gap`
137
+ * override (the 2026-11-15 cascade trap). */
138
+ --hk-dock-gap: var(--space-16, 1rem);
139
+
129
140
  /* Fonts — keep in sync with packages/vue/src/theme/fontContext.ts */
130
141
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
131
142
  --font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
@@ -128,6 +128,17 @@
128
128
  * reads the same token so the JS clamps and the CSS caps never drift). */
129
129
  --viewport-gutter: 16px;
130
130
 
131
+ /* Dock edge gap — the ONE minimum distance a dock keeps from the viewport
132
+ * edge it hugs AND from the content it covers (the dock's own content
133
+ * band), 16px by default. Per-dock / per-edge overrides use
134
+ * `--hk-dock-gap-<top|right|bottom|left>` or the older single-value
135
+ * `--hk-dock-inset`; the resolver chain lives in HkDockBar.scss. This is
136
+ * the ONLY place a gap token is DECLARED — a custom property resolves on
137
+ * its declaring element, so pre-declaring `--hk-dock-gap-<edge>` here
138
+ * would freeze that edge against every descendant `--hk-dock-gap`
139
+ * override (the 2026-11-15 cascade trap). */
140
+ --hk-dock-gap: var(--space-16, 1rem);
141
+
131
142
  /* Fonts — keep in sync with packages/vue/src/theme/fontContext.ts */
132
143
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
133
144
  --font-reading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;