@alfadocs/ui-kit-debug 1.57.0 → 1.58.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-BfjxS05Z.js → address-fields-CJtu7LQU.js} +2 -2
- package/dist/_chunks/{address-fields-BfjxS05Z.js.map → address-fields-CJtu7LQU.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-BBKBJCv6.js → alia-sidebar-dybRpWml.js} +2 -2
- package/dist/_chunks/{alia-sidebar-BBKBJCv6.js.map → alia-sidebar-dybRpWml.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-CCQ62mMN.js → anamnesis-summary-rows-M-FUkw9p.js} +3 -3
- package/dist/_chunks/{anamnesis-summary-rows-CCQ62mMN.js.map → anamnesis-summary-rows-M-FUkw9p.js.map} +1 -1
- package/dist/_chunks/{app-frame-B-0O9CrU.js → app-frame-CqmDh2v5.js} +2 -2
- package/dist/_chunks/{app-frame-B-0O9CrU.js.map → app-frame-CqmDh2v5.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-CII3SDmR.js → balance-badge-cell-CGoJZlKf.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-CII3SDmR.js.map → balance-badge-cell-CGoJZlKf.js.map} +1 -1
- package/dist/_chunks/{booking-81WnKDsH.js → booking-CiFSAMR-.js} +2 -2
- package/dist/_chunks/{booking-81WnKDsH.js.map → booking-CiFSAMR-.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-D5-k_9zE.js → calendar-workspace-DNHzjG7O.js} +12 -12
- package/dist/_chunks/calendar-workspace-DNHzjG7O.js.map +1 -0
- package/dist/_chunks/{chart-DQ5GxqgT.js → chart-ZMkX-Gqy.js} +28 -28
- package/dist/_chunks/{chart-DQ5GxqgT.js.map → chart-ZMkX-Gqy.js.map} +1 -1
- package/dist/_chunks/{city-input-BC_nYINn.js → city-input-3J3bz9EO.js} +2 -2
- package/dist/_chunks/{city-input-BC_nYINn.js.map → city-input-3J3bz9EO.js.map} +1 -1
- package/dist/_chunks/{control-room-rail-Tx2jW250.js → control-room-rail-CJ85HkS2.js} +2 -2
- package/dist/_chunks/{control-room-rail-Tx2jW250.js.map → control-room-rail-CJ85HkS2.js.map} +1 -1
- package/dist/_chunks/dashboard-grid-Cs7cJAsA.js +933 -0
- package/dist/_chunks/dashboard-grid-Cs7cJAsA.js.map +1 -0
- package/dist/_chunks/{data-table-fAMTeAjM.js → data-table-Yn5xiGzs.js} +2 -2
- package/dist/_chunks/{data-table-fAMTeAjM.js.map → data-table-Yn5xiGzs.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BicuUA2K.js → face-scheme-DSKDdIsb.js} +2 -2
- package/dist/_chunks/{face-scheme-BicuUA2K.js.map → face-scheme-DSKDdIsb.js.map} +1 -1
- package/dist/_chunks/{file-manager-CFsL1KVt.js → file-manager-DEtkQR1F.js} +3 -3
- package/dist/_chunks/{file-manager-CFsL1KVt.js.map → file-manager-DEtkQR1F.js.map} +1 -1
- package/dist/_chunks/{forgot-password-form-DEx-M_QR.js → forgot-password-form-CEqOmNuX.js} +2 -2
- package/dist/_chunks/{forgot-password-form-DEx-M_QR.js.map → forgot-password-form-CEqOmNuX.js.map} +1 -1
- package/dist/_chunks/{heatmap-BEeOThkW.js → heatmap-DiyOSQk9.js} +2 -2
- package/dist/_chunks/{heatmap-BEeOThkW.js.map → heatmap-DiyOSQk9.js.map} +1 -1
- package/dist/_chunks/{help-me-write-templates-BUoYGo6f.js → help-me-write-templates-CM1p6qkm.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-BUoYGo6f.js.map → help-me-write-templates-CM1p6qkm.js.map} +1 -1
- package/dist/_chunks/{icon-picker-C86lQTIA.js → icon-picker-rOFTawXk.js} +2 -2
- package/dist/_chunks/{icon-picker-C86lQTIA.js.map → icon-picker-rOFTawXk.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-CxW_oLa5.js → link-cell-renderer-C1wOyxDF.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-CxW_oLa5.js.map → link-cell-renderer-C1wOyxDF.js.map} +1 -1
- package/dist/_chunks/{list-RRN2TJ_7.js → list-CNnn7DOD.js} +75 -73
- package/dist/_chunks/list-CNnn7DOD.js.map +1 -0
- package/dist/_chunks/{login-dev-card-DmZ1B0lB.js → login-dev-card-CIim81VB.js} +2 -2
- package/dist/_chunks/{login-dev-card-DmZ1B0lB.js.map → login-dev-card-CIim81VB.js.map} +1 -1
- package/dist/_chunks/marketplace-app-shell-CSDmGLPW.js +613 -0
- package/dist/_chunks/marketplace-app-shell-CSDmGLPW.js.map +1 -0
- package/dist/_chunks/{message-tray-QKQutwxj.js → message-tray-DmU0poD7.js} +2 -2
- package/dist/_chunks/{message-tray-QKQutwxj.js.map → message-tray-DmU0poD7.js.map} +1 -1
- package/dist/_chunks/navigation-dismiss-B1mcW1CT.js +9 -0
- package/dist/_chunks/navigation-dismiss-B1mcW1CT.js.map +1 -0
- package/dist/_chunks/{notes-panel-Cm4pttpl.js → notes-panel-DHLHsxpW.js} +2 -2
- package/dist/_chunks/{notes-panel-Cm4pttpl.js.map → notes-panel-DHLHsxpW.js.map} +1 -1
- package/dist/_chunks/{notification-tray-C5VtbGjd.js → notification-tray-DPU-Xg0i.js} +2 -2
- package/dist/_chunks/{notification-tray-C5VtbGjd.js.map → notification-tray-DPU-Xg0i.js.map} +1 -1
- package/dist/_chunks/{panel-subview-BT-Apwgb.js → panel-subview-D4o6ar6_.js} +61 -47
- package/dist/_chunks/panel-subview-D4o6ar6_.js.map +1 -0
- package/dist/_chunks/{patient-details-99kEdtc5.js → patient-details-BCaVuaXz.js} +2 -2
- package/dist/_chunks/{patient-details-99kEdtc5.js.map → patient-details-BCaVuaXz.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-DkxY13T6.js → patient-field-row-jcRSTrp4.js} +3 -3
- package/dist/_chunks/{patient-field-row-DkxY13T6.js.map → patient-field-row-jcRSTrp4.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-opdyfeW2.js → patient-summary-card-kQIfPQOE.js} +2 -2
- package/dist/_chunks/{patient-summary-card-opdyfeW2.js.map → patient-summary-card-kQIfPQOE.js.map} +1 -1
- package/dist/_chunks/{payment-automation-upsell-DiHovmUL.js → payment-automation-upsell-C4wHOxsp.js} +2 -2
- package/dist/_chunks/{payment-automation-upsell-DiHovmUL.js.map → payment-automation-upsell-C4wHOxsp.js.map} +1 -1
- package/dist/_chunks/{practice-results-CfRkjzsI.js → practice-results-D07wgCqV.js} +2 -2
- package/dist/_chunks/{practice-results-CfRkjzsI.js.map → practice-results-D07wgCqV.js.map} +1 -1
- package/dist/_chunks/{product-hub-panel-DlVRK7Ue.js → product-hub-panel-DCYX0rPG.js} +2 -2
- package/dist/_chunks/{product-hub-panel-DlVRK7Ue.js.map → product-hub-panel-DCYX0rPG.js.map} +1 -1
- package/dist/_chunks/{public-header.agent-BctevbuY.js → public-header.agent-C1SlVSYt.js} +2 -2
- package/dist/_chunks/{public-header.agent-BctevbuY.js.map → public-header.agent-C1SlVSYt.js.map} +1 -1
- package/dist/_chunks/{registration-form-BlTzYywa.js → registration-form-DrSR9Sjk.js} +3 -3
- package/dist/_chunks/{registration-form-BlTzYywa.js.map → registration-form-DrSR9Sjk.js.map} +1 -1
- package/dist/_chunks/{rich-text-editor-DTnNZ4Ff.js → rich-text-editor-UgXri8h6.js} +2 -2
- package/dist/_chunks/{rich-text-editor-DTnNZ4Ff.js.map → rich-text-editor-UgXri8h6.js.map} +1 -1
- package/dist/_chunks/{scroll-area-ZtFCv9K7.js → scroll-area-CY5SLYNw.js} +104 -74
- package/dist/_chunks/scroll-area-CY5SLYNw.js.map +1 -0
- package/dist/_chunks/{search-bar-DQJS0wJN.js → search-bar-mA4bPe3t.js} +294 -255
- package/dist/_chunks/search-bar-mA4bPe3t.js.map +1 -0
- package/dist/_chunks/{sheet-8qsiMoUI.js → sheet-Dtjk0CVv.js} +2 -2
- package/dist/_chunks/{sheet-8qsiMoUI.js.map → sheet-Dtjk0CVv.js.map} +1 -1
- package/dist/_chunks/sidebar-D4Wllqfz.js +2029 -0
- package/dist/_chunks/sidebar-D4Wllqfz.js.map +1 -0
- package/dist/_chunks/{signature-request-DRuYAG5I.js → signature-request-dAVgE0_5.js} +2 -2
- package/dist/_chunks/{signature-request-DRuYAG5I.js.map → signature-request-dAVgE0_5.js.map} +1 -1
- package/dist/_chunks/{signed-out-frame-AhMsNW1r.js → signed-out-frame-DOJpobp8.js} +2 -2
- package/dist/_chunks/{signed-out-frame-AhMsNW1r.js.map → signed-out-frame-DOJpobp8.js.map} +1 -1
- package/dist/_chunks/{state-backed-text-input-DECQy5aA.js → state-backed-text-input-Cgh4ms3p.js} +2 -2
- package/dist/_chunks/{state-backed-text-input-DECQy5aA.js.map → state-backed-text-input-Cgh4ms3p.js.map} +1 -1
- package/dist/_chunks/{task-editor-NkcopDna.js → task-editor-BflEZmcF.js} +5 -4
- package/dist/_chunks/task-editor-BflEZmcF.js.map +1 -0
- package/dist/_chunks/{tool-rail-Bwyuw_Ot.js → tool-rail-CTq1KwxW.js} +115 -114
- package/dist/_chunks/{tool-rail-Bwyuw_Ot.js.map → tool-rail-CTq1KwxW.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-CfFQNOF_.js → use-appointment-details-read-izwoXh-G.js} +6 -6
- package/dist/_chunks/{use-appointment-details-read-CfFQNOF_.js.map → use-appointment-details-read-izwoXh-G.js.map} +1 -1
- package/dist/_chunks/use-state-backed-input-DhRQo6gM.js +57 -0
- package/dist/_chunks/use-state-backed-input-DhRQo6gM.js.map +1 -0
- package/dist/_chunks/{voice-control-panel-BKbgb7FM.js → voice-control-panel-an-bpQfF.js} +2 -2
- package/dist/_chunks/{voice-control-panel-BKbgb7FM.js.map → voice-control-panel-an-bpQfF.js.map} +1 -1
- package/dist/_chunks/{widget-picker-rBA7MR5P.js → widget-picker-DlJOgYrZ.js} +80 -57
- package/dist/_chunks/widget-picker-DlJOgYrZ.js.map +1 -0
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/navigation-dismiss.d.ts +8 -0
- package/dist/components/_shared/navigation-dismiss.d.ts.map +1 -0
- package/dist/components/_shared/use-state-backed-input.d.ts +3 -2
- package/dist/components/_shared/use-state-backed-input.d.ts.map +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/dashboard-grid/dashboard-grid.d.ts +33 -8
- 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/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/list/index.js +1 -1
- package/dist/components/list/list.d.ts.map +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/panel-subview/index.js +1 -1
- package/dist/components/panel-subview/panel-subview.d.ts.map +1 -1
- package/dist/components/patient-details/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/practice-results/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area.d.ts +6 -5
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-bar/search-bar.d.ts +1 -1
- package/dist/components/search-bar/search-bar.d.ts.map +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar/index.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar-move.d.ts +88 -0
- package/dist/components/sidebar/sidebar-move.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +26 -1
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/task-editor/task-editor.d.ts.map +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/components/widget-picker/widget-picker.d.ts.map +1 -1
- package/dist/host-compat.css +2 -1
- package/dist/i18n/locales/ar.d.ts +10 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +11 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +10 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +11 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +10 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +11 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +10 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +11 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +10 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +11 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +10 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +11 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +10 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +11 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +10 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +11 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +10 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +11 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +10 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +11 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +10 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +11 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +10 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +11 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +10 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +11 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +10 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +11 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +10 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +11 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +10 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +11 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +10 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +11 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +10 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +11 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +44 -44
- package/dist/locales/ar.json +11 -1
- package/dist/locales/de.json +11 -1
- package/dist/locales/el.json +11 -1
- package/dist/locales/en.json +11 -1
- package/dist/locales/es.json +11 -1
- package/dist/locales/fr.json +11 -1
- package/dist/locales/hi.json +11 -1
- package/dist/locales/it.json +11 -1
- package/dist/locales/ja.json +11 -1
- package/dist/locales/nl.json +11 -1
- package/dist/locales/pl.json +11 -1
- package/dist/locales/pt.json +11 -1
- package/dist/locales/ro.json +11 -1
- package/dist/locales/ru.json +11 -1
- package/dist/locales/sq.json +11 -1
- package/dist/locales/sv.json +11 -1
- package/dist/locales/tr.json +11 -1
- package/dist/locales/zh.json +11 -1
- package/dist/patterns/alia-assistant/index.js +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 +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +34 -9
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +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/patterns/signed-out-frame/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/calendar-workspace-D5-k_9zE.js.map +0 -1
- package/dist/_chunks/dashboard-grid-DfEY2qci.js +0 -844
- package/dist/_chunks/dashboard-grid-DfEY2qci.js.map +0 -1
- package/dist/_chunks/list-RRN2TJ_7.js.map +0 -1
- package/dist/_chunks/marketplace-app-shell-BZcA9Z06.js +0 -555
- package/dist/_chunks/marketplace-app-shell-BZcA9Z06.js.map +0 -1
- package/dist/_chunks/panel-subview-BT-Apwgb.js.map +0 -1
- package/dist/_chunks/scroll-area-ZtFCv9K7.js.map +0 -1
- package/dist/_chunks/search-bar-DQJS0wJN.js.map +0 -1
- package/dist/_chunks/sidebar-DLsG2AIk.js +0 -1349
- package/dist/_chunks/sidebar-DLsG2AIk.js.map +0 -1
- package/dist/_chunks/task-editor-NkcopDna.js.map +0 -1
- package/dist/_chunks/use-state-backed-input-C7ESmxKB.js +0 -59
- package/dist/_chunks/use-state-backed-input-C7ESmxKB.js.map +0 -1
- package/dist/_chunks/widget-picker-rBA7MR5P.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-grid-Cs7cJAsA.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 capabilities: ['edit_inline'],\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 },\n actions: {\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: 'Each widget wrapper carries its layout id.',\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 * Resolve overlaps and apply upward gravity. The `activeId` rect (the one\n * being dragged/resized) keeps its exact position; every other widget is\n * pushed down out of collisions, then pulled up as far as gravity allows.\n * Deterministic: non-active widgets settle in reading order (y, then x).\n */\nexport function normalise(\n layout: DashboardWidgetLayout[],\n cols: number,\n activeId?: string,\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 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 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 // 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(next, cols, id);\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 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 { GripVertical, MoveDiagonal2, Plus, X } from 'lucide-react';\nimport { IconButton } from '../button/icon-button';\nimport { Tooltip } from '../tooltip';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { dashboardGridAgent } from './dashboard-grid.agent';\nimport {\n clampRect,\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 '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 // 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 // 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:pe-[var(--spacing-md)] ds:pb-[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 },\n defaultVariants: { fit: 'box' },\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 * 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 /** 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 };\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 * 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 /** Extra header actions (view mode and edit mode). */\n actionsSlot?: ReactNode;\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 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}\n\nconst DashboardGridContext = createContext<DashboardGridContextValue | null>(\n null,\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 actionsSlot,\n children,\n}: DashboardGridWidgetProps) {\n const { t } = useTranslation('ui');\n const ctx = useContext(DashboardGridContext);\n const wrapperRef = useRef<HTMLDivElement>(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 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 className={widgetVariants({\n stacked: ctx.stacked,\n stackedHeight: ctx.stackedHeight,\n })}\n >\n <div className=\"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 {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 ds:bg-[var(--card)]\"\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 onFocus={() => setTitleFocused(true)}\n onBlur={() => setTitleFocused(false)}\n className={widgetTitleVariants()}\n >\n {title}\n </TitleTag>\n </Tooltip>\n {actionsSlot}\n {editing && ctx.canRemove ? (\n <IconButton\n size=\"sm\"\n intent=\"outline\"\n type=\"button\"\n icon={<X />}\n className=\"ds:bg-[var(--card)]\"\n aria-label={t('dashboardGrid.remove', { title })}\n onClick={() => ctx.requestRemove(id)}\n />\n ) : null}\n </div>\n <div\n className={widgetBodyVariants({\n fit:\n ctx.stacked && ctx.stackedHeight === 'content' ? 'content' : 'box',\n })}\n >\n {children}\n </div>\n {editing ? (\n <span className=\"ds:absolute ds:bottom-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]\">\n <IconButton\n size=\"sm\"\n intent=\"outline\"\n type=\"button\"\n icon={<MoveDiagonal2 />}\n flipIconInRtl\n aria-label={t('dashboardGrid.resize', { title })}\n aria-pressed={grabbed && ctx.grab?.kind === 'resize'}\n className=\"ds:touch-none ds:bg-[var(--card)]\"\n onPointerDown={(event) => ctx.startPointerGrab('resize', id, event)}\n onKeyDown={(event) => ctx.keyboardStep(event, id)}\n onClick={() => ctx.startKeyboardGrab('resize', id)}\n />\n </span>\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 startClientX: number;\n startClientY: number;\n origin: DashboardWidgetLayout;\n colStride: number;\n rowStride: number;\n isRtl: boolean;\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 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, { defaultW: number; defaultH: number }>();\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 });\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\n const commit = useCallback(\n (next: DashboardWidgetLayout[]) => {\n if (layoutProp === undefined) setInternalLayout(next);\n onLayoutChange?.(next);\n },\n [layoutProp, onLayoutChange],\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 clamped = committed.map((entry) => clampRect(entry, cols));\n const missing = childIds.filter(\n (cid) => !clamped.some((entry) => entry.id === cid),\n );\n if (missing.length === 0) {\n return { resolved: clamped, autoPlaced: false };\n }\n const placed = [...clamped];\n for (const cid of missing) {\n const meta = childMeta.get(cid) ?? { defaultW: 4, defaultH: 2 };\n const w = Math.min(meta.defaultW, cols);\n const spot = firstFit(placed, cols, w, meta.defaultH);\n placed.push({ id: cid, x: spot.x, y: spot.y, w, h: meta.defaultH });\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 const endGrab = useCallback(\n (commitDraft: boolean) => {\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\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 ? moveItem(\n grabbed.baseLayout,\n widgetId,\n entry.x + inlineDelta,\n entry.y + blockDelta,\n cols,\n )\n : resizeItem(\n grabbed.baseLayout,\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 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 const gridNode = gridRef.current;\n const entry = resolvedRef.current.find((item) => item.id === widgetId);\n if (!gridNode || !entry) 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 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;\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: event.pointerId,\n startClientX: event.clientX,\n startClientY: event.clientY,\n origin: entry,\n colStride: colWidth + gap,\n rowStride: rowHeight + rowGap,\n isRtl: styles.direction === 'rtl',\n };\n try {\n event.currentTarget.setPointerCapture?.(event.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 },\n [editable, cols, rowHeight, beginGrab],\n );\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.\n useEffect(() => {\n if (!grab || grab.via !== 'pointer') return undefined;\n const onMove = (event: PointerEvent) => {\n const dragState = pointerDragRef.current;\n const grabbed = grabRef.current;\n if (!dragState || !grabbed || event.pointerId !== dragState.pointerId)\n return;\n const dxPx = event.clientX - dragState.startClientX;\n const dyPx = event.clientY - dragState.startClientY;\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 // Origin-absolute targeting against the frozen grab base — every\n // event re-derives the whole draft, nothing accumulates.\n const next =\n dragState.kind === 'move'\n ? moveItem(\n grabbed.baseLayout,\n dragState.id,\n dragState.origin.x + inlineCells,\n dragState.origin.y + blockCells,\n colsRef.current,\n )\n : resizeItem(\n grabbed.baseLayout,\n dragState.id,\n dragState.origin.w + inlineCells,\n dragState.origin.h + blockCells,\n colsRef.current,\n );\n applyDraft(next);\n };\n const onUp = (event: PointerEvent) => {\n const dragState = pointerDragRef.current;\n if (!dragState || event.pointerId !== dragState.pointerId) return;\n suppressClickRef.current = true;\n endGrab(true);\n };\n const onCancel = (event: PointerEvent) => {\n const dragState = pointerDragRef.current;\n if (!dragState || event.pointerId !== dragState.pointerId) return;\n suppressClickRef.current = true;\n endGrab(false);\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onUp);\n window.addEventListener('pointercancel', onCancel);\n return () => {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onUp);\n window.removeEventListener('pointercancel', onCancel);\n };\n }, [grab, endGrab, applyDraft]);\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 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 nextFocus = root.querySelector<HTMLButtonElement>('button');\n if (nextFocus) nextFocus.focus();\n else root.focus();\n });\n },\n [commit, onRemoveWidget, t],\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.\n commit(\n normalise(\n moveItem(resolved, widgetId, Math.round(x), Math.round(y), cols),\n cols,\n ),\n );\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 commit(\n normalise(\n resizeItem(\n resolved,\n widgetId,\n Math.round(w),\n Math.round(h),\n cols,\n ),\n cols,\n ),\n );\n return true;\n },\n getGridState() {\n return {\n cols,\n editing,\n stacked,\n layout: resolved.map((item) => ({ ...item })),\n };\n },\n }),\n [editable, editing, stacked, resolved, cols, commit],\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 headingLevel: widgetHeadingLevel,\n layoutById,\n grab,\n canRemove: Boolean(onRemoveWidget),\n requestRemove,\n startKeyboardGrab,\n keyboardStep,\n startPointerGrab,\n }),\n [\n editable,\n stacked,\n stackedHeight,\n widgetHeadingLevel,\n layoutById,\n grab,\n onRemoveWidget,\n requestRemove,\n startKeyboardGrab,\n keyboardStep,\n startPointerGrab,\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","x","y","normalise","layout","activeId","items","order","placed","active","above","p","test","byId","moveItem","id","next","resizeItem","h","firstFit","width","maxY","m","candidate","rowCount","STACK_HYSTERESIS_PX","shouldStack","inlineSize","stackBelow","wasStacked","stackOrder","ids","index","dashboardGridVariants","cva","widgetVariants","widgetBodyVariants","widgetTitleVariants","DashboardGridContext","createContext","forEachWidgetChild","children","fn","Children","child","isValidElement","Fragment","DashboardGridWidget","title","minStackedHeight","actionsSlot","t","useTranslation","ctx","useContext","wrapperRef","useRef","entry","titleNode","setTitleNode","useState","titleCut","setTitleCut","titleFocused","setTitleFocused","tipOpen","setTipOpen","useEffect","measure","fonts","observer","useIsomorphicLayoutEffect","node","grabbed","_a","editing","TitleTag","jsxs","jsx","IconButton","GripVertical","_b","event","Tooltip","X","_c","DashboardGridRoot","forwardRef","ariaLabel","rowHeight","layoutProp","defaultLayout","onLayoutChange","onRemoveWidget","onRequestAdd","onStackedChange","stackedHeight","widgetHeadingLevel","className","ref","rootRef","gridRef","stacked","setStacked","stackedRef","pendingFocusRef","switchStacked","useCallback","root","focused","entries","editable","childIds","useMemo","childMeta","meta","internalLayout","setInternalLayout","committed","commit","resolved","autoPlaced","clamped","missing","cid","spot","reportedRef","signature","draft","setDraft","grab","setGrab","announcement","setAnnouncement","draftRef","grabRef","pointerDragRef","suppressClickRef","colsRef","resolvedRef","applyDraft","beginGrab","kind","widgetId","via","state","layoutById","announceEntry","endGrab","commitDraft","current","final","signatureOf","e","landed","startKeyboardGrab","keyboardStep","isRtl","inlineDelta","blockDelta","moved","startPointerGrab","gridNode","rect","styles","gap","rowGap","colWidth","_d","onMove","dragState","dxPx","dyPx","inlineCells","blockCells","onUp","onCancel","onKeyDown","onFocusOut","pending","widget","onStackedChangeRef","reportedStackedRef","visibleRows","addTileRef","showAddTile","addSpot","requestRemove","nextFocus","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,KAAK,SAAQ,CAAE;AAC7C,GACMC,KAAgBC,GAAiB,mBAAmBF,EAAU,GCXvDG,KAAwD;AAAA,EACnE,IAAI;AAAA;AAAA,EAEJ,cAAc,CAAC,aAAa;AAAA,EAC5B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,eAAe;AAAA,IAAA;AAAA,IAE1C,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,eAAe;AAAA,IAAA;AAAA,IAE1C,SAAS;AAAA,MACP,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,eAAe;AAAA,IAAA;AAAA,IAE1C,SAAS;AAAA,MACP,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;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AAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAmC,GAAkB,cAAc;AAEzB,MAAMiH,KAAgB,OAAO,OAAOjH,IAAmB;AAAA,EAC5D,QAAQvC;AACV,CAAC;","x_google_ignoreList":[0]}
|
|
@@ -24,7 +24,7 @@ import { F as Ue } from "./file-text-5yv6r2ls.js";
|
|
|
24
24
|
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
|
-
import { S as Ke } from "./state-backed-text-input-
|
|
27
|
+
import { S as Ke } from "./state-backed-text-input-Cgh4ms3p.js";
|
|
28
28
|
import { S as ea } from "./select-Ce5RMk93.js";
|
|
29
29
|
import { u as ta } from "./registry-DvAUVLHh.js";
|
|
30
30
|
import { u as aa } from "./use-prefers-reduced-motion-BMwIQRjB.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-Yn5xiGzs.js.map
|