@poodle64/ui 2026.10.24 → 2026.10.25

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/README.md CHANGED
@@ -140,7 +140,8 @@ be the same thing.
140
140
  There is now exactly one shell shape, no prop to choose a different one.
141
141
  Operator ruling, 31/07/2026: every household app renders the same composition,
142
142
  a permanent side rail on `md`+ (an overlay drawer below it) carrying primary
143
- navigation, brand and the collapse toggle, **plus** a real top navbar (search,
143
+ navigation and the brand, **plus** a real top navbar (the collapse toggle at
144
+ its leading edge, search,
144
145
  leading/trailing slots, theme toggle, identity), always both together, with
145
146
  content that is always full-width. Apps do not choose variants, content modes,
146
147
  or spacing.
@@ -12,15 +12,15 @@
12
12
  *
13
13
  * There is now exactly one composition, no variant prop to choose it: a
14
14
  * permanent side rail on md+ (an overlay drawer below it) carrying primary
15
- * navigation and a brand row that also carries the collapse toggle, PLUS a
15
+ * navigation and the brand, PLUS a
16
16
  * real top navbar (search, leading/trailing slots, theme toggle, identity) —
17
17
  * always both together. Operator ruling, 31/07/2026: every household app
18
18
  * renders one shell shape; apps do not choose variants.
19
19
  *
20
- * The collapse toggle sits at the rail's own top edge, on the brand row,
21
- * where every comparable shell puts a control that acts on the rail — icon
22
- * only, right of the wordmark, stacking under the mark when the rail is
23
- * collapsed. The foot is left to the app.
20
+ * The collapse toggle is the leading edge of the top bar, before the page's
21
+ * title, with a thin separator after it — where the shadcn sidebar blocks put
22
+ * `Sidebar.Trigger`. The rail's header holds the brand alone, and the foot is
23
+ * left to the app.
24
24
  *
25
25
  * Search can sit in either of two places, because it reads as a different
26
26
  * thing depending on what is beside it. `searchPlacement` defaults to
@@ -142,7 +142,7 @@
142
142
  */
143
143
  currentPath?: string;
144
144
  /**
145
- * Offer an icon-only collapse toggle at the rail head, on the brand row.
145
+ * Offer an icon-only collapse toggle at the leading edge of the top bar.
146
146
  *
147
147
  * Defaults ON. It was opt-in while the control was being introduced, and
148
148
  * two of nine household apps opted in — so seven rails could not be
@@ -303,7 +303,7 @@
303
303
  // than a flourish. The rail and the drawer are one element carrying one
304
304
  // `collapsed` state, so a user who collapsed the rail on a desktop and later
305
305
  // opened the menu on a phone was handed a 3.5rem icon-only drawer with no way
306
- // out — the Collapse control is `md:flex` and does not render at that width.
306
+ // out — the Collapse control is `md:grid` and does not render at that width.
307
307
  // Nesting did not cause that, it raised the stakes: a collapsed rail renders
308
308
  // no children, so the phone would have lost the sub-navigation entirely.
309
309
  // `mobileNavOpen` implies narrow (the matchMedia effect below is what earns
@@ -335,6 +335,9 @@
335
335
 
336
336
  function peekPointerEnter(event: PointerEvent) {
337
337
  if (event.pointerType === 'touch') return;
338
+ // The toggle is in the bar, so a collapse made there leaves the suppression
339
+ // set with the pointer off the rail; coming onto the rail ends it.
340
+ peekSuppressed = false;
338
341
  clearTimeout(peekTimer);
339
342
  peekTimer = setTimeout(() => (pointerOn = true), PEEK_DELAY_MS);
340
343
  }
@@ -403,8 +406,7 @@
403
406
  const candidates = [
404
407
  ...overlay.querySelectorAll<HTMLElement>('a[href], button:not([disabled])')
405
408
  ].filter((el) => el.tabIndex !== -1);
406
- // Drop what CSS has hidden — the collapse control is display:none below md
407
- // and must not be a tab stop. `getClientRects()` is the check that works
409
+ // Drop what CSS has hidden — anything display:none must not be a tab stop. `getClientRects()` is the check that works
408
410
  // against a real layout; where there is no layout engine at all it reports
409
411
  // EVERYTHING as hidden, so an empty result means "cannot tell", not "none",
410
412
  // and the trap falls back to the unfiltered set rather than silently
@@ -606,52 +608,7 @@
606
608
  </button>
607
609
  {/if}
608
610
 
609
- <!--
610
- The collapse toggle rides the brand row, at the rail's own top edge —
611
- where a control that acts on the rail belongs (Notion, Linear, GitHub's
612
- newer nav all put it there), rather than a full-width labelled row at
613
- the foot that read as a navigation destination. Expanded, it sits right
614
- of the wordmark (`ml-auto`); collapsed, the head has no room beside the
615
- mark, so the row becomes a column and the toggle stacks under it,
616
- centred. A peek keeps that column, the mark and the toggle where the
617
- slim rail put them: a peeked row half the height pulled every nav row 50px up
618
- under the pointer, and a click landed on the row below the one aimed
619
- at (caspo#177). `md:grid` keeps it off the mobile drawer, where
620
- collapse does not apply — the same reason the foot control carried
621
- `md:flex`.
622
- -->
623
- {#if collapsible}
624
- <div
625
- class={cn(
626
- 'flex',
627
- railCollapsed ? 'flex-col gap-1 py-2' : 'items-center pr-2',
628
- railNarrow && 'items-center'
629
- )}
630
- >
631
- {@render brandLockup()}
632
- <button
633
- type="button"
634
- onclick={toggleCollapsed}
635
- class={cn(
636
- 'text-shell-muted-foreground hover:text-shell-foreground hidden size-8 flex-none place-items-center rounded-md transition-colors md:grid',
637
- !railCollapsed && 'ml-auto',
638
- railCollapsed && !railNarrow && 'ml-3'
639
- )}
640
- aria-label={collapseLabel}
641
- aria-pressed={collapsed}
642
- title={`${collapseLabel} (press [)`}
643
- data-testid="ds-rail-collapse"
644
- >
645
- {#if collapsed}
646
- <PanelLeftOpen class="size-4" />
647
- {:else}
648
- <PanelLeftClose class="size-4" />
649
- {/if}
650
- </button>
651
- </div>
652
- {:else}
653
- {@render brandLockup()}
654
- {/if}
611
+ {@render brandLockup()}
655
612
  <AppNav
656
613
  {nav}
657
614
  {currentPath}
@@ -735,6 +692,35 @@
735
692
  </button>
736
693
  {/if}
737
694
 
695
+ <!--
696
+ The collapse toggle is the leading edge of the bar, before the page's
697
+ title and a thin separator after it: where the shadcn sidebar blocks put
698
+ `Sidebar.Trigger`, so the rail's header holds the brand alone. `md:grid`
699
+ keeps it off the phone, where the drawer has its own trigger.
700
+ -->
701
+ {#if collapsible}
702
+ <button
703
+ type="button"
704
+ onclick={toggleCollapsed}
705
+ class="text-shell-muted-foreground hover:text-shell-foreground -ml-1 hidden size-8 flex-none place-items-center rounded-md transition-colors md:grid"
706
+ aria-label={collapseLabel}
707
+ aria-pressed={collapsed}
708
+ title={`${collapseLabel} (press [)`}
709
+ data-testid="ds-rail-collapse"
710
+ >
711
+ {#if collapsed}
712
+ <PanelLeftOpen class="size-4" />
713
+ {:else}
714
+ <PanelLeftClose class="size-4" />
715
+ {/if}
716
+ </button>
717
+ <span
718
+ class="bg-border hidden h-4 w-px flex-none md:block"
719
+ aria-hidden="true"
720
+ data-testid="ds-rail-collapse-separator"
721
+ ></span>
722
+ {/if}
723
+
738
724
  <!-- The rail carries the brand on md+; below md the rail is gone, so the
739
725
  bar carries it or the app loses its identity on a phone entirely. -->
740
726
  <span class={hasNav ? 'flex md:hidden' : 'flex'}>
@@ -11,15 +11,15 @@
11
11
  *
12
12
  * There is now exactly one composition, no variant prop to choose it: a
13
13
  * permanent side rail on md+ (an overlay drawer below it) carrying primary
14
- * navigation and a brand row that also carries the collapse toggle, PLUS a
14
+ * navigation and the brand, PLUS a
15
15
  * real top navbar (search, leading/trailing slots, theme toggle, identity) —
16
16
  * always both together. Operator ruling, 31/07/2026: every household app
17
17
  * renders one shell shape; apps do not choose variants.
18
18
  *
19
- * The collapse toggle sits at the rail's own top edge, on the brand row,
20
- * where every comparable shell puts a control that acts on the rail — icon
21
- * only, right of the wordmark, stacking under the mark when the rail is
22
- * collapsed. The foot is left to the app.
19
+ * The collapse toggle is the leading edge of the top bar, before the page's
20
+ * title, with a thin separator after it — where the shadcn sidebar blocks put
21
+ * `Sidebar.Trigger`. The rail's header holds the brand alone, and the foot is
22
+ * left to the app.
23
23
  *
24
24
  * Search can sit in either of two places, because it reads as a different
25
25
  * thing depending on what is beside it. `searchPlacement` defaults to
@@ -99,7 +99,7 @@ type $$ComponentProps = {
99
99
  */
100
100
  currentPath?: string;
101
101
  /**
102
- * Offer an icon-only collapse toggle at the rail head, on the brand row.
102
+ * Offer an icon-only collapse toggle at the leading edge of the top bar.
103
103
  *
104
104
  * Defaults ON. It was opt-in while the control was being introduced, and
105
105
  * two of nine household apps opted in — so seven rails could not be
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poodle64/ui",
3
- "version": "2026.10.24",
3
+ "version": "2026.10.25",
4
4
  "description": "Household shared component layer: shadcn-svelte primitives (bits-ui) plus the composed page chrome every app builds its routes from, restyled by each app's @poodle64/design-tokens alias layer. One fix reaches every app.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "package": "@poodle64/ui",
4
- "version": "2026.10.24",
4
+ "version": "2026.10.25",
5
5
  "generatedBy": "scripts/generate-registry.mjs",
6
6
  "source": "scripts/situations.json + package source (DO NOT EDIT the outputs by hand)",
7
7
  "componentCount": 76,
@@ -1,7 +1,7 @@
1
1
  # @poodle64/ui — situation → component map
2
2
 
3
3
  <!-- GENERATED by scripts/generate-registry.mjs from scripts/situations.json + package source. DO NOT EDIT. -->
4
- Generated from `@poodle64/ui@2026.10.24`. 76 components, 20 situations.
4
+ Generated from `@poodle64/ui@2026.10.25`. 76 components, 20 situations.
5
5
 
6
6
  **Read this before writing a `<div>`.** Find the SITUATION you are in below, then compose the component named for it — do not hand-build it from raw `Card` or utility classes. Import is `import { Name } from '<import path>'`. Props marked `?` are optional. This map is the retrieval step the [`frontend-design` skill] makes mandatory; the [CHI 2026 study] measured composing-from-a-registry at 95% design-system compliance against 71% for writing the CSS from a prose style guide.
7
7