@celestia-island/hikari 0.55.522 → 0.55.524

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.
@@ -68,6 +68,17 @@ export declare const HkStatusBar: import("vue").DefineComponent<import("vue").Ex
68
68
  type: BooleanConstructor;
69
69
  default: boolean;
70
70
  };
71
+ /** Keep the version rows INLINE even when `compact` (module-page
72
+ * footers that share the band with a centered switcher but are wide
73
+ * enough to afford them: the dot stays, the versions come back).
74
+ * The shared sheet folds the rows away again below 1024px, where
75
+ * the switcher's width wins — so the popover/aria fallback of
76
+ * `compact` remains the narrow-screen behavior unchanged. Without
77
+ * `compact` this prop is a no-op (the rows already render). */
78
+ inlineVersions: {
79
+ type: BooleanConstructor;
80
+ default: boolean;
81
+ };
71
82
  onRetry: {
72
83
  type: PropType<() => void>;
73
84
  default: undefined;
@@ -145,6 +156,17 @@ export declare const HkStatusBar: import("vue").DefineComponent<import("vue").Ex
145
156
  type: BooleanConstructor;
146
157
  default: boolean;
147
158
  };
159
+ /** Keep the version rows INLINE even when `compact` (module-page
160
+ * footers that share the band with a centered switcher but are wide
161
+ * enough to afford them: the dot stays, the versions come back).
162
+ * The shared sheet folds the rows away again below 1024px, where
163
+ * the switcher's width wins — so the popover/aria fallback of
164
+ * `compact` remains the narrow-screen behavior unchanged. Without
165
+ * `compact` this prop is a no-op (the rows already render). */
166
+ inlineVersions: {
167
+ type: BooleanConstructor;
168
+ default: boolean;
169
+ };
148
170
  onRetry: {
149
171
  type: PropType<() => void>;
150
172
  default: undefined;
@@ -195,6 +217,7 @@ export declare const HkStatusBar: import("vue").DefineComponent<import("vue").Ex
195
217
  connectionStatus: "idle" | "connected" | "disconnected" | "connecting" | "reconnecting";
196
218
  connectionInfo: HkConnectionInfo | null;
197
219
  standalone: boolean;
220
+ inlineVersions: boolean;
198
221
  transportTier: string;
199
222
  attemptNumber: number;
200
223
  countdown: number;
@@ -174,10 +174,11 @@ export { default as HkThemeDecor, type HkThemeDecorSize } from "./components/HkT
174
174
  export { initTheme, useTheme, themePresets, tokensToCSSVars, getThemeTokens, loadCustomThemes, saveCustomThemes, addCustomTheme, removeCustomTheme, registerTokenGroup, getTokenGroups, resolveGroupTokens, clampToSlot, clampRgbToBands, clampHue, hueDelta, wrapHue, groupTokensToCSSVars, rgbToHsl, hslToRgb, tokenGroupsVersion, tokenGroupSlotKind, tokenGroupSlotCssVar, isColorSlot, isNumberSlot, isEnumSlot, registerStandardThemeGroups, STANDARD_SHAPE_GROUP_ID, registerStandardThemeDecor, STANDARD_THEME_DECOR_SLOTS, registerThemeDecor, registerThemeDecorBuiltin, getThemeDecor, themeDecorSlots, themeDecorVersion, isThemeDecorSlot, THEME_DECOR_SLOT_PATTERN, THEME_DECOR_WILDCARD, allGroupSlots, resolveLocalizedText, parseTokenGroupConfig, registerTokenGroupConfig, startLuminanceSampler, stopLuminanceSampler, sampleLuminanceNow, invalidateLuminanceCache, registerWallpaperSurfaceSources, resolveWallpaperSurfaceElement, retainLuminanceSampler, releaseLuminanceSampler, luminanceSamplerRefCount, type WallpaperSurfaceKind, type WallpaperSurfaceSources, getTimePeriod, getGeolocation, solarAltitude, DEFAULT_GEO_LOCATION, timezoneFallback, setGeolocationProvider, refreshThemeClock, stopThemeClock, SOLAR_LOCATION_STRATEGY_STORAGE_KEY, SOLAR_MANUAL_LOCATION_STORAGE_KEY, hydrateSolarLocationState, solarLocationStrategy, setSolarLocationStrategy, solarManualLocation, setSolarManualLocation, manualLocationOf, listTimeZones, systemTimeZoneId, initFontContext, applyFontContext, resetFontContext, useFontContext, resolveThemeDisplayName, resolveThemeDisplayNameT, HIKARI_FONT_SANS, HIKARI_FONT_MONO, HIKARI_FONT_READING, type ThemeTokenRGB, type ThemeSchemeTokens, type ThemePreset, type ThemeMode, type ThemeId, type ThemeTokens, type CustomThemePreset, type TimePeriod, type ThemeNameI18n, type GeoLocation, type GeoLocationProvider, type SolarLocationStrategy, type SolarHemisphere, type SolarManualLocation, type ThemeTokenGroupValues, type ThemeTokenGroupModes, type ThemeTokenValue, type TokenGroupDefinition, type TokenGroupSlot, type TokenGroupSection, type HueClamp, type TokenGroupSlotKind, type TokenColorSlot, type TokenNumberSlot, type TokenEnumSlot, type ResolvedGroupTokens, type ColorHSL, type LocalizedText, type ParseTokenGroupResult, type ThemeDecorSlot, type ThemeDecorRegistration, type ThemeDecorBuiltinRegistration, type FontContextOverrides, } from "./theme";
175
175
  export { deriveSemanticPalette, CANONICAL_SEMANTIC, contrastRatio, hueDistance, rgbToOklch, oklchToRgb } from "./theme/semanticPalette";
176
176
  export type { SemanticPalette, SemanticFills, OKLCH } from "./theme/semanticPalette";
177
+ export { SOLAR_GLOBE_MAP_WIDTH, SOLAR_GLOBE_MAP_HEIGHT, solarGlobeMapDataUrl, globePointAt, } from "./theme/solarGlobeMap";
177
178
  export { FALLBACK_WALLPAPER_ID, DEFAULT_WALLPAPER_ID, DEFAULT_PRESETS, DEFAULT_DISPLAY_SETTINGS, DEFAULT_WALLPAPER_STORAGE_PREFIX, registerWallpaperPack, configureWallpaperStorage, wallpaperStorageKey, isWallpaperSource, isTimeAware, loadActiveWallpaperId, hasStoredWallpaperId, saveActiveWallpaperId, loadCustomWallpapers, saveCustomWallpapers, addCustomWallpaper, removeCustomWallpaper, updateCustomWallpaper, loadCachedGeolocation, saveCachedGeolocation, loadDisplaySettings, saveDisplaySettings, getDisplaySettings, setDisplaySettings, buildWallpaperFilter, initWallpaper, destroyWallpaper, useWallpaper, ensureWallpaperState, configureWallpaper, registerWallpaperBrandDefaults, registerServerThemeWallpaper, brandDefaultWallpaperFor, resolveThemeFollowSwitch, setWallpaperPipelineLookup, geo, currentPeriod, hasStorage, readStorageItem, writeStorageItem, removeStorageItem, type WallpaperType, type SolidSource, type ImageSource, type VideoSource, type PipelineSource, type WallpaperSource, type TimeAwareWallpaper, type WallpaperPreset, type WallpaperPackEntry, type CustomWallpaper, type WallpaperPosition, type WallpaperScale, type WallpaperEffect, type WallpaperDisplaySettings, type WallpaperStorageSlot, type WallpaperStorageConfig, type WallpaperInitConfig, type WallpaperPipelineLookup, type WallpaperPipelinePreset, } from "./theme";
178
179
  export { registerShaderPresets, getShaderPreset, listShaderPresetIds, SHADER_VERTEX, WallpaperShaderPipeline, createWallpaperShaderSurface, type WallpaperShaderPreset, type WallpaperShaderPresetInput, type WallpaperShaderScaleConfig, type WallpaperShaderScaleInput, type WallpaperShaderOverlayConfig, } from "./theme";
179
180
  export { default as HkWallpaperBackdrop, WALLPAPER_REDUCED_MOTION_QUERY, type HkWallpaperBackdropMode, type HkWallpaperSurface, type HkWallpaperSurfaceContext, type HkWallpaperSurfaceFactory, } from "./components/HkWallpaperBackdrop";
180
- export { onFrame, onceFrame, scheduleFrame, scheduleEvery, scheduleAfter, scheduleCron, scheduleCronAfter, scheduleInterval, scheduleIntervalAfter, reportTransition, setReducedMotion, notifyScrollStart, useOverlay, hasLiveWindow, isWindowEntry, topWindowZ, usePopupManager, POPUP_Z_BANDS, POPUP_Z_STEP, useToast, useConfirm, useBlockingToast, showBlockingToast, resolveBlockingToast, clearBlockingToasts, useEmergencyAlert, raiseEmergencyAlert, clearEmergencyAlert, snoozeEmergencyAlert, unsnoozeEmergencyAlert, resetEmergencyAlerts, emergencySeverityRank, useNotificationCenter, recordNotification, setNotificationState, forgetNotification, markAllNotificationsRead, resetNotifications, MAX_NOTIFICATION_ENTRIES, type HkNotificationEntry, type HkNotificationKind, type HkNotificationRecordInput, type HkNotificationState, type HkNotificationTone, type EmergencyAlertItem, type EmergencyAlertOptions, type EmergencyAction, type EmergencySeverity, type BlockingToastItem, type BlockingToastOptions, type BlockingToastVariant, useScreenIdentify, showScreenIdentify, dismissScreenIdentify, SCREEN_IDENTIFY_DEFAULT_MS, SCREEN_IDENTIFY_TICK_MS, type ScreenIdentifyRequest, type ScreenIdentifyContext, useBreakpoint, useClipboard, useClipboardWithToast, useMediaQuery, releaseMediaQuery, usePageLifecycle, onPageLifecycle, pageLifecycleState, useSafeArea, applyViewportPolicy, parseViewportContent, type ApplyViewportPolicyOptions, type ViewportPolicyResult, closeAll, isOverlayOpen, TOAST_DURATION, createBackGuard, BACK_GUARD_MARKER, BACK_GUARD_DEPTH, type AnimationHandle, useReportedTransition, type ReportedTransition, type ReportedTransitionTrack, type CronHandle, type IntervalHandle, type FrameContext, type OverlayHandle, type PopupHandle, type PopupKind, type ToastAction, type ToastItem, type ToastMessage, type ToastType, type PageLifecycleState, type PageLifecycleListener, type SafeAreaInsets, type BackGuard, type BackGuardOptions, installHkTooltipBridge, type HkTooltipBridgeOptions, installHkImageFallback, type HkImageFallbackOptions, installHkTapHighlight, type HkTapHighlightOptions, type HkTapHighlightColor, installHkTouchHintBridge, showHkTouchHintBar, armTouchHint, type HkTouchHintOptions, type HkTouchHintArmOptions, reportHkRuntime, getHkRuntimeEntry, listHkRuntime, readHkRuntime, writeHkRuntime, hkRuntimeSnapshot, useHkRegistry, type HkRuntimeKind, type HkRuntimeStatus, type HkRuntimeMeta, type HkRuntimeEntryState, type HkRuntimeReport, type HkRuntimeHandle, type HkRuntimeWriteOp, type HkRuntimeSnapshot, type HkRuntimeSnapshotEntry, } from "./runtime";
181
+ export { onFrame, onceFrame, scheduleFrame, scheduleEvery, scheduleAfter, scheduleCron, scheduleCronAfter, scheduleInterval, scheduleIntervalAfter, reportTransition, setReducedMotion, notifyScrollStart, useOverlay, hasLiveWindow, isWindowEntry, topWindowZ, usePopupManager, POPUP_Z_BANDS, POPUP_Z_STEP, useToast, useConfirm, useBlockingToast, showBlockingToast, resolveBlockingToast, clearBlockingToasts, useEmergencyAlert, raiseEmergencyAlert, clearEmergencyAlert, snoozeEmergencyAlert, unsnoozeEmergencyAlert, resetEmergencyAlerts, emergencySeverityRank, useNotificationCenter, recordNotification, setNotificationState, forgetNotification, markAllNotificationsRead, resetNotifications, MAX_NOTIFICATION_ENTRIES, type HkNotificationEntry, type HkNotificationKind, type HkNotificationRecordInput, type HkNotificationState, type HkNotificationTone, type EmergencyAlertItem, type EmergencyAlertOptions, type EmergencyAction, type EmergencySeverity, type BlockingToastItem, type BlockingToastOptions, type BlockingToastVariant, useScreenIdentify, showScreenIdentify, dismissScreenIdentify, SCREEN_IDENTIFY_DEFAULT_MS, SCREEN_IDENTIFY_TICK_MS, type ScreenIdentifyRequest, type ScreenIdentifyContext, useBreakpoint, useClipboard, useClipboardWithToast, useMediaQuery, releaseMediaQuery, usePageLifecycle, onPageLifecycle, pageLifecycleState, useSafeArea, applyViewportPolicy, parseViewportContent, type ApplyViewportPolicyOptions, type ViewportPolicyResult, closeAll, isOverlayOpen, TOAST_DURATION, createBackGuard, BACK_GUARD_MARKER, BACK_GUARD_DEPTH, type AnimationHandle, useReportedTransition, type ReportedTransition, type ReportedTransitionTrack, type CronHandle, type IntervalHandle, type FrameContext, type OverlayHandle, type PopupHandle, type PopupKind, type ToastAction, type ToastItem, type ToastMessage, type ToastType, type PageLifecycleState, type PageLifecycleListener, type SafeAreaInsets, type BackGuard, type BackGuardOptions, installHkTooltipBridge, type HkTooltipBridgeOptions, installHkImageFallback, type HkImageFallbackOptions, installHkTapHighlight, type HkTapHighlightOptions, type HkTapHighlightColor, installHkTouchHintBridge, showHkTouchHintBar, armTouchHint, type HkTouchHintOptions, type HkTouchHintArmOptions, reportHkRuntime, getHkRuntimeEntry, listHkRuntime, readHkRuntime, writeHkRuntime, hkRuntimeSnapshot, useHkRegistry, type HkRuntimeKind, type HkRuntimeStatus, type HkRuntimeMeta, type HkRuntimeEntryState, type HkRuntimeReport, type HkRuntimeHandle, type HkRuntimeWriteOp, type HkRuntimeSnapshot, type HkRuntimeSnapshotEntry, configureClipboardHub, clipboardHubConfig, getClipboardHub, writeClipboardText, type ClipboardCopyOptions, type ClipboardEntry, type ClipboardHub, type ClipboardHubConfig, } from "./runtime";
181
182
  export { useI18n, setLocale, activeLocale, mergeMessages, } from "./i18n/context";
182
183
  export { HK_LOCALE_CATALOG, type HkLocaleCatalogEntry } from "./i18n/localeCatalog";
183
184
  export { fuzzyScore, fuzzyScoreFields, fuzzySearch } from "./utils/fuzzy";
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The family's ONE clipboard context (user direction 2026-12-01: copy paths
3
+ * converge here — hosts stop owning private `navigator.clipboard` /
4
+ * `execCommand` sequences and consume this hub instead).
5
+ *
6
+ * Framework-free on purpose: the Vue hooks (`useClipboard`,
7
+ * `useClipboardWithToast`) wrap it, and non-Vue consumers (the lagrange docs
8
+ * shell's delegated DOM handlers today; any future host runtime) import the
9
+ * same module-scoped singleton, so every writer on a page shares one
10
+ * implementation, one history, one place to fix browser quirks in.
11
+ *
12
+ * The write core NEVER reports success it did not observe:
13
+ *
14
+ * - `navigator.clipboard.writeText` is awaited; only a fulfilled promise
15
+ * means "the clipboard now holds the text" (the browser contract).
16
+ * - Outside secure contexts (and wherever the async API refuses), the
17
+ * textarea + `execCommand("copy")` fallback runs, and `execCommand`
18
+ * reports failure by RETURNING false — treating that falsy return as
19
+ * success is exactly the defect that surfaced "Copied" toasts for writes
20
+ * that never landed (hikari #409, lagrange #211 follow-ups).
21
+ *
22
+ * History is the first of the hub's fine-grained management features: an
23
+ * in-memory ring of recent writes (newest first) with a subscribe hook, so
24
+ * hosts can surface "what did I copy" UI or audit writes without each
25
+ * consumer rolling its own log. Recording is on by default and can be turned
26
+ * off globally (`configureClipboardHub`) — e.g. on pages where clipboard
27
+ * content is sensitive enough that keeping it in memory is wrong.
28
+ */
29
+ export interface ClipboardEntry {
30
+ /** The text that was written. */
31
+ text: string;
32
+ /** Epoch milliseconds at the moment the write was confirmed. */
33
+ at: number;
34
+ /**
35
+ * Optional call-site label (`copy(text, { source: "code-block" })`) —
36
+ * lets a history surface distinguish code blocks, badges, modals…
37
+ */
38
+ source?: string;
39
+ }
40
+ export interface ClipboardCopyOptions {
41
+ /** Call-site label recorded into history alongside the text. */
42
+ source?: string;
43
+ /** Skip the history ring for this one write (defaults to recording). */
44
+ record?: boolean;
45
+ }
46
+ export interface ClipboardHubConfig {
47
+ /**
48
+ * Ring capacity; the oldest entry falls off. Default 50, 0 disables.
49
+ * **Zero is the global off switch**: with a zero limit nothing is recorded,
50
+ * and a per-call `record: true` cannot bypass it — a page that decided its
51
+ * clipboard contents must not sit in memory must not be undone by an
52
+ * individual writer.
53
+ */
54
+ historyLimit?: number;
55
+ /** Master switch for history recording. Default true. */
56
+ recordHistory?: boolean;
57
+ }
58
+ export interface ClipboardHub {
59
+ /**
60
+ * The single write path. Resolves to whether the clipboard verifiably
61
+ * received the text; a confirmed write is appended to history.
62
+ */
63
+ copy(text: string, options?: ClipboardCopyOptions): Promise<boolean>;
64
+ /** Recent confirmed writes, newest first (a readonly snapshot). */
65
+ history(): readonly ClipboardEntry[];
66
+ /** Drops every recorded entry. */
67
+ clearHistory(): void;
68
+ /**
69
+ * Notified after every confirmed write and every clear. Returns the
70
+ * unsubscribe function.
71
+ */
72
+ subscribe(listener: () => void): () => void;
73
+ }
74
+ /**
75
+ * The one write sequence every consumer shares. Never returns true unless a
76
+ * write verifiably landed. Exported for tests and for the rare caller that
77
+ * wants the raw write without touching the hub's history.
78
+ */
79
+ export declare function writeClipboardText(text: string): Promise<boolean>;
80
+ export declare function configureClipboardHub(config: ClipboardHubConfig): void;
81
+ /** Read-mostly view of the active config (tests assert against it). */
82
+ export declare function clipboardHubConfig(): Required<ClipboardHubConfig>;
83
+ /**
84
+ * The page-wide clipboard context. Every caller in the same bundle gets the
85
+ * same instance — that is the whole point of the convergence.
86
+ */
87
+ export declare function getClipboardHub(): ClipboardHub;
@@ -28,6 +28,7 @@ export { useEmergencyAlert, raiseEmergencyAlert, clearEmergencyAlert, snoozeEmer
28
28
  export { useScreenIdentify, showScreenIdentify, dismissScreenIdentify, SCREEN_IDENTIFY_DEFAULT_MS, SCREEN_IDENTIFY_TICK_MS, type ScreenIdentifyRequest, type ScreenIdentifyContext, } from "./useScreenIdentify";
29
29
  export { useBreakpoint } from "./useBreakpoint";
30
30
  export { useClipboard, useClipboardWithToast } from "./useClipboard";
31
+ export { configureClipboardHub, clipboardHubConfig, getClipboardHub, writeClipboardText, type ClipboardCopyOptions, type ClipboardEntry, type ClipboardHub, type ClipboardHubConfig, } from "./clipboardHub";
31
32
  export { provideScrollWindow, useScrollWindow, type ScrollWindowContext } from "../composables/useScrollWindow";
32
33
  export { useReportedTransition, type ReportedTransition, type ReportedTransitionTrack } from "../composables/useReportedTransition";
33
34
  export { showProgressDialog, useProgressDialog, type ProgressDialogHandle, type ProgressDialogState } from "../composables/useProgressDialog";
@@ -6,10 +6,11 @@ export declare function useClipboard(): {
6
6
  * Clipboard copy with a toast on success/failure.
7
7
  * (Upstreamed from shittim-chest's plana-legacy layer.)
8
8
  *
9
- * Wraps the base `useClipboard` above (which already falls back to
10
- * `execCommand` outside secure contexts) and adds toast feedback;
11
- * `copied` reflects the 2s copied state. The `toast` argument matches
12
- * hikari's `useToast()` surface (`success` / `error` message pushers).
9
+ * Wraps the base `useClipboard` above (which now delegates to the shared
10
+ * clipboard hub — the write sequence and the history ring are family-wide,
11
+ * not per-hook) and adds toast feedback; `copied` reflects the 2s copied
12
+ * state. The `toast` argument matches hikari's `useToast()` surface
13
+ * (`success` / `error` message pushers).
13
14
  *
14
15
  * Default toast messages come from hikari's own i18n
15
16
  * (`hikari::clipboard.copied` / `hikari::clipboard.copyFailed`) so a
@@ -33,3 +33,24 @@ export declare const SOLAR_GLOBE_MAP_SVG: string;
33
33
  /** Data URL form for `new Image()` rasterization (no bundler asset
34
34
  * pipeline involved — the SVG travels inside the package as source). */
35
35
  export declare function solarGlobeMapDataUrl(): string;
36
+ /** Surface position [x, y, z] of a geographic point on the base-map
37
+ * sphere (hikari's own globe renderer and any board page that pins
38
+ * markers to the map). Pure math — no three import, so callers hand
39
+ * the tuple to `new THREE.Vector3(...)` themselves. (No relation to
40
+ * the components crate's `globe_point_at` — that one projects a
41
+ * lat/lng onto the picker's 2-D orthographic SCREEN disc; this one is
42
+ * the sphere's 3-D surface coordinate.)
43
+ *
44
+ * The convention is THE globe's texture alignment (solarTimeZones.ts,
45
+ * measured against the installed three by solarGlobeAlignment.test.ts):
46
+ * an equirectangular texture puts longitude L at sphere azimuth
47
+ * atan2(x, z) = L + 90°, and latitude runs from the sphere's own +Y.
48
+ * This helper is the single place that converts, so a page marker and
49
+ * the picker's wedges can never disagree about where a coordinate is.
50
+ *
51
+ * @param latDeg geographic latitude, degrees, north positive.
52
+ * @param lngDeg geographic longitude, degrees, east positive.
53
+ * @param radius sphere radius (markers ride `radius` exactly; lift a
54
+ * chip by scaling the radius up a hair, the way the picker's wedges
55
+ * sit above the base sphere). */
56
+ export declare function globePointAt(latDeg: number, lngDeg: number, radius: number): [number, number, number];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celestia-island/hikari",
3
- "version": "0.55.522",
3
+ "version": "0.55.524",
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",
@@ -68,8 +68,11 @@ describe("HkCopyBadge", () => {
68
68
  it("copies the rendered text on click and toasts the localized default", async () => {
69
69
  const c = mount(() => h(HkCopyBadge, null, () => "#demiurge.132"));
70
70
  (c.querySelector(".hk-badge") as HTMLElement).click();
71
- await Promise.resolve();
72
- await Promise.resolve();
71
+ // The copy write runs through the shared clipboard hub (user direction
72
+ // 2026-12-01): more promise hops between the click and the toast —
73
+ // still zero-milliseconds in real time, so flush to a settled state
74
+ // instead of counting microtasks.
75
+ for (let i = 0; i < 10; i++) await Promise.resolve();
73
76
 
74
77
  expect(writeText).toHaveBeenCalledWith("#demiurge.132");
75
78
  const success = useToast().toasts.find((t) => t.type === "success");
@@ -267,6 +267,51 @@ describe("HkStatusBar", () => {
267
267
  expect(tag.getAttribute("aria-label")).toBe("Connected · 1.2.3 · 9.8.7");
268
268
  });
269
269
 
270
+ it("inlineVersions opts a compact tag back into the visible version rows", async () => {
271
+ const container = mountBar({
272
+ version: "1.2.3",
273
+ engineVersion: "9.8.7",
274
+ connectionStatus: "connected",
275
+ connectionInfo: INFO,
276
+ compact: true,
277
+ inlineVersions: true,
278
+ });
279
+ await nextTick();
280
+
281
+ const tag = container.querySelector<HTMLElement>(".s-status-bar-tag")!;
282
+ // Both markers ride the tag: compact keeps the dot-only shape and the
283
+ // sheet's narrow fold; inline-versions lets the version grid through.
284
+ expect(tag.getAttribute("data-compact")).toBe("true");
285
+ expect(tag.getAttribute("data-inline-versions")).toBe("true");
286
+ // The version rows render into the pill (the sheet's
287
+ // [data-compact][data-inline-versions] rule shows what [data-compact]
288
+ // alone hides) — panel row, then engine row, same anatomy as full mode.
289
+ const values = tag.querySelectorAll<HTMLElement>(".s-status-bar-version");
290
+ expect(values.length).toBe(2);
291
+ expect(values[0].textContent).toContain("1.2.3");
292
+ expect(values[1].textContent).toContain("9.8.7");
293
+ // The dot still renders: the traffic light is not replaced.
294
+ expect(tag.querySelector(".s-status-bar-dot"), "traffic-light dot renders").toBeTruthy();
295
+ });
296
+
297
+ it("inlineVersions without compact is a no-op (the rows already render)", async () => {
298
+ const container = mountBar({
299
+ version: "1.2.3",
300
+ engineVersion: "9.8.7",
301
+ connectionStatus: "connected",
302
+ connectionInfo: INFO,
303
+ inlineVersions: true,
304
+ });
305
+ await nextTick();
306
+
307
+ const tag = container.querySelector<HTMLElement>(".s-status-bar-tag")!;
308
+ expect(tag.hasAttribute("data-compact")).toBe(false);
309
+ // The marker only ever pairs with compact — a full tag needs no
310
+ // opt-in for rows it already shows.
311
+ expect(tag.hasAttribute("data-inline-versions")).toBe(false);
312
+ expect(tag.querySelectorAll<HTMLElement>(".s-status-bar-version").length).toBe(2);
313
+ });
314
+
270
315
  it("a touch tap on a disconnected light fires onRetry exactly once and opens the popover", async () => {
271
316
  const onRetry = vi.fn();
272
317
  const container = mountBar({
@@ -27,7 +27,10 @@ import { HkPlaceholderMarquee } from "./HkPlaceholderMarquee";
27
27
  * re-introduced once by an upstreaming wave and reported again on
28
28
  * 2026-08-25). The state stays reachable via the tap popover and the
29
29
  * compact-mode aria-label; the version rows likewise move into the
30
- * popover.
30
+ * popover. `inlineVersions` opts a compact host back INTO the inline
31
+ * version rows (wide module-page footers): the sheet restores them and
32
+ * folds them away again below 1024px, so the narrow-screen contract of
33
+ * `compact` is untouched.
31
34
  *
32
35
  * Styling rides the shared `s-status-bar*` classes from
33
36
  * `styles/admin-tokens.scss` (the `[data-compact]` rules hide the inline
@@ -199,6 +202,14 @@ export const HkStatusBar = defineComponent({
199
202
  * the connection state rides the aria-label, and the version rows
200
203
  * move into the hover/tap popover. */
201
204
  compact: { type: Boolean, default: false },
205
+ /** Keep the version rows INLINE even when `compact` (module-page
206
+ * footers that share the band with a centered switcher but are wide
207
+ * enough to afford them: the dot stays, the versions come back).
208
+ * The shared sheet folds the rows away again below 1024px, where
209
+ * the switcher's width wins — so the popover/aria fallback of
210
+ * `compact` remains the narrow-screen behavior unchanged. Without
211
+ * `compact` this prop is a no-op (the rows already render). */
212
+ inlineVersions: { type: Boolean, default: false },
202
213
  onRetry: { type: Function as PropType<() => void>, default: undefined },
203
214
  latencyMs: { type: Number, default: null },
204
215
  // The sentinel tier "none" suppresses BOTH the protocol and the
@@ -440,6 +451,7 @@ export const HkStatusBar = defineComponent({
440
451
  ref={anchorRef}
441
452
  class={tagClass}
442
453
  data-compact={props.compact || undefined}
454
+ data-inline-versions={props.compact && props.inlineVersions ? "true" : undefined}
443
455
  role="button"
444
456
  tabindex={0}
445
457
  aria-label={props.compact
@@ -108,9 +108,12 @@ const PROBE_CSS = sass.compileString("@media (min-width: 600px) { .hk-probe { co
108
108
  // happy-dom reports an unset cursor as "" (a browser reports "auto").
109
109
  const isAuto = (value: string): boolean => value === "" || value === "auto";
110
110
 
111
+ // Flush the copy write to a settled state instead of counting microtasks:
112
+ // the copy path now runs through the shared clipboard hub (user direction
113
+ // 2026-12-01), which adds promise hops between the click and the toast —
114
+ // still zero-milliseconds in real time, but more than the old two ticks.
111
115
  async function settle() {
112
- await Promise.resolve();
113
- await Promise.resolve();
116
+ for (let i = 0; i < 10; i++) await Promise.resolve();
114
117
  }
115
118
 
116
119
  function bodyCells(c: HTMLElement): HTMLElement[] {
@@ -0,0 +1,86 @@
1
+ /**
2
+ * The sheet-level guard for compact-with-inline-versions (the fold).
3
+ *
4
+ * Why this pin and not documentation: the fold lives in the SHARED sheet
5
+ * (`styles/admin-tokens.scss`, mirrored into the Rust crate), not in the
6
+ * component — so HkStatusBar.test.tsx can only see the ATTR wiring, and
7
+ * jsdom cannot evaluate a media query to see the fold. PR #1675's
8
+ * mutation M2 (fold media `1023px` → `4095px`) compiled clean, kept the
9
+ * whole vitest suite green, and swallowed the restore at every real
10
+ * desktop width — the component tests never noticed.
11
+ *
12
+ * This file reads the sheet SOURCE and pins the structural facts the
13
+ * compiled CSS depends on:
14
+ * 1. the restore rule (`[data-compact][data-inline-versions]` →
15
+ * `.s-status-bar-tag-value` shown) exists;
16
+ * 2. the fold media query `(max-width: 1023px)` sits INSIDE the
17
+ * restore block, so it compiles after it at equal specificity and
18
+ * wins inside the range;
19
+ * 3. the fold restates the compact contract (gap/padding/min-height
20
+ * and the hidden value grid), so a folded pill is byte-for-byte
21
+ * the bare-dot pill compact always rendered.
22
+ */
23
+ import { describe, expect, it } from "vitest";
24
+ import { readFileSync } from "node:fs";
25
+ import { dirname, join } from "node:path";
26
+ import { fileURLToPath } from "node:url";
27
+
28
+ const here = dirname(fileURLToPath(import.meta.url));
29
+ const sheet = readFileSync(join(here, "../styles/admin-tokens.scss"), "utf-8");
30
+
31
+ /** The `[data-compact]` block's source, from its selector to the close
32
+ * of its rule (the sheet nests, so the block owns the fold). */
33
+ function compactBlock(): string {
34
+ const start = sheet.indexOf(".s-status-bar-tag[data-compact] {");
35
+ expect(start, "the compact block must exist in admin-tokens.scss").toBeGreaterThan(-1);
36
+ // The block ends at the matching close brace (the touch-slop pseudo
37
+ // nests inside it — count braces from the selector).
38
+ let depth = 0;
39
+ let end = start;
40
+ for (let i = sheet.indexOf("{", start); i < sheet.length; i++) {
41
+ if (sheet[i] === "{") depth++;
42
+ if (sheet[i] === "}") {
43
+ depth--;
44
+ if (depth === 0) {
45
+ end = i;
46
+ break;
47
+ }
48
+ }
49
+ }
50
+ return sheet.slice(start, end + 1);
51
+ }
52
+
53
+ describe("the compact inline-versions sheet contract", () => {
54
+ it("restores the version grid inside [data-compact][data-inline-versions]", () => {
55
+ const block = compactBlock();
56
+ const restore = block.match(
57
+ /&\[data-inline-versions\] \{[\s\S]*?\n \}/,
58
+ );
59
+ expect(restore, "the inline-versions restore block must exist").toBeTruthy();
60
+ expect(restore![0]).toContain(".s-status-bar-tag-value");
61
+ expect(restore![0]).toContain("display: inline-grid");
62
+ expect(restore![0]).toContain("gap: 10px");
63
+ });
64
+
65
+ it("folds the rows back below 1024px, inside the restore block", () => {
66
+ const block = compactBlock();
67
+ const restore = block.match(/&\[data-inline-versions\] \{[\s\S]*?\n \}/)!;
68
+ const fold = restore[0].match(/@media \(max-width: 1023px\) \{[\s\S]*?\n \}/);
69
+ expect(fold, "the 1023px fold must sit inside the restore block").toBeTruthy();
70
+ expect(fold![0]).toContain("display: none");
71
+ // The fold restates the bare-dot contract, not something new.
72
+ expect(fold![0]).toContain("gap: 0");
73
+ expect(fold![0]).toContain("padding: 8px");
74
+ expect(fold![0]).toContain("min-height: 28px");
75
+ });
76
+
77
+ it("never widens the fold past the compact base block", () => {
78
+ // The fold must NOT appear outside the restore block (a stray
79
+ // top-level fold would hide versions in full-mode footers too).
80
+ const block = compactBlock();
81
+ const foldCount = (block.match(/@media \(max-width: 1023px\)/g) ?? []).length;
82
+ expect(foldCount, "exactly one fold, scoped to the restore").toBe(1);
83
+ const before = sheet.slice(0, sheet.indexOf(".s-status-bar-tag[data-compact] {"));
84
+ expect(before).not.toContain("data-inline-versions");
85
+ });
86
+ });