@zovaris/sephiro 0.14.1 → 1.0.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 (305) hide show
  1. package/dist/{Chart-CDJ3a_FJ.js → Chart-C3wQzNKf.js} +41 -22
  2. package/dist/Chart-C3wQzNKf.js.map +1 -0
  3. package/dist/{Table-C-SStsKz.js → Table-Db4HQGlm.js} +35 -6
  4. package/dist/Table-Db4HQGlm.js.map +1 -0
  5. package/dist/Toast-CGHWMJFI.js +328 -0
  6. package/dist/Toast-CGHWMJFI.js.map +1 -0
  7. package/dist/activity-heatmap.d.ts +68 -0
  8. package/dist/activity-heatmap.d.ts.map +1 -0
  9. package/dist/activity-heatmap.js +239 -0
  10. package/dist/activity-heatmap.js.map +1 -0
  11. package/dist/alert-dialog.d.ts +25 -0
  12. package/dist/alert-dialog.d.ts.map +1 -0
  13. package/dist/alert-dialog.js +44 -0
  14. package/dist/alert-dialog.js.map +1 -0
  15. package/dist/budget-summary.d.ts +44 -0
  16. package/dist/budget-summary.d.ts.map +1 -0
  17. package/dist/budget-summary.js +137 -0
  18. package/dist/budget-summary.js.map +1 -0
  19. package/dist/carousel.js +8 -5
  20. package/dist/carousel.js.map +1 -1
  21. package/dist/change-timeline.d.ts +43 -0
  22. package/dist/change-timeline.d.ts.map +1 -0
  23. package/dist/change-timeline.js +395 -0
  24. package/dist/change-timeline.js.map +1 -0
  25. package/dist/chart.d.ts +3 -1
  26. package/dist/chart.d.ts.map +1 -1
  27. package/dist/chart.js +1 -1
  28. package/dist/chat-scroller.js +4 -0
  29. package/dist/chat-scroller.js.map +1 -1
  30. package/dist/checkbox-group.d.ts +28 -0
  31. package/dist/checkbox-group.d.ts.map +1 -0
  32. package/dist/checkbox-group.js +87 -0
  33. package/dist/checkbox-group.js.map +1 -0
  34. package/dist/combobox.js +1 -1
  35. package/dist/combobox.js.map +1 -1
  36. package/dist/components.css +7777 -2778
  37. package/dist/context-menu.js +1 -1
  38. package/dist/context-menu.js.map +1 -1
  39. package/dist/context-meter.d.ts +23 -0
  40. package/dist/context-meter.d.ts.map +1 -0
  41. package/dist/context-meter.js +65 -0
  42. package/dist/context-meter.js.map +1 -0
  43. package/dist/conversation-list.d.ts +25 -0
  44. package/dist/conversation-list.d.ts.map +1 -0
  45. package/dist/conversation-list.js +99 -0
  46. package/dist/conversation-list.js.map +1 -0
  47. package/dist/copy-button.d.ts +53 -0
  48. package/dist/copy-button.d.ts.map +1 -0
  49. package/dist/copy-button.js +102 -0
  50. package/dist/copy-button.js.map +1 -0
  51. package/dist/css/activity-heatmap.css +2 -0
  52. package/dist/css/alert-dialog.css +8 -0
  53. package/dist/css/attachment.css +5 -4
  54. package/dist/css/badge.css +1 -1
  55. package/dist/css/breadcrumb.css +5 -4
  56. package/dist/css/budget-summary.css +74 -0
  57. package/dist/css/button.css +1 -1
  58. package/dist/css/card.css +1 -1
  59. package/dist/css/carousel.css +17 -10
  60. package/dist/css/change-timeline.css +85 -0
  61. package/dist/css/chart.css +5 -4
  62. package/dist/css/chat-input.css +5 -4
  63. package/dist/css/checkbox-group.css +3 -0
  64. package/dist/css/checkbox.css +1 -1
  65. package/dist/css/combobox.css +1 -73
  66. package/dist/css/command-palette.css +10 -9
  67. package/dist/css/context-meter.css +2 -0
  68. package/dist/css/conversation-list.css +14 -0
  69. package/dist/css/copy-button.css +16 -0
  70. package/dist/css/date-field.css +69 -0
  71. package/dist/css/date-time-field.css +68 -0
  72. package/dist/css/decay-chart.css +12 -0
  73. package/dist/css/dialog.css +1 -1
  74. package/dist/css/donut-chart.css +12 -0
  75. package/dist/css/dot-matrix-chart.css +12 -0
  76. package/dist/css/drag-to-confirm.css +45 -0
  77. package/dist/css/drawer.css +1 -1
  78. package/dist/css/empty-state.css +4 -3
  79. package/dist/css/event-sparkline.css +74 -0
  80. package/dist/css/field.css +1 -1
  81. package/dist/css/follow-up-suggestions.css +1 -0
  82. package/dist/css/gauge.css +12 -0
  83. package/dist/css/hover-card.css +1 -1
  84. package/dist/css/icon-button.css +1 -1
  85. package/dist/css/image-preview.css +2 -0
  86. package/dist/css/link.css +14 -0
  87. package/dist/css/menu.css +1 -73
  88. package/dist/css/message-actions.css +20 -0
  89. package/dist/css/meter.css +10 -0
  90. package/dist/css/metric-card.css +77 -0
  91. package/dist/css/middle-truncate.css +20 -0
  92. package/dist/css/model-picker.css +44 -0
  93. package/dist/css/notice.css +1 -1
  94. package/dist/css/otp-input.css +1 -1
  95. package/dist/css/overflow-list.css +1 -73
  96. package/dist/css/pagination.css +1 -1
  97. package/dist/css/password-field.css +13 -0
  98. package/dist/css/plan-card.css +4 -3
  99. package/dist/css/popconfirm.css +44 -0
  100. package/dist/css/popover.css +1 -1
  101. package/dist/css/question-card.css +4 -3
  102. package/dist/css/radial-progress.css +1 -0
  103. package/dist/css/range-slider.css +1 -0
  104. package/dist/css/reasoning-steps.css +5 -4
  105. package/dist/css/run-matrix.css +13 -0
  106. package/dist/css/schedule-list.css +74 -0
  107. package/dist/css/score-band-chart.css +85 -0
  108. package/dist/css/search-field.css +13 -0
  109. package/dist/css/select.css +5 -4
  110. package/dist/css/shortcut-sheet.css +3 -0
  111. package/dist/css/sidebar.css +2 -4
  112. package/dist/css/slider.css +1 -1
  113. package/dist/css/sources-panel.css +2 -0
  114. package/dist/css/sparkline.css +74 -0
  115. package/dist/css/spinner.css +27 -1
  116. package/dist/css/split-button.css +45 -0
  117. package/dist/css/table.css +3 -1
  118. package/dist/css/tag-input.css +1 -0
  119. package/dist/css/task-list.css +5 -4
  120. package/dist/css/terminal.css +15 -0
  121. package/dist/css/theme-asterism.css +1 -1
  122. package/dist/css/theme-curie.css +1 -1
  123. package/dist/css/theme-dark.css +1 -1
  124. package/dist/css/theme-default.css +1 -1
  125. package/dist/css/theme-fizza.css +1 -1
  126. package/dist/css/theme-light.css +1 -1
  127. package/dist/css/theme-pulso.css +1 -1
  128. package/dist/css/time-field.css +1 -0
  129. package/dist/css/timeline.css +5 -4
  130. package/dist/css/toast.css +2 -1
  131. package/dist/css/tooltip.css +1 -1
  132. package/dist/css/tree-view.css +1 -0
  133. package/dist/css/virtual-list.css +1 -0
  134. package/dist/curve-9YxRv2_K.js +77 -0
  135. package/dist/curve-9YxRv2_K.js.map +1 -0
  136. package/dist/date-field.d.ts +21 -0
  137. package/dist/date-field.d.ts.map +1 -0
  138. package/dist/date-field.js +93 -0
  139. package/dist/date-field.js.map +1 -0
  140. package/dist/date-time-field.d.ts +27 -0
  141. package/dist/date-time-field.d.ts.map +1 -0
  142. package/dist/date-time-field.js +66 -0
  143. package/dist/date-time-field.js.map +1 -0
  144. package/dist/decay-chart.d.ts +108 -0
  145. package/dist/decay-chart.d.ts.map +1 -0
  146. package/dist/decay-chart.js +277 -0
  147. package/dist/decay-chart.js.map +1 -0
  148. package/dist/dialog.d.ts +5 -1
  149. package/dist/dialog.d.ts.map +1 -1
  150. package/dist/dialog.js +3 -3
  151. package/dist/dialog.js.map +1 -1
  152. package/dist/donut-chart.d.ts +26 -0
  153. package/dist/donut-chart.d.ts.map +1 -0
  154. package/dist/donut-chart.js +126 -0
  155. package/dist/donut-chart.js.map +1 -0
  156. package/dist/dot-matrix-chart.d.ts +42 -0
  157. package/dist/dot-matrix-chart.d.ts.map +1 -0
  158. package/dist/dot-matrix-chart.js +237 -0
  159. package/dist/dot-matrix-chart.js.map +1 -0
  160. package/dist/drag-to-confirm.d.ts +25 -0
  161. package/dist/drag-to-confirm.d.ts.map +1 -0
  162. package/dist/drag-to-confirm.js +203 -0
  163. package/dist/drag-to-confirm.js.map +1 -0
  164. package/dist/drawer.d.ts +3 -1
  165. package/dist/drawer.d.ts.map +1 -1
  166. package/dist/drawer.js +74 -2
  167. package/dist/drawer.js.map +1 -1
  168. package/dist/event-sparkline.d.ts +37 -0
  169. package/dist/event-sparkline.d.ts.map +1 -0
  170. package/dist/event-sparkline.js +159 -0
  171. package/dist/event-sparkline.js.map +1 -0
  172. package/dist/field.js +4 -4
  173. package/dist/field.js.map +1 -1
  174. package/dist/follow-up-suggestions.d.ts +19 -0
  175. package/dist/follow-up-suggestions.d.ts.map +1 -0
  176. package/dist/follow-up-suggestions.js +50 -0
  177. package/dist/follow-up-suggestions.js.map +1 -0
  178. package/dist/gauge.d.ts +34 -0
  179. package/dist/gauge.d.ts.map +1 -0
  180. package/dist/gauge.js +179 -0
  181. package/dist/gauge.js.map +1 -0
  182. package/dist/hover-card.js +1 -1
  183. package/dist/hover-card.js.map +1 -1
  184. package/dist/image-preview.d.ts +19 -0
  185. package/dist/image-preview.d.ts.map +1 -0
  186. package/dist/image-preview.js +52 -0
  187. package/dist/image-preview.js.map +1 -0
  188. package/dist/{index-D_6Yo51i.d.ts → index-CdTFUcZD.d.ts} +6 -2
  189. package/dist/index-CdTFUcZD.d.ts.map +1 -0
  190. package/dist/index-DRXUXEa8.d.ts +80 -0
  191. package/dist/index-DRXUXEa8.d.ts.map +1 -0
  192. package/dist/index.css +7812 -2806
  193. package/dist/index.d.ts +43 -3
  194. package/dist/index.js +44 -4
  195. package/dist/link.d.ts +15 -0
  196. package/dist/link.d.ts.map +1 -0
  197. package/dist/link.js +30 -0
  198. package/dist/link.js.map +1 -0
  199. package/dist/menu.js +1 -1
  200. package/dist/menu.js.map +1 -1
  201. package/dist/message-actions.d.ts +28 -0
  202. package/dist/message-actions.d.ts.map +1 -0
  203. package/dist/message-actions.js +115 -0
  204. package/dist/message-actions.js.map +1 -0
  205. package/dist/meter.d.ts +21 -0
  206. package/dist/meter.d.ts.map +1 -0
  207. package/dist/meter.js +42 -0
  208. package/dist/meter.js.map +1 -0
  209. package/dist/metric-card.d.ts +29 -0
  210. package/dist/metric-card.d.ts.map +1 -0
  211. package/dist/metric-card.js +68 -0
  212. package/dist/metric-card.js.map +1 -0
  213. package/dist/middle-truncate.d.ts +29 -0
  214. package/dist/middle-truncate.d.ts.map +1 -0
  215. package/dist/middle-truncate.js +52 -0
  216. package/dist/middle-truncate.js.map +1 -0
  217. package/dist/model-picker.d.ts +25 -0
  218. package/dist/model-picker.d.ts.map +1 -0
  219. package/dist/model-picker.js +101 -0
  220. package/dist/model-picker.js.map +1 -0
  221. package/dist/password-field.d.ts +18 -0
  222. package/dist/password-field.d.ts.map +1 -0
  223. package/dist/password-field.js +73 -0
  224. package/dist/password-field.js.map +1 -0
  225. package/dist/popconfirm.d.ts +22 -0
  226. package/dist/popconfirm.d.ts.map +1 -0
  227. package/dist/popconfirm.js +64 -0
  228. package/dist/popconfirm.js.map +1 -0
  229. package/dist/popover.js +1 -1
  230. package/dist/popover.js.map +1 -1
  231. package/dist/radial-progress.d.ts +13 -0
  232. package/dist/radial-progress.d.ts.map +1 -0
  233. package/dist/radial-progress.js +50 -0
  234. package/dist/radial-progress.js.map +1 -0
  235. package/dist/range-slider.d.ts +24 -0
  236. package/dist/range-slider.d.ts.map +1 -0
  237. package/dist/range-slider.js +84 -0
  238. package/dist/range-slider.js.map +1 -0
  239. package/dist/run-matrix.d.ts +32 -0
  240. package/dist/run-matrix.d.ts.map +1 -0
  241. package/dist/run-matrix.js +244 -0
  242. package/dist/run-matrix.js.map +1 -0
  243. package/dist/schedule-list.d.ts +29 -0
  244. package/dist/schedule-list.d.ts.map +1 -0
  245. package/dist/schedule-list.js +72 -0
  246. package/dist/schedule-list.js.map +1 -0
  247. package/dist/score-band-chart.d.ts +41 -0
  248. package/dist/score-band-chart.d.ts.map +1 -0
  249. package/dist/score-band-chart.js +159 -0
  250. package/dist/score-band-chart.js.map +1 -0
  251. package/dist/search-field.d.ts +20 -0
  252. package/dist/search-field.d.ts.map +1 -0
  253. package/dist/search-field.js +95 -0
  254. package/dist/search-field.js.map +1 -0
  255. package/dist/select.d.ts +4 -1
  256. package/dist/select.d.ts.map +1 -1
  257. package/dist/select.js +4 -2
  258. package/dist/select.js.map +1 -1
  259. package/dist/shortcut-sheet.d.ts +27 -0
  260. package/dist/shortcut-sheet.d.ts.map +1 -0
  261. package/dist/shortcut-sheet.js +43 -0
  262. package/dist/shortcut-sheet.js.map +1 -0
  263. package/dist/sources-panel.d.ts +14 -0
  264. package/dist/sources-panel.d.ts.map +1 -0
  265. package/dist/sources-panel.js +93 -0
  266. package/dist/sources-panel.js.map +1 -0
  267. package/dist/sparkline.d.ts +21 -0
  268. package/dist/sparkline.d.ts.map +1 -0
  269. package/dist/sparkline.js +64 -0
  270. package/dist/sparkline.js.map +1 -0
  271. package/dist/spinner.d.ts +2 -1
  272. package/dist/spinner.d.ts.map +1 -1
  273. package/dist/spinner.js +3 -3
  274. package/dist/spinner.js.map +1 -1
  275. package/dist/split-button.d.ts +27 -0
  276. package/dist/split-button.d.ts.map +1 -0
  277. package/dist/split-button.js +51 -0
  278. package/dist/split-button.js.map +1 -0
  279. package/dist/table.d.ts +1 -1
  280. package/dist/table.js +1 -1
  281. package/dist/tag-input.d.ts +17 -0
  282. package/dist/tag-input.d.ts.map +1 -0
  283. package/dist/tag-input.js +85 -0
  284. package/dist/tag-input.js.map +1 -0
  285. package/dist/terminal.d.ts +37 -0
  286. package/dist/terminal.d.ts.map +1 -0
  287. package/dist/terminal.js +86 -0
  288. package/dist/terminal.js.map +1 -0
  289. package/dist/themes.css +47 -28
  290. package/dist/time-field.d.ts +46 -0
  291. package/dist/time-field.d.ts.map +1 -0
  292. package/dist/time-field.js +227 -0
  293. package/dist/time-field.js.map +1 -0
  294. package/dist/toast.d.ts +2 -24
  295. package/dist/toast.js +2 -76
  296. package/dist/virtual-list.d.ts +17 -0
  297. package/dist/virtual-list.d.ts.map +1 -0
  298. package/dist/virtual-list.js +79 -0
  299. package/dist/virtual-list.js.map +1 -0
  300. package/package.json +161 -1
  301. package/dist/Chart-CDJ3a_FJ.js.map +0 -1
  302. package/dist/Table-C-SStsKz.js.map +0 -1
  303. package/dist/index-D_6Yo51i.d.ts.map +0 -1
  304. package/dist/toast.d.ts.map +0 -1
  305. package/dist/toast.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -5,16 +5,27 @@ import { n as RenderableElement, t as Renderable } from "./node-CcE0pv56.js";
