@devalok/shilp-sutra 0.34.1 → 0.36.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 (439) hide show
  1. package/LICENSE +21 -21
  2. package/dist/_chunks/badge-group.js +95 -95
  3. package/dist/_chunks/badge-group.js.map +1 -0
  4. package/dist/_chunks/chat.js +7 -2
  5. package/dist/_chunks/chat.js.map +1 -0
  6. package/dist/_chunks/date-picker.js.map +1 -0
  7. package/dist/_chunks/document-preview.js.map +1 -0
  8. package/dist/_chunks/file-preview.js.map +1 -0
  9. package/dist/_chunks/framer.js +62 -62
  10. package/dist/_chunks/framer.js.map +1 -0
  11. package/dist/_chunks/image-preview.js +1 -1
  12. package/dist/_chunks/image-preview.js.map +1 -0
  13. package/dist/_chunks/keybinding.js.map +1 -0
  14. package/dist/_chunks/link-context.js.map +1 -0
  15. package/dist/_chunks/mention-suggestion.js.map +1 -0
  16. package/dist/_chunks/motion-provider.js.map +1 -0
  17. package/dist/_chunks/popover.js +32 -36
  18. package/dist/_chunks/popover.js.map +1 -0
  19. package/dist/_chunks/primitives.js +686 -686
  20. package/dist/_chunks/primitives.js.map +1 -0
  21. package/dist/_chunks/rich-chat-input.js +650 -649
  22. package/dist/_chunks/rich-chat-input.js.map +1 -0
  23. package/dist/_chunks/shared.js.map +1 -0
  24. package/dist/_chunks/sonner.js.map +1 -0
  25. package/dist/_chunks/stat-row.js +158 -158
  26. package/dist/_chunks/stat-row.js.map +1 -0
  27. package/dist/_chunks/tiptap.js +11 -11
  28. package/dist/_chunks/tiptap.js.map +1 -0
  29. package/dist/_chunks/tree-view.js +1 -1
  30. package/dist/_chunks/tree-view.js.map +1 -0
  31. package/dist/_chunks/use-calendar.js.map +1 -0
  32. package/dist/_chunks/vendor-client.js +1 -1
  33. package/dist/_chunks/vendor-client.js.map +1 -0
  34. package/dist/_chunks/vendor-utils.js.map +1 -0
  35. package/dist/ai/ai-command-provider.js.map +1 -0
  36. package/dist/ai/block-renderer.js.map +1 -0
  37. package/dist/ai/blocks/loading.d.ts.map +1 -1
  38. package/dist/ai/command-bar.js.map +1 -0
  39. package/dist/ai/conversation.js +76 -76
  40. package/dist/ai/conversation.js.map +1 -0
  41. package/dist/ai/devadoot-icon.d.ts.map +1 -1
  42. package/dist/ai/index.js.map +1 -0
  43. package/dist/composed/activity-feed.js.map +1 -0
  44. package/dist/composed/avatar-group.js +1 -1
  45. package/dist/composed/avatar-group.js.map +1 -0
  46. package/dist/composed/bulk-action-bar.js +13 -21
  47. package/dist/composed/bulk-action-bar.js.map +1 -0
  48. package/dist/composed/command-palette.js.map +1 -0
  49. package/dist/composed/confirm-dialog.js.map +1 -0
  50. package/dist/composed/content-card.js.map +1 -0
  51. package/dist/composed/deadline-indicator.js.map +1 -0
  52. package/dist/composed/emoji-picker.js.map +1 -0
  53. package/dist/composed/empty-state.d.ts.map +1 -1
  54. package/dist/composed/empty-state.js +30 -30
  55. package/dist/composed/empty-state.js.map +1 -0
  56. package/dist/composed/error-boundary.js.map +1 -0
  57. package/dist/composed/filter-bar.js.map +1 -0
  58. package/dist/composed/form-section.js.map +1 -0
  59. package/dist/composed/global-loading.js.map +1 -0
  60. package/dist/composed/inline-edit.js.map +1 -0
  61. package/dist/composed/lib/string-utils.js.map +1 -0
  62. package/dist/composed/loading-skeleton.js.map +1 -0
  63. package/dist/composed/markdown-viewer.js.map +1 -0
  64. package/dist/composed/master-detail.js.map +1 -0
  65. package/dist/composed/member-picker.js.map +1 -0
  66. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  67. package/dist/composed/multi-select-popover.js +4 -0
  68. package/dist/composed/multi-select-popover.js.map +1 -0
  69. package/dist/composed/page-header.js.map +1 -0
  70. package/dist/composed/page-skeletons.js.map +1 -0
  71. package/dist/composed/priority-indicator.js.map +1 -0
  72. package/dist/composed/responsive-overlay.js.map +1 -0
  73. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
  74. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
  75. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
  76. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  77. package/dist/composed/rich-text-editor.js.map +1 -0
  78. package/dist/composed/schedule-view.js.map +1 -0
  79. package/dist/composed/simple-tooltip.js.map +1 -0
  80. package/dist/composed/status-badge.d.ts.map +1 -1
  81. package/dist/composed/status-badge.js.map +1 -0
  82. package/dist/hooks/use-color-mode.js.map +1 -0
  83. package/dist/hooks/use-mobile.js.map +1 -0
  84. package/dist/hooks/use-touch-device.js.map +1 -0
  85. package/dist/hooks/use-viewport-height.js.map +1 -0
  86. package/dist/motion/check-motion-provider.d.ts +3 -0
  87. package/dist/motion/check-motion-provider.d.ts.map +1 -0
  88. package/dist/motion/index.js +14 -0
  89. package/dist/motion/index.js.map +1 -0
  90. package/dist/motion/primitives-index.js.map +1 -0
  91. package/dist/primitives/react-accordion.d.ts +114 -114
  92. package/dist/primitives/react-alert-dialog.d.ts +51 -51
  93. package/dist/primitives/react-aspect-ratio.d.ts +11 -11
  94. package/dist/primitives/react-avatar.d.ts +24 -24
  95. package/dist/primitives/react-checkbox.d.ts +50 -50
  96. package/dist/primitives/react-collapsible.d.ts +33 -33
  97. package/dist/primitives/react-context-menu.d.ts +96 -96
  98. package/dist/primitives/react-dialog.d.ts +103 -103
  99. package/dist/primitives/react-dropdown-menu.d.ts +97 -97
  100. package/dist/primitives/react-hover-card.d.ts +79 -79
  101. package/dist/primitives/react-label.d.ts +10 -10
  102. package/dist/primitives/react-menu.d.ts +169 -169
  103. package/dist/primitives/react-menubar.d.ts +115 -115
  104. package/dist/primitives/react-navigation-menu.d.ts +126 -126
  105. package/dist/primitives/react-popover.d.ts +85 -85
  106. package/dist/primitives/react-progress.d.ts +19 -19
  107. package/dist/primitives/react-radio-group.d.ts +58 -58
  108. package/dist/primitives/react-roving-focus.d.ts +49 -49
  109. package/dist/primitives/react-select.d.ts +137 -137
  110. package/dist/primitives/react-separator.d.ts +21 -21
  111. package/dist/primitives/react-slider.d.ts +75 -75
  112. package/dist/primitives/react-switch.d.ts +21 -21
  113. package/dist/primitives/react-tabs.d.ts +56 -56
  114. package/dist/primitives/react-toast.d.ts +120 -120
  115. package/dist/primitives/react-toggle-group.d.ts +75 -75
  116. package/dist/primitives/react-toggle.d.ts +24 -24
  117. package/dist/primitives/react-tooltip.d.ts +101 -101
  118. package/dist/primitives/react-visually-hidden.d.ts +22 -22
  119. package/dist/shell/app-command-palette.d.ts +2 -0
  120. package/dist/shell/app-command-palette.d.ts.map +1 -1
  121. package/dist/shell/app-command-palette.js +42 -155
  122. package/dist/shell/app-command-palette.js.map +1 -0
  123. package/dist/shell/bottom-navbar.js +1 -1
  124. package/dist/shell/bottom-navbar.js.map +1 -0
  125. package/dist/shell/command-registry.js.map +1 -0
  126. package/dist/shell/notification-center.d.ts.map +1 -1
  127. package/dist/shell/notification-center.js +194 -169
  128. package/dist/shell/notification-center.js.map +1 -0
  129. package/dist/shell/notification-preferences.js.map +1 -0
  130. package/dist/shell/sidebar.js.map +1 -0
  131. package/dist/shell/top-bar.js +1 -1
  132. package/dist/shell/top-bar.js.map +1 -0
  133. package/dist/tailwind/index.cjs +48 -1
  134. package/dist/tailwind/preset.d.ts.map +1 -1
  135. package/dist/tailwind/preset.js +48 -1
  136. package/dist/tailwind/preset.js.map +1 -0
  137. package/dist/tokens/index.css +4 -4
  138. package/dist/tokens/primitives.css +442 -442
  139. package/dist/tokens/semantic.css +742 -547
  140. package/dist/tokens/typography-semantic.css +123 -100
  141. package/dist/tokens/typography.css +422 -422
  142. package/dist/ui/accordion.js +13 -13
  143. package/dist/ui/accordion.js.map +1 -0
  144. package/dist/ui/alert-dialog.d.ts +6 -2
  145. package/dist/ui/alert-dialog.d.ts.map +1 -1
  146. package/dist/ui/alert-dialog.js +43 -42
  147. package/dist/ui/alert-dialog.js.map +1 -0
  148. package/dist/ui/alert.d.ts +3 -2
  149. package/dist/ui/alert.d.ts.map +1 -1
  150. package/dist/ui/alert.js +31 -5
  151. package/dist/ui/alert.js.map +1 -0
  152. package/dist/ui/aspect-ratio.js +1 -1
  153. package/dist/ui/aspect-ratio.js.map +1 -0
  154. package/dist/ui/autocomplete.d.ts.map +1 -1
  155. package/dist/ui/autocomplete.js +92 -67
  156. package/dist/ui/autocomplete.js.map +1 -0
  157. package/dist/ui/avatar.js +9 -9
  158. package/dist/ui/avatar.js.map +1 -0
  159. package/dist/ui/badge-indicator.js.map +1 -0
  160. package/dist/ui/banner.js.map +1 -0
  161. package/dist/ui/breadcrumb.js +1 -1
  162. package/dist/ui/breadcrumb.js.map +1 -0
  163. package/dist/ui/button-group.js.map +1 -0
  164. package/dist/ui/button-processing.d.ts.map +1 -1
  165. package/dist/ui/button-processing.js +61 -40
  166. package/dist/ui/button-processing.js.map +1 -0
  167. package/dist/ui/button.js +8 -8
  168. package/dist/ui/button.js.map +1 -0
  169. package/dist/ui/card.js.map +1 -0
  170. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  171. package/dist/ui/charts/chart-container.d.ts +2 -0
  172. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  173. package/dist/ui/charts/index.js +88 -65
  174. package/dist/ui/charts/index.js.map +1 -0
  175. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  176. package/dist/ui/chat/message-input.d.ts.map +1 -1
  177. package/dist/ui/chat/message-list.d.ts +1 -1
  178. package/dist/ui/chat/message-list.d.ts.map +1 -1
  179. package/dist/ui/chat/message.d.ts.map +1 -1
  180. package/dist/ui/chat/system-message.d.ts.map +1 -1
  181. package/dist/ui/checkbox.d.ts.map +1 -1
  182. package/dist/ui/checkbox.js +33 -28
  183. package/dist/ui/checkbox.js.map +1 -0
  184. package/dist/ui/code.js.map +1 -0
  185. package/dist/ui/collapsible.js +1 -1
  186. package/dist/ui/collapsible.js.map +1 -0
  187. package/dist/ui/color-input.d.ts.map +1 -1
  188. package/dist/ui/color-input.js +165 -163
  189. package/dist/ui/color-input.js.map +1 -0
  190. package/dist/ui/color-swatch.js.map +1 -0
  191. package/dist/ui/combobox.d.ts +7 -0
  192. package/dist/ui/combobox.d.ts.map +1 -1
  193. package/dist/ui/combobox.js +147 -113
  194. package/dist/ui/combobox.js.map +1 -0
  195. package/dist/ui/container.js +1 -1
  196. package/dist/ui/container.js.map +1 -0
  197. package/dist/ui/context-menu.js.map +1 -0
  198. package/dist/ui/data-table-body.js.map +1 -0
  199. package/dist/ui/data-table-bulk-actions.js +1 -1
  200. package/dist/ui/data-table-bulk-actions.js.map +1 -0
  201. package/dist/ui/data-table-card.js.map +1 -0
  202. package/dist/ui/data-table-context.js.map +1 -0
  203. package/dist/ui/data-table-header.js.map +1 -0
  204. package/dist/ui/data-table-pagination.js.map +1 -0
  205. package/dist/ui/data-table-toolbar.js.map +1 -0
  206. package/dist/ui/data-table.js +34 -31
  207. package/dist/ui/data-table.js.map +1 -0
  208. package/dist/ui/devalok-grain.js.map +1 -0
  209. package/dist/ui/dialog.js +31 -35
  210. package/dist/ui/dialog.js.map +1 -0
  211. package/dist/ui/dropdown-menu.js.map +1 -0
  212. package/dist/ui/file-upload.js +120 -120
  213. package/dist/ui/file-upload.js.map +1 -0
  214. package/dist/ui/form.d.ts +8 -0
  215. package/dist/ui/form.d.ts.map +1 -1
  216. package/dist/ui/form.js +14 -12
  217. package/dist/ui/form.js.map +1 -0
  218. package/dist/ui/hover-card.js.map +1 -0
  219. package/dist/ui/icon-button.js.map +1 -0
  220. package/dist/ui/icon-context.js.map +1 -0
  221. package/dist/ui/icon-group.js.map +1 -0
  222. package/dist/ui/icon.js.map +1 -0
  223. package/dist/ui/index.d.ts +4 -4
  224. package/dist/ui/index.d.ts.map +1 -1
  225. package/dist/ui/index.js +82 -66
  226. package/dist/ui/index.js.map +1 -0
  227. package/dist/ui/input-otp.d.ts +12 -3
  228. package/dist/ui/input-otp.d.ts.map +1 -1
  229. package/dist/ui/input-otp.js +41 -27
  230. package/dist/ui/input-otp.js.map +1 -0
  231. package/dist/ui/input.d.ts.map +1 -1
  232. package/dist/ui/input.js +16 -15
  233. package/dist/ui/input.js.map +1 -0
  234. package/dist/ui/label.d.ts.map +1 -1
  235. package/dist/ui/label.js +19 -14
  236. package/dist/ui/label.js.map +1 -0
  237. package/dist/ui/lib/check-tokens.d.ts +3 -0
  238. package/dist/ui/lib/check-tokens.d.ts.map +1 -0
  239. package/dist/ui/lib/date-utils.js.map +1 -0
  240. package/dist/ui/lib/motion.d.ts +15 -4
  241. package/dist/ui/lib/motion.d.ts.map +1 -1
  242. package/dist/ui/lib/motion.js +18 -9
  243. package/dist/ui/lib/motion.js.map +1 -0
  244. package/dist/ui/lib/utils.js.map +1 -0
  245. package/dist/ui/link.js +2 -2
  246. package/dist/ui/link.js.map +1 -0
  247. package/dist/ui/menubar.js.map +1 -0
  248. package/dist/ui/navigation-menu.js.map +1 -0
  249. package/dist/ui/number-input.d.ts +16 -1
  250. package/dist/ui/number-input.d.ts.map +1 -1
  251. package/dist/ui/number-input.js +79 -49
  252. package/dist/ui/number-input.js.map +1 -0
  253. package/dist/ui/pagination.js +1 -1
  254. package/dist/ui/pagination.js.map +1 -0
  255. package/dist/ui/progress-ring.d.ts.map +1 -1
  256. package/dist/ui/progress-ring.js.map +1 -0
  257. package/dist/ui/progress.js.map +1 -0
  258. package/dist/ui/radio.d.ts.map +1 -1
  259. package/dist/ui/radio.js +27 -20
  260. package/dist/ui/radio.js.map +1 -0
  261. package/dist/ui/search-input.js.map +1 -0
  262. package/dist/ui/segmented-control.d.ts +1 -1
  263. package/dist/ui/segmented-control.d.ts.map +1 -1
  264. package/dist/ui/segmented-control.js +2 -0
  265. package/dist/ui/segmented-control.js.map +1 -0
  266. package/dist/ui/select.d.ts.map +1 -1
  267. package/dist/ui/select.js +54 -48
  268. package/dist/ui/select.js.map +1 -0
  269. package/dist/ui/separator.d.ts.map +1 -1
  270. package/dist/ui/separator.js +10 -7
  271. package/dist/ui/separator.js.map +1 -0
  272. package/dist/ui/sheet.js +29 -29
  273. package/dist/ui/sheet.js.map +1 -0
  274. package/dist/ui/sidebar.js +7 -7
  275. package/dist/ui/sidebar.js.map +1 -0
  276. package/dist/ui/skeleton.js.map +1 -0
  277. package/dist/ui/slider.d.ts +22 -3
  278. package/dist/ui/slider.d.ts.map +1 -1
  279. package/dist/ui/slider.js +57 -19
  280. package/dist/ui/slider.js.map +1 -0
  281. package/dist/ui/spinner.js.map +1 -0
  282. package/dist/ui/split-button.d.ts.map +1 -1
  283. package/dist/ui/split-button.js +77 -76
  284. package/dist/ui/split-button.js.map +1 -0
  285. package/dist/ui/stack.js.map +1 -0
  286. package/dist/ui/stat-card.js.map +1 -0
  287. package/dist/ui/status-dot.js.map +1 -0
  288. package/dist/ui/stepper.d.ts +10 -0
  289. package/dist/ui/stepper.d.ts.map +1 -1
  290. package/dist/ui/stepper.js +80 -75
  291. package/dist/ui/stepper.js.map +1 -0
  292. package/dist/ui/switch.d.ts.map +1 -1
  293. package/dist/ui/switch.js +26 -22
  294. package/dist/ui/switch.js.map +1 -0
  295. package/dist/ui/table.js.map +1 -0
  296. package/dist/ui/tabs.d.ts +3 -1
  297. package/dist/ui/tabs.d.ts.map +1 -1
  298. package/dist/ui/tabs.js +68 -48
  299. package/dist/ui/tabs.js.map +1 -0
  300. package/dist/ui/text.d.ts +1 -1
  301. package/dist/ui/text.d.ts.map +1 -1
  302. package/dist/ui/text.js +10 -2
  303. package/dist/ui/text.js.map +1 -0
  304. package/dist/ui/textarea.js +1 -1
  305. package/dist/ui/textarea.js.map +1 -0
  306. package/dist/ui/toast-registry.d.ts +8 -0
  307. package/dist/ui/toast-registry.d.ts.map +1 -0
  308. package/dist/ui/toast-registry.js +13 -0
  309. package/dist/ui/toast-registry.js.map +1 -0
  310. package/dist/ui/toast.d.ts.map +1 -1
  311. package/dist/ui/toast.js +141 -136
  312. package/dist/ui/toast.js.map +1 -0
  313. package/dist/ui/toaster.d.ts.map +1 -1
  314. package/dist/ui/toaster.js +15 -14
  315. package/dist/ui/toaster.js.map +1 -0
  316. package/dist/ui/toggle-group.d.ts +2 -0
  317. package/dist/ui/toggle-group.d.ts.map +1 -1
  318. package/dist/ui/toggle-group.js +23 -16
  319. package/dist/ui/toggle-group.js.map +1 -0
  320. package/dist/ui/toggle.d.ts +2 -0
  321. package/dist/ui/toggle.d.ts.map +1 -1
  322. package/dist/ui/toggle.js +14 -6
  323. package/dist/ui/toggle.js.map +1 -0
  324. package/dist/ui/tooltip.js.map +1 -0
  325. package/dist/ui/visually-hidden.js.map +1 -0
  326. package/docs/components/_header.md +85 -85
  327. package/docs/components/composed/activity-feed.md +62 -62
  328. package/docs/components/composed/avatar-group.md +65 -65
  329. package/docs/components/composed/bulk-action-bar.md +40 -40
  330. package/docs/components/composed/command-palette.md +40 -40
  331. package/docs/components/composed/confirm-dialog.md +46 -46
  332. package/docs/components/composed/content-card.md +36 -36
  333. package/docs/components/composed/date-picker.md +130 -130
  334. package/docs/components/composed/deadline-indicator.md +27 -27
  335. package/docs/components/composed/emoji-picker.md +52 -52
  336. package/docs/components/composed/empty-state.md +53 -53
  337. package/docs/components/composed/error-boundary.md +29 -29
  338. package/docs/components/composed/file-preview.md +40 -40
  339. package/docs/components/composed/filter-bar.md +57 -57
  340. package/docs/components/composed/form-section.md +31 -31
  341. package/docs/components/composed/global-loading.md +27 -27
  342. package/docs/components/composed/inline-edit.md +35 -35
  343. package/docs/components/composed/loading-skeleton.md +51 -51
  344. package/docs/components/composed/markdown-viewer.md +27 -27
  345. package/docs/components/composed/master-detail.md +48 -48
  346. package/docs/components/composed/member-picker.md +35 -35
  347. package/docs/components/composed/multi-select-popover.md +62 -62
  348. package/docs/components/composed/page-header.md +41 -41
  349. package/docs/components/composed/page-skeletons.md +32 -32
  350. package/docs/components/composed/priority-indicator.md +32 -32
  351. package/docs/components/composed/responsive-overlay.md +34 -34
  352. package/docs/components/composed/rich-text-editor.md +82 -82
  353. package/docs/components/composed/schedule-view.md +39 -39
  354. package/docs/components/composed/simple-tooltip.md +33 -33
  355. package/docs/components/composed/status-badge.md +55 -55
  356. package/docs/components/shell/app-command-palette.md +44 -44
  357. package/docs/components/shell/bottom-navbar.md +52 -52
  358. package/docs/components/shell/command-registry.md +48 -48
  359. package/docs/components/shell/link-context.md +41 -41
  360. package/docs/components/shell/notification-center.md +63 -63
  361. package/docs/components/shell/notification-preferences.md +42 -42
  362. package/docs/components/shell/sidebar.md +92 -92
  363. package/docs/components/shell/top-bar.md +143 -143
  364. package/docs/components/ui/accordion.md +51 -51
  365. package/docs/components/ui/alert-dialog.md +61 -61
  366. package/docs/components/ui/alert.md +46 -46
  367. package/docs/components/ui/aspect-ratio.md +25 -25
  368. package/docs/components/ui/autocomplete.md +48 -48
  369. package/docs/components/ui/avatar.md +56 -56
  370. package/docs/components/ui/badge.md +83 -82
  371. package/docs/components/ui/banner.md +42 -42
  372. package/docs/components/ui/breadcrumb.md +37 -37
  373. package/docs/components/ui/button-group.md +41 -41
  374. package/docs/components/ui/button.md +94 -93
  375. package/docs/components/ui/card.md +52 -52
  376. package/docs/components/ui/charts.md +43 -43
  377. package/docs/components/ui/checkbox.md +36 -36
  378. package/docs/components/ui/chip.md +47 -47
  379. package/docs/components/ui/code.md +28 -28
  380. package/docs/components/ui/collapsible.md +40 -40
  381. package/docs/components/ui/color-input.md +91 -91
  382. package/docs/components/ui/color-swatch.md +25 -25
  383. package/docs/components/ui/combobox.md +54 -54
  384. package/docs/components/ui/container.md +26 -26
  385. package/docs/components/ui/context-menu.md +43 -43
  386. package/docs/components/ui/data-table-body.md +1 -1
  387. package/docs/components/ui/data-table-bulk-actions.md +1 -1
  388. package/docs/components/ui/data-table-card.md +1 -1
  389. package/docs/components/ui/data-table-context.md +1 -1
  390. package/docs/components/ui/data-table-header.md +1 -1
  391. package/docs/components/ui/data-table-pagination.md +1 -1
  392. package/docs/components/ui/data-table-toolbar.md +44 -44
  393. package/docs/components/ui/data-table.md +94 -94
  394. package/docs/components/ui/dialog.md +54 -54
  395. package/docs/components/ui/dropdown-menu.md +48 -48
  396. package/docs/components/ui/file-upload.md +41 -41
  397. package/docs/components/ui/form.md +51 -51
  398. package/docs/components/ui/hover-card.md +32 -32
  399. package/docs/components/ui/icon-button.md +40 -40
  400. package/docs/components/ui/input-otp.md +44 -44
  401. package/docs/components/ui/input.md +74 -74
  402. package/docs/components/ui/label.md +25 -25
  403. package/docs/components/ui/link.md +29 -29
  404. package/docs/components/ui/menubar.md +44 -44
  405. package/docs/components/ui/navigation-menu.md +46 -46
  406. package/docs/components/ui/number-input.md +44 -44
  407. package/docs/components/ui/pagination.md +48 -48
  408. package/docs/components/ui/popover.md +30 -30
  409. package/docs/components/ui/progress-ring.md +41 -41
  410. package/docs/components/ui/progress.md +34 -34
  411. package/docs/components/ui/radio.md +34 -34
  412. package/docs/components/ui/search-input.md +43 -43
  413. package/docs/components/ui/segmented-control.md +50 -50
  414. package/docs/components/ui/select.md +53 -53
  415. package/docs/components/ui/separator.md +32 -32
  416. package/docs/components/ui/sheet.md +47 -47
  417. package/docs/components/ui/sidebar.md +72 -72
  418. package/docs/components/ui/skeleton.md +77 -77
  419. package/docs/components/ui/slider.md +29 -29
  420. package/docs/components/ui/spinner.md +54 -54
  421. package/docs/components/ui/stack.md +39 -39
  422. package/docs/components/ui/stat-card.md +61 -61
  423. package/docs/components/ui/status-dot.md +26 -26
  424. package/docs/components/ui/stepper.md +49 -49
  425. package/docs/components/ui/switch.md +47 -47
  426. package/docs/components/ui/table.md +47 -47
  427. package/docs/components/ui/tabs.md +60 -60
  428. package/docs/components/ui/text.md +37 -37
  429. package/docs/components/ui/textarea.md +39 -39
  430. package/docs/components/ui/toast.md +65 -65
  431. package/docs/components/ui/toaster.md +47 -47
  432. package/docs/components/ui/toggle-group.md +43 -43
  433. package/docs/components/ui/toggle.md +37 -37
  434. package/docs/components/ui/tooltip.md +38 -38
  435. package/docs/components/ui/tree-view.md +65 -65
  436. package/docs/components/ui/visually-hidden.md +21 -21
  437. package/llms-full.txt +5266 -5264
  438. package/llms.txt +624 -580
  439. package/package.json +7 -8
