@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
@@ -0,0 +1,4 @@
1
+ import 'react';
2
+ export { AgentActionConfig, AgentActionContext, AgentActionCopyTarget, AgentActionGroup, AgentActions, AgentActionsProps, Feedback, Group, Item, MarkdownLink, Menu, PrimaryAction, Root, Toolbar } from './AgentActions.js';
3
+ import 'class-variance-authority/types';
4
+ import 'class-variance-authority';
@@ -0,0 +1,563 @@
1
+ "use client";
2
+
3
+ // src/modules/agent-actions/agent-actions.tsx
4
+ import { AnimatedIconSwap } from "@components/blocks/animated-icon-swap";
5
+ import {
6
+ Button,
7
+ buttonVariants
8
+ } from "@components/ui/button";
9
+ import { ButtonGroup, ButtonGroupSeparator } from "@components/ui/button-group";
10
+ import {
11
+ Menu,
12
+ MenuGroup,
13
+ MenuGroupLabel,
14
+ MenuItem,
15
+ MenuLinkItem,
16
+ MenuPopup,
17
+ MenuPortal,
18
+ MenuPositioner,
19
+ MenuSeparator,
20
+ MenuTrigger
21
+ } from "@components/ui/menu";
22
+ import {
23
+ CaretDownIcon,
24
+ CheckIcon,
25
+ CopyIcon,
26
+ MarkdownLogoIcon
27
+ } from "@phosphor-icons/react/ssr";
28
+ import { cn } from "@publish.os/nextjs/utils/cn";
29
+ import {
30
+ createContext,
31
+ Fragment,
32
+ use,
33
+ useCallback,
34
+ useEffect,
35
+ useRef,
36
+ useState
37
+ } from "react";
38
+ import { flushSync } from "react-dom";
39
+ import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
40
+ var DEFAULT_PROMPT_SUFFIX = "I want to ask questions about it.", COPY_FEEDBACK_MS = 1600;
41
+ function normalizePath(path) {
42
+ let [pathname = "/"] = path.split(/[?#]/), prefixed = pathname.startsWith("/") ? pathname : `/${pathname}`;
43
+ return prefixed === "/" ? prefixed : prefixed.replace(/\/+$/, "");
44
+ }
45
+ function markdownPathForPagePath(path) {
46
+ let normalized = normalizePath(path);
47
+ return normalized === "/" ? "/index.md" : `${normalized}.md`;
48
+ }
49
+ function isAbsoluteUrl(url) {
50
+ return /^[a-z][a-z\d+\-.]*:/i.test(url);
51
+ }
52
+ function absoluteUrl(url, siteUrl) {
53
+ if (isAbsoluteUrl(url) || !siteUrl) return url;
54
+ try {
55
+ return new URL(url, siteUrl).toString();
56
+ } catch {
57
+ return url;
58
+ }
59
+ }
60
+ function mergeRel(rel) {
61
+ let values = new Set((rel ?? "").split(/\s+/).filter(Boolean));
62
+ return values.add("noreferrer"), Array.from(values).join(" ");
63
+ }
64
+ function createPrompt(markdownUrl) {
65
+ return `Read ${markdownUrl}, ${DEFAULT_PROMPT_SUFFIX}`;
66
+ }
67
+ function providerPromptUrl(baseUrl, prompt, param = "q") {
68
+ let url = new URL(baseUrl);
69
+ return url.searchParams.set(param, prompt), url.toString();
70
+ }
71
+ var DEFAULT_PRIMARY_ACTION = {
72
+ id: "copy-page-markdown-primary",
73
+ title: "Copy Markdown",
74
+ copy: "page-markdown"
75
+ }, DEFAULT_ACTION_GROUPS = [
76
+ {
77
+ id: "open-in-ai",
78
+ title: "Open in",
79
+ actions: [
80
+ {
81
+ id: "open-chatgpt",
82
+ title: "ChatGPT",
83
+ href: ({ prompt }) => providerPromptUrl("https://chatgpt.com/?hints=search", prompt),
84
+ openInNew: !0
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ id: "page-actions",
90
+ title: "Page",
91
+ actions: [
92
+ {
93
+ id: "copy-page-markdown",
94
+ title: "Copy markdown",
95
+ copy: "page-markdown"
96
+ },
97
+ {
98
+ id: "view-page-markdown",
99
+ title: "View as Markdown",
100
+ href: ({ markdownPath }) => markdownPath
101
+ },
102
+ {
103
+ id: "copy-page-link",
104
+ title: "Copy link",
105
+ copy: "page-link"
106
+ }
107
+ ]
108
+ }
109
+ ];
110
+ function resolveValue(value, context) {
111
+ return typeof value == "function" ? value(context) : value;
112
+ }
113
+ async function copyText(text) {
114
+ if (!navigator.clipboard?.writeText)
115
+ throw new Error("Clipboard access is not available in this browser.");
116
+ await navigator.clipboard.writeText(text);
117
+ }
118
+ function revisionRequestPath(path, revision) {
119
+ if (!revision) return path;
120
+ let separator = path.includes("?") ? "&" : "?";
121
+ return `${path}${separator}publishos_revision=${encodeURIComponent(revision)}`;
122
+ }
123
+ async function markdownHash(text) {
124
+ if (!globalThis.crypto?.subtle)
125
+ throw new Error("This browser cannot verify the current Markdown version.");
126
+ let digest = await globalThis.crypto.subtle.digest(
127
+ "SHA-256",
128
+ new TextEncoder().encode(text)
129
+ );
130
+ return `sha256-${Array.from(
131
+ new Uint8Array(digest),
132
+ (byte) => byte.toString(16).padStart(2, "0")
133
+ ).join("").slice(0, 32)}`;
134
+ }
135
+ var AgentActionsContext = createContext(
136
+ null
137
+ );
138
+ function useAgentActions() {
139
+ let context = use(AgentActionsContext);
140
+ if (!context)
141
+ throw new Error("AgentActions parts must be inside AgentActions.Root.");
142
+ return context;
143
+ }
144
+ function AgentActionsProvider({
145
+ actionGroups,
146
+ buttonSize = "xs",
147
+ buttonVariant = "outline",
148
+ className,
149
+ markdown,
150
+ markdownPath,
151
+ markdownRevision,
152
+ markdownUrl,
153
+ menuLabel = "More agent actions",
154
+ markdownLinkLabel = "View as Markdown",
155
+ pagePath,
156
+ pageUrl,
157
+ primaryAction,
158
+ prompt,
159
+ siteUrl,
160
+ sourceUrl,
161
+ showMarkdownLink = !0,
162
+ children,
163
+ ...props
164
+ }) {
165
+ let [copiedActionId, setCopiedActionId] = useState(), [copyFeedback, setCopyFeedback] = useState(), [menuOpen, setMenuOpen] = useState(!1), menuTriggerRef = useRef(null), menuActionsRef = useRef(null), menuOpenRef = useRef(!1), markdownPreparationRef = useRef(null), currentMarkdownKeyRef = useRef(""), resetTimerRef = useRef(
166
+ void 0
167
+ ), closeMenu = useCallback(() => {
168
+ flushSync(() => {
169
+ menuOpenRef.current = !1, setMenuOpen(!1), menuActionsRef.current?.close(), menuActionsRef.current?.unmount();
170
+ });
171
+ }, []);
172
+ useEffect(() => () => {
173
+ resetTimerRef.current && clearTimeout(resetTimerRef.current);
174
+ }, []);
175
+ let resolvedPagePath = pagePath ?? "/", resolvedMarkdownPath = markdownPath ?? markdownPathForPagePath(resolvedPagePath), resolvedMarkdownUrl = absoluteUrl(
176
+ markdownUrl ?? resolvedMarkdownPath,
177
+ siteUrl
178
+ ), context = {
179
+ markdown,
180
+ markdownPath: resolvedMarkdownPath,
181
+ markdownUrl: resolvedMarkdownUrl,
182
+ pagePath: resolvedPagePath,
183
+ pageUrl: absoluteUrl(pageUrl ?? resolvedPagePath, siteUrl),
184
+ prompt: prompt ?? createPrompt(resolvedMarkdownUrl),
185
+ sourceUrl
186
+ }, markdownKey = `${context.markdownUrl}\0${markdownRevision ?? "unversioned"}`;
187
+ currentMarkdownKeyRef.current = markdownKey, useEffect(
188
+ () => () => {
189
+ markdownPreparationRef.current?.controller?.abort(), markdownPreparationRef.current = null;
190
+ },
191
+ []
192
+ ), useEffect(() => {
193
+ let preparation = markdownPreparationRef.current;
194
+ preparation && preparation.key !== markdownKey && (preparation.controller?.abort(), markdownPreparationRef.current = null, setCopyFeedback(void 0), setCopiedActionId(void 0));
195
+ }, [markdownKey]);
196
+ let resolvedPrimaryAction = primaryAction ?? DEFAULT_PRIMARY_ACTION, resolvedActionGroups = actionGroups ?? DEFAULT_ACTION_GROUPS, markCopied = (actionId) => {
197
+ resetTimerRef.current && clearTimeout(resetTimerRef.current), setCopiedActionId(actionId), resetTimerRef.current = setTimeout(() => {
198
+ setCopiedActionId(void 0);
199
+ }, COPY_FEEDBACK_MS);
200
+ }, markdownPreparation = () => {
201
+ let current = markdownPreparationRef.current;
202
+ if (current?.key === markdownKey) return current;
203
+ current?.controller?.abort();
204
+ let next = { key: markdownKey };
205
+ return markdownPreparationRef.current = next, next;
206
+ }, prepareMarkdown = () => {
207
+ if (context.markdown !== void 0 || !context.markdownUrl) return;
208
+ let record = markdownPreparation();
209
+ if (record.text !== void 0 || record.pending) return;
210
+ let controller = new AbortController();
211
+ record.controller = controller;
212
+ let requestPath = revisionRequestPath(
213
+ context.markdownPath,
214
+ markdownRevision
215
+ ), localPreview = process.env.NODE_ENV !== "production", request = async (cache) => {
216
+ let response;
217
+ try {
218
+ response = await fetch(requestPath, {
219
+ cache,
220
+ signal: controller.signal
221
+ });
222
+ } catch {
223
+ throw new Error("The Markdown page could not be loaded.");
224
+ }
225
+ if (!response.ok)
226
+ throw new Error(
227
+ `The Markdown page could not be loaded (${response.status}).`
228
+ );
229
+ return response.text();
230
+ }, pending = (async () => {
231
+ let firstBody = await request(localPreview ? "no-store" : "default");
232
+ if (!markdownRevision || await markdownHash(firstBody) === markdownRevision)
233
+ return firstBody;
234
+ let refreshedBody = await request(localPreview ? "no-store" : "reload");
235
+ if (await markdownHash(refreshedBody) !== markdownRevision)
236
+ throw new Error(
237
+ "The Markdown page changed while loading. Refresh the page and try again."
238
+ );
239
+ return refreshedBody;
240
+ })().then((text) => (markdownPreparationRef.current === record && currentMarkdownKeyRef.current === record.key && (record.text = text), text)).catch((error) => {
241
+ throw markdownPreparationRef.current === record && (markdownPreparationRef.current = null), error;
242
+ }).finally(() => {
243
+ record.pending = void 0, record.controller = void 0;
244
+ });
245
+ record.pending = pending, pending.catch(() => {
246
+ });
247
+ }, setMenuOpenState = (open) => {
248
+ menuOpenRef.current = open, setMenuOpen(open), open && resolvedActionGroups.some(
249
+ (group) => group.actions.some(
250
+ (action) => action.copy === "page-markdown" && !resolveValue(action.disabled, context)
251
+ )
252
+ ) && prepareMarkdown();
253
+ }, prepareAction = (action) => {
254
+ action.copy === "page-markdown" && !resolveValue(action.disabled, context) && prepareMarkdown();
255
+ }, finishAction = async (action, clipboardWrite, actionMarkdownKey) => {
256
+ try {
257
+ if (await clipboardWrite, actionMarkdownKey && currentMarkdownKeyRef.current !== actionMarkdownKey)
258
+ return;
259
+ markCopied(action.id), setCopyFeedback("Copied to clipboard."), await action.onSelect?.(context);
260
+ } catch (error) {
261
+ if (actionMarkdownKey && currentMarkdownKeyRef.current !== actionMarkdownKey)
262
+ return;
263
+ setCopyFeedback(
264
+ error instanceof Error ? `${error.message} Try again.` : "The action failed. Try again."
265
+ );
266
+ }
267
+ }, handleAction = (action) => {
268
+ if (resolveValue(action.disabled, context)) return;
269
+ if (setCopyFeedback(void 0), setCopiedActionId(void 0), !action.copy) {
270
+ Promise.resolve(action.onSelect?.(context)).catch(
271
+ (error) => {
272
+ setCopyFeedback(
273
+ error instanceof Error ? `${error.message} Try again.` : "The action failed. Try again."
274
+ );
275
+ }
276
+ );
277
+ return;
278
+ }
279
+ if (action.copy === "page-markdown" && context.markdown === void 0) {
280
+ if (!context.markdownUrl) {
281
+ setCopyFeedback("The Markdown page URL is not available. Try again.");
282
+ return;
283
+ }
284
+ let record = markdownPreparation();
285
+ if (record.text !== void 0) {
286
+ if (!record.text) {
287
+ setCopyFeedback("There is no Markdown content to copy. Try again.");
288
+ return;
289
+ }
290
+ finishAction(action, copyText(record.text), record.key);
291
+ return;
292
+ }
293
+ setCopyFeedback("Preparing Markdown\u2026"), prepareMarkdown();
294
+ let pending = markdownPreparationRef.current?.pending;
295
+ if (!pending) return;
296
+ pending.then(
297
+ (text) => {
298
+ if (currentMarkdownKeyRef.current === record.key) {
299
+ if (!text) {
300
+ setCopyFeedback("There is no Markdown content to copy. Try again.");
301
+ return;
302
+ }
303
+ finishAction(action, copyText(text), record.key);
304
+ }
305
+ },
306
+ (error) => {
307
+ currentMarkdownKeyRef.current === record.key && setCopyFeedback(
308
+ error instanceof Error ? `${error.message} Try again.` : "The action failed. Try again."
309
+ );
310
+ }
311
+ );
312
+ return;
313
+ }
314
+ let value = action.copy === "page-markdown" ? context.markdown : action.copy === "page-link" ? context.pageUrl : action.copy === "markdown-link" ? context.markdownUrl : action.copy;
315
+ if (!value) {
316
+ setCopyFeedback("There is no Markdown content to copy. Try again.");
317
+ return;
318
+ }
319
+ finishAction(action, copyText(value));
320
+ }, iconForAction = (action) => {
321
+ let copied = copiedActionId === action.id;
322
+ return action.copy === "page-markdown" ? /* @__PURE__ */ jsx(
323
+ AnimatedIconSwap,
324
+ {
325
+ active: copied,
326
+ activeIcon: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }),
327
+ defaultIcon: action.icon ?? /* @__PURE__ */ jsx(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
328
+ size: 16
329
+ }
330
+ ) : copied ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }) : action.icon;
331
+ }, contextValue = {
332
+ buttonSize,
333
+ buttonVariant,
334
+ closeMenu,
335
+ copyFeedback,
336
+ menuActionsRef,
337
+ menuLabel,
338
+ menuOpen,
339
+ menuTriggerRef,
340
+ markdownLink: showMarkdownLink ? /* @__PURE__ */ jsxs(
341
+ "a",
342
+ {
343
+ className: "inline-flex min-h-7 items-center gap-1.5 text-xs font-medium text-foreground-2 no-underline transition-colors hover:text-foreground-1 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-stroke motion-reduce:transition-none",
344
+ "data-slot": "agent-actions-markdown-link",
345
+ href: resolvedMarkdownPath,
346
+ children: [
347
+ /* @__PURE__ */ jsx(
348
+ MarkdownLogoIcon,
349
+ {
350
+ "aria-hidden": "true",
351
+ className: "size-4 shrink-0",
352
+ weight: "fill"
353
+ }
354
+ ),
355
+ /* @__PURE__ */ jsx("span", { children: markdownLinkLabel })
356
+ ]
357
+ }
358
+ ) : null,
359
+ renderPrimaryAction: (action = resolvedPrimaryAction) => {
360
+ let href = resolveValue(action.href, context), disabled = resolveValue(action.disabled, context), target = action.target ?? (action.openInNew ? "_blank" : void 0), rel = target === "_blank" ? mergeRel(action.rel) : void 0;
361
+ return href && !action.copy && !action.onSelect ? /* @__PURE__ */ jsxs(
362
+ "a",
363
+ {
364
+ "aria-disabled": disabled ? "true" : void 0,
365
+ className: cn(
366
+ buttonVariants({
367
+ iconOnly: !1,
368
+ size: buttonSize,
369
+ variant: buttonVariant
370
+ }),
371
+ disabled && "pointer-events-none opacity-50"
372
+ ),
373
+ "data-disabled": disabled ? "" : void 0,
374
+ href: disabled ? void 0 : href,
375
+ rel,
376
+ target,
377
+ children: [
378
+ iconForAction(action),
379
+ /* @__PURE__ */ jsx("span", { children: action.title })
380
+ ]
381
+ }
382
+ ) : /* @__PURE__ */ jsx(
383
+ Button,
384
+ {
385
+ disabled: !!disabled,
386
+ leftIcon: iconForAction(action),
387
+ onFocus: () => prepareAction(action),
388
+ onClick: () => {
389
+ handleAction(action);
390
+ },
391
+ onPointerDown: () => prepareAction(action),
392
+ onPointerEnter: () => prepareAction(action),
393
+ size: buttonSize,
394
+ variant: buttonVariant,
395
+ children: action.title
396
+ }
397
+ );
398
+ },
399
+ renderMenuAction: (action) => {
400
+ let href = resolveValue(action.href, context), disabled = resolveValue(action.disabled, context), target = action.target ?? (action.openInNew ? "_blank" : void 0), rel = target === "_blank" ? mergeRel(action.rel) : void 0, label = action.title;
401
+ return href && !action.copy && !action.onSelect && !disabled ? /* @__PURE__ */ jsxs(
402
+ MenuLinkItem,
403
+ {
404
+ closeOnClick: !0,
405
+ href,
406
+ onClick: closeMenu,
407
+ rel,
408
+ target,
409
+ children: [
410
+ action.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "shrink-0", children: action.icon }) : null,
411
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
412
+ ]
413
+ },
414
+ action.id
415
+ ) : /* @__PURE__ */ jsxs(
416
+ MenuItem,
417
+ {
418
+ disabled: !!disabled,
419
+ onFocus: () => prepareAction(action),
420
+ onClick: () => {
421
+ handleAction(action);
422
+ },
423
+ onPointerDown: () => prepareAction(action),
424
+ onPointerEnter: () => prepareAction(action),
425
+ children: [
426
+ action.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "shrink-0", children: action.icon }) : null,
427
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
428
+ ]
429
+ },
430
+ action.id
431
+ );
432
+ },
433
+ resolvedActionGroups,
434
+ setMenuOpenState
435
+ };
436
+ return /* @__PURE__ */ jsx(AgentActionsContext.Provider, { value: contextValue, children: children ?? /* @__PURE__ */ jsx(AgentActionsDefaultLayout, { className, ...props }) });
437
+ }
438
+ function AgentActionsDefaultLayout({
439
+ className,
440
+ ...props
441
+ }) {
442
+ return /* @__PURE__ */ jsxs(AgentActionsToolbar, { className, ...props, children: [
443
+ /* @__PURE__ */ jsx(AgentActionsMarkdownLink, {}),
444
+ /* @__PURE__ */ jsxs(ButtonGroup, { children: [
445
+ /* @__PURE__ */ jsx(AgentActionsPrimaryAction, {}),
446
+ /* @__PURE__ */ jsx(ButtonGroupSeparator, {}),
447
+ /* @__PURE__ */ jsx(AgentActionsMenu, {})
448
+ ] }),
449
+ /* @__PURE__ */ jsx(AgentActionsFeedback, {})
450
+ ] });
451
+ }
452
+ function AgentActionsToolbar({
453
+ className,
454
+ ...props
455
+ }) {
456
+ return /* @__PURE__ */ jsx(
457
+ "div",
458
+ {
459
+ className: cn(
460
+ "inline-flex flex-wrap items-center gap-x-3 gap-y-2",
461
+ className
462
+ ),
463
+ "data-slot": "agent-actions",
464
+ ...props
465
+ }
466
+ );
467
+ }
468
+ function AgentActionsMarkdownLink() {
469
+ return useAgentActions().markdownLink;
470
+ }
471
+ function AgentActionsPrimaryAction({ action }) {
472
+ return useAgentActions().renderPrimaryAction(action);
473
+ }
474
+ function AgentActionsFeedback() {
475
+ let { copyFeedback } = useAgentActions();
476
+ return /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", role: "status", children: copyFeedback });
477
+ }
478
+ function AgentActionsGroup({
479
+ title,
480
+ children
481
+ }) {
482
+ return /* @__PURE__ */ jsxs(MenuGroup, { children: [
483
+ title ? /* @__PURE__ */ jsx(MenuGroupLabel, { children: title }) : null,
484
+ children
485
+ ] });
486
+ }
487
+ function AgentActionsItem({ action }) {
488
+ return useAgentActions().renderMenuAction(action);
489
+ }
490
+ function AgentActionsMenu({ children }) {
491
+ let {
492
+ buttonSize,
493
+ buttonVariant,
494
+ closeMenu,
495
+ menuActionsRef,
496
+ menuLabel,
497
+ menuOpen,
498
+ menuTriggerRef,
499
+ resolvedActionGroups,
500
+ setMenuOpenState
501
+ } = useAgentActions();
502
+ return useEffect(() => {
503
+ let view = menuTriggerRef.current?.ownerDocument.defaultView;
504
+ if (view)
505
+ return view.addEventListener("pagehide", closeMenu), view.addEventListener("pageshow", closeMenu), () => {
506
+ view.removeEventListener("pagehide", closeMenu), view.removeEventListener("pageshow", closeMenu);
507
+ };
508
+ }, [closeMenu, menuTriggerRef]), /* @__PURE__ */ jsxs(
509
+ Menu,
510
+ {
511
+ actionsRef: menuActionsRef,
512
+ modal: !1,
513
+ onOpenChange: setMenuOpenState,
514
+ open: menuOpen,
515
+ children: [
516
+ /* @__PURE__ */ jsx(
517
+ MenuTrigger,
518
+ {
519
+ "aria-label": menuLabel,
520
+ ref: menuTriggerRef,
521
+ className: cn(
522
+ buttonVariants({
523
+ iconOnly: !0,
524
+ size: buttonSize,
525
+ variant: buttonVariant
526
+ }),
527
+ "data-popup-open:rounded-r-button!"
528
+ ),
529
+ children: /* @__PURE__ */ jsx(CaretDownIcon, { "aria-hidden": "true", className: "size-4" })
530
+ }
531
+ ),
532
+ /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { align: "end", children: /* @__PURE__ */ jsx(MenuPopup, { className: "min-w-56", onClick: closeMenu, children: children ?? resolvedActionGroups.map((group, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
533
+ index > 0 ? /* @__PURE__ */ jsx(MenuSeparator, {}) : null,
534
+ /* @__PURE__ */ jsx(AgentActionsGroup, { title: group.title, children: group.actions.map((action) => /* @__PURE__ */ jsx(AgentActionsItem, { action }, action.id)) })
535
+ ] }, group.id)) }) }) })
536
+ ]
537
+ }
538
+ );
539
+ }
540
+ function AgentActionsRoot(props) {
541
+ return /* @__PURE__ */ jsx(AgentActionsProvider, { ...props });
542
+ }
543
+ var AgentActions = Object.assign(AgentActionsRoot, {
544
+ Feedback: AgentActionsFeedback,
545
+ Group: AgentActionsGroup,
546
+ Item: AgentActionsItem,
547
+ MarkdownLink: AgentActionsMarkdownLink,
548
+ Menu: AgentActionsMenu,
549
+ PrimaryAction: AgentActionsPrimaryAction,
550
+ Root: AgentActionsRoot,
551
+ Toolbar: AgentActionsToolbar
552
+ });
553
+ export {
554
+ AgentActions,
555
+ AgentActionsFeedback as Feedback,
556
+ AgentActionsGroup as Group,
557
+ AgentActionsItem as Item,
558
+ AgentActionsMarkdownLink as MarkdownLink,
559
+ AgentActionsMenu as Menu,
560
+ AgentActionsPrimaryAction as PrimaryAction,
561
+ AgentActionsRoot as Root,
562
+ AgentActionsToolbar as Toolbar
563
+ };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
3
 
