@alfadocs/ui-kit 1.66.0 → 1.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/dist/_chunks/{address-fields-CJtu7LQU.js → address-fields-BUPRs3n-.js} +3 -3
  2. package/dist/_chunks/{agenda-card-DR9gDdKp.js → agenda-card-BDuvreCe.js} +2 -2
  3. package/dist/_chunks/{agenda-tray-DGB1Zup-.js → agenda-tray-CfwylhWf.js} +3 -3
  4. package/dist/_chunks/ai-credits-exhausted-notice-Bg8NpW2K.js +287 -0
  5. package/dist/_chunks/ai-credits-exhausted-notice.agent-DgTSTgez.js +43 -0
  6. package/dist/_chunks/ai-credits-notice-DQ-r3iQU.js +191 -0
  7. package/dist/_chunks/{ai-permission-notice-DpRmZ9Q3.js → ai-permission-notice-C00i6VhY.js} +2 -2
  8. package/dist/_chunks/{ai-prompt-input-DSGSe4LH.js → ai-prompt-input-DzgyoKyk.js} +141 -139
  9. package/dist/_chunks/{alert-DdDpOi-P.js → alert-9kEwDza3.js} +122 -111
  10. package/dist/_chunks/{alia-sidebar-qe0quZkB.js → alia-sidebar-B06ZSOaF.js} +3 -3
  11. package/dist/_chunks/{anamnesis-summary-card-CMzBLTiN.js → anamnesis-summary-card-DQ3iE1gD.js} +2 -2
  12. package/dist/_chunks/{anamnesis-summary-rows-BIfw890v.js → anamnesis-summary-rows-CNK0fIJk.js} +392 -388
  13. package/dist/_chunks/{appointment-card-CL32sux-.js → appointment-card-5JMWi9_f.js} +2 -2
  14. package/dist/_chunks/{appointment-peek-B5mcDcXt.js → appointment-peek-D5XCfYKu.js} +2 -2
  15. package/dist/_chunks/{appointment-timeline-CCqjORFb.js → appointment-timeline-VFP6HoXT.js} +4 -4
  16. package/dist/_chunks/{appointment-tray-qtpJt8e0.js → appointment-tray-B3PDER3I.js} +3 -3
  17. package/dist/_chunks/{audio-recorder-DR-u1qbl.js → audio-recorder-4Ll0pwYK.js} +3 -3
  18. package/dist/_chunks/{auth-form-parts-Cmb41LSQ.js → auth-form-parts-B40zvD-a.js} +2 -2
  19. package/dist/_chunks/avatar-BPiPL7ND.js +199 -0
  20. package/dist/_chunks/{balance-badge-cell-DZNthHO1.js → balance-badge-cell-BG3DMly4.js} +4 -4
  21. package/dist/_chunks/{bishop-score-CaNTrikJ.js → bishop-score-Df8nF1qg.js} +2 -2
  22. package/dist/_chunks/{booking-DkjatiXc.js → booking-B1pDbERi.js} +377 -335
  23. package/dist/_chunks/{calendar-BhN-jisv.js → calendar-BvOM8rG3.js} +2 -2
  24. package/dist/_chunks/{calendar-workspace-Cp8yTZ1g.js → calendar-workspace-CYK1M83j.js} +19 -19
  25. package/dist/_chunks/{chat-message-fRLZ95O5.js → chat-message-Be-9vIIQ.js} +2 -2
  26. package/dist/_chunks/{clinical-note-card-BnFTIs6x.js → clinical-note-card-Caidqcwa.js} +2 -2
  27. package/dist/_chunks/{color-picker-BsggJovx.js → color-picker-AcaWuKah.js} +99 -95
  28. package/dist/_chunks/{combobox-U5yfO6o0.js → combobox-vF9O-QoG.js} +92 -83
  29. package/dist/_chunks/{contact-profile-card-C4-OCshj.js → contact-profile-card-CAwwOqHl.js} +40 -40
  30. package/dist/_chunks/{control-room-rail-DUerqHeo.js → control-room-rail-BB6rCDWI.js} +3 -3
  31. package/dist/_chunks/{country-select-DF5Bd_mn.js → country-select-CSE2Zm_s.js} +2 -2
  32. package/dist/_chunks/dashboard-grid-7JzaiKnk.js +1487 -0
  33. package/dist/_chunks/{data-table-COoCQ4n_.js → data-table-Cty4-Jht.js} +3 -3
  34. package/dist/_chunks/{dependent-selector-DBr1AhLg.js → dependent-selector-C4kOgO8b.js} +2 -2
  35. package/dist/_chunks/{document-preview-B1dQm292.js → document-preview-513f3iPn.js} +4 -4
  36. package/dist/_chunks/{document-scanner-CVPVLK7z.js → document-scanner-Bd3wbzpI.js} +2 -2
  37. package/dist/_chunks/{editable-description-ChGNdYY8.js → editable-description-DnAFi360.js} +2 -2
  38. package/dist/_chunks/{entity-summary-BQ9_KA8S.js → entity-summary-C2B8yNmc.js} +4 -4
  39. package/dist/_chunks/{error-summary-DrUfuKu1.js → error-summary-mGxIyDAY.js} +2 -2
  40. package/dist/_chunks/{face-scheme-DAD-mXzM.js → face-scheme-CSJdRNad.js} +248 -244
  41. package/dist/_chunks/{file-manager-RiV7-OEE.js → file-manager-D4cPnRhL.js} +3 -3
  42. package/dist/_chunks/{forgot-password-form-CgZkEvZy.js → forgot-password-form-Dqi7R-NL.js} +4 -4
  43. package/dist/_chunks/format-number-DdzqwMs1.js +13 -0
  44. package/dist/_chunks/{freemium-paywall-DKJHRFpp.js → freemium-paywall-C73C8Rgd.js} +2 -2
  45. package/dist/_chunks/{gestational-age-calculator-CZYa2D6m.js → gestational-age-calculator-Du53p8MH.js} +2 -2
  46. package/dist/_chunks/{header-settings-BSH9Gk0J.js → header-settings-DlUbvAUx.js} +37 -36
  47. package/dist/_chunks/{heatmap-C1TeC7wT.js → heatmap-DbZIQg14.js} +4 -4
  48. package/dist/_chunks/help-me-write-templates-5WkUfvc_.js +687 -0
  49. package/dist/_chunks/hourglass-BEAzW1wE.js +26 -0
  50. package/dist/_chunks/{kit-extensions-DWs1UEXb.js → kit-extensions-CYvLL4ee.js} +3 -3
  51. package/dist/_chunks/length-token-DwMnGEYT.js +24 -0
  52. package/dist/_chunks/{link-cell-renderer-CtTsvfPY.js → link-cell-renderer-DtIsQWDO.js} +4 -4
  53. package/dist/_chunks/{login-dev-card-PnADNcI9.js → login-dev-card-vEL-o5wq.js} +3 -3
  54. package/dist/_chunks/{map-view-BuVfJMEa.js → map-view-CtohteZD.js} +300 -191
  55. package/dist/_chunks/{marketplace-app-shell-C-2e4eCD.js → marketplace-app-shell-CcLQ0Dn-.js} +4 -4
  56. package/dist/_chunks/{message-card-A3mJNqfy.js → message-card-C_ksqIYM.js} +2 -2
  57. package/dist/_chunks/{message-tray-Ft6vSr71.js → message-tray-DCoQ4GQb.js} +3 -3
  58. package/dist/_chunks/{multi-select-CMaAQQgb.js → multi-select-BOad3za9.js} +110 -98
  59. package/dist/_chunks/{muscle-scheme-YoN3rYXV.js → muscle-scheme-C66WlCxG.js} +2 -2
  60. package/dist/_chunks/{note-timeline-DDqNU46n.js → note-timeline-KzL52MmB.js} +2 -2
  61. package/dist/_chunks/{notes-panel-uEGIL7mi.js → notes-panel-BXN46XkF.js} +6 -6
  62. package/dist/_chunks/notice-group-DkYzKyAZ.js +291 -0
  63. package/dist/_chunks/{notification-tray-BR3seWA7.js → notification-tray-Cp18MW5b.js} +2 -2
  64. package/dist/_chunks/{operator-hero-3_RG4Dkj.js → operator-hero-6aAIQaFZ.js} +83 -66
  65. package/dist/_chunks/{optical-prescription-CxfMsbxi.js → optical-prescription-ulXnDbBe.js} +525 -509
  66. package/dist/_chunks/panel-header-CbtlTe85.js +190 -0
  67. package/dist/_chunks/{panel-subview-yP4qIbKS.js → panel-subview-BPU7220K.js} +2 -2
  68. package/dist/_chunks/{patient-details-4P1vA9Ls.js → patient-details-C4Dyo7Ck.js} +4 -4
  69. package/dist/_chunks/{patient-field-row-CBXhlfGD.js → patient-field-row-DROvUkFu.js} +155 -176
  70. package/dist/_chunks/{patient-search-DOnDUVsl.js → patient-search-BADdx3M1.js} +2 -2
  71. package/dist/_chunks/{patient-summary-card-CuDLo8MP.js → patient-summary-card-CAimxbuI.js} +4 -4
  72. package/dist/_chunks/{payment-automation-upsell-C8MEu0t6.js → payment-automation-upsell-CiwF5UrC.js} +2 -2
  73. package/dist/_chunks/{payment-form-C3dGY7v4.js → payment-form-PBuh8PIa.js} +2 -2
  74. package/dist/_chunks/{pdf-viewer-DJ9VN7cu.js → pdf-viewer-gAsNUsA8.js} +2 -2
  75. package/dist/_chunks/{periodontal-risk-chart-CPy7CNFe.js → periodontal-risk-chart-B7S9OmPC.js} +97 -89
  76. package/dist/_chunks/practice-profile-hero-qfrsFQI_.js +236 -0
  77. package/dist/_chunks/{practice-results-8h2Utpt3.js → practice-results-BzThnpnm.js} +328 -298
  78. package/dist/_chunks/{pregnancy-dating-B8wo4l_r.js → pregnancy-dating-EFcFUJkQ.js} +2 -2
  79. package/dist/_chunks/{privacy-mask-Ch7743uk.js → privacy-mask-CCz9zuIh.js} +2 -2
  80. package/dist/_chunks/{product-hub-panel-C_ZosrBt.js → product-hub-panel-YuFbNPlT.js} +2 -2
  81. package/dist/_chunks/progress-notice-DiHWZ8Ms.js +279 -0
  82. package/dist/_chunks/{province-select-Bd20Z9Br.js → province-select-CDjs5obD.js} +2 -2
  83. package/dist/_chunks/{radiograph-panel.agent-8Ewv8-d7.js → radiograph-panel.agent-4UllIoTQ.js} +2 -2
  84. package/dist/_chunks/{rating-C1Vrmpsi.js → rating-CGYpg5dj.js} +43 -44
  85. package/dist/_chunks/{registration-form-BQyT_kBX.js → registration-form-1B0PTDal.js} +4 -4
  86. package/dist/_chunks/{reviews-panel-AvsVgtJu.js → reviews-panel-CosDZyow.js} +29 -7
  87. package/dist/_chunks/{rich-text-editor-M2gT_E7f.js → rich-text-editor-56dSsyZI.js} +1653 -1743
  88. package/dist/_chunks/{select-k4gBdS8N.js → select-4S-eYZUf.js} +244 -214
  89. package/dist/_chunks/{sign-document-CY7xTXbm.js → sign-document-BiOTs1P4.js} +2 -2
  90. package/dist/_chunks/{signature-request-BMCHy2ZO.js → signature-request-DAmNj_uq.js} +5 -5
  91. package/dist/_chunks/skeleton-tTWJpvAq.js +415 -0
  92. package/dist/_chunks/{slot-grid-dj5f6R2w.js → slot-grid-D_gix9mJ.js} +2 -2
  93. package/dist/_chunks/{tabs-2x3L13jn.js → tabs-BTj-2qMZ.js} +2 -2
  94. package/dist/_chunks/{task-card-BS7Uqevr.js → task-card-Ci2XbLmq.js} +2 -2
  95. package/dist/_chunks/{task-editor-CifOznfq.js → task-editor-BomyxGoZ.js} +8 -8
  96. package/dist/_chunks/{task-tray-eQU4KJcA.js → task-tray-Dnc72nl-.js} +3 -3
  97. package/dist/_chunks/{tasks-panel-8nLwBw6P.js → tasks-panel-ATz9JDy8.js} +6 -6
  98. package/dist/_chunks/{theme-toggle-Ctb77x6O.js → theme-toggle-DT_Jn4DC.js} +147 -138
  99. package/dist/_chunks/{timeline-DEIuHrWz.js → timeline-wUuTDFY_.js} +2 -2
  100. package/dist/_chunks/{tool-rail-C-03rH2I.js → tool-rail-C-M3eVdY.js} +2 -2
  101. package/dist/_chunks/{transcript-panel-XudW5l6l.js → transcript-panel-CoHHpcFg.js} +2 -2
  102. package/dist/_chunks/{treatment-receipt-Cpm8tqQN.js → treatment-receipt-pFqWFyD_.js} +2 -2
  103. package/dist/_chunks/{unit-converter-BPZ0Ldkb.js → unit-converter-CIoTmCmP.js} +2 -2
  104. package/dist/_chunks/{use-appointment-details-read-B-FEWbQM.js → use-appointment-details-read-CUGfE0hV.js} +13 -13
  105. package/dist/_chunks/use-dismissed-CTOWqA0e.js +177 -0
  106. package/dist/_chunks/voice-control-panel-B8Lrk0C4.js +1148 -0
  107. package/dist/_chunks/{warning-stack-HYWAytZV.js → warning-stack-BhHUmRiD.js} +2 -2
  108. package/dist/_chunks/{workflow-map-C2B2qIr1.js → workflow-map-ln4_OG8A.js} +2 -2
  109. package/dist/agent-catalog.json +221 -6
  110. package/dist/agent-i18n/en.json +32 -5
  111. package/dist/components/_shared/format-number.d.ts +20 -0
  112. package/dist/components/_shared/length-token.d.ts +12 -0
  113. package/dist/components/_shared/option.d.ts +1 -0
  114. package/dist/components/address-fields/index.js +1 -1
  115. package/dist/components/agenda-card/index.js +1 -1
  116. package/dist/components/agenda-tray/index.js +1 -1
  117. package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.agent.d.ts +4 -0
  118. package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.d.ts +96 -0
  119. package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +30 -4
  120. package/dist/components/ai-credits-notice/index.d.ts +3 -0
  121. package/dist/components/ai-credits-notice/index.js +10 -4
  122. package/dist/components/ai-permission-notice/index.js +1 -1
  123. package/dist/components/ai-prompt-input/index.js +1 -1
  124. package/dist/components/alert/alert.d.ts +26 -0
  125. package/dist/components/alert/index.js +1 -1
  126. package/dist/components/anamnesis-summary-card/index.js +1 -1
  127. package/dist/components/appointment-card/index.js +2 -2
  128. package/dist/components/appointment-details-panel/index.js +1 -1
  129. package/dist/components/appointment-peek/index.js +1 -1
  130. package/dist/components/appointment-timeline/index.js +1 -1
  131. package/dist/components/audio-recorder/index.js +1 -1
  132. package/dist/components/avatar/avatar.d.ts +2 -0
  133. package/dist/components/avatar/index.js +1 -1
  134. package/dist/components/bishop-score/index.js +1 -1
  135. package/dist/components/booking/index.js +1 -1
  136. package/dist/components/calendar/index.js +1 -1
  137. package/dist/components/chat-message/index.js +1 -1
  138. package/dist/components/clinical-note-card/index.js +1 -1
  139. package/dist/components/color-picker/index.js +1 -1
  140. package/dist/components/combobox/index.js +1 -1
  141. package/dist/components/contact-profile-card/index.js +1 -1
  142. package/dist/components/control-room-rail/index.js +1 -1
  143. package/dist/components/country-select/index.js +1 -1
  144. package/dist/components/dashboard-grid/dashboard-grid.d.ts +20 -1
  145. package/dist/components/dashboard-grid/index.js +1 -1
  146. package/dist/components/data-table/index.js +2 -2
  147. package/dist/components/dependent-selector/index.js +1 -1
  148. package/dist/components/document-preview/index.js +1 -1
  149. package/dist/components/document-scanner/index.js +1 -1
  150. package/dist/components/editable-description/index.js +1 -1
  151. package/dist/components/entity-summary/index.js +1 -1
  152. package/dist/components/error-summary/index.js +1 -1
  153. package/dist/components/face-scheme/index.js +1 -1
  154. package/dist/components/file-manager/index.js +1 -1
  155. package/dist/components/freemium-paywall/index.js +1 -1
  156. package/dist/components/gestational-age-calculator/index.js +1 -1
  157. package/dist/components/header-settings/index.js +1 -1
  158. package/dist/components/heatmap/index.js +1 -1
  159. package/dist/components/index.d.ts +4 -2
  160. package/dist/components/map-view/index.d.ts +1 -1
  161. package/dist/components/map-view/index.js +1 -1
  162. package/dist/components/map-view/map-view.d.ts +51 -0
  163. package/dist/components/message-card/index.js +1 -1
  164. package/dist/components/message-tray/index.js +1 -1
  165. package/dist/components/multi-select/index.js +1 -1
  166. package/dist/components/muscle-scheme/index.js +1 -1
  167. package/dist/components/note-timeline/index.js +1 -1
  168. package/dist/components/notes-panel/index.js +1 -1
  169. package/dist/components/notice-group/index.d.ts +3 -0
  170. package/dist/components/notice-group/index.js +6 -0
  171. package/dist/components/notice-group/notice-group.agent.d.ts +4 -0
  172. package/dist/components/notice-group/notice-group.d.ts +43 -0
  173. package/dist/components/notification-tray/index.js +1 -1
  174. package/dist/components/operator-hero/index.js +1 -1
  175. package/dist/components/optical-prescription/index.js +1 -1
  176. package/dist/components/optical-prescription/optical-prescription-data.d.ts +8 -8
  177. package/dist/components/panel-header/index.js +1 -1
  178. package/dist/components/panel-header/panel-header.d.ts +10 -0
  179. package/dist/components/panel-subview/index.js +1 -1
  180. package/dist/components/patient-details/index.js +1 -1
  181. package/dist/components/patient-search/index.js +1 -1
  182. package/dist/components/patient-summary-card/index.js +1 -1
  183. package/dist/components/patient-table/index.js +1 -1
  184. package/dist/components/payment-form/index.js +1 -1
  185. package/dist/components/pdf-viewer/index.js +1 -1
  186. package/dist/components/periodontal-risk-chart/index.js +1 -1
  187. package/dist/components/practice-profile-hero/index.js +1 -1
  188. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +4 -1
  189. package/dist/components/practice-results/index.js +1 -1
  190. package/dist/components/practice-results/practice-results.d.ts +10 -2
  191. package/dist/components/pregnancy-dating/index.js +1 -1
  192. package/dist/components/product-hub-tray/index.js +1 -1
  193. package/dist/components/progress-notice/index.d.ts +3 -0
  194. package/dist/components/progress-notice/index.js +6 -0
  195. package/dist/components/progress-notice/progress-notice.agent.d.ts +4 -0
  196. package/dist/components/progress-notice/progress-notice.d.ts +81 -0
  197. package/dist/components/province-select/index.js +1 -1
  198. package/dist/components/radiograph-panel/index.js +1 -1
  199. package/dist/components/rating/index.js +1 -1
  200. package/dist/components/reviews-panel/index.js +1 -1
  201. package/dist/components/rich-text-editor/index.js +2 -2
  202. package/dist/components/select/index.js +1 -1
  203. package/dist/components/select/select.d.ts +6 -0
  204. package/dist/components/sign-document/index.js +1 -1
  205. package/dist/components/skeleton/index.d.ts +1 -1
  206. package/dist/components/skeleton/index.js +1 -1
  207. package/dist/components/skeleton/skeleton.d.ts +41 -1
  208. package/dist/components/skeleton-scheme/index.js +1 -1
  209. package/dist/components/slot-grid/index.js +1 -1
  210. package/dist/components/tabs/index.js +1 -1
  211. package/dist/components/task-card/index.js +1 -1
  212. package/dist/components/task-editor/index.js +1 -1
  213. package/dist/components/task-tray/index.js +1 -1
  214. package/dist/components/tasks-panel/index.js +1 -1
  215. package/dist/components/theme-toggle/index.js +1 -1
  216. package/dist/components/timeline/index.js +1 -1
  217. package/dist/components/tool-rail/index.js +1 -1
  218. package/dist/components/transcript-panel/index.js +1 -1
  219. package/dist/components/treatment-receipt/index.js +1 -1
  220. package/dist/components/unit-converter/index.js +1 -1
  221. package/dist/components/voice-control-panel/index.d.ts +2 -1
  222. package/dist/components/voice-control-panel/index.js +1 -1
  223. package/dist/components/voice-control-panel/voice-control-panel.d.ts +43 -3
  224. package/dist/components/warning-stack/index.js +1 -1
  225. package/dist/components/workflow/index.js +1 -1
  226. package/dist/hooks/index.d.ts +1 -0
  227. package/dist/hooks/index.js +81 -76
  228. package/dist/hooks/use-dismissed.d.ts +58 -0
  229. package/dist/i18n/locales/ar.d.ts +49 -12
  230. package/dist/i18n/locales/ar.js +49 -12
  231. package/dist/i18n/locales/de.d.ts +49 -12
  232. package/dist/i18n/locales/de.js +49 -12
  233. package/dist/i18n/locales/el.d.ts +49 -12
  234. package/dist/i18n/locales/el.js +49 -12
  235. package/dist/i18n/locales/en.d.ts +49 -12
  236. package/dist/i18n/locales/en.js +49 -12
  237. package/dist/i18n/locales/es.d.ts +49 -12
  238. package/dist/i18n/locales/es.js +49 -12
  239. package/dist/i18n/locales/fr.d.ts +49 -12
  240. package/dist/i18n/locales/fr.js +49 -12
  241. package/dist/i18n/locales/hi.d.ts +49 -12
  242. package/dist/i18n/locales/hi.js +49 -12
  243. package/dist/i18n/locales/it.d.ts +49 -12
  244. package/dist/i18n/locales/it.js +49 -12
  245. package/dist/i18n/locales/ja.d.ts +49 -12
  246. package/dist/i18n/locales/ja.js +49 -12
  247. package/dist/i18n/locales/nl.d.ts +49 -12
  248. package/dist/i18n/locales/nl.js +49 -12
  249. package/dist/i18n/locales/pl.d.ts +49 -12
  250. package/dist/i18n/locales/pl.js +49 -12
  251. package/dist/i18n/locales/pt.d.ts +49 -12
  252. package/dist/i18n/locales/pt.js +49 -12
  253. package/dist/i18n/locales/ro.d.ts +49 -12
  254. package/dist/i18n/locales/ro.js +49 -12
  255. package/dist/i18n/locales/ru.d.ts +49 -12
  256. package/dist/i18n/locales/ru.js +49 -12
  257. package/dist/i18n/locales/sq.d.ts +49 -12
  258. package/dist/i18n/locales/sq.js +49 -12
  259. package/dist/i18n/locales/sv.d.ts +49 -12
  260. package/dist/i18n/locales/sv.js +49 -12
  261. package/dist/i18n/locales/tr.d.ts +49 -12
  262. package/dist/i18n/locales/tr.js +49 -12
  263. package/dist/i18n/locales/zh.d.ts +49 -12
  264. package/dist/i18n/locales/zh.js +49 -12
  265. package/dist/index.js +1193 -1177
  266. package/dist/locales/ar.json +49 -12
  267. package/dist/locales/de.json +49 -12
  268. package/dist/locales/el.json +49 -12
  269. package/dist/locales/en.json +49 -12
  270. package/dist/locales/es.json +49 -12
  271. package/dist/locales/fr.json +49 -12
  272. package/dist/locales/hi.json +49 -12
  273. package/dist/locales/it.json +49 -12
  274. package/dist/locales/ja.json +49 -12
  275. package/dist/locales/nl.json +49 -12
  276. package/dist/locales/pl.json +49 -12
  277. package/dist/locales/pt.json +49 -12
  278. package/dist/locales/ro.json +49 -12
  279. package/dist/locales/ru.json +49 -12
  280. package/dist/locales/sq.json +49 -12
  281. package/dist/locales/sv.json +49 -12
  282. package/dist/locales/tr.json +49 -12
  283. package/dist/locales/zh.json +49 -12
  284. package/dist/patterns/alia-assistant/index.js +1 -1
  285. package/dist/patterns/anamnesis/index.js +1 -1
  286. package/dist/patterns/calendar/index.js +1 -1
  287. package/dist/patterns/forgot-password-form/index.js +1 -1
  288. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +6 -23
  289. package/dist/patterns/help-me-write-templates/index.js +8 -7
  290. package/dist/patterns/login-form/index.js +1 -1
  291. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  292. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  293. package/dist/patterns/registration-form/index.js +1 -1
  294. package/dist/patterns/signature-request/index.js +1 -1
  295. package/dist/tokens.css +1 -1
  296. package/package.json +9 -1
  297. package/dist/_chunks/ai-credits-notice-pK9BOmEz.js +0 -90
  298. package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +0 -17
  299. package/dist/_chunks/avatar-WZY3eGE7.js +0 -123
  300. package/dist/_chunks/dashboard-grid-B2MB7SRS.js +0 -1428
  301. package/dist/_chunks/help-me-write-templates-DFmqnsAa.js +0 -747
  302. package/dist/_chunks/panel-header-BJkaUwnl.js +0 -128
  303. package/dist/_chunks/practice-profile-hero-Dfc0F60y.js +0 -193
  304. package/dist/_chunks/skeleton-B1KTdJ4N.js +0 -116
  305. package/dist/_chunks/voice-control-panel-C0BfY23Y.js +0 -1009
