@vllnt/ui 0.3.0-canary.00b20d6 → 0.3.0-canary.5dae6af

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 (245) hide show
  1. package/dist/components/accordion/accordion.js +2 -8
  2. package/dist/components/activity-heatmap/activity-heatmap.js +21 -23
  3. package/dist/components/activity-log/activity-log.js +52 -53
  4. package/dist/components/agent-activity/agent-activity.js +139 -125
  5. package/dist/components/ai-artifact/ai-artifact.js +115 -76
  6. package/dist/components/ai-chat-input/ai-chat-input.js +59 -61
  7. package/dist/components/ai-message-bubble/ai-message-bubble.js +63 -65
  8. package/dist/components/ai-sidebar/ai-sidebar.js +76 -45
  9. package/dist/components/ai-source-citation/ai-source-citation.js +38 -32
  10. package/dist/components/ai-streaming-text/ai-streaming-text.js +33 -35
  11. package/dist/components/ai-tool-call-display/ai-tool-call-display.js +58 -60
  12. package/dist/components/alert/alert.js +20 -7
  13. package/dist/components/alert-dialog/alert-dialog.js +36 -13
  14. package/dist/components/alert-pulse/alert-pulse.js +69 -69
  15. package/dist/components/anchor-port/anchor-port.js +26 -28
  16. package/dist/components/animated-beam/animated-beam.js +50 -51
  17. package/dist/components/animated-grid-pattern/animated-grid-pattern.js +9 -2
  18. package/dist/components/animated-list/animated-list.js +21 -25
  19. package/dist/components/animated-tabs/animated-tabs.js +60 -57
  20. package/dist/components/animated-testimonials/animated-testimonials.js +8 -2
  21. package/dist/components/animated-text/animated-text.js +66 -67
  22. package/dist/components/animated-tooltip/animated-tooltip.js +9 -2
  23. package/dist/components/auto-reload/auto-reload.js +109 -105
  24. package/dist/components/avatar/avatar.js +18 -7
  25. package/dist/components/avatar-group/avatar-group.js +35 -30
  26. package/dist/components/banner/banner.js +80 -77
  27. package/dist/components/bento-grid/bento-grid.js +38 -33
  28. package/dist/components/blur-reveal/blur-reveal.js +34 -29
  29. package/dist/components/border-beam/border-beam.js +43 -45
  30. package/dist/components/bottom-activity-strip/bottom-activity-strip.js +5 -5
  31. package/dist/components/bottom-bar/bottom-bar.js +22 -18
  32. package/dist/components/button/button.js +18 -14
  33. package/dist/components/button-group/button-group.js +14 -12
  34. package/dist/components/candlestick-chart/candlestick-chart.js +52 -54
  35. package/dist/components/canvas-shell/canvas-shell.js +5 -3
  36. package/dist/components/canvas-view/canvas-view.js +72 -74
  37. package/dist/components/card/card.js +35 -12
  38. package/dist/components/card-flip/card-flip.js +36 -47
  39. package/dist/components/carousel/carousel.js +78 -60
  40. package/dist/components/chain-of-thought/chain-of-thought.js +13 -12
  41. package/dist/components/chart/area-chart.js +66 -67
  42. package/dist/components/chart/bar-chart.js +68 -70
  43. package/dist/components/chart/line-chart.js +69 -70
  44. package/dist/components/chat-dock-section/chat-dock-section.js +43 -45
  45. package/dist/components/checkbox/checkbox.js +6 -3
  46. package/dist/components/checkbox-group/checkbox-group.js +44 -38
  47. package/dist/components/choropleth-map/choropleth-map.js +90 -82
  48. package/dist/components/chronological-timeline/chronological-timeline.js +75 -72
  49. package/dist/components/civilization-card/civilization-card.js +59 -56
  50. package/dist/components/color-picker/color-picker.js +71 -72
  51. package/dist/components/combobox/combobox.js +57 -58
  52. package/dist/components/command/command.js +42 -15
  53. package/dist/components/comment-pin/comment-pin.js +58 -60
  54. package/dist/components/connector-edge/connector-edge.js +59 -54
  55. package/dist/components/context-lens/context-lens.js +74 -73
  56. package/dist/components/context-menu/context-menu.js +55 -17
  57. package/dist/components/contribution-graph/contribution-graph.js +56 -58
  58. package/dist/components/conversation-thread/conversation-thread.js +89 -65
  59. package/dist/components/cookie-consent/cookie-consent.js +114 -115
  60. package/dist/components/copy-button/copy-button.js +100 -103
  61. package/dist/components/countdown-timer/countdown-timer.js +45 -49
  62. package/dist/components/credit-badge/credit-badge.js +26 -22
  63. package/dist/components/curriculum/curriculum.js +2 -2
  64. package/dist/components/cursor/cursor.js +28 -24
  65. package/dist/components/data-list/data-list.js +54 -40
  66. package/dist/components/date-field/date-field.js +33 -28
  67. package/dist/components/date-picker/date-picker.js +49 -50
  68. package/dist/components/date-range-picker/date-range-picker.js +46 -47
  69. package/dist/components/dialog/dialog.js +25 -9
  70. package/dist/components/dock/dock.js +59 -52
  71. package/dist/components/document-sibling-nav/document-sibling-nav.js +10 -5
  72. package/dist/components/dot-pattern/dot-pattern.js +29 -24
  73. package/dist/components/drawer/drawer.js +25 -9
  74. package/dist/components/dropdown-menu/dropdown-menu.js +56 -17
  75. package/dist/components/edge-label/edge-label.js +17 -15
  76. package/dist/components/empty-state/empty-state.js +27 -31
  77. package/dist/components/era-comparison/era-comparison.js +96 -83
  78. package/dist/components/expandable-cards/expandable-cards.js +7 -2
  79. package/dist/components/field/field.js +78 -62
  80. package/dist/components/fieldset/fieldset.js +36 -34
  81. package/dist/components/file-upload/file-upload.js +4 -3
  82. package/dist/components/floating-navbar/floating-navbar.js +7 -2
  83. package/dist/components/floating-toolbar/floating-toolbar.js +49 -51
  84. package/dist/components/follow-mode/follow-mode.js +67 -69
  85. package/dist/components/form/form.js +131 -112
  86. package/dist/components/gantt-chart/gantt-chart.js +49 -51
  87. package/dist/components/gauge-chart/gauge-chart.js +73 -75
  88. package/dist/components/geography-quiz-map/geography-quiz-map.js +88 -78
  89. package/dist/components/glass-card/glass-card.js +19 -17
  90. package/dist/components/glass-panel/glass-panel.js +16 -14
  91. package/dist/components/glass-progress/glass-progress.js +7 -3
  92. package/dist/components/globe-3d/globe-3d.js +70 -66
  93. package/dist/components/grid/grid.js +24 -18
  94. package/dist/components/group-hull/group-hull.js +27 -22
  95. package/dist/components/handoff-beacon/handoff-beacon.js +55 -57
  96. package/dist/components/heat-map-overlay/heat-map-overlay.js +55 -55
  97. package/dist/components/heat-overlay/heat-overlay.js +49 -48
  98. package/dist/components/historic-timeline/historic-timeline.js +57 -59
  99. package/dist/components/historical-figure-card/historical-figure-card.js +5 -3
  100. package/dist/components/hover-card/hover-card.js +8 -3
  101. package/dist/components/infinite-plane/infinite-plane.js +34 -36
  102. package/dist/components/input/input.js +19 -17
  103. package/dist/components/input-group/input-group.js +32 -24
  104. package/dist/components/input-otp/input-otp.js +25 -8
  105. package/dist/components/interactive-timeline/interactive-timeline.js +38 -15
  106. package/dist/components/item/item.js +71 -56
  107. package/dist/components/jarvis-dock/jarvis-dock.js +40 -42
  108. package/dist/components/kbd/kbd.js +31 -42
  109. package/dist/components/knowledge-check/knowledge-check.js +50 -58
  110. package/dist/components/label/label.js +6 -3
  111. package/dist/components/left-rail/left-rail.js +22 -18
  112. package/dist/components/link/link.js +28 -30
  113. package/dist/components/liquid-glass/liquid-glass.js +32 -30
  114. package/dist/components/list-box/list-box.js +86 -83
  115. package/dist/components/live-cursor/live-cursor.js +49 -51
  116. package/dist/components/live-feed/live-feed.js +49 -50
  117. package/dist/components/magnetic/magnetic.js +37 -32
  118. package/dist/components/magnetic-button/magnetic-button.js +9 -2
  119. package/dist/components/map-2d/map-2d.js +120 -101
  120. package/dist/components/map-timeline/map-timeline.js +188 -170
  121. package/dist/components/market-treemap/market-treemap.js +8 -3
  122. package/dist/components/marquee/marquee.js +64 -65
  123. package/dist/components/menubar/menubar.js +82 -35
  124. package/dist/components/meteors/meteors.js +36 -33
  125. package/dist/components/meter/meter.js +53 -55
  126. package/dist/components/metric-cluster/metric-cluster.js +47 -49
  127. package/dist/components/metric-gauge/metric-gauge.js +42 -44
  128. package/dist/components/mini-map-panel/mini-map-panel.js +71 -66
  129. package/dist/components/model-comparison/model-comparison.js +76 -67
  130. package/dist/components/multi-select/multi-select.js +100 -102
  131. package/dist/components/multi-select-lasso/multi-select-lasso.js +5 -5
  132. package/dist/components/native-select/native-select.js +21 -18
  133. package/dist/components/navigation-menu/navigation-menu.js +38 -13
  134. package/dist/components/newsletter-signup/newsletter-signup.js +5 -3
  135. package/dist/components/number-input/number-input.js +4 -3
  136. package/dist/components/number-ticker/number-ticker.js +50 -51
  137. package/dist/components/object-card/object-card.js +40 -42
  138. package/dist/components/object-handle/object-handle.js +33 -30
  139. package/dist/components/object-inspector/object-inspector.js +40 -42
  140. package/dist/components/order-book/order-book.js +59 -54
  141. package/dist/components/overview-board/overview-board.js +91 -87
  142. package/dist/components/panel/panel.js +69 -55
  143. package/dist/components/parallel-timeline/parallel-timeline.js +54 -56
  144. package/dist/components/particles/particles.js +35 -32
  145. package/dist/components/password-input/password-input.js +35 -36
  146. package/dist/components/phone-input/phone-input.js +44 -45
  147. package/dist/components/pie-chart/pie-chart.js +53 -55
  148. package/dist/components/plan-badge/plan-badge.js +28 -24
  149. package/dist/components/playback-ghost/playback-ghost.js +46 -48
  150. package/dist/components/policy-delivery-panel/policy-delivery-panel.js +5 -5
  151. package/dist/components/popover/popover.js +8 -3
  152. package/dist/components/presence-stack/presence-stack.js +39 -41
  153. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +5 -5
  154. package/dist/components/pricing-table/pricing-table.js +71 -70
  155. package/dist/components/primary-source-viewer/primary-source-viewer.js +90 -41
  156. package/dist/components/progress-tracker/progress-tracker.js +1 -1
  157. package/dist/components/progressive-blur/progressive-blur.js +37 -33
  158. package/dist/components/prompt-input/prompt-input.js +68 -69
  159. package/dist/components/prompt-templates/prompt-templates.js +36 -36
  160. package/dist/components/property-section/property-section.js +28 -30
  161. package/dist/components/qr-code/qr-code.js +31 -33
  162. package/dist/components/radar-chart/radar-chart.js +59 -60
  163. package/dist/components/radio-group/radio-group.js +12 -5
  164. package/dist/components/reasoning/reasoning.js +54 -48
  165. package/dist/components/relationship-inspector/relationship-inspector.js +5 -5
  166. package/dist/components/reveal-text/reveal-text.js +39 -34
  167. package/dist/components/right-dock/right-dock.js +26 -21
  168. package/dist/components/role-badge/role-badge.js +22 -19
  169. package/dist/components/route-map/route-map.js +5 -3
  170. package/dist/components/routing-assignment-panel/routing-assignment-panel.js +5 -5
  171. package/dist/components/run-timeline/run-timeline.js +57 -59
  172. package/dist/components/runtime-overview-panel/runtime-overview-panel.js +5 -5
  173. package/dist/components/sankey-chart/sankey-chart.js +54 -56
  174. package/dist/components/scope-selector/scope-selector.js +39 -40
  175. package/dist/components/scramble-text/scramble-text.js +38 -39
  176. package/dist/components/scroll-area/scroll-area.js +14 -5
  177. package/dist/components/scroll-progress/scroll-progress.js +7 -2
  178. package/dist/components/search-bar/search-bar.js +5 -2
  179. package/dist/components/search-field/search-field.js +46 -47
  180. package/dist/components/segmented-control/segmented-control.js +14 -5
  181. package/dist/components/select/select.js +46 -15
  182. package/dist/components/selection-halo/selection-halo.js +53 -62
  183. package/dist/components/selection-presence/selection-presence.js +5 -5
  184. package/dist/components/separator/separator.js +19 -16
  185. package/dist/components/sheet/sheet.js +26 -9
  186. package/dist/components/shimmer-button/shimmer-button.js +8 -3
  187. package/dist/components/shimmer-text/shimmer-text.js +34 -30
  188. package/dist/components/shine-border/shine-border.js +32 -28
  189. package/dist/components/shiny-button/shiny-button.js +7 -3
  190. package/dist/components/sidebar-provider/sidebar-provider.js +2 -7
  191. package/dist/components/slider/slider.js +6 -3
  192. package/dist/components/slideshow/slideshow.js +26 -23
  193. package/dist/components/snap-guides/snap-guides.js +35 -35
  194. package/dist/components/sparkles/sparkles.js +34 -30
  195. package/dist/components/sparkline-grid/sparkline-grid.js +4 -4
  196. package/dist/components/spinner/unicode-spinner.js +57 -56
  197. package/dist/components/spinning-text/spinning-text.js +39 -41
  198. package/dist/components/spotlight-card/spotlight-card.js +7 -2
  199. package/dist/components/stat-card/stat-card.js +37 -39
  200. package/dist/components/state-badge-overlay/state-badge-overlay.js +5 -5
  201. package/dist/components/status-board/status-board.js +20 -22
  202. package/dist/components/status-indicator/status-indicator.js +38 -40
  203. package/dist/components/sticky-metric/sticky-metric.js +58 -60
  204. package/dist/components/story-map/story-map.js +66 -60
  205. package/dist/components/subscription-card/subscription-card.js +68 -70
  206. package/dist/components/switch/switch.js +6 -3
  207. package/dist/components/table/table.js +47 -16
  208. package/dist/components/tabs/tabs.js +2 -2
  209. package/dist/components/tag-group/tag-group.js +81 -78
  210. package/dist/components/tags-input/tags-input.js +59 -60
  211. package/dist/components/text-animate/text-animate.js +40 -41
  212. package/dist/components/text-field/text-field.js +49 -50
  213. package/dist/components/text-reveal/text-reveal.js +36 -33
  214. package/dist/components/text-shimmer/text-shimmer.js +27 -23
  215. package/dist/components/textarea/textarea.js +17 -16
  216. package/dist/components/thinking-block/thinking-block.js +1 -1
  217. package/dist/components/thread-bubble/thread-bubble.js +51 -53
  218. package/dist/components/threshold-ring/threshold-ring.js +76 -78
  219. package/dist/components/ticker-tape/ticker-tape.js +46 -42
  220. package/dist/components/tilt-card/tilt-card.js +40 -35
  221. package/dist/components/time-field/time-field.js +33 -28
  222. package/dist/components/time-picker/time-picker.js +59 -60
  223. package/dist/components/timeline/timeline.js +70 -66
  224. package/dist/components/timeline-scrubber/timeline-scrubber.js +5 -3
  225. package/dist/components/tldr-section/tldr-section.js +9 -6
  226. package/dist/components/toast/toast.js +32 -11
  227. package/dist/components/toggle/toggle.js +8 -3
  228. package/dist/components/toggle-group/toggle-group.js +20 -6
  229. package/dist/components/toolbar/toolbar.js +60 -56
  230. package/dist/components/tooltip/tooltip.js +7 -3
  231. package/dist/components/top-bar/top-bar.js +30 -24
  232. package/dist/components/transaction-list/transaction-list.js +53 -47
  233. package/dist/components/tree-view/tree-view.js +72 -76
  234. package/dist/components/typewriter/typewriter.js +43 -38
  235. package/dist/components/typography/typography.js +118 -95
  236. package/dist/components/usage-breakdown/usage-breakdown.js +37 -38
  237. package/dist/components/viewport-bookmarks/viewport-bookmarks.js +5 -5
  238. package/dist/components/wallet-card/wallet-card.js +56 -58
  239. package/dist/components/watchlist/watchlist.js +46 -48
  240. package/dist/components/workspace-switcher/workspace-switcher.js +58 -52
  241. package/dist/components/world-breadcrumbs/world-breadcrumbs.js +43 -45
  242. package/dist/components/world-clock-bar/world-clock-bar.js +33 -35
  243. package/dist/components/zoom-hud/zoom-hud.js +56 -51
  244. package/dist/index.d.ts +2911 -2649
  245. package/package.json +3 -3
