@celestia-island/hikari 0.55.371 → 0.55.373

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.371",
3
+ "version": "0.55.373",
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",
@@ -76,6 +76,7 @@
76
76
  "vue": "^3"
77
77
  },
78
78
  "dependencies": {
79
+ "@bytecodealliance/preview2-shim": "^0.31",
79
80
  "@celestia-island/tairitsu-transport": "^0.2",
80
81
  "@xterm/addon-fit": "^0.11",
81
82
  "@xterm/addon-image": "^0.10.0-beta.301",
@@ -86,7 +87,6 @@
86
87
  "marked": "^18"
87
88
  },
88
89
  "devDependencies": {
89
- "@bytecodealliance/preview2-shim": "^0.31",
90
90
  "@types/node": "^*",
91
91
  "@types/three": "^0.185",
92
92
  "@vitejs/plugin-vue": "^*",
@@ -11,6 +11,12 @@
11
11
  * from the `hoverOpacity` prop); data-hovered mirrors :hover for the
12
12
  * runtime tests and for pen/touch engines where :hover is sticky.
13
13
  *
14
+ * The fade lives on the `[data-el="fade"]` CARD, not the root: the hover
15
+ * chrome (`[data-el="overlay"]` — section chips, the headerless close) is
16
+ * a sibling of the card so the controls stay legible while the content
17
+ * dims — at a 0.15 hover dim a close button inside the fading subtree
18
+ * would fade out of reach together with the content it closes.
19
+ *
14
20
  * Every ink hangs off hikari's theme tokens (no hardcoded colors); the
15
21
  * body is compact mono with tabular figures so debug numbers line up.
16
22
  */
@@ -26,7 +32,22 @@
26
32
  z-index: var(--hk-z-debug-float, 80000);
27
33
 
28
34
  position: fixed;
29
- min-width: 0;
35
+ /* The window catches pointers ONLY on itself — it is never an
36
+ * inset-0 overlay, so clicks outside its box land on the page. */
37
+ pointer-events: auto;
38
+ touch-action: none;
39
+
40
+ /* Content-sized seat (`width="auto"`): the window grows to its
41
+ * longest line (a `white-space: pre` mono dump) instead of clipping
42
+ * it, capped so a pathological line cannot span the viewport. */
43
+ &[data-auto-width] {
44
+ width: max-content;
45
+ max-width: calc(100vw - 2 * var(--hk-debug-float-offset, 16px));
46
+ }
47
+ }
48
+
49
+ /* ---------- the card (visual chrome + the hover fade) ---------- */
50
+ .hk-debug-float [data-el="fade"] {
30
51
  overflow: hidden;
31
52
  border: 1px solid var(--border-faint);
32
53
  border-radius: var(--radius-sm);
@@ -40,10 +61,6 @@
40
61
  font-family: var(--font-mono);
41
62
  font-variant-numeric: tabular-nums;
42
63
  line-height: 1.45;
43
- /* The window catches pointers ONLY on itself — it is never an
44
- * inset-0 overlay, so clicks outside its box land on the page. */
45
- pointer-events: auto;
46
- touch-action: none;
47
64
 
48
65
  /* Hover → yield: the pointer over the HUD drops it to the translucent
49
66
  * state so the measured content reads through it (~150ms, opacity only
@@ -51,17 +68,19 @@
51
68
  * property; 0.45 is the wowsp-derived default. */
52
69
  opacity: 1;
53
70
  transition: opacity var(--duration-short) ease;
71
+ }
54
72
 
55
- &:hover,
56
- &[data-hovered] {
57
- opacity: var(--hk-debug-float-hover-opacity, 0.45);
58
- }
73
+ .hk-debug-float:hover [data-el="fade"],
74
+ .hk-debug-float[data-hovered] [data-el="fade"] {
75
+ opacity: var(--hk-debug-float-hover-opacity, 0.45);
76
+ }
59
77
 
60
- /* Drag exception: while the user is GRABBING the window it must stay
61
- * fully opaque — fading mid-grab hides what the hand is holding. */
62
- &[data-dragging] {
63
- opacity: 1;
64
- }
78
+ /* Drag exception: while the user is GRABBING the window it must stay
79
+ * fully opaque — fading mid-grab hides what the hand holds. Equal
80
+ * specificity with the hover rule above: source order (this rule LAST)
81
+ * is the cascade. */
82
+ .hk-debug-float[data-dragging] [data-el="fade"] {
83
+ opacity: 1;
65
84
  }
