@poodle64/ui 2026.10.25 → 2026.10.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.
Files changed (43) hide show
  1. package/README.md +142 -182
  2. package/dist/components/feedback/report-widget.svelte +8 -33
  3. package/dist/components/ui/app-dialog/app-dialog.svelte +2 -1
  4. package/dist/components/ui/app-identity/app-identity.svelte +4 -2
  5. package/dist/components/ui/app-identity/app-identity.svelte.d.ts +1 -1
  6. package/dist/components/ui/app-shell/app-shell.svelte +300 -147
  7. package/dist/components/ui/app-shell/app-shell.svelte.d.ts +15 -37
  8. package/dist/components/ui/app-shell/column-scope.svelte +15 -0
  9. package/dist/components/ui/app-shell/column-scope.svelte.d.ts +12 -0
  10. package/dist/components/ui/app-shell/index.d.ts +4 -2
  11. package/dist/components/ui/app-shell/index.js +4 -2
  12. package/dist/components/ui/app-shell/page-aside.svelte +58 -0
  13. package/dist/components/ui/app-shell/page-aside.svelte.d.ts +30 -0
  14. package/dist/components/ui/app-shell/page-pane.svelte +73 -0
  15. package/dist/components/ui/app-shell/page-pane.svelte.d.ts +37 -0
  16. package/dist/components/ui/app-shell/page.d.ts +77 -0
  17. package/dist/components/ui/app-shell/page.js +45 -0
  18. package/dist/components/ui/app-shell/report.svelte.d.ts +10 -0
  19. package/dist/components/ui/app-shell/report.svelte.js +8 -0
  20. package/dist/components/ui/app-shell/types.d.ts +6 -4
  21. package/dist/components/ui/app-shell/types.js +7 -5
  22. package/dist/components/ui/collection-detail/collection-detail.svelte +1 -1
  23. package/dist/components/ui/content-skeleton/content-skeleton.svelte +1 -1
  24. package/dist/components/ui/context-column/context-column.svelte +47 -129
  25. package/dist/components/ui/context-column/context-column.svelte.d.ts +3 -5
  26. package/dist/components/ui/document-reader/document-reader.svelte +56 -24
  27. package/dist/components/ui/document-reader/document-reader.svelte.d.ts +5 -4
  28. package/dist/components/ui/page-section/page-section.svelte +1 -1
  29. package/dist/components/ui/panel/panel.svelte +1 -0
  30. package/dist/components/ui/settings-shell/settings-shell.svelte +67 -81
  31. package/dist/components/ui/settings-shell/settings-shell.svelte.d.ts +21 -60
  32. package/dist/styles.css +248 -120
  33. package/package.json +1 -1
  34. package/registry/component-map.json +22 -15
  35. package/registry/component-map.md +8 -7
  36. package/dist/components/ui/app-shell/measure.d.ts +0 -28
  37. package/dist/components/ui/app-shell/measure.js +0 -21
  38. package/dist/components/ui/app-shell/padding.d.ts +0 -26
  39. package/dist/components/ui/app-shell/padding.js +0 -26
  40. package/dist/components/ui/list-shell/index.d.ts +0 -2
  41. package/dist/components/ui/list-shell/index.js +0 -2
  42. package/dist/components/ui/list-shell/list-shell.svelte +0 -85
  43. package/dist/components/ui/list-shell/list-shell.svelte.d.ts +0 -39
@@ -29,19 +29,11 @@
29
29
  * carries route content the global affordance reads as global rather than as
30
30
  * part of the switcher next to it.
31
31
  *
32
- * Content WIDTH is the one dimension that came back, as `measure`, and it
33
- * came back on a measurement rather than on taste. "Always full-width" did
34
- * not remove the decision, it pushed it down into every page: a consumer was
35
- * surveyed at 2560px and had six distinct caps across nine routes, every one
36
- * of them a hand-written `mx-auto max-w-*` at the top of a `+page.svelte`,
37
- * between them using 15% to 79% of the width actually available. That is
38
- * fifteen independent guesses, not a shell shape.
39
- *
40
- * `measure` is a small named scale, chosen once in the layout, and it is not
41
- * the old `content` prop returning. It defaults to `full`, so a shell that
42
- * never mentions it renders byte-identically; its tiers are CSS custom
43
- * properties an app retunes without a release; and it exists to REPLACE
44
- * per-page width decisions rather than to offer an app a look.
32
+ * Content WIDTH is not a prop. A route declares what it is (`pageType`:
33
+ * `reading`, `panel` or `tool`, see page.ts) and the shell owns everything
34
+ * that follows from it: the column's width and centring, the gutters, the
35
+ * pane flush against the rail, the aside beside the content, and which of
36
+ * them scrolls. The less an app decides, the better (operator, 24/10/2026).
45
37
  *
