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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/compiler-assets/nextjs/defaults/app/globals.css +1 -0
  2. package/compiler-assets/nextjs/defaults/group/index.tsx +50 -0
  3. package/compiler-assets/nextjs/defaults/group/layout.tsx +7 -3
  4. package/compiler-assets/nextjs/defaults/group/page.tsx +35 -43
  5. package/compiler-assets/nextjs/defaults/project/next.config.mjs +22 -11
  6. package/compiler-assets/nextjs/defaults/project/tsconfig.json.template +1 -4
  7. package/compiler-assets/nextjs/defaults/root/css/animation.css +131 -0
  8. package/compiler-assets/nextjs/defaults/root/css/components/dialog.css +4 -1
  9. package/compiler-assets/nextjs/defaults/root/css/components/menu.css +1 -1
  10. package/compiler-assets/nextjs/defaults/root/css/components/navigation-menu.css +1 -1
  11. package/compiler-assets/nextjs/defaults/root/css/components/popover.css +1 -1
  12. package/compiler-assets/nextjs/defaults/root/css/components/select.css +1 -1
  13. package/compiler-assets/nextjs/defaults/root/css/components/tooltip.css +1 -1
  14. package/compiler-assets/nextjs/defaults/root/css/shadow.css +6 -25
  15. package/compiler-assets/nextjs/defaults/root/css/typography.css +51 -68
  16. package/compiler-assets/nextjs/defaults/root/globals.css +25 -0
  17. package/compiler-assets/nextjs/defaults/root/{page.tsx → index.tsx} +6 -2
  18. package/compiler-assets/nextjs/defaults/root/layout.tsx +7 -1
  19. package/compiler-assets/nextjs/defaults/root/theme.css +22 -22
  20. package/compiler-assets/nextjs/shims/generated-group-page.tsx +19 -2
  21. package/compiler-assets/nextjs/shims/generated-leaf-page.tsx +16 -2
  22. package/compiler-assets/nextjs/shims/global-layout.tsx +11 -43
  23. package/compiler-assets/nextjs/shims/proxy.ts +21 -9
  24. package/compiler-assets/nextjs/shims/publish-os-theme-provider.tsx +76 -15
  25. package/compiler-assets/nextjs/shims/root-page.tsx +7 -1
  26. package/compiler-assets/nextjs/shims/site-fenced-code-block.tsx +34 -0
  27. package/compiler-assets/nextjs/shims/site-heading-level.tsx +14 -0
  28. package/compiler-assets/nextjs/shims/site-mdx-components.tsx +100 -0
  29. package/compiler-assets/nextjs/shims/site-mdx.tsx +12 -0
  30. package/compiler-assets/nextjs/shims/theme-defaults.css +41 -25
  31. package/dist/build-operation-2JAYBSKF.js +83 -0
  32. package/dist/button-CtzUJB8u.d.ts +11 -0
  33. package/dist/{button-CFdx-ohV.d.ts → button-c3WGnxIj.d.ts} +3 -3
  34. package/dist/chunk-535TM4A5.js +1455 -0
  35. package/dist/chunk-726GV2NF.js +2344 -0
  36. package/dist/chunk-7OGTPSKI.js +156 -0
  37. package/dist/chunk-AI2UULNX.js +9 -0
  38. package/dist/chunk-B2V22WRT.js +297 -0
  39. package/dist/chunk-DLDFHU7Y.js +191 -0
  40. package/dist/chunk-DWA3ZRGW.js +142 -0
  41. package/dist/chunk-GGKFQ3MA.js +621 -0
  42. package/dist/chunk-H6XILMZX.js +6154 -0
  43. package/dist/chunk-NECL5IBJ.js +318 -0
  44. package/dist/chunk-SVYGXXYR.js +36 -0
  45. package/dist/chunk-UF6ATARM.js +1100 -0
  46. package/dist/chunk-VO2I7MTM.js +56 -0
  47. package/dist/chunk-WDY4IK6Z.js +128 -0
  48. package/dist/chunk-WKTEO6RS.js +586 -0
  49. package/dist/chunk-YLTOLYWM.js +92 -0
  50. package/dist/compiler.d.ts +41 -7
  51. package/dist/compiler.js +48 -13143
  52. package/dist/compose-NN23UJGC.js +13 -0
  53. package/dist/config/createNextConfig.js +13 -0
  54. package/dist/dev-operation-TZDVJCN7.js +1055 -0
  55. package/dist/framework-selection-X4U6Y6QC.js +10 -0
  56. package/dist/ide-support-ZNW7ODFY.js +15 -0
  57. package/dist/index.d.ts +15 -3
  58. package/dist/kernel/components/blocks/AgentActions.js +71 -61
  59. package/dist/kernel/components/blocks/design-system-preview.d.ts +1 -1
  60. package/dist/kernel/components/blocks/design-system-preview.js +32 -13
  61. package/dist/kernel/components/blocks/link-playground.js +2 -2
  62. package/dist/kernel/components/blocks/logo-block.js +2 -2
  63. package/dist/kernel/components/blocks/nav-breadcrumb.d.ts +10 -2
  64. package/dist/kernel/components/blocks/nav-breadcrumb.js +20 -5
  65. package/dist/kernel/components/blocks/navbar.d.ts +2 -2
  66. package/dist/kernel/components/blocks/navbar.js +401 -60
  67. package/dist/kernel/components/blocks/navigation-progress-playground.js +4 -4
  68. package/dist/kernel/components/blocks/navigation-progress.js +4 -1
  69. package/dist/kernel/components/blocks/next-prev.d.ts +1 -1
  70. package/dist/kernel/components/blocks/next-prev.js +11 -23
  71. package/dist/kernel/components/blocks/page-list.d.ts +1 -1
  72. package/dist/kernel/components/blocks/page-list.js +5 -4
  73. package/dist/kernel/components/blocks/search.d.ts +83 -58
  74. package/dist/kernel/components/blocks/search.js +553 -426
  75. package/dist/kernel/components/blocks/sidebar-node.d.ts +2 -2
  76. package/dist/kernel/components/blocks/sidebar-node.js +11 -9
  77. package/dist/kernel/components/blocks/sidebar.d.ts +3 -3
  78. package/dist/kernel/components/blocks/sidebar.js +18 -11
  79. package/dist/kernel/components/blocks/theme-toggle.d.ts +2 -2
  80. package/dist/kernel/components/blocks/theme-toggle.js +48 -2
  81. package/dist/kernel/components/blocks/toc.js +3 -3
  82. package/dist/kernel/components/mdx/components/blockquote.js +1 -1
  83. package/dist/kernel/components/mdx/components/callout.d.ts +5 -7
  84. package/dist/kernel/components/mdx/components/callout.js +66 -35
  85. package/dist/kernel/components/mdx/components/code-block.d.ts +5 -2
  86. package/dist/kernel/components/mdx/components/code-block.js +106 -5
  87. package/dist/kernel/components/mdx/components/copy-code-button.d.ts +8 -0
  88. package/dist/kernel/components/mdx/components/copy-code-button.js +60 -0
  89. package/dist/kernel/components/mdx/components/figure-caption.js +1 -1
  90. package/dist/kernel/components/mdx/components/figure.js +1 -1
  91. package/dist/kernel/components/mdx/components/heading-copy-link.js +3 -3
  92. package/dist/kernel/components/mdx/components/image-zoom.d.ts +2 -2
  93. package/dist/kernel/components/mdx/components/image-zoom.js +1 -1
  94. package/dist/kernel/components/mdx/components/image.js +77 -56
  95. package/dist/kernel/components/mdx/components/inline-code.js +1 -1
  96. package/dist/kernel/components/mdx/components/kbd.d.ts +2 -2
  97. package/dist/kernel/components/mdx/components/kbd.js +3 -2
  98. package/dist/kernel/components/mdx/components/link.d.ts +35 -4
  99. package/dist/kernel/components/mdx/components/link.js +1 -1
  100. package/dist/kernel/components/mdx/components/paragraph.js +1 -4
  101. package/dist/kernel/components/mdx/components/task-list.js +1 -1
  102. package/dist/kernel/components/mdx/components/video-player.js +2 -2
  103. package/dist/kernel/components/mdx/components/video.js +1 -1
  104. package/dist/kernel/components/mdx/error-boundary.d.ts +1 -1
  105. package/dist/kernel/components/mdx/mdx.d.ts +12 -8
  106. package/dist/kernel/components/mdx/mdx.js +115 -39
  107. package/dist/kernel/components/mdx/rehype-heading-ids.js +1 -1
  108. package/dist/kernel/components/mdx/types.d.ts +1 -1
  109. package/dist/kernel/components/ui/breadcrumb-trail.d.ts +6 -23
  110. package/dist/kernel/components/ui/breadcrumb.d.ts +11 -3
  111. package/dist/kernel/components/ui/breadcrumb.js +6 -4
  112. package/dist/kernel/components/ui/button-group.d.ts +1 -1
  113. package/dist/kernel/components/ui/button-group.js +5 -4
  114. package/dist/kernel/components/ui/button.d.ts +2 -2
  115. package/dist/kernel/components/ui/button.js +6 -6
  116. package/dist/kernel/components/ui/card.d.ts +2 -2
  117. package/dist/kernel/components/ui/drawer.d.ts +3 -1
  118. package/dist/kernel/components/ui/drawer.js +5 -1
  119. package/dist/kernel/components/ui/input.d.ts +4 -4
  120. package/dist/kernel/components/ui/kbd.d.ts +1 -1
  121. package/dist/kernel/components/ui/kbd.js +9 -16
  122. package/dist/kernel/components/ui/link.d.ts +5 -3
  123. package/dist/kernel/components/ui/link.js +10 -9
  124. package/dist/kernel/components/ui/menu.js +5 -5
  125. package/dist/kernel/components/ui/mod-key.d.ts +10 -0
  126. package/dist/kernel/components/ui/mod-key.js +36 -0
  127. package/dist/kernel/components/ui/navigation-menu.js +2 -2
  128. package/dist/kernel/components/ui/progress.js +1 -1
  129. package/dist/kernel/components/ui/scroll-area.d.ts +8 -8
  130. package/dist/kernel/components/ui/scroll-area.js +4 -4
  131. package/dist/kernel/components/ui/select.js +7 -10
  132. package/dist/kernel/components/ui/text.d.ts +2 -2
  133. package/dist/kernel/components/ui/theme-toggle.d.ts +3 -3
  134. package/dist/kernel/components/ui/theme-toggle.js +4 -9
  135. package/dist/kernel/defaults.registry.d.ts +9 -9
  136. package/dist/kernel/defaults.registry.js +9 -9
  137. package/dist/kernel/routes/agent/markdown.d.ts +0 -1
  138. package/dist/kernel/routes/layouts/group.d.ts +1 -1
  139. package/dist/kernel/routes/metadata/feed.d.ts +1 -1
  140. package/dist/kernel/routes/metadata/feed.js +13 -9
  141. package/dist/kernel/routes/metadata/llms.d.ts +2 -1
  142. package/dist/kernel/routes/metadata/llms.js +4 -4
  143. package/dist/kernel/routes/metadata/robots.d.ts +1 -1
  144. package/dist/kernel/routes/metadata/robots.js +2 -2
  145. package/dist/kernel/routes/metadata/sitemap.d.ts +6 -3
  146. package/dist/kernel/routes/metadata/sitemap.js +48 -20
  147. package/dist/kernel/routes/pages/group.d.ts +1 -1
  148. package/dist/kernel/routes/pages/group.js +20 -12
  149. package/dist/kernel/routes/pages/leaf.d.ts +2 -2
  150. package/dist/kernel/routes/pages/leaf.js +20 -12
  151. package/dist/kernel/routes/pages/root.d.ts +2 -2
  152. package/dist/kernel/routes/pages/root.js +18 -12
  153. package/dist/resolvers/manifest-resolver.js +29 -6
  154. package/dist/search.d.ts +6 -7
  155. package/dist/search.js +47 -22
  156. package/dist/{sidebar-types-Bgchdfd6.d.ts → sidebar-types-DKpR27II.d.ts} +1 -1
  157. package/dist/{types-CIwwieNw.d.ts → types-BzkZty3r.d.ts} +23 -3
  158. package/dist/{types-DHBm7-j6.d.ts → types-CJWRG05y.d.ts} +20 -1
  159. package/dist/{types-B_b3C0U6.d.ts → types-CUtrppxt.d.ts} +8 -2
  160. package/dist/types.d.ts +14 -6
  161. package/dist/validate-local-source-XRL2Y7XE.js +14 -0
  162. package/dist/validate-publish-os-source-DAPZ4QGE.js +12 -0
  163. package/init/seed/minimal/.gitignore +1 -0
  164. package/init/seed/minimal/publish.os/assets/favicon/favicon.dark.png +0 -0
  165. package/init/seed/minimal/publish.os/assets/favicon/favicon.png +0 -0
  166. package/init/seed/minimal/publish.os/docs/content/get-started.mdx +6 -10
  167. package/init/seed/minimal/publish.os/docs/content/groups.mdx +1 -1
  168. package/init/seed/minimal/publish.os/docs/content/{theme.mdx → themes.mdx} +14 -12
  169. package/init/seed/minimal/publish.os/publish.os.config.json +3 -7
  170. package/init/seed/minimal/publish.os/theme.css +52 -24
  171. package/init/seed/minimal/publish.os/tsconfig.json +3 -0
  172. package/init/seed/minimal/seed.json +4 -1
  173. package/init/seed/scratch/publish.os/docs/content/get-started.mdx +6 -0
  174. package/init/seed/scratch/publish.os/publish.os.config.json +4 -0
  175. package/init/seed/scratch/seed.json +5 -0
  176. package/package.json +12 -26
  177. package/release/app/phosphor/package.json +3 -3
  178. package/release/app/phosphor/pnpm-lock.yaml.template +523 -360
  179. package/release/app/phosphor/pnpm-workspace.yaml +3 -0
  180. package/release/compiler/package.json +1 -1
  181. package/release/compiler/pnpm-lock.yaml.template +439 -286
  182. package/release/compiler/pnpm-workspace.yaml +3 -0
  183. package/release/release.json +7 -36
  184. package/compiler-assets/nextjs/defaults/group/leaf.tsx +0 -48
  185. package/dist/icons.d.ts +0 -1
  186. package/dist/icons.js +0 -2
  187. package/dist/kernel/components/mdx/components/pre.d.ts +0 -6
  188. package/dist/kernel/components/mdx/components/pre.js +0 -18
  189. package/dist/kernel/components/ui/meta-key.d.ts +0 -17
  190. package/dist/kernel/components/ui/meta-key.js +0 -9
  191. package/dist/kernel/framework-icons.d.ts +0 -1
  192. package/dist/kernel/framework-icons.js +0 -39
  193. package/dist/link-CYaCRDb6.d.ts +0 -35
  194. package/dist/route-metadata-og-image-BeKKFHg7.d.ts +0 -58
  195. package/dist/types-sM2g9nW0.d.ts +0 -12
  196. package/release/app/lucide/package.json +0 -30
  197. package/release/app/lucide/pnpm-lock.yaml.template +0 -2905
  198. package/release/app/lucide/pnpm-workspace.yaml +0 -11
  199. package/release/app/tabler/package.json +0 -30
  200. package/release/app/tabler/pnpm-lock.yaml.template +0 -2911
  201. package/release/app/tabler/pnpm-workspace.yaml +0 -11