@@ -1,16 +1,10 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import {
4
- createContext,
5
- useCallback,
6
- useContext,
7
- useMemo,
8
- useState
9
- } from "react";
3
+ import { createContext, use, useCallback, useMemo, useState } from "react";
10
4
  import { cn } from "../../lib/utils";
11
5
  const AccordionContext = createContext(null);
12
6
  function useAccordionContext() {
13
- const context = useContext(AccordionContext);
7
+ const context = use(AccordionContext);
14
8
  if (!context) {
15
9
  throw new Error("AccordionItem must be used within an Accordion");
16
10
  }
@@ -1,5 +1,4 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
2
  import { normalizeDate } from "../../lib/format";
4
3
  import { cn } from "../../lib/utils";
5
4
  const WEEKDAY_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
@@ -138,28 +137,27 @@ function HeatmapGrid({
138
137
  ] })
139
138
  ] });
140
139
  }
141
- const ActivityHeatmap = React.forwardRef(
142
- ({
143
- as: Heading = "h2",
144
- className,
145
- data,
146
- description,
147
- endDate = /* @__PURE__ */ new Date(),
148
- title = "Activity heatmap",
149
- weeks = 12,
150
- ...props
151
- }, ref) => {
152
- const normalizedEndDate = normalizeDate(endDate);
153
- const gridData = getGridData(data, normalizedEndDate, weeks);
154
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), ref, ...props, children: [
155
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
156
- /* @__PURE__ */ jsx(Heading, { className: "text-lg font-semibold tracking-tight", children: title }),
157
- description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
158
- ] }),
159
- /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border bg-card p-4 shadow-sm", children: /* @__PURE__ */ jsx(HeatmapGrid, { gridData, weeks }) })
160
- ] });
161
- }
162
- );
140
+ const ActivityHeatmap = ({
141
+ as: Heading = "h2",
142
+ className,
143
+ data,
144
+ description,
145
+ endDate = /* @__PURE__ */ new Date(),
146
+ ref,
147
+ title = "Activity heatmap",
148
+ weeks = 12,
149
+ ...props
150
+ }) => {
151
+ const normalizedEndDate = normalizeDate(endDate);
152
+ const gridData = getGridData(data, normalizedEndDate, weeks);
153
+ return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), ref, ...props, children: [
154
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
155
+ /* @__PURE__ */ jsx(Heading, { className: "text-lg font-semibold tracking-tight", children: title }),
156
+ description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
157
+ ] }),
158
+ /* @__PURE__ */ jsx("div", { className: "overflow-x-auto rounded-lg border bg-card p-4 shadow-sm", children: /* @__PURE__ */ jsx(HeatmapGrid, { gridData, weeks }) })
159
+ ] });
160
+ };
163
161
  ActivityHeatmap.displayName = "ActivityHeatmap";