5
5
  import { Badge, BadgeProps } from "./badge.js";
6
6
  import { Button, ButtonProps } from "./button.js";
7
7
  import { Checkbox, CheckboxProps } from "./checkbox.js";
8
+ import { CopyButton, CopyButtonProps, CopyController, CopyState, UseCopyOptions, copyStateLabel, performCopy, useCopy } from "./copy-button.js";
9
+ import { DotMatrixChart, DotMatrixChartProps, DotMatrixMarker, DotMatrixPoint, DotMatrixTone } from "./dot-matrix-chart.js";
10
+ import { EventSparkline, EventSparklineMarker, EventSparklineProps, EventSparklineTone } from "./event-sparkline.js";
11
+ import { Gauge, GaugeProps, GaugeSegment, GaugeTone, gaugePercent } from "./gauge.js";
8
12
  import { HoldButton, HoldButtonProps } from "./hold-button.js";
9
13
  import { IconButton, IconButtonProps } from "./icon-button.js";
10
14
  import { Input, InputProps } from "./input.js";
11
15
  import { Kbd, KbdProps } from "./kbd.js";
16
+ import { Link, LinkProps } from "./link.js";
17
+ import { Meter, MeterProps, MeterTone, meterPercent } from "./meter.js";
18
+ import { MiddleTruncate, MiddleTruncateProps, splitMiddle } from "./middle-truncate.js";
12
19
  import { NumberInput, NumberInputProps } from "./number-input.js";
13
20
  import { Progress, ProgressProps } from "./progress.js";
21
+ import { RadialProgress, RadialProgressProps } from "./radial-progress.js";
22
+ import { RangeSlider, RangeSliderProps, RangeValue } from "./range-slider.js";
14
23
  import { ScrollArea, ScrollAreaProps } from "./scroll-area.js";
24
+ import { SearchField, SearchFieldProps } from "./search-field.js";
15
25
  import { Separator, SeparatorProps } from "./separator.js";
16
26
  import { Skeleton, SkeletonProps } from "./skeleton.js";
17
27
  import { Slider, SliderProps } from "./slider.js";
28
+ import { Sparkline, SparklineProps, SparklineTone } from "./sparkline.js";
18
29
  import { Spinner, SpinnerProps } from "./spinner.js";
19
30
  import { StatusMark, StatusMarkProps, StatusMarkState } from "./status-mark.js";
20
31
  import { Surface, SurfaceProps } from "./surface.js";
@@ -35,26 +46,33 @@ import { t as MenuItem } from "./MenuContent-D0HouXwm.js";
35
46
  import { ContextMenu, ContextMenuProps } from "./context-menu.js";
36
47
  import { Dialog, DialogProps } from "./dialog.js";
37
48
  import { Drawer, DrawerProps, DrawerSide } from "./drawer.js";
49
+ import { DragToConfirm, DragToConfirmPhase, DragToConfirmProps } from "./drag-to-confirm.js";
38
50
  import { FieldMessage, FieldMessageProps } from "./field-message.js";
39
51
  import { Field, FieldProps } from "./field.js";
40
52
  import { HoverCard, HoverCardProps } from "./hover-card.js";
41
53
  import { Menu, MenuProps } from "./menu.js";
54
+ import { SplitButton, SplitButtonProps } from "./split-button.js";
42
55
  import { OTPInput, OTPInputProps, OTPPattern, OTPState } from "./otp-input.js";
43
56
  import { Pagination, PaginationProps } from "./pagination.js";
44
57
  import { Popover, PopoverProps } from "./popover.js";
45
58
  import { QuestionCard, QuestionCardProps, QuestionOption } from "./question-card.js";
46
59
  import { RadioGroup, RadioGroupProps, RadioOption } from "./radio-group.js";
47
60
  import { Select, SelectOption, SelectProps } from "./select.js";
61
+ import { ShortcutEntry, ShortcutGroup, ShortcutSheet, ShortcutSheetProps } from "./shortcut-sheet.js";
48
62
  import { Delta, DeltaProps, Stat, StatGroup, StatGroupProps, StatProps } from "./stat.js";
49
63
  import { TabItem, Tabs, TabsProps } from "./tabs.js";
64
+ import { TagInput, TagInputProps, addTag, removeTag } from "./tag-input.js";
50
65
  import { TaskList, TaskListItem, TaskListProps, TaskState } from "./task-list.js";
51
66
  import { Timeline, TimelineItem, TimelineProps } from "./timeline.js";
52
67
  import { TreeItem, TreeView, TreeViewProps } from "./tree-view.js";
53
68
  import { Carousel, CarouselProps, slideAfter } from "./carousel.js";
69
+ import { DateField, DateFieldProps, formatDay } from "./date-field.js";
54
70
  import { DateRangeField, DateRangeFieldProps, dayFromSegments, orderRange, segmentsOf, stepSegment, typeSegment } from "./date-range-field.js";
55
- import { Toast, ToastProps, ToastViewport, ToastViewportProps, toast } from "./toast.js";
71
+ import { a as ToastViewportProps, c as SpringToastOptions, d as SpringToastRecord, f as SpringToastTone, h as springToast, i as ToastViewport, l as SpringToastPatch, m as SpringToasterProps, n as Toast, o as toast, p as SpringToaster, r as ToastProps, s as SpringToastAction, u as SpringToastPosition } from "./index-DRXUXEa8.js";
56
72
  import { Toolbar, ToolbarProps } from "./toolbar.js";
