cortena-ui 1.3.0 → 1.4.0

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 (280) hide show
  1. package/README.md +74 -3
  2. package/dist/a2ui/catalogue-doc.d.ts +44 -0
  3. package/dist/a2ui/catalogue-doc.js +169 -0
  4. package/dist/a2ui/catalogue-doc.js.map +1 -0
  5. package/dist/a2ui/catalogue.d.ts +44 -0
  6. package/dist/a2ui/catalogue.js +942 -0
  7. package/dist/a2ui/catalogue.js.map +1 -0
  8. package/dist/a2ui/index.d.ts +7 -0
  9. package/dist/a2ui/message.d.ts +232 -0
  10. package/dist/a2ui/message.js +365 -0
  11. package/dist/a2ui/message.js.map +1 -0
  12. package/dist/a2ui/renderer.d.ts +46 -0
  13. package/dist/a2ui/renderer.js +252 -0
  14. package/dist/a2ui/renderer.js.map +1 -0
  15. package/dist/a2ui/views.d.ts +80 -0
  16. package/dist/a2ui/views.js +596 -0
  17. package/dist/a2ui/views.js.map +1 -0
  18. package/dist/a2ui.d.ts +8 -0
  19. package/dist/a2ui.js +7 -0
  20. package/dist/chart.d.ts +9 -0
  21. package/dist/chart.js +9 -0
  22. package/dist/components/accordion.d.ts +22 -0
  23. package/dist/components/accordion.js +63 -0
  24. package/dist/components/accordion.js.map +1 -0
  25. package/dist/components/alert.d.ts +15 -0
  26. package/dist/components/alert.js +64 -0
  27. package/dist/components/alert.js.map +1 -0
  28. package/dist/components/avatar.d.ts +18 -0
  29. package/dist/components/avatar.js +40 -0
  30. package/dist/components/avatar.js.map +1 -0
  31. package/dist/components/badge.d.ts +12 -0
  32. package/dist/components/badge.js +47 -0
  33. package/dist/components/badge.js.map +1 -0
  34. package/dist/components/breadcrumb.d.ts +71 -0
  35. package/dist/components/breadcrumb.js +123 -0
  36. package/dist/components/breadcrumb.js.map +1 -0
  37. package/dist/components/button-link.d.ts +28 -0
  38. package/dist/components/button-link.js +24 -0
  39. package/dist/components/button-link.js.map +1 -0
  40. package/dist/components/button.d.ts +24 -0
  41. package/dist/components/button.js +65 -0
  42. package/dist/components/button.js.map +1 -0
  43. package/dist/components/calendar.d.ts +28 -0
  44. package/dist/components/calendar.js +123 -0
  45. package/dist/components/calendar.js.map +1 -0
  46. package/dist/components/card.d.ts +32 -0
  47. package/dist/components/card.js +57 -0
  48. package/dist/components/card.js.map +1 -0
  49. package/dist/components/chart/chart.d.ts +71 -0
  50. package/dist/components/chart/chart.js +167 -0
  51. package/dist/components/chart/chart.js.map +1 -0
  52. package/dist/components/chart/container.d.ts +88 -0
  53. package/dist/components/chart/container.js +189 -0
  54. package/dist/components/chart/container.js.map +1 -0
  55. package/dist/components/chart/data.js +128 -0
  56. package/dist/components/chart/data.js.map +1 -0
  57. package/dist/components/chart/index.d.ts +9 -0
  58. package/dist/components/chart/index.js +10 -0
  59. package/dist/components/chart/nivo-charts.js +225 -0
  60. package/dist/components/chart/nivo-charts.js.map +1 -0
  61. package/dist/components/chart/nivo-lazy.js +50 -0
  62. package/dist/components/chart/nivo-lazy.js.map +1 -0
  63. package/dist/components/chart/nivo-theme.d.ts +156 -0
  64. package/dist/components/chart/nivo-theme.js +161 -0
  65. package/dist/components/chart/nivo-theme.js.map +1 -0
  66. package/dist/components/chart/recharts-charts.js +276 -0
  67. package/dist/components/chart/recharts-charts.js.map +1 -0
  68. package/dist/components/chart/recharts-lazy.js +58 -0
  69. package/dist/components/chart/recharts-lazy.js.map +1 -0
  70. package/dist/components/chart/recharts-parts.d.ts +10 -0
  71. package/dist/components/chart/recharts-parts.js +25 -0
  72. package/dist/components/chart/recharts-parts.js.map +1 -0
  73. package/dist/components/chart/tokens.d.ts +62 -0
  74. package/dist/components/chart/tokens.js +192 -0
  75. package/dist/components/chart/tokens.js.map +1 -0
  76. package/dist/components/chart/types.d.ts +114 -0
  77. package/dist/components/chart/types.js +27 -0
  78. package/dist/components/chart/types.js.map +1 -0
  79. package/dist/components/checkbox.d.ts +20 -0
  80. package/dist/components/checkbox.js +24 -0
  81. package/dist/components/checkbox.js.map +1 -0
  82. package/dist/components/chip.d.ts +17 -0
  83. package/dist/components/chip.js +47 -0
  84. package/dist/components/chip.js.map +1 -0
  85. package/dist/components/combobox.d.ts +76 -0
  86. package/dist/components/combobox.js +201 -0
  87. package/dist/components/combobox.js.map +1 -0
  88. package/dist/components/command.d.ts +50 -0
  89. package/dist/components/command.js +117 -0
  90. package/dist/components/command.js.map +1 -0
  91. package/dist/components/data-table/data-table.d.ts +65 -0
  92. package/dist/components/data-table/data-table.js +588 -0
  93. package/dist/components/data-table/data-table.js.map +1 -0
  94. package/dist/components/data-table/export.d.ts +23 -0
  95. package/dist/components/data-table/export.js +95 -0
  96. package/dist/components/data-table/export.js.map +1 -0
  97. package/dist/components/data-table/features.d.ts +66 -0
  98. package/dist/components/data-table/features.js +103 -0
  99. package/dist/components/data-table/features.js.map +1 -0
  100. package/dist/components/data-table/index.d.ts +8 -0
  101. package/dist/components/data-table/parts.d.ts +79 -0
  102. package/dist/components/data-table/parts.js +400 -0
  103. package/dist/components/data-table/parts.js.map +1 -0
  104. package/dist/components/data-table/system-columns.js +84 -0
  105. package/dist/components/data-table/system-columns.js.map +1 -0
  106. package/dist/components/data-table/types.d.ts +172 -0
  107. package/dist/components/data-table/use-data-table.d.ts +19 -0
  108. package/dist/components/data-table/use-data-table.js +171 -0
  109. package/dist/components/data-table/use-data-table.js.map +1 -0
  110. package/dist/components/data-table/use-server-source.js +200 -0
  111. package/dist/components/data-table/use-server-source.js.map +1 -0
  112. package/dist/components/date-field.d.ts +54 -0
  113. package/dist/components/date-field.js +235 -0
  114. package/dist/components/date-field.js.map +1 -0
  115. package/dist/components/date-picker.d.ts +42 -0
  116. package/dist/components/date-picker.js +125 -0
  117. package/dist/components/date-picker.js.map +1 -0
  118. package/dist/components/dialog.d.ts +36 -0
  119. package/dist/components/dialog.js +97 -0
  120. package/dist/components/dialog.js.map +1 -0
  121. package/dist/components/dropdown-menu.d.ts +54 -0
  122. package/dist/components/dropdown-menu.js +191 -0
  123. package/dist/components/dropdown-menu.js.map +1 -0
  124. package/dist/components/dropzone.d.ts +48 -0
  125. package/dist/components/dropzone.js +185 -0
  126. package/dist/components/dropzone.js.map +1 -0
  127. package/dist/components/empty-state.d.ts +22 -0
  128. package/dist/components/empty-state.js +46 -0
  129. package/dist/components/empty-state.js.map +1 -0
  130. package/dist/components/error-banner.d.ts +17 -0
  131. package/dist/components/error-banner.js +52 -0
  132. package/dist/components/error-banner.js.map +1 -0
  133. package/dist/components/field.d.ts +64 -0
  134. package/dist/components/field.js +133 -0
  135. package/dist/components/field.js.map +1 -0
  136. package/dist/components/form.d.ts +37 -0
  137. package/dist/components/form.js +103 -0
  138. package/dist/components/form.js.map +1 -0
  139. package/dist/components/input.d.ts +17 -0
  140. package/dist/components/input.js +26 -0
  141. package/dist/components/input.js.map +1 -0
  142. package/dist/components/kbd.d.ts +11 -0
  143. package/dist/components/kbd.js +20 -0
  144. package/dist/components/kbd.js.map +1 -0
  145. package/dist/components/label.d.ts +14 -0
  146. package/dist/components/label.js +28 -0
  147. package/dist/components/label.js.map +1 -0
  148. package/dist/components/loading-skeleton.d.ts +22 -0
  149. package/dist/components/loading-skeleton.js +123 -0
  150. package/dist/components/loading-skeleton.js.map +1 -0
  151. package/dist/components/markdown.d.ts +44 -0
  152. package/dist/components/markdown.js +231 -0
  153. package/dist/components/markdown.js.map +1 -0
  154. package/dist/components/page-header.d.ts +26 -0
  155. package/dist/components/page-header.js +53 -0
  156. package/dist/components/page-header.js.map +1 -0
  157. package/dist/components/popover.d.ts +29 -0
  158. package/dist/components/popover.js +74 -0
  159. package/dist/components/popover.js.map +1 -0
  160. package/dist/components/progress.d.ts +22 -0
  161. package/dist/components/progress.js +49 -0
  162. package/dist/components/progress.js.map +1 -0
  163. package/dist/components/radio-group.d.ts +20 -0
  164. package/dist/components/radio-group.js +29 -0
  165. package/dist/components/radio-group.js.map +1 -0
  166. package/dist/components/scroll-area.d.ts +25 -0
  167. package/dist/components/scroll-area.js +39 -0
  168. package/dist/components/scroll-area.js.map +1 -0
  169. package/dist/components/section-card.d.ts +29 -0
  170. package/dist/components/section-card.js +55 -0
  171. package/dist/components/section-card.js.map +1 -0
  172. package/dist/components/segmented.d.ts +27 -0
  173. package/dist/components/segmented.js +32 -0
  174. package/dist/components/segmented.js.map +1 -0
  175. package/dist/components/select.d.ts +62 -0
  176. package/dist/components/select.js +97 -0
  177. package/dist/components/select.js.map +1 -0
  178. package/dist/components/separator.d.ts +19 -0
  179. package/dist/components/separator.js +23 -0
  180. package/dist/components/separator.js.map +1 -0
  181. package/dist/components/sheet.d.ts +35 -0
  182. package/dist/components/sheet.js +131 -0
  183. package/dist/components/sheet.js.map +1 -0
  184. package/dist/components/skeleton.d.ts +12 -0
  185. package/dist/components/skeleton.js +22 -0
  186. package/dist/components/skeleton.js.map +1 -0
  187. package/dist/components/sortable-list.d.ts +67 -0
  188. package/dist/components/sortable-list.js +206 -0
  189. package/dist/components/sortable-list.js.map +1 -0
  190. package/dist/components/spinner.d.ts +29 -0
  191. package/dist/components/spinner.js +34 -0
  192. package/dist/components/spinner.js.map +1 -0
  193. package/dist/components/status-dot.d.ts +26 -0
  194. package/dist/components/status-dot.js +47 -0
  195. package/dist/components/status-dot.js.map +1 -0
  196. package/dist/components/switch.d.ts +21 -0
  197. package/dist/components/switch.js +21 -0
  198. package/dist/components/switch.js.map +1 -0
  199. package/dist/components/tabs.d.ts +24 -0
  200. package/dist/components/tabs.js +60 -0
  201. package/dist/components/tabs.js.map +1 -0
  202. package/dist/components/textarea.d.ts +19 -0
  203. package/dist/components/textarea.js +47 -0
  204. package/dist/components/textarea.js.map +1 -0
  205. package/dist/components/toast.d.ts +47 -0
  206. package/dist/components/toast.js +106 -0
  207. package/dist/components/toast.js.map +1 -0
  208. package/dist/components/toolbar.d.ts +19 -0
  209. package/dist/components/toolbar.js +45 -0
  210. package/dist/components/toolbar.js.map +1 -0
  211. package/dist/components/tooltip.d.ts +28 -0
  212. package/dist/components/tooltip.js +59 -0
  213. package/dist/components/tooltip.js.map +1 -0
  214. package/dist/core.d.ts +44 -0
  215. package/dist/core.js +44 -0
  216. package/dist/data-table.d.ts +9 -0
  217. package/dist/data-table.js +7 -0
  218. package/dist/form.d.ts +7 -0
  219. package/dist/form.js +7 -0
  220. package/dist/hooks/use-cortena-theme.d.ts +98 -0
  221. package/dist/hooks/use-cortena-theme.js +145 -0
  222. package/dist/hooks/use-cortena-theme.js.map +1 -0
  223. package/dist/index.d.ts +75 -2678
  224. package/dist/index.js +66 -8598
  225. package/dist/lib/cn.d.ts +10 -0
  226. package/dist/lib/cn.js +15 -0
  227. package/dist/lib/cn.js.map +1 -0
  228. package/dist/lib/render.d.ts +23 -0
  229. package/dist/lib/render.js +20 -0
  230. package/dist/lib/render.js.map +1 -0
  231. package/dist/lib/shakeable.js +39 -0
  232. package/dist/lib/shakeable.js.map +1 -0
  233. package/dist/markdown.d.ts +3 -0
  234. package/dist/markdown.js +3 -0
  235. package/dist/sortable-list.d.ts +3 -0
  236. package/dist/sortable-list.js +3 -0
  237. package/package.json +37 -14
  238. package/src/a2ui/catalogue.ts +140 -103
  239. package/src/a2ui/views.tsx +5 -2
  240. package/src/components/alert.tsx +1 -1
  241. package/src/components/badge.tsx +1 -1
  242. package/src/components/button.tsx +1 -1
  243. package/src/components/chart/chart.tsx +72 -25
  244. package/src/components/chart/container.tsx +24 -39
  245. package/src/components/chart/index.tsx +4 -2
  246. package/src/components/chart/nivo-charts.tsx +41 -13
  247. package/src/components/chart/nivo-lazy.tsx +52 -0
  248. package/src/components/chart/recharts-charts.tsx +98 -3
  249. package/src/components/chart/recharts-lazy.tsx +72 -0
  250. package/src/components/chart/recharts-parts.tsx +34 -0
  251. package/src/components/chart/tokens.ts +1 -1
  252. package/src/components/chart/types.ts +14 -0
  253. package/src/components/chip.tsx +1 -1
  254. package/src/components/combobox.tsx +2 -2
  255. package/src/components/data-table/export.ts +18 -2
  256. package/src/components/data-table/features.ts +77 -45
  257. package/src/components/data-table/parts.tsx +15 -0
  258. package/src/components/data-table/use-data-table.ts +7 -2
  259. package/src/components/data-table/use-server-source.ts +17 -4
  260. package/src/components/date-field.tsx +1 -1
  261. package/src/components/error-banner.tsx +1 -1
  262. package/src/components/field.tsx +2 -2
  263. package/src/components/form.tsx +2 -2
  264. package/src/components/input.tsx +1 -1
  265. package/src/components/label.tsx +1 -1
  266. package/src/components/markdown.tsx +5 -4
  267. package/src/components/sheet.tsx +2 -2
  268. package/src/components/sortable-list.tsx +2 -2
  269. package/src/components/textarea.tsx +1 -1
  270. package/src/components/toast.tsx +1 -1
  271. package/src/entries/a2ui.ts +11 -0
  272. package/src/entries/chart.ts +10 -0
  273. package/src/entries/core.ts +91 -0
  274. package/src/entries/data-table.ts +9 -0
  275. package/src/entries/form.ts +24 -0
  276. package/src/entries/markdown.ts +9 -0
  277. package/src/entries/sortable-list.ts +13 -0
  278. package/src/index.ts +32 -98
  279. package/src/lib/shakeable.ts +33 -0
  280. package/dist/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"views.js","names":[],"sources":["../../src/a2ui/views.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * The cortena-ui side of the A2UI catalogue.\n *\n * One React view per catalogue entry. Each is a real component, not a render\n * function, so an interactive entry can hold hooks (draft input state, the\n * debounce timer) without the renderer having to care which entries are\n * stateful.\n *\n * Views receive already-resolved props: the renderer has read the data\n * bindings, validated against the entry's zod schema and normalised actions\n * before any of this runs. A view therefore never parses A2UI, and never sees\n * an unvalidated value.\n *\n * Every visual value is a cortena-design token, as everywhere else in the\n * package. The Tailwind scale maps below exist because Tailwind only emits a\n * class it can see in the source, so `gap-${n}` would silently produce nothing.\n */\n\nimport { AlertTriangle, CheckCircle2, Info, OctagonAlert, Terminal } from \"lucide-react\";\nimport * as React from \"react\";\nimport { Alert, AlertDescription, AlertIcon, AlertTitle } from \"@/components/alert\";\nimport { Badge } from \"@/components/badge\";\nimport { Button } from \"@/components/button\";\nimport { ButtonLink } from \"@/components/button-link\";\nimport { Card, CardContent } from \"@/components/card\";\n// Straight at the composite, not at `@/components/chart`: the chart module's\n// index re-exports the raw Recharts primitives, and reaching the catalogue\n// through it puts them in A2UI's static graph for nothing.\nimport { Chart } from \"@/components/chart/chart\";\nimport type { ChartDataFor, ChartType } from \"@/components/chart/types\";\nimport { Checkbox } from \"@/components/checkbox\";\nimport { DataTable } from \"@/components/data-table\";\nimport type { DataSource, DataTableColumnDef } from \"@/components/data-table\";\nimport { DateField, formatDateISO, parseDateISO } from \"@/components/date-field\";\nimport { EmptyState } from \"@/components/empty-state\";\nimport { Field, FieldDescription, FieldError, FieldLabel } from \"@/components/field\";\nimport { Input } from \"@/components/input\";\nimport { Markdown } from \"@/components/markdown\";\nimport { Progress, ProgressLabel, ProgressValue } from \"@/components/progress\";\nimport { RadioGroup, RadioGroupItem } from \"@/components/radio-group\";\nimport { SectionCard } from \"@/components/section-card\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/select\";\nimport { Separator } from \"@/components/separator\";\nimport { StatusDot } from \"@/components/status-dot\";\nimport { Switch } from \"@/components/switch\";\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/tabs\";\nimport { Textarea } from \"@/components/textarea\";\nimport { cn } from \"@/lib/cn\";\nimport type { A2UIAction } from \"./message\";\n\n/** A row in an agent-drawn table. Every value is opaque until a column reads it. */\nexport type A2UIRow = Record<string, unknown>;\n\n/** Where a node sits, carried into every action the view emits. */\nexport interface A2UINodeInfo {\n surfaceId: string;\n componentId: string;\n /** JSON pointer this node's relative bindings resolve against. */\n dataContextPath: string;\n}\n\n/** A normalised action attached to an interactive property. */\nexport interface A2UIResolvedAction {\n name: string;\n context?: Record<string, unknown>;\n}\n\n/** What every view receives. */\nexport interface A2UIViewProps<P> {\n props: P;\n node: A2UINodeInfo;\n /** Already-rendered child nodes, in the order the component listed them. */\n children: React.ReactNode[];\n /** The surface data model, for actions that report the whole form. */\n dataModel: Record<string, unknown>;\n /**\n * Send an action. `action` is what the agent attached to the property; when\n * it is absent the event still fires under `fallbackName` so a host can\n * observe interactions the agent did not ask for.\n */\n emit: (\n action: A2UIResolvedAction | undefined,\n fallbackName: string,\n payload?: Record<string, unknown>,\n ) => void;\n /** Write a value back to the data model where this prop was bound. No-op for a literal. */\n writeBack: (property: string, value: unknown) => void;\n /** Resolve a `{ kind: \"server\", sourceId }` handle into a real data source. */\n resolveDataSource: (sourceId: string) => DataSource<A2UIRow> | undefined;\n /** Debounce applied to continuous inputs before they become actions. */\n debounceMs: number;\n}\n\nexport type A2UIView<P> = React.FC<A2UIViewProps<P>>;\n\n/* ------------------------------------------------------------------ */\n/* Shared scales */\n/* ------------------------------------------------------------------ */\n\n/** Tailwind spacing steps an agent may pick. Written out so Tailwind emits them. */\nconst GAP: Record<number, string> = {\n 0: \"gap-0\",\n 1: \"gap-1\",\n 2: \"gap-2\",\n 3: \"gap-3\",\n 4: \"gap-4\",\n 6: \"gap-6\",\n 8: \"gap-8\",\n};\n\nconst PADDING: Record<number, string> = {\n 0: \"p-0\",\n 1: \"p-1\",\n 2: \"p-2\",\n 3: \"p-3\",\n 4: \"p-4\",\n 6: \"p-6\",\n 8: \"p-8\",\n};\n\nconst HEIGHT: Record<number, string> = {\n 0: \"h-0\",\n 1: \"h-1\",\n 2: \"h-2\",\n 3: \"h-3\",\n 4: \"h-4\",\n 6: \"h-6\",\n 8: \"h-8\",\n};\n\nconst ALIGN: Record<string, string> = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\",\n};\n\nconst JUSTIFY: Record<string, string> = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n};\n\nconst TEXT_ALIGN: Record<string, string> = {\n start: \"text-left\",\n center: \"text-center\",\n end: \"text-right\",\n};\n\nconst TEXT_ROLE: Record<string, string> = {\n heading:\n \"font-display text-[length:var(--ds-text-h3)] leading-[var(--ds-text-h3--line-height)] font-semibold\",\n subheading:\n \"text-[length:var(--ds-text-body-md)] leading-[var(--ds-text-body-md--line-height)] font-semibold\",\n body: \"text-[length:var(--ds-text-body-sm)] leading-[var(--ds-text-body-sm--line-height)]\",\n caption: \"text-[length:var(--ds-text-caption)] leading-[var(--ds-text-caption--line-height)]\",\n eyebrow:\n \"text-[length:var(--ds-text-eyebrow)] leading-[var(--ds-text-eyebrow--line-height)] font-medium uppercase tracking-[var(--ds-text-eyebrow--letter-spacing)]\",\n};\n\nconst TEXT_TONE: Record<string, string> = {\n default: \"text-[color:var(--ds-foreground)]\",\n muted: \"text-[color:var(--ds-muted-foreground)]\",\n success: \"text-[color:var(--ds-success)]\",\n warning: \"text-[color:var(--ds-warning)]\",\n danger: \"text-[color:var(--ds-destructive)]\",\n info: \"text-[color:var(--ds-info)]\",\n};\n\n/**\n * Components that are inline by nature.\n *\n * A Column stretches its children on the cross axis, which is right for a field\n * or a table and wrong for a badge — one would span the whole surface. `w-fit`\n * gives the item an explicit cross size, which is what disables the stretch,\n * without overriding a Row's own alignment.\n */\nconst INLINE = \"w-fit\";\n\nconst ALERT_ICON: Record<string, React.ReactNode> = {\n default: <Terminal />,\n success: <CheckCircle2 />,\n warn: <AlertTriangle />,\n danger: <OctagonAlert />,\n info: <Info />,\n};\n\n/**\n * Debounce a value. Used for continuous inputs so an agent receives one action\n * per pause rather than one per keystroke; the visible input stays immediate.\n */\nfunction useDebouncedEmit(\n emit: (value: unknown) => void,\n delay: number,\n): (value: unknown) => void {\n const latest = React.useRef(emit);\n latest.current = emit;\n const timer = React.useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n React.useEffect(\n () => () => {\n if (timer.current !== undefined) {\n clearTimeout(timer.current);\n }\n },\n [],\n );\n return React.useCallback(\n (value: unknown) => {\n if (timer.current !== undefined) {\n clearTimeout(timer.current);\n }\n timer.current = setTimeout(() => latest.current(value), delay);\n },\n [delay],\n );\n}\n\n/**\n * A value that follows the data model but can be typed over.\n *\n * The bound value wins whenever the agent changes it; between agent updates the\n * local draft wins, so typing is not swallowed by a re-render.\n *\n * `key` is what identity is judged on, and defaults to the value itself. It\n * matters for a value the renderer rebuilds each pass — a Date parsed from an\n * ISO string is a new object every render, so comparing the objects would reset\n * the draft forever. Compare the string instead.\n */\nfunction useDraft<T>(bound: T, key: unknown = bound): [T, (next: T) => void] {\n const [draft, setDraft] = React.useState<T>(bound);\n const previous = React.useRef(key);\n if (!Object.is(previous.current, key)) {\n previous.current = key;\n setDraft(bound);\n }\n return [draft, setDraft];\n}\n\n/* ------------------------------------------------------------------ */\n/* Layout */\n/* ------------------------------------------------------------------ */\n\nexport interface ColumnProps {\n gap?: number;\n padding?: number;\n align?: string;\n justify?: string;\n}\n\nexport const ColumnView: A2UIView<ColumnProps> = ({ props, children }) => (\n <div\n data-slot=\"a2ui-column\"\n className={cn(\n \"flex min-w-0 flex-col\",\n GAP[props.gap ?? 3],\n props.padding !== undefined ? PADDING[props.padding] : undefined,\n props.align ? ALIGN[props.align] : undefined,\n props.justify ? JUSTIFY[props.justify] : undefined,\n )}\n >\n {children}\n </div>\n);\n\nexport interface RowProps extends ColumnProps {\n wrap?: boolean;\n}\n\nexport const RowView: A2UIView<RowProps> = ({ props, children }) => (\n <div\n data-slot=\"a2ui-row\"\n className={cn(\n \"flex min-w-0 flex-row\",\n props.wrap === false ? \"flex-nowrap\" : \"flex-wrap\",\n GAP[props.gap ?? 2],\n props.padding !== undefined ? PADDING[props.padding] : undefined,\n ALIGN[props.align ?? \"center\"],\n props.justify ? JUSTIFY[props.justify] : undefined,\n )}\n >\n {children}\n </div>\n);\n\nexport interface CardViewProps {\n accent?: boolean;\n flush?: boolean;\n}\n\nexport const CardView: A2UIView<CardViewProps> = ({ props, children }) => (\n <Card data-slot=\"a2ui-card\" accent={props.accent}>\n {props.flush ? (\n <div className=\"flex flex-col gap-3\">{children}</div>\n ) : (\n <CardContent className=\"flex flex-col gap-3 p-5\">{children}</CardContent>\n )}\n </Card>\n);\n\nexport interface SectionCardViewProps {\n title: string;\n description?: string;\n flush?: boolean;\n}\n\nexport const SectionCardView: A2UIView<SectionCardViewProps> = ({ props, children }) => (\n <SectionCard\n data-slot=\"a2ui-section-card\"\n title={props.title}\n description={props.description}\n flush={props.flush}\n >\n <div className=\"flex flex-col gap-3\">{children}</div>\n </SectionCard>\n);\n\nexport interface DividerProps {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const DividerView: A2UIView<DividerProps> = ({ props }) => (\n <Separator data-slot=\"a2ui-divider\" orientation={props.orientation ?? \"horizontal\"} />\n);\n\nexport interface SpacerProps {\n size?: number;\n}\n\nexport const SpacerView: A2UIView<SpacerProps> = ({ props }) => (\n <div data-slot=\"a2ui-spacer\" aria-hidden className={cn(\"w-full\", HEIGHT[props.size ?? 4])} />\n);\n\n/* ------------------------------------------------------------------ */\n/* Text */\n/* ------------------------------------------------------------------ */\n\nexport interface TextProps {\n text: string;\n role?: string;\n tone?: string;\n align?: string;\n mono?: boolean;\n}\n\nexport const TextView: A2UIView<TextProps> = ({ props }) => (\n <p\n data-slot=\"a2ui-text\"\n data-role={props.role ?? \"body\"}\n className={cn(\n \"min-w-0 break-words\",\n TEXT_ROLE[props.role ?? \"body\"],\n TEXT_TONE[props.tone ?? \"default\"],\n props.align ? TEXT_ALIGN[props.align] : undefined,\n props.mono ? \"font-[family-name:var(--ds-font-mono)]\" : undefined,\n )}\n >\n {props.text}\n </p>\n);\n\nexport interface MarkdownViewProps {\n text: string;\n compact?: boolean;\n}\n\nexport const MarkdownView: A2UIView<MarkdownViewProps> = ({ props }) => (\n <Markdown data-slot=\"a2ui-markdown\" compact={props.compact}>\n {props.text}\n </Markdown>\n);\n\n/* ------------------------------------------------------------------ */\n/* Inputs */\n/* ------------------------------------------------------------------ */\n\ninterface FieldShellProps {\n label?: string;\n description?: string;\n error?: string;\n children: React.ReactNode;\n slot: string;\n orientation?: \"vertical\" | \"horizontal\";\n /**\n * Ties the label to the control. Base UI's Field associates its own\n * `Field.Control`; these views render plain cortena-ui controls, so the pair\n * is wired explicitly rather than left to produce a label with no `for`.\n */\n controlId?: string;\n}\n\nfunction FieldShell({\n label,\n description,\n error,\n children,\n slot,\n orientation,\n controlId,\n}: FieldShellProps) {\n return (\n <Field data-slot={slot} orientation={orientation ?? \"vertical\"} invalid={Boolean(error)}>\n {label ? <FieldLabel htmlFor={controlId}>{label}</FieldLabel> : null}\n {children}\n {description ? <FieldDescription>{description}</FieldDescription> : null}\n {error ? <FieldError>{error}</FieldError> : null}\n </Field>\n );\n}\n\nexport interface TextFieldProps {\n label?: string;\n value?: string;\n placeholder?: string;\n description?: string;\n error?: string;\n type?: \"text\" | \"email\" | \"url\" | \"tel\" | \"number\" | \"password\" | \"search\";\n disabled?: boolean;\n required?: boolean;\n onChange?: A2UIResolvedAction;\n}\n\nexport const TextFieldView: A2UIView<TextFieldProps> = ({\n props,\n emit,\n writeBack,\n debounceMs,\n}) => {\n const id = React.useId();\n const [draft, setDraft] = useDraft(props.value ?? \"\");\n const send = useDebouncedEmit(\n (value) => emit(props.onChange, \"change\", { value }),\n debounceMs,\n );\n return (\n <FieldShell\n slot=\"a2ui-text-field\"\n label={props.label}\n description={props.description}\n error={props.error}\n controlId={id}\n >\n <Input\n id={id}\n type={props.type ?? \"text\"}\n value={draft}\n placeholder={props.placeholder}\n disabled={props.disabled}\n required={props.required}\n aria-label={props.label ? undefined : (props.placeholder ?? \"Text field\")}\n onChange={(event) => {\n const next = event.target.value;\n setDraft(next);\n writeBack(\"value\", next);\n send(next);\n }}\n />\n </FieldShell>\n );\n};\n\nexport interface TextAreaProps {\n label?: string;\n value?: string;\n placeholder?: string;\n description?: string;\n error?: string;\n rows?: number;\n disabled?: boolean;\n autoGrow?: boolean;\n onChange?: A2UIResolvedAction;\n}\n\nexport const TextAreaView: A2UIView<TextAreaProps> = ({ props, emit, writeBack, debounceMs }) => {\n const id = React.useId();\n const [draft, setDraft] = useDraft(props.value ?? \"\");\n const send = useDebouncedEmit((value) => emit(props.onChange, \"change\", { value }), debounceMs);\n return (\n <FieldShell\n slot=\"a2ui-text-area\"\n label={props.label}\n description={props.description}\n error={props.error}\n controlId={id}\n >\n <Textarea\n id={id}\n value={draft}\n rows={props.rows ?? 4}\n placeholder={props.placeholder}\n disabled={props.disabled}\n autoGrow={props.autoGrow}\n aria-label={props.label ? undefined : (props.placeholder ?? \"Text area\")}\n onChange={(event) => {\n const next = event.target.value;\n setDraft(next);\n writeBack(\"value\", next);\n send(next);\n }}\n />\n </FieldShell>\n );\n};\n\nexport interface SelectOption {\n value: string;\n label?: string;\n disabled?: boolean;\n}\n\nexport interface SelectViewProps {\n label?: string;\n value?: string;\n placeholder?: string;\n description?: string;\n error?: string;\n options: SelectOption[];\n disabled?: boolean;\n onChange?: A2UIResolvedAction;\n}\n\nexport const SelectView: A2UIView<SelectViewProps> = ({ props, emit, writeBack }) => {\n const [draft, setDraft] = useDraft(props.value ?? null);\n const items = React.useMemo(\n () => props.options.map((option) => ({ value: option.value, label: option.label ?? option.value })),\n [props.options],\n );\n return (\n <FieldShell\n slot=\"a2ui-select\"\n label={props.label}\n description={props.description}\n error={props.error}\n >\n <Select\n items={items}\n value={draft}\n disabled={props.disabled}\n onValueChange={(next) => {\n const value = next === null ? \"\" : String(next);\n setDraft(value);\n writeBack(\"value\", value);\n emit(props.onChange, \"change\", { value });\n }}\n >\n <SelectTrigger aria-label={props.label ?? props.placeholder ?? \"Select\"}>\n <SelectValue placeholder={props.placeholder ?? \"Select…\"} />\n </SelectTrigger>\n <SelectContent>\n {props.options.map((option) => (\n <SelectItem key={option.value} value={option.value} disabled={option.disabled}>\n {option.label ?? option.value}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </FieldShell>\n );\n};\n\nexport interface CheckboxViewProps {\n label?: string;\n checked?: boolean;\n description?: string;\n disabled?: boolean;\n onChange?: A2UIResolvedAction;\n}\n\nexport const CheckboxView: A2UIView<CheckboxViewProps> = ({ props, emit, writeBack }) => {\n const [draft, setDraft] = useDraft(props.checked ?? false);\n return (\n <FieldShell\n slot=\"a2ui-checkbox\"\n description={props.description}\n orientation=\"horizontal\"\n >\n <label className=\"flex items-start gap-3 text-[length:var(--ds-text-caption-lg)] text-[color:var(--ds-foreground)]\">\n <span className=\"flex h-5 items-center\">\n <Checkbox\n checked={draft}\n disabled={props.disabled}\n aria-label={props.label ?? \"Checkbox\"}\n onCheckedChange={(checked) => {\n setDraft(checked);\n writeBack(\"checked\", checked);\n emit(props.onChange, \"change\", { checked });\n }}\n />\n </span>\n <span>{props.label}</span>\n </label>\n </FieldShell>\n );\n};\n\nexport interface SwitchViewProps extends CheckboxViewProps {}\n\nexport const SwitchView: A2UIView<SwitchViewProps> = ({ props, emit, writeBack }) => {\n const [draft, setDraft] = useDraft(props.checked ?? false);\n return (\n <FieldShell slot=\"a2ui-switch\" description={props.description} orientation=\"horizontal\">\n <label className=\"flex items-center gap-3 text-[length:var(--ds-text-caption-lg)] text-[color:var(--ds-foreground)]\">\n <Switch\n checked={draft}\n disabled={props.disabled}\n aria-label={props.label ?? \"Switch\"}\n onCheckedChange={(checked) => {\n setDraft(checked);\n writeBack(\"checked\", checked);\n emit(props.onChange, \"change\", { checked });\n }}\n />\n <span>{props.label}</span>\n </label>\n </FieldShell>\n );\n};\n\nexport interface RadioGroupViewProps {\n label?: string;\n value?: string;\n description?: string;\n options: SelectOption[];\n disabled?: boolean;\n onChange?: A2UIResolvedAction;\n}\n\nexport const RadioGroupView: A2UIView<RadioGroupViewProps> = ({ props, emit, writeBack }) => {\n const [draft, setDraft] = useDraft(props.value ?? \"\");\n return (\n <FieldShell\n slot=\"a2ui-radio-group\"\n label={props.label}\n description={props.description}\n >\n <RadioGroup\n aria-label={props.label ?? \"Options\"}\n value={draft}\n disabled={props.disabled}\n onValueChange={(next) => {\n const value = String(next);\n setDraft(value);\n writeBack(\"value\", value);\n emit(props.onChange, \"change\", { value });\n }}\n >\n {props.options.map((option) => (\n <label\n key={option.value}\n className=\"flex items-start gap-3 text-[length:var(--ds-text-caption-lg)] text-[color:var(--ds-foreground)]\"\n >\n <span className=\"flex h-5 items-center\">\n <RadioGroupItem value={option.value} disabled={option.disabled} />\n </span>\n <span>{option.label ?? option.value}</span>\n </label>\n ))}\n </RadioGroup>\n </FieldShell>\n );\n};\n\nexport interface DateFieldViewProps {\n label?: string;\n /** ISO `yyyy-mm-dd`; the wire format for a date in A2UI. */\n value?: string;\n min?: string;\n max?: string;\n description?: string;\n error?: string;\n disabled?: boolean;\n onChange?: A2UIResolvedAction;\n}\n\nexport const DateFieldView: A2UIView<DateFieldViewProps> = ({ props, emit, writeBack }) => {\n const id = React.useId();\n const bound = props.value ? parseDateISO(props.value) : undefined;\n const [draft, setDraft] = useDraft<Date | undefined>(bound, props.value ?? \"\");\n return (\n <FieldShell\n slot=\"a2ui-date-field\"\n label={props.label}\n description={props.description}\n error={props.error}\n controlId={id}\n >\n <DateField\n id={id}\n value={draft}\n min={props.min ? parseDateISO(props.min) : undefined}\n max={props.max ? parseDateISO(props.max) : undefined}\n disabled={props.disabled}\n invalid={Boolean(props.error)}\n aria-label={props.label ?? \"Date\"}\n onValueChange={(date) => {\n setDraft(date);\n const value = date ? formatDateISO(date) : \"\";\n writeBack(\"value\", value);\n emit(props.onChange, \"change\", { value });\n }}\n />\n </FieldShell>\n );\n};\n\nexport interface ButtonViewProps {\n label: string;\n variant?: \"primary\" | \"secondary\" | \"outline\" | \"ghost\" | \"soft\" | \"destructive\" | \"link\";\n size?: \"sm\" | \"md\" | \"lg\";\n disabled?: boolean;\n /** Report the whole surface data model with the action, for a form submit. */\n submit?: boolean;\n onPress?: A2UIResolvedAction;\n}\n\nexport const ButtonView: A2UIView<ButtonViewProps> = ({ props, emit, dataModel }) => (\n <Button\n data-slot=\"a2ui-button\"\n className={INLINE}\n variant={props.variant ?? \"primary\"}\n size={props.size ?? \"md\"}\n disabled={props.disabled}\n onClick={() =>\n emit(\n props.onPress,\n props.submit ? \"submit\" : \"press\",\n props.submit ? { data: dataModel } : {},\n )\n }\n >\n {props.label}\n </Button>\n);\n\nexport interface ButtonLinkViewProps {\n label: string;\n href: string;\n variant?: ButtonViewProps[\"variant\"];\n size?: ButtonViewProps[\"size\"];\n target?: \"_self\" | \"_blank\";\n}\n\n// ButtonLink sets its own `data-slot` after spreading props, so the A2UI marker\n// goes on a wrapper rather than being silently dropped.\nexport const ButtonLinkView: A2UIView<ButtonLinkViewProps> = ({ props }) => (\n <span data-slot=\"a2ui-button-link\" className={cn(\"inline-flex\", INLINE)}>\n <ButtonLink\n variant={props.variant ?? \"secondary\"}\n size={props.size ?? \"md\"}\n href={props.href}\n target={props.target}\n rel={props.target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n >\n {props.label}\n </ButtonLink>\n </span>\n);\n\nexport interface LinkViewProps {\n label: string;\n href: string;\n target?: \"_self\" | \"_blank\";\n}\n\nexport const LinkView: A2UIView<LinkViewProps> = ({ props }) => (\n <a\n data-slot=\"a2ui-link\"\n href={props.href}\n target={props.target}\n rel={props.target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n className={cn(\n INLINE,\n \"text-[length:var(--ds-text-body-sm)] text-[color:var(--ds-primary)] underline underline-offset-4\",\n \"hover:text-[color:var(--ds-primary-hover)]\",\n )}\n >\n {props.label}\n </a>\n);\n\n/* ------------------------------------------------------------------ */\n/* Feedback */\n/* ------------------------------------------------------------------ */\n\nexport interface BadgeViewProps {\n label: string;\n variant?: \"default\" | \"success\" | \"warning\" | \"danger\" | \"info\" | \"neutral\" | \"outline\";\n}\n\nexport const BadgeView: A2UIView<BadgeViewProps> = ({ props }) => (\n <Badge data-slot=\"a2ui-badge\" className={INLINE} variant={props.variant ?? \"default\"}>\n {props.label}\n </Badge>\n);\n\nexport interface AlertViewProps {\n title?: string;\n description?: string;\n variant?: \"default\" | \"success\" | \"warn\" | \"danger\" | \"info\";\n}\n\nexport const AlertView: A2UIView<AlertViewProps> = ({ props }) => {\n const variant = props.variant ?? \"default\";\n return (\n <Alert data-slot=\"a2ui-alert\" variant={variant}>\n <AlertIcon>{ALERT_ICON[variant]}</AlertIcon>\n <div>\n {props.title ? <AlertTitle>{props.title}</AlertTitle> : null}\n {props.description ? <AlertDescription>{props.description}</AlertDescription> : null}\n </div>\n </Alert>\n );\n};\n\nexport interface ProgressViewProps {\n /** `null` renders the indeterminate bar. */\n value?: number | null;\n max?: number;\n label?: string;\n showValue?: boolean;\n}\n\nexport const ProgressViewComponent: A2UIView<ProgressViewProps> = ({ props }) => (\n <Progress\n data-slot=\"a2ui-progress\"\n value={props.value === undefined ? null : props.value}\n max={props.max}\n aria-label={props.label ?? \"Progress\"}\n >\n {props.label ? <ProgressLabel>{props.label}</ProgressLabel> : null}\n {props.showValue === false ? null : <ProgressValue />}\n </Progress>\n);\n\nexport interface StatusDotViewProps {\n label?: string;\n tone?: \"accent\" | \"success\" | \"warning\" | \"danger\" | \"info\" | \"neutral\";\n live?: boolean;\n}\n\nexport const StatusDotView: A2UIView<StatusDotViewProps> = ({ props }) => (\n <StatusDot\n data-slot=\"a2ui-status-dot\"\n className={INLINE}\n tone={props.tone ?? \"accent\"}\n live={props.live}\n label={props.label}\n />\n);\n\nexport interface EmptyStateViewProps {\n title: string;\n description?: string;\n size?: \"default\" | \"compact\";\n}\n\nexport const EmptyStateView: A2UIView<EmptyStateViewProps> = ({ props, children }) => (\n <EmptyState\n data-slot=\"a2ui-empty-state\"\n title={props.title}\n description={props.description}\n size={props.size ?? \"compact\"}\n action={children.length > 0 ? <div className=\"flex gap-2\">{children}</div> : undefined}\n />\n);\n\n/* ------------------------------------------------------------------ */\n/* Data */\n/* ------------------------------------------------------------------ */\n\nexport interface A2UIColumn {\n id: string;\n label?: string;\n align?: \"start\" | \"center\" | \"end\";\n filter?: \"faceted\" | \"text\";\n width?: number;\n}\n\n/**\n * Where a table's rows come from.\n *\n * `client` carries the rows inline, which suits a short result an agent\n * already has. `server` carries a handle instead: the agent obtains a\n * `sourceId` from a tool and the host resolves it through\n * `resolveDataSource`, so search, sort and paging run on the backend and the\n * agent never has to put ten thousand rows in a message.\n */\nexport type A2UITableSource =\n | { kind: \"client\"; rows: A2UIRow[] }\n | { kind: \"server\"; sourceId: string };\n\nexport interface DataTableViewProps {\n columns: A2UIColumn[];\n dataSource: A2UITableSource;\n pageSize?: number;\n density?: \"default\" | \"compact\";\n searchPlaceholder?: string;\n emptyMessage?: string;\n maxHeight?: number;\n onRowClick?: A2UIResolvedAction;\n}\n\nexport const DataTableView: A2UIView<DataTableViewProps> = ({\n props,\n emit,\n resolveDataSource,\n}) => {\n const columns = React.useMemo<DataTableColumnDef<A2UIRow>[]>(\n () =>\n props.columns.map((column) => ({\n id: column.id,\n accessorKey: column.id,\n header: column.label ?? column.id,\n size: column.width,\n meta: {\n align: column.align,\n filter: column.filter,\n label: column.label ?? column.id,\n },\n })) as DataTableColumnDef<A2UIRow>[],\n [props.columns],\n );\n\n const source = props.dataSource;\n const resolved: DataSource<A2UIRow> | undefined =\n source.kind === \"client\" ? { kind: \"client\", rows: source.rows } : resolveDataSource(source.sourceId);\n\n if (!resolved) {\n return (\n <A2UIErrorCard\n title=\"Unknown data source\"\n detail={`No data source is registered for \"${(source as { sourceId: string }).sourceId}\". The host resolves a server table through resolveDataSource.`}\n />\n );\n }\n\n return (\n <div data-slot=\"a2ui-data-table\">\n <DataTable<A2UIRow>\n columns={columns}\n dataSource={resolved}\n pageSize={props.pageSize ?? 10}\n density={props.density ?? \"compact\"}\n maxHeight={props.maxHeight}\n searchPlaceholder={props.searchPlaceholder}\n emptyMessage={props.emptyMessage}\n onRowClick={(row) => emit(props.onRowClick, \"rowClick\", { row })}\n />\n </div>\n );\n};\n\nexport interface ChartViewProps {\n type: ChartType;\n data: unknown;\n title?: string;\n height?: number;\n stacked?: boolean;\n legend?: boolean;\n grid?: boolean;\n scale?: \"sequential\" | \"diverging\";\n indexBy?: string;\n keys?: string[];\n from?: string;\n to?: string;\n emptyMessage?: string;\n}\n\nexport const ChartView: A2UIView<ChartViewProps> = ({ props }) => (\n <div data-slot=\"a2ui-chart\" className=\"flex flex-col gap-2\">\n {props.title ? (\n <p className=\"text-[length:var(--ds-text-caption-lg)] font-medium text-[color:var(--ds-foreground)]\">\n {props.title}\n </p>\n ) : null}\n <Chart\n type={props.type}\n data={props.data as ChartDataFor<ChartType>}\n height={props.height ?? 260}\n stacked={props.stacked}\n legend={props.legend}\n grid={props.grid}\n scale={props.scale}\n indexBy={props.indexBy}\n keys={props.keys}\n from={props.from}\n to={props.to}\n emptyMessage={props.emptyMessage}\n />\n </div>\n);\n\n/* ------------------------------------------------------------------ */\n/* Tabs and media */\n/* ------------------------------------------------------------------ */\n\nexport interface TabDescriptor {\n value: string;\n label: string;\n}\n\nexport interface TabsViewProps {\n tabs: TabDescriptor[];\n value?: string;\n onChange?: A2UIResolvedAction;\n}\n\nexport const TabsView: A2UIView<TabsViewProps> = ({ props, children, emit, writeBack }) => {\n const first = props.tabs[0]?.value ?? \"\";\n const [draft, setDraft] = useDraft(props.value ?? first);\n return (\n <Tabs\n data-slot=\"a2ui-tabs\"\n value={draft}\n onValueChange={(next) => {\n const value = String(next);\n setDraft(value);\n writeBack(\"value\", value);\n emit(props.onChange, \"tabChange\", { value });\n }}\n >\n <TabsList>\n {props.tabs.map((tab) => (\n <TabsTrigger key={tab.value} value={tab.value}>\n {tab.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {props.tabs.map((tab, index) => (\n <TabsContent key={tab.value} value={tab.value}>\n {children[index] ?? null}\n </TabsContent>\n ))}\n </Tabs>\n );\n};\n\nexport interface ImageViewProps {\n src: string;\n alt: string;\n width?: number;\n height?: number;\n rounded?: boolean;\n fit?: \"cover\" | \"contain\";\n}\n\nexport const ImageView: A2UIView<ImageViewProps> = ({ props }) => (\n <img\n data-slot=\"a2ui-image\"\n src={props.src}\n alt={props.alt}\n width={props.width}\n height={props.height}\n className={cn(\n INLINE,\n \"max-w-full\",\n props.fit === \"cover\" ? \"object-cover\" : \"object-contain\",\n props.rounded === false ? undefined : \"rounded-[var(--ds-radius-md)]\",\n \"border border-[var(--ds-border-subtle)]\",\n )}\n />\n);\n\n/* ------------------------------------------------------------------ */\n/* Error card */\n/* ------------------------------------------------------------------ */\n\n/**\n * What the renderer draws instead of a component it cannot draw.\n *\n * Never raw markup and never the offending payload as HTML: the detail is set\n * as text, so a malformed message cannot inject anything. This is the\n * \"fallback: an error card on malformed payloads\" of `05-agent-ui.md`.\n */\nexport function A2UIErrorCard({\n title,\n detail,\n componentId,\n}: {\n title: string;\n detail?: string;\n componentId?: string;\n}) {\n return (\n <Alert data-slot=\"a2ui-error\" variant=\"danger\" role=\"alert\">\n <AlertIcon>\n <OctagonAlert />\n </AlertIcon>\n <div className=\"min-w-0\">\n <AlertTitle>{title}</AlertTitle>\n {detail ? (\n <AlertDescription className=\"font-[family-name:var(--ds-font-mono)] text-[length:var(--ds-text-caption)] break-words\">\n {detail}\n </AlertDescription>\n ) : null}\n {componentId ? (\n <AlertDescription className=\"text-[length:var(--ds-text-caption-sm)] text-[color:var(--ds-muted-foreground)]\">\n Component id: {componentId}\n </AlertDescription>\n ) : null}\n </div>\n </Alert>\n );\n}\n\n/** Re-exported so consumers can type an action handler without the message module. */\nexport type { A2UIAction };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,MAAM,MAA8B;CAClC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAEA,MAAM,UAAkC;CACtC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAEA,MAAM,SAAiC;CACrC,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAEA,MAAM,QAAgC;CACpC,OAAO;CACP,QAAQ;CACR,KAAK;CACL,SAAS;CACT,UAAU;AACZ;AAEA,MAAM,UAAkC;CACtC,OAAO;C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S,KAAK;GACxB,KAAK,MAAM,UAAU,aAAa,EAAE,MAAM,CAAC;EAC7C;EARF,UAAA,CAUE,oBAAC,UAAD,EAAA,UACG,MAAM,KAAK,KAAK,QACf,oBAAC,aAAD;GAA6B,OAAO,IAAI;GACrC,UAAA,IAAI;EACM,GAFK,IAAI,KAET,CACd,EACO,CAAA,GACT,MAAM,KAAK,KAAK,KAAK,UACpB,oBAAC,aAAD;GAA6B,OAAO,IAAI;GACrC,UAAA,SAAS,UAAU;EACT,GAFK,IAAI,KAET,CACd,CACG;;AAEV;AAWA,MAAa,aAAuC,EAAE,YACpD,oBAAC,OAAD;CACE,aAAU;CACV,KAAK,MAAM;CACX,KAAK,MAAM;CACX,OAAO,MAAM;CACb,QAAQ,MAAM;CACd,WAAW,GACT,QACA,cACA,MAAM,QAAQ,UAAU,iBAAiB,kBACzC,MAAM,YAAY,QAAQ,KAAA,IAAY,iCACtC,yCACF;AACD,CAAA;;;;;;;;AAcH,SAAgB,cAAc,EAC5B,OACA,QACA,eAKC;CACD,OACE,qBAAC,OAAD;EAAO,aAAU;EAAa,SAAQ;EAAS,MAAK;EAApD,UAAA,CACE,oBAAC,WAAD,EAAA,UACE,oBAAC,cAAD,CAAe,CAAA,EACN,CAAA,GACX,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACE,oBAAC,YAAD,EAAA,UAAa,MAAkB,CAAA;IAC9B,SACC,oBAAC,kBAAD;KAAkB,WAAU;KACzB,UAAA;IACe,CAAA,IAChB;IACH,cACC,qBAAC,kBAAD;KAAkB,WAAU;KAA5B,UAAA,CAA8G,kBAC7F,WACC;IAChB,CAAA,IAAA;GACD;EACA,CAAA,CAAA;;AAEX"}
