@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,18 +1,93 @@
1
- import { jsx as r, jsxs as B, Fragment as Z } from "react/jsx-runtime";
2
- import { forwardRef as ee, useState as _, useEffect as $, useRef as T, useMemo as O, useImperativeHandle as F, useId as se, useCallback as R } from "react";
3
- import { c as j } from "./index-D2ZczOXr.js";
4
- import { useTranslation as G } from "react-i18next";
1
+ import { jsx as a, jsxs as B, Fragment as ae } from "react/jsx-runtime";
2
+ import { forwardRef as te, useState as _, useEffect as F, useRef as j, useMemo as E, useImperativeHandle as G, useId as ne, useCallback as P } from "react";
3
+ import { c as A } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as U } from "react-i18next";
5
5
  import * as q from "@radix-ui/react-popover";
6
- import { S as ae } from "./search-input-Xw3cdWXW.js";
7
- import { n as H } from "./normalize-diacritics-BNGbFNlJ.js";
8
- import { S as re } from "./search-BonnQsHv.js";
9
- import { u as te } from "./use-debounced-callback-BisrB-Fq.js";
10
- function ne() {
6
+ import { S as oe } from "./search-input-CdJIEjFo.js";
7
+ import { u as W } from "./registry-C9nwlNyL.js";
8
+ import { n as O } from "./normalize-diacritics-BNGbFNlJ.js";
9
+ import { S as ie } from "./search-BonnQsHv.js";
10
+ import { u as de } from "./use-debounced-callback-BisrB-Fq.js";
11
+ const J = {
12
+ id: "search-bar",
13
+ capabilities: ["filter", "edit_inline", "submit"],
14
+ state: {
15
+ query: {
16
+ type: "string",
17
+ descriptionKey: "ui.agent.searchBar.state.query",
18
+ description: "Current raw query string (inline mode). Empty in launcher mode.",
19
+ read: (s) => s.getQuery()
20
+ },
21
+ isEmpty: {
22
+ type: "boolean",
23
+ descriptionKey: "ui.agent.searchBar.state.isEmpty",
24
+ description: "True when the query is empty.",
25
+ read: (s) => s.getQuery().length === 0
26
+ }
27
+ },
28
+ actions: {
29
+ set_query: {
30
+ safety: "read",
31
+ argsType: "{ query: string }",
32
+ descriptionKey: "ui.agent.searchBar.actions.setQuery",
33
+ description: "Replace the current query (inline mode only). No-op in launcher mode.",
34
+ invoke: (s, r) => {
35
+ s.setQuery(r.query);
36
+ }
37
+ },
38
+ clear: {
39
+ safety: "read",
40
+ descriptionKey: "ui.agent.searchBar.actions.clear",
41
+ description: "Clear the query and close the result popover.",
42
+ invoke: (s) => {
43
+ s.clear();
44
+ }
45
+ },
46
+ submit: {
47
+ safety: "read",
48
+ descriptionKey: "ui.agent.searchBar.actions.submit",
49
+ description: "In launcher mode opens the CommandPalette; in inline mode commits the highlighted option.",
50
+ invoke: (s) => {
51
+ s.submit();
52
+ }
53
+ },
54
+ focus: {
55
+ safety: "read",
56
+ descriptionKey: "ui.agent.searchBar.actions.focus",
57
+ description: "Move keyboard focus to the SearchBar.",
58
+ invoke: (s) => {
59
+ s.focus();
60
+ }
61
+ },
62
+ apply_saved_search: {
63
+ safety: "read",
64
+ argsType: "{ id: string }",
65
+ descriptionKey: "ui.agent.searchBar.actions.applySavedSearch",
66
+ description: "Apply a saved-search by id. The host wires the actual query lookup; the adapter routes the id to its onApplySavedSearch handler. No-op when no handler is wired.",
67
+ invoke: (s, r) => {
68
+ s.applySavedSearch(r.id);
69
+ }
70
+ }
71
+ },
72
+ domHooks: {
73
+ root: {
74
+ attr: "data-component",
75
+ value: "search-bar",
76
+ description: "Marks the SearchBar root."
77
+ },
78
+ instanceId: {
79
+ attr: "data-component-id",
80
+ sourceProp: "id",
81
+ description: "Sourced from the id prop."
82
+ }
83
+ }
84
+ };
85
+ function ce() {
11
86
  if (typeof navigator > "u") return !1;
12
- const s = navigator.userAgentData, a = (s == null ? void 0 : s.platform) ?? navigator.platform ?? "";
13
- return /mac/i.test(a);
87
+ const s = navigator.userAgentData, r = (s == null ? void 0 : s.platform) ?? navigator.platform ?? "";
88
+ return /mac/i.test(r);
14
89
  }
15
- const oe = j(
90
+ const le = A(
16
91
  [
17
92
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
18
93
  "ds:rounded-[var(--radius-md)]",
@@ -52,11 +127,8 @@ const oe = j(
52
127
  density: "default"
53
128
  }
54
129
  }
55
- ), ie = j(
56
- [
57
- "ds:inline-flex ds:flex-col",
58
- "ds:w-full"
59
- ].join(" "),
130
+ ), ue = A(
131
+ ["ds:inline-flex ds:flex-col", "ds:w-full"].join(" "),
60
132
  {
61
133
  variants: {
62
134
  size: {
@@ -74,7 +146,7 @@ const oe = j(
74
146
  density: "default"
75
147
  }
76
148
  }
77
- ), U = j(
149
+ ), X = A(
78
150
  [
79
151
  "ds:hidden ds:md:inline-flex ds:items-center ds:gap-[calc(var(--spacing-xs)/2)]",
80
152
  "ds:ms-auto",
@@ -88,7 +160,7 @@ const oe = j(
88
160
  "ds:text-[length:var(--font-size-xs)] ds:text-[color:var(--foreground)]",
89
161
  "ds:font-[family-name:var(--font-mono)]"
90
162
  ].join(" ")
91
- ), de = j(
163
+ ), pe = A(
92
164
  [
93
165
  "ds:z-[var(--z-dropdown)]",
94
166
  "ds:rounded-[var(--radius-md)]",
@@ -103,97 +175,97 @@ const oe = j(
103
175
  "ds:motion-reduce:animate-none"
104
176
  ].join(" ")
105
177
  );
106
- function Se(s, a) {
107
- const o = H(s.trim());
108
- return o === "" ? a : a.map((i) => ({
178
+ function Ie(s, r) {
179
+ const o = O(s.trim());
180
+ return o === "" ? r : r.map((i) => ({
109
181
  ...i,
110
182
  items: i.items.filter(
111
- (m) => H(m.label).includes(o)
183
+ (f) => O(f.label).includes(o)
112
184
  )
113
185
  })).filter((i) => i.items.length > 0);
114
186
  }
115
- const ce = ee(
116
- (s, a) => {
187
+ const he = te(
188
+ (s, r) => {
117
189
  const {
118
190
  mode: o = "launcher",
119
191
  size: i = "md",
120
- density: m = "default",
121
- topLevel: u = !1,
192
+ density: f = "default",
193
+ topLevel: l = !1,
122
194
  placeholder: t,
123
195
  shortcutHint: g = !0,
124
196
  className: y,
125
197
  onOpenCommandPalette: n,
126
- id: h,
198
+ id: u,
127
199
  onApplySavedSearch: p,
128
- value: S,
129
- defaultValue: w,
200
+ value: w,
201
+ defaultValue: N,
130
202
  onQueryChange: d,
131
203
  results: c,
132
- onSelect: l,
133
- debounceMs: D,
134
- ...N
135
- } = s, { t: v } = G(), [V, K] = _(!1);
136
- $(() => {
137
- K(ne());
204
+ onSelect: m,
205
+ debounceMs: b,
206
+ ...C
207
+ } = s, { t: v } = U(), [V, K] = _(!1);
208
+ F(() => {
209
+ K(ce());
138
210
  }, []);
139
- const C = V ? "⌘K" : "Ctrl+K", b = "Meta+K Control+K", x = u ? { role: "search" } : { role: void 0 };
211
+ const z = V ? "⌘K" : "Ctrl+K", x = "Meta+K Control+K", k = l ? { role: "search" } : { role: void 0 };
140
212
  if (o === "launcher") {
141
- const z = t ?? v("search.placeholder", "Search…");
142
- return /* @__PURE__ */ r(
143
- le,
213
+ const I = t ?? v("search.placeholder", "Search…");
214
+ return /* @__PURE__ */ a(
215
+ fe,
144
216
  {
145
- forwardedRef: a,
146
- id: h,
147
- landmarkProps: x,
217
+ forwardedRef: r,
218
+ id: u,
219
+ landmarkProps: k,
148
220
  className: y,
149
221
  onOpenCommandPalette: n,
150
222
  onApplySavedSearch: p,
151
- resolvedPlaceholder: z,
223
+ resolvedPlaceholder: I,
152
224
  openLabel: v("search.open", "Open search"),
153
- ariaKeyshortcuts: b,
154
- launcherClass: oe({ size: i, density: m }),
225
+ ariaKeyshortcuts: x,
226
+ launcherClass: le({ size: i, density: f }),
155
227
  shortcutHint: g,
156
- shortcutLabel: C,
157
- rest: N
228
+ shortcutLabel: z,
229
+ rest: C
158
230
  }
159
231
  );
160
232
  }
161
- return /* @__PURE__ */ r(
162
- ue,
233
+ return /* @__PURE__ */ a(
234
+ me,
163
235
  {
164
- forwardedRef: a,
236
+ forwardedRef: r,
165
237
  size: i,
166
- density: m,
167
- landmarkProps: x,
238
+ density: f,
239
+ landmarkProps: k,
168
240
  placeholder: t,
169
241
  shortcutHint: g,
170
- shortcutLabel: C,
171
- ariaKeyshortcuts: b,
242
+ shortcutLabel: z,
243
+ ariaKeyshortcuts: x,
172
244
  className: y,
173
- id: h,
245
+ id: u,
174
246
  onApplySavedSearch: p,
175
247
  ...s
176
248
  }
177
249
  );
178
250
  }
179
251
  );
180
- ce.displayName = "SearchBar";
181
- function le(s) {
252
+ he.displayName = "SearchBar";
253
+ function fe(s) {
182
254
  const {
183
- forwardedRef: a,
255
+ forwardedRef: r,
184
256
  id: o,
185
257
  landmarkProps: i,
186
- className: m,
187
- onOpenCommandPalette: u,
258
+ className: f,
259
+ onOpenCommandPalette: l,
188
260
  onApplySavedSearch: t,
189
261
  resolvedPlaceholder: g,
190
262
  openLabel: y,
191
263
  ariaKeyshortcuts: n,
192
- launcherClass: h,
264
+ launcherClass: u,
193
265
  shortcutHint: p,
194
- shortcutLabel: S,
195
- rest: w
196
- } = s, d = T(null), c = O(
266
+ shortcutLabel: w,
267
+ rest: N
268
+ } = s, d = j(null), c = j(null), m = E(
197
269
  () => ({
198
270
  getQuery: () => "",
199
271
  // Launcher mode is stateless \u2014 it delegates to CommandPalette.
@@ -201,165 +273,186 @@ function le(s) {
201
273
  },
202
274
  clear: () => {
203
275
  },
204
- submit: () => u == null ? void 0 : u(),
276
+ submit: () => l == null ? void 0 : l(),
205
277
  focus: () => {
206
- var l;
207
- return (l = d.current) == null ? void 0 : l.focus();
278
+ var b;
279
+ return (b = d.current) == null ? void 0 : b.focus();
208
280
  },
209
- applySavedSearch: (l) => t == null ? void 0 : t(l)
281
+ applySavedSearch: (b) => t == null ? void 0 : t(b)
210
282
  }),
211
- [u, t]
283
+ [l, t]
212
284
  );
213
- return F(a, () => c, [c]), /* @__PURE__ */ r("div", { ...i, "data-component": "search-bar", "data-component-id": o, id: o, className: m, children: /* @__PURE__ */ B(
214
- "button",
285
+ return G(
286
+ r,
287
+ () => c.current,
288
+ []
289
+ ), W(J, m, o), /* @__PURE__ */ a(
290
+ "div",
215
291
  {
216
- ref: d,
217
- type: "button",
218
- onClick: u,
219
- "aria-haspopup": "dialog",
220
- "aria-label": y,
221
- "aria-keyshortcuts": n,
222
- className: h,
223
- ...w,
224
- children: [
225
- /* @__PURE__ */ r(
226
- re,
227
- {
228
- "aria-hidden": !0,
229
- className: "ds:size-4 ds:shrink-0",
230
- focusable: "false"
231
- }
232
- ),
233
- /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "ds:truncate ds:text-start", children: g }),
234
- p ? /* @__PURE__ */ r("kbd", { className: U(), children: S }) : null
235
- ]
292
+ ref: c,
293
+ ...i,
294
+ "data-component": "search-bar",
295
+ "data-component-id": o,
296
+ id: o,
297
+ className: f,
298
+ children: /* @__PURE__ */ B(
299
+ "button",
300
+ {
301
+ ref: d,
302
+ type: "button",
303
+ onClick: l,
304
+ "aria-haspopup": "dialog",
305
+ "aria-label": y,
306
+ "aria-keyshortcuts": n,
307
+ className: u,
308
+ ...N,
309
+ children: [
310
+ /* @__PURE__ */ a(
311
+ ie,
312
+ {
313
+ "aria-hidden": !0,
314
+ className: "ds:size-4 ds:shrink-0",
315
+ focusable: "false"
316
+ }
317
+ ),
318
+ /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "ds:truncate ds:text-start", children: g }),
319
+ p ? /* @__PURE__ */ a("kbd", { className: X(), children: w }) : null
320
+ ]
321
+ }
322
+ )
236
323
  }
237
- ) });
324
+ );
238
325
  }
239
- function ue(s) {
326
+ function me(s) {
240
327
  const {
241
- forwardedRef: a,
328
+ forwardedRef: r,
242
329
  size: o,
243
330
  density: i,
244
- landmarkProps: m,
245
- placeholder: u,
331
+ landmarkProps: f,
332
+ placeholder: l,
246
333
  shortcutHint: t,
247
334
  shortcutLabel: g,
248
335
  ariaKeyshortcuts: y,
249
336
  className: n,
250
- id: h,
337
+ id: u,
251
338
  onApplySavedSearch: p,
252
- value: S,
253
- defaultValue: w,
339
+ value: w,
340
+ defaultValue: N,
254
341
  onQueryChange: d,
255
342
  results: c,
256
- onSelect: l,
257
- debounceMs: D = 150
258
- } = s, { t: N } = G(), v = S !== void 0, [V, K] = _(w ?? ""), C = v ? S ?? "" : V, [b, x] = _(!1), [k, z] = _(0), Q = T(null), P = se(), E = te((e) => {
343
+ onSelect: m,
344
+ debounceMs: b = 150
345
+ } = s, { t: C } = U(), v = w !== void 0, [V, K] = _(N ?? ""), z = v ? w ?? "" : V, [x, k] = _(!1), [S, I] = _(0), H = j(null), D = ne(), $ = de((e) => {
259
346
  d == null || d(e);
260
- }, D), f = O(() => c ? c.flatMap((e) => e.items) : [], [c]);
261
- $(() => {
262
- k > f.length - 1 && z(0);
263
- }, [f.length, k]);
264
- const W = R(
347
+ }, b), h = E(() => c ? c.flatMap((e) => e.items) : [], [c]);
348
+ F(() => {
349
+ S > h.length - 1 && I(0);
350
+ }, [h.length, S]);
351
+ const Y = P(
265
352
  (e) => {
266
- v || K(e), E(e), x(e.trim().length > 0);
353
+ v || K(e), $(e), k(e.trim().length > 0);
267
354
  },
268
- [E, v]
269
- ), M = R(
355
+ [$, v]
356
+ ), M = P(
270
357
  (e) => {
271
- l == null || l(e), x(!1), v || K("");
358
+ m == null || m(e), k(!1), v || K("");
272
359
  },
273
- [l, v]
274
- ), J = R(
360
+ [m, v]
361
+ ), Z = P(
275
362
  (e) => {
276
363
  if (!(e.nativeEvent.isComposing || e.keyCode === 229)) {
277
- if (!b && e.key === "ArrowDown" && f.length > 0) {
278
- e.preventDefault(), x(!0);
364
+ if (!x && e.key === "ArrowDown" && h.length > 0) {
365
+ e.preventDefault(), k(!0);
279
366
  return;
280
367
  }
281
- if (b)
368
+ if (x)
282
369
  if (e.key === "ArrowDown")
283
- e.preventDefault(), z((I) => (I + 1) % Math.max(f.length, 1));
370
+ e.preventDefault(), I((R) => (R + 1) % Math.max(h.length, 1));
284
371
  else if (e.key === "ArrowUp")
285
- e.preventDefault(), z(
286
- (I) => (I - 1 + Math.max(f.length, 1)) % Math.max(f.length, 1)
372
+ e.preventDefault(), I(
373
+ (R) => (R - 1 + Math.max(h.length, 1)) % Math.max(h.length, 1)
287
374
  );
288
375
  else if (e.key === "Enter") {
289
- const I = f[k];
290
- I && (e.preventDefault(), M(I));
291
- } else e.key === "Escape" && (e.preventDefault(), x(!1));
376
+ const R = h[S];
377
+ R && (e.preventDefault(), M(R));
378
+ } else e.key === "Escape" && (e.preventDefault(), k(!1));
292
379
  }
293
380
  },
294
- [b, f, k, M]
295
- ), X = u ?? N("search.placeholder", "Search…"), A = f.length > 0, Y = b && A ? `${P}-option-${k}` : void 0, L = R(
381
+ [x, h, S, M]
382
+ ), ee = l ?? C("search.placeholder", "Search…"), L = h.length > 0, se = x && L ? `${D}-option-${S}` : void 0, Q = P(
296
383
  (e) => {
297
- v || K(e), d == null || d(e), x(e.trim().length > 0);
384
+ v || K(e), d == null || d(e), k(e.trim().length > 0);
298
385
  },
299
386
  [v, d]
387
+ ), T = j(null);
388
+ G(
389
+ r,
390
+ () => T.current,
391
+ []
300
392
  );
301
- return F(
302
- a,
393
+ const re = E(
303
394
  () => ({
304
- getQuery: () => C,
305
- setQuery: L,
395
+ getQuery: () => z,
396
+ setQuery: Q,
306
397
  clear: () => {
307
- L("");
398
+ Q("");
308
399
  },
309
400
  submit: () => {
310
- const e = f[k];
401
+ const e = h[S];
311
402
  e && M(e);
312
403
  },
313
404
  focus: () => {
314
405
  var e;
315
- return (e = Q.current) == null ? void 0 : e.focus();
406
+ return (e = H.current) == null ? void 0 : e.focus();
316
407
  },
317
408
  applySavedSearch: (e) => p == null ? void 0 : p(e)
318
409
  }),
319
410
  [
320
- C,
321
- L,
322
- f,
323
- k,
411
+ z,
412
+ Q,
413
+ h,
414
+ S,
324
415
  M,
325
416
  p
326
417
  ]
327
- ), /* @__PURE__ */ r(q.Root, { open: b && A, onOpenChange: x, children: /* @__PURE__ */ B(
418
+ );
419
+ return W(J, re, u), /* @__PURE__ */ a(q.Root, { open: x && L, onOpenChange: k, children: /* @__PURE__ */ B(
328
420
  "div",
329
421
  {
330
- ...m,
331
- id: h,
422
+ ref: T,
423
+ ...f,
424
+ id: u,
332
425
  "data-component": "search-bar",
333
- "data-component-id": h,
334
- className: [ie({ size: o, density: i }), n].filter(Boolean).join(" "),
426
+ "data-component-id": u,
427
+ className: [ue({ size: o, density: i }), n].filter(Boolean).join(" "),
335
428
  children: [
336
- /* @__PURE__ */ r(q.Anchor, { asChild: !0, children: /* @__PURE__ */ B(
429
+ /* @__PURE__ */ a(q.Anchor, { asChild: !0, children: /* @__PURE__ */ B(
337
430
  "div",
338
431
  {
339
432
  className: "ds:relative ds:flex ds:items-center",
340
- onKeyDown: J,
433
+ onKeyDown: Z,
341
434
  children: [
342
- /* @__PURE__ */ r(
343
- ae,
435
+ /* @__PURE__ */ a(
436
+ oe,
344
437
  {
345
- ref: Q,
438
+ ref: H,
346
439
  size: o,
347
- value: C,
348
- onInput: W,
349
- placeholder: X,
350
- "aria-label": N("search.label", "Search"),
440
+ value: z,
441
+ onInput: Y,
442
+ placeholder: ee,
443
+ "aria-label": C("search.label", "Search"),
351
444
  "aria-keyshortcuts": y,
352
445
  role: "combobox",
353
- "aria-expanded": b && A,
354
- "aria-controls": P,
355
- "aria-activedescendant": Y
446
+ "aria-expanded": x && L,
447
+ "aria-controls": D,
448
+ "aria-activedescendant": se
356
449
  }
357
450
  ),
358
- t ? /* @__PURE__ */ r(
451
+ t ? /* @__PURE__ */ a(
359
452
  "kbd",
360
453
  {
361
454
  className: [
362
- U(),
455
+ X(),
363
456
  "ds:absolute ds:end-[var(--spacing-sm)] ds:top-1/2 ds:-translate-y-1/2",
364
457
  "ds:pointer-events-none"
365
458
  ].join(" "),
@@ -369,39 +462,43 @@ function ue(s) {
369
462
  ]
370
463
  }
371
464
  ) }),
372
- /* @__PURE__ */ r(q.Portal, { children: /* @__PURE__ */ r(
465
+ /* @__PURE__ */ a(q.Portal, { children: /* @__PURE__ */ a(
373
466
  q.Content,
374
467
  {
375
468
  side: "bottom",
376
469
  align: "start",
377
470
  sideOffset: 4,
378
- "aria-label": N("search.resultsLabel", "Search results"),
471
+ "aria-label": C("search.resultsLabel", "Search results"),
379
472
  onOpenAutoFocus: (e) => e.preventDefault(),
380
473
  className: [
381
- de(),
474
+ pe(),
382
475
  "ds:w-[var(--radix-popover-trigger-width)]"
383
476
  ].join(" "),
384
- children: /* @__PURE__ */ r(
477
+ children: /* @__PURE__ */ a(
385
478
  "div",
386
479
  {
387
- id: P,
480
+ id: D,
388
481
  role: "listbox",
389
- "aria-label": N("search.resultsLabel", "Search results"),
482
+ "aria-label": C("search.resultsLabel", "Search results"),
390
483
  className: "ds:flex ds:flex-col ds:gap-[calc(var(--spacing-xs)/2)]",
391
- children: c && c.length > 0 ? pe(
484
+ children: c && c.length > 0 ? ve(
392
485
  c,
393
- k,
394
- P,
486
+ S,
487
+ D,
395
488
  M,
396
- z
397
- ) : /* @__PURE__ */ r(
489
+ I
490
+ ) : /* @__PURE__ */ a(
398
491
  "div",
399
492
  {
400
493
  role: "presentation",
401
494
  className: "ds:p-[var(--spacing-sm)] type-body-sm ds:text-[color:var(--foreground)]",
402
- children: N("search.noResults", "No results for “{{query}}”", {
403
- query: C
404
- })
495
+ children: C(
496
+ "search.noResults",
497
+ "No results for “{{query}}”",
498
+ {
499
+ query: z
500
+ }
501
+ )
405
502
  }
406
503
  )
407
504
  }
@@ -412,8 +509,8 @@ function ue(s) {
412
509
  }
413
510
  ) });
414
511
  }
415
- function pe(s, a, o, i, m) {
416
- let u = 0;
512
+ function ve(s, r, o, i, f) {
513
+ let l = 0;
417
514
  return s.map((t, g) => {
418
515
  const y = t.heading ? `${o}-group-${g}-heading` : void 0;
419
516
  return /* @__PURE__ */ B(
@@ -422,7 +519,7 @@ function pe(s, a, o, i, m) {
422
519
  role: t.heading ? "group" : "presentation",
423
520
  "aria-labelledby": y,
424
521
  children: [
425
- t.heading ? /* @__PURE__ */ r(
522
+ t.heading ? /* @__PURE__ */ a(
426
523
  "div",
427
524
  {
428
525
  id: y,
@@ -432,9 +529,9 @@ function pe(s, a, o, i, m) {
432
529
  }
433
530
  ) : null,
434
531
  t.items.map((n) => {
435
- const h = u;
436
- u += 1;
437
- const p = h === a, S = `${o}-option-${h}`, w = he(n.href), d = [
532
+ const u = l;
533
+ l += 1;
534
+ const p = u === r, w = `${o}-option-${u}`, N = ge(n.href), d = [
438
535
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
439
536
  "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
440
537
  "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]",
@@ -443,8 +540,8 @@ function pe(s, a, o, i, m) {
443
540
  "ds:no-underline ds:text-[color:var(--foreground)]",
444
541
  "ds:min-h-[var(--min-target-size)]",
445
542
  p ? "ds:bg-[var(--muted)]/40" : ""
446
- ].join(" "), c = /* @__PURE__ */ B(Z, { children: [
447
- n.icon ? /* @__PURE__ */ r(
543
+ ].join(" "), c = /* @__PURE__ */ B(ae, { children: [
544
+ n.icon ? /* @__PURE__ */ a(
448
545
  "span",
449
546
  {
450
547
  "aria-hidden": "true",
@@ -452,21 +549,21 @@ function pe(s, a, o, i, m) {
452
549
  children: n.icon
453
550
  }
454
551
  ) : null,
455
- /* @__PURE__ */ r("span", { className: "ds:flex-1 ds:text-[length:var(--font-size-sm)]", children: n.label }),
456
- n.meta ? /* @__PURE__ */ r("span", { className: "ds:ms-auto type-meta ds:text-[color:var(--foreground)]", children: n.meta }) : null
457
- ] }), l = {
458
- id: S,
552
+ /* @__PURE__ */ a("span", { className: "ds:flex-1 ds:text-[length:var(--font-size-sm)]", children: n.label }),
553
+ n.meta ? /* @__PURE__ */ a("span", { className: "ds:ms-auto type-meta ds:text-[color:var(--foreground)]", children: n.meta }) : null
554
+ ] }), m = {
555
+ id: w,
459
556
  role: "option",
460
557
  "aria-selected": p,
461
558
  // onMouseDown rather than onClick so we trigger before the
462
559
  // input loses focus to the pointer-down on the popover.
463
- onMouseDown: (D) => {
464
- D.preventDefault(), i(n);
560
+ onMouseDown: (b) => {
561
+ b.preventDefault(), i(n);
465
562
  },
466
- onMouseEnter: () => m(h),
563
+ onMouseEnter: () => f(u),
467
564
  className: d
468
565
  };
469
- return w ? /* @__PURE__ */ r("a", { href: w, ...l, children: c }, n.id) : /* @__PURE__ */ r("div", { ...l, children: c }, n.id);
566
+ return N ? /* @__PURE__ */ a("a", { href: N, ...m, children: c }, n.id) : /* @__PURE__ */ a("div", { ...m, children: c }, n.id);
470
567
  })
471
568
  ]
472
569
  },
@@ -474,89 +571,15 @@ function pe(s, a, o, i, m) {
474
571
  );
475
572
  });
476
573
  }
477
- function he(s) {
574
+ function ge(s) {
478
575
  if (!s) return;
479
- const a = s.trim();
480
- if (a !== "" && (/^(https?:|mailto:|tel:)/i.test(a) || /^(\/|\.\/|\.\.\/)/.test(a)))
481
- return a;
576
+ const r = s.trim();
577
+ if (r !== "" && (/^(https?:|mailto:|tel:)/i.test(r) || /^(\/|\.\/|\.\.\/)/.test(r)))
578
+ return r;
482
579
  }
483
- const we = {
484
- id: "search-bar",
485
- capabilities: ["filter", "edit_inline", "submit"],
486
- state: {
487
- query: {
488
- type: "string",
489
- descriptionKey: "ui.agent.searchBar.state.query",
490
- description: "Current raw query string (inline mode). Empty in launcher mode.",
491
- read: (s) => s.getQuery()
492
- },
493
- isEmpty: {
494
- type: "boolean",
495
- descriptionKey: "ui.agent.searchBar.state.isEmpty",
496
- description: "True when the query is empty.",
497
- read: (s) => s.getQuery().length === 0
498
- }
499
- },
500
- actions: {
501
- set_query: {
502
- safety: "read",
503
- argsType: "{ query: string }",
504
- descriptionKey: "ui.agent.searchBar.actions.setQuery",
505
- description: "Replace the current query (inline mode only). No-op in launcher mode.",
506
- invoke: (s, a) => {
507
- s.setQuery(a.query);
508
- }
509
- },
510
- clear: {
511
- safety: "read",
512
- descriptionKey: "ui.agent.searchBar.actions.clear",
513
- description: "Clear the query and close the result popover.",
514
- invoke: (s) => {
515
- s.clear();
516
- }
517
- },
518
- submit: {
519
- safety: "read",
520
- descriptionKey: "ui.agent.searchBar.actions.submit",
521
- description: "In launcher mode opens the CommandPalette; in inline mode commits the highlighted option.",
522
- invoke: (s) => {
523
- s.submit();
524
- }
525
- },
526
- focus: {
527
- safety: "read",
528
- descriptionKey: "ui.agent.searchBar.actions.focus",
529
- description: "Move keyboard focus to the SearchBar.",
530
- invoke: (s) => {
531
- s.focus();
532
- }
533
- },
534
- apply_saved_search: {
535
- safety: "read",
536
- argsType: "{ id: string }",
537
- descriptionKey: "ui.agent.searchBar.actions.applySavedSearch",
538
- description: "Apply a saved-search by id. The host wires the actual query lookup; the adapter routes the id to its onApplySavedSearch handler. No-op when no handler is wired.",
539
- invoke: (s, a) => {
540
- s.applySavedSearch(a.id);
541
- }
542
- }
543
- },
544
- domHooks: {
545
- root: {
546
- attr: "data-component",
547
- value: "search-bar",
548
- description: "Marks the SearchBar root."
549
- },
550
- instanceId: {
551
- attr: "data-component-id",
552
- sourceProp: "id",
553
- description: "Sourced from the id prop."
554
- }
555
- }
556
- };
557
580
  export {
558
- ce as S,
559
- Se as f,
560
- we as s
581
+ he as S,
582
+ Ie as f,
583
+ J as s
561
584
  };
562
- //# sourceMappingURL=search-bar.agent-DxFAxctc.js.map
585
+ //# sourceMappingURL=search-bar-BTDfgYtg.js.map