@alfadocs/ui-kit-debug 1.56.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.
Files changed (445) hide show
  1. package/dist/_chunks/{address-fields-BfjxS05Z.js → address-fields-CJtu7LQU.js} +2 -2
  2. package/dist/_chunks/{address-fields-BfjxS05Z.js.map → address-fields-CJtu7LQU.js.map} +1 -1
  3. package/dist/_chunks/{ai-credits-notice-BoNJtOuE.js → ai-credits-notice-ktklr8fy.js} +2 -2
  4. package/dist/_chunks/{ai-credits-notice-BoNJtOuE.js.map → ai-credits-notice-ktklr8fy.js.map} +1 -1
  5. package/dist/_chunks/ai-permission-notice-DyuEGwAt.js +206 -0
  6. package/dist/_chunks/ai-permission-notice-DyuEGwAt.js.map +1 -0
  7. package/dist/_chunks/alia-sidebar-dybRpWml.js +1284 -0
  8. package/dist/_chunks/alia-sidebar-dybRpWml.js.map +1 -0
  9. package/dist/_chunks/{anamnesis-summary-rows-CQ-XGr0T.js → anamnesis-summary-rows-M-FUkw9p.js} +6 -6
  10. package/dist/_chunks/{anamnesis-summary-rows-CQ-XGr0T.js.map → anamnesis-summary-rows-M-FUkw9p.js.map} +1 -1
  11. package/dist/_chunks/{app-frame-B-0O9CrU.js → app-frame-CqmDh2v5.js} +2 -2
  12. package/dist/_chunks/{app-frame-B-0O9CrU.js.map → app-frame-CqmDh2v5.js.map} +1 -1
  13. package/dist/_chunks/{appointment-peek-BIZaDeCi.js → appointment-peek-WvNbE4JG.js} +2 -2
  14. package/dist/_chunks/{appointment-peek-BIZaDeCi.js.map → appointment-peek-WvNbE4JG.js.map} +1 -1
  15. package/dist/_chunks/{appointment-timeline-DmqYEIT9.js → appointment-timeline-Z0494xO-.js} +2 -2
  16. package/dist/_chunks/{appointment-timeline-DmqYEIT9.js.map → appointment-timeline-Z0494xO-.js.map} +1 -1
  17. package/dist/_chunks/{balance-badge-cell-DmDcXw0c.js → balance-badge-cell-CGoJZlKf.js} +3 -3
  18. package/dist/_chunks/{balance-badge-cell-DmDcXw0c.js.map → balance-badge-cell-CGoJZlKf.js.map} +1 -1
  19. package/dist/_chunks/{booking-WyNGKPE2.js → booking-CiFSAMR-.js} +4 -4
  20. package/dist/_chunks/{booking-WyNGKPE2.js.map → booking-CiFSAMR-.js.map} +1 -1
  21. package/dist/_chunks/{calculator-dialog-pCPWta7h.js → calculator-dialog-CzQv03p0.js} +2 -2
  22. package/dist/_chunks/{calculator-dialog-pCPWta7h.js.map → calculator-dialog-CzQv03p0.js.map} +1 -1
  23. package/dist/_chunks/{calendar-workspace-Du2ryaI-.js → calendar-workspace-DNHzjG7O.js} +19 -19
  24. package/dist/_chunks/calendar-workspace-DNHzjG7O.js.map +1 -0
  25. package/dist/_chunks/{care-plan-card-Ddjh5Doc.js → care-plan-card-DxrRLRdW.js} +2 -2
  26. package/dist/_chunks/{care-plan-card-Ddjh5Doc.js.map → care-plan-card-DxrRLRdW.js.map} +1 -1
  27. package/dist/_chunks/{care-plan-header-DUX_SVvF.js → care-plan-header-BMwZIgHJ.js} +2 -2
  28. package/dist/_chunks/{care-plan-header-DUX_SVvF.js.map → care-plan-header-BMwZIgHJ.js.map} +1 -1
  29. package/dist/_chunks/{chart-HsF1KHbx.js → chart-ZMkX-Gqy.js} +338 -341
  30. package/dist/_chunks/chart-ZMkX-Gqy.js.map +1 -0
  31. package/dist/_chunks/{city-input-BC_nYINn.js → city-input-3J3bz9EO.js} +2 -2
  32. package/dist/_chunks/{city-input-BC_nYINn.js.map → city-input-3J3bz9EO.js.map} +1 -1
  33. package/dist/_chunks/{clinical-note-card-14JIoUR0.js → clinical-note-card-hx939bvw.js} +2 -2
  34. package/dist/_chunks/{clinical-note-card-14JIoUR0.js.map → clinical-note-card-hx939bvw.js.map} +1 -1
  35. package/dist/_chunks/{color-picker-BRQ4Y9SO.js → color-picker-BsggJovx.js} +128 -123
  36. package/dist/_chunks/color-picker-BsggJovx.js.map +1 -0
  37. package/dist/_chunks/{contact-card-CmK05vNb.js → contact-card-fHBMwEsx.js} +2 -2
  38. package/dist/_chunks/{contact-card-CmK05vNb.js.map → contact-card-fHBMwEsx.js.map} +1 -1
  39. package/dist/_chunks/{contact-profile-card-Ci8lBQ6a.js → contact-profile-card-CMyBYgRR.js} +2 -2
  40. package/dist/_chunks/{contact-profile-card-Ci8lBQ6a.js.map → contact-profile-card-CMyBYgRR.js.map} +1 -1
  41. package/dist/_chunks/{control-room-rail-Tx2jW250.js → control-room-rail-CJ85HkS2.js} +2 -2
  42. package/dist/_chunks/{control-room-rail-Tx2jW250.js.map → control-room-rail-CJ85HkS2.js.map} +1 -1
  43. package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js → cycle-calculator-Cww9DzIa.js} +2 -2
  44. package/dist/_chunks/{cycle-calculator-Dgfqr4Q4.js.map → cycle-calculator-Cww9DzIa.js.map} +1 -1
  45. package/dist/_chunks/dashboard-grid-Cs7cJAsA.js +933 -0
  46. package/dist/_chunks/dashboard-grid-Cs7cJAsA.js.map +1 -0
  47. package/dist/_chunks/{data-table-D8fuhqO1.js → data-table-Yn5xiGzs.js} +3 -3
  48. package/dist/_chunks/{data-table-D8fuhqO1.js.map → data-table-Yn5xiGzs.js.map} +1 -1
  49. package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js → data-table-tabs-CHYAAeHy.js} +2 -2
  50. package/dist/_chunks/{data-table-tabs-Xhg5G0gU.js.map → data-table-tabs-CHYAAeHy.js.map} +1 -1
  51. package/dist/_chunks/{date-picker-wRAcq2lt.js → date-picker-BSZuKo13.js} +69 -62
  52. package/dist/_chunks/date-picker-BSZuKo13.js.map +1 -0
  53. package/dist/_chunks/{date-range-picker-CtUOI38x.js → date-range-picker-CFk-5O3R.js} +176 -171
  54. package/dist/_chunks/date-range-picker-CFk-5O3R.js.map +1 -0
  55. package/dist/_chunks/{date-time-picker-CLeLKuv9.js → date-time-picker-CjxTkblD.js} +92 -85
  56. package/dist/_chunks/date-time-picker-CjxTkblD.js.map +1 -0
  57. package/dist/_chunks/{dialog-CUzbnKLw.js → dialog-Dn-iQ0Jp.js} +2 -2
  58. package/dist/_chunks/{dialog-CUzbnKLw.js.map → dialog-Dn-iQ0Jp.js.map} +1 -1
  59. package/dist/_chunks/{document-preview-uoTekVR7.js → document-preview-CHGGG0l_.js} +2 -2
  60. package/dist/_chunks/{document-preview-uoTekVR7.js.map → document-preview-CHGGG0l_.js.map} +1 -1
  61. package/dist/_chunks/{due-date-calculator-CSjklbyw.js → due-date-calculator-D_qFUiHp.js} +2 -2
  62. package/dist/_chunks/{due-date-calculator-CSjklbyw.js.map → due-date-calculator-D_qFUiHp.js.map} +1 -1
  63. package/dist/_chunks/{entity-summary-DcB0fIiv.js → entity-summary-CWcCSThK.js} +2 -2
  64. package/dist/_chunks/{entity-summary-DcB0fIiv.js.map → entity-summary-CWcCSThK.js.map} +1 -1
  65. package/dist/_chunks/{face-scheme-BicuUA2K.js → face-scheme-DSKDdIsb.js} +2 -2
  66. package/dist/_chunks/{face-scheme-BicuUA2K.js.map → face-scheme-DSKDdIsb.js.map} +1 -1
  67. package/dist/_chunks/{file-manager-Cc_uO8r2.js → file-manager-DEtkQR1F.js} +4 -4
  68. package/dist/_chunks/{file-manager-Cc_uO8r2.js.map → file-manager-DEtkQR1F.js.map} +1 -1
  69. package/dist/_chunks/{forgot-password-form-DEx-M_QR.js → forgot-password-form-CEqOmNuX.js} +2 -2
  70. package/dist/_chunks/{forgot-password-form-DEx-M_QR.js.map → forgot-password-form-CEqOmNuX.js.map} +1 -1
  71. package/dist/_chunks/{gestational-age-calculator-DqVeJke2.js → gestational-age-calculator-CZi43xKG.js} +2 -2
  72. package/dist/_chunks/{gestational-age-calculator-DqVeJke2.js.map → gestational-age-calculator-CZi43xKG.js.map} +1 -1
  73. package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js → hcg-doubling-Ccvh7OaU.js} +2 -2
  74. package/dist/_chunks/{hcg-doubling-BIYyI2Yo.js.map → hcg-doubling-Ccvh7OaU.js.map} +1 -1
  75. package/dist/_chunks/{header-settings-ge_3gYEq.js → header-settings-BMcCx2LC.js} +2 -2
  76. package/dist/_chunks/{header-settings-ge_3gYEq.js.map → header-settings-BMcCx2LC.js.map} +1 -1
  77. package/dist/_chunks/{heatmap-Gf9r7Tn1.js → heatmap-DiyOSQk9.js} +2 -2
  78. package/dist/_chunks/{heatmap-Gf9r7Tn1.js.map → heatmap-DiyOSQk9.js.map} +1 -1
  79. package/dist/_chunks/{help-me-write-templates-fV-Apf72.js → help-me-write-templates-CM1p6qkm.js} +3 -3
  80. package/dist/_chunks/{help-me-write-templates-fV-Apf72.js.map → help-me-write-templates-CM1p6qkm.js.map} +1 -1
  81. package/dist/_chunks/{hover-card-BnTueNS2.js → hover-card-U_ZYoh1n.js} +201 -187
  82. package/dist/_chunks/hover-card-U_ZYoh1n.js.map +1 -0
  83. package/dist/_chunks/{icon-picker-DWrqmI1c.js → icon-picker-rOFTawXk.js} +3 -3
  84. package/dist/_chunks/{icon-picker-DWrqmI1c.js.map → icon-picker-rOFTawXk.js.map} +1 -1
  85. package/dist/_chunks/{info-tip-B0jmIt6M.js → info-tip-CJpNpzZe.js} +2 -2
  86. package/dist/_chunks/{info-tip-B0jmIt6M.js.map → info-tip-CJpNpzZe.js.map} +1 -1
  87. package/dist/_chunks/{kit-extensions-Byfxy6sy.js → kit-extensions-DYVxWcqv.js} +4 -4
  88. package/dist/_chunks/{kit-extensions-Byfxy6sy.js.map → kit-extensions-DYVxWcqv.js.map} +1 -1
  89. package/dist/_chunks/{link-cell-renderer-TeJNvymP.js → link-cell-renderer-C1wOyxDF.js} +3 -3
  90. package/dist/_chunks/{link-cell-renderer-TeJNvymP.js.map → link-cell-renderer-C1wOyxDF.js.map} +1 -1
  91. package/dist/_chunks/link-gRw3NtOt.js +137 -0
  92. package/dist/_chunks/link-gRw3NtOt.js.map +1 -0
  93. package/dist/_chunks/{list-RRN2TJ_7.js → list-CNnn7DOD.js} +75 -73
  94. package/dist/_chunks/list-CNnn7DOD.js.map +1 -0
  95. package/dist/_chunks/{locale-picker-DfNSdOpy.js → locale-picker-BGfrZyTw.js} +2 -2
  96. package/dist/_chunks/{locale-picker-DfNSdOpy.js.map → locale-picker-BGfrZyTw.js.map} +1 -1
  97. package/dist/_chunks/{login-dev-card-DmZ1B0lB.js → login-dev-card-CIim81VB.js} +2 -2
  98. package/dist/_chunks/{login-dev-card-DmZ1B0lB.js.map → login-dev-card-CIim81VB.js.map} +1 -1
  99. package/dist/_chunks/marketplace-app-shell-CSDmGLPW.js +613 -0
  100. package/dist/_chunks/marketplace-app-shell-CSDmGLPW.js.map +1 -0
  101. package/dist/_chunks/{message-tray-BB95DA82.js → message-tray-DmU0poD7.js} +76 -69
  102. package/dist/_chunks/message-tray-DmU0poD7.js.map +1 -0
  103. package/dist/_chunks/{nav-grid-BqCPH8sm.js → nav-grid-Byx8PxuB.js} +2 -2
  104. package/dist/_chunks/{nav-grid-BqCPH8sm.js.map → nav-grid-Byx8PxuB.js.map} +1 -1
  105. package/dist/_chunks/navigation-dismiss-B1mcW1CT.js +9 -0
  106. package/dist/_chunks/navigation-dismiss-B1mcW1CT.js.map +1 -0
  107. package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js +89 -0
  108. package/dist/_chunks/non-modal-tab-exit-j3CPOuE3.js.map +1 -0
  109. package/dist/_chunks/{note-attachment-I1NLoeRZ.js → note-attachment-Bt2cddsZ.js} +2 -2
  110. package/dist/_chunks/{note-attachment-I1NLoeRZ.js.map → note-attachment-Bt2cddsZ.js.map} +1 -1
  111. package/dist/_chunks/{note-timeline-CsY8YOE7.js → note-timeline-CX9nAgAR.js} +2 -2
  112. package/dist/_chunks/{note-timeline-CsY8YOE7.js.map → note-timeline-CX9nAgAR.js.map} +1 -1
  113. package/dist/_chunks/{notes-panel-DceRhthG.js → notes-panel-DHLHsxpW.js} +4 -4
  114. package/dist/_chunks/{notes-panel-DceRhthG.js.map → notes-panel-DHLHsxpW.js.map} +1 -1
  115. package/dist/_chunks/{notification-tray-__sJXnsz.js → notification-tray-DPU-Xg0i.js} +83 -76
  116. package/dist/_chunks/notification-tray-DPU-Xg0i.js.map +1 -0
  117. package/dist/_chunks/{panel-subview-BT-Apwgb.js → panel-subview-D4o6ar6_.js} +61 -47
  118. package/dist/_chunks/panel-subview-D4o6ar6_.js.map +1 -0
  119. package/dist/_chunks/{patient-details-DsTtjpuX.js → patient-details-BCaVuaXz.js} +2 -2
  120. package/dist/_chunks/{patient-details-DsTtjpuX.js.map → patient-details-BCaVuaXz.js.map} +1 -1
  121. package/dist/_chunks/{patient-field-row-BvZ9luz-.js → patient-field-row-jcRSTrp4.js} +7 -7
  122. package/dist/_chunks/{patient-field-row-BvZ9luz-.js.map → patient-field-row-jcRSTrp4.js.map} +1 -1
  123. package/dist/_chunks/{patient-summary-card-9nQWTQf6.js → patient-summary-card-kQIfPQOE.js} +4 -4
  124. package/dist/_chunks/{patient-summary-card-9nQWTQf6.js.map → patient-summary-card-kQIfPQOE.js.map} +1 -1
  125. package/dist/_chunks/{payment-automation-upsell-DiHovmUL.js → payment-automation-upsell-C4wHOxsp.js} +2 -2
  126. package/dist/_chunks/{payment-automation-upsell-DiHovmUL.js.map → payment-automation-upsell-C4wHOxsp.js.map} +1 -1
  127. package/dist/_chunks/{payment-request-card-CwDpwXUC.js → payment-request-card-DAniJNLX.js} +2 -2
  128. package/dist/_chunks/{payment-request-card-CwDpwXUC.js.map → payment-request-card-DAniJNLX.js.map} +1 -1
  129. package/dist/_chunks/{pdf-viewer-C3minW5b.js → pdf-viewer-CNQxa4tv.js} +396 -391
  130. package/dist/_chunks/pdf-viewer-CNQxa4tv.js.map +1 -0
  131. package/dist/_chunks/{phone-input-DxkHMYmu.js → phone-input-O9camxkq.js} +156 -151
  132. package/dist/_chunks/phone-input-O9camxkq.js.map +1 -0
  133. package/dist/_chunks/popover-BG75rYjN.js +367 -0
  134. package/dist/_chunks/popover-BG75rYjN.js.map +1 -0
  135. package/dist/_chunks/{practice-results-Dhbo-fc_.js → practice-results-D07wgCqV.js} +2 -2
  136. package/dist/_chunks/{practice-results-Dhbo-fc_.js.map → practice-results-D07wgCqV.js.map} +1 -1
  137. package/dist/_chunks/{pregnancy-dating-Bfu0Cq4H.js → pregnancy-dating-BFzv9g1N.js} +2 -2
  138. package/dist/_chunks/{pregnancy-dating-Bfu0Cq4H.js.map → pregnancy-dating-BFzv9g1N.js.map} +1 -1
  139. package/dist/_chunks/{product-hub-panel-BSSiGGG4.js → product-hub-panel-DCYX0rPG.js} +103 -96
  140. package/dist/_chunks/product-hub-panel-DCYX0rPG.js.map +1 -0
  141. package/dist/_chunks/{public-footer-CxpG6J1M.js → public-footer-ZWTEG1Rq.js} +2 -2
  142. package/dist/_chunks/{public-footer-CxpG6J1M.js.map → public-footer-ZWTEG1Rq.js.map} +1 -1
  143. package/dist/_chunks/{public-header.agent-pr2hyiND.js → public-header.agent-C1SlVSYt.js} +2 -2
  144. package/dist/_chunks/{public-header.agent-pr2hyiND.js.map → public-header.agent-C1SlVSYt.js.map} +1 -1
  145. package/dist/_chunks/{radiograph-panel.agent-DkUokbEa.js → radiograph-panel.agent-DyqbTECc.js} +4 -4
  146. package/dist/_chunks/{radiograph-panel.agent-DkUokbEa.js.map → radiograph-panel.agent-DyqbTECc.js.map} +1 -1
  147. package/dist/_chunks/{registration-form-D7iNqMBF.js → registration-form-DrSR9Sjk.js} +4 -4
  148. package/dist/_chunks/{registration-form-D7iNqMBF.js.map → registration-form-DrSR9Sjk.js.map} +1 -1
  149. package/dist/_chunks/{rich-text-editor-CkFfmA3v.js → rich-text-editor-UgXri8h6.js} +490 -485
  150. package/dist/_chunks/rich-text-editor-UgXri8h6.js.map +1 -0
  151. package/dist/_chunks/{scroll-area-ZtFCv9K7.js → scroll-area-CY5SLYNw.js} +104 -74
  152. package/dist/_chunks/scroll-area-CY5SLYNw.js.map +1 -0
  153. package/dist/_chunks/{search-bar-DQJS0wJN.js → search-bar-mA4bPe3t.js} +294 -255
  154. package/dist/_chunks/search-bar-mA4bPe3t.js.map +1 -0
  155. package/dist/_chunks/{sheet-C7SwIxwB.js → sheet-Dtjk0CVv.js} +3 -3
  156. package/dist/_chunks/{sheet-C7SwIxwB.js.map → sheet-Dtjk0CVv.js.map} +1 -1
  157. package/dist/_chunks/sidebar-D4Wllqfz.js +2029 -0
  158. package/dist/_chunks/sidebar-D4Wllqfz.js.map +1 -0
  159. package/dist/_chunks/{sign-document-B6HlyCGV.js → sign-document-D4iHS_Ug.js} +2 -2
  160. package/dist/_chunks/{sign-document-B6HlyCGV.js.map → sign-document-D4iHS_Ug.js.map} +1 -1
  161. package/dist/_chunks/{signature-request-DhbpB9N9.js → signature-request-dAVgE0_5.js} +3 -3
  162. package/dist/_chunks/{signature-request-DhbpB9N9.js.map → signature-request-dAVgE0_5.js.map} +1 -1
  163. package/dist/_chunks/{signed-out-frame-B2GTIeqA.js → signed-out-frame-DOJpobp8.js} +3 -3
  164. package/dist/_chunks/{signed-out-frame-B2GTIeqA.js.map → signed-out-frame-DOJpobp8.js.map} +1 -1
  165. package/dist/_chunks/{state-backed-text-input-DECQy5aA.js → state-backed-text-input-Cgh4ms3p.js} +2 -2
  166. package/dist/_chunks/{state-backed-text-input-DECQy5aA.js.map → state-backed-text-input-Cgh4ms3p.js.map} +1 -1
  167. package/dist/_chunks/{task-editor-ByyRu29Y.js → task-editor-BflEZmcF.js} +7 -6
  168. package/dist/_chunks/task-editor-BflEZmcF.js.map +1 -0
  169. package/dist/_chunks/{tool-rail-Bwyuw_Ot.js → tool-rail-CTq1KwxW.js} +115 -114
  170. package/dist/_chunks/{tool-rail-Bwyuw_Ot.js.map → tool-rail-CTq1KwxW.js.map} +1 -1
  171. package/dist/_chunks/{use-appointment-details-read-JsDM48tf.js → use-appointment-details-read-izwoXh-G.js} +8 -8
  172. package/dist/_chunks/{use-appointment-details-read-JsDM48tf.js.map → use-appointment-details-read-izwoXh-G.js.map} +1 -1
  173. package/dist/_chunks/use-state-backed-input-DhRQo6gM.js +57 -0
  174. package/dist/_chunks/use-state-backed-input-DhRQo6gM.js.map +1 -0
  175. package/dist/_chunks/{voice-control-panel-Bg1eklL0.js → voice-control-panel-an-bpQfF.js} +3 -3
  176. package/dist/_chunks/{voice-control-panel-Bg1eklL0.js.map → voice-control-panel-an-bpQfF.js.map} +1 -1
  177. package/dist/_chunks/{widget-picker-DXYBMTfe.js → widget-picker-DlJOgYrZ.js} +80 -57
  178. package/dist/_chunks/widget-picker-DlJOgYrZ.js.map +1 -0
  179. package/dist/agent-catalog.json +3 -3
  180. package/dist/agent-i18n/en.json +1 -1
  181. package/dist/components/_shared/navigation-dismiss.d.ts +8 -0
  182. package/dist/components/_shared/navigation-dismiss.d.ts.map +1 -0
  183. package/dist/components/_shared/non-modal-tab-exit.d.ts +15 -4
  184. package/dist/components/_shared/non-modal-tab-exit.d.ts.map +1 -1
  185. package/dist/components/_shared/use-state-backed-input.d.ts +3 -2
  186. package/dist/components/_shared/use-state-backed-input.d.ts.map +1 -1
  187. package/dist/components/address-fields/index.js +1 -1
  188. package/dist/components/ai-credits-notice/index.js +1 -1
  189. package/dist/components/ai-permission-notice/ai-permission-notice.d.ts +32 -0
  190. package/dist/components/ai-permission-notice/ai-permission-notice.d.ts.map +1 -1
  191. package/dist/components/ai-permission-notice/index.d.ts +1 -1
  192. package/dist/components/ai-permission-notice/index.d.ts.map +1 -1
  193. package/dist/components/ai-permission-notice/index.js +1 -1
  194. package/dist/components/app-frame/index.js +1 -1
  195. package/dist/components/appointment-details-panel/index.js +1 -1
  196. package/dist/components/appointment-peek/index.js +1 -1
  197. package/dist/components/appointment-timeline/index.js +1 -1
  198. package/dist/components/booking/index.js +1 -1
  199. package/dist/components/calculator-dialog/index.js +1 -1
  200. package/dist/components/care-plan-card/index.js +1 -1
  201. package/dist/components/care-plan-header/index.js +1 -1
  202. package/dist/components/chart/chart.d.ts +5 -5
  203. package/dist/components/chart/chart.d.ts.map +1 -1
  204. package/dist/components/chart/index.js +1 -1
  205. package/dist/components/city-input/index.js +1 -1
  206. package/dist/components/clinical-note-card/index.js +1 -1
  207. package/dist/components/color-picker/color-picker.d.ts.map +1 -1
  208. package/dist/components/color-picker/index.js +1 -1
  209. package/dist/components/contact-card/index.js +1 -1
  210. package/dist/components/contact-profile-card/index.js +1 -1
  211. package/dist/components/control-room-rail/index.js +1 -1
  212. package/dist/components/cycle-calculator/index.js +1 -1
  213. package/dist/components/dashboard-grid/dashboard-grid.d.ts +33 -8
  214. package/dist/components/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  215. package/dist/components/dashboard-grid/index.js +1 -1
  216. package/dist/components/data-table/index.js +2 -2
  217. package/dist/components/data-table-tabs/index.js +1 -1
  218. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  219. package/dist/components/date-picker/index.js +1 -1
  220. package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
  221. package/dist/components/date-range-picker/index.js +1 -1
  222. package/dist/components/date-time-picker/date-time-picker.d.ts.map +1 -1
  223. package/dist/components/date-time-picker/index.js +1 -1
  224. package/dist/components/dialog/index.js +1 -1
  225. package/dist/components/document-preview/index.js +1 -1
  226. package/dist/components/due-date-calculator/index.js +1 -1
  227. package/dist/components/entity-summary/index.js +1 -1
  228. package/dist/components/face-scheme/index.js +1 -1
  229. package/dist/components/file-manager/index.js +1 -1
  230. package/dist/components/gestational-age-calculator/index.js +1 -1
  231. package/dist/components/hcg-doubling/index.js +1 -1
  232. package/dist/components/header-settings/index.js +1 -1
  233. package/dist/components/heatmap/index.js +1 -1
  234. package/dist/components/hover-card/hover-card.d.ts.map +1 -1
  235. package/dist/components/hover-card/index.js +1 -1
  236. package/dist/components/icon-picker/index.js +1 -1
  237. package/dist/components/info-tip/index.js +1 -1
  238. package/dist/components/link/index.js +1 -1
  239. package/dist/components/link/link.d.ts +5 -3
  240. package/dist/components/link/link.d.ts.map +1 -1
  241. package/dist/components/list/index.js +1 -1
  242. package/dist/components/list/list.d.ts.map +1 -1
  243. package/dist/components/locale-picker/index.js +1 -1
  244. package/dist/components/message-tray/index.js +1 -1
  245. package/dist/components/message-tray/message-tray.d.ts.map +1 -1
  246. package/dist/components/nav-grid/index.js +1 -1
  247. package/dist/components/note-timeline/index.js +1 -1
  248. package/dist/components/notes-panel/index.js +1 -1
  249. package/dist/components/notification-tray/index.js +1 -1
  250. package/dist/components/notification-tray/notification-tray.d.ts.map +1 -1
  251. package/dist/components/panel-subview/index.js +1 -1
  252. package/dist/components/panel-subview/panel-subview.d.ts.map +1 -1
  253. package/dist/components/patient-details/index.js +1 -1
  254. package/dist/components/patient-summary-card/index.js +1 -1
  255. package/dist/components/patient-table/index.js +1 -1
  256. package/dist/components/payment-card/index.js +1 -1
  257. package/dist/components/pdf-viewer/index.js +1 -1
  258. package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
  259. package/dist/components/phone-input/index.js +1 -1
  260. package/dist/components/phone-input/phone-input.d.ts.map +1 -1
  261. package/dist/components/popover/index.js +1 -1
  262. package/dist/components/popover/popover.d.ts +1 -1
  263. package/dist/components/popover/popover.d.ts.map +1 -1
  264. package/dist/components/practice-results/index.js +1 -1
  265. package/dist/components/pregnancy-dating/index.js +1 -1
  266. package/dist/components/product-hub-tray/index.js +1 -1
  267. package/dist/components/product-hub-tray/product-hub-tray.d.ts.map +1 -1
  268. package/dist/components/public-footer/index.js +1 -1
  269. package/dist/components/public-header/index.js +1 -1
  270. package/dist/components/radiograph-panel/index.js +1 -1
  271. package/dist/components/rich-text-editor/editor-toolbar.d.ts.map +1 -1
  272. package/dist/components/rich-text-editor/index.js +2 -2
  273. package/dist/components/scroll-area/index.js +1 -1
  274. package/dist/components/scroll-area/scroll-area.d.ts +6 -5
  275. package/dist/components/scroll-area/scroll-area.d.ts.map +1 -1
  276. package/dist/components/search-bar/index.js +1 -1
  277. package/dist/components/search-bar/search-bar.d.ts +1 -1
  278. package/dist/components/search-bar/search-bar.d.ts.map +1 -1
  279. package/dist/components/sheet/index.js +1 -1
  280. package/dist/components/sidebar/index.d.ts +1 -1
  281. package/dist/components/sidebar/index.d.ts.map +1 -1
  282. package/dist/components/sidebar/index.js +1 -1
  283. package/dist/components/sidebar/sidebar-move.d.ts +88 -0
  284. package/dist/components/sidebar/sidebar-move.d.ts.map +1 -0
  285. package/dist/components/sidebar/sidebar.d.ts +26 -1
  286. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  287. package/dist/components/sign-document/index.js +1 -1
  288. package/dist/components/task-editor/index.js +1 -1
  289. package/dist/components/task-editor/task-editor.d.ts.map +1 -1
  290. package/dist/components/tool-rail/index.js +1 -1
  291. package/dist/components/tool-rail/tool-rail.d.ts.map +1 -1
  292. package/dist/components/voice-control-panel/index.js +1 -1
  293. package/dist/components/widget-picker/index.js +1 -1
  294. package/dist/components/widget-picker/widget-picker.d.ts.map +1 -1
  295. package/dist/host-compat.css +2 -1
  296. package/dist/i18n/locales/ar.d.ts +24 -0
  297. package/dist/i18n/locales/ar.d.ts.map +1 -1
  298. package/dist/i18n/locales/ar.js +26 -2
  299. package/dist/i18n/locales/ar.js.map +1 -1
  300. package/dist/i18n/locales/de.d.ts +24 -0
  301. package/dist/i18n/locales/de.d.ts.map +1 -1
  302. package/dist/i18n/locales/de.js +26 -2
  303. package/dist/i18n/locales/de.js.map +1 -1
  304. package/dist/i18n/locales/el.d.ts +24 -0
  305. package/dist/i18n/locales/el.d.ts.map +1 -1
  306. package/dist/i18n/locales/el.js +26 -2
  307. package/dist/i18n/locales/el.js.map +1 -1
  308. package/dist/i18n/locales/en.d.ts +24 -0
  309. package/dist/i18n/locales/en.d.ts.map +1 -1
  310. package/dist/i18n/locales/en.js +26 -2
  311. package/dist/i18n/locales/en.js.map +1 -1
  312. package/dist/i18n/locales/es.d.ts +24 -0
  313. package/dist/i18n/locales/es.d.ts.map +1 -1
  314. package/dist/i18n/locales/es.js +26 -2
  315. package/dist/i18n/locales/es.js.map +1 -1
  316. package/dist/i18n/locales/fr.d.ts +24 -0
  317. package/dist/i18n/locales/fr.d.ts.map +1 -1
  318. package/dist/i18n/locales/fr.js +26 -2
  319. package/dist/i18n/locales/fr.js.map +1 -1
  320. package/dist/i18n/locales/hi.d.ts +24 -0
  321. package/dist/i18n/locales/hi.d.ts.map +1 -1
  322. package/dist/i18n/locales/hi.js +26 -2
  323. package/dist/i18n/locales/hi.js.map +1 -1
  324. package/dist/i18n/locales/it.d.ts +24 -0
  325. package/dist/i18n/locales/it.d.ts.map +1 -1
  326. package/dist/i18n/locales/it.js +26 -2
  327. package/dist/i18n/locales/it.js.map +1 -1
  328. package/dist/i18n/locales/ja.d.ts +24 -0
  329. package/dist/i18n/locales/ja.d.ts.map +1 -1
  330. package/dist/i18n/locales/ja.js +26 -2
  331. package/dist/i18n/locales/ja.js.map +1 -1
  332. package/dist/i18n/locales/nl.d.ts +24 -0
  333. package/dist/i18n/locales/nl.d.ts.map +1 -1
  334. package/dist/i18n/locales/nl.js +26 -2
  335. package/dist/i18n/locales/nl.js.map +1 -1
  336. package/dist/i18n/locales/pl.d.ts +24 -0
  337. package/dist/i18n/locales/pl.d.ts.map +1 -1
  338. package/dist/i18n/locales/pl.js +26 -2
  339. package/dist/i18n/locales/pl.js.map +1 -1
  340. package/dist/i18n/locales/pt.d.ts +24 -0
  341. package/dist/i18n/locales/pt.d.ts.map +1 -1
  342. package/dist/i18n/locales/pt.js +26 -2
  343. package/dist/i18n/locales/pt.js.map +1 -1
  344. package/dist/i18n/locales/ro.d.ts +24 -0
  345. package/dist/i18n/locales/ro.d.ts.map +1 -1
  346. package/dist/i18n/locales/ro.js +26 -2
  347. package/dist/i18n/locales/ro.js.map +1 -1
  348. package/dist/i18n/locales/ru.d.ts +24 -0
  349. package/dist/i18n/locales/ru.d.ts.map +1 -1
  350. package/dist/i18n/locales/ru.js +26 -2
  351. package/dist/i18n/locales/ru.js.map +1 -1
  352. package/dist/i18n/locales/sq.d.ts +24 -0
  353. package/dist/i18n/locales/sq.d.ts.map +1 -1
  354. package/dist/i18n/locales/sq.js +26 -2
  355. package/dist/i18n/locales/sq.js.map +1 -1
  356. package/dist/i18n/locales/sv.d.ts +24 -0
  357. package/dist/i18n/locales/sv.d.ts.map +1 -1
  358. package/dist/i18n/locales/sv.js +26 -2
  359. package/dist/i18n/locales/sv.js.map +1 -1
  360. package/dist/i18n/locales/tr.d.ts +24 -0
  361. package/dist/i18n/locales/tr.d.ts.map +1 -1
  362. package/dist/i18n/locales/tr.js +26 -2
  363. package/dist/i18n/locales/tr.js.map +1 -1
  364. package/dist/i18n/locales/zh.d.ts +24 -0
  365. package/dist/i18n/locales/zh.d.ts.map +1 -1
  366. package/dist/i18n/locales/zh.js +26 -2
  367. package/dist/i18n/locales/zh.js.map +1 -1
  368. package/dist/index.js +204 -203
  369. package/dist/locales/ar.json +26 -2
  370. package/dist/locales/de.json +26 -2
  371. package/dist/locales/el.json +26 -2
  372. package/dist/locales/en.json +26 -2
  373. package/dist/locales/es.json +26 -2
  374. package/dist/locales/fr.json +26 -2
  375. package/dist/locales/hi.json +26 -2
  376. package/dist/locales/it.json +26 -2
  377. package/dist/locales/ja.json +26 -2
  378. package/dist/locales/nl.json +26 -2
  379. package/dist/locales/pl.json +26 -2
  380. package/dist/locales/pt.json +26 -2
  381. package/dist/locales/ro.json +26 -2
  382. package/dist/locales/ru.json +26 -2
  383. package/dist/locales/sq.json +26 -2
  384. package/dist/locales/sv.json +26 -2
  385. package/dist/locales/tr.json +26 -2
  386. package/dist/locales/zh.json +26 -2
  387. package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts +10 -13
  388. package/dist/patterns/alia-assistant/alia-asteroid-icon.d.ts.map +1 -1
  389. package/dist/patterns/alia-assistant/alia-chat-surface.d.ts.map +1 -1
  390. package/dist/patterns/alia-assistant/alia-popout.d.ts +5 -3
  391. package/dist/patterns/alia-assistant/alia-popout.d.ts.map +1 -1
  392. package/dist/patterns/alia-assistant/index.d.ts +2 -0
  393. package/dist/patterns/alia-assistant/index.d.ts.map +1 -1
  394. package/dist/patterns/alia-assistant/index.js +6 -5
  395. package/dist/patterns/anamnesis/index.js +1 -1
  396. package/dist/patterns/calendar/index.js +1 -1
  397. package/dist/patterns/forgot-password-form/index.js +1 -1
  398. package/dist/patterns/help-me-write-templates/index.js +1 -1
  399. package/dist/patterns/login-form/index.js +1 -1
  400. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  401. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +40 -10
  402. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
  403. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  404. package/dist/patterns/registration-form/index.js +1 -1
  405. package/dist/patterns/signature-request/index.js +1 -1
  406. package/dist/patterns/signed-out-frame/index.js +1 -1
  407. package/dist/tokens.css +1 -1
  408. package/package.json +1 -1
  409. package/dist/_chunks/ai-permission-notice-5vpblPCx.js +0 -171
  410. package/dist/_chunks/ai-permission-notice-5vpblPCx.js.map +0 -1
  411. package/dist/_chunks/alia-sidebar-DOei4Iyu.js +0 -1183
  412. package/dist/_chunks/alia-sidebar-DOei4Iyu.js.map +0 -1
  413. package/dist/_chunks/calendar-workspace-Du2ryaI-.js.map +0 -1
  414. package/dist/_chunks/chart-HsF1KHbx.js.map +0 -1
  415. package/dist/_chunks/color-picker-BRQ4Y9SO.js.map +0 -1
  416. package/dist/_chunks/dashboard-grid-DfEY2qci.js +0 -844
  417. package/dist/_chunks/dashboard-grid-DfEY2qci.js.map +0 -1
  418. package/dist/_chunks/date-picker-wRAcq2lt.js.map +0 -1
  419. package/dist/_chunks/date-range-picker-CtUOI38x.js.map +0 -1
  420. package/dist/_chunks/date-time-picker-CLeLKuv9.js.map +0 -1
  421. package/dist/_chunks/hover-card-BnTueNS2.js.map +0 -1
  422. package/dist/_chunks/link-2HokYuIi.js +0 -130
  423. package/dist/_chunks/link-2HokYuIi.js.map +0 -1
  424. package/dist/_chunks/list-RRN2TJ_7.js.map +0 -1
  425. package/dist/_chunks/marketplace-app-shell-Dcx-JEjg.js +0 -541
  426. package/dist/_chunks/marketplace-app-shell-Dcx-JEjg.js.map +0 -1
  427. package/dist/_chunks/message-tray-BB95DA82.js.map +0 -1
  428. package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js +0 -65
  429. package/dist/_chunks/non-modal-tab-exit-D2Bd93Bq.js.map +0 -1
  430. package/dist/_chunks/notification-tray-__sJXnsz.js.map +0 -1
  431. package/dist/_chunks/panel-subview-BT-Apwgb.js.map +0 -1
  432. package/dist/_chunks/pdf-viewer-C3minW5b.js.map +0 -1
  433. package/dist/_chunks/phone-input-DxkHMYmu.js.map +0 -1
  434. package/dist/_chunks/popover-BI3oV3eY.js +0 -305
  435. package/dist/_chunks/popover-BI3oV3eY.js.map +0 -1
  436. package/dist/_chunks/product-hub-panel-BSSiGGG4.js.map +0 -1
  437. package/dist/_chunks/rich-text-editor-CkFfmA3v.js.map +0 -1
  438. package/dist/_chunks/scroll-area-ZtFCv9K7.js.map +0 -1
  439. package/dist/_chunks/search-bar-DQJS0wJN.js.map +0 -1
  440. package/dist/_chunks/sidebar-DLsG2AIk.js +0 -1349
  441. package/dist/_chunks/sidebar-DLsG2AIk.js.map +0 -1
  442. package/dist/_chunks/task-editor-ByyRu29Y.js.map +0 -1
  443. package/dist/_chunks/use-state-backed-input-C7ESmxKB.js +0 -59
  444. package/dist/_chunks/use-state-backed-input-C7ESmxKB.js.map +0 -1
  445. package/dist/_chunks/widget-picker-DXYBMTfe.js.map +0 -1
