@alfadocs/ui-kit-debug 1.5.0 → 1.6.1
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-CGKof8QU.js → booking-CQMJUFG-.js} +556 -549
- package/dist/_chunks/booking-CQMJUFG-.js.map +1 -0
- 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-profile-hero-Bdd0bFqC.js +187 -0
- package/dist/_chunks/practice-profile-hero-Bdd0bFqC.js.map +1 -0
- package/dist/_chunks/{practice-results-DWUZRm2x.js → practice-results-F_Rf7c4H.js} +224 -210
- package/dist/_chunks/practice-results-F_Rf7c4H.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 +33 -36
- package/dist/agent-i18n/en.json +6 -5
- 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/booking-types.d.ts +9 -0
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +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/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +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-profile-hero/index.d.ts +4 -0
- package/dist/components/practice-profile-hero/index.d.ts.map +1 -0
- package/dist/components/practice-profile-hero/index.js +6 -0
- package/dist/components/practice-profile-hero/index.js.map +1 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.agent.d.ts +4 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.agent.d.ts.map +1 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +60 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +15 -1
- 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/host-compat.css +1 -4
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +409 -406
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- 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 +5 -1
- package/dist/_chunks/booking-CGKof8QU.js.map +0 -1
- package/dist/_chunks/button-BvNtqHAS.js.map +0 -1
- package/dist/_chunks/practice-results-DWUZRm2x.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message-DHNUbjXA.js","sources":["../../src/components/chat-message/chat-message.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CircleAlert, Check, Clock, RotateCcw } from 'lucide-react';\nimport { Button } from '../button';\nimport { Avatar } from '../avatar';\nimport { Timestamp } from '../timestamp';\nimport { safeImageSrc } from '../_shared';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport type ChatMessageRole = 'user' | 'assistant' | 'system';\nexport type ChatMessageStatus = 'sending' | 'sent' | 'error' | 'edited';\n\nexport interface ChatMessageAvatar {\n name?: string;\n src?: string;\n /**\n * Optional custom avatar node. When provided, it REPLACES the built-in\n * `<Avatar>` (initials / image) for this message. Used by the Alia\n * pattern to render a Astroid identity tile instead of an avatar, and\n * by consumers that want to swap in a user-icon chip, brand glyph, etc.\n * The caller is responsible for accessible labelling on the custom node\n * — ChatMessage's own `aria-label` already announces the role/time, so\n * purely decorative nodes can be `aria-hidden`.\n */\n slot?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rowVariants = cva(\n 'ds:flex ds:w-full ds:items-start ds:gap-[var(--spacing-sm)]',\n {\n variants: {\n role: {\n user: 'ds:flex-row-reverse',\n assistant: 'ds:flex-row',\n system: 'ds:flex-col ds:items-center ds:text-center',\n },\n },\n defaultVariants: { role: 'assistant' },\n },\n);\n\nconst bubbleVariants = cva(\n [\n // Cap at 42rem on wide surfaces; on narrow docks (Alia sidebar ≈22rem)\n // leave room for the avatar column (size-8 = 32px = --spacing-xl) +\n // `gap-sm` (8px = --spacing-sm) so avatars don't clip off the inline\n // edge when the row is width-constrained.\n 'ds:relative ds:max-w-[min(42rem,calc(100%-var(--spacing-xl)-var(--spacing-sm)))]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'type-body',\n 'ds:break-words',\n ].join(' '),\n {\n variants: {\n role: {\n user: 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:rounded-[var(--radius-md)] ds:rounded-ee-[var(--radius-sm)]',\n assistant:\n 'ds:bg-muted/40 ds:text-foreground ds:rounded-[var(--radius-md)] ds:rounded-es-[var(--radius-sm)]',\n system:\n 'ds:bg-transparent ds:text-[color:var(--muted-foreground)] type-body-sm ds:italic',\n },\n },\n defaultVariants: { role: 'assistant' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Safe markdown-ish (bold, inline code, line-breaks, links as text) */\n/* No dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' }\n | { type: 'link'; label: string; href: string };\n\nconst SAFE_SCHEMES = /^(https?:|mailto:)/i;\n\nfunction tokenize(input: string): Token[] {\n const tokens: Token[] = [];\n let remaining = input;\n const pattern = /\\*\\*([^*]+)\\*\\*|`([^`]+)`|\\[([^\\]]+)\\]\\(([^)]+)\\)|\\n/;\n while (remaining.length > 0) {\n const match = pattern.exec(remaining);\n if (!match) {\n tokens.push({ type: 'text', value: remaining });\n break;\n }\n if (match.index > 0) {\n tokens.push({ type: 'text', value: remaining.slice(0, match.index) });\n }\n if (match[1] !== undefined) {\n tokens.push({ type: 'bold', value: match[1] });\n } else if (match[2] !== undefined) {\n tokens.push({ type: 'code', value: match[2] });\n } else if (match[3] !== undefined && match[4] !== undefined) {\n tokens.push({ type: 'link', label: match[3], href: match[4] });\n } else {\n tokens.push({ type: 'br' });\n }\n remaining = remaining.slice(match.index + match[0].length);\n }\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/30 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n if (tok.type === 'link') {\n if (!SAFE_SCHEMES.test(tok.href)) {\n // Unsafe scheme (javascript:, data:) — render as inert text.\n return <Fragment key={i}>{tok.label}</Fragment>;\n }\n return (\n <a\n key={i}\n href={tok.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ds:underline ds:underline-offset-2 ds:hover:opacity-80\"\n >\n {tok.label}\n </a>\n );\n }\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render a message body: split fenced code blocks out to `<CodeBlock>` and run\n * the inline tokenizer over the surrounding text runs.\n */\nfunction renderBody(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\n/* ------------------------------------------------------------------ */\n/* ChatMessage */\n/* ------------------------------------------------------------------ */\n\ntype NativeProps = Omit<HTMLAttributes<HTMLElement>, 'content' | 'role'>;\n\nexport interface ChatMessageProps\n extends NativeProps, VariantProps<typeof bubbleVariants> {\n role: ChatMessageRole;\n content: string;\n avatar?: ChatMessageAvatar;\n timestamp?: Date | number | string;\n status?: ChatMessageStatus;\n /** Parse a small, safe subset of markdown. Never renders raw HTML. */\n renderMarkdown?: boolean;\n /** Invoked when the retry button is activated (error status only). */\n onRetry?: () => void;\n /**\n * Optional action row rendered beneath the message body + timestamp,\n * aligned with the message (e.g. the Alia pattern's Copy / Download\n * buttons on assistant messages). Default off → renders nothing.\n */\n actions?: ReactNode;\n /**\n * Custom body node rendered verbatim INSTEAD of `content`. When set, the\n * markdown tokenizer (`renderBody`) is skipped and the node is rendered\n * directly inside the bubble. `content` is still required (used for the\n * aria-label context and consumer copy / download). Default off.\n */\n body?: ReactNode;\n}\n\nexport const ChatMessage = forwardRef<HTMLElement, ChatMessageProps>(\n (\n {\n role,\n content,\n avatar,\n timestamp,\n status,\n renderMarkdown = false,\n onRetry,\n actions,\n body,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n // Local format — used for the aria-label interpolation only. Visible\n // label is rendered by `<Timestamp>` below, which computes the same\n // locale-aware HH:MM internally.\n const formattedTime = useMemo(() => {\n if (!timestamp) return null;\n const date = timestamp instanceof Date ? timestamp : new Date(timestamp);\n if (Number.isNaN(date.getTime())) return null;\n return new Intl.DateTimeFormat(i18n.language, {\n hour: '2-digit',\n minute: '2-digit',\n }).format(date);\n }, [timestamp, i18n.language]);\n\n const roleLabel = t(`chat.message.role.${role}`);\n const messageLabel = formattedTime\n ? t('chat.message.label', { role: roleLabel, time: formattedTime })\n : t('chat.message.labelNoTime', { role: roleLabel });\n\n const resolvedBody =\n body ?? (renderMarkdown ? renderBody(content) : content);\n\n const statusIcon = (() => {\n if (!status || status === 'edited') return null;\n if (status === 'sending')\n return <Clock aria-hidden=\"true\" className=\"ds:size-3.5\" />;\n if (status === 'sent')\n return <Check aria-hidden=\"true\" className=\"ds:size-3.5\" />;\n return (\n <CircleAlert\n aria-hidden=\"true\"\n className=\"ds:size-3.5 ds:text-[color:var(--destructive)]\"\n />\n );\n })();\n\n const statusText = status ? t(`chat.message.status.${status}`) : null;\n\n return (\n <article\n ref={ref}\n aria-label={messageLabel}\n data-component=\"chat-message\"\n // Structural state surfaced for agent reads (see chat-message.agent.ts).\n // `status` is optional → the attribute is omitted when unset.\n data-role={role}\n data-status={status}\n className={[\n rowVariants({ role, className }),\n // Entrance: fade + slide up on mount. `--animation-duration` is 0ms\n // under `prefers-reduced-motion` and `.theme-accessible`, so both\n // collapse the animation to an instant state change automatically.\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:slide-in-from-bottom-2',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n {...rest}\n >\n {role !== 'system' && avatar ? (\n avatar.slot ? (\n // Consumer-supplied avatar node (e.g. Alia's Astroid tile).\n avatar.slot\n ) : (\n // Allow-list the src: LLM-supplied values can carry\n // `javascript:` / `data:text/html` / `data:image/svg+xml` and so\n // are scrubbed here before reaching <Avatar>. Fallback to initials.\n <Avatar\n name={avatar.name}\n src={safeImageSrc(avatar.src)}\n size=\"sm\"\n />\n )\n ) : null}\n\n <div\n className={[\n // min-w-0 allows this flex item to shrink below its content's\n // natural width — without it, a single unbreakable token (URL,\n // CJK run, hash) can force the bubble wider than the parent\n // and spill outside narrow containers like the Alia sidebar.\n 'ds:flex ds:flex-col ds:min-w-0',\n role === 'user'\n ? 'ds:items-end'\n : role === 'assistant'\n ? 'ds:items-start'\n : 'ds:items-center',\n ].join(' ')}\n >\n <div\n dir=\"auto\"\n className={[\n bubbleVariants({ role }),\n // `break-words` (from bubbleVariants) handles soft hyphens;\n // `overflow-wrap: anywhere` is the last-resort break for\n // URLs, hashes, or CJK runs that would otherwise push the\n // bubble wider than its parent in narrow docks like Alia.\n 'ds:[overflow-wrap:anywhere]',\n ].join(' ')}\n >\n {resolvedBody}\n </div>\n\n {(formattedTime || statusText) && role !== 'system' ? (\n <div\n className={[\n 'ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'type-meta ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {timestamp ? (\n <Timestamp\n value={timestamp}\n format=\"absolute\"\n absoluteFormat={{ hour: '2-digit', minute: '2-digit' }}\n dir=\"ltr\"\n />\n ) : null}\n {statusIcon ? (\n // `key={status}` re-mounts the span on every status change so\n // `animate-in` re-runs — gives the sending → sent → error\n // swap a subtle cross-fade instead of an abrupt pop.\n <span\n key={status}\n className={[\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n >\n {statusIcon}\n <span className=\"ds:sr-only\">{statusText}</span>\n </span>\n ) : null}\n {status === 'error' && onRetry ? (\n <Button\n intent=\"ghost\"\n size=\"sm\"\n onClick={onRetry}\n startIcon={<RotateCcw />}\n >\n {t('chat.message.retry')}\n </Button>\n ) : null}\n </div>\n ) : null}\n {actions ? (\n <div className=\"ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actions}\n </div>\n ) : null}\n </div>\n </article>\n );\n },\n);\n\nChatMessage.displayName = 'ChatMessage';\n"],"names":["rowVariants","cva","bubbleVariants","SAFE_SCHEMES","tokenize","input","tokens","remaining","pattern","match","renderInline","tok","i","jsx","Fragment","renderBody","splitCodeFences","seg","CodeBlock","ChatMessage","forwardRef","role","content","avatar","timestamp","status","renderMarkdown","onRetry","actions","body","className","rest","ref","t","i18n","useTranslation","formattedTime","useMemo","date","roleLabel","messageLabel","resolvedBody","statusIcon","Clock","Check","CircleAlert","statusText","jsxs","Avatar","safeImageSrc","Timestamp","Button","RotateCcw"],"mappings":";;;;;;;;;;;;;AA0CA,MAAMA,IAAcC;AAAA,EAClB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,QACX,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,MAAM,YAAA;AAAA,EAAY;AAEzC,GAEMC,IAAiBD;AAAA,EACrB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE;AAA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AA,CAAW;AAAA,4BAAA;AAAA,0BAAA;AAAA,0BARpCrB;AAAA,wBAAA;AAAA,0BAUL;AAAA,sBACHA,MAAW,WAAWE,IACrB,gBAAAd;AAAA,wBAACsC;AAAA,wBAAA;AAAA,0BACC,QAAO;AAAA,0BACP,MAAK;AAAA,0BACL,SAASxB;AAAA,0BACT,6BAAYyB,GAAA,EAAU;AAAA,0BAErB,YAAE,oBAAoB;AAAA,wBAAA;AAAA,sBAAA,IAEvB;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA,IAEJ;AAAA,gBACHxB,IACC,gBAAAf,EAAC,OAAA,EAAI,WAAU,uFACZ,aACH,IACE;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAM,EAAY,cAAc;"}
|
|
1
|
+
{"version":3,"file":"chat-message-DBQu10rs.js","sources":["../../src/components/chat-message/chat-message.tsx"],"sourcesContent":["import {\n forwardRef,\n Fragment,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CircleAlert, Check, Clock, RotateCcw } from 'lucide-react';\nimport { Button } from '../button';\nimport { Avatar } from '../avatar';\nimport { Timestamp } from '../timestamp';\nimport { safeImageSrc } from '../_shared';\nimport { CodeBlock, splitCodeFences } from '../_shared/code-block';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport type ChatMessageRole = 'user' | 'assistant' | 'system';\nexport type ChatMessageStatus = 'sending' | 'sent' | 'error' | 'edited';\n\nexport interface ChatMessageAvatar {\n name?: string;\n src?: string;\n /**\n * Optional custom avatar node. When provided, it REPLACES the built-in\n * `<Avatar>` (initials / image) for this message. Used by the Alia\n * pattern to render a Astroid identity tile instead of an avatar, and\n * by consumers that want to swap in a user-icon chip, brand glyph, etc.\n * The caller is responsible for accessible labelling on the custom node\n * — ChatMessage's own `aria-label` already announces the role/time, so\n * purely decorative nodes can be `aria-hidden`.\n */\n slot?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rowVariants = cva(\n 'ds:flex ds:w-full ds:items-start ds:gap-[var(--spacing-sm)]',\n {\n variants: {\n role: {\n user: 'ds:flex-row-reverse',\n assistant: 'ds:flex-row',\n system: 'ds:flex-col ds:items-center ds:text-center',\n },\n },\n defaultVariants: { role: 'assistant' },\n },\n);\n\nconst bubbleVariants = cva(\n [\n // Cap at 42rem on wide surfaces; on narrow docks (Alia sidebar ≈22rem)\n // leave room for the avatar column (size-8 = 32px = --spacing-xl) +\n // `gap-sm` (8px = --spacing-sm) so avatars don't clip off the inline\n // edge when the row is width-constrained.\n 'ds:relative ds:max-w-[min(42rem,calc(100%-var(--spacing-xl)-var(--spacing-sm)))]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]',\n 'type-body',\n 'ds:break-words',\n ].join(' '),\n {\n variants: {\n role: {\n user: 'ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:rounded-[var(--radius-md)] ds:rounded-ee-[var(--radius-sm)]',\n assistant:\n 'ds:bg-muted/40 ds:text-foreground ds:rounded-[var(--radius-md)] ds:rounded-es-[var(--radius-sm)]',\n system:\n 'ds:bg-transparent ds:text-[color:var(--muted-foreground)] type-body-sm ds:italic',\n },\n },\n defaultVariants: { role: 'assistant' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Safe markdown-ish (bold, inline code, line-breaks, links as text) */\n/* No dangerouslySetInnerHTML. */\n/* ------------------------------------------------------------------ */\n\ntype Token =\n | { type: 'text'; value: string }\n | { type: 'bold'; value: string }\n | { type: 'code'; value: string }\n | { type: 'br' }\n | { type: 'link'; label: string; href: string };\n\nconst SAFE_SCHEMES = /^(https?:|mailto:)/i;\n\nfunction tokenize(input: string): Token[] {\n const tokens: Token[] = [];\n let remaining = input;\n const pattern = /\\*\\*([^*]+)\\*\\*|`([^`]+)`|\\[([^\\]]+)\\]\\(([^)]+)\\)|\\n/;\n while (remaining.length > 0) {\n const match = pattern.exec(remaining);\n if (!match) {\n tokens.push({ type: 'text', value: remaining });\n break;\n }\n if (match.index > 0) {\n tokens.push({ type: 'text', value: remaining.slice(0, match.index) });\n }\n if (match[1] !== undefined) {\n tokens.push({ type: 'bold', value: match[1] });\n } else if (match[2] !== undefined) {\n tokens.push({ type: 'code', value: match[2] });\n } else if (match[3] !== undefined && match[4] !== undefined) {\n tokens.push({ type: 'link', label: match[3], href: match[4] });\n } else {\n tokens.push({ type: 'br' });\n }\n remaining = remaining.slice(match.index + match[0].length);\n }\n return tokens;\n}\n\nfunction renderInline(input: string): ReactNode {\n return tokenize(input).map((tok, i) => {\n if (tok.type === 'bold') return <strong key={i}>{tok.value}</strong>;\n if (tok.type === 'code') {\n return (\n <code\n key={i}\n dir=\"ltr\"\n className=\"ds:rounded-[var(--radius-sm)] ds:bg-muted/30 ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:font-[family-name:var(--font-mono)]\"\n >\n {tok.value}\n </code>\n );\n }\n if (tok.type === 'br') return <br key={i} />;\n if (tok.type === 'link') {\n if (!SAFE_SCHEMES.test(tok.href)) {\n // Unsafe scheme (javascript:, data:) — render as inert text.\n return <Fragment key={i}>{tok.label}</Fragment>;\n }\n return (\n <a\n key={i}\n href={tok.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ds:underline ds:underline-offset-2 ds:hover:opacity-80\"\n >\n {tok.label}\n </a>\n );\n }\n return <Fragment key={i}>{tok.value}</Fragment>;\n });\n}\n\n/**\n * Render a message body: split fenced code blocks out to `<CodeBlock>` and run\n * the inline tokenizer over the surrounding text runs.\n */\nfunction renderBody(input: string): ReactNode {\n return splitCodeFences(input).map((seg, i) => {\n if (seg.type === 'code') {\n return <CodeBlock key={i} code={seg.value} language={seg.lang} />;\n }\n return <Fragment key={i}>{renderInline(seg.value)}</Fragment>;\n });\n}\n\n/* ------------------------------------------------------------------ */\n/* ChatMessage */\n/* ------------------------------------------------------------------ */\n\ntype NativeProps = Omit<HTMLAttributes<HTMLElement>, 'content' | 'role'>;\n\nexport interface ChatMessageProps\n extends NativeProps, VariantProps<typeof bubbleVariants> {\n role: ChatMessageRole;\n content: string;\n avatar?: ChatMessageAvatar;\n timestamp?: Date | number | string;\n status?: ChatMessageStatus;\n /** Parse a small, safe subset of markdown. Never renders raw HTML. */\n renderMarkdown?: boolean;\n /** Invoked when the retry button is activated (error status only). */\n onRetry?: () => void;\n /**\n * Optional action row rendered beneath the message body + timestamp,\n * aligned with the message (e.g. the Alia pattern's Copy / Download\n * buttons on assistant messages). Default off → renders nothing.\n */\n actions?: ReactNode;\n /**\n * Custom body node rendered verbatim INSTEAD of `content`. When set, the\n * markdown tokenizer (`renderBody`) is skipped and the node is rendered\n * directly inside the bubble. `content` is still required (used for the\n * aria-label context and consumer copy / download). Default off.\n */\n body?: ReactNode;\n}\n\nexport const ChatMessage = forwardRef<HTMLElement, ChatMessageProps>(\n (\n {\n role,\n content,\n avatar,\n timestamp,\n status,\n renderMarkdown = false,\n onRetry,\n actions,\n body,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n // Local format — used for the aria-label interpolation only. Visible\n // label is rendered by `<Timestamp>` below, which computes the same\n // locale-aware HH:MM internally.\n const formattedTime = useMemo(() => {\n if (!timestamp) return null;\n const date = timestamp instanceof Date ? timestamp : new Date(timestamp);\n if (Number.isNaN(date.getTime())) return null;\n return new Intl.DateTimeFormat(i18n.language, {\n hour: '2-digit',\n minute: '2-digit',\n }).format(date);\n }, [timestamp, i18n.language]);\n\n const roleLabel = t(`chat.message.role.${role}`);\n const messageLabel = formattedTime\n ? t('chat.message.label', { role: roleLabel, time: formattedTime })\n : t('chat.message.labelNoTime', { role: roleLabel });\n\n const resolvedBody =\n body ?? (renderMarkdown ? renderBody(content) : content);\n\n const statusIcon = (() => {\n if (!status || status === 'edited') return null;\n if (status === 'sending')\n return <Clock aria-hidden=\"true\" className=\"ds:size-3.5\" />;\n if (status === 'sent')\n return <Check aria-hidden=\"true\" className=\"ds:size-3.5\" />;\n return (\n <CircleAlert\n aria-hidden=\"true\"\n className=\"ds:size-3.5 ds:text-[color:var(--destructive)]\"\n />\n );\n })();\n\n const statusText = status ? t(`chat.message.status.${status}`) : null;\n\n return (\n <article\n ref={ref}\n aria-label={messageLabel}\n data-component=\"chat-message\"\n // Structural state surfaced for agent reads (see chat-message.agent.ts).\n // `status` is optional → the attribute is omitted when unset.\n data-role={role}\n data-status={status}\n className={[\n rowVariants({ role, className }),\n // Entrance: fade + slide up on mount. `--animation-duration` is 0ms\n // under `prefers-reduced-motion` and `.theme-accessible`, so both\n // collapse the animation to an instant state change automatically.\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:slide-in-from-bottom-2',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n {...rest}\n >\n {role !== 'system' && avatar ? (\n avatar.slot ? (\n // Consumer-supplied avatar node (e.g. Alia's Astroid tile).\n avatar.slot\n ) : (\n // Allow-list the src: LLM-supplied values can carry\n // `javascript:` / `data:text/html` / `data:image/svg+xml` and so\n // are scrubbed here before reaching <Avatar>. Fallback to initials.\n <Avatar\n name={avatar.name}\n src={safeImageSrc(avatar.src)}\n size=\"sm\"\n />\n )\n ) : null}\n\n <div\n className={[\n // min-w-0 allows this flex item to shrink below its content's\n // natural width — without it, a single unbreakable token (URL,\n // CJK run, hash) can force the bubble wider than the parent\n // and spill outside narrow containers like the Alia sidebar.\n 'ds:flex ds:flex-col ds:min-w-0',\n role === 'user'\n ? 'ds:items-end'\n : role === 'assistant'\n ? 'ds:items-start'\n : 'ds:items-center',\n ].join(' ')}\n >\n <div\n dir=\"auto\"\n className={[\n bubbleVariants({ role }),\n // `break-words` (from bubbleVariants) handles soft hyphens;\n // `overflow-wrap: anywhere` is the last-resort break for\n // URLs, hashes, or CJK runs that would otherwise push the\n // bubble wider than its parent in narrow docks like Alia.\n 'ds:[overflow-wrap:anywhere]',\n ].join(' ')}\n >\n {resolvedBody}\n </div>\n\n {(formattedTime || statusText) && role !== 'system' ? (\n <div\n className={[\n 'ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'type-meta ds:text-[color:var(--muted-foreground)]',\n ].join(' ')}\n >\n {timestamp ? (\n <Timestamp\n value={timestamp}\n format=\"absolute\"\n absoluteFormat={{ hour: '2-digit', minute: '2-digit' }}\n dir=\"ltr\"\n />\n ) : null}\n {statusIcon ? (\n // `key={status}` re-mounts the span on every status change so\n // `animate-in` re-runs — gives the sending → sent → error\n // swap a subtle cross-fade instead of an abrupt pop.\n <span\n key={status}\n className={[\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n >\n {statusIcon}\n <span className=\"ds:sr-only\">{statusText}</span>\n </span>\n ) : null}\n {status === 'error' && onRetry ? (\n <Button\n intent=\"ghost\"\n size=\"sm\"\n onClick={onRetry}\n startIcon={<RotateCcw />}\n >\n {t('chat.message.retry')}\n </Button>\n ) : null}\n </div>\n ) : null}\n {actions ? (\n <div className=\"ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {actions}\n </div>\n ) : null}\n </div>\n </article>\n );\n },\n);\n\nChatMessage.displayName = 'ChatMessage';\n"],"names":["rowVariants","cva","bubbleVariants","SAFE_SCHEMES","tokenize","input","tokens","remaining","pattern","match","renderInline","tok","i","jsx","Fragment","renderBody","splitCodeFences","seg","CodeBlock","ChatMessage","forwardRef","role","content","avatar","timestamp","status","renderMarkdown","onRetry","actions","body","className","rest","ref","t","i18n","useTranslation","formattedTime","useMemo","date","roleLabel","messageLabel","resolvedBody","statusIcon","Clock","Check","CircleAlert","statusText","jsxs","Avatar","safeImageSrc","Timestamp","Button","RotateCcw"],"mappings":";;;;;;;;;;;;;AA0CA,MAAMA,IAAcC;AAAA,EAClB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,WAAW;AAAA,QACX,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,IAEF,iBAAiB,EAAE,MAAM,YAAA;AAAA,EAAY;AAEzC,GAEMC,IAAiBD;AAAA,EACrB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,WACE;AAAA,QACF,QACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB,EAAE,MAAM,YAAA;AAAA,EAAY;AAEzC,GAcME,IAAe;AAErB,SAASC,EAASC,GAAwB;AACxC,QAAMC,IAAkB,CAAA;AACxB,MAAIC,IAAYF;AAChB,QAAMG,IAAU;AAChB,SAAOD,EAAU,SAAS,KAAG;AAC3B,UAAME,IAAQD,EAAQ,KAAKD,CAAS;AACpC,QAAI,CAACE,GAAO;AACV,MAAAH,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOC,GAAW;AAC9C;AAAA,IACF;AACA,IAAIE,EAAM,QAAQ,KAChBH,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOC,EAAU,MAAM,GAAGE,EAAM,KAAK,EAAA,CAAG,GAElEA,EAAM,CAAC,MAAM,SACfH,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOG,EAAM,CAAC,GAAG,IACpCA,EAAM,CAAC,MAAM,SACtBH,EAAO,KAAK,EAAE,MAAM,QAAQ,OAAOG,EAAM,CA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AAA,wBAACqC;AAAA,wBAAA;AAAA,0BACC,OAAO1B;AAAA,0BACP,QAAO;AAAA,0BACP,gBAAgB,EAAE,MAAM,WAAW,QAAQ,UAAA;AAAA,0BAC3C,KAAI;AAAA,wBAAA;AAAA,sBAAA,IAEJ;AAAA,sBACHkB;AAAA;AAAA;AAAA;AAAA,wBAIC,gBAAAK;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BAEC,WAAW;AAAA,8BACT;AAAA,8BACA;AAAA,8BACA;AAAA,4BAAA,EACA,KAAK,GAAG;AAAA,4BAET,UAAA;AAAA,8BAAAL;AAAA,8BACD,gBAAA7B,EAAC,QAAA,EAAK,WAAU,cAAc,UAAAiC,EAAA,CAAW;AAAA,4BAAA;AAAA,0BAAA;AAAA,0BARpCrB;AAAA,wBAAA;AAAA,0BAUL;AAAA,sBACHA,MAAW,WAAWE,IACrB,gBAAAd;AAAA,wBAACsC;AAAA,wBAAA;AAAA,0BACC,QAAO;AAAA,0BACP,MAAK;AAAA,0BACL,SAASxB;AAAA,0BACT,6BAAYyB,GAAA,EAAU;AAAA,0BAErB,YAAE,oBAAoB;AAAA,wBAAA;AAAA,sBAAA,IAEvB;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAAA,IAEJ;AAAA,gBACHxB,IACC,gBAAAf,EAAC,OAAA,EAAI,WAAU,uFACZ,aACH,IACE;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAM,EAAY,cAAc;"}
|
|
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as u, useState as g, useCallback as x } from "react";
|
|
3
3
|
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as b } from "react-i18next";
|
|
5
|
-
import { I as y } from "./icon-button-
|
|
5
|
+
import { I as y } from "./icon-button-DA2CAGHZ.js";
|
|
6
6
|
import { C } from "./check-DrFSN__t.js";
|
|
7
7
|
import { C as k } from "./copy-vRpqqHtY.js";
|
|
8
8
|
function F(e) {
|
|
@@ -103,4 +103,4 @@ export {
|
|
|
103
103
|
B as C,
|
|
104
104
|
F as s
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=code-block-
|
|
106
|
+
//# sourceMappingURL=code-block-BIkpRLkl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-block-
|
|
1
|
+
{"version":3,"file":"code-block-BIkpRLkl.js","sources":["../../src/components/_shared/code-block.tsx"],"sourcesContent":["/**\n * Shared fenced-code-block renderer for the chat markdown path.\n *\n * `splitCodeFences` slices a markdown string into plain-text and fenced-code\n * segments so `ChatMessage` / `StreamingText` can keep their existing inline\n * tokenizers for the text runs and render `<CodeBlock>` for the code runs.\n * It tolerates an UNTERMINATED trailing fence — the streaming case, where the\n * closing ``` has not arrived yet — so a prompt renders as a code block as it\n * streams in.\n *\n * `CodeBlock` renders the code in a scrollable monospace surface with a Copy\n * affordance (clipboard + a brief \"Copied\" confirmation, graceful no-op when\n * the clipboard API is unavailable). No `dangerouslySetInnerHTML`.\n */\nimport { forwardRef, useCallback, useState, type HTMLAttributes } from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, Copy } from 'lucide-react';\nimport { IconButton } from '../button';\n\n/* ------------------------------------------------------------------ */\n/* splitCodeFences */\n/* ------------------------------------------------------------------ */\n\nexport type MarkdownSegment =\n | { type: 'text'; value: string }\n | { type: 'code'; lang?: string; value: string };\n\n/**\n * Split markdown into text + fenced-code segments. Matches an opening\n * ` ```lang\\n `, lazy content, then either a closing ` \\n``` ` on its own line\n * or end-of-input (the unterminated streaming case).\n */\nexport function splitCodeFences(input: string): MarkdownSegment[] {\n const segments: MarkdownSegment[] = [];\n // `\\n?` before the closing fence so an EMPTY block (```ts\\n```) closes\n // correctly rather than swallowing its own closing backticks as content.\n const fence = /```([^\\n`]*)\\n([\\s\\S]*?)(?:\\n?```|$)/g;\n let last = 0;\n let m: RegExpExecArray | null;\n while ((m = fence.exec(input)) !== null) {\n if (m.index > last) {\n segments.push({ type: 'text', value: input.slice(last, m.index) });\n }\n segments.push({\n type: 'code',\n lang: m[1].trim() || undefined,\n value: m[2],\n });\n last = fence.lastIndex;\n }\n if (last < input.length) {\n segments.push({ type: 'text', value: input.slice(last) });\n }\n return segments;\n}\n\n/* ------------------------------------------------------------------ */\n/* CodeBlock */\n/* ------------------------------------------------------------------ */\n\nconst codeBlockVariants = cva(\n [\n 'ds:my-[var(--spacing-sm)] ds:overflow-hidden',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]',\n 'ds:bg-[var(--muted)]',\n ].join(' '),\n);\n\nexport interface CodeBlockProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'children'\n> {\n /** Raw code text. */\n code: string;\n /** Optional info string after the opening fence (e.g. `ts`, `bash`). */\n language?: string;\n /** Render the Copy affordance. Default `true`. */\n showCopy?: boolean;\n}\n\nexport const CodeBlock = forwardRef<HTMLDivElement, CodeBlockProps>(\n ({ code, language, showCopy = true, className, ...rest }, ref) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n\n const canCopy =\n showCopy &&\n typeof navigator !== 'undefined' &&\n typeof navigator.clipboard?.writeText === 'function';\n\n const handleCopy = useCallback(() => {\n navigator.clipboard\n ?.writeText(code)\n .then(() => {\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n })\n .catch(() => {\n // Clipboard blocked (insecure context / permissions) — graceful no-op.\n });\n }, [code]);\n\n return (\n <div\n ref={ref}\n data-component=\"code-block\"\n className={[codeBlockVariants(), className].filter(Boolean).join(' ')}\n {...rest}\n >\n {language || canCopy ? (\n <div\n className={[\n 'ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]',\n 'ds:border-b ds:border-[color:var(--border)]',\n 'ds:bg-[color-mix(in_srgb,var(--muted-foreground)_8%,transparent)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-xs)]',\n 'ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <span\n dir=\"ltr\"\n className=\"type-meta ds:text-[color:var(--muted-foreground)]\"\n >\n {language ?? ''}\n </span>\n {canCopy ? (\n <IconButton\n icon={copied ? <Check /> : <Copy />}\n aria-label={\n copied ? t('codeBlock.copied') : t('codeBlock.copy')\n }\n intent=\"ghost\"\n size=\"sm\"\n onClick={handleCopy}\n />\n ) : null}\n </div>\n ) : null}\n {/* eslint-disable jsx-a11y/no-noninteractive-tabindex --\n the scrollable <pre> must be keyboard-focusable so keyboard users\n can scroll the overflow (axe scrollable-region-focusable); the\n browser default focus ring satisfies WCAG 2.4.7. */}\n <pre\n tabIndex={0}\n className=\"ds:m-0 ds:overflow-x-auto ds:p-[var(--spacing-md)]\"\n >\n <code\n dir=\"ltr\"\n className={[\n 'ds:font-[family-name:var(--font-mono)]',\n 'ds:text-[length:var(--font-size-sm)] ds:leading-relaxed',\n 'ds:text-[color:var(--foreground)]',\n 'ds:whitespace-pre',\n ].join(' ')}\n >\n {code}\n </code>\n </pre>\n {/* eslint-enable jsx-a11y/no-noninteractive-tabindex */}\n {/* Polite status so AT confirms the copy without moving focus. */}\n <span role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {copied ? t('codeBlock.copied') : ''}\n </span>\n </div>\n );\n },\n);\n\nCodeBlock.displayName = 'CodeBlock';\n"],"names":["splitCodeFences","input","segments","fence","last","m","codeBlockVariants","cva","CodeBlock","forwardRef","code","language","showCopy","className","rest","ref","t","useTranslation","copied","setCopied","useState","canCopy","_a","handleCopy","useCallback","jsxs","jsx","IconButton","Check","Copy"],"mappings":";;;;;;;AAiCO,SAASA,EAAgBC,GAAkC;AAChE,QAAMC,IAA8B,CAAA,GAG9BC,IAAQ;AACd,MAAIC,IAAO,GACPC;AACJ,UAAQA,IAAIF,EAAM,KAAKF,CAAK,OAAO;AACjC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AI;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA,cAAA,EACA,KAAK,GAAG;AAAA,cAEV,UAAA;AAAA,gBAAA,gBAAAC;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,KAAI;AAAA,oBACJ,WAAU;AAAA,oBAET,UAAAf,KAAY;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAEdU,IACC,gBAAAK;AAAA,kBAACC;AAAA,kBAAA;AAAA,oBACC,MAAMT,IAAS,gBAAAQ,EAACE,GAAA,CAAA,CAAM,sBAAMC,GAAA,EAAK;AAAA,oBACjC,cACWb,EAATE,IAAW,qBAAwB,gBAAN;AAAA,oBAE/B,QAAO;AAAA,oBACP,MAAK;AAAA,oBACL,SAASK;AAAA,kBAAA;AAAA,gBAAA,IAET;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA,IAEJ;AAAA,UAKJ,gBAAAG;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAU;AAAA,cACV,WAAU;AAAA,cAEV,UAAA,gBAAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,KAAI;AAAA,kBACJ,WAAW;AAAA,oBACT;AAAA,oBACA;AAAA,oBACA;AAAA,oBACA;AAAA,kBAAA,EACA,KAAK,GAAG;AAAA,kBAET,UAAAhB;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,UAIF,gBAAAgB,EAAC,QAAA,EAAK,MAAK,UAAS,aAAU,UAAS,WAAU,cAC9C,UAAAR,IAASF,EAAE,kBAAkB,IAAI,GAAA,CACpC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEAR,EAAU,cAAc;"}
|
|
@@ -3,8 +3,8 @@ import { forwardRef as k, useMemo as B } from "react";
|
|
|
3
3
|
import { useTranslation as A } from "react-i18next";
|
|
4
4
|
import { C as a } from "./card-DPmk26CL.js";
|
|
5
5
|
import { B as C } from "./badge-sTusUqZD.js";
|
|
6
|
-
import { B as u } from "./button-
|
|
7
|
-
import { D as d } from "./description-list-
|
|
6
|
+
import { B as u } from "./button-nJaPh_HC.js";
|
|
7
|
+
import { D as d } from "./description-list-CjJqR8WK.js";
|
|
8
8
|
import { u as N } from "./registry-DvAUVLHh.js";
|
|
9
9
|
const w = {
|
|
10
10
|
id: "connection-status",
|
|
@@ -105,4 +105,4 @@ export {
|
|
|
105
105
|
K as C,
|
|
106
106
|
w as c
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=connection-status-
|
|
108
|
+
//# sourceMappingURL=connection-status-DRZIcMqM.js.map
|
package/dist/_chunks/{connection-status-NT8hUtYl.js.map → connection-status-DRZIcMqM.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-status-NT8hUtYl.js","sources":["../../src/components/connection-status/connection-status.agent.ts","../../src/components/connection-status/connection-status.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — ConnectionStatus. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { ConnectionStatusHandle } from './connection-status';\n\nexport const connectionStatusAgent: AgentAdapter<ConnectionStatusHandle> = {\n id: 'connection-status',\n capabilities: ['submit', 'dismiss'],\n state: {\n status: {\n type: 'string',\n descriptionKey: 'ui.agent.connectionStatus.state.status',\n description:\n \"Connection state of the external service: 'connected', 'disconnected', 'pending', or 'error'.\",\n read: (handle) => handle.getStatus(),\n },\n },\n actions: {\n connect: {\n // Reaches an external service (OAuth handoff / server write), so it is\n // both a `write` and `openWorld`.\n safety: 'write',\n openWorld: true,\n descriptionKey: 'ui.agent.connectionStatus.actions.connect',\n description:\n 'Begin connecting the external service — invokes the consumer-supplied onConnect handler.',\n invoke: (handle) => {\n handle.connect();\n },\n },\n disconnect: {\n // Tears down an established external connection — irreversible from the\n // agent's perspective, so `destructive` + `openWorld`.\n safety: 'destructive',\n openWorld: true,\n descriptionKey: 'ui.agent.connectionStatus.actions.disconnect',\n description:\n 'Disconnect the external service — invokes the consumer-supplied onDisconnect handler.',\n invoke: (handle) => {\n handle.disconnect();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'connection-status',\n description: 'Marks the ConnectionStatus wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import { forwardRef, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '../card';\nimport { Badge, type BadgeProps } from '../badge';\nimport { Button } from '../button';\nimport { DescriptionList } from '../description-list';\nimport { useAgentRegistration } from '../../agent';\nimport { connectionStatusAgent } from './connection-status.agent';\n\nexport type ConnectionStatusValue =\n | 'connected'\n | 'disconnected'\n | 'pending'\n | 'error';\n\n/** One read-only account row, shown under a connected service. */\nexport interface ConnectionStatusSummaryRow {\n label: string;\n value: string;\n}\n\n/** Agent-readiness curated handle for ConnectionStatus. */\nexport interface ConnectionStatusHandle {\n getStatus: () => ConnectionStatusValue;\n connect: () => void;\n disconnect: () => void;\n}\n\nexport interface ConnectionStatusProps {\n /** Service name — consumer-domain text (e.g. `\"Stripe\"`). */\n service: string;\n /** External-service connection state. */\n status: ConnectionStatusValue;\n /** Short explanatory line — consumer-domain text. */\n description?: string;\n /**\n * Read-only account rows rendered via the kit DescriptionList. Consumer-domain\n * text. Shown only when `status === 'connected'`.\n */\n summary?: ConnectionStatusSummaryRow[];\n /** Called by the Connect action (disconnected / error states). */\n onConnect?: () => void;\n /** Called by the Disconnect action (connected state). */\n onDisconnect?: () => void;\n /** Disable the connect / disconnect action. */\n disabled?: boolean;\n id?: string;\n className?: string;\n 'aria-label'?: string;\n}\n\n// Status → Badge tone. The status word itself is the Badge label, so the tone\n// is redundant colour reinforcement — the meaning is always conveyed by text\n// (constraint: status must never be communicated by colour alone).\nconst BADGE_TONE: Record<\n ConnectionStatusValue,\n NonNullable<BadgeProps['variant']>\n> = {\n connected: 'success',\n disconnected: 'neutral',\n pending: 'warning',\n error: 'error',\n};\n\n// Status → intrinsic-chrome i18n key for the status word.\nconst STATUS_LABEL_KEY: Record<ConnectionStatusValue, string> = {\n connected: 'connectionStatus.statusConnected',\n disconnected: 'connectionStatus.statusDisconnected',\n pending: 'connectionStatus.statusPending',\n error: 'connectionStatus.statusError',\n};\n\nexport const ConnectionStatus = forwardRef<\n HTMLDivElement,\n ConnectionStatusProps\n>(function ConnectionStatus(\n {\n service,\n status,\n description,\n summary,\n onConnect,\n onDisconnect,\n disabled = false,\n id,\n className,\n 'aria-label': ariaLabel,\n },\n ref,\n) {\n const { t } = useTranslation();\n\n const handle = useMemo<ConnectionStatusHandle>(\n () => ({\n getStatus: () => status,\n connect: () => onConnect?.(),\n disconnect: () => onDisconnect?.(),\n }),\n [status, onConnect, onDisconnect],\n );\n useAgentRegistration(connectionStatusAgent, handle, id);\n\n // Footer action. The visual variant is delegated to Button's CVA (intent);\n // pending shows a disabled affordance carrying the status word.\n const action =\n status === 'pending' ? (\n <Button intent=\"primary\" disabled>\n {t('connectionStatus.statusPending')}\n </Button>\n ) : status === 'connected' ? (\n <Button intent=\"outline\" disabled={disabled} onClick={onDisconnect}>\n {t('connectionStatus.disconnect')}\n </Button>\n ) : (\n <Button intent=\"primary\" disabled={disabled} onClick={onConnect}>\n {t('connectionStatus.connect')}\n </Button>\n );\n\n const showSummary =\n status === 'connected' && Array.isArray(summary) && summary.length > 0;\n\n return (\n <div ref={ref} data-component=\"connection-status\" data-component-id={id}>\n <Card className={className} aria-label={ariaLabel}>\n <Card.Header>\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <span className=\"type-title-card ds:text-foreground\">\n {service}\n </span>\n <Badge variant={BADGE_TONE[status]}>\n {t(STATUS_LABEL_KEY[status])}\n </Badge>\n </div>\n </Card.Header>\n <Card.Body>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {description ? (\n <p className=\"type-body-sm ds:text-muted-foreground\">\n {description}\n </p>\n ) : null}\n {showSummary && summary ? (\n <DescriptionList layout=\"inline\" density=\"compact\">\n {summary.map((row) => (\n <DescriptionList.Row key={row.label}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n ) : null}\n </div>\n </Card.Body>\n <Card.Footer>{action}</Card.Footer>\n </Card>\n </div>\n );\n});\n\nConnectionStatus.displayName = 'ConnectionStatus';\n"],"names":["connectionStatusAgent","handle","BADGE_TONE","STATUS_LABEL_KEY","ConnectionStatus","forwardRef","service","status","description","summary","onConnect","onDisconnect","disabled","id","className","ariaLabel","ref","t","useTranslation","useMemo","useAgentRegistration","action","jsx","Button","showSummary","jsxs","Card","Badge","DescriptionList","row"],"mappings":";;;;;;;;AASO,MAAMA,IAA8D;AAAA,EACzE,IAAI;AAAA,EACJ,cAAc,CAAC,UAAU,SAAS;AAAA,EAClC,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,SAAS;AAAA;AAAA;AAAA,MAGP,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,QAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAEF,YAAY;AAAA;AAAA;AAAA,MAGV,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,QAAQ,CAACA,MAAW;AAClB,QAAAA,EAAO,WAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,E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QAAQE,CAAO,KAAKA,EAAQ,SAAS;AAEvE,SACE,gBAAAa,EAAC,OAAA,EAAI,KAAAN,GAAU,kBAAe,qBAAoB,qBAAmBH,GACnE,UAAA,gBAAAY,EAACC,GAAA,EAAK,WAAAZ,GAAsB,cAAYC,GACtC,UAAA;AAAA,IAAA,gBAAAO,EAACI,EAAK,QAAL,EACC,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,yEACb,UAAA;AAAA,MAAA,gBAAAH,EAAC,QAAA,EAAK,WAAU,sCACb,UAAAhB,GACH;AAAA,MACA,gBAAAgB,EAACK,GAAA,EAAM,SAASzB,EAAWK,CAAM,GAC9B,UAAAU,EAAEd,EAAiBI,CAAM,CAAC,EAAA,CAC7B;AAAA,IAAA,EAAA,CACF,EAAA,CACF;AAAA,sBACCmB,EAAK,MAAL,EACC,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAU,kDACZ,UAAA;AAAA,MAAAjB,IACC,gBAAAc,EAAC,KAAA,EAAE,WAAU,yCACV,aACH,IACE;AAAA,MACHE,KAAef,IACd,gBAAAa,EAACM,GAAA,EAAgB,QAAO,UAAS,SAAQ,WACtC,UAAAnB,EAAQ,IAAI,CAACoB,MACZ,gBAAAJ,EAACG,EAAgB,KAAhB,EACC,UAAA;AAAA,QAAA,gBAAAN,EAACM,EAAgB,MAAhB,EAAsB,UAAAC,EAAI,OAAM;AAAA,QACjC,gBAAAP,EAACM,EAAgB,QAAhB,EAAwB,YAAI,MAAA,CAAM;AAAA,MAAA,EAAA,GAFXC,EAAI,KAG9B,CACD,EAAA,CACH,IACE;AAAA,IAAA,EAAA,CACN,EAAA,CACF;AAAA,IACA,gBAAAP,EAACI,EAAK,QAAL,EAAa,UAAAL,EAAA,CAAO;AAAA,EAAA,EAAA,CACvB,EAAA,CACF;AAEJ,CAAC;AAEDjB,EAAiB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"connection-status-DRZIcMqM.js","sources":["../../src/components/connection-status/connection-status.agent.ts","../../src/components/connection-status/connection-status.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — ConnectionStatus. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { ConnectionStatusHandle } from './connection-status';\n\nexport const connectionStatusAgent: AgentAdapter<ConnectionStatusHandle> = {\n id: 'connection-status',\n capabilities: ['submit', 'dismiss'],\n state: {\n status: {\n type: 'string',\n descriptionKey: 'ui.agent.connectionStatus.state.status',\n description:\n \"Connection state of the external service: 'connected', 'disconnected', 'pending', or 'error'.\",\n read: (handle) => handle.getStatus(),\n },\n },\n actions: {\n connect: {\n // Reaches an external service (OAuth handoff / server write), so it is\n // both a `write` and `openWorld`.\n safety: 'write',\n openWorld: true,\n descriptionKey: 'ui.agent.connectionStatus.actions.connect',\n description:\n 'Begin connecting the external service — invokes the consumer-supplied onConnect handler.',\n invoke: (handle) => {\n handle.connect();\n },\n },\n disconnect: {\n // Tears down an established external connection — irreversible from the\n // agent's perspective, so `destructive` + `openWorld`.\n safety: 'destructive',\n openWorld: true,\n descriptionKey: 'ui.agent.connectionStatus.actions.disconnect',\n description:\n 'Disconnect the external service — invokes the consumer-supplied onDisconnect handler.',\n invoke: (handle) => {\n handle.disconnect();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'connection-status',\n description: 'Marks the ConnectionStatus wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import { forwardRef, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '../card';\nimport { Badge, type BadgeProps } from '../badge';\nimport { Button } from '../button';\nimport { DescriptionList } from '../description-list';\nimport { useAgentRegistration } from '../../agent';\nimport { connectionStatusAgent } from './connection-status.agent';\n\nexport type ConnectionStatusValue =\n | 'connected'\n | 'disconnected'\n | 'pending'\n | 'error';\n\n/** One read-only account row, shown under a connected service. */\nexport interface ConnectionStatusSummaryRow {\n label: string;\n value: string;\n}\n\n/** Agent-readiness curated handle for ConnectionStatus. */\nexport interface ConnectionStatusHandle {\n getStatus: () => ConnectionStatusValue;\n connect: () => void;\n disconnect: () => void;\n}\n\nexport interface ConnectionStatusProps {\n /** Service name — consumer-domain text (e.g. `\"Stripe\"`). */\n service: string;\n /** External-service connection state. */\n status: ConnectionStatusValue;\n /** Short explanatory line — consumer-domain text. */\n description?: string;\n /**\n * Read-only account rows rendered via the kit DescriptionList. Consumer-domain\n * text. Shown only when `status === 'connected'`.\n */\n summary?: ConnectionStatusSummaryRow[];\n /** Called by the Connect action (disconnected / error states). */\n onConnect?: () => void;\n /** Called by the Disconnect action (connected state). */\n onDisconnect?: () => void;\n /** Disable the connect / disconnect action. */\n disabled?: boolean;\n id?: string;\n className?: string;\n 'aria-label'?: string;\n}\n\n// Status → Badge tone. The status word itself is the Badge label, so the tone\n// is redundant colour reinforcement — the meaning is always conveyed by text\n// (constraint: status must never be communicated by colour alone).\nconst BADGE_TONE: Record<\n ConnectionStatusValue,\n NonNullable<BadgeProps['variant']>\n> = {\n connected: 'success',\n disconnected: 'neutral',\n pending: 'warning',\n error: 'error',\n};\n\n// Status → intrinsic-chrome i18n key for the status word.\nconst STATUS_LABEL_KEY: Record<ConnectionStatusValue, string> = {\n connected: 'connectionStatus.statusConnected',\n disconnected: 'connectionStatus.statusDisconnected',\n pending: 'connectionStatus.statusPending',\n error: 'connectionStatus.statusError',\n};\n\nexport const ConnectionStatus = forwardRef<\n HTMLDivElement,\n ConnectionStatusProps\n>(function ConnectionStatus(\n {\n service,\n status,\n description,\n summary,\n onConnect,\n onDisconnect,\n disabled = false,\n id,\n className,\n 'aria-label': ariaLabel,\n },\n ref,\n) {\n const { t } = useTranslation();\n\n const handle = useMemo<ConnectionStatusHandle>(\n () => ({\n getStatus: () => status,\n connect: () => onConnect?.(),\n disconnect: () => onDisconnect?.(),\n }),\n [status, onConnect, onDisconnect],\n );\n useAgentRegistration(connectionStatusAgent, handle, id);\n\n // Footer action. The visual variant is delegated to Button's CVA (intent);\n // pending shows a disabled affordance carrying the status word.\n const action =\n status === 'pending' ? (\n <Button intent=\"primary\" disabled>\n {t('connectionStatus.statusPending')}\n </Button>\n ) : status === 'connected' ? (\n <Button intent=\"outline\" disabled={disabled} onClick={onDisconnect}>\n {t('connectionStatus.disconnect')}\n </Button>\n ) : (\n <Button intent=\"primary\" disabled={disabled} onClick={onConnect}>\n {t('connectionStatus.connect')}\n </Button>\n );\n\n const showSummary =\n status === 'connected' && Array.isArray(summary) && summary.length > 0;\n\n return (\n <div ref={ref} data-component=\"connection-status\" data-component-id={id}>\n <Card className={className} aria-label={ariaLabel}>\n <Card.Header>\n <div className=\"ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <span className=\"type-title-card ds:text-foreground\">\n {service}\n </span>\n <Badge variant={BADGE_TONE[status]}>\n {t(STATUS_LABEL_KEY[status])}\n </Badge>\n </div>\n </Card.Header>\n <Card.Body>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {description ? (\n <p className=\"type-body-sm ds:text-muted-foreground\">\n {description}\n </p>\n ) : null}\n {showSummary && summary ? (\n <DescriptionList layout=\"inline\" density=\"compact\">\n {summary.map((row) => (\n <DescriptionList.Row key={row.label}>\n <DescriptionList.Term>{row.label}</DescriptionList.Term>\n <DescriptionList.Detail>{row.value}</DescriptionList.Detail>\n </DescriptionList.Row>\n ))}\n </DescriptionList>\n ) : null}\n </div>\n </Card.Body>\n <Card.Footer>{action}</Card.Footer>\n </Card>\n </div>\n );\n});\n\nConnectionStatus.displayName = 'ConnectionStatus';\n"],"names":["connectionStatusAgent","handle","BADGE_TONE","STATUS_LABEL_KEY","ConnectionStatus","forwardRef","service","status","description","summary","onConnect","onDisconnect","disabled","id","className","ariaLabel","ref","t","useTranslation","useMemo","useAgentRegistration","action","jsx","Button","showSummary","jsxs","Card","Badge","DescriptionList","row"],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gBAAAc,EAAC,KAAA,EAAE,WAAU,yCACV,aACH,IACE;AAAA,MACHE,KAAef,IACd,gBAAAa,EAACM,GAAA,EAAgB,QAAO,UAAS,SAAQ,WACtC,UAAAnB,EAAQ,IAAI,CAACoB,MACZ,gBAAAJ,EAACG,EAAgB,KAAhB,EACC,UAAA;AAAA,QAAA,gBAAAN,EAACM,EAAgB,MAAhB,EAAsB,UAAAC,EAAI,OAAM;AAAA,QACjC,gBAAAP,EAACM,EAAgB,QAAhB,EAAwB,YAAI,MAAA,CAAM;AAAA,MAAA,EAAA,GAFXC,EAAI,KAG9B,CACD,EAAA,CACH,IACE;AAAA,IAAA,EAAA,CACN,EAAA,CACF;AAAA,IACA,gBAAAP,EAACI,EAAK,QAAL,EAAa,UAAAL,EAAA,CAAO;AAAA,EAAA,EAAA,CACvB,EAAA,CACF;AAEJ,CAAC;AAEDjB,EAAiB,cAAc;"}
|
|
@@ -4,7 +4,7 @@ import { c as de } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as pe } from "react-i18next";
|
|
5
5
|
import { B as F } from "./badge-sTusUqZD.js";
|
|
6
6
|
import { C as T } from "./card-DPmk26CL.js";
|
|
7
|
-
import { K as fe, a as ue } from "./key-value-pair-
|
|
7
|
+
import { K as fe, a as ue } from "./key-value-pair-BubG4fUa.js";
|
|
8
8
|
import { L as d } from "./link-CPb_pZPr.js";
|
|
9
9
|
import { u as me } from "./registry-DvAUVLHh.js";
|
|
10
10
|
import { S as _ } from "./stethoscope-sZXGC43m.js";
|
|
@@ -330,4 +330,4 @@ export {
|
|
|
330
330
|
Me as b,
|
|
331
331
|
ve as c
|
|
332
332
|
};
|
|
333
|
-
//# sourceMappingURL=contact-profile-card-
|
|
333
|
+
//# sourceMappingURL=contact-profile-card-CE9OJKcl.js.map
|
package/dist/_chunks/{contact-profile-card-BxHiG8e6.js.map → contact-profile-card-CE9OJKcl.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-profile-card-BxHiG8e6.js","sources":["../../node_modules/lucide-react/dist/esm/icons/banknote.mjs","../../src/components/contact-profile-card/contact-profile-card.agent.ts","../../src/components/contact-profile-card/contact-profile-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"20\", height: \"12\", x: \"2\", y: \"6\", rx: \"2\", key: \"9lu3g6\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"2\", key: \"1c9p78\" }],\n [\"path\", { d: \"M6 12h.01M18 12h.01\", key: \"113zkx\" }]\n];\nconst Banknote = createLucideIcon(\"banknote\", __iconNode);\n\nexport { __iconNode, Banknote as default };\n//# sourceMappingURL=banknote.mjs.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ContactProfileCardHandle } from './contact-profile-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — ContactProfileCard */\n/* */\n/* Read-only adapter. Surfaces the rendered profession field so an */\n/* agent / MCP runtime can resolve \"what kind of practice is this?\" */\n/* without re-parsing the DOM. No actions yet — the card is a passive */\n/* presentation surface; navigation lives on the consumer's page. */\n/* -------------------------------------------------------------------- */\n\nexport const contactProfileCardAgent: AgentAdapter<ContactProfileCardHandle> = {\n id: 'contact-profile-card',\n // Passive presentation surface — only exposes the rendered profession for\n // introspection. No interactive capability is backed by the handle.\n capabilities: [],\n state: {\n profession: {\n type: 'string',\n descriptionKey: 'ui.agent.contactProfileCard.state.profession',\n description:\n 'Profession string the card is currently rendering — undefined when the consumer omitted it.',\n read: (handle) => handle.getProfession(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'contact-profile-card',\n description: 'Marks the ContactProfileCard root region.',\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 useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Banknote,\n ExternalLink,\n Globe,\n Heart,\n Languages as LanguagesIcon,\n Mail,\n MapPin,\n MessageCircle,\n Phone,\n ShieldCheck,\n Stethoscope,\n type LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { contactProfileCardAgent } from './contact-profile-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* ContactProfileCard */\n/* */\n/* Replaces the bespoke \"Profilo\" / \"Practice info\" cards that every */\n/* AlfaDocs surface composes by hand (booking-website PracticeInfoCard, */\n/* alfascribe operator pages, builders docs example, …). Composes Card */\n/* + KeyValueList + KeyValuePair so the labels share a column (no */\n/* zigzag values) and every row uses the same lucide icon family. */\n/* */\n/* The component is intentionally opinionated: every field is optional, */\n/* but the ORDER, ICONS, and LABELS are owned by the kit. Consumers */\n/* pass the data; the kit owns the visual + i18n. */\n/* */\n/* All visible text flows through `useTranslation('ui')` against the */\n/* `contactProfileCard.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\n// Override the KVP icon colour at the card root so every inner row's\n// leading glyph paints with `--accent` (brand magenta/violet) instead\n// of the default `--muted-foreground`. The ContactProfileCard is a\n// marketing surface — muted icons read as disabled against the\n// otherwise saturated card chrome. Scoped via CSS custom property so\n// only this card's icons shift; standalone KVPs elsewhere keep\n// `--muted-foreground`.\nconst rootVariants = cva(\n 'ds:w-full ds:text-[color:var(--foreground)] ds:[--key-value-pair-icon-color:var(--accent)]',\n {\n variants: {\n // Matches the kit's other `surface` props (Booking, ReviewsPanel).\n // The card itself renders `<Card variant=\"elevated\">` so the\n // `surface=\"flat\"` opt-out is rare — most consumers want the\n // boundary.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface ContactProfileCardAddress {\n /** Display text — already formatted by the consumer (street, postcode, city). */\n line: string;\n /** Optional lat/lng — drives the static-map link + the embedded thumbnail. */\n lat?: number;\n lng?: number;\n}\n\nexport interface ContactProfileCardHandle {\n /** Resolved consumer-supplied data — useful for agent introspection. */\n getProfession: () => string | undefined;\n}\n\nexport interface ContactProfileCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'children'\n> {\n /**\n * Override the localised \"Profilo\" / \"Profile\" heading. Most\n * consumers leave this unset.\n */\n heading?: string;\n /**\n * Free-text intro paragraph rendered above the data rows (e.g.\n * the practice's `bookingDescription` field). When omitted, the\n * card jumps straight into the data rows.\n */\n description?: string;\n\n /* ----- Identity rows ----- */\n\n /** Street + postcode + city, with optional lat/lng for the map link. */\n address?: ContactProfileCardAddress;\n /** Phone number, displayed as-is. Compiled into a `tel:` link. */\n phone?: string;\n /**\n * WhatsApp number — digits only (no `+`, no spaces). Compiled into\n * a `https://wa.me/<number>` link with an optional pre-filled message.\n */\n whatsappNumber?: string;\n /** Optional pre-filled WhatsApp message. Consumer-localised. */\n whatsappMessage?: string;\n /** Public-facing email. Compiled into a `mailto:` link. */\n email?: string;\n /** Practice website (already an absolute URL with protocol). */\n website?: string;\n\n /* ----- Embedded map thumbnail ----- */\n\n /**\n * Google Maps Static API key. When provided alongside `address.lat`\n * and `address.lng`, renders a static-map thumbnail at the top of\n * the card — a single one-shot `<img>` fetch, no JS SDK boot, no\n * consent gate needed (the same pattern PracticeResults uses).\n *\n * Without it (or without coords), the card renders info rows only —\n * the address row's \"Open in Google Maps\" link is still emitted as\n * a real `<a>` so the spatial cue isn't lost.\n *\n * Additive — existing consumers that don't pass this prop see the\n * same render as before.\n */\n googleMapsApiKey?: string;\n /**\n * Zoom level for the embedded map thumbnail. Default `14` —\n * neighbourhood-level, shows the pin in context. Ignored when the\n * thumbnail isn't rendered.\n */\n mapZoom?: number;\n\n /* ----- Profile metadata ----- */\n\n /**\n * ISO 639-1 language codes the practice speaks. Rendered as\n * `<Badge variant=\"neutral\">` chips. Each code is auto-resolved\n * into the active locale's native language name via the kit's\n * built-in `languages.<iso>` i18n bundle (18 ISO codes × 18\n * locales). For example `languages={['it', 'en']}` with\n * `i18n.language === 'it'` renders \"Italiano\" + \"Inglese\".\n *\n * Unknown / unbundled codes fall back to the uppercase ISO code\n * (`'xyz'` → `'XYZ'`). To override a specific label — regional\n * dialect, brand-voice variant, codes the kit doesn't ship — pass\n * `languageLabels`.\n */\n languages?: string[];\n /**\n * Override map from ISO code → display label, applied on top of\n * the kit's i18n auto-resolution. Only set when you need a\n * consumer-specific label for a code — the typical case is\n * regional dialect / brand-voice variants / non-ISO codes.\n *\n * Resolution order: `languageLabels[code]` > `t('languages.<code>')`\n * > `code.toUpperCase()`.\n */\n languageLabels?: Record<string, string>;\n /**\n * Insurance / convention strings (consumer-supplied, free text).\n * Rendered as `<Badge variant=\"info\">` chips.\n */\n insurances?: string[];\n /**\n * First-visit price in the smallest currency unit (cents / centesimi).\n * Formatted via `Intl.NumberFormat`. Omit when the consumer doesn't\n * want to show the price.\n */\n firstVisitPriceCents?: number;\n /** ISO-4217 currency code for the price formatter. Defaults to `EUR`. */\n currencyCode?: string;\n /** Profession line — single value or already-joined comma list. */\n profession?: string;\n /** Show the \"expert for anxious patients\" row when true. */\n specializedInFearPatients?: boolean;\n\n /* ----- Telemetry hooks ----- */\n\n /**\n * Fires when the patient clicks the phone link. The kit emits a\n * `track('practice_profile_card_phone_click')` event before\n * invoking this — gate consumer-side analytics on the same event\n * to avoid duplicate fires.\n */\n onPhoneClick?: () => void;\n /** Fires when the patient clicks the WhatsApp link. */\n onWhatsAppClick?: () => void;\n /** Fires when the patient clicks the static-map link. */\n onMapClick?: () => void;\n /** Fires when the patient clicks the email mailto link. */\n onEmailClick?: () => void;\n\n /* ----- Slots ----- */\n\n /**\n * Rendered above the heading — e.g. a `<Avatar>` for the operator\n * variant, or a coloured chip strip. Optional.\n */\n headerSlot?: ReactNode;\n /**\n * Render an arbitrary map widget at the top of the card chrome —\n * replaces the built-in static `<img>` thumbnail that\n * `googleMapsApiKey` would otherwise produce. Use this when you\n * want an interactive map inside the card boundary instead of a\n * fixed image:\n *\n * <ContactProfileCard\n * mapSlot={\n * <PracticeMap practice={practice} googleMapsApiKey={key} />\n * }\n * …\n * />\n *\n * When both `mapSlot` and `googleMapsApiKey` are provided, the slot\n * wins (explicit > implicit). When neither is provided, no map area\n * renders. The slot is unstyled — pass through any container chrome\n * the consumer wants (e.g. a fixed height wrapper). The kit\n * positions it where the static thumbnail would have lived.\n */\n mapSlot?: ReactNode;\n /**\n * Rendered at the end of the card body, below the rows. Use for\n * a \"Book now\" `<Button>` or a \"View full profile\" link.\n */\n footerSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps the card in `<Card variant=\"elevated\">`\n * for a defined surface — what most consumers want when the card\n * stands alone on a page. `'flat'` drops the Card chrome so the\n * content sits naked — use when an outer card / sheet already\n * provides the boundary (e.g. embedded inside a `<Sheet>` or a\n * parent `<Card.Body>`).\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Strip everything except digits + leading `+` for `tel:` URLs. */\nfunction normalisePhone(raw: string): string {\n return raw.replace(/[^\\d+]/g, '');\n}\n\n/** Build the WhatsApp `wa.me` URL. Number must already be digits-only. */\nfunction buildWhatsAppHref(number: string, message?: string): string {\n const base = `https://wa.me/${number}`;\n if (!message) return base;\n return `${base}?text=${encodeURIComponent(message)}`;\n}\n\n/** Google Maps search query — works without an API key. */\nfunction buildMapHref(address: ContactProfileCardAddress): string {\n const q = encodeURIComponent(address.line);\n return `https://www.google.com/maps/search/?api=1&query=${q}`;\n}\n\n/** Format price (cents → currency string) using the consumer's locale. */\nfunction formatPrice(cents: number, currency: string, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n } catch {\n // Locale or currency code rejected — fall back to a plain decimal.\n return (cents / 100).toFixed(2);\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* MapThumbStrip — embedded Google Static Maps image */\n/* */\n/* Full-width strip rendered at the top of the card when the consumer */\n/* supplies both `address.lat`/`lng` and `googleMapsApiKey`. Same */\n/* one-shot `<img>` strategy as PracticeResults' StaticMapThumb (no JS */\n/* SDK boot → no consent gate needed), but full-card-width instead of */\n/* a 12rem aside. */\n/* -------------------------------------------------------------------- */\n\ninterface MapThumbStripProps {\n apiKey: string;\n center: { lat: number; lng: number };\n zoom: number;\n altText: string;\n}\n\n/**\n * Resolve the kit's `--map-marker-color` token to a six-character hex\n * string (no leading `#`) for Google Static Maps' `markers=color:` URL\n * parameter, which requires a literal hex value at fetch time.\n *\n * SSR-safe: when `document` is undefined we fall back to the kit's\n * brand violet. Same helper as PracticeResults — keep in sync if you\n * touch one.\n */\nfunction getStaticMapMarkerHex(): string {\n if (typeof document === 'undefined') return '4945a3';\n const raw = getComputedStyle(document.documentElement)\n .getPropertyValue('--map-marker-color')\n .trim();\n const match = /^#?([0-9a-fA-F]{6})$/.exec(raw);\n return match ? match[1] : '4945a3';\n}\n\nfunction MapThumbStrip({ apiKey, center, zoom, altText }: MapThumbStripProps) {\n // 640×192 keeps the asset under Google's 1MP free tier at scale=2\n // (1280×384 actual) and matches the strip's 12rem height at a\n // ~3.33:1 aspect ratio. Marker colour resolves from the kit's\n // `--map-marker-color` token at runtime so the value still lives\n // in `src/tokens/**` per the closed-palette constraint.\n const markerHex = getStaticMapMarkerHex();\n const src =\n `https://maps.googleapis.com/maps/api/staticmap` +\n `?center=${center.lat},${center.lng}` +\n `&zoom=${zoom}` +\n `&size=640x192&scale=2` +\n `&markers=color:0x${markerHex}%7C${center.lat},${center.lng}` +\n `&key=${encodeURIComponent(apiKey)}`;\n return (\n <img\n src={src}\n alt={altText}\n loading=\"lazy\"\n decoding=\"async\"\n width={640}\n height={192}\n className=\"ds:block ds:inline-size-full ds:block-size-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]\"\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const ContactProfileCard = forwardRef<\n HTMLDivElement,\n ContactProfileCardProps\n>(\n (\n {\n heading,\n description,\n address,\n phone,\n whatsappNumber,\n whatsappMessage,\n email,\n website,\n languages,\n languageLabels,\n insurances,\n firstVisitPriceCents,\n currencyCode = 'EUR',\n profession,\n specializedInFearPatients,\n googleMapsApiKey,\n mapZoom = 14,\n onPhoneClick,\n onWhatsAppClick,\n onMapClick,\n onEmailClick,\n headerSlot,\n footerSlot,\n mapSlot,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const locale = i18n.language ?? 'en';\n\n const resolvedHeading = heading ?? t('contactProfileCard.heading');\n const resolvedAriaLabel = ariaLabel ?? resolvedHeading;\n\n const formattedPrice = useMemo(() => {\n if (firstVisitPriceCents == null) return undefined;\n return formatPrice(firstVisitPriceCents, currencyCode, locale);\n }, [firstVisitPriceCents, currencyCode, locale]);\n\n // Compose the rows in display order. Each `row` carries the icon +\n // localised label + the rendered value. Skipping a field is just\n // omitting the row — `KeyValueList` collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactElement;\n label: string;\n value: ReactNode;\n }> = [];\n\n if (address) {\n rows.push({\n key: 'address',\n icon: <MapPin aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.address'),\n value: (\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span>{address.line}</span>\n {address.lat != null && address.lng != null ? (\n <Link\n href={buildMapHref(address)}\n external\n intent=\"default\"\n onClick={onMapClick}\n >\n {t('contactProfileCard.openInGoogleMaps')}\n </Link>\n ) : null}\n </span>\n ),\n });\n }\n\n if (phone) {\n rows.push({\n key: 'phone',\n icon: <Phone aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.phone'),\n value: (\n <Link\n href={`tel:${normalisePhone(phone)}`}\n intent=\"default\"\n onClick={onPhoneClick}\n >\n {phone}\n </Link>\n ),\n });\n }\n\n if (whatsappNumber) {\n rows.push({\n key: 'whatsapp',\n icon: <MessageCircle aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.whatsapp'),\n value: (\n <Link\n href={buildWhatsAppHref(whatsappNumber, whatsappMessage)}\n external\n intent=\"default\"\n onClick={onWhatsAppClick}\n >\n {whatsappNumber}\n </Link>\n ),\n });\n }\n\n if (email) {\n rows.push({\n key: 'email',\n icon: <Mail aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.email'),\n value: (\n <Link\n href={`mailto:${email}`}\n intent=\"default\"\n onClick={onEmailClick}\n >\n {email}\n </Link>\n ),\n });\n }\n\n if (website) {\n rows.push({\n key: 'website',\n icon: <Globe aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.website'),\n value: (\n <Link href={website} external intent=\"default\">\n {website}\n </Link>\n ),\n });\n }\n\n if (languages && languages.length > 0) {\n // Resolution order, highest to lowest:\n // 1. consumer `languageLabels` override — for regional dialects,\n // brand-voice variants, or codes the kit doesn't ship.\n // 2. kit i18n bundle (`languages.<iso>`) — auto-resolves the 18\n // ISO codes the kit ships into the active locale's native\n // language name. Retires consumer-side ISO→label plumbing.\n // 3. uppercase fallback for unknown codes that the consumer\n // didn't override.\n const resolveLabel = (code: string): string => {\n if (languageLabels?.[code]) return languageLabels[code];\n const key = `languages.${code}`;\n if (i18n.exists(key)) return t(key);\n return code.toUpperCase();\n };\n rows.push({\n key: 'languages',\n icon: <LanguagesIcon aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.languages'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {languages.map((code) => (\n <Badge key={code} variant=\"neutral\">\n {resolveLabel(code)}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (insurances && insurances.length > 0) {\n rows.push({\n key: 'insurances',\n icon: <ShieldCheck aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.insurances'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {insurances.map((ins) => (\n <Badge key={ins} variant=\"info\">\n {ins}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (formattedPrice) {\n rows.push({\n key: 'firstVisitPrice',\n icon: <Banknote aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.firstVisitPrice'),\n value: formattedPrice,\n });\n }\n\n if (specializedInFearPatients) {\n rows.push({\n key: 'expertForAnxiousPatients',\n icon: <Heart aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.expertForAnxiousPatients'),\n value: t('contactProfileCard.value.yesShort'),\n });\n }\n\n if (profession) {\n rows.push({\n key: 'profession',\n icon: <Stethoscope aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.profession'),\n value: profession,\n });\n }\n\n // Imperative handle for agent integrations.\n useAgentRegistration(\n contactProfileCardAgent,\n { getProfession: () => profession },\n id,\n );\n\n // Embedded static-map thumbnail. Renders only when the consumer\n // supplies BOTH a usable lat/lng pair AND a `googleMapsApiKey`.\n // The d.ts-promised behaviour; without a key the strip is silently\n // omitted and the address row's \"Open in Google Maps\" link still\n // emits as the spatial-cue fallback.\n const showMapThumb =\n !!googleMapsApiKey &&\n address?.lat !== undefined &&\n address?.lng !== undefined;\n const mapThumb = showMapThumb ? (\n <MapThumbStrip\n apiKey={googleMapsApiKey!}\n center={{ lat: address!.lat!, lng: address!.lng! }}\n zoom={mapZoom}\n altText={t('contactProfileCard.map.alt', {\n address: address!.line,\n defaultValue: 'Map showing {{address}}',\n })}\n />\n ) : null;\n\n // Map area: explicit consumer slot wins over the implicit\n // googleMapsApiKey-driven static thumbnail. 0.33.4 introduces the\n // slot so consumers can embed an interactive <MapView> /\n // <PracticeMap> wrapper inside the card chrome instead of the\n // fixed static <img>. When neither is set the area renders as\n // nothing. 0.33.6 moves the area from above the heading to below\n // the data rows — the map reads as the spatial closer (\"here it\n // is on the map\") rather than a stylised hero, and any CTA in\n // footerSlot still lands at the very bottom.\n const mapArea = mapSlot ?? mapThumb;\n\n const body = (\n <>\n {description ? (\n <p className=\"type-body-sm ds:m-0 ds:whitespace-pre-line\">\n {description}\n </p>\n ) : null}\n {rows.length > 0 ? (\n <KeyValueList rowGap=\"md\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n ) : null}\n {mapArea}\n {footerSlot}\n </>\n );\n\n // `surface=\"flat\"` skips the Card wrapper — the consumer is\n // already inside a Card / Sheet and doesn't want a double border.\n const inner = (\n <>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {headerSlot}\n <h2\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedHeading}\n </h2>\n </div>\n {body}\n </>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"contact-profile-card\"\n data-component-id={id}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </Card.Body>\n </Card>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nContactProfileCard.displayName = 'ContactProfileCard';\n\n// Helper export so consumers can mirror the kit's row order if they\n// need to compose a partial alternative (rare).\nexport const CONTACT_PROFILE_CARD_ROW_KEYS = [\n 'address',\n 'phone',\n 'whatsapp',\n 'email',\n 'website',\n 'languages',\n 'insurances',\n 'firstVisitPrice',\n 'expertForAnxiousPatients',\n 'profession',\n] as const;\n\n// Defensive icon export so consumers can render the same glyph\n// outside the card if they need it for consistency.\nexport const CONTACT_PROFILE_CARD_ROW_ICONS: Record<\n (typeof CONTACT_PROFILE_CARD_ROW_KEYS)[number],\n LucideIcon\n> = {\n address: MapPin,\n phone: Phone,\n whatsapp: MessageCircle,\n email: Mail,\n website: Globe,\n languages: LanguagesIcon,\n insurances: ShieldCheck,\n firstVisitPrice: Banknote,\n expertForAnxiousPatients: Heart,\n profession: Stethoscope,\n};\n\n// Re-exports of the rootVariants type for downstream typing.\nexport type ContactProfileCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n\n// ExternalLink is exported by lucide-react and used elsewhere in the\n// kit; re-exporting here so consumers don't have to add it as a\n// peer-dep import for icon parity in their own UIs.\nexport { ExternalLink };\n"],"names":["__iconNode","Banknote","createLucideIcon","contactProfileCardAgent","handle","rootVariants","cva","normalisePhone","raw","buildWhatsAppHref","number","message","base","buildMapHref","address","formatPrice","cents","currency","locale","getStaticMapMarkerHex","match","MapThumbStrip","apiKey","center","zoom","altText","markerHex","src","jsx","ContactProfileCard","forwardRef","heading","description","phone","whatsappNumber","whatsappMessage","email","website","languages","languageLabels","insurances","firstVisitPriceCents","currencyCode","profession","specializedInFearPatients","googleMapsApiKey","mapZoom","onPhoneClick","onWhatsAppClick","onMapClick","onEmailClick","headerSlot","footerSlot","mapSlot","surface","ariaLabel","id","className","rest","ref","t","i18n","useTranslation","headingId","useId","resolvedHeading","resolvedAriaLabel","formattedPrice","useMemo","rows","MapPin","jsxs","Link","Phone","MessageCircle","Mail","Globe","resolveLabel","code","key","LanguagesIcon","Badge","ShieldCheck","ins","Heart","Stethoscope","useAgentRegistration","mapThumb","mapArea","body","Fragment","KeyValueList","row","KeyValuePair","inner","Card","CONTACT_PROFILE_CARD_ROW_KEYS","CONTACT_PROFILE_CARD_ROW_ICONS"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9E,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,uBAAuB,KAAK,SAAQ,CAAE;AACtD,GACMC,IAAWC,GAAiB,YAAYF,EAAU,GCF3CG,KAAkE;AAAA,EAC7E,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,cAAA;AAAA,IAAc;AAAA,EACzC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCoBMC,KAAeC;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,MAKR,SAAS;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,IAEF,iBAAiB,EAAE,SAAS,WAAA;AAAA,EAAW;AAE3C;AAmMA,SAASC,GAAeC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AAA,EACP,SAASC;AAAA,EACT,WAAWI;AAAAA,EACX,YAAYE;AAAA,EACZ,iBAAiBjF;AAAA,EACjB,0BAA0BmF;AAAA,EAC1B,YAAYC;AACd;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"contact-profile-card-CE9OJKcl.js","sources":["../../node_modules/lucide-react/dist/esm/icons/banknote.mjs","../../src/components/contact-profile-card/contact-profile-card.agent.ts","../../src/components/contact-profile-card/contact-profile-card.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { width: \"20\", height: \"12\", x: \"2\", y: \"6\", rx: \"2\", key: \"9lu3g6\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"2\", key: \"1c9p78\" }],\n [\"path\", { d: \"M6 12h.01M18 12h.01\", key: \"113zkx\" }]\n];\nconst Banknote = createLucideIcon(\"banknote\", __iconNode);\n\nexport { __iconNode, Banknote as default };\n//# sourceMappingURL=banknote.mjs.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ContactProfileCardHandle } from './contact-profile-card';\n\n/* -------------------------------------------------------------------- */\n/* Agent adapter — ContactProfileCard */\n/* */\n/* Read-only adapter. Surfaces the rendered profession field so an */\n/* agent / MCP runtime can resolve \"what kind of practice is this?\" */\n/* without re-parsing the DOM. No actions yet — the card is a passive */\n/* presentation surface; navigation lives on the consumer's page. */\n/* -------------------------------------------------------------------- */\n\nexport const contactProfileCardAgent: AgentAdapter<ContactProfileCardHandle> = {\n id: 'contact-profile-card',\n // Passive presentation surface — only exposes the rendered profession for\n // introspection. No interactive capability is backed by the handle.\n capabilities: [],\n state: {\n profession: {\n type: 'string',\n descriptionKey: 'ui.agent.contactProfileCard.state.profession',\n description:\n 'Profession string the card is currently rendering — undefined when the consumer omitted it.',\n read: (handle) => handle.getProfession(),\n },\n },\n actions: {},\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'contact-profile-card',\n description: 'Marks the ContactProfileCard root region.',\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 useId,\n useMemo,\n type ComponentPropsWithoutRef,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport {\n Banknote,\n ExternalLink,\n Globe,\n Heart,\n Languages as LanguagesIcon,\n Mail,\n MapPin,\n MessageCircle,\n Phone,\n ShieldCheck,\n Stethoscope,\n type LucideIcon,\n} from 'lucide-react';\nimport { Badge } from '../badge/badge';\nimport { Card } from '../card/card';\nimport { KeyValueList, KeyValuePair } from '../key-value-pair/key-value-pair';\nimport { Link } from '../link/link';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { contactProfileCardAgent } from './contact-profile-card.agent';\n\n/* -------------------------------------------------------------------- */\n/* ContactProfileCard */\n/* */\n/* Replaces the bespoke \"Profilo\" / \"Practice info\" cards that every */\n/* AlfaDocs surface composes by hand (booking-website PracticeInfoCard, */\n/* alfascribe operator pages, builders docs example, …). Composes Card */\n/* + KeyValueList + KeyValuePair so the labels share a column (no */\n/* zigzag values) and every row uses the same lucide icon family. */\n/* */\n/* The component is intentionally opinionated: every field is optional, */\n/* but the ORDER, ICONS, and LABELS are owned by the kit. Consumers */\n/* pass the data; the kit owns the visual + i18n. */\n/* */\n/* All visible text flows through `useTranslation('ui')` against the */\n/* `contactProfileCard.*` namespace. */\n/* -------------------------------------------------------------------- */\n\n/* -------------------------------------------------------------------- */\n/* CVA */\n/* -------------------------------------------------------------------- */\n\n// Override the KVP icon colour at the card root so every inner row's\n// leading glyph paints with `--accent` (brand magenta/violet) instead\n// of the default `--muted-foreground`. The ContactProfileCard is a\n// marketing surface — muted icons read as disabled against the\n// otherwise saturated card chrome. Scoped via CSS custom property so\n// only this card's icons shift; standalone KVPs elsewhere keep\n// `--muted-foreground`.\nconst rootVariants = cva(\n 'ds:w-full ds:text-[color:var(--foreground)] ds:[--key-value-pair-icon-color:var(--accent)]',\n {\n variants: {\n // Matches the kit's other `surface` props (Booking, ReviewsPanel).\n // The card itself renders `<Card variant=\"elevated\">` so the\n // `surface=\"flat\"` opt-out is rare — most consumers want the\n // boundary.\n surface: {\n flat: '',\n elevated: '',\n },\n },\n defaultVariants: { surface: 'elevated' },\n },\n);\n\n/* -------------------------------------------------------------------- */\n/* Public types */\n/* -------------------------------------------------------------------- */\n\nexport interface ContactProfileCardAddress {\n /** Display text — already formatted by the consumer (street, postcode, city). */\n line: string;\n /** Optional lat/lng — drives the static-map link + the embedded thumbnail. */\n lat?: number;\n lng?: number;\n}\n\nexport interface ContactProfileCardHandle {\n /** Resolved consumer-supplied data — useful for agent introspection. */\n getProfession: () => string | undefined;\n}\n\nexport interface ContactProfileCardProps extends Omit<\n ComponentPropsWithoutRef<'div'>,\n 'aria-label' | 'children' | 'children'\n> {\n /**\n * Override the localised \"Profilo\" / \"Profile\" heading. Most\n * consumers leave this unset.\n */\n heading?: string;\n /**\n * Free-text intro paragraph rendered above the data rows (e.g.\n * the practice's `bookingDescription` field). When omitted, the\n * card jumps straight into the data rows.\n */\n description?: string;\n\n /* ----- Identity rows ----- */\n\n /** Street + postcode + city, with optional lat/lng for the map link. */\n address?: ContactProfileCardAddress;\n /** Phone number, displayed as-is. Compiled into a `tel:` link. */\n phone?: string;\n /**\n * WhatsApp number — digits only (no `+`, no spaces). Compiled into\n * a `https://wa.me/<number>` link with an optional pre-filled message.\n */\n whatsappNumber?: string;\n /** Optional pre-filled WhatsApp message. Consumer-localised. */\n whatsappMessage?: string;\n /** Public-facing email. Compiled into a `mailto:` link. */\n email?: string;\n /** Practice website (already an absolute URL with protocol). */\n website?: string;\n\n /* ----- Embedded map thumbnail ----- */\n\n /**\n * Google Maps Static API key. When provided alongside `address.lat`\n * and `address.lng`, renders a static-map thumbnail at the top of\n * the card — a single one-shot `<img>` fetch, no JS SDK boot, no\n * consent gate needed (the same pattern PracticeResults uses).\n *\n * Without it (or without coords), the card renders info rows only —\n * the address row's \"Open in Google Maps\" link is still emitted as\n * a real `<a>` so the spatial cue isn't lost.\n *\n * Additive — existing consumers that don't pass this prop see the\n * same render as before.\n */\n googleMapsApiKey?: string;\n /**\n * Zoom level for the embedded map thumbnail. Default `14` —\n * neighbourhood-level, shows the pin in context. Ignored when the\n * thumbnail isn't rendered.\n */\n mapZoom?: number;\n\n /* ----- Profile metadata ----- */\n\n /**\n * ISO 639-1 language codes the practice speaks. Rendered as\n * `<Badge variant=\"neutral\">` chips. Each code is auto-resolved\n * into the active locale's native language name via the kit's\n * built-in `languages.<iso>` i18n bundle (18 ISO codes × 18\n * locales). For example `languages={['it', 'en']}` with\n * `i18n.language === 'it'` renders \"Italiano\" + \"Inglese\".\n *\n * Unknown / unbundled codes fall back to the uppercase ISO code\n * (`'xyz'` → `'XYZ'`). To override a specific label — regional\n * dialect, brand-voice variant, codes the kit doesn't ship — pass\n * `languageLabels`.\n */\n languages?: string[];\n /**\n * Override map from ISO code → display label, applied on top of\n * the kit's i18n auto-resolution. Only set when you need a\n * consumer-specific label for a code — the typical case is\n * regional dialect / brand-voice variants / non-ISO codes.\n *\n * Resolution order: `languageLabels[code]` > `t('languages.<code>')`\n * > `code.toUpperCase()`.\n */\n languageLabels?: Record<string, string>;\n /**\n * Insurance / convention strings (consumer-supplied, free text).\n * Rendered as `<Badge variant=\"info\">` chips.\n */\n insurances?: string[];\n /**\n * First-visit price in the smallest currency unit (cents / centesimi).\n * Formatted via `Intl.NumberFormat`. Omit when the consumer doesn't\n * want to show the price.\n */\n firstVisitPriceCents?: number;\n /** ISO-4217 currency code for the price formatter. Defaults to `EUR`. */\n currencyCode?: string;\n /** Profession line — single value or already-joined comma list. */\n profession?: string;\n /** Show the \"expert for anxious patients\" row when true. */\n specializedInFearPatients?: boolean;\n\n /* ----- Telemetry hooks ----- */\n\n /**\n * Fires when the patient clicks the phone link. The kit emits a\n * `track('practice_profile_card_phone_click')` event before\n * invoking this — gate consumer-side analytics on the same event\n * to avoid duplicate fires.\n */\n onPhoneClick?: () => void;\n /** Fires when the patient clicks the WhatsApp link. */\n onWhatsAppClick?: () => void;\n /** Fires when the patient clicks the static-map link. */\n onMapClick?: () => void;\n /** Fires when the patient clicks the email mailto link. */\n onEmailClick?: () => void;\n\n /* ----- Slots ----- */\n\n /**\n * Rendered above the heading — e.g. a `<Avatar>` for the operator\n * variant, or a coloured chip strip. Optional.\n */\n headerSlot?: ReactNode;\n /**\n * Render an arbitrary map widget at the top of the card chrome —\n * replaces the built-in static `<img>` thumbnail that\n * `googleMapsApiKey` would otherwise produce. Use this when you\n * want an interactive map inside the card boundary instead of a\n * fixed image:\n *\n * <ContactProfileCard\n * mapSlot={\n * <PracticeMap practice={practice} googleMapsApiKey={key} />\n * }\n * …\n * />\n *\n * When both `mapSlot` and `googleMapsApiKey` are provided, the slot\n * wins (explicit > implicit). When neither is provided, no map area\n * renders. The slot is unstyled — pass through any container chrome\n * the consumer wants (e.g. a fixed height wrapper). The kit\n * positions it where the static thumbnail would have lived.\n */\n mapSlot?: ReactNode;\n /**\n * Rendered at the end of the card body, below the rows. Use for\n * a \"Book now\" `<Button>` or a \"View full profile\" link.\n */\n footerSlot?: ReactNode;\n\n /* ----- Styling ----- */\n\n /**\n * `'elevated'` (default) wraps the card in `<Card variant=\"elevated\">`\n * for a defined surface — what most consumers want when the card\n * stands alone on a page. `'flat'` drops the Card chrome so the\n * content sits naked — use when an outer card / sheet already\n * provides the boundary (e.g. embedded inside a `<Sheet>` or a\n * parent `<Card.Body>`).\n */\n surface?: 'flat' | 'elevated';\n\n /* ----- a11y ----- */\n\n /** Override the default region aria-label. */\n 'aria-label'?: string;\n /** Agent-readiness consumer id, surfaced as `data-component-id`. */\n id?: string;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\n/** Strip everything except digits + leading `+` for `tel:` URLs. */\nfunction normalisePhone(raw: string): string {\n return raw.replace(/[^\\d+]/g, '');\n}\n\n/** Build the WhatsApp `wa.me` URL. Number must already be digits-only. */\nfunction buildWhatsAppHref(number: string, message?: string): string {\n const base = `https://wa.me/${number}`;\n if (!message) return base;\n return `${base}?text=${encodeURIComponent(message)}`;\n}\n\n/** Google Maps search query — works without an API key. */\nfunction buildMapHref(address: ContactProfileCardAddress): string {\n const q = encodeURIComponent(address.line);\n return `https://www.google.com/maps/search/?api=1&query=${q}`;\n}\n\n/** Format price (cents → currency string) using the consumer's locale. */\nfunction formatPrice(cents: number, currency: string, locale: string): string {\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n }).format(cents / 100);\n } catch {\n // Locale or currency code rejected — fall back to a plain decimal.\n return (cents / 100).toFixed(2);\n }\n}\n\n/* -------------------------------------------------------------------- */\n/* MapThumbStrip — embedded Google Static Maps image */\n/* */\n/* Full-width strip rendered at the top of the card when the consumer */\n/* supplies both `address.lat`/`lng` and `googleMapsApiKey`. Same */\n/* one-shot `<img>` strategy as PracticeResults' StaticMapThumb (no JS */\n/* SDK boot → no consent gate needed), but full-card-width instead of */\n/* a 12rem aside. */\n/* -------------------------------------------------------------------- */\n\ninterface MapThumbStripProps {\n apiKey: string;\n center: { lat: number; lng: number };\n zoom: number;\n altText: string;\n}\n\n/**\n * Resolve the kit's `--map-marker-color` token to a six-character hex\n * string (no leading `#`) for Google Static Maps' `markers=color:` URL\n * parameter, which requires a literal hex value at fetch time.\n *\n * SSR-safe: when `document` is undefined we fall back to the kit's\n * brand violet. Same helper as PracticeResults — keep in sync if you\n * touch one.\n */\nfunction getStaticMapMarkerHex(): string {\n if (typeof document === 'undefined') return '4945a3';\n const raw = getComputedStyle(document.documentElement)\n .getPropertyValue('--map-marker-color')\n .trim();\n const match = /^#?([0-9a-fA-F]{6})$/.exec(raw);\n return match ? match[1] : '4945a3';\n}\n\nfunction MapThumbStrip({ apiKey, center, zoom, altText }: MapThumbStripProps) {\n // 640×192 keeps the asset under Google's 1MP free tier at scale=2\n // (1280×384 actual) and matches the strip's 12rem height at a\n // ~3.33:1 aspect ratio. Marker colour resolves from the kit's\n // `--map-marker-color` token at runtime so the value still lives\n // in `src/tokens/**` per the closed-palette constraint.\n const markerHex = getStaticMapMarkerHex();\n const src =\n `https://maps.googleapis.com/maps/api/staticmap` +\n `?center=${center.lat},${center.lng}` +\n `&zoom=${zoom}` +\n `&size=640x192&scale=2` +\n `&markers=color:0x${markerHex}%7C${center.lat},${center.lng}` +\n `&key=${encodeURIComponent(apiKey)}`;\n return (\n <img\n src={src}\n alt={altText}\n loading=\"lazy\"\n decoding=\"async\"\n width={640}\n height={192}\n className=\"ds:block ds:inline-size-full ds:block-size-[12rem] ds:[object-fit:cover] ds:rounded-[var(--radius-md)]\"\n />\n );\n}\n\n/* -------------------------------------------------------------------- */\n/* Component */\n/* -------------------------------------------------------------------- */\n\nexport const ContactProfileCard = forwardRef<\n HTMLDivElement,\n ContactProfileCardProps\n>(\n (\n {\n heading,\n description,\n address,\n phone,\n whatsappNumber,\n whatsappMessage,\n email,\n website,\n languages,\n languageLabels,\n insurances,\n firstVisitPriceCents,\n currencyCode = 'EUR',\n profession,\n specializedInFearPatients,\n googleMapsApiKey,\n mapZoom = 14,\n onPhoneClick,\n onWhatsAppClick,\n onMapClick,\n onEmailClick,\n headerSlot,\n footerSlot,\n mapSlot,\n surface = 'elevated',\n 'aria-label': ariaLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const headingId = useId();\n const locale = i18n.language ?? 'en';\n\n const resolvedHeading = heading ?? t('contactProfileCard.heading');\n const resolvedAriaLabel = ariaLabel ?? resolvedHeading;\n\n const formattedPrice = useMemo(() => {\n if (firstVisitPriceCents == null) return undefined;\n return formatPrice(firstVisitPriceCents, currencyCode, locale);\n }, [firstVisitPriceCents, currencyCode, locale]);\n\n // Compose the rows in display order. Each `row` carries the icon +\n // localised label + the rendered value. Skipping a field is just\n // omitting the row — `KeyValueList` collapses the subgrid cleanly.\n const rows: Array<{\n key: string;\n icon: ReactElement;\n label: string;\n value: ReactNode;\n }> = [];\n\n if (address) {\n rows.push({\n key: 'address',\n icon: <MapPin aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.address'),\n value: (\n <span className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span>{address.line}</span>\n {address.lat != null && address.lng != null ? (\n <Link\n href={buildMapHref(address)}\n external\n intent=\"default\"\n onClick={onMapClick}\n >\n {t('contactProfileCard.openInGoogleMaps')}\n </Link>\n ) : null}\n </span>\n ),\n });\n }\n\n if (phone) {\n rows.push({\n key: 'phone',\n icon: <Phone aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.phone'),\n value: (\n <Link\n href={`tel:${normalisePhone(phone)}`}\n intent=\"default\"\n onClick={onPhoneClick}\n >\n {phone}\n </Link>\n ),\n });\n }\n\n if (whatsappNumber) {\n rows.push({\n key: 'whatsapp',\n icon: <MessageCircle aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.whatsapp'),\n value: (\n <Link\n href={buildWhatsAppHref(whatsappNumber, whatsappMessage)}\n external\n intent=\"default\"\n onClick={onWhatsAppClick}\n >\n {whatsappNumber}\n </Link>\n ),\n });\n }\n\n if (email) {\n rows.push({\n key: 'email',\n icon: <Mail aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.email'),\n value: (\n <Link\n href={`mailto:${email}`}\n intent=\"default\"\n onClick={onEmailClick}\n >\n {email}\n </Link>\n ),\n });\n }\n\n if (website) {\n rows.push({\n key: 'website',\n icon: <Globe aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.website'),\n value: (\n <Link href={website} external intent=\"default\">\n {website}\n </Link>\n ),\n });\n }\n\n if (languages && languages.length > 0) {\n // Resolution order, highest to lowest:\n // 1. consumer `languageLabels` override — for regional dialects,\n // brand-voice variants, or codes the kit doesn't ship.\n // 2. kit i18n bundle (`languages.<iso>`) — auto-resolves the 18\n // ISO codes the kit ships into the active locale's native\n // language name. Retires consumer-side ISO→label plumbing.\n // 3. uppercase fallback for unknown codes that the consumer\n // didn't override.\n const resolveLabel = (code: string): string => {\n if (languageLabels?.[code]) return languageLabels[code];\n const key = `languages.${code}`;\n if (i18n.exists(key)) return t(key);\n return code.toUpperCase();\n };\n rows.push({\n key: 'languages',\n icon: <LanguagesIcon aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.languages'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {languages.map((code) => (\n <Badge key={code} variant=\"neutral\">\n {resolveLabel(code)}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (insurances && insurances.length > 0) {\n rows.push({\n key: 'insurances',\n icon: <ShieldCheck aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.insurances'),\n value: (\n <span className=\"ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]\">\n {insurances.map((ins) => (\n <Badge key={ins} variant=\"info\">\n {ins}\n </Badge>\n ))}\n </span>\n ),\n });\n }\n\n if (formattedPrice) {\n rows.push({\n key: 'firstVisitPrice',\n icon: <Banknote aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.firstVisitPrice'),\n value: formattedPrice,\n });\n }\n\n if (specializedInFearPatients) {\n rows.push({\n key: 'expertForAnxiousPatients',\n icon: <Heart aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.expertForAnxiousPatients'),\n value: t('contactProfileCard.value.yesShort'),\n });\n }\n\n if (profession) {\n rows.push({\n key: 'profession',\n icon: <Stethoscope aria-hidden=\"true\" />,\n label: t('contactProfileCard.label.profession'),\n value: profession,\n });\n }\n\n // Imperative handle for agent integrations.\n useAgentRegistration(\n contactProfileCardAgent,\n { getProfession: () => profession },\n id,\n );\n\n // Embedded static-map thumbnail. Renders only when the consumer\n // supplies BOTH a usable lat/lng pair AND a `googleMapsApiKey`.\n // The d.ts-promised behaviour; without a key the strip is silently\n // omitted and the address row's \"Open in Google Maps\" link still\n // emits as the spatial-cue fallback.\n const showMapThumb =\n !!googleMapsApiKey &&\n address?.lat !== undefined &&\n address?.lng !== undefined;\n const mapThumb = showMapThumb ? (\n <MapThumbStrip\n apiKey={googleMapsApiKey!}\n center={{ lat: address!.lat!, lng: address!.lng! }}\n zoom={mapZoom}\n altText={t('contactProfileCard.map.alt', {\n address: address!.line,\n defaultValue: 'Map showing {{address}}',\n })}\n />\n ) : null;\n\n // Map area: explicit consumer slot wins over the implicit\n // googleMapsApiKey-driven static thumbnail. 0.33.4 introduces the\n // slot so consumers can embed an interactive <MapView> /\n // <PracticeMap> wrapper inside the card chrome instead of the\n // fixed static <img>. When neither is set the area renders as\n // nothing. 0.33.6 moves the area from above the heading to below\n // the data rows — the map reads as the spatial closer (\"here it\n // is on the map\") rather than a stylised hero, and any CTA in\n // footerSlot still lands at the very bottom.\n const mapArea = mapSlot ?? mapThumb;\n\n const body = (\n <>\n {description ? (\n <p className=\"type-body-sm ds:m-0 ds:whitespace-pre-line\">\n {description}\n </p>\n ) : null}\n {rows.length > 0 ? (\n <KeyValueList rowGap=\"md\">\n {rows.map((row) => (\n <KeyValuePair\n key={row.key}\n icon={row.icon}\n label={row.label}\n value={row.value}\n />\n ))}\n </KeyValueList>\n ) : null}\n {mapArea}\n {footerSlot}\n </>\n );\n\n // `surface=\"flat\"` skips the Card wrapper — the consumer is\n // already inside a Card / Sheet and doesn't want a double border.\n const inner = (\n <>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {headerSlot}\n <h2\n id={headingId}\n className=\"type-title-card ds:m-0 ds:text-[color:var(--foreground)]\"\n >\n {resolvedHeading}\n </h2>\n </div>\n {body}\n </>\n );\n\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={resolvedAriaLabel}\n aria-labelledby={headingId}\n data-component=\"contact-profile-card\"\n data-component-id={id}\n id={id}\n className={rootVariants({ surface, className })}\n {...rest}\n >\n {surface === 'elevated' ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </Card.Body>\n </Card>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {inner}\n </div>\n )}\n </div>\n );\n },\n);\n\nContactProfileCard.displayName = 'ContactProfileCard';\n\n// Helper export so consumers can mirror the kit's row order if they\n// need to compose a partial alternative (rare).\nexport const CONTACT_PROFILE_CARD_ROW_KEYS = [\n 'address',\n 'phone',\n 'whatsapp',\n 'email',\n 'website',\n 'languages',\n 'insurances',\n 'firstVisitPrice',\n 'expertForAnxiousPatients',\n 'profession',\n] as const;\n\n// Defensive icon export so consumers can render the same glyph\n// outside the card if they need it for consistency.\nexport const CONTACT_PROFILE_CARD_ROW_ICONS: Record<\n (typeof CONTACT_PROFILE_CARD_ROW_KEYS)[number],\n LucideIcon\n> = {\n address: MapPin,\n phone: Phone,\n whatsapp: MessageCircle,\n email: Mail,\n website: Globe,\n languages: LanguagesIcon,\n insurances: ShieldCheck,\n firstVisitPrice: Banknote,\n expertForAnxiousPatients: Heart,\n profession: Stethoscope,\n};\n\n// Re-exports of the rootVariants type for downstream typing.\nexport type ContactProfileCardSurface = NonNullable<\n VariantProps<typeof rootVariants>['surface']\n>;\n\n// ExternalLink is exported by lucide-react and used elsewhere in the\n// kit; re-exporting here so consumers don't have to add it as a\n// peer-dep import for icon parity in their own UIs.\nexport { ExternalLink };\n"],"names":["__iconNode","Banknote","createLucideIcon","contactProfileCardAgent","handle","rootVariants","cva","normalisePhone","raw","buildWhatsAppHref","number","message","base","buildMapHref","address","formatPrice","cents","currency","locale","getStaticMapMarkerHex","match","MapThumbStrip","apiKey","center","zoom","altText","markerHex","src","jsx","ContactProfileCard","forwardRef","heading","description","phone","whatsappNumber","whatsappMessage","email","website","languages","languageLabels","insurances","firstVisitPriceCents","currencyCode","profession","specializedInFearPatients","googleMapsApiKey","mapZoom","onPhoneClick","onWhatsAppClick","onMapClick","onEmailClick","headerSlot","footerSlot","mapSlot","surface","ariaLabel","id","className","rest","ref","t","i18n","useTranslation","headingId","useId","resolvedHeading","resolvedAriaLabel","formattedPrice","useMemo","rows","MapPin","jsxs","Link","Phone","MessageCircle","Mail","Globe","resolveLabel","code","key","LanguagesIcon","Badge","ShieldCheck","ins","Heart","Stethoscope","useAgentRegistration","mapThumb","mapArea","body","Fragment","KeyValueList","row","KeyValuePair","inner","Card","CONTACT_PROFILE_CARD_ROW_KEYS","CONTACT_PROFILE_CARD_ROW_ICONS"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,OAAO,MAAM,QAAQ,MAAM,GAAG,KAAK,GAAG,KAAK,IAAI,KAAK,KAAK,SAAQ,CAAE;AAAA,EAC9E,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,uBAAuB,KAAK,SAAQ,CAAE;AACtD,GACMC,IAAWC,GAAiB,YAAYF,EAAU,GCF3CG,KAAkE;AAAA,EAC7E,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAA;AAAA,EACd,OAAO;AAAA,IACL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,cAAA;AAAA,IAAc;AAAA,EACzC;AAAA,EAEF,SAAS,CAAA;AAAA,EACT,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,aAAa;AAAA,IAAA;AAAA,IAEf,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ,GCoBMC,KAAeC;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA;AAAA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AA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAIaC,KAGT;AAAA,EACF,SAAS3B;AAAA,EACT,OAAOG;AAAA,EACP,UAAUC;AAAA,EACV,OAAOC;AAAA,EACP,SAASC;AAAA,EACT,WAAWI;AAAAA,EACX,YAAYE;AAAA,EACZ,iBAAiBjF;AAAA,EACjB,0BAA0BmF;AAAA,EAC1B,YAAYC;AACd;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as g, jsxs as I, Fragment as ro } from "react/jsx-runtime";
|
|
2
2
|
import { useState as z, useCallback as f, useMemo as C, useRef as N, useContext as j, useId as so, useEffect as lo, createContext as io, forwardRef as ao } from "react";
|
|
3
3
|
import { useTranslation as co } from "react-i18next";
|
|
4
|
-
import { I as X } from "./icon-button-
|
|
4
|
+
import { I as X } from "./icon-button-DA2CAGHZ.js";
|
|
5
5
|
import { a as uo } from "./panel-header-D313n_9-.js";
|
|
6
|
-
import { T as po } from "./tool-rail-
|
|
6
|
+
import { T as po } from "./tool-rail-CHyUmulN.js";
|
|
7
7
|
import { u as fo } from "./use-persistent-state-nZwZAnE9.js";
|
|
8
8
|
import { S as mo } from "./star-Bf9L2Uot.js";
|
|
9
9
|
import { X as Ro } from "./x-B5YnXwCz.js";
|
|
@@ -330,4 +330,4 @@ export {
|
|
|
330
330
|
Vo as d,
|
|
331
331
|
jo as u
|
|
332
332
|
};
|
|
333
|
-
//# sourceMappingURL=control-room-rail-
|
|
333
|
+
//# sourceMappingURL=control-room-rail-IH1eBjrK.js.map
|