@alfadocs/ui-kit 0.1.9 → 0.2.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 (281) hide show
  1. package/README.md +30 -0
  2. package/dist/_chunks/accordion-DOmxGEWU.js +228 -0
  3. package/dist/_chunks/{agenda-card-DwLIxgi7.js → agenda-card-CalZqycc.js} +12 -3
  4. package/dist/_chunks/{agenda-tray-DUvengGQ.js → agenda-tray-3ffFDQZC.js} +54 -51
  5. package/dist/_chunks/{ai-prompt-input.agent-0NHYLTWD.js → ai-prompt-input-BBiDlEIS.js} +231 -231
  6. package/dist/_chunks/{alert-BlOUMkXj.js → alert-B1sj8Ss0.js} +24 -14
  7. package/dist/_chunks/{apexcharts-theme-BkSShpEy.js → apexcharts-theme-BJigns_V.js} +7 -2
  8. package/dist/_chunks/{app-frame-6d7Lu4ea.js → app-frame-CDJOgPXe.js} +7 -16
  9. package/dist/_chunks/{audio-recorder.agent--VKeykUp.js → audio-recorder-B4U1LuiQ.js} +161 -162
  10. package/dist/_chunks/{audio-visualiser-CeMPCZkd.js → audio-visualiser-ByDEFLNm.js} +25 -19
  11. package/dist/_chunks/autocomplete-D4oUZbsP.js +466 -0
  12. package/dist/_chunks/{badge-mrstWxve.js → badge-DKFbntoa.js} +16 -13
  13. package/dist/_chunks/{balance-cell-renderer-5CA7zpAi.js → balance-cell-renderer-B8zgIM-m.js} +63 -44
  14. package/dist/_chunks/{breadcrumb.agent-GM2hAKFX.js → breadcrumb-D1snXjPb.js} +165 -157
  15. package/dist/_chunks/{button-7mLWcMp_.js → button-DD_0Xdmr.js} +12 -2
  16. package/dist/_chunks/{calendar-nGEgelJs.js → calendar-zy0tUUVG.js} +13 -18
  17. package/dist/_chunks/{card-BEy58ZKp.js → card-CWzuTLYE.js} +40 -34
  18. package/dist/_chunks/{chart.agent-_pRYS17d.js → chart-BLvFl169.js} +147 -131
  19. package/dist/_chunks/chat-container-ClzsWXp2.js +220 -0
  20. package/dist/_chunks/chat-input-DOlsB1fm.js +333 -0
  21. package/dist/_chunks/{chat-message-ByouZpPP.js → chat-message-DoAhgUTj.js} +23 -13
  22. package/dist/_chunks/{collapsible.agent-DkS1jVyn.js → collapsible-CuxUBoHJ.js} +97 -99
  23. package/dist/_chunks/{color-picker-94qcBZqZ.js → color-picker-CTIcHlDF.js} +111 -45
  24. package/dist/_chunks/combobox-DCNXqbC7.js +460 -0
  25. package/dist/_chunks/command-palette-C_vgSgrI.js +441 -0
  26. package/dist/_chunks/{date-picker-BqPTn7bO.js → date-picker-B1PO1ZQP.js} +190 -181
  27. package/dist/_chunks/{date-range-picker-B2hGsffw.js → date-range-picker-mix2nEVC.js} +21 -8
  28. package/dist/_chunks/{date-time-picker-Bzt0S8yO.js → date-time-picker-Dnong_BY.js} +30 -15
  29. package/dist/_chunks/{description-list-DvJbp6Yg.js → description-list-BYA77Yud.js} +26 -23
  30. package/dist/_chunks/dialog-BPD7wlGE.js +211 -0
  31. package/dist/_chunks/dropdown-menu-CpiF6CPz.js +300 -0
  32. package/dist/_chunks/{empty-state-DQPtRp2b.js → empty-state-3CLJIXSj.js} +132 -101
  33. package/dist/_chunks/file-upload-C947ACDK.js +829 -0
  34. package/dist/_chunks/{floating-action-button-Cnw-f6AG.js → floating-action-button-C8OYj8mE.js} +9 -2
  35. package/dist/_chunks/{form-field-BfsPLTSc.js → form-field-Bmkeh7WY.js} +12 -11
  36. package/dist/_chunks/{form-field-context-94LwgYTQ.js → form-field-context-B3APVHKx.js} +4 -2
  37. package/dist/_chunks/{freemium-paywall.agent-_nQqLyRF.js → freemium-paywall-CnvceDav.js} +124 -117
  38. package/dist/_chunks/{header-BGn1mRp8.js → header-D0ULgQl3.js} +69 -68
  39. package/dist/_chunks/{icon-button-Wnnde5lc.js → icon-button-C4CGcYuz.js} +11 -3
  40. package/dist/_chunks/{kbd-8baVw3KU.js → kbd-Cglkd7CY.js} +6 -2
  41. package/dist/_chunks/{key-value-pair-JRFS9Xrh.js → key-value-pair-CgWvAIGb.js} +2 -2
  42. package/dist/_chunks/{leo-sidebar-BwINPdix.js → leo-sidebar-CfEY-xi2.js} +16 -20
  43. package/dist/_chunks/{link-QheANk74.js → link-8QmFjIz2.js} +2 -5
  44. package/dist/_chunks/list-qP6p0NTw.js +434 -0
  45. package/dist/_chunks/{logo-BpFoCL-s.js → logo-_Z-jLq80.js} +155 -26
  46. package/dist/_chunks/{matrix-rain-BEkvux64.js → matrix-rain-CRPMXcVx.js} +8 -2
  47. package/dist/_chunks/{message-card-qhoGv947.js → message-card-ChCX9Iv6.js} +63 -60
  48. package/dist/_chunks/{message-tray-xHUCra-Y.js → message-tray-n8q9ITXI.js} +71 -76
  49. package/dist/_chunks/{multi-select.agent-Do6CeQUT.js → multi-select-wqqrgjUQ.js} +326 -291
  50. package/dist/_chunks/{navigation-menu.agent-D69ND6Qq.js → navigation-menu-ClbHeawy.js} +136 -123
  51. package/dist/_chunks/{notification-card-CsVEYJE-.js → notification-card-hBlPN1-c.js} +3 -3
  52. package/dist/_chunks/{notification-tray-DTXMq42J.js → notification-tray-C5cnXbl9.js} +70 -66
  53. package/dist/_chunks/{number-input-fvGmnRy9.js → number-input-Q7wkHnvQ.js} +7 -3
  54. package/dist/_chunks/{otp-input-EglXOUue.js → otp-input-C9gUByF0.js} +6 -3
  55. package/dist/_chunks/{pagination.agent-BkZQl45y.js → pagination-3AC4zTsi.js} +234 -194
  56. package/dist/_chunks/{password-input-D6kuYXmr.js → password-input-C4LmjIH1.js} +6 -9
  57. package/dist/_chunks/{patient-shell-BRmrrUUW.js → patient-shell-BlsEUKWB.js} +10 -15
  58. package/dist/_chunks/{payment-form-BWaXas8z.js → payment-form-C3vT_npe.js} +195 -186
  59. package/dist/_chunks/{pdf-viewer.agent-BaGEDheA.js → pdf-viewer-CZIfY08H.js} +270 -241
  60. package/dist/_chunks/{phone-input-C8Op4sEc.js → phone-input-CSHJOJ13.js} +4 -9
  61. package/dist/_chunks/popover-DekUKNBk.js +293 -0
  62. package/dist/_chunks/{privacy-lock.agent-C1i1-T58.js → privacy-lock-BKsI6ReN.js} +117 -109
  63. package/dist/_chunks/progress-C11tqhoI.js +298 -0
  64. package/dist/_chunks/{recaptcha-widget.agent-BGHpU5zD.js → recaptcha-widget-NyfOfLII.js} +95 -86
  65. package/dist/_chunks/resizable-mpXXyIsN.js +483 -0
  66. package/dist/_chunks/{rich-text-editor.agent-DnE125Tz.js → rich-text-editor-C7TCIlQO.js} +298 -209
  67. package/dist/_chunks/{scroll-area-DLr5w9Dd.js → scroll-area-DEDU-lp-.js} +67 -54
  68. package/dist/_chunks/{search-bar.agent-DxFAxctc.js → search-bar-BTDfgYtg.js} +291 -268
  69. package/dist/_chunks/{search-input-Xw3cdWXW.js → search-input-CdJIEjFo.js} +116 -107
  70. package/dist/_chunks/{select-DY1Cb2Tg.js → select-y6bXV1f1.js} +84 -83
  71. package/dist/_chunks/{separator-B4wXDLNC.js → separator-CYU_bGFn.js} +2 -5
  72. package/dist/_chunks/{sheet-B9kH9pcI.js → sheet-4tgMFwj0.js} +135 -60
  73. package/dist/_chunks/{sidebar-CHF5xr_P.js → sidebar-Bx3wCDyy.js} +546 -457
  74. package/dist/_chunks/{sign-in-with-alfadocs-button-BN_FPGHT.js → sign-in-with-alfadocs-button-B9UrqOqH.js} +9 -5
  75. package/dist/_chunks/{signature-capture.agent-BpeDwFht.js → signature-capture-DjMlFOzS.js} +210 -212
  76. package/dist/_chunks/{skeleton-dtqyF09N.js → skeleton-CZbwyJAA.js} +9 -3
  77. package/dist/_chunks/{slider-CcsQTZTA.js → slider-BT2bZWsy.js} +138 -134
  78. package/dist/_chunks/{slot-grid-D_l5VsHG.js → slot-grid-CgpYgBkW.js} +105 -95
  79. package/dist/_chunks/{sparkline.agent-56Sj7nOP.js → sparkline-_gy8aJDG.js} +107 -100
  80. package/dist/_chunks/{spinner-GCcv67vh.js → spinner-DLaYfLPl.js} +66 -14
  81. package/dist/_chunks/{stat-DUB6g90R.js → stat-B9PHSPbN.js} +45 -27
  82. package/dist/_chunks/{stepper-calendar.agent-9iT3ClIB.js → stepper-calendar-BLOJUE0-.js} +189 -187
  83. package/dist/_chunks/stepper-progress-jFY8BSf7.js +208 -0
  84. package/dist/_chunks/{suggestion-chip-DhFrkRPj.js → suggestion-chip-C4Jz0LrM.js} +50 -52
  85. package/dist/_chunks/{switch-BYEH8I53.js → switch-C0psfIQF.js} +2 -2
  86. package/dist/_chunks/{tabs.agent-h7NvsTR1.js → tabs-DaFA3Muo.js} +183 -155
  87. package/dist/_chunks/{tag-BqidXKo3.js → tag-DuLMjRbF.js} +90 -32
  88. package/dist/_chunks/{task-card-CY5ztNkU.js → task-card-Dw_ZJDL8.js} +5 -2
  89. package/dist/_chunks/{task-tray-CCoUdorl.js → task-tray-XlIW9ueh.js} +50 -49
  90. package/dist/_chunks/{text-area-C_M8wliK.js → text-area-CO9Dz0qX.js} +2 -2
  91. package/dist/_chunks/{text-input-BX39e6T6.js → text-input-DZwt9L8H.js} +65 -62
  92. package/dist/_chunks/{theme-root-DDb0TJjd.js → theme-root-CSKD5ZRm.js} +9 -2
  93. package/dist/_chunks/{theme-toggle.agent-btmXTWdW.js → theme-toggle-B9zzCnvl.js} +179 -177
  94. package/dist/_chunks/{time-picker-B8AMIrX7.js → time-picker-DvPUmHH-.js} +95 -93
  95. package/dist/_chunks/{timeline.agent-CRPza9wc.js → timeline-BvmnQadS.js} +96 -96
  96. package/dist/_chunks/{toast.agent-BjEGuq1Z.js → toast.agent-BwKXA0km.js} +46 -8
  97. package/dist/_chunks/{tooth-scheme.agent-CWrQBjJM.js → tooth-scheme-3mITSXiZ.js} +146 -162
  98. package/dist/_chunks/{transcript-panel.agent-BXEYP6w-.js → transcript-panel-Bx5ANMsv.js} +110 -101
  99. package/dist/_chunks/{typing-indicator-CbUBf-Dx.js → typing-indicator-BZ5jXZPn.js} +27 -5
  100. package/dist/_chunks/{use-theme-BMUhembX.js → use-theme-B1cwAXJR.js} +2 -5
  101. package/dist/_chunks/{visually-hidden-Bw7vBHLm.js → visually-hidden-BHxEUGyT.js} +11 -2
  102. package/dist/_chunks/{warning-stack-8Pa3pekh.js → warning-stack-VygGHSqC.js} +11 -13
  103. package/dist/_chunks/{workflow-map-D2A7rTEG.js → workflow-map-C-nlogPC.js} +430 -452
  104. package/dist/agent-catalog.json +580 -15
  105. package/dist/components/_shared/index.d.ts +2 -2
  106. package/dist/components/accordion/index.d.ts +1 -1
  107. package/dist/components/accordion/index.js +5 -6
  108. package/dist/components/agenda-card/index.js +1 -1
  109. package/dist/components/agenda-tray/agenda-tray.d.ts +1 -1
  110. package/dist/components/agenda-tray/index.js +1 -1
  111. package/dist/components/ai-prompt-input/ai-prompt-input.d.ts +1 -1
  112. package/dist/components/ai-prompt-input/index.js +1 -1
  113. package/dist/components/alert/index.d.ts +1 -1
  114. package/dist/components/alert/index.js +1 -1
  115. package/dist/components/app-frame/index.js +1 -1
  116. package/dist/components/audio-recorder/index.js +1 -1
  117. package/dist/components/audio-visualiser/index.js +1 -1
  118. package/dist/components/autocomplete/index.js +1 -1
  119. package/dist/components/badge/index.js +1 -1
  120. package/dist/components/breadcrumb/breadcrumb.d.ts +1 -1
  121. package/dist/components/breadcrumb/index.js +1 -1
  122. package/dist/components/button/index.js +2 -2
  123. package/dist/components/calendar/index.js +1 -1
  124. package/dist/components/card/index.js +1 -1
  125. package/dist/components/chart/index.d.ts +1 -1
  126. package/dist/components/chart/index.js +1 -1
  127. package/dist/components/chat-container/chat-container.d.ts +1 -1
  128. package/dist/components/chat-container/index.js +2 -3
  129. package/dist/components/chat-input/chat-input.d.ts +1 -1
  130. package/dist/components/chat-input/index.js +3 -4
  131. package/dist/components/chat-message/index.js +1 -1
  132. package/dist/components/checkbox-group/index.d.ts +1 -1
  133. package/dist/components/collapsible/collapsible.d.ts +1 -1
  134. package/dist/components/collapsible/index.d.ts +1 -1
  135. package/dist/components/collapsible/index.js +1 -1
  136. package/dist/components/color-picker/index.js +1 -1
  137. package/dist/components/combobox/index.d.ts +1 -1
  138. package/dist/components/combobox/index.js +1 -1
  139. package/dist/components/command-palette/command-palette.d.ts +46 -13
  140. package/dist/components/command-palette/index.js +1 -1
  141. package/dist/components/data-table/data-table.d.ts +3 -1
  142. package/dist/components/data-table/index.js +1 -1
  143. package/dist/components/data-table/toolbar.d.ts +6 -5
  144. package/dist/components/date-picker/date-picker.d.ts +1 -1
  145. package/dist/components/date-picker/index.d.ts +1 -1
  146. package/dist/components/date-picker/index.js +1 -1
  147. package/dist/components/date-range-picker/index.js +1 -1
  148. package/dist/components/date-time-picker/index.d.ts +1 -1
  149. package/dist/components/date-time-picker/index.js +1 -1
  150. package/dist/components/description-list/description-list.d.ts +1 -2
  151. package/dist/components/description-list/index.js +1 -1
  152. package/dist/components/dialog/dialog.d.ts +2 -2
  153. package/dist/components/dialog/index.js +1 -1
  154. package/dist/components/dropdown-menu/dropdown-menu.d.ts +11 -16
  155. package/dist/components/dropdown-menu/index.js +3 -4
  156. package/dist/components/empty-state/index.js +1 -1
  157. package/dist/components/file-upload/index.d.ts +1 -1
  158. package/dist/components/file-upload/index.js +1 -1
  159. package/dist/components/floating-action-button/index.js +1 -1
  160. package/dist/components/form-field/index.js +2 -2
  161. package/dist/components/freemium-paywall/freemium-paywall.d.ts +1 -1
  162. package/dist/components/freemium-paywall/index.js +1 -1
  163. package/dist/components/header/index.js +1 -1
  164. package/dist/components/icon-button/index.js +1 -1
  165. package/dist/components/kbd/index.js +1 -1
  166. package/dist/components/key-value-pair/index.js +1 -1
  167. package/dist/components/link/index.js +1 -1
  168. package/dist/components/list/index.js +1 -1
  169. package/dist/components/logo/index.js +1 -1
  170. package/dist/components/matrix-rain/index.js +1 -1
  171. package/dist/components/message-card/index.d.ts +1 -1
  172. package/dist/components/message-card/index.js +1 -1
  173. package/dist/components/message-tray/index.js +1 -1
  174. package/dist/components/message-tray/message-tray.d.ts +1 -1
  175. package/dist/components/multi-select/index.js +1 -1
  176. package/dist/components/navigation-menu/index.js +1 -1
  177. package/dist/components/navigation-menu/navigation-menu.d.ts +1 -1
  178. package/dist/components/notification-card/index.d.ts +1 -1
  179. package/dist/components/notification-card/index.js +1 -1
  180. package/dist/components/notification-tray/index.js +1 -1
  181. package/dist/components/notification-tray/notification-tray.d.ts +1 -1
  182. package/dist/components/number-input/index.js +1 -1
  183. package/dist/components/otp-input/index.js +1 -1
  184. package/dist/components/pagination/index.js +1 -1
  185. package/dist/components/pagination/pagination.d.ts +4 -6
  186. package/dist/components/password-input/index.js +1 -1
  187. package/dist/components/payment-form/index.js +7 -8
  188. package/dist/components/payment-form/payment-form.d.ts +1 -1
  189. package/dist/components/pdf-viewer/index.js +1 -1
  190. package/dist/components/phone-input/index.d.ts +1 -1
  191. package/dist/components/phone-input/index.js +1 -1
  192. package/dist/components/popover/index.js +3 -4
  193. package/dist/components/privacy-lock/index.js +1 -1
  194. package/dist/components/privacy-lock/privacy-lock.d.ts +1 -1
  195. package/dist/components/progress/index.js +3 -4
  196. package/dist/components/recaptcha-widget/index.js +1 -1
  197. package/dist/components/resizable/index.d.ts +1 -1
  198. package/dist/components/resizable/index.js +1 -1
  199. package/dist/components/rich-text-editor/index.js +1 -1
  200. package/dist/components/scroll-area/index.js +1 -1
  201. package/dist/components/search-bar/index.js +1 -1
  202. package/dist/components/search-bar/search-bar.d.ts +1 -1
  203. package/dist/components/search-input/index.js +1 -1
  204. package/dist/components/select/index.js +1 -1
  205. package/dist/components/select/select.d.ts +1 -1
  206. package/dist/components/separator/index.js +1 -1
  207. package/dist/components/sheet/index.js +3 -4
  208. package/dist/components/sheet/sheet.d.ts +2 -2
  209. package/dist/components/sidebar/index.js +7 -8
  210. package/dist/components/sidebar/sidebar.d.ts +0 -2
  211. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  212. package/dist/components/signature-capture/index.js +1 -1
  213. package/dist/components/skeleton/index.js +1 -1
  214. package/dist/components/slider/index.js +1 -1
  215. package/dist/components/slot-grid/index.js +1 -1
  216. package/dist/components/sparkline/index.js +1 -1
  217. package/dist/components/spinner/index.js +1 -1
  218. package/dist/components/stat/index.js +1 -1
  219. package/dist/components/stepper-calendar/index.js +1 -1
  220. package/dist/components/stepper-calendar/stepper-calendar.d.ts +1 -1
  221. package/dist/components/stepper-progress/index.d.ts +1 -1
  222. package/dist/components/stepper-progress/index.js +1 -2
  223. package/dist/components/stepper-progress/stepper-progress.d.ts +1 -1
  224. package/dist/components/suggestion-chip/index.js +1 -1
  225. package/dist/components/switch/index.js +1 -1
  226. package/dist/components/tabs/index.d.ts +1 -1
  227. package/dist/components/tabs/index.js +1 -1
  228. package/dist/components/tag/index.js +1 -1
  229. package/dist/components/task-card/index.js +1 -1
  230. package/dist/components/task-tray/index.js +1 -1
  231. package/dist/components/task-tray/task-tray.d.ts +1 -1
  232. package/dist/components/text-area/index.js +1 -1
  233. package/dist/components/text-input/index.js +1 -1
  234. package/dist/components/theme-root/index.js +1 -1
  235. package/dist/components/theme-toggle/index.js +1 -1
  236. package/dist/components/theme-toggle/theme-toggle.d.ts +1 -1
  237. package/dist/components/time-picker/index.js +1 -1
  238. package/dist/components/time-picker/time-picker.d.ts +1 -1
  239. package/dist/components/timeline/index.js +1 -1
  240. package/dist/components/timeline/timeline.d.ts +1 -1
  241. package/dist/components/toast/index.js +1 -1
  242. package/dist/components/tooth-scheme/index.js +1 -1
  243. package/dist/components/tooth-scheme/tooth-scheme.d.ts +1 -1
  244. package/dist/components/transcript-panel/index.js +1 -1
  245. package/dist/components/transcript-panel/transcript-panel.d.ts +1 -1
  246. package/dist/components/typing-indicator/index.js +1 -1
  247. package/dist/components/visually-hidden/index.js +1 -1
  248. package/dist/components/warning-stack/index.js +1 -1
  249. package/dist/components/workflow/index.js +1 -1
  250. package/dist/components/workflow/workflow-editor.d.ts +1 -1
  251. package/dist/hooks/index.js +1 -1
  252. package/dist/index.js +392 -402
  253. package/dist/patterns/leo-assistant/index.js +1 -1
  254. package/dist/patterns/patient-shell/index.js +1 -1
  255. package/dist/safe-html/index.js +20 -3
  256. package/dist/tokens.css +2 -2
  257. package/package.json +12 -2
  258. package/dist/_chunks/accordion-BEnrZmAn.js +0 -120
  259. package/dist/_chunks/accordion.agent-BTjeO1Sx.js +0 -52
  260. package/dist/_chunks/autocomplete.agent-Dh7KioS6.js +0 -432
  261. package/dist/_chunks/chat-container-Dl0Kfy5a.js +0 -175
  262. package/dist/_chunks/chat-container.agent-CM4WModE.js +0 -27
  263. package/dist/_chunks/chat-input-C_tMQv92.js +0 -252
  264. package/dist/_chunks/chat-input.agent-Bsz3ckGa.js +0 -69
  265. package/dist/_chunks/combobox.agent-CAvUkkIe.js +0 -410
  266. package/dist/_chunks/command-palette.agent-HatEt_EM.js +0 -391
  267. package/dist/_chunks/dialog.agent-Daf1TTko.js +0 -179
  268. package/dist/_chunks/dropdown-menu-C7AZipNz.js +0 -219
  269. package/dist/_chunks/dropdown-menu.agent-BcxIKOjK.js +0 -43
  270. package/dist/_chunks/file-upload.agent-DJaH2dHg.js +0 -681
  271. package/dist/_chunks/list.agent-D0iWt4VI.js +0 -420
  272. package/dist/_chunks/payment-form.agent-kuIfodCj.js +0 -31
  273. package/dist/_chunks/popover-kFN8s84V.js +0 -229
  274. package/dist/_chunks/popover.agent-K_d1cfbj.js +0 -39
  275. package/dist/_chunks/progress-wNsqkw8I.js +0 -253
  276. package/dist/_chunks/progress.agent-C68rDOXL.js +0 -27
  277. package/dist/_chunks/resizable.agent-CMwZzvsi.js +0 -456
  278. package/dist/_chunks/sheet.agent-QAyTOxgk.js +0 -46
  279. package/dist/_chunks/sidebar.agent-C9TM_ZDZ.js +0 -49
  280. package/dist/_chunks/stepper-progress-Bmen-YXB.js +0 -149
  281. package/dist/_chunks/stepper-progress.agent-q9InWca4.js +0 -61
