@alfadocs/ui-kit-debug 1.67.0 → 1.68.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-fields-CJtu7LQU.js → address-fields-BUPRs3n-.js} +3 -3
- package/dist/_chunks/{address-fields-CJtu7LQU.js.map → address-fields-BUPRs3n-.js.map} +1 -1
- package/dist/_chunks/{agenda-card-DR9gDdKp.js → agenda-card-BDuvreCe.js} +2 -2
- package/dist/_chunks/{agenda-card-DR9gDdKp.js.map → agenda-card-BDuvreCe.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-DGB1Zup-.js → agenda-tray-CfwylhWf.js} +3 -3
- package/dist/_chunks/{agenda-tray-DGB1Zup-.js.map → agenda-tray-CfwylhWf.js.map} +1 -1
- package/dist/_chunks/{ai-credits-exhausted-notice-DfAgfZDF.js → ai-credits-exhausted-notice-Bg8NpW2K.js} +2 -2
- package/dist/_chunks/{ai-credits-exhausted-notice-DfAgfZDF.js.map → ai-credits-exhausted-notice-Bg8NpW2K.js.map} +1 -1
- package/dist/_chunks/{ai-permission-notice-qsdm4Sx4.js → ai-permission-notice-C00i6VhY.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-qsdm4Sx4.js.map → ai-permission-notice-C00i6VhY.js.map} +1 -1
- package/dist/_chunks/{ai-prompt-input-DSGSe4LH.js → ai-prompt-input-DzgyoKyk.js} +141 -139
- package/dist/_chunks/ai-prompt-input-DzgyoKyk.js.map +1 -0
- package/dist/_chunks/{alert-DjsJMGRE.js → alert-9kEwDza3.js} +122 -112
- package/dist/_chunks/alert-9kEwDza3.js.map +1 -0
- package/dist/_chunks/{alia-sidebar-qe0quZkB.js → alia-sidebar-B06ZSOaF.js} +3 -3
- package/dist/_chunks/{alia-sidebar-qe0quZkB.js.map → alia-sidebar-B06ZSOaF.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-card-CMzBLTiN.js → anamnesis-summary-card-DQ3iE1gD.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-card-CMzBLTiN.js.map → anamnesis-summary-card-DQ3iE1gD.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-BQ_EokKz.js → anamnesis-summary-rows-CNK0fIJk.js} +392 -388
- package/dist/_chunks/anamnesis-summary-rows-CNK0fIJk.js.map +1 -0
- package/dist/_chunks/{appointment-card-CL32sux-.js → appointment-card-5JMWi9_f.js} +2 -2
- package/dist/_chunks/{appointment-card-CL32sux-.js.map → appointment-card-5JMWi9_f.js.map} +1 -1
- package/dist/_chunks/{appointment-peek-B5mcDcXt.js → appointment-peek-D5XCfYKu.js} +2 -2
- package/dist/_chunks/{appointment-peek-B5mcDcXt.js.map → appointment-peek-D5XCfYKu.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CCqjORFb.js → appointment-timeline-VFP6HoXT.js} +4 -4
- package/dist/_chunks/{appointment-timeline-CCqjORFb.js.map → appointment-timeline-VFP6HoXT.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-qtpJt8e0.js → appointment-tray-B3PDER3I.js} +3 -3
- package/dist/_chunks/{appointment-tray-qtpJt8e0.js.map → appointment-tray-B3PDER3I.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-B11RR-rC.js → audio-recorder-4Ll0pwYK.js} +3 -3
- package/dist/_chunks/{audio-recorder-B11RR-rC.js.map → audio-recorder-4Ll0pwYK.js.map} +1 -1
- package/dist/_chunks/{auth-form-parts-DwUTH6YN.js → auth-form-parts-B40zvD-a.js} +2 -2
- package/dist/_chunks/{auth-form-parts-DwUTH6YN.js.map → auth-form-parts-B40zvD-a.js.map} +1 -1
- package/dist/_chunks/avatar-BPiPL7ND.js +199 -0
- package/dist/_chunks/avatar-BPiPL7ND.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-DZNthHO1.js → balance-badge-cell-BG3DMly4.js} +4 -4
- package/dist/_chunks/{balance-badge-cell-DZNthHO1.js.map → balance-badge-cell-BG3DMly4.js.map} +1 -1
- package/dist/_chunks/{bishop-score-CaNTrikJ.js → bishop-score-Df8nF1qg.js} +2 -2
- package/dist/_chunks/{bishop-score-CaNTrikJ.js.map → bishop-score-Df8nF1qg.js.map} +1 -1
- package/dist/_chunks/{booking-tTVxKPQY.js → booking-B1pDbERi.js} +377 -335
- package/dist/_chunks/booking-B1pDbERi.js.map +1 -0
- package/dist/_chunks/{calendar-BhN-jisv.js → calendar-BvOM8rG3.js} +2 -2
- package/dist/_chunks/{calendar-BhN-jisv.js.map → calendar-BvOM8rG3.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-MRrzcxAy.js → calendar-workspace-CYK1M83j.js} +18 -18
- package/dist/_chunks/{calendar-workspace-MRrzcxAy.js.map → calendar-workspace-CYK1M83j.js.map} +1 -1
- package/dist/_chunks/{chat-message-fRLZ95O5.js → chat-message-Be-9vIIQ.js} +2 -2
- package/dist/_chunks/{chat-message-fRLZ95O5.js.map → chat-message-Be-9vIIQ.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-BnFTIs6x.js → clinical-note-card-Caidqcwa.js} +2 -2
- package/dist/_chunks/{clinical-note-card-BnFTIs6x.js.map → clinical-note-card-Caidqcwa.js.map} +1 -1
- package/dist/_chunks/{color-picker-BsggJovx.js → color-picker-AcaWuKah.js} +99 -95
- package/dist/_chunks/color-picker-AcaWuKah.js.map +1 -0
- package/dist/_chunks/{combobox-U5yfO6o0.js → combobox-vF9O-QoG.js} +92 -83
- package/dist/_chunks/combobox-vF9O-QoG.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-C4-OCshj.js → contact-profile-card-CAwwOqHl.js} +40 -40
- package/dist/_chunks/contact-profile-card-CAwwOqHl.js.map +1 -0
- package/dist/_chunks/{control-room-rail-DUerqHeo.js → control-room-rail-BB6rCDWI.js} +3 -3
- package/dist/_chunks/{control-room-rail-DUerqHeo.js.map → control-room-rail-BB6rCDWI.js.map} +1 -1
- package/dist/_chunks/{country-select-DF5Bd_mn.js → country-select-CSE2Zm_s.js} +2 -2
- package/dist/_chunks/{country-select-DF5Bd_mn.js.map → country-select-CSE2Zm_s.js.map} +1 -1
- package/dist/_chunks/dashboard-grid-7JzaiKnk.js +1487 -0
- package/dist/_chunks/dashboard-grid-7JzaiKnk.js.map +1 -0
- package/dist/_chunks/{data-table-COoCQ4n_.js → data-table-Cty4-Jht.js} +3 -3
- package/dist/_chunks/{data-table-COoCQ4n_.js.map → data-table-Cty4-Jht.js.map} +1 -1
- package/dist/_chunks/{dependent-selector-DBr1AhLg.js → dependent-selector-C4kOgO8b.js} +2 -2
- package/dist/_chunks/{dependent-selector-DBr1AhLg.js.map → dependent-selector-C4kOgO8b.js.map} +1 -1
- package/dist/_chunks/{document-preview-VyQOjFVL.js → document-preview-513f3iPn.js} +4 -4
- package/dist/_chunks/{document-preview-VyQOjFVL.js.map → document-preview-513f3iPn.js.map} +1 -1
- package/dist/_chunks/{document-scanner-CXH_GYh4.js → document-scanner-Bd3wbzpI.js} +2 -2
- package/dist/_chunks/{document-scanner-CXH_GYh4.js.map → document-scanner-Bd3wbzpI.js.map} +1 -1
- package/dist/_chunks/{editable-description-ChGNdYY8.js → editable-description-DnAFi360.js} +2 -2
- package/dist/_chunks/{editable-description-ChGNdYY8.js.map → editable-description-DnAFi360.js.map} +1 -1
- package/dist/_chunks/{entity-summary-Bj-Wxq7Y.js → entity-summary-C2B8yNmc.js} +4 -4
- package/dist/_chunks/{entity-summary-Bj-Wxq7Y.js.map → entity-summary-C2B8yNmc.js.map} +1 -1
- package/dist/_chunks/{error-summary-PUE5Zxp9.js → error-summary-mGxIyDAY.js} +2 -2
- package/dist/_chunks/{error-summary-PUE5Zxp9.js.map → error-summary-mGxIyDAY.js.map} +1 -1
- package/dist/_chunks/{face-scheme-DAD-mXzM.js → face-scheme-CSJdRNad.js} +248 -244
- package/dist/_chunks/{face-scheme-DAD-mXzM.js.map → face-scheme-CSJdRNad.js.map} +1 -1
- package/dist/_chunks/{file-manager-RiV7-OEE.js → file-manager-D4cPnRhL.js} +3 -3
- package/dist/_chunks/{file-manager-RiV7-OEE.js.map → file-manager-D4cPnRhL.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-CPOfRE0C.js → forgot-password-form-Dqi7R-NL.js} +4 -4
- package/dist/_chunks/{forgot-password-form-CPOfRE0C.js.map → forgot-password-form-Dqi7R-NL.js.map} +1 -1
- package/dist/_chunks/format-number-DdzqwMs1.js +13 -0
- package/dist/_chunks/format-number-DdzqwMs1.js.map +1 -0
- package/dist/_chunks/{freemium-paywall-6DO7noHX.js → freemium-paywall-C73C8Rgd.js} +2 -2
- package/dist/_chunks/{freemium-paywall-6DO7noHX.js.map → freemium-paywall-C73C8Rgd.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-CZYa2D6m.js → gestational-age-calculator-Du53p8MH.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CZYa2D6m.js.map → gestational-age-calculator-Du53p8MH.js.map} +1 -1
- package/dist/_chunks/{header-settings-BSH9Gk0J.js → header-settings-DlUbvAUx.js} +37 -36
- package/dist/_chunks/header-settings-DlUbvAUx.js.map +1 -0
- package/dist/_chunks/{heatmap-C1TeC7wT.js → heatmap-DbZIQg14.js} +4 -4
- package/dist/_chunks/{heatmap-C1TeC7wT.js.map → heatmap-DbZIQg14.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-Bw3Q58x-.js → help-me-write-templates-5WkUfvc_.js} +3 -3
- package/dist/_chunks/{help-me-write-templates-Bw3Q58x-.js.map → help-me-write-templates-5WkUfvc_.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-DWs1UEXb.js → kit-extensions-CYvLL4ee.js} +3 -3
- package/dist/_chunks/{kit-extensions-DWs1UEXb.js.map → kit-extensions-CYvLL4ee.js.map} +1 -1
- package/dist/_chunks/length-token-DwMnGEYT.js +24 -0
- package/dist/_chunks/length-token-DwMnGEYT.js.map +1 -0
- package/dist/_chunks/{link-cell-renderer-CtTsvfPY.js → link-cell-renderer-DtIsQWDO.js} +4 -4
- package/dist/_chunks/{link-cell-renderer-CtTsvfPY.js.map → link-cell-renderer-DtIsQWDO.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-A-CL3mjt.js → login-dev-card-vEL-o5wq.js} +3 -3
- package/dist/_chunks/{login-dev-card-A-CL3mjt.js.map → login-dev-card-vEL-o5wq.js.map} +1 -1
- package/dist/_chunks/{map-view-BuVfJMEa.js → map-view-CtohteZD.js} +300 -191
- package/dist/_chunks/map-view-CtohteZD.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-DtSX8sYb.js → marketplace-app-shell-CcLQ0Dn-.js} +4 -4
- package/dist/_chunks/{marketplace-app-shell-DtSX8sYb.js.map → marketplace-app-shell-CcLQ0Dn-.js.map} +1 -1
- package/dist/_chunks/{message-card-A3mJNqfy.js → message-card-C_ksqIYM.js} +2 -2
- package/dist/_chunks/{message-card-A3mJNqfy.js.map → message-card-C_ksqIYM.js.map} +1 -1
- package/dist/_chunks/{message-tray-Ft6vSr71.js → message-tray-DCoQ4GQb.js} +3 -3
- package/dist/_chunks/{message-tray-Ft6vSr71.js.map → message-tray-DCoQ4GQb.js.map} +1 -1
- package/dist/_chunks/{multi-select-CMaAQQgb.js → multi-select-BOad3za9.js} +110 -98
- package/dist/_chunks/multi-select-BOad3za9.js.map +1 -0
- package/dist/_chunks/{muscle-scheme-YoN3rYXV.js → muscle-scheme-C66WlCxG.js} +2 -2
- package/dist/_chunks/{muscle-scheme-YoN3rYXV.js.map → muscle-scheme-C66WlCxG.js.map} +1 -1
- package/dist/_chunks/{note-timeline-DDqNU46n.js → note-timeline-KzL52MmB.js} +2 -2
- package/dist/_chunks/{note-timeline-DDqNU46n.js.map → note-timeline-KzL52MmB.js.map} +1 -1
- package/dist/_chunks/{notes-panel-IdsmqRFC.js → notes-panel-BXN46XkF.js} +6 -6
- package/dist/_chunks/{notes-panel-IdsmqRFC.js.map → notes-panel-BXN46XkF.js.map} +1 -1
- package/dist/_chunks/notice-group-DkYzKyAZ.js +291 -0
- package/dist/_chunks/notice-group-DkYzKyAZ.js.map +1 -0
- package/dist/_chunks/{notification-tray-BR3seWA7.js → notification-tray-Cp18MW5b.js} +2 -2
- package/dist/_chunks/{notification-tray-BR3seWA7.js.map → notification-tray-Cp18MW5b.js.map} +1 -1
- package/dist/_chunks/{operator-hero-3_RG4Dkj.js → operator-hero-6aAIQaFZ.js} +83 -66
- package/dist/_chunks/operator-hero-6aAIQaFZ.js.map +1 -0
- package/dist/_chunks/{optical-prescription-CxfMsbxi.js → optical-prescription-ulXnDbBe.js} +525 -509
- package/dist/_chunks/optical-prescription-ulXnDbBe.js.map +1 -0
- package/dist/_chunks/panel-header-CbtlTe85.js +190 -0
- package/dist/_chunks/panel-header-CbtlTe85.js.map +1 -0
- package/dist/_chunks/{panel-subview-yP4qIbKS.js → panel-subview-BPU7220K.js} +2 -2
- package/dist/_chunks/{panel-subview-yP4qIbKS.js.map → panel-subview-BPU7220K.js.map} +1 -1
- package/dist/_chunks/{patient-details-C-EWQTms.js → patient-details-C4Dyo7Ck.js} +4 -4
- package/dist/_chunks/{patient-details-C-EWQTms.js.map → patient-details-C4Dyo7Ck.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-lY-Tb5Mo.js → patient-field-row-DROvUkFu.js} +4 -4
- package/dist/_chunks/{patient-field-row-lY-Tb5Mo.js.map → patient-field-row-DROvUkFu.js.map} +1 -1
- package/dist/_chunks/{patient-search-DpAKidZ5.js → patient-search-BADdx3M1.js} +2 -2
- package/dist/_chunks/{patient-search-DpAKidZ5.js.map → patient-search-BADdx3M1.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-Bpto_VCD.js → patient-summary-card-CAimxbuI.js} +4 -4
- package/dist/_chunks/{patient-summary-card-Bpto_VCD.js.map → patient-summary-card-CAimxbuI.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-BQ307qEX.js → payment-automation-upsell-CiwF5UrC.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-BQ307qEX.js.map → payment-automation-upsell-CiwF5UrC.js.map} +1 -1
- package/dist/_chunks/{payment-form-XKtinW8r.js → payment-form-PBuh8PIa.js} +2 -2
- package/dist/_chunks/{payment-form-XKtinW8r.js.map → payment-form-PBuh8PIa.js.map} +1 -1
- package/dist/_chunks/{pdf-viewer-BvoVMjH4.js → pdf-viewer-gAsNUsA8.js} +2 -2
- package/dist/_chunks/{pdf-viewer-BvoVMjH4.js.map → pdf-viewer-gAsNUsA8.js.map} +1 -1
- package/dist/_chunks/{periodontal-risk-chart-CPy7CNFe.js → periodontal-risk-chart-B7S9OmPC.js} +97 -89
- package/dist/_chunks/periodontal-risk-chart-B7S9OmPC.js.map +1 -0
- package/dist/_chunks/practice-profile-hero-qfrsFQI_.js +236 -0
- package/dist/_chunks/practice-profile-hero-qfrsFQI_.js.map +1 -0
- package/dist/_chunks/{practice-results-BrUDDMXC.js → practice-results-BzThnpnm.js} +328 -298
- package/dist/_chunks/practice-results-BzThnpnm.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-B8wo4l_r.js → pregnancy-dating-EFcFUJkQ.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-B8wo4l_r.js.map → pregnancy-dating-EFcFUJkQ.js.map} +1 -1
- package/dist/_chunks/{privacy-mask-Ch7743uk.js → privacy-mask-CCz9zuIh.js} +2 -2
- package/dist/_chunks/{privacy-mask-Ch7743uk.js.map → privacy-mask-CCz9zuIh.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-C_ZosrBt.js → product-hub-panel-YuFbNPlT.js} +2 -2
- package/dist/_chunks/{product-hub-panel-C_ZosrBt.js.map → product-hub-panel-YuFbNPlT.js.map} +1 -1
- package/dist/_chunks/progress-notice-DiHWZ8Ms.js +279 -0
- package/dist/_chunks/progress-notice-DiHWZ8Ms.js.map +1 -0
- package/dist/_chunks/{province-select-Bd20Z9Br.js → province-select-CDjs5obD.js} +2 -2
- package/dist/_chunks/{province-select-Bd20Z9Br.js.map → province-select-CDjs5obD.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-8Ewv8-d7.js → radiograph-panel.agent-4UllIoTQ.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-8Ewv8-d7.js.map → radiograph-panel.agent-4UllIoTQ.js.map} +1 -1
- package/dist/_chunks/{rating-C1Vrmpsi.js → rating-CGYpg5dj.js} +43 -44
- package/dist/_chunks/rating-CGYpg5dj.js.map +1 -0
- package/dist/_chunks/{registration-form-BxwqUZzk.js → registration-form-1B0PTDal.js} +4 -4
- package/dist/_chunks/{registration-form-BxwqUZzk.js.map → registration-form-1B0PTDal.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-AvsVgtJu.js → reviews-panel-CosDZyow.js} +29 -7
- package/dist/_chunks/reviews-panel-CosDZyow.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-aCIoptbg.js → rich-text-editor-56dSsyZI.js} +3 -3
- package/dist/_chunks/{rich-text-editor-aCIoptbg.js.map → rich-text-editor-56dSsyZI.js.map} +1 -1
- package/dist/_chunks/{select-k4gBdS8N.js → select-4S-eYZUf.js} +244 -214
- package/dist/_chunks/select-4S-eYZUf.js.map +1 -0
- package/dist/_chunks/{sign-document-D1P1nUQA.js → sign-document-BiOTs1P4.js} +2 -2
- package/dist/_chunks/{sign-document-D1P1nUQA.js.map → sign-document-BiOTs1P4.js.map} +1 -1
- package/dist/_chunks/{signature-request-3u6TvRt2.js → signature-request-DAmNj_uq.js} +5 -5
- package/dist/_chunks/{signature-request-3u6TvRt2.js.map → signature-request-DAmNj_uq.js.map} +1 -1
- package/dist/_chunks/skeleton-tTWJpvAq.js +415 -0
- package/dist/_chunks/skeleton-tTWJpvAq.js.map +1 -0
- package/dist/_chunks/{slot-grid-dj5f6R2w.js → slot-grid-D_gix9mJ.js} +2 -2
- package/dist/_chunks/{slot-grid-dj5f6R2w.js.map → slot-grid-D_gix9mJ.js.map} +1 -1
- package/dist/_chunks/{tabs-2x3L13jn.js → tabs-BTj-2qMZ.js} +2 -2
- package/dist/_chunks/{tabs-2x3L13jn.js.map → tabs-BTj-2qMZ.js.map} +1 -1
- package/dist/_chunks/{task-card-BS7Uqevr.js → task-card-Ci2XbLmq.js} +2 -2
- package/dist/_chunks/{task-card-BS7Uqevr.js.map → task-card-Ci2XbLmq.js.map} +1 -1
- package/dist/_chunks/{task-editor-Bb5MMcid.js → task-editor-BomyxGoZ.js} +8 -8
- package/dist/_chunks/{task-editor-Bb5MMcid.js.map → task-editor-BomyxGoZ.js.map} +1 -1
- package/dist/_chunks/{task-tray-eQU4KJcA.js → task-tray-Dnc72nl-.js} +3 -3
- package/dist/_chunks/{task-tray-eQU4KJcA.js.map → task-tray-Dnc72nl-.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-BOb57Ysw.js → tasks-panel-ATz9JDy8.js} +6 -6
- package/dist/_chunks/{tasks-panel-BOb57Ysw.js.map → tasks-panel-ATz9JDy8.js.map} +1 -1
- package/dist/_chunks/{theme-toggle-Ctb77x6O.js → theme-toggle-DT_Jn4DC.js} +147 -138
- package/dist/_chunks/theme-toggle-DT_Jn4DC.js.map +1 -0
- package/dist/_chunks/{timeline-DEIuHrWz.js → timeline-wUuTDFY_.js} +2 -2
- package/dist/_chunks/{timeline-DEIuHrWz.js.map → timeline-wUuTDFY_.js.map} +1 -1
- package/dist/_chunks/{tool-rail-C-03rH2I.js → tool-rail-C-M3eVdY.js} +2 -2
- package/dist/_chunks/{tool-rail-C-03rH2I.js.map → tool-rail-C-M3eVdY.js.map} +1 -1
- package/dist/_chunks/{transcript-panel-XudW5l6l.js → transcript-panel-CoHHpcFg.js} +2 -2
- package/dist/_chunks/{transcript-panel-XudW5l6l.js.map → transcript-panel-CoHHpcFg.js.map} +1 -1
- package/dist/_chunks/{treatment-receipt-Cpm8tqQN.js → treatment-receipt-pFqWFyD_.js} +2 -2
- package/dist/_chunks/{treatment-receipt-Cpm8tqQN.js.map → treatment-receipt-pFqWFyD_.js.map} +1 -1
- package/dist/_chunks/{unit-converter-BPZ0Ldkb.js → unit-converter-CIoTmCmP.js} +2 -2
- package/dist/_chunks/{unit-converter-BPZ0Ldkb.js.map → unit-converter-CIoTmCmP.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-CVSPoP5j.js → use-appointment-details-read-CUGfE0hV.js} +12 -12
- package/dist/_chunks/{use-appointment-details-read-CVSPoP5j.js.map → use-appointment-details-read-CUGfE0hV.js.map} +1 -1
- package/dist/_chunks/use-dismissed-CTOWqA0e.js +177 -0
- package/dist/_chunks/use-dismissed-CTOWqA0e.js.map +1 -0
- package/dist/_chunks/{voice-control-panel-BJIEbDq6.js → voice-control-panel-B8Lrk0C4.js} +4 -4
- package/dist/_chunks/{voice-control-panel-BJIEbDq6.js.map → voice-control-panel-B8Lrk0C4.js.map} +1 -1
- package/dist/_chunks/{warning-stack-BdY-0bd3.js → warning-stack-BhHUmRiD.js} +2 -2
- package/dist/_chunks/{warning-stack-BdY-0bd3.js.map → warning-stack-BhHUmRiD.js.map} +1 -1
- package/dist/_chunks/{workflow-map-CYbRD9ek.js → workflow-map-ln4_OG8A.js} +2 -2
- package/dist/_chunks/{workflow-map-CYbRD9ek.js.map → workflow-map-ln4_OG8A.js.map} +1 -1
- package/dist/agent-catalog.json +172 -4
- package/dist/agent-i18n/en.json +25 -1
- package/dist/components/_shared/format-number.d.ts +20 -0
- package/dist/components/_shared/format-number.d.ts.map +1 -0
- package/dist/components/_shared/length-token.d.ts +12 -0
- package/dist/components/_shared/length-token.d.ts.map +1 -0
- package/dist/components/_shared/option.d.ts +1 -0
- package/dist/components/_shared/option.d.ts.map +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-credits-notice/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/alert.d.ts +26 -0
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/anamnesis-summary-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts +2 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.agent.d.ts.map +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +20 -1
- package/dist/components/dashboard-grid/dashboard-grid.d.ts.map +1 -1
- package/dist/components/dashboard-grid/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/editable-description/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/error-summary/index.js +1 -1
- package/dist/components/face-scheme/face-scheme.d.ts.map +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/index.d.ts +4 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/map-view/index.d.ts +1 -1
- package/dist/components/map-view/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +51 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/multi-select/multi-select.d.ts.map +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/note-timeline/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notice-group/index.d.ts +3 -0
- package/dist/components/notice-group/index.d.ts.map +1 -0
- package/dist/components/notice-group/index.js +6 -0
- package/dist/components/notice-group/index.js.map +1 -0
- package/dist/components/notice-group/notice-group.agent.d.ts +4 -0
- package/dist/components/notice-group/notice-group.agent.d.ts.map +1 -0
- package/dist/components/notice-group/notice-group.d.ts +43 -0
- package/dist/components/notice-group/notice-group.d.ts.map +1 -0
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/optical-prescription/optical-prescription-data.d.ts +8 -8
- package/dist/components/optical-prescription/optical-prescription-data.d.ts.map +1 -1
- package/dist/components/optical-prescription/optical-prescription.d.ts.map +1 -1
- package/dist/components/panel-header/index.js +1 -1
- package/dist/components/panel-header/panel-header.d.ts +10 -0
- package/dist/components/panel-header/panel-header.d.ts.map +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-risk-chart/index.js +1 -1
- package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts.map +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +4 -1
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +10 -2
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/progress-notice/index.d.ts +3 -0
- package/dist/components/progress-notice/index.d.ts.map +1 -0
- package/dist/components/progress-notice/index.js +6 -0
- package/dist/components/progress-notice/index.js.map +1 -0
- package/dist/components/progress-notice/progress-notice.agent.d.ts +4 -0
- package/dist/components/progress-notice/progress-notice.agent.d.ts.map +1 -0
- package/dist/components/progress-notice/progress-notice.d.ts +81 -0
- package/dist/components/progress-notice/progress-notice.d.ts.map +1 -0
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rating/index.js +1 -1
- package/dist/components/rating/rating.d.ts.map +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +6 -0
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/skeleton/index.d.ts +1 -1
- package/dist/components/skeleton/index.d.ts.map +1 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/skeleton.d.ts +41 -1
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/tabs/index.js +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/theme-toggle/index.js +1 -1
- package/dist/components/theme-toggle/theme-toggle.d.ts.map +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/treatment-receipt/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +81 -76
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-dismissed.d.ts +58 -0
- package/dist/hooks/use-dismissed.d.ts.map +1 -0
- package/dist/i18n/locales/ar.d.ts +22 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +22 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +22 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +22 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +22 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +22 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +22 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +22 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +22 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +22 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +22 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +22 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +22 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +22 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +22 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +22 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +22 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +22 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +22 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +22 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +22 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +22 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +22 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +22 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +22 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +22 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +22 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +22 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +22 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +22 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +22 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +22 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +22 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +22 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +22 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +22 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +1194 -1183
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +22 -0
- package/dist/locales/de.json +22 -0
- package/dist/locales/el.json +22 -0
- package/dist/locales/en.json +22 -0
- package/dist/locales/es.json +22 -0
- package/dist/locales/fr.json +22 -0
- package/dist/locales/hi.json +22 -0
- package/dist/locales/it.json +22 -0
- package/dist/locales/ja.json +22 -0
- package/dist/locales/nl.json +22 -0
- package/dist/locales/pl.json +22 -0
- package/dist/locales/pt.json +22 -0
- package/dist/locales/ro.json +22 -0
- package/dist/locales/ru.json +22 -0
- package/dist/locales/sq.json +22 -0
- package/dist/locales/sv.json +22 -0
- package/dist/locales/tr.json +22 -0
- package/dist/locales/zh.json +22 -0
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/anamnesis-export-pdf.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +2 -2
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +9 -1
- package/dist/_chunks/ai-prompt-input-DSGSe4LH.js.map +0 -1
- package/dist/_chunks/alert-DjsJMGRE.js.map +0 -1
- package/dist/_chunks/anamnesis-summary-rows-BQ_EokKz.js.map +0 -1
- package/dist/_chunks/avatar-WZY3eGE7.js +0 -123
- package/dist/_chunks/avatar-WZY3eGE7.js.map +0 -1
- package/dist/_chunks/booking-tTVxKPQY.js.map +0 -1
- package/dist/_chunks/color-picker-BsggJovx.js.map +0 -1
- package/dist/_chunks/combobox-U5yfO6o0.js.map +0 -1
- package/dist/_chunks/contact-profile-card-C4-OCshj.js.map +0 -1
- package/dist/_chunks/dashboard-grid-B2MB7SRS.js +0 -1428
- package/dist/_chunks/dashboard-grid-B2MB7SRS.js.map +0 -1
- package/dist/_chunks/header-settings-BSH9Gk0J.js.map +0 -1
- package/dist/_chunks/map-view-BuVfJMEa.js.map +0 -1
- package/dist/_chunks/multi-select-CMaAQQgb.js.map +0 -1
- package/dist/_chunks/operator-hero-3_RG4Dkj.js.map +0 -1
- package/dist/_chunks/optical-prescription-CxfMsbxi.js.map +0 -1
- package/dist/_chunks/panel-header-BJkaUwnl.js +0 -128
- package/dist/_chunks/panel-header-BJkaUwnl.js.map +0 -1
- package/dist/_chunks/periodontal-risk-chart-CPy7CNFe.js.map +0 -1
- package/dist/_chunks/practice-profile-hero-Dfc0F60y.js +0 -193
- package/dist/_chunks/practice-profile-hero-Dfc0F60y.js.map +0 -1
- package/dist/_chunks/practice-results-BrUDDMXC.js.map +0 -1
- package/dist/_chunks/rating-C1Vrmpsi.js.map +0 -1
- package/dist/_chunks/reviews-panel-AvsVgtJu.js.map +0 -1
- package/dist/_chunks/select-k4gBdS8N.js.map +0 -1
- package/dist/_chunks/skeleton-B1KTdJ4N.js +0 -116
- package/dist/_chunks/skeleton-B1KTdJ4N.js.map +0 -1
- package/dist/_chunks/theme-toggle-Ctb77x6O.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-grid-7JzaiKnk.js","sources":["../../node_modules/lucide-react/dist/esm/icons/move-diagonal-2.mjs","../../src/components/dashboard-grid/dashboard-grid.agent.ts","../../src/components/dashboard-grid/dashboard-grid-engine.ts","../../src/components/dashboard-grid/dashboard-grid.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: \"M19 13v6h-6\", key: \"1hxl6d\" }],\n [\"path\", { d: \"M5 11V5h6\", key: \"12e2xe\" }],\n [\"path\", { d: \"m5 5 14 14\", key: \"11anup\" }]\n];\nconst MoveDiagonal2 = createLucideIcon(\"move-diagonal-2\", __iconNode);\n\nexport { __iconNode, MoveDiagonal2 as default };\n//# sourceMappingURL=move-diagonal-2.mjs.map\n","import type { AgentAdapter } from '../../agent/types';\nimport type { DashboardGridHandle } from './dashboard-grid';\n\nexport const dashboardGridAgent: AgentAdapter<DashboardGridHandle> = {\n id: 'dashboard-grid',\n // The board's whole purpose is in-place rearrangement of its widgets.\n // `scroll` is backed by reveal_widget (the catalogue's name heuristic\n // cannot see that and warns).\n capabilities: ['edit_inline', 'scroll'],\n state: {\n layout: {\n type: '{ id: string, x: number, y: number, w: number, h: number }[]',\n descriptionKey: 'ui.agent.dashboardGrid.state.layout',\n description:\n 'Current widget geometry in cell units — ids and rectangles only, no widget content.',\n read: (handle) => handle.getGridState().layout,\n },\n cols: {\n type: 'number',\n descriptionKey: 'ui.agent.dashboardGrid.state.cols',\n description: 'Logical column count of the board.',\n read: (handle) => handle.getGridState().cols,\n },\n editing: {\n type: 'boolean',\n descriptionKey: 'ui.agent.dashboardGrid.state.editing',\n description:\n 'Whether edit mode is on. Move/resize actions are refused while it is off — the host app owns the toggle.',\n read: (handle) => handle.getGridState().editing,\n },\n stacked: {\n type: 'boolean',\n descriptionKey: 'ui.agent.dashboardGrid.state.stacked',\n description:\n 'Whether the board is narrower than its stackBelow width and shows its widgets as one read-only column. Move/resize actions are unavailable while it is true, even in edit mode; the saved layout is unchanged.',\n read: (handle) => handle.getGridState().stacked,\n },\n selectedId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.dashboardGrid.state.selectedId',\n description:\n 'The widget the host has marked (for example while its settings are open), or null. Set by the host, not by agents.',\n read: (handle) => handle.getGridState().selectedId,\n },\n loadingIds: {\n type: 'string[]',\n descriptionKey: 'ui.agent.dashboardGrid.state.loadingIds',\n description:\n 'Ids of the widgets still waiting for their figures (the host set loading). Their bodies show placeholders, so read their values only once they leave this list. Set by the host, not by agents.',\n read: (handle) => handle.getGridState().loadingIds,\n },\n },\n actions: {\n reveal_widget: {\n // Scrolls the view and rings a widget for a moment; changes nothing.\n safety: 'read',\n argsType: 'id',\n argsSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Widget id (see layout state).' },\n },\n required: ['id'],\n },\n returns: 'Promise<boolean> (revealed)',\n returnsSchema: {\n type: 'boolean',\n description:\n 'True once the widget is in view; false if it has not appeared within a second.',\n },\n idempotent: true,\n errors: [\n 'Unknown or not yet rendered widget id: waits up to a second, then resolves false.',\n ],\n descriptionKey: 'ui.agent.dashboardGrid.actions.revealWidget',\n description:\n 'Scroll a widget into view (its scrolling ancestor and the window) and highlight it briefly. Works in view and edit mode, and for a widget added a moment ago. Does not move focus.',\n invoke: (handle, args: { id: string }) => handle.revealWidget(args.id),\n },\n move_widget: {\n // Rearranging the board mutates user configuration — a write,\n // reversible by moving back.\n safety: 'write',\n argsType: 'id, x, y',\n argsSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Widget id (see layout state).' },\n x: {\n type: 'integer',\n minimum: 0,\n description: '0-based logical column.',\n },\n y: { type: 'integer', minimum: 0, description: '0-based row.' },\n },\n required: ['id', 'x', 'y'],\n },\n returns: 'boolean (accepted)',\n returnsSchema: {\n type: 'boolean',\n description:\n 'True when applied; false when edit mode is off, the board is stacked, or the id is unknown.',\n },\n idempotent: true,\n errors: [\n 'Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.',\n 'Unavailable while edit mode is off: returns false.',\n 'Unknown widget id: returns false.',\n ],\n descriptionKey: 'ui.agent.dashboardGrid.actions.moveWidget',\n description:\n 'Move a widget to a cell. Out-of-bounds targets are clamped; colliding widgets are pushed down and the layout re-compacts. Refused while edit mode is off or the board is stacked.',\n invoke: (handle, args: { id: string; x: number; y: number }) =>\n handle.moveWidgetTo(args.id, args.x, args.y),\n },\n resize_widget: {\n safety: 'write',\n argsType: 'id, w, h',\n argsSchema: {\n type: 'object',\n properties: {\n id: { type: 'string', description: 'Widget id (see layout state).' },\n w: {\n type: 'integer',\n minimum: 1,\n description: 'Column span (≥ 1).',\n },\n h: { type: 'integer', minimum: 1, description: 'Row span (≥ 1).' },\n },\n required: ['id', 'w', 'h'],\n },\n returns: 'boolean (accepted)',\n returnsSchema: {\n type: 'boolean',\n description:\n 'True when applied; false when edit mode is off, the board is stacked, or the id is unknown.',\n },\n idempotent: true,\n errors: [\n 'Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.',\n 'Unavailable while edit mode is off: returns false.',\n 'Unknown widget id: returns false.',\n ],\n descriptionKey: 'ui.agent.dashboardGrid.actions.resizeWidget',\n description:\n 'Resize a widget to a span. Clamped to the grid and the widget’s min/max; colliding widgets are pushed down. Refused while edit mode is off or the board is stacked.',\n invoke: (handle, args: { id: string; w: number; h: number }) =>\n handle.resizeWidgetTo(args.id, args.w, args.h),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'dashboard-grid',\n description:\n 'Also carries data-stacked=\"true\" while the board shows one read-only column.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-widget-id',\n description:\n 'Each widget wrapper carries its layout id. While its figures load it also carries data-loading=\"true\" and aria-busy=\"true\".',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* DashboardGrid engine — pure layout math, no DOM. */\n/* */\n/* The grid is a column-count × unbounded-rows plane. Every widget is */\n/* an axis-aligned rectangle in cell units: `x` is the 0-based LOGICAL */\n/* column (inline-start based — CSS Grid flips it visually in RTL), */\n/* `y` the 0-based row, `w`/`h` the spans. All functions are pure and */\n/* return new arrays; the component layer owns state and DOM. */\n/* ------------------------------------------------------------------ */\n\nexport interface DashboardWidgetLayout {\n id: string;\n /** 0-based logical column of the inline-start edge. */\n x: number;\n /** 0-based row of the block-start edge. */\n y: number;\n /** Column span (≥ 1). */\n w: number;\n /** Row span (≥ 1). */\n h: number;\n minW?: number;\n minH?: number;\n maxW?: number;\n maxH?: number;\n}\n\nexport function collides(\n a: DashboardWidgetLayout,\n b: DashboardWidgetLayout,\n): boolean {\n return (\n a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h && b.y < a.y + a.h\n );\n}\n\n/** Clamp a rect to the grid bounds and its own min/max constraints. */\nexport function clampRect(\n item: DashboardWidgetLayout,\n cols: number,\n): DashboardWidgetLayout {\n const minW = Math.max(1, item.minW ?? 1);\n const minH = Math.max(1, item.minH ?? 1);\n const maxW = Math.min(cols, item.maxW ?? cols);\n const maxH = item.maxH ?? Number.POSITIVE_INFINITY;\n const w = Math.min(Math.max(item.w, minW), maxW);\n const h = Math.min(Math.max(item.h, minH), maxH);\n const x = Math.min(Math.max(0, item.x), cols - w);\n const y = Math.max(0, item.y);\n return { ...item, x, y, w, h };\n}\n\n/**\n * Whether `slot` is a hole: free of every other widget, and on each of its\n * rows some widget sits after it (towards inline-end). Free space at the end\n * of a row is not a hole; a blank gap before a widget is.\n */\nfunction isHole(\n slot: DashboardWidgetLayout,\n others: DashboardWidgetLayout[],\n): boolean {\n if (others.some((other) => collides(other, slot))) return false;\n for (let row = slot.y; row < slot.y + slot.h; row += 1) {\n const bounded = others.some(\n (other) =>\n other.x >= slot.x + slot.w && row >= other.y && row < other.y + other.h,\n );\n if (!bounded) return false;\n }\n return true;\n}\n\n/** Reading-order distance between two cells (row-major, `cols` per row). */\nfunction readingDistance(\n a: { x: number; y: number },\n b: { x: number; y: number },\n cols: number,\n): number {\n return Math.abs(a.y * cols + a.x - (b.y * cols + b.x));\n}\n\n/**\n * Resolve overlaps and apply upward gravity. The `activeId` rect (the one\n * being dragged/resized) keeps its exact position; every other widget makes\n * room for it, then rises as far as gravity allows. Deterministic: widgets\n * settle in reading order (y, then x).\n *\n * Reflow rules, so a board never keeps holes that only show once saved:\n * - A widget the active rect lands on first takes the nearest hole that fits\n * (reading order), or free space the moved rect left (`vacated`), between\n * its own height above and where a plain push down would put it.\n * - Otherwise it is pushed down. If it was pushed from its inline-start side,\n * it lines up under the start of the active rect through free cells, so it\n * does not leave a gap before itself. Pushed from above, it keeps its x.\n * - Last, during a gesture only, a widget may rise into a hole above it by\n * up to its own width sideways (never the active rect). Without an active\n * rect (a drop, a remove) only gravity runs, so a saved board is final:\n * compacting it again changes nothing.\n */\nexport function normalise(\n layout: DashboardWidgetLayout[],\n cols: number,\n activeId?: string,\n vacated?: DashboardWidgetLayout,\n): DashboardWidgetLayout[] {\n const items = layout.map((item) => clampRect(item, cols));\n const order = [...items].sort((a, b) => {\n if (a.id === activeId) return -1;\n if (b.id === activeId) return 1;\n return a.y - b.y || a.x - b.x;\n });\n const placed: DashboardWidgetLayout[] = [];\n const active = activeId\n ? items.find((item) => item.id === activeId)\n : undefined;\n const displaced = new Set<string>();\n for (const item of order) {\n if (item.id !== activeId) {\n // Swap-up: when the ACTIVE rect has moved onto this item, prefer\n // lifting the displaced item ABOVE the active rect (into the space\n // the active vacated) over pushing it down. Without this, moving a\n // widget downward past a same-column neighbour is impossible — the\n // neighbour keeps fleeing ahead and the drop compaction reverts the\n // whole gesture.\n if (active && collides(active, item)) {\n const above = { ...item, y: Math.max(0, active.y - item.h) };\n if (\n !collides(active, above) &&\n !placed.some((p) => p.id !== activeId && collides(p, above))\n ) {\n item.y = above.y;\n }\n }\n if (placed.some((p) => collides(p, item))) {\n displaced.add(item.id);\n // Everything else where it stands now: placed rects, and the ones\n // still to come at their current positions.\n const others = items.filter((other) => other.id !== item.id);\n let pushY = item.y;\n while (placed.some((p) => collides(p, { ...item, y: pushY }))) {\n pushY += 1;\n }\n let best: { x: number; y: number } | null = null;\n for (let y = Math.max(0, item.y - item.h); y <= pushY; y += 1) {\n for (let x = 0; x <= cols - item.w; x += 1) {\n const slot = { ...item, x, y };\n const free =\n isHole(slot, others) ||\n (vacated !== undefined &&\n collides(vacated, slot) &&\n !others.some((other) => collides(other, slot)));\n if (!free) continue;\n if (\n !best ||\n readingDistance({ x, y }, item, cols) <\n readingDistance(best, item, cols)\n ) {\n best = { x, y };\n }\n }\n }\n if (best) {\n item.x = best.x;\n item.y = best.y;\n } else {\n item.y = pushY;\n // Pushed from the inline-start side (a neighbour widened or moved\n // into it): line up under the start of that neighbour, through\n // free cells only, so the push leaves no gap before it.\n const fromStart =\n active !== undefined &&\n active.x < item.x &&\n item.x < active.x + active.w;\n const floor = active ? active.x : item.x;\n while (\n fromStart &&\n item.x > floor &&\n !others.some((other) => collides(other, { ...item, x: item.x - 1 }))\n ) {\n item.x -= 1;\n }\n }\n }\n while (placed.some((p) => collides(p, item))) {\n item.y += 1;\n }\n while (item.y > 0) {\n const test = { ...item, y: item.y - 1 };\n if (placed.some((p) => collides(p, test))) break;\n item.y -= 1;\n }\n }\n placed.push(item);\n }\n // Second pass, during a gesture: a widget rises into a hole above it, at\n // most its own width sideways, nearest first. Fills the gap a narrowed\n // widget leaves.\n const settled = active\n ? [...placed].sort((a, b) => a.y - b.y || a.x - b.x)\n : [];\n for (const item of settled) {\n if (item.id === activeId || displaced.has(item.id)) continue;\n const others = placed.filter((other) => other.id !== item.id);\n let target: { x: number; y: number } | null = null;\n for (let y = 0; y < item.y && !target; y += 1) {\n const xs = Array.from(\n { length: 2 * item.w + 1 },\n (_, i) => item.x - item.w + i,\n )\n .filter((x) => x >= 0 && x <= cols - item.w)\n .sort((a, b) => Math.abs(a - item.x) - Math.abs(b - item.x) || a - b);\n for (const x of xs) {\n if (isHole({ ...item, x, y }, others)) {\n target = { x, y };\n break;\n }\n }\n }\n if (target) {\n item.x = target.x;\n item.y = target.y;\n while (item.y > 0) {\n const test = { ...item, y: item.y - 1 };\n if (others.some((other) => collides(other, test))) break;\n item.y -= 1;\n }\n }\n }\n // Preserve the caller's array order (children order), only geometry moved.\n const byId = new Map(placed.map((p) => [p.id, p]));\n return layout.map((item) => byId.get(item.id) as DashboardWidgetLayout);\n}\n\n/** Move a widget to a target cell, resolving collisions around it. */\nexport function moveItem(\n layout: DashboardWidgetLayout[],\n id: string,\n x: number,\n y: number,\n cols: number,\n): DashboardWidgetLayout[] {\n const next = layout.map((item) =>\n item.id === id ? clampRect({ ...item, x, y }, cols) : item,\n );\n return normalise(\n next,\n cols,\n id,\n layout.find((item) => item.id === id),\n );\n}\n\n/** Resize a widget to a target span, resolving collisions around it. */\nexport function resizeItem(\n layout: DashboardWidgetLayout[],\n id: string,\n w: number,\n h: number,\n cols: number,\n): DashboardWidgetLayout[] {\n const next = layout.map((item) =>\n item.id === id\n ? // Resizing never moves the widget: the width clamps to the space\n // between its position and the grid edge (clampRect would slide it).\n // minW wins over the edge clamp so clampRect cannot re-raise w and\n // slide x as a side effect.\n clampRect(\n {\n ...item,\n w: Math.max(item.minW ?? 1, Math.min(w, cols - item.x)),\n h,\n },\n cols,\n )\n : item,\n );\n return normalise(next, cols, id);\n}\n\n/** First free slot (reading order) that fits a `w`×`h` rect. */\nexport function firstFit(\n layout: DashboardWidgetLayout[],\n cols: number,\n w: number,\n h: number,\n): { x: number; y: number } {\n const width = Math.min(Math.max(1, w), cols);\n const maxY = layout.reduce((m, item) => Math.max(m, item.y + item.h), 0);\n for (let y = 0; y <= maxY; y += 1) {\n for (let x = 0; x <= cols - width; x += 1) {\n const candidate: DashboardWidgetLayout = {\n id: '__candidate__',\n x,\n y,\n w: width,\n h,\n };\n if (!layout.some((item) => collides(item, candidate))) {\n return { x, y };\n }\n }\n }\n return { x: 0, y: maxY };\n}\n\n/** Total rows the layout occupies (for sizing the add tile / container). */\nexport function rowCount(layout: DashboardWidgetLayout[]): number {\n return layout.reduce((m, item) => Math.max(m, item.y + item.h), 0);\n}\n\n/* ------------------------------------------------------------------ */\n/* Stacked (narrow board) mode */\n/* ------------------------------------------------------------------ */\n\n/**\n * Extra inline size (px) a stacked board must reach, above `stackBelow`,\n * before it returns to the grid. Without the band a width hovering on the\n * threshold could flip the board back and forth: sub-pixel rounding, or a\n * page scrollbar (classic scrollbars are up to about 20 px) that appears\n * in one mode and disappears in the other because the two modes differ\n * in height.\n */\nexport const STACK_HYSTERESIS_PX = 24;\n\n/**\n * Whether the board shows one stacked column for a measured inline size.\n * Stacks below `stackBelow`; unstacks at `stackBelow + STACK_HYSTERESIS_PX`\n * or wider. An unusable threshold never stacks. A board with no measurable\n * box (`display: none`, a hidden tab) keeps its current mode.\n */\nexport function shouldStack(\n inlineSize: number,\n stackBelow: number | undefined,\n wasStacked: boolean,\n): boolean {\n if (\n stackBelow === undefined ||\n !Number.isFinite(stackBelow) ||\n stackBelow <= 0\n ) {\n return false;\n }\n if (!Number.isFinite(inlineSize) || inlineSize <= 0) return wasStacked;\n return wasStacked\n ? inlineSize < stackBelow + STACK_HYSTERESIS_PX\n : inlineSize < stackBelow;\n}\n\n/**\n * Reading order of the stacked column: row (`y`), then LOGICAL column\n * (`x`, so RTL keeps the same order), then the caller's `ids` order on a\n * tie. Ids without a layout entry keep their relative order at the end.\n */\nexport function stackOrder(\n ids: string[],\n layout: DashboardWidgetLayout[],\n): string[] {\n const byId = new Map(layout.map((item) => [item.id, item]));\n return ids\n .map((id, index) => ({ id, index, entry: byId.get(id) }))\n .sort((a, b) => {\n if (!a.entry || !b.entry) {\n if (a.entry) return -1;\n if (b.entry) return 1;\n return a.index - b.index;\n }\n return (\n a.entry.y - b.entry.y || a.entry.x - b.entry.x || a.index - b.index\n );\n })\n .map(({ id }) => id);\n}\n","/* ------------------------------------------------------------------ */\n/* DashboardGrid — user-configurable widget board. */\n/* */\n/* A CSS-Grid plane (N logical columns × unbounded rows) whose child */\n/* `DashboardGrid.Widget`s can be moved, resized, removed, and added */\n/* while `editing` is on. Layout state is `{id,x,y,w,h}[]` in cell */\n/* units — controlled via `layout`/`onLayoutChange` or uncontrolled */\n/* via `defaultLayout`. The collision/gravity engine lives in */\n/* `dashboard-grid-engine.ts` (pure, unit-tested). */\n/* */\n/* - Coordinates reach CSS through custom properties set with */\n/* `style.setProperty` — the sanctioned escape hatch for runtime */\n/* values (23-constraints §4; same pattern as `progress`). */\n/* - RTL is free: CSS Grid columns are logical, so column 1 sits at */\n/* the inline-start in both directions. Arrow keys are dir-aware. */\n/* - Move/resize are keyboard-first: each handle is a button — Enter/ */\n/* Space grabs, arrows step one cell, Enter drops, Escape cancels — */\n/* with a polite live region announcing every step. */\n/* - Opt-in `stackBelow`: when the board's own inline size (measured */\n/* with a ResizeObserver) is below it, widgets render as one */\n/* read-only column in reading order. The saved layout is untouched. */\n/* ------------------------------------------------------------------ */\n\nimport {\n Children,\n Fragment,\n cloneElement,\n createContext,\n forwardRef,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent as ReactKeyboardEvent,\n type PointerEvent as ReactPointerEvent,\n type ReactElement,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Ellipsis, GripVertical, MoveDiagonal2, Plus, X } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { DropdownMenu } from '../dropdown-menu';\nimport { Tooltip } from '../tooltip';\nimport { CONTENT_ENTER_CLASS } from '../skeleton/skeleton';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { dashboardGridAgent } from './dashboard-grid.agent';\nimport {\n clampRect,\n collides,\n firstFit,\n moveItem,\n normalise,\n resizeItem,\n rowCount,\n shouldStack,\n stackOrder,\n type DashboardWidgetLayout,\n} from './dashboard-grid-engine';\n\nexport type { DashboardWidgetLayout } from './dashboard-grid-engine';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst dashboardGridVariants = cva(\n [\n 'ds:grid ds:w-full',\n // A stacking context: a grabbed widget's lift stays inside the board.\n 'ds:isolate',\n 'ds:gap-[var(--spacing-md)]',\n // Edit-mode surface: tint the whole plane, draw faint cell lines, and\n // reserve spare rows (--dg-min-block) so the AVAILABLE space reads at\n // a glance instead of the board ending at the last occupied row.\n 'ds:data-[editing=true]:rounded-[var(--radius-lg)] ds:data-[editing=true]:bg-muted/10',\n 'ds:data-[editing=true]:[background-image:var(--dg-grid-lines)]',\n 'ds:data-[editing=true]:min-h-[var(--dg-min-block)]',\n ].join(' '),\n {\n variants: {\n // Stacked: one full-width column; each row takes its widget's block\n // size. Focus can fall back to the board here (see the focus effect),\n // so it gets the kit's focus ring.\n stacked: {\n false: [\n 'ds:[grid-template-columns:repeat(var(--dg-cols),minmax(0,1fr))]',\n 'ds:[grid-auto-rows:var(--dg-row)]',\n ].join(' '),\n true: [\n 'ds:grid-cols-1 ds:auto-rows-auto',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n },\n },\n defaultVariants: { stacked: false },\n },\n);\n\nconst widgetVariants = cva(\n [\n 'ds:relative ds:min-h-0 ds:min-w-0 ds:overflow-hidden',\n // Its own stacking context: a sticky or raised layer inside a widget\n // can never paint over the page's chrome (a sticky toolbar, say).\n 'ds:isolate',\n // Header actions fold into one menu below a set widget width.\n 'ds:@container/widget',\n // Mirror of Card variant=\"elevated\" so widgets read as kit cards.\n 'ds:rounded-[var(--radius-lg)] ds:bg-[var(--card)] ds:text-[var(--card-foreground)]',\n 'ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)]',\n // Grabbed feedback (keyboard or pointer drag in flight).\n 'ds:data-[grabbed=true]:ring-[length:var(--focus-ring-width)] ds:data-[grabbed=true]:ring-ring ds:data-[grabbed=true]:z-10',\n // Selected (and briefly revealed): an inset edge in --primary, the\n // kit's selected colour, so it reads apart from focus and from a grab.\n 'ds:data-[selected=true]:ring-[length:var(--border-width-md)] ds:data-[selected=true]:ring-inset ds:data-[selected=true]:ring-[color:var(--primary)]',\n 'ds:data-[revealed=true]:ring-[length:var(--border-width-md)] ds:data-[revealed=true]:ring-inset ds:data-[revealed=true]:ring-[color:var(--primary)]',\n 'ds:forced-colors:data-[selected=true]:outline-[length:var(--border-width-md)] ds:forced-colors:data-[selected=true]:outline-solid ds:forced-colors:data-[selected=true]:outline-[Highlight]',\n // Only reachable when stacking removes the focused edit control: the\n // widget then takes focus itself (tabindex -1, set at that moment).\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n {\n variants: {\n stacked: {\n false: [\n 'ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]',\n 'ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]',\n ].join(' '),\n true: 'ds:col-span-full ds:row-auto',\n },\n stackedHeight: { grid: '', content: '' },\n },\n compoundVariants: [\n { stacked: false, class: 'ds:flex ds:flex-col' },\n // At least the block size the widget has in the grid (h rows plus the\n // h - 1 gaps). A minimum, not a fixed size: at 200% zoom the widget\n // grows instead of clipping its content (WCAG 1.4.4, 1.4.10).\n {\n stacked: true,\n stackedHeight: 'grid',\n class: [\n 'ds:flex ds:flex-col',\n 'ds:[min-block-size:calc(var(--dg-h)*var(--dg-row)_+_(var(--dg-h)_-_1)*var(--spacing-md))]',\n ].join(' '),\n },\n // As tall as the content, or minStackedHeight. A grid, not a flex\n // column, so the body row is a definite box a 100% chart can fill.\n {\n stacked: true,\n stackedHeight: 'content',\n class: [\n 'ds:grid ds:grid-cols-[minmax(0,1fr)] ds:grid-rows-[auto_1fr]',\n 'ds:[min-block-size:var(--dg-min-stacked)]',\n ].join(' '),\n },\n ],\n defaultVariants: { stacked: false, stackedHeight: 'grid' },\n },\n);\n\nconst widgetBodyVariants = cva(\n 'ds:ps-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]',\n {\n variants: {\n // `box`: fill the widget's block size and clip to it. `content`: take\n // the content's own height (the content-height stack), never a box.\n fit: {\n box: 'ds:min-h-0 ds:flex-1 ds:overflow-hidden',\n content: 'ds:min-w-0',\n },\n // Editing: clear of the resize grip's whole hit area, a\n // --min-target-size square in the corner. Block-end takes the full\n // size, keeping the width narrow widgets need; inline-end the glyph.\n editing: {\n false: 'ds:pe-[var(--spacing-md)]',\n true: 'ds:pe-[calc(var(--spacing-lg)_+_var(--spacing-2xs))]',\n },\n // A loading caption sits under the body and owns the block-end\n // space (and the grip's clearance) instead.\n captioned: { false: '', true: 'ds:pb-[var(--spacing-xs)]' },\n // Real content where a placeholder stood settles in. Opacity only.\n settling: { false: '', true: CONTENT_ENTER_CLASS },\n },\n compoundVariants: [\n { captioned: false, editing: false, class: 'ds:pb-[var(--spacing-md)]' },\n {\n captioned: false,\n editing: true,\n class: 'ds:pb-[var(--min-target-size)]',\n },\n ],\n defaultVariants: {\n fit: 'box',\n editing: false,\n captioned: false,\n settling: false,\n },\n },\n);\n\n// The one-line loading caption under a widget's body, for example\n// \"Preparing figures\". Editing: its inline-end clears the resize grip.\nconst widgetCaptionVariants = cva(\n [\n 'ds:m-0 ds:shrink-0 ds:truncate type-body-sm ds:text-[var(--muted-foreground)]',\n 'ds:ps-[var(--spacing-md)] ds:pb-[var(--spacing-sm)]',\n ].join(' '),\n {\n variants: {\n editing: {\n false: 'ds:pe-[var(--spacing-md)]',\n true: 'ds:pe-[var(--min-target-size)]',\n },\n },\n defaultVariants: { editing: false },\n },\n);\n\n// The resize grip: a small corner glyph, not a button sitting on the\n// content. Its ::before is the hit area, --min-target-size square, anchored\n// at the widget's corner and reaching inward, so the card never clips it.\nconst resizeGripVariants = cva(\n [\n 'ds:absolute ds:bottom-[var(--spacing-2xs)] ds:end-[var(--spacing-2xs)]',\n 'ds:inline-flex ds:size-[var(--spacing-lg)] ds:items-center ds:justify-center',\n 'ds:rounded-[var(--radius-sm)] ds:text-[var(--muted-foreground)] ds:touch-none',\n 'ds:cursor-nwse-resize ds:rtl:cursor-nesw-resize',\n 'ds:hover:bg-muted/20 ds:hover:text-[var(--foreground)]',\n 'ds:aria-pressed:bg-muted/20 ds:aria-pressed:text-[var(--foreground)]',\n 'ds:[&_svg]:size-3.5 ds:rtl:[&_svg]:-scale-x-100',\n \"ds:before:absolute ds:before:content-['']\",\n 'ds:before:bottom-[calc(-1*var(--spacing-2xs))] ds:before:end-[calc(-1*var(--spacing-2xs))]',\n 'ds:before:size-[var(--min-target-size)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n);\n\n// Below this widget inline size the header's actions and remove button\n// fold into one \"More actions\" menu (a 3-column widget on a 1440 px window).\n// The gap is the target size less the 32 px button, so neighbouring hit\n// areas meet but never overlap (Settings never covers Remove).\nconst headerFoldVariants = cva(\n 'ds:items-center ds:gap-[calc(var(--min-target-size)_-_var(--spacing-xl))]',\n {\n variants: {\n when: {\n always: 'ds:flex',\n wide: 'ds:flex ds:@max-[300px]/widget:hidden',\n narrow: 'ds:hidden ds:@max-[300px]/widget:flex',\n },\n },\n defaultVariants: { when: 'always' },\n },\n);\n\n// Header icon buttons keep their full --min-target-size hit area on every\n// screen (IconButton drops it from `sm:` up). Keyed on the button's own\n// marker, so it outranks that rule whatever order the CSS is emitted in.\nconst HEADER_BUTTON_CLASSES =\n 'ds:bg-[var(--card)] ds:data-[component=icon-button]:sm:before:block';\n\n// The header row. In edit mode the whole row (outside its buttons) is a\n// drag surface, so it never starts a text selection or a touch callout.\nconst widgetHeaderVariants = cva(\n 'ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]',\n {\n variants: {\n editing: {\n false: '',\n true: 'ds:cursor-grab ds:select-none ds:[-webkit-touch-callout:none]',\n },\n },\n defaultVariants: { editing: false },\n },\n);\n\n// One line, cut with an ellipsis. Focusable only while cut (see the widget),\n// so it carries the kit's focus ring for that case.\nconst widgetTitleVariants = cva(\n [\n 'ds:m-0 ds:min-w-0 ds:flex-1 ds:truncate ds:text-sm ds:font-medium',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n ].join(' '),\n);\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\n// `stacked` is measured, never a prop: keep it out of the public props.\nexport interface DashboardGridProps extends Omit<\n VariantProps<typeof dashboardGridVariants>,\n 'stacked'\n> {\n /** Accessible name for the board region. Required. */\n 'aria-label': string;\n /** Opaque instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** Logical column count. Defaults to 12. */\n cols?: number;\n /** Row height in px (one `h` unit). Defaults to 96. */\n rowHeight?: number;\n /** Controlled layout. Entries are matched to widgets by `id`. */\n layout?: DashboardWidgetLayout[];\n /** Uncontrolled initial layout. */\n defaultLayout?: DashboardWidgetLayout[];\n /**\n * Fired after every committed change — move, resize, remove pruning, and\n * the auto-placement of widgets that had no layout entry. Persist this.\n */\n onLayoutChange?: (next: DashboardWidgetLayout[]) => void;\n /** Edit mode: shows move/resize/remove chrome and the add tile. */\n editing?: boolean;\n /**\n * Called when the user activates a widget's remove button. The kit\n * commits the entry removal (one `onLayoutChange`) and manages focus;\n * the consumer unmounts the child. Omit to hide the remove button.\n */\n onRemoveWidget?: (id: string) => void;\n /**\n * Called when the user activates the add tile (rendered in edit mode\n * only when this is provided). The consumer appends a new\n * `DashboardGrid.Widget`; it is auto-placed first-fit and reported via\n * `onLayoutChange`.\n */\n onRequestAdd?: () => void;\n /**\n * Opt-in narrow mode. When the board's OWN inline size (px, measured with\n * a ResizeObserver, not the viewport) is below this value, the widgets\n * render as one full-width, read-only column in reading order (`y`, then\n * logical `x`), each at least its grid height (see `stackedHeight`). No\n * move/resize/remove chrome or add tile shows, even while `editing` is\n * on, and `onLayoutChange` never fires because of stacking: the saved\n * layout is untouched and the grid returns exactly once the board is at\n * least `stackBelow + 24` px wide (the 24 px band stops a width hovering\n * on the threshold, or a page scrollbar, from flipping the board). Unset:\n * the board never stacks.\n *\n * Give the board a container whose width does not depend on its content\n * (normal block flow, or a stretched flex/grid item). In a shrink-to-fit\n * host the narrower stacked column can keep the board stacked.\n * Switching between unset and set at runtime remounts the widgets.\n *\n * SSR: the server render and the first client render show the grid; the\n * board measures itself in a layout effect, before the first client\n * paint. A server-rendered page shows the grid until hydration.\n */\n stackBelow?: number;\n /**\n * Fired when the board enters (`true`) or leaves (`false`) the stacked\n * column, before that mode is painted, so the host can hide its own\n * customise control. Not fired for the initial unstacked state, nor on\n * unmount.\n */\n onStackedChange?: (stacked: boolean) => void;\n /**\n * Marks one widget, for example while its settings are open: it gets the\n * inset --primary edge and `aria-current=\"true\"`. Unset, none is marked.\n */\n selectedId?: string;\n /**\n * Block size of each widget while the board is stacked (`stackBelow`).\n * `'grid'` (the default, unchanged) keeps at least the widget's grid\n * height, so a widget showing one figure leaves empty space below it on a\n * phone. `'content'` makes each stacked widget as tall as its content.\n * A chart that fills its container has no height of its own and would\n * collapse: give its widget a `minStackedHeight`. The grid itself is\n * unchanged either way.\n */\n stackedHeight?: 'grid' | 'content';\n /**\n * Opt-in heading level for every widget title. Unset (the default), a\n * title is plain text, as before. Set it to one level below the heading\n * that introduces the board, so screen-reader users can jump between\n * widgets by heading. A title cut short by the widget's width is\n * focusable and shows the full title in a Tooltip either way.\n */\n widgetHeadingLevel?: 2 | 3 | 4 | 5 | 6;\n /** `DashboardGrid.Widget` children. */\n children: ReactNode;\n className?: string;\n}\n\nexport interface DashboardGridHandle {\n /**\n * Move a widget to a cell. False when not editing, while stacked, or\n * when the id is unknown.\n */\n moveWidgetTo: (id: string, x: number, y: number) => boolean;\n /**\n * Resize a widget to a span. False when not editing, while stacked, or\n * when the id is unknown.\n */\n resizeWidgetTo: (id: string, w: number, h: number) => boolean;\n /**\n * Scroll a widget into view (its nearest scrolling ancestor and the\n * window) and highlight it briefly. Safe to call in the same tick that\n * adds the widget: it waits until the widget is laid out. Resolves true\n * once revealed, false if the widget has not appeared within a second.\n */\n revealWidget: (id: string) => Promise<boolean>;\n /** Current geometry + mode. */\n getGridState: () => {\n cols: number;\n /** The `editing` prop as the host set it. */\n editing: boolean;\n /**\n * True while the board is narrower than `stackBelow` and shows one\n * read-only column. Editing is unavailable until it is false again.\n */\n stacked: boolean;\n /** The saved grid layout; stacking never changes it. */\n layout: DashboardWidgetLayout[];\n /** The `selectedId` prop, or null. */\n selectedId: string | null;\n /** Ids of the widgets whose `loading` is set, in render order. */\n loadingIds: string[];\n };\n}\n\n/** A header action that folds into the \"More actions\" menu when narrow. */\nexport interface DashboardWidgetAction {\n /** Stable key. */\n id: string;\n /** Accessible name of the button, and the menu item's text. Translated. */\n label: string;\n /** Glyph for the icon button shown on wide widgets. */\n icon: ReactNode;\n onSelect: () => void;\n}\n\nexport interface DashboardGridWidgetProps {\n /** Stable widget id — matches a `layout` entry. */\n id: string;\n /** Visible widget title (consumer-translated). */\n title: string;\n /** Cell span used when the widget has no layout entry yet. */\n defaultW?: number;\n defaultH?: number;\n /**\n * Smallest span (columns, rows) the widget can be resized to. Applied on\n * render only: the board never writes `minW` / `minH` into the layout it\n * reports through `onLayoutChange`, so a saved layout stays constraint\n * free. A saved entry narrower than this renders at the minimum and is\n * reported at that size on the next change.\n */\n minW?: number;\n minH?: number;\n /**\n * Minimum block size in px while the board is stacked with\n * `stackedHeight=\"content\"`; ignored otherwise. A chart that fills its\n * container needs it, or it collapses to nothing: the body fills this\n * height, less the title row. Content taller than it still grows.\n */\n minStackedHeight?: number;\n /**\n * Header actions such as a widget's settings, in view and edit mode. Each\n * is an icon button; on a narrow widget (under 300 px) they fold, with\n * the remove button, into one \"More actions\" menu so the title keeps its\n * room. Prefer this over `actionsSlot`.\n */\n actions?: DashboardWidgetAction[];\n /** Extra header content, always shown as given (never folded). */\n actionsSlot?: ReactNode;\n /**\n * The widget's figures are on their way. The frame, title, header\n * actions and saved place stay as they are, the widget carries\n * `aria-busy=\"true\"`, and the body shows `children` as given: pass a\n * placeholder such as `<Skeleton.Figure />`. Moving and resizing still\n * work. Keep the same widget (same `id` and `key`) and swap only its\n * children when the figures arrive: nothing moves, and the new content\n * fades in.\n */\n loading?: boolean;\n /**\n * One line under the body while `loading`, for example \"Preparing\n * figures\" (consumer-translated). Cut with an ellipsis when too long,\n * and read in full as the widget's description. Without it, assistive\n * technology hears the kit's \"Loading\" instead.\n */\n loadingCaption?: string;\n children?: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Context */\n/* ------------------------------------------------------------------ */\n\ninterface GrabState {\n kind: 'move' | 'resize';\n id: string;\n via: 'pointer' | 'keyboard';\n}\n\ninterface DashboardGridContextValue {\n /** Edit chrome is live: `editing` is on and the board is not stacked. */\n editing: boolean;\n stacked: boolean;\n stackedHeight: 'grid' | 'content';\n selectedId?: string;\n revealedId: string | null;\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n layoutById: Map<string, DashboardWidgetLayout>;\n grab: GrabState | null;\n canRemove: boolean;\n requestRemove: (id: string) => void;\n startKeyboardGrab: (kind: 'move' | 'resize', id: string) => void;\n keyboardStep: (\n event: ReactKeyboardEvent<HTMLButtonElement>,\n id: string,\n ) => void;\n startPointerGrab: (\n kind: 'move' | 'resize',\n id: string,\n event: ReactPointerEvent<HTMLButtonElement>,\n ) => void;\n startHeaderPress: (id: string, event: ReactPointerEvent<HTMLElement>) => void;\n}\n\nconst DashboardGridContext = createContext<DashboardGridContextValue | null>(\n null,\n);\n\ninterface WidgetMeta {\n defaultW: number;\n defaultH: number;\n minW?: number;\n minH?: number;\n loading: boolean;\n}\n\n/** A usable span (a whole number of cells, at least 1), else undefined. */\nfunction positiveSpan(value: number | undefined): number | undefined {\n return value !== undefined && Number.isFinite(value) && value >= 1\n ? Math.floor(value)\n : undefined;\n}\n\n/** Walk widget children, descending into fragments (a common JSX shape). */\nfunction forEachWidgetChild(\n children: ReactNode,\n fn: (child: ReactElement<DashboardGridWidgetProps>) => void,\n): void {\n Children.forEach(children, (child) => {\n if (!isValidElement(child)) return;\n if (child.type === Fragment) {\n forEachWidgetChild(\n (child.props as { children?: ReactNode }).children,\n fn,\n );\n return;\n }\n fn(child as ReactElement<DashboardGridWidgetProps>);\n });\n}\n\n/* ------------------------------------------------------------------ */\n/* Widget */\n/* ------------------------------------------------------------------ */\n\nfunction DashboardGridWidget({\n id,\n title,\n minStackedHeight,\n actions,\n actionsSlot,\n loading: loadingProp = false,\n loadingCaption,\n children,\n}: DashboardGridWidgetProps) {\n const { t } = useTranslation('ui');\n const ctx = useContext(DashboardGridContext);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const captionId = useId();\n const loading = Boolean(loadingProp);\n // The render that ends loading also starts the content's settle-in, so\n // the arriving figures never paint once at full opacity first.\n const [wasLoading, setWasLoading] = useState(loading);\n const [settling, setSettling] = useState(false);\n if (wasLoading !== loading) {\n setWasLoading(loading);\n setSettling(!loading);\n }\n // The More actions item picked, run when the menu has closed.\n const pickedRef = useRef<DashboardWidgetAction | null>(null);\n\n if (import.meta.env.DEV && !ctx) {\n console.warn(\n 'DashboardGrid.Widget: must be rendered inside a <DashboardGrid>.',\n );\n }\n\n const entry = ctx?.layoutById.get(id);\n\n // The title is one line. When the widget cuts it short, it becomes a tab\n // stop with a Tooltip carrying the full title. The Tooltip always wraps it,\n // so the node never remounts (and never drops focus) as the width changes.\n const [titleNode, setTitleNode] = useState<HTMLElement | null>(null);\n const [titleCut, setTitleCut] = useState(false);\n const [titleFocused, setTitleFocused] = useState(false);\n const [tipOpen, setTipOpen] = useState(false);\n useEffect(() => {\n if (!titleNode) return undefined;\n const measure = () =>\n setTitleCut(titleNode.scrollWidth > titleNode.clientWidth);\n measure();\n // A web font that loads late changes the text width, not the box.\n const fonts = typeof document !== 'undefined' ? document.fonts : undefined;\n fonts?.addEventListener('loadingdone', measure);\n const observer =\n typeof ResizeObserver === 'undefined'\n ? undefined\n : new ResizeObserver(measure);\n observer?.observe(titleNode);\n return () => {\n fonts?.removeEventListener('loadingdone', measure);\n observer?.disconnect();\n };\n }, [titleNode, title]);\n // A Tooltip asked to open while the title fits stays shut: Radix would\n // not report the close, so a later cut would open it unprompted.\n useEffect(() => {\n if (!titleCut) setTipOpen(false);\n }, [titleCut]);\n\n // Sanctioned escape hatch for runtime-computed values (23-constraints §4):\n // cell coordinates land on CSS custom properties via style.setProperty.\n useIsomorphicLayoutEffect(() => {\n const node = wrapperRef.current;\n if (!node || !entry) return;\n node.style.setProperty('--dg-x', String(entry.x + 1));\n node.style.setProperty('--dg-y', String(entry.y + 1));\n node.style.setProperty('--dg-w', String(entry.w));\n node.style.setProperty('--dg-h', String(entry.h));\n // Set on every widget, `auto` when unset, so it is never inherited.\n node.style.setProperty(\n '--dg-min-stacked',\n minStackedHeight !== undefined &&\n Number.isFinite(minStackedHeight) &&\n minStackedHeight > 0\n ? `${minStackedHeight}px`\n : 'auto',\n );\n }, [entry?.x, entry?.y, entry?.w, entry?.h, entry, minStackedHeight]);\n\n if (!ctx || !entry) return null;\n\n const grabbed = ctx.grab?.id === id;\n const editing = ctx.editing;\n // The consumer's actions, then remove (edit mode). Two or more fold into\n // one menu on a narrow widget; a single one stays a button.\n const headerButtons: DashboardWidgetAction[] = [\n ...(actions ?? []),\n ...(editing && ctx.canRemove\n ? [\n {\n id: REMOVE_ACTION_ID,\n label: t('dashboardGrid.remove', { title }),\n icon: <X />,\n onSelect: () => ctx.requestRemove(id),\n },\n ]\n : []),\n ];\n const foldable = headerButtons.length > 1;\n const caption = loading ? loadingCaption?.trim() || undefined : undefined;\n const TitleTag = ctx.headingLevel\n ? (`h${ctx.headingLevel}` as const)\n : 'span';\n\n return (\n <div\n ref={wrapperRef}\n role=\"listitem\"\n aria-label={title}\n data-component=\"dashboard-grid-widget\"\n data-widget-id={id}\n data-grabbed={grabbed || undefined}\n data-selected={ctx.selectedId === id || undefined}\n data-revealed={ctx.revealedId === id || undefined}\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n aria-describedby={loading ? captionId : undefined}\n aria-current={ctx.selectedId === id ? 'true' : undefined}\n className={widgetVariants({\n stacked: ctx.stacked,\n stackedHeight: ctx.stackedHeight,\n })}\n >\n <div\n className={widgetHeaderVariants({ editing })}\n onPointerDown={\n editing ? (event) => ctx.startHeaderPress(id, event) : undefined\n }\n >\n {editing ? (\n <IconButton\n size=\"sm\"\n intent=\"outline\"\n type=\"button\"\n icon={<GripVertical />}\n aria-label={t('dashboardGrid.move', { title })}\n aria-pressed={grabbed && ctx.grab?.kind === 'move'}\n className={`ds:cursor-grab ds:touch-none ${HEADER_BUTTON_CLASSES}`}\n onPointerDown={(event) => ctx.startPointerGrab('move', id, event)}\n onKeyDown={(event) => ctx.keyboardStep(event, id)}\n onClick={() => ctx.startKeyboardGrab('move', id)}\n />\n ) : null}\n <Tooltip\n label={title}\n open={titleCut && tipOpen}\n onOpenChange={(next) => setTipOpen(next && titleCut)}\n >\n <TitleTag\n ref={setTitleNode}\n // A tab stop while cut short, so keyboard users reach the full\n // title, and while focused, so focus never drops to <body>.\n tabIndex={titleCut || titleFocused ? 0 : undefined}\n data-dashboard-grid-title=\"\"\n onFocus={() => setTitleFocused(true)}\n onBlur={() => setTitleFocused(false)}\n className={widgetTitleVariants()}\n >\n {title}\n </TitleTag>\n </Tooltip>\n {actionsSlot}\n {headerButtons.length > 0 ? (\n <div\n className={headerFoldVariants({\n when: foldable ? 'wide' : 'always',\n })}\n >\n {headerButtons.map((action) => (\n <IconButton\n key={action.id}\n size=\"sm\"\n intent=\"outline\"\n type=\"button\"\n icon={action.icon}\n className={HEADER_BUTTON_CLASSES}\n aria-label={action.label}\n onClick={action.onSelect}\n />\n ))}\n </div>\n ) : null}\n {foldable ? (\n <div className={headerFoldVariants({ when: 'narrow' })}>\n <DropdownMenu.Root modal={false}>\n <DropdownMenu.Trigger asChild>\n <IconButton\n size=\"sm\"\n intent=\"outline\"\n type=\"button\"\n icon={<Ellipsis />}\n className={HEADER_BUTTON_CLASSES}\n aria-label={t('dashboardGrid.moreActions', { title })}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n align=\"end\"\n // The pick runs once the menu has closed, so focus it moves\n // stays put. Focus still in place: back to the trigger.\n onCloseAutoFocus={(event) => {\n const action = pickedRef.current;\n pickedRef.current = null;\n if (!action) return;\n const before = document.activeElement;\n action.onSelect();\n if (\n action.id === REMOVE_ACTION_ID ||\n document.activeElement !== before\n ) {\n event.preventDefault();\n }\n }}\n >\n {headerButtons.map((action) => (\n <DropdownMenu.Item\n key={action.id}\n startIcon={action.icon}\n onSelect={() => {\n pickedRef.current = action;\n }}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </div>\n ) : null}\n </div>\n <div\n className={widgetBodyVariants({\n fit:\n ctx.stacked && ctx.stackedHeight === 'content' ? 'content' : 'box',\n editing,\n captioned: Boolean(caption),\n settling,\n })}\n // The settle-in runs once: cleared when it ends, so moving the\n // widget later (a stack reorder) never replays it.\n onAnimationEnd={(event) => {\n if (event.target === event.currentTarget) setSettling(false);\n }}\n >\n {children}\n </div>\n {caption ? (\n <p id={captionId} className={widgetCaptionVariants({ editing })}>\n {caption}\n </p>\n ) : loading ? (\n // The placeholder is hidden from assistive technology, so the\n // widget would otherwise read as empty.\n <span id={captionId} className=\"ds:sr-only\">\n {t('common.loading')}\n </span>\n ) : null}\n {editing ? (\n <button\n type=\"button\"\n aria-label={t('dashboardGrid.resize', { title })}\n aria-pressed={grabbed && ctx.grab?.kind === 'resize'}\n className={resizeGripVariants()}\n onPointerDown={(event) => ctx.startPointerGrab('resize', id, event)}\n onKeyDown={(event) => ctx.keyboardStep(event, id)}\n onClick={() => ctx.startKeyboardGrab('resize', id)}\n >\n <MoveDiagonal2 aria-hidden=\"true\" />\n </button>\n ) : null}\n </div>\n );\n}\nDashboardGridWidget.displayName = 'DashboardGrid.Widget';\n\n/* ------------------------------------------------------------------ */\n/* DashboardGrid */\n/* ------------------------------------------------------------------ */\n\ninterface PointerDragState {\n kind: 'move' | 'resize';\n id: string;\n pointerId: number;\n /** Pointer position relative to the grid's box at the start. Measuring\n against the box (not the viewport) makes any scroll since then count. */\n startGridX: number;\n startGridY: number;\n lastClientX: number;\n lastClientY: number;\n origin: DashboardWidgetLayout;\n colStride: number;\n rowStride: number;\n isRtl: boolean;\n /** Started on a grip button, whose trailing click must be swallowed. */\n fromHandle: boolean;\n /** Where the press began, and whether it has since travelled far enough\n to count as a drag. Auto-scroll waits for that. */\n pressX: number;\n pressY: number;\n travelled: boolean;\n}\n\n/** A press on a widget header that becomes a move once it really drags. */\ninterface HeaderPress {\n id: string;\n pointerId: number;\n pointerType: string;\n startClientX: number;\n startClientY: number;\n surface: HTMLElement;\n holdTimer: ReturnType<typeof setTimeout> | null;\n cleanup: () => void;\n}\n\n/** A reveal waits this long (ms) for its widget, then highlights it this long. */\nconst REVEAL_WAIT_MS = 1000;\nconst REVEAL_HIGHLIGHT_MS = 1600;\n\n/** Header content a press on which never starts a drag. */\nconst HEADER_PRESS_IGNORES = [\n 'button',\n 'a',\n 'input',\n 'select',\n 'textarea',\n 'label',\n 'summary',\n '[contenteditable]:not([contenteditable=\"false\"])',\n '[role=\"button\"]',\n '[role=\"menuitem\"]',\n '[tabindex]:not([data-dashboard-grid-title])',\n].join(', ');\n\n/** The remove entry's id among a widget's header actions. */\nconst REMOVE_ACTION_ID = '__remove__';\n\n/** px a mouse or pen must travel before a header press becomes a drag. */\nconst DRAG_THRESHOLD_PX = 4;\n/** Touch: hold still this long (ms) to pick a widget up by its header. */\nconst TOUCH_HOLD_MS = 400;\n/** Touch: moving further than this (px) before the hold ends is a scroll. */\nconst TOUCH_SLOP_PX = 8;\n/** Auto-scroll: the edge band (px) and the top speed (px per frame). */\nconst AUTO_SCROLL_EDGE_PX = 48;\nconst AUTO_SCROLL_MAX_PX = 18;\n\n/** The nearest ancestor that scrolls on each axis; null means the window. */\nfunction scrollingAncestors(node: HTMLElement): {\n x: HTMLElement | null;\n y: HTMLElement | null;\n} {\n const found: { x: HTMLElement | null; y: HTMLElement | null } = {\n x: null,\n y: null,\n };\n const scrolls = (value: string) =>\n value === 'auto' || value === 'scroll' || value === 'overlay';\n for (\n let current = node.parentElement;\n current &&\n current !== document.body &&\n current !== document.documentElement &&\n !(found.x && found.y);\n current = current.parentElement\n ) {\n const styles = window.getComputedStyle(current);\n if (\n !found.y &&\n scrolls(styles.overflowY) &&\n current.scrollHeight > current.clientHeight\n ) {\n found.y = current;\n }\n if (\n !found.x &&\n scrolls(styles.overflowX) &&\n current.scrollWidth > current.clientWidth\n ) {\n found.x = current;\n }\n }\n return found;\n}\n\n/**\n * The draft for a move or resize target, measured from the grab-time base.\n * A target that is the widget's own place (a press, jitter under half a\n * cell) yields the base itself, so a release with no change rewrites\n * nothing. A widget goes at most two rows past the board's last row.\n */\nfunction gestureDraft(\n base: DashboardWidgetLayout[],\n kind: 'move' | 'resize',\n id: string,\n inline: number,\n block: number,\n cols: number,\n capped = true,\n): DashboardWidgetLayout[] {\n const start = base.find((item) => item.id === id);\n if (!start) return base;\n const bottom = capped ? rowCount(base) + 2 : Number.POSITIVE_INFINITY;\n const next =\n kind === 'move'\n ? moveItem(base, id, inline, Math.min(block, bottom - start.h), cols)\n : resizeItem(base, id, inline, Math.min(block, bottom - start.y), cols);\n const moved = next.find((item) => item.id === id);\n const unchanged =\n moved !== undefined &&\n moved.x === start.x &&\n moved.y === start.y &&\n moved.w === start.w &&\n moved.h === start.h;\n return unchanged ? base : next;\n}\n\n/** Signed speed (px per frame) for a pointer `distance` px inside an edge. */\nfunction edgeSpeed(distance: number): number {\n if (distance >= AUTO_SCROLL_EDGE_PX) return 0;\n const depth =\n (AUTO_SCROLL_EDGE_PX - Math.max(0, distance)) / AUTO_SCROLL_EDGE_PX;\n return Math.ceil(depth * AUTO_SCROLL_MAX_PX);\n}\n\nconst DashboardGridRoot = forwardRef<DashboardGridHandle, DashboardGridProps>(\n (\n {\n 'aria-label': ariaLabel,\n id,\n cols = 12,\n rowHeight = 96,\n layout: layoutProp,\n defaultLayout,\n onLayoutChange,\n editing = false,\n onRemoveWidget,\n onRequestAdd,\n stackBelow,\n onStackedChange,\n stackedHeight = 'grid',\n selectedId,\n widgetHeadingLevel,\n children,\n className,\n },\n ref,\n ) => {\n const { t } = useTranslation('ui');\n const rootRef = useRef<HTMLDivElement>(null);\n const gridRef = useRef<HTMLDivElement>(null);\n\n /* ---- stacked (narrow board) mode -------------------------------- */\n /* Starts unstacked so the server and first client render agree; the */\n /* layout effect below measures before the first client paint. The */\n /* measured box is the board root: in normal flow a block box takes */\n /* its inline size from its container, not from the widgets, so */\n /* stacking does not feed back into the measurement. The hysteresis */\n /* band in `shouldStack` absorbs rounding and a page scrollbar; a */\n /* shrink-to-fit host is documented as unsupported on the prop. */\n const [stacked, setStacked] = useState(false);\n const stackedRef = useRef(false);\n stackedRef.current = stacked;\n // The focused element at the moment the mode flips, so focus can stay\n // in its widget if stacking unmounts it (edit chrome).\n const pendingFocusRef = useRef<{\n element: HTMLElement;\n widgetId: string | null;\n } | null>(null);\n\n const switchStacked = useCallback((next: boolean) => {\n if (next === stackedRef.current) return;\n const root = rootRef.current;\n const focused =\n typeof document !== 'undefined' ? document.activeElement : null;\n pendingFocusRef.current =\n root && focused instanceof HTMLElement && root.contains(focused)\n ? {\n element: focused,\n widgetId:\n focused\n .closest<HTMLElement>('[data-widget-id]')\n ?.getAttribute('data-widget-id') ?? null,\n }\n : null;\n stackedRef.current = next;\n setStacked(next);\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n const node = rootRef.current;\n if (!node) return undefined;\n if (stackBelow === undefined) {\n switchStacked(false);\n return undefined;\n }\n switchStacked(\n shouldStack(node.offsetWidth, stackBelow, stackedRef.current),\n );\n if (typeof ResizeObserver === 'undefined') return undefined;\n const observer = new ResizeObserver((entries) => {\n const entry = entries[entries.length - 1];\n if (!entry) return;\n const inlineSize =\n entry.borderBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;\n switchStacked(shouldStack(inlineSize, stackBelow, stackedRef.current));\n });\n observer.observe(node);\n return () => observer.disconnect();\n }, [stackBelow, switchStacked]);\n\n // Edit chrome is live only while editing AND not stacked.\n const editable = editing && !stacked;\n\n if (import.meta.env.DEV && !ariaLabel) {\n console.warn(\n 'DashboardGrid: `aria-label` is required for accessibility.',\n );\n }\n\n /* ---- child ids in render order --------------------------------- */\n /* Fragments are flattened: `<>{widgets}</>` is a normal consumer */\n /* shape and must contribute its widgets, not an id-less wrapper. */\n const childIds = useMemo(() => {\n const ids: string[] = [];\n forEachWidgetChild(children, (child) => {\n if (child.props.id) ids.push(child.props.id);\n });\n return ids;\n }, [children]);\n const childMeta = useMemo(() => {\n const meta = new Map<string, WidgetMeta>();\n forEachWidgetChild(children, (child) => {\n if (child.props.id) {\n meta.set(child.props.id, {\n defaultW: child.props.defaultW ?? 4,\n defaultH: child.props.defaultH ?? 2,\n minW: positiveSpan(child.props.minW),\n minH: positiveSpan(child.props.minH),\n loading: Boolean(child.props.loading),\n });\n }\n });\n return meta;\n }, [children]);\n\n /* ---- controlled / uncontrolled layout -------------------------- */\n const [internalLayout, setInternalLayout] = useState<\n DashboardWidgetLayout[]\n >(() => defaultLayout ?? []);\n const committed = layoutProp ?? internalLayout;\n const committedRef = useRef(committed);\n committedRef.current = committed;\n\n // Widget minW / minH reach the engine on render only. What is reported\n // keeps exactly the constraints the consumer's own entries carried.\n const stripInjected = useCallback(\n (layout: DashboardWidgetLayout[]): DashboardWidgetLayout[] =>\n layout.map((item) => {\n const own = committedRef.current.find((e) => e.id === item.id);\n const { minW: _minW, minH: _minH, ...rest } = item;\n return {\n ...rest,\n ...(own?.minW !== undefined ? { minW: own.minW } : {}),\n ...(own?.minH !== undefined ? { minH: own.minH } : {}),\n };\n }),\n [],\n );\n\n const commit = useCallback(\n (next: DashboardWidgetLayout[]) => {\n const reported = stripInjected(next);\n if (layoutProp === undefined) setInternalLayout(reported);\n onLayoutChange?.(reported);\n },\n [layoutProp, onLayoutChange, stripInjected],\n );\n\n /* ---- resolve: bounds-clamp + auto-place missing children -------- */\n /* Entries whose widget is absent are KEPT, not pruned: widgets may */\n /* mount late (lazy chunks, permission gates) and pruning would */\n /* destroy their saved geometry — they simply don't render until the */\n /* child appears. Removal goes through the remove flow, which commits */\n /* the entry removal explicitly. */\n const { resolved, autoPlaced } = useMemo(() => {\n const constrained = (entry: DashboardWidgetLayout) => {\n const meta = childMeta.get(entry.id);\n return clampRect(\n {\n ...entry,\n ...(meta?.minW !== undefined\n ? { minW: Math.max(entry.minW ?? 1, meta.minW) }\n : {}),\n ...(meta?.minH !== undefined\n ? { minH: Math.max(entry.minH ?? 1, meta.minH) }\n : {}),\n },\n cols,\n );\n };\n const clamped = committed.map(constrained);\n const missing = childIds.filter(\n (cid) => !clamped.some((entry) => entry.id === cid),\n );\n if (missing.length === 0) {\n // A minimum (or the bounds clamp) can grow an entry over its\n // neighbour: re-flow, on render only. Nothing is reported.\n const overlapping = clamped.some((entry, i) =>\n clamped.some((other, j) => j > i && collides(entry, other)),\n );\n return {\n resolved: overlapping ? normalise(clamped, cols) : clamped,\n autoPlaced: false,\n };\n }\n const placed = [...clamped];\n for (const cid of missing) {\n const meta: WidgetMeta = childMeta.get(cid) ?? {\n defaultW: 4,\n defaultH: 2,\n loading: false,\n };\n const w = Math.min(Math.max(meta.defaultW, meta.minW ?? 1), cols);\n const h = Math.max(meta.defaultH, meta.minH ?? 1);\n const spot = firstFit(placed, cols, w, h);\n placed.push(constrained({ id: cid, x: spot.x, y: spot.y, w, h }));\n }\n return { resolved: normalise(placed, cols), autoPlaced: true };\n }, [committed, childIds, childMeta, cols]);\n\n // Report auto-placement exactly once per divergence so the consumer can\n // persist the new entries. Bounds-clamping is render-only and never\n // reported — a controlled layout is not rewritten uninvited.\n const reportedRef = useRef('');\n useEffect(() => {\n if (!autoPlaced) return;\n const signature = resolved\n .map(\n (entry) => `${entry.id}:${entry.x},${entry.y},${entry.w},${entry.h}`,\n )\n .join('|');\n if (reportedRef.current !== signature) {\n reportedRef.current = signature;\n commit(resolved);\n }\n }, [autoPlaced, resolved, commit]);\n\n /* ---- drag / grab state ----------------------------------------- */\n /* Live values mirror into refs so event handlers stay PURE: no state */\n /* updater performs side effects (StrictMode double-invokes them and */\n /* render-phase commits would set consumer state during render), and */\n /* the stable callbacks read current values without dependency churn. */\n const [draft, setDraft] = useState<DashboardWidgetLayout[] | null>(null);\n const [grab, setGrab] = useState<GrabState | null>(null);\n const [announcement, setAnnouncement] = useState('');\n const draftRef = useRef<DashboardWidgetLayout[] | null>(null);\n const grabRef = useRef<\n (GrabState & { baseLayout: DashboardWidgetLayout[] }) | null\n >(null);\n const pointerDragRef = useRef<PointerDragState | null>(null);\n // A pointer interaction always ends with a trailing `click` on the\n // handle — preventDefault on pointerdown does NOT suppress it, and\n // pointer capture retargets it to the handle. This flag turns that\n // click into a no-op instead of a phantom keyboard grab.\n const suppressClickRef = useRef(false);\n const colsRef = useRef(cols);\n colsRef.current = cols;\n const resolvedRef = useRef(resolved);\n resolvedRef.current = resolved;\n\n const applyDraft = useCallback((next: DashboardWidgetLayout[] | null) => {\n draftRef.current = next;\n setDraft(next);\n }, []);\n\n const beginGrab = useCallback(\n (\n kind: 'move' | 'resize',\n widgetId: string,\n via: 'pointer' | 'keyboard',\n ) => {\n const state: GrabState = { kind, id: widgetId, via };\n // The grab-time layout is the collision base for EVERY step of this\n // grab: resolving against the mutating draft makes displaced\n // neighbours flee ahead of repeated steps (down-reorder becomes\n // unreachable); resolving against the frozen base keeps targeting\n // stateless and lets the engine's swap-up work.\n grabRef.current = { ...state, baseLayout: resolvedRef.current };\n setGrab(state);\n applyDraft(resolvedRef.current);\n },\n [applyDraft],\n );\n\n const active = draft ?? resolved;\n const layoutById = useMemo(\n () => new Map(active.map((entry) => [entry.id, entry])),\n [active],\n );\n\n const announceEntry = useCallback(\n (kind: 'move' | 'resize', entry: DashboardWidgetLayout) => {\n setAnnouncement(\n kind === 'move'\n ? t('dashboardGrid.movedTo', { col: entry.x + 1, row: entry.y + 1 })\n : t('dashboardGrid.resizedTo', { cols: entry.w, rows: entry.h }),\n );\n },\n [t],\n );\n\n // Removes the window listeners and the auto-scroll loop of a pointer\n // grab. Set when a pointer grab starts, so no event is missed while\n // React has yet to commit the grab.\n const stopPointerRef = useRef<(() => void) | null>(null);\n\n const endGrab = useCallback(\n (commitDraft: boolean) => {\n stopPointerRef.current?.();\n stopPointerRef.current = null;\n const current = draftRef.current;\n const grabbed = grabRef.current;\n grabRef.current = null;\n pointerDragRef.current = null;\n setGrab(null);\n applyDraft(null);\n if (!commitDraft || !current || !grabbed) {\n setAnnouncement(t('dashboardGrid.cancelled'));\n return;\n }\n // Committing compacts the WHOLE board — the dropped widget joins\n // the gravity pass, so a saved dashboard never keeps stray gaps.\n // A release that changed nothing commits nothing: a plain press on\n // a handle must never rewrite the persisted layout.\n const final = normalise(current, colsRef.current);\n const signatureOf = (layout: DashboardWidgetLayout[]): string =>\n layout.map((e) => `${e.id}:${e.x},${e.y},${e.w},${e.h}`).join('|');\n if (signatureOf(final) === signatureOf(resolvedRef.current)) {\n setAnnouncement(t('dashboardGrid.cancelled'));\n return;\n }\n commit(final);\n // Announce where the widget actually SETTLED — compaction can move\n // it past the last previewed cell, and a screen-reader user must\n // not be left with a stale mental model.\n const landed = final.find((entry) => entry.id === grabbed.id);\n setAnnouncement(\n landed\n ? t('dashboardGrid.droppedAt', {\n col: landed.x + 1,\n row: landed.y + 1,\n })\n : t('dashboardGrid.cancelled'),\n );\n },\n [applyDraft, commit, t],\n );\n const endGrabRef = useRef(endGrab);\n endGrabRef.current = endGrab;\n\n /* ---- keyboard grab --------------------------------------------- */\n const startKeyboardGrab = useCallback(\n (kind: 'move' | 'resize', widgetId: string) => {\n if (!editable) return;\n // The click that terminates a pointer interaction is not a request\n // for a keyboard grab.\n if (suppressClickRef.current) {\n suppressClickRef.current = false;\n return;\n }\n const current = grabRef.current;\n if (current?.via === 'pointer') return;\n if (current && current.id === widgetId && current.kind === kind) {\n // Second Enter/Space (button click) drops.\n endGrab(true);\n return;\n }\n beginGrab(kind, widgetId, 'keyboard');\n setAnnouncement(\n kind === 'move'\n ? t('dashboardGrid.grabbed')\n : t('dashboardGrid.resizeGrabbed'),\n );\n },\n [editable, beginGrab, endGrab, t],\n );\n\n const keyboardStep = useCallback(\n (event: ReactKeyboardEvent<HTMLButtonElement>, widgetId: string) => {\n const grabbed = grabRef.current;\n if (!grabbed || grabbed.id !== widgetId || grabbed.via !== 'keyboard') {\n return;\n }\n if (event.key === 'Escape') {\n event.preventDefault();\n endGrab(false);\n return;\n }\n const arrows = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];\n if (!arrows.includes(event.key)) return;\n event.preventDefault();\n const isRtl =\n typeof window !== 'undefined' && gridRef.current\n ? window.getComputedStyle(gridRef.current).direction === 'rtl'\n : false;\n // Visual left/right → logical inline delta (flips in RTL).\n const inlineDelta =\n event.key === 'ArrowRight'\n ? isRtl\n ? -1\n : 1\n : event.key === 'ArrowLeft'\n ? isRtl\n ? 1\n : -1\n : 0;\n const blockDelta =\n event.key === 'ArrowDown' ? 1 : event.key === 'ArrowUp' ? -1 : 0;\n // Target accumulates through the draft; collisions resolve against\n // the frozen grab-time base (see beginGrab).\n const currentDraft = draftRef.current ?? grabbed.baseLayout;\n const entry = currentDraft.find((item) => item.id === widgetId);\n if (!entry) return;\n const next =\n grabbed.kind === 'move'\n ? gestureDraft(\n grabbed.baseLayout,\n 'move',\n widgetId,\n entry.x + inlineDelta,\n entry.y + blockDelta,\n cols,\n )\n : gestureDraft(\n grabbed.baseLayout,\n 'resize',\n widgetId,\n entry.w + inlineDelta,\n entry.h + blockDelta,\n cols,\n );\n applyDraft(next);\n const moved = next.find((item) => item.id === widgetId);\n if (moved) announceEntry(grabbed.kind, moved);\n },\n [cols, endGrab, applyDraft, announceEntry],\n );\n\n /* ---- pointer drag ---------------------------------------------- */\n /* Cells come from the pointer's position against the GRID's box, not */\n /* from clientX/Y since pointerdown: a scroll of any ancestor (auto or */\n /* wheel) moves the box, so the widget follows the content. */\n const applyPointer = useCallback(() => {\n const dragState = pointerDragRef.current;\n const grabbed = grabRef.current;\n const gridNode = gridRef.current;\n if (!dragState || !grabbed || !gridNode) return;\n const rect = gridNode.getBoundingClientRect();\n const dxPx = dragState.lastClientX - rect.left - dragState.startGridX;\n const dyPx = dragState.lastClientY - rect.top - dragState.startGridY;\n // Visual px → logical cells: a rightward drag decreases the logical\n // column in RTL.\n const inlineCells =\n Math.round(dxPx / dragState.colStride) * (dragState.isRtl ? -1 : 1);\n const blockCells = Math.round(dyPx / dragState.rowStride);\n const { origin } = dragState;\n // Origin-absolute targeting against the frozen grab base — every\n // event re-derives the whole draft, nothing accumulates.\n applyDraft(\n dragState.kind === 'move'\n ? gestureDraft(\n grabbed.baseLayout,\n 'move',\n dragState.id,\n origin.x + inlineCells,\n origin.y + blockCells,\n colsRef.current,\n )\n : gestureDraft(\n grabbed.baseLayout,\n 'resize',\n dragState.id,\n origin.w + inlineCells,\n origin.h + blockCells,\n colsRef.current,\n ),\n );\n }, [applyDraft]);\n\n // A touch hold has picked a widget up: the finger must not scroll.\n const holdActiveRef = useRef(false);\n\n // Pointer move/up/cancel are window-level while a drag is in flight so\n // the drag survives the pointer leaving the handle's hit area. Scrolls\n // of any ancestor re-place the widget, and near an edge of the nearest\n // scrolling ancestor (or the window) the view scrolls by itself.\n const trackPointer = useCallback(() => {\n stopPointerRef.current?.();\n const onMove = (event: PointerEvent) => {\n const dragState = pointerDragRef.current;\n if (!dragState || event.pointerId !== dragState.pointerId) return;\n dragState.lastClientX = event.clientX;\n dragState.lastClientY = event.clientY;\n dragState.travelled ||=\n Math.hypot(\n event.clientX - dragState.pressX,\n event.clientY - dragState.pressY,\n ) > DRAG_THRESHOLD_PX;\n applyPointer();\n };\n const finish = (commitDraft: boolean) => (event: PointerEvent) => {\n const dragState = pointerDragRef.current;\n if (!dragState || event.pointerId !== dragState.pointerId) return;\n // Only a grip gets the click that ends a press on it.\n suppressClickRef.current = dragState.fromHandle;\n // Through the ref: the host's onLayoutChange may change mid-drag.\n endGrabRef.current(commitDraft);\n };\n const onUp = finish(true);\n const onCancel = finish(false);\n const onScroll = () => applyPointer();\n let frame = 0;\n const autoScroll = () => {\n frame = requestAnimationFrame(autoScroll);\n const dragState = pointerDragRef.current;\n // A press held still (or a touch hold not yet moved) never scrolls.\n if (!dragState?.travelled) return;\n const gridNode = gridRef.current;\n if (!gridNode) return;\n const { lastClientX: x, lastClientY: y } = dragState;\n // Each axis scrolls its own nearest scroller (a horizontal scroller\n // inside the app's vertical one), or the window. Looked up every\n // frame: a resize can make a wrapper start to overflow mid-grab.\n const scrollers = scrollingAncestors(gridNode);\n const axis = (\n scroller: HTMLElement | null,\n pointer: number,\n vertical: boolean,\n ) => {\n const view = vertical ? window.innerHeight : window.innerWidth;\n const box = scroller?.getBoundingClientRect();\n const start = Math.max(\n vertical ? (box?.top ?? 0) : (box?.left ?? 0),\n 0,\n );\n const end = Math.min(\n vertical ? (box?.bottom ?? view) : (box?.right ?? view),\n view,\n );\n const delta = edgeSpeed(end - pointer) - edgeSpeed(pointer - start);\n if (delta === 0) return;\n const read = () =>\n scroller\n ? vertical\n ? scroller.scrollTop\n : scroller.scrollLeft\n : vertical\n ? window.scrollY\n : window.scrollX;\n const before = read();\n scroller?.scrollBy(vertical ? 0 : delta, vertical ? delta : 0);\n // That scroller is at its end on this axis: the page scrolls.\n if (!scroller || read() === before) {\n window.scrollBy(vertical ? 0 : delta, vertical ? delta : 0);\n }\n };\n axis(scrollers.y, y, true);\n axis(scrollers.x, x, false);\n };\n frame = requestAnimationFrame(autoScroll);\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onUp);\n window.addEventListener('pointercancel', onCancel);\n window.addEventListener('scroll', onScroll, {\n capture: true,\n passive: true,\n });\n stopPointerRef.current = () => {\n cancelAnimationFrame(frame);\n holdActiveRef.current = false;\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onUp);\n window.removeEventListener('pointercancel', onCancel);\n window.removeEventListener('scroll', onScroll, { capture: true });\n };\n }, [applyPointer]);\n\n useEffect(\n () => () => {\n stopPointerRef.current?.();\n stopPointerRef.current = null;\n },\n [],\n );\n\n const beginPointerGrab = useCallback(\n (\n kind: 'move' | 'resize',\n widgetId: string,\n pointer: { pointerId: number; clientX: number; clientY: number },\n captureTarget: Element,\n fromHandle: boolean,\n ): boolean => {\n const gridNode = gridRef.current;\n const entry = resolvedRef.current.find((item) => item.id === widgetId);\n if (!gridNode || !entry) return false;\n const rect = gridNode.getBoundingClientRect();\n // A 0-width container (hidden tab, jsdom) has no usable cell metric —\n // pointer dragging is meaningless there; keyboard still works.\n if (rect.width <= 0) return false;\n const styles = window.getComputedStyle(gridNode);\n const gap = Number.parseFloat(styles.columnGap) || 0;\n const rowGap = Number.parseFloat(styles.rowGap) || 0;\n const colWidth = (rect.width - gap * (cols - 1)) / cols;\n pointerDragRef.current = {\n kind,\n id: widgetId,\n pointerId: pointer.pointerId,\n startGridX: pointer.clientX - rect.left,\n startGridY: pointer.clientY - rect.top,\n lastClientX: pointer.clientX,\n lastClientY: pointer.clientY,\n origin: entry,\n colStride: colWidth + gap,\n rowStride: rowHeight + rowGap,\n isRtl: styles.direction === 'rtl',\n fromHandle,\n pressX: pointer.clientX,\n pressY: pointer.clientY,\n travelled: false,\n };\n try {\n captureTarget.setPointerCapture?.(pointer.pointerId);\n } catch {\n // Synthetic pointer events (tests) have no active pointer to\n // capture; the window-level listeners track the drag regardless.\n }\n beginGrab(kind, widgetId, 'pointer');\n trackPointer();\n return true;\n },\n [cols, rowHeight, beginGrab, trackPointer],\n );\n\n const startPointerGrab = useCallback(\n (\n kind: 'move' | 'resize',\n widgetId: string,\n event: ReactPointerEvent<HTMLButtonElement>,\n ) => {\n if (!editable) return;\n // Any grab in flight wins: a keyboard grab must not be hijacked,\n // and a second concurrent pointer (multi-touch) must not reset an\n // active drag.\n if (grabRef.current) return;\n event.preventDefault();\n // preventDefault suppressed the browser's mousedown-focus — restore\n // it explicitly so the focusout/Escape cancel paths stay reachable\n // and the handle shows its focus ring during the drag.\n event.currentTarget.focus?.();\n beginPointerGrab(kind, widgetId, event, event.currentTarget, true);\n },\n [editable, beginPointerGrab],\n );\n\n /* ---- drag from the header -------------------------------------- */\n /* Mouse and pen: a press anywhere on the header (outside its buttons) */\n /* becomes a move once it travels DRAG_THRESHOLD_PX, so a plain click */\n /* still behaves as one. Touch: press and hold still for TOUCH_HOLD_MS */\n /* (moving earlier is a scroll and is left to the browser). */\n const headerPressRef = useRef<HeaderPress | null>(null);\n\n const clearHeaderPress = useCallback(() => {\n const press = headerPressRef.current;\n headerPressRef.current = null;\n if (!press) return;\n if (press.holdTimer) clearTimeout(press.holdTimer);\n press.cleanup();\n }, []);\n\n const startHeaderPress = useCallback(\n (widgetId: string, event: ReactPointerEvent<HTMLElement>) => {\n if (!editable || grabRef.current || headerPressRef.current) return;\n if (event.button !== 0 || !event.isPrimary) return;\n const target = event.target as Element;\n // Only the header's own DOM: React bubbles events from portals (a\n // pop-up opened from the header) through it too.\n if (!event.currentTarget.contains(target)) return;\n // Its controls keep their own behaviour; the title, a tab stop only\n // while cut short, stays a drag surface.\n const control = target.closest(HEADER_PRESS_IGNORES);\n if (control && event.currentTarget.contains(control)) return;\n const surface = event.currentTarget;\n const touch = event.pointerType === 'touch';\n // Mouse and pen: no text selection, no focus jump from the press.\n if (!touch) event.preventDefault();\n const activate = (clientX: number, clientY: number) => {\n const press = headerPressRef.current;\n clearHeaderPress();\n // Another pointer (a second finger on a grip) may have won.\n if (!press || grabRef.current) return;\n if (\n beginPointerGrab(\n 'move',\n press.id,\n {\n pointerId: press.pointerId,\n clientX: press.startClientX,\n clientY: press.startClientY,\n },\n press.surface,\n false,\n )\n ) {\n holdActiveRef.current = touch;\n const dragState = pointerDragRef.current;\n if (dragState) {\n dragState.lastClientX = clientX;\n dragState.lastClientY = clientY;\n // A mouse or pen press only got here by crossing the threshold.\n dragState.travelled = !touch;\n }\n applyPointer();\n }\n };\n const onMove = (move: PointerEvent) => {\n const press = headerPressRef.current;\n if (!press || move.pointerId !== press.pointerId) return;\n const travelled = Math.hypot(\n move.clientX - press.startClientX,\n move.clientY - press.startClientY,\n );\n if (touch) {\n if (travelled > TOUCH_SLOP_PX) clearHeaderPress();\n } else if (travelled > DRAG_THRESHOLD_PX) {\n activate(move.clientX, move.clientY);\n }\n };\n const onEnd = (end: PointerEvent) => {\n if (end.pointerId === headerPressRef.current?.pointerId) {\n clearHeaderPress();\n }\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onEnd);\n window.addEventListener('pointercancel', onEnd);\n headerPressRef.current = {\n id: widgetId,\n pointerId: event.pointerId,\n pointerType: event.pointerType,\n startClientX: event.clientX,\n startClientY: event.clientY,\n surface,\n holdTimer: touch\n ? setTimeout(() => {\n const press = headerPressRef.current;\n if (press) activate(press.startClientX, press.startClientY);\n }, TOUCH_HOLD_MS)\n : null,\n cleanup: () => {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onEnd);\n window.removeEventListener('pointercancel', onEnd);\n },\n };\n },\n [editable, beginPointerGrab, applyPointer, clearHeaderPress],\n );\n\n // When editing ends, a press in progress is dropped and a grab in flight\n // is cancelled, never committed.\n useEffect(() => {\n if (!editable) {\n clearHeaderPress();\n if (grabRef.current) endGrabRef.current(false);\n }\n }, [editable, clearHeaderPress]);\n\n // On unmount: a press's listeners and hold timer go with the board.\n useEffect(() => clearHeaderPress, [clearHeaderPress]);\n\n // Touch: once a hold has picked a widget up, the finger drags it and\n // must not scroll the page. The listener is registered for the whole\n // edit session (non-passive), because the browser only lets a handler\n // that existed at touchstart cancel the scroll.\n useEffect(() => {\n const node = gridRef.current;\n if (!editable || !node) return undefined;\n const onTouchMove = (event: TouchEvent) => {\n if (holdActiveRef.current && event.cancelable) event.preventDefault();\n };\n const onContextMenu = (event: Event) => {\n if (headerPressRef.current || holdActiveRef.current) {\n event.preventDefault();\n }\n };\n node.addEventListener('touchmove', onTouchMove, { passive: false });\n node.addEventListener('contextmenu', onContextMenu);\n return () => {\n node.removeEventListener('touchmove', onTouchMove);\n node.removeEventListener('contextmenu', onContextMenu);\n };\n }, [editable]);\n\n // Escape cancels ANY in-flight grab wherever focus currently is (APG:\n // the cancel key must work for the whole operation, not only while the\n // grabbed handle keeps focus).\n useEffect(() => {\n if (!grab) return undefined;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') endGrab(false);\n };\n window.addEventListener('keydown', onKeyDown);\n return () => window.removeEventListener('keydown', onKeyDown);\n }, [grab, endGrab]);\n\n // A keyboard grab that loses focus is cancelled (never leave the board\n // in a half-grabbed state).\n useEffect(() => {\n if (!grab || grab.via !== 'keyboard') return undefined;\n const onFocusOut = (event: FocusEvent) => {\n const next = event.relatedTarget as Node | null;\n if (!next || !gridRef.current?.contains(next)) endGrab(false);\n };\n const node = gridRef.current;\n node?.addEventListener('focusout', onFocusOut);\n return () => node?.removeEventListener('focusout', onFocusOut);\n }, [grab, endGrab]);\n\n // Stacking removes the chrome a grab is driven by: cancel it, never\n // commit it (stacking must not reach onLayoutChange). While editing,\n // say why the edit controls went away; the message replaces the\n // grab's \"Change cancelled.\".\n useIsomorphicLayoutEffect(() => {\n if (!stacked) return;\n if (grabRef.current) endGrab(false);\n if (editing) setAnnouncement(t('dashboardGrid.stackedReadOnly'));\n }, [stacked, editing, endGrab, t]);\n\n // Keep focus across the mode switch. Being in the DOM is not proof that\n // focus survived: the reorder MOVES keyed nodes, and a browser can drop\n // focus to <body> on a move. So check where focus is now. Lost and the\n // node still here (moved): focus it again. Lost and the node gone (edit\n // chrome unmounted): its widget takes focus, else the board does. Focus\n // that went somewhere else on purpose is left alone.\n useIsomorphicLayoutEffect(() => {\n const pending = pendingFocusRef.current;\n pendingFocusRef.current = null;\n const root = rootRef.current;\n if (!pending || !root) return;\n const active = document.activeElement;\n if (active === pending.element) return;\n if (active !== null && active !== document.body) return;\n if (root.contains(pending.element)) {\n pending.element.focus();\n return;\n }\n const widget = pending.widgetId\n ? Array.from(\n root.querySelectorAll<HTMLElement>('[data-widget-id]'),\n ).find(\n (node) => node.getAttribute('data-widget-id') === pending.widgetId,\n )\n : undefined;\n if (widget) {\n // Focusable by script only, so it never joins the tab order.\n widget.setAttribute('tabindex', '-1');\n widget.focus();\n return;\n }\n gridRef.current?.focus();\n }, [stacked]);\n\n const onStackedChangeRef = useRef(onStackedChange);\n onStackedChangeRef.current = onStackedChange;\n const reportedStackedRef = useRef(false);\n // A layout effect, so a host that hides its own controls on `true`\n // re-renders before the stacked board is first painted.\n useIsomorphicLayoutEffect(() => {\n if (reportedStackedRef.current === stacked) return;\n reportedStackedRef.current = stacked;\n onStackedChangeRef.current?.(stacked);\n }, [stacked]);\n\n /* ---- container CSS vars ---------------------------------------- */\n useIsomorphicLayoutEffect(() => {\n const node = gridRef.current;\n if (!node) return;\n node.style.setProperty('--dg-cols', String(cols));\n node.style.setProperty('--dg-row', `${rowHeight}px`);\n }, [cols, rowHeight]);\n\n // Edit-mode surface metrics. The cell-line gradients and the spare-row\n // min height depend on runtime values (cols, rowHeight, occupied rows),\n // so they flow through custom properties like the coordinates do.\n const visibleRows = rowCount(active);\n useIsomorphicLayoutEffect(() => {\n const node = gridRef.current;\n if (!node) return;\n node.style.setProperty(\n '--dg-grid-lines',\n `repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc((100% + var(--spacing-md)) / ${cols})), ` +\n `repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc(${rowHeight}px + var(--spacing-md)))`,\n );\n node.style.setProperty(\n '--dg-min-block',\n `calc(${visibleRows + 2} * (${rowHeight}px + var(--spacing-md)) - var(--spacing-md))`,\n );\n }, [cols, rowHeight, visibleRows]);\n\n /* ---- add tile placement ---------------------------------------- */\n const addTileRef = useRef<HTMLDivElement>(null);\n const showAddTile = editable && Boolean(onRequestAdd);\n const addSpot = useMemo(\n () => (showAddTile ? firstFit(active, cols, 2, 2) : null),\n [showAddTile, active, cols],\n );\n useIsomorphicLayoutEffect(() => {\n const node = addTileRef.current;\n if (!node || !addSpot) return;\n node.style.setProperty('--dg-x', String(addSpot.x + 1));\n node.style.setProperty('--dg-y', String(addSpot.y + 1));\n node.style.setProperty('--dg-w', '2');\n node.style.setProperty('--dg-h', '2');\n }, [addSpot]);\n\n /* ---- remove flow ------------------------------------------------ */\n const requestRemove = useCallback(\n (widgetId: string) => {\n // The kit owns the entry removal (single commit) and the focus\n // recovery — the consumer only unmounts the child. Without this a\n // keyboard user's focus falls to <body> when the button unmounts.\n // Focus goes to the next widget in Tab order (else the one before):\n // its first control, the move grip while editing; else the board.\n const widgets = Array.from(\n gridRef.current?.querySelectorAll<HTMLElement>('[data-widget-id]') ??\n [],\n );\n const at = widgets.findIndex(\n (node) => node.getAttribute('data-widget-id') === widgetId,\n );\n const neighbour = (widgets[at + 1] ?? widgets[at - 1])?.getAttribute(\n 'data-widget-id',\n );\n commit(\n normalise(\n resolvedRef.current.filter((entry) => entry.id !== widgetId),\n colsRef.current,\n ),\n );\n setAnnouncement(t('dashboardGrid.removed'));\n onRemoveWidget?.(widgetId);\n requestAnimationFrame(() => {\n const root = gridRef.current;\n if (!root) return;\n const next = Array.from(\n root.querySelectorAll<HTMLElement>('[data-widget-id]'),\n ).find((node) => node.getAttribute('data-widget-id') === neighbour);\n const target =\n next?.querySelector<HTMLButtonElement>('button') ??\n root.querySelector<HTMLButtonElement>('button');\n if (target) target.focus();\n else root.focus();\n });\n },\n [commit, onRemoveWidget, t],\n );\n\n /* ---- reveal ------------------------------------------------------ */\n /* A reveal waits for its widget: a host adds a widget and reveals it */\n /* in one tick, before React has rendered it. Each commit and each */\n /* frame tries again, until the widget has a box or a second passes. */\n const [revealedId, setRevealedId] = useState<string | null>(null);\n const pendingRevealRef = useRef<{\n id: string;\n deadline: number;\n resolve: (revealed: boolean) => void;\n } | null>(null);\n const revealTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const revealFrameRef = useRef(0);\n\n const tryReveal = useCallback((): boolean => {\n const pending = pendingRevealRef.current;\n const root = gridRef.current;\n if (!pending || !root) return false;\n const node = Array.from(\n root.querySelectorAll<HTMLElement>('[data-widget-id]'),\n ).find((item) => item.getAttribute('data-widget-id') === pending.id);\n const box = node?.getBoundingClientRect();\n if (!node || !box || box.height <= 0) {\n if (performance.now() > pending.deadline) {\n pendingRevealRef.current = null;\n pending.resolve(false);\n }\n return false;\n }\n pendingRevealRef.current = null;\n const reduceMotion =\n window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ||\n window\n .getComputedStyle(root)\n .getPropertyValue('--animation-duration')\n .trim() === '0ms';\n node.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n behavior: reduceMotion ? 'auto' : 'smooth',\n });\n setRevealedId(pending.id);\n if (revealTimerRef.current) clearTimeout(revealTimerRef.current);\n revealTimerRef.current = setTimeout(\n () => setRevealedId(null),\n REVEAL_HIGHLIGHT_MS,\n );\n pending.resolve(true);\n return true;\n }, []);\n\n const revealWidget = useCallback(\n (widgetId: string) =>\n new Promise<boolean>((resolve) => {\n pendingRevealRef.current?.resolve(false);\n cancelAnimationFrame(revealFrameRef.current);\n // A real timer as well as the frames: requestAnimationFrame stops\n // in a background tab, and the deadline must still hold there.\n const deadline = setTimeout(() => {\n const pending = pendingRevealRef.current;\n if (pending?.resolve !== settle) return;\n if (!tryReveal() && pendingRevealRef.current === pending) {\n pendingRevealRef.current = null;\n settle(false);\n }\n }, REVEAL_WAIT_MS);\n const settle = (revealed: boolean) => {\n clearTimeout(deadline);\n resolve(revealed);\n };\n pendingRevealRef.current = {\n id: widgetId,\n deadline: performance.now() + REVEAL_WAIT_MS,\n resolve: settle,\n };\n const poll = () => {\n if (!pendingRevealRef.current) return;\n if (!tryReveal() && pendingRevealRef.current) {\n revealFrameRef.current = requestAnimationFrame(poll);\n }\n };\n revealFrameRef.current = requestAnimationFrame(poll);\n }),\n [tryReveal],\n );\n\n // After every commit: the widget a pending reveal waits for may be here.\n useIsomorphicLayoutEffect(() => {\n if (pendingRevealRef.current) tryReveal();\n });\n\n useEffect(\n () => () => {\n cancelAnimationFrame(revealFrameRef.current);\n if (revealTimerRef.current) clearTimeout(revealTimerRef.current);\n pendingRevealRef.current?.resolve(false);\n pendingRevealRef.current = null;\n },\n [],\n );\n\n /* ---- imperative handle / agent --------------------------------- */\n const agentHandle = useMemo<DashboardGridHandle>(\n () => ({\n moveWidgetTo(widgetId, x, y) {\n // The ref also catches a stack decided but not yet rendered.\n if (!editable || stackedRef.current) return false;\n if (!Number.isFinite(x) || !Number.isFinite(y)) return false;\n if (!resolved.some((item) => item.id === widgetId)) return false;\n // Round: fractional cells produce invalid grid-column values. A\n // move to its own cell keeps the board as it is and saves nothing.\n const draft = gestureDraft(\n resolved,\n 'move',\n widgetId,\n Math.round(x),\n Math.round(y),\n cols,\n false,\n );\n if (draft !== resolved) commit(normalise(draft, cols));\n return true;\n },\n resizeWidgetTo(widgetId, w, h) {\n if (!editable || stackedRef.current) return false;\n if (!Number.isFinite(w) || !Number.isFinite(h)) return false;\n if (!resolved.some((item) => item.id === widgetId)) return false;\n const draft = gestureDraft(\n resolved,\n 'resize',\n widgetId,\n Math.round(w),\n Math.round(h),\n cols,\n false,\n );\n if (draft !== resolved) commit(normalise(draft, cols));\n return true;\n },\n revealWidget,\n getGridState() {\n return {\n cols,\n editing,\n stacked,\n layout: stripInjected(resolved),\n selectedId: selectedId ?? null,\n loadingIds: [...childMeta]\n .filter(([, meta]) => meta.loading)\n .map(([widgetId]) => widgetId),\n };\n },\n }),\n [\n editable,\n editing,\n stacked,\n resolved,\n cols,\n commit,\n stripInjected,\n revealWidget,\n selectedId,\n childMeta,\n ],\n );\n useImperativeHandle(ref, () => agentHandle, [agentHandle]);\n useAgentRegistration(dashboardGridAgent, agentHandle, id);\n\n const contextValue = useMemo<DashboardGridContextValue>(\n () => ({\n editing: editable,\n stacked,\n stackedHeight,\n selectedId,\n revealedId,\n headingLevel: widgetHeadingLevel,\n layoutById,\n grab,\n canRemove: Boolean(onRemoveWidget),\n requestRemove,\n startKeyboardGrab,\n keyboardStep,\n startPointerGrab,\n startHeaderPress,\n }),\n [\n editable,\n stacked,\n stackedHeight,\n selectedId,\n revealedId,\n widgetHeadingLevel,\n layoutById,\n grab,\n onRemoveWidget,\n requestRemove,\n startKeyboardGrab,\n keyboardStep,\n startPointerGrab,\n startHeaderPress,\n ],\n );\n\n /* ---- children in DOM order -------------------------------------- */\n /* With `stackBelow` set, widgets render as ONE keyed array in both */\n /* modes, so a mode switch only reorders them: React moves the nodes, */\n /* nothing remounts or loses state. Stacked, the DOM order IS the */\n /* reading order, so keyboard and screen-reader order match the */\n /* column. Without `stackBelow`, children render exactly as passed. */\n const renderedChildren = useMemo<ReactNode>(() => {\n if (stackBelow === undefined) return children;\n const all: ReactElement[] = [];\n const byId = new Map<string, ReactElement>();\n const unkeyed: ReactElement[] = [];\n // Keys keep the consumer's own key (so changing it still remounts)\n // and add the widget id, unique once fragments are flattened.\n forEachWidgetChild(children, (child) => {\n const widgetId = child.props.id;\n if (widgetId && !byId.has(widgetId)) {\n const element = cloneElement(child, {\n key: `widget:${widgetId}:${child.key ?? ''}`,\n });\n byId.set(widgetId, element);\n all.push(element);\n } else {\n const element = cloneElement(child, {\n key:\n child.key === null\n ? `child:at:${unkeyed.length}`\n : `child:key:${child.key}`,\n });\n unkeyed.push(element);\n all.push(element);\n }\n });\n if (!stacked) return all;\n return [\n ...stackOrder([...byId.keys()], resolved).map(\n (widgetId) => byId.get(widgetId) as ReactElement,\n ),\n ...unkeyed,\n ];\n }, [stackBelow, children, stacked, resolved]);\n\n return (\n <div\n ref={rootRef}\n data-component=\"dashboard-grid\"\n data-component-id={id}\n data-editing={editable || undefined}\n data-stacked={stacked || undefined}\n className={`ds:block ds:w-full ${className ?? ''}`.trim()}\n >\n <div role=\"status\" aria-live=\"polite\" className=\"ds:sr-only\">\n {announcement}\n </div>\n <div\n ref={gridRef}\n role=\"list\"\n aria-label={ariaLabel}\n tabIndex={-1}\n data-editing={editable || undefined}\n data-stacked={stacked || undefined}\n className={dashboardGridVariants({ stacked })}\n >\n <DashboardGridContext.Provider value={contextValue}>\n {renderedChildren}\n </DashboardGridContext.Provider>\n {showAddTile ? (\n // role=\"list\" allows only listitem children — the tile wrapper\n // carries the grid placement, the button fills it.\n <div\n ref={addTileRef}\n role=\"listitem\"\n className={[\n 'ds:flex',\n 'ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]',\n 'ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]',\n ].join(' ')}\n >\n <button\n type=\"button\"\n onClick={onRequestAdd}\n className={[\n 'ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]',\n 'ds:rounded-[var(--radius-lg)] ds:border ds:border-dashed ds:border-border',\n 'ds:text-sm ds:text-muted-foreground ds:transition-colors',\n 'ds:hover:bg-muted/10 ds:hover:text-foreground',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring',\n ].join(' ')}\n >\n <Plus aria-hidden=\"true\" className=\"ds:size-4\" />\n {t('dashboardGrid.add')}\n </button>\n </div>\n ) : null}\n </div>\n </div>\n );\n },\n);\nDashboardGridRoot.displayName = 'DashboardGrid';\n\nexport const DashboardGrid = Object.assign(DashboardGridRoot, {\n Widget: DashboardGridWidget,\n});\n"],"names":["__iconNode","MoveDiagonal2","createLucideIcon","dashboardGridAgent","handle","args","collides","a","b","clampRect","item","cols","minW","minH","maxW","maxH","w","h","x","y","isHole","slot","others","other","row","readingDistance","normalise","layout","activeId","vacated","items","order","placed","active","displaced","above","p","pushY","best","fromStart","floor","test","settled","target","xs","_","i","byId","moveItem","id","next","resizeItem","firstFit","width","maxY","candidate","rowCount","m","STACK_HYSTERESIS_PX","shouldStack","inlineSize","stackBelow","wasStacked","stackOrder","ids","index","dashboardGridVariants","cva","widgetVariants","widgetBodyVariants","CONTENT_ENTER_CLASS","widgetCaptionVariants","resizeGripVariants","headerFoldVariants","HEADER_BUTTON_CLASSES","widgetHeaderVariants","widgetTitleVariants","DashboardGridContext","createContext","positiveSpan","value","forEachWidgetChild","children","fn","Children","child","isValidElement","Fragment","DashboardGridWidget","title","minStackedHeight","actions","actionsSlot","loadingProp","loadingCaption","t","useTranslation","ctx","useContext","wrapperRef","useRef","captionId","useId","loading","wasLoading","setWasLoading","useState","settling","setSettling","pickedRef","entry","titleNode","setTitleNode","titleCut","setTitleCut","titleFocused","setTitleFocused","tipOpen","setTipOpen","useEffect","measure","fonts","observer","useIsomorphicLayoutEffect","node","grabbed","_a","editing","headerButtons","REMOVE_ACTION_ID","X","foldable","caption","TitleTag","jsxs","event","jsx","IconButton","GripVertical","_b","Tooltip","action","DropdownMenu","Ellipsis","before","_c","REVEAL_WAIT_MS","REVEAL_HIGHLIGHT_MS","HEADER_PRESS_IGNORES","DRAG_THRESHOLD_PX","TOUCH_HOLD_MS","TOUCH_SLOP_PX","AUTO_SCROLL_EDGE_PX","AUTO_SCROLL_MAX_PX","scrollingAncestors","found","scrolls","current","styles","gestureDraft","base","kind","inline","block","capped","start","bottom","moved","edgeSpeed","distance","depth","DashboardGridRoot","forwardRef","ariaLabel","rowHeight","layoutProp","defaultLayout","onLayoutChange","onRemoveWidget","onRequestAdd","onStackedChange","stackedHeight","selectedId","widgetHeadingLevel","className","ref","rootRef","gridRef","stacked","setStacked","stackedRef","pendingFocusRef","switchStacked","useCallback","root","focused","entries","editable","childIds","useMemo","childMeta","meta","internalLayout","setInternalLayout","committed","committedRef","stripInjected","own","e","_minW","_minH","rest","commit","reported","resolved","autoPlaced","constrained","clamped","missing","cid","j","spot","reportedRef","signature","draft","setDraft","grab","setGrab","announcement","setAnnouncement","draftRef","grabRef","pointerDragRef","suppressClickRef","colsRef","resolvedRef","applyDraft","beginGrab","widgetId","via","state","layoutById","announceEntry","stopPointerRef","endGrab","commitDraft","final","signatureOf","landed","endGrabRef","startKeyboardGrab","keyboardStep","isRtl","inlineDelta","blockDelta","applyPointer","dragState","gridNode","rect","dxPx","dyPx","inlineCells","blockCells","origin","holdActiveRef","trackPointer","onMove","finish","onUp","onCancel","onScroll","frame","autoScroll","scrollers","axis","scroller","pointer","vertical","view","box","end","delta","read","beginPointerGrab","captureTarget","fromHandle","gap","rowGap","colWidth","startPointerGrab","headerPressRef","clearHeaderPress","press","startHeaderPress","control","surface","touch","activate","clientX","clientY","move","travelled","onEnd","onTouchMove","onContextMenu","onKeyDown","onFocusOut","pending","widget","onStackedChangeRef","reportedStackedRef","visibleRows","addTileRef","showAddTile","addSpot","requestRemove","widgets","at","neighbour","revealedId","setRevealedId","pendingRevealRef","revealTimerRef","revealFrameRef","tryReveal","reduceMotion","revealWidget","resolve","deadline","settle","revealed","poll","agentHandle","useImperativeHandle","useAgentRegistration","contextValue","renderedChildren","all","unkeyed","element","cloneElement","Plus","DashboardGrid"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,eAAe,KAAK,SAAQ,CAAE;AAAA,EAC5C,CAAC,QAAQ,EAAE,GAAG,aAAa,KAAK,SAAQ,CAAE;AAAA,EAC1C,CAAC,QAAQ,EAAE,GAAG,cAAc,K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cACzB,WAAW1H,GAAsB,EAAE,SAAA0H,GAAS;AAAA,cAE5C,UAAA;AAAA,gBAAA,gBAAApD,EAAC3D,GAAqB,UAArB,EAA8B,OAAOkQ,IACnC,UAAAC,IACH;AAAA,gBACCvB;AAAA;AAAA;AAAA,kBAGC,gBAAAjL;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,KAAKgL;AAAA,sBACL,MAAK;AAAA,sBACL,WAAW;AAAA,wBACT;AAAA,wBACA;AAAA,wBACA;AAAA,sBAAA,EACA,KAAK,GAAG;AAAA,sBAEV,UAAA,gBAAAlL;AAAA,wBAAC;AAAA,wBAAA;AAAA,0BACC,MAAK;AAAA,0BACL,SAAS6C;AAAA,0BACT,WAAW;AAAA,4BACT;AAAA,4BACA;AAAA,4BACA;AAAA,4BACA;AAAA,4BACA;AAAA,0BAAA,EACA,KAAK,GAAG;AAAA,0BAEV,UAAA;AAAA,8CAACkK,IAAA,EAAK,eAAY,QAAO,WAAU,aAAY;AAAA,4BAC9CtP,EAAE,mBAAmB;AAAA,0BAAA;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACxB;AAAA,kBAAA;AAAA,oBAEA;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACA4E,GAAkB,cAAc;AAEzB,MAAM2K,KAAgB,OAAO,OAAO3K,IAAmB;AAAA,EAC5D,QAAQnF;AACV,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as _ } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as z, forwardRef as U, useState as M, useCallback as F, useEffect as $, useRef as q, createContext as De, useContext as Ge, isValidElement as Mt, cloneElement as Ot, useImperativeHandle as Lt } from "react";
|
|
3
|
-
import { S as Vt } from "./skeleton-
|
|
3
|
+
import { S as Vt } from "./skeleton-tTWJpvAq.js";
|
|
4
4
|
import { E as zt } from "./empty-state-pL1qum99.js";
|
|
5
5
|
import { c as qt } from "./index-D2ZczOXr.js";
|
|
6
6
|
import { useTranslation as A } from "react-i18next";
|
|
@@ -25,7 +25,7 @@ import { D as we } from "./download-CfYKJO_j.js";
|
|
|
25
25
|
import { F as Jt } from "./file-spreadsheet-DmwyfV4O.js";
|
|
26
26
|
import Zt from "i18next";
|
|
27
27
|
import { S as Ke } from "./state-backed-text-input-Cgh4ms3p.js";
|
|
28
|
-
import { S as ea } from "./select-
|
|
28
|
+
import { S as ea } from "./select-4S-eYZUf.js";
|
|
29
29
|
import { u as ta } from "./registry-DvAUVLHh.js";
|
|
30
30
|
import { u as aa } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
31
31
|
import { u as ra } from "./use-theme-CAuo6EYT.js";
|
|
@@ -1990,4 +1990,4 @@ export {
|
|
|
1990
1990
|
Cr as h,
|
|
1991
1991
|
B as i
|
|
1992
1992
|
};
|
|
1993
|
-
//# sourceMappingURL=data-table-
|
|
1993
|
+
//# sourceMappingURL=data-table-Cty4-Jht.js.map
|