@alfadocs/ui-kit-debug 1.34.0 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (588) hide show
  1. package/dist/_chunks/{actions-cell-renderer-yy03OgRL.js → actions-cell-renderer-CUn1pqEq.js} +3 -3
  2. package/dist/_chunks/{actions-cell-renderer-yy03OgRL.js.map → actions-cell-renderer-CUn1pqEq.js.map} +1 -1
  3. package/dist/_chunks/{agenda-card-DVz3jwTf.js → agenda-card-DyQtHb9z.js} +2 -2
  4. package/dist/_chunks/{agenda-card-DVz3jwTf.js.map → agenda-card-DyQtHb9z.js.map} +1 -1
  5. package/dist/_chunks/{agenda-tray-1oDWCJdB.js → agenda-tray-DYGCTIWB.js} +3 -3
  6. package/dist/_chunks/{agenda-tray-1oDWCJdB.js.map → agenda-tray-DYGCTIWB.js.map} +1 -1
  7. package/dist/_chunks/{ai-consent-banner-OggpS5hW.js → ai-consent-banner-De4gzSBZ.js} +4 -4
  8. package/dist/_chunks/{ai-consent-banner-OggpS5hW.js.map → ai-consent-banner-De4gzSBZ.js.map} +1 -1
  9. package/dist/_chunks/{ai-prompt-input-Dt7tpCBh.js → ai-prompt-input-DdxlaI7q.js} +2 -2
  10. package/dist/_chunks/{ai-prompt-input-Dt7tpCBh.js.map → ai-prompt-input-DdxlaI7q.js.map} +1 -1
  11. package/dist/_chunks/{alert-CiJT540z.js → alert-CiQ5Pa3Q.js} +2 -2
  12. package/dist/_chunks/{alert-CiJT540z.js.map → alert-CiQ5Pa3Q.js.map} +1 -1
  13. package/dist/_chunks/{alia-sidebar-D18kp3p9.js → alia-sidebar-B6bXlZZk.js} +6 -6
  14. package/dist/_chunks/{alia-sidebar-D18kp3p9.js.map → alia-sidebar-B6bXlZZk.js.map} +1 -1
  15. package/dist/_chunks/{anamnesis-card-NTi4LLzI.js → anamnesis-card-DGwINeNn.js} +3 -3
  16. package/dist/_chunks/{anamnesis-card-NTi4LLzI.js.map → anamnesis-card-DGwINeNn.js.map} +1 -1
  17. package/dist/_chunks/{anamnesis-summary-card-DGVKBQoq.js → anamnesis-summary-card-GYHa7VGp.js} +3 -3
  18. package/dist/_chunks/{anamnesis-summary-card-DGVKBQoq.js.map → anamnesis-summary-card-GYHa7VGp.js.map} +1 -1
  19. package/dist/_chunks/{anamnesis-summary-rows-BYgyp_i2.js → anamnesis-summary-rows-Cxtgo2ok.js} +12 -12
  20. package/dist/_chunks/{anamnesis-summary-rows-BYgyp_i2.js.map → anamnesis-summary-rows-Cxtgo2ok.js.map} +1 -1
  21. package/dist/_chunks/{antenatal-schedule-timeline-sXfIp5lp.js → antenatal-schedule-timeline-CXk_tzWG.js} +2 -2
  22. package/dist/_chunks/{antenatal-schedule-timeline-sXfIp5lp.js.map → antenatal-schedule-timeline-CXk_tzWG.js.map} +1 -1
  23. package/dist/_chunks/appointment-card-WsDGBBut.js +425 -0
  24. package/dist/_chunks/appointment-card-WsDGBBut.js.map +1 -0
  25. package/dist/_chunks/appointment-timeline-ByfovxqR.js +449 -0
  26. package/dist/_chunks/appointment-timeline-ByfovxqR.js.map +1 -0
  27. package/dist/_chunks/{appointment-tray-6rg071CL.js → appointment-tray-D6UyJHej.js} +3 -3
  28. package/dist/_chunks/{appointment-tray-6rg071CL.js.map → appointment-tray-D6UyJHej.js.map} +1 -1
  29. package/dist/_chunks/arrow-right-KsIrLdt0.js +15 -0
  30. package/dist/_chunks/arrow-right-KsIrLdt0.js.map +1 -0
  31. package/dist/_chunks/{audio-recorder-11wClczr.js → audio-recorder-BlQBC7N_.js} +3 -3
  32. package/dist/_chunks/{audio-recorder-11wClczr.js.map → audio-recorder-BlQBC7N_.js.map} +1 -1
  33. package/dist/_chunks/{badge-sTusUqZD.js → badge-BudgzTe_.js} +2 -2
  34. package/dist/_chunks/{badge-sTusUqZD.js.map → badge-BudgzTe_.js.map} +1 -1
  35. package/dist/_chunks/{balance-badge-cell-DhBtFRoW.js → balance-badge-cell-B0Z8Dwn8.js} +6 -6
  36. package/dist/_chunks/{balance-badge-cell-DhBtFRoW.js.map → balance-badge-cell-B0Z8Dwn8.js.map} +1 -1
  37. package/dist/_chunks/{bishop-score-CAl7C5hm.js → bishop-score-D5b8tktp.js} +2 -2
  38. package/dist/_chunks/{bishop-score-CAl7C5hm.js.map → bishop-score-D5b8tktp.js.map} +1 -1
  39. package/dist/_chunks/{bmi-calculator-Dwkih9a4.js → bmi-calculator-dOKP-vW4.js} +4 -4
  40. package/dist/_chunks/{bmi-calculator-Dwkih9a4.js.map → bmi-calculator-dOKP-vW4.js.map} +1 -1
  41. package/dist/_chunks/{booking-BqkEtsKx.js → booking-Dp-9qR6F.js} +9 -9
  42. package/dist/_chunks/{booking-BqkEtsKx.js.map → booking-Dp-9qR6F.js.map} +1 -1
  43. package/dist/_chunks/button-group-QmN1VdUW.js +307 -0
  44. package/dist/_chunks/button-group-QmN1VdUW.js.map +1 -0
  45. package/dist/_chunks/{calendar-Dgvl5L4T.js → calendar-7GAUlsNO.js} +3 -3
  46. package/dist/_chunks/{calendar-Dgvl5L4T.js.map → calendar-7GAUlsNO.js.map} +1 -1
  47. package/dist/_chunks/{calendar-event-card-DSh-69HT.js → calendar-event-card-DKUnT9Be.js} +91 -134
  48. package/dist/_chunks/calendar-event-card-DKUnT9Be.js.map +1 -0
  49. package/dist/_chunks/{calendar-workspace-4NH1Z47_.js → calendar-workspace-Duv_5B4j.js} +2494 -2415
  50. package/dist/_chunks/calendar-workspace-Duv_5B4j.js.map +1 -0
  51. package/dist/_chunks/{care-plan-card-CZW476Kg.js → care-plan-card-COFOI-fI.js} +5 -5
  52. package/dist/_chunks/{care-plan-card-CZW476Kg.js.map → care-plan-card-COFOI-fI.js.map} +1 -1
  53. package/dist/_chunks/{care-plan-entry-card-BMUYagEw.js → care-plan-entry-card-BOKn0KW-.js} +6 -6
  54. package/dist/_chunks/{care-plan-entry-card-BMUYagEw.js.map → care-plan-entry-card-BOKn0KW-.js.map} +1 -1
  55. package/dist/_chunks/{care-plan-header-B5CBE0zu.js → care-plan-header-CbuOuVBw.js} +4 -4
  56. package/dist/_chunks/{care-plan-header-B5CBE0zu.js.map → care-plan-header-CbuOuVBw.js.map} +1 -1
  57. package/dist/_chunks/{carousel.agent-CLxdHEBP.js → carousel.agent-Dv4a4M8L.js} +2 -2
  58. package/dist/_chunks/{carousel.agent-CLxdHEBP.js.map → carousel.agent-Dv4a4M8L.js.map} +1 -1
  59. package/dist/_chunks/{chart-C6eHTxkO.js → chart-iWl76PXv.js} +3 -3
  60. package/dist/_chunks/{chart-C6eHTxkO.js.map → chart-iWl76PXv.js.map} +1 -1
  61. package/dist/_chunks/{chat-input-BsB5Umpj.js → chat-input-qM5QpUSq.js} +2 -2
  62. package/dist/_chunks/{chat-input-BsB5Umpj.js.map → chat-input-qM5QpUSq.js.map} +1 -1
  63. package/dist/_chunks/{chat-message-C-8UU2av.js → chat-message-RniXtrCH.js} +2 -2
  64. package/dist/_chunks/{chat-message-C-8UU2av.js.map → chat-message-RniXtrCH.js.map} +1 -1
  65. package/dist/_chunks/{checkbox-BuZ1u__2.js → checkbox-CZkipDn7.js} +2 -2
  66. package/dist/_chunks/{checkbox-BuZ1u__2.js.map → checkbox-CZkipDn7.js.map} +1 -1
  67. package/dist/_chunks/{checkbox-group-CfqMv57d.js → checkbox-group-DomUzpkF.js} +2 -2
  68. package/dist/_chunks/{checkbox-group-CfqMv57d.js.map → checkbox-group-DomUzpkF.js.map} +1 -1
  69. package/dist/_chunks/clinical-note-card-DdsGYMmI.js +325 -0
  70. package/dist/_chunks/clinical-note-card-DdsGYMmI.js.map +1 -0
  71. package/dist/_chunks/{code-block-BIkpRLkl.js → code-block-uVjNSI9g.js} +2 -2
  72. package/dist/_chunks/{code-block-BIkpRLkl.js.map → code-block-uVjNSI9g.js.map} +1 -1
  73. package/dist/_chunks/{connection-status-DRZIcMqM.js → connection-status-OEsWjmRk.js} +3 -3
  74. package/dist/_chunks/{connection-status-DRZIcMqM.js.map → connection-status-OEsWjmRk.js.map} +1 -1
  75. package/dist/_chunks/{contact-profile-card-DSI9uumA.js → contact-profile-card--My1H2UD.js} +3 -3
  76. package/dist/_chunks/{contact-profile-card-DSI9uumA.js.map → contact-profile-card--My1H2UD.js.map} +1 -1
  77. package/dist/_chunks/{control-room-rail-5MbhjsxN.js → control-room-rail-Ds45_g4f.js} +4 -4
  78. package/dist/_chunks/{control-room-rail-5MbhjsxN.js.map → control-room-rail-Ds45_g4f.js.map} +1 -1
  79. package/dist/_chunks/{counter-dRlTNC_y.js → counter-WsvRuum1.js} +50 -15
  80. package/dist/_chunks/counter-WsvRuum1.js.map +1 -0
  81. package/dist/_chunks/{cycle-calculator-DVgxBfP0.js → cycle-calculator-BJeaXiZv.js} +3 -3
  82. package/dist/_chunks/{cycle-calculator-DVgxBfP0.js.map → cycle-calculator-BJeaXiZv.js.map} +1 -1
  83. package/dist/_chunks/{dashboard-grid-BFtdHqfn.js → dashboard-grid-B23BFzRl.js} +2 -2
  84. package/dist/_chunks/{dashboard-grid-BFtdHqfn.js.map → dashboard-grid-B23BFzRl.js.map} +1 -1
  85. package/dist/_chunks/{data-table-DC96JJIq.js → data-table-BYGK-gUJ.js} +6 -6
  86. package/dist/_chunks/{data-table-DC96JJIq.js.map → data-table-BYGK-gUJ.js.map} +1 -1
  87. package/dist/_chunks/{data-table-tabs-DVIFkqx_.js → data-table-tabs-BMR0zsVQ.js} +3 -3
  88. package/dist/_chunks/{data-table-tabs-DVIFkqx_.js.map → data-table-tabs-BMR0zsVQ.js.map} +1 -1
  89. package/dist/_chunks/{date-picker-B6NW_PS5.js → date-picker-6tFnKFty.js} +14 -14
  90. package/dist/_chunks/{date-picker-B6NW_PS5.js.map → date-picker-6tFnKFty.js.map} +1 -1
  91. package/dist/_chunks/{dependent-selector-yTKKsuc9.js → dependent-selector-BHDP0nBB.js} +3 -3
  92. package/dist/_chunks/{dependent-selector-yTKKsuc9.js.map → dependent-selector-BHDP0nBB.js.map} +1 -1
  93. package/dist/_chunks/{description-list-CjJqR8WK.js → description-list-C1RXMDZ_.js} +2 -2
  94. package/dist/_chunks/{description-list-CjJqR8WK.js.map → description-list-C1RXMDZ_.js.map} +1 -1
  95. package/dist/_chunks/{document-preview-BrhMHNh8.js → document-preview-DsEyRcNd.js} +4 -4
  96. package/dist/_chunks/{document-preview-BrhMHNh8.js.map → document-preview-DsEyRcNd.js.map} +1 -1
  97. package/dist/_chunks/{document-scanner-C5Vrbu21.js → document-scanner-CbWVtm7u.js} +53 -52
  98. package/dist/_chunks/{document-scanner-C5Vrbu21.js.map → document-scanner-CbWVtm7u.js.map} +1 -1
  99. package/dist/_chunks/{due-date-calculator-CxgK8vzt.js → due-date-calculator-Dhc9Ljkb.js} +6 -6
  100. package/dist/_chunks/{due-date-calculator-CxgK8vzt.js.map → due-date-calculator-Dhc9Ljkb.js.map} +1 -1
  101. package/dist/_chunks/{editable-currency-cell-renderer-B7TVZ5ZJ.js → editable-currency-cell-renderer-D7blbDFY.js} +4 -4
  102. package/dist/_chunks/{editable-currency-cell-renderer-B7TVZ5ZJ.js.map → editable-currency-cell-renderer-D7blbDFY.js.map} +1 -1
  103. package/dist/_chunks/{editor-overlay-DEc5yYwo.js → editor-overlay-8fKAcRsm.js} +2 -2
  104. package/dist/_chunks/{editor-overlay-DEc5yYwo.js.map → editor-overlay-8fKAcRsm.js.map} +1 -1
  105. package/dist/_chunks/{entity-card-DmrgYSEX.js → entity-card-I-Gio5wo.js} +36 -32
  106. package/dist/_chunks/entity-card-I-Gio5wo.js.map +1 -0
  107. package/dist/_chunks/{entity-summary-5o768XLU.js → entity-summary-BbW0mIzU.js} +4 -4
  108. package/dist/_chunks/{entity-summary-5o768XLU.js.map → entity-summary-BbW0mIzU.js.map} +1 -1
  109. package/dist/_chunks/{face-scheme-l-CQyLs-.js → face-scheme-uFvhqz6h.js} +4 -4
  110. package/dist/_chunks/{face-scheme-l-CQyLs-.js.map → face-scheme-uFvhqz6h.js.map} +1 -1
  111. package/dist/_chunks/{fetal-weight-Dqy0T1fP.js → fetal-weight-C6SxchOv.js} +2 -2
  112. package/dist/_chunks/{fetal-weight-Dqy0T1fP.js.map → fetal-weight-C6SxchOv.js.map} +1 -1
  113. package/dist/_chunks/{field-array-BjkXZzSr.js → field-array-C9dmRaIM.js} +2 -2
  114. package/dist/_chunks/{field-array-BjkXZzSr.js.map → field-array-C9dmRaIM.js.map} +1 -1
  115. package/dist/_chunks/{file-manager-CI2Qn8qW.js → file-manager-DvkFgj7d.js} +7 -7
  116. package/dist/_chunks/{file-manager-CI2Qn8qW.js.map → file-manager-DvkFgj7d.js.map} +1 -1
  117. package/dist/_chunks/{file-upload-CwxdqkMK.js → file-upload-BDpb08GM.js} +71 -78
  118. package/dist/_chunks/file-upload-BDpb08GM.js.map +1 -0
  119. package/dist/_chunks/{fiscal-code-input-B_nYMSEM.js → fiscal-code-input-CkwIdB1y.js} +2 -2
  120. package/dist/_chunks/{fiscal-code-input-B_nYMSEM.js.map → fiscal-code-input-CkwIdB1y.js.map} +1 -1
  121. package/dist/_chunks/{freemium-paywall-DrXzYfv-.js → freemium-paywall-BqGk_SBU.js} +2 -2
  122. package/dist/_chunks/{freemium-paywall-DrXzYfv-.js.map → freemium-paywall-BqGk_SBU.js.map} +1 -1
  123. package/dist/_chunks/{gestational-age-calculator-CZHVrERT.js → gestational-age-calculator-DDOGaPvg.js} +6 -6
  124. package/dist/_chunks/{gestational-age-calculator-CZHVrERT.js.map → gestational-age-calculator-DDOGaPvg.js.map} +1 -1
  125. package/dist/_chunks/{hcg-doubling-C2fQxfXd.js → hcg-doubling-Bb_n6tEa.js} +2 -2
  126. package/dist/_chunks/{hcg-doubling-C2fQxfXd.js.map → hcg-doubling-Bb_n6tEa.js.map} +1 -1
  127. package/dist/_chunks/{header-DUXRIPyM.js → header-BZ4pZlJV.js} +2 -2
  128. package/dist/_chunks/{header-DUXRIPyM.js.map → header-BZ4pZlJV.js.map} +1 -1
  129. package/dist/_chunks/{header-settings-DvjZNMhD.js → header-settings-B8mLc03Q.js} +4 -4
  130. package/dist/_chunks/{header-settings-DvjZNMhD.js.map → header-settings-B8mLc03Q.js.map} +1 -1
  131. package/dist/_chunks/hover-card-Bcku1GQu.js +511 -0
  132. package/dist/_chunks/hover-card-Bcku1GQu.js.map +1 -0
  133. package/dist/_chunks/{icon-button-DA2CAGHZ.js → icon-button-8xqRnkdG.js} +2 -2
  134. package/dist/_chunks/{icon-button-DA2CAGHZ.js.map → icon-button-8xqRnkdG.js.map} +1 -1
  135. package/dist/_chunks/{icon-button-group-VCCod3Hz.js → icon-button-group-Dj6CRoYR.js} +2 -2
  136. package/dist/_chunks/{icon-button-group-VCCod3Hz.js.map → icon-button-group-Dj6CRoYR.js.map} +1 -1
  137. package/dist/_chunks/{icon-picker-DOa89vn3.js → icon-picker-CTWzlHJr.js} +2 -2
  138. package/dist/_chunks/{icon-picker-DOa89vn3.js.map → icon-picker-CTWzlHJr.js.map} +1 -1
  139. package/dist/_chunks/{info-tip-CADik6WN.js → info-tip-ey_Pon2y.js} +2 -2
  140. package/dist/_chunks/{info-tip-CADik6WN.js.map → info-tip-ey_Pon2y.js.map} +1 -1
  141. package/dist/_chunks/{key-value-pair-BIBdZBLg.js → key-value-pair-DczGb4yz.js} +42 -41
  142. package/dist/_chunks/key-value-pair-DczGb4yz.js.map +1 -0
  143. package/dist/_chunks/{link-cell-renderer-BEpMNtAa.js → link-cell-renderer-BNa8x6oJ.js} +6 -6
  144. package/dist/_chunks/{link-cell-renderer-BEpMNtAa.js.map → link-cell-renderer-BNa8x6oJ.js.map} +1 -1
  145. package/dist/_chunks/loader-circle-BECIU_8N.js +12 -0
  146. package/dist/_chunks/loader-circle-BECIU_8N.js.map +1 -0
  147. package/dist/_chunks/{locale-picker-CwFtqSkt.js → locale-picker-BLeHbFSc.js} +3 -3
  148. package/dist/_chunks/{locale-picker-CwFtqSkt.js.map → locale-picker-BLeHbFSc.js.map} +1 -1
  149. package/dist/_chunks/{marketplace-app-shell-CK_ND8Tr.js → marketplace-app-shell-BwH6Aruw.js} +6 -6
  150. package/dist/_chunks/{marketplace-app-shell-CK_ND8Tr.js.map → marketplace-app-shell-BwH6Aruw.js.map} +1 -1
  151. package/dist/_chunks/{message-card-BUMv16un.js → message-card-Dm5Xshup.js} +2 -2
  152. package/dist/_chunks/{message-card-BUMv16un.js.map → message-card-Dm5Xshup.js.map} +1 -1
  153. package/dist/_chunks/{message-tray-0zsv27xX.js → message-tray-BcLyaO-G.js} +3 -3
  154. package/dist/_chunks/{message-tray-0zsv27xX.js.map → message-tray-BcLyaO-G.js.map} +1 -1
  155. package/dist/_chunks/{multi-select-DYOvx2SJ.js → multi-select-CtPd7g4x.js} +15 -15
  156. package/dist/_chunks/{multi-select-DYOvx2SJ.js.map → multi-select-CtPd7g4x.js.map} +1 -1
  157. package/dist/_chunks/note-attachment-CwDir3kK.js +124 -0
  158. package/dist/_chunks/note-attachment-CwDir3kK.js.map +1 -0
  159. package/dist/_chunks/note-timeline-CXfSV3yX.js +231 -0
  160. package/dist/_chunks/note-timeline-CXfSV3yX.js.map +1 -0
  161. package/dist/_chunks/{notes-panel-BjLt-kiP.js → notes-panel-Co8D3uDd.js} +7 -7
  162. package/dist/_chunks/{notes-panel-BjLt-kiP.js.map → notes-panel-Co8D3uDd.js.map} +1 -1
  163. package/dist/_chunks/{notification-card-CtrzoTUO.js → notification-card-ChcK9Wat.js} +2 -2
  164. package/dist/_chunks/{notification-card-CtrzoTUO.js.map → notification-card-ChcK9Wat.js.map} +1 -1
  165. package/dist/_chunks/{notification-tray-BiRzXHDf.js → notification-tray-CJ8jOe-U.js} +4 -4
  166. package/dist/_chunks/{notification-tray-BiRzXHDf.js.map → notification-tray-CJ8jOe-U.js.map} +1 -1
  167. package/dist/_chunks/{operator-hero-D7-iiFQ9.js → operator-hero-XIdwDmN2.js} +3 -3
  168. package/dist/_chunks/{operator-hero-D7-iiFQ9.js.map → operator-hero-XIdwDmN2.js.map} +1 -1
  169. package/dist/_chunks/{optical-prescription-DUJOhKz_.js → optical-prescription-cphK41eP.js} +2 -2
  170. package/dist/_chunks/{optical-prescription-DUJOhKz_.js.map → optical-prescription-cphK41eP.js.map} +1 -1
  171. package/dist/_chunks/panel-header-D_mTdhUp.js +128 -0
  172. package/dist/_chunks/panel-header-D_mTdhUp.js.map +1 -0
  173. package/dist/_chunks/patient-details-f7SSXkTJ.js +371 -0
  174. package/dist/_chunks/patient-details-f7SSXkTJ.js.map +1 -0
  175. package/dist/_chunks/patient-field-row-BQZoP4m2.js +787 -0
  176. package/dist/_chunks/patient-field-row-BQZoP4m2.js.map +1 -0
  177. package/dist/_chunks/{patient-search-HeEUB-_X.js → patient-search-D08b6jgj.js} +2 -2
  178. package/dist/_chunks/{patient-search-HeEUB-_X.js.map → patient-search-D08b6jgj.js.map} +1 -1
  179. package/dist/_chunks/patient-summary-card-Bz7KdUin.js +533 -0
  180. package/dist/_chunks/patient-summary-card-Bz7KdUin.js.map +1 -0
  181. package/dist/_chunks/{payment-automation-upsell-DwQW2fRp.js → payment-automation-upsell-BLTdE2em.js} +50 -59
  182. package/dist/_chunks/payment-automation-upsell-BLTdE2em.js.map +1 -0
  183. package/dist/_chunks/{payment-form-Ds1I9KqB.js → payment-form-BHMDqW9C.js} +2 -2
  184. package/dist/_chunks/{payment-form-Ds1I9KqB.js.map → payment-form-BHMDqW9C.js.map} +1 -1
  185. package/dist/_chunks/{payment-request-card-lmKLwsDs.js → payment-request-card-BxcdvxKR.js} +6 -6
  186. package/dist/_chunks/{payment-request-card-lmKLwsDs.js.map → payment-request-card-BxcdvxKR.js.map} +1 -1
  187. package/dist/_chunks/{pdf-viewer-DUIsV9s5.js → pdf-viewer-DUKdn5iq.js} +2 -2
  188. package/dist/_chunks/{pdf-viewer-DUIsV9s5.js.map → pdf-viewer-DUKdn5iq.js.map} +1 -1
  189. package/dist/_chunks/{periodontal-chart-B9fphroR.js → periodontal-chart-BF_e3wZp.js} +2 -2
  190. package/dist/_chunks/{periodontal-chart-B9fphroR.js.map → periodontal-chart-BF_e3wZp.js.map} +1 -1
  191. package/dist/_chunks/{periodontal-chart-card-qEZPXj83.js → periodontal-chart-card-BJEuJuzh.js} +3 -3
  192. package/dist/_chunks/{periodontal-chart-card-qEZPXj83.js.map → periodontal-chart-card-BJEuJuzh.js.map} +1 -1
  193. package/dist/_chunks/{periodontal-diagnosis-lEwA8wqX.js → periodontal-diagnosis-C7pfPOct.js} +5 -5
  194. package/dist/_chunks/{periodontal-diagnosis-lEwA8wqX.js.map → periodontal-diagnosis-C7pfPOct.js.map} +1 -1
  195. package/dist/_chunks/{periodontal-risk-chart-0x7KVZjL.js → periodontal-risk-chart-B2tNFa15.js} +2 -2
  196. package/dist/_chunks/{periodontal-risk-chart-0x7KVZjL.js.map → periodontal-risk-chart-B2tNFa15.js.map} +1 -1
  197. package/dist/_chunks/{permission-matrix-BIJrGEmz.js → permission-matrix-VdAXjjHU.js} +3 -3
  198. package/dist/_chunks/{permission-matrix-BIJrGEmz.js.map → permission-matrix-VdAXjjHU.js.map} +1 -1
  199. package/dist/_chunks/{popover-DP6WCVwm.js → popover-DzR5QYxp.js} +24 -24
  200. package/dist/_chunks/{popover-DP6WCVwm.js.map → popover-DzR5QYxp.js.map} +1 -1
  201. package/dist/_chunks/{practice-profile-hero-DQyDvpJL.js → practice-profile-hero-DxoLlQr5.js} +2 -2
  202. package/dist/_chunks/{practice-profile-hero-DQyDvpJL.js.map → practice-profile-hero-DxoLlQr5.js.map} +1 -1
  203. package/dist/_chunks/{practice-results-kayDEorM.js → practice-results-DOcORTkP.js} +4 -4
  204. package/dist/_chunks/{practice-results-kayDEorM.js.map → practice-results-DOcORTkP.js.map} +1 -1
  205. package/dist/_chunks/{pregnancy-dating-n5j5dAKy.js → pregnancy-dating-nV1_S6w0.js} +6 -6
  206. package/dist/_chunks/{pregnancy-dating-n5j5dAKy.js.map → pregnancy-dating-nV1_S6w0.js.map} +1 -1
  207. package/dist/_chunks/{pregnancy-weight-gain-D5A8vPjj.js → pregnancy-weight-gain-tRecShAD.js} +4 -4
  208. package/dist/_chunks/{pregnancy-weight-gain-D5A8vPjj.js.map → pregnancy-weight-gain-tRecShAD.js.map} +1 -1
  209. package/dist/_chunks/{privacy-lock-CkAUo6Dz.js → privacy-lock-Be39vQUN.js} +2 -2
  210. package/dist/_chunks/{privacy-lock-CkAUo6Dz.js.map → privacy-lock-Be39vQUN.js.map} +1 -1
  211. package/dist/_chunks/{product-hub-panel-BScCotGD.js → product-hub-panel-C0TO69P7.js} +2 -2
  212. package/dist/_chunks/{product-hub-panel-BScCotGD.js.map → product-hub-panel-C0TO69P7.js.map} +1 -1
  213. package/dist/_chunks/{public-header.agent-kth2SdXn.js → public-header.agent-Bl1KFwSE.js} +3 -3
  214. package/dist/_chunks/{public-header.agent-kth2SdXn.js.map → public-header.agent-Bl1KFwSE.js.map} +1 -1
  215. package/dist/_chunks/{radio-DNRe6H_8.js → radio-6fml-pWk.js} +2 -2
  216. package/dist/_chunks/{radio-DNRe6H_8.js.map → radio-6fml-pWk.js.map} +1 -1
  217. package/dist/_chunks/{radio-group-DyVBgnA3.js → radio-group-CIjmyioi.js} +3 -3
  218. package/dist/_chunks/{radio-group-DyVBgnA3.js.map → radio-group-CIjmyioi.js.map} +1 -1
  219. package/dist/_chunks/{radiograph-panel.agent-o4jwEJPC.js → radiograph-panel.agent-k0G7JuoM.js} +6 -6
  220. package/dist/_chunks/{radiograph-panel.agent-o4jwEJPC.js.map → radiograph-panel.agent-k0G7JuoM.js.map} +1 -1
  221. package/dist/_chunks/{reviews-panel-BKHEfqVQ.js → reviews-panel-BaHZb_ai.js} +3 -3
  222. package/dist/_chunks/{reviews-panel-BKHEfqVQ.js.map → reviews-panel-BaHZb_ai.js.map} +1 -1
  223. package/dist/_chunks/{rich-text-editor-CCI-Y3DN.js → rich-text-editor-BTXlorm5.js} +7 -7
  224. package/dist/_chunks/{rich-text-editor-CCI-Y3DN.js.map → rich-text-editor-BTXlorm5.js.map} +1 -1
  225. package/dist/_chunks/{search-bar-CJj6sI9m.js → search-bar-CCmViqaa.js} +46 -46
  226. package/dist/_chunks/{search-bar-CJj6sI9m.js.map → search-bar-CCmViqaa.js.map} +1 -1
  227. package/dist/_chunks/section-card.agent-W18CHEgX.js +74 -0
  228. package/dist/_chunks/section-card.agent-W18CHEgX.js.map +1 -0
  229. package/dist/_chunks/{sheet-BSznOyJs.js → sheet-hm04DGFd.js} +2 -2
  230. package/dist/_chunks/{sheet-BSznOyJs.js.map → sheet-hm04DGFd.js.map} +1 -1
  231. package/dist/_chunks/{sign-document-jF4fZDJ5.js → sign-document-CRQuAn4W.js} +2 -2
  232. package/dist/_chunks/{sign-document-jF4fZDJ5.js.map → sign-document-CRQuAn4W.js.map} +1 -1
  233. package/dist/_chunks/{signature-request-vihDT8On.js → signature-request-Dej2g86d.js} +5 -5
  234. package/dist/_chunks/{signature-request-vihDT8On.js.map → signature-request-Dej2g86d.js.map} +1 -1
  235. package/dist/_chunks/{signature-status-chip-T5fyS-k9.js → signature-status-chip-D4NsrdeI.js} +3 -3
  236. package/dist/_chunks/{signature-status-chip-T5fyS-k9.js.map → signature-status-chip-D4NsrdeI.js.map} +1 -1
  237. package/dist/_chunks/{slot-grid-BuZOKfcd.js → slot-grid-8Ko6thzz.js} +2 -2
  238. package/dist/_chunks/{slot-grid-BuZOKfcd.js.map → slot-grid-8Ko6thzz.js.map} +1 -1
  239. package/dist/_chunks/{streaming-text-CvsjIQ7S.js → streaming-text-DjFqLSt_.js} +2 -2
  240. package/dist/_chunks/{streaming-text-CvsjIQ7S.js.map → streaming-text-DjFqLSt_.js.map} +1 -1
  241. package/dist/_chunks/{tab-bar-DvFJIQfL.js → tab-bar-rDkLiaA6.js} +2 -2
  242. package/dist/_chunks/{tab-bar-DvFJIQfL.js.map → tab-bar-rDkLiaA6.js.map} +1 -1
  243. package/dist/_chunks/{tag-3wgkwwDB.js → tag-Ci3xJPcH.js} +2 -2
  244. package/dist/_chunks/{tag-3wgkwwDB.js.map → tag-Ci3xJPcH.js.map} +1 -1
  245. package/dist/_chunks/{task-tray-COo-RlDv.js → task-tray-wl9eti6J.js} +2 -2
  246. package/dist/_chunks/{task-tray-COo-RlDv.js.map → task-tray-wl9eti6J.js.map} +1 -1
  247. package/dist/_chunks/{tasks-panel-DLKpSNoE.js → tasks-panel-BDNB7hsZ.js} +5 -5
  248. package/dist/_chunks/{tasks-panel-DLKpSNoE.js.map → tasks-panel-BDNB7hsZ.js.map} +1 -1
  249. package/dist/_chunks/{theme-toggle-uEwoKjl3.js → theme-toggle-CMz8YfC1.js} +3 -3
  250. package/dist/_chunks/{theme-toggle-uEwoKjl3.js.map → theme-toggle-CMz8YfC1.js.map} +1 -1
  251. package/dist/_chunks/{timeline-Bs9Erxlo.js → timeline-61AihzYz.js} +47 -47
  252. package/dist/_chunks/timeline-61AihzYz.js.map +1 -0
  253. package/dist/_chunks/{toast-YZz2sBzB.js → toast-8jqtbfAB.js} +2 -2
  254. package/dist/_chunks/{toast-YZz2sBzB.js.map → toast-8jqtbfAB.js.map} +1 -1
  255. package/dist/_chunks/{tool-rail-ONaV-Nzz.js → tool-rail-Bq5eiFMG.js} +3 -3
  256. package/dist/_chunks/{tool-rail-ONaV-Nzz.js.map → tool-rail-Bq5eiFMG.js.map} +1 -1
  257. package/dist/_chunks/{tooltip-DvmfrNvB.js → tooltip-Cp-PLePW.js} +41 -41
  258. package/dist/_chunks/tooltip-Cp-PLePW.js.map +1 -0
  259. package/dist/_chunks/{tooth-scheme-Qe7LO5Di.js → tooth-scheme-BWkYxxjR.js} +3 -3
  260. package/dist/_chunks/{tooth-scheme-Qe7LO5Di.js.map → tooth-scheme-BWkYxxjR.js.map} +1 -1
  261. package/dist/_chunks/{transaction-chip-DJCstquX.js → transaction-chip-Dth1nThY.js} +49 -48
  262. package/dist/_chunks/{transaction-chip-DJCstquX.js.map → transaction-chip-Dth1nThY.js.map} +1 -1
  263. package/dist/_chunks/{transcript-panel-BGkEhvHO.js → transcript-panel-u2HHxZB6.js} +2 -2
  264. package/dist/_chunks/{transcript-panel-BGkEhvHO.js.map → transcript-panel-u2HHxZB6.js.map} +1 -1
  265. package/dist/_chunks/user-x-DYszNtIg.js +45 -0
  266. package/dist/_chunks/user-x-DYszNtIg.js.map +1 -0
  267. package/dist/_chunks/{warning-stack-DQz0Jyir.js → warning-stack-BW5Dwb3z.js} +3 -3
  268. package/dist/_chunks/{warning-stack-DQz0Jyir.js.map → warning-stack-BW5Dwb3z.js.map} +1 -1
  269. package/dist/_chunks/{widget-picker-DvUkBemi.js → widget-picker-B1sj6uyf.js} +2 -2
  270. package/dist/_chunks/{widget-picker-DvUkBemi.js.map → widget-picker-B1sj6uyf.js.map} +1 -1
  271. package/dist/_chunks/{workflow-map-dNzJjBWG.js → workflow-map-D-LEni11.js} +5 -5
  272. package/dist/_chunks/{workflow-map-dNzJjBWG.js.map → workflow-map-D-LEni11.js.map} +1 -1
  273. package/dist/_chunks/workflow-status-xeaJTzD3.js +476 -0
  274. package/dist/_chunks/workflow-status-xeaJTzD3.js.map +1 -0
  275. package/dist/agent-catalog.json +185 -1
  276. package/dist/agent-i18n/en.json +27 -0
  277. package/dist/components/_shared/entity-card/entity-card.d.ts +44 -0
  278. package/dist/components/_shared/entity-card/entity-card.d.ts.map +1 -1
  279. package/dist/components/_shared/entity-card/index.d.ts +1 -1
  280. package/dist/components/_shared/entity-card/index.d.ts.map +1 -1
  281. package/dist/components/_shared/note-attachment.d.ts +41 -0
  282. package/dist/components/_shared/note-attachment.d.ts.map +1 -0
  283. package/dist/components/_shared/note-markdown.d.ts +3 -0
  284. package/dist/components/_shared/note-markdown.d.ts.map +1 -0
  285. package/dist/components/_shared/patient-field-row.d.ts +40 -0
  286. package/dist/components/_shared/patient-field-row.d.ts.map +1 -0
  287. package/dist/components/agenda-card/index.js +1 -1
  288. package/dist/components/agenda-tray/index.js +1 -1
  289. package/dist/components/ai-consent-banner/index.js +1 -1
  290. package/dist/components/ai-prompt-input/index.js +1 -1
  291. package/dist/components/alert/index.js +1 -1
  292. package/dist/components/anamnesis-card/index.js +1 -1
  293. package/dist/components/anamnesis-summary-card/index.js +1 -1
  294. package/dist/components/appointment-card/appointment-card.d.ts +36 -1
  295. package/dist/components/appointment-card/appointment-card.d.ts.map +1 -1
  296. package/dist/components/appointment-card/index.js +2 -2
  297. package/dist/components/appointment-timeline/appointment-timeline.d.ts +6 -0
  298. package/dist/components/appointment-timeline/appointment-timeline.d.ts.map +1 -1
  299. package/dist/components/appointment-timeline/index.js +1 -1
  300. package/dist/components/audio-recorder/index.js +1 -1
  301. package/dist/components/badge/index.js +1 -1
  302. package/dist/components/bishop-score/index.js +1 -1
  303. package/dist/components/bmi-calculator/index.js +1 -1
  304. package/dist/components/booking/index.js +1 -1
  305. package/dist/components/button/index.js +1 -1
  306. package/dist/components/button-group/button-group.d.ts +20 -0
  307. package/dist/components/button-group/button-group.d.ts.map +1 -1
  308. package/dist/components/button-group/index.js +1 -1
  309. package/dist/components/calendar/index.js +1 -1
  310. package/dist/components/calendar-event-card/index.js +1 -1
  311. package/dist/components/care-plan-card/index.js +1 -1
  312. package/dist/components/care-plan-entry-card/index.js +1 -1
  313. package/dist/components/care-plan-header/index.js +1 -1
  314. package/dist/components/carousel/index.js +1 -1
  315. package/dist/components/chart/index.js +1 -1
  316. package/dist/components/chat-input/index.js +1 -1
  317. package/dist/components/chat-message/index.js +1 -1
  318. package/dist/components/checkbox/index.js +1 -1
  319. package/dist/components/checkbox-group/index.js +1 -1
  320. package/dist/components/clinical-note-card/clinical-note-card.d.ts +2 -34
  321. package/dist/components/clinical-note-card/clinical-note-card.d.ts.map +1 -1
  322. package/dist/components/clinical-note-card/index.js +1 -1
  323. package/dist/components/connection-status/index.js +1 -1
  324. package/dist/components/contact-profile-card/index.js +1 -1
  325. package/dist/components/control-room-rail/index.js +1 -1
  326. package/dist/components/counter/counter.d.ts +6 -0
  327. package/dist/components/counter/counter.d.ts.map +1 -1
  328. package/dist/components/counter/index.js +1 -1
  329. package/dist/components/cycle-calculator/index.js +1 -1
  330. package/dist/components/dashboard-grid/index.js +1 -1
  331. package/dist/components/data-table/index.js +4 -4
  332. package/dist/components/data-table-tabs/index.js +1 -1
  333. package/dist/components/date-picker/index.js +1 -1
  334. package/dist/components/dependent-selector/index.js +1 -1
  335. package/dist/components/description-list/index.js +1 -1
  336. package/dist/components/document-preview/index.js +1 -1
  337. package/dist/components/document-scanner/index.js +1 -1
  338. package/dist/components/due-date-calculator/index.js +2 -2
  339. package/dist/components/editor-overlay/index.js +1 -1
  340. package/dist/components/entity-summary/index.js +1 -1
  341. package/dist/components/face-scheme/index.js +1 -1
  342. package/dist/components/fetal-weight/index.js +1 -1
  343. package/dist/components/field-array/index.js +1 -1
  344. package/dist/components/file-manager/index.js +1 -1
  345. package/dist/components/file-upload/index.js +1 -1
  346. package/dist/components/fiscal-code-input/index.js +1 -1
  347. package/dist/components/freemium-paywall/index.js +1 -1
  348. package/dist/components/gestational-age-calculator/index.js +1 -1
  349. package/dist/components/hcg-doubling/index.js +1 -1
  350. package/dist/components/header/index.js +1 -1
  351. package/dist/components/header-settings/index.js +1 -1
  352. package/dist/components/hover-card/hover-card.agent.d.ts +4 -0
  353. package/dist/components/hover-card/hover-card.agent.d.ts.map +1 -0
  354. package/dist/components/hover-card/hover-card.d.ts +80 -0
  355. package/dist/components/hover-card/hover-card.d.ts.map +1 -0
  356. package/dist/components/hover-card/index.d.ts +4 -0
  357. package/dist/components/hover-card/index.d.ts.map +1 -0
  358. package/dist/components/hover-card/index.js +6 -0
  359. package/dist/components/hover-card/index.js.map +1 -0
  360. package/dist/components/icon-button/index.js +1 -1
  361. package/dist/components/icon-button-group/index.js +1 -1
  362. package/dist/components/icon-picker/index.js +1 -1
  363. package/dist/components/index.d.ts +4 -0
  364. package/dist/components/index.d.ts.map +1 -1
  365. package/dist/components/info-tip/index.js +1 -1
  366. package/dist/components/key-value-pair/index.js +1 -1
  367. package/dist/components/key-value-pair/key-value-pair.d.ts +8 -1
  368. package/dist/components/key-value-pair/key-value-pair.d.ts.map +1 -1
  369. package/dist/components/locale-picker/index.js +1 -1
  370. package/dist/components/message-card/index.js +1 -1
  371. package/dist/components/message-tray/index.js +1 -1
  372. package/dist/components/multi-select/index.js +1 -1
  373. package/dist/components/note-timeline/index.d.ts +4 -0
  374. package/dist/components/note-timeline/index.d.ts.map +1 -0
  375. package/dist/components/note-timeline/index.js +6 -0
  376. package/dist/components/note-timeline/index.js.map +1 -0
  377. package/dist/components/note-timeline/note-timeline.agent.d.ts +4 -0
  378. package/dist/components/note-timeline/note-timeline.agent.d.ts.map +1 -0
  379. package/dist/components/note-timeline/note-timeline.d.ts +77 -0
  380. package/dist/components/note-timeline/note-timeline.d.ts.map +1 -0
  381. package/dist/components/notes-panel/index.js +1 -1
  382. package/dist/components/notification-card/index.js +1 -1
  383. package/dist/components/notification-tray/index.js +1 -1
  384. package/dist/components/operator-hero/index.js +1 -1
  385. package/dist/components/optical-prescription/index.js +1 -1
  386. package/dist/components/panel-header/index.js +1 -1
  387. package/dist/components/panel-header/panel-header.d.ts +7 -0
  388. package/dist/components/panel-header/panel-header.d.ts.map +1 -1
  389. package/dist/components/patient-details/index.js +1 -1
  390. package/dist/components/patient-details/patient-details.d.ts.map +1 -1
  391. package/dist/components/patient-search/index.js +1 -1
  392. package/dist/components/patient-summary-card/index.js +1 -1
  393. package/dist/components/patient-summary-card/patient-summary-card.d.ts +54 -0
  394. package/dist/components/patient-summary-card/patient-summary-card.d.ts.map +1 -1
  395. package/dist/components/patient-table/index.js +1 -1
  396. package/dist/components/payment-card/index.js +1 -1
  397. package/dist/components/payment-form/index.js +1 -1
  398. package/dist/components/pdf-viewer/index.js +1 -1
  399. package/dist/components/periodontal-chart/index.js +1 -1
  400. package/dist/components/periodontal-chart-card/index.js +1 -1
  401. package/dist/components/periodontal-diagnosis/index.js +1 -1
  402. package/dist/components/periodontal-risk-chart/index.js +1 -1
  403. package/dist/components/permission-matrix/index.js +1 -1
  404. package/dist/components/popover/index.js +1 -1
  405. package/dist/components/practice-profile-hero/index.js +1 -1
  406. package/dist/components/practice-results/index.js +1 -1
  407. package/dist/components/pregnancy-dating/index.js +1 -1
  408. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  409. package/dist/components/privacy-lock/index.js +1 -1
  410. package/dist/components/product-hub-tray/index.js +1 -1
  411. package/dist/components/public-header/index.js +1 -1
  412. package/dist/components/radio/index.js +1 -1
  413. package/dist/components/radio-group/index.js +2 -2
  414. package/dist/components/radiograph-panel/index.js +1 -1
  415. package/dist/components/reviews-panel/index.js +1 -1
  416. package/dist/components/rich-text-editor/index.js +1 -1
  417. package/dist/components/search-bar/index.js +1 -1
  418. package/dist/components/section-card/index.d.ts +4 -0
  419. package/dist/components/section-card/index.d.ts.map +1 -0
  420. package/dist/components/section-card/index.js +6 -0
  421. package/dist/components/section-card/index.js.map +1 -0
  422. package/dist/components/section-card/section-card.agent.d.ts +3 -0
  423. package/dist/components/section-card/section-card.agent.d.ts.map +1 -0
  424. package/dist/components/section-card/section-card.d.ts +30 -0
  425. package/dist/components/section-card/section-card.d.ts.map +1 -0
  426. package/dist/components/sheet/index.js +1 -1
  427. package/dist/components/sign-document/index.js +1 -1
  428. package/dist/components/signature-status-chip/index.js +1 -1
  429. package/dist/components/slot-grid/index.js +1 -1
  430. package/dist/components/streaming-text/index.js +1 -1
  431. package/dist/components/tab-bar/index.js +1 -1
  432. package/dist/components/tag/index.js +1 -1
  433. package/dist/components/task-tray/index.js +1 -1
  434. package/dist/components/tasks-panel/index.js +1 -1
  435. package/dist/components/theme-toggle/index.js +1 -1
  436. package/dist/components/timeline/index.js +1 -1
  437. package/dist/components/timeline/timeline.d.ts +1 -1
  438. package/dist/components/timeline/timeline.d.ts.map +1 -1
  439. package/dist/components/toast/index.js +1 -1
  440. package/dist/components/tool-rail/index.js +1 -1
  441. package/dist/components/tooltip/index.js +1 -1
  442. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  443. package/dist/components/tooth-scheme/index.js +1 -1
  444. package/dist/components/transaction-chip/index.js +1 -1
  445. package/dist/components/transaction-chip/transaction-chip.d.ts +11 -0
  446. package/dist/components/transaction-chip/transaction-chip.d.ts.map +1 -1
  447. package/dist/components/transcript-panel/index.js +1 -1
  448. package/dist/components/warning-stack/index.js +1 -1
  449. package/dist/components/widget-picker/index.js +1 -1
  450. package/dist/components/workflow/index.js +1 -1
  451. package/dist/components/workflow-status/index.d.ts +4 -0
  452. package/dist/components/workflow-status/index.d.ts.map +1 -0
  453. package/dist/components/workflow-status/index.js +7 -0
  454. package/dist/components/workflow-status/index.js.map +1 -0
  455. package/dist/components/workflow-status/workflow-status.agent.d.ts +4 -0
  456. package/dist/components/workflow-status/workflow-status.agent.d.ts.map +1 -0
  457. package/dist/components/workflow-status/workflow-status.d.ts +52 -0
  458. package/dist/components/workflow-status/workflow-status.d.ts.map +1 -0
  459. package/dist/host-compat.css +4 -1
  460. package/dist/i18n/locales/ar.d.ts +17 -0
  461. package/dist/i18n/locales/ar.d.ts.map +1 -1
  462. package/dist/i18n/locales/ar.js +18 -1
  463. package/dist/i18n/locales/ar.js.map +1 -1
  464. package/dist/i18n/locales/de.d.ts +17 -0
  465. package/dist/i18n/locales/de.d.ts.map +1 -1
  466. package/dist/i18n/locales/de.js +18 -1
  467. package/dist/i18n/locales/de.js.map +1 -1
  468. package/dist/i18n/locales/el.d.ts +17 -0
  469. package/dist/i18n/locales/el.d.ts.map +1 -1
  470. package/dist/i18n/locales/el.js +18 -1
  471. package/dist/i18n/locales/el.js.map +1 -1
  472. package/dist/i18n/locales/en.d.ts +17 -0
  473. package/dist/i18n/locales/en.d.ts.map +1 -1
  474. package/dist/i18n/locales/en.js +18 -1
  475. package/dist/i18n/locales/en.js.map +1 -1
  476. package/dist/i18n/locales/es.d.ts +17 -0
  477. package/dist/i18n/locales/es.d.ts.map +1 -1
  478. package/dist/i18n/locales/es.js +18 -1
  479. package/dist/i18n/locales/es.js.map +1 -1
  480. package/dist/i18n/locales/fr.d.ts +17 -0
  481. package/dist/i18n/locales/fr.d.ts.map +1 -1
  482. package/dist/i18n/locales/fr.js +18 -1
  483. package/dist/i18n/locales/fr.js.map +1 -1
  484. package/dist/i18n/locales/hi.d.ts +17 -0
  485. package/dist/i18n/locales/hi.d.ts.map +1 -1
  486. package/dist/i18n/locales/hi.js +18 -1
  487. package/dist/i18n/locales/hi.js.map +1 -1
  488. package/dist/i18n/locales/it.d.ts +20 -3
  489. package/dist/i18n/locales/it.d.ts.map +1 -1
  490. package/dist/i18n/locales/it.js +20 -3
  491. package/dist/i18n/locales/it.js.map +1 -1
  492. package/dist/i18n/locales/ja.d.ts +17 -0
  493. package/dist/i18n/locales/ja.d.ts.map +1 -1
  494. package/dist/i18n/locales/ja.js +18 -1
  495. package/dist/i18n/locales/ja.js.map +1 -1
  496. package/dist/i18n/locales/nl.d.ts +17 -0
  497. package/dist/i18n/locales/nl.d.ts.map +1 -1
  498. package/dist/i18n/locales/nl.js +18 -1
  499. package/dist/i18n/locales/nl.js.map +1 -1
  500. package/dist/i18n/locales/pl.d.ts +17 -0
  501. package/dist/i18n/locales/pl.d.ts.map +1 -1
  502. package/dist/i18n/locales/pl.js +18 -1
  503. package/dist/i18n/locales/pl.js.map +1 -1
  504. package/dist/i18n/locales/pt.d.ts +17 -0
  505. package/dist/i18n/locales/pt.d.ts.map +1 -1
  506. package/dist/i18n/locales/pt.js +18 -1
  507. package/dist/i18n/locales/pt.js.map +1 -1
  508. package/dist/i18n/locales/ro.d.ts +17 -0
  509. package/dist/i18n/locales/ro.d.ts.map +1 -1
  510. package/dist/i18n/locales/ro.js +18 -1
  511. package/dist/i18n/locales/ro.js.map +1 -1
  512. package/dist/i18n/locales/ru.d.ts +17 -0
  513. package/dist/i18n/locales/ru.d.ts.map +1 -1
  514. package/dist/i18n/locales/ru.js +18 -1
  515. package/dist/i18n/locales/ru.js.map +1 -1
  516. package/dist/i18n/locales/sq.d.ts +17 -0
  517. package/dist/i18n/locales/sq.d.ts.map +1 -1
  518. package/dist/i18n/locales/sq.js +18 -1
  519. package/dist/i18n/locales/sq.js.map +1 -1
  520. package/dist/i18n/locales/sv.d.ts +17 -0
  521. package/dist/i18n/locales/sv.d.ts.map +1 -1
  522. package/dist/i18n/locales/sv.js +18 -1
  523. package/dist/i18n/locales/sv.js.map +1 -1
  524. package/dist/i18n/locales/tr.d.ts +17 -0
  525. package/dist/i18n/locales/tr.d.ts.map +1 -1
  526. package/dist/i18n/locales/tr.js +18 -1
  527. package/dist/i18n/locales/tr.js.map +1 -1
  528. package/dist/i18n/locales/zh.d.ts +17 -0
  529. package/dist/i18n/locales/zh.d.ts.map +1 -1
  530. package/dist/i18n/locales/zh.js +18 -1
  531. package/dist/i18n/locales/zh.js.map +1 -1
  532. package/dist/index.js +929 -916
  533. package/dist/index.js.map +1 -1
  534. package/dist/locales/ar.json +18 -1
  535. package/dist/locales/de.json +18 -1
  536. package/dist/locales/el.json +18 -1
  537. package/dist/locales/en.json +18 -1
  538. package/dist/locales/es.json +18 -1
  539. package/dist/locales/fr.json +18 -1
  540. package/dist/locales/hi.json +18 -1
  541. package/dist/locales/it.json +20 -3
  542. package/dist/locales/ja.json +18 -1
  543. package/dist/locales/nl.json +18 -1
  544. package/dist/locales/pl.json +18 -1
  545. package/dist/locales/pt.json +18 -1
  546. package/dist/locales/ro.json +18 -1
  547. package/dist/locales/ru.json +18 -1
  548. package/dist/locales/sq.json +18 -1
  549. package/dist/locales/sv.json +18 -1
  550. package/dist/locales/tr.json +18 -1
  551. package/dist/locales/zh.json +18 -1
  552. package/dist/patterns/alia-assistant/index.js +1 -1
  553. package/dist/patterns/anamnesis/index.js +1 -1
  554. package/dist/patterns/calendar/calendar.model.d.ts +2 -0
  555. package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
  556. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  557. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  558. package/dist/patterns/calendar/index.js +1 -1
  559. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  560. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  561. package/dist/patterns/signature-request/index.js +1 -1
  562. package/dist/tokens.css +1 -1
  563. package/package.json +17 -1
  564. package/dist/_chunks/appointment-card-D6mk39NB.js +0 -296
  565. package/dist/_chunks/appointment-card-D6mk39NB.js.map +0 -1
  566. package/dist/_chunks/appointment-timeline-D-V97Bhc.js +0 -403
  567. package/dist/_chunks/appointment-timeline-D-V97Bhc.js.map +0 -1
  568. package/dist/_chunks/button-group-CaxRJsNG.js +0 -289
  569. package/dist/_chunks/button-group-CaxRJsNG.js.map +0 -1
  570. package/dist/_chunks/calendar-event-card-DSh-69HT.js.map +0 -1
  571. package/dist/_chunks/calendar-workspace-4NH1Z47_.js.map +0 -1
  572. package/dist/_chunks/clinical-note-card-CTRzmqvv.js +0 -438
  573. package/dist/_chunks/clinical-note-card-CTRzmqvv.js.map +0 -1
  574. package/dist/_chunks/counter-dRlTNC_y.js.map +0 -1
  575. package/dist/_chunks/entity-card-DmrgYSEX.js.map +0 -1
  576. package/dist/_chunks/field-value-BetdWMA2.js +0 -384
  577. package/dist/_chunks/field-value-BetdWMA2.js.map +0 -1
  578. package/dist/_chunks/file-upload-CwxdqkMK.js.map +0 -1
  579. package/dist/_chunks/key-value-pair-BIBdZBLg.js.map +0 -1
  580. package/dist/_chunks/panel-header-D313n_9-.js +0 -105
  581. package/dist/_chunks/panel-header-D313n_9-.js.map +0 -1
  582. package/dist/_chunks/patient-details-BGiawUHd.js +0 -760
  583. package/dist/_chunks/patient-details-BGiawUHd.js.map +0 -1
  584. package/dist/_chunks/patient-summary-card--CT_gbaQ.js +0 -454
  585. package/dist/_chunks/patient-summary-card--CT_gbaQ.js.map +0 -1
  586. package/dist/_chunks/payment-automation-upsell-DwQW2fRp.js.map +0 -1
  587. package/dist/_chunks/timeline-Bs9Erxlo.js.map +0 -1
  588. package/dist/_chunks/tooltip-DvmfrNvB.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tool-rail-ONaV-Nzz.js","sources":["../../src/components/tool-rail/tool-rail.agent.ts","../../src/components/tool-rail/tool-rail.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — ToolRail. */\n/* */\n/* Rail-level surface: open / close a tool's panel and read which tool */\n/* is active. State is strictly the active tool id — never any tool's */\n/* panel CONTENT (which may carry PHI). Tool ids + badge counts are */\n/* supplied by the host via props, not derived from panel bodies. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { ToolRailHandle } from './tool-rail';\n\nexport const toolRailAgent: AgentAdapter<ToolRailHandle> = {\n id: 'tool-rail',\n capabilities: ['open', 'close', 'select_single'],\n state: {\n activeToolId: {\n type: 'string | null',\n descriptionKey: 'ui.toolRail.agent.state.activeToolId',\n description:\n 'Id of the tool whose panel is currently open, or null when the rail is collapsed to its strip. No panel content is ever exposed.',\n read: (handle) => handle.getActiveToolId(),\n },\n },\n actions: {\n open: {\n // Pure ephemeral panel state (open) — no data loss, no external effect.\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n // descriptionKey shape is intentionally pre-existing — already resolves to\n // real multi-locale translations; do not canonicalise.\n descriptionKey: 'ui.toolRail.agent.actions.open',\n description: \"Open the given tool's panel.\",\n examples: [{ args: { id: 'inbox' }, note: 'Open the inbox tool panel.' }],\n invoke: (handle, args: { id: string }) => {\n handle.open(args.id);\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.toolRail.agent.actions.close',\n description: 'Collapse the rail to its strip (no active tool).',\n invoke: (handle) => {\n handle.close();\n },\n },\n select_tool: {\n safety: 'read',\n argsType: '{ id: string | null }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: ['string', 'null'] } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.toolRail.agent.actions.selectTool',\n description:\n 'Set the active tool by id (opens its panel), or pass null to collapse.',\n invoke: (handle, args: { id: string | null }) => {\n handle.setActiveTool(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'tool-rail',\n description: 'Marks the ToolRail wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific rail from the agent.',\n },\n item: {\n attr: 'data-tool-id',\n description:\n 'Stable tool id emitted on each strip IconButton. The active icon also carries data-active set to its id.',\n },\n },\n};\n","import {\n forwardRef,\n Fragment,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { IconButton } from '../button/icon-button';\nimport { ScrollArea } from '../scroll-area/scroll-area';\nimport { TooltipProvider } from '../tooltip/tooltip';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useEdgeResize } from '../../hooks/use-edge-resize';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useTheme } from '../../hooks/use-theme';\nimport { useAgentRegistration } from '../../agent/registry';\nimport type { AgentAdapter } from '../../agent/types';\nimport { toolRailAgent } from './tool-rail.agent';\n\n/* ------------------------------------------------------------------ */\n/* Tokenised widths */\n/* */\n/* Fixed + tokenised so the rail stays constraint-compliant — no */\n/* prop-driven inline styles. Bare `[inline-size:…]` is NOT a */\n/* recognised utility under the `ds:` prefix; it must carry the */\n/* prefix or Tailwind emits no rule. Consumers needing a different */\n/* size wrap the rail and override via CSS. */\n/* ------------------------------------------------------------------ */\nconst RAIL_WIDTH = 'ds:[inline-size:3rem]';\n// Panel width rides a consumer-overridable custom property (set\n// `--tool-rail-panel-inline-size` on the rail or a wrapper) so\n// content-heavy tools (e.g. an inbox feed) can widen their panel\n// without inline styles. Defaults to the 22rem tray-family width.\n// `--ai-tools-rail-panel-inline-size` is the deprecated alias var read\n// here as a fallback so external consumers that set the pre-rename name\n// keep working for one release; the resize hook only ever writes the new\n// `--tool-rail-panel-inline-size`.\nconst PANEL_WIDTH =\n 'ds:[inline-size:var(--tool-rail-panel-inline-size,var(--ai-tools-rail-panel-inline-size,22rem))]';\n// The custom property PANEL_WIDTH reads. The resize hook writes the\n// committed px width here (on the panel element, so it beats consumer\n// class overrides on the root) and removes it on reset.\nconst PANEL_SIZE_PROPERTY = '--tool-rail-panel-inline-size';\n// Resize clamp + nominal default, px (352px = the 22rem token default).\n// The ceiling is 880 so a form panel can reach a three-column layout:\n// pairing fields is the only way to shorten a long form without\n// shrinking a 44px target, and that needs real inline size.\nconst PANEL_MIN_SIZE = 288;\nconst PANEL_MAX_SIZE = 880;\nconst PANEL_DEFAULT_SIZE = 352;\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface ToolRailTool {\n /** Stable tool id — used in `data-active`, the imperative handle, and\n * to label the open panel region. */\n id: string;\n /** Accessible name for the strip icon + tooltip, and the open panel's\n * region label. Never rendered as visible body text. */\n label: string;\n /** lucide-react glyph (rendered `aria-hidden` inside the IconButton). */\n icon: ReactNode;\n /** Panel body for this tool. Rendered inline-start of the strip when\n * `side='end'` (mirrored for `'start'`). The consumer composes it. */\n panel: ReactNode;\n /**\n * Optional non-scrolling header for this tool's panel. Rendered pinned at\n * the top of the open panel — above the scroll region — so a tool's title /\n * filters stay visible as the body scrolls. This is the rail-level home for\n * a sticky tool header; every tool gets it for free.\n */\n header?: ReactNode;\n /**\n * When true the panel body is NOT wrapped in the rail's `ScrollArea` — the\n * tool fills the (height-bounded) panel and owns its own scroll/layout.\n * Use for self-scrolling tools (e.g. `AppointmentTimeline`, whose infinite\n * scroll + today-anchoring + edge fades require it to be the scroll\n * container). Default `false` (the rail scrolls the body).\n */\n fill?: boolean;\n /** Optional unseen / notification count shown on the strip icon. */\n badgeCount?: number;\n /** When true the icon is non-interactive and skipped by roving focus. */\n disabled?: boolean;\n /**\n * Scope tier (drives the two-group divider). The two scope values render in\n * array order with a divider at the boundary between them — order the array\n * so the groups stay contiguous. A divider only appears when BOTH groups are\n * present; omit `scope` on every tool for an ungrouped strip (legacy). The\n * rail attaches no meaning beyond grouping — the host decides which value\n * leads (e.g. the Control Room pins favourites first).\n */\n scope?: 'global' | 'contextual';\n /**\n * When true this icon joins the drag-and-drop / `Alt`+Arrow reorder run.\n * The host supplies `onReorder` and owns the resulting order. Moves are\n * confined to the contiguous run of `reorderable` tools — so if EVERY tool\n * is `reorderable` the run is the whole strip and a tool can be dragged\n * across the scope divider; the host's `onReorder` decides what crossing it\n * means (e.g. the Control Room reads it as pin / unpin). Reordering never\n * changes focus roving — focus follows the moved tool to its new slot.\n */\n reorderable?: boolean;\n}\n\n/**\n * Curated imperative handle for ToolRail. Exposed as the forwardRef\n * target so a future agent / MCP UI bridge can drive the rail without\n * touching the DOM. See `tool-rail.agent.ts`.\n *\n * State surfaced here is strictly identifiers + counts — never any\n * tool's panel content (which may carry PHI).\n */\nexport interface ToolRailHandle {\n /** Currently-active tool id, or null when collapsed to strip-only. */\n getActiveToolId: () => string | null;\n /** Activate a tool by id (opens its panel), or null to collapse. */\n setActiveTool: (id: string | null) => void;\n /** Activate a tool by id (opens its panel). */\n open: (id: string) => void;\n /** Collapse to strip-only (no active tool). */\n close: () => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA — `side` drives the dock edge + which shadow faces main content */\n/* ------------------------------------------------------------------ */\n\nconst railVariants = cva(\n ['ds:flex ds:shrink-0 ds:h-full', 'ds:bg-[var(--background)]'].join(' '),\n {\n variants: {\n side: {\n // Strip docks inline-end; the panel mounts inline-start of it\n // (flex-row, panel rendered first). Shadow faces the main area —\n // no border against main (the rail stays line-free; the only seam\n // is the strip↔panel divider on the open panel, see render).\n // Accessible (AAA) theme swaps the soft chrome shadow for a solid 1px\n // border on the content-facing edge (border-s for end-docked).\n end: 'ds:flex-row ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none',\n // Strip docks inline-start; the panel mounts inline-end of it.\n start:\n 'ds:flex-row-reverse ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none',\n },\n },\n defaultVariants: { side: 'end' },\n },\n);\n\nconst stripVariants = cva(\n [\n 'ds:flex ds:shrink-0 ds:flex-col ds:items-center',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n 'ds:gap-[var(--spacing-xs)]',\n RAIL_WIDTH,\n ].join(' '),\n);\n\nconst panelVariants = cva(\n [\n 'ds:relative ds:flex ds:min-h-0 ds:flex-col ds:h-full',\n 'ds:bg-[var(--background)]',\n PANEL_WIDTH,\n // Defensive: the panel doesn't animate its width today, but if a\n // consumer adds a transition on the var, suppress it mid-drag.\n 'ds:data-[resizing]:transition-none',\n ].join(' '),\n);\n\n// Resize handle on the panel's inner edge — mirrors Resizable's Handle\n// (::before hit area to --min-target-size, hover/focus/drag accent, token\n// focus ring) but absolutely positioned over the panel edge. Like the\n// Sidebar's handle it stays TRANSPARENT at rest: the rail root's\n// `shadow-chrome-*` (which faces the main content) carries the resting seam,\n// exactly as the start-docked Sidebar leans on its own shadow — so the rail\n// never shows the constant coloured bar it used to. The strip only tints\n// accent on hover / focus / drag.\nconst panelResizeHandleVariants = cva(\n [\n 'ds:absolute ds:[inset-block:0] ds:z-[1] ds:select-none ds:touch-none',\n 'ds:[inline-size:var(--resizable-handle-size)] ds:cursor-col-resize',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-[var(--accent)] ds:focus-visible:bg-[var(--accent)] ds:data-[resizing]:bg-[var(--accent)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n \"ds:before:absolute ds:before:content-['']\",\n 'ds:before:[block-size:100%]',\n 'ds:before:[inline-size:var(--min-target-size)]',\n 'ds:before:[inset-block:0]',\n 'ds:before:[inset-inline:calc(0px_-_(var(--min-target-size)_-_var(--resizable-handle-size))_/_2)]',\n ],\n {\n variants: {\n edge: {\n 'inline-start': 'ds:start-0',\n 'inline-end': 'ds:end-0',\n },\n },\n defaultVariants: { edge: 'inline-start' },\n },\n);\n\n// Hand-rolled overlay count chip — mirrors the AliaSidebar / MessageTray\n// badge markup. A <Badge> would re-introduce its own landmark/role; the\n// strip icon already carries the count in its accessible name, so this\n// span is purely decorative (`aria-hidden`).\nconst badgeVariants = cva(\n [\n 'ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]',\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-w-[calc(var(--spacing-md)+var(--spacing-xs))]',\n 'ds:h-[calc(var(--spacing-md)+var(--spacing-xs))]',\n 'ds:ps-[calc(var(--spacing-xs)/1.5)] ds:pe-[calc(var(--spacing-xs)/1.5)]',\n 'ds:rounded-[var(--radius-full)]',\n 'ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)]',\n 'ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:leading-none',\n 'ds:pointer-events-none ds:select-none',\n 'ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]',\n ].join(' '),\n);\n\n// Per-icon slot — the positioned box that hosts the IconButton, its badge and\n// the optional affordance overlay. CVA carries the drag states: the dragged\n// icon dims; a hovered drop target shows a dashed accent ring (logical offset),\n// mirroring the Sidebar's favourite-row affordance.\nconst toolSlotVariants = cva(\n // `group/rail-tool` lets an affordance overlay (e.g. a pin star) reveal on\n // hover / focus-within of the whole slot.\n ['ds:group/rail-tool ds:relative', 'ds:rounded-[var(--radius-sm)]'],\n {\n variants: {\n dragging: { true: 'ds:opacity-60', false: '' },\n dropTarget: {\n true: 'ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--accent)] ds:outline-offset-[length:var(--focus-ring-offset)]',\n false: '',\n },\n reorderable: {\n true: 'ds:cursor-grab ds:active:cursor-grabbing',\n false: '',\n },\n },\n defaultVariants: {\n dragging: false,\n dropTarget: false,\n reorderable: false,\n },\n },\n);\n\n/* A departing tool slot fades in place; the reflow hook then slides the\n surviving icons to close the gap. Declared at rest so the transition\n has a value to animate from the moment the leaving class lands. */\nconst toolLeavingClass = 'ds:opacity-0';\nconst toolElevationClass = [\n 'ds:transition-opacity ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface ToolRailProps extends VariantProps<typeof railVariants> {\n /** Stable instance id, surfaced on the root as `data-component-id`. */\n id?: string;\n /** The tools shown as icons on the strip. */\n tools: ToolRailTool[];\n /** Controlled active tool id (null = collapsed / strip-only). */\n activeToolId?: string | null;\n /** Uncontrolled initial active tool id (default null). */\n defaultActiveToolId?: string | null;\n /** Fires whenever the active tool changes (incl. → null on collapse). */\n onActiveToolChange?: (id: string | null) => void;\n /** Which edge the rail docks to. Default `'end'` (inline-end). */\n side?: 'start' | 'end';\n /** Accessible label for the toolbar strip. */\n railLabel?: string;\n /**\n * Opt-in resize affordance for the open tool panel. Renders a\n * `role=\"separator\"` drag handle on the panel's inner edge (the edge\n * facing the main content). The committed width is written to\n * `--tool-rail-panel-inline-size` on the panel element (288–880px);\n * Enter / double-click resets to the token-driven default. Default `false`.\n */\n resizablePanel?: boolean;\n /**\n * Fires when the user reorders the `reorderable` run (drag-drop or\n * `Alt`+Arrow). `from` / `to` are indices into `tools`; the host applies the\n * move to the array it passes back. Reordering is enabled when this callback\n * is supplied AND at least one tool is `reorderable`. When the whole strip is\n * reorderable, `to` may land in the other scope group — the host interprets\n * the crossing (and may treat it as a no-op, e.g. reordering within a\n * host-ordered group).\n */\n onReorder?: (from: number, to: number) => void;\n /**\n * Optional override for the polite live-region message announced after a\n * reorder. Lets the host phrase membership-aware moves (e.g. \"Pinned X to\n * favourites\") instead of the generic \"moved to position N\". Return an empty\n * string to stay silent (e.g. for a move the host treats as a no-op). When\n * omitted, the rail announces the generic run-relative position.\n */\n formatReorderAnnouncement?: (args: {\n tool: ToolRailTool;\n from: number;\n to: number;\n }) => string;\n /**\n * Optional per-icon overlay control, rendered as a sibling of each strip\n * IconButton (the same positioned box the notification badge uses). Use for\n * a small affordance such as a pin toggle — the rail attaches no meaning to\n * what it renders. Receives the tool and its index / active state.\n */\n renderToolAffordance?: (\n tool: ToolRailTool,\n context: { index: number; isActive: boolean; isRovingTarget: boolean },\n ) => ReactNode;\n /**\n * Optional non-scrolling header rendered at the top of the OPEN tool panel,\n * above its scroll region. Host-owned content (e.g. a pin / unpin control) —\n * the rail attaches no meaning. Receives the active tool.\n */\n renderPanelHeader?: (\n tool: ToolRailTool,\n context: { isActive: boolean },\n ) => ReactNode;\n /**\n * Identity override for the root's `data-component` attribute. Defaults to\n * `'tool-rail'`. A product wrapper (e.g. ControlRoomRail) passes its own\n * kebab id so the DOM / cascade boundary — and an agent's `domHooks.root` —\n * can tell its surface apart from a bare ToolRail, without the engine ever\n * importing the wrapper.\n */\n dataComponent?: string;\n /**\n * Agent adapter registered for this rail instance. Defaults to\n * `toolRailAgent`. A wrapper passes its own adapter (matching\n * `dataComponent`) so the rail registers under the wrapper's identity. The\n * instance id is sourced from the `id` prop (also stamped as\n * `data-component-id`).\n */\n agentAdapter?: AgentAdapter<ToolRailHandle>;\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number, overflowLabel: string): string {\n return count > 99 ? overflowLabel : String(count);\n}\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nexport const ToolRail = forwardRef<ToolRailHandle, ToolRailProps>(\n (\n {\n id,\n tools,\n activeToolId,\n defaultActiveToolId = null,\n onActiveToolChange,\n side = 'end',\n railLabel,\n resizablePanel = false,\n onReorder,\n formatReorderAnnouncement,\n renderToolAffordance,\n renderPanelHeader,\n dataComponent = 'tool-rail',\n agentAdapter = toolRailAgent,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // Controlled / uncontrolled bridge — the same hook MessageTray uses.\n const [activeRaw, setActiveRaw] = useControllableState<string | null>({\n value: activeToolId,\n defaultValue: defaultActiveToolId,\n onChange: onActiveToolChange,\n });\n const activeId = activeRaw ?? null;\n\n // Roving-tabindex bookkeeping for the vertical toolbar strip.\n const buttonsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const panelRef = useRef<HTMLElement | null>(null);\n const [focusIndex, setFocusIndex] = useState(0);\n // Distinguishes keyboard activation (auto-focus into the panel) from\n // pointer activation (focus stays on the icon — less jarring).\n const activatedByKeyboardRef = useRef(false);\n // Set on Enter/Space keydown, read by the click handler that follows,\n // cleared on keyup — so a subsequent mouse click never inherits it.\n const keyboardActivateRef = useRef(false);\n\n const activeIndex = useMemo(\n () => tools.findIndex((tl) => tl.id === activeId),\n [tools, activeId],\n );\n const activeTool = activeIndex >= 0 ? tools[activeIndex] : null;\n\n // First non-disabled index — the resting roving stop when none active.\n const firstEnabledIndex = useMemo(\n () => tools.findIndex((tl) => !tl.disabled),\n [tools],\n );\n\n // Scope grouping: a divider marks the boundary between the two scope groups,\n // whichever order they appear in. The array is always grouped (all of one\n // scope, then the other); the divider precedes the first tool whose scope\n // differs from the lead tool's. `boundary > 0` guarantees both groups are\n // present. Render-only (not a `tools[]` member) so roving focus is untouched;\n // a legacy strip with no `scope` set stays ungrouped.\n const scopeDividerIndex = useMemo(() => {\n const lead = tools[0]?.scope;\n if (!lead) return -1;\n return tools.findIndex((tl) => tl.scope && tl.scope !== lead);\n }, [tools]);\n const showScopeDivider = scopeDividerIndex > 0;\n\n /* ---- Reorder (drag-and-drop + Alt+Arrow keyboard) ------------- */\n // The contiguous run of `reorderable` tools — a tool only moves within it.\n const reorderRun = useMemo(() => {\n const first = tools.findIndex((tl) => tl.reorderable);\n if (first < 0) return null;\n let last = first;\n while (last + 1 < tools.length && tools[last + 1]?.reorderable) last += 1;\n return { first, last };\n }, [tools]);\n const reorderEnabled = !!onReorder && reorderRun !== null;\n const reorderInstructionsId = useId();\n\n const [dragIndex, setDragIndex] = useState<number | null>(null);\n const [dropIndex, setDropIndex] = useState<number | null>(null);\n\n /* ---- Strip enter / exit / reflow animations ------------------ */\n /* The same hooks the note/task panels use, applied to the icon strip:\n when a contextual tool appears or disappears (e.g. selecting an\n appointment adds Notes + Details), surviving icons slide to their\n new positions and departing icons fade out in place. */\n const { resolvedTheme } = useTheme();\n const reduceMotion = resolvedTheme.endsWith('-accessible') || undefined;\n\n const { containerRef: reflowRef } = useListReflow<HTMLDivElement>({\n key: tools.map((tl) => tl.id).join(),\n reduceMotion,\n });\n\n const exit = useExitTransition({ reduceMotion });\n\n // Tools that were in the previous render but are gone now, kept around\n // until their exit fade completes. Rendered after the current tools\n // WITHOUT `data-reflow-id` so the reflow hook ignores them — they fade\n // out at the bottom of the strip while the surviving icons reflow.\n const [leavingTools, setLeavingTools] = useState<ToolRailTool[]>([]);\n const prevToolsRef = useRef<ToolRailTool[]>(tools);\n useEffect(() => {\n const prev = prevToolsRef.current;\n const currentIds = new Set(tools.map((tl) => tl.id));\n const removed = prev.filter((tl) => !currentIds.has(tl.id));\n if (removed.length > 0) {\n setLeavingTools((existing) => {\n const existingIds = new Set(existing.map((tl) => tl.id));\n return [\n ...existing,\n ...removed.filter((tl) => !existingIds.has(tl.id)),\n ];\n });\n for (const tl of removed) {\n exit.leave(tl.id, () => {\n setLeavingTools((existing) =>\n existing.filter((item) => item.id !== tl.id),\n );\n });\n }\n }\n prevToolsRef.current = tools;\n }, [tools, exit]);\n\n // sr-only announcement. The zero-width-space toggle forces a re-announce of\n // an identical message (e.g. moving the same item twice) — same technique\n // the Sidebar uses for its reorder live region.\n const [reorderMessage, setReorderMessage] = useState('');\n const announceToggle = useRef(false);\n const commitReorder = useCallback(\n (from: number, to: number) => {\n if (!onReorder || !reorderRun) return;\n const clamped = Math.max(\n reorderRun.first,\n Math.min(reorderRun.last, to),\n );\n if (clamped === from) return;\n onReorder(from, clamped);\n const moved = tools[from];\n if (moved) {\n // The host can phrase membership-aware moves (e.g. pin / unpin) and\n // can return '' to stay silent for a move it treats as a no-op.\n const text = formatReorderAnnouncement\n ? formatReorderAnnouncement({ tool: moved, from, to: clamped })\n : t('toolRail.reorderAnnounce', {\n tool: moved.label,\n to: clamped - reorderRun.first + 1,\n total: reorderRun.last - reorderRun.first + 1,\n defaultValue: '{{tool}} moved to position {{to}} of {{total}}',\n });\n if (text) {\n announceToggle.current = !announceToggle.current;\n setReorderMessage(announceToggle.current ? text : `${text}\\u200b`);\n }\n }\n },\n [onReorder, reorderRun, tools, t, formatReorderAnnouncement],\n );\n\n // The roving tab stop: the active icon when a tool is open, else the\n // index the user last focused, else the first enabled icon.\n const rovingIndex =\n activeIndex >= 0\n ? activeIndex\n : focusIndex >= 0 && !tools[focusIndex]?.disabled\n ? focusIndex\n : firstEnabledIndex;\n\n const selectTool = useCallback(\n (toolId: string, fromKeyboard: boolean) => {\n const tool = tools.find((tl) => tl.id === toolId);\n if (!tool || tool.disabled) return;\n activatedByKeyboardRef.current = fromKeyboard;\n // Clicking / activating the active tool collapses to strip-only.\n setActiveRaw(activeId === toolId ? null : toolId);\n },\n [tools, activeId, setActiveRaw],\n );\n\n /* ---- Roving arrow-key navigation (vertical toolbar) ----------- */\n const handleStripKeyDown = useCallback(\n (event: ReactKeyboardEvent<HTMLDivElement>) => {\n const count = tools.length;\n if (count === 0) return;\n // Alt+Arrow is reserved for reordering (handled on the icon); never\n // let it move focus roving as well.\n if (event.altKey) return;\n\n let next: number | null = null;\n if (event.key === 'ArrowDown') next = (rovingIndex + 1) % count;\n else if (event.key === 'ArrowUp')\n next = (rovingIndex - 1 + count) % count;\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = count - 1;\n if (next === null) return;\n\n // Skip disabled icons in the travel direction.\n const goingBack = event.key === 'ArrowUp' || event.key === 'End';\n let candidate = next;\n let attempts = 0;\n while (attempts < count && tools[candidate]?.disabled) {\n candidate = goingBack\n ? (candidate - 1 + count) % count\n : (candidate + 1) % count;\n attempts += 1;\n }\n if (tools[candidate]?.disabled) return;\n\n event.preventDefault();\n setFocusIndex(candidate);\n buttonsRef.current[candidate]?.focus();\n },\n [tools, rovingIndex],\n );\n\n /* ---- Esc collapses + returns focus to the active tool's icon -- */\n // Attached imperatively via the root ref (not a JSX onKeyDown on the\n // static container) so the Escape shortcut works from anywhere inside the\n // open panel without an interaction handler on a non-interactive element.\n const rootRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n const node = rootRef.current;\n if (!node) return undefined;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n if (activeIndex < 0) return;\n event.preventDefault();\n const returnIndex = activeIndex;\n setActiveRaw(null);\n setFocusIndex(returnIndex);\n // Defer until after the panel unmounts so focus lands cleanly.\n requestAnimationFrame(() => {\n buttonsRef.current[returnIndex]?.focus();\n });\n };\n node.addEventListener('keydown', onKeyDown);\n return () => node.removeEventListener('keydown', onKeyDown);\n }, [activeIndex, setActiveRaw]);\n\n /* ---- Move focus into the panel when opened by keyboard -------- */\n useIsomorphicLayoutEffect(() => {\n if (activeTool && activatedByKeyboardRef.current) {\n panelRef.current?.focus();\n }\n activatedByKeyboardRef.current = false;\n }, [activeTool]);\n\n /* ---- Opt-in panel resize (inner edge) -------------------------- */\n // The handle sits on the edge facing the main content: the panel's\n // inline-start edge for an end-docked rail, inline-end for start.\n const panelEdge = side === 'end' ? 'inline-start' : 'inline-end';\n const { separatorProps, isResizing, isResized } = useEdgeResize({\n edge: panelEdge,\n targetRef: panelRef,\n cssProperty: PANEL_SIZE_PROPERTY,\n minSize: PANEL_MIN_SIZE,\n maxSize: PANEL_MAX_SIZE,\n defaultSize: PANEL_DEFAULT_SIZE,\n disabled: !resizablePanel,\n });\n\n // The aside unmounts on collapse, dropping the hook's inline override.\n // Re-assert the committed width when a panel (re)mounts so a reopened\n // panel keeps the user's chosen size.\n const committedPanelWidth = separatorProps['aria-valuenow'];\n useIsomorphicLayoutEffect(() => {\n if (!resizablePanel || !isResized || !activeTool) return;\n panelRef.current?.style.setProperty(\n PANEL_SIZE_PROPERTY,\n `${committedPanelWidth}px`,\n );\n }, [activeTool, resizablePanel, isResized, committedPanelWidth]);\n\n /* ---- Curated imperative handle for agent integration ---------- */\n const activeIdRef = useRef<string | null>(activeId);\n activeIdRef.current = activeId;\n\n const handle = useMemo<ToolRailHandle>(\n () => ({\n getActiveToolId: () => activeIdRef.current,\n setActiveTool: (toolId) => {\n activatedByKeyboardRef.current = false;\n setActiveRaw(toolId);\n },\n open: (toolId) => {\n const tool = tools.find((tl) => tl.id === toolId);\n if (!tool || tool.disabled) return;\n activatedByKeyboardRef.current = false;\n setActiveRaw(toolId);\n },\n close: () => {\n const returnId = activeIdRef.current;\n activatedByKeyboardRef.current = false;\n setActiveRaw(null);\n // Return focus to the closed tool's strip icon (mirrors Escape) so a\n // close-button / pointer collapse never drops focus to <body>.\n if (returnId != null) {\n requestAnimationFrame(() => {\n rootRef.current\n ?.querySelector<HTMLButtonElement>(\n `[data-tool-id=\"${CSS.escape(returnId)}\"]`,\n )\n ?.focus();\n });\n }\n },\n }),\n [tools, setActiveRaw],\n );\n\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(agentAdapter, handle, id);\n\n const overflowLabel = t('toolRail.badgeCountOverflow', {\n defaultValue: '99+',\n });\n\n return (\n <div\n ref={rootRef}\n data-component={dataComponent}\n data-component-id={id}\n data-side={side}\n className={[railVariants({ side }), className]\n .filter(Boolean)\n .join(' ')}\n >\n {/* Reorder a11y: a polite live region announcing each move. Each\n reorderable icon carries its own keyboard instruction (rendered in\n its slot, referenced via aria-describedby). */}\n {reorderEnabled ? (\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {reorderMessage}\n </span>\n ) : null}\n {/* The OPEN panel is the single complementary landmark, named by\n the active tool. Rendered only while a tool is active so two\n unnamed regions never coexist. */}\n {activeTool ? (\n <aside\n ref={panelRef}\n tabIndex={-1}\n aria-label={t('toolRail.panelLabel', {\n tool: activeTool.label,\n defaultValue: '{{tool}} panel',\n })}\n data-tool-rail-state=\"expanded\"\n data-active-tool={activeTool.id}\n data-resizing={isResizing ? '' : undefined}\n className={[\n panelVariants(),\n // Subtle shadow — not a line — separating the panel from the\n // icon strip (the tab row). The panel casts a soft chrome\n // shadow toward the strip on its strip-facing edge. `z-[1]`\n // lifts it above the adjacent strip (the panel is already\n // `relative`) so the shadow paints at the seam instead of being\n // covered by the strip's opaque background. Only renders while\n // the panel is open (the aside is unmounted when collapsed), so\n // it never doubles as a rail↔main seam. In the accessible (AAA)\n // theme the soft shadow becomes a solid 1px border on that same\n // strip-facing edge.\n 'ds:z-[1]',\n side === 'end'\n ? 'ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none'\n : 'ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none',\n 'ds:focus-visible:outline-none',\n ].join(' ')}\n >\n {/* Optional host-owned, non-scrolling panel header (e.g. the\n Control Room's add / remove favourite control). Sits above the\n scroll region so it stays put as the panel body scrolls. */}\n {renderPanelHeader\n ? renderPanelHeader(activeTool, { isActive: true })\n : null}\n {/* Optional per-tool pinned header — the rail-level home for a\n sticky tool header (title / filters). Non-scrolling, above the\n body, so it stays visible for every tool. */}\n {activeTool.header ? (\n <div className=\"ds:shrink-0\">{activeTool.header}</div>\n ) : null}\n {/* Body: a self-scrolling `fill` tool owns its own scroll inside\n the height-bounded panel; otherwise the rail scrolls it. */}\n {activeTool.fill ? (\n // data-tool-fill: a self-scrolling panel owns its own native\n // scroll (it can't use the rail's ScrollArea), so a token rule\n // paints its scrollbar to match the 8px overlay. See tokens/index.css.\n <div data-tool-fill=\"\" className=\"ds:flex-1 ds:min-h-0\">\n {activeTool.panel}\n </div>\n ) : (\n <ScrollArea\n orientation=\"vertical\"\n className=\"ds:flex-1 ds:min-h-0\"\n >\n {activeTool.panel}\n </ScrollArea>\n )}\n {/* Inside the aside (so it belongs to the complementary\n landmark) and outside the toolbar strip — the strip's\n roving handlers never see its key events, and Escape\n still bubbles to the root to collapse, as everywhere\n else in the panel. No stopPropagation needed. */}\n {resizablePanel ? (\n <div\n {...separatorProps}\n aria-label={t('toolRail.resizePanel', {\n defaultValue: 'Resize tool panel',\n })}\n data-resizing={isResizing ? '' : undefined}\n className={panelResizeHandleVariants({ edge: panelEdge })}\n />\n ) : null}\n </aside>\n ) : null}\n\n {/* The 3rem icon strip — a vertical toolbar with roving tabindex.\n Self-contained TooltipProvider so consumers needn't mount one;\n Radix providers compose, so a host-level provider still works. */}\n <TooltipProvider>\n <div\n ref={reflowRef}\n role=\"toolbar\"\n aria-orientation=\"vertical\"\n aria-label={\n railLabel ?? t('toolRail.railLabel', { defaultValue: 'Tools' })\n }\n className={stripVariants()}\n onKeyDown={handleStripKeyDown}\n >\n {tools.map((tool, index) => {\n const isActive = tool.id === activeId;\n const showBadge =\n typeof tool.badgeCount === 'number' && tool.badgeCount > 0;\n // Fold the count into the accessible name so SR users hear it\n // without relying on the decorative chip.\n const accessibleName = showBadge\n ? t('toolRail.toolWithCount', {\n tool: tool.label,\n count: tool.badgeCount,\n defaultValue: '{{tool}}, {{count}} updates',\n })\n : tool.label;\n const canReorderTool =\n reorderEnabled && !!tool.reorderable && !tool.disabled;\n const reorderDescId = canReorderTool\n ? `${reorderInstructionsId}-${tool.id}`\n : undefined;\n return (\n <Fragment key={tool.id}>\n {showScopeDivider && index === scopeDividerIndex ? (\n <div\n role=\"separator\"\n aria-orientation=\"horizontal\"\n className=\"ds:my-[var(--spacing-2xs)] ds:h-px ds:w-[var(--spacing-lg)] ds:shrink-0 ds:bg-[var(--border)] ds:forced-colors:bg-[CanvasText]\"\n />\n ) : null}\n <div\n className={[\n toolSlotVariants({\n dragging: dragIndex === index,\n dropTarget: dropIndex === index && dragIndex !== index,\n reorderable: canReorderTool,\n }),\n toolElevationClass,\n REFLOW_ROW_CLASS,\n ]\n .filter(Boolean)\n .join(' ')}\n data-reflow-id={tool.id}\n data-dragging={dragIndex === index ? '' : undefined}\n // Drag the whole slot — the icon button is an unreliable\n // HTML5 drag source across browsers. The button keeps its\n // click + Alt+Arrow keyboard reorder; drag is pointer-only.\n draggable={canReorderTool || undefined}\n onDragStart={\n canReorderTool\n ? (event) => {\n setDragIndex(index);\n event.dataTransfer.effectAllowed = 'move';\n // Firefox needs data set to initiate a drag.\n event.dataTransfer.setData(\n 'text/plain',\n String(index),\n );\n }\n : undefined\n }\n onDragOver={\n canReorderTool\n ? (event) => {\n if (dragIndex === null) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n if (dropIndex !== index) setDropIndex(index);\n }\n : undefined\n }\n onDragLeave={\n canReorderTool\n ? () =>\n setDropIndex((cur) => (cur === index ? null : cur))\n : undefined\n }\n onDrop={\n canReorderTool\n ? (event) => {\n event.preventDefault();\n const from = dragIndex;\n setDropIndex(null);\n setDragIndex(null);\n if (from === null || from === index) return;\n commitReorder(from, index);\n }\n : undefined\n }\n onDragEnd={\n canReorderTool\n ? () => {\n setDragIndex(null);\n setDropIndex(null);\n }\n : undefined\n }\n >\n <IconButton\n ref={(el) => {\n buttonsRef.current[index] = el;\n }}\n icon={tool.icon}\n tooltip={tool.label}\n aria-label={accessibleName}\n intent=\"ghost\"\n size=\"sm\"\n disabled={tool.disabled}\n aria-pressed={isActive}\n aria-expanded={isActive}\n data-active={isActive ? tool.id : undefined}\n data-tool-id={tool.id}\n aria-describedby={reorderDescId}\n aria-keyshortcuts={\n canReorderTool ? 'Alt+ArrowUp Alt+ArrowDown' : undefined\n }\n tabIndex={index === rovingIndex ? 0 : -1}\n onFocus={() => {\n if (!tool.disabled) setFocusIndex(index);\n }}\n onClick={() =>\n selectTool(tool.id, keyboardActivateRef.current)\n }\n onKeyDown={(event) => {\n // Enter/Space activate via the native button's click,\n // which fires AFTER this keydown. Flag the upcoming\n // click as keyboard-driven so focus moves into the\n // panel; reset on keyup so a later mouse click doesn't\n // inherit the flag.\n if (event.key === 'Enter' || event.key === ' ') {\n keyboardActivateRef.current = true;\n return;\n }\n // Alt+Arrow / Alt+Home / Alt+End reorder within the run.\n // Focus follows the moved icon to its new index; roving\n // ignores Alt (see handleStripKeyDown).\n if (canReorderTool && event.altKey && reorderRun) {\n let target: number | null = null;\n if (event.key === 'ArrowUp') target = index - 1;\n else if (event.key === 'ArrowDown')\n target = index + 1;\n else if (event.key === 'Home')\n target = reorderRun.first;\n else if (event.key === 'End')\n target = reorderRun.last;\n if (target !== null) {\n event.preventDefault();\n const dest = Math.max(\n reorderRun.first,\n Math.min(reorderRun.last, target),\n );\n // Focus follows the moved TOOL (by id), not the\n // slot index — so it lands correctly however the\n // host reinterprets the move (reorder, cross-group\n // pin / unpin, or a no-op that leaves it in place).\n const movedId = tool.id;\n commitReorder(index, dest);\n requestAnimationFrame(() => {\n rootRef.current\n ?.querySelector<HTMLButtonElement>(\n `[data-tool-id=\"${CSS.escape(movedId)}\"]`,\n )\n ?.focus();\n });\n }\n }\n }}\n onKeyUp={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n keyboardActivateRef.current = false;\n }\n }}\n />\n {showBadge ? (\n <span aria-hidden=\"true\" className={badgeVariants()}>\n {formatBadgeCount(\n tool.badgeCount as number,\n overflowLabel,\n )}\n </span>\n ) : null}\n {renderToolAffordance?.(tool, {\n index,\n isActive,\n isRovingTarget: index === rovingIndex,\n })}\n {reorderDescId ? (\n <span id={reorderDescId} className=\"ds:sr-only\">\n {t('toolRail.reorderInstructions', {\n tool: tool.label,\n defaultValue:\n 'Reorder {{tool}}. Press Alt + Up or Alt + Down to move.',\n })}\n </span>\n ) : null}\n </div>\n </Fragment>\n );\n })}\n {/* Departing tools: rendered without `data-reflow-id` so the\n reflow hook ignores them. They fade out here while the\n surviving icons above reflow to their new positions. */}\n {leavingTools.map((tool) =>\n exit.isLeaving(tool.id) ? (\n <div\n key={tool.id}\n className={[\n toolSlotVariants({\n dragging: false,\n dropTarget: false,\n reorderable: false,\n }),\n toolElevationClass,\n toolLeavingClass,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n >\n <IconButton\n icon={tool.icon}\n intent=\"ghost\"\n size=\"sm\"\n disabled\n tabIndex={-1}\n />\n </div>\n ) : null,\n )}\n </div>\n </TooltipProvider>\n </div>\n );\n },\n);\n\nToolRail.displayName = 'ToolRail';\n"],"names":["toolRailAgent","handle","args","RAIL_WIDTH","PANEL_WIDTH","PANEL_SIZE_PROPERTY","PANEL_MIN_SIZE","PANEL_MAX_SIZE","PANEL_DEFAULT_SIZE","railVariants","cva","stripVariants","panelVariants","panelResizeHandleVariants","badgeVariants","toolSlotVariants","toolLeavingClass","toolElevationClass","formatBadgeCount","count","overflowLabel","ToolRail","forwardRef","id","tools","activeToolId","defaultActiveToolId","onActiveToolChange","side","railLabel","resizablePanel","onReorder","formatReorderAnnouncement","renderToolAffordance","renderPanelHeader","dataComponent","agentAdapter","className","ref","t","useTranslation","activeRaw","setActiveRaw","useControllableState","activeId","buttonsRef","useRef","panelRef","focusIndex","setFocusIndex","useState","activatedByKeyboardRef","keyboardActivateRef","activeIndex","useMemo","tl","activeTool","firstEnabledIndex","scopeDividerIndex","lead","_a","showScopeDivider","reorderRun","first","last","reorderEnabled","reorderInstructionsId","useId","dragIndex","setDragIndex","dropIndex","setDropIndex","resolvedTheme","useTheme","reduceMotion","reflowRef","useListReflow","exit","useExitTransition","leavingTools","setLeavingTools","prevToolsRef","useEffect","prev","currentIds","removed","existing","existingIds","item","reorderMessage","setReorderMessage","announceToggle","commitReorder","useCallback","from","to","clamped","moved","text","rovingIndex","selectTool","toolId","fromKeyboard","tool","handleStripKeyDown","event","next","goingBack","candidate","attempts","_b","_c","rootRef","node","onKeyDown","returnIndex","useIsomorphicLayoutEffect","panelEdge","separatorProps","isResizing","isResized","useEdgeResize","committedPanelWidth","activeIdRef","returnId","useImperativeHandle","useAgentRegistration","jsxs","jsx","ScrollArea","TooltipProvider","index","isActive","showBadge","accessibleName","canReorderTool","reorderDescId","Fragment","REFLOW_ROW_CLASS","cur","IconButton","el","target","dest","movedId"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,SAAS,eAAe;AAAA,EAC/C,OAAO;AAAA,IACL,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,gBAAA;AAAA,IAAgB;AAAA,EAC3C;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA;AAAA,MAEJ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA;AAAA;AAAA,MAGZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,WAAW,MAAM,8BAA8B;AAAA,MACxE,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,KAAKC,EAAK,EAAE;AAAA,MACrB;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;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M;AAAA,4BAC5B,OAAA4B;AAAA,4BACA,UAAAC;AAAA,4BACA,gBAAgBD,MAAUhC;AAAA,0BAAA;AAAA,0BAE3BqC,sBACE,QAAA,EAAK,IAAIA,GAAe,WAAU,cAChC,YAAE,gCAAgC;AAAA,4BACjC,MAAMjC,EAAK;AAAA,4BACX,cACE;AAAA,0BAAA,CACH,GACH,IACE;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACN,EAAA,GA7KaA,EAAK,EA8KpB;AAAA,gBAEJ,CAAC;AAAA,gBAIAxB,GAAa;AAAA,kBAAI,CAACwB,MACjB1B,EAAK,UAAU0B,EAAK,EAAE,IACpB,gBAAAyB;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBAEC,WAAW;AAAA,wBACTjH,GAAiB;AAAA,0BACf,UAAU;AAAA,0BACV,YAAY;AAAA,0BACZ,aAAa;AAAA,wBAAA,CACd;AAAA,wBACDE;AAAA,wBACAD;AAAA,sBAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,sBACX,eAAY;AAAA,sBAEZ,UAAA,gBAAAgH;AAAA,wBAACY;AAAA,wBAAA;AAAA,0BACC,MAAMrC,EAAK;AAAA,0BACX,QAAO;AAAA,0BACP,MAAK;AAAA,0BACL,UAAQ;AAAA,0BACR,UAAU;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACZ;AAAA,oBApBKA,EAAK;AAAA,kBAAA,IAsBV;AAAA,gBAAA;AAAA,cACN;AAAA,YAAA;AAAA,UAAA,EACF,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAlF,GAAS,cAAc;"}
