@alfadocs/ui-kit 1.149.1 → 1.151.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 (295) hide show
  1. package/dist/_chunks/{address-autocomplete-_LeOFdM7.js → address-autocomplete-Bt1nwxyn.js} +2 -2
  2. package/dist/_chunks/{address-fields-C4khof4C.js → address-fields-COumFRSX.js} +2 -2
  3. package/dist/_chunks/{agenda-tray-NgxPuAAz.js → agenda-tray-CmfcYQhc.js} +2 -2
  4. package/dist/_chunks/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-DyAHCqaj.js} +4 -4
  5. package/dist/_chunks/{alia-sidebar-Bjuxk8mU.js → alia-sidebar-BqZjnVoF.js} +2 -2
  6. package/dist/_chunks/{anamnesis-card-G0qzw0Oi.js → anamnesis-card-CoiG7vDj.js} +2 -2
  7. package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CFpaA1GP.js} +4 -4
  8. package/dist/_chunks/{app-frame-DUPEwu4E.js → app-frame-XEjLsLGY.js} +2 -2
  9. package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
  10. package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-FSsTXj1t.js} +84 -71
  11. package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-9hRo85Lx.js} +91 -79
  12. package/dist/_chunks/appointment-peek-CmQM4wvx.js +223 -0
  13. package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-COfoHpoJ.js} +4 -4
  14. package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-BlKwDJKi.js} +3 -3
  15. package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-OghXENKK.js} +4 -4
  16. package/dist/_chunks/{bill-line-table-B8Cc2pTH.js → bill-line-table-DxV5_Dmq.js} +2 -2
  17. package/dist/_chunks/{calendar-appointment-editor-dialog-fQleWmJE.js → calendar-appointment-editor-dialog-BPAfWtm9.js} +590 -583
  18. package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-BudLsUZO.js} +5 -5
  19. package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-DukgSOPH.js} +9 -9
  20. package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-BulUpy0I.js} +2 -2
  21. package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-OmTiQdCg.js} +11 -11
  22. package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-eohONLia.js} +5 -5
  23. package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
  24. package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
  25. package/dist/_chunks/code-BfU9G1ZM.js +15 -0
  26. package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-CqiFs8BH.js} +4 -4
  27. package/dist/_chunks/{connection-status-Bi6KPTlh.js → connection-status-C13KmOPL.js} +2 -2
  28. package/dist/_chunks/control-room-rail-BmpTKtL1.js +456 -0
  29. package/dist/_chunks/{data-grid-CkzbCZSo.js → data-grid-DTAwrOiq.js} +3 -3
  30. package/dist/_chunks/{data-table-DFAYYsSc.js → data-table-CgpHO6EZ.js} +2 -2
  31. package/dist/_chunks/{default-tabs-C45FVzsG.js → default-tabs-CZaDDf1G.js} +4 -4
  32. package/dist/_chunks/{description-list-DA4TgL_I.js → description-list-DaldSpGy.js} +29 -26
  33. package/dist/_chunks/dev-bypass-button-DFcNpCQj.js +24 -0
  34. package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-TbwhY_eK.js} +4 -4
  35. package/dist/_chunks/{editable-currency-cell-renderer-DXJI0fnU.js → editable-currency-cell-renderer-a3CrwNKm.js} +143 -168
  36. package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
  37. package/dist/_chunks/{empty-state-5REM7oDM.js → empty-state-qHtpcasr.js} +65 -77
  38. package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
  39. package/dist/_chunks/{error-boundary-BQ5mRqEd.js → error-boundary-BDS1XStO.js} +2 -2
  40. package/dist/_chunks/{error-page-CdNGIezW.js → error-page-3gWV-Vmj.js} +2 -2
  41. package/dist/_chunks/{error-page-illustration-BdJLuMdV.js → error-page-illustration-CJCjLk_-.js} +125 -149
  42. package/dist/_chunks/{face-scheme-BC2whb1S.js → face-scheme-DRYGaszs.js} +255 -264
  43. package/dist/_chunks/feature-preview-switch-B_8JTya_.js +75 -0
  44. package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DMvYx-Gq.js} +165 -180
  45. package/dist/_chunks/folder-DvNxod7_.js +36 -0
  46. package/dist/_chunks/{heatmap-DvsZ-mcL.js → heatmap-BZNkPkDD.js} +4 -4
  47. package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-VnvlK87x.js} +3 -3
  48. package/dist/_chunks/{info-tip-cCppV1fD.js → info-tip-DkVISvo-.js} +2 -2
  49. package/dist/_chunks/{invoice-upload-list-BReimsvV.js → invoice-upload-list-DutydbjC.js} +3 -3
  50. package/dist/_chunks/{link-cell-renderer-CWLArl5e.js → link-cell-renderer-DTunki79.js} +3 -3
  51. package/dist/_chunks/{login-dev-card-DqUNJcd7.js → login-dev-card-CQz9yhrU.js} +2 -2
  52. package/dist/_chunks/{map-view-n6GiDRWM.js → map-view-B67HXWPR.js} +2 -2
  53. package/dist/_chunks/mark-adrift-LBqHvZwv.js +42 -0
  54. package/dist/_chunks/{marketplace-app-shell-CGA-R-zt.js → marketplace-app-shell-CclaaAvb.js} +3 -3
  55. package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
  56. package/dist/_chunks/{message-tray-Dx2HPcKB.js → message-tray-DysT-DPS.js} +2 -2
  57. package/dist/_chunks/{note-timeline-BbjHMhkL.js → note-timeline-CS5j2OKD.js} +86 -77
  58. package/dist/_chunks/notebook-text-spVSekMN.js +21 -0
  59. package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-d0I3hOEY.js} +363 -341
  60. package/dist/_chunks/{notification-tray-BnC5OItw.js → notification-tray-CjGDlwLg.js} +2 -2
  61. package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-CAnXavjq.js} +3 -3
  62. package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
  63. package/dist/_chunks/panel-right-CnMHSvLU.js +15 -0
  64. package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-B5hnQwfQ.js} +3 -3
  65. package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-DQx_9CYV.js} +3 -3
  66. package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-BOHcm9hT.js} +6 -6
  67. package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-wFIzTz7N.js} +4 -4
  68. package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-BDgfYLgz.js} +202 -201
  69. package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-ZunOre3Q.js} +158 -164
  70. package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BSSfKrcc.js} +3 -3
  71. package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-R-lwrisO.js} +4 -4
  72. package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-C6XlWpEl.js} +3 -3
  73. package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-DlvSUZFX.js} +3 -3
  74. package/dist/_chunks/{practice-results-D0TAgL8v.js → practice-results-CqoB5YAv.js} +5 -5
  75. package/dist/_chunks/{prescription-history-CQuJmd4H.js → prescription-history-CxBM3gnm.js} +4 -4
  76. package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CaLBAxzj.js} +3 -3
  77. package/dist/_chunks/{product-hub-panel-NVpRuJeW.js → product-hub-panel-RJzrDcGp.js} +3 -3
  78. package/dist/_chunks/{public-header.agent-Dzo6ujrE.js → public-header.agent-B2CqVq4s.js} +2 -2
  79. package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-kgCmmgZk.js} +4 -4
  80. package/dist/_chunks/{registration-form-AtRCt8n5.js → registration-form-Dbe1sFZb.js} +2 -2
  81. package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-BkPPA3Fj.js} +4 -4
  82. package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-C-sMq0pb.js} +5 -5
  83. package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-jIz5aP2X.js} +4 -4
  84. package/dist/_chunks/rich-text-editor-DTadvKa7.js +4716 -0
  85. package/dist/_chunks/{scroll-area-CY5SLYNw.js → scroll-area-RQtcKkHf.js} +84 -79
  86. package/dist/_chunks/{sheet-CZDjW9Q-.js → sheet-1LXzej6Q.js} +2 -2
  87. package/dist/_chunks/{sidebar-D5DFYN5K.js → sidebar-BV9JCgS4.js} +2 -2
  88. package/dist/_chunks/{signed-out-frame-CC25CgKo.js → signed-out-frame-CKA8SSbU.js} +2 -2
  89. package/dist/_chunks/{signing-end-screen-Bq6tkFE6.js → signing-end-screen-HXkalppf.js} +2 -2
  90. package/dist/_chunks/{slot-grid-khIpy8Gx.js → slot-grid-DdqeF6PW.js} +2 -2
  91. package/dist/_chunks/{sync-tray-BQD-HuA4.js → sync-tray-CSVGzuur.js} +2 -2
  92. package/dist/_chunks/{task-editor-C-4I2sBa.js → task-editor-aXjGMwYA.js} +6 -6
  93. package/dist/_chunks/{task-tray-CxxcGGgx.js → task-tray-C48Vq8nt.js} +2 -2
  94. package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-BdxHb-fX.js} +3 -3
  95. package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
  96. package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-B4p6MmxA.js} +383 -363
  97. package/dist/_chunks/{toolbar-B9oh9XY9.js → toolbar-B2JJ_XDT.js} +2 -2
  98. package/dist/_chunks/tooth-chip-DOv925IH.js +41 -0
  99. package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
  100. package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
  101. package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-CZQV1NkJ.js} +59 -62
  102. package/dist/_chunks/use-appointment-details-read-BR3TQOHx.js +2091 -0
  103. package/dist/_chunks/user-round-DZxRG9zq.js +15 -0
  104. package/dist/_chunks/{week-availability-D0tTll4q.js → week-availability-D00rMjsX.js} +2 -2
  105. package/dist/_chunks/{workflow-map-F7OThorL.js → workflow-map-DLUTUZ27.js} +2 -2
  106. package/dist/agent-catalog.json +15 -1
  107. package/dist/appointment-editor-panel/index.js +4 -4
  108. package/dist/booking-tools-data/index.js +1 -1
  109. package/dist/browser-support.js +1 -1
  110. package/dist/calendar-action-buttons/index.js +1 -1
  111. package/dist/components/_shared/appointment-format.d.ts +4 -0
  112. package/dist/components/_shared/mark-adrift.d.ts +12 -0
  113. package/dist/components/_shared/patient-field-row.d.ts +5 -1
  114. package/dist/components/_shared/safe-html.d.ts +6 -0
  115. package/dist/components/_shared/tooth-chip.d.ts +21 -0
  116. package/dist/components/address-autocomplete/index.js +1 -1
  117. package/dist/components/address-fields/index.js +1 -1
  118. package/dist/components/agenda-tray/index.js +1 -1
  119. package/dist/components/ai-summary-panel/index.js +1 -1
  120. package/dist/components/anamnesis-card/index.js +1 -1
  121. package/dist/components/app-frame/index.js +1 -1
  122. package/dist/components/appointment-card/index.js +2 -2
  123. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +12 -2
  124. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
  125. package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +12 -2
  126. package/dist/components/appointment-details-panel/description-length.d.ts +18 -0
  127. package/dist/components/appointment-details-panel/index.d.ts +1 -0
  128. package/dist/components/appointment-details-panel/index.js +7 -6
  129. package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
  130. package/dist/components/appointment-peek/index.js +1 -1
  131. package/dist/components/appointment-timeline/index.js +1 -1
  132. package/dist/components/bill-line-table/index.js +1 -1
  133. package/dist/components/bill-table/index.js +1 -1
  134. package/dist/components/booking/index.js +1 -1
  135. package/dist/components/calls-panel/index.js +1 -1
  136. package/dist/components/care-plan-card/index.js +1 -1
  137. package/dist/components/care-plan-entry-card/index.js +1 -1
  138. package/dist/components/communications-panel/index.js +1 -1
  139. package/dist/components/connection-status/index.js +1 -1
  140. package/dist/components/control-room-rail/control-room-rail.d.ts +24 -0
  141. package/dist/components/control-room-rail/index.js +1 -1
  142. package/dist/components/data-grid/index.js +2 -2
  143. package/dist/components/data-table/index.js +3 -3
  144. package/dist/components/description-list/index.js +1 -1
  145. package/dist/components/dev-bypass-button/index.js +1 -1
  146. package/dist/components/document-preview/index.js +1 -1
  147. package/dist/components/editable-description/editable-description.d.ts +7 -0
  148. package/dist/components/editable-description/index.js +1 -1
  149. package/dist/components/empty-state/index.js +1 -1
  150. package/dist/components/entity-summary/index.js +1 -1
  151. package/dist/components/error-boundary/index.js +1 -1
  152. package/dist/components/face-scheme/index.js +1 -1
  153. package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
  154. package/dist/components/feature-preview-switch/index.d.ts +2 -0
  155. package/dist/components/feature-preview-switch/index.js +5 -0
  156. package/dist/components/file-manager/index.js +1 -1
  157. package/dist/components/heatmap/index.js +1 -1
  158. package/dist/components/index.d.ts +1 -0
  159. package/dist/components/info-tip/index.js +1 -1
  160. package/dist/components/invoice-upload-list/index.js +1 -1
  161. package/dist/components/map-view/index.js +1 -1
  162. package/dist/components/message-tray/index.js +1 -1
  163. package/dist/components/note-timeline/index.js +1 -1
  164. package/dist/components/note-timeline/note-timeline.d.ts +8 -0
  165. package/dist/components/notes-panel/index.js +1 -1
  166. package/dist/components/notes-panel/notes-panel.d.ts +33 -2
  167. package/dist/components/notification-tray/index.js +1 -1
  168. package/dist/components/optical-prescription/index.js +1 -1
  169. package/dist/components/panel-header/index.js +1 -1
  170. package/dist/components/panel-header/panel-header.d.ts +8 -0
  171. package/dist/components/panel-subview/index.js +1 -1
  172. package/dist/components/patient-details/index.js +1 -1
  173. package/dist/components/patient-summary-card/index.js +1 -1
  174. package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
  175. package/dist/components/patient-table/index.js +1 -1
  176. package/dist/components/payment-card/index.js +1 -1
  177. package/dist/components/practice-results/index.js +1 -1
  178. package/dist/components/product-hub-tray/index.js +1 -1
  179. package/dist/components/public-header/index.js +1 -1
  180. package/dist/components/radiograph-panel/index.js +1 -1
  181. package/dist/components/registry-connection-panel/index.js +1 -1
  182. package/dist/components/reviews-panel/index.js +1 -1
  183. package/dist/components/rich-text-editor/editor-toolbar.d.ts +18 -5
  184. package/dist/components/rich-text-editor/index.d.ts +1 -1
  185. package/dist/components/rich-text-editor/index.js +1 -1
  186. package/dist/components/rich-text-editor/link-bar.d.ts +8 -0
  187. package/dist/components/rich-text-editor/rich-text-editor.d.ts +25 -3
  188. package/dist/components/scroll-area/index.js +1 -1
  189. package/dist/components/scroll-area/scroll-area.d.ts +6 -0
  190. package/dist/components/sheet/index.js +1 -1
  191. package/dist/components/sidebar/index.js +1 -1
  192. package/dist/components/slot-grid/index.js +1 -1
  193. package/dist/components/sync-tray/index.js +1 -1
  194. package/dist/components/task-editor/index.js +1 -1
  195. package/dist/components/task-tray/index.js +1 -1
  196. package/dist/components/tasks-panel/index.js +1 -1
  197. package/dist/components/text-area/index.js +1 -1
  198. package/dist/components/text-area/text-area.d.ts +15 -0
  199. package/dist/components/tool-rail/index.js +1 -1
  200. package/dist/components/tool-rail/tool-rail.d.ts +23 -1
  201. package/dist/components/transaction-chip/index.js +1 -1
  202. package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
  203. package/dist/components/transcript-panel/index.js +1 -1
  204. package/dist/components/treatment-receipt/index.js +1 -1
  205. package/dist/components/treatment-receipt/treatment-receipt.d.ts +6 -1
  206. package/dist/components/week-availability/index.js +1 -1
  207. package/dist/components/workflow/index.js +1 -1
  208. package/dist/core.css +1 -1
  209. package/dist/find-free-slots-panel/index.js +1 -1
  210. package/dist/host-compat.css +4 -1
  211. package/dist/host-legacy.css +63 -4
  212. package/dist/i18n/locales/ar.d.ts +18 -0
  213. package/dist/i18n/locales/ar.js +18 -3
  214. package/dist/i18n/locales/de.d.ts +18 -0
  215. package/dist/i18n/locales/de.js +18 -3
  216. package/dist/i18n/locales/el.d.ts +18 -0
  217. package/dist/i18n/locales/el.js +21 -3
  218. package/dist/i18n/locales/en.d.ts +18 -0
  219. package/dist/i18n/locales/en.js +21 -3
  220. package/dist/i18n/locales/es.d.ts +18 -0
  221. package/dist/i18n/locales/es.js +21 -3
  222. package/dist/i18n/locales/fr.d.ts +18 -0
  223. package/dist/i18n/locales/fr.js +21 -3
  224. package/dist/i18n/locales/hi.d.ts +18 -0
  225. package/dist/i18n/locales/hi.js +18 -3
  226. package/dist/i18n/locales/it.d.ts +28 -10
  227. package/dist/i18n/locales/it.js +31 -13
  228. package/dist/i18n/locales/ja.d.ts +18 -0
  229. package/dist/i18n/locales/ja.js +18 -3
  230. package/dist/i18n/locales/nl.d.ts +18 -0
  231. package/dist/i18n/locales/nl.js +18 -3
  232. package/dist/i18n/locales/pl.d.ts +18 -0
  233. package/dist/i18n/locales/pl.js +21 -3
  234. package/dist/i18n/locales/pt.d.ts +18 -0
  235. package/dist/i18n/locales/pt.js +21 -3
  236. package/dist/i18n/locales/ro.d.ts +18 -0
  237. package/dist/i18n/locales/ro.js +21 -3
  238. package/dist/i18n/locales/ru.d.ts +18 -0
  239. package/dist/i18n/locales/ru.js +18 -3
  240. package/dist/i18n/locales/sq.d.ts +18 -0
  241. package/dist/i18n/locales/sq.js +21 -3
  242. package/dist/i18n/locales/sv.d.ts +18 -0
  243. package/dist/i18n/locales/sv.js +18 -3
  244. package/dist/i18n/locales/tr.d.ts +18 -0
  245. package/dist/i18n/locales/tr.js +18 -3
  246. package/dist/i18n/locales/zh.d.ts +18 -0
  247. package/dist/i18n/locales/zh.js +18 -3
  248. package/dist/index.js +820 -817
  249. package/dist/locales/ar.json +21 -3
  250. package/dist/locales/de.json +21 -3
  251. package/dist/locales/el.json +21 -3
  252. package/dist/locales/en.json +21 -3
  253. package/dist/locales/es.json +21 -3
  254. package/dist/locales/fr.json +21 -3
  255. package/dist/locales/hi.json +21 -3
  256. package/dist/locales/it.json +31 -13
  257. package/dist/locales/ja.json +21 -3
  258. package/dist/locales/nl.json +21 -3
  259. package/dist/locales/pl.json +21 -3
  260. package/dist/locales/pt.json +21 -3
  261. package/dist/locales/ro.json +21 -3
  262. package/dist/locales/ru.json +21 -3
  263. package/dist/locales/sq.json +21 -3
  264. package/dist/locales/sv.json +21 -3
  265. package/dist/locales/tr.json +21 -3
  266. package/dist/locales/zh.json +21 -3
  267. package/dist/online-bookings-panel/index.js +2 -2
  268. package/dist/patterns/alia-assistant/index.js +1 -1
  269. package/dist/patterns/anamnesis/index.js +1 -1
  270. package/dist/patterns/calendar/index.js +4 -4
  271. package/dist/patterns/error-page/index.js +2 -2
  272. package/dist/patterns/help-me-write-templates/index.js +1 -1
  273. package/dist/patterns/login-form/index.js +1 -1
  274. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  275. package/dist/patterns/patient-account-settings/index.js +1 -1
  276. package/dist/patterns/patient-check-in/index.js +1 -1
  277. package/dist/patterns/patient-portal/index.js +2 -2
  278. package/dist/patterns/prescription/index.js +1 -1
  279. package/dist/patterns/registration-form/index.js +1 -1
  280. package/dist/patterns/signed-out-frame/index.js +1 -1
  281. package/dist/patterns/signing/index.js +1 -1
  282. package/dist/redactor.css +9 -0
  283. package/dist/safe-html/index.js +33 -19
  284. package/dist/tokens.css +61 -52
  285. package/dist/waiting-list-panel/index.js +3 -3
  286. package/package.json +5 -1
  287. package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
  288. package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
  289. package/dist/_chunks/control-room-rail-BQvaYowi.js +0 -416
  290. package/dist/_chunks/dev-bypass-button-BzfYGPuf.js +0 -33
  291. package/dist/_chunks/folder-BghC8_S2.js +0 -20
  292. package/dist/_chunks/rich-text-editor-eGdYDPK2.js +0 -4405
  293. package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
  294. package/dist/_chunks/use-appointment-details-read-Bl1DHXQ2.js +0 -1998
  295. /package/dist/{patterns → components}/_shared/mark-pieces.d.ts +0 -0
