@alfadocs/ui-kit-debug 1.52.0 → 1.53.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/{address-autocomplete-BVLoHU3E.js → address-autocomplete-Bp816Mb1.js} +2 -2
- package/dist/_chunks/{address-autocomplete-BVLoHU3E.js.map → address-autocomplete-Bp816Mb1.js.map} +1 -1
- package/dist/_chunks/{address-fields-UiEXHxEX.js → address-fields-BIL6cvLS.js} +2 -2
- package/dist/_chunks/{address-fields-UiEXHxEX.js.map → address-fields-BIL6cvLS.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-C-_iu6Fo.js → agenda-tray-C2a8OfKC.js} +2 -2
- package/dist/_chunks/{agenda-tray-C-_iu6Fo.js.map → agenda-tray-C2a8OfKC.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-DaSoA80I.js → anamnesis-summary-rows-CnHxtht-.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-DaSoA80I.js.map → anamnesis-summary-rows-CnHxtht-.js.map} +1 -1
- package/dist/_chunks/apexcharts-theme-DNoXvgnZ.js +105 -0
- package/dist/_chunks/apexcharts-theme-DNoXvgnZ.js.map +1 -0
- package/dist/_chunks/{appointment-timeline-BZErHbD1.js → appointment-timeline-By-EwmJU.js} +2 -2
- package/dist/_chunks/{appointment-timeline-BZErHbD1.js.map → appointment-timeline-By-EwmJU.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-DR_Zm4Gw.js → appointment-tray-7Z3A3Xz9.js} +2 -2
- package/dist/_chunks/{appointment-tray-DR_Zm4Gw.js.map → appointment-tray-7Z3A3Xz9.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-CS-iKkLM.js → balance-badge-cell-BtiFfFRY.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-CS-iKkLM.js.map → balance-badge-cell-BtiFfFRY.js.map} +1 -1
- package/dist/_chunks/{booking-DP543-BT.js → booking-CFR7vU8X.js} +3 -3
- package/dist/_chunks/{booking-DP543-BT.js.map → booking-CFR7vU8X.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-B9MKJXER.js → calendar-workspace-LDuzo_Ie.js} +7 -7
- package/dist/_chunks/{calendar-workspace-B9MKJXER.js.map → calendar-workspace-LDuzo_Ie.js.map} +1 -1
- package/dist/_chunks/{chart-CuE30cfr.js → chart-D37VAIa-.js} +81 -81
- package/dist/_chunks/chart-D37VAIa-.js.map +1 -0
- package/dist/_chunks/{data-table-DJvEwZZx.js → data-table-CiVyhNXx.js} +2 -2
- package/dist/_chunks/{data-table-DJvEwZZx.js.map → data-table-CiVyhNXx.js.map} +1 -1
- package/dist/_chunks/{document-preview-1CZJg6CX.js → document-preview-VXOQZZvy.js} +2 -2
- package/dist/_chunks/{document-preview-1CZJg6CX.js.map → document-preview-VXOQZZvy.js.map} +1 -1
- package/dist/_chunks/{empty-state-DActfjdn.js → empty-state-C62P_6kr.js} +59 -48
- package/dist/_chunks/empty-state-C62P_6kr.js.map +1 -0
- package/dist/_chunks/{error-boundary--w5hYiQ-.js → error-boundary-Cvs23EzK.js} +2 -2
- package/dist/_chunks/{error-boundary--w5hYiQ-.js.map → error-boundary-Cvs23EzK.js.map} +1 -1
- package/dist/_chunks/error-page-BtxEOL6g.js +780 -0
- package/dist/_chunks/error-page-BtxEOL6g.js.map +1 -0
- package/dist/_chunks/{file-manager-BGHShxn_.js → file-manager-BfG3usGk.js} +3 -3
- package/dist/_chunks/{file-manager-BGHShxn_.js.map → file-manager-BfG3usGk.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-CGCyhAVE.js → help-me-write-templates-DcR-e_90.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-CGCyhAVE.js.map → help-me-write-templates-DcR-e_90.js.map} +1 -1
- package/dist/_chunks/{index.modern-Zta-A4Jm.js → index.modern-BeRXQVdc.js} +3 -2
- package/dist/_chunks/{index.modern-Zta-A4Jm.js.map → index.modern-BeRXQVdc.js.map} +1 -1
- package/dist/_chunks/{map-view-CmNGS6Ok.js → map-view-CQmqQJwK.js} +158 -129
- package/dist/_chunks/map-view-CQmqQJwK.js.map +1 -0
- package/dist/_chunks/{practice-results-DjhcggtZ.js → practice-results-B9uV0TT8.js} +3 -3
- package/dist/_chunks/{practice-results-DjhcggtZ.js.map → practice-results-B9uV0TT8.js.map} +1 -1
- package/dist/_chunks/{privacy-mask-noG15O9q.js → privacy-mask-CK-9sxeI.js} +2 -2
- package/dist/_chunks/{privacy-mask-noG15O9q.js.map → privacy-mask-CK-9sxeI.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-BmBzDba9.js → product-hub-panel-D87kbz5j.js} +2 -2
- package/dist/_chunks/{product-hub-panel-BmBzDba9.js.map → product-hub-panel-D87kbz5j.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-BP71J_VB.js → radiograph-panel.agent-BWBaxJ8e.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-BP71J_VB.js.map → radiograph-panel.agent-BWBaxJ8e.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-DDb_t7vy.js → reviews-panel-DUgqU-Wr.js} +2 -2
- package/dist/_chunks/{reviews-panel-DDb_t7vy.js.map → reviews-panel-DUgqU-Wr.js.map} +1 -1
- package/dist/_chunks/{slot-grid-Bkg9MVXP.js → slot-grid-kq7bDdrx.js} +2 -2
- package/dist/_chunks/{slot-grid-Bkg9MVXP.js.map → slot-grid-kq7bDdrx.js.map} +1 -1
- package/dist/_chunks/{sparkline-ZOxMBU76.js → sparkline-pkGPCXbl.js} +80 -80
- package/dist/_chunks/sparkline-pkGPCXbl.js.map +1 -0
- package/dist/_chunks/{task-card-CngF4Zee.js → task-card-Cfl08MCS.js} +2 -2
- package/dist/_chunks/{task-card-CngF4Zee.js.map → task-card-Cfl08MCS.js.map} +1 -1
- package/dist/_chunks/{task-editor-Dz93rRXg.js → task-editor-CxF-sBnu.js} +2 -2
- package/dist/_chunks/{task-editor-Dz93rRXg.js.map → task-editor-CxF-sBnu.js.map} +1 -1
- package/dist/_chunks/{task-tray-CB6_BvH9.js → task-tray-rAGslT2C.js} +3 -3
- package/dist/_chunks/{task-tray-CB6_BvH9.js.map → task-tray-rAGslT2C.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-DHAoTQtR.js → tasks-panel-Dkm8SnmV.js} +3 -3
- package/dist/_chunks/{tasks-panel-DHAoTQtR.js.map → tasks-panel-Dkm8SnmV.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-YsuJgYeB.js → use-appointment-details-read-W6h4oTHx.js} +3 -3
- package/dist/_chunks/{use-appointment-details-read-YsuJgYeB.js.map → use-appointment-details-read-W6h4oTHx.js.map} +1 -1
- package/dist/_chunks/{workflow-map-C7fHKTXL.js → workflow-map-C1OjRhM3.js} +189 -197
- package/dist/_chunks/workflow-map-C1OjRhM3.js.map +1 -0
- package/dist/agent-catalog.json +51 -7
- package/dist/agent-i18n/en.json +9 -3
- package/dist/components/_shared/index.d.ts +1 -0
- package/dist/components/_shared/index.d.ts.map +1 -1
- package/dist/components/_shared/is-development.d.ts +8 -0
- package/dist/components/_shared/is-development.d.ts.map +1 -0
- package/dist/components/_shared/use-keep-apex-tooltip-inside.d.ts +3 -0
- package/dist/components/_shared/use-keep-apex-tooltip-inside.d.ts.map +1 -0
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/empty-state/empty-state.d.ts +6 -0
- package/dist/components/empty-state/empty-state.d.ts.map +1 -1
- package/dist/components/empty-state/index.js +1 -1
- package/dist/components/error-boundary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.agent.d.ts.map +1 -1
- package/dist/components/map-view/map-view.d.ts +8 -5
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts.map +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-editor/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/workflow/index.js +1 -1
- package/dist/components/workflow/workflow-editor.d.ts.map +1 -1
- package/dist/error-pages/400.ar.html +41 -0
- package/dist/error-pages/400.de.html +41 -0
- package/dist/error-pages/400.el.html +41 -0
- package/dist/error-pages/400.en.html +41 -0
- package/dist/error-pages/400.es.html +41 -0
- package/dist/error-pages/400.fr.html +41 -0
- package/dist/error-pages/400.hi.html +41 -0
- package/dist/error-pages/400.html +41 -0
- package/dist/error-pages/400.it.html +41 -0
- package/dist/error-pages/400.ja.html +41 -0
- package/dist/error-pages/400.nl.html +41 -0
- package/dist/error-pages/400.pl.html +41 -0
- package/dist/error-pages/400.pt.html +41 -0
- package/dist/error-pages/400.ro.html +41 -0
- package/dist/error-pages/400.ru.html +41 -0
- package/dist/error-pages/400.sq.html +41 -0
- package/dist/error-pages/400.sv.html +41 -0
- package/dist/error-pages/400.tr.html +41 -0
- package/dist/error-pages/400.zh.html +41 -0
- package/dist/error-pages/401.ar.html +41 -0
- package/dist/error-pages/401.de.html +41 -0
- package/dist/error-pages/401.el.html +41 -0
- package/dist/error-pages/401.en.html +41 -0
- package/dist/error-pages/401.es.html +41 -0
- package/dist/error-pages/401.fr.html +41 -0
- package/dist/error-pages/401.hi.html +41 -0
- package/dist/error-pages/401.html +41 -0
- package/dist/error-pages/401.it.html +41 -0
- package/dist/error-pages/401.ja.html +41 -0
- package/dist/error-pages/401.nl.html +41 -0
- package/dist/error-pages/401.pl.html +41 -0
- package/dist/error-pages/401.pt.html +41 -0
- package/dist/error-pages/401.ro.html +41 -0
- package/dist/error-pages/401.ru.html +41 -0
- package/dist/error-pages/401.sq.html +41 -0
- package/dist/error-pages/401.sv.html +41 -0
- package/dist/error-pages/401.tr.html +41 -0
- package/dist/error-pages/401.zh.html +41 -0
- package/dist/error-pages/403.ar.html +41 -0
- package/dist/error-pages/403.de.html +41 -0
- package/dist/error-pages/403.el.html +41 -0
- package/dist/error-pages/403.en.html +41 -0
- package/dist/error-pages/403.es.html +41 -0
- package/dist/error-pages/403.fr.html +41 -0
- package/dist/error-pages/403.hi.html +41 -0
- package/dist/error-pages/403.html +41 -0
- package/dist/error-pages/403.it.html +41 -0
- package/dist/error-pages/403.ja.html +41 -0
- package/dist/error-pages/403.nl.html +41 -0
- package/dist/error-pages/403.pl.html +41 -0
- package/dist/error-pages/403.pt.html +41 -0
- package/dist/error-pages/403.ro.html +41 -0
- package/dist/error-pages/403.ru.html +41 -0
- package/dist/error-pages/403.sq.html +41 -0
- package/dist/error-pages/403.sv.html +41 -0
- package/dist/error-pages/403.tr.html +41 -0
- package/dist/error-pages/403.zh.html +41 -0
- package/dist/error-pages/404.ar.html +41 -0
- package/dist/error-pages/404.de.html +41 -0
- package/dist/error-pages/404.el.html +41 -0
- package/dist/error-pages/404.en.html +41 -0
- package/dist/error-pages/404.es.html +41 -0
- package/dist/error-pages/404.fr.html +41 -0
- package/dist/error-pages/404.hi.html +41 -0
- package/dist/error-pages/404.html +41 -0
- package/dist/error-pages/404.it.html +41 -0
- package/dist/error-pages/404.ja.html +41 -0
- package/dist/error-pages/404.nl.html +41 -0
- package/dist/error-pages/404.pl.html +41 -0
- package/dist/error-pages/404.pt.html +41 -0
- package/dist/error-pages/404.ro.html +41 -0
- package/dist/error-pages/404.ru.html +41 -0
- package/dist/error-pages/404.sq.html +41 -0
- package/dist/error-pages/404.sv.html +41 -0
- package/dist/error-pages/404.tr.html +41 -0
- package/dist/error-pages/404.zh.html +41 -0
- package/dist/error-pages/405.ar.html +41 -0
- package/dist/error-pages/405.de.html +41 -0
- package/dist/error-pages/405.el.html +41 -0
- package/dist/error-pages/405.en.html +41 -0
- package/dist/error-pages/405.es.html +41 -0
- package/dist/error-pages/405.fr.html +41 -0
- package/dist/error-pages/405.hi.html +41 -0
- package/dist/error-pages/405.html +41 -0
- package/dist/error-pages/405.it.html +41 -0
- package/dist/error-pages/405.ja.html +41 -0
- package/dist/error-pages/405.nl.html +41 -0
- package/dist/error-pages/405.pl.html +41 -0
- package/dist/error-pages/405.pt.html +41 -0
- package/dist/error-pages/405.ro.html +41 -0
- package/dist/error-pages/405.ru.html +41 -0
- package/dist/error-pages/405.sq.html +41 -0
- package/dist/error-pages/405.sv.html +41 -0
- package/dist/error-pages/405.tr.html +41 -0
- package/dist/error-pages/405.zh.html +41 -0
- package/dist/error-pages/410.ar.html +41 -0
- package/dist/error-pages/410.de.html +41 -0
- package/dist/error-pages/410.el.html +41 -0
- package/dist/error-pages/410.en.html +41 -0
- package/dist/error-pages/410.es.html +41 -0
- package/dist/error-pages/410.fr.html +41 -0
- package/dist/error-pages/410.hi.html +41 -0
- package/dist/error-pages/410.html +41 -0
- package/dist/error-pages/410.it.html +41 -0
- package/dist/error-pages/410.ja.html +41 -0
- package/dist/error-pages/410.nl.html +41 -0
- package/dist/error-pages/410.pl.html +41 -0
- package/dist/error-pages/410.pt.html +41 -0
- package/dist/error-pages/410.ro.html +41 -0
- package/dist/error-pages/410.ru.html +41 -0
- package/dist/error-pages/410.sq.html +41 -0
- package/dist/error-pages/410.sv.html +41 -0
- package/dist/error-pages/410.tr.html +41 -0
- package/dist/error-pages/410.zh.html +41 -0
- package/dist/error-pages/419.ar.html +42 -0
- package/dist/error-pages/419.de.html +42 -0
- package/dist/error-pages/419.el.html +42 -0
- package/dist/error-pages/419.en.html +42 -0
- package/dist/error-pages/419.es.html +42 -0
- package/dist/error-pages/419.fr.html +42 -0
- package/dist/error-pages/419.hi.html +42 -0
- package/dist/error-pages/419.html +42 -0
- package/dist/error-pages/419.it.html +42 -0
- package/dist/error-pages/419.ja.html +42 -0
- package/dist/error-pages/419.nl.html +42 -0
- package/dist/error-pages/419.pl.html +42 -0
- package/dist/error-pages/419.pt.html +42 -0
- package/dist/error-pages/419.ro.html +42 -0
- package/dist/error-pages/419.ru.html +42 -0
- package/dist/error-pages/419.sq.html +42 -0
- package/dist/error-pages/419.sv.html +42 -0
- package/dist/error-pages/419.tr.html +42 -0
- package/dist/error-pages/419.zh.html +42 -0
- package/dist/error-pages/429.ar.html +42 -0
- package/dist/error-pages/429.de.html +42 -0
- package/dist/error-pages/429.el.html +42 -0
- package/dist/error-pages/429.en.html +42 -0
- package/dist/error-pages/429.es.html +42 -0
- package/dist/error-pages/429.fr.html +42 -0
- package/dist/error-pages/429.hi.html +42 -0
- package/dist/error-pages/429.html +42 -0
- package/dist/error-pages/429.it.html +42 -0
- package/dist/error-pages/429.ja.html +42 -0
- package/dist/error-pages/429.nl.html +42 -0
- package/dist/error-pages/429.pl.html +42 -0
- package/dist/error-pages/429.pt.html +42 -0
- package/dist/error-pages/429.ro.html +42 -0
- package/dist/error-pages/429.ru.html +42 -0
- package/dist/error-pages/429.sq.html +42 -0
- package/dist/error-pages/429.sv.html +42 -0
- package/dist/error-pages/429.tr.html +42 -0
- package/dist/error-pages/429.zh.html +42 -0
- package/dist/error-pages/500.ar.html +41 -0
- package/dist/error-pages/500.de.html +41 -0
- package/dist/error-pages/500.el.html +41 -0
- package/dist/error-pages/500.en.html +41 -0
- package/dist/error-pages/500.es.html +41 -0
- package/dist/error-pages/500.fr.html +41 -0
- package/dist/error-pages/500.hi.html +41 -0
- package/dist/error-pages/500.html +41 -0
- package/dist/error-pages/500.it.html +41 -0
- package/dist/error-pages/500.ja.html +41 -0
- package/dist/error-pages/500.nl.html +41 -0
- package/dist/error-pages/500.pl.html +41 -0
- package/dist/error-pages/500.pt.html +41 -0
- package/dist/error-pages/500.ro.html +41 -0
- package/dist/error-pages/500.ru.html +41 -0
- package/dist/error-pages/500.sq.html +41 -0
- package/dist/error-pages/500.sv.html +41 -0
- package/dist/error-pages/500.tr.html +41 -0
- package/dist/error-pages/500.zh.html +41 -0
- package/dist/error-pages/502.ar.html +41 -0
- package/dist/error-pages/502.de.html +41 -0
- package/dist/error-pages/502.el.html +41 -0
- package/dist/error-pages/502.en.html +41 -0
- package/dist/error-pages/502.es.html +41 -0
- package/dist/error-pages/502.fr.html +41 -0
- package/dist/error-pages/502.hi.html +41 -0
- package/dist/error-pages/502.html +41 -0
- package/dist/error-pages/502.it.html +41 -0
- package/dist/error-pages/502.ja.html +41 -0
- package/dist/error-pages/502.nl.html +41 -0
- package/dist/error-pages/502.pl.html +41 -0
- package/dist/error-pages/502.pt.html +41 -0
- package/dist/error-pages/502.ro.html +41 -0
- package/dist/error-pages/502.ru.html +41 -0
- package/dist/error-pages/502.sq.html +41 -0
- package/dist/error-pages/502.sv.html +41 -0
- package/dist/error-pages/502.tr.html +41 -0
- package/dist/error-pages/502.zh.html +41 -0
- package/dist/error-pages/503.ar.html +41 -0
- package/dist/error-pages/503.de.html +41 -0
- package/dist/error-pages/503.el.html +41 -0
- package/dist/error-pages/503.en.html +41 -0
- package/dist/error-pages/503.es.html +41 -0
- package/dist/error-pages/503.fr.html +41 -0
- package/dist/error-pages/503.hi.html +41 -0
- package/dist/error-pages/503.html +41 -0
- package/dist/error-pages/503.it.html +41 -0
- package/dist/error-pages/503.ja.html +41 -0
- package/dist/error-pages/503.nl.html +41 -0
- package/dist/error-pages/503.pl.html +41 -0
- package/dist/error-pages/503.pt.html +41 -0
- package/dist/error-pages/503.ro.html +41 -0
- package/dist/error-pages/503.ru.html +41 -0
- package/dist/error-pages/503.sq.html +41 -0
- package/dist/error-pages/503.sv.html +41 -0
- package/dist/error-pages/503.tr.html +41 -0
- package/dist/error-pages/503.zh.html +41 -0
- package/dist/error-pages/504.ar.html +41 -0
- package/dist/error-pages/504.de.html +41 -0
- package/dist/error-pages/504.el.html +41 -0
- package/dist/error-pages/504.en.html +41 -0
- package/dist/error-pages/504.es.html +41 -0
- package/dist/error-pages/504.fr.html +41 -0
- package/dist/error-pages/504.hi.html +41 -0
- package/dist/error-pages/504.html +41 -0
- package/dist/error-pages/504.it.html +41 -0
- package/dist/error-pages/504.ja.html +41 -0
- package/dist/error-pages/504.nl.html +41 -0
- package/dist/error-pages/504.pl.html +41 -0
- package/dist/error-pages/504.pt.html +41 -0
- package/dist/error-pages/504.ro.html +41 -0
- package/dist/error-pages/504.ru.html +41 -0
- package/dist/error-pages/504.sq.html +41 -0
- package/dist/error-pages/504.sv.html +41 -0
- package/dist/error-pages/504.tr.html +41 -0
- package/dist/error-pages/504.zh.html +41 -0
- package/dist/error-pages/maintenance.ar.html +41 -0
- package/dist/error-pages/maintenance.de.html +41 -0
- package/dist/error-pages/maintenance.el.html +41 -0
- package/dist/error-pages/maintenance.en.html +41 -0
- package/dist/error-pages/maintenance.es.html +41 -0
- package/dist/error-pages/maintenance.fr.html +41 -0
- package/dist/error-pages/maintenance.hi.html +41 -0
- package/dist/error-pages/maintenance.html +41 -0
- package/dist/error-pages/maintenance.it.html +41 -0
- package/dist/error-pages/maintenance.ja.html +41 -0
- package/dist/error-pages/maintenance.nl.html +41 -0
- package/dist/error-pages/maintenance.pl.html +41 -0
- package/dist/error-pages/maintenance.pt.html +41 -0
- package/dist/error-pages/maintenance.ro.html +41 -0
- package/dist/error-pages/maintenance.ru.html +41 -0
- package/dist/error-pages/maintenance.sq.html +41 -0
- package/dist/error-pages/maintenance.sv.html +41 -0
- package/dist/error-pages/maintenance.tr.html +41 -0
- package/dist/error-pages/maintenance.zh.html +41 -0
- package/dist/host-compat.css +13 -1
- package/dist/i18n/locales/ar.d.ts +70 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +70 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +70 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +70 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +70 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +70 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +70 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +70 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +70 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +70 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +70 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +70 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +70 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +70 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +70 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +70 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +70 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +70 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +70 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +70 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +70 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +70 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +70 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +70 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +70 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +70 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +70 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +70 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +70 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +70 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +70 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +70 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +70 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +70 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +70 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +70 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +143 -137
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +70 -0
- package/dist/locales/de.json +70 -0
- package/dist/locales/el.json +70 -0
- package/dist/locales/en.json +70 -0
- package/dist/locales/es.json +70 -0
- package/dist/locales/fr.json +70 -0
- package/dist/locales/hi.json +70 -0
- package/dist/locales/it.json +70 -0
- package/dist/locales/ja.json +70 -0
- package/dist/locales/nl.json +70 -0
- package/dist/locales/pl.json +70 -0
- package/dist/locales/pt.json +70 -0
- package/dist/locales/ro.json +70 -0
- package/dist/locales/ru.json +70 -0
- package/dist/locales/sq.json +70 -0
- package/dist/locales/sv.json +70 -0
- package/dist/locales/tr.json +70 -0
- package/dist/locales/zh.json +70 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/error-page-illustration.d.ts +6 -0
- package/dist/patterns/error-page/error-page-illustration.d.ts.map +1 -0
- package/dist/patterns/error-page/error-page-locale.d.ts +32 -0
- package/dist/patterns/error-page/error-page-locale.d.ts.map +1 -0
- package/dist/patterns/error-page/error-page-statuses.d.ts +16 -0
- package/dist/patterns/error-page/error-page-statuses.d.ts.map +1 -0
- package/dist/patterns/error-page/error-page.d.ts +48 -0
- package/dist/patterns/error-page/error-page.d.ts.map +1 -0
- package/dist/patterns/error-page/index.d.ts +5 -0
- package/dist/patterns/error-page/index.d.ts.map +1 -0
- package/dist/patterns/error-page/index.js +9 -0
- package/dist/patterns/error-page/index.js.map +1 -0
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +9 -2
- package/dist/_chunks/apexcharts-theme-B_AxGC_h.js +0 -72
- package/dist/_chunks/apexcharts-theme-B_AxGC_h.js.map +0 -1
- package/dist/_chunks/chart-CuE30cfr.js.map +0 -1
- package/dist/_chunks/empty-state-DActfjdn.js.map +0 -1
- package/dist/_chunks/map-view-CmNGS6Ok.js.map +0 -1
- package/dist/_chunks/sparkline-ZOxMBU76.js.map +0 -1
- package/dist/_chunks/workflow-map-C7fHKTXL.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit-debug",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -825,6 +825,11 @@
|
|
|
825
825
|
"types": "./dist/patterns/calendar/index.d.ts",
|
|
826
826
|
"import": "./dist/patterns/calendar/index.js"
|
|
827
827
|
},
|
|
828
|
+
"./error-pages/*": "./dist/error-pages/*",
|
|
829
|
+
"./patterns/error-page": {
|
|
830
|
+
"types": "./dist/patterns/error-page/index.d.ts",
|
|
831
|
+
"import": "./dist/patterns/error-page/index.js"
|
|
832
|
+
},
|
|
828
833
|
"./patterns/help-me-write-templates": {
|
|
829
834
|
"types": "./dist/patterns/help-me-write-templates/index.d.ts",
|
|
830
835
|
"import": "./dist/patterns/help-me-write-templates/index.js"
|
|
@@ -959,9 +964,10 @@
|
|
|
959
964
|
},
|
|
960
965
|
"scripts": {
|
|
961
966
|
"dev": "vite",
|
|
962
|
-
"build": "vite build && npm run build:host-compat && npm run build:types && npm run build:locales && npm run build:agent-catalog && npm run verify:build && npm run check:preflight-bleed && npm run check:exports && npm run check:blockable-names",
|
|
967
|
+
"build": "vite build && npm run build:host-compat && npm run build:types && npm run build:locales && npm run build:error-pages && npm run build:agent-catalog && npm run verify:build && npm run check:preflight-bleed && npm run check:exports && npm run check:blockable-names",
|
|
963
968
|
"verify:build": "node scripts/verify-build.mjs",
|
|
964
969
|
"check:exports": "node scripts/check-exports-coverage.mjs",
|
|
970
|
+
"build:error-pages": "node scripts/build-error-pages.mjs",
|
|
965
971
|
"check:blockable-names": "node scripts/check-blockable-names.mjs",
|
|
966
972
|
"build:host-compat": "node scripts/build-host-compat.mjs",
|
|
967
973
|
"check:host-compat": "node scripts/build-host-compat.mjs --check",
|
|
@@ -1200,6 +1206,7 @@
|
|
|
1200
1206
|
"apexcharts": "^5.10.1",
|
|
1201
1207
|
"autoprefixer": "^10.5.0",
|
|
1202
1208
|
"chromatic": "^16.10.0",
|
|
1209
|
+
"esbuild": "^0.25.12",
|
|
1203
1210
|
"eslint": "^9.39.4",
|
|
1204
1211
|
"eslint-config-prettier": "^9.1.2",
|
|
1205
1212
|
"eslint-plugin-import": "^2.32.0",
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { useEffect as u } from "react";
|
|
2
|
-
const s = [
|
|
3
|
-
"a[href]",
|
|
4
|
-
"button",
|
|
5
|
-
"input",
|
|
6
|
-
"select",
|
|
7
|
-
"textarea",
|
|
8
|
-
'[tabindex]:not([tabindex="-1"])'
|
|
9
|
-
].join(",");
|
|
10
|
-
function d(t) {
|
|
11
|
-
u(() => {
|
|
12
|
-
const e = t.current;
|
|
13
|
-
if (!e) return;
|
|
14
|
-
const o = () => {
|
|
15
|
-
e.querySelectorAll('[aria-hidden="true"]').forEach((n) => {
|
|
16
|
-
n.querySelectorAll(s).forEach((c) => {
|
|
17
|
-
c.setAttribute("tabindex", "-1");
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
o();
|
|
22
|
-
const r = new MutationObserver(o);
|
|
23
|
-
return r.observe(e, {
|
|
24
|
-
childList: !0,
|
|
25
|
-
subtree: !0,
|
|
26
|
-
attributes: !0,
|
|
27
|
-
attributeFilter: ["aria-hidden", "tabindex"]
|
|
28
|
-
}), () => r.disconnect();
|
|
29
|
-
}, [t]);
|
|
30
|
-
}
|
|
31
|
-
function a(t) {
|
|
32
|
-
if (typeof document > "u" || !t) return t;
|
|
33
|
-
const e = document.createElement("span");
|
|
34
|
-
e.style.backgroundColor = t, document.documentElement.appendChild(e);
|
|
35
|
-
const o = getComputedStyle(e).backgroundColor;
|
|
36
|
-
return e.remove(), o || t;
|
|
37
|
-
}
|
|
38
|
-
function l() {
|
|
39
|
-
if (typeof document > "u") return 0.18;
|
|
40
|
-
const t = getComputedStyle(document.documentElement).getPropertyValue("--chart-compare-fill-opacity").trim(), e = parseFloat(t);
|
|
41
|
-
return Number.isFinite(e) ? e : 0.18;
|
|
42
|
-
}
|
|
43
|
-
function m(t) {
|
|
44
|
-
if (typeof document > "u" || !t) return t;
|
|
45
|
-
const e = getComputedStyle(document.documentElement), o = parseFloat(e.getPropertyValue("--chart-compare-fill-opacity")) || 0.18, r = Math.round(o * 100), n = e.getPropertyValue("--background").trim();
|
|
46
|
-
return a(`color-mix(in srgb, ${t} ${r}%, ${n})`);
|
|
47
|
-
}
|
|
48
|
-
function p() {
|
|
49
|
-
const t = getComputedStyle(document.documentElement), e = (r) => t.getPropertyValue(r).trim();
|
|
50
|
-
return {
|
|
51
|
-
theme: { mode: document.documentElement.classList.contains("theme-dark") ? "dark" : "light" },
|
|
52
|
-
colors: [
|
|
53
|
-
e("--primary"),
|
|
54
|
-
e("--accent"),
|
|
55
|
-
e("--success"),
|
|
56
|
-
e("--warning")
|
|
57
|
-
],
|
|
58
|
-
chart: {
|
|
59
|
-
background: e("--background"),
|
|
60
|
-
foreColor: e("--foreground"),
|
|
61
|
-
fontFamily: e("--font-sans")
|
|
62
|
-
},
|
|
63
|
-
grid: { borderColor: e("--border") }
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
l as a,
|
|
68
|
-
p as g,
|
|
69
|
-
m as r,
|
|
70
|
-
d as u
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=apexcharts-theme-B_AxGC_h.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apexcharts-theme-B_AxGC_h.js","sources":["../../src/components/_shared/use-neutralize-hidden-focus.ts","../../src/tokens/apexcharts-theme.ts"],"sourcesContent":["import { useEffect, type RefObject } from 'react';\n\n/* -------------------------------------------------------------------- */\n/* useNeutraliseHiddenFocus */\n/* */\n/* axe's `aria-hidden-focus` rule (correctly) flags focusable */\n/* descendants of `aria-hidden=\"true\"` subtrees. Several DS components */\n/* embed third-party renders (ApexCharts, FullCalendar) that inject */\n/* focusable elements (canvases with tabindex, anchor wrappers) inside */\n/* a wrapper that we deliberately mark `aria-hidden` because the outer */\n/* element carries the accessible name (`role=\"img\"` + `aria-label`). */\n/* */\n/* This hook walks the ref tree on mount and on subtree mutation, and */\n/* sets `tabindex=\"-1\"` on focusable descendants of any aria-hidden */\n/* ancestor. Cheaper than forking the third-party render and keeps the */\n/* fix scoped to the component using it. */\n/* -------------------------------------------------------------------- */\n\nconst FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button',\n 'input',\n 'select',\n 'textarea',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\nexport function useNeutraliseHiddenFocus<T extends HTMLElement>(\n containerRef: RefObject<T | null>,\n): void {\n useEffect(() => {\n const root = containerRef.current;\n if (!root) return undefined;\n\n const neutralise = () => {\n root\n .querySelectorAll<HTMLElement>('[aria-hidden=\"true\"]')\n .forEach((hidden) => {\n hidden\n .querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)\n .forEach((el) => {\n el.setAttribute('tabindex', '-1');\n });\n });\n };\n\n neutralise();\n const observer = new MutationObserver(neutralise);\n observer.observe(root, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-hidden', 'tabindex'],\n });\n return () => observer.disconnect();\n }, [containerRef]);\n}\n","import type ApexCharts from 'apexcharts';\n\n/** The theme-bridge output. */\nexport type ApexChartsTheme = ApexCharts.ApexOptions;\n\n/**\n * Resolve a colour-accepting token value the ApexCharts way: set it on a real\n * colour property of a detached probe appended to `document.documentElement`\n * (which carries the active `theme-*` class, so a per-theme `color-mix()`\n * resolves to the correct colour), read the computed value back, then remove the\n * probe. Returns the input untouched when there is no DOM (SSR) or when the\n * browser rejected the value.\n *\n * The probe mutates only `documentElement`'s child list, never its `class`\n * attribute, so it does not trip the chart's class-only MutationObserver.\n */\nfunction resolveColour(value: string): string {\n if (typeof document === 'undefined' || !value) return value;\n const probe = document.createElement('span');\n probe.style.backgroundColor = value;\n document.documentElement.appendChild(probe);\n const resolved = getComputedStyle(probe).backgroundColor;\n probe.remove();\n return resolved || value;\n}\n\n/**\n * Compare fill opacity from the `--chart-compare-fill-opacity` token. Drives\n * the per-series `fill.opacity` of a compare bar / area overlay (see\n * `ChartSeries.role` in `src/components/chart/chart.tsx`). Theme-invariant —\n * the token value itself does not shift between themes; the resulting COLOUR\n * retints because it is mixed from the theme-shifting primary and background\n * (see `resolveCompareTint`). Falls back to 0.18 outside a browser.\n */\nexport function getCompareFillOpacity(): number {\n if (typeof document === 'undefined') return 0.18;\n const v = getComputedStyle(document.documentElement)\n .getPropertyValue('--chart-compare-fill-opacity')\n .trim();\n const parsed = parseFloat(v);\n return Number.isFinite(parsed) ? parsed : 0.18;\n}\n\n/**\n * Resolve a compare TINT: the paired primary mixed OVER the surface at the\n * compare opacity, so it is an opaque lighter shade of the same hue — used for\n * the legend swatch (and anywhere the tint is needed as a solid colour).\n * `primary` is an already-resolved colour (the k-th primary's colour). Uses the\n * same detached probe the bridge uses for `color-mix`, so it retints per theme\n * with no new observer and no hex literal in component code. Returns `primary`\n * untouched outside a browser.\n */\nexport function resolveCompareTint(primary: string): string {\n if (typeof document === 'undefined' || !primary) return primary;\n const styles = getComputedStyle(document.documentElement);\n const opacity =\n parseFloat(styles.getPropertyValue('--chart-compare-fill-opacity')) || 0.18;\n const pct = Math.round(opacity * 100);\n const bg = styles.getPropertyValue('--background').trim();\n return resolveColour(`color-mix(in srgb, ${primary} ${pct}%, ${bg})`);\n}\n\nexport function getApexChartsTheme(): ApexChartsTheme {\n const styles = getComputedStyle(document.documentElement);\n const get = (v: string) => styles.getPropertyValue(v).trim();\n const isDark = document.documentElement.classList.contains('theme-dark');\n return {\n theme: { mode: isDark ? 'dark' : 'light' },\n colors: [\n get('--primary'),\n get('--accent'),\n get('--success'),\n get('--warning'),\n ],\n chart: {\n background: get('--background'),\n foreColor: get('--foreground'),\n fontFamily: get('--font-sans'),\n },\n grid: { borderColor: get('--border') },\n };\n}\n"],"names":["FOCUSABLE_SELECTOR","useNeutraliseHiddenFocus","containerRef","useEffect","root","neutralise","hidden","el","observer","resolveColour","value","probe","resolved","getCompareFillOpacity","v","parsed","resolveCompareTint","primary","styles","opacity","pct","bg","getApexChartsTheme","get"],"mappings":";AAkBA,MAAMA,IAAqB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,KAAK,GAAG;AAEH,SAASC,EACdC,GACM;AACN,EAAAC,EAAU,MAAM;AACd,UAAMC,IAAOF,EAAa;AAC1B,QAAI,CAACE,EAAM;AAEX,UAAMC,IAAa,MAAM;AACvB,MAAAD,EACG,iBAA8B,sBAAsB,EACpD,QAAQ,CAACE,MAAW;AACnB,QAAAA,EACG,iBAA8BN,CAAkB,EAChD,QAAQ,CAACO,MAAO;AACf,UAAAA,EAAG,aAAa,YAAY,IAAI;AAAA,QAClC,CAAC;AAAA,MACL,CAAC;AAAA,IACL;AAEA,IAAAF,EAAA;AACA,UAAMG,IAAW,IAAI,iBAAiBH,CAAU;AAChD,WAAAG,EAAS,QAAQJ,GAAM;AAAA,MACrB,WAAW;AAAA,MACX,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,iBAAiB,CAAC,eAAe,UAAU;AAAA,IAAA,CAC5C,GACM,MAAMI,EAAS,WAAA;AAAA,EACxB,GAAG,CAACN,CAAY,CAAC;AACnB;ACxCA,SAASO,EAAcC,GAAuB;AAC5C,MAAI,OAAO,WAAa,OAAe,CAACA,EAAO,QAAOA;AACtD,QAAMC,IAAQ,SAAS,cAAc,MAAM;AAC3C,EAAAA,EAAM,MAAM,kBAAkBD,GAC9B,SAAS,gBAAgB,YAAYC,CAAK;AAC1C,QAAMC,IAAW,iBAAiBD,CAAK,EAAE;AACzC,SAAAA,EAAM,OAAA,GACCC,KAAYF;AACrB;AAUO,SAASG,IAAgC;AAC9C,MAAI,OAAO,WAAa,IAAa,QAAO;AAC5C,QAAMC,IAAI,iBAAiB,SAAS,eAAe,EAChD,iBAAiB,8BAA8B,EAC/C,KAAA,GACGC,IAAS,WAAWD,CAAC;AAC3B,SAAO,OAAO,SAASC,CAAM,IAAIA,IAAS;AAC5C;AAWO,SAASC,EAAmBC,GAAyB;AAC1D,MAAI,OAAO,WAAa,OAAe,CAACA,EAAS,QAAOA;AACxD,QAAMC,IAAS,iBAAiB,SAAS,eAAe,GAClDC,IACJ,WAAWD,EAAO,iBAAiB,8BAA8B,CAAC,KAAK,MACnEE,IAAM,KAAK,MAAMD,IAAU,GAAG,GAC9BE,IAAKH,EAAO,iBAAiB,cAAc,EAAE,KAAA;AACnD,SAAOT,EAAc,sBAAsBQ,CAAO,IAAIG,CAAG,MAAMC,CAAE,GAAG;AACtE;AAEO,SAASC,IAAsC;AACpD,QAAMJ,IAAS,iBAAiB,SAAS,eAAe,GAClDK,IAAM,CAACT,MAAcI,EAAO,iBAAiBJ,CAAC,EAAE,KAAA;AAEtD,SAAO;AAAA,IACL,OAAO,EAAE,MAFI,SAAS,gBAAgB,UAAU,SAAS,YAAY,IAE7C,SAAS,QAAA;AAAA,IACjC,QAAQ;AAAA,MACNS,EAAI,WAAW;AAAA,MACfA,EAAI,UAAU;AAAA,MACdA,EAAI,WAAW;AAAA,MACfA,EAAI,WAAW;AAAA,IAAA;AAAA,IAEjB,OAAO;AAAA,MACL,YAAYA,EAAI,cAAc;AAAA,MAC9B,WAAWA,EAAI,cAAc;AAAA,MAC7B,YAAYA,EAAI,aAAa;AAAA,IAAA;AAAA,IAE/B,MAAM,EAAE,aAAaA,EAAI,UAAU,EAAA;AAAA,EAAE;AAEzC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart-CuE30cfr.js","sources":["../../node_modules/lucide-react/dist/esm/icons/chart-area.mjs","../../node_modules/lucide-react/dist/esm/icons/chart-column.mjs","../../node_modules/lucide-react/dist/esm/icons/chart-line.mjs","../../node_modules/lucide-react/dist/esm/icons/chart-pie.mjs","../../node_modules/lucide-react/dist/esm/icons/donut.mjs","../../src/components/chart/chart.agent.ts","../../src/components/chart/chart.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 3v16a2 2 0 0 0 2 2h16\", key: \"c24i48\" }],\n [\n \"path\",\n {\n d: \"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z\",\n key: \"q0gr47\"\n }\n ]\n];\nconst ChartArea = createLucideIcon(\"chart-area\", __iconNode);\n\nexport { __iconNode, ChartArea as default };\n//# sourceMappingURL=chart-area.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 3v16a2 2 0 0 0 2 2h16\", key: \"c24i48\" }],\n [\"path\", { d: \"M18 17V9\", key: \"2bz60n\" }],\n [\"path\", { d: \"M13 17V5\", key: \"1frdt8\" }],\n [\"path\", { d: \"M8 17v-3\", key: \"17ska0\" }]\n];\nconst ChartColumn = createLucideIcon(\"chart-column\", __iconNode);\n\nexport { __iconNode, ChartColumn as default };\n//# sourceMappingURL=chart-column.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 3v16a2 2 0 0 0 2 2h16\", key: \"c24i48\" }],\n [\"path\", { d: \"m19 9-5 5-4-4-3 3\", key: \"2osh9i\" }]\n];\nconst ChartLine = createLucideIcon(\"chart-line\", __iconNode);\n\nexport { __iconNode, ChartLine as default };\n//# sourceMappingURL=chart-line.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z\",\n key: \"pzmjnu\"\n }\n ],\n [\"path\", { d: \"M21.21 15.89A10 10 0 1 1 8 2.83\", key: \"k2fpak\" }]\n];\nconst ChartPie = createLucideIcon(\"chart-pie\", __iconNode);\n\nexport { __iconNode, ChartPie as default };\n//# sourceMappingURL=chart-pie.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M20.5 10a2.5 2.5 0 0 1-2.4-3H18a2.95 2.95 0 0 1-2.6-4.4 10 10 0 1 0 6.3 7.1c-.3.2-.8.3-1.2.3\",\n key: \"19sr3x\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }]\n];\nconst Donut = createLucideIcon(\"donut\", __iconNode);\n\nexport { __iconNode, Donut as default };\n//# sourceMappingURL=donut.mjs.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ChartHandle } from './chart';\n\nexport const chartAgent: AgentAdapter<ChartHandle> = {\n id: 'chart',\n // view_change backs the opt-in type switcher (`switchableTypes` prop):\n // the same chart re-presented as line / bar / area / pie / donut.\n capabilities: ['view_change'],\n state: {\n declaredType: {\n type: \"'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'\",\n descriptionKey: 'ui.agent.chart.state.declaredType',\n description:\n 'The consumer-declared chart type — the shape `update_series` expects.',\n read: (handle) => handle.getTypeState().declaredType,\n },\n effectiveType: {\n type: \"'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'\",\n descriptionKey: 'ui.agent.chart.state.effectiveType',\n description:\n 'The type currently rendered — differs from declaredType after a type-switcher pick.',\n read: (handle) => handle.getTypeState().effectiveType,\n },\n availableTypes: {\n type: 'ChartType[]',\n descriptionKey: 'ui.agent.chart.state.availableTypes',\n description:\n 'Types the switcher offers. Empty when the chart has no type switcher.',\n read: (handle) => handle.getTypeState().availableTypes,\n },\n },\n actions: {\n change_view: {\n // Switching the presentation is a write (it changes what the user\n // sees) but is trivially reversible by switching back.\n safety: 'write',\n argsType: 'type',\n argsSchema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['line', 'bar', 'area', 'pie', 'donut'],\n description: 'The chart type to render.',\n },\n },\n required: ['type'],\n },\n returns: 'boolean (accepted)',\n returnsSchema: {\n type: 'boolean',\n description:\n 'True when the switch was applied; false when the chart has no type switcher or the type is not offered (check availableTypes first).',\n },\n idempotent: true,\n descriptionKey: 'ui.agent.chart.actions.changeView',\n description:\n 'Switch the rendered chart type via the type switcher. No-op (returns false) when the chart has no switcher or the type is not offered.',\n invoke: (handle, args: { type: string }) =>\n handle.setType(args.type as Parameters<ChartHandle['setType']>[0]),\n },\n update_series: {\n // Replacing the rendered series mutates what the chart displays — it\n // is a write, reversible by pushing the prior series back.\n safety: 'write',\n argsType: 'series',\n // `series` is `ChartSeries[]` (line/bar/area) OR `number[]`\n // (pie/donut/radialBar). Both shapes are accepted; the handle routes\n // by chart type internally.\n argsSchema: {\n type: 'object',\n properties: {\n series: {\n oneOf: [\n {\n type: 'array',\n description: 'Categorical series for line / bar / area charts.',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n data: { type: 'array', items: { type: 'number' } },\n role: {\n type: 'string',\n enum: ['primary', 'compare'],\n description:\n \"Optional. 'compare' renders this series as a secondary, colour-blind-safe overlay (e.g. the previous period) — dashed grey for line/area, hatched grey for bar. Omit for a normal primary series.\",\n },\n },\n required: ['name', 'data'],\n },\n },\n {\n type: 'array',\n description: 'Flat values for pie / donut / radialBar charts.',\n items: { type: 'number' },\n },\n ],\n },\n },\n required: ['series'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.chart.actions.updateSeries',\n description:\n 'Replace the chart series without remounting. Pass the DECLARED type’s shape (see declaredType state) — when the user has switched the view cross-shape the values are converted to the rendered shape. The write targets the live instance only: a later type switch re-reads the original props and discards it.',\n invoke: (\n handle,\n args: { series: Parameters<ChartHandle['updateSeries']>[0] },\n ) => {\n handle.updateSeries(args.series);\n },\n },\n export_png: {\n safety: 'read',\n returns: 'string (PNG data URI)',\n returnsSchema: {\n type: 'string',\n description: 'A `data:image/png;base64,…` URI of the rendered chart.',\n },\n idempotent: true,\n descriptionKey: 'ui.agent.chart.actions.exportPng',\n description:\n 'Return a PNG data URI of the chart for export or screenshotting.',\n invoke: (handle) => handle.dataURI(),\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'chart' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Chart — thin, typed wrapper over ApexCharts (react-apexcharts). */\n/* */\n/* - All chrome, colours, and fonts flow from */\n/* `src/tokens/apexcharts-theme.ts` — never hex literals in user */\n/* code. A MutationObserver on `<html class>` re-reads the bridge so */\n/* theme changes repaint without remount. */\n/* - A ResizeObserver on the wrapper keeps the chart responsive */\n/* without listening on `window.resize`. */\n/* - Accessibility: the wrapper carries `role=\"img\"` + `aria-label` */\n/* (required `title` prop) + `aria-describedby` pointing at a */\n/* visually-hidden `<table>` that mirrors series × categories. */\n/* - Colour-blind users: `patterns` prop flips `fill.type` to pattern */\n/* using ApexCharts' built-in pattern presets. */\n/* - Numbers format via `Intl.NumberFormat(locale)` — no hand-rolled */\n/* `toFixed()`. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport ReactApexChart from 'react-apexcharts';\nimport ApexCharts from 'apexcharts';\nimport {\n ChartArea,\n ChartColumn,\n ChartLine,\n ChartPie,\n Donut,\n} from 'lucide-react';\nimport {\n getApexChartsTheme,\n getCompareFillOpacity,\n resolveCompareTint,\n type ApexChartsTheme,\n} from '../../tokens/apexcharts-theme';\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { useNeutraliseHiddenFocus } from '../_shared/use-neutralize-hidden-focus';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { chartAgent } from './chart.agent';\nimport { IconButton } from '../button/icon-button';\nimport { IconButtonGroup } from '../icon-button-group';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst chartVariants = cva('ds:relative ds:block ds:w-full', {\n variants: {\n density: {\n compact: 'ds:min-h-[var(--chart-min-height-compact)]',\n comfortable: 'ds:min-h-[var(--chart-min-height-comfortable)]',\n // Applied when an explicit `height` prop is given and no density was\n // requested: the wrapper must not exceed the caller's height (a 96px\n // KPI chart inside a card must not reserve 320px).\n none: '',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type ChartType = 'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar';\n\nexport interface ChartSeries {\n name: string;\n data: number[];\n /**\n * Marks this series as a secondary \"compare\" overlay — e.g. the previous\n * period in a current-vs-previous financial view. Rendered visually\n * subordinate and colour-blind-safe, distinguished from primary series by\n * BOTH a non-colour cue AND a lighter shade of the SAME hue (never colour\n * alone). The compare series inherits its PAIRED primary's colour (k-th\n * compare pairs with the k-th primary, by order), then:\n * - line / area: a round-DOTTED stroke in the paired-primary colour (the\n * dotted-vs-solid pattern is the non-colour cue); area also gets a tinted\n * fill at `--chart-compare-fill-opacity`.\n * - bar: a tinted fill (paired-primary hue at `--chart-compare-fill-opacity`)\n * under a full-strength DOTTED outline that is OPEN at the baseline — so a\n * compare bar reads as an outlined \"ghost\" of its solid primary.\n * The legend swatch shows the lighter tint (via `legend.markers.fillColors`),\n * and the series name (e.g. \"Revenue (previous period)\") remains the primary\n * signal in the legend and the screen-reader table.\n * Only meaningful on axis types (line / area / bar); it is structurally\n * impossible on pie / donut / radialBar (their `series` is `number[]`, which\n * cannot carry this field), so the axis-only invariant is enforced by the\n * type system with no runtime guard. On an axis→slice type switch the compare\n * series are dropped from the slice (a previous-period total is not a slice of\n * the current whole; DEV warn). Omit (or `'primary'`) to render normally — a\n * chart with NO compare series emits byte-identical ApexCharts options to\n * before this field existed.\n * @default 'primary'\n */\n role?: 'primary' | 'compare';\n}\n\n/** Bar orientation. `'horizontal'` renders a ranking sideways. Default `'vertical'`. */\nexport type ChartOrientation = 'vertical' | 'horizontal';\n\n/** Line / area stroke interpolation. Default `'smooth'`. */\nexport type ChartCurve = 'smooth' | 'straight' | 'stepline';\n\nexport interface ChartProps extends VariantProps<typeof chartVariants> {\n /** Required — drives aria-label and sr-only table caption. */\n title: string;\n /** Opaque instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** Chart visual type. */\n type: ChartType;\n /**\n * For `line` / `bar` / `area`: an array of `ChartSeries`.\n * For `pie` / `donut` / `radialBar`: an array of numbers matched to `labels`.\n */\n series: ChartSeries[] | number[];\n /** Category axis labels (line / bar / area). */\n categories?: string[];\n /** Slice labels (pie / donut / radialBar). */\n labels?: string[];\n /** Height override. Defaults to 320px. */\n height?: number | string;\n /** Width override. Defaults to 100% of container. */\n width?: number | string;\n /** Opt-in pattern fills for colour-blind users. */\n patterns?: boolean;\n /**\n * Stack multiple `bar` / `area` series into a composition-over-time view.\n * Maps to ApexCharts `chart.stacked`. Only applies to the axis types\n * (`line` / `bar` / `area`); slice types (`pie` / `donut` / `radialBar`)\n * have no axis to stack against and ignore it. Default `false` — an\n * unstacked chart emits no `chart.stacked` key and renders identically to\n * before this prop existed.\n */\n stacked?: boolean;\n /**\n * Orientation for the `bar` type. `'horizontal'` renders the bars sideways\n * (ApexCharts `plotOptions.bar.horizontal`) for ranking-style charts where\n * the category is a name and the value runs across the horizontal axis.\n * Still an axis chart — pass `series` as `ChartSeries[]` with `categories`.\n * Ignored for every non-`bar` type. Default `'vertical'`.\n */\n orientation?: ChartOrientation;\n /**\n * Stroke interpolation for `line` / `area` charts (ApexCharts\n * `stroke.curve`). `'straight'` avoids the overshoot a smoothed spline\n * introduces on spiky monthly financials — where a `'smooth'` curve can dip\n * visually below zero between two positive points. Inert on `bar` (stroke\n * width is 0) and ignored on slice types. Default `'smooth'` — existing\n * charts are unaffected.\n */\n curve?: ChartCurve;\n /**\n * Override the series colour ramp. Pass **already-resolved** colour strings\n * (e.g. the live value of `var(--success)` sampled by the consumer) — these\n * are handed straight to ApexCharts, which can't read CSS custom properties.\n * When omitted, the theme bridge's `colors` ramp from `apexcharts-theme.ts`\n * is used, so existing consumers are unaffected. Typical use: a single-arc\n * `radialBar` gauge (e.g. BMI) that must change hue with the value —\n * green in the healthy band, amber/red outside it.\n */\n colors?: string[];\n /** Show the ApexCharts toolbar. Defaults to false. */\n toolbar?: boolean;\n /** Locale override — defaults to the active i18next language. */\n locale?: string;\n /**\n * radialBar only. Formats the value printed in the ring centre. Use when the\n * gauge represents a non-percentage figure: pass the arc fill (0–100) as the\n * single `series` value and return the real figure here (e.g. `(_, ) => '22.4'`).\n * Ignored for every other chart type. Defaults to ApexCharts' `${value}%`.\n */\n radialValueFormatter?: (value: number) => string;\n /**\n * Formats the numeric value of each data point wherever it is surfaced as\n * text — the tooltip, the value (y) axis on categorical charts, and the\n * screen-reader summary table. Use it to append a unit or currency symbol,\n * e.g. `(v) => new Intl.NumberFormat(locale, { style: 'currency', currency:\n * 'EUR' }).format(v)`. Defaults to `Intl.NumberFormat(locale)` (grouped\n * number, no unit). Does not apply to a `radialBar` ring centre — use\n * `radialValueFormatter` for that.\n */\n valueFormatter?: (value: number) => string;\n /**\n * Opt-in type switcher. Pass two or more of `'line' | 'bar' | 'area' |\n * 'pie' | 'donut'` to render an icon radiogroup (an `IconButtonGroup`)\n * above the plot that lets the user flip the chart between those types.\n * `type` is the initial selection and is always offered; the user's pick\n * then sticks across re-renders (remount with a new `key` to reset it).\n * When the picked type reads the other data shape, the data adapts: axis\n * series collapse to one slice per series (that series' total) for `pie` /\n * `donut`, and slice values become a single-series axis chart with\n * `labels` as the categories. `radialBar` cannot participate — such\n * entries are ignored (DEV warning) and a `radialBar` chart never shows\n * the switcher.\n */\n switchableTypes?: ChartType[];\n /** Called when the user picks a different type via the switcher. */\n onTypeChange?: (type: ChartType) => void;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\nexport interface ChartHandle {\n /** Returns a PNG data URI for the chart. */\n dataURI: () => Promise<string>;\n /**\n * Updates series without remounting. Always pass the DECLARED `type`'s\n * shape — while the user has switched the view across the axis/slice\n * boundary the values (and, for axis→slice, the slice labels) are\n * converted to the rendered shape; for slice→axis the categories stay\n * the `labels` prop, so keep the value count stable. The update writes\n * to the live ApexCharts instance only: a later type switch remounts\n * from the original props and discards it.\n */\n updateSeries: (next: ChartProps['series']) => void;\n /**\n * Switches the rendered type via the type switcher. Returns `false`\n * (no-op) when the switcher is not enabled or the type is not offered.\n */\n setType: (next: ChartType) => boolean;\n /** Declared vs rendered type plus the types the switcher offers ([] when disabled). */\n getTypeState: () => {\n declaredType: ChartType;\n effectiveType: ChartType;\n availableTypes: ChartType[];\n };\n}\n\n/* ------------------------------------------------------------------ */\n/* Constants */\n/* ------------------------------------------------------------------ */\n\nconst PATTERN_STYLES = [\n 'verticalLines',\n 'horizontalLines',\n 'slantedLines',\n 'squares',\n 'circles',\n] as const;\n\n/** Types where `categories` belong on an x-axis. */\nconst CATEGORICAL_TYPES: ReadonlyArray<ChartType> = ['line', 'bar', 'area'];\n\n/** Types where `series` is a flat `number[]` paired with `labels`. */\nconst SLICE_TYPES: ReadonlyArray<ChartType> = ['pie', 'donut', 'radialBar'];\n\n/** Types the switcher may offer. `radialBar` is excluded — its series are\n * synthetic arc percents that cannot be re-plotted on an axis or as slices. */\nconst SWITCHABLE_TYPES: ReadonlyArray<ChartType> = [\n 'line',\n 'bar',\n 'area',\n 'pie',\n 'donut',\n];\n\ntype SwitchableType = Exclude<ChartType, 'radialBar'>;\n\n/* Static key map (not template-built) so the i18n coverage tooling can see\n every key literally. */\nconst TYPE_SWITCHER_LABEL_KEYS: Record<SwitchableType, string> = {\n line: 'chart.typeSwitcher.line',\n bar: 'chart.typeSwitcher.bar',\n area: 'chart.typeSwitcher.area',\n pie: 'chart.typeSwitcher.pie',\n donut: 'chart.typeSwitcher.donut',\n};\n\nconst TYPE_SWITCHER_ICONS: Record<SwitchableType, React.ReactNode> = {\n line: <ChartLine />,\n bar: <ChartColumn />,\n area: <ChartArea />,\n pie: <ChartPie />,\n donut: <Donut />,\n};\n\n/* Compare-overlay geometry. Colours come only from tokens (via the bridge);\n these are pure numeric/dash literals, consistent with the pre-existing\n stroke width:2 / dashArray literals the component already used. */\nconst COMPARE_OUTLINE_WIDTH = 2; // dotted outline / stroke width (~1.5–2px)\nconst COMPARE_DOT_DASH = '0 6'; // 0-length dash + round cap ⇒ round dots, 6px pitch\n\n/**\n * Rewrite each COMPARE bar into a 3-sided OPEN path (drop the baseline edge and\n * the implicit close) and round-dot its outline. A bar is natively one closed\n * path, so \"open at the bottom\" is impossible via config — this post-render DOM\n * patch is the only way. Verified safe against ApexCharts 5.10.6: animation\n * continuity is read from a separate `pathTo`/`pathFrom` attribute, never the\n * live `d`, so overwriting `d` never corrupts entrance/update animation or\n * `previousPaths`; the same element is kept so tooltips/crosshair still bind.\n * Idempotent (re-running writes the same `d`).\n *\n * Only applied to VERTICAL, positive-valued bars: the open edge is assumed to be\n * the bbox bottom. A horizontal or negative compare bar keeps the native\n * 4-sided dotted outline (still a valid non-colour cue) — see the guard in the\n * component. jsdom lacks `getBBox`, so the per-path guard makes this a no-op in\n * unit tests (exercised in the real-browser story run instead).\n */\nfunction patchCompareBars(\n root: HTMLElement | null,\n compareRealIndexes: number[],\n): void {\n if (!root || compareRealIndexes.length === 0) return;\n root\n .querySelectorAll<SVGGElement>(\n '.apexcharts-bar-series > .apexcharts-series',\n )\n .forEach((g) => {\n const ri = Number(g.getAttribute('data:realIndex'));\n if (!compareRealIndexes.includes(ri)) return;\n g.querySelectorAll<SVGPathElement>('path.apexcharts-bar-area').forEach(\n (p) => {\n if (typeof p.getBBox !== 'function') return; // jsdom guard\n const b = p.getBBox(); // final rendered box, stroke-excluded\n // 3-sided OPEN path: bottom-left → up left → across top → down right.\n // SVG fills the implicit close (bottom-right → bottom-left), so the\n // tint fill stays full-height; the stroke omits the baseline edge.\n p.setAttribute(\n 'd',\n `M ${b.x} ${b.y + b.height} L ${b.x} ${b.y} ` +\n `L ${b.x + b.width} ${b.y} L ${b.x + b.width} ${b.y + b.height}`,\n );\n p.setAttribute('stroke-dasharray', COMPARE_DOT_DASH); // round-dot rhythm\n p.setAttribute('stroke-linecap', 'round');\n },\n );\n });\n}\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction isSliceType(type: ChartType): boolean {\n return SLICE_TYPES.includes(type);\n}\n\nfunction isCategoricalType(type: ChartType): boolean {\n return CATEGORICAL_TYPES.includes(type);\n}\n\n/** Coerce `series` into `ChartSeries[]` for shared logic (table, aria). */\nfunction normaliseSeries(\n series: ChartSeries[] | number[],\n type: ChartType,\n): ChartSeries[] {\n if (isSliceType(type)) {\n const nums = series as number[];\n return [\n {\n name: '',\n data: nums,\n },\n ];\n }\n return series as ChartSeries[];\n}\n\n/* ------------------------------------------------------------------ */\n/* Chart component */\n/* ------------------------------------------------------------------ */\n\nexport const Chart = forwardRef<ChartHandle, ChartProps>(\n (\n {\n title,\n id,\n type,\n series,\n categories,\n labels,\n height,\n width,\n patterns = false,\n stacked = false,\n orientation = 'vertical',\n curve = 'smooth',\n colors,\n toolbar = false,\n locale: localeProp,\n radialValueFormatter,\n valueFormatter,\n switchableTypes,\n onTypeChange,\n density,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation('ui');\n const rawId = useId();\n const chartId = useMemo(\n () => `chart-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n const summaryId = `${chartId}-summary`;\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(0);\n\n /* ApexCharts injects focusable canvases inside the `aria-hidden` */\n /* chart wrapper. Neutralise their tabindex so axe's */\n /* `aria-hidden-focus` rule passes. Same hook used in Sparkline. */\n useNeutraliseHiddenFocus(wrapperRef);\n\n const locale = localeProp ?? i18n.language ?? 'en';\n\n /* ---- dev warning if title missing ------------------------------ */\n if (import.meta.env.DEV && !title) {\n console.warn(\n 'Chart: `title` prop is required. It drives aria-label and the screen-reader summary table.',\n );\n }\n\n /* ---- theme-reactive state -------------------------------------- */\n const [themeOptions, setThemeOptions] = useState<ApexChartsTheme>(() => {\n try {\n return getApexChartsTheme();\n } catch {\n return {};\n }\n });\n\n /* ---- MutationObserver: re-read theme on class change ------------ */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n let timer: ReturnType<typeof setTimeout>;\n const observer = new MutationObserver(() => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n try {\n setThemeOptions(getApexChartsTheme());\n } catch {\n /* no-op in non-browser environments */\n }\n }, 50);\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n return () => {\n clearTimeout(timer);\n observer.disconnect();\n };\n }, []);\n\n /* ---- ResizeObserver: track container width --------------------- */\n useEffect(() => {\n const el = wrapperRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return undefined;\n const ro = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) setContainerWidth(Math.floor(entry.contentRect.width));\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n\n /* ---- type switcher ---------------------------------------------- */\n const switcherTypes = useMemo<SwitchableType[]>(() => {\n if (!switchableTypes || switchableTypes.length === 0) return [];\n const valid = switchableTypes.filter((entry): entry is SwitchableType =>\n SWITCHABLE_TYPES.includes(entry),\n );\n if (import.meta.env.DEV && valid.length !== switchableTypes.length) {\n console.warn(\n \"Chart: `switchableTypes` accepts 'line' | 'bar' | 'area' | 'pie' | 'donut' — other entries are ignored.\",\n );\n }\n if (!SWITCHABLE_TYPES.includes(type)) {\n if (import.meta.env.DEV && valid.length > 0) {\n console.warn(\n 'Chart: the type switcher is unavailable when `type` is \"radialBar\".',\n );\n }\n return [];\n }\n const withCurrent = valid.includes(type as SwitchableType)\n ? valid\n : [type as SwitchableType, ...valid];\n return [...new Set(withCurrent)];\n }, [switchableTypes, type]);\n const switcherEnabled = switcherTypes.length >= 2;\n\n const [pickedType, setPickedType] = useState<SwitchableType | null>(null);\n const effectiveType: ChartType =\n switcherEnabled && pickedType && switcherTypes.includes(pickedType)\n ? pickedType\n : type;\n\n /* ---- data adaptation for the switcher --------------------------- */\n /* Axis and slice types read different `series` shapes. When the user */\n /* switches across that boundary the data adapts: each axis series */\n /* becomes one slice (its total across the categories), and slice */\n /* values become one axis series with `labels` as the categories. */\n /* Same-shape switches (line/bar/area, pie/donut) pass through as-is. */\n const declaredIsSlice = isSliceType(type);\n const effectiveIsSlice = isSliceType(effectiveType);\n const { effectiveSeries, effectiveCategories, effectiveLabels } =\n useMemo(() => {\n if (declaredIsSlice === effectiveIsSlice) {\n return {\n effectiveSeries: series,\n effectiveCategories: categories,\n effectiveLabels: labels,\n };\n }\n if (!declaredIsSlice) {\n const allRows = series as ChartSeries[];\n // A previous-period total is not a slice of the current whole, so\n // compare overlays are dropped from the axis→slice collapse (their\n // grey \"prev\" slice would misread as part of the current mix). This\n // also makes compareFlags naturally [] on the slice side.\n const rows = allRows.filter((row) => row.role !== 'compare');\n if (import.meta.env.DEV && rows.length !== allRows.length) {\n console.warn(\n 'Chart: compare series are dropped on an axis→slice switch — a previous-period total is not a slice of the current whole.',\n );\n }\n const totals = rows.map((row) =>\n row.data.reduce((sum, v) => sum + v, 0),\n );\n if (import.meta.env.DEV && totals.some((v) => v < 0)) {\n console.warn(\n 'Chart: the axis→slice adaptation produced a negative series total — pie/donut cannot represent negative values. Offer only axis types in `switchableTypes` for delta-style data.',\n );\n }\n return {\n effectiveSeries: totals,\n effectiveCategories: undefined,\n effectiveLabels: rows.map((row) => row.name),\n };\n }\n const values = series as number[];\n return {\n effectiveSeries: [\n { name: t('chart.table.value'), data: values },\n ] as ChartSeries[],\n effectiveCategories: labels ?? [],\n effectiveLabels: undefined,\n };\n }, [series, categories, labels, declaredIsSlice, effectiveIsSlice, t]);\n\n /* ---- imperative handle ----------------------------------------- */\n const agentHandle = useMemo<ChartHandle>(\n () => ({\n async dataURI(): Promise<string> {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return '';\n const result = await instance.dataURI();\n return (result as { imgURI: string }).imgURI;\n },\n updateSeries(next) {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return;\n // Callers always pass the DECLARED type's shape. When the user has\n // switched the view across the axis/slice boundary, convert to what\n // the live instance actually renders (mirrors the render-time\n // adaptation) so the update never hits a mismatched instance.\n const declaredSlice = isSliceType(type);\n const renderedSlice = isSliceType(effectiveType);\n if (declaredSlice === renderedSlice) {\n if (declaredSlice) instance.updateSeries(next as number[]);\n else instance.updateSeries(next as ChartSeries[]);\n return;\n }\n if (!declaredSlice) {\n // Drop compare overlays from the collapse (mirrors the render-time\n // adaptation) so no stray \"prev\" slice appears.\n const rows = (next as ChartSeries[]).filter(\n (row) => row.role !== 'compare',\n );\n // Keep slice labels in step with the incoming series — without\n // this, a series-count or name change desyncs slices from the\n // labels captured at the last React render.\n instance.updateOptions(\n { labels: rows.map((row) => row.name) },\n false,\n true,\n );\n instance.updateSeries(\n rows.map((row) => row.data.reduce((sum, v) => sum + v, 0)),\n );\n return;\n }\n instance.updateSeries([\n { name: t('chart.table.value'), data: next as number[] },\n ]);\n },\n setType(next: ChartType): boolean {\n if (!switcherEnabled) return false;\n if (!switcherTypes.includes(next as SwitchableType)) return false;\n setPickedType(next as SwitchableType);\n return true;\n },\n getTypeState() {\n return {\n declaredType: type,\n effectiveType,\n availableTypes: switcherEnabled\n ? ([...switcherTypes] as ChartType[])\n : [],\n };\n },\n }),\n [chartId, type, effectiveType, t, switcherEnabled, switcherTypes],\n );\n useImperativeHandle(ref, () => agentHandle, [agentHandle]);\n useAgentRegistration(chartAgent, agentHandle, id);\n\n /* ---- RTL detection --------------------------------------------- */\n const isRtl =\n typeof document !== 'undefined' && document.documentElement.dir === 'rtl';\n\n /* ---- normalised series for sr-only table ----------------------- */\n const tableSeries = useMemo(\n () => normaliseSeries(effectiveSeries, effectiveType),\n [effectiveSeries, effectiveType],\n );\n\n /* ---- Intl formatter -------------------------------------------- */\n const numberFormatter = useMemo(\n () => new Intl.NumberFormat(locale),\n [locale],\n );\n\n /* ---- resolved value formatter ---------------------------------- */\n /* The consumer's `valueFormatter` (e.g. a currency formatter) wins */\n /* everywhere a data-point value is surfaced as text; otherwise we */\n /* fall back to the locale-aware grouped number. */\n const formatValue = useMemo(\n () =>\n valueFormatter ?? ((value: number) => numberFormatter.format(value)),\n [valueFormatter, numberFormatter],\n );\n\n /* ---- toolbar localisation -------------------------------------- */\n const toolbarLocale = useMemo(\n () => ({\n name: locale,\n options: {\n toolbar: {\n download: t('chart.toolbar.download'),\n selection: t('chart.toolbar.selection'),\n selectionZoom: t('chart.toolbar.selectionZoom'),\n zoomIn: t('chart.toolbar.zoomIn'),\n zoomOut: t('chart.toolbar.zoomOut'),\n pan: t('chart.toolbar.pan'),\n reset: t('chart.toolbar.reset'),\n exportToSVG: t('chart.toolbar.exportToSVG'),\n exportToPNG: t('chart.toolbar.exportToPNG'),\n exportToCSV: t('chart.toolbar.exportToCSV'),\n },\n },\n }),\n [locale, t],\n );\n\n /* ---- build ApexOptions ----------------------------------------- */\n const reducedMotion = usePrefersReducedMotion();\n\n const chartOptions: ApexCharts.ApexOptions = useMemo(() => {\n // Split the resolved compare colours off the theme object BEFORE spread:\n // `base` is exactly today's theme shape (colours / chart / grid), so\n // `...base` emits the same keys as before. The theme no longer carries a\n // `compare` object — the redesign never uses grey; the compare fill is a\n // tint of the paired-primary hue, resolved below from a token.\n const base = themeOptions;\n\n // Per-series compare flags, derived at build time from the EFFECTIVE\n // series/type so the type switcher composes: only axis types carry the\n // `role` field (slice `series` is `number[]`), so a slice view yields [].\n const compareFlags =\n isCategoricalType(effectiveType) && Array.isArray(effectiveSeries)\n ? (effectiveSeries as ChartSeries[]).map((s) => s.role === 'compare')\n : [];\n const hasCompare = compareFlags.some(Boolean);\n const barCompare = hasCompare && effectiveType === 'bar';\n // The open-at-the-baseline bar rewrite (patchCompareBars) assumes the\n // baseline is the bbox BOTTOM — true only for vertical, non-negative bars.\n // A horizontal or negative compare bar keeps the native 4-sided dotted\n // outline (still a valid non-colour cue), so the hook is gated off for it.\n const compareHasNegative =\n barCompare &&\n (effectiveSeries as ChartSeries[]).some(\n (s) => s.role === 'compare' && s.data.some((v) => v < 0),\n );\n const openBottomBars =\n barCompare && orientation === 'vertical' && !compareHasNegative;\n // Compare fill opacity + per-series tints (legend swatch), resolved from\n // the token via the bridge so no hex literal lives in component code.\n const compareFillOpacity = hasCompare ? getCompareFillOpacity() : 0.3;\n\n if (\n import.meta.env.DEV &&\n hasCompare &&\n stacked &&\n isCategoricalType(effectiveType)\n ) {\n console.warn(\n 'Chart: `stacked` with a compare series — a compare overlay is normally a grouped, not stacked, series. It will be stacked with the primaries.',\n );\n }\n\n const options: ApexCharts.ApexOptions = {\n ...base,\n chart: {\n ...base.chart,\n id: chartId,\n toolbar: { show: toolbar },\n zoom: { enabled: toolbar },\n animations: {\n enabled: !reducedMotion,\n dynamicAnimation: { enabled: !reducedMotion },\n },\n locales: [toolbarLocale],\n defaultLocale: locale,\n parentHeightOffset: 0,\n // Stacking is an axis-only concept — gate on the categorical types\n // so a slice/radial chart never receives it, and omit the key\n // entirely when unstacked so the default output is byte-identical.\n ...(stacked && isCategoricalType(effectiveType)\n ? { stacked: true }\n : {}),\n },\n // Only set `labels` when the effective type actually has them (slice\n // charts). Emitting `labels: undefined` crashes ApexCharts' bar\n // renderer — `parseDataAxisCharts` reads `labels.length` and throws\n // \"Cannot read properties of undefined (reading 'length')\", which\n // aborts the render and leaves a blank chart. Absent is safe; area /\n // line tolerate the undefined but bar does not, so never pass it.\n ...(effectiveLabels ? { labels: effectiveLabels } : {}),\n legend: {\n ...base.legend,\n position: 'bottom',\n // ApexCharts legend.horizontalAlign is a physical prop mapped internally\n // to the chart's own text flow. For RTL we flip via `yaxis.opposite`\n // and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored\n // to the inline-start by asking for 'left' on LTR and 'right' on RTL.\n horizontalAlign: isRtl ? 'right' : 'left',\n fontFamily: 'inherit',\n },\n tooltip: {\n ...base.tooltip,\n y: {\n formatter: (value: number) => formatValue(value),\n },\n },\n noData: {\n text: t('chart.noData'),\n },\n };\n\n // Consumer-supplied, already-resolved colour ramp wins over the theme\n // bridge's `colors`. Ignored when absent so existing charts keep the\n // tokenised ramp. ApexCharts can't read `var(--…)`, so the consumer is\n // responsible for sampling the live token value before passing it in.\n if (colors && colors.length > 0) {\n options.colors = colors;\n }\n\n // Step 1 (compare) — pair each compare series with a primary and inherit\n // its colour. The k-th `role:'compare'` pairs with the k-th `role:'primary'`\n // by order (clamped to the last primary; falls back to its own index when\n // there are zero primaries). Primaries keep ApexCharts' own %-cycled ramp\n // colour, so after this `options.colors[i]` is the full paired-primary\n // colour for EVERY series — used directly by the bar fill/outline and the\n // line stroke. The compare fill is tinted separately (fill.opacity); only\n // the LEGEND swatch shows the lighter tint (legend.markers.fillColors).\n if (hasCompare) {\n const ramp = (options.colors ?? base.colors ?? []) as string[];\n const rampAt = (i: number) => ramp[i % Math.max(ramp.length, 1)];\n const primaryIdx = (effectiveSeries as ChartSeries[])\n .map((s, i) => (s.role === 'compare' ? -1 : i))\n .filter((i) => i >= 0);\n let seen = 0;\n options.colors = (effectiveSeries as ChartSeries[]).map((s, i) => {\n if (s.role !== 'compare') return rampAt(i);\n const pair = primaryIdx.length\n ? primaryIdx[Math.min(seen++, primaryIdx.length - 1)]\n : i;\n return rampAt(pair); // inherit the paired primary's colour\n });\n // Legend swatch: compare shows the lighter tint (a shade of its paired\n // primary), primaries show their own colour. Decoupled from the mark\n // colour so the swatch reads as \"lighter = compare\".\n const compareTints = (options.colors as string[]).map((c, i) =>\n compareFlags[i] ? resolveCompareTint(c) : c,\n );\n options.legend = {\n ...options.legend,\n markers: {\n ...(options.legend?.markers ?? {}),\n fillColors: compareTints,\n },\n };\n }\n\n if (isCategoricalType(effectiveType)) {\n // A horizontal bar makes ApexCharts swap axes: the numeric axis\n // becomes the x-axis and the categories move to the y-axis. The value\n // formatter must follow the numbers, so on a horizontal bar it lives\n // on `xaxis.labels` and the category y-axis keeps its default (string)\n // labels; every other categorical chart keeps the formatter on `yaxis`.\n const horizontalBar =\n effectiveType === 'bar' && orientation === 'horizontal';\n options.xaxis = {\n ...base.xaxis,\n categories: effectiveCategories ?? [],\n ...(horizontalBar\n ? {\n labels: {\n formatter: (value: string | number) =>\n formatValue(Number(value)),\n },\n }\n : {}),\n };\n options.yaxis = {\n ...base.yaxis,\n opposite: isRtl,\n ...(horizontalBar\n ? {}\n : { labels: { formatter: (value: number) => formatValue(value) } }),\n };\n // Step 2 (compare) — the non-colour cue is a round-DOTTED stroke on the\n // compare indices (dotted-vs-solid, greyscale/print-safe). It works on\n // bars too: unlike a fill hatch, a per-series bar stroke width + dash\n // renders a dotted OUTLINE in the paired-primary colour. Line/area keep\n // width 2; a bar's outline width is COMPARE_OUTLINE_WIDTH on compare\n // indices and 0 on primaries (solid, fill-only). `lineCap:'round'` turns\n // the 0-length dash into round dots. When there is no compare series the\n // stroke is byte-identical to before (no lineCap / dashArray key).\n options.stroke = {\n curve,\n width:\n effectiveType === 'bar'\n ? hasCompare\n ? compareFlags.map((c) => (c ? COMPARE_OUTLINE_WIDTH : 0))\n : 0\n : 2,\n ...(hasCompare\n ? {\n lineCap: 'round' as const,\n // Runtime accepts a string dash; the published types say\n // `number` → one documented cast. `'0 6'` + round cap ⇒ dots.\n dashArray: compareFlags.map((c) =>\n c ? COMPARE_DOT_DASH : 0,\n ) as unknown as number[],\n }\n : {}),\n };\n options.dataLabels = { enabled: false };\n }\n\n if (effectiveType === 'radialBar' && radialValueFormatter) {\n // ApexCharts treats a radialBar series value as a 0–100 percent and\n // renders it verbatim in the ring centre. When the displayed value is\n // NOT a percentage (e.g. a BMI), the consumer scales the series to a\n // percent for the arc and supplies `radialValueFormatter` to print the\n // real value in the centre. Without this, the gauge would read \"56%\"\n // for a BMI of 22.4 — misleading. Default behaviour is untouched.\n const basePlot = (base.plotOptions ?? {}) as NonNullable<\n ApexCharts.ApexOptions['plotOptions']\n >;\n options.plotOptions = {\n ...basePlot,\n radialBar: {\n ...(basePlot.radialBar ?? {}),\n dataLabels: {\n ...(basePlot.radialBar?.dataLabels ?? {}),\n value: {\n ...(basePlot.radialBar?.dataLabels?.value ?? {}),\n formatter: (val: number) => radialValueFormatter(Number(val)),\n },\n },\n },\n };\n }\n\n // Horizontal bars for rankings. `bar` and `radialBar` are mutually\n // exclusive effective types, so this never collides with the radialBar\n // plotOptions above. Absent (vertical) = the ApexCharts default, so the\n // key is only emitted when the consumer opts in.\n if (effectiveType === 'bar' && orientation === 'horizontal') {\n const basePlot = (base.plotOptions ?? {}) as NonNullable<\n ApexCharts.ApexOptions['plotOptions']\n >;\n options.plotOptions = {\n ...basePlot,\n bar: { ...(basePlot.bar ?? {}), horizontal: true },\n };\n }\n\n // Step 3 (fill) — the compare branches sit between the global `patterns`\n // branch and the area-gradient branch. Each is gated on hasCompare /\n // barCompare, so a chart with no compare series follows today's exact\n // paths and emits byte-identical fill.\n if (patterns) {\n // Colour-blind pattern mode. With a compare overlay the compare indices\n // drop the hatch and use a plain tinted solid fill (their dotted outline\n // / stroke from Step 2 is already the non-colour cue), so they read as a\n // lighter ghost of the primary; the primaries keep the cycled hatch.\n options.fill = {\n type: hasCompare\n ? compareFlags.map((c) => (c ? 'solid' : 'pattern'))\n : 'pattern',\n opacity: hasCompare\n ? compareFlags.map((c) =>\n c ? compareFillOpacity : effectiveType === 'area' ? 0.3 : 1,\n )\n : effectiveType === 'area'\n ? 0.3\n : 1,\n pattern: {\n style: [...PATTERN_STYLES],\n strokeWidth: 2,\n },\n };\n } else if (barCompare) {\n // Tinted solid fill: compare bars are their paired-primary hue at\n // `--chart-compare-fill-opacity`; primaries stay solid at full opacity.\n // The dotted outline (Step 2 stroke width) + open-bottom rewrite\n // (patchCompareBars, wired via chart.events below) supply the shape.\n options.fill = {\n type: 'solid',\n opacity: compareFlags.map((c) => (c ? compareFillOpacity : 1)),\n };\n } else if (effectiveType === 'area') {\n // Area gradient. With a compare overlay the compare fill drops to the\n // tint opacity so it sits under the dotted paired-primary stroke without\n // fighting the primary; primaries keep the default gradient. No grey —\n // the tint is a shade of the same (paired-primary) hue from Step 1.\n options.fill = hasCompare\n ? {\n type: 'gradient',\n opacity: compareFlags.map((c) => (c ? compareFillOpacity : 0.3)),\n }\n : {\n type: 'gradient',\n opacity: 0.3,\n };\n }\n\n // Open-at-the-baseline bar outline (progressive enhancement over the\n // native dotted 4-sided border). Attached ONLY for vertical, non-negative\n // compare bars; horizontal / negative bars keep the closed dotted outline.\n // Added inside this branch so a chart without open-bottom bars never gets\n // an `events` key (byte-identical). Re-fires on mount / update / animation\n // end — jointly covering mount, resize, theme change, and series updates.\n if (openBottomBars) {\n const compareRealIndexes = compareFlags\n .map((c, i) => (c ? i : -1))\n .filter((i) => i >= 0);\n const run = () =>\n patchCompareBars(wrapperRef.current, compareRealIndexes);\n const raf = () =>\n typeof requestAnimationFrame === 'function'\n ? requestAnimationFrame(run)\n : run();\n options.chart = {\n ...options.chart,\n events: {\n ...(options.chart?.events ?? {}),\n mounted: () => raf(),\n updated: () => raf(),\n animationEnd: () => run(),\n },\n };\n }\n\n return options;\n }, [\n themeOptions,\n chartId,\n toolbar,\n reducedMotion,\n toolbarLocale,\n locale,\n effectiveLabels,\n formatValue,\n t,\n effectiveType,\n effectiveSeries,\n effectiveCategories,\n isRtl,\n patterns,\n stacked,\n orientation,\n curve,\n colors,\n radialValueFormatter,\n ]);\n\n /* ---- resolved dimensions --------------------------------------- */\n const resolvedWidth =\n width ?? (containerWidth > 0 ? containerWidth : '100%');\n const resolvedHeight = height ?? 320;\n\n /* ---- sr-only data table --------------------------------------- */\n const srTable = useMemo(() => {\n const columnLabels = isSliceType(effectiveType)\n ? (effectiveLabels ?? [])\n : (effectiveCategories ?? []);\n const rows = tableSeries;\n return (\n <table id={summaryId} className=\"ds:sr-only\">\n <caption>{title}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{t('chart.table.series')}</th>\n {columnLabels.map((col, i) => (\n <th key={`${col}-${i}`} scope=\"col\">\n {col}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, rowIndex) => (\n <tr key={`${row.name}-${rowIndex}`}>\n <th scope=\"row\">{row.name || t('chart.table.value')}</th>\n {row.data.map((value, colIndex) => (\n <td key={`${rowIndex}-${colIndex}`}>\n {/* For a radialBar gauge the series is a synthetic arc\n percent — announce the consumer's display value (e.g.\n the real BMI) instead of the raw fill so AT users get\n the same figure sighted users see in the ring. */}\n {effectiveType === 'radialBar' && radialValueFormatter\n ? radialValueFormatter(value)\n : formatValue(value)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n }, [\n effectiveType,\n tableSeries,\n effectiveLabels,\n effectiveCategories,\n summaryId,\n title,\n t,\n formatValue,\n radialValueFormatter,\n ]);\n\n /* ---- ApexCharts `series` prop shape ----------------------------- */\n const apexSeries = useMemo(() => {\n if (isSliceType(effectiveType)) {\n return effectiveSeries as number[];\n }\n return effectiveSeries as ChartSeries[];\n }, [effectiveSeries, effectiveType]);\n\n /* `key={effectiveType}` remounts ApexCharts on a switch: its in-place\n axis↔slice type transitions are unreliable (stale internal scales),\n and a clean mount is the documented-safe path. */\n const chartRegion = (\n <div\n ref={wrapperRef}\n role=\"img\"\n aria-label={title}\n aria-describedby={summaryId}\n className={chartVariants({\n // Explicit height wins over the density min-height unless the\n // caller also asked for a density explicitly.\n density: density ?? (height !== undefined ? 'none' : undefined),\n className: switcherEnabled ? undefined : className,\n })}\n {...(switcherEnabled\n ? {}\n : { 'data-component': 'chart', 'data-component-id': id })}\n >\n {srTable}\n <ReactApexChart\n key={effectiveType}\n type={effectiveType}\n series={apexSeries as ApexCharts.ApexOptions['series']}\n options={chartOptions}\n width={resolvedWidth}\n height={resolvedHeight}\n aria-hidden=\"true\"\n />\n </div>\n );\n\n if (!switcherEnabled) return chartRegion;\n\n /* The switcher cannot live inside the `role=\"img\"` region — that role\n makes the whole subtree presentational, which would strip the radios\n from the accessibility tree. It renders as a sibling above the plot,\n and the bounding `data-component` marker moves to this shared\n wrapper so the component boundary still encloses everything. */\n return (\n <div\n data-component=\"chart\"\n data-component-id={id}\n className={`ds:block ds:w-full ${className ?? ''}`.trim()}\n >\n <div className=\"ds:mb-[var(--spacing-xs)] ds:flex ds:justify-end\">\n <IconButtonGroup\n role=\"radiogroup\"\n mode=\"toggle-single\"\n size=\"sm\"\n aria-label={t('chart.typeSwitcher.label')}\n value={effectiveType}\n onValueChange={(next) => {\n // Guard: keyboard paths can re-commit the current value; the\n // contract is \"called when the user picks a DIFFERENT type\".\n if (next === effectiveType) return;\n setPickedType(next as SwitchableType);\n onTypeChange?.(next as ChartType);\n }}\n >\n {switcherTypes.map((entry) => (\n <IconButton\n key={entry}\n value={entry}\n // Explicit — the default (submit) would post a surrounding\n // consumer <form> on click/Space.\n type=\"button\"\n icon={TYPE_SWITCHER_ICONS[entry]}\n aria-label={t(TYPE_SWITCHER_LABEL_KEYS[entry])}\n />\n ))}\n </IconButtonGroup>\n </div>\n {chartRegion}\n </div>\n );\n },\n);\n\nChart.displayName = 'Chart';\n\n/* ------------------------------------------------------------------ */\n/* Re-export internal helper for downstream theming (kept narrow). */\n/* ------------------------------------------------------------------ */\n\nexport { chartVariants };\n"],"names":["__iconNode","ChartArea","createLucideIcon","ChartColumn","ChartLine","ChartPie","Donut","chartAgent","handle","args","chartVariants","cva","PATTERN_STYLES","CATEGORICAL_TYPES","SLICE_TYPES","SWITCHABLE_TYPES","TYPE_SWITCHER_LABEL_KEYS","TYPE_SWITCHER_ICONS","COMPARE_OUTLINE_WIDTH","COMPARE_DOT_DASH","patchCompareBars","root","compareRealIndexes","g","ri","p","b","isSliceType","type","isCategoricalType","normaliseSeries","series","Chart","forwardRef","title","id","categories","labels","height","width","patterns","stacked","orientation","curve","colors","toolbar","localeProp","radialValueFormatter","valueFormatter","switchableTypes","onTypeChange","density","className","ref","t","i18n","useTranslation","rawId","useId","chartId","useMemo","summaryId","wrapperRef","useRef","containerWidth","setContainerWidth","useState","useNeutraliseHiddenFocus","locale","themeOptions","setThemeOptions","getApexChartsTheme","useEffect","timer","observer","el","ro","entries","entry","switcherTypes","valid","withCurrent","switcherEnabled","pickedType","setPickedType","effectiveType","declaredIsSlice","effectiveIsSlice","effectiveSeries","effectiveCategories","effectiveLabels","rows","row","sum","v","values","agentHandle","instance","ApexCharts","next","declaredSlice","renderedSlice","useImperativeHandle","useAgentRegistration","isRtl","tableSeries","numberFormatter","formatValue","value","toolbarLocale","reducedMotion","usePrefersReducedMotion","chartOptions","base","compareFlags","s","hasCompare","barCompare","compareHasNegative","openBottomBars","compareFillOpacity","getCompareFillOpacity","options","ramp","rampAt","i","primaryIdx","seen","pair","compareTints","c","resolveCompareTint","_a","horizontalBar","basePlot","_b","_d","_c","val","run","raf","_e","resolvedWidth","resolvedHeight","srTable","columnLabels","jsx","jsxs","col","rowIndex","colIndex","apexSeries","chartRegion","ReactApexChart","IconButtonGroup","IconButton"],"mappings":";;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,4BAA4B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AAoE;AAAA,gBAACS;AAAA,gBAAA;AAAA,kBAEC,OAAO7E;AAAA,kBAGP,MAAK;AAAA,kBACL,MAAM7D,GAAoB6D,CAAK;AAAA,kBAC/B,cAAYxB,EAAEtC,GAAyB8D,CAAK,CAAC;AAAA,gBAAA;AAAA,gBANxCA;AAAA,cAAA,CAQR;AAAA,YAAA;AAAA,UAAA,GAEL;AAAA,UACC0E;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IAzCwBA;AAAA,EA4C/B;AACF;AAEAxH,GAAM,cAAc;","x_google_ignoreList":[0,1,2,3,4]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state-DActfjdn.js","sources":["../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n type Ref,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '../button/button';\n\n/* ------------------------------------------------------------------ */\n/* Ref helper */\n/* ------------------------------------------------------------------ */\n\nfunction setRef<T>(ref: Ref<T>, value: T | null) {\n if (!ref) return;\n if (typeof ref === 'function') ref(value);\n else (ref as { current: T | null }).current = value;\n}\n\n/* ------------------------------------------------------------------ */\n/* Context */\n/* ------------------------------------------------------------------ */\n\ninterface EmptyStateContextValue {\n size: 'sm' | 'md' | 'lg';\n variant: 'first-use' | 'no-results' | 'error';\n titleId: string;\n registerTitle: () => void;\n}\n\nconst EmptyStateContext = createContext<EmptyStateContextValue>({\n size: 'md',\n variant: 'first-use',\n titleId: '',\n registerTitle: () => {},\n});\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst emptyStateVariants = cva(\n 'ds:flex ds:flex-col ds:items-center ds:text-center ds:max-w-md ds:ms-auto ds:me-auto ds:w-full',\n {\n variants: {\n size: {\n sm: 'ds:p-[var(--spacing-md)] ds:gap-[var(--spacing-sm)]',\n md: 'ds:p-[var(--spacing-lg)] ds:gap-[var(--spacing-md)]',\n lg: 'ds:p-[var(--spacing-lg)] ds:gap-[var(--spacing-md)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst illustrationVariants = cva(\n 'ds:flex ds:items-center ds:justify-center ds:flex-shrink-0',\n {\n variants: {\n size: {\n sm: 'ds:w-[80px] ds:h-[80px]',\n md: 'ds:w-[160px] ds:h-[160px]',\n lg: 'ds:w-[240px] ds:h-[240px]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\nconst titleVariants = cva('type-title-card ds:text-[var(--foreground)]', {\n variants: {\n size: {\n sm: 'ds:[--type-title-card-size:var(--font-size-sm)]',\n md: '',\n lg: 'ds:[--type-title-card-size:var(--font-size-xl)]',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\nconst descriptionVariants = cva(\n 'type-body-sm ds:text-[var(--muted-foreground)]',\n {\n variants: {\n size: {\n sm: 'ds:[--type-body-sm-size:var(--font-size-xs)]',\n md: '',\n lg: 'ds:[--type-body-sm-size:var(--font-size-base)]',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Built-in illustrations */\n/* ------------------------------------------------------------------ */\n\nfunction FirstUseIllustration() {\n return (\n <svg\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className=\"ds:w-full ds:h-full\"\n >\n <circle\n cx=\"60\"\n cy=\"60\"\n r=\"50\"\n fill=\"var(--muted)\"\n stroke=\"var(--muted-foreground)\"\n strokeWidth=\"2\"\n />\n <rect x=\"55\" y=\"30\" width=\"10\" height=\"60\" rx=\"5\" fill=\"var(--primary)\" />\n <rect x=\"30\" y=\"55\" width=\"60\" height=\"10\" rx=\"5\" fill=\"var(--accent)\" />\n </svg>\n );\n}\n\nfunction NoResultsIllustration() {\n return (\n <svg\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className=\"ds:w-full ds:h-full\"\n >\n <circle cx=\"52\" cy=\"52\" r=\"28\" stroke=\"var(--muted)\" strokeWidth=\"6\" />\n <line\n x1=\"72\"\n y1=\"72\"\n x2=\"92\"\n y2=\"92\"\n stroke=\"var(--muted)\"\n strokeWidth=\"6\"\n strokeLinecap=\"round\"\n />\n <line\n x1=\"42\"\n y1=\"52\"\n x2=\"62\"\n y2=\"52\"\n stroke=\"var(--muted-foreground)\"\n strokeWidth=\"4\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction ErrorIllustration() {\n return (\n <svg\n viewBox=\"0 0 120 120\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n className=\"ds:w-full ds:h-full\"\n >\n <path\n d=\"M60 15 L110 95 H10 Z\"\n fill=\"var(--destructive)\"\n fillOpacity=\"0.1\"\n stroke=\"var(--destructive)\"\n strokeOpacity=\"0.4\"\n strokeWidth=\"3\"\n strokeLinejoin=\"round\"\n />\n <rect\n x=\"56\"\n y=\"45\"\n width=\"8\"\n height=\"26\"\n rx=\"4\"\n fill=\"var(--destructive)\"\n fillOpacity=\"0.6\"\n />\n <circle\n cx=\"60\"\n cy=\"82\"\n r=\"5\"\n fill=\"var(--destructive)\"\n fillOpacity=\"0.6\"\n />\n </svg>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Subcomponents */\n/* ------------------------------------------------------------------ */\n\nconst EmptyStateIllustration = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => {\n const { size } = useContext(EmptyStateContext);\n return (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={illustrationVariants({ size, className })}\n {...props}\n >\n {children}\n </div>\n );\n});\nEmptyStateIllustration.displayName = 'EmptyState.Illustration';\n\nconst EmptyStateTitle = forwardRef<\n HTMLHeadingElement,\n HTMLAttributes<HTMLHeadingElement>\n>(({ children, className, ...props }, ref) => {\n const { size, titleId, registerTitle } = useContext(EmptyStateContext);\n const callbackRef = useCallback(\n (node: HTMLHeadingElement | null) => {\n if (node) registerTitle();\n if (typeof ref === 'function') ref(node);\n else if (ref)\n (ref as { current: HTMLHeadingElement | null }).current = node;\n },\n [ref, registerTitle],\n );\n return (\n <h3\n ref={callbackRef}\n id={titleId}\n className={titleVariants({ size, className })}\n {...props}\n >\n {children}\n </h3>\n );\n});\nEmptyStateTitle.displayName = 'EmptyState.Title';\n\nconst EmptyStateDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ children, className, ...props }, ref) => {\n const { size } = useContext(EmptyStateContext);\n return (\n <p\n ref={ref}\n className={descriptionVariants({ size, className })}\n {...props}\n >\n {children}\n </p>\n );\n});\nEmptyStateDescription.displayName = 'EmptyState.Description';\n\nconst actionsVariants = cva(\n 'ds:flex ds:flex-row ds:flex-wrap ds:items-center ds:justify-center ds:gap-[var(--spacing-md)]',\n);\n\nconst EmptyStateActions = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => (\n <div ref={ref} className={actionsVariants({ className })} {...props}>\n {children}\n </div>\n));\nEmptyStateActions.displayName = 'EmptyState.Actions';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface EmptyStateProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'title'>,\n VariantProps<typeof emptyStateVariants> {\n variant: 'first-use' | 'no-results' | 'error';\n size?: 'sm' | 'md' | 'lg';\n title?: string;\n description?: string;\n primaryAction?: { label: string; onClick: () => void };\n secondaryAction?: { label: string; onClick: () => void; href?: string };\n autoFocus?: boolean;\n children?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nconst EmptyStateRoot = forwardRef<HTMLDivElement, EmptyStateProps>(\n (\n {\n variant,\n size = 'md',\n title,\n description,\n primaryAction,\n secondaryAction,\n autoFocus = false,\n children,\n className,\n ...props\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const titleId = useId();\n const containerRef = useRef<HTMLDivElement | null>(null);\n const [hasTitle, setHasTitle] = useState(false);\n const registerTitle = useCallback(() => setHasTitle(true), []);\n\n useEffect(() => {\n if (!autoFocus) return;\n const firstBtn = containerRef.current?.querySelector<HTMLElement>(\n 'button:not([disabled]), a[href]',\n );\n firstBtn?.focus();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const roleProps =\n variant === 'no-results'\n ? { role: 'status' as const, 'aria-live': 'polite' as const }\n : { role: 'region' as const };\n\n const defaultTitle =\n variant === 'first-use'\n ? t('emptyState.firstUse.title')\n : variant === 'no-results'\n ? t('emptyState.noResults.title')\n : t('emptyState.error.title');\n\n const defaultDescription =\n variant === 'first-use'\n ? t('emptyState.firstUse.description')\n : variant === 'no-results'\n ? t('emptyState.noResults.description')\n : t('emptyState.error.description');\n\n const defaultCtaLabel =\n variant === 'first-use'\n ? t('emptyState.firstUse.cta')\n : variant === 'no-results'\n ? t('emptyState.noResults.cta')\n : t('emptyState.error.cta');\n\n const buttonSize = size === 'sm' ? ('sm' as const) : ('md' as const);\n\n const safeHref = (href: string) =>\n /^(https?:\\/\\/|\\/|#)/.test(href) ? href : '#';\n\n return (\n <EmptyStateContext.Provider\n value={{ size, variant, titleId, registerTitle }}\n >\n <div\n ref={(node) => {\n containerRef.current = node;\n setRef(ref, node);\n }}\n aria-labelledby={hasTitle || !children ? titleId : undefined}\n {...roleProps}\n className={emptyStateVariants({ size, className })}\n data-component=\"empty-state\"\n {...props}\n >\n {children ?? (\n <>\n <EmptyStateIllustration>\n {variant === 'first-use' && <FirstUseIllustration />}\n {variant === 'no-results' && <NoResultsIllustration />}\n {variant === 'error' && <ErrorIllustration />}\n </EmptyStateIllustration>\n <EmptyStateTitle>{title ?? defaultTitle}</EmptyStateTitle>\n <EmptyStateDescription>\n {description ?? defaultDescription}\n </EmptyStateDescription>\n {(primaryAction || secondaryAction) && (\n <EmptyStateActions>\n {primaryAction && (\n <Button\n intent=\"primary\"\n size={buttonSize}\n onClick={primaryAction.onClick}\n >\n {primaryAction.label ?? defaultCtaLabel}\n </Button>\n )}\n {secondaryAction &&\n (secondaryAction.href ? (\n <Button intent=\"ghost\" size={buttonSize} asChild>\n <a\n href={safeHref(secondaryAction.href!)}\n onClick={secondaryAction.onClick}\n >\n {secondaryAction.label}\n </a>\n </Button>\n ) : (\n <Button\n intent=\"ghost\"\n size={buttonSize}\n onClick={secondaryAction.onClick}\n >\n {secondaryAction.label}\n </Button>\n ))}\n </EmptyStateActions>\n )}\n </>\n )}\n </div>\n </EmptyStateContext.Provider>\n );\n },\n);\nEmptyStateRoot.displayName = 'EmptyState';\n\n/* ------------------------------------------------------------------ */\n/* Compound export */\n/* ------------------------------------------------------------------ */\n\nexport const EmptyState = Object.assign(EmptyStateRoot, {\n Illustration: EmptyStateIllustration,\n Title: EmptyStateTitle,\n Description: EmptyStateDescription,\n Actions: EmptyStateActions,\n});\n"],"names":["setRef","ref","value","EmptyStateContext","createContext","emptyStateVariants","cva","illustrationVariants","titleVariants","descriptionVariants","FirstUseIllustration","jsxs","jsx","NoResultsIllustration","ErrorIllustration","EmptyStateIllustration","forwardRef","children","className","props","size","useContext","EmptyStateTitle","titleId","registerTitle","callbackRef","useCallback","node","EmptyStateDescription","actionsVariants","EmptyStateActions","EmptyStateRoot","variant","title","description","primaryAction","secondaryAction","autoFocus","t","useTranslation","useId","containerRef","useRef","hasTitle","setHasTitle","useState","useEffect","firstBtn","_a","roleProps","defaultTitle","defaultDescription","defaultCtaLabel","buttonSize","safeHref","href","Fragment","Button","EmptyState"],"mappings":";;;;;AAqBA,SAASA,EAAUC,GAAaC,GAAiB;AAC/C,EAAKD,MACD,OAAOA,KAAQ,aAAYA,EAAIC,CAAK,IAClCD,EAA8B,UAAUC;AAChD;AA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cAAchB;AAAA,EACd,OAAOO;AAAA,EACP,aAAaM;AAAA,EACb,SAASE;AACX,CAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"map-view-CmNGS6Ok.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('ui');\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('ui');\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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