@@ -1,14 +1,85 @@
1
1
  import { jsxs as m, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as Fe, useId as He, useRef as U, useCallback as v, useState as g, useLayoutEffect as Be, useImperativeHandle as $e } from "react";
3
- import { c as Oe } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ae } from "react-i18next";
5
- import { _ as h } from "./index-4xgbg-sn.js";
6
- import { u as je } from "./index-CeY1nNvd.js";
7
- import { I as re } from "./icon-button-Wnnde5lc.js";
8
- import { S as De } from "./select-DY1Cb2Tg.js";
9
- import { S as _e } from "./send-CySZIRPJ.js";
10
- import { X as Ce } from "./x-CCcI3eJp.js";
11
- const Le = Oe(
2
+ import { forwardRef as Be, useId as $e, useRef as T, useCallback as g, useState as h, useLayoutEffect as Oe, useImperativeHandle as je, useMemo as De } from "react";
3
+ import { c as _e } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as re } from "react-i18next";
5
+ import { u as Ae } from "./registry-C9nwlNyL.js";
6
+ import { _ as b } from "./index-4xgbg-sn.js";
7
+ import { u as Ce } from "./index-CeY1nNvd.js";
8
+ import { I as ie } from "./icon-button-C4CGcYuz.js";
9
+ import { S as Le } from "./select-y6bXV1f1.js";
10
+ import { S as Re } from "./send-CySZIRPJ.js";
11
+ import { X as Ue } from "./x-CCcI3eJp.js";
12
+ const We = {
13
+ id: "ai-prompt-input",
14
+ capabilities: ["edit_inline", "submit"],
15
+ state: {
16
+ value: {
17
+ type: "string",
18
+ descriptionKey: "ui.agent.aiPromptInput.state.value",
19
+ description: "Current text in the composer (no PHI processing).",
20
+ read: (s) => s.getValue()
21
+ },
22
+ isEmpty: {
23
+ type: "boolean",
24
+ descriptionKey: "ui.agent.aiPromptInput.state.isEmpty",
25
+ description: "True when the composer has no text and no attachments.",
26
+ read: (s) => s.isEmpty()
27
+ },
28
+ isSubmitting: {
29
+ type: "boolean",
30
+ descriptionKey: "ui.agent.aiPromptInput.state.isSubmitting",
31
+ description: "True while an onSubmit invocation is in flight (best-effort).",
32
+ read: (s) => s.isSubmitting()
33
+ }
34
+ },
35
+ actions: {
36
+ set_value: {
37
+ safety: "write",
38
+ argsType: "{ value: string }",
39
+ descriptionKey: "ui.agent.aiPromptInput.actions.setValue",
40
+ description: "Replace the composer text with the given value.",
41
+ invoke: (s, d) => {
42
+ s.setValue(d.value);
43
+ }
44
+ },
45
+ clear: {
46
+ safety: "destructive",
47
+ descriptionKey: "ui.agent.aiPromptInput.actions.clear",
48
+ description: "Clear text and attachments. Irreversible from the same UI.",
49
+ invoke: (s) => {
50
+ s.clear();
51
+ }
52
+ },
53
+ submit: {
54
+ safety: "write",
55
+ descriptionKey: "ui.agent.aiPromptInput.actions.submit",
56
+ description: "Submit the current composer state via onSubmit.",
57
+ invoke: (s) => {
58
+ s.submit();
59
+ }
60
+ },
61
+ focus: {
62
+ safety: "read",
63
+ descriptionKey: "ui.agent.aiPromptInput.actions.focus",
64
+ description: "Move keyboard focus into the textarea.",
65
+ invoke: (s) => {
66
+ s.focus();
67
+ }
68
+ }
69
+ },
70
+ domHooks: {
71
+ root: {
72
+ attr: "data-component",
73
+ value: "ai-prompt-input",
74
+ description: "Marks the AIPromptInput wrapper."
75
+ },
76
+ instanceId: {
77
+ attr: "data-component-id",
78
+ sourceProp: "id",
79
+ description: "Sourced from the id prop; addresses a specific composer instance."
80
+ }
81
+ }
82
+ }, Ze = _e(
12
83
  [
13
84
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full",
14
85
  "ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background",
@@ -26,93 +97,87 @@ const Le = Oe(
26
97
  },
27
98
  defaultVariants: { size: "md" }
28
99
  }
29
- ), Ue = Fe(
100
+ ), Qe = Be(
30
101
  ({
31
102
  commands: s = [],
32
103
  models: d,
33
104
  defaultModelId: E,
34
- modelId: W,
105
+ modelId: U,
35
106
  onModelChange: F,
36
- maxSize: b,
37
- accept: ie,
38
- context: H,
39
- onContextDismiss: x,
40
- onSubmit: y,
41
- onAttach: I,
42
- onAttachmentRejected: k,
43
- minRows: B = 2,
44
- maxRows: A = 8,
45
- value: Q,
46
- defaultValue: Z,
47
- size: ne = "md",
107
+ maxSize: x,
108
+ accept: ne,
109
+ context: B,
110
+ onContextDismiss: y,
111
+ onSubmit: I,
112
+ onAttach: k,
113
+ onAttachmentRejected: N,
114
+ minRows: $ = 2,
115
+ maxRows: W = 8,
116
+ value: Z,
117
+ defaultValue: Q,
118
+ size: oe = "md",
48
119
  disabled: q,
49
- className: oe,
50
- placeholder: de,
51
- onChange: $,
52
- onKeyDown: O,
53
- onCompositionStart: j,
54
- onCompositionEnd: D,
55
- onPaste: _,
56
- id: R,
57
- ...le
58
- }, ce) => {
59
- var te;
60
- const { t: o } = ae(), pe = He(), N = U(null), w = U(!1), ue = U(null), me = v(
61
- (e) => {
62
- N.current = e;
63
- },
64
- []
65
- ), c = Q !== void 0, [fe, f] = g(
66
- String(Z ?? "")
67
- ), n = c ? String(Q) : fe, [u, S] = g([]), [z, P] = g(!1), [ve, V] = g(""), [ge, he] = g(
68
- E ?? ((te = d == null ? void 0 : d[0]) == null ? void 0 : te.id) ?? ""
69
- ), X = W !== void 0, C = X ? W : ge, Y = v(() => {
70
- const e = N.current;
120
+ className: de,
121
+ placeholder: le,
122
+ onChange: O,
123
+ onKeyDown: j,
124
+ onCompositionStart: D,
125
+ onCompositionEnd: _,
126
+ onPaste: A,
127
+ id: C,
128
+ ...ce
129
+ }, pe) => {
130
+ var se;
131
+ const { t: o } = re(), ue = $e(), w = T(null), S = T(!1), me = T(null), fe = g((e) => {
132
+ w.current = e;
133
+ }, []), c = Z !== void 0, [ve, f] = h(
134
+ String(Q ?? "")
135
+ ), n = c ? String(Z) : ve, [u, z] = h([]), [v, P] = h(!1), [ge, M] = h(""), [he, be] = h(
136
+ E ?? ((se = d == null ? void 0 : d[0]) == null ? void 0 : se.id) ?? ""
137
+ ), X = U !== void 0, L = X ? U : he, Y = g(() => {
138
+ const e = w.current;
71
139
  if (!e) return;
72
- const t = window.getComputedStyle(e), i = parseFloat(t.lineHeight) || 24, r = parseFloat(t.paddingTop) || 0, p = parseFloat(t.paddingBottom) || 0, l = parseFloat(t.borderTopWidth) || 0, L = parseFloat(t.borderBottomWidth) || 0, T = r + p + l + L, Te = i * B + T, se = i * A + T;
140
+ const t = window.getComputedStyle(e), i = parseFloat(t.lineHeight) || 24, r = parseFloat(t.paddingTop) || 0, p = parseFloat(t.paddingBottom) || 0, l = parseFloat(t.borderTopWidth) || 0, R = parseFloat(t.borderBottomWidth) || 0, K = r + p + l + R, Ee = i * $ + K, ae = i * W + K;
73
141
  e.style.height = "auto";
74
- const Ee = Math.max(Te, Math.min(e.scrollHeight, se));
75
- e.style.height = `${Ee}px`, e.style.overflowY = e.scrollHeight > se ? "auto" : "hidden";
76
- }, [B, A]);
77
- Be(() => {
142
+ const Fe = Math.max(Ee, Math.min(e.scrollHeight, ae));
143
+ e.style.height = `${Fe}px`, e.style.overflowY = e.scrollHeight > ae ? "auto" : "hidden";
144
+ }, [$, W]);
145
+ Oe(() => {
78
146
  Y();
79
147
  }, [Y, n]);
80
- const be = v(
81
- (e, t) => {
82
- const r = e.slice(0, t).lastIndexOf(`
148
+ const xe = g((e, t) => {
149
+ const r = e.slice(0, t).lastIndexOf(`
83
150
  `) + 1, p = e.slice(r, t);
84
- if (p.startsWith("/")) {
85
- const l = p.slice(1);
86
- if (!/\s/.test(l)) {
87
- P(!0), V(l);
88
- return;
89
- }
151
+ if (p.startsWith("/")) {
152
+ const l = p.slice(1);
153
+ if (!/\s/.test(l)) {
154
+ P(!0), M(l);
155
+ return;
90
156
  }
91
- P(!1), V("");
92
- },
93
- []
94
- ), xe = (e) => {
95
- if (c || f(e.target.value), w.current) return;
96
- $ == null || $(e);
157
+ }
158
+ P(!1), M("");
159
+ }, []), ye = (e) => {
160
+ if (c || f(e.target.value), S.current) return;
161
+ O == null || O(e);
97
162
  const t = e.target.selectionStart ?? e.target.value.length;
98
- be(e.target.value, t);
99
- }, ye = (e) => {
100
- w.current = !0, j == null || j(e);
163
+ xe(e.target.value, t);
101
164
  }, Ie = (e) => {
102
- w.current = !1, D == null || D(e);
103
- }, ke = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || w.current, M = v(() => {
165
+ S.current = !0, D == null || D(e);
166
+ }, ke = (e) => {
167
+ S.current = !1, _ == null || _(e);
168
+ }, Ne = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || S.current, V = g(() => {
104
169
  if (!n.trim() && u.length === 0) return;
105
170
  let t, i = n;
106
171
  const r = n.match(/^\/(\S+)\s?/);
107
- r && (t = r[1], i = n.slice(r[0].length)), y == null || y({
172
+ r && (t = r[1], i = n.slice(r[0].length)), I == null || I({
108
173
  text: i,
109
174
  command: t,
110
175
  attachments: u,
111
- modelId: C || void 0
112
- }), c || f(""), S([]);
113
- }, [n, u, y, C, c]);
114
- $e(
115
- ce,
176
+ modelId: L || void 0
177
+ }), c || f(""), z([]);
178
+ }, [n, u, I, L, c]), G = T(null);
179
+ je(pe, () => G.current, []);
180
+ const we = De(
116
181
  () => ({
117
182
  getValue: () => n,
118
183
  isEmpty: () => !n.trim() && u.length === 0,
@@ -121,38 +186,39 @@ const Le = Oe(
121
186
  c || f(e);
122
187
  },
123
188
  clear: () => {
124
- c || f(""), S([]);
189
+ c || f(""), z([]);
125
190
  },
126
191
  submit: () => {
127
- M();
192
+ V();
128
193
  },
129
194
  focus: () => {
130
195
  var e;
131
- (e = N.current) == null || e.focus();
196
+ (e = w.current) == null || e.focus();
132
197
  }
133
198
  }),
134
- [n, u, c, M]
199
+ [n, u, c, V]
135
200
  );
136
- const Ne = (e) => {
137
- if (O == null || O(e), !e.defaultPrevented && !ke(e)) {
138
- if (z && e.key === "Escape") {
201
+ Ae(We, we, C);
202
+ const Se = (e) => {
203
+ if (j == null || j(e), !e.defaultPrevented && !Ne(e)) {
204
+ if (v && e.key === "Escape") {
139
205
  e.preventDefault(), P(!1);
140
206
  return;
141
207
  }
142
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), M());
208
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), V());
143
209
  }
144
- }, we = (e) => {
145
- const t = N.current;
210
+ }, ze = (e) => {
211
+ const t = w.current;
146
212
  if (!t) return;
147
213
  const i = t.selectionStart ?? n.length, p = n.slice(0, i).lastIndexOf(`
148
214
  `) + 1;
149
215
  let l = i;
150
216
  for (; l < n.length && !/\s/.test(n[l]); )
151
217
  l += 1;
152
- const L = n.slice(l), T = n.slice(0, p) + `/${e.id} ` + L;
153
- c || f(T), P(!1), V(""), queueMicrotask(() => t.focus());
154
- }, Se = (e) => {
155
- if (_ == null || _(e), e.defaultPrevented) return;
218
+ const R = n.slice(l), K = n.slice(0, p) + `/${e.id} ` + R;
219
+ c || f(K), P(!1), M(""), queueMicrotask(() => t.focus());
220
+ }, Pe = (e) => {
221
+ if (A == null || A(e), e.defaultPrevented) return;
156
222
  const { clipboardData: t } = e;
157
223
  if (!t) return;
158
224
  const i = [];
@@ -163,54 +229,58 @@ const Le = Oe(
163
229
  l && i.push(l);
164
230
  }
165
231
  }
166
- i.length > 0 && (e.preventDefault(), G(i));
167
- }, G = v(
232
+ i.length > 0 && (e.preventDefault(), J(i));
233
+ }, J = g(
168
234
  (e) => {
169
235
  var i;
170
236
  const t = [];
171
237
  for (const r of e) {
172
- if (typeof b == "number" && r.size > b) {
173
- k == null || k(
238
+ if (typeof x == "number" && r.size > x) {
239
+ N == null || N(
174
240
  o("ui.chat.attachment.rejected", { reason: "size" })
175
241
  );
176
242
  continue;
177
243
  }
178
- t.push({ id: ((i = crypto.randomUUID) == null ? void 0 : i.call(crypto)) ?? `att-${Math.random()}`, file: r });
244
+ t.push({
245
+ id: ((i = crypto.randomUUID) == null ? void 0 : i.call(crypto)) ?? `att-${Math.random()}`,
246
+ file: r
247
+ });
179
248
  }
180
- t.length > 0 && (S((r) => [...r, ...t]), I == null || I(t.map((r) => r.file)));
249
+ t.length > 0 && (z((r) => [...r, ...t]), k == null || k(t.map((r) => r.file)));
181
250
  },
182
- [b, I, k, o]
183
- ), { getRootProps: ze, getInputProps: Pe, isDragActive: Ve } = je({
184
- onDrop: G,
185
- maxSize: b,
186
- accept: ie,
251
+ [x, k, N, o]
252
+ ), { getRootProps: Me, getInputProps: Ve, isDragActive: He } = Ce({
253
+ onDrop: J,
254
+ maxSize: x,
255
+ accept: ne,
187
256
  noClick: !0,
188
257
  noKeyboard: !0
189
- }), Me = (e) => {
190
- S((t) => t.filter((i) => i.id !== e));
191
- }, K = R ?? pe, J = `${K}-label`, ee = `${K}-slash-list`, Ke = (d == null ? void 0 : d.map((e) => ({ value: e.id, label: e.label }))) ?? [];
258
+ }), Ke = (e) => {
259
+ z((t) => t.filter((i) => i.id !== e));
260
+ }, H = C ?? ue, ee = `${H}-label`, te = `${H}-slash-list`, Te = (d == null ? void 0 : d.map((e) => ({ value: e.id, label: e.label }))) ?? [];
192
261
  return /* @__PURE__ */ m(
193
262
  "div",
194
263
  {
195
- ...ze({
264
+ ref: G,
265
+ ...Me({
196
266
  className: [
197
- Le({ size: ne, className: oe }),
198
- Ve ? "ds:outline ds:outline-dashed ds:outline-[color:var(--primary)] ds:outline-offset-2 ds:bg-[color:var(--primary)]/5" : ""
267
+ Ze({ size: oe, className: de }),
268
+ He ? "ds:outline ds:outline-dashed ds:outline-[color:var(--primary)] ds:outline-offset-2 ds:bg-[color:var(--primary)]/5" : ""
199
269
  ].join(" ")
200
270
  }),
201
271
  "aria-label": o("ui.chat.attachmentZone"),
202
272
  "data-component": "ai-prompt-input",
203
- "data-component-id": R,
273
+ "data-component-id": C,
204
274
  children: [
205
- /* @__PURE__ */ a("input", { ...Pe() }),
206
- H ? /* @__PURE__ */ a("div", { className: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)]", children: /* @__PURE__ */ a(
275
+ /* @__PURE__ */ a("input", { "aria-label": o("ui.chat.attachmentZone"), ...Ve() }),
276
+ B ? /* @__PURE__ */ a("div", { className: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)]", children: /* @__PURE__ */ a(
207
277
  "button",
208
278
  {
209
279
  type: "button",
210
- "aria-label": o("ui.chat.contextActive", { name: H }),
211
- onClick: x,
280
+ "aria-label": o("ui.chat.contextActive", { name: B }),
281
+ onClick: y,
212
282
  onKeyDown: (e) => {
213
- (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), x == null || x());
283
+ (e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), y == null || y());
214
284
  },
215
285
  className: [
216
286
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
@@ -222,29 +292,30 @@ const Le = Oe(
222
292
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)]",
223
293
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
224
294
  ].join(" "),
225
- children: o("ui.chat.contextActive", { name: H })
295
+ children: o("ui.chat.contextActive", { name: B })
226
296
  }
227
297
  ) }) : null,
228
- /* @__PURE__ */ a("label", { id: J, htmlFor: K, className: "ds:sr-only", children: o("ui.chat.prompt") }),
298
+ /* @__PURE__ */ a("label", { id: ee, htmlFor: H, className: "ds:sr-only", children: o("ui.chat.prompt") }),
229
299
  /* @__PURE__ */ m("div", { className: "ds:relative", children: [
230
300
  /* @__PURE__ */ a(
231
301
  "textarea",
232
302
  {
233
- ref: me,
234
- id: K,
235
- rows: B,
303
+ ref: fe,
304
+ id: H,
305
+ rows: $,
236
306
  value: c ? n : void 0,
237
- defaultValue: c ? void 0 : Z,
307
+ defaultValue: c ? void 0 : Q,
238
308
  disabled: q,
239
- placeholder: de ?? o("ui.chat.input.placeholder"),
240
- "aria-labelledby": J,
241
- "aria-controls": z ? ee : void 0,
242
- "aria-expanded": z,
243
- onChange: xe,
244
- onKeyDown: Ne,
245
- onPaste: Se,
246
- onCompositionStart: ye,
247
- onCompositionEnd: Ie,
309
+ placeholder: le ?? o("ui.chat.input.placeholder"),
310
+ "aria-labelledby": ee,
311
+ role: v ? "combobox" : void 0,
312
+ "aria-controls": v ? te : void 0,
313
+ "aria-expanded": v ? !0 : void 0,
314
+ onChange: ye,
315
+ onKeyDown: Se,
316
+ onPaste: Pe,
317
+ onCompositionStart: Ie,
318
+ onCompositionEnd: ke,
248
319
  className: [
249
320
  "ds:w-full ds:resize-none ds:bg-transparent ds:outline-none",
250
321
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]",
@@ -252,13 +323,13 @@ const Le = Oe(
252
323
  "ds:leading-[var(--line-height-base)]",
253
324
  "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed"
254
325
  ].join(" "),
255
- ...le
326
+ ...ce
256
327
  }
257
328
  ),
258
- z ? /* @__PURE__ */ a(
329
+ v ? /* @__PURE__ */ a(
259
330
  "div",
260
331
  {
261
- ref: ue,
332
+ ref: me,
262
333
  className: [
263
334
  "ds:absolute ds:start-[var(--spacing-md)] ds:top-full ds:z-50",
264
335
  "ds:mt-[var(--spacing-xs)]",
@@ -271,23 +342,23 @@ const Le = Oe(
271
342
  "ds:origin-top ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:zoom-in-95",
272
343
  "ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
273
344
  ].join(" "),
274
- id: ee,
275
- children: /* @__PURE__ */ m(h, { label: o("ui.chat.slashMenu.label"), loop: !0, children: [
345
+ id: te,
346
+ children: /* @__PURE__ */ m(b, { label: o("ui.chat.slashMenu.label"), loop: !0, children: [
276
347
  /* @__PURE__ */ a(
277
- h.Input,
348
+ b.Input,
278
349
  {
279
- value: ve,
280
- onValueChange: V,
350
+ value: ge,
351
+ onValueChange: M,
281
352
  className: "ds:sr-only"
282
353
  }
283
354
  ),
284
- /* @__PURE__ */ m(h.List, { className: "ds:max-h-60 ds:overflow-y-auto ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
285
- /* @__PURE__ */ a(h.Empty, { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: o("ui.chat.slashMenu.empty") }),
355
+ /* @__PURE__ */ m(b.List, { className: "ds:max-h-60 ds:overflow-y-auto ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
356
+ /* @__PURE__ */ a(b.Empty, { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: o("ui.chat.slashMenu.empty") }),
286
357
  s.map((e) => /* @__PURE__ */ m(
287
- h.Item,
358
+ b.Item,
288
359
  {
289
360
  value: e.id,
290
- onSelect: () => we(e),
361
+ onSelect: () => ze(e),
291
362
  className: [
292
363
  "ds:flex ds:flex-col ds:gap-[2px]",
293
364
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -318,10 +389,10 @@ const Le = Oe(
318
389
  "aria-label": o("ui.chat.attachmentZone"),
319
390
  className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
320
391
  children: u.map((e) => /* @__PURE__ */ a(
321
- Ae,
392
+ Xe,
322
393
  {
323
394
  file: e.file,
324
- onRemove: () => Me(e.id)
395
+ onRemove: () => Ke(e.id)
325
396
  },
326
397
  e.id
327
398
  ))
@@ -329,27 +400,27 @@ const Le = Oe(
329
400
  ) : null,
330
401
  /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
331
402
  d && d.length > 0 ? /* @__PURE__ */ a("div", { className: "ds:me-auto ds:min-w-[140px]", children: /* @__PURE__ */ a(
332
- De,
403
+ Le,
333
404
  {
334
405
  "aria-label": o("ui.chat.model.select"),
335
- options: Ke,
336
- value: C || "",
406
+ options: Te,
407
+ value: L || "",
337
408
  onValueChange: (e) => {
338
- X || he(e), F == null || F(e);
409
+ X || be(e), F == null || F(e);
339
410
  },
340
411
  size: "sm"
341
412
  }
342
413
  ) }) : /* @__PURE__ */ a("div", { className: "ds:me-auto" }),
343
414
  /* @__PURE__ */ a("span", { className: "ds:sr-only", children: o("ui.chat.input.sendHint") }),
344
415
  /* @__PURE__ */ a(
345
- re,
416
+ ie,
346
417
  {
347
- icon: /* @__PURE__ */ a(_e, {}),
418
+ icon: /* @__PURE__ */ a(Re, {}),
348
419
  "aria-label": o("ui.chat.send"),
349
420
  intent: "primary",
350
421
  size: "sm",
351
422
  disabled: q || !n.trim() && u.length === 0,
352
- onClick: M,
423
+ onClick: V,
353
424
  "aria-keyshortcuts": "Meta+Enter Control+Enter"
354
425
  }
355
426
  )
@@ -359,15 +430,15 @@ const Le = Oe(
359
430
  );
360
431
  }
361
432
  );
362
- Ue.displayName = "AIPromptInput";
363
- function We(s) {
433
+ Qe.displayName = "AIPromptInput";
434
+ function qe(s) {
364
435
  return s < 1024 ? `${s} B` : s < 1024 * 1024 ? `${(s / 1024).toFixed(1)} KB` : `${(s / (1024 * 1024)).toFixed(1)} MB`;
365
436
  }
366
- function Ae({
437
+ function Xe({
367
438
  file: s,
368
439
  onRemove: d
369
440
  }) {
370
- const { t: E } = ae();
441
+ const { t: E } = re();
371
442
  return /* @__PURE__ */ m(
372
443
  "span",
373
444
  {
@@ -383,11 +454,11 @@ function Ae({
383
454
  ].join(" "),
384
455
  children: [
385
456
  /* @__PURE__ */ a("span", { className: "ds:truncate ds:max-w-[16ch]", children: s.name }),
386
- /* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)] ds:tabular-nums", children: We(s.size) }),
457
+ /* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)] ds:tabular-nums", children: qe(s.size) }),
387
458
  /* @__PURE__ */ a(
388
- re,
459
+ ie,
389
460
  {
390
- icon: /* @__PURE__ */ a(Ce, {}),
461
+ icon: /* @__PURE__ */ a(Ue, {}),
391
462
  "aria-label": E("ui.chat.attachment.remove", { name: s.name }),
392
463
  intent: "ghost",
393
464
  size: "sm",
@@ -398,79 +469,8 @@ function Ae({
398
469
  }
399
470
  );
400
471
  }
401
- const st = {
402
- id: "ai-prompt-input",
403
- capabilities: ["edit_inline", "submit"],
404
- state: {
405
- value: {
406
- type: "string",
407
- descriptionKey: "ui.agent.aiPromptInput.state.value",
408
- description: "Current text in the composer (no PHI processing).",
409
- read: (s) => s.getValue()
410
- },
411
- isEmpty: {
412
- type: "boolean",
413
- descriptionKey: "ui.agent.aiPromptInput.state.isEmpty",
414
- description: "True when the composer has no text and no attachments.",
415
- read: (s) => s.isEmpty()
416
- },
417
- isSubmitting: {
418
- type: "boolean",
419
- descriptionKey: "ui.agent.aiPromptInput.state.isSubmitting",
420
- description: "True while an onSubmit invocation is in flight (best-effort).",
421
- read: (s) => s.isSubmitting()
422
- }
423
- },
424
- actions: {
425
- set_value: {
426
- safety: "write",
427
- argsType: "{ value: string }",
428
- descriptionKey: "ui.agent.aiPromptInput.actions.setValue",
429
- description: "Replace the composer text with the given value.",
430
- invoke: (s, d) => {
431
- s.setValue(d.value);
432
- }
433
- },
434
- clear: {
435
- safety: "destructive",
436
- descriptionKey: "ui.agent.aiPromptInput.actions.clear",
437
- description: "Clear text and attachments. Irreversible from the same UI.",
438
- invoke: (s) => {
439
- s.clear();
440
- }
441
- },
442
- submit: {
443
- safety: "write",
444
- descriptionKey: "ui.agent.aiPromptInput.actions.submit",
445
- description: "Submit the current composer state via onSubmit.",
446
- invoke: (s) => {
447
- s.submit();
448
- }
449
- },
450
- focus: {
451
- safety: "read",
452
- descriptionKey: "ui.agent.aiPromptInput.actions.focus",
453
- description: "Move keyboard focus into the textarea.",
454
- invoke: (s) => {
455
- s.focus();
456
- }
457
- }
458
- },
459
- domHooks: {
460
- root: {
461
- attr: "data-component",
462
- value: "ai-prompt-input",
463
- description: "Marks the AIPromptInput wrapper."
464
- },
465
- instanceId: {
466
- attr: "data-component-id",
467
- sourceProp: "id",
468
- description: "Sourced from the id prop; addresses a specific composer instance."
469
- }
470
- }
471
- };
472
472
  export {
473
- Ue as A,
474
- st as a
473
+ Qe as A,
474
+ We as a
475
475
  };
476
- //# sourceMappingURL=ai-prompt-input.agent-0NHYLTWD.js.map
476
+ //# sourceMappingURL=ai-prompt-input-BBiDlEIS.js.map