@devalok/shilp-sutra 0.38.0 → 0.40.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 (361) hide show
  1. package/AGENTS.md +151 -0
  2. package/MIGRATION.md +255 -0
  3. package/README.md +3 -0
  4. package/dist/_chunks/badge-group.js +76 -75
  5. package/dist/_chunks/badge-group.js.map +1 -1
  6. package/dist/_chunks/chart-container.js +50 -0
  7. package/dist/_chunks/chart-container.js.map +1 -0
  8. package/dist/_chunks/chat.js +236 -228
  9. package/dist/_chunks/chat.js.map +1 -1
  10. package/dist/_chunks/colors.js +30 -0
  11. package/dist/_chunks/colors.js.map +1 -0
  12. package/dist/_chunks/document-preview.js +2 -2
  13. package/dist/_chunks/document-preview.js.map +1 -1
  14. package/dist/_chunks/emoji-data.js +45 -0
  15. package/dist/_chunks/emoji-data.js.map +1 -0
  16. package/dist/_chunks/grid-lines.js +72 -0
  17. package/dist/_chunks/grid-lines.js.map +1 -0
  18. package/dist/_chunks/image-preview.js +2 -2
  19. package/dist/_chunks/image-preview.js.map +1 -1
  20. package/dist/_chunks/mention-suggestion.js +35 -263
  21. package/dist/_chunks/mention-suggestion.js.map +1 -1
  22. package/dist/_chunks/normalize-icon.js +18 -0
  23. package/dist/_chunks/normalize-icon.js.map +1 -0
  24. package/dist/_chunks/oauth-button.js +227 -0
  25. package/dist/_chunks/oauth-button.js.map +1 -0
  26. package/dist/_chunks/popover.js +3 -3
  27. package/dist/_chunks/popover.js.map +1 -1
  28. package/dist/_chunks/primitives.js +107 -107
  29. package/dist/_chunks/primitives.js.map +1 -1
  30. package/dist/_chunks/shared.js +5 -5
  31. package/dist/_chunks/shared.js.map +1 -1
  32. package/dist/_chunks/{text.js → success.js} +26 -63
  33. package/dist/_chunks/success.js.map +1 -0
  34. package/dist/_chunks/tiptap.js +1952 -1949
  35. package/dist/_chunks/tiptap.js.map +1 -1
  36. package/dist/_chunks/tooltip.js +58 -0
  37. package/dist/_chunks/tooltip.js.map +1 -0
  38. package/dist/_chunks/tree-view.js +101 -96
  39. package/dist/_chunks/tree-view.js.map +1 -1
  40. package/dist/_chunks/use-calendar.js +5 -5
  41. package/dist/_chunks/use-calendar.js.map +1 -1
  42. package/dist/ai/ai-command-provider.d.ts +3 -2
  43. package/dist/ai/ai-command-provider.d.ts.map +1 -1
  44. package/dist/ai/ai-command-provider.js.map +1 -1
  45. package/dist/ai/block-renderer.js +11 -9
  46. package/dist/ai/block-renderer.js.map +1 -1
  47. package/dist/ai/blocks/error.js +31 -0
  48. package/dist/ai/blocks/error.js.map +1 -0
  49. package/dist/ai/blocks/index.d.ts +0 -2
  50. package/dist/ai/blocks/index.d.ts.map +1 -1
  51. package/dist/ai/blocks/index.js +2 -2
  52. package/dist/ai/blocks/text.js +19 -0
  53. package/dist/ai/blocks/text.js.map +1 -0
  54. package/dist/ai/command-bar.d.ts.map +1 -1
  55. package/dist/ai/command-bar.js +198 -193
  56. package/dist/ai/command-bar.js.map +1 -1
  57. package/dist/ai/conversation.d.ts +2 -1
  58. package/dist/ai/conversation.d.ts.map +1 -1
  59. package/dist/ai/conversation.js +92 -87
  60. package/dist/ai/conversation.js.map +1 -1
  61. package/dist/ai/index.d.ts +0 -4
  62. package/dist/ai/index.d.ts.map +1 -1
  63. package/dist/ai/index.js +45 -46
  64. package/dist/ai/index.js.map +1 -1
  65. package/dist/composed/activity-feed.d.ts +2 -1
  66. package/dist/composed/activity-feed.d.ts.map +1 -1
  67. package/dist/composed/activity-feed.js +5 -5
  68. package/dist/composed/activity-feed.js.map +1 -1
  69. package/dist/composed/avatar-group.js +4 -4
  70. package/dist/composed/avatar-group.js.map +1 -1
  71. package/dist/composed/bulk-action-bar.d.ts +2 -2
  72. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  73. package/dist/composed/bulk-action-bar.js +12 -12
  74. package/dist/composed/bulk-action-bar.js.map +1 -1
  75. package/dist/composed/command-palette.d.ts +2 -1
  76. package/dist/composed/command-palette.d.ts.map +1 -1
  77. package/dist/composed/command-palette.js +106 -101
  78. package/dist/composed/command-palette.js.map +1 -1
  79. package/dist/composed/content-card.js +1 -1
  80. package/dist/composed/content-card.js.map +1 -1
  81. package/dist/composed/date-picker/index.js +747 -3
  82. package/dist/composed/date-picker/index.js.map +1 -0
  83. package/dist/composed/emoji-picker.js +4 -4
  84. package/dist/composed/emoji-picker.js.map +1 -1
  85. package/dist/composed/empty-state.d.ts +3 -3
  86. package/dist/composed/empty-state.d.ts.map +1 -1
  87. package/dist/composed/empty-state.js +40 -31
  88. package/dist/composed/empty-state.js.map +1 -1
  89. package/dist/composed/error-boundary.js +3 -3
  90. package/dist/composed/error-boundary.js.map +1 -1
  91. package/dist/composed/extensions/emoji-node.js +81 -0
  92. package/dist/composed/extensions/emoji-node.js.map +1 -0
  93. package/dist/composed/extensions/emoji-suggestion.js +117 -0
  94. package/dist/composed/extensions/emoji-suggestion.js.map +1 -0
  95. package/dist/composed/file-preview.js +498 -2
  96. package/dist/composed/file-preview.js.map +1 -0
  97. package/dist/composed/filter-bar.js +1 -1
  98. package/dist/composed/filter-bar.js.map +1 -1
  99. package/dist/composed/index.d.ts +0 -15
  100. package/dist/composed/index.d.ts.map +1 -1
  101. package/dist/composed/index.js +16 -24
  102. package/dist/composed/inline-edit.js +1 -1
  103. package/dist/composed/inline-edit.js.map +1 -1
  104. package/dist/composed/loading-skeleton.js +9 -9
  105. package/dist/composed/loading-skeleton.js.map +1 -1
  106. package/dist/composed/markdown-viewer.js +3 -3
  107. package/dist/composed/markdown-viewer.js.map +1 -1
  108. package/dist/composed/multi-select-popover.js +1 -1
  109. package/dist/composed/multi-select-popover.js.map +1 -1
  110. package/dist/composed/page-header.js +1 -1
  111. package/dist/composed/page-header.js.map +1 -1
  112. package/dist/composed/page-skeletons.js +15 -15
  113. package/dist/composed/page-skeletons.js.map +1 -1
  114. package/dist/composed/priority-indicator.js +3 -3
  115. package/dist/composed/priority-indicator.js.map +1 -1
  116. package/dist/composed/rich-chat-input.js +2073 -2
  117. package/dist/composed/rich-chat-input.js.map +1 -0
  118. package/dist/composed/rich-text-editor.js +75 -72
  119. package/dist/composed/rich-text-editor.js.map +1 -1
  120. package/dist/composed/schedule-view.js +3 -3
  121. package/dist/composed/schedule-view.js.map +1 -1
  122. package/dist/composed/status-badge.d.ts +3 -2
  123. package/dist/composed/status-badge.d.ts.map +1 -1
  124. package/dist/composed/status-badge.js +58 -53
  125. package/dist/composed/status-badge.js.map +1 -1
  126. package/dist/shell/app-command-palette.d.ts +2 -1
  127. package/dist/shell/app-command-palette.d.ts.map +1 -1
  128. package/dist/shell/app-command-palette.js.map +1 -1
  129. package/dist/shell/bottom-navbar.d.ts +3 -1
  130. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  131. package/dist/shell/bottom-navbar.js +94 -86
  132. package/dist/shell/bottom-navbar.js.map +1 -1
  133. package/dist/shell/command-registry.d.ts +2 -1
  134. package/dist/shell/command-registry.d.ts.map +1 -1
  135. package/dist/shell/command-registry.js.map +1 -1
  136. package/dist/shell/notification-center.js +8 -8
  137. package/dist/shell/notification-center.js.map +1 -1
  138. package/dist/shell/notification-preferences.js +1 -1
  139. package/dist/shell/notification-preferences.js.map +1 -1
  140. package/dist/shell/sidebar.d.ts +7 -4
  141. package/dist/shell/sidebar.d.ts.map +1 -1
  142. package/dist/shell/sidebar.js +148 -134
  143. package/dist/shell/sidebar.js.map +1 -1
  144. package/dist/shell/top-bar.d.ts +4 -3
  145. package/dist/shell/top-bar.d.ts.map +1 -1
  146. package/dist/shell/top-bar.js +116 -108
  147. package/dist/shell/top-bar.js.map +1 -1
  148. package/dist/tokens/semantic.css +82 -9
  149. package/dist/ui/accordion.js +1 -1
  150. package/dist/ui/accordion.js.map +1 -1
  151. package/dist/ui/alert-dialog.js +3 -3
  152. package/dist/ui/alert-dialog.js.map +1 -1
  153. package/dist/ui/alert.js +2 -2
  154. package/dist/ui/alert.js.map +1 -1
  155. package/dist/ui/autocomplete.js +2 -2
  156. package/dist/ui/autocomplete.js.map +1 -1
  157. package/dist/ui/avatar.js +11 -11
  158. package/dist/ui/avatar.js.map +1 -1
  159. package/dist/ui/badge-indicator.js +1 -1
  160. package/dist/ui/badge-indicator.js.map +1 -1
  161. package/dist/ui/badge.d.ts +3 -2
  162. package/dist/ui/badge.d.ts.map +1 -1
  163. package/dist/ui/banner.js +1 -1
  164. package/dist/ui/banner.js.map +1 -1
  165. package/dist/ui/breadcrumb.js +1 -1
  166. package/dist/ui/breadcrumb.js.map +1 -1
  167. package/dist/ui/button.d.ts +5 -4
  168. package/dist/ui/button.d.ts.map +1 -1
  169. package/dist/ui/button.js +66 -65
  170. package/dist/ui/button.js.map +1 -1
  171. package/dist/ui/card.js +5 -5
  172. package/dist/ui/card.js.map +1 -1
  173. package/dist/ui/charts/area-chart.js +177 -0
  174. package/dist/ui/charts/area-chart.js.map +1 -0
  175. package/dist/ui/charts/bar-chart.js +127 -0
  176. package/dist/ui/charts/bar-chart.js.map +1 -0
  177. package/dist/ui/charts/chart-container.js +3 -0
  178. package/dist/ui/charts/gauge-chart.js +72 -0
  179. package/dist/ui/charts/gauge-chart.js.map +1 -0
  180. package/dist/ui/charts/index.js +10 -1035
  181. package/dist/ui/charts/line-chart.js +135 -0
  182. package/dist/ui/charts/line-chart.js.map +1 -0
  183. package/dist/ui/charts/pie-chart.js +111 -0
  184. package/dist/ui/charts/pie-chart.js.map +1 -0
  185. package/dist/ui/charts/radar-chart.js +170 -0
  186. package/dist/ui/charts/radar-chart.js.map +1 -0
  187. package/dist/ui/charts/sparkline.js +119 -0
  188. package/dist/ui/charts/sparkline.js.map +1 -0
  189. package/dist/ui/chat/message.d.ts +3 -3
  190. package/dist/ui/chat/message.d.ts.map +1 -1
  191. package/dist/ui/chat/system-message.d.ts +2 -1
  192. package/dist/ui/chat/system-message.d.ts.map +1 -1
  193. package/dist/ui/checkbox.js +1 -1
  194. package/dist/ui/checkbox.js.map +1 -1
  195. package/dist/ui/code.js +2 -2
  196. package/dist/ui/code.js.map +1 -1
  197. package/dist/ui/color-input.js +10 -10
  198. package/dist/ui/color-input.js.map +1 -1
  199. package/dist/ui/color-swatch.js +3 -3
  200. package/dist/ui/color-swatch.js.map +1 -1
  201. package/dist/ui/combobox.d.ts +2 -1
  202. package/dist/ui/combobox.d.ts.map +1 -1
  203. package/dist/ui/combobox.js +100 -95
  204. package/dist/ui/combobox.js.map +1 -1
  205. package/dist/ui/container.d.ts +6 -1
  206. package/dist/ui/container.d.ts.map +1 -1
  207. package/dist/ui/container.js +2 -1
  208. package/dist/ui/container.js.map +1 -1
  209. package/dist/ui/context-menu.js +6 -6
  210. package/dist/ui/context-menu.js.map +1 -1
  211. package/dist/ui/data-table-body.js +1 -1
  212. package/dist/ui/data-table-body.js.map +1 -1
  213. package/dist/ui/data-table-bulk-actions.js +2 -2
  214. package/dist/ui/data-table-bulk-actions.js.map +1 -1
  215. package/dist/ui/data-table-card.js +2 -2
  216. package/dist/ui/data-table-card.js.map +1 -1
  217. package/dist/ui/data-table-header.js +2 -2
  218. package/dist/ui/data-table-header.js.map +1 -1
  219. package/dist/ui/data-table-pagination.js +3 -3
  220. package/dist/ui/data-table-pagination.js.map +1 -1
  221. package/dist/ui/data-table-toolbar.js +1 -1
  222. package/dist/ui/data-table-toolbar.js.map +1 -1
  223. package/dist/ui/data-table.js +1 -1
  224. package/dist/ui/data-table.js.map +1 -1
  225. package/dist/ui/devalok-grain.d.ts +1 -1
  226. package/dist/ui/devalok-grain.js.map +1 -1
  227. package/dist/ui/dialog.js +2 -2
  228. package/dist/ui/dialog.js.map +1 -1
  229. package/dist/ui/dropdown-menu.js +6 -6
  230. package/dist/ui/dropdown-menu.js.map +1 -1
  231. package/dist/ui/file-upload.js +4 -4
  232. package/dist/ui/file-upload.js.map +1 -1
  233. package/dist/ui/hover-card.js +1 -1
  234. package/dist/ui/hover-card.js.map +1 -1
  235. package/dist/ui/icon-button.d.ts +9 -2
  236. package/dist/ui/icon-button.d.ts.map +1 -1
  237. package/dist/ui/icon-button.js +14 -13
  238. package/dist/ui/icon-button.js.map +1 -1
  239. package/dist/ui/index.d.ts +1 -3
  240. package/dist/ui/index.d.ts.map +1 -1
  241. package/dist/ui/index.js +31 -33
  242. package/dist/ui/index.js.map +1 -1
  243. package/dist/ui/input-otp.js +1 -1
  244. package/dist/ui/input-otp.js.map +1 -1
  245. package/dist/ui/input.js +2 -2
  246. package/dist/ui/input.js.map +1 -1
  247. package/dist/ui/lib/icon-input.d.ts +42 -0
  248. package/dist/ui/lib/icon-input.d.ts.map +1 -0
  249. package/dist/ui/lib/normalize-icon.d.ts +39 -0
  250. package/dist/ui/lib/normalize-icon.d.ts.map +1 -0
  251. package/dist/ui/link.js +1 -1
  252. package/dist/ui/link.js.map +1 -1
  253. package/dist/ui/menubar.js +8 -8
  254. package/dist/ui/menubar.js.map +1 -1
  255. package/dist/ui/navigation-menu.js +3 -3
  256. package/dist/ui/navigation-menu.js.map +1 -1
  257. package/dist/ui/number-input.js +3 -3
  258. package/dist/ui/number-input.js.map +1 -1
  259. package/dist/ui/oauth-button/index.d.ts +3 -0
  260. package/dist/ui/oauth-button/index.d.ts.map +1 -0
  261. package/dist/ui/oauth-button/index.js +3 -0
  262. package/dist/ui/oauth-button/oauth-button.d.ts +208 -0
  263. package/dist/ui/oauth-button/oauth-button.d.ts.map +1 -0
  264. package/dist/ui/pagination.js +1 -1
  265. package/dist/ui/pagination.js.map +1 -1
  266. package/dist/ui/progress.js +2 -2
  267. package/dist/ui/progress.js.map +1 -1
  268. package/dist/ui/radio.js +1 -1
  269. package/dist/ui/radio.js.map +1 -1
  270. package/dist/ui/segmented-control.d.ts +3 -4
  271. package/dist/ui/segmented-control.d.ts.map +1 -1
  272. package/dist/ui/segmented-control.js +53 -45
  273. package/dist/ui/segmented-control.js.map +1 -1
  274. package/dist/ui/select.js +3 -3
  275. package/dist/ui/select.js.map +1 -1
  276. package/dist/ui/sheet.js +2 -2
  277. package/dist/ui/sheet.js.map +1 -1
  278. package/dist/ui/sidebar.js +11 -11
  279. package/dist/ui/sidebar.js.map +1 -1
  280. package/dist/ui/skeleton.js +9 -9
  281. package/dist/ui/skeleton.js.map +1 -1
  282. package/dist/ui/slider.js +2 -2
  283. package/dist/ui/slider.js.map +1 -1
  284. package/dist/ui/split-button.js +7 -7
  285. package/dist/ui/split-button.js.map +1 -1
  286. package/dist/ui/stack.d.ts +6 -1
  287. package/dist/ui/stack.d.ts.map +1 -1
  288. package/dist/ui/stack.js +2 -1
  289. package/dist/ui/stack.js.map +1 -1
  290. package/dist/ui/stat-card.d.ts +2 -3
  291. package/dist/ui/stat-card.d.ts.map +1 -1
  292. package/dist/ui/stat-card.js +118 -116
  293. package/dist/ui/stat-card.js.map +1 -1
  294. package/dist/ui/status-dot.js +2 -2
  295. package/dist/ui/status-dot.js.map +1 -1
  296. package/dist/ui/stepper.d.ts +2 -1
  297. package/dist/ui/stepper.d.ts.map +1 -1
  298. package/dist/ui/stepper.js +74 -69
  299. package/dist/ui/stepper.js.map +1 -1
  300. package/dist/ui/switch.js +2 -2
  301. package/dist/ui/switch.js.map +1 -1
  302. package/dist/ui/tabs.js +3 -3
  303. package/dist/ui/tabs.js.map +1 -1
  304. package/dist/ui/text.d.ts +7 -2
  305. package/dist/ui/text.d.ts.map +1 -1
  306. package/dist/ui/text.js +2 -1
  307. package/dist/ui/text.js.map +1 -1
  308. package/dist/ui/textarea.js +1 -1
  309. package/dist/ui/textarea.js.map +1 -1
  310. package/dist/ui/toast.js +8 -8
  311. package/dist/ui/toast.js.map +1 -1
  312. package/dist/ui/toaster.d.ts +11 -2
  313. package/dist/ui/toaster.d.ts.map +1 -1
  314. package/dist/ui/toaster.js.map +1 -1
  315. package/dist/ui/toggle.js +1 -1
  316. package/dist/ui/toggle.js.map +1 -1
  317. package/dist/ui/tooltip.js +12 -12
  318. package/dist/ui/tooltip.js.map +1 -1
  319. package/dist/ui/tree-view/tree-item.d.ts +3 -2
  320. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  321. package/dist/ui/tree-view/use-tree.d.ts +2 -1
  322. package/dist/ui/tree-view/use-tree.d.ts.map +1 -1
  323. package/docs/components/_header.md +90 -1
  324. package/docs/components/ui/oauth-button.md +86 -0
  325. package/docs/recipes/customize-brand.md +100 -4
  326. package/docs/recipes/index.md +5 -1
  327. package/docs/recipes/install-astro.md +15 -0
  328. package/docs/recipes/install-next-app-router.md +21 -5
  329. package/docs/recipes/install-next-pages.md +2 -0
  330. package/docs/recipes/install-remix.md +15 -0
  331. package/docs/recipes/install-tanstack-start.md +15 -0
  332. package/docs/recipes/install-vite.md +15 -0
  333. package/docs/recipes/troubleshoot.md +22 -0
  334. package/llms-full.txt +177 -2
  335. package/llms-quick.txt +247 -0
  336. package/llms.txt +116 -3
  337. package/package.json +80 -2
  338. package/scripts/welcome.mjs +219 -0
  339. package/skill/README.md +99 -0
  340. package/skill/SKILL.md +163 -0
  341. package/skill/install.sh +59 -0
  342. package/skill/references/components-full.md +7083 -0
  343. package/skill/references/components.md +778 -0
  344. package/skill/references/customize-brand.md +314 -0
  345. package/skill/references/server-components.md +211 -0
  346. package/skill/references/setup-astro.md +195 -0
  347. package/skill/references/setup-next-app-router.md +248 -0
  348. package/skill/references/setup-next-pages.md +127 -0
  349. package/skill/references/setup-remix.md +188 -0
  350. package/skill/references/setup-tanstack-start.md +160 -0
  351. package/skill/references/setup-vite.md +187 -0
  352. package/skill/references/troubleshoot.md +241 -0
  353. package/dist/_chunks/date-picker.js +0 -748
  354. package/dist/_chunks/date-picker.js.map +0 -1
  355. package/dist/_chunks/file-preview.js +0 -499
  356. package/dist/_chunks/file-preview.js.map +0 -1
  357. package/dist/_chunks/rich-chat-input.js +0 -2071
  358. package/dist/_chunks/rich-chat-input.js.map +0 -1
  359. package/dist/_chunks/text.js.map +0 -1
  360. package/dist/ui/charts/index.js.map +0 -1
  361. /package/{LICENSE → skill/LICENSE} +0 -0
