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

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 (201) hide show
  1. package/compiler-assets/nextjs/defaults/app/globals.css +1 -0
  2. package/compiler-assets/nextjs/defaults/group/index.tsx +50 -0
  3. package/compiler-assets/nextjs/defaults/group/layout.tsx +7 -3
  4. package/compiler-assets/nextjs/defaults/group/page.tsx +35 -43
  5. package/compiler-assets/nextjs/defaults/project/next.config.mjs +22 -11
  6. package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +1 -4
  7. package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
  8. package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
  9. package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
  10. package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
  11. package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
  12. package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
  13. package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
  14. package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
  15. package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
  16. package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
  17. package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
  18. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
  19. package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
  20. package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
  21. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +16 -2
  22. package/compiler-assets/nextjs/shims/global-layout.tsx +11 -43
  23. package/compiler-assets/nextjs/shims/proxy.ts +21 -9
  24. package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
  25. package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
  26. package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +34 -0
  27. package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
  28. package/compiler-assets/nextjs/shims/site-mdx-components.tsx +100 -0
  29. package/compiler-assets/nextjs/shims/site-mdx.tsx +12 -0
  30. package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
  31. package/dist/build-operation-2JAYBSKF.js +83 -0
  32. package/dist/button-CtzUJB8u.d.ts +11 -0
  33. package/dist/{button-CFdx-ohV.d.ts → button-c3WGnxIj.d.ts} +3 -3
  34. package/dist/chunk-535TM4A5.js +1455 -0
  35. package/dist/chunk-726GV2NF.js +2344 -0
  36. package/dist/chunk-7OGTPSKI.js +156 -0
  37. package/dist/chunk-AI2UULNX.js +9 -0
  38. package/dist/chunk-B2V22WRT.js +297 -0
  39. package/dist/chunk-DLDFHU7Y.js +191 -0
  40. package/dist/chunk-DWA3ZRGW.js +142 -0
  41. package/dist/chunk-GGKFQ3MA.js +621 -0
  42. package/dist/chunk-H6XILMZX.js +6154 -0
  43. package/dist/chunk-NECL5IBJ.js +318 -0
  44. package/dist/chunk-SVYGXXYR.js +36 -0
  45. package/dist/chunk-UF6ATARM.js +1100 -0
  46. package/dist/chunk-VO2I7MTM.js +56 -0
  47. package/dist/chunk-WDY4IK6Z.js +128 -0
  48. package/dist/chunk-WKTEO6RS.js +586 -0
  49. package/dist/chunk-YLTOLYWM.js +92 -0
  50. package/dist/compiler.d.ts +41 -7
  51. package/dist/compiler.js +48 -13143
  52. package/dist/compose-NN23UJGC.js +13 -0
  53. package/dist/config/createNextConfig.js +13 -0
  54. package/dist/dev-operation-TZDVJCN7.js +1055 -0
  55. package/dist/framework-selection-X4U6Y6QC.js +10 -0
  56. package/dist/ide-support-ZNW7ODFY.js +15 -0
  57. package/dist/index.d.ts +15 -3
  58. package/dist/kernel/components/blocks/AgentActions.js +71 -61
  59. package/dist/kernel/components/blocks/design-system-preview.d.ts +1 -1
  60. package/dist/kernel/components/blocks/design-system-preview.js +32 -13
  61. package/dist/kernel/components/blocks/link-playground.js +2 -2
  62. package/dist/kernel/components/blocks/logo-block.js +2 -2
  63. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
  64. package/dist/kernel/components/blocks/nav-breadcrumb.js +20 -5
  65. package/dist/kernel/components/blocks/navbar.d.ts +2 -2
  66. package/dist/kernel/components/blocks/navbar.js +401 -60
  67. package/dist/kernel/components/blocks/navigation-progress-playground.js +4 -4
  68. package/dist/kernel/components/blocks/navigation-progress.js +4 -1
  69. package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
  70. package/dist/kernel/components/blocks/next-prev.js +11 -23
  71. package/dist/kernel/components/blocks/page-list.d.ts +1 -1
  72. package/dist/kernel/components/blocks/page-list.js +5 -4
  73. package/dist/kernel/components/blocks/search.d.ts +83 -58
  74. package/dist/kernel/components/blocks/search.js +553 -426
  75. package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
  76. package/dist/kernel/components/blocks/sidebar-node.js +11 -9
  77. package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
  78. package/dist/kernel/components/blocks/sidebar.js +18 -11
  79. package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
  80. package/dist/kernel/components/blocks/theme-toggle.js +48 -2
  81. package/dist/kernel/components/blocks/toc.js +3 -3
  82. package/dist/kernel/components/mdx/components/blockquote.js +1 -1
  83. package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
  84. package/dist/kernel/components/mdx/components/callout.js +66 -35
  85. package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
  86. package/dist/kernel/components/mdx/components/code-block.js +106 -5
  87. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
  88. package/dist/kernel/components/mdx/components/copy-code-button.js +60 -0
  89. package/dist/kernel/components/mdx/components/figure-caption.js +1 -1
  90. package/dist/kernel/components/mdx/components/figure.js +1 -1
  91. package/dist/kernel/components/mdx/components/heading-copy-link.js +3 -3
  92. package/dist/kernel/components/mdx/components/image-zoom.d.ts +2 -2
  93. package/dist/kernel/components/mdx/components/image-zoom.js +1 -1
  94. package/dist/kernel/components/mdx/components/image.js +77 -56
  95. package/dist/kernel/components/mdx/components/inline-code.js +1 -1
  96. package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
  97. package/dist/kernel/components/mdx/components/kbd.js +3 -2
  98. package/dist/kernel/components/mdx/components/link.d.ts +35 -4
  99. package/dist/kernel/components/mdx/components/link.js +1 -1
  100. package/dist/kernel/components/mdx/components/paragraph.js +1 -4
  101. package/dist/kernel/components/mdx/components/task-list.js +1 -1
  102. package/dist/kernel/components/mdx/components/video-player.js +2 -2
  103. package/dist/kernel/components/mdx/components/video.js +1 -1
  104. package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
  105. package/dist/kernel/components/mdx/mdx.d.ts +12 -8
  106. package/dist/kernel/components/mdx/mdx.js +115 -39
  107. package/dist/kernel/components/mdx/rehype-heading-ids.js +1 -1
  108. package/dist/kernel/components/mdx/types.d.ts +1 -1
  109. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +6 -23
  110. package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
  111. package/dist/kernel/components/ui/breadcrumb.js +6 -4
  112. package/dist/kernel/components/ui/button-group.d.ts +1 -1
  113. package/dist/kernel/components/ui/button-group.js +5 -4
  114. package/dist/kernel/components/ui/button.d.ts +2 -2
  115. package/dist/kernel/components/ui/button.js +6 -6
  116. package/dist/kernel/components/ui/card.d.ts +2 -2
  117. package/dist/kernel/components/ui/drawer.d.ts +3 -1
  118. package/dist/kernel/components/ui/drawer.js +5 -1
  119. package/dist/kernel/components/ui/input.d.ts +4 -4
  120. package/dist/kernel/components/ui/kbd.d.ts +1 -1
  121. package/dist/kernel/components/ui/kbd.js +9 -16
  122. package/dist/kernel/components/ui/link.d.ts +5 -3
  123. package/dist/kernel/components/ui/link.js +10 -9
  124. package/dist/kernel/components/ui/menu.js +5 -5
  125. package/dist/kernel/components/ui/mod-key.d.ts +10 -0
  126. package/dist/kernel/components/ui/mod-key.js +36 -0
  127. package/dist/kernel/components/ui/navigation-menu.js +2 -2
  128. package/dist/kernel/components/ui/progress.js +1 -1
  129. package/dist/kernel/components/ui/scroll-area.d.ts +8 -8
  130. package/dist/kernel/components/ui/scroll-area.js +4 -4
  131. package/dist/kernel/components/ui/select.js +7 -10
  132. package/dist/kernel/components/ui/text.d.ts +2 -2
  133. package/dist/kernel/components/ui/theme-toggle.d.ts +3 -3
  134. package/dist/kernel/components/ui/theme-toggle.js +4 -9
  135. package/dist/kernel/defaults.registry.d.ts +9 -9
  136. package/dist/kernel/defaults.registry.js +9 -9
  137. package/dist/kernel/routes/agent/markdown.d.ts +0 -1
  138. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  139. package/dist/kernel/routes/metadata/feed.d.ts +1 -1
  140. package/dist/kernel/routes/metadata/feed.js +13 -9
  141. package/dist/kernel/routes/metadata/llms.d.ts +2 -1
  142. package/dist/kernel/routes/metadata/llms.js +4 -4
  143. package/dist/kernel/routes/metadata/robots.d.ts +1 -1
  144. package/dist/kernel/routes/metadata/robots.js +2 -2
  145. package/dist/kernel/routes/metadata/sitemap.d.ts +6 -3
  146. package/dist/kernel/routes/metadata/sitemap.js +48 -20
  147. package/dist/kernel/routes/pages/group.d.ts +1 -1
  148. package/dist/kernel/routes/pages/group.js +20 -12
  149. package/dist/kernel/routes/pages/leaf.d.ts +2 -2
  150. package/dist/kernel/routes/pages/leaf.js +20 -12
  151. package/dist/kernel/routes/pages/root.d.ts +2 -2
  152. package/dist/kernel/routes/pages/root.js +18 -12
  153. package/dist/resolvers/manifest-resolver.js +29 -6
  154. package/dist/search.d.ts +6 -7
  155. package/dist/search.js +47 -22
  156. package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
  157. package/dist/{types-CIwwieNw.d.ts → types-BzkZty3r.d.ts} +23 -3
  158. package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
  159. package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
  160. package/dist/types.d.ts +14 -6
  161. package/dist/validate-local-source-XRL2Y7XE.js +14 -0
  162. package/dist/validate-publish-os-source-DAPZ4QGE.js +12 -0
  163. package/init/seed/minimal/.gitignore +1 -0
  164. package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
  165. package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
  166. package/init/seed/minimal/publish.os/docs/content/get-started.mdx +6 -10
  167. package/init/seed/minimal/publish.os/docs/content/groups.mdx +1 -1
  168. package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
  169. package/init/seed/minimal/publish.os/publish.os.config.json +3 -7
  170. package/init/seed/minimal/publish.os/theme.css +52 -24
  171. package/init/seed/minimal/publish.os/tsconfig.json +3 -0
  172. package/init/seed/minimal/seed.json +4 -1
  173. package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
  174. package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
  175. package/init/seed/scratch/seed.json +5 -0
  176. package/package.json +12 -26
  177. package/release/app/phosphor/package.json +3 -3
  178. package/release/app/phosphor/pnpm-lock.yaml.template +523 -360
  179. package/release/app/phosphor/pnpm-workspace.yaml +3 -0
  180. package/release/compiler/package.json +1 -1
  181. package/release/compiler/pnpm-lock.yaml.template +439 -286
  182. package/release/compiler/pnpm-workspace.yaml +3 -0
  183. package/release/release.json +7 -36
  184. package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
  185. package/dist/icons.d.ts +0 -1
  186. package/dist/icons.js +0 -2
  187. package/dist/kernel/components/mdx/components/pre.d.ts +0 -6
  188. package/dist/kernel/components/mdx/components/pre.js +0 -18
  189. package/dist/kernel/components/ui/meta-key.d.ts +0 -17
  190. package/dist/kernel/components/ui/meta-key.js +0 -9
  191. package/dist/kernel/framework-icons.d.ts +0 -1
  192. package/dist/kernel/framework-icons.js +0 -39
  193. package/dist/link-CYaCRDb6.d.ts +0 -35
  194. package/dist/route-metadata-og-image-BeKKFHg7.d.ts +0 -58
  195. package/dist/types-sM2g9nW0.d.ts +0 -12
  196. package/release/app/lucide/package.json +0 -30
  197. package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
  198. package/release/app/lucide/pnpm-workspace.yaml +0 -11
  199. package/release/app/tabler/package.json +0 -30
  200. package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
  201. package/release/app/tabler/pnpm-workspace.yaml +0 -11
