@celestia-island/hikari 0.55.408 → 0.55.411

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.408",
3
+ "version": "0.55.411",
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",
package/src/index.ts CHANGED
@@ -342,6 +342,8 @@ export {
342
342
  type ThemeDecorSlot, type ThemeDecorRegistration, type ThemeDecorBuiltinRegistration,
343
343
  type FontContextOverrides,
344
344
  } from "./theme";
345
+ export { deriveSemanticPalette, CANONICAL_SEMANTIC, contrastRatio, hueDistance, rgbToOklch, oklchToRgb } from "./theme/semanticPalette";
346
+ export type { SemanticPalette, SemanticFills, OKLCH } from "./theme/semanticPalette";
345
347
 
346
348
  // Wallpaper logic layer (ported from shittim-chest). The pack, the brand map
347
349
  // and the pipeline registry arrive as host registrations.
@@ -36,6 +36,16 @@ export declare const BOOT_RECOVERY_MESSAGE: string;
36
36
  /** Default failure-panel retry label (English; override through `copy.retry`). */
37
37
  export declare const BOOT_RECOVERY_RETRY: string;
38
38
 
39
+ /** Default copy-action label of the error-context half (English; override
40
+ * through `copy.errorContext.copy`). */
41
+ export declare const BOOT_RECOVERY_COPY_ACTION: string;
42
+
43
+ /** Default success feedback of the copy action (`copy.errorContext.copied`). */
44
+ export declare const BOOT_RECOVERY_COPIED: string;
45
+
46
+ /** Default failure feedback of the copy action (`copy.errorContext.copyFailed`). */
47
+ export declare const BOOT_RECOVERY_COPY_FAILED: string;
48
+
39
49
  /** Marker attribute on the injected `<script>` tag (inline or, with
40
50
  * `external: true`, the `src` tag). */
41
51
  export declare const BOOT_RECOVERY_ATTR: "data-hk-boot-recovery";