@@ -1,62 +1,64 @@
1
1
  "use client";
2
- import { motionProps as e, springs as t, tweens as n } from "../ui/lib/motion.js";
3
- import { cn as r } from "../ui/lib/utils.js";
4
- import { Spinner as i } from "../ui/spinner.js";
5
- import { Icon as a } from "../ui/icon.js";
6
- import { Avatar as o, AvatarFallback as s, AvatarImage as c } from "../ui/avatar.js";
7
- import { Button as l } from "../ui/button.js";
8
- import { Tooltip as u, TooltipContent as d, TooltipTrigger as f } from "../ui/tooltip.js";
9
- import * as p from "react";
10
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
11
- import { IconAlertCircle as g, IconSend as _, IconSquare as v, IconTrash as y } from "@tabler/icons-react";
12
- import { AnimatePresence as b, motion as x } from "framer-motion";
2
+ import { IconProvider as e } from "../ui/icon-context.js";
3
+ import { motionProps as t, springs as n, tweens as r } from "../ui/lib/motion.js";
4
+ import { cn as i } from "../ui/lib/utils.js";
5
+ import { Spinner as a } from "../ui/spinner.js";
6
+ import { Icon as o } from "../ui/icon.js";
7
+ import { Avatar as s, AvatarFallback as c, AvatarImage as l } from "../ui/avatar.js";
8
+ import { t as u } from "./normalize-icon.js";
9
+ import { Button as d } from "../ui/button.js";
10
+ import { Tooltip as f, TooltipContent as p, TooltipTrigger as m } from "../ui/tooltip.js";
11
+ import * as h from "react";
12
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
+ import { IconAlertCircle as v, IconSend as y, IconSquare as b, IconTrash as x } from "@tabler/icons-react";
14
+ import { AnimatePresence as S, motion as C } from "framer-motion";
13
15
  //#region src/ui/chat/date-separator.tsx