@@ -1,95 +1,436 @@
1
1
  "use client";
2
2
 
3
- // src/components/block/navigation/navbar.tsx
3
+ // src/components/block/navbar/navbar.tsx
4
4
  import {
5
5
  LogoBlock
6
6
  } from "@publish.os/nextjs/kernel/components/blocks/logo-block";
7
- import { NavBreadcrumb } from "@publish.os/nextjs/kernel/components/blocks/nav-breadcrumb";
8
7
  import { Search } from "@publish.os/nextjs/kernel/components/blocks/search";
8
+ import { Sidebar } from "@publish.os/nextjs/kernel/components/blocks/sidebar";
9
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";
11
+ import {
12
+ Drawer,
13
+ DrawerClose,
14
+ DrawerDescription,
15
+ DrawerPopup,
16
+ DrawerPortal,
17
+ DrawerTitle,
18
+ DrawerTrigger,
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";
23
+ import {
24
+ ArrowRightIcon,
25
+ CaretLeftIcon,
26
+ CaretRightIcon,
27
+ ListIcon,
28
+ XIcon
29
+ } from "@phosphor-icons/react/ssr";
30
+ import NextLink2 from "next/link";
31
+ import { usePathname } from "next/navigation";
32
+ import { useEffect, useRef as useRef2, useState as useState2 } from "react";
33
+
34
+ // src/components/block/navbar/group-navigation.tsx
35
+ import { Button } from "@publish.os/nextjs/kernel/components/ui/button";
10
36
  import { Link } from "@publish.os/nextjs/kernel/components/ui/link";
11
- import { FrameworkArrowRightIcon as ArrowRight } from "@publish.os/nextjs/kernel/framework-icons";
12
- import { cn } from "@publish.os/nextjs/utils/cn";
37
+ import {
38
+ Menu,
39
+ MenuLinkItem,
40
+ MenuPopup,
41
+ MenuPortal,
42
+ MenuPositioner,
43
+ MenuTrigger
44
+ } from "@publish.os/nextjs/kernel/components/ui/menu";
45
+ import { CaretDownIcon } from "@phosphor-icons/react/ssr";
13
46
  import NextLink from "next/link";
14
- import { usePathname } from "next/navigation";
47
+ import { useLayoutEffect, useRef, useState } from "react";
15
48
  import { jsx, jsxs } from "react/jsx-runtime";
16
- function hasPath(node) {
17
- return "path" in node && typeof node.path == "string";
49
+ function GroupNavigation({
50
+ currentPath,
51
+ tree
52
+ }) {
53
+ let groups = tree.filter(
54
+ (node) => node.type === "section" && typeof node.path == "string" && typeof node.group == "string"
55
+ ), activeGroup = groups.filter(
56
+ ({ path }) => currentPath === path || currentPath.startsWith(path === "/" ? "/" : `${path}/`)
57
+ ).reduce(
58
+ (active, group) => !active || group.path.length > active.path.length ? group : active,
59
+ void 0
60
+ ), navRef = useRef(null), linksRef = useRef(null), [overflow, setOverflow] = useState(!1), hasGroups = groups.length > 1;
61
+ if (useLayoutEffect(() => {
62
+ if (!hasGroups) return;
63
+ let nav = navRef.current, links = linksRef.current, win = nav?.ownerDocument.defaultView;
64
+ if (!nav || !links || !win?.ResizeObserver) return;
65
+ let measure = () => {
66
+ nav.clientWidth > 0 && setOverflow(links.getBoundingClientRect().width > nav.clientWidth - 4);
67
+ }, observer = new win.ResizeObserver(measure);
68
+ return observer.observe(nav), observer.observe(links), measure(), () => observer.disconnect();
69
+ }, [hasGroups]), !hasGroups) return null;
70
+ let isActive = (path) => activeGroup?.path === path;
71
+ return /* @__PURE__ */ jsxs("div", { className: "hidden min-w-0 flex-1 items-center gap-4 md:flex", children: [
72
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "h-4 w-px shrink-0 bg-stroke-3" }),
73
+ /* @__PURE__ */ jsxs(
74
+ "nav",
75
+ {
76
+ "aria-label": "Site groups",
77
+ className: "relative -m-0.5 min-w-0 flex-1 overflow-hidden p-0.5",
78
+ ref: navRef,
79
+ children: [
80
+ /* @__PURE__ */ jsx(
81
+ "ul",
82
+ {
83
+ "aria-hidden": overflow || void 0,
84
+ className: `flex w-max items-center gap-1 ${overflow ? "pointer-events-none invisible absolute top-0" : ""}`,
85
+ inert: overflow || void 0,
86
+ ref: linksRef,
87
+ children: groups.map((group) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
88
+ Link,
89
+ {
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,
94
+ size: "xs",
95
+ target: "_self",
96
+ variant: "button.ghost",
97
+ children: group.title
98
+ }
99
+ ) }, group.id))
100
+ }
101
+ ),
102
+ overflow ? /* @__PURE__ */ jsxs(Menu, { children: [
103
+ /* @__PURE__ */ jsx(
104
+ MenuTrigger,
105
+ {
106
+ "aria-label": "Browse site groups",
107
+ render: /* @__PURE__ */ jsx(
108
+ Button,
109
+ {
110
+ className: "pointer-coarse:min-h-11 pointer-coarse:min-w-11",
111
+ rightIcon: /* @__PURE__ */ jsx(CaretDownIcon, { "aria-hidden": "true" }),
112
+ size: "xs",
113
+ variant: "ghost"
114
+ }
115
+ ),
116
+ children: "Browse"
117
+ }
118
+ ),
119
+ /* @__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
+ MenuLinkItem,
121
+ {
122
+ "aria-current": isActive(group.path) ? "location" : void 0,
123
+ className: "whitespace-normal break-words pointer-coarse:min-h-11",
124
+ render: /* @__PURE__ */ jsx(NextLink, { href: group.href ?? group.path }),
125
+ children: group.title
126
+ },
127
+ group.id
128
+ )) }) }) })
129
+ ] }) : null
130
+ ]
131
+ }
132
+ )
133
+ ] });
134
+ }
135
+
136
+ // 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";
140
+ function MobileNavigationTree({
141
+ currentPath,
142
+ indexCurrentPath,
143
+ indexPath,
144
+ title,
145
+ tree
146
+ }) {
147
+ return /* @__PURE__ */ jsx2(
148
+ ScrollArea,
149
+ {
150
+ className: "min-h-0 flex-1 rounded-none",
151
+ viewportClassName: "overscroll-contain",
152
+ children: /* @__PURE__ */ jsxs2("nav", { "aria-label": `${title} pages`, className: "px-4 py-5", children: [
153
+ /* @__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(
155
+ PageLink,
156
+ {
157
+ currentPath,
158
+ href: indexPath,
159
+ activePath: indexCurrentPath,
160
+ sameTab: !0,
161
+ title: "Overview"
162
+ }
163
+ )
164
+ ] })
165
+ }
166
+ );
167
+ }
168
+ function PageList({
169
+ currentPath,
170
+ tree
171
+ }) {
172
+ return /* @__PURE__ */ jsx2("ul", { className: "space-y-1", children: tree.map((node) => /* @__PURE__ */ jsx2(
173
+ "li",
174
+ {
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(
177
+ PageLink,
178
+ {
179
+ 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
184
+ }
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 })
188
+ ] })
189
+ },
190
+ node.type === "page" ? node.fileID : node.id
191
+ )) });
18
192
  }
19
- function isTopLevelGroup(node) {
20
- return node.type === "section" && typeof node.group == "string" && !node.group.includes("/");
193
+ function PageLink({
194
+ currentPath,
195
+ href,
196
+ activePath,
197
+ sameTab = !1,
198
+ title
199
+ }) {
200
+ return /* @__PURE__ */ jsx2(
201
+ Link2,
202
+ {
203
+ active: currentPath === (activePath ?? href),
204
+ className: "h-auto min-h-14 w-full min-w-0 justify-start whitespace-normal px-3 py-3 text-start text-lg font-medium leading-normal text-foreground-1",
205
+ href,
206
+ target: sameTab ? "_self" : void 0,
207
+ size: "lg",
208
+ variant: "button.ghost",
209
+ children: /* @__PURE__ */ jsx2("span", { className: "min-w-0 wrap-break-word", children: title })
210
+ }
211
+ );
21
212
  }
213
+
214
+ // src/components/block/navbar/navbar.tsx
215
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
22
216
  function Navbar({
23
217
  logo,
218
+ showThemeToggle = !0,
24
219
  site,
25
220
  siteTitle,
26
- showThemeToggle = !0,
27
221
  tree
28
222
  }) {
29
- let pathname = usePathname() || "/", headerSite = site ?? { name: siteTitle ?? "Site" }, groups = tree.filter(hasPath).filter(isTopLevelGroup), activeGroupPath = groups.map((group) => group.path).filter((path) => pathname === path || pathname.startsWith(`${path}/`)).sort((a, b) => b.length - a.length)[0];
30
- return /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-nav border-b border-stroke-3 bg-surface-2 [anchor-name:--global-navbar]", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex min-h-[var(--layout-global-nav-height)] w-full max-w-(--layout-site-max-width) flex-col gap-3 border-x border-stroke-3 px-5 py-3 md:flex-row md:items-center md:gap-4 md:py-2 lg:px-6", children: [
31
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
32
- /* @__PURE__ */ jsx(
33
- NextLink,
34
- {
35
- "aria-label": `${headerSite.name} home`,
36
- className: "inline-flex h-8 shrink-0 items-center text-sm font-semibold text-foreground-1 transition-colors hover:text-accent-1 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-1",
37
- href: "/",
38
- children: /* @__PURE__ */ jsx(LogoBlock, { logo, siteName: headerSite.name })
39
- }
40
- ),
41
- /* @__PURE__ */ jsx("div", { className: "hidden h-4 w-px shrink-0 bg-stroke-3 md:block" }),
42
- /* @__PURE__ */ jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsx(
43
- NavBreadcrumb,
44
- {
45
- currentPath: pathname,
46
- showRoot: !1,
47
- site: headerSite,
48
- tree
49
- }
50
- ) })
223
+ let pathname = usePathname() || "/", headerSite = site ?? { name: siteTitle ?? "Site" };
224
+ 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
+ /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
226
+ /* @__PURE__ */ jsx3(HomeLink, { logo, siteName: headerSite.name }),
227
+ /* @__PURE__ */ jsx3(GroupNavigation, { currentPath: pathname, tree })
51
228
  ] }),