package/dist/a2ui.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { A2UIAction, A2UIActionSpec, A2UIBeginRendering, A2UIChildList, A2UIChildren, A2UIComponentSpec, A2UICreateSurface, A2UIDataBinding, A2UIDeleteSurface, A2UIFoldResult, A2UIMessage, A2UIMessageInput, A2UIPropertyValue, A2UISurface, A2UIUpdateComponents, A2UIUpdateDataModel, A2UI_DEFAULT_SURFACE_ID, A2UI_VERSION, foldMessages, getAtPointer, isDataBinding, parseA2UIMessages, pointerSegments, readAction, readChildren, readComponent, resolvePointer, resolveValue, setAtPointer } from "./a2ui/message.js";
3
+ import { A2UIColumn, A2UIErrorCard, A2UINodeInfo, A2UIResolvedAction, A2UIRow, A2UITableSource, A2UIView, A2UIViewProps } from "./a2ui/views.js";
4
+ import { A2UICatalogue, A2UICatalogueEntry, A2UIExample, A2UIGroup, A2UI_CATALOGUE_ID, catalogueNames, defaultCatalogue } from "./a2ui/catalogue.js";
5
+ import { A2UICatalogueDoc, A2UIComponentDoc, JsonSchema, buildCatalogueDoc, catalogueMarkdown, exampleMessages } from "./a2ui/catalogue-doc.js";
6
+ import { A2UIRenderer, A2UIRendererProps } from "./a2ui/renderer.js";
7
+ import "./a2ui/index.js";
8
+ export { type A2UIAction, type A2UIActionSpec, type A2UIBeginRendering, type A2UICatalogue, type A2UICatalogueDoc, type A2UICatalogueEntry, type A2UIChildList, type A2UIChildren, type A2UIColumn, type A2UIComponentDoc, type A2UIComponentSpec, type A2UICreateSurface, type A2UIDataBinding, type A2UIDeleteSurface, A2UIErrorCard, type A2UIExample, type A2UIFoldResult, type A2UIGroup, type A2UIMessage, type A2UIMessageInput, type A2UINodeInfo, type A2UIPropertyValue, A2UIRenderer, type A2UIRendererProps, type A2UIResolvedAction, type A2UIRow, type A2UISurface, type A2UITableSource, type A2UIUpdateComponents, type A2UIUpdateDataModel, type A2UIView, type A2UIViewProps, A2UI_CATALOGUE_ID, A2UI_DEFAULT_SURFACE_ID, A2UI_VERSION, type JsonSchema, buildCatalogueDoc, catalogueMarkdown, catalogueNames, defaultCatalogue, exampleMessages, foldMessages, getAtPointer, isDataBinding, parseA2UIMessages, pointerSegments, readAction, readChildren, readComponent, resolvePointer, resolveValue, setAtPointer };
package/dist/a2ui.js ADDED
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { A2UIErrorCard } from "./a2ui/views.js";
3
+ import { A2UI_CATALOGUE_ID, catalogueNames, defaultCatalogue } from "./a2ui/catalogue.js";
4
+ import { A2UI_DEFAULT_SURFACE_ID, A2UI_VERSION, foldMessages, getAtPointer, isDataBinding, parseA2UIMessages, pointerSegments, readAction, readChildren, readComponent, resolvePointer, resolveValue, setAtPointer } from "./a2ui/message.js";
5
+ import { buildCatalogueDoc, catalogueMarkdown, exampleMessages } from "./a2ui/catalogue-doc.js";
6
+ import { A2UIRenderer } from "./a2ui/renderer.js";
7
+ export { A2UIErrorCard, A2UIRenderer, A2UI_CATALOGUE_ID, A2UI_DEFAULT_SURFACE_ID, A2UI_VERSION, buildCatalogueDoc, catalogueMarkdown, catalogueNames, defaultCatalogue, exampleMessages, foldMessages, getAtPointer, isDataBinding, parseA2UIMessages, pointerSegments, readAction, readChildren, readComponent, resolvePointer, resolveValue, setAtPointer };
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { ChartConfig, ChartDataFor, ChartDay, ChartEngine, ChartLabels, ChartMatrix, ChartPoint, ChartRenderer, ChartRow, ChartScale, ChartSeries, ChartSlice, ChartTree, ChartType, NIVO_TYPES, RECHARTS_TYPES, chartEngine } from "./components/chart/types.js";
3
+ import { ChartContainer, ChartContainerProps, ChartEmpty, ChartError, ChartLegendContent, ChartLegendContentProps, ChartLoading, ChartTooltipContent, ChartTooltipContentProps, seriesColor, useChart } from "./components/chart/container.js";
4
+ import { Chart, ChartProps } from "./components/chart/chart.js";
5
+ import { ChartLegend, ChartTooltip } from "./components/chart/recharts-parts.js";
6
+ import { NivoTheme, nivoTheme, useNivoTheme } from "./components/chart/nivo-theme.js";
7
+ import { ChartScales, VIZ_SERIES_COUNT, chartScales, resolveColor, resolveVizSeries, toHex, vizSeriesVars, vizVar } from "./components/chart/tokens.js";
8
+ import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ComposedChart, Funnel, FunnelChart, LabelList, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, RechartsLegend, RechartsTooltip, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, XAxis, YAxis } from "./components/chart/index.js";
9
+ export { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, Chart, type ChartConfig, ChartContainer, type ChartContainerProps, type ChartDataFor, type ChartDay, ChartEmpty, type ChartEngine, ChartError, type ChartLabels, ChartLegend, ChartLegendContent, type ChartLegendContentProps, ChartLoading, type ChartMatrix, type ChartPoint, type ChartProps, type ChartRenderer, type ChartRow, type ChartScale, type ChartScales, type ChartSeries, type ChartSlice, ChartTooltip, ChartTooltipContent, type ChartTooltipContentProps, type ChartTree, type ChartType, ComposedChart, Funnel, FunnelChart, LabelList, Line, LineChart, NIVO_TYPES, type NivoTheme, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, RECHARTS_TYPES, Radar, RadarChart, RechartsLegend, RechartsTooltip, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, VIZ_SERIES_COUNT, XAxis, YAxis, chartEngine, chartScales, nivoTheme, resolveColor, resolveVizSeries, seriesColor, toHex, useChart, useNivoTheme, vizSeriesVars, vizVar };
package/dist/chart.js ADDED
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { VIZ_SERIES_COUNT, chartScales, resolveColor, resolveVizSeries, toHex, vizSeriesVars, vizVar } from "./components/chart/tokens.js";
3
+ import { ChartContainer, ChartEmpty, ChartError, ChartLegendContent, ChartLoading, ChartTooltipContent, seriesColor, useChart } from "./components/chart/container.js";
4
+ import { NIVO_TYPES, RECHARTS_TYPES, chartEngine } from "./components/chart/types.js";
5
+ import { Chart } from "./components/chart/chart.js";
6
+ import { ChartLegend, ChartTooltip } from "./components/chart/recharts-parts.js";
7
+ import { nivoTheme, useNivoTheme } from "./components/chart/nivo-theme.js";
8
+ import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ComposedChart, Funnel, FunnelChart, LabelList, Line, LineChart, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart, RechartsLegend, RechartsTooltip, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, XAxis, YAxis } from "./components/chart/index.js";
9
+ export { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, Chart, ChartContainer, ChartEmpty, ChartError, ChartLegend, ChartLegendContent, ChartLoading, ChartTooltip, ChartTooltipContent, ComposedChart, Funnel, FunnelChart, LabelList, Line, LineChart, NIVO_TYPES, Pie, PieChart, PolarAngleAxis, PolarGrid, PolarRadiusAxis, RECHARTS_TYPES, Radar, RadarChart, RechartsLegend, RechartsTooltip, ReferenceLine, ResponsiveContainer, Scatter, ScatterChart, VIZ_SERIES_COUNT, XAxis, YAxis, chartEngine, chartScales, nivoTheme, resolveColor, resolveVizSeries, seriesColor, toHex, useChart, useNivoTheme, vizSeriesVars, vizVar };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { Accordion } from "@base-ui/react/accordion";
3
+ //#region src/components/accordion.d.ts
4
+ /**
5
+ * Accordion.
6
+ *
7
+ * Base UI's Accordion is a list of Collapsibles: `Root > Item > Header > Trigger`
8
+ * plus `Panel`. The panel animates on height through Base UI's
9
+ * `--accordion-panel-height`, and marks its first/last frame with
10
+ * `data-starting-style` / `data-ending-style`, which is where it collapses to 0.
11
+ *
12
+ * Radix users: `type="single" | "multiple"` is now the boolean `multiple`, and
13
+ * `value` is always an array. `collapsible` is the default. `data-state="open"`
14
+ * is `data-open` on the item and panel, `data-panel-open` on the trigger.
15
+ */
16
+ declare function Accordion$1({ className, ...props }: Accordion.Root.Props): import("react").JSX.Element;
17
+ declare function AccordionItem({ className, ...props }: Accordion.Item.Props): import("react").JSX.Element;
18
+ declare function AccordionTrigger({ className, children, ...props }: Accordion.Trigger.Props): import("react").JSX.Element;
19
+ declare function AccordionContent({ className, children, ...props }: Accordion.Panel.Props): import("react").JSX.Element;
20
+ //#endregion
21
+ export { Accordion$1 as Accordion, AccordionContent, AccordionItem, AccordionTrigger };
22
+ //# sourceMappingURL=accordion.d.ts.map
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { Accordion } from "@base-ui/react/accordion";
5
+ import { ChevronDown } from "lucide-react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region src/components/accordion.tsx
8
+ /**
9
+ * Accordion.
10
+ *
11
+ * Base UI's Accordion is a list of Collapsibles: `Root > Item > Header > Trigger`
12
+ * plus `Panel`. The panel animates on height through Base UI's
13
+ * `--accordion-panel-height`, and marks its first/last frame with
14
+ * `data-starting-style` / `data-ending-style`, which is where it collapses to 0.
15
+ *
16
+ * Radix users: `type="single" | "multiple"` is now the boolean `multiple`, and
17
+ * `value` is always an array. `collapsible` is the default. `data-state="open"`
18
+ * is `data-open` on the item and panel, `data-panel-open` on the trigger.
19
+ */
20
+ function Accordion$1({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx(Accordion.Root, {
22
+ "data-slot": "accordion",
23
+ className: cn("flex w-full flex-col", className),
24
+ ...props
25
+ });
26
+ }
27
+ function AccordionItem({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx(Accordion.Item, {
29
+ "data-slot": "accordion-item",
30
+ className: cn("border-b border-[var(--ds-border)] last:border-b-0", className),
31
+ ...props
32
+ });
33
+ }
34
+ function AccordionTrigger({ className, children, ...props }) {
35
+ return /* @__PURE__ */ jsx(Accordion.Header, {
36
+ "data-slot": "accordion-header",
37
+ className: "flex",
38
+ children: /* @__PURE__ */ jsxs(Accordion.Trigger, {
39
+ "data-slot": "accordion-trigger",
40
+ className: cn("flex flex-1 items-start justify-between gap-4 py-4 text-left", "text-[length:var(--ds-text-body-sm)] font-medium text-[color:var(--ds-foreground)]", "rounded-[var(--ds-radius-sm)] outline-none", "transition-colors duration-[var(--ds-duration-fast)] ease-[var(--ds-ease-out)]", "hover:underline focus-visible:ring-[3px] focus-visible:ring-[var(--ds-ring)]/40", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "[&[data-panel-open]>svg]:rotate-180", className),
41
+ ...props,
42
+ children: [children, /* @__PURE__ */ jsx(ChevronDown, {
43
+ "aria-hidden": true,
44
+ className: cn("pointer-events-none size-4 shrink-0 translate-y-0.5 text-[color:var(--ds-muted-foreground)]", "transition-transform duration-[var(--ds-duration-base)] ease-[var(--ds-ease-out)]")
45
+ })]
46
+ })
47
+ });
48
+ }
49
+ function AccordionContent({ className, children, ...props }) {
50
+ return /* @__PURE__ */ jsx(Accordion.Panel, {
51
+ "data-slot": "accordion-content",
52
+ className: cn("h-[var(--accordion-panel-height,auto)] overflow-hidden", "text-[length:var(--ds-text-body-sm)] text-[color:var(--ds-muted-foreground)]", "transition-[height] duration-[var(--ds-duration-base)] ease-[var(--ds-ease-out)]", "data-[starting-style]:h-0 data-[ending-style]:h-0"),
53
+ ...props,
54
+ children: /* @__PURE__ */ jsx("div", {
55
+ className: cn("pt-0 pb-4", className),
56
+ children
57
+ })
58
+ });
59
+ }
60
+ //#endregion
61
+ export { Accordion$1 as Accordion, AccordionContent, AccordionItem, AccordionTrigger };
62
+
63
+ //# sourceMappingURL=accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.js","names":["Accordion","AccordionPrimitive"],"sources":["../../src/components/accordion.tsx"],"sourcesContent":["\"use client\";\n\nimport { Accordion as AccordionPrimitive } from \"@base-ui/react/accordion\";\nimport { ChevronDown } from \"lucide-react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Accordion.\n *\n * Base UI's Accordion is a list of Collapsibles: `Root > Item > Header > Trigger`\n * plus `Panel`. The panel animates on height through Base UI's\n * `--accordion-panel-height`, and marks its first/last frame with\n * `data-starting-style` / `data-ending-style`, which is where it collapses to 0.\n *\n * Radix users: `type=\"single\" | \"multiple\"` is now the boolean `multiple`, and\n * `value` is always an array. `collapsible` is the default. `data-state=\"open\"`\n * is `data-open` on the item and panel, `data-panel-open` on the trigger.\n */\nfunction Accordion({ className, ...props }: AccordionPrimitive.Root.Props) {\n return (\n <AccordionPrimitive.Root\n data-slot=\"accordion\"\n className={cn(\"flex w-full flex-col\", className)}\n {...props}\n />\n );\n}\n\nfunction AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props) {\n return (\n <AccordionPrimitive.Item\n data-slot=\"accordion-item\"\n className={cn(\"border-b border-[var(--ds-border)] last:border-b-0\", className)}\n {...props}\n />\n );\n}\n\nfunction AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props) {\n return (\n <AccordionPrimitive.Header data-slot=\"accordion-header\" className=\"flex\">\n <AccordionPrimitive.Trigger\n data-slot=\"accordion-trigger\"\n className={cn(\n \"flex flex-1 items-start justify-between gap-4 py-4 text-left\",\n \"text-[length:var(--ds-text-body-sm)] font-medium text-[color:var(--ds-foreground)]\",\n \"rounded-[var(--ds-radius-sm)] outline-none\",\n \"transition-colors duration-[var(--ds-duration-fast)] ease-[var(--ds-ease-out)]\",\n \"hover:underline focus-visible:ring-[3px] focus-visible:ring-[var(--ds-ring)]/40\",\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n \"[&[data-panel-open]>svg]:rotate-180\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronDown\n aria-hidden\n className={cn(\n \"pointer-events-none size-4 shrink-0 translate-y-0.5 text-[color:var(--ds-muted-foreground)]\",\n \"transition-transform duration-[var(--ds-duration-base)] ease-[var(--ds-ease-out)]\",\n )}\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n );\n}\n\nfunction AccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props) {\n return (\n <AccordionPrimitive.Panel\n data-slot=\"accordion-content\"\n className={cn(\n \"h-[var(--accordion-panel-height,auto)] overflow-hidden\",\n \"text-[length:var(--ds-text-body-sm)] text-[color:var(--ds-muted-foreground)]\",\n \"transition-[height] duration-[var(--ds-duration-base)] ease-[var(--ds-ease-out)]\",\n \"data-[starting-style]:h-0 data-[ending-style]:h-0\",\n )}\n {...props}\n >\n <div className={cn(\"pt-0 pb-4\", className)}>{children}</div>\n </AccordionPrimitive.Panel>\n );\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,SAASA,YAAU,EAAE,WAAW,GAAG,SAAwC;CACzE,OACE,oBAACC,UAAmB,MAApB;EACE,aAAU;EACV,WAAW,GAAG,wBAAwB,SAAS;EAC/C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAwC;CAC7E,OACE,oBAACA,UAAmB,MAApB;EACE,aAAU;EACV,WAAW,GAAG,sDAAsD,SAAS;EAC7E,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EAAE,WAAW,UAAU,GAAG,SAA2C;CAC7F,OACE,oBAACA,UAAmB,QAApB;EAA2B,aAAU;EAAmB,WAAU;EAChE,UAAA,qBAACA,UAAmB,SAApB;GACE,aAAU;GACV,WAAW,GACT,gEACA,sFACA,8CACA,kFACA,mFACA,kEACA,uCACA,SACF;GACA,GAAI;GAZN,UAAA,CAcG,UACD,oBAAC,aAAD;IACE,eAAA;IACA,WAAW,GACT,+FACA,mFACF;GACD,CAAA,CACyB;;CACH,CAAA;AAE/B;AAEA,SAAS,iBAAiB,EAAE,WAAW,UAAU,GAAG,SAAyC;CAC3F,OACE,oBAACA,UAAmB,OAApB;EACE,aAAU;EACV,WAAW,GACT,0DACA,gFACA,oFACA,mDACF;EACA,GAAI;EAEJ,UAAA,oBAAC,OAAD;GAAK,WAAW,GAAG,aAAa,SAAS;GAAI;EAAc,CAAA;CACnC,CAAA;AAE9B"}
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
+ //#region src/components/alert.d.ts
5
+ declare const alertVariants: (props?: ({
6
+ variant?: "default" | "success" | "warn" | "destructive" | "danger" | "info" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export interface AlertProps extends React.ComponentProps<"div">, VariantProps<typeof alertVariants> {}
9
+ declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
10
+ declare function AlertIcon({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
+ //#endregion
14
+ export { Alert, AlertDescription, AlertIcon, AlertTitle, alertVariants };
15
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
+ //#region src/components/alert.tsx
7
+ /**
8
+ * Alert — an inline callout. Tinted variants use the `-soft` fill for the
9
+ * background and the tone colour for the border and icon; the body text stays
10
+ * on the foreground token so it reads in both themes.
11
+ *
12
+ * The error tone is `destructive`, the same spelling Button uses; `danger` is
13
+ * a deprecated alias of it and paints identically.
14
+ */
15
+ const DESTRUCTIVE_ALERT = "bg-[var(--ds-destructive-soft)] border-[var(--ds-destructive)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-destructive)]";
16
+ const alertVariants = /* @__PURE__ */ cva([
17
+ "flex gap-3 rounded-[var(--ds-radius-md)] border px-3.5 py-3",
18
+ "text-[length:var(--ds-text-caption-lg)] leading-[var(--ds-text-caption-lg--line-height)]",
19
+ "text-[color:var(--ds-foreground)]"
20
+ ], {
21
+ variants: { variant: {
22
+ default: "bg-[var(--ds-card)] border-[var(--ds-border-subtle)] [&_[data-slot=alert-icon]]:text-[color:var(--ds-muted-foreground)]",
23
+ success: "bg-[var(--ds-success-soft)] border-[var(--ds-success)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-success)]",
24
+ warn: "bg-[var(--ds-warning-soft)] border-[var(--ds-warning)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-warning)]",
25
+ destructive: DESTRUCTIVE_ALERT,
26
+ /** @deprecated Use `destructive`, the name Button and Badge use; this alias paints the same. */
27
+ danger: DESTRUCTIVE_ALERT,
28
+ info: "bg-[var(--ds-info-soft)] border-[var(--ds-info)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-info)]"
29
+ } },
30
+ defaultVariants: { variant: "default" }
31
+ });
32
+ function Alert({ className, variant, ...props }) {
33
+ return /* @__PURE__ */ jsx("div", {
34
+ "data-slot": "alert",
35
+ role: "alert",
36
+ className: cn(alertVariants({ variant }), className),
37
+ ...props
38
+ });
39
+ }
40
+ function AlertIcon({ className, ...props }) {
41
+ return /* @__PURE__ */ jsx("div", {
42
+ "data-slot": "alert-icon",
43
+ className: cn("shrink-0 self-start [&_svg]:size-4.5 [&_svg]:shrink-0", className),
44
+ ...props
45
+ });
46
+ }
47
+ function AlertTitle({ className, ...props }) {
48
+ return /* @__PURE__ */ jsx("div", {
49
+ "data-slot": "alert-title",
50
+ className: cn("self-start font-semibold text-[color:var(--ds-foreground)]", className),
51
+ ...props
52
+ });
53
+ }
54
+ function AlertDescription({ className, ...props }) {
55
+ return /* @__PURE__ */ jsx("div", {
56
+ "data-slot": "alert-description",
57
+ className: cn("mt-0.5 self-start text-[color:var(--ds-muted-foreground)]", className),
58
+ ...props
59
+ });
60
+ }
61
+ //#endregion
62
+ export { Alert, AlertDescription, AlertIcon, AlertTitle, alertVariants };
63
+
64
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","names":[],"sources":["../../src/components/alert.tsx"],"sourcesContent":["\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Alert — an inline callout. Tinted variants use the `-soft` fill for the\n * background and the tone colour for the border and icon; the body text stays\n * on the foreground token so it reads in both themes.\n *\n * The error tone is `destructive`, the same spelling Button uses; `danger` is\n * a deprecated alias of it and paints identically.\n */\nconst DESTRUCTIVE_ALERT =\n \"bg-[var(--ds-destructive-soft)] border-[var(--ds-destructive)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-destructive)]\";\n\nconst alertVariants = /* @__PURE__ */ cva(\n [\n \"flex gap-3 rounded-[var(--ds-radius-md)] border px-3.5 py-3\",\n \"text-[length:var(--ds-text-caption-lg)] leading-[var(--ds-text-caption-lg--line-height)]\",\n \"text-[color:var(--ds-foreground)]\",\n ],\n {\n variants: {\n variant: {\n default:\n \"bg-[var(--ds-card)] border-[var(--ds-border-subtle)] [&_[data-slot=alert-icon]]:text-[color:var(--ds-muted-foreground)]\",\n success:\n \"bg-[var(--ds-success-soft)] border-[var(--ds-success)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-success)]\",\n warn: \"bg-[var(--ds-warning-soft)] border-[var(--ds-warning)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-warning)]\",\n destructive: DESTRUCTIVE_ALERT,\n /** @deprecated Use `destructive`, the name Button and Badge use; this alias paints the same. */\n danger: DESTRUCTIVE_ALERT,\n info: \"bg-[var(--ds-info-soft)] border-[var(--ds-info)]/35 [&_[data-slot=alert-icon]]:text-[color:var(--ds-info)]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nexport interface AlertProps\n extends React.ComponentProps<\"div\">, VariantProps<typeof alertVariants> {}\n\nfunction Alert({ className, variant, ...props }: AlertProps) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertIcon({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-icon\"\n className={cn(\"shrink-0 self-start [&_svg]:size-4.5 [&_svg]:shrink-0\", className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\"self-start font-semibold text-[color:var(--ds-foreground)]\", className)}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\"mt-0.5 self-start text-[color:var(--ds-muted-foreground)]\", className)}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertIcon, AlertTitle, AlertDescription, alertVariants };\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,oBACJ;AAEF,MAAM,gBAAgC,oBACpC;CACE;CACA;CACA;AACF,GACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,SACE;EACF,MAAM;EACN,aAAa;;EAEb,QAAQ;EACR,MAAM;CACR,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAKA,SAAS,MAAM,EAAE,WAAW,SAAS,GAAG,SAAqB;CAC3D,OACE,oBAAC,OAAD;EACE,aAAU;EACV,MAAK;EACL,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;EACnD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;CACvE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,yDAAyD,SAAS;EAChF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;CACxE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,8DAA8D,SAAS;EACrF,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAsC;CAC9E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,6DAA6D,SAAS;EACpF,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { Avatar } from "@base-ui/react/avatar";
3
+ //#region src/components/avatar.d.ts
4
+ /**
5
+ * Avatar.
6
+ *
7
+ * Base UI preloads the image and only mounts `<img>` once it has loaded, so
8
+ * the fallback is what paints while loading and after an error. Initials sit
9
+ * on the primary fill in inverse text.
10
+ *
11
+ * Radix users: `delayMs` on the fallback is now `delay`.
12
+ */
13
+ declare function Avatar$1({ className, ...props }: Avatar.Root.Props): import("react").JSX.Element;
14
+ declare function AvatarImage({ className, ...props }: Avatar.Image.Props): import("react").JSX.Element;
15
+ declare function AvatarFallback({ className, ...props }: Avatar.Fallback.Props): import("react").JSX.Element;
16
+ //#endregion
17
+ export { Avatar$1 as Avatar, AvatarFallback, AvatarImage };
18
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Avatar } from "@base-ui/react/avatar";
6
+ //#region src/components/avatar.tsx
7
+ /**
8
+ * Avatar.
9
+ *
10
+ * Base UI preloads the image and only mounts `<img>` once it has loaded, so
11
+ * the fallback is what paints while loading and after an error. Initials sit
12
+ * on the primary fill in inverse text.
13
+ *
14
+ * Radix users: `delayMs` on the fallback is now `delay`.
15
+ */
16
+ function Avatar$1({ className, ...props }) {
17
+ return /* @__PURE__ */ jsx(Avatar.Root, {
18
+ "data-slot": "avatar",
19
+ className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-[var(--ds-radius-full)]", className),
20
+ ...props
21
+ });
22
+ }
23
+ function AvatarImage({ className, ...props }) {
24
+ return /* @__PURE__ */ jsx(Avatar.Image, {
25
+ "data-slot": "avatar-image",
26
+ className: cn("aspect-square size-full object-cover", className),
27
+ ...props
28
+ });
29
+ }
30
+ function AvatarFallback({ className, ...props }) {
31
+ return /* @__PURE__ */ jsx(Avatar.Fallback, {
32
+ "data-slot": "avatar-fallback",
33
+ className: cn("flex size-full select-none items-center justify-center rounded-[var(--ds-radius-full)]", "bg-[var(--ds-primary)] text-[color:var(--ds-primary-foreground)]", "text-[length:var(--ds-text-caption-lg)] font-semibold tracking-tight", className),
34
+ ...props
35
+ });
36
+ }
37
+ //#endregion
38
+ export { Avatar$1 as Avatar, AvatarFallback, AvatarImage };
39
+
40
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","names":["Avatar","AvatarPrimitive"],"sources":["../../src/components/avatar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Avatar as AvatarPrimitive } from \"@base-ui/react/avatar\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Avatar.\n *\n * Base UI preloads the image and only mounts `<img>` once it has loaded, so\n * the fallback is what paints while loading and after an error. Initials sit\n * on the primary fill in inverse text.\n *\n * Radix users: `delayMs` on the fallback is now `delay`.\n */\nfunction Avatar({ className, ...props }: AvatarPrimitive.Root.Props) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"relative flex size-8 shrink-0 overflow-hidden rounded-[var(--ds-radius-full)]\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full object-cover\", className)}\n {...props}\n />\n );\n}\n\nfunction AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"flex size-full select-none items-center justify-center rounded-[var(--ds-radius-full)]\",\n \"bg-[var(--ds-primary)] text-[color:var(--ds-primary-foreground)]\",\n \"text-[length:var(--ds-text-caption-lg)] font-semibold tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"],"mappings":";;;;;;;;;;;;;;;AAcA,SAASA,SAAO,EAAE,WAAW,GAAG,SAAqC;CACnE,OACE,oBAACC,OAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT,iFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAACA,OAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAyC;CAC/E,OACE,oBAACA,OAAgB,UAAjB;EACE,aAAU;EACV,WAAW,GACT,0FACA,oEACA,wEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
+ //#region src/components/badge.d.ts
5
+ declare const badgeVariants: (props?: ({
6
+ variant?: "default" | "success" | "warning" | "warn" | "destructive" | "danger" | "info" | "neutral" | "secondary" | "outline" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ export interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {}
9
+ declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
10
+ //#endregion
11
+ export { Badge, badgeVariants };
12
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ "use client";
3
+ import { cn } from "../lib/cn.js";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { cva } from "class-variance-authority";
6
+ //#region src/components/badge.tsx
7
+ /**
8
+ * Badge — the mono, uppercase status label. Each tone pairs a `-soft` fill
9
+ * with its foreground token. The error tone is `destructive`, the same
10
+ * spelling Button and Alert use; `warn`, `danger` and `secondary` are
11
+ * deprecated aliases kept for cortenaweb call sites and paint identically.
12
+ */
13
+ const DESTRUCTIVE_BADGE = "bg-[var(--ds-destructive-soft)] text-[color:var(--ds-destructive)]";
14
+ const badgeVariants = /* @__PURE__ */ cva([
15
+ "inline-flex items-center gap-1.5 px-1.5 py-0.5 whitespace-nowrap",
16
+ "rounded-[var(--ds-radius-sm)]",
17
+ "font-[family-name:var(--ds-font-mono)] text-[length:var(--ds-text-caption-sm)] font-medium uppercase",
18
+ "tracking-[var(--ds-text-eyebrow--letter-spacing)] leading-[var(--ds-text-caption-sm--line-height)]",
19
+ "[&_svg]:size-3 [&_svg]:shrink-0"
20
+ ], {
21
+ variants: { variant: {
22
+ default: "bg-[var(--ds-primary-soft)] text-[color:var(--ds-primary-soft-foreground)]",
23
+ success: "bg-[var(--ds-success-soft)] text-[color:var(--ds-success)]",
24
+ warning: "bg-[var(--ds-warning-soft)] text-[color:var(--ds-warning)]",
25
+ /** @deprecated Use `warning`; this alias paints the same. */
26
+ warn: "bg-[var(--ds-warning-soft)] text-[color:var(--ds-warning)]",
27
+ destructive: DESTRUCTIVE_BADGE,
28
+ /** @deprecated Use `destructive`, the name Button and Alert use; this alias paints the same. */
29
+ danger: DESTRUCTIVE_BADGE,
30
+ info: "bg-[var(--ds-info-soft)] text-[color:var(--ds-info)]",
31
+ neutral: "bg-[var(--ds-hover)] text-[color:var(--ds-muted-foreground)]",
32
+ secondary: "bg-[var(--ds-hover)] text-[color:var(--ds-muted-foreground)]",
33
+ outline: "bg-transparent border border-[var(--ds-border)] text-[color:var(--ds-muted-foreground)]"
34
+ } },
35
+ defaultVariants: { variant: "default" }
36
+ });
37
+ function Badge({ className, variant, ...props }) {
38
+ return /* @__PURE__ */ jsx("span", {
39
+ "data-slot": "badge",
40
+ className: cn(badgeVariants({ variant }), className),
41
+ ...props
42
+ });
43
+ }
44
+ //#endregion
45
+ export { Badge, badgeVariants };
46
+
47
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","names":[],"sources":["../../src/components/badge.tsx"],"sourcesContent":["\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { cn } from \"@/lib/cn\";\n\n/**\n * Badge — the mono, uppercase status label. Each tone pairs a `-soft` fill\n * with its foreground token. The error tone is `destructive`, the same\n * spelling Button and Alert use; `warn`, `danger` and `secondary` are\n * deprecated aliases kept for cortenaweb call sites and paint identically.\n */\nconst DESTRUCTIVE_BADGE = \"bg-[var(--ds-destructive-soft)] text-[color:var(--ds-destructive)]\";\n\nconst badgeVariants = /* @__PURE__ */ cva(\n [\n \"inline-flex items-center gap-1.5 px-1.5 py-0.5 whitespace-nowrap\",\n \"rounded-[var(--ds-radius-sm)]\",\n \"font-[family-name:var(--ds-font-mono)] text-[length:var(--ds-text-caption-sm)] font-medium uppercase\",\n \"tracking-[var(--ds-text-eyebrow--letter-spacing)] leading-[var(--ds-text-caption-sm--line-height)]\",\n \"[&_svg]:size-3 [&_svg]:shrink-0\",\n ],\n {\n variants: {\n variant: {\n default: \"bg-[var(--ds-primary-soft)] text-[color:var(--ds-primary-soft-foreground)]\",\n success: \"bg-[var(--ds-success-soft)] text-[color:var(--ds-success)]\",\n warning: \"bg-[var(--ds-warning-soft)] text-[color:var(--ds-warning)]\",\n /** @deprecated Use `warning`; this alias paints the same. */\n warn: \"bg-[var(--ds-warning-soft)] text-[color:var(--ds-warning)]\",\n destructive: DESTRUCTIVE_BADGE,\n /** @deprecated Use `destructive`, the name Button and Alert use; this alias paints the same. */\n danger: DESTRUCTIVE_BADGE,\n info: \"bg-[var(--ds-info-soft)] text-[color:var(--ds-info)]\",\n neutral: \"bg-[var(--ds-hover)] text-[color:var(--ds-muted-foreground)]\",\n secondary: \"bg-[var(--ds-hover)] text-[color:var(--ds-muted-foreground)]\",\n outline:\n \"bg-transparent border border-[var(--ds-border)] text-[color:var(--ds-muted-foreground)]\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nexport interface BadgeProps\n extends React.ComponentProps<\"span\">, VariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return (\n <span data-slot=\"badge\" className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,oBAAoB;AAE1B,MAAM,gBAAgC,oBACpC;CACE;CACA;CACA;CACA;CACA;AACF,GACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,SAAS;;EAET,MAAM;EACN,aAAa;;EAEb,QAAQ;EACR,MAAM;EACN,SAAS;EACT,WAAW;EACX,SACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAKA,SAAS,MAAM,EAAE,WAAW,SAAS,GAAG,SAAqB;CAC3D,OACE,oBAAC,QAAD;EAAM,aAAU;EAAQ,WAAW,GAAG,cAAc,EAAE,QAAQ,CAAC,GAAG,SAAS;EAAG,GAAI;CAAQ,CAAA;AAE9F"}
@@ -0,0 +1,71 @@
1
+ "use client";
2
+ import { RenderProp } from "../lib/render.js";
3
+ import * as React from "react";
4
+ //#region src/components/breadcrumb.d.ts
5
+ /**
6
+ * Breadcrumb — the trail above a page title.
7
+ *
8
+ * A `<nav aria-label="Breadcrumb">` around an ordered list, which is what
9
+ * assistive technology expects: the list order is the hierarchy, so a screen
10
+ * reader announces "list, 4 items" and reads the path in order. Separators are
11
+ * decorative list items, not text inside the links, so a link's accessible
12
+ * name is the crumb and nothing else.
13
+ *
14
+ * The last crumb is `BreadcrumbPage`, not a link: it is the page you are on,
15
+ * so it carries `aria-current="page"` and is not focusable. Everything before
16
+ * it is a `BreadcrumbLink`.
17
+ *
18
+ * ```tsx
19
+ * <Breadcrumb>
20
+ * <BreadcrumbList>
21
+ * <BreadcrumbItem>
22
+ * <BreadcrumbLink href="/">Home</BreadcrumbLink>
23
+ * </BreadcrumbItem>
24
+ * <BreadcrumbSeparator />
25
+ * <BreadcrumbItem>
26
+ * <BreadcrumbEllipsis />
27
+ * </BreadcrumbItem>
28
+ * <BreadcrumbSeparator />
29
+ * <BreadcrumbItem>
30
+ * <BreadcrumbPage>Invoice 4021</BreadcrumbPage>
31
+ * </BreadcrumbItem>
32
+ * </BreadcrumbList>
33
+ * </Breadcrumb>
34
+ * ```
35
+ *
36
+ * **Router links.** `BreadcrumbLink` renders an `<a>` by default. Pass
37
+ * `render` with the router's link component and the class name, `href` and
38
+ * handlers are merged onto it, the same contract as `ButtonLink`:
39
+ * `render={<NextLink href="/projects" />}` or
40
+ * `render={<Link to="/projects" />}`. This is deliberately not Base UI's
41
+ * `render` — a breadcrumb is markup, not a Base UI primitive — but it takes
42
+ * the same shape so there is one thing to remember.
43
+ */
44
+ declare function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">): React.JSX.Element;
45
+ declare function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">): React.JSX.Element;
46
+ declare function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
47
+ export interface BreadcrumbLinkProps extends React.ComponentProps<"a"> {
48
+ /** Replace the rendered `<a>` with a router link; props are merged onto it. */
49
+ render?: RenderProp;
50
+ }
51
+ declare function BreadcrumbLink({ className, render, children, ...props }: BreadcrumbLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
52
+ /**
53
+ * The current page: the last crumb, which is not a link.
54
+ *
55
+ * A plain `<span aria-current="page">`, deliberately not `role="link"` with
56
+ * `aria-disabled` — a disabled link that cannot be focused is a fiction, and
57
+ * it makes `getByRole("link")` return a crumb that navigates nowhere. With a
58
+ * span, the roles in the trail are exactly the crumbs you can travel to.
59
+ */
60
+ declare function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
61
+ /** Decorative divider between two crumbs; a chevron unless children replace it. */
62
+ declare function BreadcrumbSeparator({ className, children, ...props }: React.ComponentProps<"li">): React.JSX.Element;
63
+ /**
64
+ * Stands in for the crumbs a long trail collapses; put it inside a
65
+ * BreadcrumbItem. The glyph is hidden and the label is not: an ellipsis that
66
+ * announces nothing leaves a screen-reader user with a gap in the path.
67
+ */
68
+ declare function BreadcrumbEllipsis({ className, children, ...props }: React.ComponentProps<"span">): React.JSX.Element;
69
+ //#endregion
70
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
71
+ //# sourceMappingURL=breadcrumb.d.ts.map