57
73
  import { Tooltip, TooltipGroup, TooltipGroupProps, TooltipProps } from "./tooltip.js";
74
+ import { AlertDialog, AlertDialogProps } from "./alert-dialog.js";
75
+ import { ActivityHeatmap, ActivityHeatmapProps, HeatmapCell, HeatmapDay, HeatmapLevel, HeatmapModel, HeatmapMonthLabel, buildHeatmap, heatmapIso, heatmapMs, levelFor, shiftDay, weekdayOf } from "./activity-heatmap.js";
58
76
  import { Chart, ChartProps, ChartSeries } from "./chart.js";
59
77
  import { CommandItem, CommandPalette, CommandPaletteProps } from "./command-palette.js";
60
78
  import { EmptyState, EmptyStateProps } from "./empty-state.js";
@@ -65,7 +83,7 @@ import { Resizable, ResizableProps } from "./resizable.js";
65
83
  import { SidePanel, SidePanelProps, SidePanelSide, SidePanelState } from "./side-panel.js";
66
84
  import { Sidebar, SidebarCollapsedMode, SidebarItem, SidebarProps, SidebarSection, SidebarSide } from "./sidebar.js";
67
85
  import { StreamingText, StreamingTextProps } from "./streaming-text.js";
68
- import { a as TableSortDirection, i as TableSort, n as TableColumn, r as TableProps, t as Table } from "./index-D_6Yo51i.js";
86
+ import { a as TableSortDirection, i as TableSort, n as TableColumn, r as TableProps, t as Table } from "./index-CdTFUcZD.js";
69
87
  import { SegmentedControl, SegmentedControlProps, SegmentedOption } from "./segmented-control.js";
70
88
  import { Stepper, StepperProps, StepperStep } from "./stepper.js";
71
89
  import { MetadataEntry, MetadataList, MetadataListLayout, MetadataListProps } from "./metadata-list.js";
@@ -74,10 +92,32 @@ import { Citation, CitationProps, CitationSource } from "./citation.js";
74
92
  import { ToolCall, ToolCalls, ToolCallsProps } from "./tool-calls.js";
75
93
  import { PlanCard, PlanCardProps, PlanCardState, PlanStep } from "./plan-card.js";
76
94
  import { ChatScroller, ChatScrollerProps } from "./chat-scroller.js";
95
+ import { Terminal, TerminalLine, TerminalProps, TerminalTone } from "./terminal.js";
77
96
  import { ChatInput, ChatInputMatch, ChatInputMessage, ChatInputProps, ChatInputState, ChatInputSuggestion, ChatInputTrigger, filterChatInputSuggestions, findChatInputTrigger, matchChatInputSuggestions, replaceChatInputTrigger } from "./chat-input.js";
78
97
  import { Message, MessageProps, MessageState } from "./message.js";
79
98
  import { ApprovalCard, ApprovalCardProps, ApprovalState } from "./approval-card.js";
80
99
  import { CodeBlock, CodeBlockProps } from "./code-block.js";
81
100
  import { DiffHunk, DiffLine, DiffView, DiffViewProps } from "./diff-view.js";
82
101
  import { ArtifactCard, ArtifactCardProps, ArtifactState } from "./artifact-card.js";
83
- export { Accordion, type AccordionItem, type AccordionProps, AnimatedNumber, type AnimatedNumberProps, ApprovalCard, type ApprovalCardProps, type ApprovalState, ArtifactCard, type ArtifactCardProps, type ArtifactState, Attachment, type AttachmentFile, type AttachmentProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Calendar, type CalendarProps, type CalendarRange, Card, type CardProps, Carousel, type CarouselProps, Chart, type ChartProps, type ChartSeries, ChatInput, type ChatInputMatch, type ChatInputMessage, type ChatInputProps, type ChatInputState, type ChatInputSuggestion, type ChatInputTrigger, ChatScroller, type ChatScrollerProps, Checkbox, type CheckboxProps, Citation, type CitationProps, type CitationSource, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, type CommandItem, CommandPalette, type CommandPaletteProps, ContextMenu, type ContextMenuProps, type ControlDensity, type ControlSize, DateRangeField, type DateRangeFieldProps, Delta, type DeltaProps, Dialog, type DialogProps, type DiffHunk, type DiffLine, DiffView, type DiffViewProps, Drawer, type DrawerProps, type DrawerSide, type DropzoneRejectReason, type DropzoneValidation, type DropzoneValidationResult, EmptyState, type EmptyStateProps, Field, FieldMessage, type FieldMessageProps, type FieldProps, HoldButton, type HoldButtonProps, HoverCard, type HoverCardProps, IconButton, type IconButtonProps, Input, type InputProps, Kbd, type KbdProps, MagneticDropzone, type MagneticDropzoneProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarMenu, type MenubarProps, Message, type MessageProps, type MessageState, type MetadataEntry, MetadataList, type MetadataListLayout, type MetadataListProps, type MotionSpeed, Notice, type NoticeProps, NumberInput, type NumberInputProps, OTPInput, type OTPInputProps, type OTPPattern, type OTPState, OverflowList, type OverflowListProps, Pagination, type PaginationProps, PlanCard, type PlanCardProps, type PlanCardState, type PlanStep, Popover, type PopoverProps, type Presence, Progress, type ProgressProps, QuestionCard, type QuestionCardProps, type QuestionOption, RadioGroup, type RadioGroupProps, type RadioOption, type ReasoningStep, ReasoningSteps, type ReasoningStepsProps, type Renderable, type RenderableElement, Resizable, type ResizableProps, Reveal, type RevealProps, ScrollArea, type ScrollAreaProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, SidePanel, type SidePanelProps, type SidePanelSide, type SidePanelState, Sidebar, type SidebarCollapsedMode, type SidebarItem, type SidebarProps, type SidebarSection, type SidebarSide, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stat, StatGroup, type StatGroupProps, type StatProps, StatusMark, type StatusMarkProps, type StatusMarkState, Stepper, type StepperProps, type StepperStep, StreamingText, type StreamingTextProps, Surface, type SurfaceProps, type TabItem, Table, type TableColumn, type TableProps, type TableSort, type TableSortDirection, Tabs, type TabsProps, TaskList, type TaskListItem, type TaskListProps, type TaskState, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Timestamp, type TimestampFormat, type TimestampProps, Toast, type ToastProps, ToastViewport, type ToastViewportProps, Toggle, type ToggleProps, type ToolCall, ToolCalls, type ToolCallsProps, Toolbar, type ToolbarProps, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipProps, type TreeItem, TreeView, type TreeViewProps, dayFromSegments, describeDropzoneResult, filterChatInputSuggestions, findChatInputTrigger, matchChatInputSuggestions, motionDurationMs, orderRange, parseDurationMs, replaceChatInputTrigger, segmentsOf, slideAfter, stepSegment, toast, typeSegment, usePresence, validateDropzoneFiles };
102
+ import { TimeField, TimeFieldProps, formatTime, stepTimeSegment, timeFromSegments, timeSegments, typeTimeSegment } from "./time-field.js";
103
+ import { PasswordField, PasswordFieldProps } from "./password-field.js";
104
+ import { DateTimeField, DateTimeFieldProps, DateTimeValue } from "./date-time-field.js";
105
+ import { CheckboxGroup, CheckboxGroupOption, CheckboxGroupProps } from "./checkbox-group.js";
106
+ import { Popconfirm, PopconfirmProps } from "./popconfirm.js";
107
+ import { MessageActions, MessageActionsLabels, MessageActionsProps, MessageFeedback } from "./message-actions.js";
108
+ import { FollowUpSuggestion, FollowUpSuggestions, FollowUpSuggestionsProps } from "./follow-up-suggestions.js";
109
+ import { ContextMeter, ContextMeterProps, contextTone, formatTokenCount } from "./context-meter.js";
110
+ import { ModelOption, ModelPicker, ModelPickerProps } from "./model-picker.js";
111
+ import { SourcesPanel, SourcesPanelProps } from "./sources-panel.js";
112
+ import { ImagePreview, ImagePreviewProps } from "./image-preview.js";
113
+ import { Conversation, ConversationList, ConversationListProps } from "./conversation-list.js";
114
+ import { VirtualList, VirtualListProps } from "./virtual-list.js";
115
+ import { DonutChart, DonutChartProps, DonutSegment, DonutTone } from "./donut-chart.js";
116
+ import { ChangeTimeline, ChangeTimelineFile, ChangeTimelinePoint, ChangeTimelineProps, laneBounds } from "./change-timeline.js";
117
+ import { RUN_STATES, RunMatrix, RunMatrixProps, RunMatrixRow, RunState, runCounts } from "./run-matrix.js";
118
+ import { MetricCard, MetricCardProps, MetricCardTone } from "./metric-card.js";
119
+ import { ScheduleItem, ScheduleList, ScheduleListProps, ScheduleTone } from "./schedule-list.js";
120
+ import { ScoreBand, ScoreBandChart, ScoreBandChartProps, ScoreBandTone } from "./score-band-chart.js";
121
+ import { DecayChart, DecayChartProps, DecayDose, DecayModel, DecayPeak, DecaySample, buildDecayChart, decayAmount, niceCeiling } from "./decay-chart.js";
122
+ import { BudgetCategory, BudgetSummary, BudgetSummaryProps, BudgetTone, budgetPercent, budgetTone } from "./budget-summary.js";
123
+ export { Accordion, type AccordionItem, type AccordionProps, ActivityHeatmap, type ActivityHeatmapProps, AlertDialog, type AlertDialogProps, AnimatedNumber, type AnimatedNumberProps, ApprovalCard, type ApprovalCardProps, type ApprovalState, ArtifactCard, type ArtifactCardProps, type ArtifactState, Attachment, type AttachmentFile, type AttachmentProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarProps, type AvatarStatus, Badge, type BadgeProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BudgetCategory, BudgetSummary, type BudgetSummaryProps, type BudgetTone, Button, type ButtonProps, Calendar, type CalendarProps, type CalendarRange, Card, type CardProps, Carousel, type CarouselProps, ChangeTimeline, type ChangeTimelineFile, type ChangeTimelinePoint, type ChangeTimelineProps, Chart, type ChartProps, type ChartSeries, ChatInput, type ChatInputMatch, type ChatInputMessage, type ChatInputProps, type ChatInputState, type ChatInputSuggestion, type ChatInputTrigger, ChatScroller, type ChatScrollerProps, Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, Citation, type CitationProps, type CitationSource, CodeBlock, type CodeBlockProps, Collapsible, type CollapsibleProps, Combobox, type ComboboxOption, type ComboboxProps, type CommandItem, CommandPalette, type CommandPaletteProps, ContextMenu, type ContextMenuProps, ContextMeter, type ContextMeterProps, type ControlDensity, type ControlSize, type Conversation, ConversationList, type ConversationListProps, CopyButton, type CopyButtonProps, type CopyController, type CopyState, DateField, type DateFieldProps, DateRangeField, type DateRangeFieldProps, DateTimeField, type DateTimeFieldProps, type DateTimeValue, DecayChart, type DecayChartProps, type DecayDose, type DecayModel, type DecayPeak, type DecaySample, Delta, type DeltaProps, Dialog, type DialogProps, type DiffHunk, type DiffLine, DiffView, type DiffViewProps, DonutChart, type DonutChartProps, type DonutSegment, type DonutTone, DotMatrixChart, type DotMatrixChartProps, type DotMatrixMarker, type DotMatrixPoint, type DotMatrixTone, DragToConfirm, type DragToConfirmPhase, type DragToConfirmProps, Drawer, type DrawerProps, type DrawerSide, type DropzoneRejectReason, type DropzoneValidation, type DropzoneValidationResult, EmptyState, type EmptyStateProps, EventSparkline, type EventSparklineMarker, type EventSparklineProps, type EventSparklineTone, Field, FieldMessage, type FieldMessageProps, type FieldProps, type FollowUpSuggestion, FollowUpSuggestions, type FollowUpSuggestionsProps, Gauge, type GaugeProps, type GaugeSegment, type GaugeTone, type HeatmapCell, type HeatmapDay, type HeatmapLevel, type HeatmapModel, type HeatmapMonthLabel, HoldButton, type HoldButtonProps, HoverCard, type HoverCardProps, IconButton, type IconButtonProps, ImagePreview, type ImagePreviewProps, Input, type InputProps, Kbd, type KbdProps, Link, type LinkProps, MagneticDropzone, type MagneticDropzoneProps, Menu, type MenuItem, type MenuProps, Menubar, type MenubarMenu, type MenubarProps, Message, MessageActions, type MessageActionsLabels, type MessageActionsProps, type MessageFeedback, type MessageProps, type MessageState, type MetadataEntry, MetadataList, type MetadataListLayout, type MetadataListProps, Meter, type MeterProps, type MeterTone, MetricCard, type MetricCardProps, type MetricCardTone, MiddleTruncate, type MiddleTruncateProps, type ModelOption, ModelPicker, type ModelPickerProps, type MotionSpeed, Notice, type NoticeProps, NumberInput, type NumberInputProps, OTPInput, type OTPInputProps, type OTPPattern, type OTPState, OverflowList, type OverflowListProps, Pagination, type PaginationProps, PasswordField, type PasswordFieldProps, PlanCard, type PlanCardProps, type PlanCardState, type PlanStep, Popconfirm, type PopconfirmProps, Popover, type PopoverProps, type Presence, Progress, type ProgressProps, QuestionCard, type QuestionCardProps, type QuestionOption, RUN_STATES, RadialProgress, type RadialProgressProps, RadioGroup, type RadioGroupProps, type RadioOption, RangeSlider, type RangeSliderProps, type RangeValue, type ReasoningStep, ReasoningSteps, type ReasoningStepsProps, type Renderable, type RenderableElement, Resizable, type ResizableProps, Reveal, type RevealProps, RunMatrix, type RunMatrixProps, type RunMatrixRow, type RunState, type ScheduleItem, ScheduleList, type ScheduleListProps, type ScheduleTone, type ScoreBand, ScoreBandChart, type ScoreBandChartProps, type ScoreBandTone, ScrollArea, type ScrollAreaProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, type ShortcutEntry, type ShortcutGroup, ShortcutSheet, type ShortcutSheetProps, SidePanel, type SidePanelProps, type SidePanelSide, type SidePanelState, Sidebar, type SidebarCollapsedMode, type SidebarItem, type SidebarProps, type SidebarSection, type SidebarSide, Skeleton, type SkeletonProps, Slider, type SliderProps, SourcesPanel, type SourcesPanelProps, Sparkline, type SparklineProps, type SparklineTone, Spinner, type SpinnerProps, SplitButton, type SplitButtonProps, type SpringToastAction, type SpringToastOptions, type SpringToastPatch, type SpringToastPosition, type SpringToastRecord, type SpringToastTone, SpringToaster, type SpringToasterProps, Stat, StatGroup, type StatGroupProps, type StatProps, StatusMark, type StatusMarkProps, type StatusMarkState, Stepper, type StepperProps, type StepperStep, StreamingText, type StreamingTextProps, Surface, type SurfaceProps, type TabItem, Table, type TableColumn, type TableProps, type TableSort, type TableSortDirection, Tabs, type TabsProps, TagInput, type TagInputProps, TaskList, type TaskListItem, type TaskListProps, type TaskState, Terminal, type TerminalLine, type TerminalProps, type TerminalTone, Textarea, type TextareaProps, TimeField, type TimeFieldProps, Timeline, type TimelineItem, type TimelineProps, Timestamp, type TimestampFormat, type TimestampProps, Toast, type ToastProps, ToastViewport, type ToastViewportProps, Toggle, type ToggleProps, type ToolCall, ToolCalls, type ToolCallsProps, Toolbar, type ToolbarProps, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipProps, type TreeItem, TreeView, type TreeViewProps, type UseCopyOptions, VirtualList, type VirtualListProps, addTag, budgetPercent, budgetTone, buildDecayChart, buildHeatmap, contextTone, copyStateLabel, dayFromSegments, decayAmount, describeDropzoneResult, filterChatInputSuggestions, findChatInputTrigger, formatDay, formatTime, formatTokenCount, gaugePercent, heatmapIso, heatmapMs, laneBounds, levelFor, matchChatInputSuggestions, meterPercent, motionDurationMs, niceCeiling, orderRange, parseDurationMs, performCopy, removeTag, replaceChatInputTrigger, runCounts, segmentsOf, shiftDay, slideAfter, splitMiddle, springToast, stepSegment, stepTimeSegment, timeFromSegments, timeSegments, toast, typeSegment, typeTimeSegment, useCopy, usePresence, validateDropzoneFiles, weekdayOf };
package/dist/index.js CHANGED
@@ -6,8 +6,13 @@ import { Spinner } from "./spinner.js";
6
6
  import { Button } from "./button.js";
