@alfadocs/ui-kit-debug 1.56.0 → 1.57.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 (357) hide show
  1. package/dist/_chunks/{ai-credits-notice-BoNJtOuE.js → ai-credits-notice-ktklr8fy.js} +2 -2
  2. package/dist/_chunks/{ai-credits-notice-BoNJtOuE.js.map → ai-credits-notice-ktklr8fy.js.map} +1 -1
  3. package/dist/_chunks/ai-permission-notice-DyuEGwAt.js +206 -0
  4. package/dist/_chunks/ai-permission-notice-DyuEGwAt.js.map +1 -0
  5. package/dist/_chunks/alia-sidebar-BBKBJCv6.js +1284 -0
  6. package/dist/_chunks/alia-sidebar-BBKBJCv6.js.map +1 -0
  7. package/dist/_chunks/{anamnesis-summary-rows-CQ-XGr0T.js → anamnesis-summary-rows-CCQ62mMN.js} +4 -4
  8. package/dist/_chunks/{anamnesis-summary-rows-CQ-XGr0T.js.map → anamnesis-summary-rows-CCQ62mMN.js.map} +1 -1
  9. package/dist/_chunks/{appointment-peek-BIZaDeCi.js → appointment-peek-WvNbE4JG.js} +2 -2
  10. package/dist/_chunks/{appointment-peek-BIZaDeCi.js.map → appointment-peek-WvNbE4JG.js.map} +1 -1
  11. package/dist/_chunks/{appointment-timeline-DmqYEIT9.js → appointment-timeline-Z0494xO-.js} +2 -2
  12. package/dist/_chunks/{appointment-timeline-DmqYEIT9.js.map → appointment-timeline-Z0494xO-.js.map} +1 -1
  13. package/dist/_chunks/{balance-badge-cell-DmDcXw0c.js → balance-badge-cell-CII3SDmR.js} +3 -3
  14. package/dist/_chunks/{balance-badge-cell-DmDcXw0c.js.map → balance-badge-cell-CII3SDmR.js.map} +1 -1
  15. package/dist/_chunks/{booking-WyNGKPE2.js → booking-81WnKDsH.js} +3 -3
  16. package/dist/_chunks/{booking-WyNGKPE2.js.map → booking-81WnKDsH.js.map} +1 -1
  17. package/dist/_chunks/{calculator-dialog-pCPWta7h.js → calculator-dialog-CzQv03p0.js} +2 -2
  18. package/dist/_chunks/{calculator-dialog-pCPWta7h.js.map → calculator-dialog-CzQv03p0.js.map} +1 -1
  19. package/dist/_chunks/{calendar-workspace-Du2ryaI-.js → calendar-workspace-D5-k_9zE.js} +13 -13
  20. package/dist/_chunks/{calendar-workspace-Du2ryaI-.js.map → calendar-workspace-D5-k_9zE.js.map} +1 -1
  21. package/dist/_chunks/{care-plan-card-Ddjh5Doc.js → care-plan-card-DxrRLRdW.js} +2 -2
  22. package/dist/_chunks/{care-plan-card-Ddjh5Doc.js.map → care-plan-card-DxrRLRdW.js.map} +1 -1
  23. package/dist/_chunks/{care-plan-header-DUX_SVvF.js → care-plan-header-BMwZIgHJ.js} +2 -2
  24. package/dist/_chunks/{care-plan-header-DUX_SVvF.js.map → care-plan-header-BMwZIgHJ.js.map} +1 -1
  25. package/dist/_chunks/{chart-HsF1KHbx.js → chart-DQ5GxqgT.js} +347 -350
  26. package/dist/_chunks/chart-DQ5GxqgT.js.map +1 -0
  27. package/dist/_chunks/{clinical-note-card-14JIoUR0.js → clinical-note-card-hx939bvw.js} +2 -2
  28. package/dist/_chunks/{clinical-note-card-14JIoUR0.js.map → clinical-note-card-hx939bvw.js.map} +1 -1
  29. package/dist/_chunks/{color-picker-BRQ4Y9SO.js → color-picker-BsggJovx.js} +128 -123
  30. package/dist/_chunks/color-picker-BsggJovx.js.map +1 -0
  31. package/dist/_chunks/{contact-card-CmK05vNb.js → contact-card-fHBMwEsx.js} +2 -2
  32. package/dist/_chunks/{contact-card-CmK05vNb.js.map → contact-card-fHBMwEsx.js.map} +1 -1
  33. package/dist/_chunks/{contact-profile-card-Ci8lBQ6a.js → contact-profile-card-CMyBYgRR.js} +2 -2
  34. package/dist/_chunks/{contact-profile-card-Ci8lBQ6a.js.map → contact-profile-card-CMyBYgRR.js.map} +1 -1
  35. package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js → cycle-calculator-Cww9DzIa.js} +2 -2
  36. package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js.map → cycle-calculator-Cww9DzIa.js.map} +1 -1
  37. package/dist/_chunks/{data-table-D8fuhqO1.js → data-table-fAMTeAjM.js} +2 -2
  38. package/dist/_chunks/{data-table-D8fuhqO1.js.map → data-table-fAMTeAjM.js.map} +1 -1
  39. package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js → data-table-tabs-CHYAAeHy.js} +2 -2
  40. package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js.map → data-table-tabs-CHYAAeHy.js.map} +1 -1
  41. package/dist/_chunks/{date-picker-wRAcq2lt.js → date-picker-BSZuKo13.js} +69 -62
  42. package/dist/_chunks/date-picker-BSZuKo13.js.map +1 -0
  43. package/dist/_chunks/{date-range-picker-CtUOI38x.js → date-range-picker-CFk-5O3R.js} +176 -171
  44. package/dist/_chunks/date-range-picker-CFk-5O3R.js.map +1 -0
  45. package/dist/_chunks/{date-time-picker-CLeLKuv9.js → date-time-picker-CjxTkblD.js} +92 -85
  46. package/dist/_chunks/date-time-picker-CjxTkblD.js.map +1 -0
  47. package/dist/_chunks/{dialog-CUzbnKLw.js → dialog-Dn-iQ0Jp.js} +2 -2
  48. package/dist/_chunks/{dialog-CUzbnKLw.js.map → dialog-Dn-iQ0Jp.js.map} +1 -1
  49. package/dist/_chunks/{document-preview-uoTekVR7.js → document-preview-CHGGG0l_.js} +2 -2
  50. package/dist/_chunks/{document-preview-uoTekVR7.js.map → document-preview-CHGGG0l_.js.map} +1 -1
  51. package/dist/_chunks/{due-date-calculator-CSjklbyw.js → due-date-calculator-D_qFUiHp.js} +2 -2
  52. package/dist/_chunks/{due-date-calculator-CSjklbyw.js.map → due-date-calculator-D_qFUiHp.js.map} +1 -1
  53. package/dist/_chunks/{entity-summary-DcB0fIiv.js → entity-summary-CWcCSThK.js} +2 -2
  54. package/dist/_chunks/{entity-summary-DcB0fIiv.js.map → entity-summary-CWcCSThK.js.map} +1 -1
  55. package/dist/_chunks/{file-manager-Cc_uO8r2.js → file-manager-CFsL1KVt.js} +3 -3
  56. package/dist/_chunks/{file-manager-Cc_uO8r2.js.map → file-manager-CFsL1KVt.js.map} +1 -1
  57. package/dist/_chunks/{gestational-age-calculator-DqVeJke2.js → gestational-age-calculator-CZi43xKG.js} +2 -2
  58. package/dist/_chunks/{gestational-age-calculator-DqVeJke2.js.map → gestational-age-calculator-CZi43xKG.js.map} +1 -1
  59. package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js → hcg-doubling-Ccvh7OaU.js} +2 -2
  60. package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js.map → hcg-doubling-Ccvh7OaU.js.map} +1 -1
  61. package/dist/_chunks/{header-settings-ge_3gYEq.js → header-settings-BMcCx2LC.js} +2 -2
  62. package/dist/_chunks/{header-settings-ge_3gYEq.js.map → header-settings-BMcCx2LC.js.map} +1 -1
  63. package/dist/_chunks/{heatmap-Gf9r7Tn1.js → heatmap-BEeOThkW.js} +2 -2
  64. package/dist/_chunks/{heatmap-Gf9r7Tn1.js.map → heatmap-BEeOThkW.js.map} +1 -1
  65. package/dist/_chunks/{help-me-write-templates-fV-Apf72.js → help-me-write-templates-BUoYGo6f.js} +2 -2
  66. package/dist/_chunks/{help-me-write-templates-fV-Apf72.js.map → help-me-write-templates-BUoYGo6f.js.map} +1 -1
  67. package/dist/_chunks/{hover-card-BnTueNS2.js → hover-card-U_ZYoh1n.js} +201 -187
  68. package/dist/_chunks/hover-card-U_ZYoh1n.js.map +1 -0
  69. package/dist/_chunks/{icon-picker-DWrqmI1c.js → icon-picker-C86lQTIA.js} +2 -2
  70. package/dist/_chunks/{icon-picker-DWrqmI1c.js.map → icon-picker-C86lQTIA.js.map} +1 -1
  71. package/dist/_chunks/{info-tip-B0jmIt6M.js → info-tip-CJpNpzZe.js} +2 -2
  72. package/dist/_chunks/{info-tip-B0jmIt6M.js.map → info-tip-CJpNpzZe.js.map} +1 -1
  73. package/dist/_chunks/{kit-extensions-Byfxy6sy.js → kit-extensions-DYVxWcqv.js} +4 -4
  74. package/dist/_chunks/{kit-extensions-Byfxy6sy.js.map → kit-extensions-DYVxWcqv.js.map} +1 -1
  75. package/dist/_chunks/{link-cell-renderer-TeJNvymP.js → link-cell-renderer-CxW_oLa5.js} +2 -2
  76. package/dist/_chunks/{link-cell-renderer-TeJNvymP.js.map → link-cell-renderer-CxW_oLa5.js.map} +1 -1
  77. package/dist/_chunks/link-gRw3NtOt.js +137 -0
  78. package/dist/_chunks/link-gRw3NtOt.js.map +1 -0
  79. package/dist/_chunks/{locale-picker-DfNSdOpy.js → locale-picker-BGfrZyTw.js} +2 -2
  80. package/dist/_chunks/{locale-picker-DfNSdOpy.js.map → locale-picker-BGfrZyTw.js.map} +1 -1
  81. package/dist/_chunks/{marketplace-app-shell-Dcx-JEjg.js → marketplace-app-shell-BZcA9Z06.js} +143 -129
  82. package/dist/_chunks/marketplace-app-shell-BZcA9Z06.js.map +1 -0
  83. package/dist/_chunks/{message-tray-BB95DA82.js → message-tray-QKQutwxj.js} +76 -69
  84. package/dist/_chunks/message-tray-QKQutwxj.js.map +1 -0
  85. package/dist/_chunks/{nav-grid-BqCPH8sm.js → nav-grid-Byx8PxuB.js} +2 -2
  86. package/dist/_chunks/{nav-grid-BqCPH8sm.js.map → nav-grid-Byx8PxuB.js.map} +1 -1
  87. package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js +89 -0
  88. package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js.map +1 -0
  89. package/dist/_chunks/{note-attachment-I1NLoeRZ.js → note-attachment-Bt2cddsZ.js} +2 -2
  90. package/dist/_chunks/{note-attachment-I1NLoeRZ.js.map → note-attachment-Bt2cddsZ.js.map} +1 -1
  91. package/dist/_chunks/{note-timeline-CsY8YOE7.js → note-timeline-CX9nAgAR.js} +2 -2
  92. package/dist/_chunks/{note-timeline-CsY8YOE7.js.map → note-timeline-CX9nAgAR.js.map} +1 -1
  93. package/dist/_chunks/{notes-panel-DceRhthG.js → notes-panel-Cm4pttpl.js} +4 -4
  94. package/dist/_chunks/{notes-panel-DceRhthG.js.map → notes-panel-Cm4pttpl.js.map} +1 -1
  95. package/dist/_chunks/{notification-tray-__sJXnsz.js → notification-tray-C5VtbGjd.js} +83 -76
  96. package/dist/_chunks/notification-tray-C5VtbGjd.js.map +1 -0
  97. package/dist/_chunks/{patient-details-DsTtjpuX.js → patient-details-99kEdtc5.js} +2 -2
  98. package/dist/_chunks/{patient-details-DsTtjpuX.js.map → patient-details-99kEdtc5.js.map} +1 -1
  99. package/dist/_chunks/{patient-field-row-BvZ9luz-.js → patient-field-row-DkxY13T6.js} +5 -5
  100. package/dist/_chunks/{patient-field-row-BvZ9luz-.js.map → patient-field-row-DkxY13T6.js.map} +1 -1
  101. package/dist/_chunks/{patient-summary-card-9nQWTQf6.js → patient-summary-card-opdyfeW2.js} +4 -4
  102. package/dist/_chunks/{patient-summary-card-9nQWTQf6.js.map → patient-summary-card-opdyfeW2.js.map} +1 -1
  103. package/dist/_chunks/{payment-request-card-CwDpwXUC.js → payment-request-card-DAniJNLX.js} +2 -2
  104. package/dist/_chunks/{payment-request-card-CwDpwXUC.js.map → payment-request-card-DAniJNLX.js.map} +1 -1
  105. package/dist/_chunks/{pdf-viewer-C3minW5b.js → pdf-viewer-CNQxa4tv.js} +396 -391
  106. package/dist/_chunks/pdf-viewer-CNQxa4tv.js.map +1 -0
  107. package/dist/_chunks/{phone-input-DxkHMYmu.js → phone-input-O9camxkq.js} +156 -151
  108. package/dist/_chunks/phone-input-O9camxkq.js.map +1 -0
  109. package/dist/_chunks/popover-BG75rYjN.js +367 -0
  110. package/dist/_chunks/popover-BG75rYjN.js.map +1 -0
  111. package/dist/_chunks/{practice-results-Dhbo-fc_.js → practice-results-CfRkjzsI.js} +2 -2
  112. package/dist/_chunks/{practice-results-Dhbo-fc_.js.map → practice-results-CfRkjzsI.js.map} +1 -1
  113. package/dist/_chunks/{pregnancy-dating-Bfu0Cq4H.js → pregnancy-dating-BFzv9g1N.js} +2 -2
  114. package/dist/_chunks/{pregnancy-dating-Bfu0Cq4H.js.map → pregnancy-dating-BFzv9g1N.js.map} +1 -1
  115. package/dist/_chunks/{product-hub-panel-BSSiGGG4.js → product-hub-panel-DlVRK7Ue.js} +103 -96
  116. package/dist/_chunks/product-hub-panel-DlVRK7Ue.js.map +1 -0
  117. package/dist/_chunks/{public-footer-CxpG6J1M.js → public-footer-ZWTEG1Rq.js} +2 -2
  118. package/dist/_chunks/{public-footer-CxpG6J1M.js.map → public-footer-ZWTEG1Rq.js.map} +1 -1
  119. package/dist/_chunks/{public-header.agent-pr2hyiND.js → public-header.agent-BctevbuY.js} +2 -2
  120. package/dist/_chunks/{public-header.agent-pr2hyiND.js.map → public-header.agent-BctevbuY.js.map} +1 -1
  121. package/dist/_chunks/{radiograph-panel.agent-DkUokbEa.js → radiograph-panel.agent-DyqbTECc.js} +4 -4
  122. package/dist/_chunks/{radiograph-panel.agent-DkUokbEa.js.map → radiograph-panel.agent-DyqbTECc.js.map} +1 -1
  123. package/dist/_chunks/{registration-form-D7iNqMBF.js → registration-form-BlTzYywa.js} +2 -2
  124. package/dist/_chunks/{registration-form-D7iNqMBF.js.map → registration-form-BlTzYywa.js.map} +1 -1
  125. package/dist/_chunks/{rich-text-editor-CkFfmA3v.js → rich-text-editor-DTnNZ4Ff.js} +489 -484
  126. package/dist/_chunks/rich-text-editor-DTnNZ4Ff.js.map +1 -0
  127. package/dist/_chunks/{sheet-C7SwIxwB.js → sheet-8qsiMoUI.js} +2 -2
  128. package/dist/_chunks/{sheet-C7SwIxwB.js.map → sheet-8qsiMoUI.js.map} +1 -1
  129. package/dist/_chunks/{sign-document-B6HlyCGV.js → sign-document-D4iHS_Ug.js} +2 -2
  130. package/dist/_chunks/{sign-document-B6HlyCGV.js.map → sign-document-D4iHS_Ug.js.map} +1 -1
  131. package/dist/_chunks/{signature-request-DhbpB9N9.js → signature-request-DRuYAG5I.js} +2 -2
  132. package/dist/_chunks/{signature-request-DhbpB9N9.js.map → signature-request-DRuYAG5I.js.map} +1 -1
  133. package/dist/_chunks/{signed-out-frame-B2GTIeqA.js → signed-out-frame-AhMsNW1r.js} +2 -2
  134. package/dist/_chunks/{signed-out-frame-B2GTIeqA.js.map → signed-out-frame-AhMsNW1r.js.map} +1 -1
  135. package/dist/_chunks/{task-editor-ByyRu29Y.js → task-editor-NkcopDna.js} +3 -3
  136. package/dist/_chunks/{task-editor-ByyRu29Y.js.map → task-editor-NkcopDna.js.map} +1 -1
  137. package/dist/_chunks/{use-appointment-details-read-JsDM48tf.js → use-appointment-details-read-CfFQNOF_.js} +5 -5
  138. package/dist/_chunks/{use-appointment-details-read-JsDM48tf.js.map → use-appointment-details-read-CfFQNOF_.js.map} +1 -1
  139. package/dist/_chunks/{voice-control-panel-Bg1eklL0.js → voice-control-panel-BKbgb7FM.js} +2 -2
  140. package/dist/_chunks/{voice-control-panel-Bg1eklL0.js.map → voice-control-panel-BKbgb7FM.js.map} +1 -1
  141. package/dist/_chunks/{widget-picker-DXYBMTfe.js → widget-picker-rBA7MR5P.js} +2 -2
  142. package/dist/_chunks/{widget-picker-DXYBMTfe.js.map → widget-picker-rBA7MR5P.js.map} +1 -1
  143. package/dist/agent-catalog.json +2 -2
  144. package/dist/components/_shared/non-modal-tab-exit.d.ts +15 -4
  145. package/dist/components/_shared/non-modal-tab-exit.d.ts.map +1 -1
  146. package/dist/components/ai-credits-notice/index.js +1 -1
  147. package/dist/components/ai-permission-notice/ai-permission-notice.d.ts +32 -0
  148. package/dist/components/ai-permission-notice/ai-permission-notice.d.ts.map +1 -1
  149. package/dist/components/ai-permission-notice/index.d.ts +1 -1
  150. package/dist/components/ai-permission-notice/index.d.ts.map +1 -1
  151. package/dist/components/ai-permission-notice/index.js +1 -1
  152. package/dist/components/appointment-details-panel/index.js +1 -1
  153. package/dist/components/appointment-peek/index.js +1 -1
  154. package/dist/components/appointment-timeline/index.js +1 -1
  155. package/dist/components/booking/index.js +1 -1
  156. package/dist/components/calculator-dialog/index.js +1 -1
  157. package/dist/components/care-plan-card/index.js +1 -1
  158. package/dist/components/care-plan-header/index.js +1 -1
  159. package/dist/components/chart/chart.d.ts +5 -5
  160. package/dist/components/chart/chart.d.ts.map +1 -1
  161. package/dist/components/chart/index.js +1 -1
  162. package/dist/components/clinical-note-card/index.js +1 -1
  163. package/dist/components/color-picker/color-picker.d.ts.map +1 -1
  164. package/dist/components/color-picker/index.js +1 -1
  165. package/dist/components/contact-card/index.js +1 -1
  166. package/dist/components/contact-profile-card/index.js +1 -1
  167. package/dist/components/cycle-calculator/index.js +1 -1
  168. package/dist/components/data-table/index.js +2 -2
  169. package/dist/components/data-table-tabs/index.js +1 -1
  170. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  171. package/dist/components/date-picker/index.js +1 -1
  172. package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
  173. package/dist/components/date-range-picker/index.js +1 -1
  174. package/dist/components/date-time-picker/date-time-picker.d.ts.map +1 -1
  175. package/dist/components/date-time-picker/index.js +1 -1
  176. package/dist/components/dialog/index.js +1 -1
  177. package/dist/components/document-preview/index.js +1 -1
  178. package/dist/components/due-date-calculator/index.js +1 -1
  179. package/dist/components/entity-summary/index.js +1 -1
  180. package/dist/components/file-manager/index.js +1 -1
  181. package/dist/components/gestational-age-calculator/index.js +1 -1
  182. package/dist/components/hcg-doubling/index.js +1 -1
  183. package/dist/components/header-settings/index.js +1 -1
  184. package/dist/components/heatmap/index.js +1 -1
  185. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  186. package/dist/components/hover-card/index.js +1 -1
  187. package/dist/components/icon-picker/index.js +1 -1
  188. package/dist/components/info-tip/index.js +1 -1
  189. package/dist/components/link/index.js +1 -1
  190. package/dist/components/link/link.d.ts +5 -3
  191. package/dist/components/link/link.d.ts.map +1 -1
  192. package/dist/components/locale-picker/index.js +1 -1
  193. package/dist/components/message-tray/index.js +1 -1
  194. package/dist/components/message-tray/message-tray.d.ts.map +1 -1
  195. package/dist/components/nav-grid/index.js +1 -1
  196. package/dist/components/note-timeline/index.js +1 -1
  197. package/dist/components/notes-panel/index.js +1 -1
  198. package/dist/components/notification-tray/index.js +1 -1
  199. package/dist/components/notification-tray/notification-tray.d.ts.map +1 -1
  200. package/dist/components/patient-details/index.js +1 -1
  201. package/dist/components/patient-summary-card/index.js +1 -1
  202. package/dist/components/patient-table/index.js +1 -1
  203. package/dist/components/payment-card/index.js +1 -1
  204. package/dist/components/pdf-viewer/index.js +1 -1
  205. package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
  206. package/dist/components/phone-input/index.js +1 -1
  207. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  208. package/dist/components/popover/index.js +1 -1
  209. package/dist/components/popover/popover.d.ts +1 -1
  210. package/dist/components/popover/popover.d.ts.map +1 -1
  211. package/dist/components/practice-results/index.js +1 -1
  212. package/dist/components/pregnancy-dating/index.js +1 -1
  213. package/dist/components/product-hub-tray/index.js +1 -1
  214. package/dist/components/product-hub-tray/product-hub-tray.d.ts.map +1 -1
  215. package/dist/components/public-footer/index.js +1 -1
  216. package/dist/components/public-header/index.js +1 -1
  217. package/dist/components/radiograph-panel/index.js +1 -1
  218. package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
  219. package/dist/components/rich-text-editor/index.js +2 -2
  220. package/dist/components/sheet/index.js +1 -1
  221. package/dist/components/sign-document/index.js +1 -1
  222. package/dist/components/task-editor/index.js +1 -1
  223. package/dist/components/voice-control-panel/index.js +1 -1
  224. package/dist/components/widget-picker/index.js +1 -1
  225. package/dist/i18n/locales/ar.d.ts +14 -0
  226. package/dist/i18n/locales/ar.d.ts.map +1 -1
  227. package/dist/i18n/locales/ar.js +15 -1
  228. package/dist/i18n/locales/ar.js.map +1 -1
  229. package/dist/i18n/locales/de.d.ts +14 -0
  230. package/dist/i18n/locales/de.d.ts.map +1 -1
  231. package/dist/i18n/locales/de.js +15 -1
  232. package/dist/i18n/locales/de.js.map +1 -1
  233. package/dist/i18n/locales/el.d.ts +14 -0
  234. package/dist/i18n/locales/el.d.ts.map +1 -1
  235. package/dist/i18n/locales/el.js +15 -1
  236. package/dist/i18n/locales/el.js.map +1 -1
  237. package/dist/i18n/locales/en.d.ts +14 -0
  238. package/dist/i18n/locales/en.d.ts.map +1 -1
  239. package/dist/i18n/locales/en.js +15 -1
  240. package/dist/i18n/locales/en.js.map +1 -1
  241. package/dist/i18n/locales/es.d.ts +14 -0
  242. package/dist/i18n/locales/es.d.ts.map +1 -1
  243. package/dist/i18n/locales/es.js +15 -1
  244. package/dist/i18n/locales/es.js.map +1 -1
  245. package/dist/i18n/locales/fr.d.ts +14 -0
  246. package/dist/i18n/locales/fr.d.ts.map +1 -1
  247. package/dist/i18n/locales/fr.js +15 -1
  248. package/dist/i18n/locales/fr.js.map +1 -1
  249. package/dist/i18n/locales/hi.d.ts +14 -0
  250. package/dist/i18n/locales/hi.d.ts.map +1 -1
  251. package/dist/i18n/locales/hi.js +15 -1
  252. package/dist/i18n/locales/hi.js.map +1 -1
  253. package/dist/i18n/locales/it.d.ts +14 -0
  254. package/dist/i18n/locales/it.d.ts.map +1 -1
  255. package/dist/i18n/locales/it.js +15 -1
  256. package/dist/i18n/locales/it.js.map +1 -1
  257. package/dist/i18n/locales/ja.d.ts +14 -0
  258. package/dist/i18n/locales/ja.d.ts.map +1 -1
  259. package/dist/i18n/locales/ja.js +15 -1
  260. package/dist/i18n/locales/ja.js.map +1 -1
  261. package/dist/i18n/locales/nl.d.ts +14 -0
  262. package/dist/i18n/locales/nl.d.ts.map +1 -1
  263. package/dist/i18n/locales/nl.js +15 -1
  264. package/dist/i18n/locales/nl.js.map +1 -1
  265. package/dist/i18n/locales/pl.d.ts +14 -0
  266. package/dist/i18n/locales/pl.d.ts.map +1 -1
  267. package/dist/i18n/locales/pl.js +15 -1
  268. package/dist/i18n/locales/pl.js.map +1 -1
  269. package/dist/i18n/locales/pt.d.ts +14 -0
  270. package/dist/i18n/locales/pt.d.ts.map +1 -1
  271. package/dist/i18n/locales/pt.js +15 -1
  272. package/dist/i18n/locales/pt.js.map +1 -1
  273. package/dist/i18n/locales/ro.d.ts +14 -0
  274. package/dist/i18n/locales/ro.d.ts.map +1 -1
  275. package/dist/i18n/locales/ro.js +15 -1
  276. package/dist/i18n/locales/ro.js.map +1 -1
  277. package/dist/i18n/locales/ru.d.ts +14 -0
  278. package/dist/i18n/locales/ru.d.ts.map +1 -1
  279. package/dist/i18n/locales/ru.js +15 -1
  280. package/dist/i18n/locales/ru.js.map +1 -1
  281. package/dist/i18n/locales/sq.d.ts +14 -0
  282. package/dist/i18n/locales/sq.d.ts.map +1 -1
  283. package/dist/i18n/locales/sq.js +15 -1
  284. package/dist/i18n/locales/sq.js.map +1 -1
  285. package/dist/i18n/locales/sv.d.ts +14 -0
  286. package/dist/i18n/locales/sv.d.ts.map +1 -1
  287. package/dist/i18n/locales/sv.js +15 -1
  288. package/dist/i18n/locales/sv.js.map +1 -1
  289. package/dist/i18n/locales/tr.d.ts +14 -0
  290. package/dist/i18n/locales/tr.d.ts.map +1 -1
  291. package/dist/i18n/locales/tr.js +15 -1
  292. package/dist/i18n/locales/tr.js.map +1 -1
  293. package/dist/i18n/locales/zh.d.ts +14 -0
  294. package/dist/i18n/locales/zh.d.ts.map +1 -1
  295. package/dist/i18n/locales/zh.js +15 -1
  296. package/dist/i18n/locales/zh.js.map +1 -1
  297. package/dist/index.js +194 -193
  298. package/dist/locales/ar.json +15 -1
  299. package/dist/locales/de.json +15 -1
  300. package/dist/locales/el.json +15 -1
  301. package/dist/locales/en.json +15 -1
  302. package/dist/locales/es.json +15 -1
  303. package/dist/locales/fr.json +15 -1
  304. package/dist/locales/hi.json +15 -1
  305. package/dist/locales/it.json +15 -1
  306. package/dist/locales/ja.json +15 -1
  307. package/dist/locales/nl.json +15 -1
  308. package/dist/locales/pl.json +15 -1
  309. package/dist/locales/pt.json +15 -1
  310. package/dist/locales/ro.json +15 -1
  311. package/dist/locales/ru.json +15 -1
  312. package/dist/locales/sq.json +15 -1
  313. package/dist/locales/sv.json +15 -1
  314. package/dist/locales/tr.json +15 -1
  315. package/dist/locales/zh.json +15 -1
  316. package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts +10 -13
  317. package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts.map +1 -1
  318. package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
  319. package/dist/patterns/alia-assistant/alia-popout.d.ts +5 -3
  320. package/dist/patterns/alia-assistant/alia-popout.d.ts.map +1 -1
  321. package/dist/patterns/alia-assistant/index.d.ts +2 -0
  322. package/dist/patterns/alia-assistant/index.d.ts.map +1 -1
  323. package/dist/patterns/alia-assistant/index.js +6 -5
  324. package/dist/patterns/anamnesis/index.js +1 -1
  325. package/dist/patterns/calendar/index.js +1 -1
  326. package/dist/patterns/help-me-write-templates/index.js +1 -1
  327. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  328. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +7 -2
  329. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
  330. package/dist/patterns/registration-form/index.js +1 -1
  331. package/dist/patterns/signature-request/index.js +1 -1
  332. package/dist/patterns/signed-out-frame/index.js +1 -1
  333. package/dist/tokens.css +1 -1
  334. package/package.json +1 -1
  335. package/dist/_chunks/ai-permission-notice-5vpblPCx.js +0 -171
  336. package/dist/_chunks/ai-permission-notice-5vpblPCx.js.map +0 -1
  337. package/dist/_chunks/alia-sidebar-DOei4Iyu.js +0 -1183
  338. package/dist/_chunks/alia-sidebar-DOei4Iyu.js.map +0 -1
  339. package/dist/_chunks/chart-HsF1KHbx.js.map +0 -1
  340. package/dist/_chunks/color-picker-BRQ4Y9SO.js.map +0 -1
  341. package/dist/_chunks/date-picker-wRAcq2lt.js.map +0 -1
  342. package/dist/_chunks/date-range-picker-CtUOI38x.js.map +0 -1
  343. package/dist/_chunks/date-time-picker-CLeLKuv9.js.map +0 -1
  344. package/dist/_chunks/hover-card-BnTueNS2.js.map +0 -1
  345. package/dist/_chunks/link-2HokYuIi.js +0 -130
  346. package/dist/_chunks/link-2HokYuIi.js.map +0 -1
  347. package/dist/_chunks/marketplace-app-shell-Dcx-JEjg.js.map +0 -1
  348. package/dist/_chunks/message-tray-BB95DA82.js.map +0 -1
  349. package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +0 -65
  350. package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js.map +0 -1
  351. package/dist/_chunks/notification-tray-__sJXnsz.js.map +0 -1
  352. package/dist/_chunks/pdf-viewer-C3minW5b.js.map +0 -1
  353. package/dist/_chunks/phone-input-DxkHMYmu.js.map +0 -1
  354. package/dist/_chunks/popover-BI3oV3eY.js +0 -305
  355. package/dist/_chunks/popover-BI3oV3eY.js.map +0 -1
  356. package/dist/_chunks/product-hub-panel-BSSiGGG4.js.map +0 -1
  357. package/dist/_chunks/rich-text-editor-CkFfmA3v.js.map +0 -1
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as o, Fragment as ot } from "react/jsx-runtime";
2
2
  import { forwardRef as It, useId as Se, useState as _, useRef as c, useMemo as Pe, useEffect as y, useCallback as I } from "react";