52
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2", children: [
53
- groups.length > 0 ? /* @__PURE__ */ jsx(
54
- "nav",
229
+ /* @__PURE__ */ jsxs3("div", { className: "flex shrink-0 items-center gap-1 md:gap-2", children: [
230
+ /* @__PURE__ */ jsxs3(Search.Root, { children: [
231
+ /* @__PURE__ */ jsx3(Search.Trigger, { className: "max-md:size-11 max-md:border-transparent max-md:p-0 max-md:[&_svg]:size-5 pointer-coarse:md:min-h-11" }),
232
+ /* @__PURE__ */ jsx3(Search.Dialog, {})
233
+ ] }),
234
+ showThemeToggle ? /* @__PURE__ */ jsx3(
235
+ ThemeToggle,
55
236
  {
56
- "aria-label": "Groups",
57
- className: "flex min-w-0 flex-wrap items-center gap-2 text-sm",
58
- children: groups.map((group) => {
59
- let path = group.path, active = path === activeGroupPath;
60
- return /* @__PURE__ */ jsx(
61
- Link,
62
- {
63
- active,
64
- className: cn(
65
- "px-1 text-foreground-2",
66
- active && "text-foreground-1"
67
- ),
68
- href: path,
69
- size: "sm",
70
- variant: "link.standalone",
71
- children: group.title
72
- },
73
- group.type === "page" ? group.fileID : group.id
74
- );
75
- })
237
+ className: "hidden md:inline-flex pointer-coarse:min-h-11 pointer-coarse:min-w-11",
238
+ size: "sm",
239
+ variant: "ghost"
76
240
  }
77
241
  ) : null,
78
- /* @__PURE__ */ jsx(Search.DefaultDesktop, {}),
79
- /* @__PURE__ */ jsx(
80
- Link,
242
+ /* @__PURE__ */ jsx3(
243
+ "span",
244
+ {
245
+ "aria-hidden": "true",
246
+ className: "mx-2 hidden h-4 w-px bg-stroke-3 md:block"
247
+ }
248
+ ),
249
+ /* @__PURE__ */ jsx3(
250
+ Link3,
81
251
  {
252
+ className: "hidden md:inline-flex pointer-coarse:min-h-11",
82
253
  href: "/",
83
- rightIcon: /* @__PURE__ */ jsx(ArrowRight, { "aria-hidden": "true", size: 14 }),
254
+ prefetch: !1,
255
+ rightIcon: /* @__PURE__ */ jsx3(ArrowRightIcon, { "aria-hidden": "true", size: 14 }),
84
256
  size: "sm",
85
257
  variant: "button.solid",
86
258
  children: "Start"
87
259
  }
88
260
  ),
89
- showThemeToggle ? /* @__PURE__ */ jsx(ThemeToggle, {}) : null
261
+ /* @__PURE__ */ jsx3(
262
+ MobileNavigation,
263
+ {
264
+ currentPath: pathname,
265
+ logo,
266
+ showThemeToggle,
267
+ siteName: headerSite.name,
268
+ tree
269
+ },
270
+ pathname
271
+ )
90
272
  ] })
91
273
  ] }) });