@@ -162,6 +172,68 @@ export interface BootRecoveryCopyOptions {
162
172
  * translate the heading; a row without one falls back to this value.
163
173
  */
164
174
  rawDetailsLabel?: string;
175
+ /**
176
+ * The ERROR CONTEXT: the captured boot log and the copy action.
177
+ *
178
+ * A timeout panel's blind spot is that nothing was LISTENING while the app
179
+ * failed to mount. Configuring this installs, the moment the recovery
180
+ * script executes (before the app bundle), four guarded capture sources —
181
+ * wrapped `console.error`/`warn`/`log`/`info` (originals still run first),
182
+ * capture-phase `error` events (an ErrorEvent is an uncaught script
183
+ * exception; any other error event is a failed resource),
184
+ * `unhandledrejection` events (one matching the chunk-miss family is
185
+ * recorded as the fatal, because dynamic import failures surface as
186
+ * rejections on several browsers) — feeding a bounded ring of the newest
187
+ * entries. The raw-details pane's payload then gains, when anything was
188
+ * captured: `console` (the ring, oldest first, each entry
189
+ * `{ t, level, text }` with `t` = ms since boot start) and `lastError`
190
+ * (the first captured fatal's message/source/line/column/stack), rendered
191
+ * by the SAME HkJsonTree contract. The watchdog also upgrades its
192
+ * classification: with a captured fatal, a silent expiry is classified
193
+ * exactly like an `__appFatal` message (chunk-miss family → `chunk`,
194
+ * otherwise `error`) instead of a bare timeout.
195
+ *
196
+ * It also adds a SECOND action to the landing — a copy button placed
197
+ * before the reload button that hands the operator the pane's REDACTED
198
+ * payload text (async Clipboard API, then a guarded `execCommand("copy")`
199
+ * fallback, because the API exists only in secure contexts and a dead boot
200
+ * is often served over plain HTTP), flipping to the copied/failed label
201
+ * for a moment. `copy` / `copied` / `copyFailed` are that button's labels
202
+ * in the host's base language (the defaults are the retired family
203
+ * script's own English wording); `locales` translates them per tag,
204
+ * normalised like `copy.locales` keys — every member optional, present
205
+ * ones non-empty, the current locale's partial entry merging over the
206
+ * defaults. `locales` requires `copy.locales`.
207
+ *
208
+ * REQUIRES `rawDetailsLabel`: the ring is reported through the pane's tree
209
+ * and the copy action hands out the pane's payload text, so configuring
210
+ * this without the pane fails at config time (it is then also excluded by
211
+ * the heal-only mode, which never paints a panel). Omit it (or pass
212
+ * `false`) and the script is byte-identical to the panel without the
213
+ * capture; an explicit `true` turns it on with the English default labels.
214
+ * The freeze rides `__appReady` (see {@link BootRecoveryGlobalsOptions}): a
215
+ * host that ALSO sets `globals.ready: false` keeps recording for the whole
216
+ * document's lifetime — the ring stays bounded, but post-mount console
217
+ * noise can displace the boot evidence, so only do that deliberately.
218
+ * Present-but-blank `copy` / `copied` / `copyFailed` values fail at config
219
+ * time (the same rule as a blank `rawDetailsLabel`).
220
+ */
221
+ errorContext?:
222
+ | {
223
+ /** Copy-button label (default "Copy details"). */
224
+ copy?: string;
225
+ /** Transient success feedback (default "Copied"). */
226
+ copied?: string;
227
+ /** Transient failure feedback (default "Copy failed"). */
228
+ copyFailed?: string;
229
+ /** Per-locale overrides of the three labels; every member optional,
230
+ * present ones non-empty. Requires `copy.locales`. */
231
+ locales?: Record<
232
+ string,
233
+ { copy?: string; copied?: string; copyFailed?: string }
234
+ >;
235
+ }
236
+ | boolean;
165
237
  /**
166
238
  * The BROWSER-BLOCK notice — the panel's info-tone mode for a shell that
167
239
  * refuses to run on an unsupported browser.
@@ -297,14 +369,17 @@ export interface BootRecoveryCopyOptions {
297
369
  * OFF; leaving a slot out keeps the family default.
298
370
  *
299
371
  * The defaults are published only alongside the feature that needs them:
300
- * `block` with `copy.browserBlock`, `fatal` / `ready` with `copy.reasons`.
372
+ * `block` with `copy.browserBlock`, `fatal` with `copy.reasons`, and `ready`
373
+ * with `copy.reasons` OR `copy.errorContext` (the capture's recording freeze
374
+ * rides the same mount handoff).
301
375
  */
302
376
  export interface BootRecoveryGlobalsOptions {
303
377
  /** Unsupported-browser entry (default `"__appBlock"`). */
304
378
  block?: string | { global?: string | false } | false;
305
379
  /** Pre-mount error report entry (default `"__appFatal"`). */
306
380
  fatal?: string | { global?: string | false } | false;
307
- /** Mount-succeeded handoff entry (default `"__appReady"`). */
381
+ /** Mount-succeeded handoff entry (default `"__appReady"`; published with
382
+ * `copy.reasons` or `copy.errorContext`). */
308
383
  ready?: string | { global?: string | false } | false;
309
384
  }
310
385
 
@@ -347,7 +422,8 @@ export interface BootRecoveryPluginOptions {
347
422
  isMangledOrigin?: (protocol: string, hostname: string) => boolean;
348
423
  /** Failure-panel copy overrides. */
349
424
  /** Failure-panel copy overrides and the opt-in diagnostics halves
350
- * (`copy.rawDetailsLabel`, `copy.browserBlock`, `copy.reasons`). */
425
+ * (`copy.rawDetailsLabel`, `copy.browserBlock`, `copy.reasons`,
426
+ * `copy.errorContext`). */
351
427
  copy?: BootRecoveryCopyOptions;
352
428
  /**
353
429
  * Rename or disable the page globals the panel publishes for the host's own