7
7
  import { Checkbox } from "./checkbox.js";
8
8
  import { IconButton } from "./icon-button.js";
9
+ import { CopyButton, copyStateLabel, performCopy, useCopy } from "./copy-button.js";
9
10
  import { Input } from "./input.js";
11
+ import { SearchField } from "./search-field.js";
10
12
  import { Kbd } from "./kbd.js";
13
+ import { Meter, meterPercent } from "./meter.js";
14
+ import { MiddleTruncate, splitMiddle } from "./middle-truncate.js";
15
+ import { RadialProgress } from "./radial-progress.js";
11
16
  import { Progress } from "./progress.js";
12
17
  import { ScrollArea } from "./scroll-area.js";
13
18
  import { Separator } from "./separator.js";
@@ -28,10 +33,12 @@ import { Combobox } from "./combobox.js";
28
33
  import { ContextMenu } from "./context-menu.js";
29
34
  import { Dialog } from "./dialog.js";
30
35
  import { Drawer } from "./drawer.js";
36
+ import { DragToConfirm } from "./drag-to-confirm.js";
31
37
  import { FieldMessage } from "./field-message.js";
32
38
  import { Field } from "./field.js";
33
39
  import { HoverCard } from "./hover-card.js";
34
40
  import { Menu } from "./menu.js";
41
+ import { SplitButton } from "./split-button.js";
35
42
  import { OTPInput } from "./otp-input.js";
36
43
  import { Pagination } from "./pagination.js";
37
44
  import { Popover } from "./popover.js";
@@ -39,17 +46,22 @@ import { QuestionCard } from "./question-card.js";
39
46
  import { RadioGroup } from "./radio-group.js";
40
47
  import { Reveal } from "./reveal.js";
41
48
  import { Select } from "./select.js";
49
+ import { ShortcutSheet } from "./shortcut-sheet.js";
42
50
  import { Delta, Stat, StatGroup } from "./stat.js";
43
51
  import { Tabs } from "./tabs.js";
52
+ import { TagInput, addTag, removeTag } from "./tag-input.js";
44
53
  import { TaskList } from "./task-list.js";
45
54
  import { Timeline } from "./timeline.js";
46
55
  import { TreeView } from "./tree-view.js";
47
56
  import { Carousel, slideAfter } from "./carousel.js";
57
+ import { DateField, formatDay } from "./date-field.js";
48
58
  import { DateRangeField, dayFromSegments, orderRange, segmentsOf, stepSegment, typeSegment } from "./date-range-field.js";
49
- import { Toast, ToastViewport, toast } from "./toast.js";
59
+ import { a as springToast, i as SpringToaster, n as ToastViewport, r as toast, t as Toast } from "./Toast-CGHWMJFI.js";
50
60
  import { Toolbar } from "./toolbar.js";
51
61
  import { n as TooltipGroup, t as Tooltip } from "./Tooltip-Clb5PoSN.js";
52
- import { t as Chart } from "./Chart-CDJ3a_FJ.js";
62
+ import { AlertDialog } from "./alert-dialog.js";
63
+ import { ActivityHeatmap, buildHeatmap, heatmapIso, heatmapMs, levelFor, shiftDay, weekdayOf } from "./activity-heatmap.js";
64
+ import { t as Chart } from "./Chart-C3wQzNKf.js";
53
65
  import { CommandPalette } from "./command-palette.js";
54
66
  import { EmptyState } from "./empty-state.js";
55
67
  import { MagneticDropzone, describeDropzoneResult, validateDropzoneFiles } from "./magnetic-dropzone.js";
@@ -59,7 +71,7 @@ import { Resizable } from "./resizable.js";
59
71
  import { SidePanel } from "./side-panel.js";
60
72
  import { Sidebar } from "./sidebar.js";
61
73
  import { StreamingText } from "./streaming-text.js";
62
- import { t as Table } from "./Table-C-SStsKz.js";
74
+ import { t as Table } from "./Table-Db4HQGlm.js";
63
75
  import { StatusMark } from "./status-mark.js";
64
76
  import { Timestamp } from "./timestamp.js";
65
77
  import { NumberInput } from "./number-input.js";
@@ -72,10 +84,38 @@ import { Citation } from "./citation.js";
72
84
  import { ToolCalls } from "./tool-calls.js";
73
85
  import { PlanCard } from "./plan-card.js";
74
86
  import { ChatScroller } from "./chat-scroller.js";
87
+ import { Terminal } from "./terminal.js";
75
88
  import { ChatInput, filterChatInputSuggestions, findChatInputTrigger, matchChatInputSuggestions, replaceChatInputTrigger } from "./chat-input.js";
76
89
  import { Message } from "./message.js";
77
90
  import { ApprovalCard } from "./approval-card.js";
78
91
  import { CodeBlock } from "./code-block.js";
79
92
  import { DiffView } from "./diff-view.js";
80
93
  import { ArtifactCard } from "./artifact-card.js";
