@publish.os/nextjs 0.0.1-alpha.81 → 0.0.1-alpha.91

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 (265) 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 +8 -8
  4. package/compiler-assets/nextjs/defaults/group/page.tsx +44 -43
  5. package/compiler-assets/nextjs/defaults/project/next.config.mjs +33 -13
  6. package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +10 -3
  7. package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
  8. package/compiler-assets/nextjs/defaults/root/css/components/code-block.css +18 -0
  9. package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
  10. package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
  11. package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
  12. package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
  13. package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
  14. package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
  15. package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
  16. package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
  17. package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
  18. package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
  19. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
  20. package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
  21. package/compiler-assets/nextjs/shims/document.tsx +38 -0
  22. package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
  23. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +18 -2
  24. package/compiler-assets/nextjs/shims/global-layout.tsx +19 -85
  25. package/compiler-assets/nextjs/shims/global-not-found.tsx +69 -0
  26. package/compiler-assets/nextjs/shims/markdown-route.ts +2 -0
  27. package/compiler-assets/nextjs/shims/metadata-icons.tsx +39 -0
  28. package/compiler-assets/nextjs/shims/not-found-content.tsx +53 -0
  29. package/compiler-assets/nextjs/shims/not-found-navigation.tsx +60 -0
  30. package/compiler-assets/nextjs/shims/proxy.ts +143 -65
  31. package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
  32. package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
  33. package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +30 -0
  34. package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
  35. package/compiler-assets/nextjs/shims/site-mdx-components.tsx +112 -0
  36. package/compiler-assets/nextjs/shims/site-mdx.tsx +17 -0
  37. package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
  38. package/dist/build-operation-5QMLXF7N.js +89 -0
  39. package/dist/{button-CFdx-ohV.d.ts → button-BdCScEKi.d.ts} +6 -6
  40. package/dist/capture-local-source-WGGDIUU2.js +258 -0
  41. package/dist/chunk-22RSSUNV.js +13 -0
  42. package/dist/chunk-4BC2L2KA.js +620 -0
  43. package/dist/chunk-5J3YUNRY.js +121 -0
  44. package/dist/chunk-5KAD7W53.js +248 -0
  45. package/dist/chunk-6C65KV7O.js +142 -0
  46. package/dist/chunk-6D2E6UMD.js +695 -0
  47. package/dist/chunk-7NY22B5U.js +161 -0
  48. package/dist/chunk-AI2UULNX.js +9 -0
  49. package/dist/chunk-EFO6AWXN.js +19 -0
  50. package/dist/chunk-F3AGNDF4.js +2377 -0
  51. package/dist/chunk-GBPLER5H.js +426 -0
  52. package/dist/chunk-IL4RJOKI.js +186 -0
  53. package/dist/chunk-NNBJZPFM.js +193 -0
  54. package/dist/chunk-ORIUWJBQ.js +58 -0
  55. package/dist/chunk-OXOFRXEI.js +7129 -0
  56. package/dist/chunk-UYGCOWRF.js +1709 -0
  57. package/dist/chunk-WL75GQ5M.js +80 -0
  58. package/dist/compiler.d.ts +54 -7
  59. package/dist/compiler.js +121 -13147
  60. package/dist/components/blocks/agent-actions.d.ts +81 -0
  61. package/dist/components/blocks/agent-actions.js +594 -0
  62. package/dist/components/blocks/toc.d.ts +43 -0
  63. package/dist/components/blocks/toc.js +136 -0
  64. package/dist/components/ui/button.d.ts +5 -0
  65. package/dist/components/ui/button.js +94 -0
  66. package/dist/compose-CVBJRAF6.js +16 -0
  67. package/dist/config/createNextConfig.js +27 -0
  68. package/dist/dev-operation-OSHHWRWK.js +1095 -0
  69. package/dist/framework-selection-ZVO323PK.js +11 -0
  70. package/dist/ide-support-CU6Z5PVR.js +16 -0
  71. package/dist/index.d.ts +55 -4
  72. package/dist/jsx-dev-runtime.d.ts +6 -0
  73. package/dist/jsx-dev-runtime.js +100 -0
  74. package/dist/jsx-runtime.d.ts +7 -0
  75. package/dist/jsx-runtime.js +97 -0
  76. package/dist/kernel/components/blocks/AgentActions.d.ts +35 -6
  77. package/dist/kernel/components/blocks/AgentActions.js +401 -150
  78. package/dist/kernel/components/blocks/agent-actions.d.ts +5 -0
  79. package/dist/kernel/components/blocks/agent-actions.js +594 -0
  80. package/dist/kernel/components/blocks/animated-icon-swap.js +1 -1
  81. package/dist/kernel/components/blocks/color-palette.js +4 -4
  82. package/dist/kernel/components/blocks/logo-block.js +3 -3
  83. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
  84. package/dist/kernel/components/blocks/nav-breadcrumb.js +22 -7
  85. package/dist/kernel/components/blocks/navbar.d.ts +2 -2
  86. package/dist/kernel/components/blocks/navbar.js +406 -65
  87. package/dist/kernel/components/blocks/navigation-progress.js +6 -3
  88. package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
  89. package/dist/kernel/components/blocks/next-prev.js +12 -24
  90. package/dist/kernel/components/blocks/page-list.d.ts +1 -1
  91. package/dist/kernel/components/blocks/page-list.js +7 -6
  92. package/dist/kernel/components/blocks/search.d.ts +83 -58
  93. package/dist/kernel/components/blocks/search.js +554 -428
  94. package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
  95. package/dist/kernel/components/blocks/sidebar-node.js +12 -10
  96. package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
  97. package/dist/kernel/components/blocks/sidebar.js +24 -14
  98. package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
  99. package/dist/kernel/components/blocks/theme-toggle.js +47 -1
  100. package/dist/kernel/components/blocks/toc-client.d.ts +40 -0
  101. package/dist/kernel/components/blocks/toc-client.js +495 -0
  102. package/dist/kernel/components/blocks/toc.d.ts +19 -1
  103. package/dist/kernel/components/blocks/toc.js +122 -180
  104. package/dist/kernel/components/mdx/components/blockquote.js +2 -2
  105. package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
  106. package/dist/kernel/components/mdx/components/callout.js +67 -36
  107. package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
  108. package/dist/kernel/components/mdx/components/code-block.js +106 -5
  109. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
  110. package/dist/kernel/components/mdx/components/copy-code-button.js +61 -0
  111. package/dist/kernel/components/mdx/components/figure-caption.d.ts +1 -1
  112. package/dist/kernel/components/mdx/components/figure-caption.js +4 -3
  113. package/dist/kernel/components/mdx/components/figure.d.ts +6 -2
  114. package/dist/kernel/components/mdx/components/figure.js +24 -14
  115. package/dist/kernel/components/mdx/components/footnotes.js +1 -1
  116. package/dist/kernel/components/mdx/components/heading-copy-link.js +4 -4
  117. package/dist/kernel/components/mdx/components/heading.js +6 -3
  118. package/dist/kernel/components/mdx/components/hr.js +2 -2
  119. package/dist/kernel/components/mdx/components/image-zoom.js +2 -2
  120. package/dist/kernel/components/mdx/components/image.d.ts +1 -1
  121. package/dist/kernel/components/mdx/components/image.js +94 -68
  122. package/dist/kernel/components/mdx/components/inline-code.js +2 -2
  123. package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
  124. package/dist/kernel/components/mdx/components/kbd.js +5 -4
  125. package/dist/kernel/components/mdx/components/link.d.ts +35 -4
  126. package/dist/kernel/components/mdx/components/link.js +3 -3
  127. package/dist/kernel/components/mdx/components/paragraph.js +2 -5
  128. package/dist/kernel/components/mdx/components/strikethrough.js +1 -1
  129. package/dist/kernel/components/mdx/components/table.js +2 -2
  130. package/dist/kernel/components/mdx/components/task-list.js +2 -2
  131. package/dist/kernel/components/mdx/components/video-player.d.ts +6 -2
  132. package/dist/kernel/components/mdx/components/video-player.js +8 -4
  133. package/dist/kernel/components/mdx/components/video.d.ts +5 -3
  134. package/dist/kernel/components/mdx/components/video.js +8 -6
  135. package/dist/kernel/components/mdx/error-boundary.js +2 -2
  136. package/dist/kernel/components/mdx/error-fallback.js +1 -1
  137. package/dist/kernel/components/mdx/mdx.d.ts +28 -14
  138. package/dist/kernel/components/mdx/mdx.js +336 -63
  139. package/dist/kernel/components/mdx/rehype-heading-ids.d.ts +1 -0
  140. package/dist/kernel/components/mdx/rehype-heading-ids.js +6 -4
  141. package/dist/kernel/components/next-image.d.ts +12 -0
  142. package/dist/kernel/components/next-image.js +61 -0
  143. package/dist/kernel/components/ui/accordion.js +1 -1
  144. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +6 -23
  145. package/dist/kernel/components/ui/breadcrumb-trail.js +2 -2
  146. package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
  147. package/dist/kernel/components/ui/breadcrumb.js +10 -8
  148. package/dist/kernel/components/ui/button-group.js +8 -7
  149. package/dist/kernel/components/ui/button.d.ts +58 -6
  150. package/dist/kernel/components/ui/button.js +43 -39
  151. package/dist/kernel/components/ui/card.d.ts +2 -2
  152. package/dist/kernel/components/ui/card.js +1 -1
  153. package/dist/kernel/components/ui/dialog.js +1 -1
  154. package/dist/kernel/components/ui/drawer.d.ts +3 -1
  155. package/dist/kernel/components/ui/drawer.js +6 -2
  156. package/dist/kernel/components/ui/input.d.ts +2 -2
  157. package/dist/kernel/components/ui/input.js +1 -1
  158. package/dist/kernel/components/ui/kbd.js +10 -17
  159. package/dist/kernel/components/ui/link.d.ts +11 -3
  160. package/dist/kernel/components/ui/link.js +12 -11
  161. package/dist/kernel/components/ui/menu.js +6 -6
  162. package/dist/kernel/components/ui/mod-key.d.ts +10 -0
  163. package/dist/kernel/components/ui/mod-key.js +36 -0
  164. package/dist/kernel/components/ui/navigation-menu.js +3 -3
  165. package/dist/kernel/components/ui/popover.js +1 -1
  166. package/dist/kernel/components/ui/progress.js +2 -2
  167. package/dist/kernel/components/ui/scroll-area.js +5 -5
  168. package/dist/kernel/components/ui/select.js +8 -11
  169. package/dist/kernel/components/ui/separator.js +1 -1
  170. package/dist/kernel/components/ui/table.js +1 -1
  171. package/dist/kernel/components/ui/tabs.js +1 -1
  172. package/dist/kernel/components/ui/tag.js +1 -1
  173. package/dist/kernel/components/ui/text.d.ts +2 -2
  174. package/dist/kernel/components/ui/text.js +1 -1
  175. package/dist/kernel/components/ui/toast.js +1 -1
  176. package/dist/kernel/components/ui/tooltip.js +1 -1
  177. package/dist/kernel/defaults.registry.d.ts +11 -24
  178. package/dist/kernel/defaults.registry.js +11 -26
  179. package/dist/kernel/routes/agent/markdown.d.ts +3 -1
  180. package/dist/kernel/routes/agent/markdown.js +219 -48
  181. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  182. package/dist/kernel/routes/layouts/group.js +5 -7
  183. package/dist/kernel/routes/metadata/feed.d.ts +1 -1
  184. package/dist/kernel/routes/metadata/feed.js +111 -81
  185. package/dist/kernel/routes/metadata/llms.d.ts +12 -3
  186. package/dist/kernel/routes/metadata/llms.js +156 -59
  187. package/dist/kernel/routes/metadata/og-image.js +1 -1
  188. package/dist/kernel/routes/metadata/robots.d.ts +1 -1
  189. package/dist/kernel/routes/metadata/robots.js +2 -2
  190. package/dist/kernel/routes/metadata/sitemap.d.ts +26 -4
  191. package/dist/kernel/routes/metadata/sitemap.js +206 -38
  192. package/dist/kernel/routes/not-found.d.ts +34 -0
  193. package/dist/kernel/routes/not-found.js +213 -0
  194. package/dist/kernel/routes/pages/group.d.ts +2 -2
  195. package/dist/kernel/routes/pages/group.js +21 -13
  196. package/dist/kernel/routes/pages/leaf.d.ts +28 -1
  197. package/dist/kernel/routes/pages/leaf.js +25 -16
  198. package/dist/kernel/routes/pages/root.js +19 -13
  199. package/dist/keyboard-shortcuts.js +1 -1
  200. package/dist/resolvers/manifest-resolver.js +29 -6
  201. package/dist/search.d.ts +6 -7
  202. package/dist/search.js +52 -29
  203. package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
  204. package/dist/theme-scope.js +1 -1
  205. package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
  206. package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
  207. package/dist/{types-CIwwieNw.d.ts → types-J2w_puPF.d.ts} +11 -10
  208. package/dist/types.d.ts +15 -6
  209. package/dist/utils/heading-ids.js +30 -11
  210. package/dist/utils/toc-selection.d.ts +7 -0
  211. package/dist/utils/toc-selection.js +14 -0
  212. package/dist/validate-local-source-SV44DBQT.js +16 -0
  213. package/dist/validate-publish-os-source-NZJF3TB2.js +14 -0
  214. package/init/seed/minimal/.gitignore +1 -0
  215. package/init/seed/minimal/publish.os/assets/blog/hello-world.svg +13 -0
  216. package/init/seed/minimal/publish.os/assets/favicon.dark.svg +13 -0
  217. package/init/seed/minimal/publish.os/assets/favicon.svg +13 -0
  218. package/init/seed/minimal/publish.os/blog/content/hello-world.mdx +48 -0
  219. package/init/seed/minimal/publish.os/blog/content/series-a.mdx +11 -0
  220. package/init/seed/minimal/publish.os/blog/index.tsx +82 -0
  221. package/init/seed/minimal/publish.os/blog/layout.tsx +13 -0
  222. package/init/seed/minimal/publish.os/blog/page.tsx +76 -0
  223. package/init/seed/minimal/publish.os/components/blog/copy-link.tsx +64 -0
  224. package/init/seed/minimal/publish.os/docs/content/get-started.mdx +6 -11
  225. package/init/seed/minimal/publish.os/docs/content/groups.mdx +6 -7
  226. package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
  227. package/init/seed/minimal/publish.os/publish.os.config.json +7 -7
  228. package/init/seed/minimal/publish.os/theme.css +52 -24
  229. package/init/seed/minimal/publish.os/tsconfig.json +3 -0
  230. package/init/seed/minimal/seed.json +12 -2
  231. package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
  232. package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
  233. package/init/seed/scratch/seed.json +5 -0
  234. package/package.json +55 -44
  235. package/release/app/phosphor/package.json +5 -5
  236. package/release/app/phosphor/pnpm-lock.yaml.template +553 -377
  237. package/release/app/phosphor/pnpm-workspace.yaml +3 -0
  238. package/release/compiler/package.json +5 -3
  239. package/release/compiler/pnpm-lock.yaml.template +500 -303
  240. package/release/compiler/pnpm-workspace.yaml +3 -0
  241. package/release/release.json +8 -37
  242. package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
  243. package/dist/icons.d.ts +0 -1
  244. package/dist/icons.js +0 -2
  245. package/dist/kernel/components/blocks/design-system-preview.d.ts +0 -61
  246. package/dist/kernel/components/blocks/design-system-preview.js +0 -648
  247. package/dist/kernel/components/blocks/link-playground.d.ts +0 -5
  248. package/dist/kernel/components/blocks/link-playground.js +0 -744
  249. package/dist/kernel/components/blocks/navigation-progress-playground.d.ts +0 -5
  250. package/dist/kernel/components/blocks/navigation-progress-playground.js +0 -629
  251. package/dist/kernel/components/mdx/components/pre.d.ts +0 -6
  252. package/dist/kernel/components/mdx/components/pre.js +0 -18
  253. package/dist/kernel/components/ui/meta-key.d.ts +0 -17
  254. package/dist/kernel/components/ui/meta-key.js +0 -9
  255. package/dist/kernel/components/ui/theme-toggle.d.ts +0 -24
  256. package/dist/kernel/components/ui/theme-toggle.js +0 -58
  257. package/dist/kernel/framework-icons.d.ts +0 -1
  258. package/dist/kernel/framework-icons.js +0 -39
  259. package/dist/link-CYaCRDb6.d.ts +0 -35
  260. package/release/app/lucide/package.json +0 -30
  261. package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
  262. package/release/app/lucide/pnpm-workspace.yaml +0 -11
  263. package/release/app/tabler/package.json +0 -30
  264. package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
  265. package/release/app/tabler/pnpm-workspace.yaml +0 -11