@@ -1,30 +1,31 @@
1
- import { jsxs as b, jsx as a, Fragment as Dn } from "react/jsx-runtime";
2
- import { forwardRef as _n, useRef as u, useState as T, useId as Mn, useEffect as S, useCallback as W, useMemo as wt, useImperativeHandle as zn } from "react";
3
- import { c as Nt } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Hn } from "react-i18next";
5
- import { g as yt } from "./get-error-message-DbFUzuja.js";
6
- import { useSaveOutcomeUnknownMessage as Wn, isSaveOutcomeUnknownError as Me } from "../save-outcome/index.js";
7
- import { h as At } from "./handled-rejection-C-6Dq0As.js";
8
- import { u as $n } from "./registry-DvAUVLHh.js";
9
- import { C as Bn } from "./clinical-note-card-D-9xmRpf.js";
10
- import { R as Kn } from "./rich-text-editor-eGdYDPK2.js";
11
- import { T as Un } from "./text-area-COMVJ1yE.js";
1
+ import { jsxs as y, jsx as a, Fragment as Kn } from "react/jsx-runtime";
2
+ import { forwardRef as Un, useRef as u, useState as T, useId as Pt, useEffect as S, useCallback as W, useMemo as xt, useImperativeHandle as In } from "react";
3
+ import { c as jt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Yn } from "react-i18next";
5
+ import { g as Tt } from "./get-error-message-DbFUzuja.js";
6
+ import { useSaveOutcomeUnknownMessage as Gn, isSaveOutcomeUnknownError as He } from "../save-outcome/index.js";
7
+ import { h as Vt } from "./handled-rejection-C-6Dq0As.js";
8
+ import { u as Jn } from "./registry-DvAUVLHh.js";
9
+ import { C as Qn } from "./clinical-note-card-D-9xmRpf.js";
10
+ import { R as Xn } from "./rich-text-editor-DTadvKa7.js";
11
+ import { T as Zn } from "./text-area-DbxGkpzE.js";
12
12
  import { A } from "./alert-C4WKViaS.js";
