@celestia-island/hikari 0.55.415 → 0.55.417
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 +1 -1
- package/src/components/HkAffixPicker.scss +2 -2
- package/src/components/HkAlert.scss +12 -12
- package/src/components/HkAuthSubmitButton.scss +1 -1
- package/src/components/HkBlockingToast.scss +7 -7
- package/src/components/HkBreadcrumb.scss +3 -3
- package/src/components/HkCardList.scss +3 -3
- package/src/components/HkColorSchemeEditor.test.ts +179 -0
- package/src/components/HkColorSchemeEditor.tsx +57 -2
- package/src/components/HkCookieConsent.scss +1 -1
- package/src/components/HkCurrencySelect.scss +2 -2
- package/src/components/HkDiffViewer.scss +5 -5
- package/src/components/HkEditableTable.scss +1 -1
- package/src/components/HkEmergencySnoozeTray.scss +2 -2
- package/src/components/HkFileBrowserDialog.scss +2 -2
- package/src/components/HkFileField.scss +3 -3
- package/src/components/HkFilePickerField.scss +2 -2
- package/src/components/HkFilterPanel.scss +1 -1
- package/src/components/HkIcon.scss +3 -3
- package/src/components/HkIconButtonGroup.scss +1 -1
- package/src/components/HkIconChip.scss +4 -4
- package/src/components/HkInput.scss +3 -3
- package/src/components/HkLogWindow.scss +2 -2
- package/src/components/HkMenu.scss +1 -1
- package/src/components/HkMessageBox.scss +2 -2
- package/src/components/HkMoneyInput.scss +2 -2
- package/src/components/HkNotificationBell.scss +3 -3
- package/src/components/HkOtpInput.scss +2 -2
- package/src/components/HkPasswordSurface.scss +12 -12
- package/src/components/HkPersistentToast.scss +3 -3
- package/src/components/HkPillToggleGroup.scss +6 -6
- package/src/components/HkPillToggleGroup.test.tsx +12 -7
- package/src/components/HkPopupSelect.scss +3 -3
- package/src/components/HkProgressBar.scss +1 -1
- package/src/components/HkProgressBar.styles.test.ts +1 -1
- package/src/components/HkProgressRing.scss +2 -2
- package/src/components/HkQuote.scss +3 -3
- package/src/components/HkRangeRibbon.scss +1 -1
- package/src/components/HkSecretRevealModal.scss +1 -1
- package/src/components/HkSelect.scss +3 -3
- package/src/components/HkSelectionGrid.scss +4 -4
- package/src/components/HkSelectionGrid.test.tsx +183 -54
- package/src/components/HkSelectionWaterfall.scss +4 -4
- package/src/components/HkStatCard.scss +4 -4
- package/src/components/HkStatusBar.tsx +9 -9
- package/src/components/HkStatusRow.scss +3 -3
- package/src/components/HkStepGuide.scss +2 -2
- package/src/components/HkSwitch.scss +1 -1
- package/src/components/HkTag.scss +12 -12
- package/src/components/HkTemplateField.scss +1 -1
- package/src/components/HkTextarea.scss +1 -1
- package/src/components/HkToast.scss +5 -5
- package/src/components/HkTree.scss +2 -2
- package/src/components/_menu-item.scss +4 -4
- package/src/plugins/boot-recovery.details.test.ts +1 -1
- package/src/plugins/boot-recovery.diagnostics.test.ts +1 -1
- package/src/plugins/boot-recovery.error-context.test.ts +1 -1
- package/src/plugins/boot-recovery.locales.test.ts +1 -1
- package/src/plugins/bootLandingCss.js +1 -1
- package/src/plugins/bootLandingDetailsCss.js +1 -1
- package/src/styles/admin-tokens.scss +16 -16
- package/src/styles/channelFallbacks.test.ts +15 -0
- package/src/styles/theme/channels.scss +23 -13
- package/src/styles/theme/scrollbar.scss +3 -3
- package/src/styles/tokenInventory.test.ts +19 -0
- package/src/theme/_field.scss +3 -3
- package/src/theme/index.ts +1 -1
- package/src/theme/presets.ts +73 -14
- package/src/theme/solidInk.contract.test.ts +77 -6
- package/src/tokens.scss +23 -13
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { afterEach, describe, expect, it } from "vitest";
|
|
2
2
|
import { createApp, h } from "vue";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
3
4
|
import { compile } from "sass";
|
|
4
5
|
import { dirname, resolve } from "node:path";
|
|
5
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -448,25 +449,59 @@ describe("HkSelectionGrid selected-edge stylesheet contract", () => {
|
|
|
448
449
|
return layers;
|
|
449
450
|
}
|
|
450
451
|
|
|
452
|
+
// FALSE REDS ARE THE INTENDED FAILURE MODE. These pins are source-level
|
|
453
|
+
// allowlists, so a legitimate edit can trip one — tinting a border
|
|
454
|
+
// (`border-inline-color`), adding a corner radius longhand, a gradient
|
|
455
|
+
// icon inside the item, moving the inset to a wider token, a second
|
|
456
|
+
// pseudo-element — INCLUDING one declared on the base or edge class,
|
|
457
|
+
// which paints on selected items too; removing the selected ring outright
|
|
458
|
+
// (`box-shadow: none`, at any specificity); and vendor-prefixed
|
|
459
|
+
// `box-shadow` aliases. Each fails LOUDLY and names the property/rule;
|
|
460
|
+
// the fix is to update this contract in the same commit as the design
|
|
461
|
+
// change, not to loosen the pin. A silent green is the failure this file
|
|
462
|
+
// exists to prevent. The shadow set is value-level and rule-agnostic: a
|
|
463
|
+
// scoped rule reusing one of the four canonical values exactly is allowed
|
|
464
|
+
// (it paints the same thing); any other text is red.
|
|
451
465
|
const TAB = ".hk-selection-grid[data-edge] .hk-selection-grid-item[data-selected]::before";
|
|
452
466
|
const ITEM = ".hk-selection-grid-item";
|
|
453
467
|
const SELECTED = ".hk-selection-grid-item[data-selected]";
|
|
454
468
|
|
|
455
|
-
/** Rules whose selector list
|
|
456
|
-
*
|
|
469
|
+
/** Rules whose selector list can match an element carrying `token`
|
|
470
|
+
* (`data-selected` here), in document order.
|
|
471
|
+
*
|
|
472
|
+
* A source-level pin has to look at EVERY rule that can match the element,
|
|
457
473
|
* not just the one canonical spelling — otherwise a higher-specificity
|
|
458
|
-
* descendant selector or a `::after` clone overrides the canonical rule
|
|
459
|
-
*
|
|
474
|
+
* descendant selector or a `::after` clone overrides the canonical rule in
|
|
475
|
+
* the browser while this file stays green. Matching is therefore on the
|
|
476
|
+
* ATTRIBUTE TOKEN, not the whole compound: `:is([data-selected])`,
|
|
477
|
+
* `[data-selected="true"]`, `[data-selected] .child` and the plain form
|
|
478
|
+
* all carry it, and all of them can restyle a selected item. */
|
|
479
|
+
function rulesTouching(token: string): CssRule[] {
|
|
480
|
+
// `i` + a lowercased subject: HTML attribute NAMES are ASCII
|
|
481
|
+
// case-insensitive, so `[Data-Selected]` styles the same element.
|
|
482
|
+
const needle = new RegExp(`\\[${token}(?![a-z-])`, "i");
|
|
483
|
+
return rules.filter((r) =>
|
|
484
|
+
r.selector.split(",").some((one) => needle.test(one.toLowerCase())),
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/** Rules that name the component's item at all (any state). */
|
|
460
489
|
function rulesNaming(needle: string): CssRule[] {
|
|
461
490
|
return rules.filter((r) =>
|
|
462
491
|
r.selector.split(",").some((one) => one.includes(needle)),
|
|
463
492
|
);
|
|
464
493
|
}
|
|
465
494
|
|
|
466
|
-
/** Normalized form of one compound selector:
|
|
467
|
-
*
|
|
495
|
+
/** Normalized form of one compound selector: lowercased (pseudo-element
|
|
496
|
+
* NAMES are ASCII case-insensitive in CSS) and with `:before` folded
|
|
497
|
+
* into `::before` (the same pseudo-element). Both sides of a comparison
|
|
498
|
+
* go through this, so the folding is consistent. */
|
|
468
499
|
function normalized(selector: string): string {
|
|
469
|
-
return selector
|
|
500
|
+
return selector
|
|
501
|
+
.toLowerCase()
|
|
502
|
+
.replace(/\s+/g, " ")
|
|
503
|
+
.trim()
|
|
504
|
+
.replace(/(^|[^:]):(before|after)\b/g, "$1::$2");
|
|
470
505
|
}
|
|
471
506
|
|
|
472
507
|
it("detaches the accent tab from the selected frame", () => {
|
|
@@ -496,9 +531,19 @@ describe("HkSelectionGrid selected-edge stylesheet contract", () => {
|
|
|
496
531
|
// Exactly ONE pseudo-element draws on a selected item. A second tab
|
|
497
532
|
// (a `::after` clone, or the single-colon spelling, or a `:hover`
|
|
498
533
|
// variant) would paint a competing bar the geometry pins never see.
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
534
|
+
// ANY pseudo-element rule that can touch an item counts — by CLASS
|
|
535
|
+
// spelling (base/edge variants) AND by attribute token (`:is()`,
|
|
536
|
+
// `[data-selected="true"]`, attribute-only descendants). The two
|
|
537
|
+
// matchers are UNIONED: five rounds each found a spelling one of them
|
|
538
|
+
// missed, never both.
|
|
539
|
+
const pseudo = /::?(before|after)\b/i;
|
|
540
|
+
const tabs = [
|
|
541
|
+
...new Set(
|
|
542
|
+
[...rulesNaming(".hk-selection-grid-item"), ...rulesTouching("data-selected")]
|
|
543
|
+
.filter((r) => pseudo.test(r.selector))
|
|
544
|
+
.map((r) => normalized(r.selector)),
|
|
545
|
+
),
|
|
546
|
+
];
|
|
502
547
|
expect(tabs).toEqual([normalized(TAB)]);
|
|
503
548
|
// The tab's declaration set is closed: no extra `inset`/`margin`/
|
|
504
549
|
// `translate`/`rotate` may move or resize it behind the pins' back.
|
|
@@ -529,19 +574,15 @@ describe("HkSelectionGrid selected-edge stylesheet contract", () => {
|
|
|
529
574
|
// selected state) is a design change, not this defect — the other pins
|
|
530
575
|
// still hold the ring and the tab. Which four sides the browser really
|
|
531
576
|
// paints was verified by pixel measurement during review (see the PR).
|
|
532
|
-
const borderProps =
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
"border-radius",
|
|
542
|
-
"border-start-start-radius",
|
|
543
|
-
"border-end-start-radius",
|
|
544
|
-
].filter((prop) => borderProps.has(prop)).sort());
|
|
577
|
+
const borderProps = [
|
|
578
|
+
...new Set(
|
|
579
|
+
rules
|
|
580
|
+
.flatMap((r) => r.declarations)
|
|
581
|
+
.map(([prop]) => prop)
|
|
582
|
+
.filter((prop) => /^border(-|$)/.test(prop)),
|
|
583
|
+
),
|
|
584
|
+
].sort();
|
|
585
|
+
expect(borderProps).toEqual(["border", "border-color", "border-radius"]);
|
|
545
586
|
// The one width-bearing declaration is the item's shorthand, and the
|
|
546
587
|
// selected state colours the border instead of resizing it.
|
|
547
588
|
expect(computedFor(ITEM).get("border")).toMatch(/^1px solid /);
|
|
@@ -551,43 +592,131 @@ describe("HkSelectionGrid selected-edge stylesheet contract", () => {
|
|
|
551
592
|
);
|
|
552
593
|
});
|
|
553
594
|
|
|
554
|
-
it("
|
|
555
|
-
//
|
|
556
|
-
//
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
//
|
|
561
|
-
//
|
|
562
|
-
//
|
|
563
|
-
//
|
|
564
|
-
//
|
|
565
|
-
// inset ring, and non-inset elevation shadows.
|
|
595
|
+
it("paints no image, no halo, and shadows no layout token, anywhere", () => {
|
|
596
|
+
// SHEET-WIDE VALUE SCAN (case-insensitive — CSS function names are
|
|
597
|
+
// ASCII case-insensitive, so `linear-Gradient(` is the same call). A
|
|
598
|
+
// leading slab can be rebuilt through channels a border/box-shadow
|
|
599
|
+
// whitelist never reads: a gradient via `background-image` OR via the
|
|
600
|
+
// `background` SHORTHAND, OR parked in a custom property and consumed
|
|
601
|
+
// through `var()`; a halo through `filter`/`backdrop-filter`
|
|
602
|
+
// `drop-shadow`. None of those may appear in THIS sheet — a gradient
|
|
603
|
+
// parked in the token sheet and consumed through `var()` is outside
|
|
604
|
+
// this pin's reach (the token file is prose-scanned for the spacing
|
|
605
|
+
// token only).
|
|
566
606
|
const offenders: string[] = [];
|
|
567
|
-
for (const rule of
|
|
607
|
+
for (const rule of rules) {
|
|
568
608
|
for (const [prop, value] of rule.declarations) {
|
|
569
|
-
if (
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
}
|
|
609
|
+
if (/(gradient|url|image-set)\(/i.test(value)) {
|
|
610
|
+
offenders.push(`${rule.selector} → ${prop}: ${value}`);
|
|
611
|
+
} else if (/drop-shadow\(/i.test(value)) {
|
|
612
|
+
offenders.push(`${rule.selector} → ${prop}: ${value}`);
|
|
613
|
+
} else if (/^--(space|radius)-/.test(prop)) {
|
|
614
|
+
offenders.push(`${rule.selector} declares ${prop} (tokens live in scale.scss)`);
|
|
575
615
|
}
|
|
576
616
|
}
|
|
577
617
|
}
|
|
578
618
|
expect(offenders).toEqual([]);
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
it("keeps the upstream spacing token wide enough for a visible gap", () => {
|
|
622
|
+
// SCOPE, stated so it is not read as more than it is: this pins the
|
|
623
|
+
// CANONICAL UPSTREAM token, not the rendered gap. The sheet may not
|
|
624
|
+
// shadow the token (pinned above), so for a host that resolves the
|
|
625
|
+
// sheet's own scale the two are the same fact; a consumer that
|
|
626
|
+
// redefines `--space-4` on an ANCESTOR at runtime is outside this
|
|
627
|
+
// file's reach and was measured in the review instead (the tab sits 5px
|
|
628
|
+
// from the border box at the shipped 0.25rem).
|
|
629
|
+
//
|
|
630
|
+
// EVERY declaration of the token must clear the bar — a media-scoped
|
|
631
|
+
// retune to 2px is as much a hairline gap as a base one, so "last one
|
|
632
|
+
// wins" would be exactly the cascade-blindness this file exists to
|
|
633
|
+
// prevent. The gap is `token − 1px` (the tab starts inside the 1px
|
|
634
|
+
// border), so 2px leaves a 1px hairline: require 3px.
|
|
635
|
+
const scale = readFileSync(resolve(here, "../scale.scss"), "utf8");
|
|
636
|
+
// Reading the UPSTREAM sheet is sufficient because the vendored theme
|
|
637
|
+
// copy is pinned byte-identical to it (`src/styles/vendoredSync.test.ts`)
|
|
638
|
+
// and the Rust mirror drift-guard keeps the crates copy in step.
|
|
639
|
+
// Strip block comments AND line comments (a commented mention must not
|
|
640
|
+
// be what this reads), then match case-insensitively — matching the
|
|
641
|
+
// component-token ban, which is case-insensitive too.
|
|
642
|
+
const source = scale
|
|
643
|
+
.replace(/\/\*[\s\S]*?\*\//g, "")
|
|
644
|
+
.replace(/(^|\s)\/\/[^\n]*/g, "$1")
|
|
645
|
+
.toLowerCase();
|
|
646
|
+
const declared = [...source.matchAll(/--space-4\s*:\s*([^;]+);/g)].map((m) =>
|
|
647
|
+
m[1].trim(),
|
|
648
|
+
);
|
|
649
|
+
expect(declared.length, "--space-4 must be declared upstream").toBeGreaterThan(0);
|
|
650
|
+
for (const raw of declared) {
|
|
651
|
+
const rem = raw.match(/^(-?[\d.]+)rem$/);
|
|
652
|
+
const px = raw.match(/^(-?[\d.]+)px$/);
|
|
653
|
+
expect(
|
|
654
|
+
rem !== null || px !== null,
|
|
655
|
+
`--space-4 must be a plain rem/px length to be checkable, got "${raw}"`,
|
|
656
|
+
).toBe(true);
|
|
657
|
+
const resolved = rem ? Number.parseFloat(rem[1]) * 16 : Number.parseFloat(px![1]);
|
|
658
|
+
expect(
|
|
659
|
+
resolved,
|
|
660
|
+
`--space-4 resolves to ${resolved}px (gap ${resolved - 1}px)`,
|
|
661
|
+
).toBeGreaterThanOrEqual(3);
|
|
662
|
+
}
|
|
663
|
+
// The pill's radius token must exist as well (the tab falls back to a
|
|
664
|
+
// square cap without it, which reads as a different shape).
|
|
665
|
+
expect(source).toMatch(/--radius-full:\s*[^;]+;/);
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
it("keeps the shadow vocabulary closed to the four canonical declarations", () => {
|
|
669
|
+
// THE FINAL FORM of this pin, after four rounds of value-judging leaks:
|
|
670
|
+
// instead of deciding what a shadow layer MEANS (blur? spread? var()
|
|
671
|
+
// fallback? which colour spelling?), the sheet's shadow vocabulary is a
|
|
672
|
+
// CLOSED SET. These four declarations — compared as normalized TEXT —
|
|
673
|
+
// are the only box-shadow values allowed to exist anywhere in the sheet:
|
|
674
|
+
//
|
|
675
|
+
// item:hover 0 2px 12px color-mix(...) (elevation)
|
|
676
|
+
// item:active 0 1px 4px color-mix(...) (pressed)
|
|
677
|
+
// item[data-selected] inset 0 0 0 1px var(…) (the ring)
|
|
678
|
+
// …[data-selected]:hover ring + the same elevation
|
|
679
|
+
//
|
|
680
|
+
// Everything else is a loud red that means "update this contract in the
|
|
681
|
+
// same commit as the design change": a scoped variant, a var()-composed
|
|
682
|
+
// layer, a hard bar (whether its colour is spelled `#hex`, `rgb(...)`
|
|
683
|
+
// or `var()`), a unit variant (`0.0625rem`), `none`, a second layer —
|
|
684
|
+
// ALL of them change the text, so ALL of them fail. Which sides the
|
|
685
|
+
// browser really paints was pixel-measured in review (see the PR); this
|
|
686
|
+
// pin exists so the vocabulary cannot drift silently.
|
|
687
|
+
// LITERALS, not derived from the sheet: an allowlist read back from the
|
|
688
|
+
// sheet it polices is self-fulfilling (a mutation to a canonical rule
|
|
689
|
+
// would redefine the allowlist and pass). These four strings are the
|
|
690
|
+
// merged single-line forms of the sheet's declarations; whitespace and
|
|
691
|
+
// case are normalized on both sides, nothing else is.
|
|
692
|
+
const canonical = new Set(
|
|
693
|
+
[
|
|
694
|
+
"0 2px 12px color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 10%, transparent)",
|
|
695
|
+
"0 1px 4px color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 6%, transparent)",
|
|
696
|
+
"inset 0 0 0 1px var(--hi-color-primary, #7aa2f7)",
|
|
697
|
+
"inset 0 0 0 1px var(--hi-color-primary, #7aa2f7), 0 2px 12px color-mix(in srgb, var(--hi-color-primary, #7aa2f7) 14%, transparent)",
|
|
698
|
+
].map((v) => v.replace(/\s+/g, " ").trim().toLowerCase()),
|
|
591
699
|
);
|
|
700
|
+
expect(canonical.size).toBe(4);
|
|
701
|
+
const foreign: string[] = [];
|
|
702
|
+
for (const rule of rules) {
|
|
703
|
+
for (const [prop, value] of rule.declarations) {
|
|
704
|
+
// `-webkit-box-shadow` is the same property to the engine (and the
|
|
705
|
+
// repo has precedent for the spelling) — alias and bare form are
|
|
706
|
+
// both policed.
|
|
707
|
+
if (!/(^|-)box-shadow$/.test(prop)) continue;
|
|
708
|
+
const norm = value.replace(/\s+/g, " ").trim().toLowerCase();
|
|
709
|
+
if (!canonical.has(norm)) foreign.push(`${rule.selector} → ${prop}: ${value}`);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
expect(foreign).toEqual([]);
|
|
713
|
+
// The selected state's own shadow carries exactly ONE inset layer — the
|
|
714
|
+
// ring (its `:hover` sibling adds the documented elevation on top).
|
|
715
|
+
const insetLayers = splitLayers(computedFor(SELECTED).get("box-shadow") ?? "").filter(
|
|
716
|
+
(l) => /^inset\b/i.test(l),
|
|
717
|
+
);
|
|
718
|
+
expect(insetLayers).toHaveLength(1);
|
|
719
|
+
expect(insetLayers[0]).toMatch(/^inset 0 0 0 1px/i);
|
|
592
720
|
});
|
|
721
|
+
|
|
593
722
|
});
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
color: var(--hi-color-text-tertiary, #8b949e);
|
|
86
86
|
|
|
87
87
|
&[data-variant="success"] {
|
|
88
|
-
background: color-mix(in srgb, var(--hi-color-success, #
|
|
89
|
-
color: var(--hi-color-success, #
|
|
88
|
+
background: color-mix(in srgb, var(--hi-color-success, #1f6530) 12%, transparent);
|
|
89
|
+
color: var(--hi-color-success-fg, #1f6530);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
&[data-variant="info"] {
|
|
93
|
-
background: color-mix(in srgb, var(--hi-color-info, #
|
|
94
|
-
color: var(--hi-color-info, #
|
|
93
|
+
background: color-mix(in srgb, var(--hi-color-info, #006274) 12%, transparent);
|
|
94
|
+
color: var(--hi-color-info-fg, #006274);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
&[data-variant="primary"] {
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
flex-shrink: 0;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.hk-stat-card-chip-icon-success { background: rgb(var(--color-success) / 12%); color: rgb(var(--color-success)); }
|
|
107
|
-
.hk-stat-card-chip-icon-warning { background: rgb(var(--color-warning) / 12%); color: rgb(var(--color-warning)); }
|
|
108
|
-
.hk-stat-card-chip-icon-error { background: rgb(var(--color-error) / 12%); color: rgb(var(--color-error)); }
|
|
109
|
-
.hk-stat-card-chip-icon-info { background: rgb(var(--color-info, rgb(var(--color-primary))) / 12%); color:
|
|
106
|
+
.hk-stat-card-chip-icon-success { background: rgb(var(--color-success) / 12%); color: var(--hi-color-success-fg, rgb(var(--color-success))); }
|
|
107
|
+
.hk-stat-card-chip-icon-warning { background: rgb(var(--color-warning) / 12%); color: var(--hi-color-warning-fg, rgb(var(--color-warning))); }
|
|
108
|
+
.hk-stat-card-chip-icon-error { background: rgb(var(--color-error) / 12%); color: var(--hi-color-danger-fg, rgb(var(--color-error))); }
|
|
109
|
+
.hk-stat-card-chip-icon-info { background: rgb(var(--color-info, rgb(var(--color-primary))) / 12%); color: var(--hi-color-info-fg, rgb(var(--color-info))); }
|
|
110
110
|
.hk-stat-card-chip-icon-primary { background: rgb(var(--color-primary) / 12%); color: rgb(var(--color-primary)); }
|
|
111
111
|
.hk-stat-card-chip-icon-muted { background: rgb(var(--color-muted) / 12%); color: rgb(var(--color-muted)); }
|
|
112
112
|
|
|
@@ -65,9 +65,9 @@ function regionDisplayName(
|
|
|
65
65
|
|
|
66
66
|
function latencyColor(ms: number | null): string {
|
|
67
67
|
if (ms === null) return "var(--color-muted)";
|
|
68
|
-
if (ms < 30) return "rgb(var(--color-success))";
|
|
69
|
-
if (ms < 100) return "rgb(var(--color-warning))";
|
|
70
|
-
return "rgb(var(--color-error))";
|
|
68
|
+
if (ms < 30) return "var(--hi-color-success-fg, rgb(var(--color-success)))";
|
|
69
|
+
if (ms < 100) return "var(--hi-color-warning-fg, rgb(var(--color-warning)))";
|
|
70
|
+
return "var(--hi-color-danger-fg, rgb(var(--color-error)))";
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function qualityIcon(quality: string, tier: string, isLocalhost: boolean, size: number) {
|
|
@@ -239,10 +239,10 @@ export const HkStatusBar = defineComponent({
|
|
|
239
239
|
const touchOpenedPopover = ref(false);
|
|
240
240
|
|
|
241
241
|
const dotColorMap: Record<string, string> = {
|
|
242
|
-
connected: "rgb(var(--color-success))",
|
|
243
|
-
connecting: "rgb(var(--color-warning))",
|
|
244
|
-
reconnecting: "rgb(var(--color-warning))",
|
|
245
|
-
disconnected: "rgb(var(--color-error))",
|
|
242
|
+
connected: "var(--hi-color-success-fg, rgb(var(--color-success)))",
|
|
243
|
+
connecting: "var(--hi-color-warning-fg, rgb(var(--color-warning)))",
|
|
244
|
+
reconnecting: "var(--hi-color-warning-fg, rgb(var(--color-warning)))",
|
|
245
|
+
disconnected: "var(--hi-color-danger-fg, rgb(var(--color-error)))",
|
|
246
246
|
// Idle (2026-10-17 user direction): the shell is alive but has no
|
|
247
247
|
// session — the login page's resting light. Neutral gray, not red:
|
|
248
248
|
// red means FAULT, and "not yet logged in" is not a fault.
|
|
@@ -537,7 +537,7 @@ export const HkStatusBar = defineComponent({
|
|
|
537
537
|
)}
|
|
538
538
|
</div>
|
|
539
539
|
{connecting && attempt > 0 && (
|
|
540
|
-
<div style={{ display: "flex", alignItems: "center", gap: "4px", color: "rgb(var(--color-warning))", fontSize: "0.6875rem", marginBottom: "4px" }}>
|
|
540
|
+
<div style={{ display: "flex", alignItems: "center", gap: "4px", color: "var(--hi-color-warning-fg, rgb(var(--color-warning)))", fontSize: "0.6875rem", marginBottom: "4px" }}>
|
|
541
541
|
<span>
|
|
542
542
|
{t("hikari::statusBar.retrying", "Retrying {retryCount} / {maxRetries}")
|
|
543
543
|
.replace("{retryCount}", String(attempt))
|
|
@@ -605,7 +605,7 @@ export const HkStatusBar = defineComponent({
|
|
|
605
605
|
<Plug size={12} style={{ opacity: 0.5, flexShrink: 0 }} />
|
|
606
606
|
<span style={{ opacity: 0.5, marginRight: "auto" }}>{t("hikari::statusBar.protocol", "Protocol")}</span>
|
|
607
607
|
{connecting ? (
|
|
608
|
-
<span style={{ color: "rgb(var(--color-warning))" }}>
|
|
608
|
+
<span style={{ color: "var(--hi-color-warning-fg, rgb(var(--color-warning)))" }}>
|
|
609
609
|
{t("hikari::statusBar.probing", "Probing...")}
|
|
610
610
|
</span>
|
|
611
611
|
) : (
|
|
@@ -65,15 +65,15 @@
|
|
|
65
65
|
}
|
|
66
66
|
.hk-status-row--success .hk-status-row__chip {
|
|
67
67
|
background: rgb(var(--color-success, 0 128 68) / 12%);
|
|
68
|
-
color: rgb(var(--color-success
|
|
68
|
+
color: var(--hi-color-success-fg, rgb(var(--color-success)));
|
|
69
69
|
}
|
|
70
70
|
.hk-status-row--warning .hk-status-row__chip {
|
|
71
71
|
background: rgb(var(--color-warning, 200 140 30) / 14%);
|
|
72
|
-
color: rgb(var(--color-warning
|
|
72
|
+
color: var(--hi-color-warning-fg, rgb(var(--color-warning)));
|
|
73
73
|
}
|
|
74
74
|
.hk-status-row--error .hk-status-row__chip {
|
|
75
75
|
background: rgb(var(--color-error, 226 58 69) / 12%);
|
|
76
|
-
color: rgb(var(--color-error
|
|
76
|
+
color: var(--hi-color-danger-fg, rgb(var(--color-error)));
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.hk-status-row__body {
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
background: var(--hi-color-surface, #ffffff);
|
|
53
53
|
|
|
54
54
|
&[data-done] {
|
|
55
|
-
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hi-color-success, #
|
|
55
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hi-color-success, #1f6530) 55%, transparent);
|
|
56
56
|
|
|
57
57
|
.hk-step-guide-ordinal {
|
|
58
|
-
background: var(--hi-color-success, #
|
|
58
|
+
background: var(--hi-color-success, #1f6530);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.hk-step-guide-art {
|
|
@@ -52,25 +52,25 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.hk-tag-success {
|
|
55
|
-
background: color-mix(in srgb, var(--hi-color-success, #
|
|
56
|
-
color: var(--hi-color-success, #
|
|
57
|
-
border-color: color-mix(in srgb, var(--hi-color-success, #
|
|
55
|
+
background: color-mix(in srgb, var(--hi-color-success, #1f6530) 10%, transparent);
|
|
56
|
+
color: var(--hi-color-success-fg, #1f6530);
|
|
57
|
+
border-color: color-mix(in srgb, var(--hi-color-success, #1f6530) 20%, transparent);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
.hk-tag-warning {
|
|
61
|
-
background: color-mix(in srgb, var(--hi-color-warning, #
|
|
62
|
-
color: var(--hi-color-warning, #
|
|
63
|
-
border-color: color-mix(in srgb, var(--hi-color-warning, #
|
|
61
|
+
background: color-mix(in srgb, var(--hi-color-warning, #894800) 10%, transparent);
|
|
62
|
+
color: var(--hi-color-warning-fg, #894800);
|
|
63
|
+
border-color: color-mix(in srgb, var(--hi-color-warning, #894800) 20%, transparent);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.hk-tag-danger {
|
|
67
|
-
background: color-mix(in srgb, var(--hi-color-danger, #
|
|
68
|
-
color: var(--hi-color-danger, #
|
|
69
|
-
border-color: color-mix(in srgb, var(--hi-color-danger, #
|
|
67
|
+
background: color-mix(in srgb, var(--hi-color-danger, #a62937) 10%, transparent);
|
|
68
|
+
color: var(--hi-color-danger-fg, #a62937);
|
|
69
|
+
border-color: color-mix(in srgb, var(--hi-color-danger, #a62937) 20%, transparent);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.hk-tag-info {
|
|
73
|
-
background: color-mix(in srgb, var(--hi-color-info, #
|
|
74
|
-
color: var(--hi-color-info, #
|
|
75
|
-
border-color: color-mix(in srgb, var(--hi-color-info, #
|
|
73
|
+
background: color-mix(in srgb, var(--hi-color-info, #006274) 10%, transparent);
|
|
74
|
+
color: var(--hi-color-info-fg, #006274);
|
|
75
|
+
border-color: color-mix(in srgb, var(--hi-color-info, #006274) 20%, transparent);
|
|
76
76
|
}
|
|
@@ -90,29 +90,29 @@
|
|
|
90
90
|
* exactly how the copy/close glyphs once rendered near-black on the red error
|
|
91
91
|
* toast (2026-11-12 report). The fallbacks keep themeless hosts readable. */
|
|
92
92
|
.hk-toast-error {
|
|
93
|
-
background: var(--hi-color-danger, #
|
|
93
|
+
background: var(--hi-color-danger, #a62937);
|
|
94
94
|
color: var(--hi-color-text-on-danger, #ffffff);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.hk-toast-success {
|
|
98
|
-
background: var(--hi-color-success, #
|
|
98
|
+
background: var(--hi-color-success, #1f6530);
|
|
99
99
|
color: var(--hi-color-text-on-success, #ffffff);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/* Warning fills are light by design, so their ink is dark; the theme still
|
|
103
103
|
* decides it (a custom amber can be dark enough for white). */
|
|
104
104
|
.hk-toast-warning {
|
|
105
|
-
background: var(--hi-color-warning, #
|
|
105
|
+
background: var(--hi-color-warning, #894800);
|
|
106
106
|
color: var(--hi-color-text-on-warning, #1c1c1e);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.hk-toast-info {
|
|
110
|
-
background: var(--hi-color-info, #
|
|
110
|
+
background: var(--hi-color-info, #006274);
|
|
111
111
|
color: var(--hi-color-text-on-info, #ffffff);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.hk-toast-loading {
|
|
115
|
-
background: var(--hi-color-info, #
|
|
115
|
+
background: var(--hi-color-info, #006274);
|
|
116
116
|
color: var(--hi-color-text-on-info, #ffffff);
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.hk-tree-row[data-status="failed"] .hk-tree-label {
|
|
52
|
-
color: var(--hi-color-danger, #
|
|
52
|
+
color: var(--hi-color-danger-fg, #a62937);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.hk-tree-row[data-status="in_progress"],
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.hk-tree-row[data-status="warning"] .hk-tree-label {
|
|
63
|
-
color: var(--hi-color-warning, #
|
|
63
|
+
color: var(--hi-color-warning-fg, #894800);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.hk-tree-row[data-status="muted"] {
|
|
@@ -270,14 +270,14 @@
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
&[data-danger] {
|
|
273
|
-
color: rgb(var(--color-error,
|
|
273
|
+
color: rgb(var(--color-error, 166 41 55) / 90%);
|
|
274
274
|
|
|
275
275
|
/* Same checked-row guard as the base hover above: a checked danger
|
|
276
276
|
* row keeps its checked face instead of flashing the hover wash. */
|
|
277
277
|
&:hover:not(:disabled):not([data-disabled]):not([data-active]):not([data-checked]) {
|
|
278
|
-
background: rgb(var(--color-error,
|
|
279
|
-
border-color: rgb(var(--color-error,
|
|
280
|
-
color: rgb(var(--color-error
|
|
278
|
+
background: rgb(var(--color-error, 166 41 55) / 10%);
|
|
279
|
+
border-color: rgb(var(--color-error, 166 41 55) / 25%);
|
|
280
|
+
color: var(--hi-color-danger-fg, rgb(var(--color-error)));
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
}
|
|
@@ -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
|
-
"
|
|
42
|
+
"11b7c17fe1da2bf92506075c431f423a388a00feb1c7319ac9b84b6074e38cb9";
|
|
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
|
-
"
|
|
37
|
+
"11b7c17fe1da2bf92506075c431f423a388a00feb1c7319ac9b84b6074e38cb9";
|
|
38
38
|
const GOLDEN_HEAL_ONLY_SHA256 =
|
|
39
39
|
"bee06d4652e55708d8b130fec11ff8ede54d4eafb944ef0d18f7be5a76b3dca6";
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
*/
|
|
49
49
|
|
|
50
50
|
const GOLDEN_DEFAULT_SHA256 =
|
|
51
|
-
"
|
|
51
|
+
"11b7c17fe1da2bf92506075c431f423a388a00feb1c7319ac9b84b6074e38cb9";
|
|
52
52
|
const GOLDEN_HEAL_ONLY_SHA256 =
|
|
53
53
|
"bee06d4652e55708d8b130fec11ff8ede54d4eafb944ef0d18f7be5a76b3dca6";
|
|
54
54
|
|
|
@@ -28,7 +28,7 @@ import { bootRecoveryScript } from "./boot-recovery.js";
|
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
30
|
const GOLDEN_DEFAULT_SHA256 =
|
|
31
|
-
"
|
|
31
|
+
"11b7c17fe1da2bf92506075c431f423a388a00feb1c7319ac9b84b6074e38cb9";
|
|
32
32
|
const GOLDEN_HEAL_ONLY_SHA256 =
|
|
33
33
|
"bee06d4652e55708d8b130fec11ff8ede54d4eafb944ef0d18f7be5a76b3dca6";
|
|
34
34
|
|