@alfadocs/ui-kit 0.37.0 → 0.38.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 (196) hide show
  1. package/dist/_chunks/Alfadocs_Logo_Mark-7o3L3WBI.js +56 -0
  2. package/dist/_chunks/{alia-sidebar-BEoMl6UL.js → alia-sidebar-DXsYPinm.js} +2 -2
  3. package/dist/_chunks/{ar-D1RwVZFj.js → ar-Cn_NxqkN.js} +2 -2
  4. package/dist/_chunks/bmi-BxD-tFzU.js +32 -0
  5. package/dist/_chunks/bmi-calculator-BRUru9QX.js +213 -0
  6. package/dist/_chunks/{booking-DqXsd1Mv.js → booking-DK_BPHnQ.js} +4 -4
  7. package/dist/_chunks/calculator-dialog-B74fqpFZ.js +40 -0
  8. package/dist/_chunks/{chat-message-D53_fH2w.js → chat-message-ASgGtj-L.js} +30 -39
  9. package/dist/_chunks/{contact-profile-card-BA6fgS45.js → contact-profile-card-DHyuAPXM.js} +14 -13
  10. package/dist/_chunks/cycle-calculator-B5Uj9QeT.js +185 -0
  11. package/dist/_chunks/{date-picker-CXFpu-qY.js → date-picker-CvQfs6Xh.js} +2 -2
  12. package/dist/_chunks/{date-range-picker-I-q5rifj.js → date-range-picker-U9fn1g9d.js} +3 -3
  13. package/dist/_chunks/{date-time-picker-CqpGPlcH.js → date-time-picker-Cva0ZCWw.js} +2 -2
  14. package/dist/_chunks/{de-HTQ4b4-J.js → de-BMM2H7Bs.js} +2 -2
  15. package/dist/_chunks/dependent-selector-CRWgieHm.js +324 -0
  16. package/dist/_chunks/document-scanner-CdHQ6lTN.js +702 -0
  17. package/dist/_chunks/due-date-calculator-CUspKSTw.js +171 -0
  18. package/dist/_chunks/{editable-currency-cell-renderer-DnjwZNZP.js → editable-currency-cell-renderer-DGKuRNVG.js} +2 -2
  19. package/dist/_chunks/{el-Dr1pjuDq.js → el-BYPonAaK.js} +2 -2
  20. package/dist/_chunks/{es-CvyTjLS0.js → es-CMkVCQ4F.js} +2 -2
  21. package/dist/_chunks/{file-upload-CdozCPct.js → file-upload-CnzRcErt.js} +2 -1
  22. package/dist/_chunks/fiscal-code-input-BZ0FxwUl.js +540 -0
  23. package/dist/_chunks/{fr-CS7aqaFR.js → fr-BcuWxqft.js} +2 -2
  24. package/dist/_chunks/gestation-BXEgDGmP.js +50 -0
  25. package/dist/_chunks/gestational-age-calculator-CsQ05qDy.js +165 -0
  26. package/dist/_chunks/heart-C0faivFf.js +20 -0
  27. package/dist/_chunks/{hi-3uy8KpsH.js → hi-wkq_rQAh.js} +2 -2
  28. package/dist/_chunks/image-C6RM5hfF.js +16 -0
  29. package/dist/_chunks/insert-result-yJ0QavoN.js +133 -0
  30. package/dist/_chunks/{isSameWeek-DRpMibi9.js → isSameWeek-Bim5ftRd.js} +2 -2
  31. package/dist/_chunks/{it-B_RF5VSw.js → it-GiQrQ9p4.js} +3 -3
  32. package/dist/_chunks/{ja-C1mEYy35.js → ja-qfYg3Rua.js} +2 -2
  33. package/dist/_chunks/{logo-_Z-jLq80.js → logo-yituK7sE.js} +42 -91
  34. package/dist/_chunks/{marketplace-app-shell-DXHxy9dj.js → marketplace-app-shell-BnClrL2B.js} +2 -2
  35. package/dist/_chunks/{nl-Dl7lO2t3.js → nl-xOogO4sZ.js} +2 -2
  36. package/dist/_chunks/{patient-shell-CDvMw_Nk.js → patient-shell-Bz3CdO84.js} +2 -2
  37. package/dist/_chunks/{pl-Dgsogljx.js → pl-GnOW6eGK.js} +3 -3
  38. package/dist/_chunks/{practice-results-BFM_lyUs.js → practice-results-C8ciLQap.js} +3 -2
  39. package/dist/_chunks/pregnancy-weight-gain-BCdi-JSv.js +209 -0
  40. package/dist/_chunks/{privacy-lock-DD-wHxBg.js → privacy-lock-BmX_gkvt.js} +2 -2
  41. package/dist/_chunks/{pt-Dm2JF4bc.js → pt-_bV5b5RW.js} +2 -2
  42. package/dist/_chunks/{public-footer.agent-Cjfe5jus.js → public-footer.agent-zw1vFin_.js} +2 -2
  43. package/dist/_chunks/qr-code-DNXhi6se.js +568 -0
  44. package/dist/_chunks/{react-day-picker-DYDdR8Vv.js → react-day-picker-CdtIiKjx.js} +24 -24
  45. package/dist/_chunks/{rich-text-editor-CHmr9Bz8.js → rich-text-editor-DLbg2852.js} +114 -124
  46. package/dist/_chunks/{ro-BXFZ_xIX.js → ro-BEcyh5Nj.js} +2 -2
  47. package/dist/_chunks/rotate-ccw-BWANpitO.js +15 -0
  48. package/dist/_chunks/{ru-BPQkNRRV.js → ru-Bi86hqMf.js} +3 -3
  49. package/dist/_chunks/session-countdown-LPnhTHjn.js +214 -0
  50. package/dist/_chunks/{shield-check-BhHyReu8.js → shield-check-C73ma9Cs.js} +8 -24
  51. package/dist/_chunks/{sign-in-with-alfadocs-button-BI0fVonM.js → sign-in-with-alfadocs-button-DeHBFRNS.js} +2 -2
  52. package/dist/_chunks/social-sign-in-button-X54ySJr1.js +243 -0
  53. package/dist/_chunks/{sq-ChTlGFcJ.js → sq-BujHSAWu.js} +2 -2
  54. package/dist/_chunks/subDays-_T9YeKPX.js +8 -0
  55. package/dist/_chunks/{sv-Do_gs6ir.js → sv-C8AeDrTA.js} +2 -2
  56. package/dist/_chunks/{tr-da_UnkYH.js → tr-CMSs_Vgf.js} +2 -2
  57. package/dist/_chunks/unit-converter-EUwO6QYq.js +168 -0
  58. package/dist/_chunks/wallet-pay-button-DK4ESYge.js +250 -0
  59. package/dist/_chunks/{zh-CN-C9qi5oak.js → zh-CN-eXB-PFu4.js} +3 -3
  60. package/dist/agent-catalog.json +203 -1
  61. package/dist/brand/provider-marks/apple-pay.d.ts +12 -0
  62. package/dist/brand/provider-marks/apple.d.ts +12 -0
  63. package/dist/brand/provider-marks/google-pay.d.ts +12 -0
  64. package/dist/brand/provider-marks/google.d.ts +13 -0
  65. package/dist/components/_shared/insert-result.d.ts +47 -0
  66. package/dist/components/bmi-calculator/bmi-calculator.d.ts +3 -0
  67. package/dist/components/bmi-calculator/index.js +6 -5
  68. package/dist/components/booking/index.js +1 -1
  69. package/dist/components/calculator-dialog/calculator-dialog.d.ts +26 -0
  70. package/dist/components/calculator-dialog/index.d.ts +3 -0
  71. package/dist/components/calculator-dialog/index.js +5 -0
  72. package/dist/components/chat-message/index.js +1 -1
  73. package/dist/components/contact-profile-card/index.js +1 -1
  74. package/dist/components/cycle-calculator/cycle-calculator.d.ts +21 -0
  75. package/dist/components/cycle-calculator/cycle.d.ts +37 -0
  76. package/dist/components/cycle-calculator/index.d.ts +4 -0
  77. package/dist/components/cycle-calculator/index.js +7 -0
  78. package/dist/components/data-table/index.js +1 -1
  79. package/dist/components/date-picker/index.js +1 -1
  80. package/dist/components/date-range-picker/index.js +1 -1
  81. package/dist/components/date-time-picker/index.js +1 -1
  82. package/dist/components/dependent-selector/dependent-selector.agent.d.ts +4 -0
  83. package/dist/components/dependent-selector/dependent-selector.d.ts +72 -0
  84. package/dist/components/dependent-selector/index.d.ts +4 -0
  85. package/dist/components/dependent-selector/index.js +6 -0
  86. package/dist/components/document-scanner/document-scanner.agent.d.ts +4 -0
  87. package/dist/components/document-scanner/document-scanner.d.ts +93 -0
  88. package/dist/components/document-scanner/index.d.ts +4 -0
  89. package/dist/components/document-scanner/index.js +6 -0
  90. package/dist/components/due-date-calculator/due-date-calculator.d.ts +3 -0
  91. package/dist/components/due-date-calculator/gestation.d.ts +16 -0
  92. package/dist/components/due-date-calculator/index.d.ts +1 -1
  93. package/dist/components/due-date-calculator/index.js +10 -7
  94. package/dist/components/file-upload/index.js +1 -1
  95. package/dist/components/fiscal-code-input/calculate-codice-fiscale.d.ts +24 -0
  96. package/dist/components/fiscal-code-input/fiscal-code-input.agent.d.ts +4 -0
  97. package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +61 -0
  98. package/dist/components/fiscal-code-input/index.d.ts +6 -0
  99. package/dist/components/fiscal-code-input/index.js +11 -0
  100. package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +21 -0
  101. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +27 -0
  102. package/dist/components/gestational-age-calculator/index.d.ts +3 -0
  103. package/dist/components/gestational-age-calculator/index.js +5 -0
  104. package/dist/components/index.d.ts +13 -0
  105. package/dist/components/logo/index.js +1 -1
  106. package/dist/components/practice-results/index.js +1 -1
  107. package/dist/components/pregnancy-weight-gain/index.d.ts +4 -0
  108. package/dist/components/pregnancy-weight-gain/index.js +9 -0
  109. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +19 -0
  110. package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +41 -0
  111. package/dist/components/privacy-lock/index.js +1 -1
  112. package/dist/components/public-footer/index.js +1 -1
  113. package/dist/components/qr-code/index.d.ts +5 -0
  114. package/dist/components/qr-code/index.js +8 -0
  115. package/dist/components/qr-code/qr-code.agent.d.ts +3 -0
  116. package/dist/components/qr-code/qr-code.d.ts +59 -0
  117. package/dist/components/qr-code/qr-encode.d.ts +46 -0
  118. package/dist/components/rich-text-editor/index.js +1 -1
  119. package/dist/components/session-countdown/index.d.ts +4 -0
  120. package/dist/components/session-countdown/index.js +6 -0
  121. package/dist/components/session-countdown/session-countdown.agent.d.ts +3 -0
  122. package/dist/components/session-countdown/session-countdown.d.ts +38 -0
  123. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  124. package/dist/components/social-sign-in-button/index.d.ts +3 -0
  125. package/dist/components/social-sign-in-button/index.js +5 -0
  126. package/dist/components/social-sign-in-button/social-sign-in-button.d.ts +56 -0
  127. package/dist/components/unit-converter/index.d.ts +4 -0
  128. package/dist/components/unit-converter/index.js +9 -0
  129. package/dist/components/unit-converter/unit-converter.d.ts +21 -0
  130. package/dist/components/unit-converter/units.d.ts +18 -0
  131. package/dist/components/wallet-pay-button/index.d.ts +3 -0
  132. package/dist/components/wallet-pay-button/index.js +5 -0
  133. package/dist/components/wallet-pay-button/wallet-pay-button.d.ts +63 -0
  134. package/dist/i18n/locales/ar.d.ts +252 -0
  135. package/dist/i18n/locales/ar.js +249 -0
  136. package/dist/i18n/locales/de.d.ts +252 -0
  137. package/dist/i18n/locales/de.js +249 -0
  138. package/dist/i18n/locales/el.d.ts +252 -0
  139. package/dist/i18n/locales/el.js +249 -0
  140. package/dist/i18n/locales/en.d.ts +252 -0
  141. package/dist/i18n/locales/en.js +252 -0
  142. package/dist/i18n/locales/es.d.ts +252 -0
  143. package/dist/i18n/locales/es.js +249 -0
  144. package/dist/i18n/locales/fr.d.ts +252 -0
  145. package/dist/i18n/locales/fr.js +249 -0
  146. package/dist/i18n/locales/hi.d.ts +252 -0
  147. package/dist/i18n/locales/hi.js +249 -0
  148. package/dist/i18n/locales/it.d.ts +252 -0
  149. package/dist/i18n/locales/it.js +249 -0
  150. package/dist/i18n/locales/ja.d.ts +252 -0
  151. package/dist/i18n/locales/ja.js +245 -0
  152. package/dist/i18n/locales/nl.d.ts +252 -0
  153. package/dist/i18n/locales/nl.js +249 -0
  154. package/dist/i18n/locales/pl.d.ts +252 -0
  155. package/dist/i18n/locales/pl.js +249 -0
  156. package/dist/i18n/locales/pt.d.ts +252 -0
  157. package/dist/i18n/locales/pt.js +252 -0
  158. package/dist/i18n/locales/ro.d.ts +252 -0
  159. package/dist/i18n/locales/ro.js +249 -0
  160. package/dist/i18n/locales/ru.d.ts +252 -0
  161. package/dist/i18n/locales/ru.js +249 -0
  162. package/dist/i18n/locales/sq.d.ts +252 -0
  163. package/dist/i18n/locales/sq.js +249 -0
  164. package/dist/i18n/locales/sv.d.ts +252 -0
  165. package/dist/i18n/locales/sv.js +249 -0
  166. package/dist/i18n/locales/tr.d.ts +252 -0
  167. package/dist/i18n/locales/tr.js +249 -0
  168. package/dist/i18n/locales/zh.d.ts +252 -0
  169. package/dist/i18n/locales/zh.js +245 -0
  170. package/dist/index.js +587 -535
  171. package/dist/locales/ar.json +252 -0
  172. package/dist/locales/de.json +252 -0
  173. package/dist/locales/el.json +252 -0
  174. package/dist/locales/en.json +252 -0
  175. package/dist/locales/es.json +252 -0
  176. package/dist/locales/fr.json +252 -0
  177. package/dist/locales/hi.json +252 -0
  178. package/dist/locales/it.json +252 -0
  179. package/dist/locales/ja.json +252 -0
  180. package/dist/locales/nl.json +252 -0
  181. package/dist/locales/pl.json +252 -0
  182. package/dist/locales/pt.json +252 -0
  183. package/dist/locales/ro.json +252 -0
  184. package/dist/locales/ru.json +252 -0
  185. package/dist/locales/sq.json +252 -0
  186. package/dist/locales/sv.json +252 -0
  187. package/dist/locales/tr.json +252 -0
  188. package/dist/locales/zh.json +252 -0
  189. package/dist/patterns/alia-assistant/index.js +1 -1
  190. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  191. package/dist/patterns/patient-shell/index.js +1 -1
  192. package/dist/tokens.css +1 -1
  193. package/package.json +49 -1
  194. package/dist/_chunks/bmi-calculator-DQD5_nE-.js +0 -214
  195. package/dist/_chunks/due-date-calculator-kf9U_g7O.js +0 -173
  196. package/dist/_chunks/subDays-D-WYRpdW.js +0 -8
