@poodle64/ui 2026.10.23 → 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 +13 -12
- package/dist/components/ui/app-shell/app-shell.svelte +42 -56
- package/dist/components/ui/app-shell/app-shell.svelte.d.ts +7 -7
- package/dist/components/ui/app-shell/measure.d.ts +1 -1
- package/dist/components/ui/collection-detail/collection-detail.svelte +1 -1
- package/dist/styles.css +8 -8
- package/package.json +1 -1
- package/registry/component-map.json +1 -1
- package/registry/component-map.md +1 -1
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
|
|
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.
|
|
@@ -489,7 +490,7 @@ How wide the page body may get, chosen once in the layout from a scale of four:
|
|
|
489
490
|
|
|
490
491
|
| Value | Width | Reach for it when the page is |
|
|
491
492
|
| ------- | -------- | -------------------------------------------------------------------- |
|
|
492
|
-
| `prose` | `
|
|
493
|
+
| `prose` | `40rem` | long-form running text: documentation, an article, a policy, a guide |
|
|
493
494
|
| `page` | `80rem` | an everyday page: a form, a detail view, settings, a wizard |
|
|
494
495
|
| `wide` | `120rem` | an index or a dashboard: card grids, tables, charts, board columns |
|
|
495
496
|
| `full` | no cap | a canvas that should use the whole panel: a map, a diagram, a board |
|
|
@@ -512,16 +513,17 @@ names cannot drift like that.
|
|
|
512
513
|
span a large display would be worse than what it replaces, and worse everywhere
|
|
513
514
|
at once. Measured in Chromium at 2560px: the same paragraph runs to **311
|
|
514
515
|
characters per line** uncapped, against an accepted band of 45–90 for continuous
|
|
515
|
-
text. `prose` puts it at
|
|
516
|
-
|
|
517
|
-
|
|
516
|
+
text. `prose` puts it at about 70. It is stated in `rem`, not `ch`: `ch` resolves
|
|
517
|
+
against each element's own font size, so a lead, a paragraph and a small intro in
|
|
518
|
+
one column ended at three right edges. A root-relative length gives every block
|
|
519
|
+
the same one.
|
|
518
520
|
|
|
519
521
|
Every tier is a CSS custom property, so an app retunes one without waiting on a
|
|
520
522
|
release of this package:
|
|
521
523
|
|
|
522
524
|
```css
|
|
523
525
|
:root {
|
|
524
|
-
--ds-shell-measure-prose:
|
|
526
|
+
--ds-shell-measure-prose: 36rem;
|
|
525
527
|
--ds-shell-measure-page: 72rem;
|
|
526
528
|
--ds-shell-measure-wide: 100rem;
|
|
527
529
|
}
|
|
@@ -532,10 +534,9 @@ Two things worth knowing before you set it:
|
|
|
532
534
|
- **The cap is a ceiling, never a floor.** `page` caps at 80rem; a 1440px laptop
|
|
533
535
|
has less than that available, so nothing changes there. A measure never narrows
|
|
534
536
|
a window that was already narrower than the tier.
|
|
535
|
-
- **`prose`
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
are lengths and never move.
|
|
537
|
+
- **`prose` is a length, so it does not follow the font.** Text set larger or
|
|
538
|
+
smaller than the body fits more or fewer characters in the same column and
|
|
539
|
+
ends at the same right edge as its neighbours; that is the point of it.
|
|
539
540
|
- **The cap is the border box, so `padded` spends its padding inside it.**
|
|
540
541
|
`measure="page"` with the default padding is 80rem of box holding 78rem of
|
|
541
542
|
content, which is the same arithmetic as the `mx-auto max-w-4xl px-6` idiom it
|
|
@@ -562,9 +563,9 @@ measure. Cap the block, not the route:
|
|
|
562
563
|
|
|
563
564
|
Same attribute and same custom properties as the shell's own measure, so the
|
|
564
565
|
block retunes when the scale does. That is the point of it: the alternative an
|
|
565
|
-
app reaches for is a local `max-w-prose` or `max-w-[72ch]`, a number typed once
|
|
566
|
+
app reaches for is a local `max-w-prose` or `max-w-[72ch]` (both in `ch`, so blocks of different sizes end at different edges), a number typed once
|
|
566
567
|
that never hears about a retune — four apps had written ten of them between
|
|
567
|
-
them and not one matched this package's own
|
|
568
|
+
them and not one matched this package's own measure.
|
|
568
569
|
|
|
569
570
|
`.ds-measure` caps and nothing else. `.ds-shell-measure`, which the shell puts
|
|
570
571
|
on its own content box, is that plus `margin-inline: auto` — right for a content
|
|
@@ -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
|
|
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
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
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
|
|
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
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
onToggleTheme?: () => void;
|
|
203
203
|
padded?: boolean;
|
|
204
204
|
/**
|
|
205
|
-
* How wide the page body may get, from a named scale: `prose` (
|
|
205
|
+
* How wide the page body may get, from a named scale: `prose` (40rem, for
|
|
206
206
|
* long-form running text), `page` (80rem — forms, detail views,
|
|
207
207
|
* settings), `wide` (120rem — indexes, grids, tables, dashboards), or
|
|
208
208
|
* `full` (no cap).
|
|
@@ -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:
|
|
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 —
|
|
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
|
|
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
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
|
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
|
|
@@ -159,7 +159,7 @@ type $$ComponentProps = {
|
|
|
159
159
|
onToggleTheme?: () => void;
|
|
160
160
|
padded?: boolean;
|
|
161
161
|
/**
|
|
162
|
-
* How wide the page body may get, from a named scale: `prose` (
|
|
162
|
+
* How wide the page body may get, from a named scale: `prose` (40rem, for
|
|
163
163
|
* long-form running text), `page` (80rem — forms, detail views,
|
|
164
164
|
* settings), `wide` (120rem — indexes, grids, tables, dashboards), or
|
|
165
165
|
* `full` (no cap).
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* `styles.css`), so an app retunes any of them in one declaration.
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
|
-
* - `prose` — a genuine reading measure (`
|
|
16
|
+
* - `prose` — a genuine reading measure (`40rem`, about 70 characters) for long-form running text.
|
|
17
17
|
* - `page` — everyday pages: forms, detail views, settings (`80rem`).
|
|
18
18
|
* - `wide` — indexes, card grids, tables, dashboards (`120rem`).
|
|
19
19
|
* - `full` — no cap. The default, so omitting `measure` changes nothing.
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
<p class="text-muted-foreground text-sm">{collection.subtitle}</p>
|
|
111
111
|
{/if}
|
|
112
112
|
{#if collection.description}
|
|
113
|
-
<p class="mt-2
|
|
113
|
+
<p class="ds-measure mt-2 text-sm" data-measure="prose">{collection.description}</p>
|
|
114
114
|
{/if}
|
|
115
115
|
{#if !collection.subtitle && !collection.description}
|
|
116
116
|
<p class="text-muted-foreground text-sm">No description recorded.</p>
|
package/dist/styles.css
CHANGED
|
@@ -357,14 +357,14 @@
|
|
|
357
357
|
for the same reason the rail width is one: an app retunes a tier in one
|
|
358
358
|
declaration instead of waiting on a release of this package.
|
|
359
359
|
|
|
360
|
-
`prose` is in `
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
360
|
+
`prose` is in `rem`, like the other two, though it is a reading measure.
|
|
361
|
+
`ch` resolves against each element's OWN font size, so blocks of 20, 16
|
|
362
|
+
and 14px in one column stopped at three different right edges (982, 770
|
|
363
|
+
and 674px measured). A root-relative length gives them one edge. 40rem
|
|
364
|
+
is about 70 characters of body text in the household face; a caller that
|
|
365
|
+
wants a different count retunes the property.
|
|
366
366
|
──────────────────────────────────────────────────────────────────────── */
|
|
367
|
-
--ds-shell-measure-prose:
|
|
367
|
+
--ds-shell-measure-prose: 40rem;
|
|
368
368
|
--ds-shell-measure-page: 80rem;
|
|
369
369
|
--ds-shell-measure-wide: 120rem;
|
|
370
370
|
}
|
|
@@ -1161,7 +1161,7 @@
|
|
|
1161
1161
|
rather than drifting from it. That is the whole point: the alternative an
|
|
1162
1162
|
app reaches for is a local `max-w-prose` or `max-w-[72ch]`, which is a
|
|
1163
1163
|
number typed once that never hears about a retune — four apps had written
|
|
1164
|
-
ten of them between them, and not one matched this package's own
|
|
1164
|
+
ten of them between them, and not one matched this package's own measure. */
|
|
1165
1165
|
.ds-measure[data-measure='prose'],
|
|
1166
1166
|
.ds-shell-measure[data-measure='prose'] {
|
|
1167
1167
|
max-width: var(--ds-shell-measure-prose);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poodle64/ui",
|
|
3
|
-
"version": "2026.10.
|
|
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
|
# @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.
|
|
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
|
|