@celestia-island/hikari 0.40.26 → 0.40.27

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.40.26",
3
+ "version": "0.40.27",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Hikari Vue 3 component library — production-grade UI components based on shittim-chest design system",
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Source contract for HkFileBrowserDialog's ≤767px relaxation block
3
+ * (2026-09-08 scan wave 2 finding F5 — LOW but user-facing: chest's
4
+ * workspace file-browser flow opens this dialog on phones; fixed in the
5
+ * 2026-09-08 mobile sheet wave, the same family grammar as HkModal's
6
+ * docked-sheet block).
7
+ *
8
+ * The desktop frame is a 56rem modal; on a ~412px phone sheet HkModal
9
+ * docks full-bleed and the dialog's OWN internals were the squeeze
10
+ * (everything fit only thanks to ellipsis/overflow):
11
+ * .hk-file-browser-filter width 9rem + min-width 9rem fixed box
12
+ * .hk-file-browser-rename-input 8rem min-width floor
13
+ * list head/row grid fixed 6rem + 10rem tracks (256px)
14
+ *
15
+ * The mobile block must neutralize each of these INSIDE the media query
16
+ * while the desktop rules stay untouched outside it — pinned so a refactor
17
+ * cannot silently reintroduce desktop-only widths (the scan's "sidebar"
18
+ * label drifted; these three are the real fixed-width participants).
19
+ */
20
+ import { describe, expect, it } from "vitest";
21
+ import { readFileSync } from "node:fs";
22
+ import { dirname, join } from "node:path";
23
+ import { fileURLToPath } from "node:url";
24
+
25
+ const here = dirname(fileURLToPath(import.meta.url));
26
+ const src = readFileSync(join(here, "HkFileBrowserDialog.scss"), "utf-8");
27
+
28
+ const MOBILE_AT = "@media (max-width: 767px)";
29
+ const mobileStart = src.indexOf(MOBILE_AT);
30
+
31
+ describe("HkFileBrowserDialog mobile relaxation contract", () => {
32
+ it("ships a ≤767px block after the desktop rules", () => {
33
+ expect(mobileStart).toBeGreaterThan(-1);
34
+ // The block is appended at the end: every desktop rule precedes it.
35
+ expect(src.indexOf(".hk-file-browser-filter", mobileStart)).toBeGreaterThan(-1);
36
+ });
37
+
38
+ it("lets the type filter size to its trigger content instead of a fixed 9rem box", () => {
39
+ const block = src.slice(mobileStart);
40
+ const rule = block.match(/\.hk-file-browser-filter\s*{[^}]*}/)?.[0] ?? "";
41
+ expect(rule).toContain("width: auto");
42
+ expect(rule).toContain("min-width: 0");
43
+ });
44
+
45
+ it("drops the rename input's 8rem floor so the wrap row shares its line", () => {
46
+ const block = src.slice(mobileStart);
47
+ const rule = block.match(/\.hk-file-browser-rename-input\s*{[^}]*}/)?.[0] ?? "";
48
+ expect(rule).toContain("min-width: 0");
49
+ });
50
+
51
+ it("makes the list grid's fixed 6rem/10rem tracks compressible on phones", () => {
52
+ const block = src.slice(mobileStart);
53
+ const rule =
54
+ block.match(/\.hk-file-browser-list-head,\s*\n\s*\.hk-file-browser-row\s*{[^}]*}/)
55
+ ?.[0] ?? "";
56
+ // Three minmax(0, …) tracks — no bare fixed rem track may remain, and
57
+ // the rows reclaim one spacing step of horizontal padding.
58
+ expect(rule).toMatch(
59
+ /grid-template-columns:\s*minmax\(0, 1fr\) minmax\(0, [\d.]+rem\) minmax\(0, [\d.]+rem\)/,
60
+ );
61
+ expect(rule).toContain("padding-inline: var(--space-8)");
62
+ });
63
+
64
+ it("keeps every desktop width outside the mobile block (relaxation, not redesign)", () => {
65
+ const desktop = src.slice(0, mobileStart);
66
+ expect(desktop).toContain("width: 9rem");
67
+ expect(desktop).toContain("min-width: 9rem");
68
+ expect(desktop).toContain("min-width: 8rem");
69
+ expect(desktop).toContain("grid-template-columns: minmax(0, 1fr) 6rem 10rem");
70
+ });
71
+ });
@@ -528,3 +528,46 @@
528
528
  justify-content: flex-end;
529
529
  gap: var(--space-8);
530
530
  }
531
+
532
+ // ------
533
+ // Mobile (≤767px) — let the desktop internals breathe in the docked sheet
534
+ // ------
535
+ // 2026-09-08 scan wave 2 finding F5 (LOW, user-facing: chest's workspace
536
+ // file-browser flow opens this dialog on phones). HkModal's docking is
537
+ // correct (full-bleed bottom sheet); the squeeze is HERE, in internals
538
+ // sized for the 56rem desktop frame. The scan's "sidebar/tree column"
539
+ // label drifted: the 9rem pair at the flagged lines is the toolbar's type
540
+ // filter, and the 8rem floor is the rename input — there is no sidebar.
541
+ // Pure relaxation only (same grammar as HkModal's ≤767px block): no
542
+ // stacking, no reordering, no JS — the existing rows/columns just stop
543
+ // reserving desktop widths.
544
+ @media (max-width: 767px) {
545
+ // Type filter: 9rem + min-width 9rem is a third of a 412px sheet for a
546
+ // select whose longest label is an extension (".csv"). Let the flex item
547
+ // size to its HkSelect trigger content instead of holding a fixed box —
548
+ // no floor needed: the trigger carries its own padding/min-height and
549
+ // the wrapping toolbar stacks it onto its own line when truly cramped.
550
+ .hk-file-browser-filter {
551
+ width: auto;
552
+ min-width: 0;
553
+ }
554
+
555
+ // Rename input: the 8rem floor decided the row's wrap point before the
556
+ // label and the two buttons got their share. min-width: 0 lets the
557
+ // flex-wrap row hand the input whatever line width is left.
558
+ .hk-file-browser-rename-input {
559
+ min-width: 0;
560
+ }
561
+
562
+ // List rows: desktop reserves fixed 6rem + 10rem (256px) for the
563
+ // size/modified tracks — about three quarters of a 412px sheet's content
564
+ // width, leaving the name column a sliver. Both cells already ellipsize,
565
+ // so cap them as compressible maxima (they still take the full cap on
566
+ // roomier sheets and shrink only under real pressure) and reclaim one
567
+ // spacing step of horizontal row padding for the name column.
568
+ .hk-file-browser-list-head,
569
+ .hk-file-browser-row {
570
+ grid-template-columns: minmax(0, 1fr) minmax(0, 4.5rem) minmax(0, 6.5rem);
571
+ padding-inline: var(--space-8);
572
+ }
573
+ }