@@ -1,6 +1,6 @@
1
- // src/components/block/navigation/nav-breadcrumb.tsx
2
- import { CollapsibleBreadcrumbTrail } from "@publish.os/nextjs/kernel/components/ui/breadcrumb-trail";
3
- import { jsx } from "react/jsx-runtime";
1
+ // src/components/block/navbar/nav-breadcrumb.tsx
2
+ import { CollapsibleBreadcrumbTrail } from "@components/ui/breadcrumb-trail";
3
+ import { jsx } from "@publish.os/nextjs/jsx-runtime";
4
4
  function titleFor(node) {
5
5
  return node.title;
6
6
  }
@@ -15,7 +15,14 @@ function rankFor(node) {
15
15
  function findCrumbs(nodes, pathname, parents = []) {
16
16
  let matches = [];
17
17
  for (let node of nodes) {
18
- let path = pathFor(node), nextParents = path ? [...parents, { title: titleFor(node), path }] : parents;
18
+ let path = pathFor(node), nextParents = path ? [
19
+ ...parents,
20
+ {
21
+ title: titleFor(node),
22
+ path,
23
+ href: "href" in node && typeof node.href == "string" ? node.href : path
24
+ }
25
+ ] : parents;
19
26
  if (path === pathname && matches.push({
20
27
  crumbs: nextParents.map((crumb, index) => ({
21
28
  ...crumb,
@@ -38,13 +45,20 @@ function groupFallback(tree, pathname) {
38
45
  ).sort((a, b) => b.path.length - a.path.length);
39
46
  for (let { group, path } of groups)
40
47
  if (pathname.startsWith(`${path}/`))
41
- return [{ title: titleFor(group), path }];
48
+ return [
49
+ {
50
+ title: titleFor(group),
51
+ path,
52
+ href: "href" in group && typeof group.href == "string" ? group.href : path
53
+ }
54
+ ];
42
55
  return [];
43
56
  }
44
57
  function buildCrumbs(site, tree, pathname) {
45
58
  let root = {
46
59
  title: site.name,
47
60
  path: "/",
61
+ href: "/",
48
62
  current: pathname === "/"
49
63
  };
50
64
  if (pathname === "/") return [root];
@@ -60,15 +74,16 @@ function buildCrumbs(site, tree, pathname) {
60
74
  function NavBreadcrumb({
61
75
  currentPath = "/",
62
76
  showRoot = !0,
77
+ size = "sm",
63
78
  site,
64
79
  tree
65
80
  }) {
66
81
  let crumbs = buildCrumbs(site, tree, currentPath), items = (showRoot ? crumbs : crumbs.slice(1)).map((crumb) => ({
67
82
  current: crumb.current,
68
- href: crumb.path,
83
+ href: crumb.href,
69
84
  title: crumb.title
70
85
  }));
71
- return items.length === 0 ? null : /* @__PURE__ */ jsx(CollapsibleBreadcrumbTrail, { items, size: "sm" });
86
+ return items.length === 0 ? null : /* @__PURE__ */ jsx(CollapsibleBreadcrumbTrail, { items, size });
72
87
  }
73
88
  export {
74
89
  NavBreadcrumb
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { LogoBlockLogo, LogoBlockAsset } from './logo-block.js';
3
- import { S as SiteData, T as TreeNode } from '../../../types-B_b3C0U6.js';
3
+ import { S as SiteData, T as TreeNode } from '../../../types-CUtrppxt.js';
4
4
 
5
5
  type NavbarProps = {
6
6
  logo?: NavbarLogo;
@@ -11,6 +11,6 @@ type NavbarProps = {
11
11
  };
12
12
  type NavbarLogoAsset = LogoBlockAsset;
13
13
  type NavbarLogo = LogoBlockLogo;
14
- declare function Navbar({ logo, site, siteTitle, showThemeToggle, tree, }: NavbarProps): react_jsx_runtime.JSX.Element;
14
+ declare function Navbar({ logo, showThemeToggle, site, siteTitle, tree, }: NavbarProps): react_jsx_runtime.JSX.Element;
15
15
 
16
16
  export { Navbar, type NavbarLogo, type NavbarLogoAsset };
@@ -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
- } from "@publish.os/nextjs/kernel/components/blocks/logo-block";
7
- import { NavBreadcrumb } from "@publish.os/nextjs/kernel/components/blocks/nav-breadcrumb";
8
- import { Search } from "@publish.os/nextjs/kernel/components/blocks/search";
9
- import { ThemeToggle } from "@publish.os/nextjs/kernel/components/blocks/theme-toggle";
10
- 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";
13
- import NextLink from "next/link";
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
+ import {
12
+ Drawer,
13
+ DrawerClose,
14
+ DrawerDescription,
15
+ DrawerPopup,
16
+ DrawerPortal,
17
+ DrawerTitle,
18
+ DrawerTrigger,
19
+ DrawerViewport
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
+ import {
24
+ ArrowRightIcon,
25
+ CaretLeftIcon,
26
+ CaretRightIcon,
27
+ ListIcon,
28
+ XIcon
29
+ } from "@phosphor-icons/react/ssr";
30
+ import NextLink2 from "next/link";
14
31
  import { usePathname } from "next/navigation";
15
- import { jsx, jsxs } from "react/jsx-runtime";
16
- function hasPath(node) {
17
- return "path" in node && typeof node.path == "string";
32
+ import { useEffect, useRef as useRef2, useState as useState2 } from "react";
33
+
34
+ // src/components/block/navbar/group-navigation.tsx
35
+ import { Button } from "@components/ui/button";
36
+ import { Link } from "@components/ui/link";
37
+ import {
38
+ Menu,
39
+ MenuLinkItem,
40
+ MenuPopup,
41
+ MenuPortal,
42
+ MenuPositioner,
43
+ MenuTrigger
44
+ } from "@components/ui/menu";
45
+ import { CaretDownIcon } from "@phosphor-icons/react/ssr";
46
+ import NextLink from "next/link";
47
+ import { useLayoutEffect, useRef, useState } from "react";
48
+ import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
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: "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 "@components/ui/link";
138
+ import { ScrollArea } from "@components/ui/scroll-area";
139
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "@publish.os/nextjs/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 "@publish.os/nextjs/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
  };
@@ -1,15 +1,15 @@
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,
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,
@@ -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;