@poodle64/ui 2026.10.26 → 2026.10.28

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.
Files changed (38) hide show
  1. package/README.md +138 -169
  2. package/dist/components/ui/app-dialog/app-dialog.svelte +2 -1
  3. package/dist/components/ui/app-shell/app-nav.svelte +15 -2
  4. package/dist/components/ui/app-shell/app-shell.svelte +251 -97
  5. package/dist/components/ui/app-shell/app-shell.svelte.d.ts +15 -27
  6. package/dist/components/ui/app-shell/column-scope.svelte +15 -0
  7. package/dist/components/ui/app-shell/column-scope.svelte.d.ts +12 -0
  8. package/dist/components/ui/app-shell/index.d.ts +4 -2
  9. package/dist/components/ui/app-shell/index.js +3 -1
  10. package/dist/components/ui/app-shell/page-aside.svelte +58 -0
  11. package/dist/components/ui/app-shell/page-aside.svelte.d.ts +30 -0
  12. package/dist/components/ui/app-shell/page-pane.svelte +73 -0
  13. package/dist/components/ui/app-shell/page-pane.svelte.d.ts +37 -0
  14. package/dist/components/ui/app-shell/page.d.ts +77 -0
  15. package/dist/components/ui/app-shell/page.js +45 -0
  16. package/dist/components/ui/app-shell/types.d.ts +18 -2
  17. package/dist/components/ui/collection-detail/collection-detail.svelte +1 -1
  18. package/dist/components/ui/content-skeleton/content-skeleton.svelte +1 -1
  19. package/dist/components/ui/context-column/context-column.svelte +47 -146
  20. package/dist/components/ui/context-column/context-column.svelte.d.ts +3 -5
  21. package/dist/components/ui/document-reader/document-reader.svelte +56 -24
  22. package/dist/components/ui/document-reader/document-reader.svelte.d.ts +5 -4
  23. package/dist/components/ui/page-section/page-section.svelte +1 -1
  24. package/dist/components/ui/panel/panel.svelte +1 -0
  25. package/dist/components/ui/settings-shell/settings-shell.svelte +67 -81
  26. package/dist/components/ui/settings-shell/settings-shell.svelte.d.ts +21 -60
  27. package/dist/styles.css +267 -119
  28. package/package.json +1 -1
  29. package/registry/component-map.json +22 -15
  30. package/registry/component-map.md +8 -7
  31. package/dist/components/ui/app-shell/measure.d.ts +0 -28
  32. package/dist/components/ui/app-shell/measure.js +0 -21
  33. package/dist/components/ui/app-shell/padding.d.ts +0 -27
  34. package/dist/components/ui/app-shell/padding.js +0 -27
  35. package/dist/components/ui/list-shell/index.d.ts +0 -2
  36. package/dist/components/ui/list-shell/index.js +0 -2
  37. package/dist/components/ui/list-shell/list-shell.svelte +0 -85
  38. package/dist/components/ui/list-shell/list-shell.svelte.d.ts +0 -39
@@ -37,10 +37,11 @@
37
37
  * URL fragment, because a fragment cannot find an element inside a shadow
38
38
  * root, and this reader appears inside elements too.
39
39
  *
40
- * It centres itself and carries its own measure, so its route's `measure`
41
- * only needs to leave room: `page` or wider shows the contents beside the
42
- * body, and the shift from beside to above is a container query on the
43
- * reader's own width, not the window's.
40
+ * In a shell it is a `reading` page's column, and its contents list and
41
+ * `aside` are the page's aside (`PageAside`), so the shell places them:
42
+ * beside the column with room, the contents folded into a disclosure above
43
+ * the body without it. Outside a shell (inside an element) it lays the same
44
+ * two columns out itself, by a container query on its own width.
44
45
  */
45
46
  import { untrack, type Snippet } from 'svelte';
46
47
  import type { HTMLAttributes } from 'svelte/elements';
@@ -52,6 +53,8 @@
52
53
  import ContentSkeleton from '../content-skeleton/content-skeleton.svelte';
53
54
  import ErrorState from '../error-state/error-state.svelte';