14
- function S(e) {
16
+ function w(e) {
15
17
  let t = /* @__PURE__ */ new Date(), n = new Date(t.getFullYear(), t.getMonth(), t.getDate()), r = new Date(e.getFullYear(), e.getMonth(), e.getDate()), i = n.getTime() - r.getTime(), a = Math.round(i / (1e3 * 60 * 60 * 24));
16
18
  if (a === 0) return "Today";
17
19
  if (a === 1) return "Yesterday";
18
20
  let o = e.toLocaleString("en-US", { month: "short" }), s = e.getDate();
19
21
  return e.getFullYear() === t.getFullYear() ? `${o} ${s}` : `${o} ${s}, ${e.getFullYear()}`;
20
22
  }
21
- function C({ date: e, format: t, className: n }) {
22
- let i = typeof e == "string" ? new Date(e) : e, a = t ? t(i) : S(i);
23
- return /* @__PURE__ */ h("div", {
24
- className: r("flex items-center gap-ds-03 py-ds-03", n),
23
+ function T({ date: e, format: t, className: n }) {
24
+ let r = typeof e == "string" ? new Date(e) : e, a = t ? t(r) : w(r);
25
+ return /* @__PURE__ */ _("div", {
26
+ className: i("flex items-center gap-ds-03 py-ds-03", n),
25
27
  children: [
26
- /* @__PURE__ */ m("div", { className: "flex-1 border-t border-surface-border-subtle" }),
27
- /* @__PURE__ */ m("span", {
28
+ /* @__PURE__ */ g("div", { className: "flex-1 border-t border-surface-border-subtle" }),
29
+ /* @__PURE__ */ g("span", {
28
30
  className: "text-ds-xs font-medium text-surface-fg-subtle/50 uppercase tracking-wider",
29
31
  children: a
30
32
  }),
31
- /* @__PURE__ */ m("div", { className: "flex-1 border-t border-surface-border-subtle" })
33
+ /* @__PURE__ */ g("div", { className: "flex-1 border-t border-surface-border-subtle" })
32
34
  ]
33
35
  });
34
36
  }
35
- C.displayName = "DateSeparator";
37
+ T.displayName = "DateSeparator";
36
38
  //#endregion
37
39
  //#region src/ui/chat/message.tsx
38
- var w = p.createContext({
40
+ var E = h.createContext({
39
41
  variant: "flat",
40
42
  placement: "start",
41
43
  grouped: !1
42
44
  });
43
- function T() {
44
- return p.useContext(w);
45
+ function D() {
46
+ return h.useContext(E);
45
47
  }
46
- var E = p.forwardRef(({ children: n, variant: i = "flat", placement: o = "start", highlight: s, grouped: c = !1, deleted: l = !1, deletedText: u = "This message was deleted", className: d, ...f }, g) => {
47
- let _ = p.useMemo(() => ({
48
- variant: i,
49
- placement: o,
48
+ var O = h.forwardRef(({ children: e, variant: r = "flat", placement: a = "start", highlight: s, grouped: c = !1, deleted: l = !1, deletedText: u = "This message was deleted", className: d, ...f }, p) => {
49
+ let m = h.useMemo(() => ({
50
+ variant: r,
51
+ placement: a,
50
52
  grouped: c,
51
53
  highlight: s
52
54
  }), [
53
- i,
54
- o,
55
+ r,
56
+ a,
55
57
  c,
56
58
  s
57
59
  ]);
58
- return l ? /* @__PURE__ */ h(x.div, {
59
- ref: g,
60
+ return l ? /* @__PURE__ */ _(C.div, {
61
+ ref: p,
60
62
  initial: {
61
63
  opacity: 0,
62
64
  y: 8
@@ -65,17 +67,17 @@ var E = p.forwardRef(({ children: n, variant: i = "flat", placement: o = "start"
65
67
  opacity: 1,
66
68
  y: 0
67
69
  },
68
- transition: t.snappy,
69
- className: r("flex items-center gap-ds-02 py-ds-02 text-ds-xs text-surface-fg-subtle/50 italic", d),
70
- ...e(f),
71
- children: [/* @__PURE__ */ m(a, {
72
- icon: y,
70
+ transition: n.snappy,
71
+ className: i("flex items-center gap-ds-02 py-ds-02 text-ds-xs text-surface-fg-subtle/50 italic", d),
72
+ ...t(f),
73
+ children: [/* @__PURE__ */ g(o, {
74
+ icon: x,
73
75
  size: "xs"
74
76
  }), u]
75
- }) : i === "bubble" ? /* @__PURE__ */ m(w.Provider, {
76
- value: _,
77
- children: /* @__PURE__ */ m(x.div, {
78
- ref: g,
77
+ }) : r === "bubble" ? /* @__PURE__ */ g(E.Provider, {
78
+ value: m,
79
+ children: /* @__PURE__ */ g(C.div, {
80
+ ref: p,
79
81
  initial: {
80
82
  opacity: 0,
81
83
  y: 8
@@ -84,18 +86,18 @@ var E = p.forwardRef(({ children: n, variant: i = "flat", placement: o = "start"
84
86
  opacity: 1,
85
87
  y: 0
86
88
  },
87
- transition: t.snappy,
88
- className: r("group/message relative flex", o === "end" ? "justify-end" : "justify-start", s === "mention" && "border-l-2 border-l-accent-9 bg-accent-2 pl-ds-03 rounded-ds-sm", s === "internal" && "bg-warning-2/50 rounded-ds-sm", d),
89
- ...e(f),
90
- children: /* @__PURE__ */ m("div", {
91
- className: r("max-w-[85%] rounded-ds-2xl px-ds-04 py-ds-03", o === "end" ? "bg-accent-3 text-surface-fg" : "bg-surface-raised text-surface-fg"),
92
- children: n
89
+ transition: n.snappy,
90
+ className: i("group/message relative flex", a === "end" ? "justify-end" : "justify-start", s === "mention" && "border-l-2 border-l-accent-9 bg-accent-2 pl-ds-03 rounded-control-inner", s === "internal" && "bg-warning-2/50 rounded-control-inner", d),
91
+ ...t(f),
92
+ children: /* @__PURE__ */ g("div", {
93
+ className: i("max-w-[85%] rounded-bubble px-ds-04 py-ds-03", a === "end" ? "bg-accent-3 text-surface-fg" : "bg-surface-raised text-surface-fg"),
94
+ children: e
93
95
  })
94
96
  })
95
- }) : /* @__PURE__ */ m(w.Provider, {
96
- value: _,
97
- children: /* @__PURE__ */ m(x.div, {
98
- ref: g,
97
+ }) : /* @__PURE__ */ g(E.Provider, {
98
+ value: m,
99
+ children: /* @__PURE__ */ g(C.div, {
100
+ ref: p,
99
101
  initial: {
100
102
  opacity: 0,
101
103
  y: 8
@@ -104,194 +106,197 @@ var E = p.forwardRef(({ children: n, variant: i = "flat", placement: o = "start"
104
106
  opacity: 1,
105
107
  y: 0
106
108
  },
107
- transition: t.snappy,
108
- className: r("group/message relative flex gap-ds-04", c && "-mt-ds-01", s === "mention" && "border-l-2 border-l-accent-9 bg-accent-2 pl-ds-03 rounded-ds-sm", s === "internal" && "bg-warning-2/50 rounded-ds-sm", d),
109
- ...e(f),
110
- children: n
109
+ transition: n.snappy,
110
+ className: i("group/message relative flex gap-ds-04", c && "-mt-ds-01", s === "mention" && "border-l-2 border-l-accent-9 bg-accent-2 pl-ds-03 rounded-control-inner", s === "internal" && "bg-warning-2/50 rounded-control-inner", d),
111
+ ...t(f),
112
+ children: e
111
113
  })
112
114
  });
113
115
  });
114
- E.displayName = "Message";
115
- function D({ src: e, fallback: t, icon: n, size: i = "md", children: a }) {
116
- let { grouped: l } = T(), u = i === "sm" ? "w-5" : "w-6";
117
- return l ? /* @__PURE__ */ m("div", { className: r(u, i === "sm" ? "h-5" : "h-6", "shrink-0") }) : a ? /* @__PURE__ */ m("div", {
118
- className: r(u, "shrink-0 flex items-start"),
119
- children: a
120
- }) : n ? /* @__PURE__ */ m("div", {
121
- className: r(u, i === "sm" ? "h-5" : "h-6", "shrink-0 flex items-center justify-center rounded-ds-full bg-surface-raised-hover"),
122
- children: n
123
- }) : /* @__PURE__ */ m("div", {
124
- className: r(u, "shrink-0"),
125
- children: /* @__PURE__ */ h(o, {
126
- size: i === "sm" ? "xs" : "sm",
127
- children: [e && /* @__PURE__ */ m(c, {
128
- src: e,
129
- alt: t ?? ""
130
- }), /* @__PURE__ */ m(s, { children: t ?? "" })]
116
+ O.displayName = "Message";
117
+ function k({ src: t, fallback: n, icon: r, size: a = "md", children: o }) {
118
+ let { grouped: d } = D(), f = a === "sm" ? "w-5" : "w-6";
119
+ return d ? /* @__PURE__ */ g("div", { className: i(f, a === "sm" ? "h-5" : "h-6", "shrink-0") }) : o ? /* @__PURE__ */ g("div", {
120
+ className: i(f, "shrink-0 flex items-start"),
121
+ children: o
122
+ }) : r ? /* @__PURE__ */ g("div", {
123
+ className: i(f, a === "sm" ? "h-5" : "h-6", "shrink-0 flex items-center justify-center rounded-pill bg-surface-raised-hover"),
124
+ children: /* @__PURE__ */ g(e, {
125
+ size: a === "sm" ? "xs" : "sm",
126
+ children: u(r)
127
+ })
128
+ }) : /* @__PURE__ */ g("div", {
129
+ className: i(f, "shrink-0"),
130
+ children: /* @__PURE__ */ _(s, {
131
+ size: a === "sm" ? "xs" : "sm",
132
+ children: [t && /* @__PURE__ */ g(l, {
133
+ src: t,
134
+ alt: n ?? ""
135
+ }), /* @__PURE__ */ g(c, { children: n ?? "" })]
131
136
  })
132
137
  });
133
138
  }
134
- D.displayName = "Message.Avatar";
135
- function O({ children: e, className: t, ...n }) {
136
- return /* @__PURE__ */ m("div", {
137
- className: r("min-w-0 flex-1 flex flex-col gap-ds-02", t),
139
+ k.displayName = "Message.Avatar";
140
+ function A({ children: e, className: t, ...n }) {
141
+ return /* @__PURE__ */ g("div", {
142
+ className: i("min-w-0 flex-1 flex flex-col gap-ds-02", t),
138
143
  ...n,
139
144
  children: e
140
145
  });
141
146
  }
142
- O.displayName = "Message.Content";
143
- function k(e) {
147
+ A.displayName = "Message.Content";
148
+ function j(e) {
144
149
  return e.toLocaleTimeString("en-US", {
145
150
  hour: "numeric",
146
151
  minute: "2-digit"
147
152
  });
148
153
  }
149
- function A({ name: e, badge: t, timestamp: n, formattedTimestamp: r, timestampFormat: i = k }) {
150
- let { grouped: a } = T();
154
+ function M({ name: e, badge: t, timestamp: n, formattedTimestamp: r, timestampFormat: i = j }) {
155
+ let { grouped: a } = D();
151
156
  if (a) return null;
152
157
  let o = r ?? (n ? i(n) : void 0);
153
- return /* @__PURE__ */ h("div", {
158
+ return /* @__PURE__ */ _("div", {
154
159
  className: "flex items-baseline gap-ds-02",
155
160
  children: [
156
- /* @__PURE__ */ m("span", {
161
+ /* @__PURE__ */ g("span", {
157
162
  className: "font-semibold text-[13px] text-surface-fg",
158
163
  children: e
159
164
  }),
160
165
  t,
161
- o && /* @__PURE__ */ m("span", {
166
+ o && /* @__PURE__ */ g("span", {
162
167
  className: "text-[11px] text-surface-fg-subtle/50",
163
168
  children: o
164
169
  })
165
170
  ]
166
171
  });
167
172
  }
168
- A.displayName = "Message.Author";
169
- function j({ children: e, className: t, ...n }) {
170
- return /* @__PURE__ */ m("div", {
171
- className: r("text-[13px] leading-relaxed text-surface-fg whitespace-pre-wrap", t),
173
+ M.displayName = "Message.Author";
174
+ function N({ children: e, className: t, ...n }) {
175
+ return /* @__PURE__ */ g("div", {
176
+ className: i("text-[13px] leading-relaxed text-surface-fg whitespace-pre-wrap", t),
172
177
  ...n,
173
178
  children: e
174
179
  });
175
180
  }
176
- j.displayName = "Message.Body";
177
- function M({ content: e, onSave: t, onCancel: n, canEdit: i = !1, renderContent: a }) {
178
- let [o, s] = p.useState(!1), [c, l] = p.useState(e), u = p.useRef(null);
179
- p.useEffect(() => {
181
+ N.displayName = "Message.Body";
182
+ function P({ content: e, onSave: t, onCancel: n, canEdit: r = !1, renderContent: a }) {
183
+ let [o, s] = h.useState(!1), [c, l] = h.useState(e), u = h.useRef(null);
184
+ h.useEffect(() => {
180
185
  o && u.current && (u.current.focus(), u.current.select());
181
186
  }, [o]);
182
- let d = p.useCallback(() => {
183
- i && (l(e), s(!0));
184
- }, [i, e]), f = p.useCallback(() => {
187
+ let d = h.useCallback(() => {
188
+ r && (l(e), s(!0));
189
+ }, [r, e]), f = h.useCallback(() => {
185
190
  let n = c.trim();
186
191
  n && n !== e && t(n), s(!1);
187
192
  }, [
188
193
  c,
189
194
  e,
190
195
  t
191
- ]), g = p.useCallback(() => {
196
+ ]), p = h.useCallback(() => {
192
197
  s(!1), l(e), n?.();
193
- }, [e, n]), _ = p.useCallback((e) => {
194
- e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), f()) : e.key === "Escape" && (e.preventDefault(), g());
195
- }, [f, g]);
196
- return o ? /* @__PURE__ */ h("div", {
198
+ }, [e, n]), m = h.useCallback((e) => {
199
+ e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), f()) : e.key === "Escape" && (e.preventDefault(), p());
200
+ }, [f, p]);
201
+ return o ? /* @__PURE__ */ _("div", {
197
202
  className: "text-[13px] leading-relaxed",
198
- children: [/* @__PURE__ */ m("textarea", {
203
+ children: [/* @__PURE__ */ g("textarea", {
199
204
  ref: u,
200
205
  value: c,
201
206
  onChange: (e) => l(e.target.value),
202
- onKeyDown: _,
207
+ onKeyDown: m,
203
208
  onBlur: f,
204
- className: "w-full resize-none rounded-ds-sm border border-surface-border-strong bg-surface-raised-hover px-ds-02 py-ds-01 text-[13px] leading-relaxed text-surface-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
209
+ className: "w-full resize-none rounded-control-inner border border-surface-border-strong bg-surface-raised-hover px-ds-02 py-ds-01 text-[13px] leading-relaxed text-surface-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9",
205
210
  rows: 2
206
- }), /* @__PURE__ */ m("div", {
211
+ }), /* @__PURE__ */ g("div", {
207
212
  className: "mt-ds-01 text-ds-xs text-surface-fg-subtle/50",
208
213
  children: "Enter to save · Escape to cancel"
209
214
  })]
210
- }) : /* @__PURE__ */ m("div", {
211
- className: r("text-[13px] leading-relaxed text-surface-fg whitespace-pre-wrap", i && "cursor-pointer hover:bg-surface-raised-hover rounded-ds-sm transition-colors"),
215
+ }) : /* @__PURE__ */ g("div", {
216
+ className: i("text-[13px] leading-relaxed text-surface-fg whitespace-pre-wrap", r && "cursor-pointer hover:bg-surface-raised-hover rounded-control-inner transition-colors"),
212
217
  onClick: d,
213
- role: i ? "button" : void 0,
214
- tabIndex: i ? 0 : void 0,
215
- onKeyDown: i ? (e) => {
218
+ role: r ? "button" : void 0,
219
+ tabIndex: r ? 0 : void 0,
220
+ onKeyDown: r ? (e) => {
216
221
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d());
217
222
  } : void 0,
218
223
  children: a ? a(e) : e
219
224
  });
220
225
  }
221
- M.displayName = "Message.EditableBody";
222
- function N({ reactions: e, onReact: t }) {
223
- return e.length === 0 ? null : /* @__PURE__ */ m("div", {
226
+ P.displayName = "Message.EditableBody";
227
+ function F({ reactions: e, onReact: t }) {
228
+ return e.length === 0 ? null : /* @__PURE__ */ g("div", {
224
229
  className: "flex flex-wrap gap-ds-02 mt-ds-03",
225
- children: e.map((e) => /* @__PURE__ */ h("button", {
230
+ children: e.map((e) => /* @__PURE__ */ _("button", {
226
231
  type: "button",
227
232
  onClick: () => t(e.emoji),
228
233
  "aria-label": `${e.emoji} ${e.count} reaction${e.count === 1 ? "" : "s"}${e.reacted ? ", you reacted" : ""}`,
229
- className: r("inline-flex items-center gap-ds-01 rounded-full px-ds-02 py-ds-01 text-ds-xs transition-colors", e.reacted ? "bg-accent-3 ring-1 ring-accent-6" : "bg-surface-raised-hover hover:bg-surface-raised-active"),
230
- children: [/* @__PURE__ */ m("span", { children: e.emoji }), /* @__PURE__ */ m("span", { children: e.count })]
234
+ className: i("inline-flex items-center gap-ds-01 rounded-pill px-ds-02 py-ds-01 text-ds-xs transition-colors", e.reacted ? "bg-accent-3 ring-1 ring-accent-6" : "bg-surface-raised-hover hover:bg-surface-raised-active"),
235
+ children: [/* @__PURE__ */ g("span", { children: e.emoji }), /* @__PURE__ */ g("span", { children: e.count })]
231
236
  }, e.emoji))
232
237
  });
233
238
  }
234
- N.displayName = "Message.Reactions";
235
- function P({ children: e, delay: t = 100 }) {
236
- return /* @__PURE__ */ m("div", {
237
- className: r("absolute -top-2 right-0 z-10", "flex items-center gap-ds-01 rounded-ds-md border border-surface-border bg-surface-raised px-ds-01 py-ds-01 shadow-raised", "opacity-0 group-hover/message:opacity-100 group-focus-within/message:opacity-100 transition-opacity duration-150"),
239
+ F.displayName = "Message.Reactions";
240
+ function I({ children: e, delay: t = 100 }) {
241
+ return /* @__PURE__ */ g("div", {
242
+ className: i("absolute -top-2 right-0 z-10", "flex items-center gap-ds-01 rounded-control border border-surface-border bg-surface-raised px-ds-01 py-ds-01 shadow-raised", "opacity-0 group-hover/message:opacity-100 group-focus-within/message:opacity-100 transition-opacity duration-150"),
238
243
  style: { transitionDelay: `${t}ms` },
239
244
  children: e
240
245
  });
241
246
  }
242
- P.displayName = "Message.Actions";
243
- function F({ icon: e, label: t, onClick: n, variant: i = "default" }) {
244
- return /* @__PURE__ */ h(u, { children: [/* @__PURE__ */ m(f, {
247
+ I.displayName = "Message.Actions";
248
+ function L({ icon: t, label: n, onClick: r, variant: a = "default" }) {
249
+ return /* @__PURE__ */ _(f, { children: [/* @__PURE__ */ g(m, {
245
250
  asChild: !0,
246
- children: /* @__PURE__ */ m("button", {
251
+ children: /* @__PURE__ */ g("button", {
247
252
  type: "button",
248
- onClick: n,
249
- "aria-label": t,
250
- className: r("p-ds-02 rounded-ds-sm transition-colors", i === "default" && "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", i === "danger" && "text-surface-fg-subtle hover:text-error-11 hover:bg-surface-raised-hover"),
251
- children: /* @__PURE__ */ m(a, {
252
- icon: e,
253
- size: "xs"
253
+ onClick: r,
254
+ "aria-label": n,
255
+ className: i("p-ds-02 rounded-control-inner transition-colors", a === "default" && "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", a === "danger" && "text-surface-fg-subtle hover:text-error-11 hover:bg-surface-raised-hover"),
256
+ children: /* @__PURE__ */ g(e, {
257
+ size: "xs",
258
+ children: u(t)
254
259
  })
255
260
  })
256
- }), /* @__PURE__ */ m(d, { children: t })] });
261
+ }), /* @__PURE__ */ g(p, { children: n })] });
257
262
  }
258
- F.displayName = "Message.Action";
259
- var I = Object.assign(E, {
260
- Avatar: D,
261
- Content: O,
262
- Author: A,
263
- Body: j,
264
- EditableBody: M,
265
- Reactions: N,
266
- Actions: P,
267
- Action: F
268
- }), L = p.forwardRef(({ onSubmit: e, placeholder: t = "Type a message...", disabled: n = !1, isStreaming: i = !1, onCancel: o, leadingSlot: s, trailingSlot: c, disclaimer: u, sendIcon: d, className: f, ...g }, y) => {
269
- let [b, x] = p.useState(""), S = p.useRef(null), C = p.useCallback(() => {
263
+ L.displayName = "Message.Action";
264
+ var R = Object.assign(O, {
265
+ Avatar: k,
266
+ Content: A,
267
+ Author: M,
268
+ Body: N,
269
+ EditableBody: P,
270
+ Reactions: F,
271
+ Actions: I,
272
+ Action: L
273
+ }), z = h.forwardRef(({ onSubmit: e, placeholder: t = "Type a message...", disabled: n = !1, isStreaming: r = !1, onCancel: a, leadingSlot: s, trailingSlot: c, disclaimer: l, sendIcon: u, className: f, ...p }, m) => {
274
+ let [v, x] = h.useState(""), S = h.useRef(null), C = h.useCallback(() => {
270
275
  let e = S.current;
271
276
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
272
- }, []), w = p.useCallback((e) => {
277
+ }, []), w = h.useCallback((e) => {
273
278
  x(e.target.value), C();
274
- }, [C]), T = p.useCallback(() => {
275
- let t = b.trim();
276
- !t || i || (e(t), x(""), S.current && (S.current.style.height = "auto"));
279
+ }, [C]), T = h.useCallback(() => {
280
+ let t = v.trim();
281
+ !t || r || (e(t), x(""), S.current && (S.current.style.height = "auto"));
277
282
  }, [
278
- b,
279
- i,
283
+ v,
284
+ r,
280
285
  e
281
- ]), E = p.useCallback((e) => {
282
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), i || T());
283
- }, [i, T]), D = b.trim().length === 0;
284
- return /* @__PURE__ */ h("div", {
285
- ref: y,
286
- className: r("border-t border-surface-border-subtle px-ds-05 py-ds-04", f),
287
- ...g,
288
- children: [/* @__PURE__ */ h("div", {
289
- className: "flex items-end gap-ds-02 rounded-ds-xl border border-surface-border bg-surface-base p-ds-03",
286
+ ]), E = h.useCallback((e) => {
287
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), r || T());
288
+ }, [r, T]), D = v.trim().length === 0;
289
+ return /* @__PURE__ */ _("div", {
290
+ ref: m,
291
+ className: i("border-t border-surface-border-subtle px-ds-05 py-ds-04", f),
292
+ ...p,
293
+ children: [/* @__PURE__ */ _("div", {
294
+ className: "flex items-end gap-ds-02 rounded-overlay-lg border border-surface-border bg-surface-base p-ds-03",
290
295
  children: [
291
296
  s,
292
- /* @__PURE__ */ m("textarea", {
297
+ /* @__PURE__ */ g("textarea", {
293
298
  ref: S,
294
- value: b,
299
+ value: v,
295
300
  onChange: w,
296
301
  onKeyDown: E,
297
302
  placeholder: t,
@@ -301,46 +306,46 @@ var I = Object.assign(E, {
301
306
  className: "flex-1 resize-none bg-transparent px-ds-02 py-ds-01 text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle/50 focus:outline-hidden disabled:opacity-50",
302
307
  style: { maxHeight: 160 }
303
308
  }),
304
- i ? /* @__PURE__ */ m(l, {
309
+ r ? /* @__PURE__ */ g(d, {
305
310
  variant: "ghost",
306
311
  size: "icon-sm",
307
312
  color: "error",
308
- onClick: o,
313
+ onClick: a,
309
314
  "aria-label": "Stop",
310
- children: /* @__PURE__ */ m(a, {
311
- icon: v,
315
+ children: /* @__PURE__ */ g(o, {
316
+ icon: b,
312
317
  size: "sm"
313
318
  })
314
- }) : /* @__PURE__ */ m(l, {
319
+ }) : /* @__PURE__ */ g(d, {
315
320
  variant: "ghost",
316
321
  size: "icon-sm",
317
322
  onClick: T,
318
323
  disabled: D || n,
319
324
  "aria-label": "Send",
320
- children: d ?? /* @__PURE__ */ m(a, {
321
- icon: _,
325
+ children: u ?? /* @__PURE__ */ g(o, {
326
+ icon: y,
322
327
  size: "sm"
323
328
  })
324
329
  }),
325
330
  c
326
331
  ]
327
- }), u && /* @__PURE__ */ m("p", {
332
+ }), l && /* @__PURE__ */ g("p", {
328
333
  className: "mt-ds-02 text-center text-ds-xs text-surface-fg-subtle/50",
329
- children: u
334
+ children: l
330
335
  })]
331
336
  });
332
337
  });
333
- L.displayName = "MessageInput";
338
+ z.displayName = "MessageInput";
334
339
  //#endregion
335
340
  //#region src/ui/chat/message-list.tsx
336
- var R = p.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: a = 0, onScrollToBottom: o, onLoadMore: s, loadingMore: c = !1, emptySlot: l, scrollToBottomSlot: u, headerSlot: d, className: f, ...g }, _) => {
337
- let v = p.useRef(null), y = p.useRef(!0), [S, C] = p.useState(!0), w = p.useRef(!1), T = p.useRef(0), E = p.Children.count(e) === 0 && !c, D = p.useCallback(() => {
341
+ var B = h.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: n = 0, onScrollToBottom: o, onLoadMore: s, loadingMore: c = !1, emptySlot: l, scrollToBottomSlot: u, headerSlot: d, className: f, ...p }, m) => {
342
+ let v = h.useRef(null), y = h.useRef(!0), [b, x] = h.useState(!0), w = h.useRef(!1), T = h.useRef(0), E = h.Children.count(e) === 0 && !c, D = h.useCallback(() => {
338
343
  let e = v.current;
339
344
  if (!e) return;
340
345
  let t = e.scrollHeight - e.scrollTop - e.clientHeight < 40;
341
- y.current = t, C(t), e.scrollTop < 100 && s && !w.current && (w.current = !0, T.current = e.scrollHeight, s());
346
+ y.current = t, x(t), e.scrollTop < 100 && s && !w.current && (w.current = !0, T.current = e.scrollHeight, s());
342
347
  }, [s]);
343
- p.useLayoutEffect(() => {
348
+ h.useLayoutEffect(() => {
344
349
  let e = v.current;
345
350
  if (e) {
346
351
  if (w.current) {
@@ -352,23 +357,23 @@ var R = p.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: a = 0,
352
357
  behavior: "smooth"
353
358
  });
354
359
  }
355
- }, [e, t]), p.useEffect(() => {
360
+ }, [e, t]), h.useEffect(() => {
356
361
  c || (w.current = !1);
357
362
  }, [c]);
358
- let O = a > 0 && !S, k = p.useCallback(() => {
363
+ let O = n > 0 && !b, k = h.useCallback(() => {
359
364
  let e = v.current;
360
365
  e && e.scrollTo({
361
366
  top: e.scrollHeight,
362
367
  behavior: "smooth"
363
368
  }), o?.();
364
369
  }, [o]);
365
- return /* @__PURE__ */ h("div", {
366
- ref: _,
367
- className: r("relative flex flex-1 flex-col overflow-hidden", f),
368
- ...g,
370
+ return /* @__PURE__ */ _("div", {
371
+ ref: m,
372
+ className: i("relative flex flex-1 flex-col overflow-hidden", f),
373
+ ...p,
369
374
  children: [
370
375
  d,
371
- /* @__PURE__ */ h("div", {
376
+ /* @__PURE__ */ _("div", {
372
377
  ref: v,
373
378
  role: "log",
374
379
  "aria-live": "polite",
@@ -379,18 +384,18 @@ var R = p.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: a = 0,
379
384
  scrollbarColor: "var(--color-surface-border) transparent"
380
385
  },
381
386
  onScroll: D,
382
- children: [c && /* @__PURE__ */ m("div", {
387
+ children: [c && /* @__PURE__ */ g("div", {
383
388
  className: "flex justify-center py-ds-03",
384
- children: /* @__PURE__ */ m(i, { size: "sm" })
385
- }), E ? l : /* @__PURE__ */ m("div", {
389
+ children: /* @__PURE__ */ g(a, { size: "sm" })
390
+ }), E ? l : /* @__PURE__ */ g("div", {
386
391
  className: "flex flex-col gap-ds-04",
387
- children: /* @__PURE__ */ m(b, {
392
+ children: /* @__PURE__ */ g(S, {
388
393
  initial: !1,
389
394
  children: e
390
395
  })
391
396
  })]
392
397
  }),
393
- /* @__PURE__ */ m(b, { children: O && /* @__PURE__ */ h(x.button, {
398
+ /* @__PURE__ */ g(S, { children: O && /* @__PURE__ */ _(C.button, {
394
399
  initial: {
395
400
  opacity: 0,
396
401
  y: 10
@@ -403,82 +408,85 @@ var R = p.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: a = 0,
403
408
  opacity: 0,
404
409
  y: 10
405
410
  },
406
- transition: n.fade,
411
+ transition: r.fade,
407
412
  onClick: k,
408
- className: "absolute bottom-ds-04 left-1/2 z-10 -translate-x-1/2 rounded-full bg-accent-9 px-ds-04 py-ds-02 text-ds-xs font-medium text-accent-fg shadow-raised transition-colors hover:bg-accent-10",
409
- children: [a, " new"]
413
+ className: "absolute bottom-ds-04 left-1/2 z-10 -translate-x-1/2 rounded-pill bg-accent-9 px-ds-04 py-ds-02 text-ds-xs font-medium text-accent-fg shadow-raised transition-colors hover:bg-accent-10",
414
+ children: [n, " new"]
410
415
  }) })
411
416
  ]
412
417
  });
413
418
  });
414
- R.displayName = "MessageList";
419
+ B.displayName = "MessageList";
415
420
  //#endregion
416
421
  //#region src/ui/chat/system-message.tsx
417
- function z(e) {
422
+ function V(e) {
418
423
  return new Date(e).toLocaleTimeString("en-US", {
419
424
  hour: "numeric",
420
425
  minute: "2-digit"
421
426
  });
422
427
  }
423
- var B = p.forwardRef(({ icon: e, timestamp: t, variant: n = "event", children: i, className: o, ...s }, c) => n === "alert" ? /* @__PURE__ */ m("div", {
424
- ref: c,
428
+ var H = h.forwardRef(({ icon: t, timestamp: n, variant: r = "event", children: a, className: s, ...c }, l) => r === "alert" ? /* @__PURE__ */ g("div", {
429
+ ref: l,
425
430
  role: "alert",
426
- className: r("flex justify-center", o),
427
- ...s,
428
- children: /* @__PURE__ */ h("div", {
429
- className: "flex items-center gap-ds-03 rounded-ds-lg bg-error-3 px-ds-04 py-ds-03",
431
+ className: i("flex justify-center", s),
432
+ ...c,
433
+ children: /* @__PURE__ */ _("div", {
434
+ className: "flex items-center gap-ds-03 rounded-surface bg-error-3 px-ds-04 py-ds-03",
430
435
  children: [
431
- e ?? /* @__PURE__ */ m(a, {
432
- icon: g,
433
- size: "sm"
436
+ /* @__PURE__ */ g(e, {
437
+ size: "sm",
438
+ children: u(t) ?? /* @__PURE__ */ g(o, { icon: v })
434
439
  }),
435
- /* @__PURE__ */ m("span", {
440
+ /* @__PURE__ */ g("span", {
436
441
  className: "text-ds-sm text-error-11",
437
- children: i
442
+ children: a
438
443
  }),
439
- t && /* @__PURE__ */ m("span", {
444
+ n && /* @__PURE__ */ g("span", {
440
445
  className: "text-ds-sm text-error-11/60",
441
- children: z(t)
446
+ children: V(n)
442
447
  })
443
448
  ]
444
449
  })
445
- }) : /* @__PURE__ */ h("div", {
446
- ref: c,
447
- className: r("flex items-center gap-ds-02 rounded-ds-sm bg-surface-raised-hover/30 px-ds-02 py-ds-01 -mx-ds-02 text-ds-sm text-surface-fg-subtle/60", o),
448
- ...s,
450
+ }) : /* @__PURE__ */ _("div", {
451
+ ref: l,
452
+ className: i("flex items-center gap-ds-02 rounded-control-inner bg-surface-raised-hover/30 px-ds-02 py-ds-01 -mx-ds-02 text-ds-sm text-surface-fg-subtle/60", s),
453
+ ...c,
449
454
  children: [
450
- e,
451
- /* @__PURE__ */ m("span", {
455
+ /* @__PURE__ */ g(e, {
456
+ size: "xs",
457
+ children: u(t)
458
+ }),
459
+ /* @__PURE__ */ g("span", {
452
460
  className: "flex-1",
453
- children: i
461
+ children: a
454
462
  }),
455
- t && /* @__PURE__ */ m("span", { children: z(t) })
463
+ n && /* @__PURE__ */ g("span", { children: V(n) })
456
464
  ]
457
465
  }));
458
- B.displayName = "SystemMessage";
466
+ H.displayName = "SystemMessage";
459
467
  //#endregion
460
468
  //#region src/ui/chat/typing-indicator.tsx
461
- function V(e) {
469
+ function U(e) {
462
470
  return e.length === 1 ? `${e[0].name} is typing...` : e.length === 2 ? `${e[0].name} and ${e[1].name} are typing...` : "Several people are typing...";
463
471
  }
464
- function H({ users: e, className: t }) {
465
- return /* @__PURE__ */ m("div", {
466
- className: r("min-h-[24px] px-ds-05", t),
472
+ function W({ users: e, className: t }) {
473
+ return /* @__PURE__ */ g("div", {
474
+ className: i("min-h-[24px] px-ds-05", t),
467
475
  role: "status",
468
476
  "aria-live": "polite",
469
- children: /* @__PURE__ */ m(b, { children: e.length > 0 && /* @__PURE__ */ h(x.div, {
477
+ children: /* @__PURE__ */ g(S, { children: e.length > 0 && /* @__PURE__ */ _(C.div, {
470
478
  initial: { opacity: 0 },
471
479
  animate: { opacity: 1 },
472
480
  exit: { opacity: 0 },
473
481
  className: "flex items-center gap-ds-02 text-ds-xs text-surface-fg-subtle",
474
- children: [/* @__PURE__ */ m("span", {
482
+ children: [/* @__PURE__ */ g("span", {
475
483
  className: "flex items-center gap-ds-01",
476
484
  children: [
477
485
  0,
478
486
  1,
479
487
  2
480
- ].map((e) => /* @__PURE__ */ m(x.span, {
481
- className: "h-1 w-1 rounded-full bg-surface-fg-subtle",
488
+ ].map((e) => /* @__PURE__ */ g(C.span, {
489
+ className: "h-1 w-1 rounded-pill bg-surface-fg-subtle",
482
490
  animate: { y: [
483
491
  0,
484
492
  -3,
@@ -490,26 +498,26 @@ function H({ users: e, className: t }) {
490
498
  delay: e * .15
491
499
  }
492
500
  }, e))
493
- }), /* @__PURE__ */ m("span", { children: V(e) })]
501
+ }), /* @__PURE__ */ g("span", { children: U(e) })]
494
502
  }) })
495
503
  });
496
504
  }
497
- H.displayName = "TypingIndicator";
505
+ W.displayName = "TypingIndicator";
498
506
  //#endregion
499
507
  //#region src/ui/chat/unread-separator.tsx
500
- function U({ label: e = "NEW", count: t, className: n }) {
501
- return /* @__PURE__ */ h("div", {
502
- className: r("relative flex items-center py-ds-02", n),
508
+ function G({ label: e = "NEW", count: t, className: n }) {
509
+ return /* @__PURE__ */ _("div", {
510
+ className: i("relative flex items-center py-ds-02", n),
503
511
  children: [
504
- /* @__PURE__ */ m("div", { className: "flex-1 border-t-2 border-accent-7" }),
505
- /* @__PURE__ */ m("span", {
512
+ /* @__PURE__ */ g("div", { className: "flex-1 border-t-2 border-accent-7" }),
513
+ /* @__PURE__ */ g("span", {
506
514
  className: "px-ds-03 text-ds-xs font-semibold text-accent-11",
507
515
  children: t ? `${t} ${e}` : e
508
516
  }),
509
- /* @__PURE__ */ m("div", { className: "flex-1 border-t-2 border-accent-7" })
517
+ /* @__PURE__ */ g("div", { className: "flex-1 border-t-2 border-accent-7" })
510
518
  ]
511
519
  });
512
520
  }
513
- U.displayName = "UnreadSeparator";
521
+ G.displayName = "UnreadSeparator";
514
522
  //#endregion
515
- export { L as a, C as c, R as i, H as n, I as o, B as r, T as s, U as t };
523
+ export { z as a, T as c, B as i, W as n, R as o, H as r, D as s, G as t };