@publish.os/nextjs 0.0.1-alpha.90 → 0.0.1-alpha.92

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 (284) hide show
  1. package/compiler-assets/nextjs/defaults/group/index.tsx +16 -11
  2. package/compiler-assets/nextjs/defaults/group/layout.tsx +6 -6
  3. package/compiler-assets/nextjs/defaults/group/page.tsx +36 -26
  4. package/compiler-assets/nextjs/defaults/project/next.config.mjs +21 -11
  5. package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -0
  6. package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
  7. package/compiler-assets/nextjs/defaults/root/index.tsx +16 -11
  8. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -3
  9. package/compiler-assets/nextjs/shims/agent-user-agents.ts +65 -0
  10. package/compiler-assets/nextjs/shims/document.tsx +46 -0
  11. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +5 -0
  12. package/compiler-assets/nextjs/shims/global-layout.tsx +8 -42
  13. package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
  14. package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
  15. package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
  16. package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
  17. package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
  18. package/compiler-assets/nextjs/shims/proxy.ts +254 -86
  19. package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +2 -6
  20. package/compiler-assets/nextjs/shims/site-mdx-components.tsx +28 -16
  21. package/compiler-assets/nextjs/shims/site-mdx.tsx +6 -1
  22. package/dist/{build-operation-2JAYBSKF.js → build-operation-CJDUL4OW.js} +29 -23
  23. package/dist/{button-c3WGnxIj.d.ts → button-D6Xp2HBm.d.ts} +4 -4
  24. package/dist/capture-local-source-WGGDIUU2.js +258 -0
  25. package/dist/chunk-22RSSUNV.js +13 -0
  26. package/dist/chunk-3T4HVDSC.js +426 -0
  27. package/dist/{chunk-WKTEO6RS.js → chunk-4BC2L2KA.js} +46 -12
  28. package/dist/{chunk-WDY4IK6Z.js → chunk-5J3YUNRY.js} +3 -10
  29. package/dist/chunk-5KAD7W53.js +248 -0
  30. package/dist/{chunk-DWA3ZRGW.js → chunk-6C65KV7O.js} +2 -2
  31. package/dist/{chunk-GGKFQ3MA.js → chunk-6D2E6UMD.js} +144 -70
  32. package/dist/{chunk-7OGTPSKI.js → chunk-7NY22B5U.js} +8 -3
  33. package/dist/chunk-DX7PXFCM.js +2519 -0
  34. package/dist/{chunk-726GV2NF.js → chunk-DZ3VWEV5.js} +950 -632
  35. package/dist/chunk-EFO6AWXN.js +19 -0
  36. package/dist/chunk-IL4RJOKI.js +186 -0
  37. package/dist/{chunk-H6XILMZX.js → chunk-NHSLTARU.js} +2588 -1493
  38. package/dist/{chunk-DLDFHU7Y.js → chunk-NNBJZPFM.js} +4 -2
  39. package/dist/{chunk-VO2I7MTM.js → chunk-SBMDONTV.js} +10 -7
  40. package/dist/{chunk-YLTOLYWM.js → chunk-WL75GQ5M.js} +6 -18
  41. package/dist/compiler.d.ts +15 -2
  42. package/dist/compiler.js +111 -23
  43. package/dist/components/blocks/agent-actions.d.ts +81 -0
  44. package/dist/components/blocks/agent-actions.js +563 -0
  45. package/dist/components/blocks/toc.d.ts +43 -0
  46. package/dist/components/blocks/toc.js +136 -0
  47. package/dist/components/ui/button.d.ts +4 -0
  48. package/dist/components/ui/button.js +94 -0
  49. package/dist/compose-44GJSMXD.js +16 -0
  50. package/dist/config/createNextConfig.js +19 -3
  51. package/dist/{dev-operation-TZDVJCN7.js → dev-operation-WNECBHZ5.js} +134 -84
  52. package/dist/{framework-selection-X4U6Y6QC.js → framework-selection-ZVO323PK.js} +3 -2
  53. package/dist/ide-support-TG74L4FF.js +16 -0
  54. package/dist/index.d.ts +151 -95
  55. package/dist/index.js +25 -0
  56. package/dist/jsx-dev-runtime.d.ts +6 -0
  57. package/dist/jsx-dev-runtime.js +100 -0
  58. package/dist/jsx-runtime.d.ts +7 -0
  59. package/dist/jsx-runtime.js +97 -0
  60. package/dist/kernel/components/blocks/AgentActions.d.ts +37 -8
  61. package/dist/kernel/components/blocks/AgentActions.js +384 -174
  62. package/dist/kernel/components/blocks/agent-actions.d.ts +4 -0
  63. package/dist/kernel/components/blocks/agent-actions.js +563 -0
  64. package/dist/kernel/components/blocks/animated-icon-swap.d.ts +2 -2
  65. package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
  66. package/dist/kernel/components/blocks/color-palette.d.ts +2 -2
  67. package/dist/kernel/components/blocks/color-palette.js +4 -4
  68. package/dist/kernel/components/blocks/logo-block.d.ts +2 -2
  69. package/dist/kernel/components/blocks/logo-block.js +1 -1
  70. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +6 -5
  71. package/dist/kernel/components/blocks/nav-breadcrumb.js +21 -15
  72. package/dist/kernel/components/blocks/navbar.d.ts +5 -4
  73. package/dist/kernel/components/blocks/navbar.js +79 -59
  74. package/dist/kernel/components/blocks/navigation-progress.d.ts +2 -2
  75. package/dist/kernel/components/blocks/navigation-progress.js +2 -2
  76. package/dist/kernel/components/blocks/next-prev.d.ts +4 -4
  77. package/dist/kernel/components/blocks/next-prev.js +30 -7
  78. package/dist/kernel/components/blocks/page-list.d.ts +4 -4
  79. package/dist/kernel/components/blocks/page-list.js +32 -9
  80. package/dist/kernel/components/blocks/search.d.ts +9 -15
  81. package/dist/kernel/components/blocks/search.js +16 -17
  82. package/dist/kernel/components/blocks/sidebar-node.d.ts +3 -5
  83. package/dist/kernel/components/blocks/sidebar-node.js +13 -3
  84. package/dist/kernel/components/blocks/sidebar.d.ts +6 -7
  85. package/dist/kernel/components/blocks/sidebar.js +137 -28
  86. package/dist/kernel/components/blocks/theme-toggle.d.ts +3 -4
  87. package/dist/kernel/components/blocks/theme-toggle.js +5 -5
  88. package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
  89. package/dist/kernel/components/blocks/toc-client.js +495 -0
  90. package/dist/kernel/components/blocks/toc.d.ts +20 -2
  91. package/dist/kernel/components/blocks/toc.js +121 -179
  92. package/dist/kernel/components/mdx/components/blockquote.d.ts +2 -2
  93. package/dist/kernel/components/mdx/components/blockquote.js +1 -1
  94. package/dist/kernel/components/mdx/components/callout.d.ts +3 -3
  95. package/dist/kernel/components/mdx/components/callout.js +1 -1
  96. package/dist/kernel/components/mdx/components/code-block.d.ts +2 -2
  97. package/dist/kernel/components/mdx/components/code-block.js +2 -2
  98. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +2 -2
  99. package/dist/kernel/components/mdx/components/copy-code-button.js +5 -4
  100. package/dist/kernel/components/mdx/components/figure-caption.d.ts +3 -3
  101. package/dist/kernel/components/mdx/components/figure-caption.js +3 -2
  102. package/dist/kernel/components/mdx/components/figure.d.ts +8 -4
  103. package/dist/kernel/components/mdx/components/figure.js +23 -13
  104. package/dist/kernel/components/mdx/components/footnotes.d.ts +2 -2
  105. package/dist/kernel/components/mdx/components/footnotes.js +1 -1
  106. package/dist/kernel/components/mdx/components/heading-copy-link.d.ts +2 -2
  107. package/dist/kernel/components/mdx/components/heading-copy-link.js +1 -1
  108. package/dist/kernel/components/mdx/components/heading.d.ts +2 -2
  109. package/dist/kernel/components/mdx/components/heading.js +6 -3
  110. package/dist/kernel/components/mdx/components/hr.d.ts +4 -4
  111. package/dist/kernel/components/mdx/components/hr.js +2 -2
  112. package/dist/kernel/components/mdx/components/image-zoom.d.ts +3 -3
  113. package/dist/kernel/components/mdx/components/image-zoom.js +4 -3
  114. package/dist/kernel/components/mdx/components/image.d.ts +2 -2
  115. package/dist/kernel/components/mdx/components/image.js +22 -17
  116. package/dist/kernel/components/mdx/components/inline-code.d.ts +2 -2
  117. package/dist/kernel/components/mdx/components/inline-code.js +1 -1
  118. package/dist/kernel/components/mdx/components/kbd.d.ts +3 -3
  119. package/dist/kernel/components/mdx/components/kbd.js +2 -2
  120. package/dist/kernel/components/mdx/components/link.d.ts +6 -6
  121. package/dist/kernel/components/mdx/components/link.js +2 -2
  122. package/dist/kernel/components/mdx/components/paragraph.d.ts +2 -2
  123. package/dist/kernel/components/mdx/components/paragraph.js +1 -1
  124. package/dist/kernel/components/mdx/components/strikethrough.d.ts +2 -2
  125. package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
  126. package/dist/kernel/components/mdx/components/table.d.ts +7 -7
  127. package/dist/kernel/components/mdx/components/table.js +2 -2
  128. package/dist/kernel/components/mdx/components/task-list.d.ts +3 -3
  129. package/dist/kernel/components/mdx/components/task-list.js +1 -1
  130. package/dist/kernel/components/mdx/components/video-player.d.ts +8 -4
  131. package/dist/kernel/components/mdx/components/video-player.js +6 -2
  132. package/dist/kernel/components/mdx/components/video.d.ts +5 -4
  133. package/dist/kernel/components/mdx/components/video.js +7 -5
  134. package/dist/kernel/components/mdx/error-boundary.d.ts +3 -4
  135. package/dist/kernel/components/mdx/error-boundary.js +2 -2
  136. package/dist/kernel/components/mdx/error-fallback.d.ts +2 -2
  137. package/dist/kernel/components/mdx/error-fallback.js +1 -1
  138. package/dist/kernel/components/mdx/mdx.d.ts +57 -16
  139. package/dist/kernel/components/mdx/mdx.js +232 -35
  140. package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
  141. package/dist/kernel/components/mdx/rehype-heading-ids.js +5 -3
  142. package/dist/kernel/components/mdx/types.d.ts +1 -1
  143. package/dist/kernel/components/next-image.d.ts +12 -0
  144. package/dist/kernel/components/next-image.js +61 -0
  145. package/dist/kernel/components/ui/accordion.d.ts +7 -7
  146. package/dist/kernel/components/ui/accordion.js +1 -1
  147. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -4
  148. package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
  149. package/dist/kernel/components/ui/breadcrumb.d.ts +14 -14
  150. package/dist/kernel/components/ui/breadcrumb.js +4 -4
  151. package/dist/kernel/components/ui/button-group.d.ts +6 -6
  152. package/dist/kernel/components/ui/button-group.js +3 -3
  153. package/dist/kernel/components/ui/button.d.ts +59 -7
  154. package/dist/kernel/components/ui/button.js +43 -39
  155. package/dist/kernel/components/ui/card.d.ts +7 -7
  156. package/dist/kernel/components/ui/card.js +1 -1
  157. package/dist/kernel/components/ui/dialog.d.ts +10 -10
  158. package/dist/kernel/components/ui/dialog.js +1 -1
  159. package/dist/kernel/components/ui/drawer.d.ts +12 -12
  160. package/dist/kernel/components/ui/drawer.js +1 -1
  161. package/dist/kernel/components/ui/input.d.ts +2 -2
  162. package/dist/kernel/components/ui/input.js +1 -1
  163. package/dist/kernel/components/ui/kbd.d.ts +4 -4
  164. package/dist/kernel/components/ui/kbd.js +1 -1
  165. package/dist/kernel/components/ui/link.d.ts +11 -5
  166. package/dist/kernel/components/ui/link.js +2 -2
  167. package/dist/kernel/components/ui/menu.d.ts +22 -22
  168. package/dist/kernel/components/ui/menu.js +1 -1
  169. package/dist/kernel/components/ui/mod-key.d.ts +2 -3
  170. package/dist/kernel/components/ui/mod-key.js +2 -2
  171. package/dist/kernel/components/ui/navigation-menu.d.ts +15 -15
  172. package/dist/kernel/components/ui/navigation-menu.js +1 -1
  173. package/dist/kernel/components/ui/popover.d.ts +11 -11
  174. package/dist/kernel/components/ui/popover.js +1 -1
  175. package/dist/kernel/components/ui/progress.d.ts +7 -7
  176. package/dist/kernel/components/ui/progress.js +1 -1
  177. package/dist/kernel/components/ui/scroll-area.d.ts +9 -10
  178. package/dist/kernel/components/ui/scroll-area.js +1 -1
  179. package/dist/kernel/components/ui/select.d.ts +16 -16
  180. package/dist/kernel/components/ui/select.js +1 -1
  181. package/dist/kernel/components/ui/separator.d.ts +3 -3
  182. package/dist/kernel/components/ui/separator.js +1 -1
  183. package/dist/kernel/components/ui/table.d.ts +7 -7
  184. package/dist/kernel/components/ui/table.js +1 -1
  185. package/dist/kernel/components/ui/tabs.d.ts +12 -12
  186. package/dist/kernel/components/ui/tabs.js +1 -1
  187. package/dist/kernel/components/ui/tag.d.ts +3 -3
  188. package/dist/kernel/components/ui/tag.js +1 -1
  189. package/dist/kernel/components/ui/text.d.ts +4 -4
  190. package/dist/kernel/components/ui/text.js +1 -1
  191. package/dist/kernel/components/ui/toast.d.ts +11 -11
  192. package/dist/kernel/components/ui/toast.js +1 -1
  193. package/dist/kernel/components/ui/tooltip.d.ts +9 -9
  194. package/dist/kernel/components/ui/tooltip.js +1 -1
  195. package/dist/kernel/defaults.registry.d.ts +4 -17
  196. package/dist/kernel/defaults.registry.js +4 -19
  197. package/dist/kernel/routes/agent/markdown.d.ts +7 -0
  198. package/dist/kernel/routes/agent/markdown.js +229 -54
  199. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  200. package/dist/kernel/routes/layouts/group.js +5 -7
  201. package/dist/kernel/routes/metadata/feed.d.ts +1 -2
  202. package/dist/kernel/routes/metadata/feed.js +119 -88
  203. package/dist/kernel/routes/metadata/llms.d.ts +3 -23
  204. package/dist/kernel/routes/metadata/llms.js +2 -103
  205. package/dist/kernel/routes/metadata/og-image.js +1 -1
  206. package/dist/kernel/routes/metadata/robots.d.ts +5 -3
  207. package/dist/kernel/routes/metadata/robots.js +4 -25
  208. package/dist/kernel/routes/metadata/sitemap.d.ts +36 -3
  209. package/dist/kernel/routes/metadata/sitemap.js +277 -49
  210. package/dist/kernel/routes/not-found.d.ts +34 -0
  211. package/dist/kernel/routes/not-found.js +213 -0
  212. package/dist/kernel/routes/pages/group.d.ts +5 -5
  213. package/dist/kernel/routes/pages/group.js +11 -5
  214. package/dist/kernel/routes/pages/leaf.d.ts +38 -6
  215. package/dist/kernel/routes/pages/leaf.js +21 -12
  216. package/dist/kernel/routes/pages/root.d.ts +5 -5
  217. package/dist/kernel/routes/pages/root.js +21 -6
  218. package/dist/keyboard-shortcuts.d.ts +2 -2
  219. package/dist/keyboard-shortcuts.js +1 -1
  220. package/dist/manifest-types-CcVPH_jh.d.ts +83 -0
  221. package/dist/resolvers/manifest-resolver.d.ts +2 -2
  222. package/dist/resolvers/manifest-resolver.js +65 -35
  223. package/dist/route-metadata-og-image-BeKKFHg7.d.ts +58 -0
  224. package/dist/search.d.ts +2 -9
  225. package/dist/search.js +9 -16
  226. package/dist/sidebar-types-CMrMM0Nj.d.ts +105 -0
  227. package/dist/theme-scope.d.ts +2 -2
  228. package/dist/theme-scope.js +1 -1
  229. package/dist/types-BbqmOzLC.d.ts +168 -0
  230. package/dist/types-TjH1ek0X.d.ts +22 -0
  231. package/dist/types-sM2g9nW0.d.ts +12 -0
  232. package/dist/types.d.ts +117 -91
  233. package/dist/utils/heading-ids.js +30 -11
  234. package/dist/utils/toc-selection.d.ts +7 -0
  235. package/dist/utils/toc-selection.js +14 -0
  236. package/dist/validate-local-source-EN2GW4FR.js +16 -0
  237. package/dist/validate-publish-os-source-OEWQDB7B.js +14 -0
  238. package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
  239. package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
  240. package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
  241. package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
  242. package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
  243. package/init/seed/minimal/publish.os/blog/index.tsx +85 -0
  244. package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
  245. package/init/seed/minimal/publish.os/blog/page.tsx +91 -0
  246. package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
  247. package/init/seed/minimal/publish.os/components/blog/frontmatter.ts +41 -0
  248. package/init/seed/minimal/publish.os/docs/content/get-started.mdx +2 -3
  249. package/init/seed/minimal/publish.os/docs/content/groups.mdx +5 -6
  250. package/init/seed/minimal/publish.os/publish.os.config.json +17 -2
  251. package/init/seed/minimal/publish.os/theme.css +3 -3
  252. package/init/seed/minimal/seed.json +12 -4
  253. package/init/seed/scratch/publish.os/docs/content/get-started.mdx +1 -1
  254. package/init/seed/scratch/publish.os/publish.os.config.json +1 -1
  255. package/package.json +48 -23
  256. package/release/app/phosphor/package.json +4 -4
  257. package/release/app/phosphor/pnpm-lock.yaml.template +123 -184
  258. package/release/compiler/package.json +5 -3
  259. package/release/compiler/pnpm-lock.yaml.template +153 -183
  260. package/release/release.json +6 -6
  261. package/dist/button-CtzUJB8u.d.ts +0 -11
  262. package/dist/chunk-535TM4A5.js +0 -1455
  263. package/dist/chunk-B2V22WRT.js +0 -297
  264. package/dist/chunk-NECL5IBJ.js +0 -318
  265. package/dist/chunk-SVYGXXYR.js +0 -36
  266. package/dist/chunk-UF6ATARM.js +0 -1100
  267. package/dist/compose-NN23UJGC.js +0 -13
  268. package/dist/ide-support-ZNW7ODFY.js +0 -15
  269. package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
  270. package/dist/kernel/components/blocks/design-system-preview.js +0 -667
  271. package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
  272. package/dist/kernel/components/blocks/link-playground.js +0 -744
  273. package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
  274. package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
  275. package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
  276. package/dist/kernel/components/ui/theme-toggle.js +0 -53
  277. package/dist/sidebar-types-DKpR27II.d.ts +0 -25
  278. package/dist/types-BzkZty3r.d.ts +0 -147
  279. package/dist/types-CJWRG05y.d.ts +0 -76
  280. package/dist/types-CUtrppxt.d.ts +0 -69
  281. package/dist/validate-local-source-XRL2Y7XE.js +0 -14
  282. package/dist/validate-publish-os-source-DAPZ4QGE.js +0 -12
  283. package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
  284. package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