92
274
  }
275
+ function NavbarFrame({ children }) {
276
+ return /* @__PURE__ */ jsx3("div", { className: "mx-auto flex min-h-(--layout-global-nav-height) w-full max-w-(--layout-site-max-width) items-center gap-3 border-x border-stroke-3 px-4 py-2 md:gap-4 md:px-5 lg:px-6", children });
277
+ }
278
+ function HomeLink({ logo, siteName }) {
279
+ return /* @__PURE__ */ jsx3(
280
+ NextLink2,
281
+ {
282
+ "aria-label": `${siteName} home`,
283
+ className: "inline-flex min-w-0 items-center py-1.5 text-sm font-semibold leading-5 text-foreground-1 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-stroke md:max-w-32 md:shrink-0 lg:max-w-48 pointer-coarse:min-h-11",
284
+ href: "/",
285
+ prefetch: !1,
286
+ title: siteName,
287
+ children: /* @__PURE__ */ jsx3("span", { className: "block min-w-0 truncate", children: /* @__PURE__ */ jsx3(LogoBlock, { logo, maxHeight: 20, siteName }) })
288
+ }
289
+ );
290
+ }
291
+ function MobileNavigation({
292
+ currentPath,
293
+ logo,
294
+ showThemeToggle,
295
+ siteName,
296
+ tree
297
+ }) {
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"
300
+ ), selectedGroup = groups.find((group) => group.id === selectedGroupId), changeOpen = (nextOpen) => {
301
+ setOpen(nextOpen), nextOpen || (setSelectedGroupId(null), returnGroupIdRef.current = null);
302
+ };
303
+ return useEffect(() => {
304
+ if (!open) return;
305
+ (selectedGroupId ? backRef.current : groupButtonRefs.current.get(returnGroupIdRef.current ?? ""))?.focus({ preventScroll: !0 });
306
+ }, [open, selectedGroupId]), useEffect(() => {
307
+ let win = triggerRef.current?.ownerDocument.defaultView;
308
+ if (!win) return;
309
+ let desktop = win.matchMedia("(min-width: 768px)"), closeOnDesktop = () => {
310
+ desktop.matches && (setOpen(!1), setSelectedGroupId(null), returnGroupIdRef.current = null);
311
+ };
312
+ return desktop.addEventListener("change", closeOnDesktop), () => desktop.removeEventListener("change", closeOnDesktop);
313
+ }, []), /* @__PURE__ */ jsxs3(Drawer, { open, onOpenChange: changeOpen, children: [
314
+ /* @__PURE__ */ jsx3(
315
+ DrawerTrigger,
316
+ {
317
+ "aria-label": "Open navigation",
318
+ className: "md:hidden",
319
+ ref: triggerRef,
320
+ render: /* @__PURE__ */ jsx3(Button2, { iconOnly: !0, size: "lg", variant: "ghost" }),
321
+ children: /* @__PURE__ */ jsx3(ListIcon, { "aria-hidden": "true", className: "size-5!" })
322
+ }
323
+ ),
324
+ /* @__PURE__ */ jsx3(DrawerPortal, { children: /* @__PURE__ */ jsx3(DrawerViewport, { children: /* @__PURE__ */ jsxs3(
325
+ DrawerPopup,
326
+ {
327
+ className: "animate-mobile-navigation inset-0 flex w-full max-w-none flex-col overflow-hidden border-0 bg-surface-2 p-0 pb-[env(safe-area-inset-bottom)] shadow-none",
328
+ initialFocus: closeRef,
329
+ finalFocus: triggerRef,
330
+ onClick: (event) => {
331
+ let link = event.target.closest("a[href]");
332
+ link && link.getAttribute("target") !== "_blank" && event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey && changeOpen(!1);
333
+ },
334
+ children: [
335
+ /* @__PURE__ */ jsxs3(DrawerTitle, { className: "sr-only", children: [
336
+ selectedGroup ? selectedGroup.title : siteName,
337
+ " navigation"
338
+ ] }),
339
+ /* @__PURE__ */ jsx3(DrawerDescription, { className: "sr-only", children: "Browse pages and site controls." }),
340
+ /* @__PURE__ */ jsx3("header", { className: "shrink-0 border-b border-stroke-3", children: /* @__PURE__ */ jsxs3(NavbarFrame, { children: [
341
+ /* @__PURE__ */ jsx3("div", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx3(HomeLink, { logo, siteName }) }),
342
+ /* @__PURE__ */ jsx3(
343
+ DrawerClose,
344
+ {
345
+ "aria-label": "Close navigation",
346
+ className: "size-11",
347
+ ref: closeRef,
348
+ render: /* @__PURE__ */ jsx3(Button2, { iconOnly: !0, size: "lg", variant: "ghost" }),
349
+ children: /* @__PURE__ */ jsx3(XIcon, { "aria-hidden": "true", className: "size-5!" })
350
+ }
351
+ )
352
+ ] }) }),
353
+ /* @__PURE__ */ jsx3("div", { className: "flex min-h-0 flex-1 flex-col", children: selectedGroup ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
354
+ /* @__PURE__ */ jsx3("div", { className: "flex shrink-0 items-center justify-between gap-4 border-b border-stroke-3 px-4 py-2", children: /* @__PURE__ */ jsx3(
355
+ Button2,
356
+ {
357
+ className: "h-auto min-h-11 px-2 py-2 text-base text-accent-1 hover:not-data-disabled:text-accent-1",
358
+ leftIcon: /* @__PURE__ */ jsx3(
359
+ CaretLeftIcon,
360
+ {
361
+ "aria-hidden": "true",
362
+ className: "rtl:rotate-180"
363
+ }
364
+ ),
365
+ onClick: () => setSelectedGroupId(null),
366
+ ref: backRef,
367
+ size: "lg",
368
+ variant: "ghost",
369
+ children: "Back"
370
+ }
371
+ ) }),
372
+ /* @__PURE__ */ jsx3(
373
+ MobileNavigationTree,
374
+ {
375
+ currentPath,
376
+ indexPath: selectedGroup.href ?? selectedGroup.path,
377
+ indexCurrentPath: selectedGroup.path,
378
+ title: selectedGroup.title,
379
+ tree: selectedGroup.children
380
+ }
381
+ )
382
+ ] }) : groups.length > 0 ? /* @__PURE__ */ jsx3(
383
+ ScrollArea2,
384
+ {
385
+ className: "min-h-0 flex-1",
386
+ viewportClassName: "overscroll-contain",
387
+ children: /* @__PURE__ */ jsx3("nav", { "aria-label": "Navigation groups", className: "px-4 py-4", children: /* @__PURE__ */ jsx3("ul", { className: "space-y-1", children: groups.map((group) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(
388
+ Button2,
389
+ {
390
+ className: "h-auto min-h-12 w-full justify-between whitespace-normal px-3 py-3 text-start text-lg",
391
+ onClick: () => {
392
+ returnGroupIdRef.current = group.id, setSelectedGroupId(group.id);
393
+ },
394
+ ref: (button) => {
395
+ button ? groupButtonRefs.current.set(group.id, button) : groupButtonRefs.current.delete(group.id);
396
+ },
397
+ rightIcon: /* @__PURE__ */ jsx3(CaretRightIcon, { "aria-hidden": "true" }),
398
+ size: "lg",
399
+ variant: "ghost",
400
+ children: /* @__PURE__ */ jsx3("span", { className: "min-w-0 wrap-break-word", children: group.title })
401
+ }
402
+ ) }, group.id)) }) })
403
+ }
404
+ ) : /* @__PURE__ */ jsx3(
405
+ Sidebar,
406
+ {
407
+ className: "w-full min-w-0 max-w-none",
408
+ currentPath,
409
+ tree
410
+ }
411
+ ) }),
412
+ selectedGroup ? null : /* @__PURE__ */ jsxs3("div", { className: "flex shrink-0 flex-col gap-4 border-t border-stroke-3 px-4 py-4", children: [
413
+ showThemeToggle ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-3 text-sm text-foreground-2", children: [
414
+ /* @__PURE__ */ jsx3("span", { children: "Theme" }),
415
+ /* @__PURE__ */ jsx3(ThemeToggle, { size: "lg", variant: "ghost" })
416
+ ] }) : null,
417
+ /* @__PURE__ */ jsx3(
418
+ Link3,
419
+ {
420
+ href: "/",
421
+ prefetch: !1,
422
+ rightIcon: /* @__PURE__ */ jsx3(ArrowRightIcon, { "aria-hidden": "true", size: 16 }),
423
+ size: "lg",
424
+ variant: "button.solid",
425
+ children: "Start"
426
+ }
427
+ )
428
+ ] })
429
+ ]
430
+ }
431
+ ) }) })
432
+ ] });
433
+ }
93
434
  export {
94
435
  Navbar
95
436
  };