@@ -1,5 +1,5 @@
1
1
  import { jsxs as k, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as se, useId as re, useMemo as j, useState as H, useEffect as w, useRef as B, useImperativeHandle as ie, useCallback as _ } from "react";
2
+ import { forwardRef as se, useId as re, useMemo as I, useState as H, useEffect as w, useRef as B, useImperativeHandle as ie, useCallback as R } from "react";
3
3
  import { useEditor as oe, EditorContent as ne } from "@tiptap/react";
4
4
  import ae from "@tiptap/starter-kit";
5
5
  import de from "@tiptap/extension-link";
@@ -9,112 +9,102 @@ import ue from "@tiptap/extension-table-row";
9
9
  import me from "@tiptap/extension-table-cell";
10
10
  import fe from "@tiptap/extension-table-header";
11
11
  import { Markdown as he } from "tiptap-markdown";
12
- import be from "./purify.es-Cm3utOpm.js";
12
+ import pe from "./purify.es-Cm3utOpm.js";
13
13
  import { c as S } from "./index-D2ZczOXr.js";
14
14
  import { useTranslation as U } from "react-i18next";
15
15
  import * as z from "@radix-ui/react-dialog";
16
- import { u as pe } from "./registry-nPAVE19X.js";
17
- import { s as ge } from "./safe-image-src-DstKgCo7.js";
18
- import { X as ve } from "./x-CCcI3eJp.js";
16
+ import { u as be } from "./registry-nPAVE19X.js";
17
+ import { s as ve } from "./safe-image-src-DstKgCo7.js";
18
+ import { X as ge } from "./x-CCcI3eJp.js";
19
19
  import { C as ke } from "./chevron-down-BX_NP2Yh.js";