@@ -1,16 +1,16 @@
1
1
  // src/components/block/navbar/nav-breadcrumb.tsx
2
- import { CollapsibleBreadcrumbTrail } from "@publish.os/nextjs/kernel/components/ui/breadcrumb-trail";
3
- import { jsx } from "react/jsx-runtime";
2
+ import { CollapsibleBreadcrumbTrail } from "@components/ui/breadcrumb-trail";
3
+ import { jsx } from "@publish.os/nextjs/jsx-runtime";
4
4
  function titleFor(node) {
5
- return node.title;
5
+ return node.label ?? "";
6
6
  }
7
7
  function pathFor(node) {
8
- if (node.type === "page") return node.path;
8
+ if (node.type === "page") return node.page.path;
9
+ if (node.type === "group" && node.presentation === "page") return node.route;
9
10
  if (node.type === "link") return node.href;
10
- if (node.type === "folder" || node.type === "section") return node.path;
11
11
  }
12
12
  function rankFor(node) {
13
- return node.type === "page" || node.type === "section" ? 2 : node.type === "folder" ? 1 : 0;
13
+ return node.type === "page" || node.type === "group" && node.presentation === "page" ? 2 : node.type === "folder" || node.type === "group" && node.presentation === "folder" ? 1 : 0;
14
14
  }