54
55
  import LoadingState from '../loading-state/loading-state.svelte';
56
+ import PageAside from '../app-shell/page-aside.svelte';
57
+ import { onThePage } from '../app-shell/page.js';
55
58
 
56
59
  let {
57
60
  title,
@@ -96,6 +99,10 @@
96
99
  onRetry?: () => void;
97
100
  } = $props();
98
101
 
102
+ // On a shell's page, the page's aside holds the side column; outside a shell,
103
+ // or inside a column or a dialogue, this does.
104
+ const hosted = onThePage();
105
+
99
106
  let article = $state<HTMLElement | null>(null);
100
107
  let disclosure = $state<HTMLDetailsElement | null>(null);
101
108
  let headings = $state<DocumentReaderHeading[]>([]);
@@ -245,6 +252,22 @@
245
252
  </nav>
246
253
  {/snippet}
247
254
 
255
+ {#snippet sideColumn()}
256
+ {#if showContents}
257
+ <!-- Hosted, its display is styles.css's, so the page frame can hide it. -->
258
+ <div
259
+ data-slot="document-reader-contents"
260
+ class={cn(!hosted && 'hidden flex-col gap-2 @5xl:flex')}
261
+ >
262
+ <p class="text-sm font-medium" aria-hidden="true">{contentsLabel}</p>
263
+ {@render contentsList()}
264
+ </div>
265
+ {/if}
266
+ {#if aside}
267
+ <div class={cn(!hosted && 'mt-10 @5xl:mt-0')}>{@render aside()}</div>
268
+ {/if}
269
+ {/snippet}
270
+
248
271
  <div
249
272
  bind:this={ref}
250
273
  data-slot="document-reader"
@@ -264,8 +287,9 @@
264
287
  {:else}
265
288
  <div
266
289
  class={cn(
267
- 'mx-auto w-full max-w-(--ds-shell-measure-prose)',
268
- side && '@5xl:max-w-[calc(var(--ds-shell-measure-prose)+16.5rem)]'
290
+ 'w-full',
291
+ !hosted && 'mx-auto max-w-(--ds-page-reading)',
292
+ !hosted && side && '@5xl:max-w-[calc(var(--ds-page-reading)+16.5rem)]'
269
293
  )}
270
294
  >
271
295
  {#if title || breadcrumbs?.length || meta || actions}
@@ -274,15 +298,21 @@
274
298
  {#if loading}
275
299
  <ContentSkeleton shape="prose" label="Loading the document…" />
276
300
  {:else}
277
- <!-- One column, then two from 64rem of reader. The side column is
278
- rendered once: below 64rem it follows the body and shows only
279
- `aside`, since the contents fold into the disclosure above. -->
280
- <div class="flex flex-col @5xl:flex-row @5xl:items-start @5xl:gap-10">
301
+ <!-- Outside a shell: one column, then two from 64rem of reader, the
302
+ side column rendered once and below 64rem showing only `aside`,
303
+ since the contents fold into the disclosure above. In a shell the
304
+ side column is the page's aside, and the disclosure shows only
305
+ where that aside is not beside the column (styles.css). -->
306
+ <div class={cn('flex flex-col', !hosted && '@5xl:flex-row @5xl:items-start @5xl:gap-10')}>
281
307
  <div class="min-w-0 flex-1">
282
308
  {#if showContents}
283
309
  <details
284
310
  bind:this={disclosure}
285
- class="group bg-card border-border ds-edge mb-6 rounded-lg border @5xl:hidden"
311
+ data-slot="document-reader-disclosure"
312
+ class={cn(
313
+ 'group bg-card border-border ds-edge mb-6 rounded-lg border',
314
+ !hosted && '@5xl:hidden'
315
+ )}
286
316
  >
287
317
  <summary
288
318
  class="focus-visible:ring-ring/50 flex cursor-pointer list-none items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium outline-none focus-visible:ring-3 [&::-webkit-details-marker]:hidden"
@@ -298,8 +328,7 @@
298
328
  {/if}
299
329
  <article
300
330
  bind:this={article}
301
- class="ds-prose ds-measure [&_:is(h2,h3)]:scroll-mt-4 [&_:is(h2,h3)]:outline-none"
302
- data-measure="prose"
331
+ class="ds-prose [&_:is(h2,h3)]:scroll-mt-4 [&_:is(h2,h3)]:outline-none"
303
332
  >
304
333
  {#if html !== undefined}
305
334
  {@html html}
@@ -308,29 +337,32 @@
308
337
  {/if}
309
338
  </article>
310
339
  </div>
311
- {#if side}
340
+ {#if side && !hosted}
312
341
  <div
313
342
  data-slot="document-reader-side"
314
343
  class="flex flex-col gap-8 @5xl:sticky @5xl:top-4 @5xl:max-h-[calc(100dvh-6rem)] @5xl:w-56 @5xl:shrink-0 @5xl:overflow-y-auto"
315
344
  >
316
- {#if showContents}
317
- <div class="hidden flex-col gap-2 @5xl:flex">
318
- <p class="text-sm font-medium" aria-hidden="true">{contentsLabel}</p>
319
- {@render contentsList()}
320
- </div>
321
- {/if}
322
- {#if aside}
323
- <div class="mt-10 @5xl:mt-0">{@render aside()}</div>
324
- {/if}
345
+ {@render sideColumn()}
325
346
  </div>
326
347
  {/if}
327
348
  </div>
328
349
  {#if footer}
329
- <div class="ds-measure border-border mt-12 border-t pt-6" data-measure="prose">
350
+ <div class="border-border mt-12 border-t pt-6">
330
351
  {@render footer()}
331
352
  </div>
332
353
  {/if}
333
354
  {/if}
334
355
  </div>
356
+ {#if side && hosted}
357
+ <PageAside label={contentsLabel}>
358
+ <div
359
+ data-slot="document-reader-side"
360
+ data-only-contents={aside ? undefined : ''}
361
+ class="flex flex-col gap-8"
362
+ >
363
+ {@render sideColumn()}
364
+ </div>
365
+ </PageAside>
366
+ {/if}
335
367
  {/if}
336
368
  </div>
@@ -27,10 +27,11 @@ export declare function slugify(text: string): string;
27
27
  * URL fragment, because a fragment cannot find an element inside a shadow
28
28
  * root, and this reader appears inside elements too.
29
29
  *
30
- * It centres itself and carries its own measure, so its route's `measure`
31
- * only needs to leave room: `page` or wider shows the contents beside the
32
- * body, and the shift from beside to above is a container query on the
33
- * reader's own width, not the window's.
30
+ * In a shell it is a `reading` page's column, and its contents list and
31
+ * `aside` are the page's aside (`PageAside`), so the shell places them:
32
+ * beside the column with room, the contents folded into a disclosure above
33
+ * the body without it. Outside a shell (inside an element) it lays the same
34
+ * two columns out itself, by a container query on its own width.
34
35
  */
35
36
  import { type Snippet } from 'svelte';
36
37
  import type { HTMLAttributes } from 'svelte/elements';
@@ -85,7 +85,7 @@
85
85
  {/if}
86
86
  </div>
87
87
  {#if description}
88
- <p class="text-muted-foreground ds-measure text-sm" data-measure="prose">{description}</p>
88
+ <p class="text-muted-foreground text-sm" data-prose>{description}</p>
89
89
  {/if}
90
90
  </header>
91
91
  {@render children?.()}
@@ -85,6 +85,7 @@
85
85
  <section
86
86
  bind:this={ref}
87
87
  data-tone={tone === 'default' ? undefined : tone}
88
+ data-fill={scroll ? '' : undefined}
88
89
  class={cn(
89
90
  'bg-card ds-edge flex flex-col overflow-hidden rounded-lg border',
90
91
  destructive ? 'border-destructive/40' : 'border-border',
@@ -16,68 +16,39 @@
16
16
 
17
17
  <script lang="ts">
18
18
  /**
19
- * The settings destination: a grouped section list beside the section you are
20
- * reading, inside AppShell's content area.
19
+ * The settings destination: its sections are a `panel` page's pane
20
+ * (`PagePane`), flush against the rail, and the section you are reading is
21
+ * the page beside it. The route declares `pageType: 'panel'`; this sets no
22
+ * width, padding or scroller of its own. Below 64rem of window the sections
23
+ * open as a sheet from the bar.
21
24
  *
22
- * Two PANES, not a panel and not a drawer. The distinction is load-bearing:
23
- * a panel overlays and closes, and this package carries a standing directive
24
- * against side panels for work you are actually doing. These panes divide and
25
- * persist, each scrolling on its own, so a long settings page never pushes the
26
- * section list out of reach.
27
- *
28
- * The list renders through AppNav rather than a row renderer of its own, and
29
- * that is the whole reason this component is small. AppNav already owns the
30
- * group eyebrow, the active row's leading edge and tint and weight, the
31
- * `aria-current="page"`, the segment-safe prefix match, truncation, and the
32
- * density ramp — and it is exported in its own right precisely so a navigation
33
- * list that belongs in a PAGE is built from the same affordance rather than
34
- * hand-copied. The estate has already paid for the alternative once: one app's
35
- * inner nav had reimplemented the active indicator independently of its own
36
- * top bar. A second row renderer here would re-commit that drift one
37
- * destination down, on the one surface every app is about to adopt at once.
25
+ * The list renders through AppNav rather than a row renderer of its own:
26
+ * AppNav already owns the group eyebrow, the active row's leading edge and
27
+ * tint, `aria-current="page"`, the segment-safe prefix match and truncation,
28
+ * so a row is the same row everywhere in the household.
38
29
  *
39
30
  * Grouping is by WHOSE setting it is — the person's, then the workspace's —
40
- * because that is the only split a reader can predict: "yours" changes what
41
- * you see, "this company" changes what everyone sees. A group whose `items`
42
- * is empty renders nothing (`toGroups` drops it), so an app with no personal
43
- * sections yet can leave the group in its list rather than stubbing a row that
44
- * leads nowhere.
45
- *
46
- * One label per row, nothing beneath it. A description long enough to be worth
47
- * reading does not fit a 240px column: every one of them truncated to an
48
- * ellipsis and told the reader less than the label already did (measured
49
- * 16/09/2026 in a consumer, removed there the same day). The page introduces
50
- * its own sections — that is what Panel's `description` is for.
51
- *
52
- * No "Settings" heading. The shell's bar names the section it is on as of
53
- * 2026.9.16, so a heading here is the same word twice, one above the other.
31
+ * because that is the only split a reader can predict. A group whose `items`
32
+ * is empty renders nothing (`toGroups` drops it). One label per row, nothing
33
+ * beneath it: the page introduces its own sections (Panel's `description`).
54
34
  *
55
- * BELOW md the list STACKS above the content and the page scrolls as one.
56
- * A horizontally scrollable strip of the same rows was the obvious
57
- * alternative and loses on the requirement it was meant to serve — every
58
- * section reachable in one tap. A strip fits about two and a half rows at
59
- * 375px, so the rest are behind a sideways swipe with no scrollbar to
60
- * advertise them: a swipe THEN a tap, where a stack is a scroll the reader is
61
- * already doing. It also has to drop the group labels for width, which throws
62
- * away the one split the reader could predict, and it needs a second row
63
- * renderer in a horizontal mode — the drift this component exists to avoid.
64
- *
65
- * USE IT WITH `padded={false}` on AppShell. The list's border and tint have to
66
- * reach the content area's edges or the two panes read as a floating card, and
67
- * this component pads its own content pane to the shell's own rhythm
68
- * (`CONTENT_PADDING`) so the settings destination is not the one route whose
69
- * text sits somewhere else.
35
+ * The bar names where the reader is, "Settings › Account": the rail has no
36
+ * row for Settings (it opens from the account menu), so the pane says it.
70
37
  */
71
38
  import type { Snippet } from 'svelte';
72
- import type { HTMLAttributes } from 'svelte/elements';
39
+ import X from '@lucide/svelte/icons/x';
40
+ import SettingsIcon from '@lucide/svelte/icons/settings';
73
41
  import AppNav from '../app-shell/app-nav.svelte';
74
- import { CONTENT_PADDING } from '../app-shell/padding.js';
75
- import type { NavSource } from '../app-shell/types.js';
76
- import { cn, type WithElementRef } from '../../../utils.js';
42
+ import PagePane from '../app-shell/page-pane.svelte';
43
+ import { getPageSlots } from '../app-shell/page.js';
44
+ import { activeNavTitle, toItems, TITLE_SEPARATOR, type NavSource } from '../app-shell/types.js';
45
+ import Button from '../button/button.svelte';
77
46
 
78
- type Shared = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
47
+ type Shared = {
79
48
  /** The list's accessible name. */
80
49
  listLabel?: string;
50
+ /** What the destination is called, in the bar and over the sheet. */
51
+ title?: string;
81
52
  children: Snippet;
82
53
  };
83
54
 
@@ -87,19 +58,14 @@
87
58
  selected,
88
59
  onSelect,
89
60
  listLabel = 'Settings sections',
90
- children,
91
- ref = $bindable(null),
92
- class: className,
93
- ...restProps
61
+ title = 'Settings',
62
+ children
94
63
  }: Shared &
95
64
  (
96
65
  | {
97
66
  /**
98
67
  * ROUTED: the sections, as the package's own navigation vocabulary:
99
68
  * groups of `NavItem` (`{ heading, items }`), bare items, or a mix.
100
- * The same type the rail takes, so a row is the same row everywhere
101
- * in the household.
102
- *
103
69
  * A row at the settings ROOT (`/settings`) needs `exact: true`, or
104
70
  * its prefix match keeps it lit on every section beneath it.
105
71
  */
@@ -113,11 +79,8 @@
113
79
  /**
114
80
  * STATE-DRIVEN, for a single-route app whose sections swap in place
115
81
  * (canonical-app-shape §Applicability): groups of `SettingsSection`
116
- * (`{ id, label, icon? }`) rather than `NavItem`, since nothing is
117
- * navigated to. Rows are buttons; `selected` is the current `id` and
118
- * `onSelect` fires with the `id` that was chosen. The app owns the
119
- * state, so a deep link or a failure that opens a section just sets
120
- * `selected`.
82
+ * (`{ id, label, icon? }`). Rows are buttons; `selected` is the
83
+ * current `id` and `onSelect` fires with the `id` chosen.
121
84
  */
122
85
  sections: readonly (SettingsSection | SettingsSectionGroup)[];
123
86
  selected: string;
@@ -136,29 +99,52 @@
136
99
  )
137
100
  : (sections as NavSource)
138
101
  );
139
- </script>
140
102
 
141
- <div bind:this={ref} class={cn('ds-settings', className)} {...restProps}>
142
- <!--
143
- Width, tint and rule as utilities rather than in styles.css, because AppNav
144
- declares `flex-1` on this same element: a base-layer `flex: none` loses to
145
- a utility by layer, whatever order it is written in, while a utility passed
146
- through `cn()` is resolved by tailwind-merge — `flex-none` and `flex-1` are
147
- one group, so the last one wins and it is this one.
103
+ const here = $derived(
104
+ onSelect
105
+ ? toItems(nav).find((item) => item.href === selected)?.label
106
+ : activeNavTitle(nav, currentPath)
107
+ );
108
+ const location = $derived(here ? `${title}${TITLE_SEPARATOR}${here}` : title);
148
109
 
149
- 15rem (240px) is measured, not picked: it is the width at which a
150
- two-word section label ("Overhead suppliers", "Delegation limits") sits on
151
- one line beside its icon at comfortable density.
152
- -->
110
+ // Without a shell (a desktop window, an element) nothing hosts the pane, so
111
+ // the same panel frame is drawn here.
112
+ const hosted = getPageSlots() !== undefined;
113
+ </script>
114
+
115
+ {#snippet list(close: () => void)}
153
116
  <AppNav
154
117
  {nav}
155
118
  {currentPath}
156
119
  {selected}
157
- {onSelect}
120
+ onSelect={onSelect
121
+ ? (id: string) => {
122
+ onSelect(id);
123
+ close();
124
+ }
125
+ : undefined}
158
126
  label={listLabel}
159
- class="border-border bg-muted/30 flex-none border-b md:w-60 md:border-b-0 md:border-e"
160
127
  />
161
- <div class={cn('ds-settings-pane', CONTENT_PADDING)}>
162
- {@render children()}
128
+ {/snippet}
129
+
130
+ {#if !hosted}
131
+ <div class="ds-page" data-page="panel">
132
+ <div class="ds-page-pane"><div class="ds-page-pane-body">{@render list(() => {})}</div></div>
133
+ <div class="ds-page-main">{@render children()}</div>
163
134
  </div>
164
- </div>
135
+ {:else}
136
+ <PagePane label={listLabel} icon={SettingsIcon} {location}>
137
+ {#snippet body(state)}
138
+ {#if state.mode === 'sheet'}
139
+ <div class="border-border flex items-center justify-between gap-2 border-b py-2 ps-4 pe-2">
140
+ <h2 class="text-sm font-medium">{title}</h2>
141
+ <Button variant="ghost" size="icon" aria-label="Close {title}" onclick={state.close}>
142
+ <X />
143
+ </Button>
144
+ </div>
145
+ {/if}
146
+ {@render list(state.close)}
147
+ {/snippet}
148
+ </PagePane>
149
+ {@render children()}
150
+ {/if}
@@ -11,74 +11,38 @@ export interface SettingsSectionGroup {
11
11
  items: SettingsSection[];
12
12
  }
13
13
  /**
14
- * The settings destination: a grouped section list beside the section you are
15
- * reading, inside AppShell's content area.
14
+ * The settings destination: its sections are a `panel` page's pane
15
+ * (`PagePane`), flush against the rail, and the section you are reading is
16
+ * the page beside it. The route declares `pageType: 'panel'`; this sets no
17
+ * width, padding or scroller of its own. Below 64rem of window the sections
18
+ * open as a sheet from the bar.
16
19
  *
17
- * Two PANES, not a panel and not a drawer. The distinction is load-bearing:
18
- * a panel overlays and closes, and this package carries a standing directive
19
- * against side panels for work you are actually doing. These panes divide and
20
- * persist, each scrolling on its own, so a long settings page never pushes the
21
- * section list out of reach.
22
- *
23
- * The list renders through AppNav rather than a row renderer of its own, and
24
- * that is the whole reason this component is small. AppNav already owns the
25
- * group eyebrow, the active row's leading edge and tint and weight, the
26
- * `aria-current="page"`, the segment-safe prefix match, truncation, and the
27
- * density ramp — and it is exported in its own right precisely so a navigation
28
- * list that belongs in a PAGE is built from the same affordance rather than
29
- * hand-copied. The estate has already paid for the alternative once: one app's
30
- * inner nav had reimplemented the active indicator independently of its own
31
- * top bar. A second row renderer here would re-commit that drift one
32
- * destination down, on the one surface every app is about to adopt at once.
20
+ * The list renders through AppNav rather than a row renderer of its own:
21
+ * AppNav already owns the group eyebrow, the active row's leading edge and
22
+ * tint, `aria-current="page"`, the segment-safe prefix match and truncation,
23
+ * so a row is the same row everywhere in the household.
33
24
  *
34
25
  * Grouping is by WHOSE setting it is — the person's, then the workspace's —
35
- * because that is the only split a reader can predict: "yours" changes what
36
- * you see, "this company" changes what everyone sees. A group whose `items`
37
- * is empty renders nothing (`toGroups` drops it), so an app with no personal
38
- * sections yet can leave the group in its list rather than stubbing a row that
39
- * leads nowhere.
40
- *
41
- * One label per row, nothing beneath it. A description long enough to be worth
42
- * reading does not fit a 240px column: every one of them truncated to an
43
- * ellipsis and told the reader less than the label already did (measured
44
- * 16/09/2026 in a consumer, removed there the same day). The page introduces
45
- * its own sections — that is what Panel's `description` is for.
46
- *
47
- * No "Settings" heading. The shell's bar names the section it is on as of
48
- * 2026.9.16, so a heading here is the same word twice, one above the other.
26
+ * because that is the only split a reader can predict. A group whose `items`
27
+ * is empty renders nothing (`toGroups` drops it). One label per row, nothing
28
+ * beneath it: the page introduces its own sections (Panel's `description`).
49
29
  *
50
- * BELOW md the list STACKS above the content and the page scrolls as one.
51
- * A horizontally scrollable strip of the same rows was the obvious
52
- * alternative and loses on the requirement it was meant to serve — every
53
- * section reachable in one tap. A strip fits about two and a half rows at
54
- * 375px, so the rest are behind a sideways swipe with no scrollbar to
55
- * advertise them: a swipe THEN a tap, where a stack is a scroll the reader is
56
- * already doing. It also has to drop the group labels for width, which throws
57
- * away the one split the reader could predict, and it needs a second row
58
- * renderer in a horizontal mode — the drift this component exists to avoid.
59
- *
60
- * USE IT WITH `padded={false}` on AppShell. The list's border and tint have to
61
- * reach the content area's edges or the two panes read as a floating card, and
62
- * this component pads its own content pane to the shell's own rhythm
63
- * (`CONTENT_PADDING`) so the settings destination is not the one route whose
64
- * text sits somewhere else.
30
+ * The bar names where the reader is, "Settings › Account": the rail has no
31
+ * row for Settings (it opens from the account menu), so the pane says it.
65
32
  */
66
33
  import type { Snippet } from 'svelte';
67
- import type { HTMLAttributes } from 'svelte/elements';
68
- import type { NavSource } from '../app-shell/types.js';
69
- import { type WithElementRef } from '../../../utils.js';
70
- type Shared = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
34
+ import { type NavSource } from '../app-shell/types.js';
35
+ type Shared = {
71
36
  /** The list's accessible name. */
72
37
  listLabel?: string;
38
+ /** What the destination is called, in the bar and over the sheet. */
39
+ title?: string;
73
40
  children: Snippet;
74
41
  };
75
42
  type $$ComponentProps = Shared & ({
76
43
  /**
77
44
  * ROUTED: the sections, as the package's own navigation vocabulary:
78
45
  * groups of `NavItem` (`{ heading, items }`), bare items, or a mix.
79
- * The same type the rail takes, so a row is the same row everywhere
80
- * in the household.
81
- *
82
46
  * A row at the settings ROOT (`/settings`) needs `exact: true`, or
83
47
  * its prefix match keeps it lit on every section beneath it.
84
48
  */
@@ -91,17 +55,14 @@ type $$ComponentProps = Shared & ({
91
55
  /**
92
56
  * STATE-DRIVEN, for a single-route app whose sections swap in place
93
57
  * (canonical-app-shape §Applicability): groups of `SettingsSection`
94
- * (`{ id, label, icon? }`) rather than `NavItem`, since nothing is
95
- * navigated to. Rows are buttons; `selected` is the current `id` and
96
- * `onSelect` fires with the `id` that was chosen. The app owns the
97
- * state, so a deep link or a failure that opens a section just sets
98
- * `selected`.
58
+ * (`{ id, label, icon? }`). Rows are buttons; `selected` is the
59
+ * current `id` and `onSelect` fires with the `id` chosen.
99
60
  */
100
61
  sections: readonly (SettingsSection | SettingsSectionGroup)[];
101
62
  selected: string;
102
63
  onSelect: (id: string) => void;
103
64
  currentPath?: undefined;
104
65
  });
105
- declare const SettingsShell: import("svelte").Component<$$ComponentProps, {}, "ref">;
66
+ declare const SettingsShell: import("svelte").Component<$$ComponentProps, {}, "">;
106
67
  type SettingsShell = ReturnType<typeof SettingsShell>;
107
68
  export default SettingsShell;