@poodle64/ui 2026.10.26 → 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.
- package/README.md +123 -169
- package/dist/components/ui/app-dialog/app-dialog.svelte +2 -1
- package/dist/components/ui/app-shell/app-shell.svelte +251 -97
- package/dist/components/ui/app-shell/app-shell.svelte.d.ts +15 -27
- package/dist/components/ui/app-shell/column-scope.svelte +15 -0
- package/dist/components/ui/app-shell/column-scope.svelte.d.ts +12 -0
- package/dist/components/ui/app-shell/index.d.ts +3 -1
- package/dist/components/ui/app-shell/index.js +3 -1
- package/dist/components/ui/app-shell/page-aside.svelte +58 -0
- package/dist/components/ui/app-shell/page-aside.svelte.d.ts +30 -0
- package/dist/components/ui/app-shell/page-pane.svelte +73 -0
- package/dist/components/ui/app-shell/page-pane.svelte.d.ts +37 -0
- package/dist/components/ui/app-shell/page.d.ts +77 -0
- package/dist/components/ui/app-shell/page.js +45 -0
- package/dist/components/ui/collection-detail/collection-detail.svelte +1 -1
- package/dist/components/ui/content-skeleton/content-skeleton.svelte +1 -1
- package/dist/components/ui/context-column/context-column.svelte +47 -146
- package/dist/components/ui/context-column/context-column.svelte.d.ts +3 -5
- package/dist/components/ui/document-reader/document-reader.svelte +56 -24
- package/dist/components/ui/document-reader/document-reader.svelte.d.ts +5 -4
- package/dist/components/ui/page-section/page-section.svelte +1 -1
- package/dist/components/ui/panel/panel.svelte +1 -0
- package/dist/components/ui/settings-shell/settings-shell.svelte +67 -81
- package/dist/components/ui/settings-shell/settings-shell.svelte.d.ts +21 -60
- package/dist/styles.css +246 -117
- package/package.json +1 -1
- package/registry/component-map.json +22 -15
- package/registry/component-map.md +8 -7
- package/dist/components/ui/app-shell/measure.d.ts +0 -28
- package/dist/components/ui/app-shell/measure.js +0 -21
- package/dist/components/ui/app-shell/padding.d.ts +0 -27
- package/dist/components/ui/app-shell/padding.js +0 -27
- package/dist/components/ui/list-shell/index.d.ts +0 -2
- package/dist/components/ui/list-shell/index.js +0 -2
- package/dist/components/ui/list-shell/list-shell.svelte +0 -85
- package/dist/components/ui/list-shell/list-shell.svelte.d.ts +0 -39
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The page padding the shell gives its content area.
|
|
3
|
-
*
|
|
4
|
-
* A constant rather than a literal in app-shell.svelte, because it is no longer
|
|
5
|
-
* declared in one place: SettingsShell runs inside an UNPADDED content area (its
|
|
6
|
-
* section list has to reach the area's edges to read as a pane rather than a
|
|
7
|
-
* floating card) and then pads its own content pane, which must land on the same
|
|
8
|
-
* rhythm as every other page or the settings destination is the one route whose
|
|
9
|
-
* text sits somewhere else.
|
|
10
|
-
*
|
|
11
|
-
* Utilities rather than a class in styles.css, deliberately: both consumers pass
|
|
12
|
-
* this through `cn()`, so an app overriding the padding — `mainClass="px-0"`, a
|
|
13
|
-
* flush table — still resolves through tailwind-merge. A base-layer class would
|
|
14
|
-
* be invisible to it, and the utility would win by layer order instead of by
|
|
15
|
-
* being last, which is the cascade trap recorded against `.ds-nav`'s ink.
|
|
16
|
-
*
|
|
17
|
-
* The bottom pad carries `env(safe-area-inset-bottom)` so the last row of a page
|
|
18
|
-
* clears a home-indicator gesture bar.
|
|
19
|
-
*
|
|
20
|
-
* The trailing `::after` is `--ds-float-reserve`, the room a page's own floating
|
|
21
|
-
* control (ContextColumn's opener) declares, so its last row can scroll clear.
|
|
22
|
-
* Nothing of the shell's floats: feedback is the bar's and the drawer's. An
|
|
23
|
-
* element rather than padding: a page taller than the content area overflows
|
|
24
|
-
* this box, which leaves its padding behind at the area's foot, while a last
|
|
25
|
-
* flex item follows the overflow to its end.
|
|
26
|
-
*/
|
|
27
|
-
export const CONTENT_PADDING = 'px-4 pt-5 pb-[calc(1.25rem+env(safe-area-inset-bottom))] sm:px-6 md:px-8 md:pt-7 md:pb-[calc(1.75rem+env(safe-area-inset-bottom))] 2xl:px-12 after:block after:flex-none after:h-[var(--ds-float-reserve,0px)]';
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* ListShell — a module's working list, folded away and brought back by
|
|
4
|
-
* the app that owns it, beside the content it serves. Not an AppShell
|
|
5
|
-
* slot: `sidebar` was removed 2026.8.11 after two apps disagreed on
|
|
6
|
-
* where a module's own PAGES render (operator ruling 21/08/2026); a
|
|
7
|
-
* working list is data, not navigation, so it is a page-level companion
|
|
8
|
-
* like `SettingsShell`/`ContextColumn` — pair with `padded={false}` on
|
|
9
|
-
* AppShell, as `SettingsShell` requires. `open` is the caller's own
|
|
10
|
-
* bindable state, never persisted here; closed, this renders nothing,
|
|
11
|
-
* and reopening is the caller's own control, placed wherever the module
|
|
12
|
-
* chooses. Hidden below `md` at every state.
|
|
13
|
-
*/
|
|
14
|
-
import type { Snippet } from 'svelte';
|
|
15
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
16
|
-
import { cn, type WithElementRef } from '../../../utils.js';
|
|
17
|
-
import PanelLeftClose from '@lucide/svelte/icons/panel-left-close';
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
title,
|
|
21
|
-
label = title,
|
|
22
|
-
open = $bindable(true),
|
|
23
|
-
actions,
|
|
24
|
-
children,
|
|
25
|
-
ref = $bindable(null),
|
|
26
|
-
class: className,
|
|
27
|
-
...restProps
|
|
28
|
-
}: WithElementRef<HTMLAttributes<HTMLElement>> & {
|
|
29
|
-
/** The list's heading, in the shell's display face. */
|
|
30
|
-
title: string;
|
|
31
|
-
/**
|
|
32
|
-
* The landmark's accessible name. Defaults to `title` — the visible
|
|
33
|
-
* heading already says what this is, so a module only sets `label`
|
|
34
|
-
* separately when the heading text would not stand alone as a name
|
|
35
|
-
* (WCAG 2.4.1), e.g. a heading that leads with a live count.
|
|
36
|
-
*/
|
|
37
|
-
label?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the list is open. Bindable, and NOT persisted by this
|
|
40
|
-
* component — bind it to whatever the module already uses to persist a
|
|
41
|
-
* user preference across a reload.
|
|
42
|
-
*/
|
|
43
|
-
open?: boolean;
|
|
44
|
-
/** Leading header actions beside the title — an "Add" button, a filter. */
|
|
45
|
-
actions?: Snippet;
|
|
46
|
-
/** The list body: tabs, group headings, rows — entirely the module's own. */
|
|
47
|
-
children: Snippet;
|
|
48
|
-
} = $props();
|
|
49
|
-
|
|
50
|
-
const listId = $props.id();
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
{#if open}
|
|
54
|
-
<aside
|
|
55
|
-
bind:this={ref}
|
|
56
|
-
id={listId}
|
|
57
|
-
aria-label={label}
|
|
58
|
-
class={cn(
|
|
59
|
-
'bg-shell text-shell-foreground border-border hidden w-[25rem] flex-none flex-col border-e md:flex',
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...restProps}
|
|
63
|
-
>
|
|
64
|
-
<div class="flex flex-none items-center gap-2 px-5 pt-5 pb-3">
|
|
65
|
-
<h2 class="font-display text-display flex-1 truncate font-semibold tracking-[var(--ds-font-display-tracking,-0.025em)]">
|
|
66
|
-
{title}
|
|
67
|
-
</h2>
|
|
68
|
-
{#if actions}{@render actions()}{/if}
|
|
69
|
-
<button
|
|
70
|
-
type="button"
|
|
71
|
-
onclick={() => (open = false)}
|
|
72
|
-
aria-expanded="true"
|
|
73
|
-
aria-controls={listId}
|
|
74
|
-
aria-label={`Fold ${label} away`}
|
|
75
|
-
title={`Fold ${label} away`}
|
|
76
|
-
class="text-shell-muted-foreground hover:text-shell-foreground border-border grid size-9 flex-none place-items-center rounded-md border transition-colors"
|
|
77
|
-
>
|
|
78
|
-
<PanelLeftClose class="size-4" />
|
|
79
|
-
</button>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="flex min-h-0 flex-1 flex-col overflow-y-auto">
|
|
82
|
-
{@render children()}
|
|
83
|
-
</div>
|
|
84
|
-
</aside>
|
|
85
|
-
{/if}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ListShell — a module's working list, folded away and brought back by
|
|
3
|
-
* the app that owns it, beside the content it serves. Not an AppShell
|
|
4
|
-
* slot: `sidebar` was removed 2026.8.11 after two apps disagreed on
|
|
5
|
-
* where a module's own PAGES render (operator ruling 21/08/2026); a
|
|
6
|
-
* working list is data, not navigation, so it is a page-level companion
|
|
7
|
-
* like `SettingsShell`/`ContextColumn` — pair with `padded={false}` on
|
|
8
|
-
* AppShell, as `SettingsShell` requires. `open` is the caller's own
|
|
9
|
-
* bindable state, never persisted here; closed, this renders nothing,
|
|
10
|
-
* and reopening is the caller's own control, placed wherever the module
|
|
11
|
-
* chooses. Hidden below `md` at every state.
|
|
12
|
-
*/
|
|
13
|
-
import type { Snippet } from 'svelte';
|
|
14
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
15
|
-
import { type WithElementRef } from '../../../utils.js';
|
|
16
|
-
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLElement>> & {
|
|
17
|
-
/** The list's heading, in the shell's display face. */
|
|
18
|
-
title: string;
|
|
19
|
-
/**
|
|
20
|
-
* The landmark's accessible name. Defaults to `title` — the visible
|
|
21
|
-
* heading already says what this is, so a module only sets `label`
|
|
22
|
-
* separately when the heading text would not stand alone as a name
|
|
23
|
-
* (WCAG 2.4.1), e.g. a heading that leads with a live count.
|
|
24
|
-
*/
|
|
25
|
-
label?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Whether the list is open. Bindable, and NOT persisted by this
|
|
28
|
-
* component — bind it to whatever the module already uses to persist a
|
|
29
|
-
* user preference across a reload.
|
|
30
|
-
*/
|
|
31
|
-
open?: boolean;
|
|
32
|
-
/** Leading header actions beside the title — an "Add" button, a filter. */
|
|
33
|
-
actions?: Snippet;
|
|
34
|
-
/** The list body: tabs, group headings, rows — entirely the module's own. */
|
|
35
|
-
children: Snippet;
|
|
36
|
-
};
|
|
37
|
-
declare const ListShell: import("svelte").Component<$$ComponentProps, {}, "ref" | "open">;
|
|
38
|
-
type ListShell = ReturnType<typeof ListShell>;
|
|
39
|
-
export default ListShell;
|