15
15
  function findCrumbs(nodes, pathname, parents = []) {
16
16
  let matches = [];
@@ -30,8 +30,12 @@ function findCrumbs(nodes, pathname, parents = []) {
30
30
  })),
31
31
  pathLength: path.length,
32
32
  rank: rankFor(node)
33
- }), node.type === "section" || node.type === "folder") {
34
- let childMatch = findCrumbs(node.children, pathname, nextParents);
33
+ }), node.type === "section" || node.type === "folder" || node.type === "group" || node.type === "view" || node.type === "page" && node.children) {
34
+ let childMatch = findCrumbs(
35
+ node.type === "view" ? node.items : node.type === "page" ? node.children ?? [] : node.children,
36
+ pathname,
37
+ nextParents
38
+ );
35
39
  childMatch && matches.push(childMatch);
36
40
  }
37
41
  }
@@ -39,8 +43,10 @@ function findCrumbs(nodes, pathname, parents = []) {
39
43
  (a, b) => b.rank - a.rank || b.pathLength - a.pathLength || b.crumbs.length - a.crumbs.length
40
44
  )[0] ?? null;
41
45
  }
42
- function groupFallback(tree, pathname) {
43
- let groups = tree.map((group) => ({ group, path: pathFor(group) })).filter(
46
+ function groupFallback(nodes, pathname) {
47
+ let groups = nodes.filter(
48
+ (node) => node.type === "group"
49
+ ).map((group) => ({ group, path: group.route })).filter(
44
50
  (entry) => typeof entry.path == "string"
45
51
  ).sort((a, b) => b.path.length - a.path.length);
46
52
  for (let { group, path } of groups)
@@ -54,7 +60,7 @@ function groupFallback(tree, pathname) {
54
60
  ];
55
61
  return [];
56
62
  }
57
- function buildCrumbs(site, tree, pathname) {
63
+ function buildCrumbs(site, navigation, pathname) {
58
64
  let root = {
59
65
  title: site.name,
60
66
  path: "/",
@@ -62,10 +68,10 @@ function buildCrumbs(site, tree, pathname) {
62
68
  current: pathname === "/"
63
69
  };
64
70
  if (pathname === "/") return [root];
65
- let treeMatch = findCrumbs(tree, pathname);
71
+ let treeMatch = findCrumbs(navigation.items, pathname);
66
72
  return treeMatch ? [root, ...treeMatch.crumbs] : [
67
73
  root,
68
- ...groupFallback(tree, pathname).map((crumb) => ({
74
+ ...groupFallback(navigation.items, pathname).map((crumb) => ({
69
75
  ...crumb,
70
76
  current: !1
71
77
  }))
@@ -76,9 +82,9 @@ function NavBreadcrumb({
76
82
  showRoot = !0,
77
83
  size = "sm",
78
84
  site,
79
- tree
85
+ navigation
80
86
  }) {
81
- let crumbs = buildCrumbs(site, tree, currentPath), items = (showRoot ? crumbs : crumbs.slice(1)).map((crumb) => ({
87
+ let crumbs = buildCrumbs(site, navigation, currentPath), items = (showRoot ? crumbs : crumbs.slice(1)).map((crumb) => ({
82
88
  current: crumb.current,
83
89
  href: crumb.href,
84
90
  title: crumb.title
@@ -1,16 +1,17 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
  import { LogoBlockLogo, LogoBlockAsset } from './logo-block.js';
3
- import { S as SiteData, T as TreeNode } from '../../../types-CUtrppxt.js';
3
+ import { S as SiteData } from '../../../types-TjH1ek0X.js';
4
+ import { R as ResolvedNavigation } from '../../../manifest-types-CcVPH_jh.js';
4
5
 
5
6
  type NavbarProps = {
6
7
  logo?: NavbarLogo;
7
8
  site?: SiteData;
8
9
  siteTitle?: string;
9
- tree: TreeNode[];
10
+ navigation: ResolvedNavigation;
10
11
  showThemeToggle?: boolean;
11
12
  };
12
13
  type NavbarLogoAsset = LogoBlockAsset;
13
14
  type NavbarLogo = LogoBlockLogo;
14
- declare function Navbar({ logo, showThemeToggle, site, siteTitle, tree, }: NavbarProps): react_jsx_runtime.JSX.Element;
15
+ declare function Navbar({ logo, showThemeToggle, site, siteTitle, navigation, }: NavbarProps): react.JSX.Element;
15
16
 
16
17
  export { Navbar, type NavbarLogo, type NavbarLogoAsset };
@@ -3,11 +3,11 @@
3
3
  // src/components/block/navbar/navbar.tsx
4
4
  import {
5
5
  LogoBlock
6
- } from "@publish.os/nextjs/kernel/components/blocks/logo-block";
7
- import { Search } from "@publish.os/nextjs/kernel/components/blocks/search";
8
- import { Sidebar } from "@publish.os/nextjs/kernel/components/blocks/sidebar";
9
- import { ThemeToggle } from "@publish.os/nextjs/kernel/components/blocks/theme-toggle";
10
- import { Button as Button2 } from "@publish.os/nextjs/kernel/components/ui/button";
6
+ } from "@components/blocks/logo-block";
7
+ import { Search } from "@components/blocks/search";
8
+ import { Sidebar } from "@components/blocks/sidebar";
9
+ import { ThemeToggle } from "@components/blocks/theme-toggle";
10
+ import { Button as Button2 } from "@components/ui/button";
11
11
  import {
12
12
  Drawer,
13
13
  DrawerClose,
@@ -17,9 +17,9 @@ import {
17
17
  DrawerTitle,
18
18
  DrawerTrigger,
19
19
  DrawerViewport
20
- } from "@publish.os/nextjs/kernel/components/ui/drawer";
21
- import { Link as Link3 } from "@publish.os/nextjs/kernel/components/ui/link";
22
- import { ScrollArea as ScrollArea2 } from "@publish.os/nextjs/kernel/components/ui/scroll-area";
20
+ } from "@components/ui/drawer";
21
+ import { Link as Link3 } from "@components/ui/link";
22
+ import { ScrollArea as ScrollArea2 } from "@components/ui/scroll-area";
23
23
  import {
24
24
  ArrowRightIcon,
25
25
  CaretLeftIcon,
@@ -32,8 +32,8 @@ import { usePathname } from "next/navigation";
32
32
  import { useEffect, useRef as useRef2, useState as useState2 } from "react";
33
33
 
34
34
  // src/components/block/navbar/group-navigation.tsx
35
- import { Button } from "@publish.os/nextjs/kernel/components/ui/button";
36
- import { Link } from "@publish.os/nextjs/kernel/components/ui/link";
35
+ import { Button } from "@components/ui/button";
36
+ import { Link } from "@components/ui/link";
37
37
  import {
38
38
  Menu,
39
39
  MenuLinkItem,
@@ -41,21 +41,28 @@ import {
41
41
  MenuPortal,
42
42
  MenuPositioner,
43
43
  MenuTrigger
44
- } from "@publish.os/nextjs/kernel/components/ui/menu";
44
+ } from "@components/ui/menu";
45
45
  import { CaretDownIcon } from "@phosphor-icons/react/ssr";
46
46
  import NextLink from "next/link";
47
47
  import { useLayoutEffect, useRef, useState } from "react";
48
- import { jsx, jsxs } from "react/jsx-runtime";
48
+
49
+ // src/components/block/navbar/navigation-groups.ts
50
+ function navigationGroups(nodes) {
51
+ return nodes.flatMap((node) => node.type === "group" ? [node, ...navigationGroups(node.children)] : node.type === "section" || node.type === "folder" ? navigationGroups(node.children) : node.type === "view" ? navigationGroups(node.items) : node.type === "page" && node.children ? navigationGroups(node.children) : []);
52
+ }
53
+
54
+ // src/components/block/navbar/group-navigation.tsx
55
+ import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
49
56
  function GroupNavigation({
50
57
  currentPath,
51
- tree
58
+ navigation
52
59
  }) {
53
- let groups = tree.filter(
54
- (node) => node.type === "section" && typeof node.path == "string" && typeof node.group == "string"
60
+ let groups = navigationGroups(navigation.items).filter(
61
+ (group) => group.groupKey !== navigation.rootGroup && group.presentation === "page"
55
62
  ), activeGroup = groups.filter(
56
- ({ path }) => currentPath === path || currentPath.startsWith(path === "/" ? "/" : `${path}/`)
63
+ ({ route }) => currentPath === route || currentPath.startsWith(route === "/" ? "/" : `${route}/`)
57
64
  ).reduce(
58
- (active, group) => !active || group.path.length > active.path.length ? group : active,
65
+ (active, group) => !active || group.route.length > active.route.length ? group : active,
59
66
  void 0
60
67
  ), navRef = useRef(null), linksRef = useRef(null), [overflow, setOverflow] = useState(!1), hasGroups = groups.length > 1;
61
68
  if (useLayoutEffect(() => {
@@ -67,7 +74,7 @@ function GroupNavigation({
67
74
  }, observer = new win.ResizeObserver(measure);
68
75
  return observer.observe(nav), observer.observe(links), measure(), () => observer.disconnect();
69
76
  }, [hasGroups]), !hasGroups) return null;
70
- let isActive = (path) => activeGroup?.path === path;
77
+ let isActive = (path) => activeGroup?.route === path;
71
78
  return /* @__PURE__ */ jsxs("div", { className: "hidden min-w-0 flex-1 items-center gap-4 md:flex", children: [
72
79
  /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "h-4 w-px shrink-0 bg-stroke-3" }),
73
80
  /* @__PURE__ */ jsxs(
@@ -84,19 +91,19 @@ function GroupNavigation({
84
91
  className: `flex w-max items-center gap-1 ${overflow ? "pointer-events-none invisible absolute top-0" : ""}`,
85
92
  inert: overflow || void 0,
86
93
  ref: linksRef,
87
- children: groups.map((group) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
94
+ children: groups.map((group) => /* @__PURE__ */ jsx("li", { children: group.href ? /* @__PURE__ */ jsx(
88
95
  Link,
89
96
  {
90
- active: isActive(group.path),
91
- "aria-current": isActive(group.path) ? "location" : void 0,
92
- className: "data-[state=path-active]:text-foreground-1 pointer-coarse:min-h-11 pointer-coarse:min-w-11",
93
- href: group.href ?? group.path,
97
+ active: isActive(group.route),
98
+ "aria-current": isActive(group.route) ? "location" : void 0,
99
+ className: "pointer-coarse:min-h-11 pointer-coarse:min-w-11",
100
+ href: group.href,
94
101
  size: "xs",
95
102
  target: "_self",
96
103
  variant: "button.ghost",
97
- children: group.title
104
+ children: group.label
98
105
  }
99
- ) }, group.id))
106
+ ) : /* @__PURE__ */ jsx("span", { className: "px-2 text-xs text-foreground-3", children: group.label }) }, group.id))
100
107
  }
101
108
  ),
102
109
  overflow ? /* @__PURE__ */ jsxs(Menu, { children: [
@@ -119,10 +126,10 @@ function GroupNavigation({
119
126
  /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { align: "start", children: /* @__PURE__ */ jsx(MenuPopup, { className: "max-w-[min(24rem,calc(100vw-2rem))]", children: groups.map((group) => /* @__PURE__ */ jsx(
120
127
  MenuLinkItem,
121
128
  {
122
- "aria-current": isActive(group.path) ? "location" : void 0,
129
+ "aria-current": isActive(group.route) ? "location" : void 0,
123
130
  className: "whitespace-normal break-words pointer-coarse:min-h-11",
124
- render: /* @__PURE__ */ jsx(NextLink, { href: group.href ?? group.path }),
125
- children: group.title
131
+ render: /* @__PURE__ */ jsx(NextLink, { href: group.href ?? group.route }),
132
+ children: group.label
126
133
  },
127
134
  group.id
128
135
  )) }) }) })
@@ -134,15 +141,15 @@ function GroupNavigation({
134
141
  }
135
142
 
136
143
  // src/components/block/navbar/mobile-navigation-tree.tsx
137
- import { Link as Link2 } from "@publish.os/nextjs/kernel/components/ui/link";
138
- import { ScrollArea } from "@publish.os/nextjs/kernel/components/ui/scroll-area";
139
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
144
+ import { Link as Link2 } from "@components/ui/link";
145
+ import { ScrollArea } from "@components/ui/scroll-area";
146
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "@publish.os/nextjs/jsx-runtime";
140
147
  function MobileNavigationTree({
141
148
  currentPath,
142
149
  indexCurrentPath,
143
150
  indexPath,
144
151
  title,
145
- tree
152
+ navigation
146
153
  }) {
147
154
  return /* @__PURE__ */ jsx2(
148
155
  ScrollArea,
@@ -151,7 +158,7 @@ function MobileNavigationTree({
151
158
  viewportClassName: "overscroll-contain",
152
159
  children: /* @__PURE__ */ jsxs2("nav", { "aria-label": `${title} pages`, className: "px-4 py-5", children: [
153
160
  /* @__PURE__ */ jsx2("p", { className: "mb-3 wrap-break-word px-3 text-base leading-6 text-foreground-3", children: title }),
154
- tree.length > 0 ? /* @__PURE__ */ jsx2(PageList, { currentPath, tree }) : /* @__PURE__ */ jsx2(
161
+ navigation.items.length > 0 ? /* @__PURE__ */ jsx2(PageList, { currentPath, navigation }) : indexPath ? /* @__PURE__ */ jsx2(
155
162
  PageLink,
156
163
  {
157
164
  currentPath,
@@ -160,34 +167,44 @@ function MobileNavigationTree({
160
167
  sameTab: !0,
161
168
  title: "Overview"
162
169
  }
163
- )
170
+ ) : null
164
171
  ] })
165
172
  }
166
173
  );
167
174
  }
168
175
  function PageList({
169
176
  currentPath,
170
- tree
177
+ navigation
171
178
  }) {
179
+ let tree = navigation.items;
172
180
  return /* @__PURE__ */ jsx2("ul", { className: "space-y-1", children: tree.map((node) => /* @__PURE__ */ jsx2(
173
181
  "li",
174
182
  {
175
- className: node.type === "section" || node.type === "folder" ? "pt-5 first:pt-0" : void 0,
176
- children: node.type === "page" || node.type === "link" ? /* @__PURE__ */ jsx2(
183
+ className: node.type === "section" || node.type === "folder" || node.type === "group" ? "pt-5 first:pt-0" : void 0,
184
+ children: node.type === "page" || node.type === "link" || node.type === "group" && node.presentation === "page" ? /* @__PURE__ */ jsx2(
177
185
  PageLink,
178
186
  {
179
187
  currentPath,
180
- href: node.type === "page" ? node.href ?? node.path : node.href,
181
- activePath: node.type === "page" ? node.path : void 0,
182
- sameTab: node.type === "page",
183
- title: node.title
188
+ href: node.type === "group" ? node.href ?? node.route : node.href,
189
+ activePath: node.type === "page" ? node.page.path : node.type === "group" ? node.route : void 0,
190
+ sameTab: node.type !== "link",
191
+ title: node.label
184
192
  }
185
- ) : /* @__PURE__ */ jsxs2(Fragment, { children: [
186
- /* @__PURE__ */ jsx2("p", { className: "mb-2 wrap-break-word px-3 text-base leading-6 text-foreground-3", children: node.title }),
187
- /* @__PURE__ */ jsx2(PageList, { currentPath, tree: node.children })
193
+ ) : node.type === "switch-view" ? null : /* @__PURE__ */ jsxs2(Fragment, { children: [
194
+ /* @__PURE__ */ jsx2("p", { className: "mb-2 wrap-break-word px-3 text-base leading-6 text-foreground-3", children: node.label }),
195
+ /* @__PURE__ */ jsx2(
196
+ PageList,
197
+ {
198
+ currentPath,
199
+ navigation: {
200
+ rootGroup: navigation.rootGroup,
201
+ items: "items" in node ? node.items : node.children
202
+ }
203
+ }
204
+ )
188
205
  ] })
189
206
  },
190
- node.type === "page" ? node.fileID : node.id
207
+ node.id
191
208
  )) });
192
209
  }
193
210
  function PageLink({
@@ -212,19 +229,19 @@ function PageLink({
212
229
  }
213
230
 
214
231
  // src/components/block/navbar/navbar.tsx
215
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
232
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "@publish.os/nextjs/jsx-runtime";
216
233
  function Navbar({
217
234
  logo,
218
235
  showThemeToggle = !0,
219
236
  site,
220
237
  siteTitle,
221
- tree
238
+ navigation
222
239
  }) {
223
240
  let pathname = usePathname() || "/", headerSite = site ?? { name: siteTitle ?? "Site" };
224
241
  return /* @__PURE__ */ jsx3("header", { className: "sticky top-0 z-nav border-b border-stroke-3 bg-surface-2 [anchor-name:--global-navbar]", children: /* @__PURE__ */ jsxs3(NavbarFrame, { children: [
225
242
  /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
226
243
  /* @__PURE__ */ jsx3(HomeLink, { logo, siteName: headerSite.name }),
227
- /* @__PURE__ */ jsx3(GroupNavigation, { currentPath: pathname, tree })
244
+ /* @__PURE__ */ jsx3(GroupNavigation, { currentPath: pathname, navigation })
228
245
  ] }),
229
246
  /* @__PURE__ */ jsxs3("div", { className: "flex shrink-0 items-center gap-1 md:gap-2", children: [
230
247
  /* @__PURE__ */ jsxs3(Search.Root, { children: [
@@ -265,7 +282,7 @@ function Navbar({
265
282
  logo,
266
283
  showThemeToggle,
267
284
  siteName: headerSite.name,
268
- tree
285
+ navigation
269
286
  },
270
287
  pathname
271
288
  )
@@ -293,10 +310,10 @@ function MobileNavigation({
293
310
  logo,
294
311
  showThemeToggle,
295
312
  siteName,
296
- tree
313
+ navigation
297
314
  }) {
298
- let [open, setOpen] = useState2(!1), [selectedGroupId, setSelectedGroupId] = useState2(null), triggerRef = useRef2(null), closeRef = useRef2(null), backRef = useRef2(null), returnGroupIdRef = useRef2(null), groupButtonRefs = useRef2(/* @__PURE__ */ new Map()), groups = tree.filter(
299
- (node) => node.type === "section" && typeof node.path == "string" && typeof node.group == "string"
315
+ let [open, setOpen] = useState2(!1), [selectedGroupId, setSelectedGroupId] = useState2(null), triggerRef = useRef2(null), closeRef = useRef2(null), backRef = useRef2(null), returnGroupIdRef = useRef2(null), groupButtonRefs = useRef2(/* @__PURE__ */ new Map()), groups = navigationGroups(navigation.items).filter(
316
+ (group) => group.groupKey !== navigation.rootGroup
300
317
  ), selectedGroup = groups.find((group) => group.id === selectedGroupId), changeOpen = (nextOpen) => {
301
318
  setOpen(nextOpen), nextOpen || (setSelectedGroupId(null), returnGroupIdRef.current = null);
302
319
  };
@@ -333,7 +350,7 @@ function MobileNavigation({
333
350
  },
334
351
  children: [
335
352
  /* @__PURE__ */ jsxs3(DrawerTitle, { className: "sr-only", children: [
336
- selectedGroup ? selectedGroup.title : siteName,
353
+ selectedGroup ? selectedGroup.label : siteName,
337
354
  " navigation"
338
355
  ] }),
339
356
  /* @__PURE__ */ jsx3(DrawerDescription, { className: "sr-only", children: "Browse pages and site controls." }),
@@ -373,10 +390,13 @@ function MobileNavigation({
373
390
  MobileNavigationTree,
374
391
  {
375
392
  currentPath,
376
- indexPath: selectedGroup.href ?? selectedGroup.path,
377
- indexCurrentPath: selectedGroup.path,
378
- title: selectedGroup.title,
379
- tree: selectedGroup.children
393
+ indexPath: selectedGroup.presentation === "page" ? selectedGroup.href : void 0,
394
+ indexCurrentPath: selectedGroup.route,
395
+ title: selectedGroup.label,
396
+ navigation: {
397
+ rootGroup: selectedGroup.groupKey,
398
+ items: selectedGroup.children
399
+ }
380
400
  }
381
401
  )
382
402
  ] }) : groups.length > 0 ? /* @__PURE__ */ jsx3(
@@ -397,7 +417,7 @@ function MobileNavigation({
397
417
  rightIcon: /* @__PURE__ */ jsx3(CaretRightIcon, { "aria-hidden": "true" }),
398
418
  size: "lg",
399
419
  variant: "ghost",
400
- children: /* @__PURE__ */ jsx3("span", { className: "min-w-0 wrap-break-word", children: group.title })
420
+ children: /* @__PURE__ */ jsx3("span", { className: "min-w-0 wrap-break-word", children: group.label })
401
421
  }
402
422
  ) }, group.id)) }) })
403
423
  }
@@ -406,7 +426,7 @@ function MobileNavigation({
406
426
  {
407
427
  className: "w-full min-w-0 max-w-none",
408
428
  currentPath,
409
- tree
429
+ navigation
410
430
  }
411
431
  ) }),
412
432
  selectedGroup ? null : /* @__PURE__ */ jsxs3("div", { className: "flex shrink-0 flex-col gap-4 border-t border-stroke-3 px-4 py-4", children: [
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
 
3
3
  declare const navigationProgressConfig: {
4
4
  initialProgress: number;
@@ -11,6 +11,6 @@ declare const navigationProgressConfig: {
11
11
  settleDelay: number;
12
12
  timeout: number;
13
13
  };
14
- declare function NavigationProgressBar(): react_jsx_runtime.JSX.Element;
14
+ declare function NavigationProgressBar(): react.JSX.Element;
15
15
 
16
16
  export { NavigationProgressBar, navigationProgressConfig };
@@ -5,11 +5,11 @@ import {
5
5
  Progress,
6
6
  ProgressIndicator,
7
7
  ProgressTrack
8
- } from "@publish.os/nextjs/kernel/components/ui/progress";
8
+ } from "@components/ui/progress";
9
9
  import { cn } from "@publish.os/nextjs/utils/cn";
10
10
  import { usePathname, useSearchParams } from "next/navigation";
11
11
  import { Suspense, useCallback, useEffect, useRef, useState } from "react";
12
- import { jsx } from "react/jsx-runtime";
12
+ import { jsx } from "@publish.os/nextjs/jsx-runtime";
13
13
  var navigationProgressConfig = {
14
14
  initialProgress: 0,
15
15
  targetProgress: 98,
@@ -1,11 +1,11 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { T as TreeNode } from '../../../types-CUtrppxt.js';
1
+ import * as react from 'react';
2
+ import { R as ResolvedNavigation } from '../../../manifest-types-CcVPH_jh.js';
3
3
 
4
4
  type NextPrevProps = {
5
5
  className?: string;
6
6
  currentPath?: string;
7
- tree: TreeNode[];
7
+ navigation: ResolvedNavigation;
8
8
  };
9
- declare function NextPrev({ className, currentPath, tree }: NextPrevProps): react_jsx_runtime.JSX.Element | null;
9
+ declare function NextPrev({ className, currentPath, navigation, }: NextPrevProps): react.JSX.Element | null;
10
10
 
11
11
  export { NextPrev, type NextPrevProps };
@@ -4,12 +4,31 @@ import { cn } from "@publish.os/nextjs/utils/cn";
4
4
  import NextLink from "next/link";
5
5
 
6
6
  // src/components/block/page-navigation/page-nodes.ts
7
- function pageNodes(nodes) {
8
- return nodes.flatMap((node) => node.type === "page" ? [node] : node.type === "section" || node.type === "folder" ? pageNodes(node.children) : []);
7
+ function selectNavigationPages(nodes) {
8
+ return nodes.flatMap((node) => node.type === "page" ? [
9
+ {
10
+ id: node.id,
11
+ label: node.label,
12
+ href: node.href,
13
+ path: node.page.path,
14
+ page: node.page
15
+ }
16
+ ] : node.type === "group" ? [
17
+ ...node.presentation === "page" ? [
18
+ {
19
+ id: node.id,
20
+ label: node.label,
21
+ href: node.href ?? node.route,
22
+ path: node.route,
23
+ group: node
24
+ }
25
+ ] : [],
26
+ ...selectNavigationPages(node.children)
27
+ ] : node.type === "section" || node.type === "folder" ? selectNavigationPages(node.children) : node.type === "view" ? selectNavigationPages(node.items) : []);
9
28
  }
10
29
 
11
30
  // src/components/block/page-navigation/next-prev.tsx
12
- import { jsx, jsxs } from "react/jsx-runtime";
31
+ import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
13
32
  function DirectionIcon({ direction }) {
14
33
  return /* @__PURE__ */ jsx("span", { className: "shrink-0 text-foreground-3 transition-colors duration-200 group-hover/next-prev:text-foreground-2", children: direction === "previous" ? /* @__PURE__ */ jsx(CaretLeftIcon, { "aria-hidden": "true", size: 14 }) : /* @__PURE__ */ jsx(CaretRightIcon, { "aria-hidden": "true", size: 14 }) });
15
34
  }
@@ -25,7 +44,7 @@ function NavigationCard({
25
44
  "group/next-prev grid min-h-24 w-full min-w-0 overflow-hidden rounded-card border border-stroke-3 bg-surface-1 p-px text-left text-foreground-1 no-underline shadow-xs transition-[border-color,box-shadow] duration-200 hover:text-foreground-1 hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-stroke **:no-underline!",
26
45
  isNext && "md:text-right"
27
46
  ),
28
- href: page.href ?? page.path,
47
+ href: page.href,
29
48
  children: /* @__PURE__ */ jsxs(
30
49
  "span",
31
50
  {
@@ -48,15 +67,19 @@ function NavigationCard({
48
67
  ]
49
68
  }
50
69
  ),
51
- /* @__PURE__ */ jsx("span", { className: "line-clamp-2 text-sm font-medium leading-6 text-foreground-1 transition-colors duration-200", children: page.title })
70
+ /* @__PURE__ */ jsx("span", { className: "line-clamp-2 text-sm font-medium leading-6 text-foreground-1 transition-colors duration-200", children: page.label })
52
71
  ]
53
72
  }
54
73
  )
55
74
  }
56
75
  );
57
76
  }
58
- function NextPrev({ className, currentPath, tree }) {
59
- let pages = pageNodes(tree), index = pages.findIndex((page) => page.path === currentPath), previous = index > 0 ? pages[index - 1] : null, next = index >= 0 ? pages[index + 1] : null, hasBoth = !!(previous && next);
77
+ function NextPrev({
78
+ className,
79
+ currentPath,
80
+ navigation
81
+ }) {
82
+ let pages = selectNavigationPages(navigation.items), index = pages.findIndex((page) => page.path === currentPath), previous = index > 0 ? pages[index - 1] : null, next = index >= 0 ? pages[index + 1] : null, hasBoth = !!(previous && next);
60
83
  return !previous && !next ? null : /* @__PURE__ */ jsx("nav", { "aria-label": "Previous and next pages", className, children: /* @__PURE__ */ jsxs("div", { className: cn("grid gap-4 pt-6", hasBoth && "md:grid-cols-2"), children: [
61
84
  previous ? /* @__PURE__ */ jsx(NavigationCard, { direction: "previous", page: previous }) : null,
62
85
  next ? /* @__PURE__ */ jsx(NavigationCard, { direction: "next", page: next }) : null
@@ -1,11 +1,11 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { T as TreeNode } from '../../../types-CUtrppxt.js';
1
+ import * as react from 'react';
2
+ import { R as ResolvedNavigation } from '../../../manifest-types-CcVPH_jh.js';
3
3
 
4
4
  type PageListProps = {
5
- tree: TreeNode[];
5
+ navigation: ResolvedNavigation;
6
6
  currentPath?: string;
7
7
  className?: string;
8
8
  };
9
- declare function PageList({ tree, currentPath, className }: PageListProps): react_jsx_runtime.JSX.Element | null;
9
+ declare function PageList({ navigation, currentPath, className, }: PageListProps): react.JSX.Element | null;
10
10
 
11
11
  export { PageList };
@@ -1,15 +1,38 @@
1
1
  // src/components/block/page-navigation/page-list.tsx
2
- import { Link } from "@publish.os/nextjs/kernel/components/ui/link";
2
+ import { Link } from "@components/ui/link";
3
3
 
4
4
  // src/components/block/page-navigation/page-nodes.ts
5
- function pageNodes(nodes) {
6
- return nodes.flatMap((node) => node.type === "page" ? [node] : node.type === "section" || node.type === "folder" ? pageNodes(node.children) : []);
5
+ function selectNavigationPages(nodes) {
6
+ return nodes.flatMap((node) => node.type === "page" ? [
7
+ {
8
+ id: node.id,
9
+ label: node.label,
10
+ href: node.href,
11
+ path: node.page.path,
12
+ page: node.page
13
+ }
14
+ ] : node.type === "group" ? [
15
+ ...node.presentation === "page" ? [
16
+ {
17
+ id: node.id,
18
+ label: node.label,
19
+ href: node.href ?? node.route,
20
+ path: node.route,
21
+ group: node
22
+ }
23
+ ] : [],
24
+ ...selectNavigationPages(node.children)
25
+ ] : node.type === "section" || node.type === "folder" ? selectNavigationPages(node.children) : node.type === "view" ? selectNavigationPages(node.items) : []);
7
26
  }
8
27
 
9
28
  // src/components/block/page-navigation/page-list.tsx
10
- import { jsx } from "react/jsx-runtime";
11
- function PageList({ tree, currentPath, className }) {
12
- let pages = pageNodes(tree);
29
+ import { jsx } from "@publish.os/nextjs/jsx-runtime";
30
+ function PageList({
31
+ navigation,
32
+ currentPath,
33
+ className
34
+ }) {
35
+ let pages = selectNavigationPages(navigation.items);
13
36
  return pages.length === 0 ? null : /* @__PURE__ */ jsx("nav", { "aria-label": "Pages in this group", className, children: /* @__PURE__ */ jsx("ul", { className: "space-y-2 text-sm", children: pages.map((page) => {
14
37
  let active = page.path === currentPath;
15
38
  return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
@@ -17,12 +40,12 @@ function PageList({ tree, currentPath, className }) {
17
40
  {
18
41
  active,
19
42
  color: active ? "accent" : "default",
20
- href: page.href ?? page.path,
43
+ href: page.href,
21
44
  size: "sm",
22
45
  target: "_self",
23
- children: page.title
46
+ children: page.label
24
47
  }
25
- ) }, `${page.group}:${page.fileID}`);
48
+ ) }, page.id);
26
49
  }) }) });
27
50
  }
28
51
  export {