@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
@@ -0,0 +1,5 @@
1
+ import 'react/jsx-runtime';
2
+ export { AgentActionConfig, AgentActionContext, AgentActionCopyTarget, AgentActionGroup, AgentActions, AgentActionsProps, Feedback, Group, Item, MarkdownLink, Menu, PrimaryAction, Root, Toolbar } from './AgentActions.js';
3
+ import 'react';
4
+ import 'class-variance-authority/types';
5
+ import 'class-variance-authority';
@@ -0,0 +1,594 @@
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.endsWith(".md") ? normalized : `${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-claude",
82
+ title: "Claude",
83
+ href: ({ prompt }) => providerPromptUrl("https://claude.ai/new", prompt),
84
+ openInNew: !0
85
+ },
86
+ {
87
+ id: "open-chatgpt",
88
+ title: "ChatGPT",
89
+ href: ({ prompt }) => providerPromptUrl("https://chatgpt.com/?hints=search", prompt),
90
+ openInNew: !0
91
+ },
92
+ {
93
+ id: "open-cursor",
94
+ title: "Cursor",
95
+ href: ({ prompt }) => providerPromptUrl("https://cursor.com/link/prompt", prompt, "text"),
96
+ openInNew: !0
97
+ },
98
+ {
99
+ id: "open-copilot",
100
+ title: "Copilot",
101
+ href: ({ prompt }) => providerPromptUrl("https://copilot.microsoft.com/", prompt),
102
+ openInNew: !0
103
+ },
104
+ {
105
+ id: "open-t3-chat",
106
+ title: "T3 Chat",
107
+ href: ({ prompt }) => providerPromptUrl("https://t3.chat/new", prompt),
108
+ openInNew: !0
109
+ },
110
+ {
111
+ id: "open-github",
112
+ title: "GitHub source",
113
+ href: ({ sourceUrl }) => sourceUrl,
114
+ openInNew: !0,
115
+ disabled: ({ sourceUrl }) => !sourceUrl
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ id: "page-actions",
121
+ title: "Page",
122
+ actions: [
123
+ {
124
+ id: "copy-page-markdown",
125
+ title: "Copy markdown",
126
+ copy: "page-markdown"
127
+ },
128
+ {
129
+ id: "view-page-markdown",
130
+ title: "View as Markdown",
131
+ href: ({ markdownPath }) => markdownPath
132
+ },
133
+ {
134
+ id: "copy-page-link",
135
+ title: "Copy link",
136
+ copy: "page-link"
137
+ }
138
+ ]
139
+ }
140
+ ];
141
+ function resolveValue(value, context) {
142
+ return typeof value == "function" ? value(context) : value;
143
+ }
144
+ async function copyText(text) {
145
+ if (!navigator.clipboard?.writeText)
146
+ throw new Error("Clipboard access is not available in this browser.");
147
+ await navigator.clipboard.writeText(text);
148
+ }
149
+ function revisionRequestPath(path, revision) {
150
+ if (!revision) return path;
151
+ let separator = path.includes("?") ? "&" : "?";
152
+ return `${path}${separator}publishos_revision=${encodeURIComponent(revision)}`;
153
+ }
154
+ async function markdownHash(text) {
155
+ if (!globalThis.crypto?.subtle)
156
+ throw new Error("This browser cannot verify the current Markdown version.");
157
+ let digest = await globalThis.crypto.subtle.digest(
158
+ "SHA-256",
159
+ new TextEncoder().encode(text)
160
+ );
161
+ return `sha256-${Array.from(
162
+ new Uint8Array(digest),
163
+ (byte) => byte.toString(16).padStart(2, "0")
164
+ ).join("").slice(0, 32)}`;
165
+ }
166
+ var AgentActionsContext = createContext(
167
+ null
168
+ );
169
+ function useAgentActions() {
170
+ let context = use(AgentActionsContext);
171
+ if (!context)
172
+ throw new Error("AgentActions parts must be inside AgentActions.Root.");
173
+ return context;
174
+ }
175
+ function AgentActionsProvider({
176
+ actionGroups,
177
+ buttonSize = "xs",
178
+ buttonVariant = "outline",
179
+ className,
180
+ markdown,
181
+ markdownPath,
182
+ markdownRevision,
183
+ markdownUrl,
184
+ menuLabel = "More agent actions",
185
+ markdownLinkLabel = "View as Markdown",
186
+ pagePath,
187
+ pageUrl,
188
+ primaryAction,
189
+ prompt,
190
+ siteUrl,
191
+ sourceUrl,
192
+ showMarkdownLink = !0,
193
+ children,
194
+ ...props
195
+ }) {
196
+ 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(
197
+ void 0
198
+ ), closeMenu = useCallback(() => {
199
+ flushSync(() => {
200
+ menuOpenRef.current = !1, setMenuOpen(!1), menuActionsRef.current?.close(), menuActionsRef.current?.unmount();
201
+ });
202
+ }, []);
203
+ useEffect(() => () => {
204
+ resetTimerRef.current && clearTimeout(resetTimerRef.current);
205
+ }, []);
206
+ let resolvedPagePath = pagePath ?? "/", resolvedMarkdownPath = markdownPath ?? markdownPathForPagePath(resolvedPagePath), resolvedMarkdownUrl = absoluteUrl(
207
+ markdownUrl ?? resolvedMarkdownPath,
208
+ siteUrl
209
+ ), context = {
210
+ markdown,
211
+ markdownPath: resolvedMarkdownPath,
212
+ markdownUrl: resolvedMarkdownUrl,
213
+ pagePath: resolvedPagePath,
214
+ pageUrl: absoluteUrl(pageUrl ?? resolvedPagePath, siteUrl),
215
+ prompt: prompt ?? createPrompt(resolvedMarkdownUrl),
216
+ sourceUrl
217
+ }, markdownKey = `${context.markdownUrl}\0${markdownRevision ?? "unversioned"}`;
218
+ currentMarkdownKeyRef.current = markdownKey, useEffect(
219
+ () => () => {
220
+ markdownPreparationRef.current?.controller?.abort(), markdownPreparationRef.current = null;
221
+ },
222
+ []
223
+ ), useEffect(() => {
224
+ let preparation = markdownPreparationRef.current;
225
+ preparation && preparation.key !== markdownKey && (preparation.controller?.abort(), markdownPreparationRef.current = null, setCopyFeedback(void 0), setCopiedActionId(void 0));
226
+ }, [markdownKey]);
227
+ let resolvedPrimaryAction = primaryAction ?? DEFAULT_PRIMARY_ACTION, resolvedActionGroups = actionGroups ?? DEFAULT_ACTION_GROUPS, markCopied = (actionId) => {
228
+ resetTimerRef.current && clearTimeout(resetTimerRef.current), setCopiedActionId(actionId), resetTimerRef.current = setTimeout(() => {
229
+ setCopiedActionId(void 0);
230
+ }, COPY_FEEDBACK_MS);
231
+ }, markdownPreparation = () => {
232
+ let current = markdownPreparationRef.current;
233
+ if (current?.key === markdownKey) return current;
234
+ current?.controller?.abort();
235
+ let next = { key: markdownKey };
236
+ return markdownPreparationRef.current = next, next;
237
+ }, prepareMarkdown = () => {
238
+ if (context.markdown !== void 0 || !context.markdownUrl) return;
239
+ let record = markdownPreparation();
240
+ if (record.text !== void 0 || record.pending) return;
241
+ let controller = new AbortController();
242
+ record.controller = controller;
243
+ let requestPath = revisionRequestPath(
244
+ context.markdownPath,
245
+ markdownRevision
246
+ ), localPreview = process.env.NODE_ENV !== "production", request = async (cache) => {
247
+ let response;
248
+ try {
249
+ response = await fetch(requestPath, {
250
+ cache,
251
+ signal: controller.signal
252
+ });
253
+ } catch {
254
+ throw new Error("The Markdown page could not be loaded.");
255
+ }
256
+ if (!response.ok)
257
+ throw new Error(
258
+ `The Markdown page could not be loaded (${response.status}).`
259
+ );
260
+ return response.text();
261
+ }, pending = (async () => {
262
+ let firstBody = await request(localPreview ? "no-store" : "default");
263
+ if (!markdownRevision || await markdownHash(firstBody) === markdownRevision)
264
+ return firstBody;
265
+ let refreshedBody = await request(localPreview ? "no-store" : "reload");
266
+ if (await markdownHash(refreshedBody) !== markdownRevision)
267
+ throw new Error(
268
+ "The Markdown page changed while loading. Refresh the page and try again."
269
+ );
270
+ return refreshedBody;
271
+ })().then((text) => (markdownPreparationRef.current === record && currentMarkdownKeyRef.current === record.key && (record.text = text), text)).catch((error) => {
272
+ throw markdownPreparationRef.current === record && (markdownPreparationRef.current = null), error;
273
+ }).finally(() => {
274
+ record.pending = void 0, record.controller = void 0;
275
+ });
276
+ record.pending = pending, pending.catch(() => {
277
+ });
278
+ }, setMenuOpenState = (open) => {
279
+ menuOpenRef.current = open, setMenuOpen(open), open && resolvedActionGroups.some(
280
+ (group) => group.actions.some(
281
+ (action) => action.copy === "page-markdown" && !resolveValue(action.disabled, context)
282
+ )
283
+ ) && prepareMarkdown();
284
+ }, prepareAction = (action) => {
285
+ action.copy === "page-markdown" && !resolveValue(action.disabled, context) && prepareMarkdown();
286
+ }, finishAction = async (action, clipboardWrite, actionMarkdownKey) => {
287
+ try {
288
+ if (await clipboardWrite, actionMarkdownKey && currentMarkdownKeyRef.current !== actionMarkdownKey)
289
+ return;
290
+ markCopied(action.id), setCopyFeedback("Copied to clipboard."), await action.onSelect?.(context);
291
+ } catch (error) {
292
+ if (actionMarkdownKey && currentMarkdownKeyRef.current !== actionMarkdownKey)
293
+ return;
294
+ setCopyFeedback(
295
+ error instanceof Error ? `${error.message} Try again.` : "The action failed. Try again."
296
+ );
297
+ }
298
+ }, handleAction = (action) => {
299
+ if (resolveValue(action.disabled, context)) return;
300
+ if (setCopyFeedback(void 0), setCopiedActionId(void 0), !action.copy) {
301
+ Promise.resolve(action.onSelect?.(context)).catch(
302
+ (error) => {
303
+ setCopyFeedback(
304
+ error instanceof Error ? `${error.message} Try again.` : "The action failed. Try again."
305
+ );
306
+ }
307
+ );
308
+ return;
309
+ }
310
+ if (action.copy === "page-markdown" && context.markdown === void 0) {
311
+ if (!context.markdownUrl) {
312
+ setCopyFeedback("The Markdown page URL is not available. Try again.");
313
+ return;
314
+ }
315
+ let record = markdownPreparation();
316
+ if (record.text !== void 0) {
317
+ if (!record.text) {
318
+ setCopyFeedback("There is no Markdown content to copy. Try again.");
319
+ return;
320
+ }
321
+ finishAction(action, copyText(record.text), record.key);
322
+ return;
323
+ }
324
+ setCopyFeedback("Preparing Markdown\u2026"), prepareMarkdown();
325
+ let pending = markdownPreparationRef.current?.pending;
326
+ if (!pending) return;
327
+ pending.then(
328
+ (text) => {
329
+ if (currentMarkdownKeyRef.current === record.key) {
330
+ if (!text) {
331
+ setCopyFeedback("There is no Markdown content to copy. Try again.");
332
+ return;
333
+ }
334
+ finishAction(action, copyText(text), record.key);
335
+ }
336
+ },
337
+ (error) => {
338
+ currentMarkdownKeyRef.current === record.key && setCopyFeedback(
339
+ error instanceof Error ? `${error.message} Try again.` : "The action failed. Try again."
340
+ );
341
+ }
342
+ );
343
+ return;
344
+ }
345
+ let value = action.copy === "page-markdown" ? context.markdown : action.copy === "page-link" ? context.pageUrl : action.copy === "markdown-link" ? context.markdownUrl : action.copy;
346
+ if (!value) {
347
+ setCopyFeedback("There is no Markdown content to copy. Try again.");
348
+ return;
349
+ }
350
+ finishAction(action, copyText(value));
351
+ }, iconForAction = (action) => {
352
+ let copied = copiedActionId === action.id;
353
+ return action.copy === "page-markdown" ? /* @__PURE__ */ jsx(
354
+ AnimatedIconSwap,
355
+ {
356
+ active: copied,
357
+ activeIcon: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }),
358
+ defaultIcon: action.icon ?? /* @__PURE__ */ jsx(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
359
+ size: 16
360
+ }
361
+ ) : copied ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }) : action.icon;
362
+ }, contextValue = {
363
+ buttonSize,
364
+ buttonVariant,
365
+ closeMenu,
366
+ copyFeedback,
367
+ menuActionsRef,
368
+ menuLabel,
369
+ menuOpen,
370
+ menuTriggerRef,
371
+ markdownLink: showMarkdownLink ? /* @__PURE__ */ jsxs(
372
+ "a",
373
+ {
374
+ 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",
375
+ "data-slot": "agent-actions-markdown-link",
376
+ href: resolvedMarkdownPath,
377
+ children: [
378
+ /* @__PURE__ */ jsx(
379
+ MarkdownLogoIcon,
380
+ {
381
+ "aria-hidden": "true",
382
+ className: "size-4 shrink-0",
383
+ weight: "fill"
384
+ }
385
+ ),
386
+ /* @__PURE__ */ jsx("span", { children: markdownLinkLabel })
387
+ ]
388
+ }
389
+ ) : null,
390
+ renderPrimaryAction: (action = resolvedPrimaryAction) => {
391
+ 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;
392
+ return href && !action.copy && !action.onSelect ? /* @__PURE__ */ jsxs(
393
+ "a",
394
+ {
395
+ "aria-disabled": disabled ? "true" : void 0,
396
+ className: cn(
397
+ buttonVariants({
398
+ iconOnly: !1,
399
+ size: buttonSize,
400
+ variant: buttonVariant
401
+ }),
402
+ disabled && "pointer-events-none opacity-50"
403
+ ),
404
+ "data-disabled": disabled ? "" : void 0,
405
+ href: disabled ? void 0 : href,
406
+ rel,
407
+ target,
408
+ children: [
409
+ iconForAction(action),
410
+ /* @__PURE__ */ jsx("span", { children: action.title })
411
+ ]
412
+ }
413
+ ) : /* @__PURE__ */ jsx(
414
+ Button,
415
+ {
416
+ disabled: !!disabled,
417
+ leftIcon: iconForAction(action),
418
+ onFocus: () => prepareAction(action),
419
+ onClick: () => {
420
+ handleAction(action);
421
+ },
422
+ onPointerDown: () => prepareAction(action),
423
+ onPointerEnter: () => prepareAction(action),
424
+ size: buttonSize,
425
+ variant: buttonVariant,
426
+ children: action.title
427
+ }
428
+ );
429
+ },
430
+ renderMenuAction: (action) => {
431
+ 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;
432
+ return href && !action.copy && !action.onSelect && !disabled ? /* @__PURE__ */ jsxs(
433
+ MenuLinkItem,
434
+ {
435
+ closeOnClick: !0,
436
+ href,
437
+ onClick: closeMenu,
438
+ rel,
439
+ target,
440
+ children: [
441
+ action.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "shrink-0", children: action.icon }) : null,
442
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
443
+ ]
444
+ },
445
+ action.id
446
+ ) : /* @__PURE__ */ jsxs(
447
+ MenuItem,
448
+ {
449
+ disabled: !!disabled,
450
+ onFocus: () => prepareAction(action),
451
+ onClick: () => {
452
+ handleAction(action);
453
+ },
454
+ onPointerDown: () => prepareAction(action),
455
+ onPointerEnter: () => prepareAction(action),
456
+ children: [
457
+ action.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "shrink-0", children: action.icon }) : null,
458
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
459
+ ]
460
+ },
461
+ action.id
462
+ );
463
+ },
464
+ resolvedActionGroups,
465
+ setMenuOpenState
466
+ };
467
+ return /* @__PURE__ */ jsx(AgentActionsContext.Provider, { value: contextValue, children: children ?? /* @__PURE__ */ jsx(AgentActionsDefaultLayout, { className, ...props }) });
468
+ }
469
+ function AgentActionsDefaultLayout({
470
+ className,
471
+ ...props
472
+ }) {
473
+ return /* @__PURE__ */ jsxs(AgentActionsToolbar, { className, ...props, children: [
474
+ /* @__PURE__ */ jsx(AgentActionsMarkdownLink, {}),
475
+ /* @__PURE__ */ jsxs(ButtonGroup, { children: [
476
+ /* @__PURE__ */ jsx(AgentActionsPrimaryAction, {}),
477
+ /* @__PURE__ */ jsx(ButtonGroupSeparator, {}),
478
+ /* @__PURE__ */ jsx(AgentActionsMenu, {})
479
+ ] }),
480
+ /* @__PURE__ */ jsx(AgentActionsFeedback, {})
481
+ ] });
482
+ }
483
+ function AgentActionsToolbar({
484
+ className,
485
+ ...props
486
+ }) {
487
+ return /* @__PURE__ */ jsx(
488
+ "div",
489
+ {
490
+ className: cn(
491
+ "inline-flex flex-wrap items-center gap-x-3 gap-y-2",
492
+ className
493
+ ),
494
+ "data-slot": "agent-actions",
495
+ ...props
496
+ }
497
+ );
498
+ }
499
+ function AgentActionsMarkdownLink() {
500
+ return useAgentActions().markdownLink;
501
+ }
502
+ function AgentActionsPrimaryAction({ action }) {
503
+ return useAgentActions().renderPrimaryAction(action);
504
+ }
505
+ function AgentActionsFeedback() {
506
+ let { copyFeedback } = useAgentActions();
507
+ return /* @__PURE__ */ jsx("span", { "aria-live": "polite", className: "sr-only", role: "status", children: copyFeedback });
508
+ }
509
+ function AgentActionsGroup({
510
+ title,
511
+ children
512
+ }) {
513
+ return /* @__PURE__ */ jsxs(MenuGroup, { children: [
514
+ title ? /* @__PURE__ */ jsx(MenuGroupLabel, { children: title }) : null,
515
+ children
516
+ ] });
517
+ }
518
+ function AgentActionsItem({ action }) {
519
+ return useAgentActions().renderMenuAction(action);
520
+ }
521
+ function AgentActionsMenu({ children }) {
522
+ let {
523
+ buttonSize,
524
+ buttonVariant,
525
+ closeMenu,
526
+ menuActionsRef,
527
+ menuLabel,
528
+ menuOpen,
529
+ menuTriggerRef,
530
+ resolvedActionGroups,
531
+ setMenuOpenState
532
+ } = useAgentActions();
533
+ return useEffect(() => {
534
+ let view = menuTriggerRef.current?.ownerDocument.defaultView;
535
+ if (view)
536
+ return view.addEventListener("pagehide", closeMenu), view.addEventListener("pageshow", closeMenu), () => {
537
+ view.removeEventListener("pagehide", closeMenu), view.removeEventListener("pageshow", closeMenu);
538
+ };
539
+ }, [closeMenu, menuTriggerRef]), /* @__PURE__ */ jsxs(
540
+ Menu,
541
+ {
542
+ actionsRef: menuActionsRef,
543
+ modal: !1,
544
+ onOpenChange: setMenuOpenState,
545
+ open: menuOpen,
546
+ children: [
547
+ /* @__PURE__ */ jsx(
548
+ MenuTrigger,
549
+ {
550
+ "aria-label": menuLabel,
551
+ ref: menuTriggerRef,
552
+ className: cn(
553
+ buttonVariants({
554
+ iconOnly: !0,
555
+ size: buttonSize,
556
+ variant: buttonVariant
557
+ }),
558
+ "data-popup-open:rounded-r-button!"
559
+ ),
560
+ children: /* @__PURE__ */ jsx(CaretDownIcon, { "aria-hidden": "true", className: "size-4" })
561
+ }
562
+ ),
563
+ /* @__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: [
564
+ index > 0 ? /* @__PURE__ */ jsx(MenuSeparator, {}) : null,
565
+ /* @__PURE__ */ jsx(AgentActionsGroup, { title: group.title, children: group.actions.map((action) => /* @__PURE__ */ jsx(AgentActionsItem, { action }, action.id)) })
566
+ ] }, group.id)) }) }) })
567
+ ]
568
+ }
569
+ );
570
+ }
571
+ function AgentActionsRoot(props) {
572
+ return /* @__PURE__ */ jsx(AgentActionsProvider, { ...props });
573
+ }
574
+ var AgentActions = Object.assign(AgentActionsRoot, {
575
+ Feedback: AgentActionsFeedback,
576
+ Group: AgentActionsGroup,
577
+ Item: AgentActionsItem,
578
+ MarkdownLink: AgentActionsMarkdownLink,
579
+ Menu: AgentActionsMenu,
580
+ PrimaryAction: AgentActionsPrimaryAction,
581
+ Root: AgentActionsRoot,
582
+ Toolbar: AgentActionsToolbar
583
+ });
584
+ export {
585
+ AgentActions,
586
+ AgentActionsFeedback as Feedback,
587
+ AgentActionsGroup as Group,
588
+ AgentActionsItem as Item,
589
+ AgentActionsMarkdownLink as MarkdownLink,
590
+ AgentActionsMenu as Menu,
591
+ AgentActionsPrimaryAction as PrimaryAction,
592
+ AgentActionsRoot as Root,
593
+ AgentActionsToolbar as Toolbar
594
+ };
@@ -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
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,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() !== "";
@@ -73,7 +73,7 @@ function LogoBlock({
73
73
  siteName
74
74
  }
75
75
  ) : /* @__PURE__ */ jsxs(Fragment, { children: [
76
- /* @__PURE__ */ jsx("span", { className: "block dark:hidden", children: /* @__PURE__ */ jsx(
76
+ /* @__PURE__ */ jsx("span", { className: "[display:var(--logo-block-light-display)]", children: /* @__PURE__ */ jsx(
77
77
  LogoBlockImage,
78
78
  {
79
79
  asset: lightLogo,
@@ -83,7 +83,7 @@ function LogoBlock({
83
83
  siteName
84
84
  }
85
85
  ) }),
86
- /* @__PURE__ */ jsx("span", { className: "hidden dark:block", children: /* @__PURE__ */ jsx(
86
+ /* @__PURE__ */ jsx("span", { className: "[display:var(--logo-block-dark-display)]", children: /* @__PURE__ */ jsx(
87
87
  LogoBlockImage,
88
88
  {
89
89
  asset: darkLogo,
@@ -1,9 +1,17 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { S as SiteData, T as TreeNode } from '../../../types-B_b3C0U6.js';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { S as SiteData, T as TreeNode } from '../../../types-CUtrppxt.js';
3
5
 
4
- declare function NavBreadcrumb({ currentPath, showRoot, site, tree, }: {
6
+ declare const breadcrumbVariants: (props?: ({
7
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ type BreadcrumbVariantProps = VariantProps<typeof breadcrumbVariants>;
10
+
11
+ declare function NavBreadcrumb({ currentPath, showRoot, size, site, tree, }: {
5
12
  currentPath?: string;
6
13
  showRoot?: boolean;
14
+ size?: BreadcrumbVariantProps["size"];
7
15
  site: SiteData;
8
16
  tree: TreeNode[];
9
17
  }): react_jsx_runtime.JSX.Element | null;