13
13
  import { B as re } from "./button-Dp4j9ygh.js";
14
- import { I as bt } from "./icon-button-u9VMQn3x.js";
15
- import { S as In } from "./switch-DO6uC4HJ.js";
16
- import { T as Yn } from "./tooltip-uEBdD1-5.js";
17
- import { C as Pt } from "./card-n6W6LW-N.js";
18
- import { C as Gn, S as ye } from "./skeleton-tTWJpvAq.js";
14
+ import { I as St } from "./icon-button-u9VMQn3x.js";
15
+ import { S as er } from "./switch-DO6uC4HJ.js";
16
+ import { T as tr } from "./tooltip-uEBdD1-5.js";
17
+ import { C as Ct } from "./card-n6W6LW-N.js";
18
+ import { C as nr, S as be } from "./skeleton-tTWJpvAq.js";
19
19
  import { D as L } from "./dialog-239Geb7Z.js";
20
- import { P as Jn } from "./panel-header-CbtlTe85.js";
21
- import { a as Qn, u as Xn, R as Zn } from "./use-list-reflow-C7O4Uqnl.js";
22
- import { u as er } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
23
- import { u as tr } from "./use-resolved-theme-B0f1_oyq.js";
24
- import { N as nr } from "./notebook-pen-CO7HoM-W.js";
25
- import { P as rr } from "./pencil-B1sKKyuT.js";
26
- import { T as sr } from "./trash-2-uumy3fy1.js";
27
- const ar = {
20
+ import { P as rr } from "./panel-header-DTc5OFUg.js";
21
+ import { P as sr } from "./patient-summary-card-ZunOre3Q.js";
22
+ import { a as ar, u as ir, R as lr } from "./use-list-reflow-C7O4Uqnl.js";
23
+ import { u as or } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
24
+ import { u as dr } from "./use-resolved-theme-B0f1_oyq.js";
25
+ import { N as cr } from "./notebook-pen-CO7HoM-W.js";
26
+ import { P as ur } from "./pencil-B1sKKyuT.js";
27
+ import { T as fr } from "./trash-2-uumy3fy1.js";
28
+ const gr = {
28
29
  id: "notes-panel",
29
30
  // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
30
31
  // with no dedicated capability in the closed vocabulary.
@@ -139,7 +140,7 @@ const ar = {
139
140
  description: "Stable note id on each rendered note row. Row controls carry data-note-action: edit, delete, pin or flag."
140
141
  }
141
142
  }
142
- }, ir = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", lr = Nt(
143
+ }, hr = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", pr = jt(
143
144
  "ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]",
144
145
  {
145
146
  variants: {
@@ -147,11 +148,11 @@ const ar = {
147
148
  true: "ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
148
149
  false: ""
149
150
  },
150
- washed: { true: ir, false: "" }
151
+ washed: { true: hr, false: "" }
151
152
  },
152
153
  defaultVariants: { current: !1, washed: !1 }
153
154
  }
154
- ), xt = Nt(
155
+ ), Et = jt(
155
156
  "ds:pointer-events-none ds:absolute ds:inset-0 ds:rounded-[var(--radius-lg)] ds:bg-[color:var(--accent)]",
156
157
  {
157
158
  variants: {
@@ -167,39 +168,39 @@ const ar = {
167
168
  }
168
169
  }
169
170
  }
170
- ), Ft = [
171
+ ), Lt = [
171
172
  "ds:rounded-[var(--radius-lg)] ds:outline-none",
172
173
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
173
174
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
174
- ].join(" "), or = ["ds:flex ds:flex-col", Ft].join(" "), dr = "ds:opacity-0", cr = [
175
+ ].join(" "), mr = ["ds:flex ds:flex-col", Lt].join(" "), vr = "ds:opacity-0", wr = [
175
176
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
176
177
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
177
- ].join(" "), ur = [3, 2, 3];
178
- function Tt(o) {
178
+ ].join(" "), yr = [3, 2, 3];
179
+ function Rt(o) {
179
180
  return o ? /<img\b/i.test(o) ? !0 : o.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
180
181
  }
