@alfadocs/ui-kit-debug 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{actions-cell-renderer-BD-jruqA.js → actions-cell-renderer-ALEAGO3j.js} +6 -6
- package/dist/_chunks/{actions-cell-renderer-BD-jruqA.js.map → actions-cell-renderer-ALEAGO3j.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-CYR-znfE.js → agenda-tray-BweO8pDo.js} +3 -3
- package/dist/_chunks/{agenda-tray-CYR-znfE.js.map → agenda-tray-BweO8pDo.js.map} +1 -1
- package/dist/_chunks/{ai-consent-banner-DLF6FNXv.js → ai-consent-banner-OggpS5hW.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-DLF6FNXv.js.map → ai-consent-banner-OggpS5hW.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-BgAubYKd.js → ai-prompt-input-DnbfEJnr.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-BgAubYKd.js.map → ai-prompt-input-DnbfEJnr.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-Bg53-ZOT.js → alia-sidebar-BWcWZivN.js} +7 -7
- package/dist/_chunks/{alia-sidebar-Bg53-ZOT.js.map → alia-sidebar-BWcWZivN.js.map} +1 -1
- package/dist/_chunks/{anamnesis-card-BylMLHYj.js → anamnesis-card-NTi4LLzI.js} +2 -2
- package/dist/_chunks/{anamnesis-card-BylMLHYj.js.map → anamnesis-card-NTi4LLzI.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BpYztFUv.js → anamnesis-summary-rows-F-cCmFAn.js} +7 -7
- package/dist/_chunks/{anamnesis-summary-rows-BpYztFUv.js.map → anamnesis-summary-rows-F-cCmFAn.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DT1uFp8z.js → appointment-timeline-CMPvzlGZ.js} +4 -4
- package/dist/_chunks/{appointment-timeline-DT1uFp8z.js.map → appointment-timeline-CMPvzlGZ.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-DvyVK7um.js → appointment-tray-3c_FLxXJ.js} +3 -3
- package/dist/_chunks/{appointment-tray-DvyVK7um.js.map → appointment-tray-3c_FLxXJ.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-nVRN4PSK.js → audio-recorder-EWBCNIsd.js} +3 -3
- package/dist/_chunks/{audio-recorder-nVRN4PSK.js.map → audio-recorder-EWBCNIsd.js.map} +1 -1
- package/dist/_chunks/{bishop-score-BV1JAEMV.js → bishop-score-Cnu0xs-z.js} +2 -2
- package/dist/_chunks/{bishop-score-BV1JAEMV.js.map → bishop-score-Cnu0xs-z.js.map} +1 -1
- package/dist/_chunks/{bmi-calculator-CdR-RLFj.js → bmi-calculator-CcH6upht.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CdR-RLFj.js.map → bmi-calculator-CcH6upht.js.map} +1 -1
- package/dist/_chunks/{booking-D84O6H2X.js → booking-CQMJUFG-.js} +5 -5
- package/dist/_chunks/{booking-D84O6H2X.js.map → booking-CQMJUFG-.js.map} +1 -1
- package/dist/_chunks/{button-group-Be_In68J.js → button-group-CaxRJsNG.js} +2 -2
- package/dist/_chunks/{button-group-Be_In68J.js.map → button-group-CaxRJsNG.js.map} +1 -1
- package/dist/_chunks/{button-BvNtqHAS.js → button-nJaPh_HC.js} +68 -38
- package/dist/_chunks/button-nJaPh_HC.js.map +1 -0
- package/dist/_chunks/{care-plan-card-CehAU7F_.js → care-plan-card-DQjVRDxO.js} +2 -2
- package/dist/_chunks/{care-plan-card-CehAU7F_.js.map → care-plan-card-DQjVRDxO.js.map} +1 -1
- package/dist/_chunks/{care-plan-entry-card-ChWRMfMw.js → care-plan-entry-card-CMpoeNkb.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-ChWRMfMw.js.map → care-plan-entry-card-CMpoeNkb.js.map} +1 -1
- package/dist/_chunks/{care-plan-header-_B0TTWT1.js → care-plan-header-CxYoq23f.js} +2 -2
- package/dist/_chunks/{care-plan-header-_B0TTWT1.js.map → care-plan-header-CxYoq23f.js.map} +1 -1
- package/dist/_chunks/{carousel.agent-pjORsMS8.js → carousel.agent-CLxdHEBP.js} +2 -2
- package/dist/_chunks/{carousel.agent-pjORsMS8.js.map → carousel.agent-CLxdHEBP.js.map} +1 -1
- package/dist/_chunks/{chart-Y-gso_Uz.js → chart-Bkr1Sh4o.js} +3 -3
- package/dist/_chunks/{chart-Y-gso_Uz.js.map → chart-Bkr1Sh4o.js.map} +1 -1
- package/dist/_chunks/{chat-input-BqI9GXQh.js → chat-input-BsB5Umpj.js} +2 -2
- package/dist/_chunks/{chat-input-BqI9GXQh.js.map → chat-input-BsB5Umpj.js.map} +1 -1
- package/dist/_chunks/{chat-message-DHNUbjXA.js → chat-message-DBQu10rs.js} +3 -3
- package/dist/_chunks/{chat-message-DHNUbjXA.js.map → chat-message-DBQu10rs.js.map} +1 -1
- package/dist/_chunks/{code-block-BONe9fJi.js → code-block-BIkpRLkl.js} +2 -2
- package/dist/_chunks/{code-block-BONe9fJi.js.map → code-block-BIkpRLkl.js.map} +1 -1
- package/dist/_chunks/{connection-status-NT8hUtYl.js → connection-status-DRZIcMqM.js} +3 -3
- package/dist/_chunks/{connection-status-NT8hUtYl.js.map → connection-status-DRZIcMqM.js.map} +1 -1
- package/dist/_chunks/{contact-profile-card-BxHiG8e6.js → contact-profile-card-CE9OJKcl.js} +2 -2
- package/dist/_chunks/{contact-profile-card-BxHiG8e6.js.map → contact-profile-card-CE9OJKcl.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-DDyPDBji.js → control-room-rail-IH1eBjrK.js} +3 -3
- package/dist/_chunks/{control-room-rail-DDyPDBji.js.map → control-room-rail-IH1eBjrK.js.map} +1 -1
- package/dist/_chunks/{copy-field-B-DoMBH_.js → copy-field-fYKpl6aN.js} +2 -2
- package/dist/_chunks/{copy-field-B-DoMBH_.js.map → copy-field-fYKpl6aN.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-DJZYvNhw.js → cycle-calculator-DzgO1vzP.js} +2 -2
- package/dist/_chunks/{cycle-calculator-DJZYvNhw.js.map → cycle-calculator-DzgO1vzP.js.map} +1 -1
- package/dist/_chunks/{dashboard-grid-bd0QW2a8.js → dashboard-grid-BFtdHqfn.js} +2 -2
- package/dist/_chunks/{dashboard-grid-bd0QW2a8.js.map → dashboard-grid-BFtdHqfn.js.map} +1 -1
- package/dist/_chunks/{data-table-tabs-C8uDThT3.js → data-table-tabs-C1kRUzat.js} +3 -3
- package/dist/_chunks/{data-table-tabs-C8uDThT3.js.map → data-table-tabs-C1kRUzat.js.map} +1 -1
- package/dist/_chunks/{description-list-Ck7fKdt5.js → description-list-CjJqR8WK.js} +2 -2
- package/dist/_chunks/{description-list-Ck7fKdt5.js.map → description-list-CjJqR8WK.js.map} +1 -1
- package/dist/_chunks/{document-preview-Aae2yKvY.js → document-preview-oyx9RhCo.js} +2 -2
- package/dist/_chunks/{document-preview-Aae2yKvY.js.map → document-preview-oyx9RhCo.js.map} +1 -1
- package/dist/_chunks/{document-scanner-qNZLhH_r.js → document-scanner-C5Vrbu21.js} +2 -2
- package/dist/_chunks/{document-scanner-qNZLhH_r.js.map → document-scanner-C5Vrbu21.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-ajaQ4ya5.js → due-date-calculator-wK8Tajzz.js} +2 -2
- package/dist/_chunks/{due-date-calculator-ajaQ4ya5.js.map → due-date-calculator-wK8Tajzz.js.map} +1 -1
- package/dist/_chunks/{editable-currency-cell-renderer-DyMbSyDK.js → editable-currency-cell-renderer-DYdzKpjL.js} +3 -3
- package/dist/_chunks/{editable-currency-cell-renderer-DyMbSyDK.js.map → editable-currency-cell-renderer-DYdzKpjL.js.map} +1 -1
- package/dist/_chunks/{editor-overlay-DE-gxj9L.js → editor-overlay-DEc5yYwo.js} +2 -2
- package/dist/_chunks/{editor-overlay-DE-gxj9L.js.map → editor-overlay-DEc5yYwo.js.map} +1 -1
- package/dist/_chunks/{empty-state-Df0tM6Kn.js → empty-state-X0sVPfVo.js} +2 -2
- package/dist/_chunks/{empty-state-Df0tM6Kn.js.map → empty-state-X0sVPfVo.js.map} +1 -1
- package/dist/_chunks/{entity-summary-DBOI5di6.js → entity-summary-B_vO5Ur4.js} +3 -3
- package/dist/_chunks/{entity-summary-DBOI5di6.js.map → entity-summary-B_vO5Ur4.js.map} +1 -1
- package/dist/_chunks/{face-scheme-D7Pub04e.js → face-scheme-BfDi4YkW.js} +5 -5
- package/dist/_chunks/{face-scheme-D7Pub04e.js.map → face-scheme-BfDi4YkW.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-jon6GIfQ.js → fetal-weight-Dqy0T1fP.js} +2 -2
- package/dist/_chunks/{fetal-weight-jon6GIfQ.js.map → fetal-weight-Dqy0T1fP.js.map} +1 -1
- package/dist/_chunks/{field-array-BQFX5OYi.js → field-array-BjkXZzSr.js} +3 -3
- package/dist/_chunks/{field-array-BQFX5OYi.js.map → field-array-BjkXZzSr.js.map} +1 -1
- package/dist/_chunks/{field-value-BbiDRyNh.js → field-value-DG8zaZvo.js} +4 -4
- package/dist/_chunks/{field-value-BbiDRyNh.js.map → field-value-DG8zaZvo.js.map} +1 -1
- package/dist/_chunks/{file-manager-CML_C6_h.js → file-manager-Cc_upjZX.js} +6 -6
- package/dist/_chunks/{file-manager-CML_C6_h.js.map → file-manager-Cc_upjZX.js.map} +1 -1
- package/dist/_chunks/{finished-terminal-BWNVh7Y8.js → finished-terminal-Br61Ip4e.js} +2 -2
- package/dist/_chunks/{finished-terminal-BWNVh7Y8.js.map → finished-terminal-Br61Ip4e.js.map} +1 -1
- package/dist/_chunks/{fiscal-code-input-Nx1N9r72.js → fiscal-code-input-B_nYMSEM.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-Nx1N9r72.js.map → fiscal-code-input-B_nYMSEM.js.map} +1 -1
- package/dist/_chunks/{freemium-paywall-HG3pFvMp.js → freemium-paywall-DrXzYfv-.js} +2 -2
- package/dist/_chunks/{freemium-paywall-HG3pFvMp.js.map → freemium-paywall-DrXzYfv-.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-dEpQDWcb.js → gestational-age-calculator-C_uDAeP_.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-dEpQDWcb.js.map → gestational-age-calculator-C_uDAeP_.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-CC6TLtHd.js → hcg-doubling-BaXkJhT-.js} +2 -2
- package/dist/_chunks/{hcg-doubling-CC6TLtHd.js.map → hcg-doubling-BaXkJhT-.js.map} +1 -1
- package/dist/_chunks/{header-CimZS-J9.js → header-DUXRIPyM.js} +2 -2
- package/dist/_chunks/{header-CimZS-J9.js.map → header-DUXRIPyM.js.map} +1 -1
- package/dist/_chunks/{header-settings-C0zHLXJE.js → header-settings-CVC_davE.js} +4 -4
- package/dist/_chunks/{header-settings-C0zHLXJE.js.map → header-settings-CVC_davE.js.map} +1 -1
- package/dist/_chunks/{icon-button-9c9Gp41m.js → icon-button-DA2CAGHZ.js} +2 -2
- package/dist/_chunks/{icon-button-9c9Gp41m.js.map → icon-button-DA2CAGHZ.js.map} +1 -1
- package/dist/_chunks/{icon-button-group-DrvuWPGJ.js → icon-button-group-D6SVMteH.js} +2 -2
- package/dist/_chunks/{icon-button-group-DrvuWPGJ.js.map → icon-button-group-D6SVMteH.js.map} +1 -1
- package/dist/_chunks/{icon-picker-DXV3sDp1.js → icon-picker-ChzpCnZ-.js} +3 -3
- package/dist/_chunks/{icon-picker-DXV3sDp1.js.map → icon-picker-ChzpCnZ-.js.map} +1 -1
- package/dist/_chunks/{image-cropper-DWSnyLwW.js → image-cropper-C84NDTB7.js} +2 -2
- package/dist/_chunks/{image-cropper-DWSnyLwW.js.map → image-cropper-C84NDTB7.js.map} +1 -1
- package/dist/_chunks/{info-tip-C4mPSJbS.js → info-tip-C119cwQl.js} +2 -2
- package/dist/_chunks/{info-tip-C4mPSJbS.js.map → info-tip-C119cwQl.js.map} +1 -1
- package/dist/_chunks/{insert-result-98J1QEp7.js → insert-result-LCNTskNJ.js} +2 -2
- package/dist/_chunks/{insert-result-98J1QEp7.js.map → insert-result-LCNTskNJ.js.map} +1 -1
- package/dist/_chunks/{key-value-pair-DGkGlgCF.js → key-value-pair-BubG4fUa.js} +2 -2
- package/dist/_chunks/{key-value-pair-DGkGlgCF.js.map → key-value-pair-BubG4fUa.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-D3IsW_2R.js → link-cell-renderer-DH4JYpKU.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-D3IsW_2R.js.map → link-cell-renderer-DH4JYpKU.js.map} +1 -1
- package/dist/_chunks/{locale-picker-sI0HWgZy.js → locale-picker-BvbVjDQ-.js} +3 -3
- package/dist/_chunks/{locale-picker-sI0HWgZy.js.map → locale-picker-BvbVjDQ-.js.map} +1 -1
- package/dist/_chunks/{map-view-iwSDRW3t.js → map-view-CCAlC9IL.js} +2 -2
- package/dist/_chunks/{map-view-iwSDRW3t.js.map → map-view-CCAlC9IL.js.map} +1 -1
- package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js → marketplace-app-shell-Chfdia7m.js} +4 -4
- package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js.map → marketplace-app-shell-Chfdia7m.js.map} +1 -1
- package/dist/_chunks/{message-card-BCJ-Jgs6.js → message-card-D8GB4FdF.js} +3 -3
- package/dist/_chunks/{message-card-BCJ-Jgs6.js.map → message-card-D8GB4FdF.js.map} +1 -1
- package/dist/_chunks/{message-tray-DHtm_WaF.js → message-tray-CGIRQjx5.js} +4 -4
- package/dist/_chunks/{message-tray-DHtm_WaF.js.map → message-tray-CGIRQjx5.js.map} +1 -1
- package/dist/_chunks/{notes-panel-D6HKLLS-.js → notes-panel-DlnENphf.js} +3 -3
- package/dist/_chunks/{notes-panel-D6HKLLS-.js.map → notes-panel-DlnENphf.js.map} +1 -1
- package/dist/_chunks/{notification-card-CcMQn2RX.js → notification-card-CtrzoTUO.js} +3 -3
- package/dist/_chunks/{notification-card-CcMQn2RX.js.map → notification-card-CtrzoTUO.js.map} +1 -1
- package/dist/_chunks/{notification-tray-nr7dv-Q8.js → notification-tray-BiRzXHDf.js} +4 -4
- package/dist/_chunks/{notification-tray-nr7dv-Q8.js.map → notification-tray-BiRzXHDf.js.map} +1 -1
- package/dist/_chunks/{optical-prescription-DtzEqFQm.js → optical-prescription-Dj3Eh5Ok.js} +2 -2
- package/dist/_chunks/{optical-prescription-DtzEqFQm.js.map → optical-prescription-Dj3Eh5Ok.js.map} +1 -1
- package/dist/_chunks/{patient-details-rENrE_qY.js → patient-details-qnsqYBGQ.js} +5 -5
- package/dist/_chunks/{patient-details-rENrE_qY.js.map → patient-details-qnsqYBGQ.js.map} +1 -1
- package/dist/_chunks/{patient-search-NQemeJlL.js → patient-search-D5ufYoRc.js} +2 -2
- package/dist/_chunks/{patient-search-NQemeJlL.js.map → patient-search-D5ufYoRc.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DQJgOOrA.js → patient-summary-card-CBfuDvJ5.js} +3 -3
- package/dist/_chunks/{patient-summary-card-DQJgOOrA.js.map → patient-summary-card-CBfuDvJ5.js.map} +1 -1
- package/dist/_chunks/{patient-table-BubxfOWL.js → patient-table-DwshfVsQ.js} +3 -3
- package/dist/_chunks/{patient-table-BubxfOWL.js.map → patient-table-DwshfVsQ.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-CnaBPt5e.js → payment-automation-upsell-BBIG7NFL.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-CnaBPt5e.js.map → payment-automation-upsell-BBIG7NFL.js.map} +1 -1
- package/dist/_chunks/{payment-request-card-CvhDzDNk.js → payment-request-card-BjjBMdsp.js} +3 -3
- package/dist/_chunks/{payment-request-card-CvhDzDNk.js.map → payment-request-card-BjjBMdsp.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-C0nNQKKK.js → periodontal-chart-BatZEFar.js} +2 -2
- package/dist/_chunks/{periodontal-chart-C0nNQKKK.js.map → periodontal-chart-BatZEFar.js.map} +1 -1
- package/dist/_chunks/{periodontal-chart-card-Bz-ebteE.js → periodontal-chart-card-BBpY_rBc.js} +2 -2
- package/dist/_chunks/{periodontal-chart-card-Bz-ebteE.js.map → periodontal-chart-card-BBpY_rBc.js.map} +1 -1
- package/dist/_chunks/{popover-Btj6N25H.js → popover-Cqcjx-Ny.js} +2 -2
- package/dist/_chunks/{popover-Btj6N25H.js.map → popover-Cqcjx-Ny.js.map} +1 -1
- package/dist/_chunks/{practice-results-CKoLD_x5.js → practice-results-BEsAdW-B.js} +719 -633
- package/dist/_chunks/practice-results-BEsAdW-B.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-DQVpFs_f.js → pregnancy-dating-BVS_9YU2.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-DQVpFs_f.js.map → pregnancy-dating-BVS_9YU2.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-hm3QJALe.js → pregnancy-weight-gain-CJwbs9W-.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-hm3QJALe.js.map → pregnancy-weight-gain-CJwbs9W-.js.map} +1 -1
- package/dist/_chunks/{privacy-lock-SQYFRSuH.js → privacy-lock-CkAUo6Dz.js} +3 -3
- package/dist/_chunks/{privacy-lock-SQYFRSuH.js.map → privacy-lock-CkAUo6Dz.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BjnD9pdl.js → product-hub-panel-BScCotGD.js} +3 -3
- package/dist/_chunks/{product-hub-panel-BjnD9pdl.js.map → product-hub-panel-BScCotGD.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-DseNK2NQ.js → public-header.agent-kth2SdXn.js} +3 -3
- package/dist/_chunks/{public-header.agent-DseNK2NQ.js.map → public-header.agent-kth2SdXn.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-CAXFgCyn.js → radiograph-panel.agent-CiHwgISa.js} +4 -4
- package/dist/_chunks/{radiograph-panel.agent-CAXFgCyn.js.map → radiograph-panel.agent-CiHwgISa.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-Cd3SxJdW.js → reviews-panel-BKHEfqVQ.js} +4 -4
- package/dist/_chunks/{reviews-panel-Cd3SxJdW.js.map → reviews-panel-BKHEfqVQ.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-DGtn_4sb.js → rich-text-editor-DARnq_6N.js} +5 -5
- package/dist/_chunks/{rich-text-editor-DGtn_4sb.js.map → rich-text-editor-DARnq_6N.js.map} +1 -1
- package/dist/_chunks/{session-countdown-q4r5TlCo.js → session-countdown-QMsnRa1x.js} +2 -2
- package/dist/_chunks/{session-countdown-q4r5TlCo.js.map → session-countdown-QMsnRa1x.js.map} +1 -1
- package/dist/_chunks/{sheet-CD99CdXr.js → sheet-BSznOyJs.js} +2 -2
- package/dist/_chunks/{sheet-CD99CdXr.js.map → sheet-BSznOyJs.js.map} +1 -1
- package/dist/_chunks/{sign-in-with-alfadocs-button-_JxVRO5d.js → sign-in-with-alfadocs-button-BLe_quy5.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-_JxVRO5d.js.map → sign-in-with-alfadocs-button-BLe_quy5.js.map} +1 -1
- package/dist/_chunks/{signature-request-C4UBfVRZ.js → signature-request-DXhpphlp.js} +4 -4
- package/dist/_chunks/{signature-request-C4UBfVRZ.js.map → signature-request-DXhpphlp.js.map} +1 -1
- package/dist/_chunks/{slot-grid-P_e9p5t5.js → slot-grid-BuZOKfcd.js} +4 -4
- package/dist/_chunks/{slot-grid-P_e9p5t5.js.map → slot-grid-BuZOKfcd.js.map} +1 -1
- package/dist/_chunks/{streaming-text-BuW7I0Zu.js → streaming-text-CvsjIQ7S.js} +2 -2
- package/dist/_chunks/{streaming-text-BuW7I0Zu.js.map → streaming-text-CvsjIQ7S.js.map} +1 -1
- package/dist/_chunks/{task-tray-BT288xoM.js → task-tray-CYG6rj2s.js} +3 -3
- package/dist/_chunks/{task-tray-BT288xoM.js.map → task-tray-CYG6rj2s.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-BBkZuejF.js → tasks-panel-Do5SFp-j.js} +5 -5
- package/dist/_chunks/{tasks-panel-BBkZuejF.js.map → tasks-panel-Do5SFp-j.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-Bi-CmV6M.js → theme-toggle-DuMhQNFS.js} +3 -3
- package/dist/_chunks/{theme-toggle-Bi-CmV6M.js.map → theme-toggle-DuMhQNFS.js.map} +1 -1
- package/dist/_chunks/{toast.agent-C44mtGrW.js → toast.agent-D1tdg6DS.js} +2 -2
- package/dist/_chunks/{toast.agent-C44mtGrW.js.map → toast.agent-D1tdg6DS.js.map} +1 -1
- package/dist/_chunks/{token-insert-menu-D8FgXl33.js → token-insert-menu-9Um0JinI.js} +2 -2
- package/dist/_chunks/{token-insert-menu-D8FgXl33.js.map → token-insert-menu-9Um0JinI.js.map} +1 -1
- package/dist/_chunks/{tool-rail-BF3F2Ihq.js → tool-rail-CHyUmulN.js} +2 -2
- package/dist/_chunks/{tool-rail-BF3F2Ihq.js.map → tool-rail-CHyUmulN.js.map} +1 -1
- package/dist/_chunks/{tooth-scheme-BPXE1_3N.js → tooth-scheme-WdyVymQ1.js} +3 -3
- package/dist/_chunks/{tooth-scheme-BPXE1_3N.js.map → tooth-scheme-WdyVymQ1.js.map} +1 -1
- package/dist/_chunks/{unit-converter-iDxlxKmm.js → unit-converter-BPumXMA6.js} +2 -2
- package/dist/_chunks/{unit-converter-iDxlxKmm.js.map → unit-converter-BPumXMA6.js.map} +1 -1
- package/dist/_chunks/{warning-stack-nczJf52p.js → warning-stack-DQz0Jyir.js} +3 -3
- package/dist/_chunks/{warning-stack-nczJf52p.js.map → warning-stack-DQz0Jyir.js.map} +1 -1
- package/dist/_chunks/{workflow-map-BVofnDYh.js → workflow-map-DE_ribRM.js} +5 -5
- package/dist/_chunks/{workflow-map-BVofnDYh.js.map → workflow-map-DE_ribRM.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/button.d.ts +10 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/connection-status/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/copy-field/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/editor-overlay/index.js +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/field-array/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/finished-terminal/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/image-cropper/index.js +1 -1
- package/dist/components/info-tip/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/matrix-rain/matrix-rain.d.ts +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/periodontal-chart/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +47 -7
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/session-countdown/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/token-insert-menu/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +2 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +2 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +2 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +2 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +2 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +2 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +2 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +2 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +2 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +2 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +2 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +2 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +2 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +2 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +2 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +2 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +2 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +2 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +96 -96
- package/dist/locales/ar.json +2 -1
- package/dist/locales/de.json +2 -1
- package/dist/locales/el.json +2 -1
- package/dist/locales/en.json +2 -1
- package/dist/locales/es.json +2 -1
- package/dist/locales/fr.json +2 -1
- package/dist/locales/hi.json +2 -1
- package/dist/locales/it.json +2 -1
- package/dist/locales/ja.json +2 -1
- package/dist/locales/nl.json +2 -1
- package/dist/locales/pl.json +2 -1
- package/dist/locales/pt.json +2 -1
- package/dist/locales/ro.json +2 -1
- package/dist/locales/ru.json +2 -1
- package/dist/locales/sq.json +2 -1
- package/dist/locales/sv.json +2 -1
- package/dist/locales/tr.json +2 -1
- package/dist/locales/zh.json +2 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/button-BvNtqHAS.js.map +0 -1
- package/dist/_chunks/practice-results-CKoLD_x5.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale-picker-sI0HWgZy.js","sources":["../../src/components/flag/flag-core.ts","../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["import { createElement, forwardRef } from 'react';\nimport {\n FlagView,\n flagClasses,\n safeFlagGlob,\n type FlagAssetMap,\n} from './flag-view';\nimport type { FlagProps } from './flag';\n\n/* ------------------------------------------------------------------ */\n/* CoreFlag — the locale-chrome flag binding. */\n/* */\n/* Identical component to `Flag` (same props, same FlagView, same DOM, */\n/* same synchronous paint) bound to a SUBSET of the asset set: only the */\n/* countries the kit's own locale chrome can ever ask for. */\n/* */\n/* Why it exists: LocalePicker ships inside HeaderSettings, which ships */\n/* inside MarketplaceAppShell, which is on every route of every */\n/* consumer — including login screens. Importing `Flag` there pulled */\n/* all 530 inlined SVGs (485,552 B of chunk) onto pages that offer a */\n/* three-item language menu. This binding pulls 36 (29,183 B). */\n/* */\n/* The glob pattern below MUST list every `LOCALE_META[…].countryCode`. */\n/* `flag.test.tsx` asserts that (it fails if a locale is added to */\n/* `src/i18n/locale-meta.ts` without its flag), so the two can't drift. */\n/* */\n/* Both patterns are spelled out as string literals (rather than built */\n/* from a shared constant) because `import.meta.glob` is a build macro: */\n/* Vite reads the pattern off the AST, so it must be a literal — an */\n/* interpolated template silently matches nothing. */\n/* ------------------------------------------------------------------ */\n\nconst CORE_RECTANGLE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/3x2/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\nconst CORE_SQUARE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/1x1/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\n/** Country codes bundled with `CoreFlag`. Subset of `FLAG_COUNTRIES`. */\nexport const CORE_FLAG_COUNTRIES: readonly string[] = Object.freeze(\n Object.keys(CORE_RECTANGLE_URL_MAP).sort(),\n);\n\n/** Does `CoreFlag` bundle an asset for this country code? Case-insensitive. */\nexport function hasCoreFlag(country: string): boolean {\n return country.toUpperCase() in CORE_RECTANGLE_URL_MAP;\n}\n\n/**\n * `Flag` restricted to the kit's own locale set. Internal — not exported\n * from `index.ts` or the root barrel. Renders `FlagView` with no JSX so\n * this file stays a `.ts` module alongside the glob it owns.\n */\nexport const CoreFlag = forwardRef<HTMLElement, FlagProps>(\n (\n {\n country,\n label,\n shape = 'rectangle',\n size = 'sm',\n rounded = 'sm',\n className,\n ...rest\n },\n ref,\n ) => {\n const code = country.toUpperCase();\n const urlMap =\n shape === 'square' ? CORE_SQUARE_URL_MAP : CORE_RECTANGLE_URL_MAP;\n\n return createElement(FlagView, {\n ref,\n code,\n src: urlMap[code],\n label,\n className: flagClasses({ shape, size, rounded }, className),\n ...rest,\n });\n },\n);\n\nCoreFlag.displayName = 'CoreFlag';\n","/* -------------------------------------------------------------------- */\n/* Locale metadata registry. */\n/* */\n/* Single source of truth for human-facing locale information — native */\n/* name, English name, flag emoji, and writing direction. Consumed by */\n/* LocalePicker / HeaderSettings to render the language switcher. */\n/* */\n/* Keys must match `LOCALES_WITH_BUNDLES` from `./resources` 1:1; the */\n/* `locale-meta.test.ts` parity check fails the build if a code is */\n/* added to one and not the other. */\n/* */\n/* Flag emojis use the Regional Indicator pair convention — a few of */\n/* the codes are language tags rather than country tags (en, ar, hi); */\n/* the flag chosen is the \"default-region\" the kit ships marketing */\n/* surfaces in. Consumers that need a different region flag (e.g. */\n/* British vs. American English) can override via `LOCALE_META[code]`. */\n/* -------------------------------------------------------------------- */\n\nimport { LOCALES_WITH_BUNDLES } from './resources';\n\n/** Reading direction. Mirrors the shape of `hooks/use-locale.ts#LocaleDir`. */\nexport type LocaleDir = 'ltr' | 'rtl';\n\n/** IETF locale tag from the kit's bundled set. */\nexport type Locale = (typeof LOCALES_WITH_BUNDLES)[number];\n\nexport interface LocaleMetaEntry {\n /** IETF locale tag (matches the key in `LOCALES_WITH_BUNDLES`). */\n code: Locale;\n /** Endonym — the locale's name in its own language (\"Italiano\", \"العربية\"). */\n nativeName: string;\n /** Exonym — the locale's name in English (\"Italian\", \"Arabic\"). */\n englishName: string;\n /**\n * ISO 3166-1 alpha-2 country code for the default-region flag. Feed\n * to the kit's `<Flag country={…} />` component to render the actual\n * flag SVG (NOT the emoji glyph — those don't paint on Windows and\n * lose fidelity at hero sizes). A few language tags here aren't tied\n * to a single country (en, ar, hi); we pick the AlfaDocs default\n * marketing region — consumers needing a different region flag\n * override at the call site.\n */\n countryCode: string;\n /**\n * Regional-indicator flag emoji. Retained as a fallback for non-DOM\n * contexts (terminal logs, plain-text exports) and the rare consumer\n * surface that can't mount the kit's `Flag` component. UI surfaces\n * should always reach for `countryCode` + `<Flag />` instead.\n */\n flag: string;\n /** Reading direction. */\n dir: LocaleDir;\n}\n\n/**\n * Canonical metadata for every locale shipped in `LOCALES_WITH_BUNDLES`.\n * Order matches the bundled-locales array so iteration is stable.\n */\nexport const LOCALE_META: Record<Locale, LocaleMetaEntry> = {\n en: {\n code: 'en',\n nativeName: 'English',\n englishName: 'English',\n countryCode: 'GB',\n flag: '🇬🇧',\n dir: 'ltr',\n },\n it: {\n code: 'it',\n nativeName: 'Italiano',\n englishName: 'Italian',\n countryCode: 'IT',\n flag: '🇮🇹',\n dir: 'ltr',\n },\n de: {\n code: 'de',\n nativeName: 'Deutsch',\n englishName: 'German',\n countryCode: 'DE',\n flag: '🇩🇪',\n dir: 'ltr',\n },\n ar: {\n code: 'ar',\n nativeName: 'العربية',\n englishName: 'Arabic',\n countryCode: 'SA',\n flag: '🇸🇦',\n dir: 'rtl',\n },\n fr: {\n code: 'fr',\n nativeName: 'Français',\n englishName: 'French',\n countryCode: 'FR',\n flag: '🇫🇷',\n dir: 'ltr',\n },\n es: {\n code: 'es',\n nativeName: 'Español',\n englishName: 'Spanish',\n countryCode: 'ES',\n flag: '🇪🇸',\n dir: 'ltr',\n },\n pt: {\n code: 'pt',\n nativeName: 'Português',\n englishName: 'Portuguese',\n countryCode: 'PT',\n flag: '🇵🇹',\n dir: 'ltr',\n },\n nl: {\n code: 'nl',\n nativeName: 'Nederlands',\n englishName: 'Dutch',\n countryCode: 'NL',\n flag: '🇳🇱',\n dir: 'ltr',\n },\n ro: {\n code: 'ro',\n nativeName: 'Română',\n englishName: 'Romanian',\n countryCode: 'RO',\n flag: '🇷🇴',\n dir: 'ltr',\n },\n sq: {\n code: 'sq',\n nativeName: 'Shqip',\n englishName: 'Albanian',\n countryCode: 'AL',\n flag: '🇦🇱',\n dir: 'ltr',\n },\n tr: {\n code: 'tr',\n nativeName: 'Türkçe',\n englishName: 'Turkish',\n countryCode: 'TR',\n flag: '🇹🇷',\n dir: 'ltr',\n },\n pl: {\n code: 'pl',\n nativeName: 'Polski',\n englishName: 'Polish',\n countryCode: 'PL',\n flag: '🇵🇱',\n dir: 'ltr',\n },\n sv: {\n code: 'sv',\n nativeName: 'Svenska',\n englishName: 'Swedish',\n countryCode: 'SE',\n flag: '🇸🇪',\n dir: 'ltr',\n },\n ru: {\n code: 'ru',\n nativeName: 'Русский',\n englishName: 'Russian',\n countryCode: 'RU',\n flag: '🇷🇺',\n dir: 'ltr',\n },\n el: {\n code: 'el',\n nativeName: 'Ελληνικά',\n englishName: 'Greek',\n countryCode: 'GR',\n flag: '🇬🇷',\n dir: 'ltr',\n },\n ja: {\n code: 'ja',\n nativeName: '日本語',\n englishName: 'Japanese',\n countryCode: 'JP',\n flag: '🇯🇵',\n dir: 'ltr',\n },\n zh: {\n code: 'zh',\n nativeName: '中文',\n englishName: 'Chinese',\n countryCode: 'CN',\n flag: '🇨🇳',\n dir: 'ltr',\n },\n hi: {\n code: 'hi',\n nativeName: 'हिन्दी',\n englishName: 'Hindi',\n countryCode: 'IN',\n flag: '🇮🇳',\n dir: 'ltr',\n },\n};\n\n/**\n * Canonical (i18n-parity) order — used when consumers need the same\n * sequence as `LOCALES_WITH_BUNDLES` (e.g. generating fixtures or\n * snapshot keys). Pickers / menus should use `LOCALE_LIST` instead,\n * which sorts alphabetically.\n */\nexport const LOCALE_LIST_CANONICAL: readonly LocaleMetaEntry[] =\n LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]);\n\n/**\n * Picker-facing list — sorted alphabetically by English name so the\n * order is deterministic and language-independent. End users searching\n * by native name use the picker's input box to filter; the visible\n * order doesn't depend on the active locale's collation.\n *\n * \"System Default\" (the OS-driven fallback) is rendered separately at\n * the top of `LocalePicker.SearchList` — not in this list — so the\n * alphabetical order here applies to the 18 explicit locale rows only.\n */\nexport const LOCALE_LIST: readonly LocaleMetaEntry[] = [\n ...LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]),\n].sort((a, b) => a.englishName.localeCompare(b.englishName, 'en'));\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — LocalePicker. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { LocalePickerHandle } from './locale-picker';\n\nexport const localePickerAgent: AgentAdapter<LocalePickerHandle> = {\n id: 'locale-picker',\n // Persists a single locale choice via the handle's `setLocale` → set_value.\n capabilities: ['set_value'],\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.localePicker.state.locale',\n description:\n 'Resolved IETF tag of the locale currently applied to the page. Read this after `set_locale` — the setter silently drops tags the kit ships no bundle for, so this is the only confirmation the switch landed.',\n read: (handle) => handle.getLocale(),\n },\n isSystemDefault: {\n type: 'boolean',\n descriptionKey: 'ui.agent.localePicker.state.isSystemDefault',\n description:\n 'True when the resolved locale came from `navigator.language` rather than an explicit user choice. Distinguishes \"the user chose English\" from \"we are following the browser, which happens to be English\" — a distinction the resolved tag alone destroys.',\n read: (handle) => handle.getIsSystemDefault(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\"). Unsupported tags are a no-op.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unsupported tags are a silent no-op — read the `locale` state slot afterwards to confirm the switch landed.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n invoke: (handle, args: { locale: string }) => {\n // The handle's own implementation gates against\n // `LOCALES_WITH_BUNDLES`, so a tag the kit doesn't ship is a\n // no-op rather than a runtime crash.\n handle.setLocale(args.locale);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'locale-picker',\n description: 'Marks the LocalePicker wrapper.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type Ref,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, Globe, Monitor } from 'lucide-react';\nimport { Command, defaultFilter } from 'cmdk';\nimport { IconButton } from '../button/icon-button';\nimport { Popover } from '../popover/popover';\nimport { CoreFlag, hasCoreFlag } from '../flag/flag-core';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n} from '../_shared/input-surface';\nimport { LOCALE_LIST, LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { LOCALES_WITH_BUNDLES } from '../../i18n/config';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { localePickerAgent } from './locale-picker.agent';\n\n/* ------------------------------------------------------------------ */\n/* Persistence + browser-locale detection */\n/* */\n/* The first mount of a LocalePicker after a fresh page load runs a */\n/* one-shot detection: if no locale has ever been persisted, read */\n/* navigator.language, normalise to the base tag (`it-IT` → `it`), */\n/* and adopt it if the kit ships a matching bundle. Fall back to */\n/* `en` if not. Result is persisted so a subsequent page load */\n/* respects the user choice without re-detecting. */\n/* */\n/* Module-level flag — the detection must fire once per app */\n/* lifecycle, not once per LocalePicker instance, since HeaderSettings */\n/* + a standalone picker can both be mounted simultaneously. */\n/* ------------------------------------------------------------------ */\n\nexport const LOCALE_STORAGE_KEY = 'alfadocs-ui.locale';\n\n/**\n * Sentinel value (and Combobox-row key) for \"follow the browser /\n * OS locale\". Mirrors the ThemeToggle's `'system'` preference: the\n * picker doesn't store a concrete locale code; the runtime resolves\n * to `navigator.language` on each mount.\n */\nexport const LOCALE_SYSTEM_DEFAULT = 'system' as const;\nexport type LocalePreference = Locale | typeof LOCALE_SYSTEM_DEFAULT;\n\nlet detectionFired = false;\n\nfunction isSupportedLocale(value: unknown): value is Locale {\n return (\n typeof value === 'string' &&\n (LOCALES_WITH_BUNDLES as readonly string[]).includes(value)\n );\n}\n\nfunction safeReadStorage(key: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode / when quota is exceeded — the\n in-memory state is the source of truth. Same silent-fail shape\n as use-theme.ts. */\n }\n}\n\nfunction detectBrowserLocale(): Locale {\n if (typeof navigator === 'undefined') return 'en';\n const raw = navigator.language;\n if (!raw) return 'en';\n const base = raw.toLowerCase().split('-')[0];\n return isSupportedLocale(base) ? base : 'en';\n}\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* Shared state hook */\n/* */\n/* Centralises the setLocale wrapper so both the standalone picker */\n/* and the inline `LocalePicker.SearchList` share one source of truth: */\n/* 1. delegate to `useLocale().setLocale` (the i18next change) */\n/* 2. set `document.documentElement.dir` + `lang` */\n/* 3. persist to localStorage at `alfadocs-ui.locale` */\n/* ------------------------------------------------------------------ */\n\ninterface LocalePickerState {\n /** Resolved locale actually applied to the page (always concrete). */\n locale: Locale;\n /**\n * True when the resolved locale came from `navigator.language`\n * rather than an explicit user choice (i.e. no localStorage entry).\n * Used to mark the \"System Default\" row as the active selection\n * until the user picks a specific locale.\n */\n isSystemDefault: boolean;\n /**\n * Switch to a specific locale (persists) OR back to the System\n * Default (clears the localStorage entry and re-detects).\n */\n setLocale: (next: LocalePreference) => void;\n}\n\nfunction safeRemoveStorage(key: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.removeItem(key);\n } catch {\n /* private mode etc. — silent fail per the rest of the file. */\n }\n}\n\nfunction useLocalePickerState(): LocalePickerState {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\n const [isSystemDefault, setIsSystemDefault] = useState<boolean>(\n () => safeReadStorage(LOCALE_STORAGE_KEY) === null,\n );\n\n // Coerce the i18next-reported locale to the supported set so consumers\n // never see an un-bundled tag (e.g. when the host app pre-loads\n // `en-US` before the kit's resources land).\n const locale: Locale = isSupportedLocale(rawLocale) ? rawLocale : 'en';\n\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (next === LOCALE_SYSTEM_DEFAULT) {\n // Clear persistence + re-resolve to navigator.language.\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n setIsSystemDefault(true);\n return;\n }\n if (!isSupportedLocale(next)) return;\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n setIsSystemDefault(false);\n },\n [setLocaleI18n],\n );\n\n // One-shot detection on first LocalePicker mount per app lifecycle.\n useEffect(() => {\n if (detectionFired) return;\n detectionFired = true;\n const stored = safeReadStorage(LOCALE_STORAGE_KEY);\n if (isSupportedLocale(stored)) {\n // User-chosen value persists — keep i18next + document in sync.\n if (stored !== rawLocale) void setLocaleI18n(stored);\n applyDocumentAttrs(stored);\n return;\n }\n // No stored value → we're in System Default mode. Detect, apply,\n // but do NOT persist (so the System Default selection stays\n // sticky across reloads until the user explicitly chooses).\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentional one-shot detection\n }, []);\n\n return { locale, isSystemDefault, setLocale };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n variant: {\n icon: '',\n compact: '',\n },\n },\n defaultVariants: { variant: 'icon' },\n});\n\nconst compactTriggerClasses = [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:hover:bg-muted',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'type-body-sm',\n].join(' ');\n\nconst popoverContentClasses = [\n 'ds:w-[18rem] ds:rounded-[var(--radius-md)]',\n 'ds:bg-background ds:text-foreground ds:border ds:border-border',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:overflow-hidden',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type LocalePickerVariant = 'icon' | 'compact';\n\nexport interface LocalePickerProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n variant?: LocalePickerVariant;\n /**\n * Controlled escape hatch — when omitted the picker reads/writes\n * `useLocale()` directly so a bare `<LocalePicker />` works with no\n * wiring. Pass both to opt into controlled mode.\n */\n value?: Locale;\n onValueChange?: (next: LocalePreference) => void;\n /** Disable interaction (greys out the trigger). */\n disabled?: boolean;\n /** Mark as busy (kept open / focusable but read-only). */\n loading?: boolean;\n /**\n * Side the search popover opens onto, relative to the trigger.\n * Defaults to `bottom` (standard dropdown). Use `end` (inline-end —\n * right in LTR, left in RTL) when nesting the LocalePicker inside\n * another popover/menu so the search surface flies out to the side\n * rather than stacking below.\n */\n popoverSide?: 'top' | 'bottom' | 'start' | 'end';\n}\n\n/**\n * Curated imperative handle for agent / external automation. The\n * `setLocale` parameter is widened to `string` (rather than the\n * narrower `Locale`) so untyped agent inputs don't have to thread the\n * `LOCALES_WITH_BUNDLES` constraint at the call site — the\n * implementation validates internally and no-ops on an unsupported\n * tag.\n */\nexport interface LocalePickerHandle {\n setLocale: (next: string) => void;\n /** Resolved locale tag actually applied to the page (always concrete). */\n getLocale: () => string;\n /**\n * True when the resolved locale came from `navigator.language` rather\n * than an explicit user choice. Read-back for `set_locale`: the\n * resolved tag alone cannot tell \"the user chose English\" from\n * \"we are following the browser, which happens to be English\".\n */\n getIsSystemDefault: () => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker.SearchList — the inline searchable list */\n/* */\n/* HeaderSettings renders this directly inside its DropdownMenu so the */\n/* same UX is reused without nesting another popover. Standalone the */\n/* root component renders this same widget inside a Popover. */\n/* ------------------------------------------------------------------ */\n\nexport interface LocalePickerSearchListProps {\n /**\n * Active selection. Either a `Locale` code or the\n * `LOCALE_SYSTEM_DEFAULT` sentinel (when the user hasn't made an\n * explicit choice and the kit is following `navigator.language`).\n * Defaults to the shared store.\n */\n value?: LocalePreference;\n /**\n * Fires after a successful selection. Accepts a concrete `Locale`\n * or `LOCALE_SYSTEM_DEFAULT` (when the user picks the \"System\n * Default\" row at the top of the list).\n *\n * Defaults to the shared setter (delegates to useLocale, persists\n * or clears storage, updates document.dir/lang).\n */\n onValueChange?: (next: LocalePreference) => void;\n /** Optional id for the search input (axe `aria-labelledby` chain). */\n inputId?: string;\n /** Disable the input + list interactions. */\n disabled?: boolean;\n /** Mark as busy (read-only). */\n loading?: boolean;\n className?: string;\n}\n\nconst searchListVariants = cva('ds:flex ds:flex-col', {\n variants: {\n loading: {\n true: 'ds:opacity-60 ds:pointer-events-none',\n false: '',\n },\n },\n defaultVariants: { loading: false },\n});\n\nexport const LocalePickerSearchList = forwardRef<\n HTMLDivElement,\n LocalePickerSearchListProps\n>(\n (\n {\n value: valueProp,\n onValueChange,\n inputId: inputIdProp,\n disabled = false,\n loading = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const store = useLocalePickerState();\n // Resolved-to-render-with: which locale name to display for\n // \"System Default ({{nativeName}})\". Always a concrete Locale.\n const resolvedLocale = store.locale;\n // Selection-state: the picker's current value is either an\n // explicit Locale or the System Default sentinel.\n const currentSelection: LocalePreference =\n valueProp ??\n (store.isSystemDefault ? LOCALE_SYSTEM_DEFAULT : store.locale);\n const generatedId = useId();\n const inputId = inputIdProp ?? `${generatedId}-search`;\n const [search, setSearch] = useState('');\n\n const handleSelect = useCallback(\n (code: string) => {\n if (disabled || loading) return;\n if (code === LOCALE_SYSTEM_DEFAULT) {\n if (onValueChange) {\n onValueChange(LOCALE_SYSTEM_DEFAULT);\n } else {\n store.setLocale(LOCALE_SYSTEM_DEFAULT);\n }\n return;\n }\n if (!isSupportedLocale(code)) return;\n if (onValueChange) {\n onValueChange(code);\n } else {\n store.setLocale(code);\n }\n },\n [disabled, loading, onValueChange, store],\n );\n\n return (\n <div\n ref={ref}\n className={[searchListVariants({ loading }), className]\n .filter(Boolean)\n .join(' ')}\n data-component=\"locale-picker-search-list\"\n >\n <Command\n label={t('navigation.localePicker.commandLabel')}\n // Defer to cmdk's defaultFilter — it ranks against both the\n // Item's `value` (the locale code) and `keywords` (the\n // native + English names), which is exactly the haystack we\n // want users to be able to match against. The Item's `value`\n // alone wouldn't surface \"jap\" → 日本語 because the code is\n // `ja`; the keyword \"Japanese\" handles that match.\n filter={defaultFilter}\n shouldFilter\n >\n {/* Input chrome borrows the kit's standard INPUT_SURFACE\n tokens (same as Combobox / Autocomplete) so the search\n field reads as a first-class kit input rather than a\n one-off list header. The wrapper carries the border /\n padding / focus-within ring; the inner Command.Input\n keeps its outline-less peer styling. */}\n <div\n className={[\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT.sm,\n INPUT_SURFACE_PADDING_X.sm,\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:m-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Globe\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <Command.Input\n id={inputId}\n value={search}\n onValueChange={setSearch}\n placeholder={t('navigation.localePicker.searchPlaceholder')}\n aria-label={t('navigation.localePicker.searchLabel')}\n disabled={disabled || loading}\n className={[\n 'ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none',\n 'ds:placeholder:text-muted-foreground ds:text-foreground',\n 'ds:text-[length:var(--font-size-sm)]',\n ].join(' ')}\n />\n </div>\n <Command.List\n className={[\n 'ds:max-h-[18rem] ds:overflow-y-auto',\n 'ds:p-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Command.Empty\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'type-body-sm ds:text-muted-foreground',\n ].join(' ')}\n >\n {t('navigation.localePicker.empty')}\n </Command.Empty>\n\n {/* \"System Default\" — always the first row. Selected when\n the user hasn't picked an explicit locale; selecting it\n clears the localStorage entry and re-resolves to\n navigator.language. Mirrors the `'system'` value in\n ThemeToggle. */}\n {(() => {\n const isSystemSelected =\n currentSelection === LOCALE_SYSTEM_DEFAULT;\n const resolvedEntry = LOCALE_META[resolvedLocale];\n return (\n <Command.Item\n key={LOCALE_SYSTEM_DEFAULT}\n value={LOCALE_SYSTEM_DEFAULT}\n keywords={[\n 'system',\n 'default',\n 'auto',\n 'browser',\n resolvedEntry.nativeName,\n resolvedEntry.englishName,\n ]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSystemSelected || undefined}\n data-current={isSystemSelected ? 'true' : undefined}\n >\n <Monitor\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {t('navigation.localePicker.systemDefault', {\n locale: resolvedEntry.nativeName,\n })}\n </span>\n {isSystemSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSystemSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })()}\n\n {LOCALE_LIST.map((entry) => {\n const isSelected = currentSelection === entry.code;\n return (\n <Command.Item\n key={entry.code}\n value={entry.code}\n keywords={[entry.nativeName, entry.englishName]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSelected || undefined}\n data-current={isSelected ? 'true' : undefined}\n // `lang` on the row triggers font-cascade selection\n // so Arabic / Japanese / Devanagari / Greek glyphs\n // paint via the Noto Sans family. Intentionally\n // omits `dir` — the row layout follows the picker\n // surface's direction (LTR menu = LTR row, RTL menu\n // = RTL row). Setting `dir=\"rtl\"` per Arabic row\n // would flip just THAT row inside an LTR menu, which\n // breaks the visual rhythm with neighbouring rows.\n // Arabic text within the row still renders RTL at\n // the character level (script-driven) regardless.\n lang={entry.code}\n >\n {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasCoreFlag fallback: render the emoji glyph only\n when the kit doesn't ship an SVG for this\n country code. All 18 bundled locales currently\n have SVG flags, so this is dead code on the\n canonical set — kept for resilience when\n consumers extend the registry. */\n <span\n aria-hidden=\"true\"\n className=\"ds:text-base ds:shrink-0\"\n >\n {entry.flag}\n </span>\n )}\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {entry.nativeName}\n </span>\n {isSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })}\n </Command.List>\n </Command>\n </div>\n );\n },\n);\nLocalePickerSearchList.displayName = 'LocalePicker.SearchList';\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker root — icon + compact trigger variants */\n/* ------------------------------------------------------------------ */\n\ninterface VariantRenderProps {\n state: LocalePickerState;\n rest: HTMLAttributes<HTMLDivElement>;\n forwardedRef: Ref<HTMLDivElement>;\n className?: string;\n disabled: boolean;\n loading: boolean;\n popoverSide: 'top' | 'bottom' | 'start' | 'end';\n}\n\nfunction IconTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'icon', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <IconButton\n disabled={disabled || loading}\n icon={\n <span className=\"ds:relative ds:inline-flex ds:items-center ds:justify-center\">\n <Globe aria-hidden className=\"ds:size-5\" />\n {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className={[\n // Corner chip overlaying the globe glyph.\n // `outline` paints a thin background-coloured\n // ring around the flag so it reads as a chip\n // rather than blending into the globe edge.\n 'ds:absolute ds:bottom-[-3px] ds:end-[-5px]',\n 'ds:outline ds:outline-2 ds:outline-background',\n // Scale down to chip size — Flag's sm tile is\n // larger than the original emoji glyph.\n 'ds:scale-75 ds:origin-bottom-end',\n ].join(' ')}\n />\n ) : null}\n </span>\n }\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n />\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nfunction CompactTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'compact', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n disabled={disabled || loading}\n className={compactTriggerClasses}\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n >\n {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n <Globe aria-hidden className=\"ds:size-4 ds:shrink-0\" />\n )}\n <span\n className=\"ds:flex-1 ds:truncate type-body-sm\"\n lang={entry.code}\n >\n {entry.nativeName}\n </span>\n </button>\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nconst LocalePickerRoot = forwardRef<HTMLDivElement, LocalePickerProps>(\n (props, ref) => {\n const {\n variant = 'icon',\n value,\n onValueChange,\n disabled = false,\n loading = false,\n popoverSide = 'bottom',\n className,\n id,\n ...rest\n } = props as LocalePickerProps & { id?: string };\n\n const store = useLocalePickerState();\n const resolvedLocale = value ?? store.locale;\n\n // Controlled overlay: when a consumer passes `onValueChange`, route\n // selections to them instead of the shared store. Document attrs +\n // localStorage are still updated so the picker behaves consistently\n // either way.\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (onValueChange) {\n onValueChange(next);\n // Side-effects in controlled mode: still write through to\n // the persistence + document attrs so the rest of the page\n // re-renders even though we're routing state to the consumer.\n if (next === LOCALE_SYSTEM_DEFAULT) {\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n applyDocumentAttrs(detected);\n } else if (isSupportedLocale(next)) {\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n }\n return;\n }\n store.setLocale(next);\n },\n [onValueChange, store],\n );\n\n const state: LocalePickerState = useMemo(\n () => ({\n locale: resolvedLocale,\n isSystemDefault: store.isSystemDefault,\n setLocale,\n }),\n [resolvedLocale, store.isSystemDefault, setLocale],\n );\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n const stateRef = useRef(state);\n stateRef.current = state;\n const agentHandle = useMemo<LocalePickerHandle>(\n () => ({\n setLocale: (next: string) => {\n if (isSupportedLocale(next)) {\n stateRef.current.setLocale(next);\n }\n },\n // Read-back for `set_locale` — the setter swallows unsupported\n // tags, so these are the only way an agent can tell a switch\n // landed from one that was dropped.\n getLocale: () => stateRef.current.locale,\n getIsSystemDefault: () => stateRef.current.isSystemDefault,\n }),\n [],\n );\n useAgentRegistration(localePickerAgent, agentHandle, id);\n\n if (variant === 'compact') {\n return (\n <CompactTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n }\n return (\n <IconTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n },\n);\nLocalePickerRoot.displayName = 'LocalePicker';\n\nexport const LocalePicker = Object.assign(LocalePickerRoot, {\n SearchList: LocalePickerSearchList,\n});\n"],"names":["CORE_RECTANGLE_URL_MAP","safeFlagGlob","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","CORE_SQUARE_URL_MAP","__vite_glob_1_0","__vite_glob_1_1","__vite_glob_1_2","__vite_glob_1_3","__vite_glob_1_4","__vite_glob_1_5","__vite_glob_1_6","__vite_glob_1_7","__vite_glob_1_8","__vite_glob_1_9","__vite_glob_1_10","__vite_glob_1_11","__vite_glob_1_12","__vite_glob_1_13","__vite_glob_1_14","__vite_glob_1_15","__vite_glob_1_16","__vite_glob_1_17","hasCoreFlag","country","CoreFlag","forwardRef","label","shape","size","rounded","className","rest","ref","code","createElement","FlagView","flagClasses","LOCALE_META","LOCALES_WITH_BUNDLES","LOCALE_LIST","a","b","localePickerAgent","handle","args","LOCALE_STORAGE_KEY","LOCALE_SYSTEM_DEFAULT","detectionFired","isSupportedLocale","value","safeReadStorage","key","safeWriteStorage","detectBrowserLocale","raw","base","applyDocumentAttrs","locale","root","safeRemoveStorage","useLocalePickerState","rawLocale","setLocaleI18n","useLocale","isSystemDefault","setIsSystemDefault","useState","setLocale","useCallback","next","detected","useEffect","stored","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","searchListVariants","LocalePickerSearchList","valueProp","onValueChange","inputIdProp","disabled","loading","useTranslation","store","resolvedLocale","currentSelection","generatedId","useId","inputId","search","setSearch","handleSelect","jsx","jsxs","Command","defaultFilter","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","Globe","isSystemSelected","resolvedEntry","Monitor","Check","entry","isSelected","IconTrigger","state","forwardedRef","popoverSide","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAMA,IAAuCC;AAAA,EAAa,MACxD,uBAAA,OAAA;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,EAAA,CAAA;AAIF,GAEMC,KAAoCnB;AAAA,EAAa,MACrD,uBAAA,OAAA;AAAA,IAAA,+CAAAoB;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC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AAC;AAIH,WAFAE,GAAqBlF,IAAmBiF,GAAaL,CAAE,GAEnDD,MAAY,YAEZ,gBAAAvB;AAAA,MAACoB;AAAA,MAAA;AAAA,QACC,OAAAL;AAAA,QACA,MAAA9E;AAAA,QACA,cAAA+E;AAAA,QACA,WAAAhF;AAAA,QACA,UAAAoD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA4B;AAAA,MAAA;AAAA,IAAA,IAKJ,gBAAAjB;AAAA,MAACc;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,MAAA9E;AAAA,QACA,cAAA+E;AAAA,QACA,WAAAhF;AAAA,QACA,UAAAoD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA4B;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAI,EAAiB,cAAc;AAExB,MAAMU,KAAe,OAAO,OAAOV,GAAkB;AAAA,EAC1D,YAAYrC;AACd,CAAC;"}
|
|
1
|
+
{"version":3,"file":"locale-picker-BvbVjDQ-.js","sources":["../../src/components/flag/flag-core.ts","../../src/i18n/locale-meta.ts","../../src/components/locale-picker/locale-picker.agent.ts","../../src/components/locale-picker/locale-picker.tsx"],"sourcesContent":["import { createElement, forwardRef } from 'react';\nimport {\n FlagView,\n flagClasses,\n safeFlagGlob,\n type FlagAssetMap,\n} from './flag-view';\nimport type { FlagProps } from './flag';\n\n/* ------------------------------------------------------------------ */\n/* CoreFlag — the locale-chrome flag binding. */\n/* */\n/* Identical component to `Flag` (same props, same FlagView, same DOM, */\n/* same synchronous paint) bound to a SUBSET of the asset set: only the */\n/* countries the kit's own locale chrome can ever ask for. */\n/* */\n/* Why it exists: LocalePicker ships inside HeaderSettings, which ships */\n/* inside MarketplaceAppShell, which is on every route of every */\n/* consumer — including login screens. Importing `Flag` there pulled */\n/* all 530 inlined SVGs (485,552 B of chunk) onto pages that offer a */\n/* three-item language menu. This binding pulls 36 (29,183 B). */\n/* */\n/* The glob pattern below MUST list every `LOCALE_META[…].countryCode`. */\n/* `flag.test.tsx` asserts that (it fails if a locale is added to */\n/* `src/i18n/locale-meta.ts` without its flag), so the two can't drift. */\n/* */\n/* Both patterns are spelled out as string literals (rather than built */\n/* from a shared constant) because `import.meta.glob` is a build macro: */\n/* Vite reads the pattern off the AST, so it must be a literal — an */\n/* interpolated template silently matches nothing. */\n/* ------------------------------------------------------------------ */\n\nconst CORE_RECTANGLE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/3x2/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\nconst CORE_SQUARE_URL_MAP: FlagAssetMap = safeFlagGlob(() =>\n import.meta.glob<string>(\n '/node_modules/country-flag-icons/1x1/{AL,CN,DE,ES,FR,GB,GR,IN,IT,JP,NL,PL,PT,RO,RU,SA,SE,TR}.svg',\n { query: '?url', import: 'default', eager: true },\n ),\n);\n\n/** Country codes bundled with `CoreFlag`. Subset of `FLAG_COUNTRIES`. */\nexport const CORE_FLAG_COUNTRIES: readonly string[] = Object.freeze(\n Object.keys(CORE_RECTANGLE_URL_MAP).sort(),\n);\n\n/** Does `CoreFlag` bundle an asset for this country code? Case-insensitive. */\nexport function hasCoreFlag(country: string): boolean {\n return country.toUpperCase() in CORE_RECTANGLE_URL_MAP;\n}\n\n/**\n * `Flag` restricted to the kit's own locale set. Internal — not exported\n * from `index.ts` or the root barrel. Renders `FlagView` with no JSX so\n * this file stays a `.ts` module alongside the glob it owns.\n */\nexport const CoreFlag = forwardRef<HTMLElement, FlagProps>(\n (\n {\n country,\n label,\n shape = 'rectangle',\n size = 'sm',\n rounded = 'sm',\n className,\n ...rest\n },\n ref,\n ) => {\n const code = country.toUpperCase();\n const urlMap =\n shape === 'square' ? CORE_SQUARE_URL_MAP : CORE_RECTANGLE_URL_MAP;\n\n return createElement(FlagView, {\n ref,\n code,\n src: urlMap[code],\n label,\n className: flagClasses({ shape, size, rounded }, className),\n ...rest,\n });\n },\n);\n\nCoreFlag.displayName = 'CoreFlag';\n","/* -------------------------------------------------------------------- */\n/* Locale metadata registry. */\n/* */\n/* Single source of truth for human-facing locale information — native */\n/* name, English name, flag emoji, and writing direction. Consumed by */\n/* LocalePicker / HeaderSettings to render the language switcher. */\n/* */\n/* Keys must match `LOCALES_WITH_BUNDLES` from `./resources` 1:1; the */\n/* `locale-meta.test.ts` parity check fails the build if a code is */\n/* added to one and not the other. */\n/* */\n/* Flag emojis use the Regional Indicator pair convention — a few of */\n/* the codes are language tags rather than country tags (en, ar, hi); */\n/* the flag chosen is the \"default-region\" the kit ships marketing */\n/* surfaces in. Consumers that need a different region flag (e.g. */\n/* British vs. American English) can override via `LOCALE_META[code]`. */\n/* -------------------------------------------------------------------- */\n\nimport { LOCALES_WITH_BUNDLES } from './resources';\n\n/** Reading direction. Mirrors the shape of `hooks/use-locale.ts#LocaleDir`. */\nexport type LocaleDir = 'ltr' | 'rtl';\n\n/** IETF locale tag from the kit's bundled set. */\nexport type Locale = (typeof LOCALES_WITH_BUNDLES)[number];\n\nexport interface LocaleMetaEntry {\n /** IETF locale tag (matches the key in `LOCALES_WITH_BUNDLES`). */\n code: Locale;\n /** Endonym — the locale's name in its own language (\"Italiano\", \"العربية\"). */\n nativeName: string;\n /** Exonym — the locale's name in English (\"Italian\", \"Arabic\"). */\n englishName: string;\n /**\n * ISO 3166-1 alpha-2 country code for the default-region flag. Feed\n * to the kit's `<Flag country={…} />` component to render the actual\n * flag SVG (NOT the emoji glyph — those don't paint on Windows and\n * lose fidelity at hero sizes). A few language tags here aren't tied\n * to a single country (en, ar, hi); we pick the AlfaDocs default\n * marketing region — consumers needing a different region flag\n * override at the call site.\n */\n countryCode: string;\n /**\n * Regional-indicator flag emoji. Retained as a fallback for non-DOM\n * contexts (terminal logs, plain-text exports) and the rare consumer\n * surface that can't mount the kit's `Flag` component. UI surfaces\n * should always reach for `countryCode` + `<Flag />` instead.\n */\n flag: string;\n /** Reading direction. */\n dir: LocaleDir;\n}\n\n/**\n * Canonical metadata for every locale shipped in `LOCALES_WITH_BUNDLES`.\n * Order matches the bundled-locales array so iteration is stable.\n */\nexport const LOCALE_META: Record<Locale, LocaleMetaEntry> = {\n en: {\n code: 'en',\n nativeName: 'English',\n englishName: 'English',\n countryCode: 'GB',\n flag: '🇬🇧',\n dir: 'ltr',\n },\n it: {\n code: 'it',\n nativeName: 'Italiano',\n englishName: 'Italian',\n countryCode: 'IT',\n flag: '🇮🇹',\n dir: 'ltr',\n },\n de: {\n code: 'de',\n nativeName: 'Deutsch',\n englishName: 'German',\n countryCode: 'DE',\n flag: '🇩🇪',\n dir: 'ltr',\n },\n ar: {\n code: 'ar',\n nativeName: 'العربية',\n englishName: 'Arabic',\n countryCode: 'SA',\n flag: '🇸🇦',\n dir: 'rtl',\n },\n fr: {\n code: 'fr',\n nativeName: 'Français',\n englishName: 'French',\n countryCode: 'FR',\n flag: '🇫🇷',\n dir: 'ltr',\n },\n es: {\n code: 'es',\n nativeName: 'Español',\n englishName: 'Spanish',\n countryCode: 'ES',\n flag: '🇪🇸',\n dir: 'ltr',\n },\n pt: {\n code: 'pt',\n nativeName: 'Português',\n englishName: 'Portuguese',\n countryCode: 'PT',\n flag: '🇵🇹',\n dir: 'ltr',\n },\n nl: {\n code: 'nl',\n nativeName: 'Nederlands',\n englishName: 'Dutch',\n countryCode: 'NL',\n flag: '🇳🇱',\n dir: 'ltr',\n },\n ro: {\n code: 'ro',\n nativeName: 'Română',\n englishName: 'Romanian',\n countryCode: 'RO',\n flag: '🇷🇴',\n dir: 'ltr',\n },\n sq: {\n code: 'sq',\n nativeName: 'Shqip',\n englishName: 'Albanian',\n countryCode: 'AL',\n flag: '🇦🇱',\n dir: 'ltr',\n },\n tr: {\n code: 'tr',\n nativeName: 'Türkçe',\n englishName: 'Turkish',\n countryCode: 'TR',\n flag: '🇹🇷',\n dir: 'ltr',\n },\n pl: {\n code: 'pl',\n nativeName: 'Polski',\n englishName: 'Polish',\n countryCode: 'PL',\n flag: '🇵🇱',\n dir: 'ltr',\n },\n sv: {\n code: 'sv',\n nativeName: 'Svenska',\n englishName: 'Swedish',\n countryCode: 'SE',\n flag: '🇸🇪',\n dir: 'ltr',\n },\n ru: {\n code: 'ru',\n nativeName: 'Русский',\n englishName: 'Russian',\n countryCode: 'RU',\n flag: '🇷🇺',\n dir: 'ltr',\n },\n el: {\n code: 'el',\n nativeName: 'Ελληνικά',\n englishName: 'Greek',\n countryCode: 'GR',\n flag: '🇬🇷',\n dir: 'ltr',\n },\n ja: {\n code: 'ja',\n nativeName: '日本語',\n englishName: 'Japanese',\n countryCode: 'JP',\n flag: '🇯🇵',\n dir: 'ltr',\n },\n zh: {\n code: 'zh',\n nativeName: '中文',\n englishName: 'Chinese',\n countryCode: 'CN',\n flag: '🇨🇳',\n dir: 'ltr',\n },\n hi: {\n code: 'hi',\n nativeName: 'हिन्दी',\n englishName: 'Hindi',\n countryCode: 'IN',\n flag: '🇮🇳',\n dir: 'ltr',\n },\n};\n\n/**\n * Canonical (i18n-parity) order — used when consumers need the same\n * sequence as `LOCALES_WITH_BUNDLES` (e.g. generating fixtures or\n * snapshot keys). Pickers / menus should use `LOCALE_LIST` instead,\n * which sorts alphabetically.\n */\nexport const LOCALE_LIST_CANONICAL: readonly LocaleMetaEntry[] =\n LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]);\n\n/**\n * Picker-facing list — sorted alphabetically by English name so the\n * order is deterministic and language-independent. End users searching\n * by native name use the picker's input box to filter; the visible\n * order doesn't depend on the active locale's collation.\n *\n * \"System Default\" (the OS-driven fallback) is rendered separately at\n * the top of `LocalePicker.SearchList` — not in this list — so the\n * alphabetical order here applies to the 18 explicit locale rows only.\n */\nexport const LOCALE_LIST: readonly LocaleMetaEntry[] = [\n ...LOCALES_WITH_BUNDLES.map((code) => LOCALE_META[code]),\n].sort((a, b) => a.englishName.localeCompare(b.englishName, 'en'));\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — LocalePicker. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { LocalePickerHandle } from './locale-picker';\n\nexport const localePickerAgent: AgentAdapter<LocalePickerHandle> = {\n id: 'locale-picker',\n // Persists a single locale choice via the handle's `setLocale` → set_value.\n capabilities: ['set_value'],\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.localePicker.state.locale',\n description:\n 'Resolved IETF tag of the locale currently applied to the page. Read this after `set_locale` — the setter silently drops tags the kit ships no bundle for, so this is the only confirmation the switch landed.',\n read: (handle) => handle.getLocale(),\n },\n isSystemDefault: {\n type: 'boolean',\n descriptionKey: 'ui.agent.localePicker.state.isSystemDefault',\n description:\n 'True when the resolved locale came from `navigator.language` rather than an explicit user choice. Distinguishes \"the user chose English\" from \"we are following the browser, which happens to be English\" — a distinction the resolved tag alone destroys.',\n read: (handle) => handle.getIsSystemDefault(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\"). Unsupported tags are a no-op.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.localePicker.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unsupported tags are a silent no-op — read the `locale` state slot afterwards to confirm the switch landed.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n invoke: (handle, args: { locale: string }) => {\n // The handle's own implementation gates against\n // `LOCALES_WITH_BUNDLES`, so a tag the kit doesn't ship is a\n // no-op rather than a runtime crash.\n handle.setLocale(args.locale);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'locale-picker',\n description: 'Marks the LocalePicker wrapper.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type Ref,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, Globe, Monitor } from 'lucide-react';\nimport { Command, defaultFilter } from 'cmdk';\nimport { IconButton } from '../button/icon-button';\nimport { Popover } from '../popover/popover';\nimport { CoreFlag, hasCoreFlag } from '../flag/flag-core';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n} from '../_shared/input-surface';\nimport { LOCALE_LIST, LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { LOCALES_WITH_BUNDLES } from '../../i18n/config';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { localePickerAgent } from './locale-picker.agent';\n\n/* ------------------------------------------------------------------ */\n/* Persistence + browser-locale detection */\n/* */\n/* The first mount of a LocalePicker after a fresh page load runs a */\n/* one-shot detection: if no locale has ever been persisted, read */\n/* navigator.language, normalise to the base tag (`it-IT` → `it`), */\n/* and adopt it if the kit ships a matching bundle. Fall back to */\n/* `en` if not. Result is persisted so a subsequent page load */\n/* respects the user choice without re-detecting. */\n/* */\n/* Module-level flag — the detection must fire once per app */\n/* lifecycle, not once per LocalePicker instance, since HeaderSettings */\n/* + a standalone picker can both be mounted simultaneously. */\n/* ------------------------------------------------------------------ */\n\nexport const LOCALE_STORAGE_KEY = 'alfadocs-ui.locale';\n\n/**\n * Sentinel value (and Combobox-row key) for \"follow the browser /\n * OS locale\". Mirrors the ThemeToggle's `'system'` preference: the\n * picker doesn't store a concrete locale code; the runtime resolves\n * to `navigator.language` on each mount.\n */\nexport const LOCALE_SYSTEM_DEFAULT = 'system' as const;\nexport type LocalePreference = Locale | typeof LOCALE_SYSTEM_DEFAULT;\n\nlet detectionFired = false;\n\nfunction isSupportedLocale(value: unknown): value is Locale {\n return (\n typeof value === 'string' &&\n (LOCALES_WITH_BUNDLES as readonly string[]).includes(value)\n );\n}\n\nfunction safeReadStorage(key: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n}\n\nfunction safeWriteStorage(key: string, value: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.setItem(key, value);\n } catch {\n /* Storage can throw in private mode / when quota is exceeded — the\n in-memory state is the source of truth. Same silent-fail shape\n as use-theme.ts. */\n }\n}\n\nfunction detectBrowserLocale(): Locale {\n if (typeof navigator === 'undefined') return 'en';\n const raw = navigator.language;\n if (!raw) return 'en';\n const base = raw.toLowerCase().split('-')[0];\n return isSupportedLocale(base) ? base : 'en';\n}\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* Shared state hook */\n/* */\n/* Centralises the setLocale wrapper so both the standalone picker */\n/* and the inline `LocalePicker.SearchList` share one source of truth: */\n/* 1. delegate to `useLocale().setLocale` (the i18next change) */\n/* 2. set `document.documentElement.dir` + `lang` */\n/* 3. persist to localStorage at `alfadocs-ui.locale` */\n/* ------------------------------------------------------------------ */\n\ninterface LocalePickerState {\n /** Resolved locale actually applied to the page (always concrete). */\n locale: Locale;\n /**\n * True when the resolved locale came from `navigator.language`\n * rather than an explicit user choice (i.e. no localStorage entry).\n * Used to mark the \"System Default\" row as the active selection\n * until the user picks a specific locale.\n */\n isSystemDefault: boolean;\n /**\n * Switch to a specific locale (persists) OR back to the System\n * Default (clears the localStorage entry and re-detects).\n */\n setLocale: (next: LocalePreference) => void;\n}\n\nfunction safeRemoveStorage(key: string): void {\n if (typeof window === 'undefined') return;\n try {\n window.localStorage.removeItem(key);\n } catch {\n /* private mode etc. — silent fail per the rest of the file. */\n }\n}\n\nfunction useLocalePickerState(): LocalePickerState {\n const { locale: rawLocale, setLocale: setLocaleI18n } = useLocale();\n const [isSystemDefault, setIsSystemDefault] = useState<boolean>(\n () => safeReadStorage(LOCALE_STORAGE_KEY) === null,\n );\n\n // Coerce the i18next-reported locale to the supported set so consumers\n // never see an un-bundled tag (e.g. when the host app pre-loads\n // `en-US` before the kit's resources land).\n const locale: Locale = isSupportedLocale(rawLocale) ? rawLocale : 'en';\n\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (next === LOCALE_SYSTEM_DEFAULT) {\n // Clear persistence + re-resolve to navigator.language.\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n setIsSystemDefault(true);\n return;\n }\n if (!isSupportedLocale(next)) return;\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n setIsSystemDefault(false);\n },\n [setLocaleI18n],\n );\n\n // One-shot detection on first LocalePicker mount per app lifecycle.\n useEffect(() => {\n if (detectionFired) return;\n detectionFired = true;\n const stored = safeReadStorage(LOCALE_STORAGE_KEY);\n if (isSupportedLocale(stored)) {\n // User-chosen value persists — keep i18next + document in sync.\n if (stored !== rawLocale) void setLocaleI18n(stored);\n applyDocumentAttrs(stored);\n return;\n }\n // No stored value → we're in System Default mode. Detect, apply,\n // but do NOT persist (so the System Default selection stays\n // sticky across reloads until the user explicitly chooses).\n const detected = detectBrowserLocale();\n void setLocaleI18n(detected);\n applyDocumentAttrs(detected);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentional one-shot detection\n }, []);\n\n return { locale, isSystemDefault, setLocale };\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n variant: {\n icon: '',\n compact: '',\n },\n },\n defaultVariants: { variant: 'icon' },\n});\n\nconst compactTriggerClasses = [\n 'ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-sm)]',\n 'ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]',\n 'ds:bg-transparent ds:text-foreground',\n 'ds:hover:bg-muted',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:opacity-50 ds:disabled:cursor-not-allowed',\n 'type-body-sm',\n].join(' ');\n\nconst popoverContentClasses = [\n 'ds:w-[18rem] ds:rounded-[var(--radius-md)]',\n 'ds:bg-background ds:text-foreground ds:border ds:border-border',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:overflow-hidden',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type LocalePickerVariant = 'icon' | 'compact';\n\nexport interface LocalePickerProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n variant?: LocalePickerVariant;\n /**\n * Controlled escape hatch — when omitted the picker reads/writes\n * `useLocale()` directly so a bare `<LocalePicker />` works with no\n * wiring. Pass both to opt into controlled mode.\n */\n value?: Locale;\n onValueChange?: (next: LocalePreference) => void;\n /** Disable interaction (greys out the trigger). */\n disabled?: boolean;\n /** Mark as busy (kept open / focusable but read-only). */\n loading?: boolean;\n /**\n * Side the search popover opens onto, relative to the trigger.\n * Defaults to `bottom` (standard dropdown). Use `end` (inline-end —\n * right in LTR, left in RTL) when nesting the LocalePicker inside\n * another popover/menu so the search surface flies out to the side\n * rather than stacking below.\n */\n popoverSide?: 'top' | 'bottom' | 'start' | 'end';\n}\n\n/**\n * Curated imperative handle for agent / external automation. The\n * `setLocale` parameter is widened to `string` (rather than the\n * narrower `Locale`) so untyped agent inputs don't have to thread the\n * `LOCALES_WITH_BUNDLES` constraint at the call site — the\n * implementation validates internally and no-ops on an unsupported\n * tag.\n */\nexport interface LocalePickerHandle {\n setLocale: (next: string) => void;\n /** Resolved locale tag actually applied to the page (always concrete). */\n getLocale: () => string;\n /**\n * True when the resolved locale came from `navigator.language` rather\n * than an explicit user choice. Read-back for `set_locale`: the\n * resolved tag alone cannot tell \"the user chose English\" from\n * \"we are following the browser, which happens to be English\".\n */\n getIsSystemDefault: () => boolean;\n}\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker.SearchList — the inline searchable list */\n/* */\n/* HeaderSettings renders this directly inside its DropdownMenu so the */\n/* same UX is reused without nesting another popover. Standalone the */\n/* root component renders this same widget inside a Popover. */\n/* ------------------------------------------------------------------ */\n\nexport interface LocalePickerSearchListProps {\n /**\n * Active selection. Either a `Locale` code or the\n * `LOCALE_SYSTEM_DEFAULT` sentinel (when the user hasn't made an\n * explicit choice and the kit is following `navigator.language`).\n * Defaults to the shared store.\n */\n value?: LocalePreference;\n /**\n * Fires after a successful selection. Accepts a concrete `Locale`\n * or `LOCALE_SYSTEM_DEFAULT` (when the user picks the \"System\n * Default\" row at the top of the list).\n *\n * Defaults to the shared setter (delegates to useLocale, persists\n * or clears storage, updates document.dir/lang).\n */\n onValueChange?: (next: LocalePreference) => void;\n /** Optional id for the search input (axe `aria-labelledby` chain). */\n inputId?: string;\n /** Disable the input + list interactions. */\n disabled?: boolean;\n /** Mark as busy (read-only). */\n loading?: boolean;\n className?: string;\n}\n\nconst searchListVariants = cva('ds:flex ds:flex-col', {\n variants: {\n loading: {\n true: 'ds:opacity-60 ds:pointer-events-none',\n false: '',\n },\n },\n defaultVariants: { loading: false },\n});\n\nexport const LocalePickerSearchList = forwardRef<\n HTMLDivElement,\n LocalePickerSearchListProps\n>(\n (\n {\n value: valueProp,\n onValueChange,\n inputId: inputIdProp,\n disabled = false,\n loading = false,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const store = useLocalePickerState();\n // Resolved-to-render-with: which locale name to display for\n // \"System Default ({{nativeName}})\". Always a concrete Locale.\n const resolvedLocale = store.locale;\n // Selection-state: the picker's current value is either an\n // explicit Locale or the System Default sentinel.\n const currentSelection: LocalePreference =\n valueProp ??\n (store.isSystemDefault ? LOCALE_SYSTEM_DEFAULT : store.locale);\n const generatedId = useId();\n const inputId = inputIdProp ?? `${generatedId}-search`;\n const [search, setSearch] = useState('');\n\n const handleSelect = useCallback(\n (code: string) => {\n if (disabled || loading) return;\n if (code === LOCALE_SYSTEM_DEFAULT) {\n if (onValueChange) {\n onValueChange(LOCALE_SYSTEM_DEFAULT);\n } else {\n store.setLocale(LOCALE_SYSTEM_DEFAULT);\n }\n return;\n }\n if (!isSupportedLocale(code)) return;\n if (onValueChange) {\n onValueChange(code);\n } else {\n store.setLocale(code);\n }\n },\n [disabled, loading, onValueChange, store],\n );\n\n return (\n <div\n ref={ref}\n className={[searchListVariants({ loading }), className]\n .filter(Boolean)\n .join(' ')}\n data-component=\"locale-picker-search-list\"\n >\n <Command\n label={t('navigation.localePicker.commandLabel')}\n // Defer to cmdk's defaultFilter — it ranks against both the\n // Item's `value` (the locale code) and `keywords` (the\n // native + English names), which is exactly the haystack we\n // want users to be able to match against. The Item's `value`\n // alone wouldn't surface \"jap\" → 日本語 because the code is\n // `ja`; the keyword \"Japanese\" handles that match.\n filter={defaultFilter}\n shouldFilter\n >\n {/* Input chrome borrows the kit's standard INPUT_SURFACE\n tokens (same as Combobox / Autocomplete) so the search\n field reads as a first-class kit input rather than a\n one-off list header. The wrapper carries the border /\n padding / focus-within ring; the inner Command.Input\n keeps its outline-less peer styling. */}\n <div\n className={[\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT.sm,\n INPUT_SURFACE_PADDING_X.sm,\n 'ds:flex ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:m-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Globe\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <Command.Input\n id={inputId}\n value={search}\n onValueChange={setSearch}\n placeholder={t('navigation.localePicker.searchPlaceholder')}\n aria-label={t('navigation.localePicker.searchLabel')}\n disabled={disabled || loading}\n className={[\n 'ds:peer ds:flex-1 ds:bg-transparent ds:border-0 ds:outline-none',\n 'ds:placeholder:text-muted-foreground ds:text-foreground',\n 'ds:text-[length:var(--font-size-sm)]',\n ].join(' ')}\n />\n </div>\n <Command.List\n className={[\n 'ds:max-h-[18rem] ds:overflow-y-auto',\n 'ds:p-[var(--spacing-xs)]',\n ].join(' ')}\n >\n <Command.Empty\n className={[\n 'ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'type-body-sm ds:text-muted-foreground',\n ].join(' ')}\n >\n {t('navigation.localePicker.empty')}\n </Command.Empty>\n\n {/* \"System Default\" — always the first row. Selected when\n the user hasn't picked an explicit locale; selecting it\n clears the localStorage entry and re-resolves to\n navigator.language. Mirrors the `'system'` value in\n ThemeToggle. */}\n {(() => {\n const isSystemSelected =\n currentSelection === LOCALE_SYSTEM_DEFAULT;\n const resolvedEntry = LOCALE_META[resolvedLocale];\n return (\n <Command.Item\n key={LOCALE_SYSTEM_DEFAULT}\n value={LOCALE_SYSTEM_DEFAULT}\n keywords={[\n 'system',\n 'default',\n 'auto',\n 'browser',\n resolvedEntry.nativeName,\n resolvedEntry.englishName,\n ]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSystemSelected || undefined}\n data-current={isSystemSelected ? 'true' : undefined}\n >\n <Monitor\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-muted-foreground ds:shrink-0\"\n />\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {t('navigation.localePicker.systemDefault', {\n locale: resolvedEntry.nativeName,\n })}\n </span>\n {isSystemSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSystemSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })()}\n\n {LOCALE_LIST.map((entry) => {\n const isSelected = currentSelection === entry.code;\n return (\n <Command.Item\n key={entry.code}\n value={entry.code}\n keywords={[entry.nativeName, entry.englishName]}\n disabled={disabled || loading}\n onSelect={handleSelect}\n className={[\n 'ds:relative ds:flex ds:cursor-pointer ds:select-none',\n 'ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:min-h-[var(--min-target-size)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:text-foreground ds:outline-none',\n 'ds:data-[highlighted]:bg-muted',\n 'ds:aria-selected:bg-muted',\n 'ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed',\n ].join(' ')}\n aria-selected={isSelected || undefined}\n data-current={isSelected ? 'true' : undefined}\n // `lang` on the row triggers font-cascade selection\n // so Arabic / Japanese / Devanagari / Greek glyphs\n // paint via the Noto Sans family. Intentionally\n // omits `dir` — the row layout follows the picker\n // surface's direction (LTR menu = LTR row, RTL menu\n // = RTL row). Setting `dir=\"rtl\"` per Arabic row\n // would flip just THAT row inside an LTR menu, which\n // breaks the visual rhythm with neighbouring rows.\n // Arabic text within the row still renders RTL at\n // the character level (script-driven) regardless.\n lang={entry.code}\n >\n {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n /* hasCoreFlag fallback: render the emoji glyph only\n when the kit doesn't ship an SVG for this\n country code. All 18 bundled locales currently\n have SVG flags, so this is dead code on the\n canonical set — kept for resilience when\n consumers extend the registry. */\n <span\n aria-hidden=\"true\"\n className=\"ds:text-base ds:shrink-0\"\n >\n {entry.flag}\n </span>\n )}\n <span className=\"ds:flex-1 ds:min-w-0 ds:truncate type-body-sm\">\n {entry.nativeName}\n </span>\n {isSelected ? (\n <Check\n aria-hidden=\"true\"\n className=\"ds:size-4 ds:text-primary ds:shrink-0\"\n />\n ) : null}\n {isSelected ? (\n <span className=\"ds:sr-only\">\n {t('navigation.localePicker.currentSelection')}\n </span>\n ) : null}\n </Command.Item>\n );\n })}\n </Command.List>\n </Command>\n </div>\n );\n },\n);\nLocalePickerSearchList.displayName = 'LocalePicker.SearchList';\n\n/* ------------------------------------------------------------------ */\n/* LocalePicker root — icon + compact trigger variants */\n/* ------------------------------------------------------------------ */\n\ninterface VariantRenderProps {\n state: LocalePickerState;\n rest: HTMLAttributes<HTMLDivElement>;\n forwardedRef: Ref<HTMLDivElement>;\n className?: string;\n disabled: boolean;\n loading: boolean;\n popoverSide: 'top' | 'bottom' | 'start' | 'end';\n}\n\nfunction IconTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'icon', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <IconButton\n disabled={disabled || loading}\n icon={\n <span className=\"ds:relative ds:inline-flex ds:items-center ds:justify-center\">\n <Globe aria-hidden className=\"ds:size-5\" />\n {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className={[\n // Corner chip overlaying the globe glyph.\n // `outline` paints a thin background-coloured\n // ring around the flag so it reads as a chip\n // rather than blending into the globe edge.\n 'ds:absolute ds:bottom-[-3px] ds:end-[-5px]',\n 'ds:outline ds:outline-2 ds:outline-background',\n // Scale down to chip size — Flag's sm tile is\n // larger than the original emoji glyph.\n 'ds:scale-75 ds:origin-bottom-end',\n ].join(' ')}\n />\n ) : null}\n </span>\n }\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n />\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nfunction CompactTrigger({\n state,\n rest,\n forwardedRef,\n className,\n disabled,\n loading,\n popoverSide,\n}: VariantRenderProps) {\n const { t } = useTranslation();\n const entry = LOCALE_META[state.locale];\n return (\n <div\n ref={forwardedRef}\n data-component=\"locale-picker\"\n data-component-id={rest.id}\n className={wrapperVariants({ variant: 'compact', className })}\n {...rest}\n >\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n disabled={disabled || loading}\n className={compactTriggerClasses}\n aria-label={t('navigation.localePicker.trigger', {\n locale: entry.nativeName,\n })}\n >\n {hasCoreFlag(entry.countryCode) ? (\n <CoreFlag\n country={entry.countryCode}\n size=\"sm\"\n shape=\"rectangle\"\n rounded=\"sm\"\n className=\"ds:shrink-0\"\n />\n ) : (\n <Globe aria-hidden className=\"ds:size-4 ds:shrink-0\" />\n )}\n <span\n className=\"ds:flex-1 ds:truncate type-body-sm\"\n lang={entry.code}\n >\n {entry.nativeName}\n </span>\n </button>\n </Popover.Trigger>\n <Popover.Content\n side={popoverSide}\n align=\"start\"\n sideOffset={8}\n className={popoverContentClasses}\n aria-label={t('navigation.localePicker.popupLabel')}\n >\n <LocalePickerSearchList\n value={state.locale}\n onValueChange={state.setLocale}\n disabled={disabled}\n loading={loading}\n />\n </Popover.Content>\n </Popover.Root>\n </div>\n );\n}\n\nconst LocalePickerRoot = forwardRef<HTMLDivElement, LocalePickerProps>(\n (props, ref) => {\n const {\n variant = 'icon',\n value,\n onValueChange,\n disabled = false,\n loading = false,\n popoverSide = 'bottom',\n className,\n id,\n ...rest\n } = props as LocalePickerProps & { id?: string };\n\n const store = useLocalePickerState();\n const resolvedLocale = value ?? store.locale;\n\n // Controlled overlay: when a consumer passes `onValueChange`, route\n // selections to them instead of the shared store. Document attrs +\n // localStorage are still updated so the picker behaves consistently\n // either way.\n const setLocale = useCallback(\n (next: LocalePreference) => {\n if (onValueChange) {\n onValueChange(next);\n // Side-effects in controlled mode: still write through to\n // the persistence + document attrs so the rest of the page\n // re-renders even though we're routing state to the consumer.\n if (next === LOCALE_SYSTEM_DEFAULT) {\n safeRemoveStorage(LOCALE_STORAGE_KEY);\n const detected = detectBrowserLocale();\n applyDocumentAttrs(detected);\n } else if (isSupportedLocale(next)) {\n applyDocumentAttrs(next);\n safeWriteStorage(LOCALE_STORAGE_KEY, next);\n }\n return;\n }\n store.setLocale(next);\n },\n [onValueChange, store],\n );\n\n const state: LocalePickerState = useMemo(\n () => ({\n locale: resolvedLocale,\n isSystemDefault: store.isSystemDefault,\n setLocale,\n }),\n [resolvedLocale, store.isSystemDefault, setLocale],\n );\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n const stateRef = useRef(state);\n stateRef.current = state;\n const agentHandle = useMemo<LocalePickerHandle>(\n () => ({\n setLocale: (next: string) => {\n if (isSupportedLocale(next)) {\n stateRef.current.setLocale(next);\n }\n },\n // Read-back for `set_locale` — the setter swallows unsupported\n // tags, so these are the only way an agent can tell a switch\n // landed from one that was dropped.\n getLocale: () => stateRef.current.locale,\n getIsSystemDefault: () => stateRef.current.isSystemDefault,\n }),\n [],\n );\n useAgentRegistration(localePickerAgent, agentHandle, id);\n\n if (variant === 'compact') {\n return (\n <CompactTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n }\n return (\n <IconTrigger\n state={state}\n rest={rest}\n forwardedRef={forwardedRef}\n className={className}\n disabled={disabled}\n loading={loading}\n popoverSide={popoverSide}\n />\n );\n },\n);\nLocalePickerRoot.displayName = 'LocalePicker';\n\nexport const LocalePicker = Object.assign(LocalePickerRoot, {\n SearchList: LocalePickerSearchList,\n});\n"],"names":["CORE_RECTANGLE_URL_MAP","safeFlagGlob","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","CORE_SQUARE_URL_MAP","__vite_glob_1_0","__vite_glob_1_1","__vite_glob_1_2","__vite_glob_1_3","__vite_glob_1_4","__vite_glob_1_5","__vite_glob_1_6","__vite_glob_1_7","__vite_glob_1_8","__vite_glob_1_9","__vite_glob_1_10","__vite_glob_1_11","__vite_glob_1_12","__vite_glob_1_13","__vite_glob_1_14","__vite_glob_1_15","__vite_glob_1_16","__vite_glob_1_17","hasCoreFlag","country","CoreFlag","forwardRef","label","shape","size","rounded","className","rest","ref","code","createElement","FlagView","flagClasses","LOCALE_META","LOCALES_WITH_BUNDLES","LOCALE_LIST","a","b","localePickerAgent","handle","args","LOCALE_STORAGE_KEY","LOCALE_SYSTEM_DEFAULT","detectionFired","isSupportedLocale","value","safeReadStorage","key","safeWriteStorage","detectBrowserLocale","raw","base","applyDocumentAttrs","locale","root","safeRemoveStorage","useLocalePickerState","rawLocale","setLocaleI18n","useLocale","isSystemDefault","setIsSystemDefault","useState","setLocale","useCallback","next","detected","useEffect","stored","wrapperVariants","cva","compactTriggerClasses","popoverContentClasses","searchListVariants","LocalePickerSearchList","valueProp","onValueChange","inputIdProp","disabled","loading","useTranslation","store","resolvedLocale","currentSelection","generatedId","useId","inputId","search","setSearch","handleSelect","jsx","jsxs","Command","defaultFilter","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","Globe","isSystemSelected","resolvedEntry","Monitor","Check","entry","isSelected","IconTrigger","state","forwardedRef","popoverSide","Popover","IconButton","CompactTrigger","LocalePickerRoot","props","variant","id","useMemo","useRef","useImperativeHandle","stateRef","agentHandle","useAgentRegistration","LocalePicker"],"mappings":";;;;;;;;;;;;;;;AAgCA,MAAMA,IAAuCC;AAAA,EAAa,MACxD,uBAAA,OAAA;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,EAAA,CAAA;AAIF,GAEMC,KAAoCnB;AAAA,EAAa,MACrD,uBAAA,OAAA;AAAA,IAAA,+CAAAoB;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAAAC;AAAA,IAAA,+CAA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,MAAA;AAAA,QACC,OAAAL;AAAA,QACA,MAAA9E;AAAA,QACA,cAAA+E;AAAA,QACA,WAAAhF;AAAA,QACA,UAAAoD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA4B;AAAA,MAAA;AAAA,IAAA,IAKJ,gBAAAjB;AAAA,MAACc;AAAA,MAAA;AAAA,QACC,OAAAC;AAAA,QACA,MAAA9E;AAAA,QACA,cAAA+E;AAAA,QACA,WAAAhF;AAAA,QACA,UAAAoD;AAAA,QACA,SAAAC;AAAA,QACA,aAAA4B;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAI,EAAiB,cAAc;AAExB,MAAMU,KAAe,OAAO,OAAOV,GAAkB;AAAA,EAC1D,YAAYrC;AACd,CAAC;"}
|
|
@@ -3,7 +3,7 @@ import { forwardRef as Q, useId as W, useMemo as w, useState as N, useEffect as
|
|
|
3
3
|
import { c } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as L } from "react-i18next";
|
|
5
5
|
import { A as Y, M as ee, a as te, P as se, b as ne, u as oe } from "./index.modern-Zta-A4Jm.js";
|
|
6
|
-
import { B as ae } from "./button-
|
|
6
|
+
import { B as ae } from "./button-nJaPh_HC.js";
|
|
7
7
|
import { u as re } from "./registry-DvAUVLHh.js";
|
|
8
8
|
import { M as ie } from "./map-pin-BaY37-Km.js";
|
|
9
9
|
import { E as de } from "./external-link-CY6zAXXU.js";
|
|
@@ -442,4 +442,4 @@ fe.displayName = "MapView";
|
|
|
442
442
|
export {
|
|
443
443
|
fe as M
|
|
444
444
|
};
|
|
445
|
-
//# sourceMappingURL=map-view-
|
|
445
|
+
//# sourceMappingURL=map-view-CCAlC9IL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-view-iwSDRW3t.js","sources":["../../src/components/map-view/map-view.agent.ts","../../src/components/map-view/map-view.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — MapView. */\n/* */\n/* Read-safety actions on the kit's Google Maps wrapper. State is the */\n/* current centre / zoom / selected marker; actions pan, zoom, and */\n/* select markers programmatically. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { MapViewHandle, MapLatLng } from './map-view';\n\nexport const mapViewAgent: AgentAdapter<MapViewHandle> = {\n id: 'map-view',\n // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick\n // (NON-persisting marker focus, no value state slot).\n capabilities: ['scroll', 'set_value', 'pick'],\n // Every action routes through the imperative bridge, which only exists\n // inside the `APIProvider` subtree — and that subtree renders only once\n // consent is granted (the default is `consentGranted={false}`). Under\n // the gate all three actions are silent no-ops. `consentGranted` is the\n // slot that tells an agent so; `center` / `zoom` are read off the live\n // map because Google clamps zoom and animates pans, so requested is not\n // applied; `selectedMarkerId` is the only confirmation the host accepted\n // a `select_marker` proposal.\n //\n // A9: marker ids only (`MapMarker.id` is a stable opaque id). Never\n // `MapMarker.label`, never the `address` prop (consumer-supplied free\n // text, PII in any patient-address deployment), never `apiKey`.\n state: {\n consentGranted: {\n type: 'boolean',\n descriptionKey: 'ui.agent.mapView.state.consentGranted',\n description:\n 'True when the GDPR consent gate has been passed and the Google Maps subtree is mounted. Read this FIRST — while it is false every action is a silent no-op against a placeholder, and nothing else in the surface says so.',\n read: (handle) => handle.isConsentGranted(),\n },\n markerCount: {\n type: 'number',\n descriptionKey: 'ui.agent.mapView.state.markerCount',\n description:\n 'Number of markers the consumer passed. Zero means there is nothing for `select_marker` to select. A count only — no ids, labels or positions.',\n read: (handle) => handle.getMarkerCount(),\n },\n selectedMarkerId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.mapView.state.selectedMarkerId',\n description:\n 'Id of the marker the host currently holds as selected, or null. Selection is fully controlled by the consumer, so `select_marker` only proposes — this slot is the only way to see whether the proposal was accepted.',\n read: (handle) => handle.getSelectedMarkerId(),\n },\n center: {\n type: '{ lat: number; lng: number } | null',\n descriptionKey: 'ui.agent.mapView.state.center',\n description:\n 'Live map centre in lat/lng, or null while the map subtree is unmounted (consent not granted). The read-back for `pan_to`.',\n read: (handle) => handle.getCenter(),\n },\n zoom: {\n type: 'number | null',\n descriptionKey: 'ui.agent.mapView.state.zoom',\n description:\n \"Live zoom level, or null while the map subtree is unmounted. Google clamps zoom to the map type's range, so this is not necessarily the value last passed to `set_zoom`.\",\n read: (handle) => handle.getZoom(),\n },\n },\n actions: {\n pan_to: {\n // Ephemeral viewport move, no data loss → read.\n safety: 'read',\n argsType: '{ position: { lat: number; lng: number } }',\n argsSchema: {\n type: 'object',\n properties: {\n position: {\n type: 'object',\n properties: {\n lat: { type: 'number', description: 'Latitude in degrees.' },\n lng: { type: 'number', description: 'Longitude in degrees.' },\n },\n required: ['lat', 'lng'],\n },\n },\n required: ['position'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.panTo',\n description:\n 'Pan the map to a new centre without changing zoom. Read the `center` slot back to confirm — Google animates the pan, so the applied centre settles after the call.',\n errors: [\n 'Silent no-op while `consentGranted` is false — there is no map, only the consent placeholder.',\n ],\n invoke: (handle, args: { position: MapLatLng }) => {\n handle.panTo(args.position);\n },\n },\n set_zoom: {\n // Ephemeral viewport zoom, no data loss → read.\n safety: 'read',\n argsType: '{ zoom: number }',\n argsSchema: {\n type: 'object',\n properties: {\n zoom: {\n type: 'number',\n description: 'Zoom level, typical range 1–20.',\n },\n },\n required: ['zoom'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.setZoom',\n description:\n 'Set the map zoom level (typical range 1–20). Read the `zoom` slot back — Google clamps the request to the map type’s supported range, so requested and applied can differ.',\n errors: [\n 'Silent no-op while `consentGranted` is false — there is no map, only the consent placeholder.',\n \"Requested zoom is clamped to the map type's range; `zoom` reports what was actually applied.\",\n ],\n invoke: (handle, args: { zoom: number }) => {\n handle.setZoom(args.zoom);\n },\n },\n select_marker: {\n // Ephemeral marker focus, no data loss → read.\n safety: 'read',\n argsType: '{ id: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: ['string', 'null'],\n description: 'Marker id to select, or null to clear the selection.',\n },\n },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.selectMarker',\n description:\n \"Propose a marker selection by id, or pass null to clear it. Fires the host's `onMarkerClick`; selection is controlled by the host, so read the `selectedMarkerId` slot back to see whether it accepted.\",\n errors: [\n 'Silent no-op while `consentGranted` is false — there is no map, only the consent placeholder.',\n 'The host owns `selectedMarkerId` and may ignore the proposal; `selectedMarkerId` is unchanged when it does.',\n ],\n invoke: (handle, args: { id: string | null }) => {\n handle.selectMarker(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'map-view',\n description: 'Marks the element as a kit MapView.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* MapView — kit wrapper over @vis.gl/react-google-maps. */\n/* */\n/* - Loads the Google Maps JS API on demand via the library's */\n/* `APIProvider`; consumer supplies the key (no kit-side cache). */\n/* - Defaults to a CONSENT-GATED placeholder (`consentGranted={false}`) */\n/* so the third-party load never happens before the consumer flips */\n/* the opt-in. GDPR-safe by default. */\n/* - Theme-reactive: the Google Maps `styles` JSON re-resolves on every */\n/* `documentElement.class` mutation (same pattern as Sparkline). */\n/* Consumers may pass `mapId` to switch to a cloud-styled map */\n/* instead, in which case `styles` is ignored. */\n/* - `data-component=\"map-view\"` lives on the outer span; the inner */\n/* `<Map>` mounts inside it. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { MapPin, ExternalLink } from 'lucide-react';\nimport {\n APIProvider,\n Map as GoogleMap,\n AdvancedMarker,\n Marker,\n Pin,\n useMap,\n} from '@vis.gl/react-google-maps';\nimport { Button } from '../button';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { mapViewAgent } from './map-view.agent';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface MapLatLng {\n lat: number;\n lng: number;\n}\n\nexport interface MapMarker {\n /** Stable id — used for keyed re-rendering and `onMarkerClick`. */\n id: string;\n /** Position in lat/lng. */\n position: MapLatLng;\n /** Optional accessible label — falls back to the id. */\n label?: string;\n}\n\nexport interface MapViewHandle {\n /** Pan the map to a new centre without changing zoom. */\n panTo: (position: MapLatLng) => void;\n /** Set zoom (typical range 1–20). */\n setZoom: (zoom: number) => void;\n /** Programmatically select a marker (fires `onMarkerClick`). */\n selectMarker: (id: string | null) => void;\n /* ---- read-back ------------------------------------------------- */\n /**\n * True when the Maps JS API subtree is mounted. While this is false\n * the three actions above are silent no-ops — the consent gate has\n * not been passed and there is no map to drive.\n */\n isConsentGranted: () => boolean;\n /** Live map centre, or `null` while the map subtree is unmounted. */\n getCenter: () => MapLatLng | null;\n /**\n * Live zoom level, or `null` while the map subtree is unmounted.\n * Google clamps to the map type's range, so this is not necessarily\n * the value last passed to `setZoom`.\n */\n getZoom: () => number | null;\n /**\n * The controlled `selectedMarkerId` prop as the host currently holds\n * it. `selectMarker` only proposes a selection — the host is free to\n * ignore it, and this is the only way to see whether it did.\n */\n getSelectedMarkerId: () => string | null;\n /** Number of markers passed to the component. Count only, no ids. */\n getMarkerCount: () => number;\n}\n\n/**\n * The slice of `MapViewHandle` that needs a live `google.maps.Map`.\n * Built inside the `APIProvider` subtree by `MapImperativeBridge`; the\n * outer component composes it with the props-derived getters, and holds\n * `null` whenever the subtree is unmounted.\n */\ntype MapBridgeHandle = Pick<\n MapViewHandle,\n 'panTo' | 'setZoom' | 'selectMarker' | 'getCenter' | 'getZoom'\n>;\n\nexport interface MapViewProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onClick'>,\n VariantProps<typeof mapViewVariants> {\n /** Opaque instance id — emitted as `data-component-id`. */\n id?: string;\n /** Google Maps JS API key. Consumer-owned; never cached by the kit. */\n apiKey: string;\n /** Map centre (lat/lng). Required so the consent placeholder can also use it. */\n center: MapLatLng;\n /** Initial zoom. Default 15 (city-block detail, matches booking site). */\n zoom?: number;\n /**\n * Markers to render. The first marker auto-selects when no\n * `selectedMarkerId` is given.\n */\n markers?: MapMarker[];\n /** Controlled selection — fires `onMarkerClick` with the new id (or null on map click). */\n selectedMarkerId?: string | null;\n /** Fires when a marker is clicked, or `null` when the map background is clicked. */\n onMarkerClick?: (id: string | null) => void;\n /**\n * GDPR consent gate. When `false` (default) the component renders a\n * placeholder with a translated CTA — the Maps JS API is **not**\n * loaded. Flip to `true` once the consumer has captured opt-in.\n */\n consentGranted?: boolean;\n /** Fires when the consumer clicks the \"Load map\" CTA in the placeholder. */\n onConsentRequest?: () => void;\n /**\n * Optional address string shown in the consent placeholder so the\n * surface is useful before the map loads. Also used to build the\n * fallback \"Open in Google Maps\" link target.\n */\n address?: string;\n /**\n * Cloud-styled-map id. When set, takes precedence over the JSON\n * `styles` array and disables the theme-bridge re-fire. Use when\n * you've provisioned a styled map in Google Cloud Console.\n */\n mapId?: string;\n /**\n * Override the consent-placeholder description text. The default\n * (`t('mapView.consentDescription')`) is a generic IP-disclosure\n * line. Consumers operating under specific GDPR / ePrivacy\n * disclosures (jurisdiction, named controller, policy link) should\n * supply their own text via this prop. Pass any `ReactNode` — a\n * paragraph, a localised `<Trans>` instance, etc.\n */\n consentDescription?: ReactNode;\n /**\n * Replace the kit-rendered \"Load map\" button with custom CTA chrome.\n * Use when the consent dialog needs a policy link, a specific\n * jurisdiction phrasing, or a different surface (Tooltip-wrapped\n * button, link to a settings page, etc.). When omitted the kit\n * renders its own `<Button>` — that button calls `onConsentRequest`\n * if provided, otherwise flips MapView's internal opt-in state so\n * the map loads inline.\n */\n consentCta?: ReactNode;\n /**\n * Visual surface. Default `bordered` (current behaviour: 1px\n * `--border` outline + `--radius-md`). `elevated` replaces the\n * border with `--shadow-card`, matching `<Card variant=\"elevated\">`.\n * `bare` drops both — map is flush against the page canvas.\n */\n surface?: 'bordered' | 'elevated' | 'bare';\n /** Accessible label for the map region. Falls back to `t('mapView.label')`. */\n ariaLabel?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst mapViewVariants = cva(\n ['ds:relative ds:overflow-hidden ds:block', 'ds:bg-[var(--muted)]'].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:[--map-block-size:14rem]',\n md: 'ds:[--map-block-size:20rem]',\n lg: 'ds:[--map-block-size:28rem]',\n // `fill` defers sizing to the parent. The outer takes\n // `block-size: 100%` so the inner (also 100%) has something\n // to inherit from. Use inside a viewport-locked column —\n // `<PracticeResults variant=\"map-first\">` wires this through\n // automatically; standalone consumers must give the parent\n // a constrained block-size or the map collapses to 0.\n fill: 'ds:[block-size:100%]',\n },\n surface: {\n bordered:\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]',\n elevated:\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n bare: 'ds:rounded-none ds:border-0',\n },\n },\n defaultVariants: { size: 'md', surface: 'bordered' },\n },\n);\n\n// Inner block-size: percentage when `size=\"fill\"`, rem-token otherwise.\n// Splitting this out (instead of compound-variants) keeps the size\n// switch readable and avoids enumerating every (size × surface) pair.\nconst innerSurfaceVariants = cva('ds:block ds:inline-size-full', {\n variants: {\n size: {\n sm: 'ds:[block-size:var(--map-block-size)]',\n md: 'ds:[block-size:var(--map-block-size)]',\n lg: 'ds:[block-size:var(--map-block-size)]',\n fill: 'ds:[block-size:100%]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\nconst consentChromeVariants = cva(\n [\n 'ds:absolute ds:inset-0',\n 'ds:flex ds:flex-col ds:items-center ds:justify-center',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:bg-[var(--muted)] ds:text-[var(--foreground)]',\n 'ds:text-center',\n ].join(' '),\n);\n\nconst consentTitleVariants = cva('type-heading-3 ds:m-0');\n\nconst consentDescriptionVariants = cva(\n 'type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0',\n);\n\n/* ------------------------------------------------------------------ */\n/* Inner imperative bridge */\n/* */\n/* `useMap()` only resolves inside the APIProvider tree, so the */\n/* imperative actions live in a tiny inner component that the outer */\n/* `MapView` mounts conditionally. It exposes the `panTo` / `setZoom` */\n/* etc. to the forwardRef via a `useImperativeHandle` callback prop. */\n/* ------------------------------------------------------------------ */\n\ninterface MapImperativeBridgeProps {\n /** Called with the live handle on mount, and with `null` on unmount. */\n onHandleReady: (handle: MapBridgeHandle | null) => void;\n onMarkerSelect: (id: string | null) => void;\n}\n\nfunction MapImperativeBridge({\n onHandleReady,\n onMarkerSelect,\n}: MapImperativeBridgeProps): null {\n const map = useMap();\n useEffect(() => {\n if (!map) return;\n onHandleReady({\n panTo: (position) => map.panTo(position),\n setZoom: (zoom) => map.setZoom(zoom),\n selectMarker: (id) => onMarkerSelect(id),\n // Read straight off the live map: Google clamps `setZoom` to the\n // map type's range and animates `panTo`, so requested and applied\n // are not the same value.\n getCenter: () => map.getCenter()?.toJSON() ?? null,\n getZoom: () => map.getZoom() ?? null,\n });\n // Drop the handle when the subtree unmounts (consent revoked, or the\n // component tears down) so the outer getters answer `null` instead of\n // reporting a dead map's last known position.\n return () => onHandleReady(null);\n }, [map, onHandleReady, onMarkerSelect]);\n return null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Consent placeholder */\n/* ------------------------------------------------------------------ */\n\ninterface ConsentPlaceholderProps {\n address: string | undefined;\n description: ReactNode;\n /**\n * Click handler for the \"Load map\" button. Always rendered. When the\n * consumer provides `onConsentRequest` it owns the state transition\n * (typically: open a GDPR dialog, then flip `consentGranted` to true\n * after acceptance). When omitted, the kit's `MapView` falls back to\n * its own internal opt-in toggle — clicking grants consent for this\n * MapView instance only, no consumer plumbing required. This default\n * fixes a regression where the button was conditionally rendered and\n * any consumer omitting `onConsentRequest` left the patient with no\n * way to load the map (booking-website 0.31.0 hit this).\n */\n onLoadMap: () => void;\n openInGoogleMapsHref: string;\n /**\n * Custom CTA — replaces the kit-rendered `<Button>` when the consumer\n * needs a different surface (e.g. a Tooltip-wrapped button with a\n * policy link). The kit's button is still the recommended path; this\n * slot exists for consumers operating under specific compliance UX\n * requirements (jurisdiction, named controller, policy link). Pass\n * any `ReactNode`.\n */\n consentCta: ReactNode | undefined;\n}\n\nfunction ConsentPlaceholder({\n address,\n description,\n onLoadMap,\n openInGoogleMapsHref,\n consentCta,\n}: ConsentPlaceholderProps): ReactNode {\n const { t } = useTranslation();\n return (\n <div className={consentChromeVariants()} data-testid=\"map-view-consent\">\n <MapPin\n aria-hidden=\"true\"\n className=\"ds:size-6 ds:text-[var(--muted-foreground)]\"\n />\n <p className={consentTitleVariants()}>{t('mapView.consentTitle')}</p>\n {address ? (\n <p\n className={consentDescriptionVariants()}\n data-testid=\"map-view-address\"\n >\n {address}\n </p>\n ) : null}\n <p className={consentDescriptionVariants()}>{description}</p>\n <div className=\"ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center\">\n {consentCta ?? (\n <Button\n type=\"button\"\n intent=\"primary\"\n size=\"sm\"\n onClick={onLoadMap}\n data-testid=\"map-view-load-cta\"\n >\n {t('mapView.consentCta')}\n </Button>\n )}\n <a\n href={openInGoogleMapsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary)] ds:underline ds:underline-offset-2\"\n >\n {t('mapView.openInGoogleMaps')}\n <ExternalLink aria-hidden=\"true\" className=\"ds:size-3\" />\n </a>\n </div>\n </div>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* MapView */\n/* ------------------------------------------------------------------ */\n\nexport const MapView = forwardRef<MapViewHandle, MapViewProps>(\n (\n {\n id,\n apiKey,\n center,\n zoom = 15,\n markers,\n selectedMarkerId,\n onMarkerClick,\n consentGranted = false,\n onConsentRequest,\n address,\n consentDescription,\n consentCta,\n mapId,\n size,\n surface,\n ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const rawId = useId();\n const instanceId = useMemo(\n () => `map-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n\n // Reduced-motion gating. Google's own pan / zoom animations\n // happen inside the Maps JS API and the kit can't reach into\n // those — but the kit's own programmatic `panTo` calls (triggered\n // by prop changes via the controlled-sync effect below) can be\n // suppressed. When `prefers-reduced-motion: reduce` is set, we\n // skip the synthetic `panTo` so the consumer's prop change\n // results in a hard recenter rather than an animated glide.\n const [reducedMotion, setReducedMotion] = useState(false);\n useEffect(() => {\n if (typeof window === 'undefined') return undefined;\n const mql = window.matchMedia('(prefers-reduced-motion: reduce)');\n const sync = (): void => setReducedMotion(mql.matches);\n sync();\n mql.addEventListener('change', sync);\n return () => mql.removeEventListener('change', sync);\n }, []);\n\n // The \"Open in Google Maps\" fallback link — works without any\n // third-party script load. Uses the modern `?api=1&query=…` form\n // which the booking site already employs.\n const openInGoogleMapsHref = useMemo(() => {\n const query = address\n ? encodeURIComponent(address)\n : `${center.lat},${center.lng}`;\n return `https://www.google.com/maps/search/?api=1&query=${query}`;\n }, [address, center.lat, center.lng]);\n\n // 0.33.5: removed the kit's `getGoogleMapsTheme()` JSON-styles\n // override. Previously, when `mapId` was absent the kit painted\n // water / roads / landscape with kit tokens — a calm muted-grey\n // palette that diverged from the standard Google Maps appearance\n // users expect in every other maps surface they touch. Google's\n // default (blue water, beige land, named-road colours) is more\n // familiar and reads as a \"real map\" rather than a stylised one.\n //\n // Consumers wanting brand-themed colours opt in via `mapId` and\n // configure the palette in Google Cloud Console — that's the\n // Google-recommended path. The `getGoogleMapsTheme` export stays\n // in `src/tokens/google-maps-theme.ts` so consumers wanting the\n // old behaviour can apply the styles themselves, but the kit\n // does NOT install them by default any more.\n //\n // Side benefit: dropped the MutationObserver that previously\n // watched documentElement.class for theme switches — no more\n // observer churn on every theme toggle.\n\n // Imperative handle plumbing — populated by the inner bridge once\n // the APIProvider tree resolves a `Map` instance.\n const handleRef = useRef<MapBridgeHandle | null>(null);\n const onHandleReady = useCallback((handle: MapBridgeHandle | null) => {\n handleRef.current = handle;\n }, []);\n\n // Read in the OUTER component, not through `handleRef` — these three\n // must still answer when the map subtree is unmounted, which is\n // exactly the situation an agent needs explaining. Assigned during\n // render, below, once `effectiveConsent` exists.\n const consentRef = useRef(false);\n const selectedMarkerIdRef = useRef<string | null>(null);\n const markerCountRef = useRef(0);\n\n const buildHandle = useCallback(\n (): MapViewHandle => ({\n panTo: (position) => handleRef.current?.panTo(position),\n setZoom: (z) => handleRef.current?.setZoom(z),\n selectMarker: (markerId) => handleRef.current?.selectMarker(markerId),\n // Without `isConsentGranted` an agent has no way to learn that\n // its pan / zoom / select was swallowed by the GDPR gate rather\n // than applied: under the default (`consentGranted={false}`) the\n // whole Maps subtree is unmounted and every action optional-chains\n // into nothing.\n isConsentGranted: () => consentRef.current,\n getCenter: () => handleRef.current?.getCenter() ?? null,\n getZoom: () => handleRef.current?.getZoom() ?? null,\n getSelectedMarkerId: () => selectedMarkerIdRef.current,\n getMarkerCount: () => markerCountRef.current,\n }),\n [],\n );\n useImperativeHandle(ref, buildHandle, [buildHandle]);\n\n const agentHandle = useMemo<MapViewHandle>(\n () => buildHandle(),\n [buildHandle],\n );\n useAgentRegistration(mapViewAgent, agentHandle, id);\n\n // Controlled-feeling propagation: vis.gl's `<Map>` reads `center`\n // and `zoom` as initial values only (via `defaultCenter` /\n // `defaultZoom`). To honour the documented \"live prop\" contract\n // we shim post-mount sync through the imperative bridge — a\n // parent that swaps offices by changing `center` re-centres the\n // map. User drag does NOT trigger this because the prop doesn't\n // change on user gesture, so the effect doesn't fire and the\n // map stays where the user left it.\n useEffect(() => {\n // Skip the animated pan under reduced-motion preference; the\n // map will still recentre on the next render via the agent\n // handle's `panTo`, but Google's own glide animation runs\n // either way (kit can't reach inside it). At least the kit's\n // own initiated pan is gated.\n if (reducedMotion) return;\n handleRef.current?.panTo(center);\n // Including `center` (the object reference) instead of\n // `center.lat`/`center.lng` would fire on every parent render\n // even when the coordinates are identical, fighting user drag.\n // The destructured deps are intentional.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [center.lat, center.lng, reducedMotion]);\n useEffect(() => {\n handleRef.current?.setZoom(zoom);\n }, [zoom]);\n\n // Internal opt-in fallback. The `consentGranted` prop is the\n // controlled path — consumer flips it after capturing GDPR\n // acceptance through their own dialog and re-renders. When the\n // consumer omits `onConsentRequest` they're opting out of that\n // workflow, so the kit needs a sensible default click handler on\n // the placeholder's button. `internalConsent` tracks that opt-in\n // for this instance only; the map renders when either signal is\n // truthy. The 0.31.0 regression was conditionally rendering the\n // button on `onConsentRequest` — patients of consumers without the\n // hook saw the placeholder with no way to proceed.\n const [internalConsent, setInternalConsent] = useState(false);\n const effectiveConsent = consentGranted || internalConsent;\n // Mirror the three props-derived agent state slots. Assigned during\n // render so a read immediately after a prop change sees the settled\n // value. Ids and a count only — never `MapMarker.label`, never the\n // `address` prop (consumer-supplied free text, PII in any\n // patient-address deployment), never `apiKey`.\n consentRef.current = effectiveConsent;\n selectedMarkerIdRef.current = selectedMarkerId ?? null;\n markerCountRef.current = (markers ?? []).length;\n const handleLoadMap = useCallback(() => {\n if (onConsentRequest) {\n onConsentRequest();\n // The consumer typically flips `consentGranted` to true on the\n // next render. Flip the internal state too so the map still\n // loads if the consumer forgets to update its prop (the\n // common-case footgun this fallback exists to defuse).\n setInternalConsent(true);\n return;\n }\n setInternalConsent(true);\n }, [onConsentRequest]);\n\n return (\n <div\n className={mapViewVariants({ size, surface, className })}\n data-component=\"map-view\"\n data-component-id={id ?? instanceId}\n role=\"region\"\n aria-label={ariaLabel ?? t('mapView.label')}\n {...rest}\n >\n <div className={innerSurfaceVariants({ size })}>\n {effectiveConsent ? (\n <APIProvider\n apiKey={apiKey}\n // Pull the active i18next locale through so map UI text\n // (zoom controls, attribution) localises to match the\n // surrounding kit chrome.\n language={i18n.language}\n >\n <GoogleMap\n defaultCenter={center}\n defaultZoom={zoom}\n mapId={mapId}\n gestureHandling=\"cooperative\"\n disableDefaultUI={false}\n onClick={() => onMarkerClick?.(null)}\n // `<Map>` reads its own bounding rect for tile sizing.\n // Without explicit dimensions it collapses to 0×0, so\n // we pass kit-class sizing through `className` — vis.gl\n // forwards `className` straight to the rendered root.\n className=\"ds:[inline-size:100%] ds:[block-size:100%]\"\n >\n <MapImperativeBridge\n onHandleReady={onHandleReady}\n onMarkerSelect={(markerId) => onMarkerClick?.(markerId)}\n />\n {(markers ?? []).map((marker) => {\n // Selection state is exposed to the consumer via\n // `data-selected` on the marker root so consumers can\n // style their own InfoWindow / sidebar highlight from\n // it. The kit does NOT swap the Pin's fill colour on\n // selection — `--accent` (magenta-500 in light theme)\n // fails AA on white per 05-accessibility.mdx, and the\n // alternative tokens that pass (`--info`, `--success`)\n // carry semantic baggage. Visual selection state is\n // the consumer's call.\n const isSelected =\n selectedMarkerId != null && selectedMarkerId === marker.id;\n const accessibleLabel = t('mapView.markerLabel', {\n label: marker.label ?? marker.id,\n });\n // Pin implementation switches on whether the\n // consumer supplied `mapId`. Google's\n // AdvancedMarkerElement requires the Map instance to\n // be initialised with a valid Map ID — without one\n // the API logs an error (\"La mappa è stata\n // inizializzata senza un ID mappa valido\") and any\n // AdvancedMarker rendered against that map fails to\n // appear. Cloud Map IDs are an opt-in feature; many\n // consumers (booking-website env without\n // GOOGLE_MAPS_MAP_ID, the OSS demo, etc.) legitimately\n // omit it.\n //\n // Fall back to the classic <Marker> (a thin wrapper\n // around google.maps.Marker) when mapId is absent.\n // Google has formally deprecated google.maps.Marker\n // but it still renders cleanly and produces no\n // console errors; the only loss is the brand-tinted\n // <Pin> chrome (which Marker doesn't accept as a\n // child). When a consumer wants the styled pin they\n // can opt back in by supplying `mapId`.\n if (mapId) {\n return (\n <AdvancedMarker\n key={marker.id}\n position={marker.position}\n // `title` becomes the HTML `title` attribute on\n // Google's marker wrapper — that's a tooltip, not\n // a reliable accessible name. The wrapper also\n // receives `aria-label` which Google honours as\n // the SR-announced name. Both are set so sighted\n // hover tooltips and SR labels stay aligned.\n title={accessibleLabel}\n aria-label={accessibleLabel}\n data-selected={isSelected ? 'true' : 'false'}\n onClick={() => onMarkerClick?.(marker.id)}\n >\n <Pin\n background={'var(--primary)'}\n borderColor={'var(--primary)'}\n glyphColor={'var(--primary-foreground)'}\n />\n </AdvancedMarker>\n );\n }\n return (\n <Marker\n key={marker.id}\n position={marker.position}\n title={accessibleLabel}\n onClick={() => onMarkerClick?.(marker.id)}\n />\n );\n })}\n </GoogleMap>\n </APIProvider>\n ) : (\n <ConsentPlaceholder\n address={address}\n description={\n consentDescription ?? t('mapView.consentDescription')\n }\n onLoadMap={handleLoadMap}\n consentCta={consentCta}\n openInGoogleMapsHref={openInGoogleMapsHref}\n />\n )}\n </div>\n </div>\n );\n },\n);\nMapView.displayName = 'MapView';\n"],"names":["mapViewAgent","handle","args","mapViewVariants","cva","innerSurfaceVariants","consentChromeVariants","consentTitleVariants","consentDescriptionVariants","MapImperativeBridge","onHandleReady","onMarkerSelect","map","useMap","useEffect","position","zoom","id","_a","ConsentPlaceholder","address","description","onLoadMap","openInGoogleMapsHref","consentCta","t","useTranslation","jsx","MapPin","jsxs","Button","ExternalLink","MapView","forwardRef","apiKey","center","markers","selectedMarkerId","onMarkerClick","consentGranted","onConsentRequest","consentDescription","mapId","size","surface","ariaLabel","className","rest","ref","i18n","rawId","useId","instanceId","useMemo","reducedMotion","setReducedMotion","useState","mql","sync","handleRef","useRef","useCallback","consentRef","selectedMarkerIdRef","markerCountRef","buildHandle","z","markerId","useImperativeHandle","agentHandle","useAgentRegistration","internalConsent","setInternalConsent","effectiveConsent","handleLoadMap","APIProvider","GoogleMap","marker","isSelected","accessibleLabel","AdvancedMarker","Pin","Marker"],"mappings":";;;;;;;;;AAWO,MAAMA,KAA4C;AAAA,EACvD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,UAAU,aAAa,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa5C,OAAO;AAAA,IACL,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,IAE5C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,oBAAA;AAAA,IAAoB;AAAA,IAE/C,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,QAAA;AAAA,IAAQ;AAAA,EACnC;AAAA,EAEF,SAAS;AAAA,IACP,QAAQ;AAAA;AAAA,MAEN,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,UAAU;AAAA,YACR,MAAM;AAAA,YACN,YAAY;AAAA,cACV,KAAK,EAAE,MAAM,UAAU,aAAa,uBAAA;AAAA,cACpC,KAAK,EAAE,MAAM,UAAU,aAAa,wBAAA;AAAA,YAAwB;AAAA,YAE9D,U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ACF,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAS,GAAQ,cAAc;"}
|
|
1
|
+
{"version":3,"file":"map-view-CCAlC9IL.js","sources":["../../src/components/map-view/map-view.agent.ts","../../src/components/map-view/map-view.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — MapView. */\n/* */\n/* Read-safety actions on the kit's Google Maps wrapper. State is the */\n/* current centre / zoom / selected marker; actions pan, zoom, and */\n/* select markers programmatically. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { MapViewHandle, MapLatLng } from './map-view';\n\nexport const mapViewAgent: AgentAdapter<MapViewHandle> = {\n id: 'map-view',\n // pan → scroll (viewport move); set_zoom → set_value; select_marker → pick\n // (NON-persisting marker focus, no value state slot).\n capabilities: ['scroll', 'set_value', 'pick'],\n // Every action routes through the imperative bridge, which only exists\n // inside the `APIProvider` subtree — and that subtree renders only once\n // consent is granted (the default is `consentGranted={false}`). Under\n // the gate all three actions are silent no-ops. `consentGranted` is the\n // slot that tells an agent so; `center` / `zoom` are read off the live\n // map because Google clamps zoom and animates pans, so requested is not\n // applied; `selectedMarkerId` is the only confirmation the host accepted\n // a `select_marker` proposal.\n //\n // A9: marker ids only (`MapMarker.id` is a stable opaque id). Never\n // `MapMarker.label`, never the `address` prop (consumer-supplied free\n // text, PII in any patient-address deployment), never `apiKey`.\n state: {\n consentGranted: {\n type: 'boolean',\n descriptionKey: 'ui.agent.mapView.state.consentGranted',\n description:\n 'True when the GDPR consent gate has been passed and the Google Maps subtree is mounted. Read this FIRST — while it is false every action is a silent no-op against a placeholder, and nothing else in the surface says so.',\n read: (handle) => handle.isConsentGranted(),\n },\n markerCount: {\n type: 'number',\n descriptionKey: 'ui.agent.mapView.state.markerCount',\n description:\n 'Number of markers the consumer passed. Zero means there is nothing for `select_marker` to select. A count only — no ids, labels or positions.',\n read: (handle) => handle.getMarkerCount(),\n },\n selectedMarkerId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.mapView.state.selectedMarkerId',\n description:\n 'Id of the marker the host currently holds as selected, or null. Selection is fully controlled by the consumer, so `select_marker` only proposes — this slot is the only way to see whether the proposal was accepted.',\n read: (handle) => handle.getSelectedMarkerId(),\n },\n center: {\n type: '{ lat: number; lng: number } | null',\n descriptionKey: 'ui.agent.mapView.state.center',\n description:\n 'Live map centre in lat/lng, or null while the map subtree is unmounted (consent not granted). The read-back for `pan_to`.',\n read: (handle) => handle.getCenter(),\n },\n zoom: {\n type: 'number | null',\n descriptionKey: 'ui.agent.mapView.state.zoom',\n description:\n \"Live zoom level, or null while the map subtree is unmounted. Google clamps zoom to the map type's range, so this is not necessarily the value last passed to `set_zoom`.\",\n read: (handle) => handle.getZoom(),\n },\n },\n actions: {\n pan_to: {\n // Ephemeral viewport move, no data loss → read.\n safety: 'read',\n argsType: '{ position: { lat: number; lng: number } }',\n argsSchema: {\n type: 'object',\n properties: {\n position: {\n type: 'object',\n properties: {\n lat: { type: 'number', description: 'Latitude in degrees.' },\n lng: { type: 'number', description: 'Longitude in degrees.' },\n },\n required: ['lat', 'lng'],\n },\n },\n required: ['position'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.panTo',\n description:\n 'Pan the map to a new centre without changing zoom. Read the `center` slot back to confirm — Google animates the pan, so the applied centre settles after the call.',\n errors: [\n 'Silent no-op while `consentGranted` is false — there is no map, only the consent placeholder.',\n ],\n invoke: (handle, args: { position: MapLatLng }) => {\n handle.panTo(args.position);\n },\n },\n set_zoom: {\n // Ephemeral viewport zoom, no data loss → read.\n safety: 'read',\n argsType: '{ zoom: number }',\n argsSchema: {\n type: 'object',\n properties: {\n zoom: {\n type: 'number',\n description: 'Zoom level, typical range 1–20.',\n },\n },\n required: ['zoom'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.setZoom',\n description:\n 'Set the map zoom level (typical range 1–20). Read the `zoom` slot back — Google clamps the request to the map type’s supported range, so requested and applied can differ.',\n errors: [\n 'Silent no-op while `consentGranted` is false — there is no map, only the consent placeholder.',\n \"Requested zoom is clamped to the map type's range; `zoom` reports what was actually applied.\",\n ],\n invoke: (handle, args: { zoom: number }) => {\n handle.setZoom(args.zoom);\n },\n },\n select_marker: {\n // Ephemeral marker focus, no data loss → read.\n safety: 'read',\n argsType: '{ id: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n id: {\n type: ['string', 'null'],\n description: 'Marker id to select, or null to clear the selection.',\n },\n },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.mapView.actions.selectMarker',\n description:\n \"Propose a marker selection by id, or pass null to clear it. Fires the host's `onMarkerClick`; selection is controlled by the host, so read the `selectedMarkerId` slot back to see whether it accepted.\",\n errors: [\n 'Silent no-op while `consentGranted` is false — there is no map, only the consent placeholder.',\n 'The host owns `selectedMarkerId` and may ignore the proposal; `selectedMarkerId` is unchanged when it does.',\n ],\n invoke: (handle, args: { id: string | null }) => {\n handle.selectMarker(args.id);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'map-view',\n description: 'Marks the element as a kit MapView.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* MapView — kit wrapper over @vis.gl/react-google-maps. */\n/* */\n/* - Loads the Google Maps JS API on demand via the library's */\n/* `APIProvider`; consumer supplies the key (no kit-side cache). */\n/* - Defaults to a CONSENT-GATED placeholder (`consentGranted={false}`) */\n/* so the third-party load never happens before the consumer flips */\n/* the opt-in. GDPR-safe by default. */\n/* - Theme-reactive: the Google Maps `styles` JSON re-resolves on every */\n/* `documentElement.class` mutation (same pattern as Sparkline). */\n/* Consumers may pass `mapId` to switch to a cloud-styled map */\n/* instead, in which case `styles` is ignored. */\n/* - `data-component=\"map-view\"` lives on the outer span; the inner */\n/* `<Map>` mounts inside it. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { MapPin, ExternalLink } from 'lucide-react';\nimport {\n APIProvider,\n Map as GoogleMap,\n AdvancedMarker,\n Marker,\n Pin,\n useMap,\n} from '@vis.gl/react-google-maps';\nimport { Button } from '../button';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { mapViewAgent } from './map-view.agent';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface MapLatLng {\n lat: number;\n lng: number;\n}\n\nexport interface MapMarker {\n /** Stable id — used for keyed re-rendering and `onMarkerClick`. */\n id: string;\n /** Position in lat/lng. */\n position: MapLatLng;\n /** Optional accessible label — falls back to the id. */\n label?: string;\n}\n\nexport interface MapViewHandle {\n /** Pan the map to a new centre without changing zoom. */\n panTo: (position: MapLatLng) => void;\n /** Set zoom (typical range 1–20). */\n setZoom: (zoom: number) => void;\n /** Programmatically select a marker (fires `onMarkerClick`). */\n selectMarker: (id: string | null) => void;\n /* ---- read-back ------------------------------------------------- */\n /**\n * True when the Maps JS API subtree is mounted. While this is false\n * the three actions above are silent no-ops — the consent gate has\n * not been passed and there is no map to drive.\n */\n isConsentGranted: () => boolean;\n /** Live map centre, or `null` while the map subtree is unmounted. */\n getCenter: () => MapLatLng | null;\n /**\n * Live zoom level, or `null` while the map subtree is unmounted.\n * Google clamps to the map type's range, so this is not necessarily\n * the value last passed to `setZoom`.\n */\n getZoom: () => number | null;\n /**\n * The controlled `selectedMarkerId` prop as the host currently holds\n * it. `selectMarker` only proposes a selection — the host is free to\n * ignore it, and this is the only way to see whether it did.\n */\n getSelectedMarkerId: () => string | null;\n /** Number of markers passed to the component. Count only, no ids. */\n getMarkerCount: () => number;\n}\n\n/**\n * The slice of `MapViewHandle` that needs a live `google.maps.Map`.\n * Built inside the `APIProvider` subtree by `MapImperativeBridge`; the\n * outer component composes it with the props-derived getters, and holds\n * `null` whenever the subtree is unmounted.\n */\ntype MapBridgeHandle = Pick<\n MapViewHandle,\n 'panTo' | 'setZoom' | 'selectMarker' | 'getCenter' | 'getZoom'\n>;\n\nexport interface MapViewProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onClick'>,\n VariantProps<typeof mapViewVariants> {\n /** Opaque instance id — emitted as `data-component-id`. */\n id?: string;\n /** Google Maps JS API key. Consumer-owned; never cached by the kit. */\n apiKey: string;\n /** Map centre (lat/lng). Required so the consent placeholder can also use it. */\n center: MapLatLng;\n /** Initial zoom. Default 15 (city-block detail, matches booking site). */\n zoom?: number;\n /**\n * Markers to render. The first marker auto-selects when no\n * `selectedMarkerId` is given.\n */\n markers?: MapMarker[];\n /** Controlled selection — fires `onMarkerClick` with the new id (or null on map click). */\n selectedMarkerId?: string | null;\n /** Fires when a marker is clicked, or `null` when the map background is clicked. */\n onMarkerClick?: (id: string | null) => void;\n /**\n * GDPR consent gate. When `false` (default) the component renders a\n * placeholder with a translated CTA — the Maps JS API is **not**\n * loaded. Flip to `true` once the consumer has captured opt-in.\n */\n consentGranted?: boolean;\n /** Fires when the consumer clicks the \"Load map\" CTA in the placeholder. */\n onConsentRequest?: () => void;\n /**\n * Optional address string shown in the consent placeholder so the\n * surface is useful before the map loads. Also used to build the\n * fallback \"Open in Google Maps\" link target.\n */\n address?: string;\n /**\n * Cloud-styled-map id. When set, takes precedence over the JSON\n * `styles` array and disables the theme-bridge re-fire. Use when\n * you've provisioned a styled map in Google Cloud Console.\n */\n mapId?: string;\n /**\n * Override the consent-placeholder description text. The default\n * (`t('mapView.consentDescription')`) is a generic IP-disclosure\n * line. Consumers operating under specific GDPR / ePrivacy\n * disclosures (jurisdiction, named controller, policy link) should\n * supply their own text via this prop. Pass any `ReactNode` — a\n * paragraph, a localised `<Trans>` instance, etc.\n */\n consentDescription?: ReactNode;\n /**\n * Replace the kit-rendered \"Load map\" button with custom CTA chrome.\n * Use when the consent dialog needs a policy link, a specific\n * jurisdiction phrasing, or a different surface (Tooltip-wrapped\n * button, link to a settings page, etc.). When omitted the kit\n * renders its own `<Button>` — that button calls `onConsentRequest`\n * if provided, otherwise flips MapView's internal opt-in state so\n * the map loads inline.\n */\n consentCta?: ReactNode;\n /**\n * Visual surface. Default `bordered` (current behaviour: 1px\n * `--border` outline + `--radius-md`). `elevated` replaces the\n * border with `--shadow-card`, matching `<Card variant=\"elevated\">`.\n * `bare` drops both — map is flush against the page canvas.\n */\n surface?: 'bordered' | 'elevated' | 'bare';\n /** Accessible label for the map region. Falls back to `t('mapView.label')`. */\n ariaLabel?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst mapViewVariants = cva(\n ['ds:relative ds:overflow-hidden ds:block', 'ds:bg-[var(--muted)]'].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:[--map-block-size:14rem]',\n md: 'ds:[--map-block-size:20rem]',\n lg: 'ds:[--map-block-size:28rem]',\n // `fill` defers sizing to the parent. The outer takes\n // `block-size: 100%` so the inner (also 100%) has something\n // to inherit from. Use inside a viewport-locked column —\n // `<PracticeResults variant=\"map-first\">` wires this through\n // automatically; standalone consumers must give the parent\n // a constrained block-size or the map collapses to 0.\n fill: 'ds:[block-size:100%]',\n },\n surface: {\n bordered:\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]',\n elevated:\n 'ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-card)] ds:border ds:border-[color:var(--card-border)] ds:[.theme-accessible_&]:border-2',\n bare: 'ds:rounded-none ds:border-0',\n },\n },\n defaultVariants: { size: 'md', surface: 'bordered' },\n },\n);\n\n// Inner block-size: percentage when `size=\"fill\"`, rem-token otherwise.\n// Splitting this out (instead of compound-variants) keeps the size\n// switch readable and avoids enumerating every (size × surface) pair.\nconst innerSurfaceVariants = cva('ds:block ds:inline-size-full', {\n variants: {\n size: {\n sm: 'ds:[block-size:var(--map-block-size)]',\n md: 'ds:[block-size:var(--map-block-size)]',\n lg: 'ds:[block-size:var(--map-block-size)]',\n fill: 'ds:[block-size:100%]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\nconst consentChromeVariants = cva(\n [\n 'ds:absolute ds:inset-0',\n 'ds:flex ds:flex-col ds:items-center ds:justify-center',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:p-[var(--spacing-md)]',\n 'ds:bg-[var(--muted)] ds:text-[var(--foreground)]',\n 'ds:text-center',\n ].join(' '),\n);\n\nconst consentTitleVariants = cva('type-heading-3 ds:m-0');\n\nconst consentDescriptionVariants = cva(\n 'type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0',\n);\n\n/* ------------------------------------------------------------------ */\n/* Inner imperative bridge */\n/* */\n/* `useMap()` only resolves inside the APIProvider tree, so the */\n/* imperative actions live in a tiny inner component that the outer */\n/* `MapView` mounts conditionally. It exposes the `panTo` / `setZoom` */\n/* etc. to the forwardRef via a `useImperativeHandle` callback prop. */\n/* ------------------------------------------------------------------ */\n\ninterface MapImperativeBridgeProps {\n /** Called with the live handle on mount, and with `null` on unmount. */\n onHandleReady: (handle: MapBridgeHandle | null) => void;\n onMarkerSelect: (id: string | null) => void;\n}\n\nfunction MapImperativeBridge({\n onHandleReady,\n onMarkerSelect,\n}: MapImperativeBridgeProps): null {\n const map = useMap();\n useEffect(() => {\n if (!map) return;\n onHandleReady({\n panTo: (position) => map.panTo(position),\n setZoom: (zoom) => map.setZoom(zoom),\n selectMarker: (id) => onMarkerSelect(id),\n // Read straight off the live map: Google clamps `setZoom` to the\n // map type's range and animates `panTo`, so requested and applied\n // are not the same value.\n getCenter: () => map.getCenter()?.toJSON() ?? null,\n getZoom: () => map.getZoom() ?? null,\n });\n // Drop the handle when the subtree unmounts (consent revoked, or the\n // component tears down) so the outer getters answer `null` instead of\n // reporting a dead map's last known position.\n return () => onHandleReady(null);\n }, [map, onHandleReady, onMarkerSelect]);\n return null;\n}\n\n/* ------------------------------------------------------------------ */\n/* Consent placeholder */\n/* ------------------------------------------------------------------ */\n\ninterface ConsentPlaceholderProps {\n address: string | undefined;\n description: ReactNode;\n /**\n * Click handler for the \"Load map\" button. Always rendered. When the\n * consumer provides `onConsentRequest` it owns the state transition\n * (typically: open a GDPR dialog, then flip `consentGranted` to true\n * after acceptance). When omitted, the kit's `MapView` falls back to\n * its own internal opt-in toggle — clicking grants consent for this\n * MapView instance only, no consumer plumbing required. This default\n * fixes a regression where the button was conditionally rendered and\n * any consumer omitting `onConsentRequest` left the patient with no\n * way to load the map (booking-website 0.31.0 hit this).\n */\n onLoadMap: () => void;\n openInGoogleMapsHref: string;\n /**\n * Custom CTA — replaces the kit-rendered `<Button>` when the consumer\n * needs a different surface (e.g. a Tooltip-wrapped button with a\n * policy link). The kit's button is still the recommended path; this\n * slot exists for consumers operating under specific compliance UX\n * requirements (jurisdiction, named controller, policy link). Pass\n * any `ReactNode`.\n */\n consentCta: ReactNode | undefined;\n}\n\nfunction ConsentPlaceholder({\n address,\n description,\n onLoadMap,\n openInGoogleMapsHref,\n consentCta,\n}: ConsentPlaceholderProps): ReactNode {\n const { t } = useTranslation();\n return (\n <div className={consentChromeVariants()} data-testid=\"map-view-consent\">\n <MapPin\n aria-hidden=\"true\"\n className=\"ds:size-6 ds:text-[var(--muted-foreground)]\"\n />\n <p className={consentTitleVariants()}>{t('mapView.consentTitle')}</p>\n {address ? (\n <p\n className={consentDescriptionVariants()}\n data-testid=\"map-view-address\"\n >\n {address}\n </p>\n ) : null}\n <p className={consentDescriptionVariants()}>{description}</p>\n <div className=\"ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center\">\n {consentCta ?? (\n <Button\n type=\"button\"\n intent=\"primary\"\n size=\"sm\"\n onClick={onLoadMap}\n data-testid=\"map-view-load-cta\"\n >\n {t('mapView.consentCta')}\n </Button>\n )}\n <a\n href={openInGoogleMapsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary)] ds:underline ds:underline-offset-2\"\n >\n {t('mapView.openInGoogleMaps')}\n <ExternalLink aria-hidden=\"true\" className=\"ds:size-3\" />\n </a>\n </div>\n </div>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* MapView */\n/* ------------------------------------------------------------------ */\n\nexport const MapView = forwardRef<MapViewHandle, MapViewProps>(\n (\n {\n id,\n apiKey,\n center,\n zoom = 15,\n markers,\n selectedMarkerId,\n onMarkerClick,\n consentGranted = false,\n onConsentRequest,\n address,\n consentDescription,\n consentCta,\n mapId,\n size,\n surface,\n ariaLabel,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const rawId = useId();\n const instanceId = useMemo(\n () => `map-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n\n // Reduced-motion gating. Google's own pan / zoom animations\n // happen inside the Maps JS API and the kit can't reach into\n // those — but the kit's own programmatic `panTo` calls (triggered\n // by prop changes via the controlled-sync effect below) can be\n // suppressed. When `prefers-reduced-motion: reduce` is set, we\n // skip the synthetic `panTo` so the consumer's prop change\n // results in a hard recenter rather than an animated glide.\n const [reducedMotion, setReducedMotion] = useState(false);\n useEffect(() => {\n if (typeof window === 'undefined') return undefined;\n const mql = window.matchMedia('(prefers-reduced-motion: reduce)');\n const sync = (): void => setReducedMotion(mql.matches);\n sync();\n mql.addEventListener('change', sync);\n return () => mql.removeEventListener('change', sync);\n }, []);\n\n // The \"Open in Google Maps\" fallback link — works without any\n // third-party script load. Uses the modern `?api=1&query=…` form\n // which the booking site already employs.\n const openInGoogleMapsHref = useMemo(() => {\n const query = address\n ? encodeURIComponent(address)\n : `${center.lat},${center.lng}`;\n return `https://www.google.com/maps/search/?api=1&query=${query}`;\n }, [address, center.lat, center.lng]);\n\n // 0.33.5: removed the kit's `getGoogleMapsTheme()` JSON-styles\n // override. Previously, when `mapId` was absent the kit painted\n // water / roads / landscape with kit tokens — a calm muted-grey\n // palette that diverged from the standard Google Maps appearance\n // users expect in every other maps surface they touch. Google's\n // default (blue water, beige land, named-road colours) is more\n // familiar and reads as a \"real map\" rather than a stylised one.\n //\n // Consumers wanting brand-themed colours opt in via `mapId` and\n // configure the palette in Google Cloud Console — that's the\n // Google-recommended path. The `getGoogleMapsTheme` export stays\n // in `src/tokens/google-maps-theme.ts` so consumers wanting the\n // old behaviour can apply the styles themselves, but the kit\n // does NOT install them by default any more.\n //\n // Side benefit: dropped the MutationObserver that previously\n // watched documentElement.class for theme switches — no more\n // observer churn on every theme toggle.\n\n // Imperative handle plumbing — populated by the inner bridge once\n // the APIProvider tree resolves a `Map` instance.\n const handleRef = useRef<MapBridgeHandle | null>(null);\n const onHandleReady = useCallback((handle: MapBridgeHandle | null) => {\n handleRef.current = handle;\n }, []);\n\n // Read in the OUTER component, not through `handleRef` — these three\n // must still answer when the map subtree is unmounted, which is\n // exactly the situation an agent needs explaining. Assigned during\n // render, below, once `effectiveConsent` exists.\n const consentRef = useRef(false);\n const selectedMarkerIdRef = useRef<string | null>(null);\n const markerCountRef = useRef(0);\n\n const buildHandle = useCallback(\n (): MapViewHandle => ({\n panTo: (position) => handleRef.current?.panTo(position),\n setZoom: (z) => handleRef.current?.setZoom(z),\n selectMarker: (markerId) => handleRef.current?.selectMarker(markerId),\n // Without `isConsentGranted` an agent has no way to learn that\n // its pan / zoom / select was swallowed by the GDPR gate rather\n // than applied: under the default (`consentGranted={false}`) the\n // whole Maps subtree is unmounted and every action optional-chains\n // into nothing.\n isConsentGranted: () => consentRef.current,\n getCenter: () => handleRef.current?.getCenter() ?? null,\n getZoom: () => handleRef.current?.getZoom() ?? null,\n getSelectedMarkerId: () => selectedMarkerIdRef.current,\n getMarkerCount: () => markerCountRef.current,\n }),\n [],\n );\n useImperativeHandle(ref, buildHandle, [buildHandle]);\n\n const agentHandle = useMemo<MapViewHandle>(\n () => buildHandle(),\n [buildHandle],\n );\n useAgentRegistration(mapViewAgent, agentHandle, id);\n\n // Controlled-feeling propagation: vis.gl's `<Map>` reads `center`\n // and `zoom` as initial values only (via `defaultCenter` /\n // `defaultZoom`). To honour the documented \"live prop\" contract\n // we shim post-mount sync through the imperative bridge — a\n // parent that swaps offices by changing `center` re-centres the\n // map. User drag does NOT trigger this because the prop doesn't\n // change on user gesture, so the effect doesn't fire and the\n // map stays where the user left it.\n useEffect(() => {\n // Skip the animated pan under reduced-motion preference; the\n // map will still recentre on the next render via the agent\n // handle's `panTo`, but Google's own glide animation runs\n // either way (kit can't reach inside it). At least the kit's\n // own initiated pan is gated.\n if (reducedMotion) return;\n handleRef.current?.panTo(center);\n // Including `center` (the object reference) instead of\n // `center.lat`/`center.lng` would fire on every parent render\n // even when the coordinates are identical, fighting user drag.\n // The destructured deps are intentional.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [center.lat, center.lng, reducedMotion]);\n useEffect(() => {\n handleRef.current?.setZoom(zoom);\n }, [zoom]);\n\n // Internal opt-in fallback. The `consentGranted` prop is the\n // controlled path — consumer flips it after capturing GDPR\n // acceptance through their own dialog and re-renders. When the\n // consumer omits `onConsentRequest` they're opting out of that\n // workflow, so the kit needs a sensible default click handler on\n // the placeholder's button. `internalConsent` tracks that opt-in\n // for this instance only; the map renders when either signal is\n // truthy. The 0.31.0 regression was conditionally rendering the\n // button on `onConsentRequest` — patients of consumers without the\n // hook saw the placeholder with no way to proceed.\n const [internalConsent, setInternalConsent] = useState(false);\n const effectiveConsent = consentGranted || internalConsent;\n // Mirror the three props-derived agent state slots. Assigned during\n // render so a read immediately after a prop change sees the settled\n // value. Ids and a count only — never `MapMarker.label`, never the\n // `address` prop (consumer-supplied free text, PII in any\n // patient-address deployment), never `apiKey`.\n consentRef.current = effectiveConsent;\n selectedMarkerIdRef.current = selectedMarkerId ?? null;\n markerCountRef.current = (markers ?? []).length;\n const handleLoadMap = useCallback(() => {\n if (onConsentRequest) {\n onConsentRequest();\n // The consumer typically flips `consentGranted` to true on the\n // next render. Flip the internal state too so the map still\n // loads if the consumer forgets to update its prop (the\n // common-case footgun this fallback exists to defuse).\n setInternalConsent(true);\n return;\n }\n setInternalConsent(true);\n }, [onConsentRequest]);\n\n return (\n <div\n className={mapViewVariants({ size, surface, className })}\n data-component=\"map-view\"\n data-component-id={id ?? instanceId}\n role=\"region\"\n aria-label={ariaLabel ?? t('mapView.label')}\n {...rest}\n >\n <div className={innerSurfaceVariants({ size })}>\n {effectiveConsent ? (\n <APIProvider\n apiKey={apiKey}\n // Pull the active i18next locale through so map UI text\n // (zoom controls, attribution) localises to match the\n // surrounding kit chrome.\n language={i18n.language}\n >\n <GoogleMap\n defaultCenter={center}\n defaultZoom={zoom}\n mapId={mapId}\n gestureHandling=\"cooperative\"\n disableDefaultUI={false}\n onClick={() => onMarkerClick?.(null)}\n // `<Map>` reads its own bounding rect for tile sizing.\n // Without explicit dimensions it collapses to 0×0, so\n // we pass kit-class sizing through `className` — vis.gl\n // forwards `className` straight to the rendered root.\n className=\"ds:[inline-size:100%] ds:[block-size:100%]\"\n >\n <MapImperativeBridge\n onHandleReady={onHandleReady}\n onMarkerSelect={(markerId) => onMarkerClick?.(markerId)}\n />\n {(markers ?? []).map((marker) => {\n // Selection state is exposed to the consumer via\n // `data-selected` on the marker root so consumers can\n // style their own InfoWindow / sidebar highlight from\n // it. The kit does NOT swap the Pin's fill colour on\n // selection — `--accent` (magenta-500 in light theme)\n // fails AA on white per 05-accessibility.mdx, and the\n // alternative tokens that pass (`--info`, `--success`)\n // carry semantic baggage. Visual selection state is\n // the consumer's call.\n const isSelected =\n selectedMarkerId != null && selectedMarkerId === marker.id;\n const accessibleLabel = t('mapView.markerLabel', {\n label: marker.label ?? marker.id,\n });\n // Pin implementation switches on whether the\n // consumer supplied `mapId`. Google's\n // AdvancedMarkerElement requires the Map instance to\n // be initialised with a valid Map ID — without one\n // the API logs an error (\"La mappa è stata\n // inizializzata senza un ID mappa valido\") and any\n // AdvancedMarker rendered against that map fails to\n // appear. Cloud Map IDs are an opt-in feature; many\n // consumers (booking-website env without\n // GOOGLE_MAPS_MAP_ID, the OSS demo, etc.) legitimately\n // omit it.\n //\n // Fall back to the classic <Marker> (a thin wrapper\n // around google.maps.Marker) when mapId is absent.\n // Google has formally deprecated google.maps.Marker\n // but it still renders cleanly and produces no\n // console errors; the only loss is the brand-tinted\n // <Pin> chrome (which Marker doesn't accept as a\n // child). When a consumer wants the styled pin they\n // can opt back in by supplying `mapId`.\n if (mapId) {\n return (\n <AdvancedMarker\n key={marker.id}\n position={marker.position}\n // `title` becomes the HTML `title` attribute on\n // Google's marker wrapper — that's a tooltip, not\n // a reliable accessible name. The wrapper also\n // receives `aria-label` which Google honours as\n // the SR-announced name. Both are set so sighted\n // hover tooltips and SR labels stay aligned.\n title={accessibleLabel}\n aria-label={accessibleLabel}\n data-selected={isSelected ? 'true' : 'false'}\n onClick={() => onMarkerClick?.(marker.id)}\n >\n <Pin\n background={'var(--primary)'}\n borderColor={'var(--primary)'}\n glyphColor={'var(--primary-foreground)'}\n />\n </AdvancedMarker>\n );\n }\n return (\n <Marker\n key={marker.id}\n position={marker.position}\n title={accessibleLabel}\n onClick={() => onMarkerClick?.(marker.id)}\n />\n );\n })}\n </GoogleMap>\n </APIProvider>\n ) : (\n <ConsentPlaceholder\n address={address}\n description={\n consentDescription ?? t('mapView.consentDescription')\n }\n onLoadMap={handleLoadMap}\n consentCta={consentCta}\n openInGoogleMapsHref={openInGoogleMapsHref}\n />\n )}\n </div>\n </div>\n );\n },\n);\nMapView.displayName = 'MapView';\n"],"names":["mapViewAgent","handle","args","mapViewVariants","cva","innerSurfaceVariants","consentChromeVariants","consentTitleVariants","consentDescriptionVariants","MapImperativeBridge","onHandleReady","onMarkerSelect","map","useMap","useEffect","position","zoom","id","_a","ConsentPlaceholder","address","description","onLoadMap","openInGoogleMapsHref","consentCta","t","useTranslation","jsx","MapPin","jsxs","Button","ExternalLink","MapView","forwardRef","apiKey","center","markers","selectedMarkerId","onMarkerClick","consentGranted","onConsentRequest","consentDescription","mapId","size","surface","ariaLabel","className","rest","ref","i18n","rawId","useId","instanceId","useMemo","reducedMotion","setReducedMotion","useState","mql","sync","handleRef","useRef","useCallback","consentRef","selectedMarkerIdRef","markerCountRef","buildHandle","z","markerId","useImperativeHandle","agentHandle","useAgentRegistration","internalConsent","setInternalConsent","effectiveConsent","handleLoadMap","APIProvider","GoogleMap","marker","isSelected","accessibleLabel","AdvancedMarker","Pin","Marker"],"mappings":";;;;;;;;;AAWO,MAAMA,KAA4C;AAAA,EACvD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,UAAU,aAAa,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa5C,OAAO;AAAA,IACL,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,IAE5C,aAAa;AAAA,MACX,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAA;AAAA,IAAe;AAAA,IAE1C,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,oBAAA;AAAA,IAAoB;AAAA,IAE/C,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,QAAA;AAAA,IAAQ;AAAA,EACnC;AAAA,EAEF,SAAS;AAAA,IACP,QAAQ;AAAA;AAAA,MAEN,QAAQ;AAAA,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AAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,IAGF,gBAAAlD;AAAA,UAACR;AAAA,UAAA;AAAA,YACC,SAAAC;AAAA,YACA,aACEqB,KAAsBhB,EAAE,4BAA4B;AAAA,YAEtD,WAAWiD;AAAA,YACX,YAAAlD;AAAA,YACA,sBAAAD;AAAA,UAAA;AAAA,QAAA,EACF,CAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAS,GAAQ,cAAc;"}
|
package/dist/_chunks/{marketplace-app-shell-b5hN-Q0m.js → marketplace-app-shell-Chfdia7m.js}
RENAMED
|
@@ -8,9 +8,9 @@ import { A as F } from "./alert-CiJT540z.js";
|
|
|
8
8
|
import { C as w } from "./card-DPmk26CL.js";
|
|
9
9
|
import { D as m } from "./dropdown-menu-DU-Hrf33.js";
|
|
10
10
|
import { T as q } from "./tab-bar-DvFJIQfL.js";
|
|
11
|
-
import { a as A, H as G, g as J, f as z, e as K, c as Q, d as U } from "./header-
|
|
12
|
-
import { H as X } from "./header-settings-
|
|
13
|
-
import { S as Y } from "./sign-in-with-alfadocs-button-
|
|
11
|
+
import { a as A, H as G, g as J, f as z, e as K, c as Q, d as U } from "./header-DUXRIPyM.js";
|
|
12
|
+
import { H as X } from "./header-settings-CVC_davE.js";
|
|
13
|
+
import { S as Y } from "./sign-in-with-alfadocs-button-BLe_quy5.js";
|
|
14
14
|
import { S as Z, g as _, b as aa, a as ea, j as sa, k as ta, i as ra, h as I } from "./sidebar-C-Gr2LL-.js";
|
|
15
15
|
import { T as na } from "./theme-root-BOO73p5t.js";
|
|
16
16
|
import { a as da } from "./tooltip-DvmfrNvB.js";
|
|
@@ -529,4 +529,4 @@ export {
|
|
|
529
529
|
ka as M,
|
|
530
530
|
g as P
|
|
531
531
|
};
|
|
532
|
-
//# sourceMappingURL=marketplace-app-shell-
|
|
532
|
+
//# sourceMappingURL=marketplace-app-shell-Chfdia7m.js.map
|