164
162
  export {
165
163
  ActivityHeatmap
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useMemo, useState } from "react";
3
+ import { useMemo, useState } from "react";
4
4
  import { ArrowRight, ChevronLeft, ChevronRight } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
6
  import { Avatar, AvatarFallback } from "../avatar/avatar";
@@ -197,60 +197,59 @@ function ActivityLogBody({
197
197
  ] })
198
198
  ] });
199
199
  }
200
- const ActivityLog = forwardRef(
201
- ({
202
- className,
203
- defaultPage = 1,
204
- description,
205
- emptyMessage = "No activity recorded yet.",
206
- items,
207
- onPageChange,
208
- page,
209
- pageSize = 5,
210
- title = "Activity log",
211
- ...props
212
- }, ref) => {
213
- const totalPages = Math.max(1, Math.ceil(items.length / pageSize));
214
- const [uncontrolledPage, setUncontrolledPage] = useState(defaultPage);
215
- const currentPage = Math.min(
216
- Math.max(page ?? uncontrolledPage, 1),
217
- totalPages
218
- );
219
- const pageNumbers = useMemo(
220
- () => buildPageNumbers(currentPage, totalPages),
221
- [currentPage, totalPages]
222
- );
223
- function handlePageChange(nextPage) {
224
- if (page === void 0) {
225
- setUncontrolledPage(nextPage);
226
- }
227
- onPageChange?.(nextPage);
200
+ const ActivityLog = ({
201
+ className,
202
+ defaultPage = 1,
203
+ description,
204
+ emptyMessage = "No activity recorded yet.",
205
+ items,
206
+ onPageChange,
207
+ page,
208
+ pageSize = 5,
209
+ ref,
210
+ title = "Activity log",
211
+ ...props
212
+ }) => {
213
+ const totalPages = Math.max(1, Math.ceil(items.length / pageSize));
214
+ const [uncontrolledPage, setUncontrolledPage] = useState(defaultPage);
215
+ const currentPage = Math.min(
216
+ Math.max(page ?? uncontrolledPage, 1),
217
+ totalPages
218
+ );
219
+ const pageNumbers = useMemo(
220
+ () => buildPageNumbers(currentPage, totalPages),
221
+ [currentPage, totalPages]
222
+ );
223
+ function handlePageChange(nextPage) {
224
+ if (page === void 0) {
225
+ setUncontrolledPage(nextPage);
228
226
  }
229
- return /* @__PURE__ */ jsxs(Card, { className: cn("w-full", className), ref, ...props, children: [
230
- /* @__PURE__ */ jsx(
231
- ActivityLogHeader,
232
- {
233
- currentPage,
234
- description,
235
- title,
236
- totalPages
237
- }
238
- ),
239
- /* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: /* @__PURE__ */ jsx(
240
- ActivityLogBody,
241
- {
242
- currentPage,
243
- emptyMessage,
244
- items,
245
- onPageChange: handlePageChange,
246
- pageNumbers,
247
- pageSize,
248
- totalPages
249
- }
250
- ) })
251
- ] });
227
+ onPageChange?.(nextPage);
252
228
  }
253
- );
229
+ return /* @__PURE__ */ jsxs(Card, { className: cn("w-full", className), ref, ...props, children: [
230
+ /* @__PURE__ */ jsx(
231
+ ActivityLogHeader,
232
+ {
233
+ currentPage,
234
+ description,
235
+ title,
236
+ totalPages
237
+ }
238
+ ),
239
+ /* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: /* @__PURE__ */ jsx(
240
+ ActivityLogBody,
241
+ {
242
+ currentPage,
243
+ emptyMessage,
244
+ items,
245
+ onPageChange: handlePageChange,
246
+ pageNumbers,
247
+ pageSize,
248
+ totalPages
249
+ }
250
+ ) })
251
+ ] });
252
+ };
254
253
  ActivityLog.displayName = "ActivityLog";