@@ -0,0 +1,10 @@
1
+ import {
2
+ assertFrameworkSelection,
3
+ readCheckoutTypeScriptConfig
4
+ } from "./chunk-DLDFHU7Y.js";
5
+ import "./chunk-AI2UULNX.js";
6
+ import "./chunk-WDY4IK6Z.js";
7
+ export {
8
+ assertFrameworkSelection,
9
+ readCheckoutTypeScriptConfig
10
+ };
@@ -0,0 +1,15 @@
1
+ import {
2
+ prepareIdeSupport
3
+ } from "./chunk-UF6ATARM.js";
4
+ import "./chunk-H6XILMZX.js";
5
+ import "./chunk-NECL5IBJ.js";
6
+ import "./chunk-535TM4A5.js";
7
+ import "./chunk-WKTEO6RS.js";
8
+ import "./chunk-GGKFQ3MA.js";
9
+ import "./chunk-DLDFHU7Y.js";
10
+ import "./chunk-YLTOLYWM.js";
11
+ import "./chunk-AI2UULNX.js";
12
+ import "./chunk-WDY4IK6Z.js";
13
+ export {
14
+ prepareIdeSupport
15
+ };
package/dist/index.d.ts CHANGED
@@ -8,8 +8,8 @@ import 'next';
8
8
  type SiteData = {
9
9
  name: string;
10
10
  description?: string;
11
- url?: string;
12
- og?: OgMetadata;
11
+ origin?: string;
12
+ og?: OgIndexMetadata;
13
13
  };