@@ -0,0 +1,933 @@
1
+ import { jsxs as Z, jsx as G } from "react/jsx-runtime";
2
+ import { forwardRef as Be, useRef as x, useState as L, useCallback as C, useMemo as j, useEffect as X, useImperativeHandle as Je, useContext as Qe, Children as Ze, isValidElement as et, Fragment as tt, createContext as rt, cloneElement as Le } from "react";
3
+ import { c as ce } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as We } from "react-i18next";
5
+ import { I as ge } from "./icon-button-COX76Jdj.js";
6
+ import { T as nt } from "./tooltip-Cp-PLePW.js";
7
+ import { u as _ } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
+ import { u as st } from "./registry-DvAUVLHh.js";
9
+ import { P as it } from "./plus-DzMQ_c6b.js";
10
+ import { G as ot } from "./grip-vertical-onSb1JXO.js";
11
+ import { X as dt } from "./x-B5YnXwCz.js";
12
+ import { c as at } from "./createLucideIcon-DhHxpK9K.js";
13
+ /**
14
+ * @license lucide-react v1.22.0 - ISC
15
+ *
16
+ * This source code is licensed under the ISC license.
17
+ * See the LICENSE file in the root directory of this source tree.
18
+ */
19
+ const ct = [
20
+ ["path", { d: "M19 13v6h-6", key: "1hxl6d" }],
21
+ ["path", { d: "M5 11V5h6", key: "12e2xe" }],
22
+ ["path", { d: "m5 5 14 14", key: "11anup" }]
23
+ ], ut = at("move-diagonal-2", ct), lt = {
24
+ id: "dashboard-grid",
25
+ // The board's whole purpose is in-place rearrangement of its widgets.
26
+ capabilities: ["edit_inline"],
27
+ state: {
28
+ layout: {
29
+ type: "{ id: string, x: number, y: number, w: number, h: number }[]",
30
+ descriptionKey: "ui.agent.dashboardGrid.state.layout",
31
+ description: "Current widget geometry in cell units — ids and rectangles only, no widget content.",
32
+ read: (r) => r.getGridState().layout
33
+ },
34
+ cols: {
35
+ type: "number",
36
+ descriptionKey: "ui.agent.dashboardGrid.state.cols",
37
+ description: "Logical column count of the board.",
38
+ read: (r) => r.getGridState().cols
39
+ },
40
+ editing: {
41
+ type: "boolean",
42
+ descriptionKey: "ui.agent.dashboardGrid.state.editing",
43
+ description: "Whether edit mode is on. Move/resize actions are refused while it is off — the host app owns the toggle.",
44
+ read: (r) => r.getGridState().editing
45
+ },
46
+ stacked: {
47
+ type: "boolean",
48
+ descriptionKey: "ui.agent.dashboardGrid.state.stacked",
49
+ description: "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.",
50
+ read: (r) => r.getGridState().stacked
51
+ }
52
+ },
53
+ actions: {
54
+ move_widget: {
55
+ // Rearranging the board mutates user configuration — a write,
56
+ // reversible by moving back.
57
+ safety: "write",
58
+ argsType: "id, x, y",
59
+ argsSchema: {
60
+ type: "object",
61
+ properties: {
62
+ id: { type: "string", description: "Widget id (see layout state)." },
63
+ x: {
64
+ type: "integer",
65
+ minimum: 0,
66
+ description: "0-based logical column."
67
+ },
68
+ y: { type: "integer", minimum: 0, description: "0-based row." }
69
+ },
70
+ required: ["id", "x", "y"]
71
+ },
72
+ returns: "boolean (accepted)",
73
+ returnsSchema: {
74
+ type: "boolean",
75
+ description: "True when applied; false when edit mode is off, the board is stacked, or the id is unknown."
76
+ },
77
+ idempotent: !0,
78
+ errors: [
79
+ "Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.",
80
+ "Unavailable while edit mode is off: returns false.",
81
+ "Unknown widget id: returns false."
82
+ ],
83
+ descriptionKey: "ui.agent.dashboardGrid.actions.moveWidget",
84
+ description: "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.",
85
+ invoke: (r, o) => r.moveWidgetTo(o.id, o.x, o.y)
86
+ },
87
+ resize_widget: {
88
+ safety: "write",
89
+ argsType: "id, w, h",
90
+ argsSchema: {
91
+ type: "object",
92
+ properties: {
93
+ id: { type: "string", description: "Widget id (see layout state)." },
94
+ w: {
95
+ type: "integer",
96
+ minimum: 1,
97
+ description: "Column span (≥ 1)."
98
+ },
99
+ h: { type: "integer", minimum: 1, description: "Row span (≥ 1)." }
100
+ },
101
+ required: ["id", "w", "h"]
102
+ },
103
+ returns: "boolean (accepted)",
104
+ returnsSchema: {
105
+ type: "boolean",
106
+ description: "True when applied; false when edit mode is off, the board is stacked, or the id is unknown."
107
+ },
108
+ idempotent: !0,
109
+ errors: [
110
+ "Unavailable while the board is stacked (state stacked is true): returns false and changes nothing.",
111
+ "Unavailable while edit mode is off: returns false.",
112
+ "Unknown widget id: returns false."
113
+ ],
114
+ descriptionKey: "ui.agent.dashboardGrid.actions.resizeWidget",
115
+ description: "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.",
116
+ invoke: (r, o) => r.resizeWidgetTo(o.id, o.w, o.h)
117
+ }
118
+ },
119
+ domHooks: {
120
+ root: {
121
+ attr: "data-component",
122
+ value: "dashboard-grid",
123
+ description: 'Also carries data-stacked="true" while the board shows one read-only column.'
124
+ },
125
+ instanceId: {
126
+ attr: "data-component-id",
127
+ sourceProp: "id",
128
+ description: "Sourced from the id prop."
129
+ },
130
+ item: {
131
+ attr: "data-widget-id",
132
+ description: "Each widget wrapper carries its layout id."
133
+ }
134
+ }
135
+ };
136
+ function q(r, o) {
137
+ return r.x < o.x + o.w && o.x < r.x + r.w && r.y < o.y + o.h && o.y < r.y + r.h;
138
+ }
139
+ function ue(r, o) {
140
+ const s = Math.max(1, r.minW ?? 1), u = Math.max(1, r.minH ?? 1), l = Math.min(o, r.maxW ?? o), b = r.maxH ?? Number.POSITIVE_INFINITY, a = Math.min(Math.max(r.w, s), l), h = Math.min(Math.max(r.h, u), b), i = Math.min(Math.max(0, r.x), o - a), m = Math.max(0, r.y);
141
+ return { ...r, x: i, y: m, w: a, h };
142
+ }
143
+ function H(r, o, s) {
144
+ const u = r.map((i) => ue(i, o)), l = [...u].sort((i, m) => i.id === s ? -1 : m.id === s ? 1 : i.y - m.y || i.x - m.x), b = [], a = s ? u.find((i) => i.id === s) : void 0;
145
+ for (const i of l) {
146
+ if (i.id !== s) {
147
+ if (a && q(a, i)) {
148
+ const m = { ...i, y: Math.max(0, a.y - i.h) };
149
+ !q(a, m) && !b.some((M) => M.id !== s && q(M, m)) && (i.y = m.y);
150
+ }
151
+ for (; b.some((m) => q(m, i)); )
152
+ i.y += 1;
153
+ for (; i.y > 0; ) {
154
+ const m = { ...i, y: i.y - 1 };
155
+ if (b.some((M) => q(M, m))) break;
156
+ i.y -= 1;
157
+ }
158
+ }
159
+ b.push(i);
160
+ }
161
+ const h = new Map(b.map((i) => [i.id, i]));
162
+ return r.map((i) => h.get(i.id));
163
+ }
164
+ function be(r, o, s, u, l) {
165
+ const b = r.map(
166
+ (a) => a.id === o ? ue({ ...a, x: s, y: u }, l) : a
167
+ );
168
+ return H(b, l, o);
169
+ }
170
+ function he(r, o, s, u, l) {
171
+ const b = r.map(
172
+ (a) => a.id === o ? (
173
+ // Resizing never moves the widget: the width clamps to the space
174
+ // between its position and the grid edge (clampRect would slide it).
175
+ // minW wins over the edge clamp so clampRect cannot re-raise w and
176
+ // slide x as a side effect.
177
+ ue(
178
+ {
179
+ ...a,
180
+ w: Math.max(a.minW ?? 1, Math.min(s, l - a.x)),
181
+ h: u
182
+ },
183
+ l
184
+ )
185
+ ) : a
186
+ );
187
+ return H(b, l, o);
188
+ }
189
+ function $e(r, o, s, u) {
190
+ const l = Math.min(Math.max(1, s), o), b = r.reduce((a, h) => Math.max(a, h.y + h.h), 0);
191
+ for (let a = 0; a <= b; a += 1)
192
+ for (let h = 0; h <= o - l; h += 1) {
193
+ const i = {
194
+ x: h,
195
+ y: a,
196
+ w: l,
197
+ h: u
198
+ };
199
+ if (!r.some((m) => q(m, i)))
200
+ return { x: h, y: a };
201
+ }
202
+ return { x: 0, y: b };
203
+ }
204
+ function ft(r) {
205
+ return r.reduce((o, s) => Math.max(o, s.y + s.h), 0);
206
+ }
207
+ const pt = 24;
208
+ function Ae(r, o, s) {
209
+ return o === void 0 || !Number.isFinite(o) || o <= 0 ? !1 : !Number.isFinite(r) || r <= 0 ? s : s ? r < o + pt : r < o;
210
+ }
211
+ function mt(r, o) {
212
+ const s = new Map(o.map((u) => [u.id, u]));
213
+ return r.map((u, l) => ({ id: u, index: l, entry: s.get(u) })).sort((u, l) => !u.entry || !l.entry ? u.entry ? -1 : l.entry ? 1 : u.index - l.index : u.entry.y - l.entry.y || u.entry.x - l.entry.x || u.index - l.index).map(({ id: u }) => u);
214
+ }
215
+ const gt = ce(
216
+ [
217
+ "ds:grid ds:w-full",
218
+ "ds:gap-[var(--spacing-md)]",
219
+ // Edit-mode surface: tint the whole plane, draw faint cell lines, and
220
+ // reserve spare rows (--dg-min-block) so the AVAILABLE space reads at
221
+ // a glance instead of the board ending at the last occupied row.
222
+ "ds:data-[editing=true]:rounded-[var(--radius-lg)] ds:data-[editing=true]:bg-muted/10",
223
+ "ds:data-[editing=true]:[background-image:var(--dg-grid-lines)]",
224
+ "ds:data-[editing=true]:min-h-[var(--dg-min-block)]"
225
+ ].join(" "),
226
+ {
227
+ variants: {
228
+ // Stacked: one full-width column; each row takes its widget's block
229
+ // size. Focus can fall back to the board here (see the focus effect),
230
+ // so it gets the kit's focus ring.
231
+ stacked: {
232
+ false: [
233
+ "ds:[grid-template-columns:repeat(var(--dg-cols),minmax(0,1fr))]",
234
+ "ds:[grid-auto-rows:var(--dg-row)]"
235
+ ].join(" "),
236
+ true: [
237
+ "ds:grid-cols-1 ds:auto-rows-auto",
238
+ "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)]"
239
+ ].join(" ")
240
+ }
241
+ },
242
+ defaultVariants: { stacked: !1 }
243
+ }
244
+ ), bt = ce(
245
+ [
246
+ "ds:relative ds:min-h-0 ds:min-w-0 ds:overflow-hidden",
247
+ // Mirror of Card variant="elevated" so widgets read as kit cards.
248
+ "ds:rounded-[var(--radius-lg)] ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
249
+ "ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))] ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)]",
250
+ // Grabbed feedback (keyboard or pointer drag in flight).
251
+ "ds:data-[grabbed=true]:ring-[length:var(--focus-ring-width)] ds:data-[grabbed=true]:ring-ring ds:data-[grabbed=true]:z-10",
252
+ // Only reachable when stacking removes the focused edit control: the
253
+ // widget then takes focus itself (tabindex -1, set at that moment).
254
+ "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)]"
255
+ ].join(" "),
256
+ {
257
+ variants: {
258
+ stacked: {
259
+ false: [
260
+ "ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
261
+ "ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
262
+ ].join(" "),
263
+ true: "ds:col-span-full ds:row-auto"
264
+ },
265
+ stackedHeight: { grid: "", content: "" }
266
+ },
267
+ compoundVariants: [
268
+ { stacked: !1, class: "ds:flex ds:flex-col" },
269
+ // At least the block size the widget has in the grid (h rows plus the
270
+ // h - 1 gaps). A minimum, not a fixed size: at 200% zoom the widget
271
+ // grows instead of clipping its content (WCAG 1.4.4, 1.4.10).
272
+ {
273
+ stacked: !0,
274
+ stackedHeight: "grid",
275
+ class: [
276
+ "ds:flex ds:flex-col",
277
+ "ds:[min-block-size:calc(var(--dg-h)*var(--dg-row)_+_(var(--dg-h)_-_1)*var(--spacing-md))]"
278
+ ].join(" ")
279
+ },
280
+ // As tall as the content, or minStackedHeight. A grid, not a flex
281
+ // column, so the body row is a definite box a 100% chart can fill.
282
+ {
283
+ stacked: !0,
284
+ stackedHeight: "content",
285
+ class: [
286
+ "ds:grid ds:grid-cols-[minmax(0,1fr)] ds:grid-rows-[auto_1fr]",
287
+ "ds:[min-block-size:var(--dg-min-stacked)]"
288
+ ].join(" ")
289
+ }
290
+ ],
291
+ defaultVariants: { stacked: !1, stackedHeight: "grid" }
292
+ }
293
+ ), ht = ce(
294
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)] ds:pt-[var(--spacing-xs)]",
295
+ {
296
+ variants: {
297
+ // `box`: fill the widget's block size and clip to it. `content`: take
298
+ // the content's own height (the content-height stack), never a box.
299
+ fit: {
300
+ box: "ds:min-h-0 ds:flex-1 ds:overflow-hidden",
301
+ content: "ds:min-w-0"
302
+ }
303
+ },
304
+ defaultVariants: { fit: "box" }
305
+ }
306
+ ), yt = ce(
307
+ [
308
+ "ds:m-0 ds:min-w-0 ds:flex-1 ds:truncate ds:text-sm ds:font-medium",
309
+ "ds:rounded-[var(--radius-sm)]",
310
+ "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)]"
311
+ ].join(" ")
312
+ ), Fe = rt(
313
+ null
314
+ );
315
+ function ae(r, o) {
316
+ Ze.forEach(r, (s) => {
317
+ if (et(s)) {
318
+ if (s.type === tt) {
319
+ ae(
320
+ s.props.children,
321
+ o
322
+ );
323
+ return;
324
+ }
325
+ o(s);
326
+ }
327
+ });
328
+ }
329
+ function je({
330
+ id: r,
331
+ title: o,
332
+ minStackedHeight: s,
333
+ actionsSlot: u,
334
+ children: l
335
+ }) {
336
+ var g, ne, P;
337
+ const { t: b } = We("ui"), a = Qe(Fe), h = x(null), i = a == null ? void 0 : a.layoutById.get(r), [m, M] = L(null), [$, ee] = L(!1), [te, E] = L(!1), [le, re] = L(!1);
338
+ if (X(() => {
339
+ if (!m) return;
340
+ const p = () => ee(m.scrollWidth > m.clientWidth);
341
+ p();
342
+ const N = typeof document < "u" ? document.fonts : void 0;
343
+ N == null || N.addEventListener("loadingdone", p);
344
+ const v = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(p);
345
+ return v == null || v.observe(m), () => {
346
+ N == null || N.removeEventListener("loadingdone", p), v == null || v.disconnect();
347
+ };
348
+ }, [m, o]), X(() => {
349
+ $ || re(!1);
350
+ }, [$]), _(() => {
351
+ const p = h.current;
352
+ !p || !i || (p.style.setProperty("--dg-x", String(i.x + 1)), p.style.setProperty("--dg-y", String(i.y + 1)), p.style.setProperty("--dg-w", String(i.w)), p.style.setProperty("--dg-h", String(i.h)), p.style.setProperty(
353
+ "--dg-min-stacked",
354
+ s !== void 0 && Number.isFinite(s) && s > 0 ? `${s}px` : "auto"
355
+ ));
356
+ }, [i == null ? void 0 : i.x, i == null ? void 0 : i.y, i == null ? void 0 : i.w, i == null ? void 0 : i.h, i, s]), !a || !i) return null;
357
+ const y = ((g = a.grab) == null ? void 0 : g.id) === r, A = a.editing, R = a.headingLevel ? `h${a.headingLevel}` : "span";
358
+ return /* @__PURE__ */ Z(
359
+ "div",
360
+ {
361
+ ref: h,
362
+ role: "listitem",
363
+ "aria-label": o,
364
+ "data-component": "dashboard-grid-widget",
365
+ "data-widget-id": r,
366
+ "data-grabbed": y || void 0,
367
+ className: bt({
368
+ stacked: a.stacked,
369
+ stackedHeight: a.stackedHeight
370
+ }),
371
+ children: [
372
+ /* @__PURE__ */ Z("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)]", children: [
373
+ A ? /* @__PURE__ */ G(
374
+ ge,
375
+ {
376
+ size: "sm",
377
+ intent: "outline",
378
+ type: "button",
379
+ icon: /* @__PURE__ */ G(ot, {}),
380
+ "aria-label": b("dashboardGrid.move", { title: o }),
381
+ "aria-pressed": y && ((ne = a.grab) == null ? void 0 : ne.kind) === "move",
382
+ className: "ds:cursor-grab ds:touch-none ds:bg-[var(--card)]",
383
+ onPointerDown: (p) => a.startPointerGrab("move", r, p),
384
+ onKeyDown: (p) => a.keyboardStep(p, r),
385
+ onClick: () => a.startKeyboardGrab("move", r)
386
+ }
387
+ ) : null,
388
+ /* @__PURE__ */ G(
389
+ nt,
390
+ {
391
+ label: o,
392
+ open: $ && le,
393
+ onOpenChange: (p) => re(p && $),
394
+ children: /* @__PURE__ */ G(
395
+ R,
396
+ {
397
+ ref: M,
398
+ tabIndex: $ || te ? 0 : void 0,
399
+ onFocus: () => E(!0),
400
+ onBlur: () => E(!1),
401
+ className: yt(),
402
+ children: o
403
+ }
404
+ )
405
+ }
406
+ ),
407
+ u,
408
+ A && a.canRemove ? /* @__PURE__ */ G(
409
+ ge,
410
+ {
411
+ size: "sm",
412
+ intent: "outline",
413
+ type: "button",
414
+ icon: /* @__PURE__ */ G(dt, {}),
415
+ className: "ds:bg-[var(--card)]",
416
+ "aria-label": b("dashboardGrid.remove", { title: o }),
417
+ onClick: () => a.requestRemove(r)
418
+ }
419
+ ) : null
420
+ ] }),
421
+ /* @__PURE__ */ G(
422
+ "div",
423
+ {
424
+ className: ht({
425
+ fit: a.stacked && a.stackedHeight === "content" ? "content" : "box"
426
+ }),
427
+ children: l
428
+ }
429
+ ),
430
+ A ? /* @__PURE__ */ G("span", { className: "ds:absolute ds:bottom-[var(--spacing-sm)] ds:end-[var(--spacing-sm)]", children: /* @__PURE__ */ G(
431
+ ge,
432
+ {
433
+ size: "sm",
434
+ intent: "outline",
435
+ type: "button",
436
+ icon: /* @__PURE__ */ G(ut, {}),
437
+ flipIconInRtl: !0,
438
+ "aria-label": b("dashboardGrid.resize", { title: o }),
439
+ "aria-pressed": y && ((P = a.grab) == null ? void 0 : P.kind) === "resize",
440
+ className: "ds:touch-none ds:bg-[var(--card)]",
441
+ onPointerDown: (p) => a.startPointerGrab("resize", r, p),
442
+ onKeyDown: (p) => a.keyboardStep(p, r),
443
+ onClick: () => a.startKeyboardGrab("resize", r)
444
+ }
445
+ ) }) : null
446
+ ]
447
+ }
448
+ );
449
+ }
450
+ je.displayName = "DashboardGrid.Widget";
451
+ const _e = Be(
452
+ ({
453
+ "aria-label": r,
454
+ id: o,
455
+ cols: s = 12,
456
+ rowHeight: u = 96,
457
+ layout: l,
458
+ defaultLayout: b,
459
+ onLayoutChange: a,
460
+ editing: h = !1,
461
+ onRemoveWidget: i,
462
+ onRequestAdd: m,
463
+ stackBelow: M,
464
+ onStackedChange: $,
465
+ stackedHeight: ee = "grid",
466
+ widgetHeadingLevel: te,
467
+ children: E,
468
+ className: le
469
+ }, re) => {
470
+ const { t: y } = We("ui"), A = x(null), R = x(null), [g, ne] = L(!1), P = x(!1);
471
+ P.current = g;
472
+ const p = x(null), N = C((e) => {
473
+ var d;
474
+ if (e === P.current) return;
475
+ const t = A.current, n = typeof document < "u" ? document.activeElement : null;
476
+ p.current = t && n instanceof HTMLElement && t.contains(n) ? {
477
+ element: n,
478
+ widgetId: ((d = n.closest("[data-widget-id]")) == null ? void 0 : d.getAttribute("data-widget-id")) ?? null
479
+ } : null, P.current = e, ne(e);
480
+ }, []);
481
+ _(() => {
482
+ const e = A.current;
483
+ if (!e) return;
484
+ if (M === void 0) {
485
+ N(!1);
486
+ return;
487
+ }
488
+ if (N(
489
+ Ae(e.offsetWidth, M, P.current)
490
+ ), typeof ResizeObserver > "u") return;
491
+ const t = new ResizeObserver((n) => {
492
+ var f, w;
493
+ const d = n[n.length - 1];
494
+ if (!d) return;
495
+ const c = ((w = (f = d.borderBoxSize) == null ? void 0 : f[0]) == null ? void 0 : w.inlineSize) ?? d.contentRect.width;
496
+ N(Ae(c, M, P.current));
497
+ });
498
+ return t.observe(e), () => t.disconnect();
499
+ }, [M, N]);
500
+ const v = h && !g, ye = j(() => {
501
+ const e = [];
502
+ return ae(E, (t) => {
503
+ t.props.id && e.push(t.props.id);
504
+ }), e;
505
+ }, [E]), ve = j(() => {
506
+ const e = /* @__PURE__ */ new Map();
507
+ return ae(E, (t) => {
508
+ t.props.id && e.set(t.props.id, {
509
+ defaultW: t.props.defaultW ?? 4,
510
+ defaultH: t.props.defaultH ?? 2
511
+ });
512
+ }), e;
513
+ }, [E]), [Oe, Ke] = L(() => b ?? []), we = l ?? Oe, I = C(
514
+ (e) => {
515
+ l === void 0 && Ke(e), a == null || a(e);
516
+ },
517
+ [l, a]
518
+ ), { resolved: k, autoPlaced: xe } = j(() => {
519
+ const e = we.map((d) => ue(d, s)), t = ye.filter(
520
+ (d) => !e.some((c) => c.id === d)
521
+ );
522
+ if (t.length === 0)
523
+ return { resolved: e, autoPlaced: !1 };
524
+ const n = [...e];
525
+ for (const d of t) {
526
+ const c = ve.get(d) ?? { defaultW: 4, defaultH: 2 }, f = Math.min(c.defaultW, s), w = $e(n, s, f, c.defaultH);
527
+ n.push({ id: d, x: w.x, y: w.y, w: f, h: c.defaultH });
528
+ }
529
+ return { resolved: H(n, s), autoPlaced: !0 };
530
+ }, [we, ye, ve, s]), ke = x("");
531
+ X(() => {
532
+ if (!xe) return;
533
+ const e = k.map(
534
+ (t) => `${t.id}:${t.x},${t.y},${t.w},${t.h}`
535
+ ).join("|");
536
+ ke.current !== e && (ke.current = e, I(k));
537
+ }, [xe, k, I]);
538
+ const [Ve, He] = L(null), [z, Ge] = L(null), [Ue, O] = L(""), fe = x(null), W = x(null), B = x(null), se = x(!1), J = x(s);
539
+ J.current = s;
540
+ const U = x(k);
541
+ U.current = k;
542
+ const F = C((e) => {
543
+ fe.current = e, He(e);
544
+ }, []), ie = C(
545
+ (e, t, n) => {
546
+ const d = { kind: e, id: t, via: n };
547
+ W.current = { ...d, baseLayout: U.current }, Ge(d), F(U.current);
548
+ },
549
+ [F]
550
+ ), Q = Ve ?? k, Me = j(
551
+ () => new Map(Q.map((e) => [e.id, e])),
552
+ [Q]
553
+ ), Se = C(
554
+ (e, t) => {
555
+ O(
556
+ e === "move" ? y("dashboardGrid.movedTo", { col: t.x + 1, row: t.y + 1 }) : y("dashboardGrid.resizedTo", { cols: t.w, rows: t.h })
557
+ );
558
+ },
559
+ [y]
560
+ ), S = C(
561
+ (e) => {
562
+ const t = fe.current, n = W.current;
563
+ if (W.current = null, B.current = null, Ge(null), F(null), !e || !t || !n) {
564
+ O(y("dashboardGrid.cancelled"));
565
+ return;
566
+ }
567
+ const d = H(t, J.current), c = (w) => w.map((T) => `${T.id}:${T.x},${T.y},${T.w},${T.h}`).join("|");
568
+ if (c(d) === c(U.current)) {
569
+ O(y("dashboardGrid.cancelled"));
570
+ return;
571
+ }
572
+ I(d);
573
+ const f = d.find((w) => w.id === n.id);
574
+ O(
575
+ f ? y("dashboardGrid.droppedAt", {
576
+ col: f.x + 1,
577
+ row: f.y + 1
578
+ }) : y("dashboardGrid.cancelled")
579
+ );
580
+ },
581
+ [F, I, y]
582
+ ), Re = C(
583
+ (e, t) => {
584
+ if (!v) return;
585
+ if (se.current) {
586
+ se.current = !1;
587
+ return;
588
+ }
589
+ const n = W.current;
590
+ if ((n == null ? void 0 : n.via) !== "pointer") {
591
+ if (n && n.id === t && n.kind === e) {
592
+ S(!0);
593
+ return;
594
+ }
595
+ ie(e, t, "keyboard"), O(
596
+ y(e === "move" ? "dashboardGrid.grabbed" : "dashboardGrid.resizeGrabbed")
597
+ );
598
+ }
599
+ },
600
+ [v, ie, S, y]
601
+ ), Ne = C(
602
+ (e, t) => {
603
+ const n = W.current;
604
+ if (!n || n.id !== t || n.via !== "keyboard")
605
+ return;
606
+ if (e.key === "Escape") {
607
+ e.preventDefault(), S(!1);
608
+ return;
609
+ }
610
+ if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(e.key)) return;
611
+ e.preventDefault();
612
+ const c = typeof window < "u" && R.current ? window.getComputedStyle(R.current).direction === "rtl" : !1, f = e.key === "ArrowRight" ? c ? -1 : 1 : e.key === "ArrowLeft" ? c ? 1 : -1 : 0, w = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0, D = (fe.current ?? n.baseLayout).find((Y) => Y.id === t);
613
+ if (!D) return;
614
+ const K = n.kind === "move" ? be(
615
+ n.baseLayout,
616
+ t,
617
+ D.x + f,
618
+ D.y + w,
619
+ s
620
+ ) : he(
621
+ n.baseLayout,
622
+ t,
623
+ D.w + f,
624
+ D.h + w,
625
+ s
626
+ );
627
+ F(K);
628
+ const V = K.find((Y) => Y.id === t);
629
+ V && Se(n.kind, V);
630
+ },
631
+ [s, S, F, Se]
632
+ ), Te = C(
633
+ (e, t, n) => {
634
+ var V, Y, Ce, Ie;
635
+ if (!v || W.current) return;
636
+ const d = R.current, c = U.current.find((Xe) => Xe.id === t);
637
+ if (!d || !c) return;
638
+ n.preventDefault(), (Y = (V = n.currentTarget).focus) == null || Y.call(V);
639
+ const f = d.getBoundingClientRect();
640
+ if (f.width <= 0) return;
641
+ const w = window.getComputedStyle(d), T = Number.parseFloat(w.columnGap) || 0, D = Number.parseFloat(w.rowGap) || 0, K = (f.width - T * (s - 1)) / s;
642
+ B.current = {
643
+ kind: e,
644
+ id: t,
645
+ pointerId: n.pointerId,
646
+ startClientX: n.clientX,
647
+ startClientY: n.clientY,
648
+ origin: c,
649
+ colStride: K + T,
650
+ rowStride: u + D,
651
+ isRtl: w.direction === "rtl"
652
+ };
653
+ try {
654
+ (Ie = (Ce = n.currentTarget).setPointerCapture) == null || Ie.call(Ce, n.pointerId);
655
+ } catch {
656
+ }
657
+ ie(e, t, "pointer");
658
+ },
659
+ [v, s, u, ie]
660
+ );
661
+ X(() => {
662
+ if (!z || z.via !== "pointer") return;
663
+ const e = (d) => {
664
+ const c = B.current, f = W.current;
665
+ if (!c || !f || d.pointerId !== c.pointerId)
666
+ return;
667
+ const w = d.clientX - c.startClientX, T = d.clientY - c.startClientY, D = Math.round(w / c.colStride) * (c.isRtl ? -1 : 1), K = Math.round(T / c.rowStride), V = c.kind === "move" ? be(
668
+ f.baseLayout,
669
+ c.id,
670
+ c.origin.x + D,
671
+ c.origin.y + K,
672
+ J.current
673
+ ) : he(
674
+ f.baseLayout,
675
+ c.id,
676
+ c.origin.w + D,
677
+ c.origin.h + K,
678
+ J.current
679
+ );
680
+ F(V);
681
+ }, t = (d) => {
682
+ const c = B.current;
683
+ !c || d.pointerId !== c.pointerId || (se.current = !0, S(!0));
684
+ }, n = (d) => {
685
+ const c = B.current;
686
+ !c || d.pointerId !== c.pointerId || (se.current = !0, S(!1));
687
+ };
688
+ return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), window.addEventListener("pointercancel", n), () => {
689
+ window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t), window.removeEventListener("pointercancel", n);
690
+ };
691
+ }, [z, S, F]), X(() => {
692
+ if (!z) return;
693
+ const e = (t) => {
694
+ t.key === "Escape" && S(!1);
695
+ };
696
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
697
+ }, [z, S]), X(() => {
698
+ if (!z || z.via !== "keyboard") return;
699
+ const e = (n) => {
700
+ var c;
701
+ const d = n.relatedTarget;
702
+ (!d || !((c = R.current) != null && c.contains(d))) && S(!1);
703
+ }, t = R.current;
704
+ return t == null || t.addEventListener("focusout", e), () => t == null ? void 0 : t.removeEventListener("focusout", e);
705
+ }, [z, S]), _(() => {
706
+ g && (W.current && S(!1), h && O(y("dashboardGrid.stackedReadOnly")));
707
+ }, [g, h, S, y]), _(() => {
708
+ var c;
709
+ const e = p.current;
710
+ p.current = null;
711
+ const t = A.current;
712
+ if (!e || !t) return;
713
+ const n = document.activeElement;
714
+ if (n === e.element || n !== null && n !== document.body) return;
715
+ if (t.contains(e.element)) {
716
+ e.element.focus();
717
+ return;
718
+ }
719
+ const d = e.widgetId ? Array.from(
720
+ t.querySelectorAll("[data-widget-id]")
721
+ ).find(
722
+ (f) => f.getAttribute("data-widget-id") === e.widgetId
723
+ ) : void 0;
724
+ if (d) {
725
+ d.setAttribute("tabindex", "-1"), d.focus();
726
+ return;
727
+ }
728
+ (c = R.current) == null || c.focus();
729
+ }, [g]);
730
+ const oe = x($);
731
+ oe.current = $;
732
+ const Ee = x(!1);
733
+ _(() => {
734
+ var e;
735
+ Ee.current !== g && (Ee.current = g, (e = oe.current) == null || e.call(oe, g));
736
+ }, [g]), _(() => {
737
+ const e = R.current;
738
+ e && (e.style.setProperty("--dg-cols", String(s)), e.style.setProperty("--dg-row", `${u}px`));
739
+ }, [s, u]);
740
+ const Pe = ft(Q);
741
+ _(() => {
742
+ const e = R.current;
743
+ e && (e.style.setProperty(
744
+ "--dg-grid-lines",
745
+ `repeating-linear-gradient(to right, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc((100% + var(--spacing-md)) / ${s})), repeating-linear-gradient(to bottom, color-mix(in srgb, var(--border) 50%, transparent) 0 1px, transparent 1px calc(${u}px + var(--spacing-md)))`
746
+ ), e.style.setProperty(
747
+ "--dg-min-block",
748
+ `calc(${Pe + 2} * (${u}px + var(--spacing-md)) - var(--spacing-md))`
749
+ ));
750
+ }, [s, u, Pe]);
751
+ const ze = x(null), pe = v && !!m, de = j(
752
+ () => pe ? $e(Q, s, 2, 2) : null,
753
+ [pe, Q, s]
754
+ );
755
+ _(() => {
756
+ const e = ze.current;
757
+ !e || !de || (e.style.setProperty("--dg-x", String(de.x + 1)), e.style.setProperty("--dg-y", String(de.y + 1)), e.style.setProperty("--dg-w", "2"), e.style.setProperty("--dg-h", "2"));
758
+ }, [de]);
759
+ const De = C(
760
+ (e) => {
761
+ I(
762
+ H(
763
+ U.current.filter((t) => t.id !== e),
764
+ J.current
765
+ )
766
+ ), O(y("dashboardGrid.removed")), i == null || i(e), requestAnimationFrame(() => {
767
+ const t = R.current;
768
+ if (!t) return;
769
+ const n = t.querySelector("button");
770
+ n ? n.focus() : t.focus();
771
+ });
772
+ },
773
+ [I, i, y]
774
+ ), me = j(
775
+ () => ({
776
+ moveWidgetTo(e, t, n) {
777
+ return !v || P.current || !Number.isFinite(t) || !Number.isFinite(n) || !k.some((d) => d.id === e) ? !1 : (I(
778
+ H(
779
+ be(k, e, Math.round(t), Math.round(n), s),
780
+ s
781
+ )
782
+ ), !0);
783
+ },
784
+ resizeWidgetTo(e, t, n) {
785
+ return !v || P.current || !Number.isFinite(t) || !Number.isFinite(n) || !k.some((d) => d.id === e) ? !1 : (I(
786
+ H(
787
+ he(
788
+ k,
789
+ e,
790
+ Math.round(t),
791
+ Math.round(n),
792
+ s
793
+ ),
794
+ s
795
+ )
796
+ ), !0);
797
+ },
798
+ getGridState() {
799
+ return {
800
+ cols: s,
801
+ editing: h,
802
+ stacked: g,
803
+ layout: k.map((e) => ({ ...e }))
804
+ };
805
+ }
806
+ }),
807
+ [v, h, g, k, s, I]
808
+ );
809
+ Je(re, () => me, [me]), st(lt, me, o);
810
+ const Ye = j(
811
+ () => ({
812
+ editing: v,
813
+ stacked: g,
814
+ stackedHeight: ee,
815
+ headingLevel: te,
816
+ layoutById: Me,
817
+ grab: z,
818
+ canRemove: !!i,
819
+ requestRemove: De,
820
+ startKeyboardGrab: Re,
821
+ keyboardStep: Ne,
822
+ startPointerGrab: Te
823
+ }),
824
+ [
825
+ v,
826
+ g,
827
+ ee,
828
+ te,
829
+ Me,
830
+ z,
831
+ i,
832
+ De,
833
+ Re,
834
+ Ne,
835
+ Te
836
+ ]
837
+ ), qe = j(() => {
838
+ if (M === void 0) return E;
839
+ const e = [], t = /* @__PURE__ */ new Map(), n = [];
840
+ return ae(E, (d) => {
841
+ const c = d.props.id;
842
+ if (c && !t.has(c)) {
843
+ const f = Le(d, {
844
+ key: `widget:${c}:${d.key ?? ""}`
845
+ });
846
+ t.set(c, f), e.push(f);
847
+ } else {
848
+ const f = Le(d, {
849
+ key: d.key === null ? `child:at:${n.length}` : `child:key:${d.key}`
850
+ });
851
+ n.push(f), e.push(f);
852
+ }
853
+ }), g ? [
854
+ ...mt([...t.keys()], k).map(
855
+ (d) => t.get(d)
856
+ ),
857
+ ...n
858
+ ] : e;
859
+ }, [M, E, g, k]);
860
+ return /* @__PURE__ */ Z(
861
+ "div",
862
+ {
863
+ ref: A,
864
+ "data-component": "dashboard-grid",
865
+ "data-component-id": o,
866
+ "data-editing": v || void 0,
867
+ "data-stacked": g || void 0,
868
+ className: `ds:block ds:w-full ${le ?? ""}`.trim(),
869
+ children: [
870
+ /* @__PURE__ */ G("div", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: Ue }),
871
+ /* @__PURE__ */ Z(
872
+ "div",
873
+ {
874
+ ref: R,
875
+ role: "list",
876
+ "aria-label": r,
877
+ tabIndex: -1,
878
+ "data-editing": v || void 0,
879
+ "data-stacked": g || void 0,
880
+ className: gt({ stacked: g }),
881
+ children: [
882
+ /* @__PURE__ */ G(Fe.Provider, { value: Ye, children: qe }),
883
+ pe ? (
884
+ // role="list" allows only listitem children — the tile wrapper
885
+ // carries the grid placement, the button fills it.
886
+ /* @__PURE__ */ G(
887
+ "div",
888
+ {
889
+ ref: ze,
890
+ role: "listitem",
891
+ className: [
892
+ "ds:flex",
893
+ "ds:[grid-column-start:var(--dg-x)] ds:[grid-column-end:span_var(--dg-w)]",
894
+ "ds:[grid-row-start:var(--dg-y)] ds:[grid-row-end:span_var(--dg-h)]"
895
+ ].join(" "),
896
+ children: /* @__PURE__ */ Z(
897
+ "button",
898
+ {
899
+ type: "button",
900
+ onClick: m,
901
+ className: [
902
+ "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
903
+ "ds:rounded-[var(--radius-lg)] ds:border ds:border-dashed ds:border-border",
904
+ "ds:text-sm ds:text-muted-foreground ds:transition-colors",
905
+ "ds:hover:bg-muted/10 ds:hover:text-foreground",
906
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring"
907
+ ].join(" "),
908
+ children: [
909
+ /* @__PURE__ */ G(it, { "aria-hidden": "true", className: "ds:size-4" }),
910
+ y("dashboardGrid.add")
911
+ ]
912
+ }
913
+ )
914
+ }
915
+ )
916
+ ) : null
917
+ ]
918
+ }
919
+ )
920
+ ]
921
+ }
922
+ );
923
+ }
924
+ );
925
+ _e.displayName = "DashboardGrid";
926
+ const zt = Object.assign(_e, {
927
+ Widget: je
928
+ });
929
+ export {
930
+ zt as D,
931
+ lt as d
932
+ };
933
+ //# sourceMappingURL=dashboard-grid-Cs7cJAsA.js.map