@@ -234,7 +234,7 @@ function OriginControl({
234
234
  "button",
235
235
  {
236
236
  className: cn(
237
- "h-7 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
237
+ "h-7 rounded-[max(calc(var(--radius-button)-0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
238
238
  origin === value && "bg-surface-1 text-foreground-1 shadow-sm"
239
239
  ),
240
240
  onClick: () => onChange(origin),
@@ -346,7 +346,7 @@ function NavigationProgressPlayground() {
346
346
  return /* @__PURE__ */ jsx("div", { className: "min-h-screen bg-surface-page text-foreground-1", children: /* @__PURE__ */ jsxs("div", { className: "grid min-h-screen lg:grid-cols-[1fr_23rem]", children: [
347
347
  /* @__PURE__ */ jsxs("main", { className: "relative min-h-screen overflow-hidden", children: [
348
348
  /* @__PURE__ */ jsx("div", { className: "absolute left-5 top-5 text-sm font-medium text-foreground-4", children: "Inline" }),
349
- /* @__PURE__ */ jsx("div", { className: "flex min-h-screen items-center justify-center px-8 py-20", children: /* @__PURE__ */ jsxs("section", { className: "border-shadow-3 relative flex h-[15rem] w-full max-w-4xl flex-col items-center justify-center overflow-hidden bg-surface-1", children: [
349
+ /* @__PURE__ */ jsx("div", { className: "flex min-h-screen items-center justify-center px-8 py-20", children: /* @__PURE__ */ jsxs("section", { className: "border-shadow-3 relative flex h-60 w-full max-w-4xl flex-col items-center justify-center overflow-hidden bg-surface-1", children: [
350
350
  /* @__PURE__ */ jsx(
351
351
  ProgressPreview,
352
352
  {
@@ -378,7 +378,7 @@ function NavigationProgressPlayground() {
378
378
  "button",
379
379
  {
380
380
  className: cn(
381
- "h-8 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
381
+ "h-8 rounded-[max(calc(var(--radius-button)-0.25rem),0px)] text-xs font-medium text-foreground-3 transition-colors",
382
382
  activePreset === preset && "bg-surface-1 text-foreground-1 shadow-sm"
383
383
  ),
384
384
  onClick: () => applyPreset(preset),
@@ -612,7 +612,7 @@ function NavigationProgressPlayground() {
612
612
  /* @__PURE__ */ jsx(
613
613
  "textarea",
614
614
  {
615
- className: "min-h-[26rem] resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
615
+ className: "min-h-104 resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
616
616
  readOnly: !0,
617
617
  value: output
618
618
  }
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- // src/components/block/navigation/navigation-progress.tsx
3
+ // src/components/block/navigation-progress.tsx
4
4
  import {
5
5
  Progress,
6
6
  ProgressIndicator,
@@ -111,6 +111,7 @@ function NavigationProgressContent() {
111
111
  Progress,
112
112
  {
113
113
  "aria-label": "Page navigation",
114
+ "aria-hidden": !isVisible,
114
115
  className: cn(
115
116
  "pointer-events-none fixed left-0 right-0 top-0 z-progress overflow-hidden transition-opacity duration-300",
116
117
  isVisible ? "opacity-100" : "opacity-0"
@@ -127,6 +128,8 @@ function NavigationProgressContent() {
127
128
  progress === 0 && "scale-x-0"
128
129
  ),
129
130
  style: {
131
+ // Keep Base UI's percentage width from multiplying the animated scale.
132
+ width: "100%",
130
133
  transform: isExiting ? "scaleX(0)" : `scaleX(${Math.max(0, Math.min(100, progress)) / 100})`,
131
134
  transformOrigin: isExiting ? "right" : "left",
132
135
  transition: isExiting ? `transform ${navigationProgressConfig.exitDuration}ms var(--animation-ease-progress-exit)` : `transform ${navigationProgressConfig.completeDuration}ms var(--animation-ease-progress)`
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { T as TreeNode } from '../../../types-DHBm7-j6.js';
2
+ import { T as TreeNode } from '../../../types-CUtrppxt.js';
3
3
 
4
4
  type NextPrevProps = {
5
5
  className?: string;
@@ -1,20 +1,17 @@
1
- // src/components/block/navigation/next-prev.tsx
2
- import {
3
- FrameworkChevronLeftIcon as ChevronLeft,
4
- FrameworkChevronRightIcon as ChevronRight
5
- } from "@publish.os/nextjs/kernel/framework-icons";
1
+ // src/components/block/page-navigation/next-prev.tsx
2
+ import { CaretLeftIcon, CaretRightIcon } from "@phosphor-icons/react/ssr";
6
3
  import { cn } from "@publish.os/nextjs/utils/cn";
7
4
  import NextLink from "next/link";
8
5
 
9
- // src/components/block/navigation/page-nodes.ts
6
+ // src/components/block/page-navigation/page-nodes.ts
10
7
  function pageNodes(nodes) {
11
8
  return nodes.flatMap((node) => node.type === "page" ? [node] : node.type === "section" || node.type === "folder" ? pageNodes(node.children) : []);
12
9
  }
13
10
 
14
- // src/components/block/navigation/next-prev.tsx
11
+ // src/components/block/page-navigation/next-prev.tsx
15
12
  import { jsx, jsxs } from "react/jsx-runtime";
16
13
  function DirectionIcon({ direction }) {
17
- 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(ChevronLeft, { "aria-hidden": "true", size: 14 }) : /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true", size: 14 }) });
14
+ 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 }) });
18
15
  }
19
16
  function NavigationCard({
20
17
  direction,
@@ -25,10 +22,10 @@ function NavigationCard({
25
22
  NextLink,
26
23
  {
27
24
  className: cn(
28
- "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",
25
+ "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!",
29
26
  isNext && "md:text-right"
30
27
  ),
31
- href: page.path,
28
+ href: page.href ?? page.path,
32
29
  children: /* @__PURE__ */ jsxs(
33
30
  "span",
34
31
  {
@@ -60,19 +57,10 @@ function NavigationCard({
60
57
  }
61
58
  function NextPrev({ className, currentPath, tree }) {
62
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);
63
- return !previous && !next ? null : /* @__PURE__ */ jsx("nav", { "aria-label": "Previous and next pages", className, children: /* @__PURE__ */ jsxs(
64
- "div",
65
- {
66
- className: cn(
67
- "grid gap-4 border-t border-stroke-3 pt-6",
68
- hasBoth && "md:grid-cols-2"
69
- ),
70
- children: [
71
- previous ? /* @__PURE__ */ jsx(NavigationCard, { direction: "previous", page: previous }) : null,
72
- next ? /* @__PURE__ */ jsx(NavigationCard, { direction: "next", page: next }) : null
73
- ]
74
- }
75
- ) });
60
+ 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
+ previous ? /* @__PURE__ */ jsx(NavigationCard, { direction: "previous", page: previous }) : null,
62
+ next ? /* @__PURE__ */ jsx(NavigationCard, { direction: "next", page: next }) : null
63
+ ] }) });
76
64
  }
77
65
  export {
78
66
  NextPrev
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { T as TreeNode } from '../../../types-DHBm7-j6.js';
2
+ import { T as TreeNode } from '../../../types-CUtrppxt.js';
3
3
 
4
4
  type PageListProps = {
5
5
  tree: TreeNode[];