14
14
  type OgImageMetadata = string | {
15
15
  src: string;
@@ -20,6 +20,9 @@ type OgMetadata = {
20
20
  description?: string;
21
21
  image?: OgImageMetadata;
22
22
  };
23
+ type OgIndexMetadata = OgMetadata & {
24
+ scope?: "page" | "subtree";
25
+ };
23
26
  type Author = {
24
27
  id?: string;
25
28
  name: string;
@@ -49,6 +52,7 @@ type PageNode = {
49
52
  fileID: string;
50
53
  title: string;
51
54
  path: string;
55
+ href?: string;
52
56
  group: string;
53
57
  description?: string;
54
58
  status: PageStatus;
@@ -64,6 +68,7 @@ type SectionNode = {
64
68
  id: string;
65
69
  title: string;
66
70
  path?: string;
71
+ href?: string;
67
72
  group?: string;
68
73
  children: TreeNode[];
69
74
  };
@@ -72,6 +77,7 @@ type FolderNode = {
72
77
  id: string;
73
78
  title: string;
74
79
  path?: string;
80
+ href?: string;
75
81
  group?: string;
76
82
  children: TreeNode[];
77
83
  };
@@ -106,7 +112,9 @@ type GroupManifest = {
106
112
  key: string;
107
113
  title: string;
108
114
  path: string;
115
+ origin?: string;
109
116
  ancestry?: string[];
117
+ og?: OgIndexMetadata;
110
118
  meta?: Record<string, unknown>;
111
119
  tree: TreeNode[];
112
120
  pages: PageData[];
@@ -195,6 +203,7 @@ type LlmsRouteOptions = {
195
203
  links?: Array<{
196
204
  title: string;
197
205
  path: string;
206
+ group?: string;
198
207
  }>;
199
208
  };
200
209
  declare function createLlmsTxtRoute(manifest: ManifestLike, options?: LlmsRouteOptions): () => Promise<Response>;
@@ -272,7 +281,10 @@ declare function createOgImageStaticParams({ manifest }: OgImageRouteConfig): {
272
281
 
273
282
  declare function createRobotsTxtRoute(manifest: ManifestLike): () => Promise<Response>;
274
283
 
275
- declare function createSitemapXmlRoute(manifest: ManifestLike): () => Promise<Response>;
284
+ type SitemapRouteOptions = {
285
+ group?: string;
286
+ };
287
+ declare function createSitemapXmlRoute(manifest: ManifestLike, options?: SitemapRouteOptions): () => Promise<Response>;
276
288
 
277
289
  type ResolvedLeaf = PageProps;
278
290
  type ResolvedGroup = Omit<IndexPageProps, "children">;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- // src/components/block/agent-actions.tsx
3
+ // src/modules/agent-actions/agent-actions.tsx
4
4
  import { AnimatedIconSwap } from "@publish.os/nextjs/kernel/components/blocks/animated-icon-swap";
5
5
  import {
6
6
  Button,
@@ -16,21 +16,18 @@ import {
16
16
  MenuPopup,
17
17
  MenuPortal,
18
18
  MenuPositioner,
19
+ MenuSeparator,
19
20
  MenuTrigger
20
21
  } from "@publish.os/nextjs/kernel/components/ui/menu";
21
22
  import {
22
- FrameworkBotIcon as Bot,
23
- FrameworkCheckIcon as Check,
24
- FrameworkChevronDownIcon as ChevronDown,
25
- FrameworkClipboardIcon as Clipboard,
26
- FrameworkExternalLinkIcon as ExternalLink,
27
- FrameworkEyeIcon as Eye,
28
- FrameworkGithubIcon as Github,
29
- FrameworkLinkIcon as Link,
30
- FrameworkMessageCircleIcon as MessageCircle
31
- } from "@publish.os/nextjs/kernel/framework-icons";
23
+ CaretDownIcon,
24
+ CheckIcon,
25
+ CopyIcon,
26
+ MarkdownLogoIcon
27
+ } from "@phosphor-icons/react/ssr";
32
28
  import { cn } from "@publish.os/nextjs/utils/cn";
33
29
  import {
30
+ Fragment,
34
31
  useCallback,
35
32
  useEffect,
36
33
  useRef,
@@ -81,42 +78,36 @@ var DEFAULT_PRIMARY_ACTION = {
81
78
  {
82
79
  id: "open-claude",
83
80
  title: "Claude",
84
- icon: /* @__PURE__ */ jsx(Bot, { "aria-hidden": "true", className: "size-4" }),
85
81
  href: ({ prompt }) => providerPromptUrl("https://claude.ai/new", prompt),
86
82
  openInNew: !0
87
83
  },
88
84
  {
89
85
  id: "open-chatgpt",
90
86
  title: "ChatGPT",
91
- icon: /* @__PURE__ */ jsx(MessageCircle, { "aria-hidden": "true", className: "size-4" }),
92
87
  href: ({ prompt }) => providerPromptUrl("https://chatgpt.com/?hints=search", prompt),
93
88
  openInNew: !0
94
89
  },
95
90
  {
96
91
  id: "open-cursor",
97
92
  title: "Cursor",
98
- icon: /* @__PURE__ */ jsx(ExternalLink, { "aria-hidden": "true", className: "size-4" }),
99
93
  href: ({ prompt }) => providerPromptUrl("https://cursor.com/link/prompt", prompt, "text"),
100
94
  openInNew: !0
101
95
  },
102
96
  {
103
97
  id: "open-copilot",
104
98
  title: "Copilot",
105
- icon: /* @__PURE__ */ jsx(MessageCircle, { "aria-hidden": "true", className: "size-4" }),
106
99
  href: ({ prompt }) => providerPromptUrl("https://copilot.microsoft.com/", prompt),
107
100
  openInNew: !0
108
101
  },
109
102
  {
110
103
  id: "open-t3-chat",
111
104
  title: "T3 Chat",
112
- icon: /* @__PURE__ */ jsx(MessageCircle, { "aria-hidden": "true", className: "size-4" }),
113
105
  href: ({ prompt }) => providerPromptUrl("https://t3.chat/new", prompt),
114
106
  openInNew: !0
115
107
  },
116
108
  {
117
109
  id: "open-github",
118
110
  title: "GitHub source",
119
- icon: /* @__PURE__ */ jsx(Github, { "aria-hidden": "true", className: "size-4" }),
120
111
  href: ({ sourceUrl }) => sourceUrl,
121
112
  openInNew: !0,
122
113
  disabled: ({ sourceUrl }) => !sourceUrl
@@ -135,13 +126,11 @@ var DEFAULT_PRIMARY_ACTION = {
135
126
  {
136
127
  id: "view-page-markdown",
137
128
  title: "View as Markdown",
138
- icon: /* @__PURE__ */ jsx(Eye, { "aria-hidden": "true", className: "size-4" }),
139
129
  href: ({ markdownPath }) => markdownPath
140
130
  },
141
131
  {
142
132
  id: "copy-page-link",
143
133
  title: "Copy page link",
144
- icon: /* @__PURE__ */ jsx(Link, { "aria-hidden": "true", className: "size-4" }),
145
134
  copy: "page-link"
146
135
  }
147
136
  ]
@@ -155,7 +144,7 @@ async function copyText(text) {
155
144
  }
156
145
  function AgentActions({
157
146
  actionGroups,
158
- buttonSize = "sm",
147
+ buttonSize = "xs",
159
148
  buttonVariant = "outline",
160
149
  className,
161
150
  markdown,
@@ -223,11 +212,11 @@ function AgentActions({
223
212
  AnimatedIconSwap,
224
213
  {
225
214
  active: copied,
226
- activeIcon: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "size-4" }),
227
- defaultIcon: action.icon ?? /* @__PURE__ */ jsx(Clipboard, { "aria-hidden": "true", className: "size-4" }),
215
+ activeIcon: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }),
216
+ defaultIcon: action.icon ?? /* @__PURE__ */ jsx(CopyIcon, { "aria-hidden": "true", className: "size-4" }),
228
217
  size: 16
229
218
  }
230
- ) : copied ? /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "size-4" }) : action.icon;
219
+ ) : copied ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: "size-4" }) : action.icon;
231
220
  }, renderPrimaryAction = () => {
232
221
  let href = resolveValue(resolvedPrimaryAction.href, context), disabled = resolveValue(resolvedPrimaryAction.disabled, context), target = resolvedPrimaryAction.target ?? (resolvedPrimaryAction.openInNew ? "_blank" : void 0), rel = target === "_blank" ? mergeRel(resolvedPrimaryAction.rel) : void 0;
233
222
  return href && !resolvedPrimaryAction.copy && !resolvedPrimaryAction.onSelect ? /* @__PURE__ */ jsxs(
@@ -265,8 +254,8 @@ function AgentActions({
265
254
  }
266
255
  );
267
256
  }, renderMenuAction = (action) => {
268
- let href = resolveValue(action.href, context), disabled = resolveValue(action.disabled, context), icon = iconForAction(action), target = action.target ?? (action.openInNew ? "_blank" : void 0), rel = target === "_blank" ? mergeRel(action.rel) : void 0, label = action.title;
269
- return href && !action.copy && !action.onSelect && !disabled ? /* @__PURE__ */ jsxs(
257
+ 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;
258
+ return href && !action.copy && !action.onSelect && !disabled ? /* @__PURE__ */ jsx(
270
259
  MenuLinkItem,
271
260
  {
272
261
  closeOnClick: !0,
@@ -274,67 +263,88 @@ function AgentActions({
274
263
  onClick: closeMenu,
275
264
  rel,
276
265
  target,
277
- children: [
278
- icon,
279
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
280
- ]
266
+ children: /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
281
267
  },
282
268
  action.id
283
- ) : /* @__PURE__ */ jsxs(
269
+ ) : /* @__PURE__ */ jsx(
284
270
  MenuItem,
285
271
  {
286
272
  disabled: !!disabled,
287
273
  onClick: () => {
288
274
  handleAction(action);
289
275
  },
290
- children: [
291
- icon,
292
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
293
- ]
276
+ children: /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: label })
294
277
  },
295
278
  action.id
296
279
  );
297
280
  };
298
- return /* @__PURE__ */ jsx(
281
+ return /* @__PURE__ */ jsxs(
299
282
  "div",
300
283
  {
301
- className: cn("inline-flex", className),
284
+ className: cn(
285
+ "inline-flex flex-wrap items-center gap-x-3 gap-y-2",
286
+ className
287
+ ),
302
288
  "data-slot": "agent-actions",
303
289
  ...props,
304
- children: /* @__PURE__ */ jsxs(ButtonGroup, { children: [
305
- renderPrimaryAction(),
306
- /* @__PURE__ */ jsx(ButtonGroupSeparator, {}),
290
+ children: [
307
291
  /* @__PURE__ */ jsxs(
308
- Menu,
292
+ "a",
309
293
  {
310
- actionsRef: menuActionsRef,
311
- modal: !1,
312
- onOpenChange: setMenuOpenState,
313
- open: menuOpen,
294
+ 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",
295
+ "data-slot": "agent-actions-markdown-link",
296
+ href: resolvedMarkdownPath,
314
297
  children: [
315
298
  /* @__PURE__ */ jsx(
316
- MenuTrigger,
299
+ MarkdownLogoIcon,
317
300
  {
318
- "aria-label": menuLabel,
319
- className: cn(
320
- buttonVariants({
321
- iconOnly: !0,
322
- size: buttonSize,
323
- variant: buttonVariant
324
- }),
325
- "data-[popup-open]:!rounded-r-button"
326
- ),
327
- children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: "size-4" })
301
+ "aria-hidden": "true",
302
+ className: "size-4 shrink-0",
303
+ weight: "fill"
328
304
  }
329
305
  ),
330
- /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { align: "end", children: /* @__PURE__ */ jsx(MenuPopup, { className: "min-w-56", children: resolvedActionGroups.map((group) => /* @__PURE__ */ jsxs(MenuGroup, { children: [
331
- group.title ? /* @__PURE__ */ jsx(MenuGroupLabel, { children: group.title }) : null,
332
- group.actions.map(renderMenuAction)
333
- ] }, group.id)) }) }) })
306
+ /* @__PURE__ */ jsx("span", { children: "View as Markdown" })
334
307
  ]
335
308
  }
336
- )
337
- ] })
309
+ ),
310
+ /* @__PURE__ */ jsxs(ButtonGroup, { children: [
311
+ renderPrimaryAction(),
312
+ /* @__PURE__ */ jsx(ButtonGroupSeparator, {}),
313
+ /* @__PURE__ */ jsxs(
314
+ Menu,
315
+ {
316
+ actionsRef: menuActionsRef,
317
+ modal: !1,
318
+ onOpenChange: setMenuOpenState,
319
+ open: menuOpen,
320
+ children: [
321
+ /* @__PURE__ */ jsx(
322
+ MenuTrigger,
323
+ {
324
+ "aria-label": menuLabel,
325
+ className: cn(
326
+ buttonVariants({
327
+ iconOnly: !0,
328
+ size: buttonSize,
329
+ variant: buttonVariant
330
+ }),
331
+ "data-popup-open:rounded-r-button!"
332
+ ),
333
+ children: /* @__PURE__ */ jsx(CaretDownIcon, { "aria-hidden": "true", className: "size-4" })
334
+ }
335
+ ),
336
+ /* @__PURE__ */ jsx(MenuPortal, { children: /* @__PURE__ */ jsx(MenuPositioner, { align: "end", children: /* @__PURE__ */ jsx(MenuPopup, { className: "min-w-56", children: resolvedActionGroups.map((group, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
337
+ index > 0 ? /* @__PURE__ */ jsx(MenuSeparator, {}) : null,
338
+ /* @__PURE__ */ jsxs(MenuGroup, { children: [
339
+ group.title ? /* @__PURE__ */ jsx(MenuGroupLabel, { children: group.title }) : null,
340
+ group.actions.map(renderMenuAction)
341
+ ] })
342
+ ] }, group.id)) }) }) })
343
+ ]
344
+ }
345
+ )
346
+ ] })
347
+ ]
338
348
  }