181
- function St(o, f, y) {
182
- const v = o == null ? void 0 : o.toggle(f, y), w = v ? v.refusal : "the panel is not mounted";
183
- return w === void 0 ? v == null ? void 0 : v.result : At(new Error(`NotesPanel: ${y} refused (${w}).`));
182
+ function kt(o, f, b) {
183
+ const v = o == null ? void 0 : o.toggle(f, b), w = v ? v.refusal : "the panel is not mounted";
184
+ return w === void 0 ? v == null ? void 0 : v.result : Vt(new Error(`NotesPanel: ${b} refused (${w}).`));
184
185
  }
185
- const Ct = /* @__PURE__ */ new Map(), Et = /* @__PURE__ */ new Set();
186
- function be(o) {
186
+ const Nt = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Set();
187
+ function Pe(o) {
187
188
  return o.map(
188
189
  (f) => `${f.id ?? ""}:${f.pinned ? 1 : 0}${f.flagged ? 1 : 0}${f.deleted ? 1 : 0}`
189
190
  ).join("|");
190
191
  }
191
- function Rt(o) {
192
+ function Ft(o) {
192
193
  return typeof (o == null ? void 0 : o.then) == "function";
193
194
  }
194
- function kt(o, f, y) {
195
- const v = o.indexOf(y);
195
+ function Ot(o, f, b) {
196
+ const v = o.indexOf(b);
196
197
  if (v >= 0) return v;
197
- const w = f.indexOf(y);
198
+ const w = f.indexOf(b);
198
199
  if (w < 0) return -1;
199
200
  const se = new Set(o);
200
201
  return f.slice(0, w).filter((C) => se.has(C)).length;
201
202
  }
202
- function fr(o) {
203
+ function br(o) {
203
204
  if (o.hasAttribute("tabindex")) {
204
205
  o.focus();
205
206
  return;
@@ -207,132 +208,137 @@ function fr(o) {
207
208
  const f = () => o.removeAttribute("tabindex");
208
209
  o.setAttribute("tabindex", "-1"), o.focus(), document.activeElement === o ? o.addEventListener("blur", f, { once: !0 }) : f();
209
210
  }
210
- const Mr = _n(
211
+ const Yr = Un(
211
212
  function({
212
213
  id: f,
213
- notes: y,
214
+ notes: b,
214
215
  onAddNote: v,
215
216
  status: w = "ready",
216
217
  onRetry: se,
217
218
  currentNoteId: C,
218
- currentNoteKey: ze,
219
+ currentNoteKey: We,
219
220
  composer: F = "rich",
220
- editorToolbar: Ot = "standard",
221
- redactor: jt,
222
- imageUploadUrl: Vt,
223
- showClinicalToggle: Lt = !0,
221
+ editorToolbar: qt = "standard",
222
+ redactor: Dt,
223
+ imageUploadUrl: _t,
224
+ editorPlugins: Mt,
225
+ editorTools: zt,
226
+ showClinicalToggle: Ht = !0,
224
227
  canAddClinicalNote: ae = !0,
225
- clinicalGatedReason: qt,
228
+ clinicalGatedReason: Wt,
226
229
  defaultClinical: $ = !1,
227
- onRequestAiDraft: Dt,
228
- aiDraftFormat: _t,
229
- aiPrivacyNotice: Mt,
230
- onDictate: zt,
231
- onProofread: Ht,
232
- onAutoFormat: Wt,
233
- aiConsent: $t,
234
- variables: Bt,
235
- validateVariable: Kt,
236
- onVariableValidityChange: Ut,
237
- renderHelpMeWrite: It,
238
- aiTemplates: Yt,
239
- onAiApplied: Gt,
240
- onUploadImage: Jt,
241
- onAiCreditsExhausted: Qt,
242
- showExtensions: Xt,
243
- aiCreditsNotice: Zt,
244
- extensions: en,
245
- extensionContext: tn,
246
- onExtensionRun: nn,
247
- composerBefore: rn,
248
- composerAfter: sn,
249
- onTogglePin: He,
250
- onToggleFlag: We,
251
- noteActions: $e,
230
+ onRequestAiDraft: $t,
231
+ aiDraftFormat: Bt,
232
+ aiPrivacyNotice: Kt,
233
+ onDictate: Ut,
234
+ onProofread: It,
235
+ onAutoFormat: Yt,
236
+ aiConsent: Gt,
237
+ variables: Jt,
238
+ validateVariable: Qt,
239
+ onVariableValidityChange: Xt,
240
+ renderHelpMeWrite: Zt,
241
+ aiTemplates: en,
242
+ onAiApplied: tn,
243
+ onUploadImage: nn,
244
+ onAiCreditsExhausted: rn,
245
+ showExtensions: sn,
246
+ aiCreditsNotice: an,
247
+ extensions: ln,
248
+ extensionContext: on,
249
+ onExtensionRun: dn,
250
+ composerBefore: cn,
251
+ composerAfter: un,
252
+ onTogglePin: $e,
253
+ onToggleFlag: Be,
254
+ noteActions: Ke,
252
255
  onEditNote: B,
253
- editClinical: an = !1,
256
+ editClinical: fn = !1,
254
257
  onDeleteNote: K,
255
- onWriteError: Be,
256
- confirmDelete: Ke = !0,
257
- title: ln,
258
- composerPlaceholder: on,
259
- addNoteLabel: dn,
260
- emptyState: cn,
261
- className: un,
262
- "aria-label": Pe,
263
- ...fn
264
- }, gn) {
265
- var vt;
266
- const { t: l, i18n: Ue } = Hn("ui"), xe = Wn(), q = u(null), [_, U] = T(""), [ie, le] = T($), [P, Ie] = T(!1), [I, oe] = T(null), [g, Te] = T(null), Ye = u(g);
267
- Ye.current = g;
268
- const Ge = u(!1);
269
- w === "loading" && (Ge.current = !0);
270
- const hn = Ge.current ? Gn : "", pn = ln ?? l("notesPanel.title", { defaultValue: "Notes" }), Je = Mn(), Qe = on ?? l("notesPanel.placeholder", { defaultValue: "Add a note…" }), Xe = g !== null ? l("notesPanel.edit", { defaultValue: "Edit note" }) : l("notesPanel.composerLabel", { defaultValue: "New note" }), mn = F === "rich" ? Tt(_) : _.trim().length > 0, E = u(y);
271
- E.current = y;
272
- const [Y, vn] = T(Ct), R = u(Ct), [wn, yn] = T(Et), G = u(Et), O = u(!0);
258
+ onWriteError: Ue,
259
+ confirmDelete: Ie = !0,
260
+ title: gn,
261
+ patientName: xe,
262
+ patientAvatarSrc: hn,
263
+ patientAction: pn,
264
+ composerPlaceholder: mn,
265
+ addNoteLabel: vn,
266
+ emptyState: wn,
267
+ className: yn,
268
+ "aria-label": Te,
269
+ ...bn
270
+ }, Pn) {
271
+ var bt;
272
+ const { t: l, i18n: Ye } = Yn("ui"), Se = Gn(), q = u(null), [_, U] = T(""), [ie, le] = T($), [P, Ge] = T(!1), [I, oe] = T(null), [g, Ce] = T(null), Je = u(g);
273
+ Je.current = g;
274
+ const Qe = u(!1);
275
+ w === "loading" && (Qe.current = !0);
276
+ const xn = Qe.current ? nr : "", Tn = gn ?? l("notesPanel.title", { defaultValue: "Notes" }), Xe = Pt(), Ze = Pt(), de = (xe == null ? void 0 : xe.trim()) || void 0, et = mn ?? l("notesPanel.placeholder", { defaultValue: "Add a note…" }), tt = g !== null ? l("notesPanel.edit", { defaultValue: "Edit note" }) : l("notesPanel.composerLabel", { defaultValue: "New note" }), Sn = F === "rich" ? Rt(_) : _.trim().length > 0, E = u(b);
277
+ E.current = b;
278
+ const [Y, Cn] = T(Nt), R = u(Nt), [En, Rn] = T(At), G = u(At), O = u(!0);
273
279
  S(() => (O.current = !0, () => {
274
280
  O.current = !1;
275
281
  }), []);
276
- const j = u(null), D = u(Be);
277
- D.current = Be;
278
- const Se = W(() => {
282
+ const j = u(null), D = u(Ue);
283
+ D.current = Ue;
284
+ const Ee = W(() => {
279
285
  const e = j.current;
280
286
  return !O.current || !e || e.closest('[hidden],[inert],[aria-hidden="true"]') ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
281
- }, []), J = u([]), [bn, Pn] = T(0), Ce = W((e) => {
287
+ }, []), J = u([]), [kn, Nn] = T(0), Re = W((e) => {
282
288
  if (!O.current) {
283
289
  e(!1);
284
290
  return;
285
291
  }
286
- J.current.push(e), Pn((t) => t + 1);
292
+ J.current.push(e), Nn((t) => t + 1);
287
293
  }, []);
288
294
  S(() => {
289
295
  const e = J.current;
290
296
  J.current = [], e.forEach((t) => t(!0));
291
- }, [bn]), S(
297
+ }, [kn]), S(
292
298
  () => () => {
293
299
  const e = J.current;
294
300
  J.current = [], e.forEach((t) => t(!1));
295
301
  },
296
302
  []
297
303
  );
298
- const Ze = (e) => {
304
+ const nt = (e) => {
299
305
  const t = new Map(R.current);
300
- e(t), R.current = t, vn(t);
301
- }, Ee = (e) => {
306
+ e(t), R.current = t, Cn(t);
307
+ }, ke = (e) => {
302
308
  const t = new Set(G.current);
303
- e(t), G.current = t, yn(t);
304
- }, de = (e, t) => {
309
+ e(t), G.current = t, Rn(t);
310
+ }, ce = (e, t) => {
305
311
  var n;
306
312
  return (n = R.current.get(e)) == null ? void 0 : n[t];
307
- }, Q = (e, t, n) => Ze((i) => {
313
+ }, Q = (e, t, n) => nt((i) => {
308
314
  const s = { ...i.get(e) };
309
315
  n ? s[t] = n : delete s[t], Object.keys(s).length > 0 ? i.set(e, s) : i.delete(e);
310
- }), et = (e) => {
316
+ }), rt = (e) => {
311
317
  var t;
312
318
  return e != null && !!((t = R.current.get(e)) != null && t.delete);
313
- }, xn = W(() => {
319
+ }, An = W(() => {
314
320
  var h;
315
321
  if (!(g !== null ? B : v) || P) return;
316
322
  const t = F === "rich", n = t ? ((h = q.current) == null ? void 0 : h.getHTML()) ?? _ : _.trim();
317
- if (t ? !Tt(n) : !n) return;
323
+ if (t ? !Rt(n) : !n) return;
318
324
  const i = () => {
319
325
  var c;
320
- t && ((c = q.current) == null || c.clear()), U(""), le($), Te(null);
326
+ t && ((c = q.current) == null || c.clear()), U(""), le($), Ce(null);
321
327
  };
322
328
  oe(null);
323
- const s = g, r = (c) => Ce((m) => {
329
+ const s = g, r = (c) => Re((m) => {
324
330
  var k;
325
- const x = m && (s === null || Ye.current === s && E.current.some((ne) => ne.id === s && !ne.deleted));
331
+ const x = m && (s === null || Je.current === s && E.current.some((ne) => ne.id === s && !ne.deleted));
326
332
  x && oe(
327
- Me(c) ? { text: xe, unknown: !0 } : {
328
- text: yt(c, l("notesPanel.addFailed")),
333
+ He(c) ? { text: Se, unknown: !0 } : {
334
+ text: Tt(c, l("notesPanel.addFailed")),
329
335
  unknown: !1
330
336
  }
331
337
  ), (k = D.current) == null || k.call(D, {
332
338
  kind: s !== null ? "edit" : "add",
333
339
  noteId: s ?? void 0,
334
340
  error: c,
335
- shown: x && Se()
341
+ shown: x && Ee()
336
342
  });
337
343
  });
338
344
  let d;
@@ -343,24 +349,24 @@ const Mr = _n(
343
349
  return;
344
350
  }
345
351
  if (!d || typeof d.then != "function") return i();
346
- Ie(!0), Promise.resolve(d).then(i, r).finally(() => Ie(!1));
352
+ Ge(!0), Promise.resolve(d).then(i, r).finally(() => Ge(!1));
347
353
  }, [
348
354
  F,
349
355
  _,
350
356
  ie,
351
357
  $,
352
358
  g,
353
- Ce,
359
+ Re,
354
360
  v,
355
361
  B,
356
- Se,
362
+ Ee,
357
363
  P,
358
- xe,
364
+ Se,
359
365
  l
360
- ]), tt = Lt && (g === null || an), Tn = g !== null && !!((vt = Y.get(g)) != null && vt.delete), ce = W(
366
+ ]), st = Ht && (g === null || fn), Fn = g !== null && !!((bt = Y.get(g)) != null && bt.delete), ue = W(
361
367
  (e) => {
362
368
  try {
363
- return new Intl.DateTimeFormat(Ue.language, {
369
+ return new Intl.DateTimeFormat(Ye.language, {
364
370
  day: "numeric",
365
371
  month: "long",
366
372
  year: "numeric",
@@ -371,57 +377,57 @@ const Mr = _n(
371
377
  return e.dateIso;
372
378
  }
373
379
  },
374
- [Ue.language]
375
- ), Sn = W(
380
+ [Ye.language]
381
+ ), On = W(
376
382
  (e) => {
377
383
  var n, i, s, r;
378
384
  if (!e.id || P || (n = R.current.get(e.id)) != null && n.delete) return;
379
385
  const t = e.content ?? "";
380
- oe(null), Te(e.id), le(e.clinical ?? !1), U(t), F === "rich" && ((i = q.current) == null || i.clear(), (s = q.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = q.current) == null || r.focus();
386
+ oe(null), Ce(e.id), le(e.clinical ?? !1), U(t), F === "rich" && ((i = q.current) == null || i.clear(), (s = q.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = q.current) == null || r.focus();
381
387
  },
382
388
  [F, P]
383
- ), ue = W(() => {
389
+ ), fe = W(() => {
384
390
  var e;
385
- F === "rich" && ((e = q.current) == null || e.clear()), U(""), le($), oe(null), Te(null);
386
- }, [F, $]), nt = g === null || y.some((e) => e.id === g && !e.deleted);
391
+ F === "rich" && ((e = q.current) == null || e.clear()), U(""), le($), oe(null), Ce(null);
392
+ }, [F, $]), at = g === null || b.some((e) => e.id === g && !e.deleted);
387
393
  S(() => {
388
- nt || ue();
389
- }, [nt, ue]);
390
- const Re = (e) => {
394
+ at || fe();
395
+ }, [at, fe]);
396
+ const Ne = (e) => {
391
397
  var t, n;
392
398
  return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.pin) == null ? void 0 : n.next : void 0) ?? !!e.pinned;
393
- }, Cn = (e) => {
399
+ }, jn = (e) => {
394
400
  var t, n;
395
401
  return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.flag) == null ? void 0 : n.next : void 0) ?? !!e.flagged;
396
- }, M = y.filter((e) => !e.id || !wn.has(e.id)).sort((e, t) => Number(Re(t)) - Number(Re(e))), rt = M.flatMap((e) => e.id ? [e.id] : []), z = u([]);
397
- z.current = rt.filter(
402
+ }, M = b.filter((e) => !e.id || !En.has(e.id)).sort((e, t) => Number(Ne(t)) - Number(Ne(e))), it = M.flatMap((e) => e.id ? [e.id] : []), z = u([]);
403
+ z.current = it.filter(
398
404
  (e) => {
399
405
  var t;
400
406
  return !((t = Y.get(e)) != null && t.delete);
401
407
  }
402
408
  );
403
- const ke = u([]);
404
- ke.current = rt;
405
- const { isAccessible: En } = tr(j), st = En || void 0, { containerRef: Rn } = Qn({
409
+ const Ae = u([]);
410
+ Ae.current = it;
411
+ const { isAccessible: Vn } = dr(j), lt = Vn || void 0, { containerRef: Ln } = ar({
406
412
  key: M.map((e) => e.id).join(),
407
- reduceMotion: st
408
- }), fe = Xn({ reduceMotion: st }), [p, ge] = T(null), at = u(0), Ne = u(0), it = () => {
409
- Ne.current += 1, ge(null);
410
- }, he = (e, t, n, i = !0) => {
411
- const s = Ne.current;
412
- Ce((r) => {
413
+ reduceMotion: lt
414
+ }), ge = ir({ reduceMotion: lt }), [p, he] = T(null), ot = u(0), Fe = u(0), dt = () => {
415
+ Fe.current += 1, he(null);
416
+ }, pe = (e, t, n, i = !0) => {
417
+ const s = Fe.current;
418
+ Re((r) => {
413
419
  var h;
414
- const d = r && i && s === Ne.current && Se() && E.current.some((c) => c.id === t) && (e === "delete" || !et(t) && !G.current.has(t));
415
- d && (at.current += 1, ge({
420
+ const d = r && i && s === Fe.current && Ee() && E.current.some((c) => c.id === t) && (e === "delete" || !rt(t) && !G.current.has(t));
421
+ d && (ot.current += 1, he({
416
422
  kind: e,
417
423
  noteId: t,
418
- message: yt(n, ""),
419
- unknown: Me(n),
420
- seq: at.current
424
+ message: Tt(n, ""),
425
+ unknown: He(n),
426
+ seq: ot.current
421
427
  })), (h = D.current) == null || h.call(D, { kind: e, noteId: t, error: n, shown: d });
422
428
  });
423
- }, kn = (e) => {
424
- const t = y.find((i) => i.id === e.noteId), n = t != null && t.dateIso ? ce(t) : "";
429
+ }, qn = (e) => {
430
+ const t = b.find((i) => i.id === e.noteId), n = t != null && t.dateIso ? ue(t) : "";
425
431
  if (n)
426
432
  switch (e.kind) {
427
433
  case "delete":
@@ -447,23 +453,23 @@ const Mr = _n(
447
453
  default:
448
454
  return l("notesPanel.unflagFailed");
449
455
  }
450
- }, pe = p !== null && y.some((e) => e.id === p.noteId), lt = u(null);
451
- p && pe && (lt.current = p), S(() => {
452
- p && !pe && ge(null);
453
- }, [p, pe]);
454
- const [Ae, ot] = T({ text: "", seq: 0 }), Fe = u(void 0), dt = (e) => {
455
- ot((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(Fe.current), Fe.current = window.setTimeout(
456
- () => ot((t) => ({ ...t, text: "" })),
456
+ }, me = p !== null && b.some((e) => e.id === p.noteId), ct = u(null);
457
+ p && me && (ct.current = p), S(() => {
458
+ p && !me && he(null);
459
+ }, [p, me]);
460
+ const [Oe, ut] = T({ text: "", seq: 0 }), je = u(void 0), ft = (e) => {
461
+ ut((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(je.current), je.current = window.setTimeout(
462
+ () => ut((t) => ({ ...t, text: "" })),
457
463
  1e3
458
464
  );
459
465
  };
460
- S(() => () => window.clearTimeout(Fe.current), []);
461
- const ct = () => dt(l("notesPanel.deleted")), me = u(0), ut = u(w);
466
+ S(() => () => window.clearTimeout(je.current), []);
467
+ const gt = () => ft(l("notesPanel.deleted")), ve = u(0), ht = u(w);
462
468
  S(() => {
463
- ut.current === "loading" && w === "ready" && (me.current += 1), ut.current = w;
469
+ ht.current === "loading" && w === "ready" && (ve.current += 1), ht.current = w;
464
470
  }, [w]);
465
- const ft = () => {
466
- const e = E.current, t = be(e), n = new Map(e.map((r) => [r.id, r])), i = [];
471
+ const pt = () => {
472
+ const e = E.current, t = Pe(e), n = new Map(e.map((r) => [r.id, r])), i = [];
467
473
  if (R.current.forEach((r, d) => {
468
474
  const h = n.get(d);
469
475
  Object.keys(r).forEach((c) => {
@@ -474,30 +480,30 @@ const Mr = _n(
474
480
  return;
475
481
  }
476
482
  if (!m.settled) return;
477
- const x = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === m.next, k = me.current > m.edgeAtSettle || c !== "delete" && t !== m.sigAtSettle;
483
+ const x = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === m.next, k = ve.current > m.edgeAtSettle || c !== "delete" && t !== m.sigAtSettle;
478
484
  (x || k) && i.push([d, c]);
479
485
  });
480
486
  }), i.length === 0) return;
481
- Ze(
487
+ nt(
482
488
  (r) => i.forEach(([d, h]) => {
483
489
  const c = { ...r.get(d) };
484
490
  delete c[h], Object.keys(c).length > 0 ? r.set(d, c) : r.delete(d);
485
491
  })
486
492
  );
487
493
  const s = i.filter(([, r]) => r === "delete").map(([r]) => r);
488
- s.some((r) => G.current.has(r)) && Ee((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => fe.cancel(r));
489
- }, Oe = (e, t, n) => de(e, t) !== n ? !1 : (Q(e, t, {
494
+ s.some((r) => G.current.has(r)) && ke((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => ge.cancel(r));
495
+ }, Ve = (e, t, n) => ce(e, t) !== n ? !1 : (Q(e, t, {
490
496
  ...n,
491
497
  settled: !0,
492
- edgeAtSettle: me.current,
493
- sigAtSettle: be(E.current)
494
- }), ft(), !0), gt = (e, t, n) => de(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && Ee((i) => i.delete(e)), fe.cancel(e)), !0), Nn = wt(() => be(y), [y]);
498
+ edgeAtSettle: ve.current,
499
+ sigAtSettle: Pe(E.current)
500
+ }), pt(), !0), mt = (e, t, n) => ce(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && ke((i) => i.delete(e)), ge.cancel(e)), !0), Dn = xt(() => Pe(b), [b]);
495
501
  S(() => {
496
- ft();
497
- }, [Nn, w]);
498
- const je = (e, t) => {
502
+ pt();
503
+ }, [Dn, w]);
504
+ const Le = (e, t) => {
499
505
  var k, ne;
500
- const n = t === "pin" ? He : We, i = (N) => ({
506
+ const n = t === "pin" ? $e : Be, i = (N) => ({
501
507
  started: !1,
502
508
  refusal: N
503
509
  });
@@ -515,14 +521,14 @@ const Mr = _n(
515
521
  if (r != null && r[t])
516
522
  return i(`a ${t} write for this note is still pending`);
517
523
  const d = !(t === "pin" ? s.pinned : s.flagged), h = t === "pin" ? d ? "pin" : "unpin" : d ? "flag" : "unflag";
518
- it();
524
+ dt();
519
525
  let c;
520
526
  try {
521
527
  c = n(e, d);
522
528
  } catch (N) {
523
- return he(h, e, N), { started: !1, result: At(N) };
529
+ return pe(h, e, N), { started: !1, result: Vt(N) };
524
530
  }
525
- if (!Rt(c)) return { started: !0, result: c };
531
+ if (!Ft(c)) return { started: !0, result: c };
526
532
  const m = {
527
533
  next: d,
528
534
  settled: !1,
@@ -533,95 +539,95 @@ const Mr = _n(
533
539
  const x = Promise.resolve(c);
534
540
  return x.then(
535
541
  () => {
536
- O.current && Oe(e, t, m);
542
+ O.current && Ve(e, t, m);
537
543
  },
538
544
  (N) => {
539
- const qn = O.current && (Me(N) ? Oe(e, t, m) : gt(e, t, m));
540
- he(h, e, N, qn);
545
+ const Bn = O.current && (He(N) ? Ve(e, t, m) : mt(e, t, m));
546
+ pe(h, e, N, Bn);
541
547
  }
542
548
  ), { started: !0, result: x };
543
- }, ht = (e) => {
549
+ }, vt = (e) => {
544
550
  var i;
545
551
  if (!K) return !1;
546
552
  const t = E.current.find((s) => s.id === e);
547
- if (!t || t.deleted || ((i = t.actions) == null ? void 0 : i.delete) === !1 || de(e, "delete")) return !1;
548
- it();
553
+ if (!t || t.deleted || ((i = t.actions) == null ? void 0 : i.delete) === !1 || ce(e, "delete")) return !1;
554
+ dt();
549
555
  let n;
550
556
  try {
551
557
  n = K(e);
552
558
  } catch (s) {
553
- return he("delete", e, s), !1;
559
+ return pe("delete", e, s), !1;
554
560
  }
555
- if (Rt(n)) {
561
+ if (Ft(n)) {
556
562
  const s = {
557
563
  settled: !1,
558
564
  edgeAtSettle: 0,
559
565
  sigAtSettle: ""
560
566
  };
561
- Q(e, "delete", s), t.keptOnDelete && dt(
562
- t.dateIso ? l("notesPanel.deletingNamed", { date: ce(t) }) : l("notesPanel.deleting")
567
+ Q(e, "delete", s), t.keptOnDelete && ft(
568
+ t.dateIso ? l("notesPanel.deletingNamed", { date: ue(t) }) : l("notesPanel.deleting")
563
569
  ), Promise.resolve(n).then(
564
570
  () => {
565
- O.current && (ct(), Oe(e, "delete", s));
571
+ O.current && (gt(), Ve(e, "delete", s));
566
572
  },
567
573
  (r) => {
568
- const d = O.current && gt(e, "delete", s);
569
- he("delete", e, r, d);
574
+ const d = O.current && mt(e, "delete", s);
575
+ pe("delete", e, r, d);
570
576
  }
571
577
  );
572
578
  } else
573
579
  Q(e, "delete", {
574
580
  settled: !0,
575
- edgeAtSettle: me.current,
576
- sigAtSettle: be(E.current)
577
- }), ct();
578
- return t.keptOnDelete || fe.leave(e, () => {
579
- de(e, "delete") && Ee((s) => s.add(e));
581
+ edgeAtSettle: ve.current,
582
+ sigAtSettle: Pe(E.current)
583
+ }), gt();
584
+ return t.keptOnDelete || ge.leave(e, () => {
585
+ ce(e, "delete") && ke((s) => s.add(e));
580
586
  }), !0;
581
- }, [X, Z] = T(null), ve = u(null), An = (e) => {
582
- if (!(!K || et(e)) && !(P && g === e)) {
583
- if (!Ke) {
584
- ht(e);
587
+ }, [X, Z] = T(null), we = u(null), _n = (e) => {
588
+ if (!(!K || rt(e)) && !(P && g === e)) {
589
+ if (!Ie) {
590
+ vt(e);
585
591
  return;
586
592
  }
587
- ve.current = { noteId: e, index: -1, started: !1 }, Z(e);
593
+ we.current = { noteId: e, index: -1, started: !1 }, Z(e);
588
594
  }
589
- }, Fn = () => {
595
+ }, Mn = () => {
590
596
  const e = X;
591
597
  if (!e) return;
592
598
  const t = z.current.indexOf(e);
593
- ht(e) && (ve.current = { noteId: e, index: t, started: !0 }), Z(null);
594
- }, Ve = X !== null && y.some((e) => e.id === X && !e.deleted);
599
+ vt(e) && (we.current = { noteId: e, index: t, started: !0 }), Z(null);
600
+ }, qe = X !== null && b.some((e) => e.id === X && !e.deleted);
595
601
  S(() => {
596
- X !== null && !Ve && Z(null);
597
- }, [X, Ve]), zn(gn, () => j.current, []);
602
+ X !== null && !qe && Z(null);
603
+ }, [X, qe]), In(Pn, () => j.current, []);
598
604
  const V = (e, t) => {
599
605
  var n;
600
606
  return e ? ((n = j.current) == null ? void 0 : n.querySelector(
601
607
  `[data-note-id="${CSS.escape(e)}"] ${t ? `[data-note-action="${CSS.escape(t)}"]` : "[data-note-action]"}`
602
608
  )) ?? null : null;
603
- }, we = (e, t) => {
609
+ }, ye = (e, t) => {
604
610
  const n = z.current;
605
611
  return V(n[e], t) ?? V(n[e - 1], t) ?? V(n[e], null) ?? V(n[e - 1], null);
606
- }, On = () => {
612
+ }, zn = () => {
607
613
  const e = j.current, t = (e == null ? void 0 : e.querySelector("[data-notes-panel-empty]")) ?? e;
608
- t && fr(t);
614
+ t && br(t);
609
615
  }, ee = (e) => {
610
- e ? e.focus() : On();
611
- }, jn = (e) => {
612
- const t = ve.current;
613
- if (ve.current = null, !t || e.defaultPrevented) return;
616
+ e ? e.focus() : zn();
617
+ }, Hn = (e) => {
618
+ const t = we.current;
619
+ if (we.current = null, !t || e.defaultPrevented) return;
614
620
  e.preventDefault();
615
621
  const n = V(t.noteId, "delete");
616
622
  ee(
617
- t.started ? we(t.index, "delete") ?? n : n
623
+ t.started ? ye(t.index, "delete") ?? n : n
618
624
  );
619
- }, Le = u(null), pt = (e) => {
625
+ }, De = u(null), wt = (e) => {
620
626
  const t = e.kind === "delete" ? "delete" : e.kind.endsWith("pin") ? "pin" : "flag", n = z.current.indexOf(e.noteId);
621
- return V(e.noteId, t) ?? V(e.noteId, null) ?? (n >= 0 ? we(n, t) : null);
622
- }, Vn = (e) => {
627
+ return V(e.noteId, t) ?? V(e.noteId, null) ?? (n >= 0 ? ye(n, t) : null);
628
+ }, Wn = (e) => {
623
629
  var t;
624
- (t = Le.current) != null && t.contains(document.activeElement) && ee(pt(e)), ge(null);
630
+ (t = De.current) != null && t.contains(document.activeElement) && ee(wt(e)), he(null);
625
631
  }, H = u(null);
626
632
  S(() => {
627
633
  const e = j.current;
@@ -635,7 +641,7 @@ const Mr = _n(
635
641
  el: s,
636
642
  noteId: r,
637
643
  action: ((h = s.closest("[data-note-action]")) == null ? void 0 : h.dataset.noteAction) ?? null,
638
- index: r ? kt(z.current, ke.current, r) : -1,
644
+ index: r ? Ot(z.current, Ae.current, r) : -1,
639
645
  inWriteError: !!s.closest("[data-notes-panel-write-error]")
640
646
  };
641
647
  }, n = (i) => {
@@ -653,14 +659,14 @@ const Mr = _n(
653
659
  return e.addEventListener("focusin", t), e.addEventListener("focusout", n), () => {
654
660
  e.removeEventListener("focusin", t), e.removeEventListener("focusout", n);
655
661
  };
656
- }, []), er(() => {
662
+ }, []), or(() => {
657
663
  var i;
658
664
  const e = H.current;
659
665
  if (!e || !j.current) return;
660
666
  if (e.el.isConnected) {
661
- const s = e.noteId ? kt(
667
+ const s = e.noteId ? Ot(
662
668
  z.current,
663
- ke.current,
669
+ Ae.current,
664
670
  e.noteId
665
671
  ) : -1;
666
672
  s >= 0 && (e.index = s);
@@ -672,30 +678,30 @@ const Mr = _n(
672
678
  const n = e.action ? V(e.noteId, e.action) : null;
673
679
  if (n) n.focus();
674
680
  else if (e.noteId)
675
- ee(we(e.index, e.action));
681
+ ee(ye(e.index, e.action));
676
682
  else if (e.el.hasAttribute("data-notes-panel-empty"))
677
- ee(we(0, "delete"));
683
+ ee(ye(0, "delete"));
678
684
  else if (e.inWriteError) {
679
- const s = (i = Le.current) == null ? void 0 : i.querySelector(
685
+ const s = (i = De.current) == null ? void 0 : i.querySelector(
680
686
  "[data-alert-dismiss]"
681
- ), r = lt.current;
682
- s ? s.focus() : ee(r ? pt(r) : null);
687
+ ), r = ct.current;
688
+ s ? s.focus() : ee(r ? wt(r) : null);
683
689
  }
684
690
  });
685
- const qe = u(null);
691
+ const _e = u(null);
686
692
  S(() => {
687
693
  var e, t;
688
- C && ((e = qe.current) == null || e.scrollIntoView({ block: "center" }), (t = qe.current) == null || t.focus());
689
- }, [C, ze]);
694
+ C && ((e = _e.current) == null || e.scrollIntoView({ block: "center" }), (t = _e.current) == null || t.focus());
695
+ }, [C, We]);
690
696
  const te = u(v);
691
697
  te.current = v;
692
- const De = u(ae);
693
- De.current = ae;
694
- const mt = u(C);
695
- mt.current = C;
696
- const _e = u(null);
697
- _e.current = { toggle: je };
698
- const Ln = wt(
698
+ const Me = u(ae);
699
+ Me.current = ae;
700
+ const yt = u(C);
701
+ yt.current = C;
702
+ const ze = u(null);
703
+ ze.current = { toggle: Le };
704
+ const $n = xt(
699
705
  () => ({
700
706
  // Ids + flags only — never the note body or author (both PHI).
701
707
  getNotes: () => E.current.filter((e) => {
@@ -713,107 +719,123 @@ const Mr = _n(
713
719
  };
714
720
  }),
715
721
  canAddNote: () => !!te.current,
716
- canAddClinical: () => De.current,
717
- getCurrentNoteId: () => mt.current ?? null,
722
+ canAddClinical: () => Me.current,
723
+ getCurrentNoteId: () => yt.current ?? null,
718
724
  addNote: (e) => {
719
725
  var t;
720
- if (!(e.clinical && !De.current))
726
+ if (!(e.clinical && !Me.current))
721
727
  return (t = te.current) == null ? void 0 : t.call(te, e);
722
728
  },
723
- togglePin: (e) => St(_e.current, e, "pin"),
724
- toggleFlag: (e) => St(_e.current, e, "flag")
729
+ togglePin: (e) => kt(ze.current, e, "pin"),
730
+ toggleFlag: (e) => kt(ze.current, e, "flag")
725
731
  }),
726
732
  []
727
733
  );
728
- return $n(ar, Ln, f), /* @__PURE__ */ b(
734
+ return Jn(gr, $n, f), /* @__PURE__ */ y(
729
735
  "section",
730
736
  {
731
737
  ref: j,
732
738
  "data-component": "notes-panel",
733
739
  "data-component-id": f,
734
- "aria-labelledby": Pe ? void 0 : Je,
735
- "aria-label": Pe,
736
- className: [or, un].filter(Boolean).join(" "),
737
- ...fn,
740
+ "aria-labelledby": Te ? void 0 : Xe,
741
+ "aria-label": Te,
742
+ "aria-describedby": de ? Ze : void 0,
743
+ className: [mr, yn].filter(Boolean).join(" "),
744
+ ...bn,
738
745
  children: [
739
746
  /* @__PURE__ */ a(
740
- Jn,
747
+ rr,
741
748
  {
742
- title: pn,
743
- icon: /* @__PURE__ */ a(nr, { "aria-hidden": "true" }),
744
- headingId: Pe ? void 0 : Je,
749
+ title: Tn,
750
+ icon: /* @__PURE__ */ a(cr, { "aria-hidden": "true" }),
751
+ headingId: Te ? void 0 : Xe,
745
752
  sticky: !0,
746
753
  divider: !0
747
754
  }
748
755
  ),
749
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
750
- v || g !== null ? /* @__PURE__ */ b(
756
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
757
+ de ? /* @__PURE__ */ y("div", { "data-slot": "patient", children: [
758
+ /* @__PURE__ */ a("span", { id: Ze, hidden: !0, children: de }),
759
+ /* @__PURE__ */ a(
760
+ sr,
761
+ {
762
+ name: de,
763
+ avatarUrl: hn,
764
+ actionSlot: pn,
765
+ surface: "elevated",
766
+ density: "compact"
767
+ }
768
+ )
769
+ ] }) : null,
770
+ v || g !== null ? /* @__PURE__ */ y(
751
771
  "div",
752
772
  {
753
773
  "data-notes-panel-composer": g !== null ? "edit" : "add",
754
774
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
755
775
  children: [
756
- rn,
776
+ cn,
757
777
  F === "rich" ? /* @__PURE__ */ a(
758
- Kn,
778
+ Xn,
759
779
  {
760
780
  ref: q,
761
- ariaLabel: Xe,
762
- placeholder: Qe,
763
- toolbar: Ot,
781
+ ariaLabel: tt,
782
+ placeholder: et,
783
+ toolbar: qt,
764
784
  minHeight: "fill",
765
- redactor: jt,
766
- imageUploadUrl: Vt,
785
+ redactor: Dt,
786
+ imageUploadUrl: _t,
787
+ plugins: Mt,
788
+ tools: zt,
767
789
  readOnly: P,
768
790
  onChange: ({ html: e }) => U(e),
769
- onRequestAiDraft: Dt,
770
- aiDraftFormat: _t,
771
- aiPrivacyNotice: Mt,
772
- onDictate: zt,
773
- onProofread: Ht,
774
- onAutoFormat: Wt,
775
- aiConsent: $t,
776
- variables: Bt,
777
- validateVariable: Kt,
778
- onVariableValidityChange: Ut,
779
- renderHelpMeWrite: It,
780
- aiTemplates: Yt,
781
- onAiApplied: Gt,
782
- onUploadImage: Jt,
783
- onAiCreditsExhausted: Qt,
784
- showExtensions: Xt,
785
- aiCreditsNotice: Zt,
786
- extensions: en,
787
- extensionContext: tn,
788
- onExtensionRun: nn,
791
+ onRequestAiDraft: $t,
792
+ aiDraftFormat: Bt,
793
+ aiPrivacyNotice: Kt,
794
+ onDictate: Ut,
795
+ onProofread: It,
796
+ onAutoFormat: Yt,
797
+ aiConsent: Gt,
798
+ variables: Jt,
799
+ validateVariable: Qt,
800
+ onVariableValidityChange: Xt,
801
+ renderHelpMeWrite: Zt,
802
+ aiTemplates: en,
803
+ onAiApplied: tn,
804
+ onUploadImage: nn,
805
+ onAiCreditsExhausted: rn,
806
+ showExtensions: sn,
807
+ aiCreditsNotice: an,
808
+ extensions: ln,
809
+ extensionContext: on,
810
+ onExtensionRun: dn,
789
811
  aiConsentHeadingLevel: 3
790
812
  }
791
813
  ) : /* @__PURE__ */ a(
792
- Un,
814
+ Zn,
793
815
  {
794
816
  value: _,
795
817
  readOnly: P,
796
818
  onChange: (e) => U(e.target.value),
797
- placeholder: Qe,
819
+ placeholder: et,
798
820
  autoResize: !0,
799
821
  minRows: 2,
800
822
  maxRows: 6,
801
- "aria-label": Xe
823
+ "aria-label": tt
802
824
  }
803
825
  ),
804
- /* @__PURE__ */ b(
826
+ /* @__PURE__ */ y(
805
827
  "div",
806
828
  {
807
829
  className: [
808
830
  "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
809
- tt ? "ds:justify-between" : "ds:justify-end"
831
+ st ? "ds:justify-between" : "ds:justify-end"
810
832
  ].join(" "),
811
833
  children: [
812
- tt ? (() => {
813
- const e = P || !ae, t = ae ? void 0 : qt ?? l("notesPanel.clinicalGated", {
834
+ st ? (() => {
835
+ const e = P || !ae, t = ae ? void 0 : Wt ?? l("notesPanel.clinicalGated", {
814
836
  defaultValue: "You do not have permission to write clinical notes."
815
837
  }), n = /* @__PURE__ */ a(
816
- In,
838
+ er,
817
839
  {
818
840
  size: "sm",
819
841
  label: l("notesPanel.clinicalToggle", {
@@ -824,16 +846,16 @@ const Mr = _n(
824
846
  disabled: e
825
847
  }
826
848
  );
827
- return e && t ? /* @__PURE__ */ a(Yn, { label: t, children: /* @__PURE__ */ a("span", { tabIndex: 0, children: n }) }) : n;
849
+ return e && t ? /* @__PURE__ */ a(tr, { label: t, children: /* @__PURE__ */ a("span", { tabIndex: 0, children: n }) }) : n;
828
850
  })() : null,
829
- /* @__PURE__ */ b("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
851
+ /* @__PURE__ */ y("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
830
852
  g !== null ? /* @__PURE__ */ a(
831
853
  re,
832
854
  {
833
855
  type: "button",
834
856
  size: "sm",
835
857
  intent: "ghost",
836
- onClick: ue,
858
+ onClick: fe,
837
859
  disabled: P,
838
860
  children: l("notesPanel.cancelEdit", { defaultValue: "Cancel" })
839
861
  }
@@ -843,10 +865,10 @@ const Mr = _n(
843
865
  {
844
866
  type: "button",
845
867
  size: "sm",
846
- onClick: xn,
847
- disabled: !mn || Tn,
868
+ onClick: An,
869
+ disabled: !Sn || Fn,
848
870
  loading: P,
849
- children: g !== null ? l("notesPanel.saveEdit", { defaultValue: "Save note" }) : dn ?? l("notesPanel.add", { defaultValue: "Add note" })
871
+ children: g !== null ? l("notesPanel.saveEdit", { defaultValue: "Save note" }) : vn ?? l("notesPanel.add", { defaultValue: "Add note" })
850
872
  }
851
873
  )
852
874
  ] })
@@ -863,7 +885,7 @@ const Mr = _n(
863
885
  children: /* @__PURE__ */ a(A.Description, { children: I.text })
864
886
  }
865
887
  ) : null,
866
- sn
888
+ un
867
889
  ]
868
890
  }
869
891
  ) : null,
@@ -871,7 +893,7 @@ const Mr = _n(
871
893
  /* Note-shaped placeholders, not a spinner: the reader sees where
872
894
  the notes will land and how many to expect. The status text is
873
895
  for assistive tech only; sighted readers get the motion. */
874
- /* @__PURE__ */ b(
896
+ /* @__PURE__ */ y(
875
897
  "div",
876
898
  {
877
899
  "data-notes-panel-loading": "",
@@ -879,19 +901,19 @@ const Mr = _n(
879
901
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
880
902
  children: [
881
903
  /* @__PURE__ */ a("span", { role: "status", className: "ds:sr-only", children: l("notesPanel.loading") }),
882
- ur.map((e, t) => /* @__PURE__ */ a(Pt, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ a(Pt.Body, { children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
883
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
904
+ yr.map((e, t) => /* @__PURE__ */ a(Ct, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ a(Ct.Body, { children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
905
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
884
906
  /* @__PURE__ */ a(
885
- ye,
907
+ be,
886
908
  {
887
909
  variant: "circular",
888
910
  size: "sm",
889
911
  stagger: t * 2
890
912
  }
891
913
  ),
892
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
914
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
893
915
  /* @__PURE__ */ a(
894
- ye,
916
+ be,
895
917
  {
896
918
  variant: "text",
897
919
  size: "sm",
@@ -900,7 +922,7 @@ const Mr = _n(
900
922
  }
901
923
  ),
902
924
  /* @__PURE__ */ a(
903
- ye,
925
+ be,
904
926
  {
905
927
  variant: "text",
906
928
  size: "sm",
@@ -911,7 +933,7 @@ const Mr = _n(
911
933
  ] })
912
934
  ] }),
913
935
  /* @__PURE__ */ a(
914
- ye,
936
+ be,
915
937
  {
916
938
  variant: "text",
917
939
  size: "sm",
@@ -923,24 +945,24 @@ const Mr = _n(
923
945
  ]
924
946
  }
925
947
  )
926
- ) : w === "error" ? /* @__PURE__ */ b(A, { variant: "error", children: [
948
+ ) : w === "error" ? /* @__PURE__ */ y(A, { variant: "error", children: [
927
949
  /* @__PURE__ */ a(A.Description, { children: l("notesPanel.loadError") }),
928
950
  se ? /* @__PURE__ */ a(A.Action, { children: /* @__PURE__ */ a(re, { intent: "secondary", size: "sm", onClick: se, children: l("notesPanel.retry") }) }) : null
929
951
  ] }) : null,
930
- p && pe ? /* @__PURE__ */ b(
952
+ p && me ? /* @__PURE__ */ y(
931
953
  A,
932
954
  {
933
- ref: Le,
955
+ ref: De,
934
956
  variant: p.unknown ? "warning" : "error",
935
957
  announce: p.unknown ? "assertive" : void 0,
936
958
  dismissible: !0,
937
959
  onOpenChange: (e) => {
938
- e || Vn(p);
960
+ e || Wn(p);
939
961
  },
940
962
  "data-notes-panel-write-error": p.kind,
941
963
  "data-outcome": p.unknown ? "unknown" : void 0,
942
964
  children: [
943
- p.unknown ? /* @__PURE__ */ a(A.Description, { children: xe }) : /* @__PURE__ */ a(A.Title, { as: "p", children: kn(p) }),
965
+ p.unknown ? /* @__PURE__ */ a(A.Description, { children: Se }) : /* @__PURE__ */ a(A.Title, { as: "p", children: qn(p) }),
944
966
  !p.unknown && p.message ? /* @__PURE__ */ a(A.Description, { children: p.message }) : null
945
967
  ]
946
968
  },
@@ -953,22 +975,22 @@ const Mr = _n(
953
975
  "aria-atomic": "true",
954
976
  "data-notes-panel-announcer": "",
955
977
  className: "ds:sr-only",
956
- children: Ae.text ? /* @__PURE__ */ a("span", { children: Ae.text }, Ae.seq) : null
978
+ children: Oe.text ? /* @__PURE__ */ a("span", { children: Oe.text }, Oe.seq) : null
957
979
  }
958
980
  ),
959
981
  w === "loading" && M.length > 0 ? /* @__PURE__ */ a("span", { role: "status", className: "ds:sr-only", children: l("notesPanel.loading") }) : null,
960
982
  M.length > 0 ? /* @__PURE__ */ a(
961
983
  "ul",
962
984
  {
963
- ref: Rn,
985
+ ref: Ln,
964
986
  "aria-busy": w === "loading" || void 0,
965
- className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${hn}`.trim(),
987
+ className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${xn}`.trim(),
966
988
  children: M.map(({ actions: e, keptOnDelete: t, ...n }, i) => {
967
- const s = C != null && n.id === C, r = n.id, d = r != null && g === r, h = r != null && fe.isLeaving(r), c = r ? Y.get(r) : void 0, m = !!(c != null && c.delete), x = m && !!t, k = P && d;
968
- return /* @__PURE__ */ b(
989
+ const s = C != null && n.id === C, r = n.id, d = r != null && g === r, h = r != null && ge.isLeaving(r), c = r ? Y.get(r) : void 0, m = !!(c != null && c.delete), x = m && !!t, k = P && d;
990
+ return /* @__PURE__ */ y(
969
991
  "li",
970
992
  {
971
- ref: s ? qe : void 0,
993
+ ref: s ? _e : void 0,
972
994
  "data-note-id": r,
973
995
  tabIndex: s ? -1 : void 0,
974
996
  "aria-current": s ? "true" : void 0,
@@ -977,13 +999,13 @@ const Mr = _n(
977
999
  "data-editing": d ? "" : void 0,
978
1000
  "aria-busy": x || void 0,
979
1001
  className: [
980
- lr({
1002
+ pr({
981
1003
  current: s,
982
1004
  washed: s || d
983
1005
  }),
984
- cr,
985
- Zn,
986
- h ? dr : ""
1006
+ wr,
1007
+ lr,
1008
+ h ? vr : ""
987
1009
  ].filter(Boolean).join(" "),
988
1010
  children: [
989
1011
  s ? /* @__PURE__ */ a("span", { className: "ds:sr-only", children: l("notesPanel.current", {
@@ -995,35 +1017,35 @@ const Mr = _n(
995
1017
  {
996
1018
  "aria-hidden": "true",
997
1019
  "data-notes-panel-wash": "editing",
998
- className: xt({ state: "editing" })
1020
+ className: Et({ state: "editing" })
999
1021
  }
1000
1022
  ) : s ? /* @__PURE__ */ a(
1001
1023
  "span",
1002
1024
  {
1003
1025
  "aria-hidden": "true",
1004
1026
  "data-notes-panel-wash": "addressed",
1005
- className: xt({ state: "addressed" })
1027
+ className: Et({ state: "addressed" })
1006
1028
  },
1007
- `${C}:${ze ?? ""}`
1029
+ `${C}:${We ?? ""}`
1008
1030
  ) : null,
1009
1031
  /* @__PURE__ */ a(
1010
- Bn,
1032
+ Qn,
1011
1033
  {
1012
1034
  surface: "elevated",
1013
1035
  truncate: !s,
1014
- headerActions: /* @__PURE__ */ b(Dn, { children: [
1015
- $e ? $e(
1036
+ headerActions: /* @__PURE__ */ y(Kn, { children: [
1037
+ Ke ? Ke(
1016
1038
  { ...n, actions: e, keptOnDelete: t },
1017
1039
  { deleting: m }
1018
1040
  ) : null,
1019
1041
  B && r && !n.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ a(
1020
- bt,
1042
+ St,
1021
1043
  {
1022
- icon: /* @__PURE__ */ a(rr, {}),
1044
+ icon: /* @__PURE__ */ a(ur, {}),
1023
1045
  intent: "ghost",
1024
1046
  size: "sm",
1025
1047
  "aria-label": l("notesPanel.editNamed", {
1026
- date: ce(n),
1048
+ date: ue(n),
1027
1049
  defaultValue: "Edit note · {{date}}"
1028
1050
  }),
1029
1051
  tooltip: l("notesPanel.edit", {
@@ -1033,17 +1055,17 @@ const Mr = _n(
1033
1055
  disabled: P || m,
1034
1056
  "data-notes-panel-edit": "",
1035
1057
  "data-note-action": "edit",
1036
- onClick: () => g === r ? ue() : Sn(n)
1058
+ onClick: () => g === r ? fe() : On(n)
1037
1059
  }
1038
1060
  ) : null,
1039
1061
  K && r && !n.deleted && (e == null ? void 0 : e.delete) !== !1 ? /* @__PURE__ */ a(
1040
- bt,
1062
+ St,
1041
1063
  {
1042
- icon: /* @__PURE__ */ a(sr, {}),
1064
+ icon: /* @__PURE__ */ a(fr, {}),
1043
1065
  intent: "ghost",
1044
1066
  size: "sm",
1045
1067
  "aria-label": l("notesPanel.deleteNamed", {
1046
- date: ce(n),
1068
+ date: ue(n),
1047
1069
  defaultValue: "Delete note · {{date}}"
1048
1070
  }),
1049
1071
  tooltip: l("notesPanel.delete", {
@@ -1052,17 +1074,17 @@ const Mr = _n(
1052
1074
  "data-note-action": "delete",
1053
1075
  "aria-disabled": x || k || void 0,
1054
1076
  "aria-busy": x || void 0,
1055
- onClick: () => An(r)
1077
+ onClick: () => _n(r)
1056
1078
  }
1057
1079
  ) : null
1058
1080
  ] }),
1059
1081
  ...n,
1060
- pinned: Re(n),
1061
- flagged: Cn(n),
1082
+ pinned: Ne(n),
1083
+ flagged: jn(n),
1062
1084
  pinPending: !!(c != null && c.pin) || m,
1063
1085
  flagPending: !!(c != null && c.flag) || m,
1064
- onTogglePin: He && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => je(r, "pin") : void 0,
1065
- onToggleFlag: We && r && (e == null ? void 0 : e.flag) !== !1 && !n.deleted ? () => je(r, "flag") : void 0
1086
+ onTogglePin: $e && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => Le(r, "pin") : void 0,
1087
+ onToggleFlag: Be && r && (e == null ? void 0 : e.flag) !== !1 && !n.deleted ? () => Le(r, "flag") : void 0
1066
1088
  }
1067
1089
  )
1068
1090
  ]
@@ -1073,21 +1095,21 @@ const Mr = _n(
1073
1095
  }
1074
1096
  ) : w !== "ready" ? null : (
1075
1097
  /* Where focus lands, from script, when the last note leaves. */
1076
- /* @__PURE__ */ a("div", { "data-notes-panel-empty": "", className: Ft, children: cn ?? /* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: l("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
1098
+ /* @__PURE__ */ a("div", { "data-notes-panel-empty": "", className: Lt, children: wn ?? /* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: l("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
1077
1099
  )
1078
1100
  ] }),
1079
- K && Ke ? /* @__PURE__ */ a(
1101
+ K && Ie ? /* @__PURE__ */ a(
1080
1102
  L,
1081
1103
  {
1082
1104
  scope: "container",
1083
- open: Ve,
1105
+ open: qe,
1084
1106
  onOpenChange: (e) => !e && Z(null),
1085
- children: /* @__PURE__ */ b(
1107
+ children: /* @__PURE__ */ y(
1086
1108
  L.Content,
1087
1109
  {
1088
1110
  variant: "alert",
1089
1111
  size: "sm",
1090
- onCloseAutoFocus: jn,
1112
+ onCloseAutoFocus: Hn,
1091
1113
  children: [
1092
1114
  /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Title, { children: l("notesPanel.deleteConfirmTitle", {
1093
1115
  defaultValue: "Delete this note?"
@@ -1095,7 +1117,7 @@ const Mr = _n(
1095
1117
  /* @__PURE__ */ a(L.Body, { children: /* @__PURE__ */ a(L.Description, { children: l("notesPanel.deleteConfirmBody", {
1096
1118
  defaultValue: "The note will be removed from the record."
1097
1119
  }) }) }),
1098
- /* @__PURE__ */ b(L.Footer, { children: [
1120
+ /* @__PURE__ */ y(L.Footer, { children: [
1099
1121
  /* @__PURE__ */ a(L.Close, { asChild: !0, children: /* @__PURE__ */ a(
1100
1122
  re,
1101
1123
  {
@@ -1112,7 +1134,7 @@ const Mr = _n(
1112
1134
  {
1113
1135
  intent: "destructive",
1114
1136
  size: "sm",
1115
- onClick: Fn,
1137
+ onClick: Mn,
1116
1138
  children: l("notesPanel.deleteConfirmAction", {
1117
1139
  defaultValue: "Delete"
1118
1140
  })
@@ -1130,6 +1152,6 @@ const Mr = _n(
1130
1152
  }
1131
1153
  );
1132
1154
  export {
1133
- Mr as N
1155
+ Yr as N
1134
1156
  };
1135
- //# sourceMappingURL=notes-panel-Cw06dLDm.js.map
1157
+ //# sourceMappingURL=notes-panel-d0I3hOEY.js.map