@devalok/shilp-sutra 0.56.0 → 0.59.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 (374) hide show
  1. package/MIGRATION.md +198 -0
  2. package/dist/_chunks/badge-group.js +75 -174
  3. package/dist/_chunks/badge-group.js.map +1 -1
  4. package/dist/_chunks/chat.js +270 -253
  5. package/dist/_chunks/chat.js.map +1 -1
  6. package/dist/_chunks/document-preview.js +1 -1
  7. package/dist/_chunks/document-preview.js.map +1 -1
  8. package/dist/_chunks/emoji-suggestion.js +1 -1
  9. package/dist/_chunks/emoji-suggestion.js.map +1 -1
  10. package/dist/_chunks/image-preview.js +71 -70
  11. package/dist/_chunks/image-preview.js.map +1 -1
  12. package/dist/_chunks/mention-suggestion.js +2 -2
  13. package/dist/_chunks/mention-suggestion.js.map +1 -1
  14. package/dist/_chunks/motion-preference.js +15 -0
  15. package/dist/_chunks/motion-preference.js.map +1 -0
  16. package/dist/_chunks/motion-provider.js +1 -1
  17. package/dist/_chunks/motion-provider.js.map +1 -1
  18. package/dist/_chunks/oauth-button.js +1 -1
  19. package/dist/_chunks/oauth-button.js.map +1 -1
  20. package/dist/_chunks/popover.js +50 -49
  21. package/dist/_chunks/popover.js.map +1 -1
  22. package/dist/_chunks/primitives-internal.js +29 -29
  23. package/dist/_chunks/primitives-internal.js.map +1 -1
  24. package/dist/_chunks/shared.js +48 -47
  25. package/dist/_chunks/shared.js.map +1 -1
  26. package/dist/_chunks/success.js +36 -36
  27. package/dist/_chunks/success.js.map +1 -1
  28. package/dist/_chunks/tree-view.js +1 -1
  29. package/dist/_chunks/tree-view.js.map +1 -1
  30. package/dist/_chunks/use-calendar.js +4 -4
  31. package/dist/_chunks/use-calendar.js.map +1 -1
  32. package/dist/ai/block-renderer.js +8 -8
  33. package/dist/ai/blocks/text.js +1 -1
  34. package/dist/ai/blocks/text.js.map +1 -1
  35. package/dist/ai/command-bar.js +67 -67
  36. package/dist/ai/command-bar.js.map +1 -1
  37. package/dist/ai/conversation.js +35 -35
  38. package/dist/ai/conversation.js.map +1 -1
  39. package/dist/ai/index.js +4 -4
  40. package/dist/composed/activity-feed.d.ts.map +1 -1
  41. package/dist/composed/activity-feed.js +109 -108
  42. package/dist/composed/activity-feed.js.map +1 -1
  43. package/dist/composed/avatar-group.d.ts +7 -2
  44. package/dist/composed/avatar-group.d.ts.map +1 -1
  45. package/dist/composed/avatar-group.js +3 -3
  46. package/dist/composed/avatar-group.js.map +1 -1
  47. package/dist/composed/command-palette.js +137 -137
  48. package/dist/composed/command-palette.js.map +1 -1
  49. package/dist/composed/content-card.js +2 -2
  50. package/dist/composed/content-card.js.map +1 -1
  51. package/dist/composed/date-picker/index.js +9 -9
  52. package/dist/composed/date-picker/index.js.map +1 -1
  53. package/dist/composed/diff.d.ts +23 -2
  54. package/dist/composed/diff.d.ts.map +1 -1
  55. package/dist/composed/diff.js +341 -260
  56. package/dist/composed/diff.js.map +1 -1
  57. package/dist/composed/emoji-picker.js +3 -3
  58. package/dist/composed/emoji-picker.js.map +1 -1
  59. package/dist/composed/empty-state.js +4 -4
  60. package/dist/composed/error-boundary.js +2 -2
  61. package/dist/composed/error-boundary.js.map +1 -1
  62. package/dist/composed/file-preview/image-preview.d.ts.map +1 -1
  63. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  64. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  65. package/dist/composed/file-preview.js +152 -151
  66. package/dist/composed/file-preview.js.map +1 -1
  67. package/dist/composed/filter-bar.d.ts.map +1 -1
  68. package/dist/composed/filter-bar.js +53 -52
  69. package/dist/composed/filter-bar.js.map +1 -1
  70. package/dist/composed/form-section.d.ts.map +1 -1
  71. package/dist/composed/form-section.js +38 -37
  72. package/dist/composed/form-section.js.map +1 -1
  73. package/dist/composed/inline-edit.js +1 -1
  74. package/dist/composed/inline-edit.js.map +1 -1
  75. package/dist/composed/loading-skeleton.js +3 -3
  76. package/dist/composed/loading-skeleton.js.map +1 -1
  77. package/dist/composed/master-detail.d.ts.map +1 -1
  78. package/dist/composed/master-detail.js +1 -1
  79. package/dist/composed/master-detail.js.map +1 -1
  80. package/dist/composed/member-picker.js +1 -1
  81. package/dist/composed/member-picker.js.map +1 -1
  82. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  83. package/dist/composed/multi-select-popover.js +109 -108
  84. package/dist/composed/multi-select-popover.js.map +1 -1
  85. package/dist/composed/page-skeletons.js +4 -4
  86. package/dist/composed/page-skeletons.js.map +1 -1
  87. package/dist/composed/responsive-modal.js +1 -1
  88. package/dist/composed/responsive-modal.js.map +1 -1
  89. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
  90. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
  91. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
  92. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  93. package/dist/composed/rich-chat-input.js +473 -472
  94. package/dist/composed/rich-chat-input.js.map +1 -1
  95. package/dist/composed/rich-text-editor.js +6 -6
  96. package/dist/composed/rich-text-editor.js.map +1 -1
  97. package/dist/composed/schedule-view.js +5 -5
  98. package/dist/composed/schedule-view.js.map +1 -1
  99. package/dist/composed/status-badge.d.ts.map +1 -1
  100. package/dist/composed/status-badge.js +29 -28
  101. package/dist/composed/status-badge.js.map +1 -1
  102. package/dist/hooks/index.d.ts +1 -0
  103. package/dist/hooks/index.d.ts.map +1 -1
  104. package/dist/hooks/index.js +4 -3
  105. package/dist/hooks/use-container-size.d.ts +18 -0
  106. package/dist/hooks/use-container-size.d.ts.map +1 -0
  107. package/dist/hooks/use-container-size.js +28 -0
  108. package/dist/hooks/use-container-size.js.map +1 -0
  109. package/dist/motion/index.d.ts +1 -0
  110. package/dist/motion/index.d.ts.map +1 -1
  111. package/dist/motion/index.js +2 -15
  112. package/dist/motion/motion-preference.d.ts +36 -0
  113. package/dist/motion/motion-preference.d.ts.map +1 -0
  114. package/dist/motion/motion-provider.d.ts +2 -1
  115. package/dist/motion/motion-provider.d.ts.map +1 -1
  116. package/dist/motion/primitives-index.js +103 -102
  117. package/dist/motion/primitives-index.js.map +1 -1
  118. package/dist/motion/primitives.d.ts.map +1 -1
  119. package/dist/shell/app-shell.d.ts +101 -0
  120. package/dist/shell/app-shell.d.ts.map +1 -0
  121. package/dist/shell/app-shell.js +76 -0
  122. package/dist/shell/app-shell.js.map +1 -0
  123. package/dist/shell/bottom-navbar.js +21 -21
  124. package/dist/shell/bottom-navbar.js.map +1 -1
  125. package/dist/shell/index.d.ts +2 -1
  126. package/dist/shell/index.d.ts.map +1 -1
  127. package/dist/shell/index.js +6 -5
  128. package/dist/shell/notification-center.d.ts +17 -0
  129. package/dist/shell/notification-center.d.ts.map +1 -1
  130. package/dist/shell/notification-center.js +110 -105
  131. package/dist/shell/notification-center.js.map +1 -1
  132. package/dist/shell/notification-preferences.js +1 -1
  133. package/dist/shell/notification-preferences.js.map +1 -1
  134. package/dist/shell/top-bar.js +7 -7
  135. package/dist/shell/top-bar.js.map +1 -1
  136. package/dist/tokens/generate-scale.d.ts +49 -0
  137. package/dist/tokens/generate-scale.d.ts.map +1 -1
  138. package/dist/tokens/index.css +1 -0
  139. package/dist/tokens/palettes.css +292 -0
  140. package/dist/tokens/primitives.css +29 -26
  141. package/dist/tokens/semantic.css +170 -47
  142. package/dist/tokens/shilp-sutra.css +1 -0
  143. package/dist/tokens/utilities.css +10 -7
  144. package/dist/tokens/variants.css +1 -1
  145. package/dist/ui/accordion.d.ts.map +1 -1
  146. package/dist/ui/accordion.js +27 -26
  147. package/dist/ui/accordion.js.map +1 -1
  148. package/dist/ui/alert-dialog.d.ts.map +1 -1
  149. package/dist/ui/alert-dialog.js +60 -59
  150. package/dist/ui/alert-dialog.js.map +1 -1
  151. package/dist/ui/alert.d.ts.map +1 -1
  152. package/dist/ui/alert.js +55 -113
  153. package/dist/ui/alert.js.map +1 -1
  154. package/dist/ui/autocomplete.js +80 -80
  155. package/dist/ui/autocomplete.js.map +1 -1
  156. package/dist/ui/avatar.d.ts.map +1 -1
  157. package/dist/ui/avatar.js +71 -70
  158. package/dist/ui/avatar.js.map +1 -1
  159. package/dist/ui/badge-indicator.d.ts +4 -8
  160. package/dist/ui/badge-indicator.d.ts.map +1 -1
  161. package/dist/ui/badge-indicator.js +3 -8
  162. package/dist/ui/badge-indicator.js.map +1 -1
  163. package/dist/ui/badge.d.ts +55 -34
  164. package/dist/ui/badge.d.ts.map +1 -1
  165. package/dist/ui/banner.d.ts.map +1 -1
  166. package/dist/ui/banner.js +43 -41
  167. package/dist/ui/banner.js.map +1 -1
  168. package/dist/ui/button-group.d.ts.map +1 -1
  169. package/dist/ui/button-group.js +3 -23
  170. package/dist/ui/button-group.js.map +1 -1
  171. package/dist/ui/button.d.ts +10 -1
  172. package/dist/ui/button.d.ts.map +1 -1
  173. package/dist/ui/button.js +79 -212
  174. package/dist/ui/button.js.map +1 -1
  175. package/dist/ui/card.d.ts.map +1 -1
  176. package/dist/ui/card.js +78 -75
  177. package/dist/ui/card.js.map +1 -1
  178. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  179. package/dist/ui/charts/radar-chart.js +1 -1
  180. package/dist/ui/charts/radar-chart.js.map +1 -1
  181. package/dist/ui/chat/date-separator.d.ts +8 -1
  182. package/dist/ui/chat/date-separator.d.ts.map +1 -1
  183. package/dist/ui/chat/message-list.d.ts.map +1 -1
  184. package/dist/ui/chat/message.d.ts.map +1 -1
  185. package/dist/ui/chat/typing-indicator.d.ts.map +1 -1
  186. package/dist/ui/checkbox.js +1 -1
  187. package/dist/ui/checkbox.js.map +1 -1
  188. package/dist/ui/code.js +2 -2
  189. package/dist/ui/code.js.map +1 -1
  190. package/dist/ui/color-input.d.ts.map +1 -1
  191. package/dist/ui/color-input.js +151 -150
  192. package/dist/ui/color-input.js.map +1 -1
  193. package/dist/ui/combobox.d.ts +14 -0
  194. package/dist/ui/combobox.d.ts.map +1 -1
  195. package/dist/ui/combobox.js +156 -152
  196. package/dist/ui/combobox.js.map +1 -1
  197. package/dist/ui/context-menu.d.ts.map +1 -1
  198. package/dist/ui/context-menu.js +70 -69
  199. package/dist/ui/context-menu.js.map +1 -1
  200. package/dist/ui/data-table-body.d.ts +3 -1
  201. package/dist/ui/data-table-body.d.ts.map +1 -1
  202. package/dist/ui/data-table-body.js +93 -92
  203. package/dist/ui/data-table-body.js.map +1 -1
  204. package/dist/ui/data-table-bulk-actions.d.ts +7 -1
  205. package/dist/ui/data-table-bulk-actions.d.ts.map +1 -1
  206. package/dist/ui/data-table-bulk-actions.js +14 -8
  207. package/dist/ui/data-table-bulk-actions.js.map +1 -1
  208. package/dist/ui/data-table-card.d.ts.map +1 -1
  209. package/dist/ui/data-table-card.js +66 -47
  210. package/dist/ui/data-table-card.js.map +1 -1
  211. package/dist/ui/data-table-context.d.ts +4 -0
  212. package/dist/ui/data-table-context.d.ts.map +1 -1
  213. package/dist/ui/data-table-context.js +2 -2
  214. package/dist/ui/data-table-context.js.map +1 -1
  215. package/dist/ui/data-table-header.d.ts.map +1 -1
  216. package/dist/ui/data-table-header.js +50 -46
  217. package/dist/ui/data-table-header.js.map +1 -1
  218. package/dist/ui/data-table-pagination.js +3 -3
  219. package/dist/ui/data-table-pagination.js.map +1 -1
  220. package/dist/ui/data-table-toolbar.d.ts +11 -1
  221. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  222. package/dist/ui/data-table-toolbar.js +7 -7
  223. package/dist/ui/data-table-toolbar.js.map +1 -1
  224. package/dist/ui/data-table.d.ts +52 -5
  225. package/dist/ui/data-table.d.ts.map +1 -1
  226. package/dist/ui/data-table.js +181 -169
  227. package/dist/ui/data-table.js.map +1 -1
  228. package/dist/ui/dialog.d.ts.map +1 -1
  229. package/dist/ui/dialog.js +62 -61
  230. package/dist/ui/dialog.js.map +1 -1
  231. package/dist/ui/dot.d.ts.map +1 -1
  232. package/dist/ui/dot.js +10 -41
  233. package/dist/ui/dot.js.map +1 -1
  234. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  235. package/dist/ui/dropdown-menu.js +79 -78
  236. package/dist/ui/dropdown-menu.js.map +1 -1
  237. package/dist/ui/file-upload.d.ts.map +1 -1
  238. package/dist/ui/file-upload.js +117 -116
  239. package/dist/ui/file-upload.js.map +1 -1
  240. package/dist/ui/form.d.ts.map +1 -1
  241. package/dist/ui/form.js +27 -26
  242. package/dist/ui/form.js.map +1 -1
  243. package/dist/ui/hover-card.d.ts.map +1 -1
  244. package/dist/ui/hover-card.js +26 -25
  245. package/dist/ui/hover-card.js.map +1 -1
  246. package/dist/ui/icon.js +7 -7
  247. package/dist/ui/index.d.ts +2 -2
  248. package/dist/ui/index.d.ts.map +1 -1
  249. package/dist/ui/index.js +3 -3
  250. package/dist/ui/index.js.map +1 -1
  251. package/dist/ui/input-otp.js +1 -1
  252. package/dist/ui/input-otp.js.map +1 -1
  253. package/dist/ui/input.js +8 -8
  254. package/dist/ui/input.js.map +1 -1
  255. package/dist/ui/menubar.d.ts.map +1 -1
  256. package/dist/ui/menubar.js +73 -72
  257. package/dist/ui/menubar.js.map +1 -1
  258. package/dist/ui/navigation-menu.d.ts.map +1 -1
  259. package/dist/ui/navigation-menu.js +80 -79
  260. package/dist/ui/navigation-menu.js.map +1 -1
  261. package/dist/ui/number-input.js +3 -3
  262. package/dist/ui/number-input.js.map +1 -1
  263. package/dist/ui/pagination.js +1 -1
  264. package/dist/ui/pagination.js.map +1 -1
  265. package/dist/ui/popover.d.ts.map +1 -1
  266. package/dist/ui/progress-ring.js +2 -2
  267. package/dist/ui/progress-ring.js.map +1 -1
  268. package/dist/ui/progress.d.ts.map +1 -1
  269. package/dist/ui/progress.js +82 -74
  270. package/dist/ui/progress.js.map +1 -1
  271. package/dist/ui/radio.d.ts.map +1 -1
  272. package/dist/ui/radio.js +32 -31
  273. package/dist/ui/radio.js.map +1 -1
  274. package/dist/ui/search-input.d.ts.map +1 -1
  275. package/dist/ui/search-input.js +28 -27
  276. package/dist/ui/search-input.js.map +1 -1
  277. package/dist/ui/select.d.ts.map +1 -1
  278. package/dist/ui/select.js +67 -66
  279. package/dist/ui/select.js.map +1 -1
  280. package/dist/ui/sheet.js +1 -1
  281. package/dist/ui/sheet.js.map +1 -1
  282. package/dist/ui/sidebar.d.ts.map +1 -1
  283. package/dist/ui/sidebar.js +14 -14
  284. package/dist/ui/sidebar.js.map +1 -1
  285. package/dist/ui/slider.d.ts +63 -9
  286. package/dist/ui/slider.d.ts.map +1 -1
  287. package/dist/ui/slider.js +75 -33
  288. package/dist/ui/slider.js.map +1 -1
  289. package/dist/ui/split-button.d.ts +8 -2
  290. package/dist/ui/split-button.d.ts.map +1 -1
  291. package/dist/ui/split-button.js +49 -95
  292. package/dist/ui/split-button.js.map +1 -1
  293. package/dist/ui/stat-card.d.ts.map +1 -1
  294. package/dist/ui/stat-card.js +89 -88
  295. package/dist/ui/stat-card.js.map +1 -1
  296. package/dist/ui/stat-flash.js +16 -16
  297. package/dist/ui/stepper.d.ts.map +1 -1
  298. package/dist/ui/stepper.js +63 -62
  299. package/dist/ui/stepper.js.map +1 -1
  300. package/dist/ui/surface.d.ts.map +1 -1
  301. package/dist/ui/surface.js +2 -2
  302. package/dist/ui/surface.js.map +1 -1
  303. package/dist/ui/switch.js +1 -1
  304. package/dist/ui/switch.js.map +1 -1
  305. package/dist/ui/table.js +3 -3
  306. package/dist/ui/table.js.map +1 -1
  307. package/dist/ui/tabs.d.ts.map +1 -1
  308. package/dist/ui/tabs.js +68 -67
  309. package/dist/ui/tabs.js.map +1 -1
  310. package/dist/ui/textarea.js +5 -5
  311. package/dist/ui/textarea.js.map +1 -1
  312. package/dist/ui/toast.d.ts.map +1 -1
  313. package/dist/ui/toast.js +196 -195
  314. package/dist/ui/toast.js.map +1 -1
  315. package/dist/ui/toggle.d.ts.map +1 -1
  316. package/dist/ui/toggle.js +26 -24
  317. package/dist/ui/toggle.js.map +1 -1
  318. package/dist/ui/tooltip.d.ts.map +1 -1
  319. package/dist/ui/tooltip.js +37 -36
  320. package/dist/ui/tooltip.js.map +1 -1
  321. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  322. package/docs/components/composed/avatar-group.md +4 -4
  323. package/docs/components/composed/diff.md +10 -2
  324. package/docs/components/composed/schedule-view.md +1 -1
  325. package/docs/components/shell/app-shell.md +132 -0
  326. package/docs/components/ui/avatar.md +1 -1
  327. package/docs/components/ui/button.md +1 -1
  328. package/docs/components/ui/chat.md +7 -1
  329. package/docs/components/ui/color-swatch.md +1 -1
  330. package/docs/components/ui/data-table-toolbar.md +6 -2
  331. package/docs/components/ui/data-table.md +41 -7
  332. package/docs/components/ui/dot.md +1 -1
  333. package/docs/components/ui/progress.md +1 -0
  334. package/docs/components/ui/surface.md +3 -3
  335. package/docs/components/ui/table.md +2 -2
  336. package/docs/recipes/customize-brand.md +58 -0
  337. package/docs/recipes/install-astro.md +1 -0
  338. package/docs/recipes/install-next-app-router.md +1 -0
  339. package/docs/recipes/install-next-pages.md +22 -1
  340. package/docs/recipes/install-remix.md +1 -0
  341. package/docs/recipes/install-tanstack-start.md +1 -0
  342. package/docs/recipes/install-vite.md +2 -0
  343. package/docs/recipes/server-components.md +7 -4
  344. package/docs/recipes/troubleshoot.md +1 -0
  345. package/llms.txt +2 -1
  346. package/make-kit/Guidelines.md +2 -2
  347. package/make-kit/components/button.md +1 -1
  348. package/make-kit/components/card.md +6 -6
  349. package/make-kit/components/surface.md +4 -4
  350. package/make-kit/foundations/color.md +4 -4
  351. package/make-kit/foundations/dark-mode.md +1 -1
  352. package/make-kit/foundations/radius.md +1 -1
  353. package/make-kit/foundations/surfaces.md +9 -9
  354. package/mcp-manifest.json +358 -35
  355. package/package.json +8 -4
  356. package/skill/SKILL.md +12 -6
  357. package/skill/references/components.md +2 -1
  358. package/skill/references/customize-brand.md +58 -0
  359. package/skill/references/server-components.md +7 -4
  360. package/skill/references/setup-astro.md +1 -0
  361. package/skill/references/setup-next-app-router.md +1 -0
  362. package/skill/references/setup-next-pages.md +22 -1
  363. package/skill/references/setup-remix.md +1 -0
  364. package/skill/references/setup-tanstack-start.md +1 -0
  365. package/skill/references/setup-vite.md +2 -0
  366. package/skill/references/troubleshoot.md +1 -0
  367. package/dist/motion/check-motion-provider.d.ts +0 -2
  368. package/dist/motion/check-motion-provider.d.ts.map +0 -1
  369. package/dist/motion/index.js.map +0 -1
  370. package/dist/primitives/react-toast.d.ts +0 -120
  371. package/dist/ui/charts/_internal/scales.d.ts +0 -5
  372. package/dist/ui/charts/_internal/scales.d.ts.map +0 -1
  373. package/dist/ui/lib/slot.d.ts +0 -8
  374. package/dist/ui/lib/slot.d.ts.map +0 -1