339
349
  );
340
350
  }
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
5
5
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
6
6
 
7
7
  declare const tabsListVariants: (props?: ({
8
- variant?: "base" | "button" | "underline" | null | undefined;
8
+ variant?: "button" | "underline" | "base" | null | undefined;
9
9
  } & class_variance_authority_types.ClassProp) | undefined) => string;
10
10
  type TabsVariantProps = VariantProps<typeof tabsListVariants>;
11
11
  type TabsIndicatorAnimation = "grow" | "slide";
@@ -3,6 +3,7 @@
3
3
  // src/modules/design-system/design-system-preview.tsx
4
4
  import { AnimatedIconSwap } from "@publish.os/nextjs/kernel/components/blocks/animated-icon-swap";
5
5
  import ColorPalette from "@publish.os/nextjs/kernel/components/blocks/color-palette";
6
+ import { Callout } from "@publish.os/nextjs/kernel/components/mdx/components/callout";
6
7
  import { InlineCode } from "@publish.os/nextjs/kernel/components/mdx/components/inline-code";
7
8
  import {
8
9
  Accordion,
@@ -59,7 +60,7 @@ import {
59
60
  MenuPositioner,
60
61
  MenuTrigger
61
62
  } from "@publish.os/nextjs/kernel/components/ui/menu";
62
- import { MetaKey } from "@publish.os/nextjs/kernel/components/ui/meta-key";
63
+ import { ModKey } from "@publish.os/nextjs/kernel/components/ui/mod-key";
63
64
  import {
64
65
  Popover,
65
66
  PopoverPopup,
@@ -124,10 +125,7 @@ import {
124
125
  TooltipProvider,
125
126
  TooltipTrigger
126
127
  } from "@publish.os/nextjs/kernel/components/ui/tooltip";
127
- import {
128
- FrameworkCheckIcon as Check,
129
- FrameworkCopyIcon as Copy
130
- } from "@publish.os/nextjs/kernel/framework-icons";
128
+ import { CheckIcon, CopyIcon } from "@phosphor-icons/react/ssr";
131
129
  import { useState } from "react";
132
130
  import { jsx, jsxs } from "react/jsx-runtime";
133
131
  var tabs = [
@@ -448,8 +446,8 @@ function UiPreview({ items = [] }) {
448
446
  /* @__PURE__ */ jsx(AccordionHeader, { children: /* @__PURE__ */ jsx(AccordionTrigger, { children: "Section" }) }),
449
447
  /* @__PURE__ */ jsx(AccordionPanel, { children: "Expandable content preview." })
450
448
  ] }) }) }),