3
3
  import { c as P } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Lt, Trans as Vt } from "react-i18next";
5
- import { A as Gt } from "./ai-permission-notice-5vpblPCx.js";
5
+ import { A as Gt } from "./ai-permission-notice-DyuEGwAt.js";
6
6
  import { A as Ft } from "./ai-sparkle-D23NT8Z_.js";
7
7
  import { B as Mt } from "./badge-hnBt8o7n.js";
8
8
  import { B as st } from "./button-Bn16lcFM.js";
@@ -1006,4 +1006,4 @@ export {
1006
1006
  An as V,
1007
1007
  pn as v
1008
1008
  };
1009
- //# sourceMappingURL=voice-control-panel-Bg1eklL0.js.map
1009
+ //# sourceMappingURL=voice-control-panel-BKbgb7FM.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"voice-control-panel-Bg1eklL0.js","sources":["../../node_modules/lucide-react/dist/esm/icons/audio-lines.mjs","../../src/components/voice-control-panel/voice-control-panel.agent.ts","../../src/components/voice-control-panel/voice-control-panel.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M2 10v3\", key: \"1fnikh\" }],\n [\"path\", { d: \"M6 6v11\", key: \"11sgs0\" }],\n [\"path\", { d: \"M10 3v18\", key: \"yhl04a\" }],\n [\"path\", { d: \"M14 8v7\", key: \"3a1oy3\" }],\n [\"path\", { d: \"M18 5v13\", key: \"123xd1\" }],\n [\"path\", { d: \"M22 10v3\", key: \"154ddg\" }]\n];\nconst AudioLines = createLucideIcon(\"audio-lines\", __iconNode);\n\nexport { __iconNode, AudioLines as default };\n//# sourceMappingURL=audio-lines.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter: VoiceControlPanel. */\n/* */\n/* The panel draws a host-driven voice session; the host owns the */\n/* microphone and the speech service. `start_listening` / `stop_listening`*/\n/* call the same `onToggle` the button calls, but only in the direction */\n/* asked, so an agent never starts by mistake. They are `capture` and */\n/* `write` (start opens the microphone). Picking a match hands the host */\n/* an id through `onCandidatePick`, which the host turns into a write on */\n/* the patient's record, so it is `phi`. The commands disclosure is a */\n/* plain `expand`. In the floating layout the panel above the pill opens */\n/* and closes (`open` / `close`, `read`): closing never stops listening. */\n/* */\n/* No state slot returns the transcript, the target line or a message: */\n/* those can carry patient data the host put there. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { VoiceControlPanelHandle } from './voice-control-panel';\n\nexport const voiceControlPanelAgent: AgentAdapter<VoiceControlPanelHandle> = {\n id: 'voice-control-panel',\n capabilities: ['capture', 'pick', 'expand', 'open', 'close'],\n state: {\n status: {\n type: \"'idle' | 'starting' | 'listening' | 'paused' | 'error'\",\n descriptionKey: 'ui.agent.voiceControlPanel.state.status',\n description:\n 'Where the host voice session is: idle, starting, listening, paused or error.',\n read: (handle) => handle.getStatus(),\n },\n candidateIds: {\n type: 'string[]',\n descriptionKey: 'ui.agent.voiceControlPanel.state.candidateIds',\n description:\n 'Ids of the matches currently offered, in spoken order (option 1 first). Empty when there is nothing to choose.',\n read: (handle) => handle.getCandidateIds(),\n },\n commandsOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.voiceControlPanel.state.commandsOpen',\n description: 'True when the voice commands list is expanded.',\n read: (handle) => handle.isCommandsOpen(),\n },\n panelOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.voiceControlPanel.state.panelOpen',\n description:\n 'Floating layout: true when the panel above the pill is open. Always false inline.',\n read: (handle) => handle.isPanelOpen(),\n },\n },\n actions: {\n start_listening: {\n safety: 'write',\n idempotent: true,\n // The host streams the patient's audio to its transcription service.\n openWorld: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.startListening',\n description:\n 'Ask the host to start listening (it opens the microphone). Does nothing when already starting or listening, or while the panel is disabled.',\n errors: ['Microphone permission denied', 'Speech service unavailable'],\n invoke: (handle) => {\n handle.start();\n },\n },\n stop_listening: {\n safety: 'write',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.stopListening',\n description:\n 'Ask the host to stop listening, or to cancel a start. Does nothing when not starting or listening.',\n invoke: (handle) => {\n handle.stop();\n },\n },\n pick_candidate: {\n // The host turns the pick into a write on the patient's record (the\n // care plan adds a treatment line), so it is gated as PHI.\n safety: 'phi',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'One of the ids in the candidateIds state slot.',\n },\n },\n required: ['id'],\n additionalProperties: false,\n },\n descriptionKey: 'ui.agent.voiceControlPanel.actions.pickCandidate',\n description:\n 'Pick one of the offered matches by id, the same as saying its option number or pressing it. Unknown ids are ignored.',\n examples: [\n { args: { id: 'otve' }, note: 'Pick the match with id otve.' },\n ],\n invoke: (handle, args: { id: string }) => {\n handle.pickCandidate(args.id);\n },\n },\n open_commands: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.openCommands',\n description: 'Expand the voice commands list.',\n invoke: (handle) => {\n handle.openCommands();\n },\n },\n close_commands: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.closeCommands',\n description: 'Collapse the voice commands list.',\n invoke: (handle) => {\n handle.closeCommands();\n },\n },\n open_panel: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.openPanel',\n description:\n 'Floating layout: open the panel above the pill. Does nothing inline.',\n invoke: (handle) => {\n handle.openPanel();\n },\n },\n close_panel: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.closePanel',\n description:\n 'Floating layout: close the panel above the pill. Listening carries on. Does nothing inline.',\n invoke: (handle) => {\n handle.closePanel();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'voice-control-panel',\n description: 'Marks the VoiceControlPanel root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop on VoiceControlPanel.',\n },\n item: {\n attr: 'data-candidate-id',\n description:\n 'On each match button, the candidate id that pick_candidate takes.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Trans, useTranslation } from 'react-i18next';\nimport {\n AudioLines,\n ChevronDown,\n CircleAlert,\n CircleCheck,\n Info,\n LoaderCircle,\n SlidersHorizontal,\n Square,\n TriangleAlert,\n X,\n} from 'lucide-react';\nimport {\n AiConsentBanner,\n type AiConsentBannerHeadingLevel,\n type AiConsentGate,\n} from '../ai-permission-notice';\nimport { AiSparkle } from '../ai-sparkle';\nimport { Badge } from '../badge';\nimport { Button, IconButton } from '../button';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible';\nimport { FormField } from '../form-field';\nimport { Kbd, type KbdNamedKey } from '../kbd';\nimport { List } from '../list';\nimport { LiveRegion } from '../live-region';\nimport { Select, type SelectOption } from '../select';\nimport {\n aiFabDividerClass,\n aiFabPillClass,\n aiFabSegmentVariants,\n aiFabSweepClass,\n} from '../_shared/ai-fab-pill';\nimport { composeRefs } from '../_shared/compose-refs';\nimport {\n glassEntranceClass,\n glassSurfaceClass,\n} from '../_shared/glass-surface';\nimport { publishFloatingClearance } from '../_shared/floating-clearance';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { useAiSparkle } from '../../hooks/use-ai-sparkle';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { voiceControlPanelAgent } from './voice-control-panel.agent';\n\n/* -------------------------------------------------------------------- */\n/* VoiceControlPanel */\n/* */\n/* The kit draws the voice-control UI; the host owns the microphone and */\n/* the speech service and drives the panel through props. The same split */\n/* as RichTextEditor's `onDictate`: no audio, no network, no parsing in */\n/* the kit. The panel is compact so it can sit inline above a chart today */\n/* and move into a tool rail later: a container query stacks it in a */\n/* narrow container. */\n/* */\n/* `layout=\"floating\"` draws the same panel as a non-modal companion */\n/* above the RichTextEditor's AI pill (shared recipe in */\n/* `_shared/ai-fab-pill.ts`), fixed to a viewport corner: mic | panel. */\n/* */\n/* `aiConsent` puts every start behind the patient AI-consent gate, the */\n/* same contract, banner and resume-after-grant as RichTextEditor. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/** Where the host's voice session is. */\nexport type VoiceControlStatus =\n | 'idle'\n | 'starting'\n | 'listening'\n | 'paused'\n | 'error';\n\n/** How a message reads: the tone decides the colour and the icon. */\nexport type VoiceControlTone = 'info' | 'success' | 'warning' | 'error';\n\n/** Generic failures the kit words itself, translated. */\nexport type VoiceControlError =\n | 'microphoneDenied'\n | 'connectionLost'\n | 'startFailed'\n | 'recordingFailed'\n | 'unsupported';\n\n/** A host message, already translated by the host. */\nexport interface VoiceControlMessage {\n tone: VoiceControlTone;\n text: string;\n /**\n * Change it to announce the same words again (the live region only speaks\n * when the message changes), e.g. a counter for \"Not recognised\" twice.\n */\n id?: string | number;\n}\n\n/** What the speech service heard. `partial` may still change. */\nexport interface VoiceControlTranscript {\n final?: string;\n partial?: string;\n}\n\n/** One dictation language the host's speech service accepts. */\nexport interface VoiceControlLanguage {\n value: string;\n label: string;\n}\n\n/** One match the user can pick by voice (\"option 1\") or by hand. */\nexport interface VoiceControlCandidate {\n id: string;\n label: string;\n detail?: string;\n}\n\n/** One voice command shown in the commands disclosure. */\nexport interface VoiceControlCommand {\n phrase: ReactNode;\n description: ReactNode;\n}\n\n/** What a press asks the host to do: start (or resume), or stop (or cancel\n * a start). */\nexport type VoiceControlToggle = 'start' | 'stop';\n\n/** Inline in the page flow, or a floating pill that opens the panel. */\nexport type VoiceControlLayout = 'inline' | 'floating';\n\n/** The viewport corner of the floating pill. Logical: mirrors in RTL. */\nexport type VoiceControlPosition = 'bottom-end' | 'bottom-start';\n\n/** Curated imperative handle for agent / external automation. */\nexport interface VoiceControlPanelHandle {\n getStatus: () => VoiceControlStatus;\n /** Ask the host to start (`onToggle('start')`) unless already starting\n * or listening, or disabled. Gated by `aiConsent` like a press. */\n start: () => void;\n /** Ask the host to stop or cancel a start (`onToggle('stop')`); a no-op\n * when not starting or listening. Never gated. */\n stop: () => void;\n getCandidateIds: () => string[];\n pickCandidate: (id: string) => void;\n isCommandsOpen: () => boolean;\n openCommands: () => void;\n closeCommands: () => void;\n /** Floating layout: whether the panel above the pill is open. Always\n * false inline. */\n isPanelOpen: () => boolean;\n /** Floating layout: open the panel (no focus move). A no-op inline. */\n openPanel: () => void;\n /** Floating layout: close the panel; listening carries on. A no-op inline. */\n closePanel: () => void;\n}\n\nexport interface VoiceControlPanelProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'children' | 'onToggle'\n> {\n /** Where the host's voice session is. Drives the button, dot and status. */\n status: VoiceControlStatus;\n /**\n * The start/stop button, the pill's voice segment, the shortcut and the\n * agent call this, saying which way: `'start'` when idle, paused or\n * stopped, `'stop'` when starting or listening (stop, or cancel a start).\n * Every stop is passed on, so act on the argument rather than flip your\n * own state. A host that ignores the argument keeps working.\n */\n onToggle: (next: VoiceControlToggle) => void;\n /**\n * Stops a session from starting: disables the button, the shortcut, the\n * settings and the matches. A session already starting or listening can\n * still be stopped, so the microphone is never trapped on.\n */\n disabled?: boolean;\n /** Panel title. Default: the kit's \"Voice control\". */\n title?: ReactNode;\n /** Shows a \"Beta\" badge beside the title. */\n beta?: boolean;\n /** A host notice under the title, e.g. \"Free during the beta.\" */\n betaNotice?: ReactNode;\n /** The current dictation language (a `languages` value). */\n language?: string;\n /** Dictation languages. The select shows only with two or more. */\n languages?: VoiceControlLanguage[];\n onLanguageChange?: (value: string) => void;\n /** Extra settings beside the language, e.g. the periodontal route select. */\n extraControls?: ReactNode;\n /** The bold \"where am I\" line: the field or elements voice acts on. */\n target?: ReactNode;\n /** What the speech service heard: `final` reads normal, `partial` muted. */\n transcript?: VoiceControlTranscript;\n /** A host message. The tone sets colour and icon; not every message is red. */\n message?: VoiceControlMessage | null;\n /** A generic failure, worded and translated by the kit (tone: error). */\n error?: VoiceControlError | null;\n /** Several matches to choose from, numbered as they are spoken. */\n candidates?: VoiceControlCandidate[];\n /** Host label above the matches, e.g. \"Several matches: say 'option 1'…\". */\n candidatesLabel?: string;\n onCandidatePick?: (id: string) => void;\n /** Voice commands listed in the disclosure under the panel. */\n commands?: VoiceControlCommand[];\n /** Start with the commands disclosure open. */\n defaultCommandsOpen?: boolean;\n /**\n * Keyboard shortcut the kit binds document-wide to toggle, e.g. `\"Alt+V\"`\n * (default). Modifiers: Alt, Control, Shift, Meta. `false` turns it off.\n */\n shortcut?: string | false;\n /** Opaque instance id: `data-component-id` and agent registration. */\n id?: string;\n /**\n * `inline` (default): the panel sits in the page flow, above the chart.\n * `floating`: the RichTextEditor's AI pill (mic | panel) fixed to a\n * viewport corner; the second segment opens this panel above it, non-modal.\n */\n layout?: VoiceControlLayout;\n /**\n * Floating only: the viewport corner. Default `bottom-end`; `bottom-start`\n * moves the pill away from another floating widget (a chat bubble).\n */\n position?: VoiceControlPosition;\n /** Floating only: whether the panel above the pill is open (controlled). */\n open?: boolean;\n /** Floating only: the open state when uncontrolled. Default `false`. */\n defaultOpen?: boolean;\n /**\n * Floating only: called when the panel opens or closes, by the pill, the\n * close button, Escape, or on its own for an error or a set of matches.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Floating only: the pill's sparkle, as on the RichTextEditor's pill. It\n * plays once when the pill first shows and again when a success message\n * arrives (a write landed); never in a loop while listening. Default `true`.\n */\n aiSparkle?: boolean;\n /**\n * Patient AI-consent gate: voice sends patient audio to the host's speech\n * service. Same contract as RichTextEditor's `aiConsent`. While present and\n * not granted, every way of starting shows the `AiConsentBanner` instead of\n * calling `onToggle`; stopping is never gated. Omit for ungated behaviour.\n */\n aiConsent?: AiConsentGate;\n /** Heading level for the `AiConsentBanner` title. Default: the banner's. */\n aiConsentHeadingLevel?: AiConsentBannerHeadingLevel;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n [\n // The container query lives on the root and is read by descendants only,\n // never by a flex parent of its own (see the grid below).\n 'ds:@container/voice-control',\n 'ds:block ds:w-full ds:min-w-0',\n // The edge is --surface-border-width (1px, 2px in the accessible themes),\n // at zero specificity so the nearest theme root decides it.\n 'ds:rounded-[var(--radius-lg)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))]',\n 'ds:bg-[var(--card)] ds:text-[color:var(--foreground)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:print:hidden',\n ].join(' '),\n {\n variants: {\n // The border colour lives only here, never beside a base colour, so\n // the listening ring can't lose a race on stylesheet order.\n status: {\n idle: 'ds:border-[color:var(--card-border)]',\n starting: 'ds:border-[color:var(--card-border)]',\n listening: 'ds:border-[color:var(--ring)]',\n paused: 'ds:border-[color:var(--card-border)]',\n error: 'ds:border-[color:var(--card-border)]',\n },\n },\n defaultVariants: { status: 'idle' },\n },\n);\n\nconst statusDotVariants = cva(\n [\n 'ds:relative ds:inline-flex ds:size-2.5 ds:shrink-0 ds:rounded-[var(--radius-full)]',\n 'ds:forced-colors:border ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n {\n variants: {\n status: {\n idle: 'ds:border ds:border-[color:var(--muted-foreground)]',\n starting: 'ds:bg-[color:var(--muted-foreground)]',\n listening: 'ds:bg-[color:var(--destructive)]',\n paused: 'ds:bg-[color:var(--warning)]',\n error: 'ds:bg-[color:var(--error)]',\n },\n },\n defaultVariants: { status: 'idle' },\n },\n);\n\nconst messageVariants = cva(\n 'ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm',\n {\n variants: {\n tone: {\n info: 'ds:text-[color:var(--info-foreground)]',\n success: 'ds:text-[color:var(--success-foreground)]',\n warning: 'ds:text-[color:var(--warning-foreground)]',\n error: 'ds:text-[color:var(--error-foreground)]',\n },\n },\n defaultVariants: { tone: 'info' },\n },\n);\n\nconst focusRing =\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\nconst candidateButtonVariants = cva(\n [\n 'ds:flex ds:w-full ds:items-center',\n 'ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]',\n 'ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:py-[var(--spacing-2xs)]',\n 'ds:text-start ds:text-[color:var(--foreground)] ds:cursor-pointer',\n 'ds:hover:bg-[color:var(--muted)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n focusRing,\n ].join(' '),\n);\n\nconst commandsTriggerVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:min-h-[var(--min-target-size)] ds:py-[var(--spacing-2xs)]',\n 'ds:rounded-[var(--radius-sm)] type-meta ds:text-[color:var(--muted-foreground)] ds:text-start',\n 'ds:hover:text-[color:var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n focusRing,\n ].join(' '),\n);\n\n/* ---- Floating layout ------------------------------------------------ */\n\n// The fixed cluster: the panel stacked above the pill, in one viewport\n// corner. `--z-fixed` is the kit's layer for viewport-fixed controls (the\n// FloatingActionButton's): above sticky chrome, below a modal's backdrop, so\n// an open Dialog covers the pill and the page together. The Select listbox\n// the panel opens portals to <body> on its own `--z-dropdown` layer, above\n// this one. The cluster is as wide as the open panel; its empty corner lets\n// clicks through to the page.\nconst floatingRootVariants = cva(\n [\n 'ds:fixed ds:z-[var(--z-fixed)]',\n 'ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))]',\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:pointer-events-none ds:[&>*]:pointer-events-auto',\n 'ds:print:hidden',\n ].join(' '),\n {\n variants: {\n position: {\n 'bottom-end': 'ds:end-[var(--spacing-lg)] ds:items-end',\n 'bottom-start': 'ds:start-[var(--spacing-lg)] ds:items-start',\n },\n },\n defaultVariants: { position: 'bottom-end' },\n },\n);\n\n// The panel above the pill: the Help me write card's liquid glass (shared\n// recipe in `_shared/glass-surface.ts`, with its opaque fallback for the\n// accessible themes, more contrast, reduced transparency and forced\n// colours), so AI tools share one look. Compact: never wider than the\n// viewport minus the gutter on both sides, never taller than the room above\n// the pill; longer content scrolls inside. It grows out of the pill's\n// corner. `transform-origin` has no logical keywords, so the corner is\n// picked per position and direction: bottom-end is the bottom-right corner\n// in LTR and the bottom-left in RTL.\nconst floatingPanelVariants = cva(\n [\n 'ds:@container/voice-control',\n // Closed is `hidden`: never let a display utility win over it.\n 'ds:min-w-0 ds:[&[hidden]]:hidden',\n 'ds:[inline-size:min(24rem,calc(100vw-(var(--spacing-lg)*2)))]',\n 'ds:[max-block-size:calc(100dvh-var(--min-target-size)-(var(--spacing-lg)*2)-var(--spacing-sm)-env(safe-area-inset-bottom,0px))]',\n // On a phone the panel spans the screen, so it stops at half the height\n // (scrolling inside) and the voice cursor row above it stays in view.\n 'ds:max-sm:[max-block-size:calc(50dvh-var(--min-target-size)-(var(--spacing-lg)*2)-var(--spacing-sm)-env(safe-area-inset-bottom,0px))]',\n 'ds:overflow-y-auto ds:overscroll-contain',\n glassSurfaceClass,\n glassEntranceClass,\n 'ds:text-[color:var(--foreground)]',\n focusRing,\n ].join(' '),\n {\n variants: {\n position: {\n 'bottom-end': 'ds:origin-bottom-right ds:rtl:origin-bottom-left',\n 'bottom-start': 'ds:origin-bottom-left ds:rtl:origin-bottom-right',\n },\n },\n defaultVariants: { position: 'bottom-end' },\n },\n);\n\n// The pill's mic segment. While listening it carries the word \"Listening\"\n// beside the stop icon, so it widens like an extended FAB.\nconst micSegmentVariants = cva(\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n {\n variants: {\n extended: {\n true: 'ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-md)]',\n false: '',\n },\n },\n defaultVariants: { extended: false },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Shortcut */\n/* -------------------------------------------------------------------- */\n\ntype ShortcutModifier = Extract<\n KbdNamedKey,\n 'Alt' | 'Control' | 'Shift' | 'Meta'\n>;\n\ninterface ParsedShortcut {\n modifiers: Set<ShortcutModifier>;\n key: string;\n /** `aria-keyshortcuts` value, e.g. `Alt+V`. */\n aria: string;\n /** Keys for the kit Kbd, e.g. `['Alt', 'V']`. */\n keys: string[];\n}\n\nconst MODIFIER_ALIASES: Record<string, ShortcutModifier> = {\n alt: 'Alt',\n option: 'Alt',\n ctrl: 'Control',\n control: 'Control',\n shift: 'Shift',\n meta: 'Meta',\n cmd: 'Meta',\n command: 'Meta',\n};\n\n/** Parse `\"Alt+V\"`-style shortcuts. Returns null for an unusable string. */\nexport function parseVoiceShortcut(shortcut: string): ParsedShortcut | null {\n const parts = shortcut\n .split('+')\n .map((part) => part.trim())\n .filter(Boolean);\n if (parts.length === 0) return null;\n const rawKey = parts[parts.length - 1];\n const modifiers = new Set<ShortcutModifier>();\n for (const part of parts.slice(0, -1)) {\n const modifier = MODIFIER_ALIASES[part.toLowerCase()];\n if (!modifier) return null;\n modifiers.add(modifier);\n }\n const key = rawKey.length === 1 ? rawKey.toUpperCase() : rawKey;\n const ordered = (['Control', 'Alt', 'Shift', 'Meta'] as const).filter((m) =>\n modifiers.has(m),\n );\n return {\n modifiers,\n key,\n aria: [...ordered, key].join('+'),\n keys: [...ordered, key],\n };\n}\n\n/** Whether a keydown matches a parsed shortcut. Letters and digits match on\n * the physical key, so Alt+V still matches on macOS, where Option+V types\n * a different character. */\nfunction matchesShortcut(event: KeyboardEvent, parsed: ParsedShortcut) {\n if (event.altKey !== parsed.modifiers.has('Alt')) return false;\n if (event.ctrlKey !== parsed.modifiers.has('Control')) return false;\n if (event.shiftKey !== parsed.modifiers.has('Shift')) return false;\n if (event.metaKey !== parsed.modifiers.has('Meta')) return false;\n const { key } = parsed;\n if (/^[A-Z]$/.test(key)) return event.code === `Key${key}`;\n if (/^[0-9]$/.test(key)) return event.code === `Digit${key}`;\n return event.key.toLowerCase() === key.toLowerCase();\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\ntype FocusTarget = 'panel' | 'gate' | 'toggle' | 'launcher' | 'return';\n\n/** The shortcut as kit Kbd pills. `<Trans>` hands a placeholder component\n * `children` (null for a self-closing tag), which would switch Kbd to its\n * children path and render an empty pill, so this wrapper drops them. */\nfunction ShortcutKeys({ keys }: { keys: string[] }) {\n return <Kbd keys={keys} separator=\"plus\" size=\"sm\" />;\n}\n\nconst TONE_ICON: Record<VoiceControlTone, typeof Info> = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n error: CircleAlert,\n};\n\nconst NO_CANDIDATES: VoiceControlCandidate[] = [];\n\n// The kit's target size (44px, 48px in the accessible themes) on every\n// control in the panel, at every width: the panel is touch-first.\nconst TARGET_HEIGHT = 'ds:min-h-[var(--min-target-size)]';\nconst TARGET_SQUARE =\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]';\n\n/** A part that already ends a sentence, in Latin, CJK or Arabic script. */\nconst SENTENCE_END = /[.!?…:。.!?؟।]$/u;\n\n/** Appended on every other announcement so a repeat still changes the\n * region's text (and is read again). Invisible, and not trimmed away. */\nconst NO_BREAK_SPACE = '\\u00a0';\n\n/**\n * VoiceControlPanel: the kit UI for a host-driven voice control session.\n * The host keeps the microphone and the speech service; the panel shows the\n * state, what was heard, where the voice acts, messages and matches, and\n * calls `onToggle` from its button and its keyboard shortcut.\n */\nexport const VoiceControlPanel = forwardRef<\n HTMLDivElement,\n VoiceControlPanelProps\n>(\n (\n {\n status,\n onToggle,\n disabled = false,\n title,\n beta = false,\n betaNotice,\n language,\n languages,\n onLanguageChange,\n extraControls,\n target,\n transcript,\n message,\n error,\n candidates = NO_CANDIDATES,\n candidatesLabel,\n onCandidatePick,\n commands,\n defaultCommandsOpen = false,\n shortcut = 'Alt+V',\n id,\n layout = 'inline',\n position = 'bottom-end',\n open,\n defaultOpen = false,\n onOpenChange,\n aiSparkle = true,\n aiConsent,\n aiConsentHeadingLevel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const candidatesLabelId = useId();\n const panelId = useId();\n const [commandsOpen, setCommandsOpen] = useState(defaultCommandsOpen);\n const floating = layout === 'floating';\n\n const rootRef = useRef<HTMLDivElement>(null);\n const composedRef = useMemo(() => composeRefs(ref, rootRef), [ref]);\n const panelRef = useRef<HTMLDivElement>(null);\n const gateRef = useRef<HTMLDivElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n const launcherRef = useRef<HTMLButtonElement>(null);\n const pillRef = useRef<HTMLDivElement>(null);\n\n const parsedShortcut = useMemo(\n () => (shortcut === false ? null : parseVoiceShortcut(shortcut)),\n [shortcut],\n );\n useEffect(() => {\n if (import.meta.env.DEV && shortcut !== false && !parsedShortcut) {\n console.warn(\n `VoiceControlPanel: shortcut \"${shortcut}\" is not a valid shortcut ` +\n '(use modifiers Alt, Control, Shift, Meta and one key, e.g. \"Alt+V\"); it is off.',\n );\n }\n }, [shortcut, parsedShortcut]);\n\n /* ---- Floating panel: open state ---------------------------------- */\n const [openState, setOpenState] = useState(defaultOpen);\n const controlled = open !== undefined;\n const panelOpen = floating && (controlled ? open : openState);\n\n /* ---- AI consent gate --------------------------------------------- */\n // Hard stop, whatever the UI state: no consent, no start.\n const aiBlocked = aiConsent !== undefined && !aiConsent.granted;\n const [gateOpen, setGateOpen] = useState(false);\n const showGate = gateOpen && aiBlocked;\n // A start was gated: resume it if consent is granted from this banner.\n const resumeAfterGrantRef = useRef(false);\n // Set only by a Grant click HERE. A `granted` that flips for any other\n // reason (another patient, another tab) must not start listening.\n const grantRequestedRef = useRef(false);\n const [localGrantPending, setLocalGrantPending] = useState(false);\n const grantPending = (aiConsent?.pending ?? false) || localGrantPending;\n\n /* ---- Latest values for listeners, callbacks and the agent handle -- */\n const latest = useRef({\n status,\n onToggle,\n disabled,\n candidates,\n onCandidatePick,\n commandsOpen,\n aiBlocked,\n floating,\n panelOpen,\n controlled,\n onOpenChange,\n });\n latest.current = {\n status,\n onToggle,\n disabled,\n candidates,\n onCandidatePick,\n commandsOpen,\n aiBlocked,\n floating,\n panelOpen,\n controlled,\n onOpenChange,\n };\n\n // A focus move waits for the DOM to show its target; asking for one\n // always re-renders, so it runs now, never at some later render.\n const pendingFocusRef = useRef<FocusTarget | null>(null);\n const [, setFocusRequest] = useState(0);\n const requestFocus = useCallback((target: FocusTarget) => {\n pendingFocusRef.current = target;\n setFocusRequest((n) => n + 1);\n }, []);\n // Where focus was when a start was gated, to go back on Close.\n const gateReturnRef = useRef<HTMLElement | null>(null);\n // Consent withdrawn mid-session: the one automatic stop already sent.\n const stopSentRef = useRef(false);\n\n const setPanelOpen = useCallback((next: boolean) => {\n const now = latest.current;\n if (!now.floating || now.panelOpen === next) return;\n if (!now.controlled) setOpenState(next);\n now.onOpenChange?.(next);\n }, []);\n\n const closeGate = useCallback(() => {\n resumeAfterGrantRef.current = false;\n grantRequestedRef.current = false;\n setGateOpen(false);\n }, []);\n\n const openGate = useCallback(() => {\n const focused =\n typeof document === 'undefined' ? null : document.activeElement;\n gateReturnRef.current =\n focused instanceof HTMLElement && focused !== document.body\n ? focused\n : null;\n resumeAfterGrantRef.current = true;\n setGateOpen(true);\n setPanelOpen(true);\n requestFocus('gate');\n }, [setPanelOpen, requestFocus]);\n\n // The one way in for the button, the pill's mic, the shortcut and the\n // agent: stopping (or cancelling a start) is never gated; starting is,\n // while consent is missing.\n const requestToggle = useCallback(() => {\n const { status: now, disabled: off, aiBlocked: blocked } = latest.current;\n if (now === 'starting' || now === 'listening') {\n // Every stop reaches the host, never swallowed: it says 'stop', so a\n // repeat cannot be read as a start.\n latest.current.onToggle('stop');\n return;\n }\n if (off) return;\n if (blocked) {\n openGate();\n return;\n }\n latest.current.onToggle('start');\n }, [openGate]);\n const requestToggleRef = useRef(requestToggle);\n requestToggleRef.current = requestToggle;\n\n const handleGrantConsent = useCallback(() => {\n grantRequestedRef.current = true;\n const result = aiConsent?.onGrant?.();\n if (result && typeof (result as Promise<void>).then === 'function') {\n setLocalGrantPending(true);\n Promise.resolve(result)\n .catch(() => {\n // The host shows its own failure UI (`pending`, a fresh\n // `granted: false`). This click no longer counts as the grant,\n // so a later grant from elsewhere will not start listening.\n grantRequestedRef.current = false;\n })\n .finally(() => setLocalGrantPending(false));\n }\n }, [aiConsent]);\n\n // Granted after a Grant click here: start listening, as the editor\n // resumes the action it gated. Granted any other way: close the banner.\n const prevGrantedRef = useRef(aiConsent?.granted ?? true);\n useEffect(() => {\n const wasGranted = prevGrantedRef.current;\n const nowGranted = aiConsent?.granted ?? true;\n prevGrantedRef.current = nowGranted;\n if (wasGranted || !nowGranted) return;\n const resume = resumeAfterGrantRef.current;\n const requestedHere = grantRequestedRef.current;\n resumeAfterGrantRef.current = false;\n grantRequestedRef.current = false;\n setGateOpen(false);\n if (!resume) return;\n const focusLost =\n typeof document === 'undefined' ||\n !document.activeElement ||\n document.activeElement === document.body;\n if (requestedHere) {\n const { status: now, disabled: off } = latest.current;\n if (!off && now !== 'starting' && now !== 'listening') {\n latest.current.onToggle('start');\n }\n gateReturnRef.current = null;\n requestFocus('toggle');\n } else if (focusLost) {\n requestFocus('toggle');\n }\n }, [aiConsent?.granted, requestFocus]);\n\n // Consent withdrawn (or the patient changed) mid-session: stop, once.\n useEffect(() => {\n const running = status === 'starting' || status === 'listening';\n if (!running || !aiBlocked) {\n stopSentRef.current = false;\n return;\n }\n if (stopSentRef.current) return;\n stopSentRef.current = true;\n latest.current.onToggle('stop');\n }, [aiBlocked, status]);\n\n // Closing the floating panel closes the banner inside it too.\n useEffect(() => {\n if (floating && !panelOpen && gateOpen) closeGate();\n }, [floating, panelOpen, gateOpen, closeGate]);\n\n /* ---- Document-wide shortcut ------------------------------------- */\n useEffect(() => {\n if (!parsedShortcut || typeof document === 'undefined') return;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.defaultPrevented || event.repeat || event.isComposing) {\n return;\n }\n if (!matchesShortcut(event, parsedShortcut)) return;\n const { status: now, disabled: off } = latest.current;\n // Disabled stops a start, never a stop.\n if (off && now !== 'starting' && now !== 'listening') return;\n event.preventDefault();\n requestToggleRef.current();\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [parsedShortcut]);\n\n /* ---- Agent handle ----------------------------------------------- */\n const handle = useMemo<VoiceControlPanelHandle>(\n () => ({\n getStatus: () => latest.current.status,\n start: () => {\n const { status: now, disabled: off } = latest.current;\n if (off || now === 'starting' || now === 'listening') return;\n // Gated like a user: without consent it shows the banner.\n requestToggleRef.current();\n },\n stop: () => {\n const { status: now } = latest.current;\n if (now !== 'starting' && now !== 'listening') return;\n // The same path as a press on Stop: never gated, always 'stop'.\n requestToggleRef.current();\n },\n getCandidateIds: () => latest.current.candidates.map((c) => c.id),\n pickCandidate: (candidateId: string) => {\n if (latest.current.disabled) return;\n if (!latest.current.candidates.some((c) => c.id === candidateId)) {\n return;\n }\n latest.current.onCandidatePick?.(candidateId);\n },\n isCommandsOpen: () => latest.current.commandsOpen,\n openCommands: () => setCommandsOpen(true),\n closeCommands: () => setCommandsOpen(false),\n isPanelOpen: () => latest.current.panelOpen,\n openPanel: () => setPanelOpen(true),\n closePanel: () => setPanelOpen(false),\n }),\n [setPanelOpen],\n );\n useAgentRegistration(voiceControlPanelAgent, handle, id);\n\n /* ---- Strings ---------------------------------------------------- */\n const statusLabel = t(`voiceControl.status.${status}`);\n const errorText = error ? t(`voiceControl.error.${error}`) : '';\n const messageText = message?.text ?? '';\n // The id lets a host repeat the same words and still be heard.\n const messageKey = messageText\n ? `${message?.id ?? ''}\\u0000${messageText}`\n : '';\n const hasCandidates = candidates.length > 0;\n const candidatesKey = candidates.map((c) => c.id).join('\\u0000');\n const active = status === 'starting' || status === 'listening';\n\n // The label always says what pressing does. While starting, pressing\n // cancels; the spinner, aria-busy and the \"Connecting\" status carry the\n // busy state.\n const buttonLabel =\n status === 'listening'\n ? t('voiceControl.action.stop')\n : status === 'starting'\n ? t('common.cancel')\n : status === 'paused'\n ? t('voiceControl.action.resume')\n : t('voiceControl.action.start');\n\n /* ---- One live region: status, error, message, matches ------------ */\n const [announcement, setAnnouncement] = useState({ text: '', count: 0 });\n const announced = useRef({\n status,\n errorText,\n messageKey,\n candidatesKey,\n });\n useEffect(() => {\n const before = announced.current;\n const parts: string[] = [];\n if (status !== before.status) parts.push(statusLabel);\n if (errorText && errorText !== before.errorText) parts.push(errorText);\n if (messageKey && messageKey !== before.messageKey) {\n parts.push(messageText);\n }\n // A new set of matches, not only the first one.\n if (candidatesKey && candidatesKey !== before.candidatesKey) {\n parts.push(candidatesLabel || t('voiceControl.candidates'));\n }\n announced.current = { status, errorText, messageKey, candidatesKey };\n if (parts.length > 0) {\n setAnnouncement((prev) => ({\n // A sentence break between parts gives the screen reader a pause:\n // \"Stopped. Microphone access is blocked…\". The break is a\n // translated template (Japanese ends a sentence with 。), skipped\n // when a part already ends one.\n text: parts.reduce((joined, part) =>\n SENTENCE_END.test(joined)\n ? `${joined} ${part}`\n : t('voiceControl.announcementJoin', {\n first: joined,\n next: part,\n }),\n ),\n count: prev.count + 1,\n }));\n }\n }, [\n t,\n status,\n statusLabel,\n errorText,\n messageKey,\n messageText,\n candidatesKey,\n candidatesLabel,\n ]);\n\n /* ---- Floating: open on its own when the user must act ------------ */\n // A new error (the session stopped) or a new set of matches (a choice\n // is waiting) opens the panel, without moving focus.\n const attention = useRef({ error, candidatesKey });\n useEffect(() => {\n const before = attention.current;\n attention.current = { error, candidatesKey };\n if (!floating) return;\n if (\n (error && error !== before.error) ||\n (candidatesKey && candidatesKey !== before.candidatesKey)\n ) {\n setPanelOpen(true);\n }\n }, [floating, error, candidatesKey, setPanelOpen]);\n\n /* ---- Floating: clearance for scrolled-to and focused content ----- */\n // See `_shared/floating-clearance.ts`. Closed: how far the pill reaches\n // up from the viewport's bottom edge, plus a gap. Open: the panel too,\n // but never more than half the viewport, so a tall panel on a short\n // screen cannot push the cursor's whole working area off the page.\n // Layout heights (offsetHeight), so the panel's grow-in zoom does not\n // shrink the reading.\n useEffect(() => {\n const el = rootRef.current;\n if (!floating || !el) return undefined;\n const owner = {};\n const measure = () => {\n const style = window.getComputedStyle(el);\n const gap = Number.parseFloat(style.rowGap) || 0;\n const closed =\n (Number.parseFloat(style.bottom) || 0) +\n (pillRef.current?.offsetHeight ?? 0) +\n gap;\n const panel = panelRef.current;\n const panelHeight = panel && !panel.hidden ? panel.offsetHeight : 0;\n publishFloatingClearance(\n owner,\n panelHeight > 0\n ? Math.max(\n closed,\n Math.min(closed + panelHeight + gap, window.innerHeight / 2),\n )\n : closed,\n );\n };\n measure();\n const observer =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(measure);\n observer?.observe(el);\n window.addEventListener('resize', measure);\n return () => {\n observer?.disconnect();\n window.removeEventListener('resize', measure);\n publishFloatingClearance(owner, null);\n };\n }, [floating]);\n\n /* ---- Floating: the pill's sparkle -------------------------------- */\n const sparkleOn = floating && aiSparkle;\n const {\n state: sparkleState,\n props: sparkleProps,\n land: landSparkle,\n } = useAiSparkle({ enabled: sparkleOn });\n const successKey = message?.tone === 'success' ? messageKey : '';\n const sparkledKey = useRef(successKey);\n useEffect(() => {\n if (successKey === sparkledKey.current) return;\n sparkledKey.current = successKey;\n if (sparkleOn && successKey) landSparkle();\n }, [sparkleOn, successKey, landSparkle]);\n\n /* ---- Focus after a pick ------------------------------------------ */\n // Picking a match usually makes the host clear the matches, which\n // unmounts the focused button and drops focus to <body>. Send it back to\n // the start/stop button instead. Only for a pick made on a match button.\n const restoreFocusRef = useRef(false);\n useEffect(() => {\n if (hasCandidates || !restoreFocusRef.current) return;\n restoreFocusRef.current = false;\n const focused =\n typeof document === 'undefined' ? null : document.activeElement;\n if (!focused || focused === document.body) toggleRef.current?.focus();\n }, [hasCandidates]);\n\n /* ---- Floating: Escape closes the panel ---------------------------- */\n // A native listener on the cluster: it hears keys from the pill and the\n // panel only, not from a portalled Select listbox, which closes itself.\n const closePanelRef = useRef<(refocus: boolean) => void>(() => {});\n useEffect(() => {\n const el = rootRef.current;\n if (!floating || !el) return undefined;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented) return;\n if (!latest.current.panelOpen) return;\n event.preventDefault();\n closePanelRef.current(true);\n };\n el.addEventListener('keydown', onKeyDown);\n return () => el.removeEventListener('keydown', onKeyDown);\n }, [floating]);\n\n /* ---- Floating: a close from anywhere keeps focus on the page ------ */\n // Closed by the host (`open={false}`) while focus is inside: send it to\n // the panel segment, not to <body>. Read before the browser moves it.\n const wasOpenRef = useRef(panelOpen);\n useIsomorphicLayoutEffect(() => {\n const wasOpen = wasOpenRef.current;\n wasOpenRef.current = panelOpen;\n if (!wasOpen || panelOpen || pendingFocusRef.current) return;\n const focused = document.activeElement;\n if (focused && panelRef.current?.contains(focused)) {\n requestFocus('launcher');\n }\n }, [panelOpen, requestFocus]);\n\n /* ---- Pending focus moves (declared last: runs after the others) -- */\n // Focus moves wait for the DOM to show the target (the panel and the\n // banner mount or unhide in the same commit that asks for focus).\n useEffect(() => {\n const target = pendingFocusRef.current;\n if (!target) return;\n pendingFocusRef.current = null;\n if (target === 'gate') {\n const gate = gateRef.current;\n // The banner's confirm checkbox, or the banner itself when the\n // reader may not grant (there is nothing to tick).\n const focusable =\n gate?.querySelector<HTMLElement>(\n '[role=\"checkbox\"]:not([disabled])',\n ) ??\n gate?.querySelector<HTMLElement>(\n '[data-component=\"ai-consent-banner\"]',\n );\n focusable?.focus();\n } else if (target === 'return') {\n const origin = gateReturnRef.current;\n gateReturnRef.current = null;\n // Still on the page and shown (a hidden panel has no boxes).\n if (origin?.isConnected && origin.getClientRects().length > 0) {\n origin.focus();\n } else if (latest.current.floating && !latest.current.panelOpen) {\n launcherRef.current?.focus();\n } else {\n toggleRef.current?.focus();\n }\n } else if (target === 'panel') {\n panelRef.current?.focus();\n } else if (target === 'toggle') {\n toggleRef.current?.focus();\n } else {\n launcherRef.current?.focus();\n }\n });\n\n /* ---- Settings --------------------------------------------------- */\n const languageOptions: SelectOption[] = (languages ?? []).map((l) => ({\n value: l.value,\n label: l.label,\n }));\n const showLanguage = languageOptions.length > 1;\n const hasSettings =\n showLanguage || (extraControls != null && extraControls !== false);\n\n const showTranscript =\n Boolean(transcript?.final) || Boolean(transcript?.partial);\n const busy = status === 'starting';\n\n const ToneIcon = message ? TONE_ICON[message.tone] : Info;\n\n /* ---- Pieces shared by both layouts ------------------------------ */\n // Escape and the close button send focus back where the panel was\n // opened from: the field Alt+V was pressed in (if it is still there),\n // or else the panel segment.\n const closePanel = (refocus: boolean) => {\n setPanelOpen(false);\n closeGate();\n if (refocus) requestFocus(gateReturnRef.current ? 'return' : 'launcher');\n };\n closePanelRef.current = closePanel;\n\n const header = (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]\">\n <p\n id={titleId}\n className=\"ds:m-0 type-label ds:font-semibold ds:text-[color:var(--foreground)]\"\n >\n {title ?? t('voiceControl.title')}\n </p>\n {beta ? (\n <Badge variant=\"brand\" size=\"sm\">\n {t('voiceControl.beta')}\n </Badge>\n ) : null}\n <span className=\"ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <span aria-hidden=\"true\" className={statusDotVariants({ status })}>\n {status === 'listening' ? (\n <span\n className={[\n 'ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)]',\n 'ds:bg-[color:var(--destructive)]',\n // No pulse in the accessible themes (--accessible-off).\n 'ds:motion-safe:animate-[var(--accessible-off,recorder-pulse_1.2s_ease-out_infinite)]',\n ].join(' ')}\n />\n ) : null}\n </span>\n <span data-voice-status=\"\">{statusLabel}</span>\n </span>\n {floating ? (\n <IconButton\n intent=\"ghost\"\n size=\"md\"\n icon={<X />}\n aria-label={t('common.close')}\n onClick={() => closePanel(true)}\n className={TARGET_SQUARE}\n data-voice-close=\"\"\n />\n ) : null}\n </div>\n );\n\n const betaNoticeLine = betaNotice ? (\n <p className=\"ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <Info aria-hidden=\"true\" className=\"ds:mt-px ds:size-4 ds:shrink-0\" />\n <span>{betaNotice}</span>\n </p>\n ) : null;\n\n // Without consent the banner takes the body: the same banner, Grant\n // control and busy state as the RichTextEditor's gate.\n const consentGate =\n showGate && aiConsent ? (\n <div\n ref={gateRef}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n data-voice-consent=\"\"\n >\n <AiConsentBanner\n // Focus lands here when the reader may not grant (nothing to tick).\n tabIndex={-1}\n granted={aiConsent.granted}\n grantedAt={aiConsent.grantedAt}\n grantedBy={aiConsent.grantedBy}\n // No handler, no Grant control: never a dead button.\n canGrant={\n (aiConsent.canGrant ?? true) && aiConsent.onGrant !== undefined\n }\n pending={grantPending}\n onGrantConsent={handleGrantConsent}\n headingLevel={aiConsentHeadingLevel}\n />\n <div className=\"ds:flex ds:justify-end\">\n <Button\n intent=\"ghost\"\n size=\"md\"\n onClick={() => {\n closeGate();\n requestFocus('return');\n }}\n className={TARGET_HEIGHT}\n >\n {t('common.close')}\n </Button>\n </div>\n </div>\n ) : null;\n\n const controls = (\n <>\n {/* Body: action | readout | settings. One column in a narrow\n container (the tool rail, the floating panel), three from 560px\n of panel width. */}\n <div className=\"ds:grid ds:grid-cols-1 ds:items-start ds:gap-[var(--spacing-sm)] ds:@[560px]/voice-control:grid-cols-[auto_minmax(0,1fr)_auto]\">\n <Button\n ref={toggleRef}\n intent={status === 'listening' ? 'outline' : 'primary'}\n background=\"surface\"\n size=\"md\"\n // Disabled stops a start, never a stop.\n disabled={disabled && !active}\n aria-busy={busy || undefined}\n aria-keyshortcuts={parsedShortcut?.aria}\n onClick={() => requestToggle()}\n startIcon={\n busy ? (\n <LoaderCircle className=\"ds:animate-[var(--accessible-off,spin_1s_linear_infinite)] ds:motion-reduce:animate-none\" />\n ) : status === 'listening' ? (\n <Square className=\"ds:fill-current\" />\n ) : (\n <AudioLines />\n )\n }\n className={`${TARGET_HEIGHT} ds:w-full ds:@[560px]/voice-control:w-auto`}\n data-voice-toggle=\"\"\n >\n {buttonLabel}\n </Button>\n\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n {target != null && target !== '' ? (\n <p className=\"ds:m-0 type-body-sm ds:font-semibold ds:[overflow-wrap:anywhere]\">\n {target}\n </p>\n ) : null}\n {showTranscript ? (\n <p\n className=\"ds:m-0 type-body-sm ds:[overflow-wrap:anywhere]\"\n data-voice-transcript=\"\"\n >\n <span className=\"ds:sr-only\">{t('voiceControl.heard')} </span>\n {transcript?.final ? (\n <span className=\"ds:text-[color:var(--foreground)]\">\n {transcript.final}\n </span>\n ) : null}\n {transcript?.final && transcript?.partial ? ' ' : null}\n {transcript?.partial ? (\n <span\n className=\"ds:italic ds:text-[color:var(--muted-foreground)]\"\n data-voice-partial=\"\"\n >\n {transcript.partial}\n </span>\n ) : null}\n </p>\n ) : status === 'listening' ? (\n // Holds the line while nothing has been heard yet, so the first\n // words do not push the panel down.\n <p\n aria-hidden=\"true\"\n className=\"ds:m-0 type-body-sm ds:min-h-[1lh]\"\n />\n ) : null}\n {error ? (\n <p className={messageVariants({ tone: 'error' })}>\n <CircleAlert\n aria-hidden=\"true\"\n className=\"ds:mt-px ds:size-4 ds:shrink-0\"\n />\n <span>{errorText}</span>\n </p>\n ) : null}\n {message && message.text ? (\n <p\n className={messageVariants({ tone: message.tone })}\n data-tone={message.tone}\n >\n <ToneIcon\n aria-hidden=\"true\"\n className=\"ds:mt-px ds:size-4 ds:shrink-0\"\n />\n <span>{message.text}</span>\n </p>\n ) : null}\n </div>\n\n {hasSettings ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:@[560px]/voice-control:flex-row ds:@[560px]/voice-control:flex-wrap ds:@[560px]/voice-control:items-end\">\n {showLanguage ? (\n // A visible, associated label (the kit FormField pattern).\n <FormField label={t('voiceControl.language')}>\n <Select\n options={languageOptions}\n value={language ?? ''}\n onValueChange={(next) => {\n if (next) onLanguageChange?.(next);\n }}\n disabled={disabled}\n />\n </FormField>\n ) : null}\n {extraControls}\n </div>\n ) : null}\n </div>\n\n {/* Matches, numbered as they are spoken (\"option 1\") */}\n {hasCandidates ? (\n <div\n role=\"group\"\n aria-labelledby={candidatesLabel ? candidatesLabelId : undefined}\n aria-label={\n candidatesLabel ? undefined : t('voiceControl.candidates')\n }\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n data-voice-candidates=\"\"\n >\n {candidatesLabel ? (\n <p\n id={candidatesLabelId}\n className=\"ds:m-0 type-body-sm ds:text-[color:var(--foreground)]\"\n >\n {candidatesLabel}\n </p>\n ) : null}\n <List as=\"ol\" density=\"compact\">\n {candidates.map((candidate, index) => (\n <List.Item\n key={candidate.id}\n title={\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => {\n restoreFocusRef.current = true;\n onCandidatePick?.(candidate.id);\n }}\n className={candidateButtonVariants()}\n data-candidate-id={candidate.id}\n >\n {/* One inline run, so the accessible name keeps\n its spaces: \"Option 1: Composite filling OTVE\". */}\n <span>\n <span className=\"ds:sr-only\">\n {t('voiceControl.candidate', {\n number: index + 1,\n })}\n </span>{' '}\n <span className=\"ds:font-medium\">\n {candidate.label}\n </span>\n {candidate.detail ? (\n <>\n {' '}\n <span className=\"ds:ms-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n {candidate.detail}\n </span>\n </>\n ) : null}\n </span>\n </button>\n }\n />\n ))}\n </List>\n </div>\n ) : null}\n\n {/* Voice commands, titled with the shortcut */}\n {commands && commands.length > 0 ? (\n <Collapsible open={commandsOpen} onOpenChange={setCommandsOpen}>\n <CollapsibleTrigger className={commandsTriggerVariants()}>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180\"\n />\n <span>\n {parsedShortcut ? (\n <Trans\n ns=\"ui\"\n i18nKey=\"voiceControl.commandsWithShortcut\"\n components={{\n shortcut: <ShortcutKeys keys={parsedShortcut.keys} />,\n }}\n />\n ) : (\n t('voiceControl.commands')\n )}\n </span>\n </CollapsibleTrigger>\n <CollapsibleContent\n aria-label={t('voiceControl.commands')}\n className=\"ds:pt-[var(--spacing-xs)]\"\n >\n <List density=\"compact\">\n {commands.map((command, index) => (\n <List.Item\n key={index}\n title={command.phrase}\n description={command.description}\n />\n ))}\n </List>\n </CollapsibleContent>\n </Collapsible>\n ) : null}\n </>\n );\n\n const content = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {header}\n {betaNoticeLine}\n {consentGate ?? controls}\n </div>\n );\n\n // Always mounted, polite, and outside anything that collapses: it keeps\n // speaking while the floating panel is closed. See the docs for why\n // errors are polite.\n const liveRegion = (\n <LiveRegion politeness=\"polite\" data-voice-announcer=\"\">\n {announcement.text\n ? // Alternate a trailing no-break space so the same words said\n // twice in a row still change the region and are announced.\n `${announcement.text}${announcement.count % 2 ? NO_BREAK_SPACE : ''}`\n : ''}\n </LiveRegion>\n );\n\n if (!floating) {\n return (\n <div\n ref={composedRef}\n role=\"group\"\n aria-labelledby={titleId}\n data-component=\"voice-control-panel\"\n data-component-id={id}\n data-status={status}\n id={id}\n {...rest}\n className={rootVariants({ status, className })}\n >\n {content}\n {liveRegion}\n </div>\n );\n }\n\n /* ---- Floating layout -------------------------------------------- */\n const listening = status === 'listening';\n // The state in words on the pill, so it never rests on colour alone:\n // \"Listening\" on the red segment, \"Paused\" on the plain one (paused and\n // idle would otherwise look the same with the panel closed).\n const showWord = listening || status === 'paused';\n // The visible word must stay inside the name (WCAG 2.5.3). English\n // \"Listening\" sits in \"Stop listening\"; \"Paused\" is not in \"Resume\n // listening\", nor is a translation always, so the word then leads the\n // name through a translated template: \"Paused: Resume listening\".\n const micLabel =\n showWord &&\n !buttonLabel.toLocaleLowerCase().includes(statusLabel.toLocaleLowerCase())\n ? t('voiceControl.statusWithAction', {\n status: statusLabel,\n action: buttonLabel,\n })\n : buttonLabel;\n return (\n <div\n ref={composedRef}\n data-component=\"voice-control-panel\"\n data-component-id={id}\n data-status={status}\n data-layout=\"floating\"\n data-position={position}\n data-open={panelOpen ? '' : undefined}\n id={id}\n {...rest}\n className={floatingRootVariants({ position, className })}\n >\n {/* Non-modal: no focus trap, no backdrop; the page stays usable. */}\n <div\n ref={panelRef}\n id={panelId}\n role=\"group\"\n aria-labelledby={titleId}\n tabIndex={-1}\n hidden={!panelOpen}\n className={floatingPanelVariants({ position })}\n data-voice-panel=\"\"\n >\n {content}\n </div>\n\n {/* The RichTextEditor's AI pill: mic | panel. */}\n <div\n ref={pillRef}\n className=\"ds:relative\"\n data-ai-sparkle={sparkleProps['data-ai-sparkle']}\n >\n <div className={aiFabPillClass} data-voice-pill=\"\">\n <button\n type=\"button\"\n onClick={() => requestToggle()}\n disabled={(disabled && !active) || undefined}\n aria-label={micLabel}\n aria-busy={busy || undefined}\n aria-keyshortcuts={parsedShortcut?.aria}\n className={aiFabSegmentVariants({\n // The word on the red needs 7:1 in the accessible themes:\n // `labelled` holds the hover red there.\n recording: listening ? 'labelled' : false,\n className: micSegmentVariants({ extended: showWord }),\n })}\n data-voice-mic=\"\"\n >\n {busy ? (\n <LoaderCircle\n aria-hidden=\"true\"\n className=\"ds:size-5 ds:animate-[var(--accessible-off,spin_1s_linear_infinite)] ds:motion-reduce:animate-none\"\n />\n ) : listening ? (\n <Square\n aria-hidden=\"true\"\n className=\"ds:size-5 ds:fill-current\"\n />\n ) : (\n <AudioLines aria-hidden=\"true\" className=\"ds:size-5\" />\n )}\n {/* The state in words, not colour alone; see micLabel. */}\n {showWord ? (\n <span className=\"type-label ds:whitespace-nowrap\">\n {statusLabel}\n </span>\n ) : null}\n </button>\n <span aria-hidden=\"true\" className={aiFabDividerClass} />\n <button\n ref={launcherRef}\n type=\"button\"\n onClick={() => {\n if (panelOpen) {\n closePanel(false);\n } else {\n // Opened from here: Escape comes back here.\n gateReturnRef.current = null;\n setPanelOpen(true);\n requestFocus('panel');\n }\n }}\n aria-label={t('voiceControl.panelToggle')}\n aria-expanded={panelOpen}\n aria-controls={panelId}\n className={aiFabSegmentVariants({ recording: false })}\n data-voice-launcher=\"\"\n >\n {/* Fixed glyph: aria-expanded carries open or closed. */}\n <SlidersHorizontal aria-hidden=\"true\" className=\"ds:size-5\" />\n </button>\n {sparkleState ? (\n <span\n aria-hidden=\"true\"\n className={`${aiFabSweepClass} ${sparkleProps.className}`}\n />\n ) : null}\n </div>\n <AiSparkle state={sparkleState} />\n </div>\n\n {liveRegion}\n </div>\n );\n },\n);\n\nVoiceControlPanel.displayName = 'VoiceControlPanel';\n"],"names":["__iconNode","AudioLines","createLucideIcon","voiceControlPanelAgent","handle","args","rootVariants","cva","statusDotVariants","messageVariants","focusRing","candidateButtonVariants","commandsTriggerVariants","floatingRootVariants","floatingPanelVariants","glassSurfaceClass","glassEntranceClass","micSegmentVariants","MODIFIER_ALIASES","parseVoiceShortcut","shortcut","parts","part","rawKey","modifiers","modifier","key","ordered","m","matchesShortcut","event","parsed","ShortcutKeys","keys","Kbd","TONE_ICON","Info","CircleCheck","TriangleAlert","CircleAlert","NO_CANDIDATES","TARGET_HEIGHT","TARGET_SQUARE","SENTENCE_END","NO_BREAK_SPACE","VoiceControlPanel","forwardRef","status","onToggle","disabled","title","beta","betaNotice","language","languages","onLanguageChange","extraControls","target","transcript","message","error","candidates","candidatesLabel","onCandidatePick","commands","defaultCommandsOpen","id","layout","position","open","defaultOpen","onOpenChange","aiSparkle","aiConsent","aiConsentHeadingLevel","className","rest","ref","t","useTranslation","titleId","useId","candidatesLabelId","panelId","commandsOpen","setCommandsOpen","useState","floating","rootRef","useRef","composedRef","useMemo","composeRefs","panelRef","gateRef","toggleRef","launcherRef","pillRef","parsedShortcut","useEffect","openState","setOpenState","controlled","panelOpen","aiBlocked","gateOpen","setGateOpen","showGate","resumeAfterGrantRef","grantRequestedRef","localGrantPending","setLocalGrantPending","grantPending","latest","pendingFocusRef","setFocusRequest","requestFocus","useCallback","gateReturnRef","stopSentRef","setPanelOpen","next","now","_a","closeGate","openGate","focused","requestToggle","off","blocked","requestToggleRef","handleGrantConsent","result","prevGrantedRef","wasGranted","nowGranted","resume","requestedHere","focusLost","onKeyDown","c","candidateId","_b","useAgentRegistration","statusLabel","errorText","messageText","messageKey","hasCandidates","candidatesKey","active","buttonLabel","announcement","setAnnouncement","announced","before","prev","joined","attention","el","owner","measure","style","gap","closed","panel","panelHeight","publishFloatingClearance","observer","sparkleOn","sparkleState","sparkleProps","landSparkle","useAiSparkle","successKey","sparkledKey","restoreFocusRef","closePanelRef","wasOpenRef","useIsomorphicLayoutEffect","wasOpen","gate","focusable","origin","_c","_d","_e","languageOptions","l","showLanguage","hasSettings","showTranscript","busy","ToneIcon","closePanel","refocus","header","jsxs","jsx","Badge","IconButton","X","betaNoticeLine","consentGate","AiConsentBanner","Button","controls","Fragment","LoaderCircle","Square","FormField","Select","List","candidate","index","Collapsible","CollapsibleTrigger","ChevronDown","Trans","CollapsibleContent","command","content","liveRegion","LiveRegion","listening","showWord","micLabel","aiFabPillClass","aiFabSegmentVariants","aiFabDividerClass","SlidersHorizontal","aiFabSweepClass","AiSparkle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAC3C,GACMC,KAAaC,GAAiB,eAAeF,EAAU,GCGhDG,KAAgE;AAAA,EAC3E,IAAI;AAAA,EACJ,cAAc,CAAC,WAAW,QAAQ,UAAU,QAAQ,OAAO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AAAA,oCAEL,QAAA,EAAK,eAAY,QAAO,WAAWI,IAAmB;AAAA,kBACvD,gBAAA/B;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,KAAKtG;AAAA,sBACL,MAAK;AAAA,sBACL,SAAS,MAAM;AACb,wBAAIO,IACF2F,GAAW,EAAK,KAGhB5E,EAAc,UAAU,MACxBE,EAAa,EAAI,GACjBJ,EAAa,OAAO;AAAA,sBAExB;AAAA,sBACA,cAAYtC,EAAE,0BAA0B;AAAA,sBACxC,iBAAeyB;AAAA,sBACf,iBAAepB;AAAA,sBACf,WAAWiJ,GAAqB,EAAE,WAAW,IAAO;AAAA,sBACpD,uBAAoB;AAAA,sBAGpB,4BAACE,IAAA,EAAkB,eAAY,QAAO,WAAU,aAAY;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAE7D5D,KACC,gBAAA4B;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,eAAY;AAAA,sBACZ,WAAW,GAAGiC,EAAe,IAAI5D,GAAa,SAAS;AAAA,oBAAA;AAAA,kBAAA,IAEvD;AAAA,gBAAA,GACN;AAAA,gBACA,gBAAA2B,EAACkC,IAAA,EAAU,OAAO9D,IAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGjCoD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAjL,GAAkB,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"voice-control-panel-BKbgb7FM.js","sources":["../../node_modules/lucide-react/dist/esm/icons/audio-lines.mjs","../../src/components/voice-control-panel/voice-control-panel.agent.ts","../../src/components/voice-control-panel/voice-control-panel.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M2 10v3\", key: \"1fnikh\" }],\n [\"path\", { d: \"M6 6v11\", key: \"11sgs0\" }],\n [\"path\", { d: \"M10 3v18\", key: \"yhl04a\" }],\n [\"path\", { d: \"M14 8v7\", key: \"3a1oy3\" }],\n [\"path\", { d: \"M18 5v13\", key: \"123xd1\" }],\n [\"path\", { d: \"M22 10v3\", key: \"154ddg\" }]\n];\nconst AudioLines = createLucideIcon(\"audio-lines\", __iconNode);\n\nexport { __iconNode, AudioLines as default };\n//# sourceMappingURL=audio-lines.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter: VoiceControlPanel. */\n/* */\n/* The panel draws a host-driven voice session; the host owns the */\n/* microphone and the speech service. `start_listening` / `stop_listening`*/\n/* call the same `onToggle` the button calls, but only in the direction */\n/* asked, so an agent never starts by mistake. They are `capture` and */\n/* `write` (start opens the microphone). Picking a match hands the host */\n/* an id through `onCandidatePick`, which the host turns into a write on */\n/* the patient's record, so it is `phi`. The commands disclosure is a */\n/* plain `expand`. In the floating layout the panel above the pill opens */\n/* and closes (`open` / `close`, `read`): closing never stops listening. */\n/* */\n/* No state slot returns the transcript, the target line or a message: */\n/* those can carry patient data the host put there. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { VoiceControlPanelHandle } from './voice-control-panel';\n\nexport const voiceControlPanelAgent: AgentAdapter<VoiceControlPanelHandle> = {\n id: 'voice-control-panel',\n capabilities: ['capture', 'pick', 'expand', 'open', 'close'],\n state: {\n status: {\n type: \"'idle' | 'starting' | 'listening' | 'paused' | 'error'\",\n descriptionKey: 'ui.agent.voiceControlPanel.state.status',\n description:\n 'Where the host voice session is: idle, starting, listening, paused or error.',\n read: (handle) => handle.getStatus(),\n },\n candidateIds: {\n type: 'string[]',\n descriptionKey: 'ui.agent.voiceControlPanel.state.candidateIds',\n description:\n 'Ids of the matches currently offered, in spoken order (option 1 first). Empty when there is nothing to choose.',\n read: (handle) => handle.getCandidateIds(),\n },\n commandsOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.voiceControlPanel.state.commandsOpen',\n description: 'True when the voice commands list is expanded.',\n read: (handle) => handle.isCommandsOpen(),\n },\n panelOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.voiceControlPanel.state.panelOpen',\n description:\n 'Floating layout: true when the panel above the pill is open. Always false inline.',\n read: (handle) => handle.isPanelOpen(),\n },\n },\n actions: {\n start_listening: {\n safety: 'write',\n idempotent: true,\n // The host streams the patient's audio to its transcription service.\n openWorld: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.startListening',\n description:\n 'Ask the host to start listening (it opens the microphone). Does nothing when already starting or listening, or while the panel is disabled.',\n errors: ['Microphone permission denied', 'Speech service unavailable'],\n invoke: (handle) => {\n handle.start();\n },\n },\n stop_listening: {\n safety: 'write',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.stopListening',\n description:\n 'Ask the host to stop listening, or to cancel a start. Does nothing when not starting or listening.',\n invoke: (handle) => {\n handle.stop();\n },\n },\n pick_candidate: {\n // The host turns the pick into a write on the patient's record (the\n // care plan adds a treatment line), so it is gated as PHI.\n safety: 'phi',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'One of the ids in the candidateIds state slot.',\n },\n },\n required: ['id'],\n additionalProperties: false,\n },\n descriptionKey: 'ui.agent.voiceControlPanel.actions.pickCandidate',\n description:\n 'Pick one of the offered matches by id, the same as saying its option number or pressing it. Unknown ids are ignored.',\n examples: [\n { args: { id: 'otve' }, note: 'Pick the match with id otve.' },\n ],\n invoke: (handle, args: { id: string }) => {\n handle.pickCandidate(args.id);\n },\n },\n open_commands: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.openCommands',\n description: 'Expand the voice commands list.',\n invoke: (handle) => {\n handle.openCommands();\n },\n },\n close_commands: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.closeCommands',\n description: 'Collapse the voice commands list.',\n invoke: (handle) => {\n handle.closeCommands();\n },\n },\n open_panel: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.openPanel',\n description:\n 'Floating layout: open the panel above the pill. Does nothing inline.',\n invoke: (handle) => {\n handle.openPanel();\n },\n },\n close_panel: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.voiceControlPanel.actions.closePanel',\n description:\n 'Floating layout: close the panel above the pill. Listening carries on. Does nothing inline.',\n invoke: (handle) => {\n handle.closePanel();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'voice-control-panel',\n description: 'Marks the VoiceControlPanel root.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop on VoiceControlPanel.',\n },\n item: {\n attr: 'data-candidate-id',\n description:\n 'On each match button, the candidate id that pick_candidate takes.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { Trans, useTranslation } from 'react-i18next';\nimport {\n AudioLines,\n ChevronDown,\n CircleAlert,\n CircleCheck,\n Info,\n LoaderCircle,\n SlidersHorizontal,\n Square,\n TriangleAlert,\n X,\n} from 'lucide-react';\nimport {\n AiConsentBanner,\n type AiConsentBannerHeadingLevel,\n type AiConsentGate,\n} from '../ai-permission-notice';\nimport { AiSparkle } from '../ai-sparkle';\nimport { Badge } from '../badge';\nimport { Button, IconButton } from '../button';\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from '../collapsible';\nimport { FormField } from '../form-field';\nimport { Kbd, type KbdNamedKey } from '../kbd';\nimport { List } from '../list';\nimport { LiveRegion } from '../live-region';\nimport { Select, type SelectOption } from '../select';\nimport {\n aiFabDividerClass,\n aiFabPillClass,\n aiFabSegmentVariants,\n aiFabSweepClass,\n} from '../_shared/ai-fab-pill';\nimport { composeRefs } from '../_shared/compose-refs';\nimport {\n glassEntranceClass,\n glassSurfaceClass,\n} from '../_shared/glass-surface';\nimport { publishFloatingClearance } from '../_shared/floating-clearance';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { useAiSparkle } from '../../hooks/use-ai-sparkle';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { voiceControlPanelAgent } from './voice-control-panel.agent';\n\n/* -------------------------------------------------------------------- */\n/* VoiceControlPanel */\n/* */\n/* The kit draws the voice-control UI; the host owns the microphone and */\n/* the speech service and drives the panel through props. The same split */\n/* as RichTextEditor's `onDictate`: no audio, no network, no parsing in */\n/* the kit. The panel is compact so it can sit inline above a chart today */\n/* and move into a tool rail later: a container query stacks it in a */\n/* narrow container. */\n/* */\n/* `layout=\"floating\"` draws the same panel as a non-modal companion */\n/* above the RichTextEditor's AI pill (shared recipe in */\n/* `_shared/ai-fab-pill.ts`), fixed to a viewport corner: mic | panel. */\n/* */\n/* `aiConsent` puts every start behind the patient AI-consent gate, the */\n/* same contract, banner and resume-after-grant as RichTextEditor. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\n/** Where the host's voice session is. */\nexport type VoiceControlStatus =\n | 'idle'\n | 'starting'\n | 'listening'\n | 'paused'\n | 'error';\n\n/** How a message reads: the tone decides the colour and the icon. */\nexport type VoiceControlTone = 'info' | 'success' | 'warning' | 'error';\n\n/** Generic failures the kit words itself, translated. */\nexport type VoiceControlError =\n | 'microphoneDenied'\n | 'connectionLost'\n | 'startFailed'\n | 'recordingFailed'\n | 'unsupported';\n\n/** A host message, already translated by the host. */\nexport interface VoiceControlMessage {\n tone: VoiceControlTone;\n text: string;\n /**\n * Change it to announce the same words again (the live region only speaks\n * when the message changes), e.g. a counter for \"Not recognised\" twice.\n */\n id?: string | number;\n}\n\n/** What the speech service heard. `partial` may still change. */\nexport interface VoiceControlTranscript {\n final?: string;\n partial?: string;\n}\n\n/** One dictation language the host's speech service accepts. */\nexport interface VoiceControlLanguage {\n value: string;\n label: string;\n}\n\n/** One match the user can pick by voice (\"option 1\") or by hand. */\nexport interface VoiceControlCandidate {\n id: string;\n label: string;\n detail?: string;\n}\n\n/** One voice command shown in the commands disclosure. */\nexport interface VoiceControlCommand {\n phrase: ReactNode;\n description: ReactNode;\n}\n\n/** What a press asks the host to do: start (or resume), or stop (or cancel\n * a start). */\nexport type VoiceControlToggle = 'start' | 'stop';\n\n/** Inline in the page flow, or a floating pill that opens the panel. */\nexport type VoiceControlLayout = 'inline' | 'floating';\n\n/** The viewport corner of the floating pill. Logical: mirrors in RTL. */\nexport type VoiceControlPosition = 'bottom-end' | 'bottom-start';\n\n/** Curated imperative handle for agent / external automation. */\nexport interface VoiceControlPanelHandle {\n getStatus: () => VoiceControlStatus;\n /** Ask the host to start (`onToggle('start')`) unless already starting\n * or listening, or disabled. Gated by `aiConsent` like a press. */\n start: () => void;\n /** Ask the host to stop or cancel a start (`onToggle('stop')`); a no-op\n * when not starting or listening. Never gated. */\n stop: () => void;\n getCandidateIds: () => string[];\n pickCandidate: (id: string) => void;\n isCommandsOpen: () => boolean;\n openCommands: () => void;\n closeCommands: () => void;\n /** Floating layout: whether the panel above the pill is open. Always\n * false inline. */\n isPanelOpen: () => boolean;\n /** Floating layout: open the panel (no focus move). A no-op inline. */\n openPanel: () => void;\n /** Floating layout: close the panel; listening carries on. A no-op inline. */\n closePanel: () => void;\n}\n\nexport interface VoiceControlPanelProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'title' | 'children' | 'onToggle'\n> {\n /** Where the host's voice session is. Drives the button, dot and status. */\n status: VoiceControlStatus;\n /**\n * The start/stop button, the pill's voice segment, the shortcut and the\n * agent call this, saying which way: `'start'` when idle, paused or\n * stopped, `'stop'` when starting or listening (stop, or cancel a start).\n * Every stop is passed on, so act on the argument rather than flip your\n * own state. A host that ignores the argument keeps working.\n */\n onToggle: (next: VoiceControlToggle) => void;\n /**\n * Stops a session from starting: disables the button, the shortcut, the\n * settings and the matches. A session already starting or listening can\n * still be stopped, so the microphone is never trapped on.\n */\n disabled?: boolean;\n /** Panel title. Default: the kit's \"Voice control\". */\n title?: ReactNode;\n /** Shows a \"Beta\" badge beside the title. */\n beta?: boolean;\n /** A host notice under the title, e.g. \"Free during the beta.\" */\n betaNotice?: ReactNode;\n /** The current dictation language (a `languages` value). */\n language?: string;\n /** Dictation languages. The select shows only with two or more. */\n languages?: VoiceControlLanguage[];\n onLanguageChange?: (value: string) => void;\n /** Extra settings beside the language, e.g. the periodontal route select. */\n extraControls?: ReactNode;\n /** The bold \"where am I\" line: the field or elements voice acts on. */\n target?: ReactNode;\n /** What the speech service heard: `final` reads normal, `partial` muted. */\n transcript?: VoiceControlTranscript;\n /** A host message. The tone sets colour and icon; not every message is red. */\n message?: VoiceControlMessage | null;\n /** A generic failure, worded and translated by the kit (tone: error). */\n error?: VoiceControlError | null;\n /** Several matches to choose from, numbered as they are spoken. */\n candidates?: VoiceControlCandidate[];\n /** Host label above the matches, e.g. \"Several matches: say 'option 1'…\". */\n candidatesLabel?: string;\n onCandidatePick?: (id: string) => void;\n /** Voice commands listed in the disclosure under the panel. */\n commands?: VoiceControlCommand[];\n /** Start with the commands disclosure open. */\n defaultCommandsOpen?: boolean;\n /**\n * Keyboard shortcut the kit binds document-wide to toggle, e.g. `\"Alt+V\"`\n * (default). Modifiers: Alt, Control, Shift, Meta. `false` turns it off.\n */\n shortcut?: string | false;\n /** Opaque instance id: `data-component-id` and agent registration. */\n id?: string;\n /**\n * `inline` (default): the panel sits in the page flow, above the chart.\n * `floating`: the RichTextEditor's AI pill (mic | panel) fixed to a\n * viewport corner; the second segment opens this panel above it, non-modal.\n */\n layout?: VoiceControlLayout;\n /**\n * Floating only: the viewport corner. Default `bottom-end`; `bottom-start`\n * moves the pill away from another floating widget (a chat bubble).\n */\n position?: VoiceControlPosition;\n /** Floating only: whether the panel above the pill is open (controlled). */\n open?: boolean;\n /** Floating only: the open state when uncontrolled. Default `false`. */\n defaultOpen?: boolean;\n /**\n * Floating only: called when the panel opens or closes, by the pill, the\n * close button, Escape, or on its own for an error or a set of matches.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Floating only: the pill's sparkle, as on the RichTextEditor's pill. It\n * plays once when the pill first shows and again when a success message\n * arrives (a write landed); never in a loop while listening. Default `true`.\n */\n aiSparkle?: boolean;\n /**\n * Patient AI-consent gate: voice sends patient audio to the host's speech\n * service. Same contract as RichTextEditor's `aiConsent`. While present and\n * not granted, every way of starting shows the `AiConsentBanner` instead of\n * calling `onToggle`; stopping is never gated. Omit for ungated behaviour.\n */\n aiConsent?: AiConsentGate;\n /** Heading level for the `AiConsentBanner` title. Default: the banner's. */\n aiConsentHeadingLevel?: AiConsentBannerHeadingLevel;\n}\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\nconst rootVariants = cva(\n [\n // The container query lives on the root and is read by descendants only,\n // never by a flex parent of its own (see the grid below).\n 'ds:@container/voice-control',\n 'ds:block ds:w-full ds:min-w-0',\n // The edge is --surface-border-width (1px, 2px in the accessible themes),\n // at zero specificity so the nearest theme root decides it.\n 'ds:rounded-[var(--radius-lg)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))]',\n 'ds:bg-[var(--card)] ds:text-[color:var(--foreground)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:print:hidden',\n ].join(' '),\n {\n variants: {\n // The border colour lives only here, never beside a base colour, so\n // the listening ring can't lose a race on stylesheet order.\n status: {\n idle: 'ds:border-[color:var(--card-border)]',\n starting: 'ds:border-[color:var(--card-border)]',\n listening: 'ds:border-[color:var(--ring)]',\n paused: 'ds:border-[color:var(--card-border)]',\n error: 'ds:border-[color:var(--card-border)]',\n },\n },\n defaultVariants: { status: 'idle' },\n },\n);\n\nconst statusDotVariants = cva(\n [\n 'ds:relative ds:inline-flex ds:size-2.5 ds:shrink-0 ds:rounded-[var(--radius-full)]',\n 'ds:forced-colors:border ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n {\n variants: {\n status: {\n idle: 'ds:border ds:border-[color:var(--muted-foreground)]',\n starting: 'ds:bg-[color:var(--muted-foreground)]',\n listening: 'ds:bg-[color:var(--destructive)]',\n paused: 'ds:bg-[color:var(--warning)]',\n error: 'ds:bg-[color:var(--error)]',\n },\n },\n defaultVariants: { status: 'idle' },\n },\n);\n\nconst messageVariants = cva(\n 'ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm',\n {\n variants: {\n tone: {\n info: 'ds:text-[color:var(--info-foreground)]',\n success: 'ds:text-[color:var(--success-foreground)]',\n warning: 'ds:text-[color:var(--warning-foreground)]',\n error: 'ds:text-[color:var(--error-foreground)]',\n },\n },\n defaultVariants: { tone: 'info' },\n },\n);\n\nconst focusRing =\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]';\n\nconst candidateButtonVariants = cva(\n [\n 'ds:flex ds:w-full ds:items-center',\n 'ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]',\n 'ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:py-[var(--spacing-2xs)]',\n 'ds:text-start ds:text-[color:var(--foreground)] ds:cursor-pointer',\n 'ds:hover:bg-[color:var(--muted)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n focusRing,\n ].join(' '),\n);\n\nconst commandsTriggerVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:min-h-[var(--min-target-size)] ds:py-[var(--spacing-2xs)]',\n 'ds:rounded-[var(--radius-sm)] type-meta ds:text-[color:var(--muted-foreground)] ds:text-start',\n 'ds:hover:text-[color:var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n focusRing,\n ].join(' '),\n);\n\n/* ---- Floating layout ------------------------------------------------ */\n\n// The fixed cluster: the panel stacked above the pill, in one viewport\n// corner. `--z-fixed` is the kit's layer for viewport-fixed controls (the\n// FloatingActionButton's): above sticky chrome, below a modal's backdrop, so\n// an open Dialog covers the pill and the page together. The Select listbox\n// the panel opens portals to <body> on its own `--z-dropdown` layer, above\n// this one. The cluster is as wide as the open panel; its empty corner lets\n// clicks through to the page.\nconst floatingRootVariants = cva(\n [\n 'ds:fixed ds:z-[var(--z-fixed)]',\n 'ds:bottom-[calc(var(--spacing-lg)+env(safe-area-inset-bottom,0px))]',\n 'ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]',\n 'ds:pointer-events-none ds:[&>*]:pointer-events-auto',\n 'ds:print:hidden',\n ].join(' '),\n {\n variants: {\n position: {\n 'bottom-end': 'ds:end-[var(--spacing-lg)] ds:items-end',\n 'bottom-start': 'ds:start-[var(--spacing-lg)] ds:items-start',\n },\n },\n defaultVariants: { position: 'bottom-end' },\n },\n);\n\n// The panel above the pill: the Help me write card's liquid glass (shared\n// recipe in `_shared/glass-surface.ts`, with its opaque fallback for the\n// accessible themes, more contrast, reduced transparency and forced\n// colours), so AI tools share one look. Compact: never wider than the\n// viewport minus the gutter on both sides, never taller than the room above\n// the pill; longer content scrolls inside. It grows out of the pill's\n// corner. `transform-origin` has no logical keywords, so the corner is\n// picked per position and direction: bottom-end is the bottom-right corner\n// in LTR and the bottom-left in RTL.\nconst floatingPanelVariants = cva(\n [\n 'ds:@container/voice-control',\n // Closed is `hidden`: never let a display utility win over it.\n 'ds:min-w-0 ds:[&[hidden]]:hidden',\n 'ds:[inline-size:min(24rem,calc(100vw-(var(--spacing-lg)*2)))]',\n 'ds:[max-block-size:calc(100dvh-var(--min-target-size)-(var(--spacing-lg)*2)-var(--spacing-sm)-env(safe-area-inset-bottom,0px))]',\n // On a phone the panel spans the screen, so it stops at half the height\n // (scrolling inside) and the voice cursor row above it stays in view.\n 'ds:max-sm:[max-block-size:calc(50dvh-var(--min-target-size)-(var(--spacing-lg)*2)-var(--spacing-sm)-env(safe-area-inset-bottom,0px))]',\n 'ds:overflow-y-auto ds:overscroll-contain',\n glassSurfaceClass,\n glassEntranceClass,\n 'ds:text-[color:var(--foreground)]',\n focusRing,\n ].join(' '),\n {\n variants: {\n position: {\n 'bottom-end': 'ds:origin-bottom-right ds:rtl:origin-bottom-left',\n 'bottom-start': 'ds:origin-bottom-left ds:rtl:origin-bottom-right',\n },\n },\n defaultVariants: { position: 'bottom-end' },\n },\n);\n\n// The pill's mic segment. While listening it carries the word \"Listening\"\n// beside the stop icon, so it widens like an extended FAB.\nconst micSegmentVariants = cva(\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n {\n variants: {\n extended: {\n true: 'ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-md)]',\n false: '',\n },\n },\n defaultVariants: { extended: false },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Shortcut */\n/* -------------------------------------------------------------------- */\n\ntype ShortcutModifier = Extract<\n KbdNamedKey,\n 'Alt' | 'Control' | 'Shift' | 'Meta'\n>;\n\ninterface ParsedShortcut {\n modifiers: Set<ShortcutModifier>;\n key: string;\n /** `aria-keyshortcuts` value, e.g. `Alt+V`. */\n aria: string;\n /** Keys for the kit Kbd, e.g. `['Alt', 'V']`. */\n keys: string[];\n}\n\nconst MODIFIER_ALIASES: Record<string, ShortcutModifier> = {\n alt: 'Alt',\n option: 'Alt',\n ctrl: 'Control',\n control: 'Control',\n shift: 'Shift',\n meta: 'Meta',\n cmd: 'Meta',\n command: 'Meta',\n};\n\n/** Parse `\"Alt+V\"`-style shortcuts. Returns null for an unusable string. */\nexport function parseVoiceShortcut(shortcut: string): ParsedShortcut | null {\n const parts = shortcut\n .split('+')\n .map((part) => part.trim())\n .filter(Boolean);\n if (parts.length === 0) return null;\n const rawKey = parts[parts.length - 1];\n const modifiers = new Set<ShortcutModifier>();\n for (const part of parts.slice(0, -1)) {\n const modifier = MODIFIER_ALIASES[part.toLowerCase()];\n if (!modifier) return null;\n modifiers.add(modifier);\n }\n const key = rawKey.length === 1 ? rawKey.toUpperCase() : rawKey;\n const ordered = (['Control', 'Alt', 'Shift', 'Meta'] as const).filter((m) =>\n modifiers.has(m),\n );\n return {\n modifiers,\n key,\n aria: [...ordered, key].join('+'),\n keys: [...ordered, key],\n };\n}\n\n/** Whether a keydown matches a parsed shortcut. Letters and digits match on\n * the physical key, so Alt+V still matches on macOS, where Option+V types\n * a different character. */\nfunction matchesShortcut(event: KeyboardEvent, parsed: ParsedShortcut) {\n if (event.altKey !== parsed.modifiers.has('Alt')) return false;\n if (event.ctrlKey !== parsed.modifiers.has('Control')) return false;\n if (event.shiftKey !== parsed.modifiers.has('Shift')) return false;\n if (event.metaKey !== parsed.modifiers.has('Meta')) return false;\n const { key } = parsed;\n if (/^[A-Z]$/.test(key)) return event.code === `Key${key}`;\n if (/^[0-9]$/.test(key)) return event.code === `Digit${key}`;\n return event.key.toLowerCase() === key.toLowerCase();\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\ntype FocusTarget = 'panel' | 'gate' | 'toggle' | 'launcher' | 'return';\n\n/** The shortcut as kit Kbd pills. `<Trans>` hands a placeholder component\n * `children` (null for a self-closing tag), which would switch Kbd to its\n * children path and render an empty pill, so this wrapper drops them. */\nfunction ShortcutKeys({ keys }: { keys: string[] }) {\n return <Kbd keys={keys} separator=\"plus\" size=\"sm\" />;\n}\n\nconst TONE_ICON: Record<VoiceControlTone, typeof Info> = {\n info: Info,\n success: CircleCheck,\n warning: TriangleAlert,\n error: CircleAlert,\n};\n\nconst NO_CANDIDATES: VoiceControlCandidate[] = [];\n\n// The kit's target size (44px, 48px in the accessible themes) on every\n// control in the panel, at every width: the panel is touch-first.\nconst TARGET_HEIGHT = 'ds:min-h-[var(--min-target-size)]';\nconst TARGET_SQUARE =\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]';\n\n/** A part that already ends a sentence, in Latin, CJK or Arabic script. */\nconst SENTENCE_END = /[.!?…:。.!?؟।]$/u;\n\n/** Appended on every other announcement so a repeat still changes the\n * region's text (and is read again). Invisible, and not trimmed away. */\nconst NO_BREAK_SPACE = '\\u00a0';\n\n/**\n * VoiceControlPanel: the kit UI for a host-driven voice control session.\n * The host keeps the microphone and the speech service; the panel shows the\n * state, what was heard, where the voice acts, messages and matches, and\n * calls `onToggle` from its button and its keyboard shortcut.\n */\nexport const VoiceControlPanel = forwardRef<\n HTMLDivElement,\n VoiceControlPanelProps\n>(\n (\n {\n status,\n onToggle,\n disabled = false,\n title,\n beta = false,\n betaNotice,\n language,\n languages,\n onLanguageChange,\n extraControls,\n target,\n transcript,\n message,\n error,\n candidates = NO_CANDIDATES,\n candidatesLabel,\n onCandidatePick,\n commands,\n defaultCommandsOpen = false,\n shortcut = 'Alt+V',\n id,\n layout = 'inline',\n position = 'bottom-end',\n open,\n defaultOpen = false,\n onOpenChange,\n aiSparkle = true,\n aiConsent,\n aiConsentHeadingLevel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const candidatesLabelId = useId();\n const panelId = useId();\n const [commandsOpen, setCommandsOpen] = useState(defaultCommandsOpen);\n const floating = layout === 'floating';\n\n const rootRef = useRef<HTMLDivElement>(null);\n const composedRef = useMemo(() => composeRefs(ref, rootRef), [ref]);\n const panelRef = useRef<HTMLDivElement>(null);\n const gateRef = useRef<HTMLDivElement>(null);\n const toggleRef = useRef<HTMLButtonElement>(null);\n const launcherRef = useRef<HTMLButtonElement>(null);\n const pillRef = useRef<HTMLDivElement>(null);\n\n const parsedShortcut = useMemo(\n () => (shortcut === false ? null : parseVoiceShortcut(shortcut)),\n [shortcut],\n );\n useEffect(() => {\n if (import.meta.env.DEV && shortcut !== false && !parsedShortcut) {\n console.warn(\n `VoiceControlPanel: shortcut \"${shortcut}\" is not a valid shortcut ` +\n '(use modifiers Alt, Control, Shift, Meta and one key, e.g. \"Alt+V\"); it is off.',\n );\n }\n }, [shortcut, parsedShortcut]);\n\n /* ---- Floating panel: open state ---------------------------------- */\n const [openState, setOpenState] = useState(defaultOpen);\n const controlled = open !== undefined;\n const panelOpen = floating && (controlled ? open : openState);\n\n /* ---- AI consent gate --------------------------------------------- */\n // Hard stop, whatever the UI state: no consent, no start.\n const aiBlocked = aiConsent !== undefined && !aiConsent.granted;\n const [gateOpen, setGateOpen] = useState(false);\n const showGate = gateOpen && aiBlocked;\n // A start was gated: resume it if consent is granted from this banner.\n const resumeAfterGrantRef = useRef(false);\n // Set only by a Grant click HERE. A `granted` that flips for any other\n // reason (another patient, another tab) must not start listening.\n const grantRequestedRef = useRef(false);\n const [localGrantPending, setLocalGrantPending] = useState(false);\n const grantPending = (aiConsent?.pending ?? false) || localGrantPending;\n\n /* ---- Latest values for listeners, callbacks and the agent handle -- */\n const latest = useRef({\n status,\n onToggle,\n disabled,\n candidates,\n onCandidatePick,\n commandsOpen,\n aiBlocked,\n floating,\n panelOpen,\n controlled,\n onOpenChange,\n });\n latest.current = {\n status,\n onToggle,\n disabled,\n candidates,\n onCandidatePick,\n commandsOpen,\n aiBlocked,\n floating,\n panelOpen,\n controlled,\n onOpenChange,\n };\n\n // A focus move waits for the DOM to show its target; asking for one\n // always re-renders, so it runs now, never at some later render.\n const pendingFocusRef = useRef<FocusTarget | null>(null);\n const [, setFocusRequest] = useState(0);\n const requestFocus = useCallback((target: FocusTarget) => {\n pendingFocusRef.current = target;\n setFocusRequest((n) => n + 1);\n }, []);\n // Where focus was when a start was gated, to go back on Close.\n const gateReturnRef = useRef<HTMLElement | null>(null);\n // Consent withdrawn mid-session: the one automatic stop already sent.\n const stopSentRef = useRef(false);\n\n const setPanelOpen = useCallback((next: boolean) => {\n const now = latest.current;\n if (!now.floating || now.panelOpen === next) return;\n if (!now.controlled) setOpenState(next);\n now.onOpenChange?.(next);\n }, []);\n\n const closeGate = useCallback(() => {\n resumeAfterGrantRef.current = false;\n grantRequestedRef.current = false;\n setGateOpen(false);\n }, []);\n\n const openGate = useCallback(() => {\n const focused =\n typeof document === 'undefined' ? null : document.activeElement;\n gateReturnRef.current =\n focused instanceof HTMLElement && focused !== document.body\n ? focused\n : null;\n resumeAfterGrantRef.current = true;\n setGateOpen(true);\n setPanelOpen(true);\n requestFocus('gate');\n }, [setPanelOpen, requestFocus]);\n\n // The one way in for the button, the pill's mic, the shortcut and the\n // agent: stopping (or cancelling a start) is never gated; starting is,\n // while consent is missing.\n const requestToggle = useCallback(() => {\n const { status: now, disabled: off, aiBlocked: blocked } = latest.current;\n if (now === 'starting' || now === 'listening') {\n // Every stop reaches the host, never swallowed: it says 'stop', so a\n // repeat cannot be read as a start.\n latest.current.onToggle('stop');\n return;\n }\n if (off) return;\n if (blocked) {\n openGate();\n return;\n }\n latest.current.onToggle('start');\n }, [openGate]);\n const requestToggleRef = useRef(requestToggle);\n requestToggleRef.current = requestToggle;\n\n const handleGrantConsent = useCallback(() => {\n grantRequestedRef.current = true;\n const result = aiConsent?.onGrant?.();\n if (result && typeof (result as Promise<void>).then === 'function') {\n setLocalGrantPending(true);\n Promise.resolve(result)\n .catch(() => {\n // The host shows its own failure UI (`pending`, a fresh\n // `granted: false`). This click no longer counts as the grant,\n // so a later grant from elsewhere will not start listening.\n grantRequestedRef.current = false;\n })\n .finally(() => setLocalGrantPending(false));\n }\n }, [aiConsent]);\n\n // Granted after a Grant click here: start listening, as the editor\n // resumes the action it gated. Granted any other way: close the banner.\n const prevGrantedRef = useRef(aiConsent?.granted ?? true);\n useEffect(() => {\n const wasGranted = prevGrantedRef.current;\n const nowGranted = aiConsent?.granted ?? true;\n prevGrantedRef.current = nowGranted;\n if (wasGranted || !nowGranted) return;\n const resume = resumeAfterGrantRef.current;\n const requestedHere = grantRequestedRef.current;\n resumeAfterGrantRef.current = false;\n grantRequestedRef.current = false;\n setGateOpen(false);\n if (!resume) return;\n const focusLost =\n typeof document === 'undefined' ||\n !document.activeElement ||\n document.activeElement === document.body;\n if (requestedHere) {\n const { status: now, disabled: off } = latest.current;\n if (!off && now !== 'starting' && now !== 'listening') {\n latest.current.onToggle('start');\n }\n gateReturnRef.current = null;\n requestFocus('toggle');\n } else if (focusLost) {\n requestFocus('toggle');\n }\n }, [aiConsent?.granted, requestFocus]);\n\n // Consent withdrawn (or the patient changed) mid-session: stop, once.\n useEffect(() => {\n const running = status === 'starting' || status === 'listening';\n if (!running || !aiBlocked) {\n stopSentRef.current = false;\n return;\n }\n if (stopSentRef.current) return;\n stopSentRef.current = true;\n latest.current.onToggle('stop');\n }, [aiBlocked, status]);\n\n // Closing the floating panel closes the banner inside it too.\n useEffect(() => {\n if (floating && !panelOpen && gateOpen) closeGate();\n }, [floating, panelOpen, gateOpen, closeGate]);\n\n /* ---- Document-wide shortcut ------------------------------------- */\n useEffect(() => {\n if (!parsedShortcut || typeof document === 'undefined') return;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.defaultPrevented || event.repeat || event.isComposing) {\n return;\n }\n if (!matchesShortcut(event, parsedShortcut)) return;\n const { status: now, disabled: off } = latest.current;\n // Disabled stops a start, never a stop.\n if (off && now !== 'starting' && now !== 'listening') return;\n event.preventDefault();\n requestToggleRef.current();\n };\n document.addEventListener('keydown', onKeyDown);\n return () => document.removeEventListener('keydown', onKeyDown);\n }, [parsedShortcut]);\n\n /* ---- Agent handle ----------------------------------------------- */\n const handle = useMemo<VoiceControlPanelHandle>(\n () => ({\n getStatus: () => latest.current.status,\n start: () => {\n const { status: now, disabled: off } = latest.current;\n if (off || now === 'starting' || now === 'listening') return;\n // Gated like a user: without consent it shows the banner.\n requestToggleRef.current();\n },\n stop: () => {\n const { status: now } = latest.current;\n if (now !== 'starting' && now !== 'listening') return;\n // The same path as a press on Stop: never gated, always 'stop'.\n requestToggleRef.current();\n },\n getCandidateIds: () => latest.current.candidates.map((c) => c.id),\n pickCandidate: (candidateId: string) => {\n if (latest.current.disabled) return;\n if (!latest.current.candidates.some((c) => c.id === candidateId)) {\n return;\n }\n latest.current.onCandidatePick?.(candidateId);\n },\n isCommandsOpen: () => latest.current.commandsOpen,\n openCommands: () => setCommandsOpen(true),\n closeCommands: () => setCommandsOpen(false),\n isPanelOpen: () => latest.current.panelOpen,\n openPanel: () => setPanelOpen(true),\n closePanel: () => setPanelOpen(false),\n }),\n [setPanelOpen],\n );\n useAgentRegistration(voiceControlPanelAgent, handle, id);\n\n /* ---- Strings ---------------------------------------------------- */\n const statusLabel = t(`voiceControl.status.${status}`);\n const errorText = error ? t(`voiceControl.error.${error}`) : '';\n const messageText = message?.text ?? '';\n // The id lets a host repeat the same words and still be heard.\n const messageKey = messageText\n ? `${message?.id ?? ''}\\u0000${messageText}`\n : '';\n const hasCandidates = candidates.length > 0;\n const candidatesKey = candidates.map((c) => c.id).join('\\u0000');\n const active = status === 'starting' || status === 'listening';\n\n // The label always says what pressing does. While starting, pressing\n // cancels; the spinner, aria-busy and the \"Connecting\" status carry the\n // busy state.\n const buttonLabel =\n status === 'listening'\n ? t('voiceControl.action.stop')\n : status === 'starting'\n ? t('common.cancel')\n : status === 'paused'\n ? t('voiceControl.action.resume')\n : t('voiceControl.action.start');\n\n /* ---- One live region: status, error, message, matches ------------ */\n const [announcement, setAnnouncement] = useState({ text: '', count: 0 });\n const announced = useRef({\n status,\n errorText,\n messageKey,\n candidatesKey,\n });\n useEffect(() => {\n const before = announced.current;\n const parts: string[] = [];\n if (status !== before.status) parts.push(statusLabel);\n if (errorText && errorText !== before.errorText) parts.push(errorText);\n if (messageKey && messageKey !== before.messageKey) {\n parts.push(messageText);\n }\n // A new set of matches, not only the first one.\n if (candidatesKey && candidatesKey !== before.candidatesKey) {\n parts.push(candidatesLabel || t('voiceControl.candidates'));\n }\n announced.current = { status, errorText, messageKey, candidatesKey };\n if (parts.length > 0) {\n setAnnouncement((prev) => ({\n // A sentence break between parts gives the screen reader a pause:\n // \"Stopped. Microphone access is blocked…\". The break is a\n // translated template (Japanese ends a sentence with 。), skipped\n // when a part already ends one.\n text: parts.reduce((joined, part) =>\n SENTENCE_END.test(joined)\n ? `${joined} ${part}`\n : t('voiceControl.announcementJoin', {\n first: joined,\n next: part,\n }),\n ),\n count: prev.count + 1,\n }));\n }\n }, [\n t,\n status,\n statusLabel,\n errorText,\n messageKey,\n messageText,\n candidatesKey,\n candidatesLabel,\n ]);\n\n /* ---- Floating: open on its own when the user must act ------------ */\n // A new error (the session stopped) or a new set of matches (a choice\n // is waiting) opens the panel, without moving focus.\n const attention = useRef({ error, candidatesKey });\n useEffect(() => {\n const before = attention.current;\n attention.current = { error, candidatesKey };\n if (!floating) return;\n if (\n (error && error !== before.error) ||\n (candidatesKey && candidatesKey !== before.candidatesKey)\n ) {\n setPanelOpen(true);\n }\n }, [floating, error, candidatesKey, setPanelOpen]);\n\n /* ---- Floating: clearance for scrolled-to and focused content ----- */\n // See `_shared/floating-clearance.ts`. Closed: how far the pill reaches\n // up from the viewport's bottom edge, plus a gap. Open: the panel too,\n // but never more than half the viewport, so a tall panel on a short\n // screen cannot push the cursor's whole working area off the page.\n // Layout heights (offsetHeight), so the panel's grow-in zoom does not\n // shrink the reading.\n useEffect(() => {\n const el = rootRef.current;\n if (!floating || !el) return undefined;\n const owner = {};\n const measure = () => {\n const style = window.getComputedStyle(el);\n const gap = Number.parseFloat(style.rowGap) || 0;\n const closed =\n (Number.parseFloat(style.bottom) || 0) +\n (pillRef.current?.offsetHeight ?? 0) +\n gap;\n const panel = panelRef.current;\n const panelHeight = panel && !panel.hidden ? panel.offsetHeight : 0;\n publishFloatingClearance(\n owner,\n panelHeight > 0\n ? Math.max(\n closed,\n Math.min(closed + panelHeight + gap, window.innerHeight / 2),\n )\n : closed,\n );\n };\n measure();\n const observer =\n typeof ResizeObserver === 'undefined'\n ? null\n : new ResizeObserver(measure);\n observer?.observe(el);\n window.addEventListener('resize', measure);\n return () => {\n observer?.disconnect();\n window.removeEventListener('resize', measure);\n publishFloatingClearance(owner, null);\n };\n }, [floating]);\n\n /* ---- Floating: the pill's sparkle -------------------------------- */\n const sparkleOn = floating && aiSparkle;\n const {\n state: sparkleState,\n props: sparkleProps,\n land: landSparkle,\n } = useAiSparkle({ enabled: sparkleOn });\n const successKey = message?.tone === 'success' ? messageKey : '';\n const sparkledKey = useRef(successKey);\n useEffect(() => {\n if (successKey === sparkledKey.current) return;\n sparkledKey.current = successKey;\n if (sparkleOn && successKey) landSparkle();\n }, [sparkleOn, successKey, landSparkle]);\n\n /* ---- Focus after a pick ------------------------------------------ */\n // Picking a match usually makes the host clear the matches, which\n // unmounts the focused button and drops focus to <body>. Send it back to\n // the start/stop button instead. Only for a pick made on a match button.\n const restoreFocusRef = useRef(false);\n useEffect(() => {\n if (hasCandidates || !restoreFocusRef.current) return;\n restoreFocusRef.current = false;\n const focused =\n typeof document === 'undefined' ? null : document.activeElement;\n if (!focused || focused === document.body) toggleRef.current?.focus();\n }, [hasCandidates]);\n\n /* ---- Floating: Escape closes the panel ---------------------------- */\n // A native listener on the cluster: it hears keys from the pill and the\n // panel only, not from a portalled Select listbox, which closes itself.\n const closePanelRef = useRef<(refocus: boolean) => void>(() => {});\n useEffect(() => {\n const el = rootRef.current;\n if (!floating || !el) return undefined;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape' || event.defaultPrevented) return;\n if (!latest.current.panelOpen) return;\n event.preventDefault();\n closePanelRef.current(true);\n };\n el.addEventListener('keydown', onKeyDown);\n return () => el.removeEventListener('keydown', onKeyDown);\n }, [floating]);\n\n /* ---- Floating: a close from anywhere keeps focus on the page ------ */\n // Closed by the host (`open={false}`) while focus is inside: send it to\n // the panel segment, not to <body>. Read before the browser moves it.\n const wasOpenRef = useRef(panelOpen);\n useIsomorphicLayoutEffect(() => {\n const wasOpen = wasOpenRef.current;\n wasOpenRef.current = panelOpen;\n if (!wasOpen || panelOpen || pendingFocusRef.current) return;\n const focused = document.activeElement;\n if (focused && panelRef.current?.contains(focused)) {\n requestFocus('launcher');\n }\n }, [panelOpen, requestFocus]);\n\n /* ---- Pending focus moves (declared last: runs after the others) -- */\n // Focus moves wait for the DOM to show the target (the panel and the\n // banner mount or unhide in the same commit that asks for focus).\n useEffect(() => {\n const target = pendingFocusRef.current;\n if (!target) return;\n pendingFocusRef.current = null;\n if (target === 'gate') {\n const gate = gateRef.current;\n // The banner's confirm checkbox, or the banner itself when the\n // reader may not grant (there is nothing to tick).\n const focusable =\n gate?.querySelector<HTMLElement>(\n '[role=\"checkbox\"]:not([disabled])',\n ) ??\n gate?.querySelector<HTMLElement>(\n '[data-component=\"ai-consent-banner\"]',\n );\n focusable?.focus();\n } else if (target === 'return') {\n const origin = gateReturnRef.current;\n gateReturnRef.current = null;\n // Still on the page and shown (a hidden panel has no boxes).\n if (origin?.isConnected && origin.getClientRects().length > 0) {\n origin.focus();\n } else if (latest.current.floating && !latest.current.panelOpen) {\n launcherRef.current?.focus();\n } else {\n toggleRef.current?.focus();\n }\n } else if (target === 'panel') {\n panelRef.current?.focus();\n } else if (target === 'toggle') {\n toggleRef.current?.focus();\n } else {\n launcherRef.current?.focus();\n }\n });\n\n /* ---- Settings --------------------------------------------------- */\n const languageOptions: SelectOption[] = (languages ?? []).map((l) => ({\n value: l.value,\n label: l.label,\n }));\n const showLanguage = languageOptions.length > 1;\n const hasSettings =\n showLanguage || (extraControls != null && extraControls !== false);\n\n const showTranscript =\n Boolean(transcript?.final) || Boolean(transcript?.partial);\n const busy = status === 'starting';\n\n const ToneIcon = message ? TONE_ICON[message.tone] : Info;\n\n /* ---- Pieces shared by both layouts ------------------------------ */\n // Escape and the close button send focus back where the panel was\n // opened from: the field Alt+V was pressed in (if it is still there),\n // or else the panel segment.\n const closePanel = (refocus: boolean) => {\n setPanelOpen(false);\n closeGate();\n if (refocus) requestFocus(gateReturnRef.current ? 'return' : 'launcher');\n };\n closePanelRef.current = closePanel;\n\n const header = (\n <div className=\"ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]\">\n <p\n id={titleId}\n className=\"ds:m-0 type-label ds:font-semibold ds:text-[color:var(--foreground)]\"\n >\n {title ?? t('voiceControl.title')}\n </p>\n {beta ? (\n <Badge variant=\"brand\" size=\"sm\">\n {t('voiceControl.beta')}\n </Badge>\n ) : null}\n <span className=\"ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <span aria-hidden=\"true\" className={statusDotVariants({ status })}>\n {status === 'listening' ? (\n <span\n className={[\n 'ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)]',\n 'ds:bg-[color:var(--destructive)]',\n // No pulse in the accessible themes (--accessible-off).\n 'ds:motion-safe:animate-[var(--accessible-off,recorder-pulse_1.2s_ease-out_infinite)]',\n ].join(' ')}\n />\n ) : null}\n </span>\n <span data-voice-status=\"\">{statusLabel}</span>\n </span>\n {floating ? (\n <IconButton\n intent=\"ghost\"\n size=\"md\"\n icon={<X />}\n aria-label={t('common.close')}\n onClick={() => closePanel(true)}\n className={TARGET_SQUARE}\n data-voice-close=\"\"\n />\n ) : null}\n </div>\n );\n\n const betaNoticeLine = betaNotice ? (\n <p className=\"ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <Info aria-hidden=\"true\" className=\"ds:mt-px ds:size-4 ds:shrink-0\" />\n <span>{betaNotice}</span>\n </p>\n ) : null;\n\n // Without consent the banner takes the body: the same banner, Grant\n // control and busy state as the RichTextEditor's gate.\n const consentGate =\n showGate && aiConsent ? (\n <div\n ref={gateRef}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n data-voice-consent=\"\"\n >\n <AiConsentBanner\n // Focus lands here when the reader may not grant (nothing to tick).\n tabIndex={-1}\n granted={aiConsent.granted}\n grantedAt={aiConsent.grantedAt}\n grantedBy={aiConsent.grantedBy}\n // No handler, no Grant control: never a dead button.\n canGrant={\n (aiConsent.canGrant ?? true) && aiConsent.onGrant !== undefined\n }\n pending={grantPending}\n onGrantConsent={handleGrantConsent}\n headingLevel={aiConsentHeadingLevel}\n />\n <div className=\"ds:flex ds:justify-end\">\n <Button\n intent=\"ghost\"\n size=\"md\"\n onClick={() => {\n closeGate();\n requestFocus('return');\n }}\n className={TARGET_HEIGHT}\n >\n {t('common.close')}\n </Button>\n </div>\n </div>\n ) : null;\n\n const controls = (\n <>\n {/* Body: action | readout | settings. One column in a narrow\n container (the tool rail, the floating panel), three from 560px\n of panel width. */}\n <div className=\"ds:grid ds:grid-cols-1 ds:items-start ds:gap-[var(--spacing-sm)] ds:@[560px]/voice-control:grid-cols-[auto_minmax(0,1fr)_auto]\">\n <Button\n ref={toggleRef}\n intent={status === 'listening' ? 'outline' : 'primary'}\n background=\"surface\"\n size=\"md\"\n // Disabled stops a start, never a stop.\n disabled={disabled && !active}\n aria-busy={busy || undefined}\n aria-keyshortcuts={parsedShortcut?.aria}\n onClick={() => requestToggle()}\n startIcon={\n busy ? (\n <LoaderCircle className=\"ds:animate-[var(--accessible-off,spin_1s_linear_infinite)] ds:motion-reduce:animate-none\" />\n ) : status === 'listening' ? (\n <Square className=\"ds:fill-current\" />\n ) : (\n <AudioLines />\n )\n }\n className={`${TARGET_HEIGHT} ds:w-full ds:@[560px]/voice-control:w-auto`}\n data-voice-toggle=\"\"\n >\n {buttonLabel}\n </Button>\n\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n {target != null && target !== '' ? (\n <p className=\"ds:m-0 type-body-sm ds:font-semibold ds:[overflow-wrap:anywhere]\">\n {target}\n </p>\n ) : null}\n {showTranscript ? (\n <p\n className=\"ds:m-0 type-body-sm ds:[overflow-wrap:anywhere]\"\n data-voice-transcript=\"\"\n >\n <span className=\"ds:sr-only\">{t('voiceControl.heard')} </span>\n {transcript?.final ? (\n <span className=\"ds:text-[color:var(--foreground)]\">\n {transcript.final}\n </span>\n ) : null}\n {transcript?.final && transcript?.partial ? ' ' : null}\n {transcript?.partial ? (\n <span\n className=\"ds:italic ds:text-[color:var(--muted-foreground)]\"\n data-voice-partial=\"\"\n >\n {transcript.partial}\n </span>\n ) : null}\n </p>\n ) : status === 'listening' ? (\n // Holds the line while nothing has been heard yet, so the first\n // words do not push the panel down.\n <p\n aria-hidden=\"true\"\n className=\"ds:m-0 type-body-sm ds:min-h-[1lh]\"\n />\n ) : null}\n {error ? (\n <p className={messageVariants({ tone: 'error' })}>\n <CircleAlert\n aria-hidden=\"true\"\n className=\"ds:mt-px ds:size-4 ds:shrink-0\"\n />\n <span>{errorText}</span>\n </p>\n ) : null}\n {message && message.text ? (\n <p\n className={messageVariants({ tone: message.tone })}\n data-tone={message.tone}\n >\n <ToneIcon\n aria-hidden=\"true\"\n className=\"ds:mt-px ds:size-4 ds:shrink-0\"\n />\n <span>{message.text}</span>\n </p>\n ) : null}\n </div>\n\n {hasSettings ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:@[560px]/voice-control:flex-row ds:@[560px]/voice-control:flex-wrap ds:@[560px]/voice-control:items-end\">\n {showLanguage ? (\n // A visible, associated label (the kit FormField pattern).\n <FormField label={t('voiceControl.language')}>\n <Select\n options={languageOptions}\n value={language ?? ''}\n onValueChange={(next) => {\n if (next) onLanguageChange?.(next);\n }}\n disabled={disabled}\n />\n </FormField>\n ) : null}\n {extraControls}\n </div>\n ) : null}\n </div>\n\n {/* Matches, numbered as they are spoken (\"option 1\") */}\n {hasCandidates ? (\n <div\n role=\"group\"\n aria-labelledby={candidatesLabel ? candidatesLabelId : undefined}\n aria-label={\n candidatesLabel ? undefined : t('voiceControl.candidates')\n }\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\"\n data-voice-candidates=\"\"\n >\n {candidatesLabel ? (\n <p\n id={candidatesLabelId}\n className=\"ds:m-0 type-body-sm ds:text-[color:var(--foreground)]\"\n >\n {candidatesLabel}\n </p>\n ) : null}\n <List as=\"ol\" density=\"compact\">\n {candidates.map((candidate, index) => (\n <List.Item\n key={candidate.id}\n title={\n <button\n type=\"button\"\n disabled={disabled}\n onClick={() => {\n restoreFocusRef.current = true;\n onCandidatePick?.(candidate.id);\n }}\n className={candidateButtonVariants()}\n data-candidate-id={candidate.id}\n >\n {/* One inline run, so the accessible name keeps\n its spaces: \"Option 1: Composite filling OTVE\". */}\n <span>\n <span className=\"ds:sr-only\">\n {t('voiceControl.candidate', {\n number: index + 1,\n })}\n </span>{' '}\n <span className=\"ds:font-medium\">\n {candidate.label}\n </span>\n {candidate.detail ? (\n <>\n {' '}\n <span className=\"ds:ms-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n {candidate.detail}\n </span>\n </>\n ) : null}\n </span>\n </button>\n }\n />\n ))}\n </List>\n </div>\n ) : null}\n\n {/* Voice commands, titled with the shortcut */}\n {commands && commands.length > 0 ? (\n <Collapsible open={commandsOpen} onOpenChange={setCommandsOpen}>\n <CollapsibleTrigger className={commandsTriggerVariants()}>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:shrink-0 ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180\"\n />\n <span>\n {parsedShortcut ? (\n <Trans\n ns=\"ui\"\n i18nKey=\"voiceControl.commandsWithShortcut\"\n components={{\n shortcut: <ShortcutKeys keys={parsedShortcut.keys} />,\n }}\n />\n ) : (\n t('voiceControl.commands')\n )}\n </span>\n </CollapsibleTrigger>\n <CollapsibleContent\n aria-label={t('voiceControl.commands')}\n className=\"ds:pt-[var(--spacing-xs)]\"\n >\n <List density=\"compact\">\n {commands.map((command, index) => (\n <List.Item\n key={index}\n title={command.phrase}\n description={command.description}\n />\n ))}\n </List>\n </CollapsibleContent>\n </Collapsible>\n ) : null}\n </>\n );\n\n const content = (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {header}\n {betaNoticeLine}\n {consentGate ?? controls}\n </div>\n );\n\n // Always mounted, polite, and outside anything that collapses: it keeps\n // speaking while the floating panel is closed. See the docs for why\n // errors are polite.\n const liveRegion = (\n <LiveRegion politeness=\"polite\" data-voice-announcer=\"\">\n {announcement.text\n ? // Alternate a trailing no-break space so the same words said\n // twice in a row still change the region and are announced.\n `${announcement.text}${announcement.count % 2 ? NO_BREAK_SPACE : ''}`\n : ''}\n </LiveRegion>\n );\n\n if (!floating) {\n return (\n <div\n ref={composedRef}\n role=\"group\"\n aria-labelledby={titleId}\n data-component=\"voice-control-panel\"\n data-component-id={id}\n data-status={status}\n id={id}\n {...rest}\n className={rootVariants({ status, className })}\n >\n {content}\n {liveRegion}\n </div>\n );\n }\n\n /* ---- Floating layout -------------------------------------------- */\n const listening = status === 'listening';\n // The state in words on the pill, so it never rests on colour alone:\n // \"Listening\" on the red segment, \"Paused\" on the plain one (paused and\n // idle would otherwise look the same with the panel closed).\n const showWord = listening || status === 'paused';\n // The visible word must stay inside the name (WCAG 2.5.3). English\n // \"Listening\" sits in \"Stop listening\"; \"Paused\" is not in \"Resume\n // listening\", nor is a translation always, so the word then leads the\n // name through a translated template: \"Paused: Resume listening\".\n const micLabel =\n showWord &&\n !buttonLabel.toLocaleLowerCase().includes(statusLabel.toLocaleLowerCase())\n ? t('voiceControl.statusWithAction', {\n status: statusLabel,\n action: buttonLabel,\n })\n : buttonLabel;\n return (\n <div\n ref={composedRef}\n data-component=\"voice-control-panel\"\n data-component-id={id}\n data-status={status}\n data-layout=\"floating\"\n data-position={position}\n data-open={panelOpen ? '' : undefined}\n id={id}\n {...rest}\n className={floatingRootVariants({ position, className })}\n >\n {/* Non-modal: no focus trap, no backdrop; the page stays usable. */}\n <div\n ref={panelRef}\n id={panelId}\n role=\"group\"\n aria-labelledby={titleId}\n tabIndex={-1}\n hidden={!panelOpen}\n className={floatingPanelVariants({ position })}\n data-voice-panel=\"\"\n >\n {content}\n </div>\n\n {/* The RichTextEditor's AI pill: mic | panel. */}\n <div\n ref={pillRef}\n className=\"ds:relative\"\n data-ai-sparkle={sparkleProps['data-ai-sparkle']}\n >\n <div className={aiFabPillClass} data-voice-pill=\"\">\n <button\n type=\"button\"\n onClick={() => requestToggle()}\n disabled={(disabled && !active) || undefined}\n aria-label={micLabel}\n aria-busy={busy || undefined}\n aria-keyshortcuts={parsedShortcut?.aria}\n className={aiFabSegmentVariants({\n // The word on the red needs 7:1 in the accessible themes:\n // `labelled` holds the hover red there.\n recording: listening ? 'labelled' : false,\n className: micSegmentVariants({ extended: showWord }),\n })}\n data-voice-mic=\"\"\n >\n {busy ? (\n <LoaderCircle\n aria-hidden=\"true\"\n className=\"ds:size-5 ds:animate-[var(--accessible-off,spin_1s_linear_infinite)] ds:motion-reduce:animate-none\"\n />\n ) : listening ? (\n <Square\n aria-hidden=\"true\"\n className=\"ds:size-5 ds:fill-current\"\n />\n ) : (\n <AudioLines aria-hidden=\"true\" className=\"ds:size-5\" />\n )}\n {/* The state in words, not colour alone; see micLabel. */}\n {showWord ? (\n <span className=\"type-label ds:whitespace-nowrap\">\n {statusLabel}\n </span>\n ) : null}\n </button>\n <span aria-hidden=\"true\" className={aiFabDividerClass} />\n <button\n ref={launcherRef}\n type=\"button\"\n onClick={() => {\n if (panelOpen) {\n closePanel(false);\n } else {\n // Opened from here: Escape comes back here.\n gateReturnRef.current = null;\n setPanelOpen(true);\n requestFocus('panel');\n }\n }}\n aria-label={t('voiceControl.panelToggle')}\n aria-expanded={panelOpen}\n aria-controls={panelId}\n className={aiFabSegmentVariants({ recording: false })}\n data-voice-launcher=\"\"\n >\n {/* Fixed glyph: aria-expanded carries open or closed. */}\n <SlidersHorizontal aria-hidden=\"true\" className=\"ds:size-5\" />\n </button>\n {sparkleState ? (\n <span\n aria-hidden=\"true\"\n className={`${aiFabSweepClass} ${sparkleProps.className}`}\n />\n ) : null}\n </div>\n <AiSparkle state={sparkleState} />\n </div>\n\n {liveRegion}\n </div>\n );\n },\n);\n\nVoiceControlPanel.displayName = 'VoiceControlPanel';\n"],"names":["__iconNode","AudioLines","createLucideIcon","voiceControlPanelAgent","handle","args","rootVariants","cva","statusDotVariants","messageVariants","focusRing","candidateButtonVariants","commandsTriggerVariants","floatingRootVariants","floatingPanelVariants","glassSurfaceClass","glassEntranceClass","micSegmentVariants","MODIFIER_ALIASES","parseVoiceShortcut","shortcut","parts","part","rawKey","modifiers","modifier","key","ordered","m","matchesShortcut","event","parsed","ShortcutKeys","keys","Kbd","TONE_ICON","Info","CircleCheck","TriangleAlert","CircleAlert","NO_CANDIDATES","TARGET_HEIGHT","TARGET_SQUARE","SENTENCE_END","NO_BREAK_SPACE","VoiceControlPanel","forwardRef","status","onToggle","disabled","title","beta","betaNotice","language","languages","onLanguageChange","extraControls","target","transcript","message","error","candidates","candidatesLabel","onCandidatePick","commands","defaultCommandsOpen","id","layout","position","open","defaultOpen","onOpenChange","aiSparkle","aiConsent","aiConsentHeadingLevel","className","rest","ref","t","useTranslation","titleId","useId","candidatesLabelId","panelId","commandsOpen","setCommandsOpen","useState","floating","rootRef","useRef","composedRef","useMemo","composeRefs","panelRef","gateRef","toggleRef","launcherRef","pillRef","parsedShortcut","useEffect","openState","setOpenState","controlled","panelOpen","aiBlocked","gateOpen","setGateOpen","showGate","resumeAfterGrantRef","grantRequestedRef","localGrantPending","setLocalGrantPending","grantPending","latest","pendingFocusRef","setFocusRequest","requestFocus","useCallback","gateReturnRef","stopSentRef","setPanelOpen","next","now","_a","closeGate","openGate","focused","requestToggle","off","blocked","requestToggleRef","handleGrantConsent","result","prevGrantedRef","wasGranted","nowGranted","resume","requestedHere","focusLost","onKeyDown","c","candidateId","_b","useAgentRegistration","statusLabel","errorText","messageText","messageKey","hasCandidates","candidatesKey","active","buttonLabel","announcement","setAnnouncement","announced","before","prev","joined","attention","el","owner","measure","style","gap","closed","panel","panelHeight","publishFloatingClearance","observer","sparkleOn","sparkleState","sparkleProps","landSparkle","useAiSparkle","successKey","sparkledKey","restoreFocusRef","closePanelRef","wasOpenRef","useIsomorphicLayoutEffect","wasOpen","gate","focusable","origin","_c","_d","_e","languageOptions","l","showLanguage","hasSettings","showTranscript","busy","ToneIcon","closePanel","refocus","header","jsxs","jsx","Badge","IconButton","X","betaNoticeLine","consentGate","AiConsentBanner","Button","controls","Fragment","LoaderCircle","Square","FormField","Select","List","candidate","index","Collapsible","CollapsibleTrigger","ChevronDown","Trans","CollapsibleContent","command","content","liveRegion","LiveRegion","listening","showWord","micLabel","aiFabPillClass","aiFabSegmentVariants","aiFabDividerClass","SlidersHorizontal","aiFabSweepClass","AiSparkle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAAA,EACzC,CAAC,QAAQ,EAAE,GAAG,YAAY,KAAK,SAAQ,CAAE;AAC3C,GACMC,KAAaC,GAAiB,eAAeF,EAAU,GCGhDG,KAAgE;AAAA,EAC3E,IAAI;AAAA,EACJ,cAAc,CAAC,WAAW,QAAQ,UAAU,QAAQ,OAAO;AAAA,EAC3D,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EA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,OAAO;AAAA,sBAExB;AAAA,sBACA,cAAYtC,EAAE,0BAA0B;AAAA,sBACxC,iBAAeyB;AAAA,sBACf,iBAAepB;AAAA,sBACf,WAAWiJ,GAAqB,EAAE,WAAW,IAAO;AAAA,sBACpD,uBAAoB;AAAA,sBAGpB,4BAACE,IAAA,EAAkB,eAAY,QAAO,WAAU,aAAY;AAAA,oBAAA;AAAA,kBAAA;AAAA,kBAE7D5D,KACC,gBAAA4B;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,eAAY;AAAA,sBACZ,WAAW,GAAGiC,EAAe,IAAI5D,GAAa,SAAS;AAAA,oBAAA;AAAA,kBAAA,IAEvD;AAAA,gBAAA,GACN;AAAA,gBACA,gBAAA2B,EAACkC,IAAA,EAAU,OAAO9D,IAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGjCoD;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEAjL,GAAkB,cAAc;","x_google_ignoreList":[0]}
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
2
  import { forwardRef as P, useState as N, useEffect as S, useMemo as f, useCallback as W, useImperativeHandle as T } from "react";
3
3
  import { c as _ } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as j } from "react-i18next";
5
- import { D as l } from "./dialog-CUzbnKLw.js";
5
+ import { D as l } from "./dialog-Dn-iQ0Jp.js";
6
6
  import { S as z } from "./state-backed-text-input-DECQy5aA.js";
7
7
  import { B as C } from "./badge-hnBt8o7n.js";
8
8
  import { u as B } from "./registry-DvAUVLHh.js";
@@ -190,4 +190,4 @@ export {
190
190
  A as W,
191
191
  L as w
192
192
  };
193
- //# sourceMappingURL=widget-picker-DXYBMTfe.js.map
193
+ //# sourceMappingURL=widget-picker-rBA7MR5P.js.map