20
20
  import { c as m } from "./createLucideIcon-CrFbzy84.js";
21
+ import { I as ye } from "./image-C6RM5hfF.js";
21
22
  /**
22
23
  * @license lucide-react v1.8.0 - ISC
23
24
  *
24
25
  * This source code is licensed under the ISC license.
25
26
  * See the LICENSE file in the root directory of this source tree.
26
27
  */
27
- const ye = [
28
+ const xe = [
28
29
  [
29
30
  "path",
30
31
  { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
31
32
  ]
32
- ], xe = m("bold", ye);
33
+ ], ze = m("bold", xe);
33
34
  /**
34
35
  * @license lucide-react v1.8.0 - ISC
35
36
  *
36
37
  * This source code is licensed under the ISC license.
37
38
  * See the LICENSE file in the root directory of this source tree.
38
39
  */
39
- const ze = [
40
+ const we = [
40
41
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
41
42
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
42
- ], we = m("code", ze);
43
+ ], Me = m("code", we);
43
44
  /**
44
45
  * @license lucide-react v1.8.0 - ISC
45
46
  *
46
47
  * This source code is licensed under the ISC license.
47
48
  * See the LICENSE file in the root directory of this source tree.
48
49
  */
49
- const Me = [
50
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
51
- ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
52
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
53
- ], Ne = m("image", Me);
54
- /**
55
- * @license lucide-react v1.8.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */
60
- const Ae = [
50
+ const Ne = [
61
51
  ["line", { x1: "19", x2: "10", y1: "4", y2: "4", key: "15jd3p" }],
62
52
  ["line", { x1: "14", x2: "5", y1: "20", y2: "20", key: "bu0au3" }],
63
53
  ["line", { x1: "15", x2: "9", y1: "4", y2: "20", key: "uljnxc" }]
64
- ], Ce = m("italic", Ae);
54
+ ], Ae = m("italic", Ne);
65
55
  /**
66
56
  * @license lucide-react v1.8.0 - ISC
67
57
  *
68
58
  * This source code is licensed under the ISC license.
69
59
  * See the LICENSE file in the root directory of this source tree.
70
60
  */
71
- const Le = [
61
+ const Ce = [
72
62
  ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
73
63
  ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
74
64
  ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
75
- ], Te = m("link-2", Le);
65
+ ], Le = m("link-2", Ce);
76
66
  /**
77
67
  * @license lucide-react v1.8.0 - ISC
78
68
  *
79
69
  * This source code is licensed under the ISC license.
80
70
  * See the LICENSE file in the root directory of this source tree.
81
71
  */
82
- const _e = [
72
+ const Te = [
83
73
  ["path", { d: "M11 5h10", key: "1cz7ny" }],
84
74
  ["path", { d: "M11 12h10", key: "1438ji" }],
85
75
  ["path", { d: "M11 19h10", key: "11t30w" }],
86
76
  ["path", { d: "M4 4h1v5", key: "10yrso" }],
87
77
  ["path", { d: "M4 9h2", key: "r1h2o0" }],
88
78
  ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02", key: "xtkcd5" }]
89
- ], Re = m("list-ordered", _e);
79
+ ], Re = m("list-ordered", Te);
90
80
  /**
91
81
  * @license lucide-react v1.8.0 - ISC
92
82
  *
93
83
  * This source code is licensed under the ISC license.
94
84
  * See the LICENSE file in the root directory of this source tree.
95
85
  */
96
- const je = [
86
+ const _e = [
97
87
  ["path", { d: "M3 5h.01", key: "18ugdj" }],
98
88
  ["path", { d: "M3 12h.01", key: "nlz23k" }],
99
89
  ["path", { d: "M3 19h.01", key: "noohij" }],
100
90
  ["path", { d: "M8 5h13", key: "1pao27" }],
101
91
  ["path", { d: "M8 12h13", key: "1za7za" }],
102
92
  ["path", { d: "M8 19h13", key: "m83p4d" }]
103
- ], Ie = m("list", je);
93
+ ], Ie = m("list", _e);
104
94
  /**
105
95
  * @license lucide-react v1.8.0 - ISC
106
96
  *
107
97
  * This source code is licensed under the ISC license.
108
98
  * See the LICENSE file in the root directory of this source tree.
109
99
  */
110
- const He = [["path", { d: "M5 12h14", key: "1ays0h" }]], Be = m("minus", He);
100
+ const je = [["path", { d: "M5 12h14", key: "1ays0h" }]], He = m("minus", je);
111
101
  /**
112
102
  * @license lucide-react v1.8.0 - ISC
113
103
  *
114
104
  * This source code is licensed under the ISC license.
115
105
  * See the LICENSE file in the root directory of this source tree.
116
106
  */
117
- const Se = [
107
+ const Be = [
118
108
  [
119
109
  "path",
120
110
  {
@@ -129,7 +119,7 @@ const Se = [
129
119
  key: "1ymkrd"
130
120
  }
131
121
  ]
132
- ], $e = m("quote", Se);
122
+ ], Se = m("quote", Be);
133
123
  /**
134
124
  * @license lucide-react v1.8.0 - ISC
135
125
  *
@@ -139,29 +129,29 @@ const Se = [
139
129
  const De = [
140
130
  ["path", { d: "M21 7v6h-6", key: "3ptur4" }],
141
131
  ["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7", key: "1kgawr" }]
142
- ], Ee = m("redo", De);
132
+ ], $e = m("redo", De);
143
133
  /**
144
134
  * @license lucide-react v1.8.0 - ISC
145
135
  *
146
136
  * This source code is licensed under the ISC license.
147
137
  * See the LICENSE file in the root directory of this source tree.
148
138
  */
149
- const Ke = [
139
+ const Ee = [
150
140
  ["path", { d: "M12 3v18", key: "108xh3" }],
151
141
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
152
142
  ["path", { d: "M3 9h18", key: "1pudct" }],
153
143
  ["path", { d: "M3 15h18", key: "5xshup" }]
154
- ], qe = m("table", Ke);
144
+ ], Ke = m("table", Ee);
155
145
  /**
156
146
  * @license lucide-react v1.8.0 - ISC
157
147
  *
158
148
  * This source code is licensed under the ISC license.
159
149
  * See the LICENSE file in the root directory of this source tree.
160
150
  */
161
- const Fe = [
151
+ const qe = [
162
152
  ["path", { d: "M3 7v6h6", key: "1v2h90" }],
163
153
  ["path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13", key: "1r6uu6" }]
164
- ], Ve = m("undo", Fe), Pe = {
154
+ ], Fe = m("undo", qe), Ve = {
165
155
  id: "rich-text-editor",
166
156
  capabilities: ["edit_inline"],
167
157
  state: {
@@ -181,8 +171,8 @@ const Fe = [
181
171
  safety: "destructive",
182
172
  argsType: "{ html: string }",
183
173
  description: "Replace the editor content. Loses unsaved input.",
184
- invoke: (a, g) => {
185
- a.setContent(g.html);
174
+ invoke: (a, v) => {
175
+ a.setContent(v.html);
186
176
  }
187
177
  },
188
178
  clear: {
@@ -208,7 +198,7 @@ const Fe = [
208
198
  description: "Sourced from the id prop."
209
199
  }
210
200
  }
211
- }, Ze = {
201
+ }, Pe = {
212
202
  FORBID_TAGS: [
213
203
  "script",
214
204
  "style",
@@ -228,12 +218,12 @@ const Fe = [
228
218
  "onblur"
229
219
  ]
230
220
  };
231
- function I(a) {
232
- return be.sanitize(a, Ze);
221
+ function j(a) {
222
+ return pe.sanitize(a, Pe);
233
223
  }
234
- const Ue = S(
224
+ const Ze = S(
235
225
  "tiptap-theme-alfadocs ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"
236
- ), Ge = S(
226
+ ), Ue = S(
237
227
  [
238
228
  "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
239
229
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
@@ -277,12 +267,12 @@ const Ue = S(
277
267
  },
278
268
  defaultVariants: { pressed: !1, disabled: !1 }
279
269
  }
280
- ), Qe = S(
270
+ ), Ge = S(
281
271
  [
282
272
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)]",
283
273
  "ds:bg-[var(--background)] ds:text-[var(--foreground)]"
284
274
  ].join(" ")
285
- ), Xe = {
275
+ ), Qe = {
286
276
  minimal: ["bold", "italic", "link"],
287
277
  standard: [
288
278
  "bold",
@@ -309,22 +299,22 @@ const Ue = S(
309
299
  "redo"
310
300
  ]
311
301
  };
312
- function Ye({
302
+ function Xe({
313
303
  editor: a,
314
- registerRef: g,
304
+ registerRef: v,
315
305
  tabIndex: l,
316
306
  onFocus: h,
317
- onKeyDown: R,
307
+ onKeyDown: _,
318
308
  label: M,
319
309
  disabled: i,
320
- pressed: $
310
+ pressed: D
321
311
  }) {
322
312
  const [y, N] = H(!1), A = B(null);
323
313
  w(() => {
324
314
  if (!y) return;
325
- function c(D) {
326
- const v = D.target;
327
- A.current && v && !A.current.contains(v) && N(!1);
315
+ function c($) {
316
+ const g = $.target;
317
+ A.current && g && !A.current.contains(g) && N(!1);
328
318
  }
329
319
  return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
330
320
  }, [y]);
@@ -336,10 +326,10 @@ function Ye({
336
326
  "button",
337
327
  {
338
328
  type: "button",
339
- ref: g,
329
+ ref: v,
340
330
  tabIndex: l,
341
331
  onFocus: h,
342
- onKeyDown: R,
332
+ onKeyDown: _,
343
333
  onClick: () => {
344
334
  i || N((c) => !c);
345
335
  },
@@ -348,7 +338,7 @@ function Ye({
348
338
  "aria-disabled": i || void 0,
349
339
  "aria-label": M,
350
340
  title: M,
351
- className: G({ pressed: $, disabled: i }),
341
+ className: G({ pressed: D, disabled: i }),
352
342
  children: [
353
343
  /* @__PURE__ */ r(
354
344
  "span",
@@ -404,12 +394,12 @@ function Ye({
404
394
  ) : null
405
395
  ] });
406
396
  }
407
- function Je({
397
+ function Ye({
408
398
  open: a,
409
- onOpenChange: g
399
+ onOpenChange: v
410
400
  }) {
411
401
  const { t: l } = U();
412
- return /* @__PURE__ */ r(z.Root, { open: a, onOpenChange: g, children: /* @__PURE__ */ k(z.Portal, { children: [
402
+ return /* @__PURE__ */ r(z.Root, { open: a, onOpenChange: v, children: /* @__PURE__ */ k(z.Portal, { children: [
413
403
  /* @__PURE__ */ r(
414
404
  z.Overlay,
415
405
  {
@@ -452,7 +442,7 @@ function Je({
452
442
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
453
443
  ].join(" "),
454
444
  children: /* @__PURE__ */ r(
455
- ve,
445
+ ge,
456
446
  {
457
447
  "aria-hidden": "true",
458
448
  className: "ds:block-size-4 ds:inline-size-4"
@@ -494,23 +484,23 @@ function Je({
494
484
  )
495
485
  ] }) });
496
486
  }
497
- const We = se(
487
+ const Je = se(
498
488
  ({
499
489
  id: a,
500
- defaultValue: g,
490
+ defaultValue: v,
501
491
  value: l,
502
492
  onChange: h,
503
- toolbar: R = "standard",
493
+ toolbar: _ = "standard",
504
494
  placeholder: M,
505
495
  readOnly: i = !1,
506
- ariaLabel: $,
496
+ ariaLabel: D,
507
497
  minHeight: y,
508
498
  className: N
509
499
  }, A) => {
510
- const { t: o } = U(), c = re(), D = j(
500
+ const { t: o } = U(), c = re(), $ = I(
511
501
  () => `rte-${c.replace(/[^a-zA-Z0-9-_]/g, "")}`,
512
502
  [c]
513
- ), [v, Q] = H(!1);
503
+ ), [g, Q] = H(!1);
514
504
  w(() => {
515
505
  typeof document > "u" || Q(document.documentElement.dir === "rtl");
516
506
  }, []);
@@ -518,10 +508,10 @@ const We = se(
518
508
  w(() => {
519
509
  L.current = h;
520
510
  }, [h]);
521
- const Y = j(() => {
522
- const s = l ?? g ?? "";
523
- return s ? I(s) : "";
524
- }, [g, l]), e = oe({
511
+ const Y = I(() => {
512
+ const s = l ?? v ?? "";
513
+ return s ? j(s) : "";
514
+ }, [v, l]), e = oe({
525
515
  extensions: [
526
516
  ae.configure({
527
517
  heading: { levels: [1, 2, 3] }
@@ -552,11 +542,11 @@ const We = se(
552
542
  attributes: {
553
543
  role: "textbox",
554
544
  "aria-multiline": "true",
555
- "aria-label": $ ?? o("editor.placeholder"),
545
+ "aria-label": D ?? o("editor.placeholder"),
556
546
  "data-placeholder": M ?? o("editor.placeholder")
557
547
  },
558
548
  transformPastedHTML(s) {
559
- return I(s);
549
+ return j(s);
560
550
  },
561
551
  handleKeyDown(s, t) {
562
552
  return (t.metaKey || t.ctrlKey) && t.key === "/" ? (t.preventDefault(), F(!0), !0) : !1;
@@ -564,9 +554,9 @@ const We = se(
564
554
  },
565
555
  onUpdate({ editor: s }) {
566
556
  L.current && (C.current && clearTimeout(C.current), C.current = setTimeout(() => {
567
- var d, b, p;
568
- const t = s.getHTML(), f = ((b = (d = s.storage.markdown) == null ? void 0 : d.getMarkdown) == null ? void 0 : b.call(d)) ?? "";
569
- (p = L.current) == null || p.call(L, { html: t, markdown: f });
557
+ var d, p, b;
558
+ const t = s.getHTML(), f = ((p = (d = s.storage.markdown) == null ? void 0 : d.getMarkdown) == null ? void 0 : p.call(d)) ?? "";
559
+ (b = L.current) == null || b.call(L, { html: t, markdown: f });
570
560
  }, 100));
571
561
  }
572
562
  });
@@ -576,10 +566,10 @@ const We = se(
576
566
  e && e.setEditable(!i);
577
567
  }, [e, i]), w(() => {
578
568
  if (!e || l === void 0 || e.getHTML() === l) return;
579
- const t = I(l);
569
+ const t = j(l);
580
570
  e.commands.setContent(t, { emitUpdate: !1 });
581
571
  }, [e, l]);
582
- const E = j(
572
+ const E = I(
583
573
  () => ({
584
574
  getHTML() {
585
575
  return (e == null ? void 0 : e.getHTML()) ?? "";
@@ -590,7 +580,7 @@ const We = se(
590
580
  },
591
581
  setContent(s) {
592
582
  if (!e) return;
593
- const t = I(s);
583
+ const t = j(s);
594
584
  e.commands.setContent(t);
595
585
  },
596
586
  focus() {
@@ -602,25 +592,25 @@ const We = se(
602
592
  }),
603
593
  [e]
604
594
  );
605
- ie(A, () => E, [E]), pe(Pe, E, a);
606
- const V = B([]), [T, K] = H(0), q = j(() => Xe[R], [R]), J = _(
595
+ ie(A, () => E, [E]), be(Ve, E, a);
596
+ const V = B([]), [T, K] = H(0), q = I(() => Qe[_], [_]), J = R(
607
597
  (s) => (t) => {
608
598
  V.current[s] = t;
609
599
  },
610
600
  []
611
- ), P = _((s) => {
601
+ ), P = R((s) => {
612
602
  const t = V.current[s];
613
603
  t && t.focus();
614
- }, []), Z = _(
604
+ }, []), Z = R(
615
605
  (s) => {
616
606
  const t = q.length;
617
607
  if (t === 0) return;
618
- const u = v ? "ArrowLeft" : "ArrowRight", f = v ? "ArrowRight" : "ArrowLeft";
608
+ const u = g ? "ArrowLeft" : "ArrowRight", f = g ? "ArrowRight" : "ArrowLeft";
619
609
  let d = null;
620
610
  s.key === u ? d = (T + 1) % t : s.key === f ? d = (T - 1 + t) % t : s.key === "Home" ? d = 0 : s.key === "End" && (d = t - 1), d !== null && (s.preventDefault(), K(d), P(d));
621
611
  },
622
- [T, P, v, q.length]
623
- ), W = _(
612
+ [T, P, g, q.length]
613
+ ), W = R(
624
614
  (s) => {
625
615
  if (s.preventDefault(), !e) return;
626
616
  const t = e.getAttributes("link").href, u = window.prompt(o("editor.link.insert"), t ?? "");
@@ -633,11 +623,11 @@ const We = se(
633
623
  /^(https?:|mailto:|tel:)/i.test(f) && e.chain().focus().extendMarkRange("link").setLink({ href: f }).run();
634
624
  },
635
625
  [e, o]
636
- ), O = _(() => {
626
+ ), O = R(() => {
637
627
  if (!e) return;
638
628
  const s = window.prompt(o("editor.image.insert"), "");
639
629
  if (s === null) return;
640
- const t = ge(s);
630
+ const t = ve(s);
641
631
  t && e.chain().focus().setImage({ src: t }).run();
642
632
  }, [e, o]);
643
633
  function ee(s, t) {
@@ -647,7 +637,7 @@ const We = se(
647
637
  onFocus: () => K(t),
648
638
  onKeyDown: Z
649
639
  }, d = (n, x) => G({ pressed: n, disabled: x });
650
- function b(n) {
640
+ function p(n) {
651
641
  return /* @__PURE__ */ r(
652
642
  "button",
653
643
  {
@@ -667,7 +657,7 @@ const We = se(
667
657
  }
668
658
  );
669
659
  }
670
- function p(n) {
660
+ function b(n) {
671
661
  return /* @__PURE__ */ r(
672
662
  "button",
673
663
  {
@@ -692,14 +682,14 @@ const We = se(
692
682
  }
693
683
  switch (s) {
694
684
  case "bold":
695
- return b({
685
+ return p({
696
686
  label: o("editor.bold"),
697
687
  pressed: e.isActive("bold"),
698
688
  disabled: i,
699
689
  shortcut: "Control+B Meta+B",
700
690
  onActivate: () => e.chain().focus().toggleBold().run(),
701
691
  icon: /* @__PURE__ */ r(
702
- xe,
692
+ ze,
703
693
  {
704
694
  "aria-hidden": "true",
705
695
  className: "ds:block-size-4 ds:inline-size-4"
@@ -707,14 +697,14 @@ const We = se(
707
697
  )
708
698
  });
709
699
  case "italic":
710
- return b({
700
+ return p({
711
701
  label: o("editor.italic"),
712
702
  pressed: e.isActive("italic"),
713
703
  disabled: i,
714
704
  shortcut: "Control+I Meta+I",
715
705
  onActivate: () => e.chain().focus().toggleItalic().run(),
716
706
  icon: /* @__PURE__ */ r(
717
- Ce,
707
+ Ae,
718
708
  {
719
709
  "aria-hidden": "true",
720
710
  className: "ds:block-size-4 ds:inline-size-4"
@@ -722,13 +712,13 @@ const We = se(
722
712
  )
723
713
  });
724
714
  case "link":
725
- return p({
715
+ return b({
726
716
  label: o("editor.link.insert"),
727
717
  disabled: i,
728
718
  shortcut: "Control+K Meta+K",
729
719
  onActivate: W,
730
720
  icon: /* @__PURE__ */ r(
731
- Te,
721
+ Le,
732
722
  {
733
723
  "aria-hidden": "true",
734
724
  className: "ds:block-size-4 ds:inline-size-4"
@@ -737,7 +727,7 @@ const We = se(
737
727
  });
738
728
  case "heading":
739
729
  return /* @__PURE__ */ r(
740
- Ye,
730
+ Xe,
741
731
  {
742
732
  editor: e,
743
733
  registerRef: u,
@@ -750,7 +740,7 @@ const We = se(
750
740
  }
751
741
  );
752
742
  case "bulletList":
753
- return b({
743
+ return p({
754
744
  label: o("editor.list.bullet"),
755
745
  pressed: e.isActive("bulletList"),
756
746
  disabled: i,
@@ -764,7 +754,7 @@ const We = se(
764
754
  )
765
755
  });
766
756
  case "orderedList":
767
- return b({
757
+ return p({
768
758
  label: o("editor.list.ordered"),
769
759
  pressed: e.isActive("orderedList"),
770
760
  disabled: i,
@@ -778,13 +768,13 @@ const We = se(
778
768
  )
779
769
  });
780
770
  case "quote":
781
- return b({
771
+ return p({
782
772
  label: o("editor.quote"),
783
773
  pressed: e.isActive("blockquote"),
784
774
  disabled: i,
785
775
  onActivate: () => e.chain().focus().toggleBlockquote().run(),
786
776
  icon: /* @__PURE__ */ r(
787
- $e,
777
+ Se,
788
778
  {
789
779
  "aria-hidden": "true",
790
780
  className: "ds:block-size-4 ds:inline-size-4"
@@ -792,12 +782,12 @@ const We = se(
792
782
  )
793
783
  });
794
784
  case "image":
795
- return p({
785
+ return b({
796
786
  label: o("editor.image.insert"),
797
787
  disabled: i,
798
788
  onActivate: O,
799
789
  icon: /* @__PURE__ */ r(
800
- Ne,
790
+ ye,
801
791
  {
802
792
  "aria-hidden": "true",
803
793
  className: "ds:block-size-4 ds:inline-size-4"
@@ -805,12 +795,12 @@ const We = se(
805
795
  )
806
796
  });
807
797
  case "table":
808
- return p({
798
+ return b({
809
799
  label: o("editor.table.insert"),
810
800
  disabled: i,
811
801
  onActivate: () => e.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: !0 }).run(),
812
802
  icon: /* @__PURE__ */ r(
813
- qe,
803
+ Ke,
814
804
  {
815
805
  "aria-hidden": "true",
816
806
  className: "ds:block-size-4 ds:inline-size-4"
@@ -818,13 +808,13 @@ const We = se(
818
808
  )
819
809
  });
820
810
  case "codeBlock":
821
- return b({
811
+ return p({
822
812
  label: o("editor.codeBlock"),
823
813
  pressed: e.isActive("codeBlock"),
824
814
  disabled: i,
825
815
  onActivate: () => e.chain().focus().toggleCodeBlock().run(),
826
816
  icon: /* @__PURE__ */ r(
827
- we,
817
+ Me,
828
818
  {
829
819
  "aria-hidden": "true",
830
820
  className: "ds:block-size-4 ds:inline-size-4"
@@ -832,12 +822,12 @@ const We = se(
832
822
  )
833
823
  });
834
824
  case "horizontalRule":
835
- return p({
825
+ return b({
836
826
  label: o("editor.horizontalRule"),
837
827
  disabled: i,
838
828
  onActivate: () => e.chain().focus().setHorizontalRule().run(),
839
829
  icon: /* @__PURE__ */ r(
840
- Be,
830
+ He,
841
831
  {
842
832
  "aria-hidden": "true",
843
833
  className: "ds:block-size-4 ds:inline-size-4"
@@ -845,13 +835,13 @@ const We = se(
845
835
  )
846
836
  });
847
837
  case "undo":
848
- return p({
838
+ return b({
849
839
  label: o("editor.undo"),
850
840
  disabled: i || !e.can().undo(),
851
841
  shortcut: "Control+Z Meta+Z",
852
842
  onActivate: () => e.chain().focus().undo().run(),
853
843
  icon: /* @__PURE__ */ r(
854
- Ve,
844
+ Fe,
855
845
  {
856
846
  "aria-hidden": "true",
857
847
  className: "ds:block-size-4 ds:inline-size-4"
@@ -859,13 +849,13 @@ const We = se(
859
849
  )
860
850
  });
861
851
  case "redo":
862
- return p({
852
+ return b({
863
853
  label: o("editor.redo"),
864
854
  disabled: i || !e.can().redo(),
865
855
  shortcut: "Control+Shift+Z Meta+Shift+Z",
866
856
  onActivate: () => e.chain().focus().redo().run(),
867
857
  icon: /* @__PURE__ */ r(
868
- Ee,
858
+ $e,
869
859
  {
870
860
  "aria-hidden": "true",
871
861
  className: "ds:block-size-4 ds:inline-size-4"
@@ -891,9 +881,9 @@ const We = se(
891
881
  return /* @__PURE__ */ k(
892
882
  "div",
893
883
  {
894
- id: D,
895
- className: [Ue(), N].filter(Boolean).join(" "),
896
- dir: v ? "rtl" : void 0,
884
+ id: $,
885
+ className: [Ze(), N].filter(Boolean).join(" "),
886
+ dir: g ? "rtl" : void 0,
897
887
  "data-component": "rich-text-editor",
898
888
  "data-component-id": a,
899
889
  children: [
@@ -902,30 +892,30 @@ const We = se(
902
892
  {
903
893
  role: "toolbar",
904
894
  "aria-label": o("editor.toolbarLabel"),
905
- className: Ge({ direction: v ? "rtl" : "ltr" }),
895
+ className: Ue({ direction: g ? "rtl" : "ltr" }),
906
896
  children: q.map((s, t) => /* @__PURE__ */ r("span", { className: "ds:contents", children: ee(s, t) }, s))
907
897
  }
908
898
  ),
909
899
  /* @__PURE__ */ r(
910
900
  "div",
911
901
  {
912
- className: [Qe(), te].filter(Boolean).join(" "),
902
+ className: [Ge(), te].filter(Boolean).join(" "),
913
903
  children: /* @__PURE__ */ r(ne, { editor: e })
914
904
  }
915
905
  ),
916
- /* @__PURE__ */ r(Je, { open: X, onOpenChange: F })
906
+ /* @__PURE__ */ r(Ye, { open: X, onOpenChange: F })
917
907
  ]
918
908
  }
919
909
  );
920
910
  }
921
911
  );
922
- We.displayName = "RichTextEditor";
912
+ Je.displayName = "RichTextEditor";
923
913
  export {
924
- We as R,
925
- Ge as a,
926
- Qe as e,
927
- Pe as r,
914
+ Je as R,
915
+ Ue as a,
916
+ Ge as e,
917
+ Ve as r,
928
918
  G as t,
929
- Ue as w
919
+ Ze as w
930
920
  };
931
- //# sourceMappingURL=rich-text-editor-CHmr9Bz8.js.map
921
+ //# sourceMappingURL=rich-text-editor-DLbg2852.js.map