1
+ {"version":3,"file":"tool-rail-Bq5eiFMG.js","sources":["../../src/components/tool-rail/tool-rail.agent.ts","../../src/components/tool-rail/tool-rail.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — ToolRail. */\n/* */\n/* Rail-level surface: open / close a tool's panel and read which tool */\n/* is active. State is strictly the active tool id — never any tool's */\n/* panel CONTENT (which may carry PHI). Tool ids + badge counts are */\n/* supplied by the host via props, not derived from panel bodies. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { ToolRailHandle } from './tool-rail';\n\nexport const toolRailAgent: AgentAdapter<ToolRailHandle> = {\n id: 'tool-rail',\n capabilities: ['open', 'close', 'select_single'],\n state: {\n activeToolId: {\n type: 'string | null',\n descriptionKey: 'ui.toolRail.agent.state.activeToolId',\n description:\n 'Id of the tool whose panel is currently open, or null when the rail is collapsed to its strip. No panel content is ever exposed.',\n read: (handle) => handle.getActiveToolId(),\n },\n },\n actions: {\n open: {\n // Pure ephemeral panel state (open) — no data loss, no external effect.\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n // descriptionKey shape is intentionally pre-existing — already resolves to\n // real multi-locale translations; do not canonicalise.\n descriptionKey: 'ui.toolRail.agent.actions.open',\n description: \"Open the given tool's panel.\",\n examples: [{ args: { id: 'inbox' }, note: 'Open the inbox tool panel.' }],\n invoke: (handle, args: { id: string }) => {\n handle.open(args.id);\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.toolRail.agent.actions.close',\n description: 'Collapse the rail to its strip (no active tool).',\n invoke: (handle) => {\n handle.close();\n },\n },\n select_tool: {\n safety: 'read',\n argsType: '{ id: string | null }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: ['string', 'null'] } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.toolRail.agent.actions.selectTool',\n description:\n 'Set the active tool by id (opens its panel), or pass null to collapse.',\n invoke: (handle, args: { id: string | null }) => {\n handle.setActiveTool(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'tool-rail',\n description: 'Marks the ToolRail wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific rail from the agent.',\n },\n item: {\n attr: 'data-tool-id',\n description:\n 'Stable tool id emitted on each strip IconButton. The active icon also carries data-active set to its id.',\n },\n },\n};\n","import {\n forwardRef,\n Fragment,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { IconButton } from '../button/icon-button';\nimport { ScrollArea } from '../scroll-area/scroll-area';\nimport { TooltipProvider } from '../tooltip/tooltip';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useEdgeResize } from '../../hooks/use-edge-resize';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { REFLOW_ROW_CLASS, useListReflow } from '../../hooks/use-list-reflow';\nimport { useExitTransition } from '../../hooks/use-exit-transition';\nimport { useTheme } from '../../hooks/use-theme';\nimport { useAgentRegistration } from '../../agent/registry';\nimport type { AgentAdapter } from '../../agent/types';\nimport { toolRailAgent } from './tool-rail.agent';\n\n/* ------------------------------------------------------------------ */\n/* Tokenised widths */\n/* */\n/* Fixed + tokenised so the rail stays constraint-compliant — no */\n/* prop-driven inline styles. Bare `[inline-size:…]` is NOT a */\n/* recognised utility under the `ds:` prefix; it must carry the */\n/* prefix or Tailwind emits no rule. Consumers needing a different */\n/* size wrap the rail and override via CSS. */\n/* ------------------------------------------------------------------ */\nconst RAIL_WIDTH = 'ds:[inline-size:3rem]';\n// Panel width rides a consumer-overridable custom property (set\n// `--tool-rail-panel-inline-size` on the rail or a wrapper) so\n// content-heavy tools (e.g. an inbox feed) can widen their panel\n// without inline styles. Defaults to the 22rem tray-family width.\n// `--ai-tools-rail-panel-inline-size` is the deprecated alias var read\n// here as a fallback so external consumers that set the pre-rename name\n// keep working for one release; the resize hook only ever writes the new\n// `--tool-rail-panel-inline-size`.\nconst PANEL_WIDTH =\n 'ds:[inline-size:var(--tool-rail-panel-inline-size,var(--ai-tools-rail-panel-inline-size,22rem))]';\n// The custom property PANEL_WIDTH reads. The resize hook writes the\n// committed px width here (on the panel element, so it beats consumer\n// class overrides on the root) and removes it on reset.\nconst PANEL_SIZE_PROPERTY = '--tool-rail-panel-inline-size';\n// Resize clamp + nominal default, px (352px = the 22rem token default).\n// The ceiling is 880 so a form panel can reach a three-column layout:\n// pairing fields is the only way to shorten a long form without\n// shrinking a 44px target, and that needs real inline size.\nconst PANEL_MIN_SIZE = 288;\nconst PANEL_MAX_SIZE = 880;\nconst PANEL_DEFAULT_SIZE = 352;\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface ToolRailTool {\n /** Stable tool id — used in `data-active`, the imperative handle, and\n * to label the open panel region. */\n id: string;\n /** Accessible name for the strip icon + tooltip, and the open panel's\n * region label. Never rendered as visible body text. */\n label: string;\n /** lucide-react glyph (rendered `aria-hidden` inside the IconButton). */\n icon: ReactNode;\n /** Panel body for this tool. Rendered inline-start of the strip when\n * `side='end'` (mirrored for `'start'`). The consumer composes it. */\n panel: ReactNode;\n /**\n * Optional non-scrolling header for this tool's panel. Rendered pinned at\n * the top of the open panel — above the scroll region — so a tool's title /\n * filters stay visible as the body scrolls. This is the rail-level home for\n * a sticky tool header; every tool gets it for free.\n */\n header?: ReactNode;\n /**\n * When true the panel body is NOT wrapped in the rail's `ScrollArea` — the\n * tool fills the (height-bounded) panel and owns its own scroll/layout.\n * Use for self-scrolling tools (e.g. `AppointmentTimeline`, whose infinite\n * scroll + today-anchoring + edge fades require it to be the scroll\n * container). Default `false` (the rail scrolls the body).\n */\n fill?: boolean;\n /** Optional unseen / notification count shown on the strip icon. */\n badgeCount?: number;\n /** When true the icon is non-interactive and skipped by roving focus. */\n disabled?: boolean;\n /**\n * Scope tier (drives the two-group divider). The two scope values render in\n * array order with a divider at the boundary between them — order the array\n * so the groups stay contiguous. A divider only appears when BOTH groups are\n * present; omit `scope` on every tool for an ungrouped strip (legacy). The\n * rail attaches no meaning beyond grouping — the host decides which value\n * leads (e.g. the Control Room pins favourites first).\n */\n scope?: 'global' | 'contextual';\n /**\n * When true this icon joins the drag-and-drop / `Alt`+Arrow reorder run.\n * The host supplies `onReorder` and owns the resulting order. Moves are\n * confined to the contiguous run of `reorderable` tools — so if EVERY tool\n * is `reorderable` the run is the whole strip and a tool can be dragged\n * across the scope divider; the host's `onReorder` decides what crossing it\n * means (e.g. the Control Room reads it as pin / unpin). Reordering never\n * changes focus roving — focus follows the moved tool to its new slot.\n */\n reorderable?: boolean;\n}\n\n/**\n * Curated imperative handle for ToolRail. Exposed as the forwardRef\n * target so a future agent / MCP UI bridge can drive the rail without\n * touching the DOM. See `tool-rail.agent.ts`.\n *\n * State surfaced here is strictly identifiers + counts — never any\n * tool's panel content (which may carry PHI).\n */\nexport interface ToolRailHandle {\n /** Currently-active tool id, or null when collapsed to strip-only. */\n getActiveToolId: () => string | null;\n /** Activate a tool by id (opens its panel), or null to collapse. */\n setActiveTool: (id: string | null) => void;\n /** Activate a tool by id (opens its panel). */\n open: (id: string) => void;\n /** Collapse to strip-only (no active tool). */\n close: () => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA — `side` drives the dock edge + which shadow faces main content */\n/* ------------------------------------------------------------------ */\n\nconst railVariants = cva(\n ['ds:flex ds:shrink-0 ds:h-full', 'ds:bg-[var(--background)]'].join(' '),\n {\n variants: {\n side: {\n // Strip docks inline-end; the panel mounts inline-start of it\n // (flex-row, panel rendered first). Shadow faces the main area —\n // no border against main (the rail stays line-free; the only seam\n // is the strip↔panel divider on the open panel, see render).\n // Accessible (AAA) theme swaps the soft chrome shadow for a solid 1px\n // border on the content-facing edge (border-s for end-docked).\n end: 'ds:flex-row ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none',\n // Strip docks inline-start; the panel mounts inline-end of it.\n start:\n 'ds:flex-row-reverse ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none',\n },\n },\n defaultVariants: { side: 'end' },\n },\n);\n\nconst stripVariants = cva(\n [\n 'ds:flex ds:shrink-0 ds:flex-col ds:items-center',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n 'ds:gap-[var(--spacing-xs)]',\n RAIL_WIDTH,\n ].join(' '),\n);\n\nconst panelVariants = cva(\n [\n 'ds:relative ds:flex ds:min-h-0 ds:flex-col ds:h-full',\n 'ds:bg-[var(--background)]',\n PANEL_WIDTH,\n // Defensive: the panel doesn't animate its width today, but if a\n // consumer adds a transition on the var, suppress it mid-drag.\n 'ds:data-[resizing]:transition-none',\n ].join(' '),\n);\n\n// Resize handle on the panel's inner edge — mirrors Resizable's Handle\n// (::before hit area to --min-target-size, hover/focus/drag accent, token\n// focus ring) but absolutely positioned over the panel edge. Like the\n// Sidebar's handle it stays TRANSPARENT at rest: the rail root's\n// `shadow-chrome-*` (which faces the main content) carries the resting seam,\n// exactly as the start-docked Sidebar leans on its own shadow — so the rail\n// never shows the constant coloured bar it used to. The strip only tints\n// accent on hover / focus / drag.\nconst panelResizeHandleVariants = cva(\n [\n 'ds:absolute ds:[inset-block:0] ds:z-[1] ds:select-none ds:touch-none',\n 'ds:[inline-size:var(--resizable-handle-size)] ds:cursor-col-resize',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-[var(--accent)] ds:focus-visible:bg-[var(--accent)] ds:data-[resizing]:bg-[var(--accent)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n \"ds:before:absolute ds:before:content-['']\",\n 'ds:before:[block-size:100%]',\n 'ds:before:[inline-size:var(--min-target-size)]',\n 'ds:before:[inset-block:0]',\n 'ds:before:[inset-inline:calc(0px_-_(var(--min-target-size)_-_var(--resizable-handle-size))_/_2)]',\n ],\n {\n variants: {\n edge: {\n 'inline-start': 'ds:start-0',\n 'inline-end': 'ds:end-0',\n },\n },\n defaultVariants: { edge: 'inline-start' },\n },\n);\n\n// Hand-rolled overlay count chip — mirrors the AliaSidebar / MessageTray\n// badge markup. A <Badge> would re-introduce its own landmark/role; the\n// strip icon already carries the count in its accessible name, so this\n// span is purely decorative (`aria-hidden`).\nconst badgeVariants = cva(\n [\n 'ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]',\n 'ds:inline-flex ds:items-center ds:justify-center',\n 'ds:min-w-[calc(var(--spacing-md)+var(--spacing-xs))]',\n 'ds:h-[calc(var(--spacing-md)+var(--spacing-xs))]',\n 'ds:ps-[calc(var(--spacing-xs)/1.5)] ds:pe-[calc(var(--spacing-xs)/1.5)]',\n 'ds:rounded-[var(--radius-full)]',\n 'ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)]',\n 'ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:leading-none',\n 'ds:pointer-events-none ds:select-none',\n 'ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]',\n ].join(' '),\n);\n\n// Per-icon slot — the positioned box that hosts the IconButton, its badge and\n// the optional affordance overlay. CVA carries the drag states: the dragged\n// icon dims; a hovered drop target shows a dashed accent ring (logical offset),\n// mirroring the Sidebar's favourite-row affordance.\nconst toolSlotVariants = cva(\n // `group/rail-tool` lets an affordance overlay (e.g. a pin star) reveal on\n // hover / focus-within of the whole slot.\n ['ds:group/rail-tool ds:relative', 'ds:rounded-[var(--radius-sm)]'],\n {\n variants: {\n dragging: { true: 'ds:opacity-60', false: '' },\n dropTarget: {\n true: 'ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--accent)] ds:outline-offset-[length:var(--focus-ring-offset)]',\n false: '',\n },\n reorderable: {\n true: 'ds:cursor-grab ds:active:cursor-grabbing',\n false: '',\n },\n },\n defaultVariants: {\n dragging: false,\n dropTarget: false,\n reorderable: false,\n },\n },\n);\n\n/* A departing tool slot fades in place; the reflow hook then slides the\n surviving icons to close the gap. Declared at rest so the transition\n has a value to animate from the moment the leaving class lands. */\nconst toolLeavingClass = 'ds:opacity-0';\nconst toolElevationClass = [\n 'ds:transition-opacity ds:duration-[var(--animation-duration)]',\n 'ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Props */\n/* ------------------------------------------------------------------ */\n\nexport interface ToolRailProps extends VariantProps<typeof railVariants> {\n /** Stable instance id, surfaced on the root as `data-component-id`. */\n id?: string;\n /** The tools shown as icons on the strip. */\n tools: ToolRailTool[];\n /** Controlled active tool id (null = collapsed / strip-only). */\n activeToolId?: string | null;\n /** Uncontrolled initial active tool id (default null). */\n defaultActiveToolId?: string | null;\n /** Fires whenever the active tool changes (incl. → null on collapse). */\n onActiveToolChange?: (id: string | null) => void;\n /** Which edge the rail docks to. Default `'end'` (inline-end). */\n side?: 'start' | 'end';\n /** Accessible label for the toolbar strip. */\n railLabel?: string;\n /**\n * Opt-in resize affordance for the open tool panel. Renders a\n * `role=\"separator\"` drag handle on the panel's inner edge (the edge\n * facing the main content). The committed width is written to\n * `--tool-rail-panel-inline-size` on the panel element (288–880px);\n * Enter / double-click resets to the token-driven default. Default `false`.\n */\n resizablePanel?: boolean;\n /**\n * Fires when the user reorders the `reorderable` run (drag-drop or\n * `Alt`+Arrow). `from` / `to` are indices into `tools`; the host applies the\n * move to the array it passes back. Reordering is enabled when this callback\n * is supplied AND at least one tool is `reorderable`. When the whole strip is\n * reorderable, `to` may land in the other scope group — the host interprets\n * the crossing (and may treat it as a no-op, e.g. reordering within a\n * host-ordered group).\n */\n onReorder?: (from: number, to: number) => void;\n /**\n * Optional override for the polite live-region message announced after a\n * reorder. Lets the host phrase membership-aware moves (e.g. \"Pinned X to\n * favourites\") instead of the generic \"moved to position N\". Return an empty\n * string to stay silent (e.g. for a move the host treats as a no-op). When\n * omitted, the rail announces the generic run-relative position.\n */\n formatReorderAnnouncement?: (args: {\n tool: ToolRailTool;\n from: number;\n to: number;\n }) => string;\n /**\n * Optional per-icon overlay control, rendered as a sibling of each strip\n * IconButton (the same positioned box the notification badge uses). Use for\n * a small affordance such as a pin toggle — the rail attaches no meaning to\n * what it renders. Receives the tool and its index / active state.\n */\n renderToolAffordance?: (\n tool: ToolRailTool,\n context: { index: number; isActive: boolean; isRovingTarget: boolean },\n ) => ReactNode;\n /**\n * Optional non-scrolling header rendered at the top of the OPEN tool panel,\n * above its scroll region. Host-owned content (e.g. a pin / unpin control) —\n * the rail attaches no meaning. Receives the active tool.\n */\n renderPanelHeader?: (\n tool: ToolRailTool,\n context: { isActive: boolean },\n ) => ReactNode;\n /**\n * Identity override for the root's `data-component` attribute. Defaults to\n * `'tool-rail'`. A product wrapper (e.g. ControlRoomRail) passes its own\n * kebab id so the DOM / cascade boundary — and an agent's `domHooks.root` —\n * can tell its surface apart from a bare ToolRail, without the engine ever\n * importing the wrapper.\n */\n dataComponent?: string;\n /**\n * Agent adapter registered for this rail instance. Defaults to\n * `toolRailAgent`. A wrapper passes its own adapter (matching\n * `dataComponent`) so the rail registers under the wrapper's identity. The\n * instance id is sourced from the `id` prop (also stamped as\n * `data-component-id`).\n */\n agentAdapter?: AgentAdapter<ToolRailHandle>;\n className?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction formatBadgeCount(count: number, overflowLabel: string): string {\n return count > 99 ? overflowLabel : String(count);\n}\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nexport const ToolRail = forwardRef<ToolRailHandle, ToolRailProps>(\n (\n {\n id,\n tools,\n activeToolId,\n defaultActiveToolId = null,\n onActiveToolChange,\n side = 'end',\n railLabel,\n resizablePanel = false,\n onReorder,\n formatReorderAnnouncement,\n renderToolAffordance,\n renderPanelHeader,\n dataComponent = 'tool-rail',\n agentAdapter = toolRailAgent,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n\n // Controlled / uncontrolled bridge — the same hook MessageTray uses.\n const [activeRaw, setActiveRaw] = useControllableState<string | null>({\n value: activeToolId,\n defaultValue: defaultActiveToolId,\n onChange: onActiveToolChange,\n });\n const activeId = activeRaw ?? null;\n\n // Roving-tabindex bookkeeping for the vertical toolbar strip.\n const buttonsRef = useRef<Array<HTMLButtonElement | null>>([]);\n const panelRef = useRef<HTMLElement | null>(null);\n const [focusIndex, setFocusIndex] = useState(0);\n // Distinguishes keyboard activation (auto-focus into the panel) from\n // pointer activation (focus stays on the icon — less jarring).\n const activatedByKeyboardRef = useRef(false);\n // Set on Enter/Space keydown, read by the click handler that follows,\n // cleared on keyup — so a subsequent mouse click never inherits it.\n const keyboardActivateRef = useRef(false);\n\n const activeIndex = useMemo(\n () => tools.findIndex((tl) => tl.id === activeId),\n [tools, activeId],\n );\n const activeTool = activeIndex >= 0 ? tools[activeIndex] : null;\n\n // First non-disabled index — the resting roving stop when none active.\n const firstEnabledIndex = useMemo(\n () => tools.findIndex((tl) => !tl.disabled),\n [tools],\n );\n\n // Scope grouping: a divider marks the boundary between the two scope groups,\n // whichever order they appear in. The array is always grouped (all of one\n // scope, then the other); the divider precedes the first tool whose scope\n // differs from the lead tool's. `boundary > 0` guarantees both groups are\n // present. Render-only (not a `tools[]` member) so roving focus is untouched;\n // a legacy strip with no `scope` set stays ungrouped.\n const scopeDividerIndex = useMemo(() => {\n const lead = tools[0]?.scope;\n if (!lead) return -1;\n return tools.findIndex((tl) => tl.scope && tl.scope !== lead);\n }, [tools]);\n const showScopeDivider = scopeDividerIndex > 0;\n\n /* ---- Reorder (drag-and-drop + Alt+Arrow keyboard) ------------- */\n // The contiguous run of `reorderable` tools — a tool only moves within it.\n const reorderRun = useMemo(() => {\n const first = tools.findIndex((tl) => tl.reorderable);\n if (first < 0) return null;\n let last = first;\n while (last + 1 < tools.length && tools[last + 1]?.reorderable) last += 1;\n return { first, last };\n }, [tools]);\n const reorderEnabled = !!onReorder && reorderRun !== null;\n const reorderInstructionsId = useId();\n\n const [dragIndex, setDragIndex] = useState<number | null>(null);\n const [dropIndex, setDropIndex] = useState<number | null>(null);\n\n /* ---- Strip enter / exit / reflow animations ------------------ */\n /* The same hooks the note/task panels use, applied to the icon strip:\n when a contextual tool appears or disappears (e.g. selecting an\n appointment adds Notes + Details), surviving icons slide to their\n new positions and departing icons fade out in place. */\n const { resolvedTheme } = useTheme();\n const reduceMotion = resolvedTheme.endsWith('-accessible') || undefined;\n\n const { containerRef: reflowRef } = useListReflow<HTMLDivElement>({\n key: tools.map((tl) => tl.id).join(),\n reduceMotion,\n });\n\n const exit = useExitTransition({ reduceMotion });\n\n // Tools that were in the previous render but are gone now, kept around\n // until their exit fade completes. Rendered after the current tools\n // WITHOUT `data-reflow-id` so the reflow hook ignores them — they fade\n // out at the bottom of the strip while the surviving icons reflow.\n const [leavingTools, setLeavingTools] = useState<ToolRailTool[]>([]);\n const prevToolsRef = useRef<ToolRailTool[]>(tools);\n useEffect(() => {\n const prev = prevToolsRef.current;\n const currentIds = new Set(tools.map((tl) => tl.id));\n const removed = prev.filter((tl) => !currentIds.has(tl.id));\n if (removed.length > 0) {\n setLeavingTools((existing) => {\n const existingIds = new Set(existing.map((tl) => tl.id));\n return [\n ...existing,\n ...removed.filter((tl) => !existingIds.has(tl.id)),\n ];\n });\n for (const tl of removed) {\n exit.leave(tl.id, () => {\n setLeavingTools((existing) =>\n existing.filter((item) => item.id !== tl.id),\n );\n });\n }\n }\n prevToolsRef.current = tools;\n }, [tools, exit]);\n\n // sr-only announcement. The zero-width-space toggle forces a re-announce of\n // an identical message (e.g. moving the same item twice) — same technique\n // the Sidebar uses for its reorder live region.\n const [reorderMessage, setReorderMessage] = useState('');\n const announceToggle = useRef(false);\n const commitReorder = useCallback(\n (from: number, to: number) => {\n if (!onReorder || !reorderRun) return;\n const clamped = Math.max(\n reorderRun.first,\n Math.min(reorderRun.last, to),\n );\n if (clamped === from) return;\n onReorder(from, clamped);\n const moved = tools[from];\n if (moved) {\n // The host can phrase membership-aware moves (e.g. pin / unpin) and\n // can return '' to stay silent for a move it treats as a no-op.\n const text = formatReorderAnnouncement\n ? formatReorderAnnouncement({ tool: moved, from, to: clamped })\n : t('toolRail.reorderAnnounce', {\n tool: moved.label,\n to: clamped - reorderRun.first + 1,\n total: reorderRun.last - reorderRun.first + 1,\n defaultValue: '{{tool}} moved to position {{to}} of {{total}}',\n });\n if (text) {\n announceToggle.current = !announceToggle.current;\n setReorderMessage(announceToggle.current ? text : `${text}\\u200b`);\n }\n }\n },\n [onReorder, reorderRun, tools, t, formatReorderAnnouncement],\n );\n\n // The roving tab stop: the active icon when a tool is open, else the\n // index the user last focused, else the first enabled icon.\n const rovingIndex =\n activeIndex >= 0\n ? activeIndex\n : focusIndex >= 0 && !tools[focusIndex]?.disabled\n ? focusIndex\n : firstEnabledIndex;\n\n const selectTool = useCallback(\n (toolId: string, fromKeyboard: boolean) => {\n const tool = tools.find((tl) => tl.id === toolId);\n if (!tool || tool.disabled) return;\n activatedByKeyboardRef.current = fromKeyboard;\n // Clicking / activating the active tool collapses to strip-only.\n setActiveRaw(activeId === toolId ? null : toolId);\n },\n [tools, activeId, setActiveRaw],\n );\n\n /* ---- Roving arrow-key navigation (vertical toolbar) ----------- */\n const handleStripKeyDown = useCallback(\n (event: ReactKeyboardEvent<HTMLDivElement>) => {\n const count = tools.length;\n if (count === 0) return;\n // Alt+Arrow is reserved for reordering (handled on the icon); never\n // let it move focus roving as well.\n if (event.altKey) return;\n\n let next: number | null = null;\n if (event.key === 'ArrowDown') next = (rovingIndex + 1) % count;\n else if (event.key === 'ArrowUp')\n next = (rovingIndex - 1 + count) % count;\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = count - 1;\n if (next === null) return;\n\n // Skip disabled icons in the travel direction.\n const goingBack = event.key === 'ArrowUp' || event.key === 'End';\n let candidate = next;\n let attempts = 0;\n while (attempts < count && tools[candidate]?.disabled) {\n candidate = goingBack\n ? (candidate - 1 + count) % count\n : (candidate + 1) % count;\n attempts += 1;\n }\n if (tools[candidate]?.disabled) return;\n\n event.preventDefault();\n setFocusIndex(candidate);\n buttonsRef.current[candidate]?.focus();\n },\n [tools, rovingIndex],\n );\n\n /* ---- Esc collapses + returns focus to the active tool's icon -- */\n // Attached imperatively via the root ref (not a JSX onKeyDown on the\n // static container) so the Escape shortcut works from anywhere inside the\n // open panel without an interaction handler on a non-interactive element.\n const rootRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n const node = rootRef.current;\n if (!node) return undefined;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') return;\n if (activeIndex < 0) return;\n event.preventDefault();\n const returnIndex = activeIndex;\n setActiveRaw(null);\n setFocusIndex(returnIndex);\n // Defer until after the panel unmounts so focus lands cleanly.\n requestAnimationFrame(() => {\n buttonsRef.current[returnIndex]?.focus();\n });\n };\n node.addEventListener('keydown', onKeyDown);\n return () => node.removeEventListener('keydown', onKeyDown);\n }, [activeIndex, setActiveRaw]);\n\n /* ---- Move focus into the panel when opened by keyboard -------- */\n useIsomorphicLayoutEffect(() => {\n if (activeTool && activatedByKeyboardRef.current) {\n panelRef.current?.focus();\n }\n activatedByKeyboardRef.current = false;\n }, [activeTool]);\n\n /* ---- Opt-in panel resize (inner edge) -------------------------- */\n // The handle sits on the edge facing the main content: the panel's\n // inline-start edge for an end-docked rail, inline-end for start.\n const panelEdge = side === 'end' ? 'inline-start' : 'inline-end';\n const { separatorProps, isResizing, isResized } = useEdgeResize({\n edge: panelEdge,\n targetRef: panelRef,\n cssProperty: PANEL_SIZE_PROPERTY,\n minSize: PANEL_MIN_SIZE,\n maxSize: PANEL_MAX_SIZE,\n defaultSize: PANEL_DEFAULT_SIZE,\n disabled: !resizablePanel,\n });\n\n // The aside unmounts on collapse, dropping the hook's inline override.\n // Re-assert the committed width when a panel (re)mounts so a reopened\n // panel keeps the user's chosen size.\n const committedPanelWidth = separatorProps['aria-valuenow'];\n useIsomorphicLayoutEffect(() => {\n if (!resizablePanel || !isResized || !activeTool) return;\n panelRef.current?.style.setProperty(\n PANEL_SIZE_PROPERTY,\n `${committedPanelWidth}px`,\n );\n }, [activeTool, resizablePanel, isResized, committedPanelWidth]);\n\n /* ---- Curated imperative handle for agent integration ---------- */\n const activeIdRef = useRef<string | null>(activeId);\n activeIdRef.current = activeId;\n\n const handle = useMemo<ToolRailHandle>(\n () => ({\n getActiveToolId: () => activeIdRef.current,\n setActiveTool: (toolId) => {\n activatedByKeyboardRef.current = false;\n setActiveRaw(toolId);\n },\n open: (toolId) => {\n const tool = tools.find((tl) => tl.id === toolId);\n if (!tool || tool.disabled) return;\n activatedByKeyboardRef.current = false;\n setActiveRaw(toolId);\n },\n close: () => {\n const returnId = activeIdRef.current;\n activatedByKeyboardRef.current = false;\n setActiveRaw(null);\n // Return focus to the closed tool's strip icon (mirrors Escape) so a\n // close-button / pointer collapse never drops focus to <body>.\n if (returnId != null) {\n requestAnimationFrame(() => {\n rootRef.current\n ?.querySelector<HTMLButtonElement>(\n `[data-tool-id=\"${CSS.escape(returnId)}\"]`,\n )\n ?.focus();\n });\n }\n },\n }),\n [tools, setActiveRaw],\n );\n\n useImperativeHandle(ref, () => handle, [handle]);\n useAgentRegistration(agentAdapter, handle, id);\n\n const overflowLabel = t('toolRail.badgeCountOverflow', {\n defaultValue: '99+',\n });\n\n return (\n <div\n ref={rootRef}\n data-component={dataComponent}\n data-component-id={id}\n data-side={side}\n className={[railVariants({ side }), className]\n .filter(Boolean)\n .join(' ')}\n >\n {/* Reorder a11y: a polite live region announcing each move. Each\n reorderable icon carries its own keyboard instruction (rendered in\n its slot, referenced via aria-describedby). */}\n {reorderEnabled ? (\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {reorderMessage}\n </span>\n ) : null}\n {/* The OPEN panel is the single complementary landmark, named by\n the active tool. Rendered only while a tool is active so two\n unnamed regions never coexist. */}\n {activeTool ? (\n <aside\n ref={panelRef}\n tabIndex={-1}\n aria-label={t('toolRail.panelLabel', {\n tool: activeTool.label,\n defaultValue: '{{tool}} panel',\n })}\n data-tool-rail-state=\"expanded\"\n data-active-tool={activeTool.id}\n data-resizing={isResizing ? '' : undefined}\n className={[\n panelVariants(),\n // Subtle shadow — not a line — separating the panel from the\n // icon strip (the tab row). The panel casts a soft chrome\n // shadow toward the strip on its strip-facing edge. `z-[1]`\n // lifts it above the adjacent strip (the panel is already\n // `relative`) so the shadow paints at the seam instead of being\n // covered by the strip's opaque background. Only renders while\n // the panel is open (the aside is unmounted when collapsed), so\n // it never doubles as a rail↔main seam. In the accessible (AAA)\n // theme the soft shadow becomes a solid 1px border on that same\n // strip-facing edge.\n 'ds:z-[1]',\n side === 'end'\n ? 'ds:shadow-[var(--shadow-chrome-end)] ds:[.theme-accessible_&]:border-e ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none'\n : 'ds:shadow-[var(--shadow-chrome-start)] ds:[.theme-accessible_&]:border-s ds:[.theme-accessible_&]:border-[var(--border)] ds:[.theme-accessible_&]:shadow-none',\n 'ds:focus-visible:outline-none',\n ].join(' ')}\n >\n {/* Optional host-owned, non-scrolling panel header (e.g. the\n Control Room's add / remove favourite control). Sits above the\n scroll region so it stays put as the panel body scrolls. */}\n {renderPanelHeader\n ? renderPanelHeader(activeTool, { isActive: true })\n : null}\n {/* Optional per-tool pinned header — the rail-level home for a\n sticky tool header (title / filters). Non-scrolling, above the\n body, so it stays visible for every tool. */}\n {activeTool.header ? (\n <div className=\"ds:shrink-0\">{activeTool.header}</div>\n ) : null}\n {/* Body: a self-scrolling `fill` tool owns its own scroll inside\n the height-bounded panel; otherwise the rail scrolls it. */}\n {activeTool.fill ? (\n // data-tool-fill: a self-scrolling panel owns its own native\n // scroll (it can't use the rail's ScrollArea), so a token rule\n // paints its scrollbar to match the 8px overlay. See tokens/index.css.\n <div data-tool-fill=\"\" className=\"ds:flex-1 ds:min-h-0\">\n {activeTool.panel}\n </div>\n ) : (\n <ScrollArea\n orientation=\"vertical\"\n className=\"ds:flex-1 ds:min-h-0\"\n >\n {activeTool.panel}\n </ScrollArea>\n )}\n {/* Inside the aside (so it belongs to the complementary\n landmark) and outside the toolbar strip — the strip's\n roving handlers never see its key events, and Escape\n still bubbles to the root to collapse, as everywhere\n else in the panel. No stopPropagation needed. */}\n {resizablePanel ? (\n <div\n {...separatorProps}\n aria-label={t('toolRail.resizePanel', {\n defaultValue: 'Resize tool panel',\n })}\n data-resizing={isResizing ? '' : undefined}\n className={panelResizeHandleVariants({ edge: panelEdge })}\n />\n ) : null}\n </aside>\n ) : null}\n\n {/* The 3rem icon strip — a vertical toolbar with roving tabindex.\n Self-contained TooltipProvider so consumers needn't mount one;\n Radix providers compose, so a host-level provider still works. */}\n <TooltipProvider>\n <div\n ref={reflowRef}\n role=\"toolbar\"\n aria-orientation=\"vertical\"\n aria-label={\n railLabel ?? t('toolRail.railLabel', { defaultValue: 'Tools' })\n }\n className={stripVariants()}\n onKeyDown={handleStripKeyDown}\n >\n {tools.map((tool, index) => {\n const isActive = tool.id === activeId;\n const showBadge =\n typeof tool.badgeCount === 'number' && tool.badgeCount > 0;\n // Fold the count into the accessible name so SR users hear it\n // without relying on the decorative chip.\n const accessibleName = showBadge\n ? t('toolRail.toolWithCount', {\n tool: tool.label,\n count: tool.badgeCount,\n defaultValue: '{{tool}}, {{count}} updates',\n })\n : tool.label;\n const canReorderTool =\n reorderEnabled && !!tool.reorderable && !tool.disabled;\n const reorderDescId = canReorderTool\n ? `${reorderInstructionsId}-${tool.id}`\n : undefined;\n return (\n <Fragment key={tool.id}>\n {showScopeDivider && index === scopeDividerIndex ? (\n <div\n role=\"separator\"\n aria-orientation=\"horizontal\"\n className=\"ds:my-[var(--spacing-2xs)] ds:h-px ds:w-[var(--spacing-lg)] ds:shrink-0 ds:bg-[var(--border)] ds:forced-colors:bg-[CanvasText]\"\n />\n ) : null}\n <div\n className={[\n toolSlotVariants({\n dragging: dragIndex === index,\n dropTarget: dropIndex === index && dragIndex !== index,\n reorderable: canReorderTool,\n }),\n toolElevationClass,\n REFLOW_ROW_CLASS,\n ]\n .filter(Boolean)\n .join(' ')}\n data-reflow-id={tool.id}\n data-dragging={dragIndex === index ? '' : undefined}\n // Drag the whole slot — the icon button is an unreliable\n // HTML5 drag source across browsers. The button keeps its\n // click + Alt+Arrow keyboard reorder; drag is pointer-only.\n draggable={canReorderTool || undefined}\n onDragStart={\n canReorderTool\n ? (event) => {\n setDragIndex(index);\n event.dataTransfer.effectAllowed = 'move';\n // Firefox needs data set to initiate a drag.\n event.dataTransfer.setData(\n 'text/plain',\n String(index),\n );\n }\n : undefined\n }\n onDragOver={\n canReorderTool\n ? (event) => {\n if (dragIndex === null) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = 'move';\n if (dropIndex !== index) setDropIndex(index);\n }\n : undefined\n }\n onDragLeave={\n canReorderTool\n ? () =>\n setDropIndex((cur) => (cur === index ? null : cur))\n : undefined\n }\n onDrop={\n canReorderTool\n ? (event) => {\n event.preventDefault();\n const from = dragIndex;\n setDropIndex(null);\n setDragIndex(null);\n if (from === null || from === index) return;\n commitReorder(from, index);\n }\n : undefined\n }\n onDragEnd={\n canReorderTool\n ? () => {\n setDragIndex(null);\n setDropIndex(null);\n }\n : undefined\n }\n >\n <IconButton\n ref={(el) => {\n buttonsRef.current[index] = el;\n }}\n icon={tool.icon}\n tooltip={tool.label}\n aria-label={accessibleName}\n intent=\"ghost\"\n size=\"sm\"\n disabled={tool.disabled}\n aria-pressed={isActive}\n aria-expanded={isActive}\n data-active={isActive ? tool.id : undefined}\n data-tool-id={tool.id}\n aria-describedby={reorderDescId}\n aria-keyshortcuts={\n canReorderTool ? 'Alt+ArrowUp Alt+ArrowDown' : undefined\n }\n tabIndex={index === rovingIndex ? 0 : -1}\n onFocus={() => {\n if (!tool.disabled) setFocusIndex(index);\n }}\n onClick={() =>\n selectTool(tool.id, keyboardActivateRef.current)\n }\n onKeyDown={(event) => {\n // Enter/Space activate via the native button's click,\n // which fires AFTER this keydown. Flag the upcoming\n // click as keyboard-driven so focus moves into the\n // panel; reset on keyup so a later mouse click doesn't\n // inherit the flag.\n if (event.key === 'Enter' || event.key === ' ') {\n keyboardActivateRef.current = true;\n return;\n }\n // Alt+Arrow / Alt+Home / Alt+End reorder within the run.\n // Focus follows the moved icon to its new index; roving\n // ignores Alt (see handleStripKeyDown).\n if (canReorderTool && event.altKey && reorderRun) {\n let target: number | null = null;\n if (event.key === 'ArrowUp') target = index - 1;\n else if (event.key === 'ArrowDown')\n target = index + 1;\n else if (event.key === 'Home')\n target = reorderRun.first;\n else if (event.key === 'End')\n target = reorderRun.last;\n if (target !== null) {\n event.preventDefault();\n const dest = Math.max(\n reorderRun.first,\n Math.min(reorderRun.last, target),\n );\n // Focus follows the moved TOOL (by id), not the\n // slot index — so it lands correctly however the\n // host reinterprets the move (reorder, cross-group\n // pin / unpin, or a no-op that leaves it in place).\n const movedId = tool.id;\n commitReorder(index, dest);\n requestAnimationFrame(() => {\n rootRef.current\n ?.querySelector<HTMLButtonElement>(\n `[data-tool-id=\"${CSS.escape(movedId)}\"]`,\n )\n ?.focus();\n });\n }\n }\n }}\n onKeyUp={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n keyboardActivateRef.current = false;\n }\n }}\n />\n {showBadge ? (\n <span aria-hidden=\"true\" className={badgeVariants()}>\n {formatBadgeCount(\n tool.badgeCount as number,\n overflowLabel,\n )}\n </span>\n ) : null}\n {renderToolAffordance?.(tool, {\n index,\n isActive,\n isRovingTarget: index === rovingIndex,\n })}\n {reorderDescId ? (\n <span id={reorderDescId} className=\"ds:sr-only\">\n {t('toolRail.reorderInstructions', {\n tool: tool.label,\n defaultValue:\n 'Reorder {{tool}}. Press Alt + Up or Alt + Down to move.',\n })}\n </span>\n ) : null}\n </div>\n </Fragment>\n );\n })}\n {/* Departing tools: rendered without `data-reflow-id` so the\n reflow hook ignores them. They fade out here while the\n surviving icons above reflow to their new positions. */}\n {leavingTools.map((tool) =>\n exit.isLeaving(tool.id) ? (\n <div\n key={tool.id}\n className={[\n toolSlotVariants({\n dragging: false,\n dropTarget: false,\n reorderable: false,\n }),\n toolElevationClass,\n toolLeavingClass,\n ]\n .filter(Boolean)\n .join(' ')}\n aria-hidden=\"true\"\n >\n <IconButton\n icon={tool.icon}\n intent=\"ghost\"\n size=\"sm\"\n disabled\n tabIndex={-1}\n />\n </div>\n ) : null,\n )}\n </div>\n </TooltipProvider>\n </div>\n );\n },\n);\n\nToolRail.displayName = 'ToolRail';\n"],"names":["toolRailAgent","handle","args","RAIL_WIDTH","PANEL_WIDTH","PANEL_SIZE_PROPERTY","PANEL_MIN_SIZE","PANEL_MAX_SIZE","PANEL_DEFAULT_SIZE","railVariants","cva","stripVariants","panelVariants","panelResizeHandleVariants","badgeVariants","toolSlotVariants","toolLeavingClass","toolElevationClass","formatBadgeCount","count","overflowLabel","ToolRail","forwardRef","id","tools","activeToolId","defaultActiveToolId","onActiveToolChange","side","railLabel","resizablePanel","onReorder","formatReorderAnnouncement","renderToolAffordance","renderPanelHeader","dataComponent","agentAdapter","className","ref","t","useTranslation","activeRaw","setActiveRaw","useControllableState","activeId","buttonsRef","useRef","panelRef","focusIndex","setFocusIndex","useState","activatedByKeyboardRef","keyboardActivateRef","activeIndex","useMemo","tl","activeTool","firstEnabledIndex","scopeDividerIndex","lead","_a","showScopeDivider","reorderRun","first","last","reorderEnabled","reorderInstructionsId","useId","dragIndex","setDragIndex","dropIndex","setDropIndex","resolvedTheme","useTheme","reduceMotion","reflowRef","useListReflow","exit","useExitTransition","leavingTools","setLeavingTools","prevToolsRef","useEffect","prev","currentIds","removed","existing","existingIds","item","reorderMessage","setReorderMessage","announceToggle","commitReorder","useCallback","from","to","clamped","moved","text","rovingIndex","selectTool","toolId","fromKeyboard","tool","handleStripKeyDown","event","next","goingBack","candidate","attempts","_b","_c","rootRef","node","onKeyDown","returnIndex","useIsomorphicLayoutEffect","panelEdge","separatorProps","isResizing","isResized","useEdgeResize","committedPanelWidth","activeIdRef","returnId","useImperativeHandle","useAgentRegistration","jsxs","jsx","ScrollArea","TooltipProvider","index","isActive","showBadge","accessibleName","canReorderTool","reorderDescId","Fragment","REFLOW_ROW_CLASS","cur","IconButton","el","target","dest","movedId"],"mappings":";;;;;;;;;;;;;AAYO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,SAAS,eAAe;AAAA,EAC/C,OAAO;AAAA,IACL,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,gBAAA;AAAA,IAAgB;AAAA,EAC3C;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA;AAAA,MAEJ,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA;AAAA;AAAA,MAGZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,WAAW,MAAM,8BAA8B;AAAA,MACxE,QAAQ,CAACA,GAAQC,MAAyB;AACxC,QAAAD,EAAO,KAAKC,EAAK,EAAE;AAAA,MACrB;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,MAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,aAAa;AAAA,MACX,QA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YAAE,gCAAgC;AAAA,4BACjC,MAAMjC,EAAK;AAAA,4BACX,cACE;AAAA,0BAAA,CACH,GACH,IACE;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACN,EAAA,GA7KaA,EAAK,EA8KpB;AAAA,gBAEJ,CAAC;AAAA,gBAIAxB,GAAa;AAAA,kBAAI,CAACwB,MACjB1B,EAAK,UAAU0B,EAAK,EAAE,IACpB,gBAAAyB;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBAEC,WAAW;AAAA,wBACTjH,GAAiB;AAAA,0BACf,UAAU;AAAA,0BACV,YAAY;AAAA,0BACZ,aAAa;AAAA,wBAAA,CACd;AAAA,wBACDE;AAAA,wBACAD;AAAA,sBAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,sBACX,eAAY;AAAA,sBAEZ,UAAA,gBAAAgH;AAAA,wBAACY;AAAA,wBAAA;AAAA,0BACC,MAAMrC,EAAK;AAAA,0BACX,QAAO;AAAA,0BACP,MAAK;AAAA,0BACL,UAAQ;AAAA,0BACR,UAAU;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACZ;AAAA,oBApBKA,EAAK;AAAA,kBAAA,IAsBV;AAAA,gBAAA;AAAA,cACN;AAAA,YAAA;AAAA,UAAA,EACF,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAlF,GAAS,cAAc;"}
@@ -1,17 +1,17 @@
1
- import { jsxs as l, jsx as i } from "react/jsx-runtime";
2
- import { useRef as f, useState as h, useEffect as v } from "react";
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as g, useContext as x, useState as y, useEffect as P, createContext as w } from "react";
3
3
  import * as o from "@radix-ui/react-tooltip";