451
- /* @__PURE__ */ jsx(PreviewCell, { name: "MetaKey", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
452
- /* @__PURE__ */ jsx(MetaKey, {}),
449
+ /* @__PURE__ */ jsx(PreviewCell, { name: "ModKey", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
450
+ /* @__PURE__ */ jsx(ModKey, {}),
453
451
  /* @__PURE__ */ jsx(Kbd, { children: "K" })
454
452
  ] }) }),
455
453
  /* @__PURE__ */ jsx(PreviewCell, { name: "Toast", children: /* @__PURE__ */ jsx(ToastProvider, { children: /* @__PURE__ */ jsx(Toast, { className: "w-full max-w-xs", toast: { id: "preview" }, children: /* @__PURE__ */ jsxs(ToastContent, { children: [
@@ -510,10 +508,31 @@ function MdxPreview({ items = [] }) {
510
508
  ] }),
511
509
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-medium leading-7 text-foreground-1", children: /* @__PURE__ */ jsx(Link, { color: "accent", href: "/ds", variant: "link.standalone", children: "Linked heading" }) })
512
510
  ] }) }),
513
- /* @__PURE__ */ jsx(PreviewCell, { name: "Callout", children: /* @__PURE__ */ jsxs("div", { className: "max-w-xs rounded-card border border-stroke-2 bg-surface-2 p-4 text-sm leading-6 text-foreground-2", children: [
514
- /* @__PURE__ */ jsx("p", { className: "font-medium text-foreground-1", children: "Note" }),
515
- /* @__PURE__ */ jsx("p", { className: "mt-1", children: "A compact MDX callout preview." })
516
- ] }) }),
511
+ /* @__PURE__ */ jsx(PreviewCell, { name: "Callout", children: /* @__PURE__ */ jsx("div", { className: "grid w-full max-w-xl gap-3", children: ["neutral", "info", "warning", "danger", "success"].map(
512
+ (color) => ["solid", "soft", "outline"].map((variant) => /* @__PURE__ */ jsxs(
513
+ Callout,
514
+ {
515
+ color,
516
+ title: `${color} \xB7 ${variant}`,
517
+ variant,
518
+ children: [
519
+ /* @__PURE__ */ jsxs("p", { children: [
520
+ "A callout with ",
521
+ /* @__PURE__ */ jsx("strong", { children: "rich text" }),
522
+ ",",
523
+ " ",
524
+ /* @__PURE__ */ jsx(InlineCode, { children: "inline code" }),
525
+ ", and a",
526
+ " ",
527
+ /* @__PURE__ */ jsx("a", { href: "#callout", children: "link" }),
528
+ "."
529
+ ] }),
530
+ /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: "Content stays readable at narrow widths." }) })
531
+ ]
532
+ },
533
+ `${color}-${variant}`
534
+ ))
535
+ ) }) }),
517
536
  /* @__PURE__ */ jsx(PreviewCell, { name: "Table", children: /* @__PURE__ */ jsx("div", { className: "w-full max-w-xs", children: /* @__PURE__ */ jsxs(Table, { children: [
518
537
  /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
519
538
  /* @__PURE__ */ jsx(TableHead, { children: "Token" }),
@@ -540,8 +559,8 @@ function CopyToClipboardPreview() {
540
559
  AnimatedIconSwap,
541
560
  {
542
561
  active: copied,
543
- activeIcon: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true" }),
544
- defaultIcon: /* @__PURE__ */ jsx(Copy, { "aria-hidden": "true" }),
562
+ activeIcon: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true" }),
563
+ defaultIcon: /* @__PURE__ */ jsx(CopyIcon, { "aria-hidden": "true" }),
545
564
  size: 16
546
565
  }
547
566
  ),
@@ -193,7 +193,7 @@ function SegmentedControl({
193
193
  "button",
194
194
  {
195
195
  className: cn(
196
- "h-8 rounded-[max(calc(var(--radius-button)_-_0.25rem),0px)] px-2 text-xs font-medium capitalize text-foreground-3 transition-colors",
196
+ "h-8 rounded-[max(calc(var(--radius-button)-0.25rem),0px)] px-2 text-xs font-medium capitalize text-foreground-3 transition-colors",
197
197
  option === value && "bg-surface-1 text-foreground-1 shadow-sm"
198
198
  ),
199
199
  onClick: () => onChange(option),
@@ -727,7 +727,7 @@ function LinkPlayground() {
727
727
  /* @__PURE__ */ jsx(
728
728
  "textarea",
729
729
  {
730
- className: "min-h-[26rem] resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
730
+ className: "min-h-104 resize-none rounded-panel border border-stroke-2 bg-surface-2 p-3 font-mono text-xs leading-5 text-foreground-1 outline-none focus:border-accent-1",
731
731
  readOnly: !0,
732
732
  value: output
733
733
  }
@@ -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;
@@ -1,4 +1,4 @@
1
- // src/components/block/navigation/nav-breadcrumb.tsx
1
+ // src/components/block/navbar/nav-breadcrumb.tsx
2
2
  import { CollapsibleBreadcrumbTrail } from "@publish.os/nextjs/kernel/components/ui/breadcrumb-trail";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  function titleFor(node) {
@@ -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 };