46
38
  * Content TEXTURE came back the same way, on the same kind of evidence. Two
47
39
  * apps had separately built one picture — a faint dot-grid floor with a soft
@@ -77,7 +69,7 @@
77
69
  * </AppShell>
78
70
  */
79
71
  import type { Snippet } from 'svelte';
80
- import type { ShellMeasure } from './measure.js';
72
+ import { type PageType } from './page.js';
81
73
  import type { ShellTexture } from './texture.js';
82
74
  import { type NavSource } from './types.js';
83
75
  type $$ComponentProps = {
@@ -131,16 +123,6 @@ type $$ComponentProps = {
131
123
  * the alternative, rendering it in both, is the duplication this file
132
124
  * exists to avoid. */
133
125
  identity?: Snippet;
134
- /** Where the Settings row at the rail's foot links. Absent renders no row.
135
- * Settings sits at the foot because configuring the app is not navigating
136
- * it, and the split reads without a label.
137
- *
138
- * The app's version does NOT live beside it. A build string earns rail
139
- * space only if it saves a trip, and it does not: Settings is on screen
140
- * at every moment and its About section is one click from here, so the
141
- * line was permanent furniture duplicating the thing directly above it. */
142
- settingsHref?: string;
143
- settingsLabel?: string;
144
126
  /** Provide to render the search affordance. Usually opens a CommandPalette. */
145
127
  onSearch?: () => void;
146
128
  searchLabel?: string;
@@ -157,19 +139,17 @@ type $$ComponentProps = {
157
139
  themeToggle?: boolean;
158
140
  /** Override the theme action. Defaults to mode-watcher's toggleMode. */
159
141
  onToggleTheme?: () => void;
160
- padded?: boolean;
161
142
  /**
162
- * How wide the page body may get, from a named scale: `prose` (40rem, for
163
- * long-form running text), `page` (80rem — forms, detail views,
164
- * settings), `wide` (120rem — indexes, grids, tables, dashboards), or
165
- * `full` (no cap).
166
- *
167
- * Defaults to `full`, so a shell that does not mention it is unchanged.
168
- * Set it in the layout, once: the point is that pages stop each deciding
169
- * their own width. The cap is the content box's border box, so `padded`
170
- * spends its padding inside the measure.
143
+ * What the route is: `reading` (the default), `panel` or `tool`
144
+ * (page.ts). The route declares it; the shell owns every width, gutter
145
+ * and column that follows. Apps pass `page.data.pageType`.
146
+ */
147
+ pageType?: PageType;
148
+ /**
149
+ * The page's own name, for the bar when neither the rail nor the page's
150
+ * pane names where the reader is. Apps pass `page.data.title`.
171
151
  */
172
- measure?: ShellMeasure;
152
+ title?: string;
173
153
  /**
174
154
  * The house atmosphere on the content region: `grid` (a dot-grid floor
175
155
  * plus a corner vignette) or `none`.
@@ -185,8 +165,6 @@ type $$ComponentProps = {
185
165
  * declaration; `none` turns it off.
186
166
  */
187
167
  texture?: ShellTexture;
188
- /** Extra classes on the scrolling content container. */
189
- mainClass?: string;
190
168
  children: Snippet;
191
169
  };
192
170
  declare const AppShell: import("svelte").Component<$$ComponentProps, {}, "collapsed">;
@@ -0,0 +1,15 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Marks what it wraps as inside one of the page's columns or a dialogue,
4
+ * not the page itself, so a component there (a DocumentReader in an aside)
5
+ * keeps its own layout rather than claiming the page's aside.
6
+ */
7
+ import type { Snippet } from 'svelte';
8
+ import { markInColumn } from './page.js';
9
+
10
+ let { children }: { children: Snippet } = $props();
11
+
12
+ markInColumn();
13
+ </script>
14
+
15
+ {@render children()}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Marks what it wraps as inside one of the page's columns or a dialogue,
3
+ * not the page itself, so a component there (a DocumentReader in an aside)
4
+ * keeps its own layout rather than claiming the page's aside.
5
+ */
6
+ import type { Snippet } from 'svelte';
7
+ type $$ComponentProps = {
8
+ children: Snippet;
9
+ };
10
+ declare const ColumnScope: import("svelte").Component<$$ComponentProps, {}, "">;
11
+ type ColumnScope = ReturnType<typeof ColumnScope>;
12
+ export default ColumnScope;
@@ -2,6 +2,8 @@ export { default as AppShell } from './app-shell.svelte';
2
2
  export { default as AppNav } from './app-nav.svelte';
3
3
  export { default as ShellControls } from './shell-controls.svelte';
4
4
  export { default } from './app-shell.svelte';
5
- export { SHELL_MEASURES, type ShellMeasure } from './measure.js';
5
+ export { default as PagePane } from './page-pane.svelte';
6
+ export { default as PageAside } from './page-aside.svelte';
7
+ export { PAGE_TYPES, type PageAsideRegistration, type PageColumnState, type PagePaneRegistration, type PageType } from './page.js';
6
8
  export { SHELL_TEXTURES, type ShellTexture } from './texture.js';
7
- export { activeNavLabel, hasActiveNavChild, isNavGroup, isNavItemActive, navChildren, toGroups, toItems, type IconComponent, type NavChildItem, type NavEntry, type NavGroup, type NavItem, type NavSource } from './types.js';
9
+ export { activeNavTitle, hasActiveNavChild, isNavGroup, isNavItemActive, navChildren, toGroups, toItems, type IconComponent, type NavChildItem, type NavEntry, type NavGroup, type NavItem, type NavSource } from './types.js';
@@ -2,6 +2,8 @@ export { default as AppShell } from './app-shell.svelte';
2
2
  export { default as AppNav } from './app-nav.svelte';
3
3
  export { default as ShellControls } from './shell-controls.svelte';
4
4
  export { default } from './app-shell.svelte';
5
- export { SHELL_MEASURES } from './measure.js';
5
+ export { default as PagePane } from './page-pane.svelte';
6
+ export { default as PageAside } from './page-aside.svelte';
7
+ export { PAGE_TYPES } from './page.js';
6
8
  export { SHELL_TEXTURES } from './texture.js';
7
- export { activeNavLabel, hasActiveNavChild, isNavGroup, isNavItemActive, navChildren, toGroups, toItems } from './types.js';
9
+ export { activeNavTitle, hasActiveNavChild, isNavGroup, isNavItemActive, navChildren, toGroups, toItems } from './types.js';
@@ -0,0 +1,58 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Registers this page's aside: what stands beside the page's content. The
4
+ * shell places it by the route's page type: in a `reading` page beside the
5
+ * centred column, the pair centred, and after the column below 66rem of
6
+ * content region; in a `tool` or `panel` page at the frame's right edge,
7
+ * opened from the bar as a sheet below 80rem of window. Renders nothing
8
+ * where it stands (in place outside a shell).
9
+ *
10
+ * <PageAside label="Work under way">
11
+ * <Panel title="Work under way">…</Panel>
12
+ * </PageAside>
13
+ *
14
+ * The body takes the column's state when it needs it (`{#snippet body(state)}`
15
+ * instead of children), to close the sheet after a choice. One registration
16
+ * at a time; a later one replaces an earlier one.
17
+ */
18
+ import type { Snippet } from 'svelte';
19
+ import type { IconComponent } from './types.js';
20
+ import { getPageSlots, IN_PLACE, type PageAsideRegistration, type PageColumnState } from './page.js';
21
+
22
+ let {
23
+ label,
24
+ description,
25
+ icon,
26
+ body,
27
+ children
28
+ }: {
29
+ label: string;
30
+ /** A line under the name at the head of the sheet. */
31
+ description?: string;
32
+ icon?: IconComponent;
33
+ body?: Snippet<[PageColumnState]>;
34
+ children?: Snippet;
35
+ } = $props();
36
+
37
+ const slots = getPageSlots();
38
+
39
+ $effect(() => {
40
+ if (!slots) return;
41
+ const content = body ?? children;
42
+ if (!content) return;
43
+ const registration: PageAsideRegistration = {
44
+ label,
45
+ description,
46
+ icon,
47
+ body: content as Snippet<[PageColumnState]>
48
+ };
49
+ slots.aside = registration;
50
+ return () => {
51
+ if (slots.aside === registration) slots.aside = null;
52
+ };
53
+ });
54
+ </script>
55
+
56
+ {#if !slots}
57
+ {#if body}{@render body(IN_PLACE)}{:else}{@render children?.()}{/if}
58
+ {/if}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Registers this page's aside: what stands beside the page's content. The
3
+ * shell places it by the route's page type: in a `reading` page beside the
4
+ * centred column, the pair centred, and after the column below 66rem of
5
+ * content region; in a `tool` or `panel` page at the frame's right edge,
6
+ * opened from the bar as a sheet below 80rem of window. Renders nothing
7
+ * where it stands (in place outside a shell).
8
+ *
9
+ * <PageAside label="Work under way">
10
+ * <Panel title="Work under way">…</Panel>
11
+ * </PageAside>
12
+ *
13
+ * The body takes the column's state when it needs it (`{#snippet body(state)}`
14
+ * instead of children), to close the sheet after a choice. One registration
15
+ * at a time; a later one replaces an earlier one.
16
+ */
17
+ import type { Snippet } from 'svelte';
18
+ import type { IconComponent } from './types.js';
19
+ import { type PageColumnState } from './page.js';
20
+ type $$ComponentProps = {
21
+ label: string;
22
+ /** A line under the name at the head of the sheet. */
23
+ description?: string;
24
+ icon?: IconComponent;
25
+ body?: Snippet<[PageColumnState]>;
26
+ children?: Snippet;
27
+ };
28
+ declare const PageAside: import("svelte").Component<$$ComponentProps, {}, "">;
29
+ type PageAside = ReturnType<typeof PageAside>;
30
+ export default PageAside;
@@ -0,0 +1,73 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Registers this page's pane: the second column a `panel` page carries
4
+ * flush against the rail, as wide as the rail and folded as narrow as it,
5
+ * and opened from the bar as a sheet below 64rem of window. The shell draws
6
+ * it; this renders nothing where it stands (in place outside a shell).
7
+ *
8
+ * <PagePane label="Past questions" icon={History} remember="chat-past-folded" fill>
9
+ * {#snippet body({ mode, fold, close })}<ConversationList … />{/snippet}
10
+ * {#snippet foot()}<Button …>Clear all</Button>{/snippet}
11
+ * {#snippet folded({ unfold })}<Button … onclick={unfold}>…</Button>{/snippet}
12
+ * </PagePane>
13
+ *
14
+ * The route declares `pageType: 'panel'`; the content beside the pane is the
15
+ * page itself. One registration at a time; a later one replaces an earlier.
16
+ */
17
+ import type { Snippet } from 'svelte';
18
+ import type { IconComponent } from './types.js';
19
+ import { getPageSlots, IN_PLACE, type PageColumnState, type PagePaneRegistration } from './page.js';
20
+
21
+ let {
22
+ label,
23
+ icon,
24
+ location,
25
+ remember,
26
+ fill = false,
27
+ column = $bindable(false),
28
+ body,
29
+ foot,
30
+ folded
31
+ }: {
32
+ label: string;
33
+ icon?: IconComponent;
34
+ /** What the bar names on this page when the rail names nothing ("Settings › Account"). */
35
+ location?: string;
36
+ /** localStorage key the fold is remembered under. */
37
+ remember?: string;
38
+ /** The content beside the pane fills the frame (a transcript) instead of sitting at the panel measure. */
39
+ fill?: boolean;
40
+ /** True while the shell draws the pane as a column; false while it is a sheet. Bindable. */
41
+ column?: boolean;
42
+ body: Snippet<[PageColumnState]>;
43
+ foot?: Snippet<[PageColumnState]>;
44
+ /** The pane folded to its edge; given, the pane folds. */
45
+ folded?: Snippet<[PageColumnState]>;
46
+ } = $props();
47
+
48
+ const slots = getPageSlots();
49
+
50
+ $effect(() => {
51
+ if (!slots) return;
52
+ const registration: PagePaneRegistration = {
53
+ label,
54
+ icon,
55
+ location,
56
+ remember,
57
+ fill,
58
+ body,
59
+ foot,
60
+ folded,
61
+ onmode: (mode) => (column = mode === 'column')
62
+ };
63
+ slots.pane = registration;
64
+ return () => {
65
+ if (slots.pane === registration) slots.pane = null;
66
+ };
67
+ });
68
+ </script>
69
+
70
+ {#if !slots}
71
+ {@render body(IN_PLACE)}
72
+ {@render foot?.(IN_PLACE)}
73
+ {/if}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Registers this page's pane: the second column a `panel` page carries
3
+ * flush against the rail, as wide as the rail and folded as narrow as it,
4
+ * and opened from the bar as a sheet below 64rem of window. The shell draws
5
+ * it; this renders nothing where it stands (in place outside a shell).
6
+ *
7
+ * <PagePane label="Past questions" icon={History} remember="chat-past-folded" fill>
8
+ * {#snippet body({ mode, fold, close })}<ConversationList … />{/snippet}
9
+ * {#snippet foot()}<Button …>Clear all</Button>{/snippet}
10
+ * {#snippet folded({ unfold })}<Button … onclick={unfold}>…</Button>{/snippet}
11
+ * </PagePane>
12
+ *
13
+ * The route declares `pageType: 'panel'`; the content beside the pane is the
14
+ * page itself. One registration at a time; a later one replaces an earlier.
15
+ */
16
+ import type { Snippet } from 'svelte';
17
+ import type { IconComponent } from './types.js';
18
+ import { type PageColumnState } from './page.js';
19
+ type $$ComponentProps = {
20
+ label: string;
21
+ icon?: IconComponent;
22
+ /** What the bar names on this page when the rail names nothing ("Settings › Account"). */
23
+ location?: string;
24
+ /** localStorage key the fold is remembered under. */
25
+ remember?: string;
26
+ /** The content beside the pane fills the frame (a transcript) instead of sitting at the panel measure. */
27
+ fill?: boolean;
28
+ /** True while the shell draws the pane as a column; false while it is a sheet. Bindable. */
29
+ column?: boolean;
30
+ body: Snippet<[PageColumnState]>;
31
+ foot?: Snippet<[PageColumnState]>;
32
+ /** The pane folded to its edge; given, the pane folds. */
33
+ folded?: Snippet<[PageColumnState]>;
34
+ };
35
+ declare const PagePane: import("svelte").Component<$$ComponentProps, {}, "column">;
36
+ type PagePane = ReturnType<typeof PagePane>;
37
+ export default PagePane;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Page types: what a route is, declared once, and everything about its width,
3
+ * gutters and second columns decided here rather than on the page.
4
+ *
5
+ * - `reading` (the default): one centred column sized for prose, and the
6
+ * page's aside (`<PageAside>`) beside it, the pair centred; below 66rem of
7
+ * content region the aside follows the column. The page scrolls.
8
+ * - `panel`: a second column (`<PagePane>`: settings' sections, a chat's past
9
+ * questions) flush against the rail, and the content beside it, left-aligned
10
+ * to the pane. Below 64rem of window the pane opens as a sheet from the bar.
11
+ * - `tool`: the whole frame, the content filling its height and scrolling
12
+ * inside itself; the page never scrolls. An aside stands at the frame's
13
+ * right edge, and below 80rem of window opens as a sheet from the bar.
14
+ *
15
+ * The widths are `--ds-page-*` custom properties (`styles.css`), so an app
16
+ * retunes one in one declaration; it never writes a width of its own.
17
+ */
18
+ import { type Snippet } from 'svelte';
19
+ import type { IconComponent } from './types.js';
20
+ export type PageType = 'reading' | 'panel' | 'tool';
21
+ /** Every page type, the default first. */
22
+ export declare const PAGE_TYPES: readonly ["reading", "panel", "tool"];
23
+ /** Where a pane or an aside is drawn just now, and how to put it away. */
24
+ export interface PageColumnState {
25
+ /** `column` beside the content, `sheet` over it from the bar, `stacked` after it (a reading aside). */
26
+ mode: 'column' | 'sheet' | 'stacked';
27
+ /** Whether a foldable pane is folded to its edge. */
28
+ folded: boolean;
29
+ /** Fold the pane to its edge; a no-op where it does not fold. */
30
+ fold: () => void;
31
+ /** Open a folded pane. */
32
+ unfold: () => void;
33
+ /** Close the sheet; a no-op in a column. */
34
+ close: () => void;
35
+ }
36
+ export interface PagePaneRegistration {
37
+ /** The pane's name: its landmark's, and the bar action's that opens it as a sheet. */
38
+ label: string;
39
+ /** The bar action's icon. */
40
+ icon?: IconComponent;
41
+ /** What the bar names while this pane's page is open, when the rail names nothing. */
42
+ location?: string;
43
+ /** The column's body. */
44
+ body: Snippet<[PageColumnState]>;
45
+ /** Pinned at the pane's foot, open or in the sheet. */
46
+ foot?: Snippet<[PageColumnState]>;
47
+ /** What the pane shows folded to its edge; given, the pane folds. */
48
+ folded?: Snippet<[PageColumnState]>;
49
+ /** The localStorage key the fold is remembered under. */
50
+ remember?: string;
51
+ /** The content beside the pane fills the frame (a transcript), rather than sitting at the panel measure. */
52
+ fill?: boolean;
53
+ /** Told whether the shell draws the pane as a column or keeps it in a sheet. */
54
+ onmode?: (mode: 'column' | 'sheet') => void;
55
+ }
56
+ export interface PageAsideRegistration {
57
+ /** The aside's name: its landmark's, and the bar action's that opens it as a sheet. */
58
+ label: string;
59
+ /** A line under the name at the head of the sheet. */
60
+ description?: string;
61
+ icon?: IconComponent;
62
+ body: Snippet<[PageColumnState]>;
63
+ }
64
+ /** The shell's two page-owned columns, each registered by the route. */
65
+ export interface PageSlots {
66
+ pane: PagePaneRegistration | null;
67
+ aside: PageAsideRegistration | null;
68
+ }
69
+ export declare function providePageSlots(slots: PageSlots): void;
70
+ /** Undefined outside a shell: `PagePane` and `PageAside` then render in place. */
71
+ export declare function getPageSlots(): PageSlots | undefined;
72
+ /** Marks the subtree as inside a page column or a dialogue (`ColumnScope`). */
73
+ export declare function markInColumn(): void;
74
+ /** Whether this component stands in the page itself, not in one of its columns or a dialogue. */
75
+ export declare function onThePage(): boolean;
76
+ /** A column's state where nothing hosts it: in place, open. */
77
+ export declare const IN_PLACE: PageColumnState;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Page types: what a route is, declared once, and everything about its width,
3
+ * gutters and second columns decided here rather than on the page.
4
+ *
5
+ * - `reading` (the default): one centred column sized for prose, and the
6
+ * page's aside (`<PageAside>`) beside it, the pair centred; below 66rem of
7
+ * content region the aside follows the column. The page scrolls.
8
+ * - `panel`: a second column (`<PagePane>`: settings' sections, a chat's past
9
+ * questions) flush against the rail, and the content beside it, left-aligned
10
+ * to the pane. Below 64rem of window the pane opens as a sheet from the bar.
11
+ * - `tool`: the whole frame, the content filling its height and scrolling
12
+ * inside itself; the page never scrolls. An aside stands at the frame's
13
+ * right edge, and below 80rem of window opens as a sheet from the bar.
14
+ *
15
+ * The widths are `--ds-page-*` custom properties (`styles.css`), so an app
16
+ * retunes one in one declaration; it never writes a width of its own.
17
+ */
18
+ import { getContext, setContext } from 'svelte';
19
+ /** Every page type, the default first. */
20
+ export const PAGE_TYPES = ['reading', 'panel', 'tool'];
21
+ const KEY = Symbol('ds-page-slots');
22
+ const IN_COLUMN = Symbol('ds-page-in-column');
23
+ export function providePageSlots(slots) {
24
+ setContext(KEY, slots);
25
+ }
26
+ /** Undefined outside a shell: `PagePane` and `PageAside` then render in place. */
27
+ export function getPageSlots() {
28
+ return getContext(KEY);
29
+ }
30
+ /** Marks the subtree as inside a page column or a dialogue (`ColumnScope`). */
31
+ export function markInColumn() {
32
+ setContext(IN_COLUMN, true);
33
+ }
34
+ /** Whether this component stands in the page itself, not in one of its columns or a dialogue. */
35
+ export function onThePage() {
36
+ return getPageSlots() !== undefined && getContext(IN_COLUMN) !== true;
37
+ }
38
+ /** A column's state where nothing hosts it: in place, open. */
39
+ export const IN_PLACE = {
40
+ mode: 'stacked',
41
+ folded: false,
42
+ fold: () => { },
43
+ unfold: () => { },
44
+ close: () => { }
45
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The shell's one feedback door. `ReportWidget` owns the dialogue and, while
3
+ * mounted, registers how to open it here; `AppShell` draws the trigger: an icon
4
+ * in the bar from md, a row in the phone's drawer. The widget is mounted by the
5
+ * app's layout beside the shell rather than inside it, so a context could not
6
+ * join them; this module-level slot does, and there is no wiring for an app.
7
+ */
8
+ export declare const shellReport: {
9
+ open: (() => void) | null;
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The shell's one feedback door. `ReportWidget` owns the dialogue and, while
3
+ * mounted, registers how to open it here; `AppShell` draws the trigger: an icon
4
+ * in the bar from md, a row in the phone's drawer. The widget is mounted by the
5
+ * app's layout beside the shell rather than inside it, so a context could not
6
+ * join them; this module-level slot does, and there is no wiring for an app.
7
+ */
8
+ export const shellReport = $state({ open: null });
@@ -151,9 +151,11 @@ export declare function isNavItemActive(item: NavItem, currentPath: string | und
151
151
  * when the children live at their own top-level routes.
152
152
  */
153
153
  export declare function hasActiveNavChild(item: NavItem, currentPath: string | undefined): boolean;
154
+ /** What the bar puts between a section and its page: "Securities › Trading". */
155
+ export declare const TITLE_SEPARATOR = " \u203A ";
154
156
  /**
155
- * The label of where the user is: the active child's where one matches, else
156
- * the active item's. Undefined when nothing matches, so an unlisted route
157
- * renders no label rather than a wrong one.
157
+ * The bar's title for where the user is: "Section › Page" inside a section that
158
+ * discloses children, the item's one name for a top-level page. Undefined when
159
+ * nothing matches, so an unlisted route renders no title rather than a wrong one.
158
160
  */
159
- export declare function activeNavLabel(nav: NavSource | undefined, currentPath: string | undefined): string | undefined;
161
+ export declare function activeNavTitle(nav: NavSource | undefined, currentPath: string | undefined): string | undefined;
@@ -110,18 +110,20 @@ export function hasActiveNavChild(item, currentPath) {
110
110
  return false;
111
111
  return navChildren(item).some((child) => isNavItemActive(child, currentPath));
112
112
  }
113
+ /** What the bar puts between a section and its page: "Securities › Trading". */
114
+ export const TITLE_SEPARATOR = ' › ';
113
115
  /**
114
- * The label of where the user is: the active child's where one matches, else
115
- * the active item's. Undefined when nothing matches, so an unlisted route
116
- * renders no label rather than a wrong one.
116
+ * The bar's title for where the user is: "Section › Page" inside a section that
117
+ * discloses children, the item's one name for a top-level page. Undefined when
118
+ * nothing matches, so an unlisted route renders no title rather than a wrong one.
117
119
  */
118
- export function activeNavLabel(nav, currentPath) {
120
+ export function activeNavTitle(nav, currentPath) {
119
121
  if (!currentPath)
120
122
  return undefined;
121
123
  for (const item of toItems(nav)) {
122
124
  const child = navChildren(item).find((c) => isNavItemActive(c, currentPath));
123
125
  if (child)
124
- return child.label;
126
+ return `${item.label}${TITLE_SEPARATOR}${child.label}`;
125
127
  if (isNavItemActive(item, currentPath))
126
128
  return item.label;
127
129
  }
@@ -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="ds-measure mt-2 text-sm" data-measure="prose">{collection.description}</p>
113
+ <p class="mt-2 text-sm" data-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>
@@ -79,7 +79,7 @@
79
79
  {/each}
80
80
  </div>
81
81
  {:else}
82
- <div class="ds-measure flex flex-col gap-5" data-measure="prose" aria-hidden="true">
82
+ <div class="flex flex-col gap-5" data-prose aria-hidden="true">
83
83
  {#each { length: n }, i (i)}
84
84
  <div class="flex flex-col">
85
85
  {#each { length: 4 }, line (line)}