4
- import { c as g } from "./index-D2ZczOXr.js";
5
- function y(t) {
6
- const [e, r] = h(() => typeof document > "u" ? "ltr" : document.documentElement.dir || "ltr");
7
- return v(() => {
8
- const d = t.current;
9
- if (!d) return;
10
- const s = d.closest("[dir]"), a = (s == null ? void 0 : s.getAttribute("dir")) ?? document.documentElement.dir ?? "ltr";
11
- r(a === "rtl" ? "rtl" : "ltr");
4
+ import { c as T } from "./index-D2ZczOXr.js";
5
+ function b(t) {
6
+ const [e, s] = y(() => typeof document > "u" ? "ltr" : document.documentElement.dir || "ltr");
7
+ return P(() => {
8
+ const i = t.current;
9
+ if (!i) return;
10
+ const d = i.closest("[dir]"), n = (d == null ? void 0 : d.getAttribute("dir")) ?? document.documentElement.dir ?? "ltr";
11
+ s(n === "rtl" ? "rtl" : "ltr");
12
12
  }, [t]), e;
13
13
  }
14
- const w = g(
14
+ const C = T(
15
15
  [
16
16
  "ds:z-[var(--z-tooltip)]",
17
17
  "ds:max-w-[240px]",
@@ -49,7 +49,7 @@ const w = g(
49
49
  "ds:motion-reduce:animate-none"
50
50
  ].join(" ")
51
51
  );
52
- function x(t, e) {
52
+ function z(t, e) {
53
53
  switch (t) {
54
54
  case "top":
55
55
  return "top";
@@ -61,59 +61,59 @@ function x(t, e) {
61
61
  return e === "rtl" ? "left" : "right";
62
62
  }
63
63
  }
64
- const T = ({
64
+ const m = w(!1), N = ({
65
65
  children: t,
66
66
  delayDuration: e = 700,
67
- skipDelayDuration: r = 300
68
- }) => /* @__PURE__ */ i(
67
+ skipDelayDuration: s = 300
68
+ }) => /* @__PURE__ */ r(
69
69
  o.Provider,
70
70
  {
71
71
  delayDuration: e,
72
- skipDelayDuration: r,
73
- children: t
72
+ skipDelayDuration: s,
73
+ children: /* @__PURE__ */ r(m.Provider, { value: !0, children: t })
74
74
  }
75
75
  );
76
- T.displayName = "TooltipProvider";
77
- const b = ({
76
+ N.displayName = "TooltipProvider";
77
+ const R = ({
78
78
  label: t,
79
79
  children: e,
80
- side: r = "top",
81
- align: d = "center",
82
- sideOffset: s = 4,
83
- delayDuration: a,
84
- open: c,
85
- onOpenChange: m
80
+ side: s = "top",
81
+ align: i = "center",
82
+ sideOffset: d = 4,
83
+ delayDuration: n,
84
+ open: u,
85
+ onOpenChange: p
86
86
  }) => {
87
- const n = f(null), u = y(n), p = x(r, u);
88
- return /* @__PURE__ */ l(
87
+ const a = g(null), f = b(a), v = z(s, f), h = x(m), l = /* @__PURE__ */ c(
89
88
  o.Root,
90
89
  {
91
- delayDuration: a,
92
- open: c,
93
- onOpenChange: m,
90
+ delayDuration: n,
91
+ open: u,
92
+ onOpenChange: p,
94
93
  children: [
95
- /* @__PURE__ */ i(o.Trigger, { asChild: !0, ref: n, children: e }),
96
- /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ l(
94
+ /* @__PURE__ */ r(o.Trigger, { asChild: !0, ref: a, children: e }),
95
+ /* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ c(
97
96
  o.Content,
98
97
  {
99
- className: w(),
100
- side: p,
101
- align: d,
102
- sideOffset: s,
98
+ className: C(),
99
+ side: v,
100
+ align: i,
101
+ sideOffset: d,
103
102
  "data-component": "tooltip",
104
103
  children: [
105
104
  t,
106
- /* @__PURE__ */ i(o.Arrow, { className: "ds:fill-foreground" })
105
+ /* @__PURE__ */ r(o.Arrow, { className: "ds:fill-foreground" })
107
106
  ]
108
107
  }
109
108
  ) })
110
109
  ]
111
110
  }
112
111
  );
112
+ return h ? l : /* @__PURE__ */ r(o.Provider, { children: l });
113
113
  };
114
- b.displayName = "Tooltip";
114
+ R.displayName = "Tooltip";
115
115
  export {
116
- b as T,
117
- T as a
116
+ R as T,
117
+ N as a
118
118
  };
119
- //# sourceMappingURL=tooltip-DvmfrNvB.js.map
119
+ //# sourceMappingURL=tooltip-Cp-PLePW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip-Cp-PLePW.js","sources":["../../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import {\n createContext,\n type ReactElement,\n useContext,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport * as RadixTooltip from '@radix-ui/react-tooltip';\nimport { cva } from 'class-variance-authority';\n\n/* ------------------------------------------------------------------ */\n/* useDirection — reads the closest [dir] ancestor at render time */\n/* ------------------------------------------------------------------ */\n\nfunction useDirection(ref: React.RefObject<HTMLElement | null>): 'ltr' | 'rtl' {\n const [dir, setDir] = useState<'ltr' | 'rtl'>(() => {\n if (typeof document === 'undefined') return 'ltr';\n return (document.documentElement.dir as 'ltr' | 'rtl') || 'ltr';\n });\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const closest = el.closest('[dir]');\n const resolved =\n closest?.getAttribute('dir') ?? document.documentElement.dir ?? 'ltr';\n setDir(resolved === 'rtl' ? 'rtl' : 'ltr');\n }, [ref]);\n\n return dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA — tooltip content */\n/* ------------------------------------------------------------------ */\n\nconst tooltipContentVariants = cva(\n [\n 'ds:z-[var(--z-tooltip)]',\n 'ds:max-w-[240px]',\n 'ds:overflow-hidden ds:rounded-[var(--radius-sm)]',\n // High-contrast solid tooltip surface — inverted vs the page so it\n // reads against any background (gradient washes, coloured cards,\n // images). Uses opaque ramp-step tokens (`--color-grey-900` /\n // `--color-grey-50`) directly because:\n // - 0.30.3 swapped to `bg-[var(--foreground)]` after the\n // `bg-foreground` shorthand emitted translucent backgrounds in\n // some consumer bundles.\n // - 0.31.0 staging still saw see-through tooltips on the booking-\n // website surface where parent `backdrop-filter` / `opacity`\n // stacking contexts bled into the semantic foreground token.\n // - Ramp-step tokens are theme-stable hex literals — no\n // resolution chain — so the tooltip surface is solid in every\n // theme + every consumer bundle.\n // `isolation: isolate` defends against future parent-side filters /\n // mix-blend-modes by giving the tooltip its own stacking context.\n 'ds:bg-[var(--color-grey-900)] ds:text-[var(--color-grey-50)]',\n 'ds:[isolation:isolate]',\n 'ds:shadow-[var(--shadow-md)]',\n // Forced-colours users (Windows High Contrast) lose `bg-/text-`\n // entirely — emit a CanvasText border so the tooltip is still\n // visible.\n 'ds:forced-colors:[outline:1px_solid_CanvasText]',\n 'ds:ps-3 ds:pe-3 ds:py-1.5 type-meta',\n 'ds:break-normal ds:[overflow-wrap:anywhere]',\n 'ds:animate-in ds:fade-in ds:zoom-in-95',\n 'ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out ds:data-[state=closed]:zoom-out-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2',\n 'ds:data-[side=left]:slide-in-from-right-2',\n 'ds:data-[side=right]:slide-in-from-left-2',\n 'ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:animate-none',\n ].join(' '),\n);\n\n/* ------------------------------------------------------------------ */\n/* Logical → physical side mapping */\n/* ------------------------------------------------------------------ */\n\ntype LogicalSide = 'top' | 'end' | 'bottom' | 'start';\ntype PhysicalSide = 'top' | 'right' | 'bottom' | 'left';\n\nfunction resolvePhysicalSide(\n logical: LogicalSide,\n dir: 'ltr' | 'rtl',\n): PhysicalSide {\n switch (logical) {\n case 'top':\n return 'top';\n case 'bottom':\n return 'bottom';\n case 'start':\n return dir === 'rtl' ? 'right' : 'left';\n case 'end':\n return dir === 'rtl' ? 'left' : 'right';\n }\n}\n\n/* ------------------------------------------------------------------ */\n/* TooltipProvider */\n/* ------------------------------------------------------------------ */\n\n/**\n * Marks that a `TooltipProvider` is above us.\n *\n * Radix's Tooltip.Root throws without a provider ancestor, which turns a\n * missing wrapper into a blank screen rather than a missing delay. A host\n * with many independent React roots — one per island, no shared shell —\n * cannot mount that wrapper once for the page, so every island would have to\n * remember it, and the one that forgets crashes.\n *\n * So a `Tooltip` provides for ITSELF when nothing above it does. This context\n * is how it tells the difference: with a real provider, every tooltip shares\n * one delay and one skip-delay, which is the better behaviour and why the\n * provider still exists. Without one, the tooltip still works, alone.\n */\nconst TooltipProviderPresence = createContext(false);\n\nexport interface TooltipProviderProps {\n children: React.ReactNode;\n /** Open delay in ms. Default 700. */\n delayDuration?: number;\n /** Skip delay when moving between triggers. Default 300. */\n skipDelayDuration?: number;\n}\n\nexport const TooltipProvider: React.FC<TooltipProviderProps> = ({\n children,\n delayDuration = 700,\n skipDelayDuration = 300,\n}) => (\n <RadixTooltip.Provider\n delayDuration={delayDuration}\n skipDelayDuration={skipDelayDuration}\n >\n <TooltipProviderPresence.Provider value={true}>\n {children}\n </TooltipProviderPresence.Provider>\n </RadixTooltip.Provider>\n);\n\nTooltipProvider.displayName = 'TooltipProvider';\n\n/* ------------------------------------------------------------------ */\n/* Tooltip */\n/* ------------------------------------------------------------------ */\n\nexport interface TooltipProps {\n /** The tooltip text — required. */\n label: string;\n /** The trigger element. */\n children: ReactElement;\n /** Logical side. Default 'top'. Mapped to Radix physical side based on dir. */\n side?: LogicalSide;\n /** Alignment along the side axis. Default 'center'. */\n align?: 'start' | 'center' | 'end';\n /** Gap between trigger and tooltip. Default 4. */\n sideOffset?: number;\n /** Open delay override for this instance. */\n delayDuration?: number;\n /** Controlled open state. */\n open?: boolean;\n /** Callback when open state changes. */\n onOpenChange?: (open: boolean) => void;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n label,\n children,\n side = 'top',\n align = 'center',\n sideOffset = 4,\n delayDuration,\n open,\n onOpenChange,\n}) => {\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const dir = useDirection(triggerRef as React.RefObject<HTMLElement | null>);\n const physicalSide = resolvePhysicalSide(side, dir);\n const hasProvider = useContext(TooltipProviderPresence);\n\n const root = (\n <RadixTooltip.Root\n delayDuration={delayDuration}\n open={open}\n onOpenChange={onOpenChange}\n >\n <RadixTooltip.Trigger asChild ref={triggerRef}>\n {children}\n </RadixTooltip.Trigger>\n <RadixTooltip.Portal>\n <RadixTooltip.Content\n className={tooltipContentVariants()}\n side={physicalSide}\n align={align}\n sideOffset={sideOffset}\n data-component=\"tooltip\"\n >\n {label}\n <RadixTooltip.Arrow className=\"ds:fill-foreground\" />\n </RadixTooltip.Content>\n </RadixTooltip.Portal>\n </RadixTooltip.Root>\n );\n\n // Self-provide when nothing above us did. A host that mounts many\n // independent React roots cannot wrap them all once, and a missing wrapper\n // must not be the difference between a working screen and a blank one.\n return hasProvider ? (\n root\n ) : (\n <RadixTooltip.Provider>{root}</RadixTooltip.Provider>\n );\n};\n\nTooltip.displayName = 'Tooltip';\n"],"names":["useDirection","ref","dir","setDir","useState","useEffect","el","closest","resolved","tooltipContentVariants","cva","resolvePhysicalSide","logical","TooltipProviderPresence","createContext","TooltipProvider","children","delayDuration","skipDelayDuration","jsx","RadixTooltip","Tooltip","label","side","align","sideOffset","open","onOpenChange","triggerRef","useRef","physicalSide","hasProvider","useContext","root","jsxs"],"mappings":";;;;AAeA,SAASA,EAAaC,GAAyD;AAC7E,QAAM,CAACC,GAAKC,CAAM,IAAIC,EAAwB,MACxC,OAAO,WAAa,MAAoB,QACpC,SAAS,gBAAgB,OAAyB,KAC3D;AAED,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAKL,EAAI;AACf,QAAI,CAACK,EAAI;AACT,UAAMC,IAAUD,EAAG,QAAQ,OAAO,GAC5BE,KACJD,KAAA,gBAAAA,EAAS,aAAa,WAAU,SAAS,gBAAgB,OAAO;AAClE,IAAAJ,EAAOK,MAAa,QAAQ,QAAQ,KAAK;AAAA,EAC3C,GAAG,CAACP,CAAG,CAAC,GAEDC;AACT;AAMA,MAAMO,IAAyBC;AAAA,EAC7B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AACZ;AASA,SAASC,EACPC,GACAV,GACc;AACd,UAAQU,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAOV,MAAQ,QAAQ,UAAU;AAAA,IACnC,KAAK;AACH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AA,QAAA,EACrD,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAOJ,SAAOW,IACLE,IAEA,gBAAAd,EAACC,EAAa,UAAb,EAAuB,UAAAa,GAAK;AAEjC;AAEAZ,EAAQ,cAAc;"}
@@ -5,8 +5,8 @@ import * as E from "@radix-ui/react-tooltip";
5
5
  import { c as ie } from "./index-D2ZczOXr.js";
6
6
  import { useTranslation as io } from "react-i18next";
7
7
  import { u as Xo } from "./registry-DvAUVLHh.js";
8
- import { I as Jo } from "./icon-button-DA2CAGHZ.js";
9
- import { P as rt } from "./popover-DP6WCVwm.js";
8
+ import { I as Jo } from "./icon-button-8xqRnkdG.js";
9
+ import { P as rt } from "./popover-DzR5QYxp.js";
10
10
  import { S as en } from "./select-CLSUnKjF.js";
11
11
  import { S as at } from "./switch-OILsBLWo.js";
12
12
  import { o as zt, K as tn, a0 as on, J as Ke, R as Ue, u as ro, U as ao, G as nn, S as rn, w as Ve, X as F, f as de, $ as st, _ as Vt, E as ft, a1 as ce, H as Bt, z as ut, y as an, l as ct, A as so, L as sn, t as pt, W as dt, s as co, Y as lo, x as cn, V as dn, a2 as ln, a3 as $, a4 as U, a5 as hn, Z as un, C as ho, Q as pn, a6 as fn, k as Gt, T as mn, O as gn, q as vn, N as bn } from "./tooth-data-DR8Kdnup.js";
@@ -2048,4 +2048,4 @@ export {
2048
2048
  Nn as r,
2049
2049
  $n as t
2050
2050
  };
2051
- //# sourceMappingURL=tooth-scheme-Qe7LO5Di.js.map
2051
+ //# sourceMappingURL=tooth-scheme-BWkYxxjR.js.map