66
85
 
67
86
  /* ---------- corner anchoring (pre-drag) ----------
@@ -90,7 +109,7 @@
90
109
  }
91
110
  }
92
111
 
93
- /* ---------- header (drag handle) ---------- */
112
+ /* ---------- header (drag handle, headered chrome) ---------- */
94
113
  .hk-debug-float [data-el="header"] {
95
114
  display: flex;
96
115
  align-items: center;
@@ -110,6 +129,16 @@
110
129
  cursor: grabbing;
111
130
  }
112
131
 
132
+ /* Headerless: the whole window is the handle. */
133
+ .hk-debug-float[data-chrome="none"] {
134
+ cursor: grab;
135
+ @include user-select(none);
136
+
137
+ &[data-dragging] {
138
+ cursor: grabbing;
139
+ }
140
+ }
141
+
113
142
  .hk-debug-float [data-el="title"] {
114
143
  font-size: var(--text-2xs);
115
144
  font-weight: 600;
@@ -137,6 +166,67 @@
137
166
  }
138
167
  }
139
168
 
169
+ /* ---------- hover chrome (section chips + headerless close) ----------
170
+ * Revealed ONLY while it is usable — hover, drag, or keyboard focus —
171
+ * and click-transparent otherwise (opacity alone would leave invisible
172
+ * buttons catching clicks). It never fades with the card: it is a
173
+ * sibling of [data-el="fade"], pinned INSIDE the window box (both
174
+ * insets + wrap): a chip row wider than the seat wraps instead of
175
+ * painting (and catching clicks) outside the window. */
176
+ .hk-debug-float [data-el="overlay"] {
177
+ position: absolute;
178
+ left: var(--space-4);
179
+ right: var(--space-4);
180
+ display: flex;
181
+ align-items: center;
182
+ justify-content: flex-end;
183
+ flex-wrap: wrap;
184
+ gap: var(--space-4);
185
+ opacity: 0;
186
+ pointer-events: none;
187
+ transition: opacity var(--duration-short) ease;
188
+ }
189
+
190
+ /* Headerless: no header bar, so the chrome owns the top edge... */
191
+ .hk-debug-float[data-chrome="none"] [data-el="overlay"] {
192
+ top: var(--space-4);
193
+ }
194
+
195
+ /* ...headered: park it on the bottom edge — the header already has its
196
+ * own close button up top. */
197
+ .hk-debug-float[data-chrome="header"] [data-el="overlay"] {
198
+ bottom: var(--space-4);
199
+ }
200
+
201
+ .hk-debug-float:hover [data-el="overlay"],
202
+ .hk-debug-float[data-hovered] [data-el="overlay"],
203
+ .hk-debug-float[data-dragging] [data-el="overlay"],
204
+ .hk-debug-float:focus-within [data-el="overlay"] {
205
+ opacity: 1;
206
+ pointer-events: auto;
207
+ }
208
+
209
+ /* Section toggle chip: a compact mono pill, on = section visible. */
210
+ .hk-debug-float [data-el="overlay"] .hk-debug-float-section {
211
+ flex-shrink: 0;
212
+ padding: var(--space-2) var(--space-6);
213
+ border: 1px solid var(--border-subtle);
214
+ border-radius: var(--radius-sm);
215
+ background: rgb(var(--color-surface) / 92%);
216
+ color: rgb(var(--color-muted));
217
+ font-family: var(--font-mono);
218
+ font-size: var(--text-2xs);
219
+ font-weight: 600;
220
+ letter-spacing: 0.04em;
221
+ cursor: pointer;
222
+ white-space: nowrap;
223
+
224
+ &[data-on] {
225
+ color: rgb(var(--color-text));
226
+ border-color: var(--border-input);
227
+ }
228
+ }
229
+
140
230
  /* ---------- close ---------- */
141
231
  /* The close affordance rides the STANDARD icon button at the 24 rung
142
232
  * (close-button family contract) with the seat class for this window. */