@alfadocs/ui-kit-debug 1.6.0 → 1.7.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.
- package/dist/_chunks/{actions-cell-renderer-BD-jruqA.js → actions-cell-renderer-ALEAGO3j.js} +6 -6
- package/dist/_chunks/{actions-cell-renderer-BD-jruqA.js.map → actions-cell-renderer-ALEAGO3j.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-CYR-znfE.js → agenda-tray-BweO8pDo.js} +3 -3
- package/dist/_chunks/{agenda-tray-CYR-znfE.js.map → agenda-tray-BweO8pDo.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-DLF6FNXv.js → ai-consent-banner-OggpS5hW.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-DLF6FNXv.js.map → ai-consent-banner-OggpS5hW.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-BgAubYKd.js → ai-prompt-input-DnbfEJnr.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-BgAubYKd.js.map → ai-prompt-input-DnbfEJnr.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-Bg53-ZOT.js → alia-sidebar-BWcWZivN.js} +7 -7
- package/dist/_chunks/{alia-sidebar-Bg53-ZOT.js.map → alia-sidebar-BWcWZivN.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-BylMLHYj.js → anamnesis-card-NTi4LLzI.js} +2 -2
- package/dist/_chunks/{anamnesis-card-BylMLHYj.js.map → anamnesis-card-NTi4LLzI.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BpYztFUv.js → anamnesis-summary-rows-F-cCmFAn.js} +7 -7
- package/dist/_chunks/{anamnesis-summary-rows-BpYztFUv.js.map → anamnesis-summary-rows-F-cCmFAn.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DT1uFp8z.js → appointment-timeline-CMPvzlGZ.js} +4 -4
- package/dist/_chunks/{appointment-timeline-DT1uFp8z.js.map → appointment-timeline-CMPvzlGZ.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-DvyVK7um.js → appointment-tray-3c_FLxXJ.js} +3 -3
- package/dist/_chunks/{appointment-tray-DvyVK7um.js.map → appointment-tray-3c_FLxXJ.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-nVRN4PSK.js → audio-recorder-EWBCNIsd.js} +3 -3
- package/dist/_chunks/{audio-recorder-nVRN4PSK.js.map → audio-recorder-EWBCNIsd.js.map} +1 -1
- package/dist/_chunks/{bishop-score-BV1JAEMV.js → bishop-score-Cnu0xs-z.js} +2 -2
- package/dist/_chunks/{bishop-score-BV1JAEMV.js.map → bishop-score-Cnu0xs-z.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-CdR-RLFj.js → bmi-calculator-CcH6upht.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CdR-RLFj.js.map → bmi-calculator-CcH6upht.js.map} +1 -1
- package/dist/_chunks/{booking-D84O6H2X.js → booking-CQMJUFG-.js} +5 -5
- package/dist/_chunks/{booking-D84O6H2X.js.map → booking-CQMJUFG-.js.map} +1 -1
- package/dist/_chunks/{button-group-Be_In68J.js → button-group-CaxRJsNG.js} +2 -2
- package/dist/_chunks/{button-group-Be_In68J.js.map → button-group-CaxRJsNG.js.map} +1 -1
- package/dist/_chunks/{button-BvNtqHAS.js → button-nJaPh_HC.js} +68 -38
- package/dist/_chunks/button-nJaPh_HC.js.map +1 -0
- package/dist/_chunks/{care-plan-card-CehAU7F_.js → care-plan-card-DQjVRDxO.js} +2 -2
- package/dist/_chunks/{care-plan-card-CehAU7F_.js.map → care-plan-card-DQjVRDxO.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-ChWRMfMw.js → care-plan-entry-card-CMpoeNkb.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-ChWRMfMw.js.map → care-plan-entry-card-CMpoeNkb.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-_B0TTWT1.js → care-plan-header-CxYoq23f.js} +2 -2
- package/dist/_chunks/{care-plan-header-_B0TTWT1.js.map → care-plan-header-CxYoq23f.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-pjORsMS8.js → carousel.agent-CLxdHEBP.js} +2 -2
- package/dist/_chunks/{carousel.agent-pjORsMS8.js.map → carousel.agent-CLxdHEBP.js.map} +1 -1
- package/dist/_chunks/{chart-Y-gso_Uz.js → chart-Bkr1Sh4o.js} +3 -3
- package/dist/_chunks/{chart-Y-gso_Uz.js.map → chart-Bkr1Sh4o.js.map} +1 -1
- package/dist/_chunks/{chat-input-BqI9GXQh.js → chat-input-BsB5Umpj.js} +2 -2
- package/dist/_chunks/{chat-input-BqI9GXQh.js.map → chat-input-BsB5Umpj.js.map} +1 -1
- package/dist/_chunks/{chat-message-DHNUbjXA.js → chat-message-DBQu10rs.js} +3 -3
- package/dist/_chunks/{chat-message-DHNUbjXA.js.map → chat-message-DBQu10rs.js.map} +1 -1
- package/dist/_chunks/{code-block-BONe9fJi.js → code-block-BIkpRLkl.js} +2 -2
- package/dist/_chunks/{code-block-BONe9fJi.js.map → code-block-BIkpRLkl.js.map} +1 -1
- package/dist/_chunks/{connection-status-NT8hUtYl.js → connection-status-DRZIcMqM.js} +3 -3
- package/dist/_chunks/{connection-status-NT8hUtYl.js.map → connection-status-DRZIcMqM.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-BxHiG8e6.js → contact-profile-card-CE9OJKcl.js} +2 -2
- package/dist/_chunks/{contact-profile-card-BxHiG8e6.js.map → contact-profile-card-CE9OJKcl.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-DDyPDBji.js → control-room-rail-IH1eBjrK.js} +3 -3
- package/dist/_chunks/{control-room-rail-DDyPDBji.js.map → control-room-rail-IH1eBjrK.js.map} +1 -1
- package/dist/_chunks/{copy-field-B-DoMBH_.js → copy-field-fYKpl6aN.js} +2 -2
- package/dist/_chunks/{copy-field-B-DoMBH_.js.map → copy-field-fYKpl6aN.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-DJZYvNhw.js → cycle-calculator-DzgO1vzP.js} +2 -2
- package/dist/_chunks/{cycle-calculator-DJZYvNhw.js.map → cycle-calculator-DzgO1vzP.js.map} +1 -1
- package/dist/_chunks/{dashboard-grid-bd0QW2a8.js → dashboard-grid-BFtdHqfn.js} +2 -2
- package/dist/_chunks/{dashboard-grid-bd0QW2a8.js.map → dashboard-grid-BFtdHqfn.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-C8uDThT3.js → data-table-tabs-C1kRUzat.js} +3 -3
- package/dist/_chunks/{data-table-tabs-C8uDThT3.js.map → data-table-tabs-C1kRUzat.js.map} +1 -1
- package/dist/_chunks/{description-list-Ck7fKdt5.js → description-list-CjJqR8WK.js} +2 -2
- package/dist/_chunks/{description-list-Ck7fKdt5.js.map → description-list-CjJqR8WK.js.map} +1 -1
- package/dist/_chunks/{document-preview-Aae2yKvY.js → document-preview-oyx9RhCo.js} +2 -2
- package/dist/_chunks/{document-preview-Aae2yKvY.js.map → document-preview-oyx9RhCo.js.map} +1 -1
- package/dist/_chunks/{document-scanner-qNZLhH_r.js → document-scanner-C5Vrbu21.js} +2 -2
- package/dist/_chunks/{document-scanner-qNZLhH_r.js.map → document-scanner-C5Vrbu21.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-ajaQ4ya5.js → due-date-calculator-wK8Tajzz.js} +2 -2
- package/dist/_chunks/{due-date-calculator-ajaQ4ya5.js.map → due-date-calculator-wK8Tajzz.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-DyMbSyDK.js → editable-currency-cell-renderer-DYdzKpjL.js} +3 -3
- package/dist/_chunks/{editable-currency-cell-renderer-DyMbSyDK.js.map → editable-currency-cell-renderer-DYdzKpjL.js.map} +1 -1
- package/dist/_chunks/{editor-overlay-DE-gxj9L.js → editor-overlay-DEc5yYwo.js} +2 -2
- package/dist/_chunks/{editor-overlay-DE-gxj9L.js.map → editor-overlay-DEc5yYwo.js.map} +1 -1
- package/dist/_chunks/{empty-state-Df0tM6Kn.js → empty-state-X0sVPfVo.js} +2 -2
- package/dist/_chunks/{empty-state-Df0tM6Kn.js.map → empty-state-X0sVPfVo.js.map} +1 -1
- package/dist/_chunks/{entity-summary-DBOI5di6.js → entity-summary-B_vO5Ur4.js} +3 -3
- package/dist/_chunks/{entity-summary-DBOI5di6.js.map → entity-summary-B_vO5Ur4.js.map} +1 -1
- package/dist/_chunks/{face-scheme-D7Pub04e.js → face-scheme-BfDi4YkW.js} +5 -5
- package/dist/_chunks/{face-scheme-D7Pub04e.js.map → face-scheme-BfDi4YkW.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-jon6GIfQ.js → fetal-weight-Dqy0T1fP.js} +2 -2
- package/dist/_chunks/{fetal-weight-jon6GIfQ.js.map → fetal-weight-Dqy0T1fP.js.map} +1 -1
- package/dist/_chunks/{field-array-BQFX5OYi.js → field-array-BjkXZzSr.js} +3 -3
- package/dist/_chunks/{field-array-BQFX5OYi.js.map → field-array-BjkXZzSr.js.map} +1 -1
- package/dist/_chunks/{field-value-BbiDRyNh.js → field-value-DG8zaZvo.js} +4 -4
- package/dist/_chunks/{field-value-BbiDRyNh.js.map → field-value-DG8zaZvo.js.map} +1 -1
- package/dist/_chunks/{file-manager-CML_C6_h.js → file-manager-Cc_upjZX.js} +6 -6
- package/dist/_chunks/{file-manager-CML_C6_h.js.map → file-manager-Cc_upjZX.js.map} +1 -1
- package/dist/_chunks/{finished-terminal-BWNVh7Y8.js → finished-terminal-Br61Ip4e.js} +2 -2
- package/dist/_chunks/{finished-terminal-BWNVh7Y8.js.map → finished-terminal-Br61Ip4e.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-Nx1N9r72.js → fiscal-code-input-B_nYMSEM.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-Nx1N9r72.js.map → fiscal-code-input-B_nYMSEM.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-HG3pFvMp.js → freemium-paywall-DrXzYfv-.js} +2 -2
- package/dist/_chunks/{freemium-paywall-HG3pFvMp.js.map → freemium-paywall-DrXzYfv-.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-dEpQDWcb.js → gestational-age-calculator-C_uDAeP_.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-dEpQDWcb.js.map → gestational-age-calculator-C_uDAeP_.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-CC6TLtHd.js → hcg-doubling-BaXkJhT-.js} +2 -2
- package/dist/_chunks/{hcg-doubling-CC6TLtHd.js.map → hcg-doubling-BaXkJhT-.js.map} +1 -1
- package/dist/_chunks/{header-CimZS-J9.js → header-DUXRIPyM.js} +2 -2
- package/dist/_chunks/{header-CimZS-J9.js.map → header-DUXRIPyM.js.map} +1 -1
- package/dist/_chunks/{header-settings-C0zHLXJE.js → header-settings-CVC_davE.js} +4 -4
- package/dist/_chunks/{header-settings-C0zHLXJE.js.map → header-settings-CVC_davE.js.map} +1 -1
- package/dist/_chunks/{icon-button-9c9Gp41m.js → icon-button-DA2CAGHZ.js} +2 -2
- package/dist/_chunks/{icon-button-9c9Gp41m.js.map → icon-button-DA2CAGHZ.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-DrvuWPGJ.js → icon-button-group-D6SVMteH.js} +2 -2
- package/dist/_chunks/{icon-button-group-DrvuWPGJ.js.map → icon-button-group-D6SVMteH.js.map} +1 -1
- package/dist/_chunks/{icon-picker-DXV3sDp1.js → icon-picker-ChzpCnZ-.js} +3 -3
- package/dist/_chunks/{icon-picker-DXV3sDp1.js.map → icon-picker-ChzpCnZ-.js.map} +1 -1
- package/dist/_chunks/{image-cropper-DWSnyLwW.js → image-cropper-C84NDTB7.js} +2 -2
- package/dist/_chunks/{image-cropper-DWSnyLwW.js.map → image-cropper-C84NDTB7.js.map} +1 -1
- package/dist/_chunks/{info-tip-C4mPSJbS.js → info-tip-C119cwQl.js} +2 -2
- package/dist/_chunks/{info-tip-C4mPSJbS.js.map → info-tip-C119cwQl.js.map} +1 -1
- package/dist/_chunks/{insert-result-98J1QEp7.js → insert-result-LCNTskNJ.js} +2 -2
- package/dist/_chunks/{insert-result-98J1QEp7.js.map → insert-result-LCNTskNJ.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-DGkGlgCF.js → key-value-pair-BubG4fUa.js} +2 -2
- package/dist/_chunks/{key-value-pair-DGkGlgCF.js.map → key-value-pair-BubG4fUa.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-D3IsW_2R.js → link-cell-renderer-DH4JYpKU.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-D3IsW_2R.js.map → link-cell-renderer-DH4JYpKU.js.map} +1 -1
- package/dist/_chunks/{locale-picker-sI0HWgZy.js → locale-picker-BvbVjDQ-.js} +3 -3
- package/dist/_chunks/{locale-picker-sI0HWgZy.js.map → locale-picker-BvbVjDQ-.js.map} +1 -1
- package/dist/_chunks/{map-view-iwSDRW3t.js → map-view-CCAlC9IL.js} +2 -2
- package/dist/_chunks/{map-view-iwSDRW3t.js.map → map-view-CCAlC9IL.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js → marketplace-app-shell-Chfdia7m.js} +4 -4
- package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js.map → marketplace-app-shell-Chfdia7m.js.map} +1 -1
- package/dist/_chunks/{message-card-BCJ-Jgs6.js → message-card-D8GB4FdF.js} +3 -3
- package/dist/_chunks/{message-card-BCJ-Jgs6.js.map → message-card-D8GB4FdF.js.map} +1 -1
- package/dist/_chunks/{message-tray-DHtm_WaF.js → message-tray-CGIRQjx5.js} +4 -4
- package/dist/_chunks/{message-tray-DHtm_WaF.js.map → message-tray-CGIRQjx5.js.map} +1 -1
- package/dist/_chunks/{notes-panel-D6HKLLS-.js → notes-panel-DlnENphf.js} +3 -3
- package/dist/_chunks/{notes-panel-D6HKLLS-.js.map → notes-panel-DlnENphf.js.map} +1 -1
- package/dist/_chunks/{notification-card-CcMQn2RX.js → notification-card-CtrzoTUO.js} +3 -3
- package/dist/_chunks/{notification-card-CcMQn2RX.js.map → notification-card-CtrzoTUO.js.map} +1 -1
- package/dist/_chunks/{notification-tray-nr7dv-Q8.js → notification-tray-BiRzXHDf.js} +4 -4
- package/dist/_chunks/{notification-tray-nr7dv-Q8.js.map → notification-tray-BiRzXHDf.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-DtzEqFQm.js → optical-prescription-Dj3Eh5Ok.js} +2 -2
- package/dist/_chunks/{optical-prescription-DtzEqFQm.js.map → optical-prescription-Dj3Eh5Ok.js.map} +1 -1
- package/dist/_chunks/{patient-details-rENrE_qY.js → patient-details-qnsqYBGQ.js} +5 -5
- package/dist/_chunks/{patient-details-rENrE_qY.js.map → patient-details-qnsqYBGQ.js.map} +1 -1
- package/dist/_chunks/{patient-search-NQemeJlL.js → patient-search-D5ufYoRc.js} +2 -2
- package/dist/_chunks/{patient-search-NQemeJlL.js.map → patient-search-D5ufYoRc.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DQJgOOrA.js → patient-summary-card-CBfuDvJ5.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DQJgOOrA.js.map → patient-summary-card-CBfuDvJ5.js.map} +1 -1
- package/dist/_chunks/{patient-table-BubxfOWL.js → patient-table-DwshfVsQ.js} +3 -3
- package/dist/_chunks/{patient-table-BubxfOWL.js.map → patient-table-DwshfVsQ.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-CnaBPt5e.js → payment-automation-upsell-BBIG7NFL.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-CnaBPt5e.js.map → payment-automation-upsell-BBIG7NFL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-CvhDzDNk.js → payment-request-card-BjjBMdsp.js} +3 -3
- package/dist/_chunks/{payment-request-card-CvhDzDNk.js.map → payment-request-card-BjjBMdsp.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-C0nNQKKK.js → periodontal-chart-BatZEFar.js} +2 -2
- package/dist/_chunks/{periodontal-chart-C0nNQKKK.js.map → periodontal-chart-BatZEFar.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-Bz-ebteE.js → periodontal-chart-card-BBpY_rBc.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-Bz-ebteE.js.map → periodontal-chart-card-BBpY_rBc.js.map} +1 -1
- package/dist/_chunks/{popover-Btj6N25H.js → popover-Cqcjx-Ny.js} +2 -2
- package/dist/_chunks/{popover-Btj6N25H.js.map → popover-Cqcjx-Ny.js.map} +1 -1
- package/dist/_chunks/{practice-results-CKoLD_x5.js → practice-results-BEsAdW-B.js} +719 -633
- package/dist/_chunks/practice-results-BEsAdW-B.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-DQVpFs_f.js → pregnancy-dating-BVS_9YU2.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-DQVpFs_f.js.map → pregnancy-dating-BVS_9YU2.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-hm3QJALe.js → pregnancy-weight-gain-CJwbs9W-.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-hm3QJALe.js.map → pregnancy-weight-gain-CJwbs9W-.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-SQYFRSuH.js → privacy-lock-CkAUo6Dz.js} +3 -3
- package/dist/_chunks/{privacy-lock-SQYFRSuH.js.map → privacy-lock-CkAUo6Dz.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BjnD9pdl.js → product-hub-panel-BScCotGD.js} +3 -3
- package/dist/_chunks/{product-hub-panel-BjnD9pdl.js.map → product-hub-panel-BScCotGD.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-DseNK2NQ.js → public-header.agent-kth2SdXn.js} +3 -3
- package/dist/_chunks/{public-header.agent-DseNK2NQ.js.map → public-header.agent-kth2SdXn.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-CAXFgCyn.js → radiograph-panel.agent-CiHwgISa.js} +4 -4
- package/dist/_chunks/{radiograph-panel.agent-CAXFgCyn.js.map → radiograph-panel.agent-CiHwgISa.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-Cd3SxJdW.js → reviews-panel-BKHEfqVQ.js} +4 -4
- package/dist/_chunks/{reviews-panel-Cd3SxJdW.js.map → reviews-panel-BKHEfqVQ.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-DGtn_4sb.js → rich-text-editor-DARnq_6N.js} +5 -5
- package/dist/_chunks/{rich-text-editor-DGtn_4sb.js.map → rich-text-editor-DARnq_6N.js.map} +1 -1
- package/dist/_chunks/{session-countdown-q4r5TlCo.js → session-countdown-QMsnRa1x.js} +2 -2
- package/dist/_chunks/{session-countdown-q4r5TlCo.js.map → session-countdown-QMsnRa1x.js.map} +1 -1
- package/dist/_chunks/{sheet-CD99CdXr.js → sheet-BSznOyJs.js} +2 -2
- package/dist/_chunks/{sheet-CD99CdXr.js.map → sheet-BSznOyJs.js.map} +1 -1
- package/dist/_chunks/{sign-in-with-alfadocs-button-_JxVRO5d.js → sign-in-with-alfadocs-button-BLe_quy5.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-_JxVRO5d.js.map → sign-in-with-alfadocs-button-BLe_quy5.js.map} +1 -1
- package/dist/_chunks/{signature-request-C4UBfVRZ.js → signature-request-DXhpphlp.js} +4 -4
- package/dist/_chunks/{signature-request-C4UBfVRZ.js.map → signature-request-DXhpphlp.js.map} +1 -1
- package/dist/_chunks/{slot-grid-P_e9p5t5.js → slot-grid-BuZOKfcd.js} +4 -4
- package/dist/_chunks/{slot-grid-P_e9p5t5.js.map → slot-grid-BuZOKfcd.js.map} +1 -1
- package/dist/_chunks/{streaming-text-BuW7I0Zu.js → streaming-text-CvsjIQ7S.js} +2 -2
- package/dist/_chunks/{streaming-text-BuW7I0Zu.js.map → streaming-text-CvsjIQ7S.js.map} +1 -1
- package/dist/_chunks/{task-tray-BT288xoM.js → task-tray-CYG6rj2s.js} +3 -3
- package/dist/_chunks/{task-tray-BT288xoM.js.map → task-tray-CYG6rj2s.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-BBkZuejF.js → tasks-panel-Do5SFp-j.js} +5 -5
- package/dist/_chunks/{tasks-panel-BBkZuejF.js.map → tasks-panel-Do5SFp-j.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-Bi-CmV6M.js → theme-toggle-DuMhQNFS.js} +3 -3
- package/dist/_chunks/{theme-toggle-Bi-CmV6M.js.map → theme-toggle-DuMhQNFS.js.map} +1 -1
- package/dist/_chunks/{toast.agent-C44mtGrW.js → toast.agent-D1tdg6DS.js} +2 -2
- package/dist/_chunks/{toast.agent-C44mtGrW.js.map → toast.agent-D1tdg6DS.js.map} +1 -1
- package/dist/_chunks/{token-insert-menu-D8FgXl33.js → token-insert-menu-9Um0JinI.js} +2 -2
- package/dist/_chunks/{token-insert-menu-D8FgXl33.js.map → token-insert-menu-9Um0JinI.js.map} +1 -1
- package/dist/_chunks/{tool-rail-BF3F2Ihq.js → tool-rail-CHyUmulN.js} +2 -2
- package/dist/_chunks/{tool-rail-BF3F2Ihq.js.map → tool-rail-CHyUmulN.js.map} +1 -1
- package/dist/_chunks/{tooth-scheme-BPXE1_3N.js → tooth-scheme-WdyVymQ1.js} +3 -3
- package/dist/_chunks/{tooth-scheme-BPXE1_3N.js.map → tooth-scheme-WdyVymQ1.js.map} +1 -1
- package/dist/_chunks/{unit-converter-iDxlxKmm.js → unit-converter-BPumXMA6.js} +2 -2
- package/dist/_chunks/{unit-converter-iDxlxKmm.js.map → unit-converter-BPumXMA6.js.map} +1 -1
- package/dist/_chunks/{warning-stack-nczJf52p.js → warning-stack-DQz0Jyir.js} +3 -3
- package/dist/_chunks/{warning-stack-nczJf52p.js.map → warning-stack-DQz0Jyir.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BVofnDYh.js → workflow-map-DE_ribRM.js} +5 -5
- package/dist/_chunks/{workflow-map-BVofnDYh.js.map → workflow-map-DE_ribRM.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/image-cropper/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +47 -7
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +2 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +2 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +2 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +2 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +2 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +2 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +2 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +2 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +2 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +2 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +2 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +2 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +2 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +2 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +2 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +2 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +2 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +2 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +96 -96
- package/dist/locales/ar.json +2 -1
- package/dist/locales/de.json +2 -1
- package/dist/locales/el.json +2 -1
- package/dist/locales/en.json +2 -1
- package/dist/locales/es.json +2 -1
- package/dist/locales/fr.json +2 -1
- package/dist/locales/hi.json +2 -1
- package/dist/locales/it.json +2 -1
- package/dist/locales/ja.json +2 -1
- package/dist/locales/nl.json +2 -1
- package/dist/locales/pl.json +2 -1
- package/dist/locales/pt.json +2 -1
- package/dist/locales/ro.json +2 -1
- package/dist/locales/ru.json +2 -1
- package/dist/locales/sq.json +2 -1
- package/dist/locales/sv.json +2 -1
- package/dist/locales/tr.json +2 -1
- package/dist/locales/zh.json +2 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/button-BvNtqHAS.js.map +0 -1
- package/dist/_chunks/practice-results-CKoLD_x5.js.map +0 -1
package/dist/_chunks/{token-insert-menu-D8FgXl33.js.map → token-insert-menu-9Um0JinI.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-insert-menu-D8FgXl33.js","sources":["../../src/components/token-insert-menu/token-insert-menu.agent.ts","../../src/components/token-insert-menu/token-insert-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TokenInsertMenu. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TokenInsertMenuHandle } from './token-insert-menu';\n\nexport const tokenInsertMenuAgent: AgentAdapter<TokenInsertMenuHandle> = {\n id: 'token-insert-menu',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.tokenInsertMenu.state.isOpen',\n description: 'True when the token menu is currently open.',\n read: (handle) => handle.isOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.open',\n description: 'Open the token menu.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.close',\n description: 'Close the token menu.',\n invoke: (handle) => {\n handle.close();\n },\n },\n insert: {\n safety: 'write',\n argsType: '{ token: string }',\n argsSchema: {\n type: 'object',\n properties: { token: { type: 'string' } },\n required: ['token'],\n },\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.insert',\n description: 'Emit a merge-token to the consumer for cursor insertion.',\n examples: [\n {\n args: { token: '{{patient.name}}' },\n note: 'Emit the patient-name placeholder for cursor insertion.',\n },\n ],\n invoke: (handle, args: { token: string }) => {\n handle.insert(args.token);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'token-insert-menu',\n description: 'Marks the TokenInsertMenu wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n Fragment,\n} from 'react';\nimport { Button } from '../button/button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { useAgentRegistration } from '../../agent';\nimport { tokenInsertMenuAgent } from './token-insert-menu.agent';\n\n/** One selectable merge-token. */\nexport interface TokenInsertMenuToken {\n /** Raw token text inserted verbatim (e.g. `\"{{patient.name}}\"`). */\n value: string;\n /** Human-readable label shown in the menu. Already localised by the consumer. */\n label: string;\n /** Optional section heading — when ANY token has one, the menu renders grouped. */\n group?: string;\n}\n\n/** Agent-readiness curated handle for TokenInsertMenu. */\nexport interface TokenInsertMenuHandle {\n isOpen: () => boolean;\n open: () => void;\n close: () => void;\n /** Emit a token to the consumer (mirrors a user selecting it). */\n insert: (token: string) => void;\n}\n\nexport interface TokenInsertMenuProps {\n /** The merge-tokens to offer. `value` is inserted; `label` is shown. */\n tokens: TokenInsertMenuToken[];\n /** Called with the chosen token's raw `value`. The consumer inserts it at\n * the caret of their target field — this component never owns the field. */\n onInsert: (token: string) => void;\n /** The trigger button's visible text (already localised by the consumer). */\n triggerLabel: string;\n disabled?: boolean;\n /** Opaque instance id — surfaced as `data-component-id` + agent instance id. */\n id?: string;\n /** Extra classes for the trigger button. */\n className?: string;\n}\n\ninterface TokenSection {\n heading: string;\n items: TokenInsertMenuToken[];\n}\n\nexport const TokenInsertMenu = forwardRef<\n HTMLButtonElement,\n TokenInsertMenuProps\n>(function TokenInsertMenu(\n { tokens, onInsert, triggerLabel, disabled, id, className },\n ref,\n) {\n const [open, setOpen] = useState(false);\n\n // Mirror the open flag into a ref so the agent handle reads a fresh value\n // without re-subscribing on every toggle (matches DropdownMenu.Root).\n const openRef = useRef(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n // Group tokens only when at least one carries a `group`; otherwise flat.\n const sections = useMemo<TokenSection[] | null>(() => {\n if (!tokens.some((token) => token.group)) return null;\n const order: string[] = [];\n const byGroup = new Map<string, TokenInsertMenuToken[]>();\n for (const token of tokens) {\n const key = token.group ?? '';\n const bucket = byGroup.get(key);\n if (bucket) {\n bucket.push(token);\n } else {\n byGroup.set(key, [token]);\n order.push(key);\n }\n }\n return order.map((heading) => ({\n heading,\n items: byGroup.get(heading) ?? [],\n }));\n }, [tokens]);\n\n const handle = useMemo<TokenInsertMenuHandle>(\n () => ({\n isOpen: () => openRef.current,\n open: () => setOpen(true),\n close: () => setOpen(false),\n insert: (token) => onInsert(token),\n }),\n [onInsert],\n );\n useAgentRegistration(tokenInsertMenuAgent, handle, id);\n\n const renderItem = (token: TokenInsertMenuToken) => (\n <DropdownMenu.Item\n key={token.value}\n // Raw token shown as a muted monospace hint beneath the label.\n description={\n <span className=\"ds:font-mono ds:text-muted-foreground\">\n {token.value}\n </span>\n }\n onSelect={() => onInsert(token.value)}\n >\n {token.label}\n </DropdownMenu.Item>\n );\n\n return (\n <DropdownMenu.Root\n open={open}\n // `asChild` hides the trigger's native `disabled` from Radix, so gate\n // opening here too — a disabled menu must never expand on interaction.\n onOpenChange={(next) => {\n if (disabled) return;\n setOpen(next);\n }}\n >\n <span\n className=\"ds:inline-flex\"\n data-component=\"token-insert-menu\"\n data-component-id={id}\n >\n <DropdownMenu.Trigger asChild>\n <Button\n ref={ref}\n type=\"button\"\n intent=\"outline\"\n disabled={disabled}\n className={className}\n >\n {triggerLabel}\n </Button>\n </DropdownMenu.Trigger>\n </span>\n <DropdownMenu.Content align=\"start\">\n {sections\n ? sections.map((section, index) => (\n <Fragment key={section.heading || `section-${index}`}>\n {index > 0 ? <DropdownMenu.Separator /> : null}\n <DropdownMenu.Group>\n {section.heading ? (\n <DropdownMenu.Label>{section.heading}</DropdownMenu.Label>\n ) : null}\n {section.items.map(renderItem)}\n </DropdownMenu.Group>\n </Fragment>\n ))\n : tokens.map(renderItem)}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n});\n\nTokenInsertMenu.displayName = 'TokenInsertMenu';\n"],"names":["tokenInsertMenuAgent","handle","args","TokenInsertMenu","forwardRef","tokens","onInsert","triggerLabel","disabled","id","className","ref","open","setOpen","useState","openRef","useRef","useEffect","sections","useMemo","token","order","byGroup","key","bucket","heading","useAgentRegistration","renderItem","jsx","DropdownMenu","jsxs","next","Button","section","index","Fragment"],"mappings":";;;;;AASO,MAAMA,IAA4D;AAAA,EACvE,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,EAClC;AAAA,EAEF,SAAS;AAAA,IACP,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,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A,YACV,kBAAe;AAAA,YACf,qBAAmBnB;AAAA,YAEnB,UAAA,gBAAAmB,EAACC,EAAa,SAAb,EAAqB,SAAO,IAC3B,UAAA,gBAAAD;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,KAAArB;AAAA,gBACA,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,UAAAH;AAAA,gBACA,WAAAE;AAAA,gBAEC,UAAAH;AAAA,cAAA;AAAA,YAAA,EACH,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAqB,EAACC,EAAa,SAAb,EAAqB,OAAM,SACzB,UAAAX,IACGA,EAAS,IAAI,CAACe,GAASC,wBACpBC,GAAA,EACE,UAAA;AAAA,UAAAD,IAAQ,IAAI,gBAAAN,EAACC,EAAa,WAAb,CAAA,CAAuB,IAAK;AAAA,UAC1C,gBAAAC,EAACD,EAAa,OAAb,EACE,UAAA;AAAA,YAAAI,EAAQ,UACP,gBAAAL,EAACC,EAAa,OAAb,EAAoB,UAAAI,EAAQ,SAAQ,IACnC;AAAA,YACHA,EAAQ,MAAM,IAAIN,CAAU;AAAA,UAAA,EAAA,CAC/B;AAAA,QAAA,EAAA,GAPaM,EAAQ,WAAW,WAAWC,CAAK,EAQlD,CACD,IACD7B,EAAO,IAAIsB,CAAU,EAAA,CAC3B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDxB,EAAgB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"token-insert-menu-9Um0JinI.js","sources":["../../src/components/token-insert-menu/token-insert-menu.agent.ts","../../src/components/token-insert-menu/token-insert-menu.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — TokenInsertMenu. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { TokenInsertMenuHandle } from './token-insert-menu';\n\nexport const tokenInsertMenuAgent: AgentAdapter<TokenInsertMenuHandle> = {\n id: 'token-insert-menu',\n capabilities: ['open', 'close'],\n state: {\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.tokenInsertMenu.state.isOpen',\n description: 'True when the token menu is currently open.',\n read: (handle) => handle.isOpen(),\n },\n },\n actions: {\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.open',\n description: 'Open the token menu.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.close',\n description: 'Close the token menu.',\n invoke: (handle) => {\n handle.close();\n },\n },\n insert: {\n safety: 'write',\n argsType: '{ token: string }',\n argsSchema: {\n type: 'object',\n properties: { token: { type: 'string' } },\n required: ['token'],\n },\n descriptionKey: 'ui.agent.tokenInsertMenu.actions.insert',\n description: 'Emit a merge-token to the consumer for cursor insertion.',\n examples: [\n {\n args: { token: '{{patient.name}}' },\n note: 'Emit the patient-name placeholder for cursor insertion.',\n },\n ],\n invoke: (handle, args: { token: string }) => {\n handle.insert(args.token);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'token-insert-menu',\n description: 'Marks the TokenInsertMenu wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useMemo,\n useRef,\n useState,\n Fragment,\n} from 'react';\nimport { Button } from '../button/button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport { useAgentRegistration } from '../../agent';\nimport { tokenInsertMenuAgent } from './token-insert-menu.agent';\n\n/** One selectable merge-token. */\nexport interface TokenInsertMenuToken {\n /** Raw token text inserted verbatim (e.g. `\"{{patient.name}}\"`). */\n value: string;\n /** Human-readable label shown in the menu. Already localised by the consumer. */\n label: string;\n /** Optional section heading — when ANY token has one, the menu renders grouped. */\n group?: string;\n}\n\n/** Agent-readiness curated handle for TokenInsertMenu. */\nexport interface TokenInsertMenuHandle {\n isOpen: () => boolean;\n open: () => void;\n close: () => void;\n /** Emit a token to the consumer (mirrors a user selecting it). */\n insert: (token: string) => void;\n}\n\nexport interface TokenInsertMenuProps {\n /** The merge-tokens to offer. `value` is inserted; `label` is shown. */\n tokens: TokenInsertMenuToken[];\n /** Called with the chosen token's raw `value`. The consumer inserts it at\n * the caret of their target field — this component never owns the field. */\n onInsert: (token: string) => void;\n /** The trigger button's visible text (already localised by the consumer). */\n triggerLabel: string;\n disabled?: boolean;\n /** Opaque instance id — surfaced as `data-component-id` + agent instance id. */\n id?: string;\n /** Extra classes for the trigger button. */\n className?: string;\n}\n\ninterface TokenSection {\n heading: string;\n items: TokenInsertMenuToken[];\n}\n\nexport const TokenInsertMenu = forwardRef<\n HTMLButtonElement,\n TokenInsertMenuProps\n>(function TokenInsertMenu(\n { tokens, onInsert, triggerLabel, disabled, id, className },\n ref,\n) {\n const [open, setOpen] = useState(false);\n\n // Mirror the open flag into a ref so the agent handle reads a fresh value\n // without re-subscribing on every toggle (matches DropdownMenu.Root).\n const openRef = useRef(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n // Group tokens only when at least one carries a `group`; otherwise flat.\n const sections = useMemo<TokenSection[] | null>(() => {\n if (!tokens.some((token) => token.group)) return null;\n const order: string[] = [];\n const byGroup = new Map<string, TokenInsertMenuToken[]>();\n for (const token of tokens) {\n const key = token.group ?? '';\n const bucket = byGroup.get(key);\n if (bucket) {\n bucket.push(token);\n } else {\n byGroup.set(key, [token]);\n order.push(key);\n }\n }\n return order.map((heading) => ({\n heading,\n items: byGroup.get(heading) ?? [],\n }));\n }, [tokens]);\n\n const handle = useMemo<TokenInsertMenuHandle>(\n () => ({\n isOpen: () => openRef.current,\n open: () => setOpen(true),\n close: () => setOpen(false),\n insert: (token) => onInsert(token),\n }),\n [onInsert],\n );\n useAgentRegistration(tokenInsertMenuAgent, handle, id);\n\n const renderItem = (token: TokenInsertMenuToken) => (\n <DropdownMenu.Item\n key={token.value}\n // Raw token shown as a muted monospace hint beneath the label.\n description={\n <span className=\"ds:font-mono ds:text-muted-foreground\">\n {token.value}\n </span>\n }\n onSelect={() => onInsert(token.value)}\n >\n {token.label}\n </DropdownMenu.Item>\n );\n\n return (\n <DropdownMenu.Root\n open={open}\n // `asChild` hides the trigger's native `disabled` from Radix, so gate\n // opening here too — a disabled menu must never expand on interaction.\n onOpenChange={(next) => {\n if (disabled) return;\n setOpen(next);\n }}\n >\n <span\n className=\"ds:inline-flex\"\n data-component=\"token-insert-menu\"\n data-component-id={id}\n >\n <DropdownMenu.Trigger asChild>\n <Button\n ref={ref}\n type=\"button\"\n intent=\"outline\"\n disabled={disabled}\n className={className}\n >\n {triggerLabel}\n </Button>\n </DropdownMenu.Trigger>\n </span>\n <DropdownMenu.Content align=\"start\">\n {sections\n ? sections.map((section, index) => (\n <Fragment key={section.heading || `section-${index}`}>\n {index > 0 ? <DropdownMenu.Separator /> : null}\n <DropdownMenu.Group>\n {section.heading ? (\n <DropdownMenu.Label>{section.heading}</DropdownMenu.Label>\n ) : null}\n {section.items.map(renderItem)}\n </DropdownMenu.Group>\n </Fragment>\n ))\n : tokens.map(renderItem)}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n});\n\nTokenInsertMenu.displayName = 'TokenInsertMenu';\n"],"names":["tokenInsertMenuAgent","handle","args","TokenInsertMenu","forwardRef","tokens","onInsert","triggerLabel","disabled","id","className","ref","open","setOpen","useState","openRef","useRef","useEffect","sections","useMemo","token","order","byGroup","key","bucket","heading","useAgentRegistration","renderItem","jsx","DropdownMenu","jsxs","next","Button","section","index","Fragment"],"mappings":";;;;;AASO,MAAMA,IAA4D;AAAA,EACvE,IAAI;AAAA,EACJ,cAAc,CAAC,QAAQ,OAAO;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACC,MAAWA,EAAO,OAAA;A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,CAACmB,MAAS;AACtB,QAAIvB,KACJK,EAAQkB,CAAI;AAAA,MACd;AAAA,MAEA,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,kBAAe;AAAA,YACf,qBAAmBnB;AAAA,YAEnB,UAAA,gBAAAmB,EAACC,EAAa,SAAb,EAAqB,SAAO,IAC3B,UAAA,gBAAAD;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,KAAArB;AAAA,gBACA,MAAK;AAAA,gBACL,QAAO;AAAA,gBACP,UAAAH;AAAA,gBACA,WAAAE;AAAA,gBAEC,UAAAH;AAAA,cAAA;AAAA,YAAA,EACH,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,QAEF,gBAAAqB,EAACC,EAAa,SAAb,EAAqB,OAAM,SACzB,UAAAX,IACGA,EAAS,IAAI,CAACe,GAASC,wBACpBC,GAAA,EACE,UAAA;AAAA,UAAAD,IAAQ,IAAI,gBAAAN,EAACC,EAAa,WAAb,CAAA,CAAuB,IAAK;AAAA,UAC1C,gBAAAC,EAACD,EAAa,OAAb,EACE,UAAA;AAAA,YAAAI,EAAQ,UACP,gBAAAL,EAACC,EAAa,OAAb,EAAoB,UAAAI,EAAQ,SAAQ,IACnC;AAAA,YACHA,EAAQ,MAAM,IAAIN,CAAU;AAAA,UAAA,EAAA,CAC/B;AAAA,QAAA,EAAA,GAPaM,EAAQ,WAAW,WAAWC,CAAK,EAQlD,CACD,IACD7B,EAAO,IAAIsB,CAAU,EAAA,CAC3B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDxB,EAAgB,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as D, jsx as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as Re, useRef as m, useState as E, useMemo as R, useId as ke, useCallback as F, useEffect as Te, useImperativeHandle as ze, Fragment as _e } from "react";
|
|
3
3
|
import { c as w } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as Ae } from "react-i18next";
|
|
5
|
-
import { I as Se } from "./icon-button-
|
|
5
|
+
import { I as Se } from "./icon-button-DA2CAGHZ.js";
|
|
6
6
|
import { S as De } from "./scroll-area-BZOvUhwQ.js";
|
|
7
7
|
import { a as Ee } from "./tooltip-DvmfrNvB.js";
|
|
8
8
|
import { u as Ne } from "./use-controllable-state-BiY4xTzM.js";
|
|
@@ -521,4 +521,4 @@ export {
|
|
|
521
521
|
Ze as T,
|
|
522
522
|
Le as t
|
|
523
523
|
};
|
|
524
|
-
//# sourceMappingURL=tool-rail-
|
|
524
|
+
//# sourceMappingURL=tool-rail-CHyUmulN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-rail-BF3F2Ihq.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 { 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).\nconst PANEL_MIN_SIZE = 288;\nconst PANEL_MAX_SIZE = 640;\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/* ------------------------------------------------------------------ */\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–640px);\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 // 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 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={toolSlotVariants({\n dragging: dragIndex === index,\n dropTarget: dropIndex === index && dragIndex !== index,\n reorderable: canReorderTool,\n })}\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 </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","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","reorderMessage","setReorderMessage","announceToggle","commitReorder","useCallback","from","to","clamped","moved","text","rovingIndex","selectTool","toolId","fromKeyboard","tool","handleStripKeyDown","event","next","goingBack","candidate","attempts","_b","_c","rootRef","useEffect","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","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;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,kBAAA;AAAA,gBACN,EAAA,GAtKaA,EAAK,EAuKpB;AAAA,cAEJ,CAAC;AAAA,YAAA;AAAA,UAAA,EACH,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAjE,GAAS,cAAc;"}
|
|
1
|
+
{"version":3,"file":"tool-rail-CHyUmulN.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 { 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).\nconst PANEL_MIN_SIZE = 288;\nconst PANEL_MAX_SIZE = 640;\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/* ------------------------------------------------------------------ */\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–640px);\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 // 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 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={toolSlotVariants({\n dragging: dragIndex === index,\n dropTarget: dropIndex === index && dragIndex !== index,\n reorderable: canReorderTool,\n })}\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 </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","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","reorderMessage","setReorderMessage","announceToggle","commitReorder","useCallback","from","to","clamped","moved","text","rovingIndex","selectTool","toolId","fromKeyboard","tool","handleStripKeyDown","event","next","goingBack","candidate","attempts","_b","_c","rootRef","useEffect","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","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,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,UAAU,MAAM,IAAE;AAAA,QAC7C,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,QAAQ,CAACA,GAAQC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OXr.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-
|
|
9
|
-
import { P as rt } from "./popover-
|
|
8
|
+
import { I as Jo } from "./icon-button-DA2CAGHZ.js";
|
|
9
|
+
import { P as rt } from "./popover-Cqcjx-Ny.js";
|
|
10
10
|
import { S as en } from "./select-BW5ecXlX.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-
|
|
2051
|
+
//# sourceMappingURL=tooth-scheme-WdyVymQ1.js.map
|