81
- export { Accordion, AnimatedNumber, ApprovalCard, ArtifactCard, Attachment, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Calendar, Card, Carousel, Chart, ChatInput, ChatScroller, Checkbox, Citation, CodeBlock, Collapsible, Combobox, CommandPalette, ContextMenu, DateRangeField, Delta, Dialog, DiffView, Drawer, EmptyState, Field, FieldMessage, HoldButton, HoverCard, IconButton, Input, Kbd, MagneticDropzone, Menu, Menubar, Message, MetadataList, Notice, NumberInput, OTPInput, OverflowList, Pagination, PlanCard, Popover, Progress, QuestionCard, RadioGroup, ReasoningSteps, Resizable, Reveal, ScrollArea, SegmentedControl, Select, Separator, SidePanel, Sidebar, Skeleton, Slider, Spinner, Stat, StatGroup, StatusMark, Stepper, StreamingText, Surface, Table, Tabs, TaskList, Textarea, Timeline, Timestamp, Toast, ToastViewport, Toggle, ToolCalls, Toolbar, Tooltip, TooltipGroup, TreeView, dayFromSegments, describeDropzoneResult, filterChatInputSuggestions, findChatInputTrigger, matchChatInputSuggestions, motionDurationMs, orderRange, parseDurationMs, replaceChatInputTrigger, segmentsOf, slideAfter, stepSegment, toast, typeSegment, usePresence, validateDropzoneFiles };
94
+ import { TimeField, formatTime, stepTimeSegment, timeFromSegments, timeSegments, typeTimeSegment } from "./time-field.js";
95
+ import { Link } from "./link.js";
96
+ import { RangeSlider } from "./range-slider.js";
97
+ import { Sparkline } from "./sparkline.js";
98
+ import { PasswordField } from "./password-field.js";
99
+ import { DateTimeField } from "./date-time-field.js";
100
+ import { CheckboxGroup } from "./checkbox-group.js";
101
+ import { Popconfirm } from "./popconfirm.js";
102
+ import { MessageActions } from "./message-actions.js";
103
+ import { FollowUpSuggestions } from "./follow-up-suggestions.js";
104
+ import { ContextMeter, contextTone, formatTokenCount } from "./context-meter.js";
105
+ import { ModelPicker } from "./model-picker.js";
106
+ import { SourcesPanel } from "./sources-panel.js";
107
+ import { ImagePreview } from "./image-preview.js";
108
+ import { ConversationList } from "./conversation-list.js";
109
+ import { VirtualList } from "./virtual-list.js";
110
+ import { DonutChart } from "./donut-chart.js";
111
+ import { DotMatrixChart } from "./dot-matrix-chart.js";
112
+ import { EventSparkline } from "./event-sparkline.js";
113
+ import { Gauge, gaugePercent } from "./gauge.js";
114
+ import { ChangeTimeline, laneBounds } from "./change-timeline.js";
115
+ import { RUN_STATES, RunMatrix, runCounts } from "./run-matrix.js";
116
+ import { MetricCard } from "./metric-card.js";
117
+ import { ScheduleList } from "./schedule-list.js";
118
+ import { ScoreBandChart } from "./score-band-chart.js";
119
+ import { DecayChart, buildDecayChart, decayAmount, niceCeiling } from "./decay-chart.js";
120
+ import { BudgetSummary, budgetPercent, budgetTone } from "./budget-summary.js";
121
+ export { Accordion, ActivityHeatmap, AlertDialog, AnimatedNumber, ApprovalCard, ArtifactCard, Attachment, Avatar, AvatarGroup, Badge, Breadcrumb, BudgetSummary, Button, Calendar, Card, Carousel, ChangeTimeline, Chart, ChatInput, ChatScroller, Checkbox, CheckboxGroup, Citation, CodeBlock, Collapsible, Combobox, CommandPalette, ContextMenu, ContextMeter, ConversationList, CopyButton, DateField, DateRangeField, DateTimeField, DecayChart, Delta, Dialog, DiffView, DonutChart, DotMatrixChart, DragToConfirm, Drawer, EmptyState, EventSparkline, Field, FieldMessage, FollowUpSuggestions, Gauge, HoldButton, HoverCard, IconButton, ImagePreview, Input, Kbd, Link, MagneticDropzone, Menu, Menubar, Message, MessageActions, MetadataList, Meter, MetricCard, MiddleTruncate, ModelPicker, Notice, NumberInput, OTPInput, OverflowList, Pagination, PasswordField, PlanCard, Popconfirm, Popover, Progress, QuestionCard, RUN_STATES, RadialProgress, RadioGroup, RangeSlider, ReasoningSteps, Resizable, Reveal, RunMatrix, ScheduleList, ScoreBandChart, ScrollArea, SearchField, SegmentedControl, Select, Separator, ShortcutSheet, SidePanel, Sidebar, Skeleton, Slider, SourcesPanel, Sparkline, Spinner, SplitButton, SpringToaster, Stat, StatGroup, StatusMark, Stepper, StreamingText, Surface, Table, Tabs, TagInput, TaskList, Terminal, Textarea, TimeField, Timeline, Timestamp, Toast, ToastViewport, Toggle, ToolCalls, Toolbar, Tooltip, TooltipGroup, TreeView, VirtualList, addTag, budgetPercent, budgetTone, buildDecayChart, buildHeatmap, contextTone, copyStateLabel, dayFromSegments, decayAmount, describeDropzoneResult, filterChatInputSuggestions, findChatInputTrigger, formatDay, formatTime, formatTokenCount, gaugePercent, heatmapIso, heatmapMs, laneBounds, levelFor, matchChatInputSuggestions, meterPercent, motionDurationMs, niceCeiling, orderRange, parseDurationMs, performCopy, removeTag, replaceChatInputTrigger, runCounts, segmentsOf, shiftDay, slideAfter, splitMiddle, springToast, stepSegment, stepTimeSegment, timeFromSegments, timeSegments, toast, typeSegment, typeTimeSegment, useCopy, usePresence, validateDropzoneFiles, weekdayOf };
package/dist/link.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { t as Renderable } from "./node-CcE0pv56.js";
2
+ import { AnchorHTMLAttributes } from "react";
3
+ //#region src/atoms/Link/index.d.ts
4
+ export type LinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children"> & {
5
+ /** Visual weight; the underline stays available in every variant. */
6
+ variant?: "default" | "muted" | "subtle";
7
+ /** Adds an external glyph and a safe target when none is given. */
8
+ external?: boolean;
9
+ /** Hide the glyph while keeping the external target behaviour. */
10
+ showExternal?: boolean;
11
+ children?: Renderable;
12
+ };
13
+ export declare function Link({ variant, external, showExternal, className, children, target, rel, ...props }: LinkProps): import("react").JSX.Element;
14
+ //#endregion
15
+ //# sourceMappingURL=link.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.d.ts","names":[],"sources":["../src/atoms/Link/index.tsx"],"mappings":";;;YAKY,YAAY,KACtB,qBAAqB;;EAIrB;;EAEA;;EAEA;EACA,WAAW;;wBAGG,OACd,SACA,UACA,cACA,WACA,UACA,QACA,QACG,SACF,4BAAS,IAAA"}
package/dist/link.js ADDED
@@ -0,0 +1,30 @@
1
+ import { t as cn } from "./cn-M4U2-Tak.js";
2
+ import { t as node } from "./node-Dr67KnBr.js";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { ArrowUpRightIcon } from "@phosphor-icons/react";
5
+ //#region src/atoms/Link/index.tsx
6
+ function Link({ variant = "default", external = false, showExternal = true, className, children, target, rel, ...props }) {
7
+ const resolvedTarget = target ?? (external ? "_blank" : void 0);
8
+ const resolvedRel = rel ?? (resolvedTarget === "_blank" ? "noreferrer noopener" : void 0);
9
+ return /* @__PURE__ */ jsxs("a", {
10
+ ...node(props),
11
+ className: cn("sph-link", className),
12
+ "data-variant": variant,
13
+ "data-external": external || void 0,
14
+ target: resolvedTarget,
15
+ rel: resolvedRel,
16
+ children: [/* @__PURE__ */ jsx("span", {
17
+ className: "sph-link__label",
18
+ children: node(children)
19
+ }), external && showExternal ? /* @__PURE__ */ jsx(ArrowUpRightIcon, {
20
+ className: "sph-link__external",
21
+ size: 12,
22
+ weight: "bold",
23
+ "aria-hidden": "true"
24
+ }) : null]
25
+ });
26
+ }
27
+ //#endregion
28
+ export { Link };
29
+
30
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","names":[],"sources":["../src/atoms/Link/index.tsx"],"sourcesContent":["import { ArrowUpRightIcon } from \"@phosphor-icons/react\";\nimport { cn } from \"@/lib/cn.js\";\nimport type { AnchorHTMLAttributes } from \"react\";\nimport { node, type Renderable } from \"@/lib/node.js\";\n\nexport type LinkProps = Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n \"children\"\n> & {\n /** Visual weight; the underline stays available in every variant. */\n variant?: \"default\" | \"muted\" | \"subtle\";\n /** Adds an external glyph and a safe target when none is given. */\n external?: boolean;\n /** Hide the glyph while keeping the external target behaviour. */\n showExternal?: boolean;\n children?: Renderable;\n};\n\nexport function Link({\n variant = \"default\",\n external = false,\n showExternal = true,\n className,\n children,\n target,\n rel,\n ...props\n}: LinkProps) {\n const resolvedTarget = target ?? (external ? \"_blank\" : undefined);\n const resolvedRel =\n rel ?? (resolvedTarget === \"_blank\" ? \"noreferrer noopener\" : undefined);\n\n return (\n <a\n {...node(props)}\n className={cn(\"sph-link\", className)}\n data-variant={variant}\n data-external={external || undefined}\n target={resolvedTarget}\n rel={resolvedRel}\n >\n <span className=\"sph-link__label\">{node(children)}</span>\n {external && showExternal ? (\n <ArrowUpRightIcon\n className=\"sph-link__external\"\n size={12}\n weight=\"bold\"\n aria-hidden=\"true\"\n />\n ) : null}\n </a>\n );\n}\n"],"mappings":";;;;;AAkBA,SAAgB,KAAK,EACnB,UAAU,WACV,WAAW,OACX,eAAe,MACf,WACA,UACA,QACA,KACA,GAAG,SACS;CACZ,MAAM,iBAAiB,WAAW,WAAW,WAAW,KAAA;CACxD,MAAM,cACJ,QAAQ,mBAAmB,WAAW,wBAAwB,KAAA;CAEhE,OACE,qBAAC,KAAD;EACE,GAAI,KAAK,KAAK;EACd,WAAW,GAAG,YAAY,SAAS;EACnC,gBAAc;EACd,iBAAe,YAAY,KAAA;EAC3B,QAAQ;EACR,KAAK;EANP,UAAA,CAQE,oBAAC,QAAD;GAAM,WAAU;GAAmB,UAAA,KAAK,QAAQ;EAAQ,CAAA,GACvD,YAAY,eACX,oBAAC,kBAAD;GACE,WAAU;GACV,MAAM;GACN,QAAO;GACP,eAAY;EACb,CAAA,IACC,IACH;;AAEP"}
package/dist/menu.js CHANGED
@@ -19,7 +19,7 @@ function Menu({ trigger, items, onSelect, label, align = "start", open: openProp
19
19
  if (openProp === void 0) setUncontrolled(next);
20
20
  onOpenChange?.(next);
21
21
  };
22
- const { present, state, ref: contentRef } = usePresence(open, "fast");
22
+ const { present, state, ref: contentRef } = usePresence(open, "normal");
23
23
  const portaled = usePortaled();
24
24
  useIsoLayoutEffect(() => {
25
25
  triggerRef.current = rootRef.current?.querySelector(".sph-menu__trigger") ?? null;
package/dist/menu.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"menu.js","names":[],"sources":["../src/molecules/Menu/index.tsx"],"sourcesContent":["import { cn } from \"@/lib/cn.js\";\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport type { KeyboardActionEvent } from \"@/lib/events.js\";\nimport { node, type Renderable } from \"@/lib/node.js\";\nimport {\n useIsoLayoutEffect,\n useOverlayPosition,\n usePortaled,\n} from \"@/lib/overlay.js\";\nimport { usePresence } from \"@/lib/presence.js\";\nimport {\n canSlotTrigger,\n hasAccessibleText,\n slotTrigger,\n} from \"../Popover/trigger\";\nimport { focusElement, nextTabStop } from \"../Popover/focusFlow\";\nimport { MenuContent, type MenuItem } from \"./MenuContent\";\n\nexport type { MenuItem } from \"./MenuContent\";\n\nexport type MenuProps = {\n trigger: Renderable;\n items: MenuItem[];\n onSelect?: (value: string) => void;\n /** Controlled open state. */\n open?: boolean;\n /** Fires whenever the menu asks to open or close. */\n onOpenChange?: (open: boolean) => void;\n label?: string;\n align?: \"start\" | \"end\";\n disabled?: boolean;\n asChild?: boolean;\n className?: string;\n};\n\nconst ICON_TRIGGER_LABEL = \"Open menu\";\n\nexport function Menu({\n trigger,\n items,\n onSelect,\n label,\n align = \"start\",\n open: openProp,\n onOpenChange,\n disabled = false,\n asChild,\n className,\n}: MenuProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLElement>(null);\n const menuId = useId();\n const [uncontrolled, setUncontrolled] = useState(false);\n const open = openProp ?? uncontrolled;\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setUncontrolled(next);\n onOpenChange?.(next);\n };\n const {\n present,\n state,\n ref: contentRef,\n } = usePresence<HTMLDivElement>(open, \"fast\");\n const portaled = usePortaled();\n useIsoLayoutEffect(() => {\n triggerRef.current =\n rootRef.current?.querySelector<HTMLElement>(\".sph-menu__trigger\") ?? null;\n });\n useOverlayPosition(triggerRef, contentRef, present && portaled, {\n side: \"bottom\",\n align,\n offset: 4,\n });\n const enabledIndexes = items.flatMap((item, index) =>\n !item.separator && !item.disabled ? [index] : [],\n );\n const close = () => setOpen(false);\n const focusItem = (index: number) =>\n document.getElementById(`${menuId}-${index}`)?.focus();\n\n useEffect(() => {\n if (!open) return;\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target as Node;\n if (\n !rootRef.current?.contains(target) &&\n !contentRef.current?.contains(target)\n )\n close();\n };\n document.addEventListener(\"pointerdown\", handlePointerDown);\n return () => document.removeEventListener(\"pointerdown\", handlePointerDown);\n }, [open]);\n\n const choose = (item: MenuItem) => {\n if (item.disabled || item.separator || item.value === undefined) return;\n onSelect?.(item.value);\n close();\n };\n\n const handleKeyDown = (event: KeyboardActionEvent) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n close();\n return;\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n setOpen(true);\n const index =\n enabledIndexes[\n event.key === \"ArrowDown\" ? 0 : enabledIndexes.length - 1\n ];\n if (index !== undefined) requestAnimationFrame(() => focusItem(index));\n }\n };\n\n const handleItemEscape = () => {\n close();\n triggerRef.current?.focus();\n };\n\n const handleContentKeyDown = (event: {\n key: string;\n shiftKey: boolean;\n preventDefault(): void;\n }) => {\n if (event.key !== \"Tab\") return;\n event.preventDefault();\n close();\n const trigger = triggerRef.current;\n focusElement(\n event.shiftKey\n ? trigger\n : (nextTabStop(trigger, [rootRef.current, contentRef.current]) ??\n trigger),\n );\n };\n\n const triggerProps = {\n className: \"sph-menu__trigger\",\n \"aria-label\":\n label ?? (hasAccessibleText(trigger) ? undefined : ICON_TRIGGER_LABEL),\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? `${menuId}-menu` : undefined,\n disabled: disabled || undefined,\n onClick: () => setOpen(!open),\n onKeyDown: handleKeyDown,\n } as const;\n\n return (\n <div id={menuId} ref={rootRef} className={cn(\"sph-menu\", className)}>\n {canSlotTrigger(trigger, asChild) ? (\n slotTrigger(trigger, triggerProps)\n ) : (\n <button type=\"button\" {...triggerProps}>\n {node(trigger)}\n </button>\n )}\n {present &&\n portaled &&\n createPortal(\n <div\n id={`${menuId}-menu`}\n ref={contentRef}\n className=\"sph-menu__content\"\n data-align={align}\n data-state={state}\n role=\"menu\"\n onKeyDown={handleContentKeyDown}\n >\n <MenuContent\n menuId={menuId}\n items={items}\n onChoose={choose}\n onEscape={handleItemEscape}\n />\n </div>,\n document.body,\n )}\n </div>\n );\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"menu.js","names":[],"sources":["../src/molecules/Menu/index.tsx"],"sourcesContent":["import { cn } from \"@/lib/cn.js\";\nimport { useEffect, useId, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport type { KeyboardActionEvent } from \"@/lib/events.js\";\nimport { node, type Renderable } from \"@/lib/node.js\";\nimport {\n useIsoLayoutEffect,\n useOverlayPosition,\n usePortaled,\n} from \"@/lib/overlay.js\";\nimport { usePresence } from \"@/lib/presence.js\";\nimport {\n canSlotTrigger,\n hasAccessibleText,\n slotTrigger,\n} from \"../Popover/trigger\";\nimport { focusElement, nextTabStop } from \"../Popover/focusFlow\";\nimport { MenuContent, type MenuItem } from \"./MenuContent\";\n\nexport type { MenuItem } from \"./MenuContent\";\n\nexport type MenuProps = {\n trigger: Renderable;\n items: MenuItem[];\n onSelect?: (value: string) => void;\n /** Controlled open state. */\n open?: boolean;\n /** Fires whenever the menu asks to open or close. */\n onOpenChange?: (open: boolean) => void;\n label?: string;\n align?: \"start\" | \"end\";\n disabled?: boolean;\n asChild?: boolean;\n className?: string;\n};\n\nconst ICON_TRIGGER_LABEL = \"Open menu\";\n\nexport function Menu({\n trigger,\n items,\n onSelect,\n label,\n align = \"start\",\n open: openProp,\n onOpenChange,\n disabled = false,\n asChild,\n className,\n}: MenuProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLElement>(null);\n const menuId = useId();\n const [uncontrolled, setUncontrolled] = useState(false);\n const open = openProp ?? uncontrolled;\n const setOpen = (next: boolean) => {\n if (openProp === undefined) setUncontrolled(next);\n onOpenChange?.(next);\n };\n const {\n present,\n state,\n ref: contentRef,\n } = usePresence<HTMLDivElement>(open, \"normal\");\n const portaled = usePortaled();\n useIsoLayoutEffect(() => {\n triggerRef.current =\n rootRef.current?.querySelector<HTMLElement>(\".sph-menu__trigger\") ?? null;\n });\n useOverlayPosition(triggerRef, contentRef, present && portaled, {\n side: \"bottom\",\n align,\n offset: 4,\n });\n const enabledIndexes = items.flatMap((item, index) =>\n !item.separator && !item.disabled ? [index] : [],\n );\n const close = () => setOpen(false);\n const focusItem = (index: number) =>\n document.getElementById(`${menuId}-${index}`)?.focus();\n\n useEffect(() => {\n if (!open) return;\n const handlePointerDown = (event: PointerEvent) => {\n const target = event.target as Node;\n if (\n !rootRef.current?.contains(target) &&\n !contentRef.current?.contains(target)\n )\n close();\n };\n document.addEventListener(\"pointerdown\", handlePointerDown);\n return () => document.removeEventListener(\"pointerdown\", handlePointerDown);\n }, [open]);\n\n const choose = (item: MenuItem) => {\n if (item.disabled || item.separator || item.value === undefined) return;\n onSelect?.(item.value);\n close();\n };\n\n const handleKeyDown = (event: KeyboardActionEvent) => {\n if (event.key === \"Escape\") {\n event.preventDefault();\n close();\n return;\n }\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n setOpen(true);\n const index =\n enabledIndexes[\n event.key === \"ArrowDown\" ? 0 : enabledIndexes.length - 1\n ];\n if (index !== undefined) requestAnimationFrame(() => focusItem(index));\n }\n };\n\n const handleItemEscape = () => {\n close();\n triggerRef.current?.focus();\n };\n\n const handleContentKeyDown = (event: {\n key: string;\n shiftKey: boolean;\n preventDefault(): void;\n }) => {\n if (event.key !== \"Tab\") return;\n event.preventDefault();\n close();\n const trigger = triggerRef.current;\n focusElement(\n event.shiftKey\n ? trigger\n : (nextTabStop(trigger, [rootRef.current, contentRef.current]) ??\n trigger),\n );\n };\n\n const triggerProps = {\n className: \"sph-menu__trigger\",\n \"aria-label\":\n label ?? (hasAccessibleText(trigger) ? undefined : ICON_TRIGGER_LABEL),\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? `${menuId}-menu` : undefined,\n disabled: disabled || undefined,\n onClick: () => setOpen(!open),\n onKeyDown: handleKeyDown,\n } as const;\n\n return (\n <div id={menuId} ref={rootRef} className={cn(\"sph-menu\", className)}>\n {canSlotTrigger(trigger, asChild) ? (\n slotTrigger(trigger, triggerProps)\n ) : (\n <button type=\"button\" {...triggerProps}>\n {node(trigger)}\n </button>\n )}\n {present &&\n portaled &&\n createPortal(\n <div\n id={`${menuId}-menu`}\n ref={contentRef}\n className=\"sph-menu__content\"\n data-align={align}\n data-state={state}\n role=\"menu\"\n onKeyDown={handleContentKeyDown}\n >\n <MenuContent\n menuId={menuId}\n items={items}\n onChoose={choose}\n onEscape={handleItemEscape}\n />\n </div>,\n document.body,\n )}\n </div>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,28 @@
1
+ //#region src/molecules/MessageActions/index.d.ts
2
+ export type MessageFeedback = "up" | "down" | null;
3
+ export type MessageActionsLabels = {
4
+ toolbar?: string;
5
+ copy?: string;
6
+ copied?: string;
7
+ regenerate?: string;
8
+ edit?: string;
9
+ share?: string;
10
+ upvote?: string;
11
+ downvote?: string;
12
+ };
13
+ export type MessageActionsProps = {
14
+ copyText?: string;
15
+ onCopy?: () => void;
16
+ onRegenerate?: () => void;
17
+ onEdit?: () => void;
18
+ onShare?: () => void;
19
+ feedback?: MessageFeedback;
20
+ defaultFeedback?: MessageFeedback;
21
+ onFeedbackChange?: (feedback: MessageFeedback) => void;
22
+ labels?: MessageActionsLabels;
23
+ disabled?: boolean;
24
+ className?: string;
25
+ };
26
+ export declare function MessageActions({ copyText, onCopy, onRegenerate, onEdit, onShare, feedback, defaultFeedback, onFeedbackChange, labels, disabled, className }: MessageActionsProps): import("react").JSX.Element;
27
+ //#endregion
28
+ //# sourceMappingURL=message-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-actions.d.ts","names":[],"sources":["../src/molecules/MessageActions/index.tsx"],"mappings":";YAYY;YAEA;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;YAGU;EACV;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,kBAAkB;EAClB,oBAAoB,UAAU;EAC9B,SAAS;EACT;EACA;;wBAcc,iBACd,UACA,QACA,cACA,QACA,SACA,UACA,iBACA,kBACA,QACA,UACA,aACC,sCAAmB,IAAA"}
@@ -0,0 +1,115 @@
1
+ import { t as cn } from "./cn-M4U2-Tak.js";
2
+ import { IconButton } from "./icon-button.js";
3
+ import { CopyButton } from "./copy-button.js";
4
+ import { useState } from "react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { ArrowsClockwiseIcon, PencilSimpleIcon, ShareNetworkIcon, ThumbsDownIcon, ThumbsUpIcon } from "@phosphor-icons/react";
7
+ //#region src/molecules/MessageActions/index.tsx
8
+ const DEFAULT_LABELS = {
9
+ toolbar: "Message actions",
10
+ copy: "Copy response",
11
+ copied: "Copied",
12
+ regenerate: "Regenerate response",
13
+ edit: "Edit message",
14
+ share: "Share message",
15
+ upvote: "Good response",
16
+ downvote: "Bad response"
17
+ };
18
+ function MessageActions({ copyText, onCopy, onRegenerate, onEdit, onShare, feedback, defaultFeedback = null, onFeedbackChange, labels, disabled = false, className }) {
19
+ const [innerFeedback, setInnerFeedback] = useState(defaultFeedback);
20
+ const current = feedback ?? innerFeedback;
21
+ const text = {
22
+ ...DEFAULT_LABELS,
23
+ ...labels
24
+ };
25
+ const canCopy = copyText !== void 0 || onCopy !== void 0;
26
+ const canVote = onFeedbackChange !== void 0;
27
+ const vote = (value) => {
28
+ if (disabled) return;
29
+ const next = current === value ? null : value;
30
+ if (feedback === void 0) setInnerFeedback(next);
31
+ onFeedbackChange?.(next);
32
+ };
33
+ return /* @__PURE__ */ jsxs("div", {
34
+ className: cn("sph-message-actions", className),
35
+ role: "toolbar",
36
+ "aria-label": text.toolbar,
37
+ "data-disabled": disabled || void 0,
38
+ children: [
39
+ canCopy ? /* @__PURE__ */ jsx(CopyButton, {
40
+ className: "sph-message-actions__copy",
41
+ text: copyText,
42
+ label: text.copy,
43
+ copiedLabel: text.copied,
44
+ size: "sm",
45
+ variant: "ghost",
46
+ disabled,
47
+ onCopied: onCopy
48
+ }) : null,
49
+ onRegenerate ? /* @__PURE__ */ jsx(IconButton, {
50
+ size: "sm",
51
+ variant: "ghost",
52
+ label: text.regenerate,
53
+ disabled,
54
+ onClick: onRegenerate,
55
+ icon: /* @__PURE__ */ jsx(ArrowsClockwiseIcon, {
56
+ size: 15,
57
+ "aria-hidden": "true"
58
+ })
59
+ }) : null,
60
+ onEdit ? /* @__PURE__ */ jsx(IconButton, {
61
+ size: "sm",
62
+ variant: "ghost",
63
+ label: text.edit,
64
+ disabled,
65
+ onClick: onEdit,
66
+ icon: /* @__PURE__ */ jsx(PencilSimpleIcon, {
67
+ size: 15,
68
+ "aria-hidden": "true"
69
+ })
70
+ }) : null,
71
+ canVote ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(IconButton, {
72
+ className: "sph-message-actions__vote",
73
+ size: "sm",
74
+ variant: "ghost",
75
+ label: text.upvote,
76
+ "aria-pressed": current === "up",
77
+ "data-active": current === "up" || void 0,
78
+ disabled,
79
+ onClick: () => vote("up"),
80
+ icon: /* @__PURE__ */ jsx(ThumbsUpIcon, {
81
+ size: 15,
82
+ "aria-hidden": "true"
83
+ })
84
+ }), /* @__PURE__ */ jsx(IconButton, {
85
+ className: "sph-message-actions__vote",
86
+ size: "sm",
87
+ variant: "ghost",
88
+ label: text.downvote,
89
+ "aria-pressed": current === "down",
90
+ "data-active": current === "down" || void 0,
91
+ disabled,
92
+ onClick: () => vote("down"),
93
+ icon: /* @__PURE__ */ jsx(ThumbsDownIcon, {
94
+ size: 15,
95
+ "aria-hidden": "true"
96
+ })
97
+ })] }) : null,
98
+ onShare ? /* @__PURE__ */ jsx(IconButton, {
99
+ size: "sm",
100
+ variant: "ghost",
101
+ label: text.share,
102
+ disabled,
103
+ onClick: onShare,
104
+ icon: /* @__PURE__ */ jsx(ShareNetworkIcon, {
105
+ size: 15,
106
+ "aria-hidden": "true"
107
+ })
108
+ }) : null
109
+ ]
110
+ });
111
+ }
112
+ //#endregion
113
+ export { MessageActions };
114
+
115
+ //# sourceMappingURL=message-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-actions.js","names":[],"sources":["../src/molecules/MessageActions/index.tsx"],"sourcesContent":["import {\n ArrowsClockwiseIcon,\n PencilSimpleIcon,\n ShareNetworkIcon,\n ThumbsDownIcon,\n ThumbsUpIcon,\n} from \"@phosphor-icons/react\";\nimport { cn } from \"@/lib/cn.js\";\nimport { useState } from \"react\";\nimport { CopyButton } from \"@/atoms/CopyButton\";\nimport { IconButton } from \"@/atoms/IconButton\";\n\nexport type MessageFeedback = \"up\" | \"down\" | null;\n\nexport type MessageActionsLabels = {\n toolbar?: string;\n copy?: string;\n copied?: string;\n regenerate?: string;\n edit?: string;\n share?: string;\n upvote?: string;\n downvote?: string;\n};\n\nexport type MessageActionsProps = {\n copyText?: string;\n onCopy?: () => void;\n onRegenerate?: () => void;\n onEdit?: () => void;\n onShare?: () => void;\n feedback?: MessageFeedback;\n defaultFeedback?: MessageFeedback;\n onFeedbackChange?: (feedback: MessageFeedback) => void;\n labels?: MessageActionsLabels;\n disabled?: boolean;\n className?: string;\n};\n\nconst DEFAULT_LABELS: Required<MessageActionsLabels> = {\n toolbar: \"Message actions\",\n copy: \"Copy response\",\n copied: \"Copied\",\n regenerate: \"Regenerate response\",\n edit: \"Edit message\",\n share: \"Share message\",\n upvote: \"Good response\",\n downvote: \"Bad response\",\n};\n\nexport function MessageActions({\n copyText,\n onCopy,\n onRegenerate,\n onEdit,\n onShare,\n feedback,\n defaultFeedback = null,\n onFeedbackChange,\n labels,\n disabled = false,\n className,\n}: MessageActionsProps) {\n const [innerFeedback, setInnerFeedback] =\n useState<MessageFeedback>(defaultFeedback);\n const current = feedback ?? innerFeedback;\n const text = { ...DEFAULT_LABELS, ...labels };\n const canCopy = copyText !== undefined || onCopy !== undefined;\n const canVote = onFeedbackChange !== undefined;\n\n const vote = (value: Exclude<MessageFeedback, null>) => {\n if (disabled) return;\n const next = current === value ? null : value;\n if (feedback === undefined) setInnerFeedback(next);\n onFeedbackChange?.(next);\n };\n\n return (\n <div\n className={cn(\"sph-message-actions\", className)}\n role=\"toolbar\"\n aria-label={text.toolbar}\n data-disabled={disabled || undefined}\n >\n {canCopy ? (\n <CopyButton\n className=\"sph-message-actions__copy\"\n text={copyText}\n label={text.copy}\n copiedLabel={text.copied}\n size=\"sm\"\n variant=\"ghost\"\n disabled={disabled}\n onCopied={onCopy}\n />\n ) : null}\n {onRegenerate ? (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n label={text.regenerate}\n disabled={disabled}\n onClick={onRegenerate}\n icon={<ArrowsClockwiseIcon size={15} aria-hidden=\"true\" />}\n />\n ) : null}\n {onEdit ? (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n label={text.edit}\n disabled={disabled}\n onClick={onEdit}\n icon={<PencilSimpleIcon size={15} aria-hidden=\"true\" />}\n />\n ) : null}\n {canVote ? (\n <>\n <IconButton\n className=\"sph-message-actions__vote\"\n size=\"sm\"\n variant=\"ghost\"\n label={text.upvote}\n aria-pressed={current === \"up\"}\n data-active={current === \"up\" || undefined}\n disabled={disabled}\n onClick={() => vote(\"up\")}\n icon={<ThumbsUpIcon size={15} aria-hidden=\"true\" />}\n />\n <IconButton\n className=\"sph-message-actions__vote\"\n size=\"sm\"\n variant=\"ghost\"\n label={text.downvote}\n aria-pressed={current === \"down\"}\n data-active={current === \"down\" || undefined}\n disabled={disabled}\n onClick={() => vote(\"down\")}\n icon={<ThumbsDownIcon size={15} aria-hidden=\"true\" />}\n />\n </>\n ) : null}\n {onShare ? (\n <IconButton\n size=\"sm\"\n variant=\"ghost\"\n label={text.share}\n disabled={disabled}\n onClick={onShare}\n icon={<ShareNetworkIcon size={15} aria-hidden=\"true\" />}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAuCA,MAAM,iBAAiD;CACrD,SAAS;CACT,MAAM;CACN,QAAQ;CACR,YAAY;CACZ,MAAM;CACN,OAAO;CACP,QAAQ;CACR,UAAU;AACZ;AAEA,SAAgB,eAAe,EAC7B,UACA,QACA,cACA,QACA,SACA,UACA,kBAAkB,MAClB,kBACA,QACA,WAAW,OACX,aACsB;CACtB,MAAM,CAAC,eAAe,oBACpB,SAA0B,eAAe;CAC3C,MAAM,UAAU,YAAY;CAC5B,MAAM,OAAO;EAAE,GAAG;EAAgB,GAAG;CAAO;CAC5C,MAAM,UAAU,aAAa,KAAA,KAAa,WAAW,KAAA;CACrD,MAAM,UAAU,qBAAqB,KAAA;CAErC,MAAM,QAAQ,UAA0C;EACtD,IAAI,UAAU;EACd,MAAM,OAAO,YAAY,QAAQ,OAAO;EACxC,IAAI,aAAa,KAAA,GAAW,iBAAiB,IAAI;EACjD,mBAAmB,IAAI;CACzB;CAEA,OACE,qBAAC,OAAD;EACE,WAAW,GAAG,uBAAuB,SAAS;EAC9C,MAAK;EACL,cAAY,KAAK;EACjB,iBAAe,YAAY,KAAA;EAJ7B,UAAA;GAMG,UACC,oBAAC,YAAD;IACE,WAAU;IACV,MAAM;IACN,OAAO,KAAK;IACZ,aAAa,KAAK;IAClB,MAAK;IACL,SAAQ;IACE;IACV,UAAU;GACX,CAAA,IACC;GACH,eACC,oBAAC,YAAD;IACE,MAAK;IACL,SAAQ;IACR,OAAO,KAAK;IACF;IACV,SAAS;IACT,MAAM,oBAAC,qBAAD;KAAqB,MAAM;KAAI,eAAY;IAAQ,CAAA;GAC1D,CAAA,IACC;GACH,SACC,oBAAC,YAAD;IACE,MAAK;IACL,SAAQ;IACR,OAAO,KAAK;IACF;IACV,SAAS;IACT,MAAM,oBAAC,kBAAD;KAAkB,MAAM;KAAI,eAAY;IAAQ,CAAA;GACvD,CAAA,IACC;GACH,UACC,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,YAAD;IACE,WAAU;IACV,MAAK;IACL,SAAQ;IACR,OAAO,KAAK;IACZ,gBAAc,YAAY;IAC1B,eAAa,YAAY,QAAQ,KAAA;IACvB;IACV,eAAe,KAAK,IAAI;IACxB,MAAM,oBAAC,cAAD;KAAc,MAAM;KAAI,eAAY;IAAQ,CAAA;GACnD,CAAA,GACD,oBAAC,YAAD;IACE,WAAU;IACV,MAAK;IACL,SAAQ;IACR,OAAO,KAAK;IACZ,gBAAc,YAAY;IAC1B,eAAa,YAAY,UAAU,KAAA;IACzB;IACV,eAAe,KAAK,MAAM;IAC1B,MAAM,oBAAC,gBAAD;KAAgB,MAAM;KAAI,eAAY;IAAQ,CAAA;GACrD,CAAA,CACD,EAAA,CAAA,IACA;GACH,UACC,oBAAC,YAAD;IACE,MAAK;IACL,SAAQ;IACR,OAAO,KAAK;IACF;IACV,SAAS;IACT,MAAM,oBAAC,kBAAD;KAAkB,MAAM;KAAI,eAAY;IAAQ,CAAA;GACvD,CAAA,IACC;EACD;;AAET"}
@@ -0,0 +1,21 @@
1
+ import { n as ControlSize } from "./control-Cgma3uYI.js";
2
+ import { HTMLAttributes } from "react";
3
+ //#region src/atoms/Meter/index.d.ts
4
+ export type MeterTone = "accent" | "success" | "warning" | "danger";
5
+ export type MeterProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
6
+ /** Current amount, clamped into min..max. */
7
+ value: number;
8
+ min?: number;
9
+ max?: number;
10
+ /** Accessible name, such as Storage used. */
11
+ label: string;
12
+ /** Read instead of the percentage, such as 7.2 of 10 GB. */
13
+ valueText?: string;
14
+ size?: ControlSize;
15
+ tone?: MeterTone;
16
+ };
17
+ /** Share of the range as a 0–100 percentage, for hosts that draw their own. */
18
+ export declare function meterPercent(value: number, min?: number, max?: number): number;
19
+ export declare function Meter({ value, min, max, label, valueText, size, tone, className, ...props }: MeterProps): import("react").JSX.Element;
20
+ //#endregion
21
+ //# sourceMappingURL=meter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meter.d.ts","names":[],"sources":["../src/atoms/Meter/index.tsx"],"mappings":";;;YAKY;YAEA,aAAa,KAAK,eAAe;;EAE3C;EACA;EACA;;EAEA;;EAEA;EACA,OAAO;EACP,OAAO;;;wBAIO,aAAa,eAAe,cAAS;wBASrC,QACd,OACA,KACA,KACA,OACA,WACA,MACA,MACA,cACG,SACF,6BAAU,IAAA"}
package/dist/meter.js ADDED
@@ -0,0 +1,42 @@
1
+ import { t as cn } from "./cn-M4U2-Tak.js";
2
+ import { t as node } from "./node-Dr67KnBr.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/atoms/Meter/index.tsx
5
+ /** Share of the range as a 0–100 percentage, for hosts that draw their own. */
6
+ function meterPercent(value, min = 0, max = 100) {
7
+ if (!Number.isFinite(value)) return 0;
8
+ const low = Math.min(min, max);
9
+ const span = Math.max(min, max) - low;
10
+ if (!Number.isFinite(span) || span === 0) return 0;
11
+ return Math.min(100, Math.max(0, (value - low) / span * 100));
12
+ }
13
+ function Meter({ value, min = 0, max = 100, label, valueText, size = "md", tone = "accent", className, ...props }) {
14
+ const low = Math.min(min, max);
15
+ const high = Math.max(min, max);
16
+ const amount = Number.isFinite(value) ? value : low;
17
+ const clamped = Math.min(Math.max(amount, low), high);
18
+ const percent = meterPercent(amount, low, high);
19
+ return /* @__PURE__ */ jsx("div", {
20
+ ...node(props),
21
+ className: cn("sph-meter", className),
22
+ "data-size": size,
23
+ "data-tone": tone,
24
+ role: "meter",
25
+ "aria-label": label,
26
+ "aria-valuemin": low,
27
+ "aria-valuemax": high,
28
+ "aria-valuenow": clamped,
29
+ "aria-valuetext": valueText ?? `${Math.round(percent)}%`,
30
+ children: /* @__PURE__ */ jsx("span", {
31
+ className: "sph-meter__track",
32
+ children: /* @__PURE__ */ jsx("span", {
33
+ className: "sph-meter__fill",
34
+ style: { "--sph-meter-value": `${percent}%` }
35
+ })
36
+ })
37
+ });
38
+ }
39
+ //#endregion
40
+ export { Meter, meterPercent };
41
+
42
+ //# sourceMappingURL=meter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meter.js","names":[],"sources":["../src/atoms/Meter/index.tsx"],"sourcesContent":["import { cn } from \"@/lib/cn.js\";\nimport type { CSSProperties, HTMLAttributes } from \"react\";\nimport { node } from \"@/lib/node.js\";\nimport type { ControlSize } from \"../../lib/control\";\n\nexport type MeterTone = \"accent\" | \"success\" | \"warning\" | \"danger\";\n\nexport type MeterProps = Omit<HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** Current amount, clamped into min..max. */\n value: number;\n min?: number;\n max?: number;\n /** Accessible name, such as Storage used. */\n label: string;\n /** Read instead of the percentage, such as 7.2 of 10 GB. */\n valueText?: string;\n size?: ControlSize;\n tone?: MeterTone;\n};\n\n/** Share of the range as a 0–100 percentage, for hosts that draw their own. */\nexport function meterPercent(value: number, min = 0, max = 100): number {\n if (!Number.isFinite(value)) return 0;\n const low = Math.min(min, max);\n const high = Math.max(min, max);\n const span = high - low;\n if (!Number.isFinite(span) || span === 0) return 0;\n return Math.min(100, Math.max(0, ((value - low) / span) * 100));\n}\n\nexport function Meter({\n value,\n min = 0,\n max = 100,\n label,\n valueText,\n size = \"md\",\n tone = \"accent\",\n className,\n ...props\n}: MeterProps) {\n const low = Math.min(min, max);\n const high = Math.max(min, max);\n const amount = Number.isFinite(value) ? value : low;\n const clamped = Math.min(Math.max(amount, low), high);\n const percent = meterPercent(amount, low, high);\n\n return (\n <div\n {...node(props)}\n className={cn(\"sph-meter\", className)}\n data-size={size}\n data-tone={tone}\n role=\"meter\"\n aria-label={label}\n aria-valuemin={low}\n aria-valuemax={high}\n aria-valuenow={clamped}\n aria-valuetext={valueText ?? `${Math.round(percent)}%`}\n >\n <span className=\"sph-meter__track\">\n <span\n className=\"sph-meter__fill\"\n style={\n { \"--sph-meter-value\": `${percent}%` } as CSSProperties &\n Record<string, string>\n }\n />\n </span>\n </div>\n );\n}\n"],"mappings":";;;;;AAqBA,SAAgB,aAAa,OAAe,MAAM,GAAG,MAAM,KAAa;CACtE,IAAI,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CACpC,MAAM,MAAM,KAAK,IAAI,KAAK,GAAG;CAE7B,MAAM,OADO,KAAK,IAAI,KAAK,GACX,IAAI;CACpB,IAAI,CAAC,OAAO,SAAS,IAAI,KAAK,SAAS,GAAG,OAAO;CACjD,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,IAAK,QAAQ,OAAO,OAAQ,GAAG,CAAC;AAChE;AAEA,SAAgB,MAAM,EACpB,OACA,MAAM,GACN,MAAM,KACN,OACA,WACA,OAAO,MACP,OAAO,UACP,WACA,GAAG,SACU;CACb,MAAM,MAAM,KAAK,IAAI,KAAK,GAAG;CAC7B,MAAM,OAAO,KAAK,IAAI,KAAK,GAAG;CAC9B,MAAM,SAAS,OAAO,SAAS,KAAK,IAAI,QAAQ;CAChD,MAAM,UAAU,KAAK,IAAI,KAAK,IAAI,QAAQ,GAAG,GAAG,IAAI;CACpD,MAAM,UAAU,aAAa,QAAQ,KAAK,IAAI;CAE9C,OACE,oBAAC,OAAD;EACE,GAAI,KAAK,KAAK;EACd,WAAW,GAAG,aAAa,SAAS;EACpC,aAAW;EACX,aAAW;EACX,MAAK;EACL,cAAY;EACZ,iBAAe;EACf,iBAAe;EACf,iBAAe;EACf,kBAAgB,aAAa,GAAG,KAAK,MAAM,OAAO,EAAE;EAEpD,UAAA,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,QAAD;IACE,WAAU;IACV,OACE,EAAE,qBAAqB,GAAG,QAAQ,GAAG;GAGxC,CAAA;EACG,CAAA;CACH,CAAA;AAET"}
@@ -0,0 +1,29 @@
1
+ import { t as Renderable } from "./node-CcE0pv56.js";
2
+ import { HTMLAttributes } from "react";
3
+ //#region src/molecules/MetricCard/index.d.ts
4
+ export type MetricCardTone = "accent" | "success" | "danger" | "muted";
5
+ export type MetricCardProps = Omit<HTMLAttributes<HTMLElement>, "children"> & {
6
+ label: Renderable;
7
+ value: Renderable;
8
+ delta?: number;
9
+ deltaLabel?: Renderable;
10
+ deltaFormat?: (value: number) => string;
11
+ trend?: number[];
12
+ trendLabel?: string;
13
+ trendVariant?: "line" | "area" | "bar";
14
+ tone?: MetricCardTone;
15
+ icon?: Renderable;
16
+ footer?: Renderable;
17
+ /** Fade and rise the card body on mount. Default true. */
18
+ animate?: boolean;
19
+ /** Replay the body entrance for a new data revision. */
20
+ animationKey?: string | number;
21
+ };
22
+ /**
23
+ * A compact KPI card: label, headline value, delta and an optional
24
+ * sparkline. Use it for dashboards that need several small trends without
25
+ * a full Chart per metric.
26
+ */
27
+ export declare function MetricCard({ label, value, delta, deltaLabel, deltaFormat, trend, trendLabel, trendVariant, tone, icon, footer, animate, animationKey, className, ...props }: MetricCardProps): import("react").JSX.Element;
28
+ //#endregion
29
+ //# sourceMappingURL=metric-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metric-card.d.ts","names":[],"sources":["../src/molecules/MetricCard/index.tsx"],"mappings":";;;YAMY;YAEA,kBAAkB,KAAK,eAAe;EAChD,OAAO;EACP,OAAO;EACP;EACA,aAAa;EACb,eAAe;EACf;EACA;EACA;EACA,OAAO;EACP,OAAO;EACP,SAAS;;EAET;;EAEA;;;;;;;wBAQc,aACd,OACA,OACA,OACA,YACA,aACA,OACA,YACA,cACA,MACA,MACA,QACA,SACA,cACA,cACG,SACF,kCAAe,IAAA"}