@vllnt/ui 0.2.1 → 0.3.0-canary.a42d8f4

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 (325) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +59 -30
  3. package/dist/components/accordion/accordion.js +2 -2
  4. package/dist/components/activity-heatmap/activity-heatmap.js +17 -14
  5. package/dist/components/activity-log/activity-log.js +7 -6
  6. package/dist/components/agent-activity/agent-activity.js +311 -0
  7. package/dist/components/agent-activity/index.js +18 -0
  8. package/dist/components/ai-artifact/ai-artifact.js +422 -0
  9. package/dist/components/ai-artifact/index.js +24 -0
  10. package/dist/components/ai-chat-input/ai-chat-input.js +3 -3
  11. package/dist/components/ai-message-bubble/ai-message-bubble.js +2 -2
  12. package/dist/components/ai-sidebar/ai-sidebar.js +254 -0
  13. package/dist/components/ai-sidebar/index.js +22 -0
  14. package/dist/components/ai-source-citation/ai-source-citation.js +2 -2
  15. package/dist/components/ai-tool-call-display/ai-tool-call-display.js +5 -5
  16. package/dist/components/alert-pulse/alert-pulse.js +93 -0
  17. package/dist/components/alert-pulse/index.js +6 -0
  18. package/dist/components/anchor-port/anchor-port.js +51 -0
  19. package/dist/components/anchor-port/index.js +4 -0
  20. package/dist/components/animated-text/animated-text.js +8 -7
  21. package/dist/components/annotation/annotation.js +1 -1
  22. package/dist/components/auto-reload/auto-reload.js +377 -0
  23. package/dist/components/auto-reload/index.js +6 -0
  24. package/dist/components/avatar/avatar.js +1 -1
  25. package/dist/components/avatar-group/avatar-group.js +5 -5
  26. package/dist/components/banner/banner.js +155 -0
  27. package/dist/components/banner/index.js +10 -0
  28. package/dist/components/blog-card/blog-card.js +4 -2
  29. package/dist/components/border-beam/border-beam.js +2 -2
  30. package/dist/components/bottom-activity-strip/bottom-activity-strip.js +91 -0
  31. package/dist/components/bottom-activity-strip/index.js +6 -0
  32. package/dist/components/bottom-bar/bottom-bar.js +25 -0
  33. package/dist/components/bottom-bar/index.js +4 -0
  34. package/dist/components/breadcrumb/breadcrumb.js +33 -26
  35. package/dist/components/button/button.js +1 -1
  36. package/dist/components/calendar/calendar.js +6 -6
  37. package/dist/components/callout/callout.js +1 -1
  38. package/dist/components/candlestick-chart/candlestick-chart.js +6 -5
  39. package/dist/components/canvas-shell/canvas-foundation-demo.js +183 -0
  40. package/dist/components/canvas-shell/canvas-shell-route-config.js +0 -0
  41. package/dist/components/canvas-shell/canvas-shell.js +261 -0
  42. package/dist/components/canvas-shell/index.js +4 -0
  43. package/dist/components/canvas-view/canvas-view.js +461 -0
  44. package/dist/components/canvas-view/index.js +6 -0
  45. package/dist/components/carousel/carousel.js +18 -10
  46. package/dist/components/category-filter/category-filter.js +1 -1
  47. package/dist/components/chart/area-chart.js +1 -0
  48. package/dist/components/chart/line-chart.js +1 -0
  49. package/dist/components/chat-dock-section/chat-dock-section.js +56 -0
  50. package/dist/components/chat-dock-section/index.js +6 -0
  51. package/dist/components/checkbox/checkbox.js +2 -2
  52. package/dist/components/checklist/checklist.js +45 -10
  53. package/dist/components/checklist/index.js +10 -2
  54. package/dist/components/choropleth-map/choropleth-map.js +373 -0
  55. package/dist/components/choropleth-map/index.js +10 -0
  56. package/dist/components/chronological-timeline/chronological-timeline.js +343 -0
  57. package/dist/components/chronological-timeline/index.js +8 -0
  58. package/dist/components/civilization-card/civilization-card.js +258 -0
  59. package/dist/components/civilization-card/index.js +8 -0
  60. package/dist/components/code-block/code-block.js +33 -12
  61. package/dist/components/code-playground/code-playground.js +12 -9
  62. package/dist/components/combobox/combobox.js +47 -28
  63. package/dist/components/command/command.js +1 -1
  64. package/dist/components/comment-pin/comment-pin.js +104 -0
  65. package/dist/components/comment-pin/index.js +6 -0
  66. package/dist/components/comparison/comparison.js +11 -10
  67. package/dist/components/completion-dialog/completion-dialog.js +20 -12
  68. package/dist/components/connector-edge/connector-edge.js +66 -0
  69. package/dist/components/connector-edge/index.js +6 -0
  70. package/dist/components/content-intro/content-intro.js +25 -21
  71. package/dist/components/context-lens/context-lens.js +98 -0
  72. package/dist/components/context-lens/index.js +6 -0
  73. package/dist/components/context-menu/context-menu.js +4 -4
  74. package/dist/components/conversation-thread/conversation-thread.js +348 -0
  75. package/dist/components/conversation-thread/index.js +20 -0
  76. package/dist/components/cookie-consent/cookie-consent.js +1 -1
  77. package/dist/components/copy-button/copy-button.js +189 -0
  78. package/dist/components/copy-button/index.js +8 -0
  79. package/dist/components/countdown-timer/countdown-timer.js +9 -8
  80. package/dist/components/credit-badge/credit-badge.js +1 -7
  81. package/dist/components/curriculum/curriculum.js +349 -0
  82. package/dist/components/curriculum/index.js +10 -0
  83. package/dist/components/data-list/data-list.js +2 -1
  84. package/dist/components/data-table/data-table.js +6 -5
  85. package/dist/components/date-picker/date-picker.js +2 -7
  86. package/dist/components/dialog/dialog.js +1 -1
  87. package/dist/components/document-sibling-nav/document-sibling-nav.js +111 -0
  88. package/dist/components/document-sibling-nav/index.js +8 -0
  89. package/dist/components/dropdown-menu/dropdown-menu.js +3 -3
  90. package/dist/components/edge-label/edge-label.js +26 -0
  91. package/dist/components/edge-label/index.js +4 -0
  92. package/dist/components/empty-state/empty-state.js +93 -0
  93. package/dist/components/empty-state/index.js +8 -0
  94. package/dist/components/era-comparison/era-comparison.js +198 -0
  95. package/dist/components/era-comparison/index.js +16 -0
  96. package/dist/components/exercise/exercise.js +15 -7
  97. package/dist/components/faq/faq.js +8 -4
  98. package/dist/components/file-upload/file-upload.js +4 -9
  99. package/dist/components/filter-bar/filter-bar.js +9 -8
  100. package/dist/components/flashcard/flashcard.js +2 -2
  101. package/dist/components/floating-action-button/floating-action-button.js +1 -1
  102. package/dist/components/floating-toolbar/floating-toolbar.js +66 -0
  103. package/dist/components/floating-toolbar/index.js +6 -0
  104. package/dist/components/flow-diagram/flow-controls.js +9 -9
  105. package/dist/components/flow-diagram/flow-error-boundary.js +2 -2
  106. package/dist/components/flow-diagram/flow-fullscreen.js +2 -2
  107. package/dist/components/follow-mode/follow-mode.js +89 -0
  108. package/dist/components/follow-mode/index.js +6 -0
  109. package/dist/components/form/form.js +432 -0
  110. package/dist/components/form/index.js +20 -0
  111. package/dist/components/gantt-chart/gantt-chart.js +334 -0
  112. package/dist/components/gantt-chart/index.js +6 -0
  113. package/dist/components/geography-quiz-map/geography-quiz-map.js +343 -0
  114. package/dist/components/geography-quiz-map/index.js +12 -0
  115. package/dist/components/glass-panel/glass-panel.js +21 -0
  116. package/dist/components/glass-panel/index.js +4 -0
  117. package/dist/components/globe-3d/globe-3d.js +429 -0
  118. package/dist/components/globe-3d/index.js +10 -0
  119. package/dist/components/group-hull/group-hull.js +29 -0
  120. package/dist/components/group-hull/index.js +4 -0
  121. package/dist/components/handoff-beacon/handoff-beacon.js +78 -0
  122. package/dist/components/handoff-beacon/index.js +6 -0
  123. package/dist/components/heat-map-overlay/heat-map-overlay.js +215 -0
  124. package/dist/components/heat-map-overlay/index.js +6 -0
  125. package/dist/components/heat-overlay/heat-overlay.js +92 -0
  126. package/dist/components/heat-overlay/index.js +6 -0
  127. package/dist/components/historic-timeline/historic-timeline.js +342 -0
  128. package/dist/components/historic-timeline/index.js +6 -0
  129. package/dist/components/historical-figure-card/historical-figure-card.js +270 -0
  130. package/dist/components/historical-figure-card/index.js +6 -0
  131. package/dist/components/horizontal-scroll-row/horizontal-scroll-row.js +6 -5
  132. package/dist/components/index.js +570 -1
  133. package/dist/components/infinite-plane/index.js +6 -0
  134. package/dist/components/infinite-plane/infinite-plane.js +75 -0
  135. package/dist/components/inline-input/inline-input.js +1 -1
  136. package/dist/components/input-otp/input-otp.js +1 -1
  137. package/dist/components/interactive-timeline/index.js +16 -0
  138. package/dist/components/interactive-timeline/interactive-timeline.js +711 -0
  139. package/dist/components/jarvis-dock/index.js +6 -0
  140. package/dist/components/jarvis-dock/jarvis-dock.js +98 -0
  141. package/dist/components/kbd/index.js +5 -0
  142. package/dist/components/kbd/kbd.js +117 -0
  143. package/dist/components/key-concept/key-concept.js +6 -5
  144. package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +4 -3
  145. package/dist/components/knowledge-check/index.js +6 -0
  146. package/dist/components/knowledge-check/knowledge-check.js +448 -0
  147. package/dist/components/lang-provider/lang-provider.js +3 -3
  148. package/dist/components/learning-objectives/learning-objectives.js +14 -13
  149. package/dist/components/left-rail/index.js +4 -0
  150. package/dist/components/left-rail/left-rail.js +25 -0
  151. package/dist/components/live-cursor/index.js +6 -0
  152. package/dist/components/live-cursor/live-cursor.js +62 -0
  153. package/dist/components/live-feed/live-feed.js +17 -15
  154. package/dist/components/map-2d/index.js +20 -0
  155. package/dist/components/map-2d/map-2d.js +455 -0
  156. package/dist/components/map-timeline/index.js +16 -0
  157. package/dist/components/map-timeline/map-timeline.js +506 -0
  158. package/dist/components/market-treemap/market-treemap.js +3 -3
  159. package/dist/components/mdx-content/mdx-content.js +21 -10
  160. package/dist/components/menubar/menubar.js +4 -4
  161. package/dist/components/metric-cluster/index.js +6 -0
  162. package/dist/components/metric-cluster/metric-cluster.js +96 -0
  163. package/dist/components/metric-gauge/metric-gauge.js +2 -2
  164. package/dist/components/mini-map-panel/index.js +6 -0
  165. package/dist/components/mini-map-panel/mini-map-panel.js +74 -0
  166. package/dist/components/model-comparison/index.js +12 -0
  167. package/dist/components/model-comparison/model-comparison.js +211 -0
  168. package/dist/components/model-selector/model-selector.js +3 -3
  169. package/dist/components/multi-select/index.js +6 -0
  170. package/dist/components/multi-select/multi-select.js +258 -0
  171. package/dist/components/multi-select-lasso/index.js +6 -0
  172. package/dist/components/multi-select-lasso/multi-select-lasso.js +76 -0
  173. package/dist/components/navbar-saas/navbar-saas.js +9 -8
  174. package/dist/components/navigation-menu/navigation-menu.js +2 -2
  175. package/dist/components/newsletter-signup/index.js +8 -0
  176. package/dist/components/newsletter-signup/newsletter-signup.js +269 -0
  177. package/dist/components/number-input/number-input.js +2 -2
  178. package/dist/components/number-ticker/number-ticker.js +11 -4
  179. package/dist/components/object-card/index.js +6 -0
  180. package/dist/components/object-card/object-card.js +126 -0
  181. package/dist/components/object-handle/index.js +4 -0
  182. package/dist/components/object-handle/object-handle.js +38 -0
  183. package/dist/components/object-inspector/index.js +6 -0
  184. package/dist/components/object-inspector/object-inspector.js +136 -0
  185. package/dist/components/order-book/order-book.js +2 -2
  186. package/dist/components/overview-board/index.js +8 -0
  187. package/dist/components/overview-board/overview-board.js +127 -0
  188. package/dist/components/parallel-timeline/index.js +6 -0
  189. package/dist/components/parallel-timeline/parallel-timeline.js +251 -0
  190. package/dist/components/password-input/password-input.js +1 -1
  191. package/dist/components/plan-badge/plan-badge.js +1 -7
  192. package/dist/components/playback-ghost/index.js +6 -0
  193. package/dist/components/playback-ghost/playback-ghost.js +83 -0
  194. package/dist/components/policy-delivery-panel/index.js +6 -0
  195. package/dist/components/policy-delivery-panel/policy-delivery-panel.js +99 -0
  196. package/dist/components/presence-stack/index.js +6 -0
  197. package/dist/components/presence-stack/presence-stack.js +108 -0
  198. package/dist/components/presence-sync-indicator/index.js +6 -0
  199. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +73 -0
  200. package/dist/components/pricing-table/index.js +8 -0
  201. package/dist/components/pricing-table/pricing-table.js +247 -0
  202. package/dist/components/primary-source-viewer/index.js +26 -0
  203. package/dist/components/primary-source-viewer/primary-source-viewer.js +439 -0
  204. package/dist/components/pro-tip/pro-tip.js +6 -6
  205. package/dist/components/profile-section/profile-section.js +3 -2
  206. package/dist/components/progress-card/progress-card.js +5 -4
  207. package/dist/components/progress-tracker/index.js +20 -0
  208. package/dist/components/progress-tracker/progress-tracker.js +537 -0
  209. package/dist/components/prompt-templates/index.js +6 -0
  210. package/dist/components/prompt-templates/prompt-templates.js +403 -0
  211. package/dist/components/property-section/index.js +6 -0
  212. package/dist/components/property-section/property-section.js +101 -0
  213. package/dist/components/quiz/quiz.js +7 -6
  214. package/dist/components/radio-group/radio-group.js +2 -2
  215. package/dist/components/rating/rating.js +3 -3
  216. package/dist/components/relationship-inspector/index.js +6 -0
  217. package/dist/components/relationship-inspector/relationship-inspector.js +102 -0
  218. package/dist/components/resizable/resizable.js +1 -1
  219. package/dist/components/right-dock/index.js +4 -0
  220. package/dist/components/right-dock/right-dock.js +28 -0
  221. package/dist/components/route-map/index.js +6 -0
  222. package/dist/components/route-map/route-map.js +339 -0
  223. package/dist/components/routing-assignment-panel/index.js +6 -0
  224. package/dist/components/routing-assignment-panel/routing-assignment-panel.js +122 -0
  225. package/dist/components/run-timeline/index.js +6 -0
  226. package/dist/components/run-timeline/run-timeline.js +221 -0
  227. package/dist/components/runtime-overview-panel/index.js +6 -0
  228. package/dist/components/runtime-overview-panel/runtime-overview-panel.js +89 -0
  229. package/dist/components/scope-selector/scope-selector.js +8 -8
  230. package/dist/components/search-bar/search-bar.js +24 -2
  231. package/dist/components/search-dialog/search-dialog.js +484 -51
  232. package/dist/components/segmented-control/index.js +12 -0
  233. package/dist/components/segmented-control/segmented-control.js +61 -0
  234. package/dist/components/select/select.js +5 -5
  235. package/dist/components/selection-halo/index.js +6 -0
  236. package/dist/components/selection-halo/selection-halo.js +72 -0
  237. package/dist/components/selection-presence/index.js +6 -0
  238. package/dist/components/selection-presence/selection-presence.js +50 -0
  239. package/dist/components/severity-badge/severity-badge.js +2 -2
  240. package/dist/components/share-dialog/share-dialog.js +2 -2
  241. package/dist/components/share-section/share-section.js +2 -1
  242. package/dist/components/sheet/sheet.js +1 -1
  243. package/dist/components/sidebar/sidebar.js +31 -26
  244. package/dist/components/sidebar-toggle/sidebar-toggle.js +5 -3
  245. package/dist/components/slider/slider.js +1 -1
  246. package/dist/components/slideshow/slideshow.js +15 -13
  247. package/dist/components/snap-guides/index.js +6 -0
  248. package/dist/components/snap-guides/snap-guides.js +45 -0
  249. package/dist/components/social-fab/social-fab.js +12 -11
  250. package/dist/components/sparkline-grid/sparkline-grid.js +1 -1
  251. package/dist/components/spinner/spinner.js +4 -4
  252. package/dist/components/spinner/unicode-spinner.js +5 -2
  253. package/dist/components/stat-card/stat-card.js +5 -5
  254. package/dist/components/state-badge-overlay/index.js +6 -0
  255. package/dist/components/state-badge-overlay/state-badge-overlay.js +90 -0
  256. package/dist/components/static-code/index.js +4 -0
  257. package/dist/components/static-code/static-code-copy.js +29 -0
  258. package/dist/components/static-code/static-code.js +41 -0
  259. package/dist/components/status-board/status-board.js +14 -7
  260. package/dist/components/status-indicator/status-indicator.js +3 -3
  261. package/dist/components/step-by-step/step-by-step.js +10 -8
  262. package/dist/components/step-navigation/step-navigation.js +2 -2
  263. package/dist/components/stepper/stepper.js +3 -3
  264. package/dist/components/sticky-metric/index.js +6 -0
  265. package/dist/components/sticky-metric/sticky-metric.js +83 -0
  266. package/dist/components/story-map/index.js +8 -0
  267. package/dist/components/story-map/story-map.js +414 -0
  268. package/dist/components/subscription-card/subscription-card.js +1 -1
  269. package/dist/components/switch/switch.js +1 -1
  270. package/dist/components/table-of-contents/table-of-contents.js +5 -2
  271. package/dist/components/table-of-contents-panel/table-of-contents-panel.js +8 -6
  272. package/dist/components/tabs/tabs.js +26 -8
  273. package/dist/components/tags-input/index.js +4 -0
  274. package/dist/components/tags-input/tags-input.js +186 -0
  275. package/dist/components/terminal/terminal.js +61 -37
  276. package/dist/components/theme-preset-provider/index.js +4 -0
  277. package/dist/components/theme-preset-provider/theme-preset-provider.js +55 -0
  278. package/dist/components/theme-switcher/index.js +4 -0
  279. package/dist/components/theme-switcher/theme-switcher.js +43 -0
  280. package/dist/components/theme-toggle/theme-toggle.js +2 -2
  281. package/dist/components/thinking-block/thinking-block.js +3 -3
  282. package/dist/components/thread-bubble/index.js +6 -0
  283. package/dist/components/thread-bubble/thread-bubble.js +85 -0
  284. package/dist/components/threshold-ring/index.js +6 -0
  285. package/dist/components/threshold-ring/threshold-ring.js +160 -0
  286. package/dist/components/ticker-tape/ticker-tape.js +4 -4
  287. package/dist/components/timeline/index.js +12 -0
  288. package/dist/components/timeline/timeline.js +239 -0
  289. package/dist/components/timeline-scrubber/index.js +6 -0
  290. package/dist/components/timeline-scrubber/timeline-scrubber.js +179 -0
  291. package/dist/components/tldr-section/tldr-section.js +11 -9
  292. package/dist/components/top-bar/index.js +4 -0
  293. package/dist/components/top-bar/top-bar.js +31 -0
  294. package/dist/components/tour/tour.js +2 -2
  295. package/dist/components/transaction-list/index.js +14 -0
  296. package/dist/components/transaction-list/transaction-list.js +247 -0
  297. package/dist/components/tree-view/index.js +6 -0
  298. package/dist/components/tree-view/tree-view.js +298 -0
  299. package/dist/components/tutorial-card/tutorial-card.js +1 -1
  300. package/dist/components/tutorial-complete/tutorial-complete.js +16 -14
  301. package/dist/components/tutorial-filters/tutorial-filters.js +2 -2
  302. package/dist/components/tutorial-intro-content/tutorial-intro-content.js +5 -5
  303. package/dist/components/tutorial-mdx/tutorial-mdx.js +6 -6
  304. package/dist/components/usage-breakdown/usage-breakdown.js +11 -6
  305. package/dist/components/video-embed/video-embed.js +2 -2
  306. package/dist/components/viewport-bookmarks/index.js +6 -0
  307. package/dist/components/viewport-bookmarks/viewport-bookmarks.js +118 -0
  308. package/dist/components/wallet-card/wallet-card.js +1 -1
  309. package/dist/components/watchlist/watchlist.js +7 -6
  310. package/dist/components/workspace-switcher/index.js +6 -0
  311. package/dist/components/workspace-switcher/workspace-switcher.js +61 -0
  312. package/dist/components/world-breadcrumbs/index.js +6 -0
  313. package/dist/components/world-breadcrumbs/world-breadcrumbs.js +114 -0
  314. package/dist/components/world-clock-bar/world-clock-bar.js +35 -14
  315. package/dist/components/zoom-hud/index.js +4 -0
  316. package/dist/components/zoom-hud/zoom-hud.js +61 -0
  317. package/dist/index.d.ts +8066 -246
  318. package/dist/index.js +21 -1
  319. package/dist/lib/theme-presets.js +32 -0
  320. package/dist/lib/use-theme-preset.js +94 -0
  321. package/dist/tailwind-preset.js +19 -19
  322. package/package.json +13 -8
  323. package/styles.css +38 -38
  324. package/themes/default.css +39 -39
  325. package/themes/presets.css +547 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,43 @@ All notable changes to `@vllnt/ui` are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ > Target version: **`0.3.0`** — shipping as `0.3.0-canary.<sha>` on the npm `canary` tag on every merge to main. The stable `latest` release is gated on the [ROADMAP.md](../../ROADMAP.md) shipping criteria and is not yet published.