4
4
  type AnimatedIconSwapProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
@@ -11,6 +11,6 @@ type AnimatedIconSwapProps = Omit<ComponentPropsWithoutRef<"span">, "children">
11
11
  /** Square wrapper size in pixels. */
12
12
  size: number;
13
13
  };
14
- declare function AnimatedIconSwap({ active, activeIcon, className, defaultIcon, size, style, ...props }: AnimatedIconSwapProps): react_jsx_runtime.JSX.Element;
14
+ declare function AnimatedIconSwap({ active, activeIcon, className, defaultIcon, size, style, ...props }: AnimatedIconSwapProps): react.JSX.Element;
15
15
 
16
16
  export { AnimatedIconSwap, type AnimatedIconSwapProps };
@@ -1,6 +1,6 @@
1
1
  // src/components/ui/animated-icon-swap.tsx
2
2
  import { cn } from "@publish.os/nextjs/utils/cn";
3
- import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
4
4
  var iconSlotClassName = "pointer-events-none absolute inset-0 flex items-center justify-center transition-[transform,opacity] duration-200 ease-out motion-reduce:scale-100 motion-reduce:transition-opacity motion-reduce:duration-100";
5
5
  function AnimatedIconSwap({
6
6
  active,
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
 
3
3
  declare function collectTokenNamesFromCssText(css: string): string[];
4
4
  declare function deriveTokenGroup(name: string): string;
5
- declare function ColorPalette(): react_jsx_runtime.JSX.Element;
5
+ declare function ColorPalette(): react.JSX.Element;
6
6
 
7
7
  export { collectTokenNamesFromCssText, ColorPalette as default, deriveTokenGroup };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  // src/modules/design-system/color-palette.tsx
4
- import { Button } from "@publish.os/nextjs/kernel/components/ui/button";
4
+ import { Button } from "@components/ui/button";
5
5
  import {
6
6
  Menu,
7
7
  MenuItem,
@@ -9,7 +9,7 @@ import {
9
9
  MenuPortal,
10
10
  MenuPositioner,
11
11
  MenuTrigger
12
- } from "@publish.os/nextjs/kernel/components/ui/menu";
12
+ } from "@components/ui/menu";
13
13
  import {
14
14
  Select,
15
15
  SelectIcon,
@@ -22,9 +22,9 @@ import {
22
22
  SelectPositioner,
23
23
  SelectTrigger,
24
24
  SelectValue
25
- } from "@publish.os/nextjs/kernel/components/ui/select";
25
+ } from "@components/ui/select";
26
26
  import { useCallback, useEffect, useRef, useState } from "react";
27
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
27
+ import { Fragment, jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
28
28
  var DEFAULT_TOKEN_NAMES = [
29
29
  "surface-page",
30
30
  "surface-1",
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
 
3
3
  type LogoBlockAsset = {
4
4
  readonly outputPath: string;
@@ -16,6 +16,6 @@ type LogoBlockProps = {
16
16
  maxWidth?: number;
17
17
  siteName: string;
18
18
  };
19
- declare function LogoBlock({ className, logo, maxHeight, maxWidth, siteName, }: LogoBlockProps): react_jsx_runtime.JSX.Element;
19
+ declare function LogoBlock({ className, logo, maxHeight, maxWidth, siteName, }: LogoBlockProps): react.JSX.Element;
20
20
 
21
21
  export { LogoBlock, type LogoBlockAsset, type LogoBlockLogo, type LogoBlockProps };
@@ -1,6 +1,6 @@
1
1
  // src/components/block/logo-block.tsx
2
2
  import { cn } from "@publish.os/nextjs/utils/cn";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { Fragment, jsx, jsxs } from "@publish.os/nextjs/jsx-runtime";
4
4
  var DEFAULT_LOGO_MAX_HEIGHT = 24, DEFAULT_LOGO_MAX_WIDTH = 160;
5
5
  function isValidLogoAsset(asset) {
6
6
  return typeof asset?.outputPath == "string" && asset.outputPath.trim() !== "";
@@ -1,19 +1,20 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
  import * as class_variance_authority_types from 'class-variance-authority/types';
3
3
  import { VariantProps } from 'class-variance-authority';
4
- import { S as SiteData, T as TreeNode } from '../../../types-CUtrppxt.js';
4
+ import { S as SiteData } from '../../../types-TjH1ek0X.js';
5
+ import { R as ResolvedNavigation } from '../../../manifest-types-CcVPH_jh.js';
5
6
 
6
7
  declare const breadcrumbVariants: (props?: ({
7
8
  size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
8
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
10
  type BreadcrumbVariantProps = VariantProps<typeof breadcrumbVariants>;
10
11
 
11
- declare function NavBreadcrumb({ currentPath, showRoot, size, site, tree, }: {
12
+ declare function NavBreadcrumb({ currentPath, showRoot, size, site, navigation, }: {
12
13
  currentPath?: string;
13
14
  showRoot?: boolean;
14
15
  size?: BreadcrumbVariantProps["size"];
15
16
  site: SiteData;
16
- tree: TreeNode[];
17
- }): react_jsx_runtime.JSX.Element | null;
17
+ navigation: ResolvedNavigation;
18
+ }): react.JSX.Element | null;
18
19
 
19
20
  export { NavBreadcrumb };