@@ -1,27 +1,28 @@
1
1
  "use client";
2
- import { $t as e, en as t, in as n, rn as r } from "./primitives.js";
2
+ import { ln as e, mn as t, pn as n, un as r } from "./primitives.js";
3
3
  import { a as i, c as a, n as o } from "./framer.js";
4
- import { cn as s } from "../ui/lib/utils.js";
5
- import { Spinner as c } from "../ui/spinner.js";
6
- import { Icon as l } from "../ui/icon.js";
7
- import { Button as u } from "../ui/button.js";
4
+ import { durations as s } from "../ui/lib/motion.js";
5
+ import { cn as c } from "../ui/lib/utils.js";
6
+ import { Spinner as l } from "../ui/spinner.js";
7
+ import { Icon as u } from "../ui/icon.js";
8
8
  import { useIsMobile as d } from "../hooks/use-mobile.js";
9
- import { Dialog as f, DialogContent as p, DialogFooter as m, DialogHeader as h, DialogTitle as g } from "../ui/dialog.js";
10
- import { SplitButton as _ } from "../ui/split-button.js";
11
- import { emojiDataLoaders as v } from "../composed/emoji-picker.js";
12
- import { c as y, d as b, g as x, h as S, i as C, l as w, m as ee, n as te, o as ne, r as T, s as re, t as E, y as ie } from "./tiptap.js";
13
- import { a as ae, i as oe, n as se, o as ce, r as le, t as ue } from "./mention-suggestion.js";
14
- import { useColorMode as de } from "../hooks/use-color-mode.js";
15
- import { n as fe, t as D } from "./use-calendar.js";
16
- import * as O from "react";
17
- import { useCallback as k, useEffect as pe, useRef as A, useState as j } from "react";
18
- import { Fragment as me, jsx as M, jsxs as N } from "react/jsx-runtime";
19
- import * as he from "react-dom";
20
- import { IconAt as ge, IconBlockquote as P, IconBold as _e, IconCalendarEvent as ve, IconChevronDown as ye, IconClock as be, IconCode as xe, IconFile as Se, IconHighlight as Ce, IconItalic as F, IconLink as we, IconList as I, IconListNumbers as Te, IconMicrophone as Ee, IconMoodSmile as De, IconPencil as Oe, IconPlayerPause as ke, IconPlayerPlay as L, IconPlus as Ae, IconSend as je, IconSlash as R, IconSquare as Me, IconStrikethrough as z, IconTextSize as Ne, IconTrash as Pe, IconUnderline as Fe, IconX as B } from "@tabler/icons-react";
21
- import { createRoot as Ie } from "react-dom/client";
9
+ import { Button as f } from "../ui/button.js";
10
+ import { Dialog as p, DialogContent as m, DialogFooter as h, DialogHeader as g, DialogTitle as _ } from "../ui/dialog.js";
11
+ import { SplitButton as v } from "../ui/split-button.js";
12
+ import { emojiDataLoaders as y } from "../composed/emoji-picker.js";
13
+ import { c as b, d as x, g as ee, h as S, i as C, l as te, m as ne, n as re, o as ie, r as w, s as ae, t as T, y as oe } from "./tiptap.js";
14
+ import { a as se, i as ce, n as le, o as ue, r as de, t as fe } from "./mention-suggestion.js";
15
+ import { useColorMode as pe } from "../hooks/use-color-mode.js";
16
+ import { n as me, t as E } from "./use-calendar.js";
17
+ import * as D from "react";
18
+ import { useCallback as O, useEffect as he, useRef as k, useState as A } from "react";
19
+ import { Fragment as ge, jsx as j, jsxs as M } from "react/jsx-runtime";
20
+ import * as _e from "react-dom";
21
+ import { IconAt as ve, IconBlockquote as N, IconBold as ye, IconCalendarEvent as be, IconChevronDown as xe, IconClock as Se, IconCode as Ce, IconFile as we, IconHighlight as Te, IconItalic as P, IconLink as Ee, IconList as F, IconListNumbers as De, IconMicrophone as Oe, IconMoodSmile as ke, IconPencil as Ae, IconPlayerPause as je, IconPlayerPlay as I, IconPlus as Me, IconSend as Ne, IconSlash as L, IconSquare as Pe, IconStrikethrough as R, IconTextSize as Fe, IconTrash as Ie, IconUnderline as Le, IconX as z } from "@tabler/icons-react";
22
+ import { createRoot as Re } from "react-dom/client";
22
23
  //#region src/composed/extensions/slash-command.tsx