10
+
11
+ ### Added
12
+
13
+ - **Release intelligence surface** — `/changelog`, `/releases`, `/rss.xml`, and `/atom.xml` expose one changelog source through HTML, GitHub release cards, and feed readers. `/docs/changelog` redirects to `/changelog`.
14
+ - **Hooks + utility primitives** — `CopyButton` (+ `useCopyToClipboard` hook), `Banner` + `BannerAction`, `Kbd`, `EmptyState`, `DocumentSiblingNav`.
15
+ - **Pricing + identity cards** — `PricingTable` + `PricingPlan`, `HistoricalFigureCard`, `CivilizationCard` (+ `CivilizationComparison`).
16
+ - **Newsletter** — `NewsletterSignup` (state-machine driven submit flow).
17
+ - **AI compound families** — `ModelComparison` (+ `Column`, `Meta`, `Vote`), `PromptTemplates`, `AgentActivity`, `AISidebar`, `AIArtifact`.
18
+ - **Era / financial** — `EraComparison`, `TransactionList`.
19
+ - **Forms** — `Form`, `MultiSelect`, `SegmentedControl`, `TagsInput`, `AutoReload`.
20
+ - **Educational** — `KnowledgeCheck` (inline question runner).
21
+ - **Charts + timelines** — `GanttChart`, `ParallelTimeline`, `Timeline` + `TimelineItem`, `HistoricTimeline`, `InteractiveTimeline`, `ChronologicalTimeline`, `TreeView`.
22
+ - **Document + reading** — `PrimarySourceViewer` compound family.
23
+ - **Maps + geography** — `Map2D`, `ChoroplethMap`, `RouteMap`, `HeatMapOverlay`, `GeographyQuizMap`, `MapTimeline`, `StoryMap`, `Globe3D`.
24
+ - **Canvas foundation** — `CanvasShell`, `CanvasView`, `InfinitePlane`, `ViewportBookmarks`, `WorldBreadcrumbs`, `TopBar`, `LeftRail`, `RightDock`, `ZoomHud`, `MiniMapPanel`, `WorkspaceSwitcher`.
25
+ - **Canvas selection + manipulation** — `SelectionHalo`, `SnapGuides`, `FloatingToolbar`, `MultiSelectLasso`, `FollowMode`, `HandoffBeacon`.
26
+ - **Canvas spatial objects** — `ObjectCard`, `ObjectHandle`, `AnchorPort`, `ConnectorEdge`, `EdgeLabel`, `GroupHull`.
27
+ - **Canvas collaboration primitives** — `LiveCursor`, `CommentPin`, `PresenceSyncIndicator`, `PresenceStack`, `SelectionPresence`, `ThreadBubble`.
28
+ - **Inspector + dock panels** — `PropertySection`, `ObjectInspector`, `RelationshipInspector`, `RuntimeOverviewPanel`, `RoutingAssignmentPanel`, `PolicyDeliveryPanel`.
29
+ - **Runtime overlays** — `AlertPulse`, `ThresholdRing`, `StickyMetric`, `HeatOverlay`, `StateBadgeOverlay`, `MetricCluster`, `JarvisDock`, `ContextLens`.
30
+ - **Time navigation** — `TimelineScrubber`, `PlaybackGhost`, `BottomActivityStrip`, `RunTimeline`.
31
+ - Total component count: **225** (up from 140).
32
+
33
+ - **A11y heading-level override** — every title-bearing component (`ProfileSection`, `FAQ`, `Slideshow`, `WorldClockBar`, `TableOfContentsPanel`, `TableOfContents`, `KeyboardShortcutsHelp`, `Watchlist`, `OrderBook`, `HorizontalScrollRow`, `MarketTreemap`, `ActivityHeatmap`, `Glossary`, `StatusBoard`, `CodePlayground`, `Comparison`, `Quiz`, `Exercise`, `ShareSection`, `CompletionDialog`, `Checklist`, `LearningObjectives`, `CandlestickChart`, `StepByStep`) accepts an `as` prop (`"h1"`–`"h6"`); multi-title components (`ContentIntro`, `TutorialComplete`) expose `titleAs` + `tocLabelAs` / `sectionLabelAs`. Defaults preserve existing heading tags. `HeadingTag` is re-exported from `@vllnt/ui`.
34
+
35
+ ### Changed
36
+
37
+ - Registry installs use a **hybrid CLI strategy** — leaf component source is inlined, sibling registry items resolve via `@vllnt/ui` to keep installs minimal and dedupe shared primitives.
38
+
39
+ ### Notes
40
+
41
+ - `ROADMAP.md` added at repo root tracking 50 open issues across 8 phases gating the `0.3.0` cut.
42
+ - `0.3.0` requires the codebase-health gate (`react-doctor` CI + 0 errors), the agent-first surface (`/llms.txt`, `/mcp`, sitemap, JSON-LD), and the rebuilt landing page before shipping.
43
+
7
44
  ## [0.2.1] - 2026-04-21