@@ -1,747 +0,0 @@
1
- import { jsxs as m, jsx as r, Fragment as _ } from "react/jsx-runtime";
2
- import { useState as b, useEffect as U, useId as ee, useRef as V, useCallback as L, useMemo as Y } from "react";
3
- import { useTranslation as $ } from "react-i18next";
4
- import { c as ce } from "./index-D2ZczOXr.js";
5
- import { A as O } from "./alert-DdDpOi-P.js";
6
- import { B as N } from "./button-D-MQxsA_.js";
7
- import { I as B } from "./icon-button-C_1TgRiK.js";
8
- import { D as x } from "./dialog-D6fkpRc4.js";
9
- import { E as de } from "./editor-overlay-CpVO1-Kk.js";
10
- import { E as me } from "./empty-state-pL1qum99.js";
11
- import { F as Z } from "./form-field-Ani72sVY.js";
12
- import { P as pe } from "./progress-D_g_Sl2g.js";
13
- import { S as ue } from "./spinner-CoflYlEx.js";
14
- import { T as se } from "./text-area-COMVJ1yE.js";
15
- import { S as re } from "./state-backed-text-input-Cgh4ms3p.js";
16
- import { SafeHtml as he } from "../safe-html/index.js";
17
- import { T as ge } from "./trending-up-C_luYBzS.js";
18
- import { A as fe } from "./astroid-BN4f5VXU.js";
19
- import { A as ve } from "./arrow-left-BfaGqVam.js";
20
- import { P as be } from "./pencil-B1sKKyuT.js";
21
- import { T as Te } from "./trash-2-uumy3fy1.js";
22
- import { P as Me } from "./plus-DzMQ_c6b.js";
23
- import { X as te } from "./x-B5YnXwCz.js";
24
- import { R as Ce } from "./rotate-ccw-BBQnIVTr.js";
25
- import { S as We } from "./square-DASBRZ0U.js";
26
- import { M as ye } from "./mic-CUklMZGF.js";
27
- import { S as xe } from "./send-C5kDJ-Mz.js";
28
- import { G as we } from "./grip-vertical-onSb1JXO.js";
29
- class ae extends Error {
30
- constructor(o = "AI credits exhausted") {
31
- super(o), this.name = "AiCreditsExhaustedError";
32
- }
33
- }
34
- const q = "ds:!size-[var(--min-target-size)]", Ne = `${q} ds:bg-[image:var(--gradient-brand)] ds:rounded-full`, ke = "ds:aria-pressed:!bg-[var(--destructive)] ds:aria-pressed:!text-[var(--destructive-foreground)]", K = "ds:m-0 ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--muted-foreground)]", De = "type-eyebrow ds:m-0 ds:text-[color:var(--muted-foreground)]", Ee = [
35
- "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
36
- "ds:bg-[color-mix(in_srgb,var(--background)_70%,transparent)]",
37
- "ds:p-[var(--spacing-sm)] ds:[max-block-size:14rem] ds:overflow-y-auto",
38
- "ds:text-[length:var(--font-size-sm)] ds:text-[color:var(--foreground)]",
39
- "ds:[&_ul]:list-disc ds:[&_ul]:ps-[var(--spacing-md)]",
40
- "ds:[&_h3]:font-medium ds:[&_h3]:[margin-block-start:var(--spacing-xs)]",
41
- "ds:[&_p]:[margin-block-end:var(--spacing-xs)]",
42
- "ds:[&>:first-child]:[margin-block-start:0]"
43
- ].join(" ");
44
- function ne(e, o) {
45
- return o ? e ? /\s$/.test(e) ? `${e}${o}` : `${e} ${o}` : o : e;
46
- }
47
- function ze(e) {
48
- return typeof e == "object" && e !== null && "name" in e && e.name === "AbortError";
49
- }
50
- function Ie({
51
- credits: e,
52
- onBack: o
53
- }) {
54
- const { t: l, i18n: h } = $("ui"), f = e == null ? void 0 : e.limit, T = (e == null ? void 0 : e.remaining) ?? 0, a = f !== void 0 ? l("helpMeWriteTemplates.credits.remaining", { remaining: T, limit: f }) : void 0, t = e != null && e.resetsOn ? new Intl.DateTimeFormat(h.language, {
55
- day: "numeric",
56
- month: "long"
57
- }).format(e.resetsOn) : void 0;
58
- return /* @__PURE__ */ m(
59
- "div",
60
- {
61
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
62
- "data-component": "ai-credits-exhausted-notice",
63
- children: [
64
- /* @__PURE__ */ m(O, { variant: "promo", icon: /* @__PURE__ */ r(fe, { "aria-hidden": "true" }), children: [
65
- /* @__PURE__ */ r(O.Title, { as: "h2", children: l("helpMeWriteTemplates.credits.title") }),
66
- /* @__PURE__ */ r(O.Description, { children: e != null && e.onBuyCredits ? t ? l("helpMeWriteTemplates.credits.bodyResets", { date: t }) : l("helpMeWriteTemplates.credits.body") : t ? l("helpMeWriteTemplates.credits.bodyWaitResets", {
67
- date: t
68
- }) : l("helpMeWriteTemplates.credits.bodyWait") }),
69
- f !== void 0 && a ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:[margin-block-start:var(--spacing-sm)]", children: [
70
- /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
71
- /* @__PURE__ */ r("span", { className: "type-label", children: l("helpMeWriteTemplates.credits.meterLabel") }),
72
- /* @__PURE__ */ r("span", { className: "type-label ds:ms-auto ds:tabular-nums", children: a })
73
- ] }),
74
- /* @__PURE__ */ r(
75
- pe,
76
- {
77
- value: Math.max(0, f - T),
78
- max: f,
79
- size: "sm",
80
- ariaLabel: l("helpMeWriteTemplates.credits.meterLabel"),
81
- ariaValueText: a
82
- }
83
- )
84
- ] }) : null,
85
- e != null && e.onBuyCredits || e != null && e.onSeeCosts ? /* @__PURE__ */ m(O.Action, { children: [
86
- e.onBuyCredits ? /* @__PURE__ */ r(
87
- N,
88
- {
89
- intent: "tonal",
90
- size: "sm",
91
- startIcon: /* @__PURE__ */ r(ge, { "aria-hidden": "true" }),
92
- onClick: e.onBuyCredits,
93
- children: l("helpMeWriteTemplates.credits.cta")
94
- }
95
- ) : null,
96
- e.onSeeCosts ? /* @__PURE__ */ r(N, { intent: "link", size: "sm", onClick: e.onSeeCosts, children: l("helpMeWriteTemplates.credits.secondary") }) : null
97
- ] }) : null
98
- ] }),
99
- /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
100
- o ? /* @__PURE__ */ r(N, { intent: "ghost", startIcon: /* @__PURE__ */ r(ve, {}), onClick: o, children: l("helpMeWriteTemplates.credits.back") }) : null,
101
- /* @__PURE__ */ r("p", { className: K, children: l("helpMeWriteTemplates.credits.kept") })
102
- ] })
103
- ]
104
- }
105
- );
106
- }
107
- function Re({
108
- context: e,
109
- onGenerate: o,
110
- onApplied: l,
111
- credits: h,
112
- enableDictation: f = !0,
113
- suspendClose: T = !1
114
- }) {
115
- const { t: a } = $("ui"), { open: t } = e, k = ee(), s = ee(), [u, D] = b(""), [w, E] = b(!1), [z, i] = b(!1), [g, c] = b(!1), [C, I] = b(null), d = V(null), v = f ? e.onDictate : void 0, [W, S] = b(!1), [A, P] = b(""), [X, n] = b(""), y = V(null), R = L(() => {
116
- var p;
117
- return (p = y.current) == null ? void 0 : p.abort();
118
- }, []), ie = L(() => {
119
- if (W) {
120
- R();
121
- return;
122
- }
123
- if (!v) return;
124
- const p = new AbortController();
125
- y.current = p, S(!0), n(a("helpMeWriteTemplates.bar.listening")), v({
126
- signal: p.signal,
127
- onPartialTranscript: (M) => {
128
- p.signal.aborted || P(M);
129
- },
130
- onFinalTranscript: (M) => {
131
- if (p.signal.aborted) return;
132
- P("");
133
- const H = M.trim();
134
- H && (D((F) => ne(F, H)), n(H));
135
- }
136
- }).catch((M) => {
137
- M instanceof ae && c(!0);
138
- }).finally(() => {
139
- P(""), y.current === p && (y.current = null, S(!1), n(""));
140
- });
141
- }, [W, v, R, a]);
142
- U(() => {
143
- var p, M;
144
- t ? (D(""), E(!1), i(!1), c(e.creditsExhausted), I(null)) : ((p = d.current) == null || p.abort(), (M = y.current) == null || M.abort());
145
- }, [t]), U(
146
- () => () => {
147
- var p, M;
148
- (p = d.current) == null || p.abort(), (M = y.current) == null || M.abort();
149
- },
150
- []
151
- );
152
- const Q = L(() => {
153
- var H;
154
- if (w || !u.trim()) return;
155
- R(), (H = d.current) == null || H.abort();
156
- const p = new AbortController();
157
- d.current = p, i(!1), E(!0);
158
- const M = e.scope === "selection";
159
- o({
160
- prompt: u.trim(),
161
- sourceText: M ? e.selectionText : e.getText(),
162
- scope: M ? "selection" : "document",
163
- signal: p.signal
164
- }).then((F) => {
165
- p.signal.aborted || (I(F), E(!1));
166
- }).catch((F) => {
167
- p.signal.aborted || ze(F) || (F instanceof ae ? c(!0) : i(!0), E(!1));
168
- });
169
- }, [w, u, o, R]), { onClose: G } = e, le = L(() => {
170
- T || G();
171
- }, [T, G]), oe = () => {
172
- if (C === null) return;
173
- const p = e.getHTML();
174
- e.insertAtSelection(C), e.onClose();
175
- const { setContent: M } = e;
176
- l == null || l({
177
- mode: e.scope === "selection" ? "replace" : "insert",
178
- previousHtml: p,
179
- undo: () => M(p)
180
- });
181
- };
182
- let j;
183
- if (g)
184
- j = /* @__PURE__ */ r(
185
- Ie,
186
- {
187
- credits: h,
188
- onBack: () => c(!1)
189
- }
190
- );
191
- else if (C !== null)
192
- j = /* @__PURE__ */ m(_, { children: [
193
- /* @__PURE__ */ m(
194
- "section",
195
- {
196
- "aria-labelledby": k,
197
- className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]",
198
- children: [
199
- /* @__PURE__ */ r("h2", { id: k, className: De, children: a("helpMeWriteTemplates.bar.after") }),
200
- /* @__PURE__ */ r(
201
- he,
202
- {
203
- html: C,
204
- profile: "rich-text",
205
- className: Ee,
206
- tabIndex: 0
207
- }
208
- )
209
- ]
210
- }
211
- ),
212
- /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
213
- /* @__PURE__ */ r(N, { intent: "ghost", startIcon: /* @__PURE__ */ r(te, {}), onClick: e.onClose, children: a("helpMeWriteTemplates.bar.discard") }),
214
- /* @__PURE__ */ r(
215
- N,
216
- {
217
- intent: "ghost",
218
- startIcon: /* @__PURE__ */ r(Ce, {}),
219
- onClick: () => {
220
- I(null), Q();
221
- },
222
- children: a("helpMeWriteTemplates.bar.retry")
223
- }
224
- ),
225
- /* @__PURE__ */ r("span", { className: "ds:flex-1", "aria-hidden": "true" }),
226
- /* @__PURE__ */ r(N, { intent: "primary", onClick: oe, children: e.scope === "selection" ? a("helpMeWriteTemplates.bar.replace") : a("helpMeWriteTemplates.bar.insert") })
227
- ] })
228
- ] });
229
- else {
230
- const p = W ? ne(u, A) : u;
231
- j = /* @__PURE__ */ m(_, { children: [
232
- /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
233
- /* @__PURE__ */ r(
234
- B,
235
- {
236
- size: "md",
237
- intent: "outline",
238
- className: q,
239
- icon: /* @__PURE__ */ r(te, {}),
240
- "aria-label": a("helpMeWriteTemplates.bar.close"),
241
- onClick: e.onClose
242
- }
243
- ),
244
- /* @__PURE__ */ r("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ r(
245
- se,
246
- {
247
- size: "md",
248
- value: p,
249
- onChange: (M) => D(M.target.value),
250
- placeholder: a("editor.ai.promptPlaceholder"),
251
- "aria-label": a("editor.ai.promptLabel"),
252
- autoResize: !0,
253
- minRows: 1,
254
- maxRows: 3,
255
- readOnly: w || W,
256
- tone: z ? "error" : "default",
257
- "aria-describedby": z ? s : void 0
258
- }
259
- ) }),
260
- v ? /* @__PURE__ */ r(
261
- B,
262
- {
263
- size: "md",
264
- intent: "outline",
265
- className: W ? `${q} ${ke}` : q,
266
- icon: W ? /* @__PURE__ */ r(We, { className: "ds:fill-current" }) : /* @__PURE__ */ r(ye, {}),
267
- "aria-pressed": W,
268
- "aria-label": a(W ? "helpMeWriteTemplates.bar.dictateStop" : "helpMeWriteTemplates.bar.dictateStart"),
269
- disabled: w,
270
- onClick: ie
271
- }
272
- ) : null,
273
- /* @__PURE__ */ r(
274
- B,
275
- {
276
- size: "md",
277
- intent: "primary",
278
- className: Ne,
279
- icon: w ? /* @__PURE__ */ r(ue, { size: "sm", variant: "pulse" }) : /* @__PURE__ */ r(xe, {}),
280
- disabled: w || !u.trim(),
281
- "aria-busy": w || void 0,
282
- "aria-label": a("helpMeWriteTemplates.bar.write"),
283
- onClick: Q
284
- }
285
- )
286
- ] }),
287
- v ? /* @__PURE__ */ r("p", { className: "ds:sr-only", role: "status", "aria-live": "polite", children: X }) : null,
288
- z ? /* @__PURE__ */ r("p", { id: s, role: "alert", className: K, children: a("helpMeWriteTemplates.bar.error") }) : null,
289
- /* @__PURE__ */ m("p", { className: K, children: [
290
- e.scope === "selection" ? a("helpMeWriteTemplates.bar.contextSelection") : a("helpMeWriteTemplates.bar.contextDocument"),
291
- " ",
292
- e.privacyNotice
293
- ] })
294
- ] });
295
- }
296
- return /* @__PURE__ */ r(
297
- de,
298
- {
299
- open: t,
300
- onClose: le,
301
- ariaLabel: a("editor.ai.helpMeWrite"),
302
- children: /* @__PURE__ */ r("div", { className: "ds:contents", "data-component": "help-me-write-templates-bar", children: j })
303
- }
304
- );
305
- }
306
- const Se = ce("", {
307
- variants: {
308
- dragging: { true: "ds:opacity-60", false: "" },
309
- dropTarget: {
310
- true: "ds:outline-[length:var(--focus-ring-width)] ds:outline-dashed ds:outline-[var(--primary)] ds:outline-offset-[-2px]",
311
- false: ""
312
- }
313
- },
314
- defaultVariants: { dragging: !1, dropTarget: !1 }
315
- });
316
- function Ae(e, o) {
317
- const { t: l } = $("ui"), [h, f] = b(null), [T, a] = b(null), [t, k] = b(""), s = V(!1), u = (i, g) => {
318
- const c = Math.max(0, Math.min(e.length - 1, g));
319
- if (!o || c === i) return;
320
- const C = e.map((v) => v.id), [I] = C.splice(i, 1);
321
- C.splice(c, 0, I), o(C), s.current = !s.current;
322
- const d = l("helpMeWriteTemplates.manager.reorderAnnounce", {
323
- label: e[i].name,
324
- to: c + 1,
325
- total: e.length
326
- });
327
- k(s.current ? d : `${d}​`);
328
- };
329
- return { rowProps: (i) => o ? {
330
- draggable: !0,
331
- onDragStart: (g) => {
332
- f(i), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", String(i));
333
- },
334
- onDragEnd: () => {
335
- f(null), a(null);
336
- },
337
- onDragOver: (g) => {
338
- h !== null && (g.preventDefault(), g.dataTransfer.dropEffect = "move", a(i));
339
- },
340
- onDragLeave: () => a(null),
341
- onDrop: (g) => {
342
- g.preventDefault();
343
- const c = h;
344
- f(null), a(null), c !== null && u(c, i);
345
- }
346
- } : {}, rowClass: (i) => Se({
347
- dragging: h === i,
348
- dropTarget: T === i && h !== i
349
- }), handle: (i, g) => /* @__PURE__ */ r(
350
- B,
351
- {
352
- size: "sm",
353
- intent: "ghost",
354
- icon: /* @__PURE__ */ r(we, { "aria-hidden": "true" }),
355
- "aria-label": l("helpMeWriteTemplates.manager.reorderHandle", {
356
- label: g
357
- }),
358
- className: "ds:cursor-grab ds:active:cursor-grabbing",
359
- onKeyDown: (c) => {
360
- if (!c.altKey) return;
361
- const C = c.key === "ArrowUp" ? i - 1 : c.key === "ArrowDown" ? i + 1 : c.key === "Home" ? 0 : c.key === "End" ? e.length - 1 : null;
362
- C !== null && (c.preventDefault(), u(i, C));
363
- }
364
- }
365
- ), liveRegion: /* @__PURE__ */ r("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: t }) };
366
- }
367
- const J = {
368
- name: "",
369
- description: "",
370
- prompt: "",
371
- submitted: !1
372
- };
373
- function Pe({
374
- open: e,
375
- onOpenChange: o,
376
- initialMode: l = "list",
377
- templates: h,
378
- onSaveTemplate: f,
379
- onDeleteTemplate: T,
380
- onReorderTemplates: a
381
- }) {
382
- const { t } = $("ui"), k = Ae(h, a), [s, u] = b(null), [D, w] = b(!1), [E, z] = b(!1), [i, g] = b(null), [c, C] = b(!1), [I, d] = b(!1), v = async () => {
383
- if (!(!i || c)) {
384
- C(!0), d(!1);
385
- try {
386
- await (T == null ? void 0 : T(i.id)), g(null);
387
- } catch {
388
- d(!0);
389
- } finally {
390
- C(!1);
391
- }
392
- }
393
- };
394
- U(() => {
395
- e && (z(!1), u(l === "create" ? { ...J } : null));
396
- }, [e]);
397
- const W = (n, y) => h.some(
398
- (R) => R.id !== y && R.name.toLowerCase() === n.toLowerCase()
399
- ), S = (() => {
400
- if (!(s != null && s.submitted)) return;
401
- const n = s.name.trim();
402
- return n ? W(n, s.id) ? t("helpMeWriteTemplates.manager.nameTaken") : void 0 : t("helpMeWriteTemplates.manager.nameRequired");
403
- })(), A = s != null && s.submitted && !s.prompt.trim() ? t("helpMeWriteTemplates.manager.promptRequired") : void 0, P = async () => {
404
- if (!s || D) return;
405
- const n = { ...s, submitted: !0 };
406
- u(n);
407
- const y = n.name.trim(), R = n.prompt.trim();
408
- if (!(!y || !R || W(y, n.id))) {
409
- w(!0), z(!1);
410
- try {
411
- await f({
412
- id: n.id,
413
- name: y,
414
- description: n.description.trim() || void 0,
415
- prompt: R
416
- }), u(null);
417
- } catch {
418
- z(!0);
419
- } finally {
420
- w(!1);
421
- }
422
- }
423
- }, X = s ? s.id ? t("helpMeWriteTemplates.manager.formEdit") : t("helpMeWriteTemplates.manager.formNew") : t("helpMeWriteTemplates.manager.title");
424
- return /* @__PURE__ */ m(_, { children: [
425
- /* @__PURE__ */ r(x, { open: e, onOpenChange: o, children: /* @__PURE__ */ r(x.Content, { size: "lg", children: /* @__PURE__ */ m("div", { className: "ds:contents", "data-component": "ai-template-manager", children: [
426
- /* @__PURE__ */ m(x.Header, { children: [
427
- /* @__PURE__ */ r(x.Title, { children: X }),
428
- /* @__PURE__ */ r(x.Description, { children: t("helpMeWriteTemplates.manager.description") })
429
- ] }),
430
- /* @__PURE__ */ m(x.Body, { children: [
431
- s ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
432
- E ? /* @__PURE__ */ r(O, { variant: "error", children: t("helpMeWriteTemplates.manager.saveError") }) : null,
433
- /* @__PURE__ */ r(
434
- Z,
435
- {
436
- label: t("helpMeWriteTemplates.manager.name"),
437
- error: S,
438
- required: !0,
439
- children: /* @__PURE__ */ r(
440
- re,
441
- {
442
- value: s.name,
443
- maxLength: 100,
444
- placeholder: t(
445
- "helpMeWriteTemplates.manager.namePlaceholder"
446
- ),
447
- onChange: (n) => u({ ...s, name: n.target.value })
448
- }
449
- )
450
- }
451
- ),
452
- /* @__PURE__ */ r(
453
- Z,
454
- {
455
- label: t("helpMeWriteTemplates.manager.descLabel"),
456
- description: t("helpMeWriteTemplates.manager.descHint"),
457
- optional: !0,
458
- children: /* @__PURE__ */ r(
459
- re,
460
- {
461
- value: s.description,
462
- maxLength: 120,
463
- onChange: (n) => u({ ...s, description: n.target.value })
464
- }
465
- )
466
- }
467
- ),
468
- /* @__PURE__ */ r(
469
- Z,
470
- {
471
- label: t("helpMeWriteTemplates.manager.prompt"),
472
- description: t(
473
- "helpMeWriteTemplates.manager.promptDescription"
474
- ),
475
- error: A,
476
- required: !0,
477
- children: /* @__PURE__ */ r(
478
- se,
479
- {
480
- value: s.prompt,
481
- maxLength: 4e3,
482
- autoResize: !0,
483
- minRows: 4,
484
- maxRows: 10,
485
- onChange: (n) => u({ ...s, prompt: n.target.value })
486
- }
487
- )
488
- }
489
- )
490
- ] }) : h.length === 0 ? /* @__PURE__ */ r(
491
- me,
492
- {
493
- variant: "first-use",
494
- size: "sm",
495
- title: t("helpMeWriteTemplates.manager.emptyTitle"),
496
- description: t(
497
- "helpMeWriteTemplates.manager.emptyDescription"
498
- ),
499
- primaryAction: {
500
- label: t("helpMeWriteTemplates.manager.new"),
501
- onClick: () => u({ ...J })
502
- }
503
- }
504
- ) : /* @__PURE__ */ r(
505
- "ul",
506
- {
507
- "aria-label": t("helpMeWriteTemplates.manager.listLabel"),
508
- className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0",
509
- children: h.map((n, y) => /* @__PURE__ */ m(
510
- "li",
511
- {
512
- ...k.rowProps(y),
513
- className: `ds:flex ds:items-start ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:p-[var(--spacing-sm)] ${k.rowClass(y)}`,
514
- children: [
515
- a ? k.handle(y, n.name) : null,
516
- /* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
517
- /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ r("span", { className: "type-title-item ds:text-[color:var(--foreground)]", children: n.name }) }),
518
- /* @__PURE__ */ r("p", { className: `${K} ds:line-clamp-2`, children: n.description || n.prompt })
519
- ] }),
520
- /* @__PURE__ */ r(
521
- B,
522
- {
523
- size: "sm",
524
- intent: "ghost",
525
- icon: /* @__PURE__ */ r(be, {}),
526
- "aria-label": t("helpMeWriteTemplates.manager.edit", {
527
- name: n.name
528
- }),
529
- onClick: () => u({
530
- id: n.id,
531
- name: n.name,
532
- description: n.description ?? "",
533
- prompt: n.prompt,
534
- submitted: !1
535
- })
536
- }
537
- ),
538
- T ? /* @__PURE__ */ r(
539
- B,
540
- {
541
- size: "sm",
542
- intent: "ghost",
543
- icon: /* @__PURE__ */ r(Te, {}),
544
- "aria-label": t("helpMeWriteTemplates.manager.delete", {
545
- name: n.name
546
- }),
547
- onClick: () => g(n)
548
- }
549
- ) : null
550
- ]
551
- },
552
- n.id
553
- ))
554
- }
555
- ),
556
- k.liveRegion
557
- ] }),
558
- /* @__PURE__ */ r(x.Footer, { children: s ? /* @__PURE__ */ m(_, { children: [
559
- /* @__PURE__ */ r(N, { intent: "secondary", onClick: () => u(null), children: t("helpMeWriteTemplates.manager.cancel") }),
560
- /* @__PURE__ */ r(
561
- N,
562
- {
563
- intent: "primary",
564
- loading: D,
565
- onClick: () => void P(),
566
- children: t("helpMeWriteTemplates.manager.save")
567
- }
568
- )
569
- ] }) : /* @__PURE__ */ m(_, { children: [
570
- h.length > 0 ? /* @__PURE__ */ r(
571
- N,
572
- {
573
- intent: "outline",
574
- startIcon: /* @__PURE__ */ r(Me, {}),
575
- onClick: () => u({ ...J }),
576
- children: t("helpMeWriteTemplates.manager.new")
577
- }
578
- ) : null,
579
- /* @__PURE__ */ r(x.Close, { asChild: !0, children: /* @__PURE__ */ r(N, { intent: "primary", children: t("helpMeWriteTemplates.manager.done") }) })
580
- ] }) })
581
- ] }) }) }),
582
- /* @__PURE__ */ r(
583
- x,
584
- {
585
- open: i != null,
586
- onOpenChange: (n) => {
587
- !n && !c && (g(null), d(!1));
588
- },
589
- children: /* @__PURE__ */ m(x.Content, { size: "sm", variant: "alert", children: [
590
- /* @__PURE__ */ m(x.Header, { children: [
591
- /* @__PURE__ */ r(x.Title, { children: t("helpMeWriteTemplates.manager.deleteTitle", {
592
- name: (i == null ? void 0 : i.name) ?? ""
593
- }) }),
594
- /* @__PURE__ */ r(x.Description, { children: t("helpMeWriteTemplates.manager.deleteDescription") })
595
- ] }),
596
- I ? /* @__PURE__ */ r(x.Body, { children: /* @__PURE__ */ r(O, { variant: "error", children: t("helpMeWriteTemplates.manager.deleteError") }) }) : null,
597
- /* @__PURE__ */ m(x.Footer, { children: [
598
- /* @__PURE__ */ r(x.Close, { asChild: !0, children: /* @__PURE__ */ r(N, { intent: "secondary", disabled: c, children: t("helpMeWriteTemplates.manager.cancel") }) }),
599
- /* @__PURE__ */ r(
600
- N,
601
- {
602
- intent: "destructive",
603
- loading: c,
604
- onClick: () => void v(),
605
- children: t("helpMeWriteTemplates.manager.deleteConfirm")
606
- }
607
- )
608
- ] })
609
- ] })
610
- }
611
- )
612
- ] });
613
- }
614
- function Le({
615
- applied: e,
616
- onUndo: o,
617
- onDismiss: l
618
- }) {
619
- const { t: h } = $("ui"), f = V(null);
620
- if (U(() => {
621
- var a;
622
- e && ((a = f.current) == null || a.focus());
623
- }, [e]), !(e != null && e.template)) return null;
624
- const T = e.template.name;
625
- return /* @__PURE__ */ r(
626
- O,
627
- {
628
- variant: "success",
629
- dismissible: !0,
630
- onOpenChange: (a) => {
631
- a || l();
632
- },
633
- "data-component": "help-me-write-undo-notice",
634
- children: /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
635
- /* @__PURE__ */ r("span", { children: e.mode === "below" ? h("helpMeWriteTemplates.undo.addedBelow", { name: T }) : h("helpMeWriteTemplates.undo.replaced", { name: T }) }),
636
- /* @__PURE__ */ r(N, { ref: f, intent: "outline", size: "sm", onClick: o, children: h("helpMeWriteTemplates.undo.undo") })
637
- ] })
638
- }
639
- );
640
- }
641
- function mr({
642
- templates: e,
643
- onGenerate: o,
644
- onSaveTemplate: l,
645
- onDeleteTemplate: h,
646
- onReorderTemplates: f,
647
- credits: T,
648
- enableDictation: a,
649
- onApplied: t,
650
- creditsNotice: k
651
- }) {
652
- const [s, u] = b({ open: !1, mode: "list" }), [D, w] = b(null), E = L(
653
- (d = "list") => u({ open: !0, mode: d }),
654
- []
655
- ), z = L(
656
- (d) => /* @__PURE__ */ r(
657
- Re,
658
- {
659
- context: d,
660
- onGenerate: o,
661
- credits: T,
662
- enableDictation: a,
663
- suspendClose: s.open,
664
- onApplied: t
665
- }
666
- ),
667
- [o, T, a, s.open, t]
668
- ), i = Y(() => {
669
- const d = new Map(e.map((v) => [v.id, v]));
670
- return {
671
- templates: e,
672
- onRun: ({ template: v, text: W, scope: S, signal: A }) => {
673
- const P = d.get(v.id);
674
- return P ? o({
675
- template: P,
676
- prompt: "",
677
- sourceText: W,
678
- scope: S,
679
- signal: A
680
- }) : Promise.reject(new Error("Unknown template"));
681
- },
682
- onManage: l ? E : void 0
683
- };
684
- }, [e, o, l, E]), g = L(
685
- (d) => {
686
- if (d.action !== "template" || !d.template) return;
687
- const v = e.find((S) => {
688
- var A;
689
- return S.id === ((A = d.template) == null ? void 0 : A.id);
690
- }), W = {
691
- mode: "replace",
692
- template: v,
693
- previousHtml: d.previousHtml,
694
- undo: d.undo
695
- };
696
- w(v ? W : null), t == null || t(W);
697
- },
698
- [e, t]
699
- ), c = Y(
700
- () => l ? /* @__PURE__ */ r(
701
- Pe,
702
- {
703
- open: s.open,
704
- initialMode: s.mode,
705
- onOpenChange: (d) => u((v) => ({ ...v, open: d })),
706
- templates: e,
707
- onSaveTemplate: l,
708
- onDeleteTemplate: h,
709
- onReorderTemplates: f
710
- }
711
- ) : null,
712
- [s, e, l, h, f]
713
- ), C = /* @__PURE__ */ r(
714
- Le,
715
- {
716
- applied: D,
717
- onUndo: () => {
718
- D == null || D.undo(), w(null);
719
- },
720
- onDismiss: () => w(null)
721
- }
722
- ), I = Y(
723
- () => ({
724
- renderHelpMeWrite: z,
725
- aiTemplates: i,
726
- onAiApplied: g,
727
- aiCreditsNotice: k
728
- }),
729
- [z, i, g, k]
730
- );
731
- return {
732
- ...I,
733
- editorProps: I,
734
- manager: c,
735
- undoNotice: C,
736
- openManager: E
737
- };
738
- }
739
- export {
740
- ae as A,
741
- Re as H,
742
- Ie as a,
743
- Pe as b,
744
- Le as c,
745
- mr as u
746
- };
747
- //# sourceMappingURL=help-me-write-templates-DFmqnsAa.js.map