@poodle64/ui 2026.9.15 → 2026.9.16
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.
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
import PanelLeftClose from '@lucide/svelte/icons/panel-left-close';
|
|
91
91
|
import PanelLeftOpen from '@lucide/svelte/icons/panel-left-open';
|
|
92
92
|
import AppNav from './app-nav.svelte';
|
|
93
|
-
import { activeNavLabel, toItems, type NavSource } from './types.js';
|
|
93
|
+
import { activeNavLabel, matchesPrefix, toItems, type NavSource } from './types.js';
|
|
94
94
|
import { provideShellControls, type ShellControlsSlot } from './controls.js';
|
|
95
95
|
import { cn } from '../../../utils.js';
|
|
96
96
|
|
|
@@ -233,9 +233,19 @@
|
|
|
233
233
|
|
|
234
234
|
const hasNav = $derived(toItems(nav).length > 0);
|
|
235
235
|
|
|
236
|
+
// The foot's Settings row owns its subtree, matched exactly as a nav `href`
|
|
237
|
+
// is, so the row's own current state and the bar's label cannot disagree.
|
|
238
|
+
const atSettings = $derived(
|
|
239
|
+
!!settingsHref && !!currentPath && matchesPrefix(currentPath, settingsHref)
|
|
240
|
+
);
|
|
241
|
+
|
|
236
242
|
// Where the user is, in words: the rail is icons when collapsed and a closed
|
|
237
|
-
// drawer on a phone, so the bar names the section.
|
|
238
|
-
|
|
243
|
+
// drawer on a phone, so the bar names the section. Settings is a section like
|
|
244
|
+
// any other and is named the same way — by the foot row's own label, since
|
|
245
|
+
// the shell knows nothing of the pages inside it.
|
|
246
|
+
const location = $derived(
|
|
247
|
+
activeNavLabel(nav, currentPath) ?? (atSettings ? settingsLabel : undefined)
|
|
248
|
+
);
|
|
239
249
|
|
|
240
250
|
// The page's scope controls, registered by `<ShellControls>` from the route.
|
|
241
251
|
const controls: ShellControlsSlot = $state({ content: null });
|
|
@@ -674,7 +684,7 @@
|
|
|
674
684
|
<a
|
|
675
685
|
href={settingsHref}
|
|
676
686
|
class="ds-nav-item"
|
|
677
|
-
aria-current={
|
|
687
|
+
aria-current={atSettings ? 'page' : undefined}
|
|
678
688
|
onclick={() => (mobileNavOpen = false)}
|
|
679
689
|
>
|
|
680
690
|
<Settings class="ds-nav-icon size-[1.125rem] flex-none" aria-hidden="true" />
|
|
@@ -129,6 +129,8 @@ export declare function navChildren(item: NavItem): readonly NavChildItem[];
|
|
|
129
129
|
* is looking for.
|
|
130
130
|
*/
|
|
131
131
|
export declare function toItems(nav: NavSource | undefined): NavItem[];
|
|
132
|
+
/** Prefix-match `path` against `prefix`, without running past a path segment. */
|
|
133
|
+
export declare function matchesPrefix(path: string, prefix: string): boolean;
|
|
132
134
|
/**
|
|
133
135
|
* Whether `item` is the current page.
|
|
134
136
|
*
|
|
@@ -74,7 +74,7 @@ export function toItems(nav) {
|
|
|
74
74
|
return items;
|
|
75
75
|
}
|
|
76
76
|
/** Prefix-match `path` against `prefix`, without running past a path segment. */
|
|
77
|
-
function matchesPrefix(path, prefix) {
|
|
77
|
+
export function matchesPrefix(path, prefix) {
|
|
78
78
|
return path === prefix || path.startsWith(prefix + '/');
|
|
79
79
|
}
|
|
80
80
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poodle64/ui",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.16",
|
|
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.9.
|
|
4
|
+
Generated from `@poodle64/ui@2026.9.16`. 57 components, 15 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
|
|