8
45
 
9
46
  ### Fixed
package/README.md CHANGED
@@ -44,7 +44,7 @@ export default {
44
44
  ```
45
45
 
46
46
  The preset configures:
47
- - **Colors**: `primary`, `secondary`, `muted`, `accent`, `destructive`, `background`, `foreground`, `card`, `popover`, `border`, `input`, `ring` — all as `hsl(var(--name))` for theming
47
+ - **Colors**: `primary`, `secondary`, `muted`, `accent`, `destructive`, `background`, `foreground`, `card`, `popover`, `border`, `input`, `ring` — all as `oklch(var(--name) / <alpha-value>)` for theming
48
48
  - **Border radius**: `lg`, `md`, `sm` via `--radius` CSS variable
49
49
  - **Animations**: `accordion-down`, `accordion-up`, `shimmer`
50
50
  - **Font**: `mono` family via `--font-mono` variable
@@ -83,45 +83,59 @@ export function Example() {
83
83
  | `@vllnt/ui/tailwind-preset` | Tailwind CSS preset config |
84
84
  | `@vllnt/ui/styles.css` | Full styles (Tailwind base + theme variables + utilities) |
85
85
  | `@vllnt/ui/themes/default.css` | Theme CSS variables only (no Tailwind base) |
86
+ | `@vllnt/ui/themes/presets.css` | Built-in color presets (applied via `data-theme`) |
86
87
 
87
88
  ## Theming
88
89
 
89
- All colors use HSL CSS variables. Override them after importing styles:
90
+ All colors are **OKLCH channel** CSS variables (`L C H`), consumed as
91
+ `oklch(var(--name) / <alpha-value>)`. Override them after importing styles:
90
92
 
91
93
  ```css
92
94
  /* Light theme */
93
95
  :root {
94
- --background: 0 0% 100%;
95
- --foreground: 0 0% 3.9%;
96
- --primary: 222.2 47.4% 11.2%;
97
- --primary-foreground: 210 40% 98%;
98
- --secondary: 210 40% 96.1%;
99
- --secondary-foreground: 222.2 47.4% 11.2%;
100
- --muted: 210 40% 96.1%;
101
- --muted-foreground: 215.4 16.3% 46.9%;
102
- --accent: 210 40% 96.1%;
103
- --accent-foreground: 222.2 47.4% 11.2%;
104
- --destructive: 0 84.2% 60.2%;
105
- --destructive-foreground: 0 0% 98%;
106
- --border: 214.3 31.8% 91.4%;
107
- --input: 214.3 31.8% 91.4%;
108
- --ring: 222.2 84% 4.9%;
96
+ --background: 1 0 0;
97
+ --foreground: 0.1445 0 0;
98
+ --primary: 0.2044 0 0;
99
+ --primary-foreground: 0.9848 0 0;
100
+ --secondary: 0.9703 0 0;
101
+ --secondary-foreground: 0.2044 0 0;
102
+ --muted: 0.9703 0 0;
103
+ --muted-foreground: 0.5555 0 0;
104
+ --accent: 0.9703 0 0;
105
+ --accent-foreground: 0.2044 0 0;
106
+ --destructive: 0.6368 0.2078 25.326;
107
+ --destructive-foreground: 0.9848 0 0;
108
+ --border: 0.9219 0 0;
109
+ --input: 0.9219 0 0;
110
+ --ring: 0.1445 0 0;
109
111
  --radius: 0.5rem;
110
- --card: 0 0% 100%;
111
- --card-foreground: 0 0% 3.9%;
112
- --popover: 0 0% 100%;
113
- --popover-foreground: 0 0% 3.9%;
112
+ --card: 1 0 0;
113
+ --card-foreground: 0.1445 0 0;
114
+ --popover: 1 0 0;
115
+ --popover-foreground: 0.1445 0 0;
114
116
  }
115
117
 
116
118
  /* Dark theme (applied via class="dark" on html/body) */
117
119
  .dark {
118
- --background: 0 0% 3.9%;
119
- --foreground: 0 0% 98%;
120
+ --background: 0 0 0;
121
+ --foreground: 0.9848 0 0;
120
122
  /* ... override other variables */
121
123
  }
122
124
  ```
123
125
 
124
- Use `@vllnt/ui/themes/default.css` instead of `@vllnt/ui/styles.css` if you only want the variables without Tailwind base layer styles.
126
+ Use `@vllnt/ui/themes/default.css` instead of `@vllnt/ui/styles.css` if you only
127
+ want the variables without the Tailwind base layer.
128
+
129
+ ### Runtime presets & the theme editor
130
+
131
+ Import `@vllnt/ui/themes/presets.css` and switch between built-in color presets
132
+ at runtime with `<ThemeSwitcher />` (or `setThemePreset` / `useThemePreset`),
133
+ which set `data-theme` on the document root. Render `<ThemePresetProvider />`
134
+ once near the root to restore the saved preset before paint.
135
+
136
+ To design and export your own theme, use the visual editor at
137
+ [`/themes`](https://ui.vllnt.ai/themes) — it exports a CSS block, a
138
+ `npx shadcn add` command, or design tokens.
125
139
 
126
140
  ## Component Patterns
127
141
 
@@ -218,7 +232,7 @@ import {
218
232
  | `Alert` | `{ Alert, AlertTitle, AlertDescription, alertVariants }` | Static alert banner |
219
233
  | `Badge` | `{ Badge, badgeVariants }` | Inline status label. Variants: default, secondary, destructive, outline |
220
234
  | `Skeleton` | `{ Skeleton }` | Loading placeholder |
221
- | `Spinner` | `{ Spinner }` | Loading spinner |
235
+ | `Spinner` | `{ Spinner, UnicodeSpinner }` | Styled spinner + ASCII-art `UnicodeSpinner` for terminals / code blocks |
222
236
 
223
237
  ### Navigation
224
238
 
@@ -242,7 +256,7 @@ import {
242
256
  | `BarChart` | `{ BarChart }` | Chart component |
243
257
  | `LineChart` | `{ LineChart }` | Chart component |
244
258
  | `CodeBlock` | `{ CodeBlock }` | Syntax-highlighted code via `react-syntax-highlighter` |
245
- | `FlowDiagram` | `{ FlowDiagram }` | Flow diagram via `@xyflow/react` |
259
+ | `FlowDiagram` | `{ FlowDiagram, FlowControls, FlowFullscreen, FlowErrorBoundary, useFlowDiagram }` | Flow diagram via `@xyflow/react`. Extras: custom controls, fullscreen wrapper, error boundary, and the `useFlowDiagram` hook for imperative access. |
246
260
  | `TableOfContents` | `{ TableOfContents }` | Page table of contents |
247
261
 
248
262
  ### App Components
@@ -276,7 +290,10 @@ import {
276
290
  | `Flashcard` | `{ Flashcard }` | Flip-card for spaced repetition |
277
291
  | `Stepper` | `{ Stepper }` | Linear progress stepper |
278
292
  | `Tour` | `{ Tour }` | Guided product tour |
279
- | `Annotation` | `{ Annotation }` | Inline annotation / highlight |
293
+ | `Annotation` | `{ Annotation, Highlight }` | Inline annotation block + inline `Highlight` span for in-prose emphasis |
294
+ | `LearningObjectives` | `{ LearningObjectives, Prerequisites, Summary }` | Objectives list plus companion `Prerequisites` and `Summary` blocks |
295
+ | `KeyConcept` | `{ KeyConcept, Glossary }` | Concept callout + `Glossary` term list |
296
+ | `Comparison` | `{ Comparison, BeforeAfter }` | Side-by-side compare block + `BeforeAfter` slider |
280
297
  | `CompletionDialog` | `{ CompletionDialog }` | End-of-flow celebration dialog |
281
298
  | `TruncatedText` | `{ TruncatedText }` | Expand-on-overflow text block |
282
299
  | `TableOfContentsPanel` | `{ TableOfContentsPanel }` | Sidebar TOC panel |
@@ -334,7 +351,7 @@ import {
334
351
  | `BorderBeam` | `{ BorderBeam }` | Animated gradient border |
335
352
  | `Marquee` | `{ Marquee }` | Infinite scroll marquee |
336
353
  | `NumberTicker` | `{ NumberTicker }` | Animated number counter |
337
- | `Spinner` | `{ Spinner }` | Rich loading-spinner library |
354
+ | `Spinner` | `{ Spinner, UnicodeSpinner }` | Styled spinner + ASCII-art `UnicodeSpinner` for terminals / code blocks |
338
355
 
339
356
  ### Form Additions
340
357
 
@@ -386,10 +403,22 @@ import { cn } from "@vllnt/ui";
386
403
  <div className={cn("p-4 bg-primary", isActive && "bg-accent", className)} />
387
404
  ```
388
405
 
406
+ ### Hooks
407
+
408
+ | Hook | Purpose |
409
+ |------|---------|
410
+ | `useDebounce(value, delayMs)` | Returns the value after `delayMs` of idle — ideal for search inputs. |
411
+ | `useHorizontalScroll(ref)` | Drives the behavior used by `HorizontalScrollRow` — wheel → horizontal scroll, scroll-snap helpers. |
412
+ | `useMobile(breakpoint?)` | Boolean for "viewport is below breakpoint" (default `768`). SSR-safe. |
413
+ | `useSidebar()` | Reads `SidebarProvider` state — `{ open, setOpen, toggle }`. Throws outside a provider. |
414
+ | `useFlowDiagram(options)` | Imperative controller for `FlowDiagram` — fit view, zoom, export to PNG. |
415
+ | `useSocialFab()` | Drives the open/close state of `SocialFab`. |
416
+
389
417
  ```tsx
390
- import { useDebounce } from "@vllnt/ui";
418
+ import { useDebounce, useMobile } from "@vllnt/ui";
391
419
 
392
- const debouncedValue = useDebounce(searchTerm, 300);
420
+ const query = useDebounce(input, 300);
421
+ const isMobile = useMobile();
393
422
  ```
394
423
 
395
424
  ## Types
@@ -104,7 +104,7 @@ function AccordionTrigger({
104
104
  "span",
105
105
  {
106
106
  className: cn(
107
- "h-4 w-4 flex-shrink-0 transition-transform duration-200",
107
+ "size-4 flex-shrink-0 transition-transform duration-200",
108
108
  isOpen && "rotate-180"
109
109
  ),
110
110
  children: icon
@@ -113,7 +113,7 @@ function AccordionTrigger({
113
113
  "svg",
114
114
  {
115
115
  className: cn(
116
- "h-4 w-4 flex-shrink-0 transition-transform duration-200",
116
+ "size-4 flex-shrink-0 transition-transform duration-200",
117
117
  isOpen && "rotate-180"
118
118
  ),
119
119
  fill: "none",
@@ -72,19 +72,21 @@ function getGridData(data, endDate, weeks) {
72
72
  });
73
73
  });
74
74
  }
75
+ const MONTH_LABEL_FORMATTER = new Intl.DateTimeFormat("en-US", {
76
+ month: "short",
77
+ timeZone: "UTC"
78
+ });
79
+ const TOOLTIP_DATE_FORMATTER = new Intl.DateTimeFormat("en-US", {
80
+ day: "numeric",
81
+ month: "short",
82
+ timeZone: "UTC",
83
+ year: "numeric"
84
+ });
75
85
  function formatMonthLabel(date) {
76
- return new Intl.DateTimeFormat("en-US", {
77
- month: "short",
78
- timeZone: "UTC"
79
- }).format(date);
86
+ return MONTH_LABEL_FORMATTER.format(date);
80
87
  }
81
88
  function formatTooltip(date, count) {
82
- const formattedDate = new Intl.DateTimeFormat("en-US", {
83
- day: "numeric",
84
- month: "short",
85
- timeZone: "UTC",
86
- year: "numeric"
87
- }).format(date);
89
+ const formattedDate = TOOLTIP_DATE_FORMATTER.format(date);
88
90
  return `${count} activity ${count === 1 ? "event" : "events"} on ${formattedDate}`;
89
91
  }
90
92
  function HeatmapGrid({
@@ -127,15 +129,15 @@ function HeatmapGrid({
127
129
  ),
128
130
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2 text-xs text-muted-foreground", children: [
129
131
  /* @__PURE__ */ jsx("span", { children: "Less" }),
130
- LEVEL_CLASS_NAMES.map((className, index) => /* @__PURE__ */ jsx(
132
+ LEVEL_CLASS_NAMES.map((className) => /* @__PURE__ */ jsx(
131
133
  "span",
132
134
  {
133
135
  className: cn(
134
- "h-3 w-3 rounded-[3px] border border-border/40",
136
+ "size-3 rounded-[3px] border border-border/40",
135
137
  className
136
138
  )
137
139
  },
138
- `legend-${index}`
140
+ `legend-${className}`
139
141
  )),
140
142
  /* @__PURE__ */ jsx("span", { children: "More" })
141
143
  ] })
@@ -143,6 +145,7 @@ function HeatmapGrid({
143
145
  }
144
146
  const ActivityHeatmap = React.forwardRef(
145
147
  ({
148
+ as: Heading = "h2",
146
149
  className,
147
150
  data,
148
151
  description,
@@ -155,7 +158,7 @@ const ActivityHeatmap = React.forwardRef(
155
158
  const gridData = getGridData(data, normalizedEndDate, weeks);
156
159
  return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), ref, ...props, children: [
157
160
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
158
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold tracking-tight", children: title }),
161
+ /* @__PURE__ */ jsx(Heading, { className: "text-lg font-semibold tracking-tight", children: title }),
159
162
  description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
160
163
  ] }),
161
164
  /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border bg-card p-4 shadow-sm", children: /* @__PURE__ */ jsx(HeatmapGrid, { gridData, weeks }) })
@@ -1,8 +1,9 @@
1
+ "use client";
1
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  import { forwardRef, useMemo, useState } from "react";
3
4
  import { ArrowRight, ChevronLeft, ChevronRight } from "lucide-react";
4
5
  import { cn } from "../../lib/utils";
5
- import { Avatar, AvatarFallback } from "../avatar";
6
+ import { Avatar, AvatarFallback } from "../avatar/avatar";
6
7
  import { Badge } from "../badge";
7
8
  import { Button } from "../button";
8
9
  import {
@@ -81,7 +82,7 @@ function PaginationControls({
81
82
  size: "sm",
82
83
  variant: "outline",
83
84
  children: [
84
- /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }),
85
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" }),
85
86
  "Previous"
86
87
  ]
87
88
  }
@@ -110,7 +111,7 @@ function PaginationControls({
110
111
  variant: "outline",
111
112
  children: [
112
113
  "Next",
113
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
114
+ /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
114
115
  ]
115
116
  }
116
117
  )
@@ -131,18 +132,18 @@ function ActivityRow({ item }) {
131
132
  {
132
133
  "aria-hidden": "true",
133
134
  className: cn(
134
- "absolute left-4 top-3 h-3 w-3 rounded-full ring-4 ring-background",
135
+ "absolute left-4 top-3 size-3 rounded-full ring-4 ring-background",
135
136
  palette.markerClassName
136
137
  )
137
138
  }
138
139
  ),
139
140
  /* @__PURE__ */ jsx("div", { className: "rounded-lg border bg-background/70 p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
140
141
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-start gap-3", children: [
141
- /* @__PURE__ */ jsx(Avatar, { className: "h-9 w-9 border bg-muted", children: /* @__PURE__ */ jsx(AvatarFallback, { children: getInitials(item.actor) }) }),
142
+ /* @__PURE__ */ jsx(Avatar, { className: "size-9 border bg-muted", children: /* @__PURE__ */ jsx(AvatarFallback, { children: getInitials(item.actor) }) }),
142
143
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 space-y-1", children: [
143
144
  /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
144
145
  /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: item.actor }),
145
- /* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5 text-muted-foreground" }),
146
+ /* @__PURE__ */ jsx(ArrowRight, { className: "size-3.5 text-muted-foreground" }),
146
147
  /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: item.action }),
147
148
  item.target ? /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-medium text-foreground", children: item.target }) : null
148
149
  ] }),
@@ -0,0 +1,311 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ createContext,
5
+ forwardRef,
6
+ useCallback,
7
+ useContext,
8
+ useId,
9
+ useMemo,
10
+ useState
11
+ } from "react";
12
+ import {
13
+ AlertTriangle,
14
+ CheckCircle2,
15
+ ChevronDown,
16
+ Circle,
17
+ Loader2,
18
+ MinusCircle
19
+ } from "lucide-react";
20
+ import { cn } from "../../lib/utils";
21
+ const STATUS_CLASSES = {
22
+ completed: {
23
+ iconClass: "text-emerald-600 dark:text-emerald-400",
24
+ ringClass: "ring-emerald-500/30",
25
+ rowClass: "border-border bg-background"
26
+ },
27
+ error: {
28
+ iconClass: "text-destructive",
29
+ ringClass: "ring-destructive/40",
30
+ rowClass: "border-destructive/40 bg-destructive/5"
31
+ },
32
+ pending: {
33
+ iconClass: "text-muted-foreground",
34
+ ringClass: "ring-border",
35
+ rowClass: "border-border bg-muted/20 text-muted-foreground"
36
+ },
37
+ running: {
38
+ iconClass: "text-primary",
39
+ ringClass: "ring-primary/30",
40
+ rowClass: "border-primary/30 bg-primary/5"
41
+ },
42
+ skipped: {
43
+ iconClass: "text-muted-foreground/60",
44
+ ringClass: "ring-border",
45
+ rowClass: "border-border bg-background text-muted-foreground/80"
46
+ }
47
+ };
48
+ const DEFAULT_STATUS_ICON = {
49
+ completed: /* @__PURE__ */ jsx(CheckCircle2, { "aria-hidden": "true", className: "size-4" }),
50
+ error: /* @__PURE__ */ jsx(AlertTriangle, { "aria-hidden": "true", className: "size-4" }),
51
+ pending: /* @__PURE__ */ jsx(Circle, { "aria-hidden": "true", className: "size-4" }),
52
+ running: /* @__PURE__ */ jsx(Loader2, { "aria-hidden": "true", className: "size-4 animate-spin" }),
53
+ skipped: /* @__PURE__ */ jsx(MinusCircle, { "aria-hidden": "true", className: "size-4" })
54
+ };
55
+ const StepContext = createContext({ status: "pending" });
56
+ const DEFAULT_LABELS = {
57
+ activity: "Activity",
58
+ collapse: "Hide details",
59
+ elapsed: "Elapsed",
60
+ expand: "Show details"
61
+ };
62
+ const ACTIVITY_LIVE_REGION_ROLE = {
63
+ completed: "status",
64
+ error: "status",
65
+ idle: "status",
66
+ running: "log"
67
+ };
68
+ const AgentActivity = forwardRef(
69
+ (props, ref) => {
70
+ const {
71
+ children,
72
+ className,
73
+ elapsed,
74
+ labels,
75
+ status = "idle",
76
+ ...rest
77
+ } = props;
78
+ const resolvedLabels = { ...DEFAULT_LABELS, ...labels };
79
+ return /* @__PURE__ */ jsxs(
80
+ "section",
81
+ {
82
+ "aria-live": status === "running" ? "polite" : "off",
83
+ className: cn(
84
+ "flex flex-col gap-3 rounded-2xl border bg-background p-4",
85
+ className
86
+ ),
87
+ "data-status": status,
88
+ ref,
89
+ role: ACTIVITY_LIVE_REGION_ROLE[status],
90
+ ...rest,
91
+ children: [
92
+ /* @__PURE__ */ jsxs("header", { className: "flex items-center justify-between gap-3", children: [
93
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold tracking-tight text-foreground", children: resolvedLabels.activity }),
94
+ elapsed ? /* @__PURE__ */ jsx(
95
+ "span",
96
+ {
97
+ "aria-label": resolvedLabels.elapsed,
98
+ className: "text-xs font-mono text-muted-foreground",
99
+ children: elapsed
100
+ }
101
+ ) : null
102
+ ] }),
103
+ /* @__PURE__ */ jsx("ol", { className: "flex flex-col gap-2", children })
104
+ ]
105
+ }
106
+ );
107
+ }
108
+ );
109
+ AgentActivity.displayName = "AgentActivity";
110
+ function getDisplayName(value) {
111
+ if (value !== null && (typeof value === "object" || typeof value === "function") && "displayName" in value && typeof value.displayName === "string") {
112
+ return value.displayName;
113
+ }
114
+ return void 0;
115
+ }
116
+ function isAgentStepDetailElement(child) {
117
+ if (child === null || typeof child !== "object") return false;
118
+ if (!("type" in child)) return false;
119
+ return getDisplayName(child.type) === "AgentStepDetail";
120
+ }
121
+ function splitChildren(children) {
122
+ const items = Array.isArray(children) ? children : [children];
123
+ return items.reduce(
124
+ (split, child) => {
125
+ if (isAgentStepDetailElement(child)) {
126
+ split.body.push(child);
127
+ } else {
128
+ split.header.push(child);
129
+ }
130
+ return split;
131
+ },
132
+ { body: [], header: [] }
133
+ );
134
+ }
135
+ function StepRow({
136
+ detailsId,
137
+ hasDetails,
138
+ header,
139
+ icon,
140
+ iconClass,
141
+ labels,
142
+ onToggle,
143
+ open
144
+ }) {
145
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 px-3 py-2", children: [
146
+ /* @__PURE__ */ jsx(
147
+ "span",
148
+ {
149
+ "aria-hidden": "true",
150
+ className: cn(
151
+ "mt-0.5 inline-flex size-5 shrink-0 items-center justify-center",
152
+ iconClass
153
+ ),
154
+ children: icon
155
+ }
156
+ ),
157
+ /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: header }),
158
+ hasDetails ? /* @__PURE__ */ jsx(
159
+ "button",
160
+ {
161
+ "aria-controls": detailsId,
162
+ "aria-expanded": open,
163
+ "aria-label": open ? labels.collapse : labels.expand,
164
+ className: "ml-auto inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
165
+ onClick: onToggle,
166
+ type: "button",
167
+ children: /* @__PURE__ */ jsx(
168
+ ChevronDown,
169
+ {
170
+ "aria-hidden": "true",
171
+ className: cn(
172
+ "size-4 transition-transform",
173
+ open ? "rotate-180" : "rotate-0"
174
+ )
175
+ }
176
+ )
177
+ }
178
+ ) : null
179
+ ] });
180
+ }
181
+ const AgentStep = forwardRef(
182
+ (props, ref) => {
183
+ const {
184
+ children,
185
+ className,
186
+ defaultOpen = true,
187
+ icon,
188
+ status,
189
+ ...rest
190
+ } = props;
191
+ const split = useMemo(() => splitChildren(children), [children]);
192
+ const palette = STATUS_CLASSES[status];
193
+ const hasDetails = split.body.length > 0;
194
+ const [open, setOpen] = useState(defaultOpen);
195
+ const detailsId = useId();
196
+ const handleToggle = useCallback(() => {
197
+ setOpen((value) => !value);
198
+ }, []);
199
+ const contextValue = useMemo(
200
+ () => ({ status }),
201
+ [status]
202
+ );
203
+ const resolvedIcon = icon ?? DEFAULT_STATUS_ICON[status];
204
+ return /* @__PURE__ */ jsx(
205
+ "li",
206
+ {
207
+ className: cn(
208
+ "rounded-xl border ring-1",
209
+ palette.rowClass,
210
+ palette.ringClass,
211
+ className
212
+ ),
213
+ "data-status": status,
214
+ ref,
215
+ ...rest,
216
+ children: /* @__PURE__ */ jsxs(StepContext.Provider, { value: contextValue, children: [
217
+ /* @__PURE__ */ jsx(
218
+ StepRow,
219
+ {
220
+ detailsId,
221
+ hasDetails,
222
+ header: split.header,
223
+ icon: resolvedIcon,
224
+ iconClass: palette.iconClass,
225
+ labels: DEFAULT_LABELS,
226
+ onToggle: handleToggle,
227
+ open
228
+ }
229
+ ),
230
+ hasDetails && open ? /* @__PURE__ */ jsx(
231
+ "div",
232
+ {
233
+ className: "border-t border-border/60 px-3 py-2 text-xs",
234
+ id: detailsId,
235
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 pl-8", children: split.body })
236
+ }
237
+ ) : null
238
+ ] })
239
+ }
240
+ );
241
+ }
242
+ );
243
+ AgentStep.displayName = "AgentStep";
244
+ const AgentStepTitle = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
245
+ "p",
246
+ {
247
+ className: cn(
248
+ "text-sm font-medium leading-tight text-foreground",
249
+ className
250
+ ),
251
+ ref,
252
+ ...rest
253
+ }
254
+ ));
255
+ AgentStepTitle.displayName = "AgentStepTitle";
256
+ const AgentStepDuration = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
257
+ "span",
258
+ {
259
+ className: cn("font-mono text-xs text-muted-foreground", className),
260
+ ref,
261
+ ...rest
262
+ }
263
+ ));
264
+ AgentStepDuration.displayName = "AgentStepDuration";
265
+ const AgentStepProgress = forwardRef(({ className, label = "Step progress", value, ...rest }, ref) => {
266
+ const clamped = Math.max(0, Math.min(100, value));
267
+ return /* @__PURE__ */ jsx(
268
+ "div",
269
+ {
270
+ "aria-label": label,
271
+ "aria-valuemax": 100,
272
+ "aria-valuemin": 0,
273
+ "aria-valuenow": clamped,
274
+ className: cn("h-1.5 w-full rounded-full bg-muted", className),
275
+ ref,
276
+ role: "progressbar",
277
+ ...rest,
278
+ children: /* @__PURE__ */ jsx(
279
+ "span",
280
+ {
281
+ className: "block h-full rounded-full bg-primary transition-[width]",
282
+ style: { width: `${clamped.toString()}%` }
283
+ }
284
+ )
285
+ }
286
+ );
287
+ });
288
+ AgentStepProgress.displayName = "AgentStepProgress";
289
+ const AgentStepDetail = forwardRef(
290
+ ({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
291
+ "div",
292
+ {
293
+ className: cn("text-xs text-muted-foreground", className),
294
+ ref,
295
+ ...rest
296
+ }
297
+ )
298
+ );
299
+ AgentStepDetail.displayName = "AgentStepDetail";
300
+ function useAgentStepStatus() {
301
+ return useContext(StepContext).status;
302
+ }
303
+ export {
304
+ AgentActivity,
305
+ AgentStep,
306
+ AgentStepDetail,
307
+ AgentStepDuration,
308
+ AgentStepProgress,
309
+ AgentStepTitle,
310
+ useAgentStepStatus
311
+ };
@@ -0,0 +1,18 @@
1
+ import {
2
+ AgentActivity,
3
+ AgentStep,
4
+ AgentStepDetail,
5
+ AgentStepDuration,
6
+ AgentStepProgress,
7
+ AgentStepTitle,
8
+ useAgentStepStatus
9
+ } from "./agent-activity";
10
+ export {
11
+ AgentActivity,
12
+ AgentStep,
13
+ AgentStepDetail,
14
+ AgentStepDuration,
15
+ AgentStepProgress,
16
+ AgentStepTitle,
17
+ useAgentStepStatus
18
+ };