23
- var V = O.forwardRef(({ groups: e, query: t, command: n }, r) => {
24
- let [i, a] = O.useState(0), o = O.useMemo(() => {
24
+ var B = D.forwardRef(({ groups: e, query: t, command: n }, r) => {
25
+ let [i, a] = D.useState(0), o = D.useMemo(() => {
25
26
  let n = t.toLowerCase(), r = [];
26
27
  return e.forEach((e, t) => {
27
28
  e.commands.forEach((e) => {
@@ -32,48 +33,48 @@ var V = O.forwardRef(({ groups: e, query: t, command: n }, r) => {
32
33
  });
33
34
  }), r;
34
35
  }, [e, t]);
35
- if (O.useEffect(() => a(0), [o]), O.useImperativeHandle(r, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (a((e) => (e + o.length - 1) % o.length), !0) : e.key === "ArrowDown" ? (a((e) => (e + 1) % o.length), !0) : e.key === "Enter" ? (o[i] && n(o[i].command), !0) : !1 })), !o.length) return null;
36
- let c = [], l = 0;
36
+ if (D.useEffect(() => a(0), [o]), D.useImperativeHandle(r, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (a((e) => (e + o.length - 1) % o.length), !0) : e.key === "ArrowDown" ? (a((e) => (e + 1) % o.length), !0) : e.key === "Enter" ? (o[i] && n(o[i].command), !0) : !1 })), !o.length) return null;
37
+ let s = [], l = 0;
37
38
  for (let t of o) {
38
- let n = e[t.groupIndex].label, r = c[c.length - 1];
39
+ let n = e[t.groupIndex].label, r = s[s.length - 1];
39
40
  (!r || r.label !== n) && (r = {
40
41
  label: n,
41
42
  items: []
42
- }, c.push(r)), r.items.push({
43
+ }, s.push(r)), r.items.push({
43
44
  command: t.command,
44
45
  flatIndex: l
45
46
  }), l++;
46
47
  }
47
- return /* @__PURE__ */ M("div", {
48
+ return /* @__PURE__ */ j("div", {
48
49
  role: "listbox",
49
50
  "aria-label": "Slash commands",
50
51
  className: "z-popover max-h-[320px] min-w-[220px] overflow-x-hidden overflow-y-auto rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-floating",
51
- children: c.map((e, t) => /* @__PURE__ */ N("div", {
52
+ children: s.map((e, t) => /* @__PURE__ */ M("div", {
52
53
  role: "group",
53
54
  "aria-label": e.label,
54
55
  children: [
55
- t > 0 && /* @__PURE__ */ M("div", { className: "my-ds-01 border-t border-surface-border" }),
56
- /* @__PURE__ */ M("div", {
56
+ t > 0 && /* @__PURE__ */ j("div", { className: "my-ds-01 border-t border-surface-border" }),
57
+ /* @__PURE__ */ j("div", {
57
58
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
58
59
  children: e.label
59
60
  }),
60
61
  e.items.map(({ command: e, flatIndex: t }) => {
61
62
  let r = e.icon;
62
- return /* @__PURE__ */ N("button", {
63
+ return /* @__PURE__ */ M("button", {
63
64
  type: "button",
64
65
  role: "option",
65
66
  "aria-selected": t === i,
66
67
  onClick: () => n(e),
67
- className: s("flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 text-left cursor-pointer", t === i ? "bg-surface-raised-hover" : "hover:bg-surface-raised-hover"),
68
- children: [r && /* @__PURE__ */ M("span", {
68
+ className: c("flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 text-left cursor-pointer", t === i ? "bg-surface-raised-hover" : "hover:bg-surface-raised-hover"),
69
+ children: [r && /* @__PURE__ */ j("span", {
69
70
  className: "flex h-4 w-4 shrink-0 items-center justify-center text-surface-fg-muted",
70
- children: /* @__PURE__ */ M(r, { className: "h-4 w-4" })
71
- }), /* @__PURE__ */ N("div", {
71
+ children: /* @__PURE__ */ j(r, { className: "h-4 w-4" })
72
+ }), /* @__PURE__ */ M("div", {
72
73
  className: "flex flex-col",
73
- children: [/* @__PURE__ */ M("span", {
74
+ children: [/* @__PURE__ */ j("span", {
74
75
  className: "text-ds-sm text-surface-fg",
75
76
  children: e.label
76
- }), e.description && /* @__PURE__ */ M("span", {
77
+ }), e.description && /* @__PURE__ */ j("span", {
77
78
  className: "text-ds-xs text-surface-fg-subtle",
78
79
  children: e.description
79
80
  })]
@@ -84,15 +85,15 @@ var V = O.forwardRef(({ groups: e, query: t, command: n }, r) => {
84
85
  }, e.label))
85
86
  });
86
87
  });
87
- V.displayName = "SlashCommandList";
88
- function Le(e) {
88
+ B.displayName = "SlashCommandList";
89
+ function ze(e) {
89
90
  return () => {
90
91
  let t = null, n = null, r = null;
91
92
  return {
92
93
  onStart: (i) => {
93
94
  n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
94
95
  let a = i.clientRect?.();
95
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = Ie(n), t.render(/* @__PURE__ */ M(V, {
96
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = Re(n), t.render(/* @__PURE__ */ j(B, {
96
97
  ref: (e) => {
97
98
  r = e;
98
99
  },
@@ -104,7 +105,7 @@ function Le(e) {
104
105
  onUpdate: (i) => {
105
106
  if (!t || !n) return;
106
107
  let a = i.clientRect?.();
107
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ M(V, {
108
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ j(B, {
108
109
  ref: (e) => {
109
110
  r = e;
110
111
  },
@@ -120,13 +121,13 @@ function Le(e) {
120
121
  };
121
122
  };
122
123
  }
123
- function Re(e) {
124
+ function Be(e) {
124
125
  let t = e.flatMap((e) => e.commands);
125
- return x.create({
126
+ return ee.create({
126
127
  name: "slashCommand",
127
128
  addProseMirrorPlugins() {
128
- return [T({
129
- pluginKey: new ie("slashCommand"),
129
+ return [w({
130
+ pluginKey: new oe("slashCommand"),
130
131
  editor: this.editor,
131
132
  char: "/",
132
133
  startOfLine: !0,
@@ -139,15 +140,15 @@ function Re(e) {
139
140
  command: ({ editor: e, range: t, props: n }) => {
140
141
  e.chain().focus().deleteRange(t).run(), n.action(e);
141
142
  },
142
- render: Le(e)
143
+ render: ze(e)
143
144
  })];
144
145
  }
145
146
  });
146
147
  }
147
148
  //#endregion
148
149
  //#region src/composed/rich-chat-input/reply-banner.tsx
149
- function ze({ author: e, preview: t, onDismiss: n }) {
150
- return /* @__PURE__ */ M(i.div, {
150
+ function Ve({ author: e, preview: t, onDismiss: n }) {
151
+ return /* @__PURE__ */ j(i.div, {
151
152
  initial: {
152
153
  height: 0,
153
154
  opacity: 0
@@ -161,7 +162,7 @@ function ze({ author: e, preview: t, onDismiss: n }) {
161
162
  opacity: 0
162
163
  },
163
164
  transition: {
164
- duration: .24,
165
+ duration: s.moderate02,
165
166
  ease: [
166
167
  .2,
167
168
  0,
@@ -170,34 +171,34 @@ function ze({ author: e, preview: t, onDismiss: n }) {
170
171
  ]
171
172
  },
172
173
  className: "overflow-hidden",
173
- children: /* @__PURE__ */ N("div", {
174
+ children: /* @__PURE__ */ M("div", {
174
175
  role: "status",
175
176
  "aria-label": `Replying to ${e}`,
176
177
  className: "flex items-center gap-ds-03 border-b border-surface-border px-ds-04 py-ds-02b",
177
- children: [/* @__PURE__ */ N("div", {
178
+ children: [/* @__PURE__ */ M("div", {
178
179
  className: "flex-1 min-w-0",
179
180
  children: [
180
- /* @__PURE__ */ N("span", {
181
+ /* @__PURE__ */ M("span", {
181
182
  className: "text-ds-sm font-semibold text-surface-fg",
182
183
  children: ["Replying to ", e]
183
184
  }),
184
- /* @__PURE__ */ M("span", {
185
+ /* @__PURE__ */ j("span", {
185
186
  className: "mx-ds-02 text-surface-fg-subtle",
186
187
  children: "·"
187
188
  }),
188
- /* @__PURE__ */ M("span", {
189
+ /* @__PURE__ */ j("span", {
189
190
  className: "text-ds-sm text-surface-fg-muted truncate",
190
191
  children: t
191
192
  })
192
193
  ]
193
- }), /* @__PURE__ */ M("button", {
194
+ }), /* @__PURE__ */ j("button", {
194
195
  type: "button",
195
196
  onClick: n,
196
- className: s("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target", "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", "transition-colors duration-fast-01 ease-productive-standard", "active:scale-95"),
197
+ className: c("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target", "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", "transition-colors duration-fast-01 ease-productive-standard", "active:scale-95"),
197
198
  "aria-label": "Cancel reply",
198
199
  title: "Cancel reply",
199
- children: /* @__PURE__ */ M(l, {
200
- icon: B,
200
+ children: /* @__PURE__ */ j(u, {
201
+ icon: z,
201
202
  size: "xs"
202
203
  })
203
204
  })]
@@ -206,7 +207,7 @@ function ze({ author: e, preview: t, onDismiss: n }) {
206
207
  }
207
208
  //#endregion
208
209
  //#region src/composed/rich-chat-input/schedule-send.tsx
209
- function Be() {
210
+ function He() {
210
211
  let e = /* @__PURE__ */ new Date(), t = e.getHours(), n = [], r = (t, n = 0) => {
211
212
  let r = new Date(e);
212
213
  return r.setDate(r.getDate() + n), r.setHours(t, 0, 0, 0), r;
@@ -254,62 +255,62 @@ function Be() {
254
255
  date: a
255
256
  }), n;
256
257
  }
257
- function Ve({ value: e, onChange: t }) {
258
+ function Ue({ value: e, onChange: t }) {
258
259
  let n = e.getHours() % 12 || 12, r = e.getMinutes(), i = e.getHours() >= 12, a = (n) => {
259
260
  let r = new Date(e);
260
261
  r.setHours(i ? n % 12 + 12 : n % 12), t(r);
261
262
  }, o = (n) => {
262
263
  let r = new Date(e);
263
264
  r.setMinutes(n), t(r);
264
- }, c = (n) => {
265
+ }, s = (n) => {
265
266
  let r = new Date(e), i = r.getHours();
266
267
  n && i < 12 ? r.setHours(i + 12) : !n && i >= 12 && r.setHours(i - 12), t(r);
267
268
  };
268
- return /* @__PURE__ */ N("div", {
269
+ return /* @__PURE__ */ M("div", {
269
270
  className: "flex items-center gap-ds-02",
270
271
  children: [
271
- /* @__PURE__ */ M("select", {
272
+ /* @__PURE__ */ j("select", {
272
273
  value: n,
273
274
  onChange: (e) => a(Number(e.target.value)),
274
275
  className: "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
275
276
  "aria-label": "Hour",
276
- children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ M("option", {
277
+ children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ j("option", {
277
278
  value: e,
278
279
  children: e
279
280
  }, e))
280
281
  }),
281
- /* @__PURE__ */ M("span", {
282
+ /* @__PURE__ */ j("span", {
282
283
  className: "text-ds-sm text-surface-fg-subtle font-medium",
283
284
  children: ":"
284
285
  }),
285
- /* @__PURE__ */ M("select", {
286
+ /* @__PURE__ */ j("select", {
286
287
  value: r - r % 5,
287
288
  onChange: (e) => o(Number(e.target.value)),
288
289
  className: "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-02 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
289
290
  "aria-label": "Minute",
290
- children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ M("option", {
291
+ children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ j("option", {
291
292
  value: e,
292
293
  children: String(e).padStart(2, "0")
293
294
  }, e))
294
295
  }),
295
- /* @__PURE__ */ N("div", {
296
+ /* @__PURE__ */ M("div", {
296
297
  className: "inline-flex rounded-ds-md border border-surface-border-strong overflow-hidden",
297
- children: [/* @__PURE__ */ M("button", {
298
+ children: [/* @__PURE__ */ j("button", {
298
299
  type: "button",
299
- onClick: () => c(!1),
300
- className: s("px-ds-02b py-ds-01 text-ds-xs font-medium transition-colors duration-fast-01", i ? "bg-surface-raised text-surface-fg-subtle hover:bg-surface-raised-hover" : "bg-accent-9 text-white"),
300
+ onClick: () => s(!1),
301
+ className: c("px-ds-02b py-ds-01 text-ds-xs font-medium transition-colors duration-fast-01", i ? "bg-surface-raised text-surface-fg-subtle hover:bg-surface-raised-hover" : "bg-accent-9 text-white"),
301
302
  children: "AM"
302
- }), /* @__PURE__ */ M("button", {
303
+ }), /* @__PURE__ */ j("button", {
303
304
  type: "button",
304
- onClick: () => c(!0),
305
- className: s("px-ds-02b py-ds-01 text-ds-xs font-medium transition-colors duration-fast-01", i ? "bg-accent-9 text-white" : "bg-surface-raised text-surface-fg-subtle hover:bg-surface-raised-hover"),
305
+ onClick: () => s(!0),
306
+ className: c("px-ds-02b py-ds-01 text-ds-xs font-medium transition-colors duration-fast-01", i ? "bg-accent-9 text-white" : "bg-surface-raised text-surface-fg-subtle hover:bg-surface-raised-hover"),
306
307
  children: "PM"
307
308
  })]
308
309
  })
309
310
  ]
310
311
  });
311
312
  }
312
- function He({ value: e, onChange: t, minDate: n }) {
313
+ function We({ value: e, onChange: t, minDate: n }) {
313
314
  let r = /* @__PURE__ */ new Date(), i = e ?? (() => {
314
315
  let e = new Date(r);
315
316
  return e.setHours(e.getHours() + 1, 0, 0, 0), e;
@@ -319,40 +320,40 @@ function He({ value: e, onChange: t, minDate: n }) {
319
320
  let r = new Date(i);
320
321
  r.setFullYear(Number(n[0]), Number(n[1]) - 1, Number(n[2])), t(r);
321
322
  }, s = n ? `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, "0")}-${String(n.getDate()).padStart(2, "0")}` : void 0;
322
- return /* @__PURE__ */ N("div", {
323
+ return /* @__PURE__ */ M("div", {
323
324
  className: "space-y-ds-03",
324
- children: [/* @__PURE__ */ N("div", {
325
+ children: [/* @__PURE__ */ M("div", {
325
326
  className: "flex items-center justify-between",
326
- children: [/* @__PURE__ */ M("span", {
327
+ children: [/* @__PURE__ */ j("span", {
327
328
  className: "text-ds-xs font-medium text-surface-fg-subtle",
328
329
  children: "Date"
329
- }), /* @__PURE__ */ M("input", {
330
+ }), /* @__PURE__ */ j("input", {
330
331
  type: "date",
331
332
  value: a,
332
333
  min: s,
333
334
  onChange: o,
334
335
  className: "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-raised px-ds-03 text-ds-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9"
335
336
  })]
336
- }), /* @__PURE__ */ N("div", {
337
+ }), /* @__PURE__ */ M("div", {
337
338
  className: "flex items-center justify-between",
338
- children: [/* @__PURE__ */ M("span", {
339
+ children: [/* @__PURE__ */ j("span", {
339
340
  className: "text-ds-xs font-medium text-surface-fg-subtle",
340
341
  children: "Time"
341
- }), /* @__PURE__ */ M(Ve, {
342
+ }), /* @__PURE__ */ j(Ue, {
342
343
  value: i,
343
344
  onChange: t
344
345
  })]
345
346
  })]
346
347
  });
347
348
  }
348
- function Ue({ value: e, onChange: t, minDate: n }) {
349
+ function Ge({ value: e, onChange: t, minDate: n }) {
349
350
  let r = /* @__PURE__ */ new Date(), i = e ?? (() => {
350
351
  let e = new Date(r);
351
352
  return e.setHours(e.getHours() + 1, 0, 0, 0), e;
352
- })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = D(i);
353
- return /* @__PURE__ */ N("div", {
353
+ })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = E(i);
354
+ return /* @__PURE__ */ M("div", {
354
355
  className: "space-y-ds-03",
355
- children: [/* @__PURE__ */ M(fe, {
356
+ children: [/* @__PURE__ */ j(me, {
356
357
  currentMonth: a,
357
358
  selected: i,
358
359
  onSelect: (e) => {
@@ -364,50 +365,50 @@ function Ue({ value: e, onChange: t, minDate: n }) {
364
365
  },
365
366
  minDate: n,
366
367
  className: "w-full"
367
- }), /* @__PURE__ */ N("div", {
368
+ }), /* @__PURE__ */ M("div", {
368
369
  className: "flex items-center justify-between border-t border-surface-border pt-ds-03",
369
- children: [/* @__PURE__ */ M("span", {
370
+ children: [/* @__PURE__ */ j("span", {
370
371
  className: "text-ds-xs font-medium text-surface-fg-subtle",
371
372
  children: "Time"
372
- }), /* @__PURE__ */ M(Ve, {
373
+ }), /* @__PURE__ */ j(Ue, {
373
374
  value: i,
374
375
  onChange: t
375
376
  })]
376
377
  })]
377
378
  });
378
379
  }
379
- function We({ onSchedule: e, onClose: t, onOpenDialog: n }) {
380
- let [r, i] = O.useState(!1), [a, o] = O.useState(null), s = O.useMemo(() => Be(), []), c = (n) => {
380
+ function Ke({ onSchedule: e, onClose: t, onOpenDialog: n }) {
381
+ let [r, i] = D.useState(!1), [a, o] = D.useState(null), s = D.useMemo(() => He(), []), c = (n) => {
381
382
  e(n), t();
382
383
  };
383
- return r ? /* @__PURE__ */ N("div", {
384
+ return r ? /* @__PURE__ */ M("div", {
384
385
  className: "p-ds-04",
385
386
  style: { minWidth: 270 },
386
387
  children: [
387
- /* @__PURE__ */ N("div", {
388
+ /* @__PURE__ */ M("div", {
388
389
  className: "mb-ds-03 flex items-center justify-between",
389
- children: [/* @__PURE__ */ M("p", {
390
+ children: [/* @__PURE__ */ j("p", {
390
391
  className: "text-ds-sm font-medium text-surface-fg",
391
392
  children: "Pick date & time"
392
- }), /* @__PURE__ */ M("button", {
393
+ }), /* @__PURE__ */ j("button", {
393
394
  type: "button",
394
395
  onClick: () => i(!1),
395
396
  className: "inline-flex items-center justify-center rounded-ds-md p-ds-01 text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg transition-colors",
396
397
  "aria-label": "Back to presets",
397
- children: /* @__PURE__ */ M(l, {
398
- icon: B,
398
+ children: /* @__PURE__ */ j(u, {
399
+ icon: z,
399
400
  size: "sm"
400
401
  })
401
402
  })]
402
403
  }),
403
- /* @__PURE__ */ M(He, {
404
+ /* @__PURE__ */ j(We, {
404
405
  value: a,
405
406
  onChange: o,
406
407
  minDate: /* @__PURE__ */ new Date()
407
408
  }),
408
- /* @__PURE__ */ M("div", {
409
+ /* @__PURE__ */ j("div", {
409
410
  className: "mt-ds-03 flex justify-end",
410
- children: /* @__PURE__ */ M(u, {
411
+ children: /* @__PURE__ */ j(f, {
411
412
  variant: "solid",
412
413
  size: "sm",
413
414
  onClick: () => {
@@ -418,43 +419,43 @@ function We({ onSchedule: e, onClose: t, onOpenDialog: n }) {
418
419
  })
419
420
  })
420
421
  ]
421
- }) : /* @__PURE__ */ N("div", {
422
+ }) : /* @__PURE__ */ M("div", {
422
423
  className: "p-ds-02",
423
424
  style: { minWidth: 260 },
424
425
  children: [
425
- /* @__PURE__ */ M("p", {
426
+ /* @__PURE__ */ j("p", {
426
427
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
427
428
  children: "Schedule send"
428
429
  }),
429
- s.map((e, t) => /* @__PURE__ */ N("button", {
430
+ s.map((e, t) => /* @__PURE__ */ M("button", {
430
431
  type: "button",
431
432
  onClick: () => c(e.date),
432
433
  className: "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
433
- children: [/* @__PURE__ */ M(l, {
434
- icon: be,
434
+ children: [/* @__PURE__ */ j(u, {
435
+ icon: Se,
435
436
  size: "sm",
436
437
  className: "shrink-0 text-surface-fg-muted"
437
438
  }), e.label]
438
439
  }, t)),
439
- /* @__PURE__ */ M("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
440
- /* @__PURE__ */ N("button", {
440
+ /* @__PURE__ */ j("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
441
+ /* @__PURE__ */ M("button", {
441
442
  type: "button",
442
443
  onClick: () => i(!0),
443
444
  className: "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
444
- children: [/* @__PURE__ */ M(l, {
445
- icon: ve,
445
+ children: [/* @__PURE__ */ j(u, {
446
+ icon: be,
446
447
  size: "sm",
447
448
  className: "shrink-0 text-accent-11"
448
449
  }), "Pick date & time..."]
449
450
  }),
450
- n && /* @__PURE__ */ N("button", {
451
+ n && /* @__PURE__ */ M("button", {
451
452
  type: "button",
452
453
  onClick: () => {
453
454
  n(), t();
454
455
  },
455
456
  className: "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02b text-ds-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
456
- children: [/* @__PURE__ */ M(l, {
457
- icon: ve,
457
+ children: [/* @__PURE__ */ j(u, {
458
+ icon: be,
458
459
  size: "sm",
459
460
  className: "shrink-0 text-surface-fg-muted"
460
461
  }), "Open full picker..."]
@@ -462,29 +463,29 @@ function We({ onSchedule: e, onClose: t, onOpenDialog: n }) {
462
463
  ]
463
464
  });
464
465
  }
465
- function Ge({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
466
- let [i, a] = O.useState(r ?? null);
467
- return O.useEffect(() => {
466
+ function qe({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
467
+ let [i, a] = D.useState(r ?? null);
468
+ return D.useEffect(() => {
468
469
  e && a(r ?? null);
469
- }, [e, r]), /* @__PURE__ */ M(f, {
470
+ }, [e, r]), /* @__PURE__ */ j(p, {
470
471
  open: e,
471
472
  onOpenChange: t,
472
- children: /* @__PURE__ */ N(p, {
473
+ children: /* @__PURE__ */ M(m, {
473
474
  className: "sm:max-w-[380px]",
474
475
  children: [
475
- /* @__PURE__ */ M(h, { children: /* @__PURE__ */ M(g, { children: r ? "Reschedule message" : "Schedule send" }) }),
476
- /* @__PURE__ */ M(Ue, {
476
+ /* @__PURE__ */ j(g, { children: /* @__PURE__ */ j(_, { children: r ? "Reschedule message" : "Schedule send" }) }),
477
+ /* @__PURE__ */ j(Ge, {
477
478
  value: i,
478
479
  onChange: a,
479
480
  minDate: /* @__PURE__ */ new Date()
480
481
  }),
481
- /* @__PURE__ */ N(m, {
482
+ /* @__PURE__ */ M(h, {
482
483
  className: "gap-ds-02",
483
- children: [/* @__PURE__ */ M(u, {
484
+ children: [/* @__PURE__ */ j(f, {
484
485
  variant: "soft",
485
486
  onClick: () => t(!1),
486
487
  children: "Cancel"
487
- }), /* @__PURE__ */ M(u, {
488
+ }), /* @__PURE__ */ j(f, {
488
489
  variant: "solid",
489
490
  onClick: () => {
490
491
  i && i > /* @__PURE__ */ new Date() && (n(i), t(!1));
@@ -497,7 +498,7 @@ function Ge({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
497
498
  })
498
499
  });
499
500
  }
500
- function Ke(e) {
501
+ function Je(e) {
501
502
  let t = /* @__PURE__ */ new Date(), n = new Date(t);
502
503
  n.setDate(n.getDate() + 1);
503
504
  let r = e.toDateString() === t.toDateString(), i = e.toDateString() === n.toDateString(), a = e.toLocaleTimeString(void 0, {
@@ -510,8 +511,8 @@ function Ke(e) {
510
511
  day: "numeric"
511
512
  })} at ${a}`;
512
513
  }
513
- function qe({ date: e, onClear: t, onEdit: n }) {
514
- return /* @__PURE__ */ M(i.div, {
514
+ function Ye({ date: e, onClear: t, onEdit: n }) {
515
+ return /* @__PURE__ */ j(i.div, {
515
516
  initial: {
516
517
  height: 0,
517
518
  opacity: 0
@@ -524,37 +525,37 @@ function qe({ date: e, onClear: t, onEdit: n }) {
524
525
  height: 0,
525
526
  opacity: 0
526
527
  },
527
- transition: { duration: .15 },
528
+ transition: { duration: s.moderate01 },
528
529
  className: "overflow-hidden",
529
- children: /* @__PURE__ */ N("div", {
530
+ children: /* @__PURE__ */ M("div", {
530
531
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b text-ds-xs text-accent-11 bg-accent-2 border-b border-accent-4",
531
532
  children: [
532
- /* @__PURE__ */ M(l, {
533
- icon: be,
533
+ /* @__PURE__ */ j(u, {
534
+ icon: Se,
534
535
  size: "xs",
535
536
  className: "shrink-0"
536
537
  }),
537
- /* @__PURE__ */ N("span", {
538
+ /* @__PURE__ */ M("span", {
538
539
  className: "flex-1 truncate",
539
- children: ["Scheduled for ", Ke(e)]
540
+ children: ["Scheduled for ", Je(e)]
540
541
  }),
541
- n && /* @__PURE__ */ M("button", {
542
+ n && /* @__PURE__ */ j("button", {
542
543
  type: "button",
543
544
  onClick: n,
544
545
  className: "inline-flex shrink-0 items-center justify-center rounded-ds-sm p-ds-01 hover:bg-accent-3 transition-colors",
545
546
  "aria-label": "Edit schedule",
546
- children: /* @__PURE__ */ M(l, {
547
- icon: Oe,
547
+ children: /* @__PURE__ */ j(u, {
548
+ icon: Ae,
548
549
  size: "xs"
549
550
  })
550
551
  }),
551
- /* @__PURE__ */ M("button", {
552
+ /* @__PURE__ */ j("button", {
552
553
  type: "button",
553
554
  onClick: t,
554
555
  className: "inline-flex shrink-0 items-center justify-center rounded-ds-sm p-ds-01 hover:bg-accent-3 transition-colors",
555
556
  "aria-label": "Cancel schedule",
556
- children: /* @__PURE__ */ M(l, {
557
- icon: B,
557
+ children: /* @__PURE__ */ j(u, {
558
+ icon: z,
558
559
  size: "xs"
559
560
  })
560
561
  })
@@ -564,11 +565,11 @@ function qe({ date: e, onClear: t, onEdit: n }) {
564
565
  }
565
566
  //#endregion
566
567
  //#region src/composed/rich-chat-input/attachment-strip.tsx
567
- function Je(e) {
568
+ function Xe(e) {
568
569
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
569
570
  }
570
- function Ye({ attachments: e, onRemoveAttachment: t }) {
571
- return /* @__PURE__ */ M(i.div, {
571
+ function Ze({ attachments: e, onRemoveAttachment: t }) {
572
+ return /* @__PURE__ */ j(i.div, {
572
573
  initial: {
573
574
  height: 0,
574
575
  opacity: 0
@@ -582,7 +583,7 @@ function Ye({ attachments: e, onRemoveAttachment: t }) {
582
583
  opacity: 0
583
584
  },
584
585
  transition: {
585
- duration: .24,
586
+ duration: s.moderate02,
586
587
  ease: [
587
588
  .2,
588
589
  0,
@@ -591,13 +592,13 @@ function Ye({ attachments: e, onRemoveAttachment: t }) {
591
592
  ]
592
593
  },
593
594
  className: "overflow-hidden",
594
- children: /* @__PURE__ */ M("div", {
595
+ children: /* @__PURE__ */ j("div", {
595
596
  role: "list",
596
597
  "aria-label": "Attachments",
597
598
  className: "flex gap-ds-02 overflow-x-auto px-ds-04 py-ds-02b border-b border-surface-border",
598
- children: /* @__PURE__ */ M(a, {
599
+ children: /* @__PURE__ */ j(a, {
599
600
  initial: !1,
600
- children: e.map((e) => e.type === "image" ? /* @__PURE__ */ N(i.div, {
601
+ children: e.map((e) => e.type === "image" ? /* @__PURE__ */ M(i.div, {
601
602
  role: "listitem",
602
603
  "aria-label": `Image: ${e.name}`,
603
604
  layout: !0,
@@ -624,33 +625,33 @@ function Ye({ attachments: e, onRemoveAttachment: t }) {
624
625
  stiffness: 400,
625
626
  damping: 30
626
627
  },
627
- opacity: { duration: .11 }
628
+ opacity: { duration: s.fast02 }
628
629
  },
629
630
  className: "relative h-12 w-12 shrink-0 group",
630
631
  children: [
631
- /* @__PURE__ */ M("img", {
632
+ /* @__PURE__ */ j("img", {
632
633
  src: e.url,
633
634
  alt: e.name,
634
635
  className: "h-full w-full rounded-ds-md object-cover"
635
636
  }),
636
- /* @__PURE__ */ M("button", {
637
+ /* @__PURE__ */ j("button", {
637
638
  onClick: () => t(e.id),
638
639
  className: "absolute -top-1 -right-1 h-ico-sm w-ico-sm rounded-full bg-error-9 text-error-fg flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
639
640
  "aria-label": `Remove ${e.name}`,
640
641
  title: "Remove",
641
- children: /* @__PURE__ */ M(l, {
642
- icon: B,
642
+ children: /* @__PURE__ */ j(u, {
643
+ icon: z,
643
644
  size: "xs"
644
645
  })
645
646
  }),
646
- e.uploading && /* @__PURE__ */ M("div", {
647
+ e.uploading && /* @__PURE__ */ j("div", {
647
648
  className: "absolute inset-0 rounded-ds-md bg-surface-overlay/50 flex items-center justify-center",
648
- children: /* @__PURE__ */ M(c, { size: "sm" })
649
+ children: /* @__PURE__ */ j(l, { size: "sm" })
649
650
  })
650
651
  ]
651
- }, e.id) : /* @__PURE__ */ N(i.div, {
652
+ }, e.id) : /* @__PURE__ */ M(i.div, {
652
653
  role: "listitem",
653
- "aria-label": `File: ${e.name}, ${Je(e.size)}`,
654
+ "aria-label": `File: ${e.name}, ${Xe(e.size)}`,
654
655
  layout: !0,
655
656
  initial: {
656
657
  scale: 0,
@@ -675,30 +676,30 @@ function Ye({ attachments: e, onRemoveAttachment: t }) {
675
676
  stiffness: 400,
676
677
  damping: 30
677
678
  },
678
- opacity: { duration: .11 }
679
+ opacity: { duration: s.fast02 }
679
680
  },
680
681
  className: "flex items-center gap-ds-02 shrink-0 rounded-ds-md bg-surface-raised px-ds-03 py-ds-01 group",
681
682
  children: [
682
- /* @__PURE__ */ M(l, {
683
- icon: Se,
683
+ /* @__PURE__ */ j(u, {
684
+ icon: we,
684
685
  size: "xs",
685
686
  className: "text-surface-fg-muted"
686
687
  }),
687
- /* @__PURE__ */ M("span", {
688
+ /* @__PURE__ */ j("span", {
688
689
  className: "text-ds-xs text-surface-fg-muted truncate max-w-[120px]",
689
690
  children: e.name
690
691
  }),
691
- /* @__PURE__ */ M("span", {
692
+ /* @__PURE__ */ j("span", {
692
693
  className: "text-ds-xs text-surface-fg-subtle",
693
- children: Je(e.size)
694
+ children: Xe(e.size)
694
695
  }),
695
- /* @__PURE__ */ M("button", {
696
+ /* @__PURE__ */ j("button", {
696
697
  onClick: () => t(e.id),
697
698
  className: "text-surface-fg-subtle hover:text-error-11 opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
698
699
  "aria-label": `Remove ${e.name}`,
699
700
  title: "Remove",
700
- children: /* @__PURE__ */ M(l, {
701
- icon: B,
701
+ children: /* @__PURE__ */ j(u, {
702
+ icon: z,
702
703
  size: "xs"
703
704
  })
704
705
  })
@@ -710,9 +711,9 @@ function Ye({ attachments: e, onRemoveAttachment: t }) {
710
711
  }
711
712
  //#endregion
712
713
  //#region src/composed/rich-chat-input/audio-waveform.tsx
713
- var H = O.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: a = 2, barCount: o = 40, height: c = 32, className: l, ...u }, d) {
714
- let [f, p] = O.useState(() => Array(o).fill(.05)), m = O.useRef(0), h = O.useRef(f);
715
- O.useEffect(() => {
714
+ var V = D.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: a = 2, barCount: o = 40, height: s = 32, className: l, ...u }, d) {
715
+ let [f, p] = D.useState(() => Array(o).fill(.05)), m = D.useRef(0), h = D.useRef(f);
716
+ D.useEffect(() => {
716
717
  if (e !== "live" || !t) return;
717
718
  let n = new Uint8Array(t.frequencyBinCount), r = () => {
718
719
  t.getByteFrequencyData(n);
@@ -730,7 +731,7 @@ var H = O.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
730
731
  e,
731
732
  t,
732
733
  o
733
- ]), O.useEffect(() => {
734
+ ]), D.useEffect(() => {
734
735
  if (!(e !== "static" || !n)) if (n.length === o) p(n);
735
736
  else {
736
737
  let e = Array(o), t = n.length / o;
@@ -745,13 +746,13 @@ var H = O.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
745
746
  n,
746
747
  o
747
748
  ]);
748
- let g = o * (i + a) - a, _ = O.useMemo(() => f.map((t, n) => {
749
- let s = Math.max(2, t * c), l = n * (i + a), u = (c - s) / 2, d = e === "static" && r > 0 && n / o <= r;
750
- return /* @__PURE__ */ M("rect", {
749
+ let g = o * (i + a) - a, _ = D.useMemo(() => f.map((t, n) => {
750
+ let c = Math.max(2, t * s), l = n * (i + a), u = (s - c) / 2, d = e === "static" && r > 0 && n / o <= r;
751
+ return /* @__PURE__ */ j("rect", {
751
752
  x: l,
752
753
  y: u,
753
754
  width: i,
754
- height: s,
755
+ height: c,
755
756
  rx: i / 2,
756
757
  fill: d ? "var(--color-accent-9)" : "var(--color-surface-border)"
757
758
  }, n);
@@ -762,23 +763,23 @@ var H = O.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
762
763
  i,
763
764
  a,
764
765
  o,
765
- c
766
+ s
766
767
  ]);
767
- return /* @__PURE__ */ M("svg", {
768
+ return /* @__PURE__ */ j("svg", {
768
769
  ref: d,
769
- height: c,
770
- viewBox: `0 0 ${g} ${c}`,
770
+ height: s,
771
+ viewBox: `0 0 ${g} ${s}`,
771
772
  preserveAspectRatio: "none",
772
773
  "aria-hidden": "true",
773
- className: s("shrink-0", l),
774
+ className: c("shrink-0", l),
774
775
  ...u,
775
776
  children: _
776
777
  });
777
778
  });
778
- H.displayName = "AudioWaveform";
779
+ V.displayName = "AudioWaveform";
779
780
  //#endregion
780
781
  //#region src/composed/rich-chat-input/recording-overlay.tsx
781
- function Xe(e) {
782
+ function Qe(e) {
782
783
  let t = Math.floor(e / 60), n = Math.floor(e % 60);
783
784
  return {
784
785
  minutes: String(t),
@@ -786,31 +787,31 @@ function Xe(e) {
786
787
  secs: n.toString().padStart(2, "0")
787
788
  };
788
789
  }
789
- function Ze({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
790
+ function $e({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
790
791
  let i = o();
791
- O.useEffect(() => {
792
+ D.useEffect(() => {
792
793
  let e = (e) => {
793
794
  e.key === "Escape" && r();
794
795
  };
795
796
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
796
797
  }, [r]);
797
- let a = n != null && n > 0 && e >= n - 10, c = n != null && n > 0 && e >= n - 5, l = c ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", u = Xe(e), d = c ? "text-error-11" : a ? "text-warning-11" : "text-surface-fg";
798
- return /* @__PURE__ */ N("div", {
798
+ let a = n != null && n > 0 && e >= n - 10, s = n != null && n > 0 && e >= n - 5, l = s ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", u = Qe(e), d = s ? "text-error-11" : a ? "text-warning-11" : "text-surface-fg";
799
+ return /* @__PURE__ */ M("div", {
799
800
  role: "status",
800
801
  "aria-live": "polite",
801
802
  "aria-label": "Recording voice message",
802
803
  className: "absolute inset-0 flex items-center gap-ds-03 px-ds-04 py-ds-03 bg-surface-raised-hover rounded-ds-lg z-10",
803
804
  children: [
804
- /* @__PURE__ */ M("span", {
805
- className: s("w-ds-02b h-ds-02b shrink-0 rounded-ds-full bg-error-9", i ? "opacity-100" : l),
805
+ /* @__PURE__ */ j("span", {
806
+ className: c("w-ds-02b h-ds-02b shrink-0 rounded-ds-full bg-error-9", i ? "opacity-100" : l),
806
807
  "aria-hidden": "true"
807
808
  }),
808
- /* @__PURE__ */ N("span", {
809
- className: s("text-ds-sm font-mono tabular-nums whitespace-nowrap", d),
809
+ /* @__PURE__ */ M("span", {
810
+ className: c("text-ds-sm font-mono tabular-nums whitespace-nowrap", d),
810
811
  "aria-label": `${u.minutes} minutes ${u.secs} seconds`,
811
812
  children: [
812
813
  u.minutes,
813
- /* @__PURE__ */ M("span", {
814
+ /* @__PURE__ */ j("span", {
814
815
  className: i ? void 0 : "animate-[blink_1s_step-end_infinite]",
815
816
  "aria-hidden": "true",
816
817
  children: u.separator
@@ -818,9 +819,9 @@ function Ze({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
818
819
  u.secs
819
820
  ]
820
821
  }),
821
- /* @__PURE__ */ M("div", {
822
+ /* @__PURE__ */ j("div", {
822
823
  className: "flex-1 min-w-0 overflow-hidden",
823
- children: /* @__PURE__ */ M(H, {
824
+ children: /* @__PURE__ */ j(V, {
824
825
  mode: "live",
825
826
  analyserNode: t,
826
827
  height: 24,
@@ -831,262 +832,262 @@ function Ze({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
831
832
  ]
832
833
  });
833
834
  }
834
- Ze.displayName = "RecordingOverlay";
835
+ $e.displayName = "RecordingOverlay";
835
836
  //#endregion
836
837
  //#region src/composed/rich-chat-input/chat-toolbar.tsx
837
- var U = O.createContext(null);
838
- function W() {
839
- let e = O.useContext(U);
838
+ var H = D.createContext(null);
839
+ function U() {
840
+ let e = D.useContext(H);
840
841
  if (!e) throw Error("Toolbar primitives must be used inside <ChatToolbar>");
841
842
  return e;
842
843
  }
843
- function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, className: a }) {
844
- let { disabled: o } = W();
845
- return /* @__PURE__ */ M("button", {
844
+ function W({ onClick: e, isActive: t, disabled: n, title: r, children: i, className: a }) {
845
+ let { disabled: o } = U();
846
+ return /* @__PURE__ */ j("button", {
846
847
  type: "button",
847
848
  onClick: e,
848
849
  disabled: n ?? o,
849
850
  title: r,
850
851
  "aria-label": r,
851
852
  "aria-pressed": t,
852
- className: s("inline-flex h-ds-xs-plus items-center justify-center rounded-ds-md touch-target", !a?.includes("w-") && "w-ds-xs-plus", "transition-[color,background-color,transform] duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover hover:text-surface-fg", "active:scale-95", "disabled:pointer-events-none disabled:opacity-action-disabled", t ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle", a),
853
+ className: c("inline-flex h-ds-xs-plus items-center justify-center rounded-ds-md touch-target", !a?.includes("w-") && "w-ds-xs-plus", "transition-[color,background-color,transform] duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover hover:text-surface-fg", "active:scale-95", "disabled:pointer-events-none disabled:opacity-action-disabled", t ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle", a),
853
854
  children: i
854
855
  });
855
856
  }
856
- function K() {
857
- return /* @__PURE__ */ M("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
857
+ function G() {
858
+ return /* @__PURE__ */ j("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
858
859
  }
859
- function q({ children: e, className: t }) {
860
- return /* @__PURE__ */ M("div", {
861
- className: s("flex items-center gap-ds-01", t),
860
+ function K({ children: e, className: t }) {
861
+ return /* @__PURE__ */ j("div", {
862
+ className: c("flex items-center gap-ds-01", t),
862
863
  children: e
863
864
  });
864
865
  }
865
- function Qe() {
866
- let { editor: e } = W(), { isActive: t } = S({
866
+ function et() {
867
+ let { editor: e } = U(), { isActive: t } = S({
867
868
  editor: e,
868
869
  selector: ({ editor: e }) => ({ isActive: e.isActive("bold") })
869
870
  });
870
- return /* @__PURE__ */ M(G, {
871
+ return /* @__PURE__ */ j(W, {
871
872
  onClick: () => e.chain().focus().toggleBold().run(),
872
873
  isActive: t,
873
874
  title: "Bold",
874
- children: /* @__PURE__ */ M(l, {
875
- icon: _e,
875
+ children: /* @__PURE__ */ j(u, {
876
+ icon: ye,
876
877
  size: "xs"
877
878
  })
878
879
  });
879
880
  }
880
- function $e() {
881
- let { editor: e } = W(), { isActive: t } = S({
881
+ function tt() {
882
+ let { editor: e } = U(), { isActive: t } = S({
882
883
  editor: e,
883
884
  selector: ({ editor: e }) => ({ isActive: e.isActive("italic") })
884
885
  });
885
- return /* @__PURE__ */ M(G, {
886
+ return /* @__PURE__ */ j(W, {
886
887
  onClick: () => e.chain().focus().toggleItalic().run(),
887
888
  isActive: t,
888
889
  title: "Italic",
889
- children: /* @__PURE__ */ M(l, {
890
- icon: F,
890
+ children: /* @__PURE__ */ j(u, {
891
+ icon: P,
891
892
  size: "xs"
892
893
  })
893
894
  });
894
895
  }
895
- function et() {
896
- let { editor: e } = W(), { isActive: t } = S({
896
+ function nt() {
897
+ let { editor: e } = U(), { isActive: t } = S({
897
898
  editor: e,
898
899
  selector: ({ editor: e }) => ({ isActive: e.isActive("underline") })
899
900
  });
900
- return /* @__PURE__ */ M(G, {
901
+ return /* @__PURE__ */ j(W, {
901
902
  onClick: () => e.chain().focus().toggleUnderline().run(),
902
903
  isActive: t,
903
904
  title: "Underline",
904
- children: /* @__PURE__ */ M(l, {
905
- icon: Fe,
905
+ children: /* @__PURE__ */ j(u, {
906
+ icon: Le,
906
907
  size: "xs"
907
908
  })
908
909
  });
909
910
  }
910
- function tt() {
911
- let { editor: e } = W(), { isActive: t } = S({
911
+ function rt() {
912
+ let { editor: e } = U(), { isActive: t } = S({
912
913
  editor: e,
913
914
  selector: ({ editor: e }) => ({ isActive: e.isActive("strike") })
914
915
  });
915
- return /* @__PURE__ */ M(G, {
916
+ return /* @__PURE__ */ j(W, {
916
917
  onClick: () => e.chain().focus().toggleStrike().run(),
917
918
  isActive: t,
918
919
  title: "Strikethrough",
919
- children: /* @__PURE__ */ M(l, {
920
- icon: z,
920
+ children: /* @__PURE__ */ j(u, {
921
+ icon: R,
921
922
  size: "xs"
922
923
  })
923
924
  });
924
925
  }
925
- function nt() {
926
- let { editor: e } = W(), { isActive: t } = S({
926
+ function it() {
927
+ let { editor: e } = U(), { isActive: t } = S({
927
928
  editor: e,
928
929
  selector: ({ editor: e }) => ({ isActive: e.isActive("highlight") })
929
930
  });
930
- return /* @__PURE__ */ M(G, {
931
+ return /* @__PURE__ */ j(W, {
931
932
  onClick: () => e.chain().focus().toggleHighlight().run(),
932
933
  isActive: t,
933
934
  title: "Highlight",
934
- children: /* @__PURE__ */ M(l, {
935
- icon: Ce,
935
+ children: /* @__PURE__ */ j(u, {
936
+ icon: Te,
936
937
  size: "xs"
937
938
  })
938
939
  });
939
940
  }
940
- function rt() {
941
- let { editor: e } = W(), { isActive: t } = S({
941
+ function at() {
942
+ let { editor: e } = U(), { isActive: t } = S({
942
943
  editor: e,
943
944
  selector: ({ editor: e }) => ({ isActive: e.isActive("code") })
944
945
  });
945
- return /* @__PURE__ */ M(G, {
946
+ return /* @__PURE__ */ j(W, {
946
947
  onClick: () => e.chain().focus().toggleCode().run(),
947
948
  isActive: t,
948
949
  title: "Inline code",
949
- children: /* @__PURE__ */ M(l, {
950
- icon: xe,
950
+ children: /* @__PURE__ */ j(u, {
951
+ icon: Ce,
951
952
  size: "xs"
952
953
  })
953
954
  });
954
955
  }
955
- function it() {
956
- let { editor: e } = W(), { isActive: t } = S({
956
+ function ot() {
957
+ let { editor: e } = U(), { isActive: t } = S({
957
958
  editor: e,
958
959
  selector: ({ editor: e }) => ({ isActive: e.isActive("bulletList") })
959
960
  });
960
- return /* @__PURE__ */ M(G, {
961
+ return /* @__PURE__ */ j(W, {
961
962
  onClick: () => e.chain().focus().toggleBulletList().run(),
962
963
  isActive: t,
963
964
  title: "Bullet list",
964
- children: /* @__PURE__ */ M(l, {
965
- icon: I,
965
+ children: /* @__PURE__ */ j(u, {
966
+ icon: F,
966
967
  size: "xs"
967
968
  })
968
969
  });
969
970
  }
970
- function J() {
971
- let { editor: e } = W(), { isActive: t } = S({
971
+ function q() {
972
+ let { editor: e } = U(), { isActive: t } = S({
972
973
  editor: e,
973
974
  selector: ({ editor: e }) => ({ isActive: e.isActive("orderedList") })
974
975
  });
975
- return /* @__PURE__ */ M(G, {
976
+ return /* @__PURE__ */ j(W, {
976
977
  onClick: () => e.chain().focus().toggleOrderedList().run(),
977
978
  isActive: t,
978
979
  title: "Ordered list",
979
- children: /* @__PURE__ */ M(l, {
980
- icon: Te,
980
+ children: /* @__PURE__ */ j(u, {
981
+ icon: De,
981
982
  size: "xs"
982
983
  })
983
984
  });
984
985
  }
985
- function at() {
986
- let { editor: e } = W(), { isActive: t } = S({
986
+ function st() {
987
+ let { editor: e } = U(), { isActive: t } = S({
987
988
  editor: e,
988
989
  selector: ({ editor: e }) => ({ isActive: e.isActive("blockquote") })
989
990
  });
990
- return /* @__PURE__ */ M(G, {
991
+ return /* @__PURE__ */ j(W, {
991
992
  onClick: () => e.chain().focus().toggleBlockquote().run(),
992
993
  isActive: t,
993
994
  title: "Quote",
994
- children: /* @__PURE__ */ M(l, {
995
- icon: P,
995
+ children: /* @__PURE__ */ j(u, {
996
+ icon: N,
996
997
  size: "xs"
997
998
  })
998
999
  });
999
1000
  }
1000
- function Y() {
1001
- let { editor: e } = W(), { isActive: t } = S({
1001
+ function J() {
1002
+ let { editor: e } = U(), { isActive: t } = S({
1002
1003
  editor: e,
1003
1004
  selector: ({ editor: e }) => ({ isActive: e.isActive("link") })
1004
1005
  });
1005
- return /* @__PURE__ */ M(G, {
1006
+ return /* @__PURE__ */ j(W, {
1006
1007
  onClick: () => {
1007
1008
  let t = window.prompt("URL");
1008
1009
  t && e.chain().focus().setLink({ href: t }).run();
1009
1010
  },
1010
1011
  isActive: t,
1011
1012
  title: "Link",
1012
- children: /* @__PURE__ */ M(l, {
1013
- icon: we,
1013
+ children: /* @__PURE__ */ j(u, {
1014
+ icon: Ee,
1014
1015
  size: "xs"
1015
1016
  })
1016
1017
  });
1017
1018
  }
1018
- function ot() {
1019
- let { editor: e } = W();
1020
- return /* @__PURE__ */ M(G, {
1019
+ function ct() {
1020
+ let { editor: e } = U();
1021
+ return /* @__PURE__ */ j(W, {
1021
1022
  onClick: () => e.chain().focus().insertContent("@").run(),
1022
1023
  title: "Mention",
1023
- children: /* @__PURE__ */ M(l, {
1024
- icon: ge,
1024
+ children: /* @__PURE__ */ j(u, {
1025
+ icon: ve,
1025
1026
  size: "xs"
1026
1027
  })
1027
1028
  });
1028
1029
  }
1029
- function st() {
1030
- let { editor: e } = W();
1031
- return /* @__PURE__ */ M(G, {
1030
+ function lt() {
1031
+ let { editor: e } = U();
1032
+ return /* @__PURE__ */ j(W, {
1032
1033
  onClick: () => e.chain().focus().insertContent(":").run(),
1033
1034
  title: "Emoji",
1034
- children: /* @__PURE__ */ M(l, {
1035
- icon: De,
1035
+ children: /* @__PURE__ */ j(u, {
1036
+ icon: ke,
1036
1037
  size: "xs"
1037
1038
  })
1038
1039
  });
1039
1040
  }
1040
- function ct() {
1041
- let { editor: e } = W();
1042
- return /* @__PURE__ */ M(G, {
1041
+ function ut() {
1042
+ let { editor: e } = U();
1043
+ return /* @__PURE__ */ j(W, {
1043
1044
  onClick: () => e.chain().focus().insertContent("/").run(),
1044
1045
  title: "Slash command",
1045
- children: /* @__PURE__ */ M(l, {
1046
- icon: R,
1046
+ children: /* @__PURE__ */ j(u, {
1047
+ icon: L,
1047
1048
  size: "xs"
1048
1049
  })
1049
1050
  });
1050
1051
  }
1051
- function X({ items: e, isMobile: t, hasMentions: n, hasSlashCommands: r }) {
1052
+ function Y({ items: e, isMobile: t, hasMentions: n, hasSlashCommands: r }) {
1052
1053
  let i = (t) => !e || e.includes(t);
1053
- return /* @__PURE__ */ N(me, { children: [
1054
- !t && /* @__PURE__ */ N(q, { children: [
1055
- i("bold") && /* @__PURE__ */ M(Qe, {}),
1056
- i("italic") && /* @__PURE__ */ M($e, {}),
1057
- i("underline") && /* @__PURE__ */ M(et, {}),
1058
- i("strike") && /* @__PURE__ */ M(tt, {}),
1059
- i("highlight") && /* @__PURE__ */ M(nt, {})
1054
+ return /* @__PURE__ */ M(ge, { children: [
1055
+ !t && /* @__PURE__ */ M(K, { children: [
1056
+ i("bold") && /* @__PURE__ */ j(et, {}),
1057
+ i("italic") && /* @__PURE__ */ j(tt, {}),
1058
+ i("underline") && /* @__PURE__ */ j(nt, {}),
1059
+ i("strike") && /* @__PURE__ */ j(rt, {}),
1060
+ i("highlight") && /* @__PURE__ */ j(it, {})
1060
1061
  ] }),
1061
- !t && /* @__PURE__ */ M(K, {}),
1062
- !t && /* @__PURE__ */ N(q, { children: [i("bulletList") && /* @__PURE__ */ M(it, {}), i("orderedList") && /* @__PURE__ */ M(J, {})] }),
1063
- !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ M(K, {}),
1064
- !t && /* @__PURE__ */ N(q, { children: [
1065
- i("blockquote") && /* @__PURE__ */ M(at, {}),
1066
- i("link") && /* @__PURE__ */ M(Y, {}),
1067
- i("code") && /* @__PURE__ */ M(rt, {})
1062
+ !t && /* @__PURE__ */ j(G, {}),
1063
+ !t && /* @__PURE__ */ M(K, { children: [i("bulletList") && /* @__PURE__ */ j(ot, {}), i("orderedList") && /* @__PURE__ */ j(q, {})] }),
1064
+ !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ j(G, {}),
1065
+ !t && /* @__PURE__ */ M(K, { children: [
1066
+ i("blockquote") && /* @__PURE__ */ j(st, {}),
1067
+ i("link") && /* @__PURE__ */ j(J, {}),
1068
+ i("code") && /* @__PURE__ */ j(at, {})
1068
1069
  ] }),
1069
- !t && (n || r) && /* @__PURE__ */ M(K, {}),
1070
- /* @__PURE__ */ N(q, { children: [
1071
- n && i("mention") && /* @__PURE__ */ M(ot, {}),
1072
- i("emoji") && /* @__PURE__ */ M(st, {}),
1073
- r && i("slash") && /* @__PURE__ */ M(ct, {})
1070
+ !t && (n || r) && /* @__PURE__ */ j(G, {}),
1071
+ /* @__PURE__ */ M(K, { children: [
1072
+ n && i("mention") && /* @__PURE__ */ j(ct, {}),
1073
+ i("emoji") && /* @__PURE__ */ j(lt, {}),
1074
+ r && i("slash") && /* @__PURE__ */ j(ut, {})
1074
1075
  ] })
1075
1076
  ] });
1076
1077
  }
1077
- function lt({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
1078
+ function dt({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
1078
1079
  if (t === !1) return null;
1079
1080
  let o = typeof t != "boolean" && !Array.isArray(t), s = Array.isArray(t) ? t : null;
1080
- return /* @__PURE__ */ M(U.Provider, {
1081
+ return /* @__PURE__ */ j(H.Provider, {
1081
1082
  value: {
1082
1083
  editor: e,
1083
1084
  disabled: a
1084
1085
  },
1085
- children: /* @__PURE__ */ M("div", {
1086
+ children: /* @__PURE__ */ j("div", {
1086
1087
  role: "toolbar",
1087
1088
  "aria-label": "Text formatting",
1088
1089
  className: "flex flex-wrap items-center gap-ds-01 border-t border-surface-border px-ds-04 py-ds-02b",
1089
- children: o ? t : /* @__PURE__ */ M(X, {
1090
+ children: o ? t : /* @__PURE__ */ j(Y, {
1090
1091
  items: s,
1091
1092
  isMobile: n,
1092
1093
  hasMentions: r,
@@ -1097,7 +1098,7 @@ function lt({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashComman
1097
1098
  }
1098
1099
  //#endregion
1099
1100
  //#region src/composed/rich-chat-input/audio-player.tsx
1100
- var ut = [
1101
+ var X = [
1101
1102
  1,
1102
1103
  1.5,
1103
1104
  2
@@ -1105,15 +1106,15 @@ var ut = [
1105
1106
  function Z(e) {
1106
1107
  return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
1107
1108
  }
1108
- var dt = O.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, a) {
1109
- let o = O.useRef(null), c = O.useRef(null), [l, u] = O.useState(!1), [d, f] = O.useState(0), [p, m] = O.useState(0), [h, g] = O.useState(null), _ = O.useMemo(() => {
1109
+ var ft = D.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, a) {
1110
+ let o = D.useRef(null), s = D.useRef(null), [l, u] = D.useState(!1), [d, f] = D.useState(0), [p, m] = D.useState(0), [h, g] = D.useState(null), _ = D.useMemo(() => {
1110
1111
  if (typeof e == "string") return e;
1111
1112
  let t = URL.createObjectURL(e);
1112
1113
  return g(t), t;
1113
1114
  }, [e]);
1114
- O.useEffect(() => () => {
1115
+ D.useEffect(() => () => {
1115
1116
  h && URL.revokeObjectURL(h);
1116
- }, [h]), O.useEffect(() => {
1117
+ }, [h]), D.useEffect(() => {
1117
1118
  let e = o.current;
1118
1119
  if (!e) return;
1119
1120
  let t = () => f(e.currentTime), n = () => {
@@ -1123,53 +1124,53 @@ var dt = O.forwardRef(function({ src: e, duration: t, waveformData: n, className
1123
1124
  e.removeEventListener("timeupdate", t), e.removeEventListener("ended", n);
1124
1125
  };
1125
1126
  }, []);
1126
- let v = O.useCallback(() => {
1127
+ let v = D.useCallback(() => {
1127
1128
  let e = o.current;
1128
1129
  e && (l ? (e.pause(), u(!1)) : (e.play(), u(!0)));
1129
- }, [l]), y = O.useCallback((e) => {
1130
+ }, [l]), y = D.useCallback((e) => {
1130
1131
  (e.key === " " || e.key === "Enter") && (e.preventDefault(), v());
1131
- }, [v]), b = O.useCallback((e) => {
1132
- let n = o.current, r = c.current;
1132
+ }, [v]), b = D.useCallback((e) => {
1133
+ let n = o.current, r = s.current;
1133
1134
  if (!n || !r || t <= 0) return;
1134
1135
  let i = r.getBoundingClientRect(), a = e.clientX - i.left;
1135
1136
  n.currentTime = Math.max(0, Math.min(1, a / i.width)) * t, f(n.currentTime);
1136
- }, [t]), x = O.useCallback(() => {
1137
- let e = (p + 1) % ut.length;
1138
- m(e), o.current && (o.current.playbackRate = ut[e]);
1139
- }, [p]), S = t > 0 ? d / t : 0, C = ut[p];
1140
- return /* @__PURE__ */ N("div", {
1137
+ }, [t]), x = D.useCallback(() => {
1138
+ let e = (p + 1) % X.length;
1139
+ m(e), o.current && (o.current.playbackRate = X[e]);
1140
+ }, [p]), ee = t > 0 ? d / t : 0, S = X[p];
1141
+ return /* @__PURE__ */ M("div", {
1141
1142
  ref: a,
1142
1143
  role: "group",
1143
1144
  "aria-label": "Voice message player",
1144
- className: s("flex items-center gap-ds-03", r),
1145
+ className: c("flex items-center gap-ds-03", r),
1145
1146
  ...i,
1146
1147
  children: [
1147
- /* @__PURE__ */ M("audio", {
1148
+ /* @__PURE__ */ j("audio", {
1148
1149
  ref: o,
1149
1150
  src: _,
1150
1151
  preload: "metadata"
1151
1152
  }),
1152
- /* @__PURE__ */ M("button", {
1153
+ /* @__PURE__ */ j("button", {
1153
1154
  type: "button",
1154
1155
  onClick: v,
1155
1156
  onKeyDown: y,
1156
1157
  "aria-label": l ? "Pause voice message" : "Play voice message",
1157
1158
  className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-ds-full bg-accent-9 text-accent-fg hover:bg-accent-10 active:scale-95 transition-colors duration-fast-01 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
1158
- children: M(l ? ke : L, {
1159
+ children: j(l ? je : I, {
1159
1160
  size: 16,
1160
1161
  stroke: 2,
1161
1162
  "aria-hidden": "true"
1162
1163
  })
1163
1164
  }),
1164
- /* @__PURE__ */ M(H, {
1165
- ref: c,
1165
+ /* @__PURE__ */ j(V, {
1166
+ ref: s,
1166
1167
  mode: "static",
1167
1168
  data: n,
1168
- progress: S,
1169
+ progress: ee,
1169
1170
  className: "cursor-pointer",
1170
1171
  onClick: b
1171
1172
  }),
1172
- /* @__PURE__ */ N("span", {
1173
+ /* @__PURE__ */ M("span", {
1173
1174
  className: "text-ds-xs tabular-nums text-surface-fg-subtle whitespace-nowrap",
1174
1175
  children: [
1175
1176
  Z(d),
@@ -1177,32 +1178,32 @@ var dt = O.forwardRef(function({ src: e, duration: t, waveformData: n, className
1177
1178
  Z(t)
1178
1179
  ]
1179
1180
  }),
1180
- /* @__PURE__ */ N("button", {
1181
+ /* @__PURE__ */ M("button", {
1181
1182
  type: "button",
1182
1183
  onClick: x,
1183
- "aria-label": `Playback speed ${C}x`,
1184
+ "aria-label": `Playback speed ${S}x`,
1184
1185
  className: "shrink-0 text-ds-xs bg-surface-raised rounded-ds-full px-ds-02 py-[1px] hover:bg-surface-raised-hover tabular-nums transition-colors duration-fast-01 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
1185
- children: [C, "x"]
1186
+ children: [S, "x"]
1186
1187
  })
1187
1188
  ]
1188
1189
  });
1189
1190
  });
1190
- dt.displayName = "AudioPlayer";
1191
+ ft.displayName = "AudioPlayer";
1191
1192
  //#endregion
1192
1193
  //#region src/composed/rich-chat-input/use-voice-recorder.ts
1193
- function ft() {
1194
+ function pt() {
1194
1195
  return typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/mp4") ? "audio/mp4" : "";
1195
1196
  }
1196
- function pt(e) {
1197
- let { maxDuration: t, onComplete: n } = e, [r, i] = j("idle"), [a, o] = j(0), [s, c] = j(null), [l, u] = j([]), d = A(null), f = A(null), p = A(null), m = A([]), h = A(null), g = A(null), _ = A(null), v = A(null), y = A(0), b = A([]), x = A(!1), S = A(n);
1198
- S.current = n;
1199
- let C = k(() => {
1197
+ function mt(e) {
1198
+ let { maxDuration: t, onComplete: n } = e, [r, i] = A("idle"), [a, o] = A(0), [s, c] = A(null), [l, u] = A([]), d = k(null), f = k(null), p = k(null), m = k([]), h = k(null), g = k(null), _ = k(null), v = k(null), y = k(0), b = k([]), x = k(!1), ee = k(n);
1199
+ ee.current = n;
1200
+ let S = O(() => {
1200
1201
  h.current !== null && (clearInterval(h.current), h.current = null), g.current !== null && (clearInterval(g.current), g.current = null), _.current !== null && (clearTimeout(_.current), _.current = null), p.current &&= (p.current.getTracks().forEach((e) => e.stop()), null), f.current &&= (f.current.close().catch(() => {}), null), v.current = null, c(null), d.current = null, m.current = [];
1201
- }, []), w = k(async () => {
1202
+ }, []), C = O(async () => {
1202
1203
  if (typeof MediaRecorder > "u") throw Error("MediaRecorder is not supported in this browser. Voice recording requires a modern browser with MediaRecorder support.");
1203
1204
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
1204
1205
  p.current = e;
1205
- let n = ft(), r = n ? new MediaRecorder(e, { mimeType: n }) : new MediaRecorder(e);
1206
+ let n = pt(), r = n ? new MediaRecorder(e, { mimeType: n }) : new MediaRecorder(e);
1206
1207
  d.current = r, m.current = [], x.current = !1;
1207
1208
  let a = new AudioContext();
1208
1209
  f.current = a;
@@ -1210,33 +1211,33 @@ function pt(e) {
1210
1211
  l.fftSize = 256, l.smoothingTimeConstant = .7, s.connect(l), v.current = l, c(l), r.ondataavailable = (e) => {
1211
1212
  e.data.size > 0 && m.current.push(e.data);
1212
1213
  }, r.onstop = () => {
1213
- if (x.current) C(), i("idle"), o(0), u([]);
1214
+ if (x.current) S(), i("idle"), o(0), u([]);
1214
1215
  else {
1215
1216
  let e = new Blob(m.current, { type: r.mimeType || "audio/webm" }), t = y.current, n = b.current;
1216
- C(), i("idle"), o(0), u([]), S.current(e, t, n);
1217
+ S(), i("idle"), o(0), u([]), ee.current(e, t, n);
1217
1218
  }
1218
1219
  }, r.start(), o(0), y.current = 0, h.current = setInterval(() => {
1219
1220
  y.current += 1, o((e) => e + 1);
1220
1221
  }, 1e3);
1221
- let w = new Uint8Array(l.frequencyBinCount);
1222
+ let C = new Uint8Array(l.frequencyBinCount);
1222
1223
  u([]), b.current = [], g.current = setInterval(() => {
1223
1224
  if (v.current) {
1224
- v.current.getByteFrequencyData(w);
1225
+ v.current.getByteFrequencyData(C);
1225
1226
  let e = 0;
1226
- for (let t = 0; t < w.length; t++) e += w[t];
1227
- let t = e / w.length / 255;
1227
+ for (let t = 0; t < C.length; t++) e += C[t];
1228
+ let t = e / C.length / 255;
1228
1229
  b.current = [...b.current, t], u((e) => [...e, t]);
1229
1230
  }
1230
1231
  }, 100), t !== void 0 && t > 0 && (_.current = setTimeout(() => {
1231
1232
  d.current && d.current.state !== "inactive" && d.current.stop();
1232
1233
  }, t * 1e3)), i("recording");
1233
- }, [t, C]), ee = k(() => {
1234
+ }, [t, S]), te = O(() => {
1234
1235
  d.current && d.current.state !== "inactive" && (x.current = !1, d.current.stop());
1235
- }, []), te = k(() => {
1236
- d.current && d.current.state !== "inactive" ? (x.current = !0, d.current.stop()) : (C(), i("idle"), o(0), u([]));
1237
- }, [C]), ne = k(() => {
1236
+ }, []), ne = O(() => {
1237
+ d.current && d.current.state !== "inactive" ? (x.current = !0, d.current.stop()) : (S(), i("idle"), o(0), u([]));
1238
+ }, [S]), re = O(() => {
1238
1239
  d.current && d.current.state === "recording" && (d.current.pause(), h.current !== null && (clearInterval(h.current), h.current = null), g.current !== null && (clearInterval(g.current), g.current = null), i("paused"));
1239
- }, []), T = k(() => {
1240
+ }, []), ie = O(() => {
1240
1241
  if (d.current && d.current.state === "paused") {
1241
1242
  d.current.resume(), h.current = setInterval(() => {
1242
1243
  y.current += 1, o((e) => e + 1);
@@ -1253,23 +1254,23 @@ function pt(e) {
1253
1254
  }, 100), i("recording");
1254
1255
  }
1255
1256
  }, []);
1256
- return pe(() => () => {
1257
+ return he(() => () => {
1257
1258
  h.current !== null && clearInterval(h.current), g.current !== null && clearInterval(g.current), _.current !== null && clearTimeout(_.current), d.current && d.current.state !== "inactive" && d.current.stop(), p.current && p.current.getTracks().forEach((e) => e.stop()), f.current && f.current.close().catch(() => {});
1258
1259
  }, []), {
1259
1260
  state: r,
1260
1261
  duration: a,
1261
1262
  analyserNode: s,
1262
1263
  waveformData: l,
1263
- start: w,
1264
- stop: ee,
1265
- cancel: te,
1266
- pause: ne,
1267
- resume: T
1264
+ start: C,
1265
+ stop: te,
1266
+ cancel: ne,
1267
+ pause: re,
1268
+ resume: ie
1268
1269
  };
1269
1270
  }
1270
1271
  //#endregion
1271
1272
  //#region src/composed/rich-chat-input.tsx
1272
- var mt = {
1273
+ var ht = {
1273
1274
  compact: {
1274
1275
  minHeight: 44,
1275
1276
  maxHeight: 256,
@@ -1294,7 +1295,7 @@ var mt = {
1294
1295
  showToolbar: !1,
1295
1296
  toolbarPosition: "top"
1296
1297
  }
1297
- }, ht = [
1298
+ }, gt = [
1298
1299
  "prose prose-sm max-w-none focus:outline-hidden",
1299
1300
  "font-body text-ds-md leading-relaxed text-surface-fg",
1300
1301
  "[&_p.is-editor-empty:first-child]:relative",
@@ -1309,73 +1310,73 @@ var mt = {
1309
1310
  "[&_a]:text-accent-11 [&_a]:underline",
1310
1311
  "[&_.mention]:rounded-ds-sm [&_.mention]:bg-accent-2 [&_.mention]:px-ds-02 [&_.mention]:py-[1px] [&_.mention]:font-medium [&_.mention]:text-accent-11"
1311
1312
  ].join(" ");
1312
- function gt({ options: e }) {
1313
- let [t, n] = O.useState(!1), r = O.useRef(null);
1314
- return O.useEffect(() => {
1313
+ function _t({ options: e }) {
1314
+ let [t, n] = D.useState(!1), r = D.useRef(null);
1315
+ return D.useEffect(() => {
1315
1316
  if (!t) return;
1316
1317
  let e = (e) => {
1317
1318
  r.current && !r.current.contains(e.target) && n(!1);
1318
1319
  };
1319
1320
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1320
- }, [t]), /* @__PURE__ */ N("div", {
1321
+ }, [t]), /* @__PURE__ */ M("div", {
1321
1322
  ref: r,
1322
1323
  className: "relative",
1323
- children: [/* @__PURE__ */ M("button", {
1324
+ children: [/* @__PURE__ */ j("button", {
1324
1325
  type: "button",
1325
1326
  onClick: () => n((e) => !e),
1326
1327
  title: "More send options",
1327
1328
  "aria-label": "More send options",
1328
1329
  "aria-expanded": t,
1329
- className: s("inline-flex h-ds-xs-plus w-5 items-center justify-center rounded-ds-md touch-target", "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg", "transition-colors duration-fast-01 ease-productive-standard", t && "bg-surface-raised-hover text-surface-fg"),
1330
- children: /* @__PURE__ */ M(l, {
1331
- icon: ye,
1330
+ className: c("inline-flex h-ds-xs-plus w-5 items-center justify-center rounded-ds-md touch-target", "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg", "transition-colors duration-fast-01 ease-productive-standard", t && "bg-surface-raised-hover text-surface-fg"),
1331
+ children: /* @__PURE__ */ j(u, {
1332
+ icon: xe,
1332
1333
  size: "xs"
1333
1334
  })
1334
- }), t && /* @__PURE__ */ N("div", {
1335
+ }), t && /* @__PURE__ */ M("div", {
1335
1336
  className: "absolute bottom-full right-0 mb-ds-02 min-w-[200px] rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-floating z-popover",
1336
- children: [/* @__PURE__ */ M("p", {
1337
+ children: [/* @__PURE__ */ j("p", {
1337
1338
  className: "px-ds-03 py-ds-01 text-ds-xs font-medium text-surface-fg-subtle",
1338
1339
  children: "Send options"
1339
- }), e.map((e, t) => /* @__PURE__ */ N("button", {
1340
+ }), e.map((e, t) => /* @__PURE__ */ M("button", {
1340
1341
  type: "button",
1341
1342
  onClick: () => {
1342
1343
  e.onSelect(), n(!1);
1343
1344
  },
1344
1345
  className: "flex w-full items-center gap-ds-03 rounded-ds-md px-ds-03 py-ds-02 text-ds-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
1345
- children: [e.icon && /* @__PURE__ */ M(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1346
+ children: [e.icon && /* @__PURE__ */ j(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1346
1347
  }, t))]
1347
1348
  })]
1348
1349
  });
1349
1350
  }
1350
- var _t = O.lazy(() => import("@emoji-mart/react"));
1351
- function vt({ set: e = "native", onSelect: t, onClose: n }) {
1352
- let [r, i] = O.useState(null), { colorMode: a } = de(), o = O.useRef(null);
1353
- O.useEffect(() => {
1354
- (v[e] ?? v.native)().then((e) => i(e.default));
1355
- }, [e]), O.useEffect(() => {
1351
+ var vt = D.lazy(() => import("@emoji-mart/react"));
1352
+ function yt({ set: e = "native", onSelect: t, onClose: n }) {
1353
+ let [r, i] = D.useState(null), { colorMode: a } = pe(), o = D.useRef(null);
1354
+ D.useEffect(() => {
1355
+ (y[e] ?? y.native)().then((e) => i(e.default));
1356
+ }, [e]), D.useEffect(() => {
1356
1357
  let e = (e) => {
1357
1358
  o.current && !o.current.contains(e.target) && n();
1358
1359
  };
1359
1360
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1360
- }, [n]), O.useEffect(() => {
1361
+ }, [n]), D.useEffect(() => {
1361
1362
  let e = (e) => {
1362
1363
  e.key === "Escape" && n();
1363
1364
  };
1364
1365
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1365
1366
  }, [n]);
1366
- let s = /* @__PURE__ */ M("div", {
1367
+ let s = /* @__PURE__ */ j("div", {
1367
1368
  className: "flex h-[350px] w-[352px] items-center justify-center rounded-ds-lg border border-surface-border-strong bg-surface-overlay shadow-floating",
1368
- children: /* @__PURE__ */ M("span", {
1369
+ children: /* @__PURE__ */ j("span", {
1369
1370
  className: "text-ds-sm text-surface-fg-subtle",
1370
1371
  children: "Loading..."
1371
1372
  })
1372
1373
  });
1373
- return /* @__PURE__ */ M("div", {
1374
+ return /* @__PURE__ */ j("div", {
1374
1375
  ref: o,
1375
1376
  className: "rounded-ds-lg border border-surface-border-strong bg-surface-overlay shadow-floating overflow-hidden",
1376
- children: r ? /* @__PURE__ */ M(O.Suspense, {
1377
+ children: r ? /* @__PURE__ */ j(D.Suspense, {
1377
1378
  fallback: s,
1378
- children: /* @__PURE__ */ M(_t, {
1379
+ children: /* @__PURE__ */ j(vt, {
1379
1380
  data: r,
1380
1381
  set: e,
1381
1382
  onEmojiSelect: (e) => t({
@@ -1390,17 +1391,17 @@ function vt({ set: e = "native", onSelect: t, onClose: n }) {
1390
1391
  });
1391
1392
  }
1392
1393
  function Q({ onClick: e, isActive: t = !1, title: n, children: r }) {
1393
- return /* @__PURE__ */ M("button", {
1394
+ return /* @__PURE__ */ j("button", {
1394
1395
  type: "button",
1395
1396
  onClick: e,
1396
1397
  title: n,
1397
1398
  "aria-label": n,
1398
1399
  "aria-pressed": t,
1399
- className: s("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", t ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1400
+ className: c("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", t ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1400
1401
  children: r
1401
1402
  });
1402
1403
  }
1403
- function yt({ editor: e }) {
1404
+ function bt({ editor: e }) {
1404
1405
  let t = S({
1405
1406
  editor: e,
1406
1407
  selector: ({ editor: e }) => ({
@@ -1412,78 +1413,78 @@ function yt({ editor: e }) {
1412
1413
  isCode: e.isActive("code")
1413
1414
  })
1414
1415
  });
1415
- return /* @__PURE__ */ N(E, {
1416
+ return /* @__PURE__ */ M(T, {
1416
1417
  editor: e,
1417
1418
  className: "flex gap-ds-01 rounded-ds-lg border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-floating",
1418
1419
  children: [
1419
- /* @__PURE__ */ M(Q, {
1420
+ /* @__PURE__ */ j(Q, {
1420
1421
  onClick: () => e.chain().focus().toggleBold().run(),
1421
1422
  isActive: t.isBold,
1422
1423
  title: "Bold",
1423
- children: /* @__PURE__ */ M(l, {
1424
- icon: _e,
1424
+ children: /* @__PURE__ */ j(u, {
1425
+ icon: ye,
1425
1426
  size: "xs"
1426
1427
  })
1427
1428
  }),
1428
- /* @__PURE__ */ M(Q, {
1429
+ /* @__PURE__ */ j(Q, {
1429
1430
  onClick: () => e.chain().focus().toggleItalic().run(),
1430
1431
  isActive: t.isItalic,
1431
1432
  title: "Italic",
1432
- children: /* @__PURE__ */ M(l, {
1433
- icon: F,
1433
+ children: /* @__PURE__ */ j(u, {
1434
+ icon: P,
1434
1435
  size: "xs"
1435
1436
  })
1436
1437
  }),
1437
- /* @__PURE__ */ M(Q, {
1438
+ /* @__PURE__ */ j(Q, {
1438
1439
  onClick: () => e.chain().focus().toggleUnderline().run(),
1439
1440
  isActive: t.isUnderline,
1440
1441
  title: "Underline",
1441
- children: /* @__PURE__ */ M(l, {
1442
- icon: Fe,
1442
+ children: /* @__PURE__ */ j(u, {
1443
+ icon: Le,
1443
1444
  size: "xs"
1444
1445
  })
1445
1446
  }),
1446
- /* @__PURE__ */ M(Q, {
1447
+ /* @__PURE__ */ j(Q, {
1447
1448
  onClick: () => e.chain().focus().toggleStrike().run(),
1448
1449
  isActive: t.isStrike,
1449
1450
  title: "Strikethrough",
1450
- children: /* @__PURE__ */ M(l, {
1451
- icon: z,
1451
+ children: /* @__PURE__ */ j(u, {
1452
+ icon: R,
1452
1453
  size: "xs"
1453
1454
  })
1454
1455
  }),
1455
- /* @__PURE__ */ M(Q, {
1456
+ /* @__PURE__ */ j(Q, {
1456
1457
  onClick: () => e.chain().focus().toggleHighlight().run(),
1457
1458
  isActive: t.isHighlight,
1458
1459
  title: "Highlight",
1459
- children: /* @__PURE__ */ M(l, {
1460
- icon: Ce,
1460
+ children: /* @__PURE__ */ j(u, {
1461
+ icon: Te,
1461
1462
  size: "xs"
1462
1463
  })
1463
1464
  }),
1464
- /* @__PURE__ */ M(Q, {
1465
+ /* @__PURE__ */ j(Q, {
1465
1466
  onClick: () => e.chain().focus().toggleCode().run(),
1466
1467
  isActive: t.isCode,
1467
1468
  title: "Code",
1468
- children: /* @__PURE__ */ M(l, {
1469
- icon: xe,
1469
+ children: /* @__PURE__ */ j(u, {
1470
+ icon: Ce,
1470
1471
  size: "xs"
1471
1472
  })
1472
1473
  })
1473
1474
  ]
1474
1475
  });
1475
1476
  }
1476
- var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message...", disabled: f = !1, content: p = "", variant: m = "compact", enterBehavior: h = "send", maxLength: g, charCountDisplay: v = "near-limit", mentions: T, onMentionSearch: E, onMentionSelect: ie, onFileUpload: de, onImageUpload: fe, slashCommands: D, onVoiceRecord: k, onTranscribe: pe, maxDuration: A, replyTo: j, onTyping: me, onEmpty: ge, isStreaming: P = !1, onCancel: _e, leadingSlot: ve, trailingSlot: ye, disclaimer: xe, toolbar: Se = !0, sendOptions: Ce, onSchedule: F, actionButton: we, emojiSet: I = "native", className: Te, ...Oe }, ke) {
1477
- let [L, R] = O.useState("idle"), [z, Fe] = O.useState(!1), [B, Ie] = O.useState(!1), [V, Le] = O.useState(null), [Be, Ve] = O.useState(!1), [He, Ue] = O.useState(!1), [Ke, Je] = O.useState(0), H = O.useRef(null), Xe = O.useRef(null);
1478
- O.useEffect(() => {
1479
- if (!B || !H.current || !Xe.current) return;
1480
- let i = H.current, a = Xe.current, o = () => {
1477
+ var xt = D.forwardRef(function({ onSubmit: o, placeholder: l = "Type a message...", disabled: p = !1, content: m = "", variant: h = "compact", enterBehavior: g = "send", maxLength: _, charCountDisplay: y = "near-limit", mentions: w, onMentionSearch: T, onMentionSelect: oe, onFileUpload: pe, onImageUpload: me, slashCommands: E, onVoiceRecord: O, onTranscribe: he, maxDuration: k, replyTo: A, onTyping: ge, onEmpty: ve, isStreaming: N = !1, onCancel: ye, leadingSlot: be, trailingSlot: xe, disclaimer: Ce, toolbar: we = !0, sendOptions: Te, onSchedule: P, actionButton: Ee, emojiSet: F = "native", className: De, ...Ae }, je) {
1478
+ let [I, L] = D.useState("idle"), [R, Le] = D.useState(!1), [z, Re] = D.useState(!1), [B, ze] = D.useState(null), [He, Ue] = D.useState(!1), [We, Ge] = D.useState(!1), [Je, Xe] = D.useState(0), V = D.useRef(null), Qe = D.useRef(null);
1479
+ D.useEffect(() => {
1480
+ if (!z || !V.current || !Qe.current) return;
1481
+ let i = V.current, a = Qe.current, o = () => {
1481
1482
  e(i, a, {
1482
1483
  placement: "top-end",
1483
1484
  middleware: [
1484
- r(8),
1485
- t(),
1486
- n({ padding: 8 })
1485
+ n(8),
1486
+ r(),
1487
+ t({ padding: 8 })
1487
1488
  ]
1488
1489
  }).then(({ x: e, y: t }) => {
1489
1490
  Object.assign(a.style, {
@@ -1495,36 +1496,36 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1495
1496
  return o(), window.addEventListener("scroll", o, !0), window.addEventListener("resize", o), () => {
1496
1497
  window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
1497
1498
  };
1498
- }, [B]);
1499
- let [U, W] = O.useState([]), [G, K] = O.useState(null), [q, Qe] = O.useState(!1), $e = O.useRef(null), et = O.useRef(null), tt = O.useRef(void 0), nt = O.useRef(void 0), rt = O.useRef(h);
1500
- rt.current = h;
1501
- let it = d(), J = mt[m], at = J.maxHeight, Y = pt({
1502
- maxDuration: A,
1499
+ }, [z]);
1500
+ let [H, U] = D.useState([]), [W, G] = D.useState(null), [K, et] = D.useState(!1), tt = D.useRef(null), nt = D.useRef(null), rt = D.useRef(void 0), it = D.useRef(void 0), at = D.useRef(g);
1501
+ at.current = g;
1502
+ let ot = d(), q = ht[h], st = q.maxHeight, J = mt({
1503
+ maxDuration: k,
1503
1504
  onComplete: async (e, t, n) => {
1504
- if (k?.(e, t), pe) {
1505
- let n = await pe(e, t);
1505
+ if (O?.(e, t), he) {
1506
+ let n = await he(e, t);
1506
1507
  if (n != null) {
1507
- X?.chain().focus().insertContent(n).run(), R("idle");
1508
+ Y?.chain().focus().insertContent(n).run(), L("idle");
1508
1509
  return;
1509
1510
  }
1510
1511
  }
1511
- K({
1512
+ G({
1512
1513
  blob: e,
1513
1514
  duration: t,
1514
1515
  waveformData: n
1515
- }), R("review");
1516
+ }), L("review");
1516
1517
  }
1517
- }), ot = O.useCallback(() => {
1518
- Y.start(), R("recording");
1519
- }, [Y]), st = O.useCallback(() => {
1520
- Y.stop();
1521
- }, [Y]), ct = O.useCallback(() => {
1522
- Y.cancel(), R("idle");
1523
- }, [Y]), X = ee({
1518
+ }), ct = D.useCallback(() => {
1519
+ J.start(), L("recording");
1520
+ }, [J]), lt = D.useCallback(() => {
1521
+ J.stop();
1522
+ }, [J]), ut = D.useCallback(() => {
1523
+ J.cancel(), L("idle");
1524
+ }, [J]), Y = ne({
1524
1525
  immediatelyRender: !1,
1525
- extensions: O.useMemo(() => {
1526
+ extensions: D.useMemo(() => {
1526
1527
  let e = [
1527
- re.configure({
1528
+ ae.configure({
1528
1529
  heading: !1,
1529
1530
  horizontalRule: !1,
1530
1531
  codeBlock: !1,
@@ -1534,94 +1535,94 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1534
1535
  HTMLAttributes: { class: "text-accent-11 underline" }
1535
1536
  }
1536
1537
  }),
1537
- w.configure({ placeholder: c }),
1538
- ne.configure({ multicolor: !1 }),
1538
+ te.configure({ placeholder: l }),
1539
+ ie.configure({ multicolor: !1 }),
1539
1540
  C,
1540
- y.configure({ limit: g || void 0 }),
1541
- ce,
1542
- le,
1543
- se(I),
1544
- x.create({
1541
+ b.configure({ limit: _ || void 0 }),
1542
+ ue,
1543
+ de,
1544
+ le(F),
1545
+ ee.create({
1545
1546
  name: "enterToSend",
1546
1547
  addKeyboardShortcuts() {
1547
1548
  return {
1548
- Enter: () => rt.current === "send" ? (nt.current?.(), !0) : !1,
1549
- "Shift-Enter": () => rt.current === "send" ? (this.editor.commands.splitBlock(), !0) : !1,
1550
- "Mod-Enter": () => (nt.current?.(), !0)
1549
+ Enter: () => at.current === "send" ? (it.current?.(), !0) : !1,
1550
+ "Shift-Enter": () => at.current === "send" ? (this.editor.commands.splitBlock(), !0) : !1,
1551
+ "Mod-Enter": () => (it.current?.(), !0)
1551
1552
  };
1552
1553
  }
1553
1554
  })
1554
1555
  ];
1555
- return (T || E) && e.push(te.configure({
1556
+ return (w || T) && e.push(re.configure({
1556
1557
  HTMLAttributes: { class: "mention" },
1557
1558
  suggestion: {
1558
- items: async ({ query: e }) => E ? await E(e) : T ? T.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [],
1559
- render: ue(ie)
1559
+ items: async ({ query: e }) => T ? await T(e) : w ? w.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [],
1560
+ render: fe(oe)
1560
1561
  }
1561
- })), D && e.push(Re(D)), e;
1562
+ })), E && e.push(Be(E)), e;
1562
1563
  }, [
1563
- c,
1564
- g,
1565
- I,
1564
+ l,
1565
+ _,
1566
+ F,
1567
+ !!w,
1566
1568
  !!T,
1567
- !!E,
1568
- !!D
1569
+ !!E
1569
1570
  ]),
1570
- content: p || void 0,
1571
- editable: !f,
1571
+ content: m || void 0,
1572
+ editable: !p,
1572
1573
  editorProps: {
1573
- attributes: { class: ht },
1574
+ attributes: { class: gt },
1574
1575
  handlePaste: (e, t) => {
1575
1576
  let n = Array.from(t.clipboardData?.files ?? []);
1576
1577
  return n.length > 0 ? (n.forEach(Z), !0) : !1;
1577
1578
  }
1578
1579
  }
1579
- }), ut = O.useCallback(() => {
1580
- if (!X) return;
1581
- let e = !X.isEmpty, t = U.length > 0, n = !!G;
1582
- if (!e && !t && !n || P) return;
1580
+ }), X = D.useCallback(() => {
1581
+ if (!Y) return;
1582
+ let e = !Y.isEmpty, t = H.length > 0, n = !!W;
1583
+ if (!e && !t && !n || N) return;
1583
1584
  let r = {
1584
- html: e ? X.getHTML() : "",
1585
- plainText: e ? X.getText() : ""
1585
+ html: e ? Y.getHTML() : "",
1586
+ plainText: e ? Y.getText() : ""
1586
1587
  };
1587
- t && (r.attachments = U.filter((e) => !e.uploading && e.url).map((e) => ({
1588
+ t && (r.attachments = H.filter((e) => !e.uploading && e.url).map((e) => ({
1588
1589
  url: e.url,
1589
1590
  name: e.name,
1590
1591
  size: e.size,
1591
1592
  type: e.type
1592
1593
  }))), n && (r.voiceNote = {
1593
- blob: G.blob,
1594
- duration: G.duration
1595
- }), V && F ? F(r, V) : o(r), X.commands.clearContent(), W([]), K(null), Le(null), R("idle");
1594
+ blob: W.blob,
1595
+ duration: W.duration
1596
+ }), B && P ? P(r, B) : o(r), Y.commands.clearContent(), U([]), G(null), ze(null), L("idle");
1596
1597
  }, [
1597
- X,
1598
- U,
1599
- G,
1600
- P,
1598
+ Y,
1599
+ H,
1600
+ W,
1601
+ N,
1601
1602
  o,
1602
- F,
1603
- V
1603
+ P,
1604
+ B
1604
1605
  ]);
1605
- nt.current = ut, O.useEffect(() => {
1606
- if (!X || !me) return;
1606
+ it.current = X, D.useEffect(() => {
1607
+ if (!Y || !ge) return;
1607
1608
  let e = () => {
1608
- me(!0), clearTimeout(tt.current), tt.current = setTimeout(() => me(!1), 2e3);
1609
+ ge(!0), clearTimeout(rt.current), rt.current = setTimeout(() => ge(!1), 2e3);
1609
1610
  };
1610
- return X.on("update", e), () => {
1611
- X.off("update", e), clearTimeout(tt.current);
1611
+ return Y.on("update", e), () => {
1612
+ Y.off("update", e), clearTimeout(rt.current);
1612
1613
  };
1613
- }, [X, me]), O.useEffect(() => {
1614
- if (!X || !ge) return;
1614
+ }, [Y, ge]), D.useEffect(() => {
1615
+ if (!Y || !ve) return;
1615
1616
  let e = () => {
1616
- ge(X.isEmpty);
1617
+ ve(Y.isEmpty);
1617
1618
  };
1618
- return X.on("update", e), e(), () => {
1619
- X.off("update", e);
1619
+ return Y.on("update", e), e(), () => {
1620
+ Y.off("update", e);
1620
1621
  };
1621
- }, [X, ge]);
1622
- let Z = O.useCallback(async (e) => {
1622
+ }, [Y, ve]);
1623
+ let Z = D.useCallback(async (e) => {
1623
1624
  let t = Math.random().toString(36).slice(2), n = e.type.startsWith("image/");
1624
- W((r) => [...r, {
1625
+ U((r) => [...r, {
1625
1626
  id: t,
1626
1627
  name: e.name,
1627
1628
  size: e.size,
@@ -1629,16 +1630,16 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1629
1630
  uploading: !0
1630
1631
  }]);
1631
1632
  try {
1632
- if (n && fe) {
1633
- let n = await fe(e);
1634
- W((e) => e.map((e) => e.id === t ? {
1633
+ if (n && me) {
1634
+ let n = await me(e);
1635
+ U((e) => e.map((e) => e.id === t ? {
1635
1636
  ...e,
1636
1637
  url: n,
1637
1638
  uploading: !1
1638
1639
  } : e));
1639
- } else if (de) {
1640
- let n = await de(e);
1641
- W((e) => e.map((e) => e.id === t ? {
1640
+ } else if (pe) {
1641
+ let n = await pe(e);
1642
+ U((e) => e.map((e) => e.id === t ? {
1642
1643
  ...e,
1643
1644
  url: n.url,
1644
1645
  name: n.name,
@@ -1647,220 +1648,220 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1647
1648
  } : e));
1648
1649
  } else if (n) {
1649
1650
  let n = URL.createObjectURL(e);
1650
- W((e) => e.map((e) => e.id === t ? {
1651
+ U((e) => e.map((e) => e.id === t ? {
1651
1652
  ...e,
1652
1653
  url: n,
1653
1654
  uploading: !1
1654
1655
  } : e));
1655
- } else W((e) => e.filter((e) => e.id !== t));
1656
+ } else U((e) => e.filter((e) => e.id !== t));
1656
1657
  } catch {
1657
- W((e) => e.filter((e) => e.id !== t));
1658
+ U((e) => e.filter((e) => e.id !== t));
1658
1659
  }
1659
- }, [de, fe]), ft = O.useCallback((e) => {
1660
- W((t) => t.filter((t) => t.id !== e));
1661
- }, []), _t = O.useCallback((e) => {
1662
- e.preventDefault(), Qe(!1), Array.from(e.dataTransfer.files).forEach(Z);
1663
- }, [Z]), Q = O.useCallback((e) => {
1660
+ }, [pe, me]), pt = D.useCallback((e) => {
1661
+ U((t) => t.filter((t) => t.id !== e));
1662
+ }, []), vt = D.useCallback((e) => {
1663
+ e.preventDefault(), et(!1), Array.from(e.dataTransfer.files).forEach(Z);
1664
+ }, [Z]), Q = D.useCallback((e) => {
1664
1665
  Array.from(e.target.files || []).forEach(Z), e.target.value = "";
1665
- }, [Z]), bt = O.useCallback(() => {
1666
- K(null), R("idle");
1667
- }, []), xt = S({
1668
- editor: X,
1666
+ }, [Z]), xt = D.useCallback(() => {
1667
+ G(null), L("idle");
1668
+ }, []), St = S({
1669
+ editor: Y,
1669
1670
  selector: ({ editor: e }) => e ? { editorIsEmpty: e.isEmpty } : null
1670
1671
  })?.editorIsEmpty ?? !0;
1671
- O.useEffect(() => {
1672
- if (!X) return;
1672
+ D.useEffect(() => {
1673
+ if (!Y) return;
1673
1674
  let e = () => {
1674
- Je(X.state.doc.textBetween(0, X.state.doc.content.size, void 0, " ").length);
1675
+ Xe(Y.state.doc.textBetween(0, Y.state.doc.content.size, void 0, " ").length);
1675
1676
  };
1676
- return e(), X.on("update", e), () => {
1677
- X.off("update", e);
1677
+ return e(), Y.on("update", e), () => {
1678
+ Y.off("update", e);
1678
1679
  };
1679
- }, [X]);
1680
- let St = !xt || U.length > 0 || !!G, Ct = z || L === "review" || m === "expanded", $ = "icon-md";
1681
- return /* @__PURE__ */ N("div", {
1682
- ref: ke,
1683
- className: s("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", Te),
1684
- ...Oe,
1680
+ }, [Y]);
1681
+ let Ct = !St || H.length > 0 || !!W, wt = R || I === "review" || h === "expanded", $ = "icon-md";
1682
+ return /* @__PURE__ */ M("div", {
1683
+ ref: je,
1684
+ className: c("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", De),
1685
+ ...Ae,
1685
1686
  children: [
1686
- we !== !1 && (we ?? (de || fe ? /* @__PURE__ */ M(u, {
1687
+ Ee !== !1 && (Ee ?? (pe || me ? /* @__PURE__ */ j(f, {
1687
1688
  variant: "solid",
1688
1689
  size: "icon-md",
1689
- onClick: () => $e.current?.click(),
1690
+ onClick: () => tt.current?.click(),
1690
1691
  title: "Attach",
1691
1692
  "aria-label": "Attach file",
1692
1693
  className: "shrink-0",
1693
- children: /* @__PURE__ */ M(l, {
1694
- icon: Ae,
1694
+ children: /* @__PURE__ */ j(u, {
1695
+ icon: Me,
1695
1696
  size: "md"
1696
1697
  })
1697
1698
  }) : null)),
1698
- /* @__PURE__ */ N("div", {
1699
+ /* @__PURE__ */ M("div", {
1699
1700
  role: "region",
1700
1701
  "aria-label": "Message composer",
1701
- className: s("flex-1 min-w-0 overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-raised-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-raised-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", L === "recording" && "border-error-7/30", q && "border-dashed border-accent-7 bg-accent-2", f && "opacity-action-disabled cursor-not-allowed"),
1702
- onFocus: () => Ue(!0),
1702
+ className: c("flex-1 min-w-0 overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-raised-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-raised-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", I === "recording" && "border-error-7/30", K && "border-dashed border-accent-7 bg-accent-2", p && "opacity-action-disabled cursor-not-allowed"),
1703
+ onFocus: () => Ge(!0),
1703
1704
  onBlur: (e) => {
1704
- e.currentTarget.contains(e.relatedTarget) || Ue(!1);
1705
+ e.currentTarget.contains(e.relatedTarget) || Ge(!1);
1705
1706
  },
1706
1707
  onDragOver: (e) => {
1707
- e.preventDefault(), Qe(!0);
1708
+ e.preventDefault(), et(!0);
1708
1709
  },
1709
- onDragLeave: () => Qe(!1),
1710
- onDrop: _t,
1710
+ onDragLeave: () => et(!1),
1711
+ onDrop: vt,
1711
1712
  children: [
1712
- ve,
1713
- /* @__PURE__ */ M(a, { children: j && /* @__PURE__ */ M(ze, {
1714
- author: j.author,
1715
- preview: j.preview,
1716
- onDismiss: j.onDismiss
1713
+ be,
1714
+ /* @__PURE__ */ j(a, { children: A && /* @__PURE__ */ j(Ve, {
1715
+ author: A.author,
1716
+ preview: A.preview,
1717
+ onDismiss: A.onDismiss
1717
1718
  }, "reply") }),
1718
- /* @__PURE__ */ M(a, { children: V && /* @__PURE__ */ M(qe, {
1719
- date: V,
1720
- onEdit: () => Ve(!0),
1721
- onClear: () => Le(null)
1719
+ /* @__PURE__ */ j(a, { children: B && /* @__PURE__ */ j(Ye, {
1720
+ date: B,
1721
+ onEdit: () => Ue(!0),
1722
+ onClear: () => ze(null)
1722
1723
  }, "schedule") }),
1723
- /* @__PURE__ */ M(a, { children: U.length > 0 && /* @__PURE__ */ M(Ye, {
1724
- attachments: U,
1725
- onRemoveAttachment: ft
1724
+ /* @__PURE__ */ j(a, { children: H.length > 0 && /* @__PURE__ */ j(Ze, {
1725
+ attachments: H,
1726
+ onRemoveAttachment: pt
1726
1727
  }, "attachments") }),
1727
- J.toolbarPosition === "top" && X && /* @__PURE__ */ M("div", {
1728
- className: s("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", z ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1729
- children: /* @__PURE__ */ M("div", {
1728
+ q.toolbarPosition === "top" && Y && /* @__PURE__ */ j("div", {
1729
+ className: c("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", R ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1730
+ children: /* @__PURE__ */ j("div", {
1730
1731
  className: "overflow-hidden",
1731
- children: /* @__PURE__ */ M(lt, {
1732
- editor: X,
1733
- toolbar: Se,
1732
+ children: /* @__PURE__ */ j(dt, {
1733
+ editor: Y,
1734
+ toolbar: we,
1734
1735
  isMobile: !1,
1735
- hasMentions: !!(T || E),
1736
- hasSlashCommands: !!D,
1737
- disabled: f
1736
+ hasMentions: !!(w || T),
1737
+ hasSlashCommands: !!E,
1738
+ disabled: p
1738
1739
  })
1739
1740
  })
1740
1741
  }),
1741
- /* @__PURE__ */ N("div", {
1742
+ /* @__PURE__ */ M("div", {
1742
1743
  className: "relative",
1743
- children: [L === "recording" && /* @__PURE__ */ M(Ze, {
1744
- duration: Y.duration,
1745
- analyserNode: Y.analyserNode,
1746
- maxDuration: A,
1747
- onCancel: ct
1748
- }), /* @__PURE__ */ N("div", {
1749
- ref: et,
1750
- className: s("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", L === "recording" && "invisible"),
1744
+ children: [I === "recording" && /* @__PURE__ */ j($e, {
1745
+ duration: J.duration,
1746
+ analyserNode: J.analyserNode,
1747
+ maxDuration: k,
1748
+ onCancel: ut
1749
+ }), /* @__PURE__ */ M("div", {
1750
+ ref: nt,
1751
+ className: c("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", I === "recording" && "invisible"),
1751
1752
  style: {
1752
- minHeight: J.minHeight,
1753
- maxHeight: at,
1753
+ minHeight: q.minHeight,
1754
+ maxHeight: st,
1754
1755
  overflowY: "auto"
1755
1756
  },
1756
- onClick: () => X?.commands.focus(),
1757
- children: [/* @__PURE__ */ M("div", {
1757
+ onClick: () => Y?.commands.focus(),
1758
+ children: [/* @__PURE__ */ j("div", {
1758
1759
  className: "flex-1 min-w-0",
1759
- children: /* @__PURE__ */ M(b, { editor: X })
1760
- }), X && L !== "recording" && /* @__PURE__ */ N("div", {
1760
+ children: /* @__PURE__ */ j(x, { editor: Y })
1761
+ }), Y && I !== "recording" && /* @__PURE__ */ M("div", {
1761
1762
  className: "flex items-center gap-ds-01 shrink-0 ml-ds-03",
1762
- children: [/* @__PURE__ */ M("button", {
1763
+ children: [/* @__PURE__ */ j("button", {
1763
1764
  type: "button",
1764
- onClick: () => Fe((e) => !e),
1765
- title: z ? "Hide formatting" : "Show formatting",
1766
- "aria-label": z ? "Hide formatting" : "Show formatting",
1767
- "aria-pressed": z,
1768
- className: s("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", z ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1769
- children: /* @__PURE__ */ M(l, {
1770
- icon: Ne,
1765
+ onClick: () => Le((e) => !e),
1766
+ title: R ? "Hide formatting" : "Show formatting",
1767
+ "aria-label": R ? "Hide formatting" : "Show formatting",
1768
+ "aria-pressed": R,
1769
+ className: c("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", R ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1770
+ children: /* @__PURE__ */ j(u, {
1771
+ icon: Fe,
1771
1772
  size: "xs"
1772
1773
  })
1773
- }), /* @__PURE__ */ N("div", {
1774
+ }), /* @__PURE__ */ M("div", {
1774
1775
  className: "relative",
1775
- children: [/* @__PURE__ */ M("button", {
1776
- ref: H,
1776
+ children: [/* @__PURE__ */ j("button", {
1777
+ ref: V,
1777
1778
  type: "button",
1778
- onClick: () => Ie((e) => !e),
1779
+ onClick: () => Re((e) => !e),
1779
1780
  title: "Emoji",
1780
1781
  "aria-label": "Emoji",
1781
- className: s("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target transition-colors duration-fast-01", B ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1782
- children: /* @__PURE__ */ M(l, {
1783
- icon: De,
1782
+ className: c("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md touch-target transition-colors duration-fast-01", z ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1783
+ children: /* @__PURE__ */ j(u, {
1784
+ icon: ke,
1784
1785
  size: "xs"
1785
1786
  })
1786
- }), B && he.createPortal(/* @__PURE__ */ M("div", {
1787
- ref: Xe,
1787
+ }), z && _e.createPortal(/* @__PURE__ */ j("div", {
1788
+ ref: Qe,
1788
1789
  className: "absolute z-popover",
1789
1790
  style: {
1790
1791
  top: 0,
1791
1792
  left: 0
1792
1793
  },
1793
- children: /* @__PURE__ */ M(vt, {
1794
- set: I,
1794
+ children: /* @__PURE__ */ j(yt, {
1795
+ set: F,
1795
1796
  onSelect: async ({ id: e, native: t }) => {
1796
- let n = ae(await oe(I), e);
1797
- n ? X.chain().focus().insertContent({
1797
+ let n = se(await ce(F), e);
1798
+ n ? Y.chain().focus().insertContent({
1798
1799
  type: "emojiNode",
1799
1800
  attrs: {
1800
1801
  id: e,
1801
1802
  native: n.native,
1802
- set: I,
1803
+ set: F,
1803
1804
  x: n.x,
1804
1805
  y: n.y
1805
1806
  }
1806
- }).run() : X.chain().focus().insertContent(t).run(), Ie(!1);
1807
+ }).run() : Y.chain().focus().insertContent(t).run(), Re(!1);
1807
1808
  },
1808
- onClose: () => Ie(!1)
1809
+ onClose: () => Re(!1)
1809
1810
  })
1810
1811
  }), document.body)]
1811
1812
  })]
1812
1813
  })]
1813
1814
  })]
1814
1815
  }),
1815
- L === "review" && G && /* @__PURE__ */ N("div", {
1816
+ I === "review" && W && /* @__PURE__ */ M("div", {
1816
1817
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b border-b border-surface-border",
1817
- children: [/* @__PURE__ */ M(dt, {
1818
- src: G.blob,
1819
- duration: G.duration,
1820
- waveformData: G.waveformData,
1818
+ children: [/* @__PURE__ */ j(ft, {
1819
+ src: W.blob,
1820
+ duration: W.duration,
1821
+ waveformData: W.waveformData,
1821
1822
  className: "flex-1"
1822
- }), /* @__PURE__ */ M(u, {
1823
+ }), /* @__PURE__ */ j(f, {
1823
1824
  variant: "ghost",
1824
1825
  size: "icon-sm",
1825
- onClick: bt,
1826
+ onClick: xt,
1826
1827
  "aria-label": "Discard voice note",
1827
1828
  title: "Discard voice note",
1828
1829
  className: "text-surface-fg-subtle hover:text-error-11",
1829
- children: /* @__PURE__ */ M(l, {
1830
- icon: Pe,
1830
+ children: /* @__PURE__ */ j(u, {
1831
+ icon: Ie,
1831
1832
  size: "sm"
1832
1833
  })
1833
1834
  })]
1834
1835
  }),
1835
- it && X && !xt && /* @__PURE__ */ M(yt, { editor: X }),
1836
- J.toolbarPosition === "bottom" && X && /* @__PURE__ */ M("div", {
1837
- className: s("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", Ct ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1838
- children: /* @__PURE__ */ M("div", {
1836
+ ot && Y && !St && /* @__PURE__ */ j(bt, { editor: Y }),
1837
+ q.toolbarPosition === "bottom" && Y && /* @__PURE__ */ j("div", {
1838
+ className: c("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", wt ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1839
+ children: /* @__PURE__ */ j("div", {
1839
1840
  className: "overflow-hidden",
1840
- children: /* @__PURE__ */ M(lt, {
1841
- editor: X,
1842
- toolbar: Se,
1843
- isMobile: it,
1844
- hasMentions: !!(T || E),
1845
- hasSlashCommands: !!D,
1846
- disabled: f
1841
+ children: /* @__PURE__ */ j(dt, {
1842
+ editor: Y,
1843
+ toolbar: we,
1844
+ isMobile: ot,
1845
+ hasMentions: !!(w || T),
1846
+ hasSlashCommands: !!E,
1847
+ disabled: p
1847
1848
  })
1848
1849
  })
1849
1850
  }),
1850
- g && v !== "hidden" && (() => {
1851
- let e = Ke / g;
1852
- return v === "always" || v === "focus" && He || (v === "near-limit" || !v) && e >= .8 || e >= 1 ? /* @__PURE__ */ N("div", {
1853
- className: s("flex justify-end px-ds-04 pb-ds-02 text-ds-xs tabular-nums transition-opacity duration-fast-01", e >= 1 ? "text-error-11 font-medium" : e >= .9 ? "text-warning-11" : "text-surface-fg-subtle"),
1851
+ _ && y !== "hidden" && (() => {
1852
+ let e = Je / _;
1853
+ return y === "always" || y === "focus" && We || (y === "near-limit" || !y) && e >= .8 || e >= 1 ? /* @__PURE__ */ M("div", {
1854
+ className: c("flex justify-end px-ds-04 pb-ds-02 text-ds-xs tabular-nums transition-opacity duration-fast-01", e >= 1 ? "text-error-11 font-medium" : e >= .9 ? "text-warning-11" : "text-surface-fg-subtle"),
1854
1855
  children: [
1855
- Ke,
1856
+ Je,
1856
1857
  "/",
1857
- g
1858
+ _
1858
1859
  ]
1859
1860
  }) : null;
1860
1861
  })(),
1861
- ye,
1862
- /* @__PURE__ */ M("input", {
1863
- ref: $e,
1862
+ xe,
1863
+ /* @__PURE__ */ j("input", {
1864
+ ref: tt,
1864
1865
  type: "file",
1865
1866
  multiple: !0,
1866
1867
  className: "hidden",
@@ -1868,13 +1869,13 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1868
1869
  })
1869
1870
  ]
1870
1871
  }),
1871
- /* @__PURE__ */ N("div", {
1872
+ /* @__PURE__ */ M("div", {
1872
1873
  className: "flex items-center gap-ds-02 shrink-0",
1873
- children: [Ce && Ce.length > 0 && L !== "recording" && /* @__PURE__ */ M(gt, { options: Ce }), /* @__PURE__ */ N(a, {
1874
+ children: [Te && Te.length > 0 && I !== "recording" && /* @__PURE__ */ j(_t, { options: Te }), /* @__PURE__ */ M(a, {
1874
1875
  mode: "popLayout",
1875
1876
  initial: !1,
1876
1877
  children: [
1877
- L === "recording" && /* @__PURE__ */ N(i.div, {
1878
+ I === "recording" && /* @__PURE__ */ M(i.div, {
1878
1879
  initial: {
1879
1880
  scale: .8,
1880
1881
  opacity: 0
@@ -1887,33 +1888,33 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1887
1888
  scale: .8,
1888
1889
  opacity: 0
1889
1890
  },
1890
- transition: { duration: .15 },
1891
+ transition: { duration: s.moderate01 },
1891
1892
  className: "flex items-center gap-ds-02",
1892
- children: [/* @__PURE__ */ M(u, {
1893
+ children: [/* @__PURE__ */ j(f, {
1893
1894
  variant: "soft",
1894
1895
  size: $,
1895
- onClick: ct,
1896
+ onClick: ut,
1896
1897
  "aria-label": "Cancel recording",
1897
1898
  title: "Cancel recording",
1898
1899
  className: "text-surface-fg-subtle hover:text-error-11",
1899
- children: /* @__PURE__ */ M(l, {
1900
- icon: Pe,
1900
+ children: /* @__PURE__ */ j(u, {
1901
+ icon: Ie,
1901
1902
  size: "md"
1902
1903
  })
1903
- }), /* @__PURE__ */ M(u, {
1904
+ }), /* @__PURE__ */ j(f, {
1904
1905
  variant: "solid",
1905
1906
  size: $,
1906
1907
  color: "error",
1907
- onClick: st,
1908
+ onClick: lt,
1908
1909
  "aria-label": "Stop recording",
1909
1910
  title: "Stop recording",
1910
- children: /* @__PURE__ */ M(l, {
1911
- icon: Me,
1911
+ children: /* @__PURE__ */ j(u, {
1912
+ icon: Pe,
1912
1913
  size: "md"
1913
1914
  })
1914
1915
  })]
1915
1916
  }, "recording"),
1916
- P && L !== "recording" && /* @__PURE__ */ M(i.div, {
1917
+ N && I !== "recording" && /* @__PURE__ */ j(i.div, {
1917
1918
  initial: {
1918
1919
  scale: .8,
1919
1920
  opacity: 0
@@ -1926,21 +1927,21 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1926
1927
  scale: .8,
1927
1928
  opacity: 0
1928
1929
  },
1929
- transition: { duration: .15 },
1930
- children: /* @__PURE__ */ M(u, {
1930
+ transition: { duration: s.moderate01 },
1931
+ children: /* @__PURE__ */ j(f, {
1931
1932
  variant: "solid",
1932
1933
  size: $,
1933
1934
  color: "error",
1934
- onClick: _e,
1935
+ onClick: ye,
1935
1936
  "aria-label": "Stop",
1936
1937
  title: "Stop",
1937
- children: /* @__PURE__ */ M(l, {
1938
- icon: Me,
1938
+ children: /* @__PURE__ */ j(u, {
1939
+ icon: Pe,
1939
1940
  size: "md"
1940
1941
  })
1941
1942
  })
1942
1943
  }, "streaming"),
1943
- !P && L !== "recording" && St && F && /* @__PURE__ */ M(i.div, {
1944
+ !N && I !== "recording" && Ct && P && /* @__PURE__ */ j(i.div, {
1944
1945
  initial: {
1945
1946
  scale: .8,
1946
1947
  opacity: 0
@@ -1953,24 +1954,24 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1953
1954
  scale: .8,
1954
1955
  opacity: 0
1955
1956
  },
1956
- transition: { duration: .15 },
1957
- children: /* @__PURE__ */ M(_, {
1958
- onClick: ut,
1959
- disabled: f,
1960
- "aria-label": V ? "Schedule send" : "Send",
1957
+ transition: { duration: s.moderate01 },
1958
+ children: /* @__PURE__ */ j(v, {
1959
+ onClick: X,
1960
+ disabled: p,
1961
+ "aria-label": B ? "Schedule send" : "Send",
1961
1962
  size: $,
1962
- dropdownContent: /* @__PURE__ */ M(We, {
1963
- onSchedule: (e) => Le(e),
1963
+ dropdownContent: /* @__PURE__ */ j(Ke, {
1964
+ onSchedule: (e) => ze(e),
1964
1965
  onClose: () => {},
1965
- onOpenDialog: () => Ve(!0)
1966
+ onOpenDialog: () => Ue(!0)
1966
1967
  }),
1967
- children: /* @__PURE__ */ M(l, {
1968
- icon: V ? be : je,
1968
+ children: /* @__PURE__ */ j(u, {
1969
+ icon: B ? Se : Ne,
1969
1970
  size: "md"
1970
1971
  })
1971
1972
  })
1972
1973
  }, "split-send"),
1973
- !P && L !== "recording" && St && !F && /* @__PURE__ */ M(i.div, {
1974
+ !N && I !== "recording" && Ct && !P && /* @__PURE__ */ j(i.div, {
1974
1975
  initial: {
1975
1976
  scale: .8,
1976
1977
  opacity: 0
@@ -1983,21 +1984,21 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
1983
1984
  scale: .8,
1984
1985
  opacity: 0
1985
1986
  },
1986
- transition: { duration: .15 },
1987
- children: /* @__PURE__ */ M(u, {
1987
+ transition: { duration: s.moderate01 },
1988
+ children: /* @__PURE__ */ j(f, {
1988
1989
  variant: "solid",
1989
1990
  size: $,
1990
- onClick: ut,
1991
- disabled: f,
1991
+ onClick: X,
1992
+ disabled: p,
1992
1993
  "aria-label": "Send",
1993
1994
  title: "Send",
1994
- children: /* @__PURE__ */ M(l, {
1995
- icon: je,
1995
+ children: /* @__PURE__ */ j(u, {
1996
+ icon: Ne,
1996
1997
  size: "md"
1997
1998
  })
1998
1999
  })
1999
2000
  }, "send"),
2000
- !P && L !== "recording" && !St && k && /* @__PURE__ */ M(i.div, {
2001
+ !N && I !== "recording" && !Ct && O && /* @__PURE__ */ j(i.div, {
2001
2002
  initial: {
2002
2003
  scale: .8,
2003
2004
  opacity: 0
@@ -2010,20 +2011,20 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
2010
2011
  scale: .8,
2011
2012
  opacity: 0
2012
2013
  },
2013
- transition: { duration: .15 },
2014
- children: /* @__PURE__ */ M(u, {
2014
+ transition: { duration: s.moderate01 },
2015
+ children: /* @__PURE__ */ j(f, {
2015
2016
  variant: "soft",
2016
2017
  size: $,
2017
- onClick: ot,
2018
+ onClick: ct,
2018
2019
  "aria-label": "Record voice message",
2019
2020
  title: "Record voice message",
2020
- children: /* @__PURE__ */ M(l, {
2021
- icon: Ee,
2021
+ children: /* @__PURE__ */ j(u, {
2022
+ icon: Oe,
2022
2023
  size: "md"
2023
2024
  })
2024
2025
  })
2025
2026
  }, "mic"),
2026
- !P && L !== "recording" && !St && !k && /* @__PURE__ */ M(i.div, {
2027
+ !N && I !== "recording" && !Ct && !O && /* @__PURE__ */ j(i.div, {
2027
2028
  initial: {
2028
2029
  scale: .8,
2029
2030
  opacity: 0
@@ -2036,15 +2037,15 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
2036
2037
  scale: .8,
2037
2038
  opacity: 0
2038
2039
  },
2039
- transition: { duration: .15 },
2040
- children: /* @__PURE__ */ M(u, {
2040
+ transition: { duration: s.moderate01 },
2041
+ children: /* @__PURE__ */ j(f, {
2041
2042
  variant: "solid",
2042
2043
  size: $,
2043
2044
  disabled: !0,
2044
2045
  "aria-label": "Send",
2045
2046
  title: "Send",
2046
- children: /* @__PURE__ */ M(l, {
2047
- icon: je,
2047
+ children: /* @__PURE__ */ j(u, {
2048
+ icon: Ne,
2048
2049
  size: "md"
2049
2050
  })
2050
2051
  })
@@ -2052,19 +2053,19 @@ var bt = O.forwardRef(function({ onSubmit: o, placeholder: c = "Type a message..
2052
2053
  ]
2053
2054
  })]
2054
2055
  }),
2055
- xe && /* @__PURE__ */ M("p", {
2056
+ Ce && /* @__PURE__ */ j("p", {
2056
2057
  className: "mt-ds-02 text-center text-ds-xs text-surface-fg-subtle/50",
2057
- children: xe
2058
+ children: Ce
2058
2059
  }),
2059
- F && /* @__PURE__ */ M(Ge, {
2060
- open: Be,
2061
- onOpenChange: Ve,
2062
- onSchedule: (e) => Le(e),
2063
- initialDate: V
2060
+ P && /* @__PURE__ */ j(qe, {
2061
+ open: He,
2062
+ onOpenChange: Ue,
2063
+ onSchedule: (e) => ze(e),
2064
+ initialDate: B
2064
2065
  })
2065
2066
  ]
2066
2067
  });
2067
2068
  });
2068
- bt.displayName = "RichChatInput";
2069
+ xt.displayName = "RichChatInput";
2069
2070
  //#endregion
2070
- export { K as _, Qe as a, H as b, st as c, Y as d, ot as f, G as g, tt as h, at as i, nt as l, ct as m, pt as n, it as o, J as p, dt as r, rt as s, bt as t, $e as u, q as v, et as y };
2071
+ export { G as _, et as a, V as b, lt as c, J as d, ct as f, W as g, rt as h, st as i, it as l, ut as m, mt as n, ot as o, q as p, ft as r, at as s, xt as t, tt as u, K as v, nt as y };