255
254
  export {
256
255
  ActivityLog
@@ -2,9 +2,8 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import {
4
4
  createContext,
5
- forwardRef,
5
+ use,
6
6
  useCallback,
7
- useContext,
8
7
  useId,
9
8
  useMemo,
10
9
  useState
@@ -66,50 +65,51 @@ const ACTIVITY_LIVE_REGION_ROLE = {
66
65
  idle: "status",
67
66
  running: "log"
68
67
  };
69
- const AgentActivity = forwardRef(
70
- (props, ref) => {
71
- const {
72
- children,
73
- className,
74
- elapsed,
75
- labels,
76
- status = "idle",
77
- ...rest
78
- } = props;
79
- const resolvedLabels = useMemo(
80
- () => ({ ...DEFAULT_LABELS, ...labels }),
81
- [labels]
82
- );
83
- return /* @__PURE__ */ jsx(AgentActivityLabelsContext.Provider, { value: resolvedLabels, children: /* @__PURE__ */ jsxs(
84
- "section",
85
- {
86
- "aria-live": status === "running" ? "polite" : "off",
87
- className: cn(
88
- "flex flex-col gap-3 rounded-2xl border bg-background p-4",
89
- className
90
- ),
91
- "data-status": status,
92
- ref,
93
- role: ACTIVITY_LIVE_REGION_ROLE[status],
94
- ...rest,
95
- children: [
96
- /* @__PURE__ */ jsxs("header", { className: "flex items-center justify-between gap-3", children: [
97
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold tracking-tight text-foreground", children: resolvedLabels.activity }),
98
- elapsed ? /* @__PURE__ */ jsx(
99
- "span",
100
- {
101
- "aria-label": resolvedLabels.elapsed,
102
- className: "text-xs font-mono text-muted-foreground",
103
- children: elapsed
104
- }
105
- ) : null
106
- ] }),
107
- /* @__PURE__ */ jsx("ol", { className: "flex flex-col gap-2", children })
108
- ]
109
- }
110
- ) });
111
- }
112
- );
68
+ const AgentActivity = ({
69
+ ref,
70
+ ...props
71
+ }) => {
72
+ const {
73
+ children,
74
+ className,
75
+ elapsed,
76
+ labels,
77
+ status = "idle",
78
+ ...rest
79
+ } = props;
80
+ const resolvedLabels = useMemo(
81
+ () => ({ ...DEFAULT_LABELS, ...labels }),
82
+ [labels]
83
+ );
84
+ return /* @__PURE__ */ jsx(AgentActivityLabelsContext.Provider, { value: resolvedLabels, children: /* @__PURE__ */ jsxs(
85
+ "section",
86
+ {
87
+ "aria-live": status === "running" ? "polite" : "off",
88
+ className: cn(
89
+ "flex flex-col gap-3 rounded-2xl border bg-background p-4",
90
+ className
91
+ ),
92
+ "data-status": status,
93
+ ref,
94
+ role: ACTIVITY_LIVE_REGION_ROLE[status],
95
+ ...rest,
96
+ children: [
97
+ /* @__PURE__ */ jsxs("header", { className: "flex items-center justify-between gap-3", children: [
98
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold tracking-tight text-foreground", children: resolvedLabels.activity }),
99
+ elapsed ? /* @__PURE__ */ jsx(
100
+ "span",
101
+ {
102
+ "aria-label": resolvedLabels.elapsed,
103
+ className: "text-xs font-mono text-muted-foreground",
104
+ children: elapsed
105
+ }
106
+ ) : null
107
+ ] }),
108
+ /* @__PURE__ */ jsx("ol", { className: "flex flex-col gap-2", children })
109
+ ]
110
+ }
111
+ ) });
112
+ };
113
113
  AgentActivity.displayName = "AgentActivity";
114
114
  function getDisplayName(value) {
115
115
  if (value !== null && (typeof value === "object" || typeof value === "function") && "displayName" in value && typeof value.displayName === "string") {
@@ -182,72 +182,74 @@ function StepRow({
182
182
  ) : null
183
183
  ] });
184
184
  }
185
- const AgentStep = forwardRef(
186
- (props, ref) => {
187
- const {
188
- children,
189
- className,
190
- defaultOpen = true,
191
- icon,
192
- status,
193
- ...rest
194
- } = props;
195
- const split = useMemo(() => splitChildren(children), [children]);
196
- const palette = STATUS_CLASSES[status];
197
- const hasDetails = split.body.length > 0;
198
- const [open, setOpen] = useState(defaultOpen);
199
- const detailsId = useId();
200
- const labels = useContext(AgentActivityLabelsContext);
201
- const handleToggle = useCallback(() => {
202
- setOpen((value) => !value);
203
- }, []);
204
- const contextValue = useMemo(
205
- () => ({ status }),
206
- [status]
207
- );
208
- const resolvedIcon = icon ?? DEFAULT_STATUS_ICON[status];
209
- return /* @__PURE__ */ jsx(
210
- "li",
211
- {
212
- className: cn(
213
- "rounded-xl border ring-1",
214
- palette.rowClass,
215
- palette.ringClass,
216
- className
185
+ const AgentStep = ({
186
+ ref,
187
+ ...props
188
+ }) => {
189
+ const {
190
+ children,
191
+ className,
192
+ defaultOpen = true,
193
+ icon,
194
+ status,
195
+ ...rest
196
+ } = props;
197
+ const split = useMemo(() => splitChildren(children), [children]);
198
+ const palette = STATUS_CLASSES[status];
199
+ const hasDetails = split.body.length > 0;
200
+ const [open, setOpen] = useState(defaultOpen);
201
+ const detailsId = useId();
202
+ const labels = use(AgentActivityLabelsContext);
203
+ const handleToggle = useCallback(() => {
204
+ setOpen((value) => !value);
205
+ }, []);
206
+ const contextValue = useMemo(() => ({ status }), [status]);
207
+ const resolvedIcon = icon ?? DEFAULT_STATUS_ICON[status];
208
+ return /* @__PURE__ */ jsx(
209
+ "li",
210
+ {
211
+ className: cn(
212
+ "rounded-xl border ring-1",
213
+ palette.rowClass,
214
+ palette.ringClass,
215
+ className
216
+ ),
217
+ "data-status": status,
218
+ ref,
219
+ ...rest,
220
+ children: /* @__PURE__ */ jsxs(StepContext.Provider, { value: contextValue, children: [
221
+ /* @__PURE__ */ jsx(
222
+ StepRow,
223
+ {
224
+ detailsId,
225
+ hasDetails,
226
+ header: split.header,
227
+ icon: resolvedIcon,
228
+ iconClass: palette.iconClass,
229
+ labels,
230
+ onToggle: handleToggle,
231
+ open
232
+ }
217
233
  ),
218
- "data-status": status,
219
- ref,
220
- ...rest,
221
- children: /* @__PURE__ */ jsxs(StepContext.Provider, { value: contextValue, children: [
222
- /* @__PURE__ */ jsx(
223
- StepRow,
224
- {
225
- detailsId,
226
- hasDetails,
227
- header: split.header,
228
- icon: resolvedIcon,
229
- iconClass: palette.iconClass,
230
- labels,
231
- onToggle: handleToggle,
232
- open
233
- }
234
- ),
235
- hasDetails ? /* @__PURE__ */ jsx(
236
- "div",
237
- {
238
- className: "border-t border-border/60 px-3 py-2 text-xs",
239
- hidden: !open,
240
- id: detailsId,
241
- children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 pl-8", children: split.body })
242
- }
243
- ) : null
244
- ] })
245
- }
246
- );
247
- }
248
- );
234
+ hasDetails ? /* @__PURE__ */ jsx(
235
+ "div",
236
+ {
237
+ className: "border-t border-border/60 px-3 py-2 text-xs",
238
+ hidden: !open,
239
+ id: detailsId,
240
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 pl-8", children: split.body })
241
+ }
242
+ ) : null
243
+ ] })
244
+ }
245
+ );
246
+ };
249
247
  AgentStep.displayName = "AgentStep";
250
- const AgentStepTitle = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
248
+ const AgentStepTitle = ({
249
+ className,
250
+ ref,
251
+ ...rest
252
+ }) => /* @__PURE__ */ jsx(
251
253
  "p",
252
254
  {
253
255
  className: cn(
@@ -257,18 +259,28 @@ const AgentStepTitle = forwardRef(({ className, ...rest }, ref) => /* @__PURE__
257
259
  ref,
258
260
  ...rest
259
261
  }
260
- ));
262
+ );
261
263
  AgentStepTitle.displayName = "AgentStepTitle";
262
- const AgentStepDuration = forwardRef(({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
264
+ const AgentStepDuration = ({
265
+ className,
266
+ ref,
267
+ ...rest
268
+ }) => /* @__PURE__ */ jsx(
263
269
  "span",
264
270
  {
265
271
  className: cn("font-mono text-xs text-muted-foreground", className),
266
272
  ref,
267
273
  ...rest
268
274
  }
269
- ));
275
+ );
270
276
  AgentStepDuration.displayName = "AgentStepDuration";
271
- const AgentStepProgress = forwardRef(({ className, label = "Step progress", value, ...rest }, ref) => {
277
+ const AgentStepProgress = ({
278
+ className,
279
+ label = "Step progress",
280
+ ref,
281
+ value,
282
+ ...rest
283
+ }) => {
272
284
  const clamped = Math.max(0, Math.min(100, value));
273
285
  return /* @__PURE__ */ jsx(
274
286
  "div",
@@ -290,21 +302,23 @@ const AgentStepProgress = forwardRef(({ className, label = "Step progress", valu
290
302
  )
291
303
  }
292
304
  );
293
- });
305
+ };
294
306
  AgentStepProgress.displayName = "AgentStepProgress";
295
- const AgentStepDetail = forwardRef(
296
- ({ className, ...rest }, ref) => /* @__PURE__ */ jsx(
297
- "div",
298
- {
299
- className: cn("text-xs text-muted-foreground", className),
300
- ref,
301
- ...rest
302
- }
303
- )
307
+ const AgentStepDetail = ({
308
+ className,
309
+ ref,
310
+ ...rest
311
+ }) => /* @__PURE__ */ jsx(
312
+ "div",
313
+ {
314
+ className: cn("text-xs text-muted-foreground", className),
315
+ ref,
316
+ ...rest
317
+ }
304
318
  );
305
319
  AgentStepDetail.displayName = "AgentStepDetail";
306
320
  function useAgentStepStatus() {
307
- return useContext(StepContext).status;
321
+ return use(StepContext).status;
308
322
  }
309
323
  export {
310
324
  AgentActivity,