@@ -1,40 +1,41 @@
1
1
  "use client";
2
2
  import { computePosition as e, flip$1 as t, offset$1 as n, shift$1 as r } from "../_chunks/primitives-internal.js";
3
3
  import { durations as i } from "../ui/lib/motion.js";
4
- import { cn as a } from "../ui/lib/utils.js";
5
- import { Spinner as o } from "../ui/spinner.js";
6
- import { Icon as s } from "../ui/icon.js";
7
- import { useIsMobile as c } from "../hooks/use-mobile.js";
8
- import { Button as l } from "../ui/button.js";
9
- import { Dialog as u, DialogContent as d, DialogFooter as f, DialogHeader as p, DialogTitle as m } from "../ui/dialog.js";
10
- import { SplitButton as h } from "../ui/split-button.js";
11
- import { ToggleGroup as g, ToggleGroupItem as _ } from "../ui/toggle-group.js";
12
- import { TruncatedText as v } from "../ui/truncated-text.js";
13
- import { MENTION_TOKEN_CLASS as y } from "../_chunks/mention.js";
14
- import { EmojiNode as b } from "./extensions/emoji-node.js";
15
- import { createEmojiSuggestion as x } from "../_chunks/emoji-suggestion.js";
16
- import { FileAttachment as ee, createSuggestionRenderer as S } from "../_chunks/mention-suggestion.js";
17
- import { CalendarGrid as C, useCalendar as w } from "../_chunks/use-calendar.js";
4
+ import { MotionPreference as a } from "../_chunks/motion-preference.js";
5
+ import { cn as o } from "../ui/lib/utils.js";
6
+ import { Spinner as s } from "../ui/spinner.js";
7
+ import { Icon as c } from "../ui/icon.js";
8
+ import { useIsMobile as l } from "../hooks/use-mobile.js";
9
+ import { Button as u } from "../ui/button.js";
10
+ import { Dialog as d, DialogContent as f, DialogFooter as p, DialogHeader as m, DialogTitle as h } from "../ui/dialog.js";
11
+ import { SplitButton as g } from "../ui/split-button.js";
12
+ import { ToggleGroup as _, ToggleGroupItem as v } from "../ui/toggle-group.js";
13
+ import { TruncatedText as y } from "../ui/truncated-text.js";
14
+ import { MENTION_TOKEN_CLASS as b } from "../_chunks/mention.js";
15
+ import { EmojiNode as x } from "./extensions/emoji-node.js";
16
+ import { createEmojiSuggestion as ee } from "../_chunks/emoji-suggestion.js";
17
+ import { FileAttachment as S, createSuggestionRenderer as C } from "../_chunks/mention-suggestion.js";
18
+ import { CalendarGrid as te, useCalendar as w } from "../_chunks/use-calendar.js";
18
19
  import * as T from "react";
19
20
  import { useCallback as E, useEffect as D, useRef as O, useState as k } from "react";
20
- import { Fragment as te, jsx as A, jsxs as j } from "react/jsx-runtime";
21
- import * as ne from "react-dom";
22
- import { IconAt as M, IconBlockquote as re, IconBold as ie, IconCalendarEvent as N, IconChevronDown as ae, IconClock as oe, IconCode as se, IconFile as ce, IconHighlight as le, IconItalic as ue, IconLink as de, IconList as P, IconListNumbers as fe, IconMicrophone as pe, IconMoodSmile as me, IconPencil as he, IconPlayerPause as ge, IconPlayerPlay as _e, IconPlus as ve, IconSend as ye, IconSlash as be, IconSquare as xe, IconStrikethrough as F, IconTextSize as Se, IconTrash as Ce, IconUnderline as I, IconX as L } from "@tabler/icons-react";
23
- import { AnimatePresence as R, motion as z, useReducedMotion as we } from "framer-motion";
24
- import Te from "@tiptap/extension-highlight";
25
- import Ee from "@tiptap/extension-image";
26
- import De from "@tiptap/extension-mention";
27
- import { CharacterCount as Oe, Placeholder as ke } from "@tiptap/extensions";
28
- import { EditorContent as Ae, Extension as je, useEditor as Me, useEditorState as B } from "@tiptap/react";
29
- import { BubbleMenu as Ne } from "@tiptap/react/menus";
30
- import Pe from "@tiptap/starter-kit";
31
- import { Extension as Fe } from "@tiptap/core";
32
- import V from "@tiptap/suggestion";
33
- import { PluginKey as Ie } from "@tiptap/pm/state";
34
- import { createRoot as Le } from "react-dom/client";
21
+ import { Fragment as ne, jsx as A, jsxs as j } from "react/jsx-runtime";
22
+ import * as re from "react-dom";
23
+ import { IconAt as ie, IconBlockquote as M, IconBold as ae, IconCalendarEvent as N, IconChevronDown as oe, IconClock as se, IconCode as ce, IconFile as le, IconHighlight as ue, IconItalic as de, IconLink as fe, IconList as P, IconListNumbers as pe, IconMicrophone as me, IconMoodSmile as he, IconPencil as ge, IconPlayerPause as _e, IconPlayerPlay as ve, IconPlus as ye, IconSend as be, IconSlash as xe, IconSquare as Se, IconStrikethrough as F, IconTextSize as Ce, IconTrash as we, IconUnderline as I, IconX as L } from "@tabler/icons-react";
24
+ import { AnimatePresence as Te, motion as R, useReducedMotion as Ee } from "framer-motion";
25
+ import De from "@tiptap/extension-highlight";
26
+ import Oe from "@tiptap/extension-image";
27
+ import ke from "@tiptap/extension-mention";
28
+ import { CharacterCount as Ae, Placeholder as je } from "@tiptap/extensions";
29
+ import { EditorContent as Me, Extension as Ne, useEditor as Pe, useEditorState as z } from "@tiptap/react";
30
+ import { BubbleMenu as Fe } from "@tiptap/react/menus";
31
+ import Ie from "@tiptap/starter-kit";
32
+ import { Extension as Le } from "@tiptap/core";
33
+ import B from "@tiptap/suggestion";
34
+ import { PluginKey as Re } from "@tiptap/pm/state";
35
+ import { createRoot as ze } from "react-dom/client";
35
36
  //#region src/composed/extensions/slash-command.tsx
