@the-portland-company/shell 0.58.0 → 0.59.0
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/CHANGELOG.md +4 -0
- package/dist/app-chrome.cjs +16 -0
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +17 -1
- package/dist/app-chrome.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 0.59.0 — 2026-09-30
|
|
2
|
+
|
|
3
|
+
### Fixed — parent nav row stays active on child routes when the 'tabs' nav preference strips children (`src/app-chrome/frame.tsx`, DevNotes ebb036a1)
|
|
4
|
+
|
|
1
5
|
## 0.58.0 — 2026-09-30
|
|
2
6
|
|
|
3
7
|
### Fixed — Meta build-metadata row renders for every viewer (`src/app-chrome/index.tsx`)
|
package/dist/app-chrome.cjs
CHANGED
|
@@ -4080,6 +4080,21 @@ function FrameBody({
|
|
|
4080
4080
|
[data?.contactsItem, data?.petitionsItem, navMode, activeOrgId]
|
|
4081
4081
|
);
|
|
4082
4082
|
const navItems = core?.nav ?? derivedNavItems;
|
|
4083
|
+
const navIsActive = react.useMemo(() => {
|
|
4084
|
+
const childHrefs = /* @__PURE__ */ new Map();
|
|
4085
|
+
for (const item of navItems) {
|
|
4086
|
+
if (!item.href || !item.children?.length) continue;
|
|
4087
|
+
const hrefs = [];
|
|
4088
|
+
for (const child of item.children) {
|
|
4089
|
+
if (child.href) hrefs.push(child.href);
|
|
4090
|
+
for (const leaf of child.children ?? []) {
|
|
4091
|
+
if (leaf.href) hrefs.push(leaf.href);
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
childHrefs.set(item.href, hrefs);
|
|
4095
|
+
}
|
|
4096
|
+
return (pathname2, href) => isNavItemActive(pathname2, href) || (childHrefs.get(href) ?? []).some((h) => isNavItemActive(pathname2, h));
|
|
4097
|
+
}, [navItems]);
|
|
4083
4098
|
const derivedBreadcrumbs = react.useMemo(
|
|
4084
4099
|
() => deriveBreadcrumbs(navItems, pathname, { search, origin: meta.origin }),
|
|
4085
4100
|
[navItems, pathname, search, meta.origin]
|
|
@@ -4112,6 +4127,7 @@ function FrameBody({
|
|
|
4112
4127
|
// (which strips children) would leave one childless parent row —
|
|
4113
4128
|
// flat apps ignore the stripping.
|
|
4114
4129
|
items: navDisplay === "tabs" && meta.navShape !== "flat" ? navItems.map(({ children: _sub, ...item }) => item) : navItems,
|
|
4130
|
+
isActive: navIsActive,
|
|
4115
4131
|
flatten: meta.navShape === "flat"
|
|
4116
4132
|
},
|
|
4117
4133
|
// The app's own workspace is NOT the organization — it is a per-app
|