36
- var H = T.forwardRef(({ groups: e, query: t, command: n }, r) => {
37
- let [i, o] = T.useState(0), s = T.useMemo(() => {
37
+ var V = T.forwardRef(({ groups: e, query: t, command: n }, r) => {
38
+ let [i, a] = T.useState(0), s = T.useMemo(() => {
38
39
  let n = t.toLowerCase(), r = [];
39
40
  return e.forEach((e, t) => {
40
41
  e.commands.forEach((e) => {
@@ -45,7 +46,7 @@ var H = T.forwardRef(({ groups: e, query: t, command: n }, r) => {
45
46
  });
46
47
  }), r;
47
48
  }, [e, t]);
48
- if (T.useEffect(() => o(0), [s]), T.useImperativeHandle(r, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (o((e) => (e + s.length - 1) % s.length), !0) : e.key === "ArrowDown" ? (o((e) => (e + 1) % s.length), !0) : e.key === "Enter" ? (s[i] && n(s[i].command), !0) : !1 })), !s.length) return null;
49
+ if (T.useEffect(() => a(0), [s]), T.useImperativeHandle(r, () => ({ onKeyDown: ({ event: e }) => e.key === "ArrowUp" ? (a((e) => (e + s.length - 1) % s.length), !0) : e.key === "ArrowDown" ? (a((e) => (e + 1) % s.length), !0) : e.key === "Enter" ? (s[i] && n(s[i].command), !0) : !1 })), !s.length) return null;
49
50
  let c = [], l = 0;
50
51
  for (let t of s) {
51
52
  let n = e[t.groupIndex].label, r = c[c.length - 1];
@@ -77,7 +78,7 @@ var H = T.forwardRef(({ groups: e, query: t, command: n }, r) => {
77
78
  role: "option",
78
79
  "aria-selected": t === i,
79
80
  onClick: () => n(e),
80
- className: a("flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-left cursor-pointer", t === i ? "bg-surface-raised-hover" : "hover:bg-surface-raised-hover"),
81
+ className: o("flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-left cursor-pointer", t === i ? "bg-surface-panel-hover" : "hover:bg-surface-panel-hover"),
81
82
  children: [r && /* @__PURE__ */ A("span", {
82
83
  className: "flex h-4 w-4 shrink-0 items-center justify-center text-surface-fg-muted",
83
84
  children: /* @__PURE__ */ A(r, { className: "h-4 w-4" })
@@ -97,15 +98,15 @@ var H = T.forwardRef(({ groups: e, query: t, command: n }, r) => {
97
98
  }, e.label))
98
99
  });
99
100
  });
100
- H.displayName = "SlashCommandList";
101
- function Re(e) {
101
+ V.displayName = "SlashCommandList";
102
+ function Be(e) {
102
103
  return () => {
103
104
  let t = null, n = null, r = null;
104
105
  return {
105
106
  onStart: (i) => {
106
107
  n = document.createElement("div"), n.style.position = "absolute", n.style.zIndex = "1400";
107
108
  let a = i.clientRect?.();
108
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = Le(n), t.render(/* @__PURE__ */ A(H, {
109
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), document.body.appendChild(n), t = ze(n), t.render(/* @__PURE__ */ A(V, {
109
110
  ref: (e) => {
110
111
  r = e;
111
112
  },
@@ -117,7 +118,7 @@ function Re(e) {
117
118
  onUpdate: (i) => {
118
119
  if (!t || !n) return;
119
120
  let a = i.clientRect?.();
120
- a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ A(H, {
121
+ a && (n.style.left = `${a.left}px`, n.style.top = `${a.bottom + 4}px`), t.render(/* @__PURE__ */ A(V, {
121
122
  ref: (e) => {
122
123
  r = e;
123
124
  },
@@ -133,13 +134,13 @@ function Re(e) {
133
134
  };
134
135
  };
135
136
  }
136
- function ze(e) {
137
+ function Ve(e) {
137
138
  let t = e.flatMap((e) => e.commands);
138
- return Fe.create({
139
+ return Le.create({
139
140
  name: "slashCommand",
140
141
  addProseMirrorPlugins() {
141
- return [V({
142
- pluginKey: new Ie("slashCommand"),
142
+ return [B({
143
+ pluginKey: new Re("slashCommand"),
143
144
  editor: this.editor,
144
145
  char: "/",
145
146
  startOfLine: !0,
@@ -152,18 +153,18 @@ function ze(e) {
152
153
  command: ({ editor: e, range: t, props: n }) => {
153
154
  e.chain().focus().deleteRange(t).run(), n.action(e);
154
155
  },
155
- render: Re(e)
156
+ render: Be(e)
156
157
  })];
157
158
  }
158
159
  });
159
160
  }
160
161
  //#endregion
161
162
  //#region src/composed/rich-chat-input/attachment-strip.tsx
162
- function Be(e) {
163
+ function He(e) {
163
164
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
164
165
  }
165
- function Ve({ attachments: e, onRemoveAttachment: t }) {
166
- return /* @__PURE__ */ A(z.div, {
166
+ function Ue({ attachments: e, onRemoveAttachment: t }) {
167
+ return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(R.div, {
167
168
  initial: {
168
169
  height: 0,
169
170
  opacity: 0
@@ -190,9 +191,9 @@ function Ve({ attachments: e, onRemoveAttachment: t }) {
190
191
  role: "list",
191
192
  "aria-label": "Attachments",
192
193
  className: "flex gap-ds-02 overflow-x-auto px-ds-04 py-ds-02b border-b border-surface-border",
193
- children: /* @__PURE__ */ A(R, {
194
+ children: /* @__PURE__ */ A(Te, {
194
195
  initial: !1,
195
- children: e.map((e) => e.type === "image" ? /* @__PURE__ */ j(z.div, {
196
+ children: e.map((e) => e.type === "image" ? /* @__PURE__ */ j(R.div, {
196
197
  role: "listitem",
197
198
  "aria-label": `Image: ${e.name}`,
198
199
  layout: !0,
@@ -233,19 +234,19 @@ function Ve({ attachments: e, onRemoveAttachment: t }) {
233
234
  className: "absolute -top-1 -right-1 h-ico-sm w-ico-sm rounded-pill bg-error-9 text-error-fg flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
234
235
  "aria-label": `Remove ${e.name}`,
235
236
  title: "Remove",
236
- children: /* @__PURE__ */ A(s, {
237
+ children: /* @__PURE__ */ A(c, {
237
238
  icon: L,
238
239
  size: "xs"
239
240
  })
240
241
  }),
241
242
  e.uploading && /* @__PURE__ */ A("div", {
242
243
  className: "absolute inset-0 rounded-control bg-surface-overlay/50 flex items-center justify-center",
243
- children: /* @__PURE__ */ A(o, { size: "sm" })
244
+ children: /* @__PURE__ */ A(s, { size: "sm" })
244
245
  })
245
246
  ]
246
- }, e.id) : /* @__PURE__ */ j(z.div, {
247
+ }, e.id) : /* @__PURE__ */ j(R.div, {
247
248
  role: "listitem",
248
- "aria-label": `File: ${e.name}, ${Be(e.size)}`,
249
+ "aria-label": `File: ${e.name}, ${He(e.size)}`,
249
250
  layout: !0,
250
251
  initial: {
251
252
  scale: 0,
@@ -272,28 +273,28 @@ function Ve({ attachments: e, onRemoveAttachment: t }) {
272
273
  },
273
274
  opacity: { duration: i.fast02 }
274
275
  },
275
- className: "flex items-center gap-ds-02 shrink-0 rounded-control bg-surface-raised px-ds-03 py-ds-01 group",
276
+ className: "flex items-center gap-ds-02 shrink-0 rounded-control bg-surface-panel px-ds-03 py-ds-01 group",
276
277
  children: [
277
- /* @__PURE__ */ A(s, {
278
- icon: ce,
278
+ /* @__PURE__ */ A(c, {
279
+ icon: le,
279
280
  size: "xs",
280
281
  className: "text-surface-fg-muted"
281
282
  }),
282
- /* @__PURE__ */ A(v, {
283
+ /* @__PURE__ */ A(y, {
283
284
  mode: "middle",
284
285
  className: "max-w-[120px] text-caption text-surface-fg-muted",
285
286
  children: e.name
286
287
  }),
287
288
  /* @__PURE__ */ A("span", {
288
289
  className: "text-caption text-surface-fg-subtle",
289
- children: Be(e.size)
290
+ children: He(e.size)
290
291
  }),
291
292
  /* @__PURE__ */ A("button", {
292
293
  onClick: () => t(e.id),
293
294
  className: "text-surface-fg-subtle hover:text-error-11 opacity-0 group-hover:opacity-100 transition-opacity duration-fast-02",
294
295
  "aria-label": `Remove ${e.name}`,
295
296
  title: "Remove",
296
- children: /* @__PURE__ */ A(s, {
297
+ children: /* @__PURE__ */ A(c, {
297
298
  icon: L,
298
299
  size: "xs"
299
300
  })
@@ -302,11 +303,11 @@ function Ve({ attachments: e, onRemoveAttachment: t }) {
302
303
  }, e.id))
303
304
  })
304
305
  })
305
- });
306
+ }) });
306
307
  }
307
308
  //#endregion
308
309
  //#region src/composed/rich-chat-input/audio-waveform.tsx
309
- var U = T.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: o = 2, barCount: s = 40, height: c = 32, className: l, ...u }, d) {
310
+ var H = T.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r = 0, barWidth: i = 3, barGap: a = 2, barCount: s = 40, height: c = 32, className: l, ...u }, d) {
310
311
  let [f, p] = T.useState(() => Array(s).fill(.05)), m = T.useRef(0), h = T.useRef(f);
311
312
  T.useEffect(() => {
312
313
  if (e !== "live" || !t) return;
@@ -341,13 +342,13 @@ var U = T.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
341
342
  n,
342
343
  s
343
344
  ]);
344
- let g = s * (i + o) - o, _ = T.useMemo(() => f.map((t, n) => {
345
- let a = Math.max(2, t * c), l = n * (i + o), u = (c - a) / 2, d = e === "static" && r > 0 && n / s <= r;
345
+ let g = s * (i + a) - a, _ = T.useMemo(() => f.map((t, n) => {
346
+ let o = Math.max(2, t * c), l = n * (i + a), u = (c - o) / 2, d = e === "static" && r > 0 && n / s <= r;
346
347
  return /* @__PURE__ */ A("rect", {
347
348
  x: l,
348
349
  y: u,
349
350
  width: i,
350
- height: a,
351
+ height: o,
351
352
  rx: i / 2,
352
353
  fill: d ? "var(--color-accent-9)" : "var(--color-surface-border)"
353
354
  }, n);
@@ -356,7 +357,7 @@ var U = T.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
356
357
  r,
357
358
  e,
358
359
  i,
359
- o,
360
+ a,
360
361
  s,
361
362
  c
362
363
  ]);
@@ -366,24 +367,24 @@ var U = T.forwardRef(function({ mode: e, analyserNode: t, data: n, progress: r =
366
367
  viewBox: `0 0 ${g} ${c}`,
367
368
  preserveAspectRatio: "none",
368
369
  "aria-hidden": "true",
369
- className: a("shrink-0", l),
370
+ className: o("shrink-0", l),
370
371
  ...u,
371
372
  children: _
372
373
  });
373
374
  });
374
- U.displayName = "AudioWaveform";
375
+ H.displayName = "AudioWaveform";
375
376
  //#endregion
376
377
  //#region src/composed/rich-chat-input/audio-player.tsx
377
- var He = [
378
+ var We = [
378
379
  1,
379
380
  1.5,
380
381
  2
381
382
  ];
382
- function Ue(e) {
383
+ function Ge(e) {
383
384
  return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
384
385
  }
385
- var We = T.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, o) {
386
- let s = T.useRef(null), c = T.useRef(null), [u, d] = T.useState(!1), [f, p] = T.useState(0), [m, h] = T.useState(0), [g, _] = T.useState(null), v = T.useMemo(() => {
386
+ var Ke = T.forwardRef(function({ src: e, duration: t, waveformData: n, className: r, ...i }, a) {
387
+ let s = T.useRef(null), c = T.useRef(null), [l, d] = T.useState(!1), [f, p] = T.useState(0), [m, h] = T.useState(0), [g, _] = T.useState(null), v = T.useMemo(() => {
387
388
  if (typeof e == "string") return e;
388
389
  let t = URL.createObjectURL(e);
389
390
  return _(t), t;
@@ -402,8 +403,8 @@ var We = T.forwardRef(function({ src: e, duration: t, waveformData: n, className
402
403
  }, []);
403
404
  let y = T.useCallback(() => {
404
405
  let e = s.current;
405
- e && (u ? (e.pause(), d(!1)) : (e.play(), d(!0)));
406
- }, [u]), b = T.useCallback((e) => {
406
+ e && (l ? (e.pause(), d(!1)) : (e.play(), d(!0)));
407
+ }, [l]), b = T.useCallback((e) => {
407
408
  (e.key === " " || e.key === "Enter") && (e.preventDefault(), y());
408
409
  }, [y]), x = T.useCallback((e) => {
409
410
  let n = s.current, r = c.current;
@@ -411,14 +412,14 @@ var We = T.forwardRef(function({ src: e, duration: t, waveformData: n, className
411
412
  let i = r.getBoundingClientRect(), a = e.clientX - i.left;
412
413
  n.currentTime = Math.max(0, Math.min(1, a / i.width)) * t, p(n.currentTime);
413
414
  }, [t]), ee = T.useCallback(() => {
414
- let e = (m + 1) % He.length;
415
- h(e), s.current && (s.current.playbackRate = He[e]);
416
- }, [m]), S = t > 0 ? f / t : 0, C = He[m];
415
+ let e = (m + 1) % We.length;
416
+ h(e), s.current && (s.current.playbackRate = We[e]);
417
+ }, [m]), S = t > 0 ? f / t : 0, C = We[m];
417
418
  return /* @__PURE__ */ j("div", {
418
- ref: o,
419
+ ref: a,
419
420
  role: "group",
420
421
  "aria-label": "Voice message player",
421
- className: a("flex items-center gap-ds-03", r),
422
+ className: o("flex items-center gap-ds-03", r),
422
423
  ...i,
423
424
  children: [
424
425
  /* @__PURE__ */ A("audio", {
@@ -426,22 +427,22 @@ var We = T.forwardRef(function({ src: e, duration: t, waveformData: n, className
426
427
  src: v,
427
428
  preload: "metadata"
428
429
  }),
429
- /* @__PURE__ */ A(l, {
430
+ /* @__PURE__ */ A(u, {
430
431
  type: "button",
431
432
  variant: "solid",
432
433
  shape: "pill",
433
434
  size: "icon-sm",
434
435
  onClick: y,
435
436
  onKeyDown: b,
436
- "aria-label": u ? "Pause voice message" : "Play voice message",
437
+ "aria-label": l ? "Pause voice message" : "Play voice message",
437
438
  className: "shrink-0 active:scale-95",
438
- children: A(u ? ge : _e, {
439
+ children: A(l ? _e : ve, {
439
440
  size: 16,
440
441
  stroke: 2,
441
442
  "aria-hidden": "true"
442
443
  })
443
444
  }),
444
- /* @__PURE__ */ A(U, {
445
+ /* @__PURE__ */ A(H, {
445
446
  ref: c,
446
447
  mode: "static",
447
448
  data: n,
@@ -452,32 +453,32 @@ var We = T.forwardRef(function({ src: e, duration: t, waveformData: n, className
452
453
  /* @__PURE__ */ j("span", {
453
454
  className: "text-caption tabular-nums text-surface-fg-subtle whitespace-nowrap",
454
455
  children: [
455
- Ue(f),
456
+ Ge(f),
456
457
  " / ",
457
- Ue(t)
458
+ Ge(t)
458
459
  ]
459
460
  }),
460
461
  /* @__PURE__ */ j("button", {
461
462
  type: "button",
462
463
  onClick: ee,
463
464
  "aria-label": `Playback speed ${C}x`,
464
- className: "shrink-0 text-body-xs bg-surface-raised rounded-pill 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",
465
+ className: "shrink-0 text-body-xs bg-surface-panel rounded-pill px-ds-02 py-[1px] hover:bg-surface-panel-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",
465
466
  children: [C, "x"]
466
467
  })
467
468
  ]
468
469
  });
469
470
  });
470
- We.displayName = "AudioPlayer";
471
+ Ke.displayName = "AudioPlayer";
471
472
  //#endregion
472
473
  //#region src/composed/rich-chat-input/chat-toolbar.tsx
473
- var Ge = T.createContext(null);
474
- function W() {
475
- let e = T.useContext(Ge);
474
+ var qe = T.createContext(null);
475
+ function U() {
476
+ let e = T.useContext(qe);
476
477
  if (!e) throw Error("Toolbar primitives must be used inside <ChatToolbar>");
477
478
  return e;
478
479
  }
479
- function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, className: o }) {
480
- let { disabled: s } = W();
480
+ function W({ onClick: e, isActive: t, disabled: n, title: r, children: i, className: a }) {
481
+ let { disabled: s } = U();
481
482
  return /* @__PURE__ */ A("button", {
482
483
  type: "button",
483
484
  onClick: e,
@@ -485,235 +486,235 @@ function G({ onClick: e, isActive: t, disabled: n, title: r, children: i, classN
485
486
  title: r,
486
487
  "aria-label": r,
487
488
  "aria-pressed": t,
488
- className: a("inline-flex h-ds-xs-plus items-center justify-center rounded-control touch-target", !o?.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", o),
489
+ className: o("inline-flex h-ds-xs-plus items-center justify-center rounded-control touch-target", !a?.includes("w-") && "w-ds-xs-plus", "transition-[color,background-color,transform] duration-fast-01 ease-productive-standard", "hover:bg-surface-panel-hover hover:text-surface-fg", "active:scale-95", "disabled:pointer-events-none disabled:opacity-action-disabled", t ? "bg-surface-panel-hover text-accent-11" : "text-surface-fg-subtle", a),
489
490
  children: i
490
491
  });
491
492
  }
492
- function K() {
493
+ function G() {
493
494
  return /* @__PURE__ */ A("div", { className: "h-4 w-px bg-surface-border-subtle mx-ds-01" });
494
495
  }
495
- function q({ children: e, className: t }) {
496
+ function K({ children: e, className: t }) {
496
497
  return /* @__PURE__ */ A("div", {
497
- className: a("flex items-center gap-ds-01", t),
498
+ className: o("flex items-center gap-ds-01", t),
498
499
  children: e
499
500
  });
500
501
  }
501
- function Ke() {
502
- let { editor: e } = W(), { isActive: t } = B({
502
+ function Je() {
503
+ let { editor: e } = U(), { isActive: t } = z({
503
504
  editor: e,
504
505
  selector: ({ editor: e }) => ({ isActive: e.isActive("bold") })
505
506
  });
506
- return /* @__PURE__ */ A(G, {
507
+ return /* @__PURE__ */ A(W, {
507
508
  onClick: () => e.chain().focus().toggleBold().run(),
508
509
  isActive: t,
509
510
  title: "Bold",
510
- children: /* @__PURE__ */ A(s, {
511
- icon: ie,
511
+ children: /* @__PURE__ */ A(c, {
512
+ icon: ae,
512
513
  size: "xs"
513
514
  })
514
515
  });
515
516
  }
516
- function qe() {
517
- let { editor: e } = W(), { isActive: t } = B({
517
+ function Ye() {
518
+ let { editor: e } = U(), { isActive: t } = z({
518
519
  editor: e,
519
520
  selector: ({ editor: e }) => ({ isActive: e.isActive("italic") })
520
521
  });
521
- return /* @__PURE__ */ A(G, {
522
+ return /* @__PURE__ */ A(W, {
522
523
  onClick: () => e.chain().focus().toggleItalic().run(),
523
524
  isActive: t,
524
525
  title: "Italic",
525
- children: /* @__PURE__ */ A(s, {
526
- icon: ue,
526
+ children: /* @__PURE__ */ A(c, {
527
+ icon: de,
527
528
  size: "xs"
528
529
  })
529
530
  });
530
531
  }
531
- function Je() {
532
- let { editor: e } = W(), { isActive: t } = B({
532
+ function Xe() {
533
+ let { editor: e } = U(), { isActive: t } = z({
533
534
  editor: e,
534
535
  selector: ({ editor: e }) => ({ isActive: e.isActive("underline") })
535
536
  });
536
- return /* @__PURE__ */ A(G, {
537
+ return /* @__PURE__ */ A(W, {
537
538
  onClick: () => e.chain().focus().toggleUnderline().run(),
538
539
  isActive: t,
539
540
  title: "Underline",
540
- children: /* @__PURE__ */ A(s, {
541
+ children: /* @__PURE__ */ A(c, {
541
542
  icon: I,
542
543
  size: "xs"
543
544
  })
544
545
  });
545
546
  }
546
- function Ye() {
547
- let { editor: e } = W(), { isActive: t } = B({
547
+ function Ze() {
548
+ let { editor: e } = U(), { isActive: t } = z({
548
549
  editor: e,
549
550
  selector: ({ editor: e }) => ({ isActive: e.isActive("strike") })
550
551
  });
551
- return /* @__PURE__ */ A(G, {
552
+ return /* @__PURE__ */ A(W, {
552
553
  onClick: () => e.chain().focus().toggleStrike().run(),
553
554
  isActive: t,
554
555
  title: "Strikethrough",
555
- children: /* @__PURE__ */ A(s, {
556
+ children: /* @__PURE__ */ A(c, {
556
557
  icon: F,
557
558
  size: "xs"
558
559
  })
559
560
  });
560
561
  }
561
- function Xe() {
562
- let { editor: e } = W(), { isActive: t } = B({
562
+ function Qe() {
563
+ let { editor: e } = U(), { isActive: t } = z({
563
564
  editor: e,
564
565
  selector: ({ editor: e }) => ({ isActive: e.isActive("highlight") })
565
566
  });
566
- return /* @__PURE__ */ A(G, {
567
+ return /* @__PURE__ */ A(W, {
567
568
  onClick: () => e.chain().focus().toggleHighlight().run(),
568
569
  isActive: t,
569
570
  title: "Highlight",
570
- children: /* @__PURE__ */ A(s, {
571
- icon: le,
571
+ children: /* @__PURE__ */ A(c, {
572
+ icon: ue,
572
573
  size: "xs"
573
574
  })
574
575
  });
575
576
  }
576
- function Ze() {
577
- let { editor: e } = W(), { isActive: t } = B({
577
+ function $e() {
578
+ let { editor: e } = U(), { isActive: t } = z({
578
579
  editor: e,
579
580
  selector: ({ editor: e }) => ({ isActive: e.isActive("code") })
580
581
  });
581
- return /* @__PURE__ */ A(G, {
582
+ return /* @__PURE__ */ A(W, {
582
583
  onClick: () => e.chain().focus().toggleCode().run(),
583
584
  isActive: t,
584
585
  title: "Inline code",
585
- children: /* @__PURE__ */ A(s, {
586
- icon: se,
586
+ children: /* @__PURE__ */ A(c, {
587
+ icon: ce,
587
588
  size: "xs"
588
589
  })
589
590
  });
590
591
  }
591
- function Qe() {
592
- let { editor: e } = W(), { isActive: t } = B({
592
+ function et() {
593
+ let { editor: e } = U(), { isActive: t } = z({
593
594
  editor: e,
594
595
  selector: ({ editor: e }) => ({ isActive: e.isActive("bulletList") })
595
596
  });
596
- return /* @__PURE__ */ A(G, {
597
+ return /* @__PURE__ */ A(W, {
597
598
  onClick: () => e.chain().focus().toggleBulletList().run(),
598
599
  isActive: t,
599
600
  title: "Bullet list",
600
- children: /* @__PURE__ */ A(s, {
601
+ children: /* @__PURE__ */ A(c, {
601
602
  icon: P,
602
603
  size: "xs"
603
604
  })
604
605
  });
605
606
  }
606
- function $e() {
607
- let { editor: e } = W(), { isActive: t } = B({
607
+ function tt() {
608
+ let { editor: e } = U(), { isActive: t } = z({
608
609
  editor: e,
609
610
  selector: ({ editor: e }) => ({ isActive: e.isActive("orderedList") })
610
611
  });
611
- return /* @__PURE__ */ A(G, {
612
+ return /* @__PURE__ */ A(W, {
612
613
  onClick: () => e.chain().focus().toggleOrderedList().run(),
613
614
  isActive: t,
614
615
  title: "Ordered list",
615
- children: /* @__PURE__ */ A(s, {
616
- icon: fe,
616
+ children: /* @__PURE__ */ A(c, {
617
+ icon: pe,
617
618
  size: "xs"
618
619
  })
619
620
  });
620
621
  }
621
- function et() {
622
- let { editor: e } = W(), { isActive: t } = B({
622
+ function nt() {
623
+ let { editor: e } = U(), { isActive: t } = z({
623
624
  editor: e,
624
625
  selector: ({ editor: e }) => ({ isActive: e.isActive("blockquote") })
625
626
  });
626
- return /* @__PURE__ */ A(G, {
627
+ return /* @__PURE__ */ A(W, {
627
628
  onClick: () => e.chain().focus().toggleBlockquote().run(),
628
629
  isActive: t,
629
630
  title: "Quote",
630
- children: /* @__PURE__ */ A(s, {
631
- icon: re,
631
+ children: /* @__PURE__ */ A(c, {
632
+ icon: M,
632
633
  size: "xs"
633
634
  })
634
635
  });
635
636
  }
636
- function tt() {
637
- let { editor: e } = W(), { isActive: t } = B({
637
+ function q() {
638
+ let { editor: e } = U(), { isActive: t } = z({
638
639
  editor: e,
639
640
  selector: ({ editor: e }) => ({ isActive: e.isActive("link") })
640
641
  });
641
- return /* @__PURE__ */ A(G, {
642
+ return /* @__PURE__ */ A(W, {
642
643
  onClick: () => {
643
644
  let t = window.prompt("URL");
644
645
  t && e.chain().focus().setLink({ href: t }).run();
645
646
  },
646
647
  isActive: t,
647
648
  title: "Link",
648
- children: /* @__PURE__ */ A(s, {
649
- icon: de,
649
+ children: /* @__PURE__ */ A(c, {
650
+ icon: fe,
650
651
  size: "xs"
651
652
  })
652
653
  });
653
654
  }
654
- function nt() {
655
- let { editor: e } = W();
656
- return /* @__PURE__ */ A(G, {
655
+ function rt() {
656
+ let { editor: e } = U();
657
+ return /* @__PURE__ */ A(W, {
657
658
  onClick: () => e.chain().focus().insertContent("@").run(),
658
659
  title: "Mention",
659
- children: /* @__PURE__ */ A(s, {
660
- icon: M,
660
+ children: /* @__PURE__ */ A(c, {
661
+ icon: ie,
661
662
  size: "xs"
662
663
  })
663
664
  });
664
665
  }
665
666
  function J() {
666
- let { editor: e } = W();
667
- return /* @__PURE__ */ A(G, {
667
+ let { editor: e } = U();
668
+ return /* @__PURE__ */ A(W, {
668
669
  onClick: () => e.chain().focus().insertContent(":").run(),
669
670
  title: "Emoji",
670
- children: /* @__PURE__ */ A(s, {
671
- icon: me,
671
+ children: /* @__PURE__ */ A(c, {
672
+ icon: he,
672
673
  size: "xs"
673
674
  })
674
675
  });
675
676
  }
676
- function rt() {
677
- let { editor: e } = W();
678
- return /* @__PURE__ */ A(G, {
677
+ function it() {
678
+ let { editor: e } = U();
679
+ return /* @__PURE__ */ A(W, {
679
680
  onClick: () => e.chain().focus().insertContent("/").run(),
680
681
  title: "Slash command",
681
- children: /* @__PURE__ */ A(s, {
682
- icon: be,
682
+ children: /* @__PURE__ */ A(c, {
683
+ icon: xe,
683
684
  size: "xs"
684
685
  })
685
686
  });
686
687
  }
687
688
  function Y({ items: e, isMobile: t, hasMentions: n, hasSlashCommands: r }) {
688
689
  let i = (t) => !e || e.includes(t);
689
- return /* @__PURE__ */ j(te, { children: [
690
- !t && /* @__PURE__ */ j(q, { children: [
691
- i("bold") && /* @__PURE__ */ A(Ke, {}),
692
- i("italic") && /* @__PURE__ */ A(qe, {}),
693
- i("underline") && /* @__PURE__ */ A(Je, {}),
694
- i("strike") && /* @__PURE__ */ A(Ye, {}),
695
- i("highlight") && /* @__PURE__ */ A(Xe, {})
690
+ return /* @__PURE__ */ j(ne, { children: [
691
+ !t && /* @__PURE__ */ j(K, { children: [
692
+ i("bold") && /* @__PURE__ */ A(Je, {}),
693
+ i("italic") && /* @__PURE__ */ A(Ye, {}),
694
+ i("underline") && /* @__PURE__ */ A(Xe, {}),
695
+ i("strike") && /* @__PURE__ */ A(Ze, {}),
696
+ i("highlight") && /* @__PURE__ */ A(Qe, {})
696
697
  ] }),
697
- !t && /* @__PURE__ */ A(K, {}),
698
- !t && /* @__PURE__ */ j(q, { children: [i("bulletList") && /* @__PURE__ */ A(Qe, {}), i("orderedList") && /* @__PURE__ */ A($e, {})] }),
699
- !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ A(K, {}),
700
- !t && /* @__PURE__ */ j(q, { children: [
701
- i("blockquote") && /* @__PURE__ */ A(et, {}),
702
- i("link") && /* @__PURE__ */ A(tt, {}),
703
- i("code") && /* @__PURE__ */ A(Ze, {})
698
+ !t && /* @__PURE__ */ A(G, {}),
699
+ !t && /* @__PURE__ */ j(K, { children: [i("bulletList") && /* @__PURE__ */ A(et, {}), i("orderedList") && /* @__PURE__ */ A(tt, {})] }),
700
+ !t && (i("blockquote") || i("link") || i("code")) && /* @__PURE__ */ A(G, {}),
701
+ !t && /* @__PURE__ */ j(K, { children: [
702
+ i("blockquote") && /* @__PURE__ */ A(nt, {}),
703
+ i("link") && /* @__PURE__ */ A(q, {}),
704
+ i("code") && /* @__PURE__ */ A($e, {})
704
705
  ] }),
705
- !t && (n || r) && /* @__PURE__ */ A(K, {}),
706
- /* @__PURE__ */ j(q, { children: [
707
- n && i("mention") && /* @__PURE__ */ A(nt, {}),
706
+ !t && (n || r) && /* @__PURE__ */ A(G, {}),
707
+ /* @__PURE__ */ j(K, { children: [
708
+ n && i("mention") && /* @__PURE__ */ A(rt, {}),
708
709
  i("emoji") && /* @__PURE__ */ A(J, {}),
709
- r && i("slash") && /* @__PURE__ */ A(rt, {})
710
+ r && i("slash") && /* @__PURE__ */ A(it, {})
710
711
  ] })
711
712
  ] });
712
713
  }
713
- function it({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
714
+ function at({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashCommands: i, disabled: a }) {
714
715
  if (t === !1) return null;
715
716
  let o = typeof t != "boolean" && !Array.isArray(t), s = Array.isArray(t) ? t : null;
716
- return /* @__PURE__ */ A(Ge.Provider, {
717
+ return /* @__PURE__ */ A(qe.Provider, {
717
718
  value: {
718
719
  editor: e,
719
720
  disabled: a
@@ -733,7 +734,7 @@ function it({ editor: e, toolbar: t, isMobile: n, hasMentions: r, hasSlashComman
733
734
  }
734
735
  //#endregion
735
736
  //#region src/composed/rich-chat-input/recording-overlay.tsx
736
- function at(e) {
737
+ function ot(e) {
737
738
  let t = Math.floor(e / 60), n = Math.floor(e % 60);
738
739
  return {
739
740
  minutes: String(t),
@@ -741,27 +742,27 @@ function at(e) {
741
742
  secs: n.toString().padStart(2, "0")
742
743
  };
743
744
  }
744
- function ot({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
745
- let i = we();
745
+ function st({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
746
+ let i = Ee();
746
747
  T.useEffect(() => {
747
748
  let e = (e) => {
748
749
  e.key === "Escape" && r();
749
750
  };
750
751
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
751
752
  }, [r]);
752
- let o = n != null && n > 0 && e >= n - 10, s = n != null && n > 0 && e >= n - 5, c = s ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", l = at(e), u = s ? "text-error-11" : o ? "text-warning-11" : "text-surface-fg";
753
+ let a = n != null && n > 0 && e >= n - 10, s = n != null && n > 0 && e >= n - 5, c = s ? "animate-[pulse_500ms_ease-in-out_infinite]" : "animate-[pulse_1s_ease-in-out_infinite]", l = ot(e), u = s ? "text-error-11" : a ? "text-warning-11" : "text-surface-fg";
753
754
  return /* @__PURE__ */ j("div", {
754
755
  role: "status",
755
756
  "aria-live": "polite",
756
757
  "aria-label": "Recording voice message",
757
- className: "absolute inset-0 flex items-center gap-ds-03 px-ds-04 py-ds-03 bg-surface-raised-hover rounded-surface z-10",
758
+ className: "absolute inset-0 flex items-center gap-ds-03 px-ds-04 py-ds-03 bg-surface-panel-hover rounded-surface z-10",
758
759
  children: [
759
760
  /* @__PURE__ */ A("span", {
760
- className: a("w-ds-02b h-ds-02b shrink-0 rounded-pill bg-error-9", i ? "opacity-100" : c),
761
+ className: o("w-ds-02b h-ds-02b shrink-0 rounded-pill bg-error-9", i ? "opacity-100" : c),
761
762
  "aria-hidden": "true"
762
763
  }),
763
764
  /* @__PURE__ */ j("span", {
764
- className: a("text-body-sm font-mono tabular-nums whitespace-nowrap", u),
765
+ className: o("text-body-sm font-mono tabular-nums whitespace-nowrap", u),
765
766
  "aria-label": `${l.minutes} minutes ${l.secs} seconds`,
766
767
  children: [
767
768
  l.minutes,
@@ -775,7 +776,7 @@ function ot({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
775
776
  }),
776
777
  /* @__PURE__ */ A("div", {
777
778
  className: "flex-1 min-w-0 overflow-hidden",
778
- children: /* @__PURE__ */ A(U, {
779
+ children: /* @__PURE__ */ A(H, {
779
780
  mode: "live",
780
781
  analyserNode: t,
781
782
  height: 24,
@@ -786,11 +787,11 @@ function ot({ duration: e, analyserNode: t, maxDuration: n, onCancel: r }) {
786
787
  ]
787
788
  });
788
789
  }
789
- ot.displayName = "RecordingOverlay";
790
+ st.displayName = "RecordingOverlay";
790
791
  //#endregion
791
792
  //#region src/composed/rich-chat-input/reply-banner.tsx
792
- function st({ author: e, preview: t, onDismiss: n }) {
793
- return /* @__PURE__ */ A(z.div, {
793
+ function ct({ author: e, preview: t, onDismiss: n }) {
794
+ return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(R.div, {
794
795
  initial: {
795
796
  height: 0,
796
797
  opacity: 0
@@ -836,20 +837,20 @@ function st({ author: e, preview: t, onDismiss: n }) {
836
837
  }), /* @__PURE__ */ A("button", {
837
838
  type: "button",
838
839
  onClick: n,
839
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control 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"),
840
+ className: o("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-panel-hover", "transition-colors duration-fast-01 ease-productive-standard", "active:scale-95"),
840
841
  "aria-label": "Cancel reply",
841
842
  title: "Cancel reply",
842
- children: /* @__PURE__ */ A(s, {
843
+ children: /* @__PURE__ */ A(c, {
843
844
  icon: L,
844
845
  size: "xs"
845
846
  })
846
847
  })]
847
848
  })
848
- });
849
+ }) });
849
850
  }
850
851
  //#endregion
851
852
  //#region src/composed/rich-chat-input/schedule-send.tsx
852
- function ct() {
853
+ function lt() {
853
854
  let e = /* @__PURE__ */ new Date(), t = e.getHours(), n = [], r = (t, n = 0) => {
854
855
  let r = new Date(e);
855
856
  return r.setDate(r.getDate() + n), r.setHours(t, 0, 0, 0), r;
@@ -897,7 +898,7 @@ function ct() {
897
898
  date: a
898
899
  }), n;
899
900
  }
900
- function lt({ value: e, onChange: t }) {
901
+ function ut({ value: e, onChange: t }) {
901
902
  let n = e.getHours() % 12 || 12, r = e.getMinutes(), i = e.getHours() >= 12, a = (n) => {
902
903
  let r = new Date(e);
903
904
  r.setHours(i ? n % 12 + 12 : n % 12), t(r);
@@ -914,7 +915,7 @@ function lt({ value: e, onChange: t }) {
914
915
  /* @__PURE__ */ A("select", {
915
916
  value: n,
916
917
  onChange: (e) => a(Number(e.target.value)),
917
- className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-02 text-body-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
918
+ className: "h-ds-sm rounded-control border border-surface-border-interactive bg-surface-panel-hover px-ds-02 text-body-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
918
919
  "aria-label": "Hour",
919
920
  children: Array.from({ length: 12 }, (e, t) => t + 1).map((e) => /* @__PURE__ */ A("option", {
920
921
  value: e,
@@ -928,24 +929,24 @@ function lt({ value: e, onChange: t }) {
928
929
  /* @__PURE__ */ A("select", {
929
930
  value: r - r % 5,
930
931
  onChange: (e) => o(Number(e.target.value)),
931
- className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-02 text-body-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
932
+ className: "h-ds-sm rounded-control border border-surface-border-interactive bg-surface-panel-hover px-ds-02 text-body-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9",
932
933
  "aria-label": "Minute",
933
934
  children: Array.from({ length: 12 }, (e, t) => t * 5).map((e) => /* @__PURE__ */ A("option", {
934
935
  value: e,
935
936
  children: String(e).padStart(2, "0")
936
937
  }, e))
937
938
  }),
938
- /* @__PURE__ */ j(g, {
939
+ /* @__PURE__ */ j(_, {
939
940
  type: "single",
940
941
  value: i ? "PM" : "AM",
941
942
  onValueChange: (e) => {
942
943
  e === "AM" ? s(!1) : e === "PM" && s(!0);
943
944
  },
944
945
  size: "sm",
945
- children: [/* @__PURE__ */ A(_, {
946
+ children: [/* @__PURE__ */ A(v, {
946
947
  value: "AM",
947
948
  children: "AM"
948
- }), /* @__PURE__ */ A(_, {
949
+ }), /* @__PURE__ */ A(v, {
949
950
  value: "PM",
950
951
  children: "PM"
951
952
  })]
@@ -975,28 +976,28 @@ function X({ value: e, onChange: t, minDate: n }) {
975
976
  value: a,
976
977
  min: s,
977
978
  onChange: o,
978
- className: "h-ds-sm rounded-control border border-surface-border-strong bg-surface-raised px-ds-03 text-body-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9"
979
+ className: "h-ds-sm rounded-control border border-surface-border-interactive bg-surface-panel-hover px-ds-03 text-body-sm text-surface-fg focus:outline-hidden focus:ring-2 focus:ring-accent-9"
979
980
  })]
980
981
  }), /* @__PURE__ */ j("div", {
981
982
  className: "flex items-center justify-between",
982
983
  children: [/* @__PURE__ */ A("span", {
983
984
  className: "text-caption font-medium text-surface-fg-subtle",
984
985
  children: "Time"
985
- }), /* @__PURE__ */ A(lt, {
986
+ }), /* @__PURE__ */ A(ut, {
986
987
  value: i,
987
988
  onChange: t
988
989
  })]
989
990
  })]
990
991
  });
991
992
  }
992
- function ut({ value: e, onChange: t, minDate: n }) {
993
+ function dt({ value: e, onChange: t, minDate: n }) {
993
994
  let r = /* @__PURE__ */ new Date(), i = e ?? (() => {
994
995
  let e = new Date(r);
995
996
  return e.setHours(e.getHours() + 1, 0, 0, 0), e;
996
997
  })(), { currentMonth: a, goToPreviousMonth: o, goToNextMonth: s } = w(i);
997
998
  return /* @__PURE__ */ j("div", {
998
999
  className: "space-y-ds-03",
999
- children: [/* @__PURE__ */ A(C, {
1000
+ children: [/* @__PURE__ */ A(te, {
1000
1001
  currentMonth: a,
1001
1002
  selected: i,
1002
1003
  onSelect: (e) => {
@@ -1013,15 +1014,15 @@ function ut({ value: e, onChange: t, minDate: n }) {
1013
1014
  children: [/* @__PURE__ */ A("span", {
1014
1015
  className: "text-caption font-medium text-surface-fg-subtle",
1015
1016
  children: "Time"
1016
- }), /* @__PURE__ */ A(lt, {
1017
+ }), /* @__PURE__ */ A(ut, {
1017
1018
  value: i,
1018
1019
  onChange: t
1019
1020
  })]
1020
1021
  })]
1021
1022
  });
1022
1023
  }
1023
- function dt({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1024
- let [r, i] = T.useState(!1), [a, o] = T.useState(null), c = T.useMemo(() => ct(), []), u = (n) => {
1024
+ function ft({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1025
+ let [r, i] = T.useState(!1), [a, o] = T.useState(null), s = T.useMemo(() => lt(), []), l = (n) => {
1025
1026
  e(n), t();
1026
1027
  };
1027
1028
  return r ? /* @__PURE__ */ j("div", {
@@ -1033,12 +1034,12 @@ function dt({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1033
1034
  children: [/* @__PURE__ */ A("p", {
1034
1035
  className: "text-body-sm font-medium text-surface-fg",
1035
1036
  children: "Pick date & time"
1036
- }), /* @__PURE__ */ A(l, {
1037
+ }), /* @__PURE__ */ A(u, {
1037
1038
  variant: "ghost",
1038
1039
  size: "icon-xs",
1039
1040
  onClick: () => i(!1),
1040
1041
  "aria-label": "Back to presets",
1041
- children: /* @__PURE__ */ A(s, {
1042
+ children: /* @__PURE__ */ A(c, {
1042
1043
  icon: L,
1043
1044
  size: "sm"
1044
1045
  })
@@ -1051,7 +1052,7 @@ function dt({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1051
1052
  }),
1052
1053
  /* @__PURE__ */ A("div", {
1053
1054
  className: "mt-ds-03 flex justify-end",
1054
- children: /* @__PURE__ */ A(l, {
1055
+ children: /* @__PURE__ */ A(u, {
1055
1056
  variant: "solid",
1056
1057
  size: "sm",
1057
1058
  onClick: () => {
@@ -1070,34 +1071,34 @@ function dt({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1070
1071
  className: "px-ds-03 py-ds-01 text-caption font-medium text-surface-fg-subtle",
1071
1072
  children: "Schedule send"
1072
1073
  }),
1073
- c.map((e, t) => /* @__PURE__ */ j(l, {
1074
+ s.map((e, t) => /* @__PURE__ */ j(u, {
1074
1075
  variant: "ghost",
1075
1076
  fullWidth: !0,
1076
- onClick: () => u(e.date),
1077
- children: [/* @__PURE__ */ A(s, {
1078
- icon: oe,
1077
+ onClick: () => l(e.date),
1078
+ children: [/* @__PURE__ */ A(c, {
1079
+ icon: se,
1079
1080
  size: "sm",
1080
1081
  className: "shrink-0 text-surface-fg-muted"
1081
1082
  }), e.label]
1082
1083
  }, t)),
1083
1084
  /* @__PURE__ */ A("div", { className: "mx-ds-02 my-ds-02 h-px bg-surface-border" }),
1084
- /* @__PURE__ */ j(l, {
1085
+ /* @__PURE__ */ j(u, {
1085
1086
  variant: "ghost",
1086
1087
  fullWidth: !0,
1087
1088
  onClick: () => i(!0),
1088
- children: [/* @__PURE__ */ A(s, {
1089
+ children: [/* @__PURE__ */ A(c, {
1089
1090
  icon: N,
1090
1091
  size: "sm",
1091
1092
  className: "shrink-0 text-accent-11"
1092
1093
  }), "Pick date & time..."]
1093
1094
  }),
1094
- n && /* @__PURE__ */ j(l, {
1095
+ n && /* @__PURE__ */ j(u, {
1095
1096
  variant: "ghost",
1096
1097
  fullWidth: !0,
1097
1098
  onClick: () => {
1098
1099
  n(), t();
1099
1100
  },
1100
- children: [/* @__PURE__ */ A(s, {
1101
+ children: [/* @__PURE__ */ A(c, {
1101
1102
  icon: N,
1102
1103
  size: "sm",
1103
1104
  className: "shrink-0 text-surface-fg-muted"
@@ -1106,29 +1107,29 @@ function dt({ onSchedule: e, onClose: t, onOpenDialog: n }) {
1106
1107
  ]
1107
1108
  });
1108
1109
  }
1109
- function ft({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
1110
+ function pt({ open: e, onOpenChange: t, onSchedule: n, initialDate: r }) {
1110
1111
  let [i, a] = T.useState(r ?? null);
1111
1112
  return T.useEffect(() => {
1112
1113
  e && a(r ?? null);
1113
- }, [e, r]), /* @__PURE__ */ A(u, {
1114
+ }, [e, r]), /* @__PURE__ */ A(d, {
1114
1115
  open: e,
1115
1116
  onOpenChange: t,
1116
- children: /* @__PURE__ */ j(d, {
1117
+ children: /* @__PURE__ */ j(f, {
1117
1118
  className: "sm:max-w-[380px]",
1118
1119
  children: [
1119
- /* @__PURE__ */ A(p, { children: /* @__PURE__ */ A(m, { children: r ? "Reschedule message" : "Schedule send" }) }),
1120
- /* @__PURE__ */ A(ut, {
1120
+ /* @__PURE__ */ A(m, { children: /* @__PURE__ */ A(h, { children: r ? "Reschedule message" : "Schedule send" }) }),
1121
+ /* @__PURE__ */ A(dt, {
1121
1122
  value: i,
1122
1123
  onChange: a,
1123
1124
  minDate: /* @__PURE__ */ new Date()
1124
1125
  }),
1125
- /* @__PURE__ */ j(f, {
1126
+ /* @__PURE__ */ j(p, {
1126
1127
  className: "gap-ds-02",
1127
- children: [/* @__PURE__ */ A(l, {
1128
+ children: [/* @__PURE__ */ A(u, {
1128
1129
  variant: "soft",
1129
1130
  onClick: () => t(!1),
1130
1131
  children: "Cancel"
1131
- }), /* @__PURE__ */ A(l, {
1132
+ }), /* @__PURE__ */ A(u, {
1132
1133
  variant: "solid",
1133
1134
  onClick: () => {
1134
1135
  i && i > /* @__PURE__ */ new Date() && (n(i), t(!1));
@@ -1154,8 +1155,8 @@ function Z(e) {
1154
1155
  day: "numeric"
1155
1156
  })} at ${a}`;
1156
1157
  }
1157
- function pt({ date: e, onClear: t, onEdit: n }) {
1158
- return /* @__PURE__ */ A(z.div, {
1158
+ function mt({ date: e, onClear: t, onEdit: n }) {
1159
+ return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(R.div, {
1159
1160
  initial: {
1160
1161
  height: 0,
1161
1162
  opacity: 0
@@ -1173,8 +1174,8 @@ function pt({ date: e, onClear: t, onEdit: n }) {
1173
1174
  children: /* @__PURE__ */ j("div", {
1174
1175
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b text-body-xs text-accent-11 bg-accent-2 border-b border-accent-4",
1175
1176
  children: [
1176
- /* @__PURE__ */ A(s, {
1177
- icon: oe,
1177
+ /* @__PURE__ */ A(c, {
1178
+ icon: se,
1178
1179
  size: "xs",
1179
1180
  className: "shrink-0"
1180
1181
  }),
@@ -1182,38 +1183,38 @@ function pt({ date: e, onClear: t, onEdit: n }) {
1182
1183
  className: "min-w-0 flex-1 truncate",
1183
1184
  children: ["Scheduled for ", Z(e)]
1184
1185
  }),
1185
- n && /* @__PURE__ */ A(l, {
1186
+ n && /* @__PURE__ */ A(u, {
1186
1187
  variant: "soft",
1187
1188
  size: "icon-xs",
1188
1189
  className: "shrink-0",
1189
1190
  onClick: n,
1190
1191
  "aria-label": "Edit schedule",
1191
- children: /* @__PURE__ */ A(s, {
1192
- icon: he,
1192
+ children: /* @__PURE__ */ A(c, {
1193
+ icon: ge,
1193
1194
  size: "xs"
1194
1195
  })
1195
1196
  }),
1196
- /* @__PURE__ */ A(l, {
1197
+ /* @__PURE__ */ A(u, {
1197
1198
  variant: "soft",
1198
1199
  size: "icon-xs",
1199
1200
  className: "shrink-0",
1200
1201
  onClick: t,
1201
1202
  "aria-label": "Cancel schedule",
1202
- children: /* @__PURE__ */ A(s, {
1203
+ children: /* @__PURE__ */ A(c, {
1203
1204
  icon: L,
1204
1205
  size: "xs"
1205
1206
  })
1206
1207
  })
1207
1208
  ]
1208
1209
  })
1209
- });
1210
+ }) });
1210
1211
  }
1211
1212
  //#endregion
1212
1213
  //#region src/composed/rich-chat-input/use-voice-recorder.ts
1213
- function mt() {
1214
+ function ht() {
1214
1215
  return typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/webm;codecs=opus") ? "audio/webm;codecs=opus" : typeof MediaRecorder < "u" && MediaRecorder.isTypeSupported("audio/mp4") ? "audio/mp4" : "";
1215
1216
  }
1216
- function ht(e) {
1217
+ function gt(e) {
1217
1218
  let { maxDuration: t, onComplete: n } = e, [r, i] = k("idle"), [a, o] = k(0), [s, c] = k(null), [l, u] = k([]), d = O(null), f = O(null), p = O(null), m = O([]), h = O(null), g = O(null), _ = O(null), v = O(null), y = O(0), b = O([]), x = O(!1), ee = O(n);
1218
1219
  ee.current = n;
1219
1220
  let S = E(() => {
@@ -1222,7 +1223,7 @@ function ht(e) {
1222
1223
  if (typeof MediaRecorder > "u") throw Error("MediaRecorder is not supported in this browser. Voice recording requires a modern browser with MediaRecorder support.");
1223
1224
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
1224
1225
  p.current = e;
1225
- let n = mt(), r = n ? new MediaRecorder(e, { mimeType: n }) : new MediaRecorder(e);
1226
+ let n = ht(), r = n ? new MediaRecorder(e, { mimeType: n }) : new MediaRecorder(e);
1226
1227
  d.current = r, m.current = [], x.current = !1;
1227
1228
  let a = new AudioContext();
1228
1229
  f.current = a;
@@ -1250,13 +1251,13 @@ function ht(e) {
1250
1251
  }, 100), t !== void 0 && t > 0 && (_.current = setTimeout(() => {
1251
1252
  d.current && d.current.state !== "inactive" && d.current.stop();
1252
1253
  }, t * 1e3)), i("recording");
1253
- }, [t, S]), w = E(() => {
1254
+ }, [t, S]), te = E(() => {
1254
1255
  d.current && d.current.state !== "inactive" && (x.current = !1, d.current.stop());
1255
- }, []), T = E(() => {
1256
+ }, []), w = E(() => {
1256
1257
  d.current && d.current.state !== "inactive" ? (x.current = !0, d.current.stop()) : (S(), i("idle"), o(0), u([]));
1257
- }, [S]), te = E(() => {
1258
+ }, [S]), T = E(() => {
1258
1259
  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"));
1259
- }, []), A = E(() => {
1260
+ }, []), ne = E(() => {
1260
1261
  if (d.current && d.current.state === "paused") {
1261
1262
  d.current.resume(), h.current = setInterval(() => {
1262
1263
  y.current += 1, o((e) => e + 1);
@@ -1281,15 +1282,15 @@ function ht(e) {
1281
1282
  analyserNode: s,
1282
1283
  waveformData: l,
1283
1284
  start: C,
1284
- stop: w,
1285
- cancel: T,
1286
- pause: te,
1287
- resume: A
1285
+ stop: te,
1286
+ cancel: w,
1287
+ pause: T,
1288
+ resume: ne
1288
1289
  };
1289
1290
  }
1290
1291
  //#endregion
1291
1292
  //#region src/composed/rich-chat-input.tsx
1292
- var gt = {
1293
+ var _t = {
1293
1294
  compact: {
1294
1295
  minHeight: 44,
1295
1296
  maxHeight: 256,
@@ -1314,7 +1315,7 @@ var gt = {
1314
1315
  showToolbar: !1,
1315
1316
  toolbarPosition: "top"
1316
1317
  }
1317
- }, _t = [
1318
+ }, vt = [
1318
1319
  "prose prose-sm max-w-none focus:outline-hidden",
1319
1320
  "font-body text-body-md leading-relaxed text-surface-fg",
1320
1321
  "[&_p.is-editor-empty:first-child]:relative",
@@ -1323,13 +1324,13 @@ var gt = {
1323
1324
  "[&_p:last-child]:mb-0",
1324
1325
  "[&_ul]:ml-ds-04 [&_ul]:list-disc [&_ol]:ml-ds-04 [&_ol]:list-decimal",
1325
1326
  "[&_li]:text-surface-fg",
1326
- "[&_code]:rounded [&_code]:bg-surface-raised [&_code]:px-ds-02 [&_code]:py-[1px] [&_code]:text-body-md [&_code]:text-accent-11",
1327
+ "[&_code]:rounded [&_code]:bg-surface-panel [&_code]:px-ds-02 [&_code]:py-[1px] [&_code]:text-body-md [&_code]:text-accent-11",
1327
1328
  "[&_strong]:font-semibold [&_strong]:text-surface-fg",
1328
1329
  "[&_mark]:rounded-xs [&_mark]:bg-warning-3 [&_mark]:px-[2px]",
1329
1330
  "[&_a]:text-accent-11 [&_a]:underline",
1330
- y
1331
+ b
1331
1332
  ].join(" ");
1332
- function vt({ options: e }) {
1333
+ function yt({ options: e }) {
1333
1334
  let [t, n] = T.useState(!1), r = T.useRef(null);
1334
1335
  return T.useEffect(() => {
1335
1336
  if (!t) return;
@@ -1346,9 +1347,9 @@ function vt({ options: e }) {
1346
1347
  title: "More send options",
1347
1348
  "aria-label": "More send options",
1348
1349
  "aria-expanded": t,
1349
- className: a("inline-flex h-ds-xs-plus w-5 items-center justify-center rounded-control 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"),
1350
- children: /* @__PURE__ */ A(s, {
1351
- icon: ae,
1350
+ className: o("inline-flex h-ds-xs-plus w-5 items-center justify-center rounded-control touch-target", "text-surface-fg-subtle hover:bg-surface-panel-hover hover:text-surface-fg", "transition-colors duration-fast-01 ease-productive-standard", t && "bg-surface-panel-hover text-surface-fg"),
1351
+ children: /* @__PURE__ */ A(c, {
1352
+ icon: oe,
1352
1353
  size: "xs"
1353
1354
  })
1354
1355
  }), t && /* @__PURE__ */ j("div", {
@@ -1361,14 +1362,14 @@ function vt({ options: e }) {
1361
1362
  onClick: () => {
1362
1363
  e.onSelect(), n(!1);
1363
1364
  },
1364
- className: "flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-body-sm text-surface-fg hover:bg-surface-raised-hover transition-colors duration-fast-01",
1365
+ className: "flex w-full items-center gap-ds-03 rounded-control px-ds-03 py-ds-02 text-body-sm text-surface-fg hover:bg-surface-panel-hover transition-colors duration-fast-01",
1365
1366
  children: [e.icon && /* @__PURE__ */ A(e.icon, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }), e.label]
1366
1367
  }, t))]
1367
1368
  })]
1368
1369
  });
1369
1370
  }
1370
- var yt = T.lazy(() => import("./emoji-picker.js").then((e) => ({ default: e.EmojiPicker })));
1371
- function bt({ onSelect: e, onClose: t }) {
1371
+ var bt = T.lazy(() => import("./emoji-picker.js").then((e) => ({ default: e.EmojiPicker })));
1372
+ function xt({ onSelect: e, onClose: t }) {
1372
1373
  let n = T.useRef(null);
1373
1374
  T.useEffect(() => {
1374
1375
  let e = (e) => {
@@ -1392,7 +1393,7 @@ function bt({ onSelect: e, onClose: t }) {
1392
1393
  ref: n,
1393
1394
  children: /* @__PURE__ */ A(T.Suspense, {
1394
1395
  fallback: r,
1395
- children: /* @__PURE__ */ A(yt, { onSelect: e })
1396
+ children: /* @__PURE__ */ A(bt, { onSelect: e })
1396
1397
  })
1397
1398
  });
1398
1399
  }
@@ -1403,12 +1404,12 @@ function Q({ onClick: e, isActive: t = !1, title: n, children: r }) {
1403
1404
  title: n,
1404
1405
  "aria-label": n,
1405
1406
  "aria-pressed": t,
1406
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control 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"),
1407
+ className: o("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-panel-hover", t ? "bg-surface-panel-hover text-accent-11" : "text-surface-fg-subtle"),
1407
1408
  children: r
1408
1409
  });
1409
1410
  }
1410
- function xt({ editor: e }) {
1411
- let t = B({
1411
+ function St({ editor: e }) {
1412
+ let t = z({
1412
1413
  editor: e,
1413
1414
  selector: ({ editor: e }) => ({
1414
1415
  isBold: e.isActive("bold"),
@@ -1419,7 +1420,7 @@ function xt({ editor: e }) {
1419
1420
  isCode: e.isActive("code")
1420
1421
  })
1421
1422
  });
1422
- return /* @__PURE__ */ j(Ne, {
1423
+ return /* @__PURE__ */ j(Fe, {
1423
1424
  editor: e,
1424
1425
  className: "flex gap-ds-01 rounded-surface bg-surface-overlay p-ds-02 shadow-floating",
1425
1426
  children: [
@@ -1427,8 +1428,8 @@ function xt({ editor: e }) {
1427
1428
  onClick: () => e.chain().focus().toggleBold().run(),
1428
1429
  isActive: t.isBold,
1429
1430
  title: "Bold",
1430
- children: /* @__PURE__ */ A(s, {
1431
- icon: ie,
1431
+ children: /* @__PURE__ */ A(c, {
1432
+ icon: ae,
1432
1433
  size: "xs"
1433
1434
  })
1434
1435
  }),
@@ -1436,8 +1437,8 @@ function xt({ editor: e }) {
1436
1437
  onClick: () => e.chain().focus().toggleItalic().run(),
1437
1438
  isActive: t.isItalic,
1438
1439
  title: "Italic",
1439
- children: /* @__PURE__ */ A(s, {
1440
- icon: ue,
1440
+ children: /* @__PURE__ */ A(c, {
1441
+ icon: de,
1441
1442
  size: "xs"
1442
1443
  })
1443
1444
  }),
@@ -1445,7 +1446,7 @@ function xt({ editor: e }) {
1445
1446
  onClick: () => e.chain().focus().toggleUnderline().run(),
1446
1447
  isActive: t.isUnderline,
1447
1448
  title: "Underline",
1448
- children: /* @__PURE__ */ A(s, {
1449
+ children: /* @__PURE__ */ A(c, {
1449
1450
  icon: I,
1450
1451
  size: "xs"
1451
1452
  })
@@ -1454,7 +1455,7 @@ function xt({ editor: e }) {
1454
1455
  onClick: () => e.chain().focus().toggleStrike().run(),
1455
1456
  isActive: t.isStrike,
1456
1457
  title: "Strikethrough",
1457
- children: /* @__PURE__ */ A(s, {
1458
+ children: /* @__PURE__ */ A(c, {
1458
1459
  icon: F,
1459
1460
  size: "xs"
1460
1461
  })
@@ -1463,8 +1464,8 @@ function xt({ editor: e }) {
1463
1464
  onClick: () => e.chain().focus().toggleHighlight().run(),
1464
1465
  isActive: t.isHighlight,
1465
1466
  title: "Highlight",
1466
- children: /* @__PURE__ */ A(s, {
1467
- icon: le,
1467
+ children: /* @__PURE__ */ A(c, {
1468
+ icon: ue,
1468
1469
  size: "xs"
1469
1470
  })
1470
1471
  }),
@@ -1472,19 +1473,19 @@ function xt({ editor: e }) {
1472
1473
  onClick: () => e.chain().focus().toggleCode().run(),
1473
1474
  isActive: t.isCode,
1474
1475
  title: "Code",
1475
- children: /* @__PURE__ */ A(s, {
1476
- icon: se,
1476
+ children: /* @__PURE__ */ A(c, {
1477
+ icon: ce,
1477
1478
  size: "xs"
1478
1479
  })
1479
1480
  })
1480
1481
  ]
1481
1482
  });
1482
1483
  }
1483
- var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message...", disabled: d = !1, content: f = "", variant: p = "compact", enterBehavior: m = "send", maxLength: g, charCountDisplay: _ = "near-limit", mentions: v, onMentionSearch: y, onMentionSelect: C, onFileUpload: w, onImageUpload: E, slashCommands: D, onVoiceRecord: O, onTranscribe: k, maxDuration: te, replyTo: M, onTyping: re, onEmpty: ie, isStreaming: N = !1, onCancel: ae, leadingSlot: se, trailingSlot: ce, disclaimer: le, toolbar: ue = !0, sendOptions: de, onSchedule: P, actionButton: fe, emojiSet: he = "native", className: ge, ..._e }, be) {
1484
- let [F, I] = T.useState("idle"), [L, we] = T.useState(!1), [Ne, Fe] = T.useState(!1), [V, Ie] = T.useState(null), [Le, H] = T.useState(!1), [Re, Be] = T.useState(!1), [U, He] = T.useState(0), Ue = T.useRef(null), Ge = T.useRef(null);
1484
+ var Ct = T.forwardRef(function({ onSubmit: s, placeholder: d = "Type a message...", disabled: f = !1, content: p = "", variant: m = "compact", enterBehavior: h = "send", maxLength: _, charCountDisplay: v = "near-limit", mentions: y, onMentionSearch: b, onMentionSelect: te, onFileUpload: w, onImageUpload: E, slashCommands: D, onVoiceRecord: O, onTranscribe: k, maxDuration: ne, replyTo: ie, onTyping: M, onEmpty: ae, isStreaming: N = !1, onCancel: oe, leadingSlot: ce, trailingSlot: le, disclaimer: ue, toolbar: de = !0, sendOptions: fe, onSchedule: P, actionButton: pe, emojiSet: ge = "native", className: _e, ...ve }, xe) {
1485
+ let [F, I] = T.useState("idle"), [L, Ee] = T.useState(!1), [Fe, Le] = T.useState(!1), [B, Re] = T.useState(null), [ze, V] = T.useState(!1), [Be, He] = T.useState(!1), [H, We] = T.useState(0), Ge = T.useRef(null), qe = T.useRef(null);
1485
1486
  T.useEffect(() => {
1486
- if (!Ne || !Ue.current || !Ge.current) return;
1487
- let i = Ue.current, a = Ge.current, o = () => {
1487
+ if (!Fe || !Ge.current || !qe.current) return;
1488
+ let i = Ge.current, a = qe.current, o = () => {
1488
1489
  e(i, a, {
1489
1490
  placement: "top-end",
1490
1491
  middleware: [
@@ -1502,17 +1503,17 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1502
1503
  return o(), window.addEventListener("scroll", o, !0), window.addEventListener("resize", o), () => {
1503
1504
  window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
1504
1505
  };
1505
- }, [Ne]);
1506
- let [W, G] = T.useState([]), [K, q] = T.useState(null), [Ke, qe] = T.useState(!1), Je = T.useRef(null), Ye = T.useRef(null), Xe = T.useRef(void 0), Ze = T.useRef(void 0), Qe = T.useRef(m);
1507
- Qe.current = m;
1508
- let $e = T.useRef(C);
1509
- $e.current = C;
1510
- let et = T.useRef(v);
1511
- et.current = v;
1512
- let tt = T.useRef(y);
1513
- tt.current = y;
1514
- let nt = c(), J = gt[p], rt = J.maxHeight, Y = ht({
1515
- maxDuration: te,
1506
+ }, [Fe]);
1507
+ let [U, W] = T.useState([]), [G, K] = T.useState(null), [Je, Ye] = T.useState(!1), Xe = T.useRef(null), Ze = T.useRef(null), Qe = T.useRef(void 0), $e = T.useRef(void 0), et = T.useRef(h);
1508
+ et.current = h;
1509
+ let tt = T.useRef(te);
1510
+ tt.current = te;
1511
+ let nt = T.useRef(y);
1512
+ nt.current = y;
1513
+ let q = T.useRef(b);
1514
+ q.current = b;
1515
+ let rt = l(), J = _t[m], it = J.maxHeight, Y = gt({
1516
+ maxDuration: ne,
1516
1517
  onComplete: async (e, t, n) => {
1517
1518
  if (O?.(e, t), k) {
1518
1519
  let n = await k(e, t);
@@ -1521,23 +1522,23 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1521
1522
  return;
1522
1523
  }
1523
1524
  }
1524
- q({
1525
+ K({
1525
1526
  blob: e,
1526
1527
  duration: t,
1527
1528
  waveformData: n
1528
1529
  }), I("review");
1529
1530
  }
1530
- }), at = T.useCallback(() => {
1531
+ }), ot = T.useCallback(() => {
1531
1532
  Y.start(), I("recording");
1532
- }, [Y]), ct = T.useCallback(() => {
1533
- Y.stop();
1534
1533
  }, [Y]), lt = T.useCallback(() => {
1534
+ Y.stop();
1535
+ }, [Y]), ut = T.useCallback(() => {
1535
1536
  Y.cancel(), I("idle");
1536
- }, [Y]), X = Me({
1537
+ }, [Y]), X = Pe({
1537
1538
  immediatelyRender: !1,
1538
1539
  extensions: T.useMemo(() => {
1539
1540
  let e = [
1540
- Pe.configure({
1541
+ Ie.configure({
1541
1542
  heading: !1,
1542
1543
  horizontalRule: !1,
1543
1544
  codeBlock: !1,
@@ -1547,98 +1548,98 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1547
1548
  HTMLAttributes: { class: "text-accent-11 underline" }
1548
1549
  }
1549
1550
  }),
1550
- ke.configure({ placeholder: u }),
1551
- Te.configure({ multicolor: !1 }),
1552
- Ee,
1553
- Oe.configure({ limit: g || void 0 }),
1554
- ee,
1555
- b,
1556
- x(),
1557
- je.create({
1551
+ je.configure({ placeholder: d }),
1552
+ De.configure({ multicolor: !1 }),
1553
+ Oe,
1554
+ Ae.configure({ limit: _ || void 0 }),
1555
+ S,
1556
+ x,
1557
+ ee(),
1558
+ Ne.create({
1558
1559
  name: "enterToSend",
1559
1560
  addKeyboardShortcuts() {
1560
1561
  return {
1561
- Enter: () => Qe.current === "send" ? (Ze.current?.(), !0) : !1,
1562
- "Shift-Enter": () => Qe.current === "send" ? (this.editor.commands.splitBlock(), !0) : !1,
1563
- "Mod-Enter": () => (Ze.current?.(), !0)
1562
+ Enter: () => et.current === "send" ? ($e.current?.(), !0) : !1,
1563
+ "Shift-Enter": () => et.current === "send" ? (this.editor.commands.splitBlock(), !0) : !1,
1564
+ "Mod-Enter": () => ($e.current?.(), !0)
1564
1565
  };
1565
1566
  }
1566
1567
  })
1567
1568
  ];
1568
- return (v || y) && e.push(De.configure({
1569
+ return (y || b) && e.push(ke.configure({
1569
1570
  HTMLAttributes: { class: "mention" },
1570
1571
  suggestion: {
1571
1572
  items: async ({ query: e }) => {
1572
- if (tt.current) return await tt.current(e);
1573
- let t = et.current;
1573
+ if (q.current) return await q.current(e);
1574
+ let t = nt.current;
1574
1575
  return t ? t.filter((t) => t.label.toLowerCase().includes(e.toLowerCase())).slice(0, 8) : [];
1575
1576
  },
1576
- render: S((e) => $e.current?.(e))
1577
+ render: C((e) => tt.current?.(e))
1577
1578
  }
1578
- })), D && e.push(ze(D)), e;
1579
+ })), D && e.push(Ve(D)), e;
1579
1580
  }, [
1580
- u,
1581
- g,
1582
- he,
1583
- !!v,
1581
+ d,
1582
+ _,
1583
+ ge,
1584
1584
  !!y,
1585
+ !!b,
1585
1586
  !!D
1586
1587
  ]),
1587
- content: f || void 0,
1588
- editable: !d,
1588
+ content: p || void 0,
1589
+ editable: !f,
1589
1590
  editorProps: {
1590
- attributes: { class: _t },
1591
+ attributes: { class: vt },
1591
1592
  handlePaste: (e, t) => {
1592
1593
  let n = Array.from(t.clipboardData?.files ?? []);
1593
1594
  return n.length > 0 ? (n.forEach(Z), !0) : !1;
1594
1595
  }
1595
1596
  }
1596
- }), ut = T.useCallback(() => {
1597
+ }), dt = T.useCallback(() => {
1597
1598
  if (!X) return;
1598
- let e = !X.isEmpty, t = W.length > 0, n = !!K;
1599
+ let e = !X.isEmpty, t = U.length > 0, n = !!G;
1599
1600
  if (!e && !t && !n || N) return;
1600
1601
  let r = {
1601
1602
  html: e ? X.getHTML() : "",
1602
1603
  plainText: e ? X.getText() : ""
1603
1604
  };
1604
- t && (r.attachments = W.filter((e) => !e.uploading && e.url).map((e) => ({
1605
+ t && (r.attachments = U.filter((e) => !e.uploading && e.url).map((e) => ({
1605
1606
  url: e.url,
1606
1607
  name: e.name,
1607
1608
  size: e.size,
1608
1609
  type: e.type
1609
1610
  }))), n && (r.voiceNote = {
1610
- blob: K.blob,
1611
- duration: K.duration
1612
- }), V && P ? P(r, V) : o(r), X.commands.clearContent(), G([]), q(null), Ie(null), I("idle");
1611
+ blob: G.blob,
1612
+ duration: G.duration
1613
+ }), B && P ? P(r, B) : s(r), X.commands.clearContent(), W([]), K(null), Re(null), I("idle");
1613
1614
  }, [
1614
1615
  X,
1615
- W,
1616
- K,
1616
+ U,
1617
+ G,
1617
1618
  N,
1618
- o,
1619
+ s,
1619
1620
  P,
1620
- V
1621
+ B
1621
1622
  ]);
1622
- Ze.current = ut, T.useEffect(() => {
1623
- if (!X || !re) return;
1623
+ $e.current = dt, T.useEffect(() => {
1624
+ if (!X || !M) return;
1624
1625
  let e = () => {
1625
- re(!0), clearTimeout(Xe.current), Xe.current = setTimeout(() => re(!1), 2e3);
1626
+ M(!0), clearTimeout(Qe.current), Qe.current = setTimeout(() => M(!1), 2e3);
1626
1627
  };
1627
1628
  return X.on("update", e), () => {
1628
- X.off("update", e), clearTimeout(Xe.current);
1629
+ X.off("update", e), clearTimeout(Qe.current);
1629
1630
  };
1630
- }, [X, re]), T.useEffect(() => {
1631
- if (!X || !ie) return;
1631
+ }, [X, M]), T.useEffect(() => {
1632
+ if (!X || !ae) return;
1632
1633
  let e = () => {
1633
- ie(X.isEmpty);
1634
+ ae(X.isEmpty);
1634
1635
  };
1635
1636
  return X.on("update", e), e(), () => {
1636
1637
  X.off("update", e);
1637
1638
  };
1638
- }, [X, ie]);
1639
+ }, [X, ae]);
1639
1640
  let Z = T.useCallback(async (e) => {
1640
1641
  let t = Math.random().toString(36).slice(2), n = e.type.startsWith("image/");
1641
- G((r) => [...r, {
1642
+ W((r) => [...r, {
1642
1643
  id: t,
1643
1644
  name: e.name,
1644
1645
  size: e.size,
@@ -1648,14 +1649,14 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1648
1649
  try {
1649
1650
  if (n && E) {
1650
1651
  let n = await E(e);
1651
- G((e) => e.map((e) => e.id === t ? {
1652
+ W((e) => e.map((e) => e.id === t ? {
1652
1653
  ...e,
1653
1654
  url: n,
1654
1655
  uploading: !1
1655
1656
  } : e));
1656
1657
  } else if (w) {
1657
1658
  let n = await w(e);
1658
- G((e) => e.map((e) => e.id === t ? {
1659
+ W((e) => e.map((e) => e.id === t ? {
1659
1660
  ...e,
1660
1661
  url: n.url,
1661
1662
  name: n.name,
@@ -1664,24 +1665,24 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1664
1665
  } : e));
1665
1666
  } else if (n) {
1666
1667
  let n = URL.createObjectURL(e);
1667
- G((e) => e.map((e) => e.id === t ? {
1668
+ W((e) => e.map((e) => e.id === t ? {
1668
1669
  ...e,
1669
1670
  url: n,
1670
1671
  uploading: !1
1671
1672
  } : e));
1672
- } else G((e) => e.filter((e) => e.id !== t));
1673
+ } else W((e) => e.filter((e) => e.id !== t));
1673
1674
  } catch {
1674
- G((e) => e.filter((e) => e.id !== t));
1675
+ W((e) => e.filter((e) => e.id !== t));
1675
1676
  }
1676
- }, [w, E]), mt = T.useCallback((e) => {
1677
- G((t) => t.filter((t) => t.id !== e));
1678
- }, []), yt = T.useCallback((e) => {
1679
- e.preventDefault(), qe(!1), Array.from(e.dataTransfer.files).forEach(Z);
1677
+ }, [w, E]), ht = T.useCallback((e) => {
1678
+ W((t) => t.filter((t) => t.id !== e));
1679
+ }, []), bt = T.useCallback((e) => {
1680
+ e.preventDefault(), Ye(!1), Array.from(e.dataTransfer.files).forEach(Z);
1680
1681
  }, [Z]), Q = T.useCallback((e) => {
1681
1682
  Array.from(e.target.files || []).forEach(Z), e.target.value = "";
1682
- }, [Z]), St = T.useCallback(() => {
1683
- q(null), I("idle");
1684
- }, []), Ct = B({
1683
+ }, [Z]), Ct = T.useCallback(() => {
1684
+ K(null), I("idle");
1685
+ }, []), wt = z({
1685
1686
  editor: X,
1686
1687
  selector: ({ editor: e }) => e ? { editorIsEmpty: e.isEmpty } : null
1687
1688
  })?.editorIsEmpty ?? !0;
@@ -1689,126 +1690,126 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1689
1690
  if (!X) return;
1690
1691
  let e = () => {
1691
1692
  let e = X.state.doc.textBetween(0, X.state.doc.content.size, void 0, " ");
1692
- He(e.length);
1693
+ We(e.length);
1693
1694
  };
1694
1695
  return e(), X.on("update", e), () => {
1695
1696
  X.off("update", e);
1696
1697
  };
1697
1698
  }, [X]);
1698
- let wt = !Ct || W.length > 0 || !!K, Tt = L || F === "review" || p === "expanded", $ = "icon-md";
1699
- return /* @__PURE__ */ j("div", {
1700
- ref: be,
1701
- className: a("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", ge),
1702
- ..._e,
1699
+ let Tt = !wt || U.length > 0 || !!G, Et = L || F === "review" || m === "expanded", $ = "icon-md";
1700
+ return /* @__PURE__ */ A(a, { children: /* @__PURE__ */ j("div", {
1701
+ ref: xe,
1702
+ className: o("border-t border-surface-border-subtle px-ds-05 py-ds-04", "flex items-center gap-ds-03", _e),
1703
+ ...ve,
1703
1704
  children: [
1704
- fe !== !1 && (fe ?? (w || E ? /* @__PURE__ */ A(l, {
1705
+ pe !== !1 && (pe ?? (w || E ? /* @__PURE__ */ A(u, {
1705
1706
  variant: "solid",
1706
1707
  size: "icon-md",
1707
- onClick: () => Je.current?.click(),
1708
+ onClick: () => Xe.current?.click(),
1708
1709
  title: "Attach",
1709
1710
  "aria-label": "Attach file",
1710
1711
  className: "shrink-0",
1711
- children: /* @__PURE__ */ A(s, {
1712
- icon: ve,
1712
+ children: /* @__PURE__ */ A(c, {
1713
+ icon: ye,
1713
1714
  size: "md"
1714
1715
  })
1715
1716
  }) : null)),
1716
1717
  /* @__PURE__ */ j("div", {
1717
1718
  role: "region",
1718
1719
  "aria-label": "Message composer",
1719
- className: a("flex-1 min-w-0 overflow-hidden rounded-surface 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", F === "recording" && "border-error-7/30", Ke && "border-dashed border-accent-7 bg-accent-2", d && "opacity-action-disabled cursor-not-allowed"),
1720
- onFocus: () => Be(!0),
1720
+ className: o("flex-1 min-w-0 overflow-hidden rounded-surface border border-surface-border-interactive bg-surface-panel-hover", "transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", "hover:bg-surface-panel-active", "focus-within:ring-2 focus-within:ring-accent-9 focus-within:ring-offset-2 focus-within:border-accent-9", F === "recording" && "border-error-7/30", Je && "border-dashed border-accent-7 bg-accent-2", f && "opacity-action-disabled cursor-not-allowed"),
1721
+ onFocus: () => He(!0),
1721
1722
  onBlur: (e) => {
1722
- e.currentTarget.contains(e.relatedTarget) || Be(!1);
1723
+ e.currentTarget.contains(e.relatedTarget) || He(!1);
1723
1724
  },
1724
1725
  onDragOver: (e) => {
1725
- e.preventDefault(), qe(!0);
1726
+ e.preventDefault(), Ye(!0);
1726
1727
  },
1727
- onDragLeave: () => qe(!1),
1728
- onDrop: yt,
1728
+ onDragLeave: () => Ye(!1),
1729
+ onDrop: bt,
1729
1730
  children: [
1730
- se,
1731
- /* @__PURE__ */ A(R, { children: M && /* @__PURE__ */ A(st, {
1732
- author: M.author,
1733
- preview: M.preview,
1734
- onDismiss: M.onDismiss
1731
+ ce,
1732
+ /* @__PURE__ */ A(Te, { children: ie && /* @__PURE__ */ A(ct, {
1733
+ author: ie.author,
1734
+ preview: ie.preview,
1735
+ onDismiss: ie.onDismiss
1735
1736
  }, "reply") }),
1736
- /* @__PURE__ */ A(R, { children: V && /* @__PURE__ */ A(pt, {
1737
- date: V,
1738
- onEdit: () => H(!0),
1739
- onClear: () => Ie(null)
1737
+ /* @__PURE__ */ A(Te, { children: B && /* @__PURE__ */ A(mt, {
1738
+ date: B,
1739
+ onEdit: () => V(!0),
1740
+ onClear: () => Re(null)
1740
1741
  }, "schedule") }),
1741
- /* @__PURE__ */ A(R, { children: W.length > 0 && /* @__PURE__ */ A(Ve, {
1742
- attachments: W,
1743
- onRemoveAttachment: mt
1742
+ /* @__PURE__ */ A(Te, { children: U.length > 0 && /* @__PURE__ */ A(Ue, {
1743
+ attachments: U,
1744
+ onRemoveAttachment: ht
1744
1745
  }, "attachments") }),
1745
1746
  J.toolbarPosition === "top" && X && /* @__PURE__ */ A("div", {
1746
- className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", L ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1747
+ className: o("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", L ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1747
1748
  children: /* @__PURE__ */ A("div", {
1748
1749
  className: "overflow-hidden",
1749
- children: /* @__PURE__ */ A(it, {
1750
+ children: /* @__PURE__ */ A(at, {
1750
1751
  editor: X,
1751
- toolbar: ue,
1752
+ toolbar: de,
1752
1753
  isMobile: !1,
1753
- hasMentions: !!(v || y),
1754
+ hasMentions: !!(y || b),
1754
1755
  hasSlashCommands: !!D,
1755
- disabled: d
1756
+ disabled: f
1756
1757
  })
1757
1758
  })
1758
1759
  }),
1759
1760
  /* @__PURE__ */ j("div", {
1760
1761
  className: "relative",
1761
- children: [F === "recording" && /* @__PURE__ */ A(ot, {
1762
+ children: [F === "recording" && /* @__PURE__ */ A(st, {
1762
1763
  duration: Y.duration,
1763
1764
  analyserNode: Y.analyserNode,
1764
- maxDuration: te,
1765
- onCancel: lt
1765
+ maxDuration: ne,
1766
+ onCancel: ut
1766
1767
  }), /* @__PURE__ */ j("div", {
1767
- ref: Ye,
1768
- className: a("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", F === "recording" && "invisible"),
1768
+ ref: Ze,
1769
+ className: o("flex items-center px-ds-04 py-ds-03 cursor-text [&_.tiptap]:w-full [&_.tiptap]:outline-hidden", F === "recording" && "invisible"),
1769
1770
  style: {
1770
1771
  minHeight: J.minHeight,
1771
- maxHeight: rt,
1772
+ maxHeight: it,
1772
1773
  overflowY: "auto"
1773
1774
  },
1774
1775
  onClick: () => X?.commands.focus(),
1775
1776
  children: [/* @__PURE__ */ A("div", {
1776
1777
  className: "flex-1 min-w-0",
1777
- children: /* @__PURE__ */ A(Ae, { editor: X })
1778
+ children: /* @__PURE__ */ A(Me, { editor: X })
1778
1779
  }), X && F !== "recording" && /* @__PURE__ */ j("div", {
1779
1780
  className: "flex items-center gap-ds-01 shrink-0 ml-ds-03",
1780
1781
  children: [/* @__PURE__ */ A("button", {
1781
1782
  type: "button",
1782
- onClick: () => we((e) => !e),
1783
+ onClick: () => Ee((e) => !e),
1783
1784
  title: L ? "Hide formatting" : "Show formatting",
1784
1785
  "aria-label": L ? "Hide formatting" : "Show formatting",
1785
1786
  "aria-pressed": L,
1786
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-raised-hover", L ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle"),
1787
- children: /* @__PURE__ */ A(s, {
1788
- icon: Se,
1787
+ className: o("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target", "transition-colors duration-fast-01 ease-productive-standard", "hover:bg-surface-panel-hover", L ? "bg-surface-panel-hover text-accent-11" : "text-surface-fg-subtle"),
1788
+ children: /* @__PURE__ */ A(c, {
1789
+ icon: Ce,
1789
1790
  size: "xs"
1790
1791
  })
1791
1792
  }), /* @__PURE__ */ j("div", {
1792
1793
  className: "relative",
1793
1794
  children: [/* @__PURE__ */ A("button", {
1794
- ref: Ue,
1795
+ ref: Ge,
1795
1796
  type: "button",
1796
- onClick: () => Fe((e) => !e),
1797
+ onClick: () => Le((e) => !e),
1797
1798
  title: "Emoji",
1798
1799
  "aria-label": "Emoji",
1799
- className: a("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target transition-colors duration-fast-01", Ne ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg"),
1800
- children: /* @__PURE__ */ A(s, {
1801
- icon: me,
1800
+ className: o("inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-control touch-target transition-colors duration-fast-01", Fe ? "bg-surface-panel-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-panel-hover hover:text-surface-fg"),
1801
+ children: /* @__PURE__ */ A(c, {
1802
+ icon: he,
1802
1803
  size: "xs"
1803
1804
  })
1804
- }), Ne && ne.createPortal(/* @__PURE__ */ A("div", {
1805
- ref: Ge,
1805
+ }), Fe && re.createPortal(/* @__PURE__ */ A("div", {
1806
+ ref: qe,
1806
1807
  className: "absolute z-popover",
1807
1808
  style: {
1808
1809
  top: 0,
1809
1810
  left: 0
1810
1811
  },
1811
- children: /* @__PURE__ */ A(bt, {
1812
+ children: /* @__PURE__ */ A(xt, {
1812
1813
  onSelect: ({ id: e, native: t }) => {
1813
1814
  X.chain().focus().insertContent({
1814
1815
  type: "emojiNode",
@@ -1816,64 +1817,64 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1816
1817
  id: e,
1817
1818
  native: t
1818
1819
  }
1819
- }).run(), Fe(!1);
1820
+ }).run(), Le(!1);
1820
1821
  },
1821
- onClose: () => Fe(!1)
1822
+ onClose: () => Le(!1)
1822
1823
  })
1823
1824
  }), document.body)]
1824
1825
  })]
1825
1826
  })]
1826
1827
  })]
1827
1828
  }),
1828
- F === "review" && K && /* @__PURE__ */ j("div", {
1829
+ F === "review" && G && /* @__PURE__ */ j("div", {
1829
1830
  className: "flex items-center gap-ds-03 px-ds-04 py-ds-02b border-b border-surface-border",
1830
- children: [/* @__PURE__ */ A(We, {
1831
- src: K.blob,
1832
- duration: K.duration,
1833
- waveformData: K.waveformData,
1831
+ children: [/* @__PURE__ */ A(Ke, {
1832
+ src: G.blob,
1833
+ duration: G.duration,
1834
+ waveformData: G.waveformData,
1834
1835
  className: "flex-1"
1835
- }), /* @__PURE__ */ A(l, {
1836
+ }), /* @__PURE__ */ A(u, {
1836
1837
  variant: "ghost",
1837
1838
  size: "icon-sm",
1838
- onClick: St,
1839
+ onClick: Ct,
1839
1840
  "aria-label": "Discard voice note",
1840
1841
  title: "Discard voice note",
1841
1842
  className: "text-surface-fg-subtle hover:text-error-11",
1842
- children: /* @__PURE__ */ A(s, {
1843
- icon: Ce,
1843
+ children: /* @__PURE__ */ A(c, {
1844
+ icon: we,
1844
1845
  size: "sm"
1845
1846
  })
1846
1847
  })]
1847
1848
  }),
1848
- nt && X && !Ct && /* @__PURE__ */ A(xt, { editor: X }),
1849
+ rt && X && !wt && /* @__PURE__ */ A(St, { editor: X }),
1849
1850
  J.toolbarPosition === "bottom" && X && /* @__PURE__ */ A("div", {
1850
- className: a("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", Tt ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1851
+ className: o("grid transition-[grid-template-rows,opacity] duration-moderate-01 ease-productive-standard", Et ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0 pointer-events-none"),
1851
1852
  children: /* @__PURE__ */ A("div", {
1852
1853
  className: "overflow-hidden",
1853
- children: /* @__PURE__ */ A(it, {
1854
+ children: /* @__PURE__ */ A(at, {
1854
1855
  editor: X,
1855
- toolbar: ue,
1856
- isMobile: nt,
1857
- hasMentions: !!(v || y),
1856
+ toolbar: de,
1857
+ isMobile: rt,
1858
+ hasMentions: !!(y || b),
1858
1859
  hasSlashCommands: !!D,
1859
- disabled: d
1860
+ disabled: f
1860
1861
  })
1861
1862
  })
1862
1863
  }),
1863
- g && _ !== "hidden" && (() => {
1864
- let e = U / g;
1865
- return _ === "always" || _ === "focus" && Re || (_ === "near-limit" || !_) && e >= .8 || e >= 1 ? /* @__PURE__ */ j("div", {
1866
- className: a("flex justify-end px-ds-04 pb-ds-02 text-body-xs tabular-nums transition-opacity duration-fast-01", e >= 1 ? "text-error-11 font-medium" : e >= .9 ? "text-warning-11" : "text-surface-fg-subtle"),
1864
+ _ && v !== "hidden" && (() => {
1865
+ let e = H / _;
1866
+ return v === "always" || v === "focus" && Be || (v === "near-limit" || !v) && e >= .8 || e >= 1 ? /* @__PURE__ */ j("div", {
1867
+ className: o("flex justify-end px-ds-04 pb-ds-02 text-body-xs tabular-nums transition-opacity duration-fast-01", e >= 1 ? "text-error-11 font-medium" : e >= .9 ? "text-warning-11" : "text-surface-fg-subtle"),
1867
1868
  children: [
1868
- U,
1869
+ H,
1869
1870
  "/",
1870
- g
1871
+ _
1871
1872
  ]
1872
1873
  }) : null;
1873
1874
  })(),
1874
- ce,
1875
+ le,
1875
1876
  /* @__PURE__ */ A("input", {
1876
- ref: Je,
1877
+ ref: Xe,
1877
1878
  type: "file",
1878
1879
  multiple: !0,
1879
1880
  className: "hidden",
@@ -1883,11 +1884,11 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1883
1884
  }),
1884
1885
  /* @__PURE__ */ j("div", {
1885
1886
  className: "flex items-center gap-ds-02 shrink-0",
1886
- children: [de && de.length > 0 && F !== "recording" && /* @__PURE__ */ A(vt, { options: de }), /* @__PURE__ */ j(R, {
1887
+ children: [fe && fe.length > 0 && F !== "recording" && /* @__PURE__ */ A(yt, { options: fe }), /* @__PURE__ */ j(Te, {
1887
1888
  mode: "popLayout",
1888
1889
  initial: !1,
1889
1890
  children: [
1890
- F === "recording" && /* @__PURE__ */ j(z.div, {
1891
+ F === "recording" && /* @__PURE__ */ j(R.div, {
1891
1892
  initial: {
1892
1893
  scale: .8,
1893
1894
  opacity: 0
@@ -1902,31 +1903,31 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1902
1903
  },
1903
1904
  transition: { duration: i.moderate01 },
1904
1905
  className: "flex items-center gap-ds-02",
1905
- children: [/* @__PURE__ */ A(l, {
1906
+ children: [/* @__PURE__ */ A(u, {
1906
1907
  variant: "soft",
1907
1908
  size: $,
1908
- onClick: lt,
1909
+ onClick: ut,
1909
1910
  "aria-label": "Cancel recording",
1910
1911
  title: "Cancel recording",
1911
1912
  className: "text-surface-fg-subtle hover:text-error-11",
1912
- children: /* @__PURE__ */ A(s, {
1913
- icon: Ce,
1913
+ children: /* @__PURE__ */ A(c, {
1914
+ icon: we,
1914
1915
  size: "md"
1915
1916
  })
1916
- }), /* @__PURE__ */ A(l, {
1917
+ }), /* @__PURE__ */ A(u, {
1917
1918
  variant: "solid",
1918
1919
  size: $,
1919
1920
  color: "error",
1920
- onClick: ct,
1921
+ onClick: lt,
1921
1922
  "aria-label": "Stop recording",
1922
1923
  title: "Stop recording",
1923
- children: /* @__PURE__ */ A(s, {
1924
- icon: xe,
1924
+ children: /* @__PURE__ */ A(c, {
1925
+ icon: Se,
1925
1926
  size: "md"
1926
1927
  })
1927
1928
  })]
1928
1929
  }, "recording"),
1929
- N && F !== "recording" && /* @__PURE__ */ A(z.div, {
1930
+ N && F !== "recording" && /* @__PURE__ */ A(R.div, {
1930
1931
  initial: {
1931
1932
  scale: .8,
1932
1933
  opacity: 0
@@ -1940,20 +1941,20 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1940
1941
  opacity: 0
1941
1942
  },
1942
1943
  transition: { duration: i.moderate01 },
1943
- children: /* @__PURE__ */ A(l, {
1944
+ children: /* @__PURE__ */ A(u, {
1944
1945
  variant: "solid",
1945
1946
  size: $,
1946
1947
  color: "error",
1947
- onClick: ae,
1948
+ onClick: oe,
1948
1949
  "aria-label": "Stop",
1949
1950
  title: "Stop",
1950
- children: /* @__PURE__ */ A(s, {
1951
- icon: xe,
1951
+ children: /* @__PURE__ */ A(c, {
1952
+ icon: Se,
1952
1953
  size: "md"
1953
1954
  })
1954
1955
  })
1955
1956
  }, "streaming"),
1956
- !N && F !== "recording" && wt && P && /* @__PURE__ */ A(z.div, {
1957
+ !N && F !== "recording" && Tt && P && /* @__PURE__ */ A(R.div, {
1957
1958
  initial: {
1958
1959
  scale: .8,
1959
1960
  opacity: 0
@@ -1967,23 +1968,23 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1967
1968
  opacity: 0
1968
1969
  },
1969
1970
  transition: { duration: i.moderate01 },
1970
- children: /* @__PURE__ */ A(h, {
1971
- onClick: ut,
1972
- disabled: d,
1973
- "aria-label": V ? "Schedule send" : "Send",
1971
+ children: /* @__PURE__ */ A(g, {
1972
+ onClick: dt,
1973
+ disabled: f,
1974
+ "aria-label": B ? "Schedule send" : "Send",
1974
1975
  size: $,
1975
- dropdownContent: /* @__PURE__ */ A(dt, {
1976
- onSchedule: (e) => Ie(e),
1976
+ dropdownContent: /* @__PURE__ */ A(ft, {
1977
+ onSchedule: (e) => Re(e),
1977
1978
  onClose: () => {},
1978
- onOpenDialog: () => H(!0)
1979
+ onOpenDialog: () => V(!0)
1979
1980
  }),
1980
- children: /* @__PURE__ */ A(s, {
1981
- icon: V ? oe : ye,
1981
+ children: /* @__PURE__ */ A(c, {
1982
+ icon: B ? se : be,
1982
1983
  size: "md"
1983
1984
  })
1984
1985
  })
1985
1986
  }, "split-send"),
1986
- !N && F !== "recording" && wt && !P && /* @__PURE__ */ A(z.div, {
1987
+ !N && F !== "recording" && Tt && !P && /* @__PURE__ */ A(R.div, {
1987
1988
  initial: {
1988
1989
  scale: .8,
1989
1990
  opacity: 0
@@ -1997,20 +1998,20 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
1997
1998
  opacity: 0
1998
1999
  },
1999
2000
  transition: { duration: i.moderate01 },
2000
- children: /* @__PURE__ */ A(l, {
2001
+ children: /* @__PURE__ */ A(u, {
2001
2002
  variant: "solid",
2002
2003
  size: $,
2003
- onClick: ut,
2004
- disabled: d,
2004
+ onClick: dt,
2005
+ disabled: f,
2005
2006
  "aria-label": "Send",
2006
2007
  title: "Send",
2007
- children: /* @__PURE__ */ A(s, {
2008
- icon: ye,
2008
+ children: /* @__PURE__ */ A(c, {
2009
+ icon: be,
2009
2010
  size: "md"
2010
2011
  })
2011
2012
  })
2012
2013
  }, "send"),
2013
- !N && F !== "recording" && !wt && O && /* @__PURE__ */ A(z.div, {
2014
+ !N && F !== "recording" && !Tt && O && /* @__PURE__ */ A(R.div, {
2014
2015
  initial: {
2015
2016
  scale: .8,
2016
2017
  opacity: 0
@@ -2024,19 +2025,19 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2024
2025
  opacity: 0
2025
2026
  },
2026
2027
  transition: { duration: i.moderate01 },
2027
- children: /* @__PURE__ */ A(l, {
2028
+ children: /* @__PURE__ */ A(u, {
2028
2029
  variant: "soft",
2029
2030
  size: $,
2030
- onClick: at,
2031
+ onClick: ot,
2031
2032
  "aria-label": "Record voice message",
2032
2033
  title: "Record voice message",
2033
- children: /* @__PURE__ */ A(s, {
2034
- icon: pe,
2034
+ children: /* @__PURE__ */ A(c, {
2035
+ icon: me,
2035
2036
  size: "md"
2036
2037
  })
2037
2038
  })
2038
2039
  }, "mic"),
2039
- !N && F !== "recording" && !wt && !O && /* @__PURE__ */ A(z.div, {
2040
+ !N && F !== "recording" && !Tt && !O && /* @__PURE__ */ A(R.div, {
2040
2041
  initial: {
2041
2042
  scale: .8,
2042
2043
  opacity: 0
@@ -2050,14 +2051,14 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2050
2051
  opacity: 0
2051
2052
  },
2052
2053
  transition: { duration: i.moderate01 },
2053
- children: /* @__PURE__ */ A(l, {
2054
+ children: /* @__PURE__ */ A(u, {
2054
2055
  variant: "solid",
2055
2056
  size: $,
2056
2057
  disabled: !0,
2057
2058
  "aria-label": "Send",
2058
2059
  title: "Send",
2059
- children: /* @__PURE__ */ A(s, {
2060
- icon: ye,
2060
+ children: /* @__PURE__ */ A(c, {
2061
+ icon: be,
2061
2062
  size: "md"
2062
2063
  })
2063
2064
  })
@@ -2065,19 +2066,19 @@ var St = T.forwardRef(function({ onSubmit: o, placeholder: u = "Type a message..
2065
2066
  ]
2066
2067
  })]
2067
2068
  }),
2068
- le && /* @__PURE__ */ A("p", {
2069
- className: "mt-ds-02 text-center text-caption text-surface-fg-subtle/50",
2070
- children: le
2069
+ ue && /* @__PURE__ */ A("p", {
2070
+ className: "mt-ds-02 text-center text-caption text-surface-fg-subtle",
2071
+ children: ue
2071
2072
  }),
2072
- P && /* @__PURE__ */ A(ft, {
2073
- open: Le,
2074
- onOpenChange: H,
2075
- onSchedule: (e) => Ie(e),
2076
- initialDate: V
2073
+ P && /* @__PURE__ */ A(pt, {
2074
+ open: ze,
2075
+ onOpenChange: V,
2076
+ onSchedule: (e) => Re(e),
2077
+ initialDate: B
2077
2078
  })
2078
2079
  ]
2079
- });
2080
+ }) });
2080
2081
  });
2081
- St.displayName = "RichChatInput";
2082
+ Ct.displayName = "RichChatInput";
2082
2083
  //#endregion
2083
- export { We as AudioPlayer, U as AudioWaveform, et as BlockquoteButton, Ke as BoldButton, Qe as BulletListButton, Ze as CodeButton, J as EmojiButton, Xe as HighlightButton, qe as ItalicButton, tt as LinkButton, nt as MentionButton, $e as OrderedListButton, St as RichChatInput, rt as SlashCommandButton, Ye as StrikeButton, G as ToolbarButton, K as ToolbarDivider, q as ToolbarGroup, Je as UnderlineButton, ht as useVoiceRecorder };
2084
+ export { Ke as AudioPlayer, H as AudioWaveform, nt as BlockquoteButton, Je as BoldButton, et as BulletListButton, $e as CodeButton, J as EmojiButton, Qe as HighlightButton, Ye as ItalicButton, q as LinkButton, rt as MentionButton, tt as OrderedListButton, Ct as RichChatInput, it as SlashCommandButton, Ze as StrikeButton, W as ToolbarButton, G as ToolbarDivider, K as ToolbarGroup, Xe as UnderlineButton, gt as useVoiceRecorder };