@commercetools/nimbus 0.0.0-canary-20251024075337 → 0.0.0-canary-20251024090130

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 (308) hide show
  1. package/dist/chunks/{Button-CafJrK0a.es.js → Button-C4ud7YxN.es.js} +3 -3
  2. package/dist/chunks/{Button-CafJrK0a.es.js.map → Button-C4ud7YxN.es.js.map} +1 -1
  3. package/dist/chunks/{DateField-BjKTTWs5.es.js → DateField-oXtVK-_5.es.js} +6 -6
  4. package/dist/chunks/{DateField-BjKTTWs5.es.js.map → DateField-oXtVK-_5.es.js.map} +1 -1
  5. package/dist/chunks/{DatePicker-BrgxRTyS.es.js → DatePicker-DrWdEOUQ.es.js} +40 -40
  6. package/dist/chunks/{DatePicker-BrgxRTyS.es.js.map → DatePicker-DrWdEOUQ.es.js.map} +1 -1
  7. package/dist/chunks/{Dialog-Cx5MzP6O.es.js → Dialog-C3sNnu1k.es.js} +5 -5
  8. package/dist/chunks/{Dialog-Cx5MzP6O.es.js.map → Dialog-C3sNnu1k.es.js.map} +1 -1
  9. package/dist/chunks/{Group-Bd9Zcn-V.es.js → Group-CiDvtaeM.es.js} +2 -2
  10. package/dist/chunks/{Group-Bd9Zcn-V.es.js.map → Group-CiDvtaeM.es.js.map} +1 -1
  11. package/dist/chunks/{Header-D6CYH5C_.es.js → Header-BxizMPpp.es.js} +2 -2
  12. package/dist/chunks/{Header-D6CYH5C_.es.js.map → Header-BxizMPpp.es.js.map} +1 -1
  13. package/dist/chunks/{Heading-DPlDZAaf.es.js → Heading-CAI_WTdS.es.js} +14 -14
  14. package/dist/chunks/{Heading-DPlDZAaf.es.js.map → Heading-CAI_WTdS.es.js.map} +1 -1
  15. package/dist/chunks/{Input-EnWCwj65.es.js → Input-De-sfAtq.es.js} +2 -2
  16. package/dist/chunks/{Input-EnWCwj65.es.js.map → Input-De-sfAtq.es.js.map} +1 -1
  17. package/dist/chunks/{Label-7OK510ha.es.js → Label-BS7NIWvY.es.js} +2 -2
  18. package/dist/chunks/{Label-7OK510ha.es.js.map → Label-BS7NIWvY.es.js.map} +1 -1
  19. package/dist/chunks/{ListBox-C4BToxCj.es.js → ListBox-BfRQSQ3P.es.js} +4 -4
  20. package/dist/chunks/{ListBox-C4BToxCj.es.js.map → ListBox-BfRQSQ3P.es.js.map} +1 -1
  21. package/dist/chunks/{Modal-DowTFCAo.es.js → Modal-BTJk-mW-.es.js} +3 -3
  22. package/dist/chunks/{Modal-DowTFCAo.es.js.map → Modal-BTJk-mW-.es.js.map} +1 -1
  23. package/dist/chunks/{ProgressBar-DA797ATA.es.js → ProgressBar-Dl4ZrjfX.es.js} +3 -3
  24. package/dist/chunks/{ProgressBar-DA797ATA.es.js.map → ProgressBar-Dl4ZrjfX.es.js.map} +1 -1
  25. package/dist/chunks/{Separator-B0kvBk7k.es.js → Separator-BOfmJd-0.es.js} +2 -2
  26. package/dist/chunks/{Separator-B0kvBk7k.es.js.map → Separator-BOfmJd-0.es.js.map} +1 -1
  27. package/dist/chunks/{TextArea-B__-6Fht.es.js → TextArea-DR4R6vJD.es.js} +2 -2
  28. package/dist/chunks/{TextArea-B__-6Fht.es.js.map → TextArea-DR4R6vJD.es.js.map} +1 -1
  29. package/dist/chunks/{ToggleButton-wAaapRtE.es.js → ToggleButton-DMoUAyoo.es.js} +2 -2
  30. package/dist/chunks/{ToggleButton-wAaapRtE.es.js.map → ToggleButton-DMoUAyoo.es.js.map} +1 -1
  31. package/dist/chunks/{accordion-BMztnndo.es.js → accordion-DyTTsrDh.es.js} +4 -4
  32. package/dist/chunks/{accordion-BMztnndo.es.js.map → accordion-DyTTsrDh.es.js.map} +1 -1
  33. package/dist/chunks/{alert-DEy9gf3U.es.js → alert-DCm-d72j.es.js} +2 -2
  34. package/dist/chunks/{alert-DEy9gf3U.es.js.map → alert-DCm-d72j.es.js.map} +1 -1
  35. package/dist/chunks/avatar-BNhECwD5.cjs.js +2 -0
  36. package/dist/chunks/avatar-BNhECwD5.cjs.js.map +1 -0
  37. package/dist/chunks/avatar-DFibCsCs.es.js +47 -0
  38. package/dist/chunks/avatar-DFibCsCs.es.js.map +1 -0
  39. package/dist/chunks/{button-B4vE-tAz.es.js → button-Ccof5UcQ.es.js} +4 -4
  40. package/dist/chunks/{button-B4vE-tAz.es.js.map → button-Ccof5UcQ.es.js.map} +1 -1
  41. package/dist/chunks/calendar-CcA9vDZ_.es.js +209 -0
  42. package/dist/chunks/calendar-CcA9vDZ_.es.js.map +1 -0
  43. package/dist/chunks/calendar-Dm2LIuao.cjs.js +2 -0
  44. package/dist/chunks/calendar-Dm2LIuao.cjs.js.map +1 -0
  45. package/dist/chunks/{checkbox-B-1U4AKF.es.js → checkbox-CFDf2T7S.es.js} +3 -3
  46. package/dist/chunks/{checkbox-B-1U4AKF.es.js.map → checkbox-CFDf2T7S.es.js.map} +1 -1
  47. package/dist/chunks/{collapsible-motion-CeEspYkc.es.js → collapsible-motion-DmWoSXyS.es.js} +3 -3
  48. package/dist/chunks/{collapsible-motion-CeEspYkc.es.js.map → collapsible-motion-DmWoSXyS.es.js.map} +1 -1
  49. package/dist/chunks/combobox-BuuiDfjq.cjs.js +2 -0
  50. package/dist/chunks/combobox-BuuiDfjq.cjs.js.map +1 -0
  51. package/dist/chunks/{combobox-0cCAwg3W.es.js → combobox-C1DerhP1.es.js} +1064 -1032
  52. package/dist/chunks/combobox-C1DerhP1.es.js.map +1 -0
  53. package/dist/chunks/{data-table-BxITOPnx.es.js → data-table-BuGUlgQU.es.js} +1169 -1116
  54. package/dist/chunks/data-table-BuGUlgQU.es.js.map +1 -0
  55. package/dist/chunks/data-table-CyNImBEZ.cjs.js +2 -0
  56. package/dist/chunks/data-table-CyNImBEZ.cjs.js.map +1 -0
  57. package/dist/chunks/{date-input-D70l0IsY.es.js → date-input-B_T7Az3-.es.js} +4 -4
  58. package/dist/chunks/{date-input-D70l0IsY.es.js.map → date-input-B_T7Az3-.es.js.map} +1 -1
  59. package/dist/chunks/{date-picker-Dk3QgvCN.cjs.js → date-picker-BEDlqfYN.cjs.js} +2 -2
  60. package/dist/chunks/date-picker-BEDlqfYN.cjs.js.map +1 -0
  61. package/dist/chunks/{date-picker-FvaPPqXZ.es.js → date-picker-DcDxaZ6Y.es.js} +14 -14
  62. package/dist/chunks/date-picker-DcDxaZ6Y.es.js.map +1 -0
  63. package/dist/chunks/date-range-picker-C5G8uDlJ.es.js +358 -0
  64. package/dist/chunks/date-range-picker-C5G8uDlJ.es.js.map +1 -0
  65. package/dist/chunks/date-range-picker-vr0DE_0V.cjs.js +2 -0
  66. package/dist/chunks/date-range-picker-vr0DE_0V.cjs.js.map +1 -0
  67. package/dist/chunks/{dialog-Bsg1kLnV.es.js → dialog-C9OHxEA2.es.js} +2 -2
  68. package/dist/chunks/{dialog-Bsg1kLnV.es.js.map → dialog-C9OHxEA2.es.js.map} +1 -1
  69. package/dist/chunks/{dialog.title-BmLccUat.es.js → dialog.title-CGSRn_GL.es.js} +7 -7
  70. package/dist/chunks/{dialog.title-BmLccUat.es.js.map → dialog.title-CGSRn_GL.es.js.map} +1 -1
  71. package/dist/chunks/{draggable-list-CadviYoN.es.js → draggable-list-5SfJXtEK.es.js} +10 -10
  72. package/dist/chunks/{draggable-list-CadviYoN.es.js.map → draggable-list-5SfJXtEK.es.js.map} +1 -1
  73. package/dist/chunks/{drawer-BsHkmwKB.es.js → drawer-LRm6SeM-.es.js} +8 -8
  74. package/dist/chunks/{drawer-BsHkmwKB.es.js.map → drawer-LRm6SeM-.es.js.map} +1 -1
  75. package/dist/chunks/{extract-style-props-CTU5PJnh.es.js → extract-style-props-CZpdYA8m.es.js} +2 -2
  76. package/dist/chunks/{extract-style-props-CTU5PJnh.es.js.map → extract-style-props-CZpdYA8m.es.js.map} +1 -1
  77. package/dist/chunks/{form-field-CH7MhZMM.es.js → form-field-B6PqLujT.es.js} +3 -3
  78. package/dist/chunks/{form-field-CH7MhZMM.es.js.map → form-field-B6PqLujT.es.js.map} +1 -1
  79. package/dist/chunks/{group-DDgNGiAB.es.js → group-BLPsc2Lf.es.js} +2 -2
  80. package/dist/chunks/{group-DDgNGiAB.es.js.map → group-BLPsc2Lf.es.js.map} +1 -1
  81. package/dist/chunks/{heading-DwvFL6nk.es.js → heading-14HwlWvH.es.js} +2 -2
  82. package/dist/chunks/{heading-DwvFL6nk.es.js.map → heading-14HwlWvH.es.js.map} +1 -1
  83. package/dist/chunks/{icon-button-CNauu_zf.es.js → icon-button-g4dZUH5O.es.js} +2 -2
  84. package/dist/chunks/{icon-button-CNauu_zf.es.js.map → icon-button-g4dZUH5O.es.js.map} +1 -1
  85. package/dist/chunks/{icon-toggle-button-D5ic1FhD.es.js → icon-toggle-button-DBGgxBWR.es.js} +2 -2
  86. package/dist/chunks/{icon-toggle-button-D5ic1FhD.es.js.map → icon-toggle-button-DBGgxBWR.es.js.map} +1 -1
  87. package/dist/chunks/{index-jNM4sRnI.es.js → index-CaeeOiBp.es.js} +3 -3
  88. package/dist/chunks/{index-jNM4sRnI.es.js.map → index-CaeeOiBp.es.js.map} +1 -1
  89. package/dist/chunks/{kbd-C6IVVksK.es.js → kbd-Cy3jFCSc.es.js} +2 -2
  90. package/dist/chunks/{kbd-C6IVVksK.es.js.map → kbd-Cy3jFCSc.es.js.map} +1 -1
  91. package/dist/chunks/loading-spinner-ByHGBHzt.es.js.map +1 -1
  92. package/dist/chunks/loading-spinner-DsKcjJ2b.cjs.js.map +1 -1
  93. package/dist/chunks/{localized-field-u03KZc2G.cjs.js → localized-field-BffTavHV.cjs.js} +2 -2
  94. package/dist/chunks/localized-field-BffTavHV.cjs.js.map +1 -0
  95. package/dist/chunks/{localized-field-D4HBEdq0.es.js → localized-field-CHV3AGQ-.es.js} +10 -10
  96. package/dist/chunks/localized-field-CHV3AGQ-.es.js.map +1 -0
  97. package/dist/chunks/{menu-CvowvbXh.es.js → menu-B5r0vnY6.es.js} +5 -5
  98. package/dist/chunks/{menu-CvowvbXh.es.js.map → menu-B5r0vnY6.es.js.map} +1 -1
  99. package/dist/chunks/{money-input-DHiEn7XA.es.js → money-input-Con6I5Ej.es.js} +7 -7
  100. package/dist/chunks/money-input-Con6I5Ej.es.js.map +1 -0
  101. package/dist/chunks/money-input-qNQdmjtx.cjs.js.map +1 -1
  102. package/dist/chunks/{multiline-text-input-BD_Pe10q.es.js → multiline-text-input-Cta4bg2-.es.js} +4 -4
  103. package/dist/chunks/{multiline-text-input-BD_Pe10q.es.js.map → multiline-text-input-Cta4bg2-.es.js.map} +1 -1
  104. package/dist/chunks/{nimbus-provider-DD5Om-MD.es.js → nimbus-provider-BtTUZMKb.es.js} +2 -2
  105. package/dist/chunks/{nimbus-provider-DD5Om-MD.es.js.map → nimbus-provider-BtTUZMKb.es.js.map} +1 -1
  106. package/dist/chunks/{number-input-DO5bD82a.es.js → number-input-BClKrTYK.es.js} +5 -5
  107. package/dist/chunks/{number-input-DO5bD82a.es.js.map → number-input-BClKrTYK.es.js.map} +1 -1
  108. package/dist/chunks/number-input-BUdRuDBZ.cjs.js.map +1 -1
  109. package/dist/chunks/pagination-BL1y2lAx.cjs.js +2 -0
  110. package/dist/chunks/pagination-BL1y2lAx.cjs.js.map +1 -0
  111. package/dist/chunks/pagination-BqjffQ1Z.es.js +210 -0
  112. package/dist/chunks/pagination-BqjffQ1Z.es.js.map +1 -0
  113. package/dist/chunks/{password-input-D4vhdbQW.es.js → password-input-DoWjkkoL.es.js} +4 -4
  114. package/dist/chunks/password-input-DoWjkkoL.es.js.map +1 -0
  115. package/dist/chunks/password-input-Dtu0_JiV.cjs.js.map +1 -1
  116. package/dist/chunks/{popover-qy-Vw0qP.es.js → popover-Dtxly24d.es.js} +2 -2
  117. package/dist/chunks/{popover-qy-Vw0qP.es.js.map → popover-Dtxly24d.es.js.map} +1 -1
  118. package/dist/chunks/{progress-bar-h8RUoyYt.es.js → progress-bar-oCdd2qvN.es.js} +4 -4
  119. package/dist/chunks/{progress-bar-h8RUoyYt.es.js.map → progress-bar-oCdd2qvN.es.js.map} +1 -1
  120. package/dist/chunks/{radio-input-qdrHc_fC.es.js → radio-input-eA3VvPwV.es.js} +5 -5
  121. package/dist/chunks/{radio-input-qdrHc_fC.es.js.map → radio-input-eA3VvPwV.es.js.map} +1 -1
  122. package/dist/chunks/range-calendar-BXMVhACe.cjs.js +2 -0
  123. package/dist/chunks/range-calendar-BXMVhACe.cjs.js.map +1 -0
  124. package/dist/chunks/range-calendar-BnB1F7_i.es.js +209 -0
  125. package/dist/chunks/range-calendar-BnB1F7_i.es.js.map +1 -0
  126. package/dist/chunks/rich-text-input-BebV_CaK.es.js +1200 -0
  127. package/dist/chunks/rich-text-input-BebV_CaK.es.js.map +1 -0
  128. package/dist/chunks/rich-text-input-D6WXRxiJ.cjs.js +10 -0
  129. package/dist/chunks/rich-text-input-D6WXRxiJ.cjs.js.map +1 -0
  130. package/dist/chunks/scoped-search-input-B5wDEKhF.es.js +143 -0
  131. package/dist/chunks/scoped-search-input-B5wDEKhF.es.js.map +1 -0
  132. package/dist/chunks/scoped-search-input-C3Vuxp-X.cjs.js +2 -0
  133. package/dist/chunks/scoped-search-input-C3Vuxp-X.cjs.js.map +1 -0
  134. package/dist/chunks/{search-input-CD_OQQwA.es.js → search-input-CmmBtmQf.es.js} +9 -9
  135. package/dist/chunks/{search-input-CD_OQQwA.es.js.map → search-input-CmmBtmQf.es.js.map} +1 -1
  136. package/dist/chunks/search-input-D4ISfjCg.cjs.js.map +1 -1
  137. package/dist/chunks/select-DLnPgZGL.cjs.js.map +1 -1
  138. package/dist/chunks/{select-Dny1auOH.es.js → select-DYkIoOqo.es.js} +10 -10
  139. package/dist/chunks/{select-Dny1auOH.es.js.map → select-DYkIoOqo.es.js.map} +1 -1
  140. package/dist/chunks/{separator-CCqidzEw.es.js → separator-D2824IwZ.es.js} +4 -4
  141. package/dist/chunks/{separator-CCqidzEw.es.js.map → separator-D2824IwZ.es.js.map} +1 -1
  142. package/dist/chunks/split-button-D4fKtZU6.cjs.js +2 -0
  143. package/dist/chunks/split-button-D4fKtZU6.cjs.js.map +1 -0
  144. package/dist/chunks/split-button-P5JM5TIs.es.js +106 -0
  145. package/dist/chunks/split-button-P5JM5TIs.es.js.map +1 -0
  146. package/dist/chunks/{switch-BRRuFpzu.es.js → switch-jX2Q8faO.es.js} +3 -3
  147. package/dist/chunks/{switch-BRRuFpzu.es.js.map → switch-jX2Q8faO.es.js.map} +1 -1
  148. package/dist/chunks/{tabs-BXoJTX6z.es.js → tabs-Bcs39h4J.es.js} +3 -3
  149. package/dist/chunks/{tabs-BXoJTX6z.es.js.map → tabs-Bcs39h4J.es.js.map} +1 -1
  150. package/dist/chunks/tag-group-Dx690E8r.cjs.js +2 -0
  151. package/dist/chunks/tag-group-Dx690E8r.cjs.js.map +1 -0
  152. package/dist/chunks/{tag-group-CDx2BCfu.es.js → tag-group-k_jEVQhv.es.js} +120 -110
  153. package/dist/chunks/tag-group-k_jEVQhv.es.js.map +1 -0
  154. package/dist/chunks/{text-BufUKCee.es.js → text-5xQLnEG4.es.js} +2 -2
  155. package/dist/chunks/{text-BufUKCee.es.js.map → text-5xQLnEG4.es.js.map} +1 -1
  156. package/dist/chunks/{text-input-CJNTJbW0.es.js → text-input-D8mfBGrA.es.js} +4 -4
  157. package/dist/chunks/{text-input-CJNTJbW0.es.js.map → text-input-D8mfBGrA.es.js.map} +1 -1
  158. package/dist/chunks/{time-input-CHA4irr4.es.js → time-input-9W94XJTY.es.js} +4 -4
  159. package/dist/chunks/{time-input-CHA4irr4.es.js.map → time-input-9W94XJTY.es.js.map} +1 -1
  160. package/dist/chunks/{toggle-button-C_WSvD7l.es.js → toggle-button-D1v2OtiG.es.js} +4 -4
  161. package/dist/chunks/{toggle-button-C_WSvD7l.es.js.map → toggle-button-D1v2OtiG.es.js.map} +1 -1
  162. package/dist/chunks/{toggle-button-group-CF1NxUIC.es.js → toggle-button-group-Bla1fe1z.es.js} +2 -2
  163. package/dist/chunks/{toggle-button-group-CF1NxUIC.es.js.map → toggle-button-group-Bla1fe1z.es.js.map} +1 -1
  164. package/dist/chunks/{toolbar-CdR1MLqf.es.js → toolbar-DpBQgamV.es.js} +4 -4
  165. package/dist/chunks/{toolbar-CdR1MLqf.es.js.map → toolbar-DpBQgamV.es.js.map} +1 -1
  166. package/dist/chunks/{tooltip-B6mt46EB.es.js → tooltip-BX45xCJd.es.js} +2 -2
  167. package/dist/chunks/{tooltip-B6mt46EB.es.js.map → tooltip-BX45xCJd.es.js.map} +1 -1
  168. package/dist/chunks/{useDateFormatter-BqUHVksS.es.js → useDateFormatter-DOSckBIG.es.js} +6 -6
  169. package/dist/chunks/{useDateFormatter-BqUHVksS.es.js.map → useDateFormatter-DOSckBIG.es.js.map} +1 -1
  170. package/dist/chunks/{useGridListItem-Cr6HZ3kJ.es.js → useGridListItem-Th8ivSlM.es.js} +2 -2
  171. package/dist/chunks/{useGridListItem-Cr6HZ3kJ.es.js.map → useGridListItem-Th8ivSlM.es.js.map} +1 -1
  172. package/dist/chunks/{utils-DF3YB901.es.js → utils-DDFsiM-7.es.js} +3 -3
  173. package/dist/chunks/{utils-DF3YB901.es.js.map → utils-DDFsiM-7.es.js.map} +1 -1
  174. package/dist/components/accordion.es.js +1 -1
  175. package/dist/components/alert.es.js +1 -1
  176. package/dist/components/avatar/avatar.i18n.d.ts +7 -0
  177. package/dist/components/avatar.cjs +1 -1
  178. package/dist/components/avatar.es.js +1 -1
  179. package/dist/components/button.es.js +1 -1
  180. package/dist/components/calendar/calendar.i18n.d.ts +22 -0
  181. package/dist/components/calendar.cjs +1 -1
  182. package/dist/components/calendar.es.js +1 -1
  183. package/dist/components/checkbox.es.js +1 -1
  184. package/dist/components/collapsible-motion.es.js +1 -1
  185. package/dist/components/combobox/combobox.i18n.d.ts +32 -0
  186. package/dist/components/combobox.cjs +1 -1
  187. package/dist/components/combobox.es.js +1 -1
  188. package/dist/components/components.es.js +1 -1
  189. package/dist/components/data-table/data-table.i18n.d.ts +37 -0
  190. package/dist/components/data-table.cjs +1 -1
  191. package/dist/components/data-table.es.js +1 -1
  192. package/dist/components/date-input.es.js +1 -1
  193. package/dist/components/date-picker/date-picker.i18n.d.ts +1 -2
  194. package/dist/components/date-picker.cjs +1 -1
  195. package/dist/components/date-picker.es.js +1 -1
  196. package/dist/components/date-range-picker/date-range-picker.i18n.d.ts +67 -0
  197. package/dist/components/date-range-picker.cjs +1 -1
  198. package/dist/components/date-range-picker.es.js +1 -1
  199. package/dist/components/dialog.es.js +1 -1
  200. package/dist/components/draggable-list.es.js +1 -1
  201. package/dist/components/drawer.es.js +1 -1
  202. package/dist/components/form-field.es.js +1 -1
  203. package/dist/components/group.es.js +1 -1
  204. package/dist/components/heading.es.js +1 -1
  205. package/dist/components/icon-button.es.js +1 -1
  206. package/dist/components/icon-toggle-button.es.js +1 -1
  207. package/dist/components/kbd.es.js +1 -1
  208. package/dist/components/loading-spinner/loading-spinner.i18n.d.ts +1 -2
  209. package/dist/components/localized-field/localized-field.i18n.d.ts +1 -2
  210. package/dist/components/localized-field.cjs +1 -1
  211. package/dist/components/localized-field.es.js +1 -1
  212. package/dist/components/money-input/money-input.i18n.d.ts +1 -2
  213. package/dist/components/money-input.es.js +1 -1
  214. package/dist/components/multiline-text-input.es.js +1 -1
  215. package/dist/components/nimbus-provider.es.js +1 -1
  216. package/dist/components/number-input/number-input.i18n.d.ts +1 -2
  217. package/dist/components/number-input.es.js +1 -1
  218. package/dist/components/pagination/pagination.i18n.d.ts +42 -0
  219. package/dist/components/pagination.cjs +1 -1
  220. package/dist/components/pagination.es.js +1 -1
  221. package/dist/components/password-input/password-input.i18n.d.ts +1 -2
  222. package/dist/components/password-input.es.js +1 -1
  223. package/dist/components/popover.es.js +1 -1
  224. package/dist/components/progress-bar.es.js +1 -1
  225. package/dist/components/radio-input.es.js +1 -1
  226. package/dist/components/range-calendar/range-calendar.i18n.d.ts +22 -0
  227. package/dist/components/range-calendar.cjs +1 -1
  228. package/dist/components/range-calendar.es.js +1 -1
  229. package/dist/components/rich-text-input/constants/text-styles.d.ts +6 -1
  230. package/dist/components/rich-text-input/hooks/use-toolbar-state.d.ts +4 -2
  231. package/dist/components/rich-text-input/rich-text-input.i18n.d.ts +122 -0
  232. package/dist/components/rich-text-input/utils/index.d.ts +0 -1
  233. package/dist/components/rich-text-input.cjs +1 -1
  234. package/dist/components/rich-text-input.es.js +1 -1
  235. package/dist/components/scoped-search-input/scoped-search-input.i18n.d.ts +1 -12
  236. package/dist/components/scoped-search-input.cjs +1 -1
  237. package/dist/components/scoped-search-input.es.js +1 -1
  238. package/dist/components/search-input/search-input.i18n.d.ts +1 -2
  239. package/dist/components/search-input.es.js +1 -1
  240. package/dist/components/select/select.i18n.d.ts +1 -2
  241. package/dist/components/select.es.js +1 -1
  242. package/dist/components/separator.es.js +1 -1
  243. package/dist/components/split-button/split-button.i18n.d.ts +7 -0
  244. package/dist/components/split-button.cjs +1 -1
  245. package/dist/components/split-button.es.js +1 -1
  246. package/dist/components/switch.es.js +1 -1
  247. package/dist/components/tabs.es.js +1 -1
  248. package/dist/components/tag-group/tag-group.i18n.d.ts +7 -0
  249. package/dist/components/tag-group.cjs +1 -1
  250. package/dist/components/tag-group.es.js +1 -1
  251. package/dist/components/text-input.es.js +1 -1
  252. package/dist/components/text.es.js +1 -1
  253. package/dist/components/time-input.es.js +1 -1
  254. package/dist/components/toggle-button-group.es.js +1 -1
  255. package/dist/components/toggle-button.es.js +1 -1
  256. package/dist/components/toolbar.es.js +1 -1
  257. package/dist/components/tooltip.es.js +1 -1
  258. package/dist/index.cjs +1 -1
  259. package/dist/index.es.js +51 -51
  260. package/package.json +5 -5
  261. package/dist/chunks/avatar-BGM-BDJa.cjs.js +0 -2
  262. package/dist/chunks/avatar-BGM-BDJa.cjs.js.map +0 -1
  263. package/dist/chunks/avatar-CTiSGVoD.es.js +0 -40
  264. package/dist/chunks/avatar-CTiSGVoD.es.js.map +0 -1
  265. package/dist/chunks/calendar-57M9FKqt.cjs.js +0 -2
  266. package/dist/chunks/calendar-57M9FKqt.cjs.js.map +0 -1
  267. package/dist/chunks/calendar-Kwoe0bYZ.es.js +0 -187
  268. package/dist/chunks/calendar-Kwoe0bYZ.es.js.map +0 -1
  269. package/dist/chunks/combobox-0cCAwg3W.es.js.map +0 -1
  270. package/dist/chunks/combobox-CKozWtj7.cjs.js +0 -2
  271. package/dist/chunks/combobox-CKozWtj7.cjs.js.map +0 -1
  272. package/dist/chunks/data-table-BxITOPnx.es.js.map +0 -1
  273. package/dist/chunks/data-table-Depm8_y5.cjs.js +0 -2
  274. package/dist/chunks/data-table-Depm8_y5.cjs.js.map +0 -1
  275. package/dist/chunks/date-picker-Dk3QgvCN.cjs.js.map +0 -1
  276. package/dist/chunks/date-picker-FvaPPqXZ.es.js.map +0 -1
  277. package/dist/chunks/date-range-picker-CMWsBL9j.cjs.js +0 -2
  278. package/dist/chunks/date-range-picker-CMWsBL9j.cjs.js.map +0 -1
  279. package/dist/chunks/date-range-picker-vH5DixcB.es.js +0 -281
  280. package/dist/chunks/date-range-picker-vH5DixcB.es.js.map +0 -1
  281. package/dist/chunks/localized-field-D4HBEdq0.es.js.map +0 -1
  282. package/dist/chunks/localized-field-u03KZc2G.cjs.js.map +0 -1
  283. package/dist/chunks/money-input-DHiEn7XA.es.js.map +0 -1
  284. package/dist/chunks/pagination-CjUoltTe.es.js +0 -160
  285. package/dist/chunks/pagination-CjUoltTe.es.js.map +0 -1
  286. package/dist/chunks/pagination-CnPACrJ5.cjs.js +0 -2
  287. package/dist/chunks/pagination-CnPACrJ5.cjs.js.map +0 -1
  288. package/dist/chunks/password-input-D4vhdbQW.es.js.map +0 -1
  289. package/dist/chunks/range-calendar-BjuErXNK.es.js +0 -187
  290. package/dist/chunks/range-calendar-BjuErXNK.es.js.map +0 -1
  291. package/dist/chunks/range-calendar-Cjqu4SXg.cjs.js +0 -2
  292. package/dist/chunks/range-calendar-Cjqu4SXg.cjs.js.map +0 -1
  293. package/dist/chunks/rich-text-input-B41QcSHY.cjs.js +0 -10
  294. package/dist/chunks/rich-text-input-B41QcSHY.cjs.js.map +0 -1
  295. package/dist/chunks/rich-text-input-BGVyDm30.es.js +0 -1074
  296. package/dist/chunks/rich-text-input-BGVyDm30.es.js.map +0 -1
  297. package/dist/chunks/scoped-search-input-CO9xtMOE.es.js +0 -153
  298. package/dist/chunks/scoped-search-input-CO9xtMOE.es.js.map +0 -1
  299. package/dist/chunks/scoped-search-input-COM1I724.cjs.js +0 -2
  300. package/dist/chunks/scoped-search-input-COM1I724.cjs.js.map +0 -1
  301. package/dist/chunks/split-button-C8BsVNhR.cjs.js +0 -2
  302. package/dist/chunks/split-button-C8BsVNhR.cjs.js.map +0 -1
  303. package/dist/chunks/split-button-YwopMYuE.es.js +0 -100
  304. package/dist/chunks/split-button-YwopMYuE.es.js.map +0 -1
  305. package/dist/chunks/tag-group-Beqgbttp.cjs.js +0 -2
  306. package/dist/chunks/tag-group-Beqgbttp.cjs.js.map +0 -1
  307. package/dist/chunks/tag-group-CDx2BCfu.es.js.map +0 -1
  308. package/dist/components/rich-text-input/utils/text-style-utils.d.ts +0 -33
@@ -0,0 +1,1200 @@
1
+ import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
+ import { useCallback as C, useRef as ye, useMemo as A, useImperativeHandle as De, useState as ie, useEffect as Le } from "react";
3
+ import { createSlotRecipeContext as Fe, mergeRefs as Ke, useSlotRecipe as He } from "@chakra-ui/react";
4
+ import { e as Oe } from "./extract-style-props-CZpdYA8m.es.js";
5
+ import { Text as W, Element as q, Transforms as I, Editor as x, Range as xe, createEditor as $e } from "slate";
6
+ import { ReactEditor as ne, withReact as Pe, Slate as Be, Editable as _e, useSlate as J } from "slate-react";
7
+ import { withHistory as qe } from "slate-history";
8
+ import { $ as ze } from "./useObjectRef-CaJ5pgjX.es.js";
9
+ import { defineMessages as Ue, useIntl as Te } from "react-intl";
10
+ import { G as ae } from "./group-BLPsc2Lf.es.js";
11
+ import { MoreHoriz as Ve, FormatStrikethrough as je, Code as We, KeyboardArrowDown as Ge, FormatBold as Xe, FormatItalic as Ye, FormatUnderlined as Qe, FormatListBulleted as Je, FormatListNumbered as Ze, Undo as et, Redo as tt } from "@commercetools/nimbus-icons";
12
+ import { M as v } from "./menu-B5r0vnY6.es.js";
13
+ import { b } from "./tooltip-BX45xCJd.es.js";
14
+ import { I as se } from "./icon-button-g4dZUH5O.es.js";
15
+ import { B } from "./box-DuBoAZvq.es.js";
16
+ import { T as L } from "./text-5xQLnEG4.es.js";
17
+ import { T as rt } from "./toolbar-DpBQgamV.es.js";
18
+ import { S as le } from "./separator-D2824IwZ.es.js";
19
+ import { T as ce } from "./toggle-button-group-Bla1fe1z.es.js";
20
+ import { I as U } from "./icon-toggle-button-DBGgxBWR.es.js";
21
+ import { V } from "./visually-hidden-CkxAz94w.es.js";
22
+ import { o as nt } from "./index-CaeeOiBp.es.js";
23
+ function Me(t) {
24
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
+ }
26
+ const { withProvider: st, withContext: Se } = /* @__PURE__ */ Fe({
27
+ key: "richTextInput"
28
+ }), ot = /* @__PURE__ */ st("div", "root"), it = /* @__PURE__ */ Se("div", "toolbar"), at = /* @__PURE__ */ Se("div", "editable");
29
+ /*!
30
+ * escape-html
31
+ * Copyright(c) 2012-2013 TJ Holowaychuk
32
+ * Copyright(c) 2015 Andreas Lubbe
33
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
34
+ * MIT Licensed
35
+ */
36
+ var ee, ue;
37
+ function lt() {
38
+ if (ue) return ee;
39
+ ue = 1;
40
+ var t = /["'&<>]/;
41
+ ee = e;
42
+ function e(r) {
43
+ var s = "" + r, n = t.exec(s);
44
+ if (!n)
45
+ return s;
46
+ var l, u = "", d = 0, f = 0;
47
+ for (d = n.index; d < s.length; d++) {
48
+ switch (s.charCodeAt(d)) {
49
+ case 34:
50
+ l = "&quot;";
51
+ break;
52
+ case 38:
53
+ l = "&amp;";
54
+ break;
55
+ case 39:
56
+ l = "&#39;";
57
+ break;
58
+ case 60:
59
+ l = "&lt;";
60
+ break;
61
+ case 62:
62
+ l = "&gt;";
63
+ break;
64
+ default:
65
+ continue;
66
+ }
67
+ f !== d && (u += s.substring(f, d)), f = d + 1, u += l;
68
+ }
69
+ return f !== d ? u + s.substring(f, d) : u;
70
+ }
71
+ return ee;
72
+ }
73
+ var ct = /* @__PURE__ */ lt();
74
+ const X = /* @__PURE__ */ Me(ct), de = {
75
+ "mod+b": "bold",
76
+ "mod+i": "italic",
77
+ "mod+u": "underline",
78
+ "mod+`": "code"
79
+ }, Y = {
80
+ placeholder: "Start typing...",
81
+ isDisabled: !1,
82
+ isReadOnly: !1,
83
+ autoFocus: !1
84
+ }, he = {
85
+ blockquote: "block-quote",
86
+ p: "paragraph",
87
+ pre: "code",
88
+ h1: "heading-one",
89
+ h2: "heading-two",
90
+ h3: "heading-three",
91
+ h4: "heading-four",
92
+ h5: "heading-five",
93
+ ul: "bulleted-list",
94
+ ol: "numbered-list",
95
+ li: "list-item",
96
+ a: "link"
97
+ }, fe = {
98
+ strong: "bold",
99
+ b: "bold",
100
+ em: "italic",
101
+ i: "italic",
102
+ u: "underline",
103
+ code: "code",
104
+ sup: "superscript",
105
+ sub: "subscript",
106
+ del: "strikethrough",
107
+ s: "strikethrough"
108
+ }, Q = {
109
+ STRIKETHROUGH: "strikethrough",
110
+ CODE: "code",
111
+ SUPERSCRIPT: "superscript",
112
+ SUBSCRIPT: "subscript"
113
+ }, ut = [
114
+ Q.STRIKETHROUGH,
115
+ Q.CODE
116
+ ], dt = [
117
+ Q.SUPERSCRIPT,
118
+ Q.SUBSCRIPT
119
+ ], c = /* @__PURE__ */ Ue({
120
+ // Toolbar
121
+ textFormatting: {
122
+ id: "Nimbus.RichTextInput.textFormatting",
123
+ description: "aria-label for the text formatting toolbar",
124
+ defaultMessage: "Text formatting"
125
+ },
126
+ textStyleMenu: {
127
+ id: "Nimbus.RichTextInput.textStyleMenu",
128
+ description: "aria-label for the text style menu trigger button",
129
+ defaultMessage: "Text style menu"
130
+ },
131
+ textStyle: {
132
+ id: "Nimbus.RichTextInput.textStyle",
133
+ description: "tooltip text for the text style menu",
134
+ defaultMessage: "Text style"
135
+ },
136
+ bold: {
137
+ id: "Nimbus.RichTextInput.bold",
138
+ description: "aria-label and tooltip for the bold formatting button",
139
+ defaultMessage: "Bold"
140
+ },
141
+ italic: {
142
+ id: "Nimbus.RichTextInput.italic",
143
+ description: "aria-label and tooltip for the italic formatting button",
144
+ defaultMessage: "Italic"
145
+ },
146
+ underline: {
147
+ id: "Nimbus.RichTextInput.underline",
148
+ description: "aria-label and tooltip for the underline formatting button",
149
+ defaultMessage: "Underline"
150
+ },
151
+ listFormatting: {
152
+ id: "Nimbus.RichTextInput.listFormatting",
153
+ description: "aria-label for the list formatting toggle group",
154
+ defaultMessage: "List formatting"
155
+ },
156
+ bulletedList: {
157
+ id: "Nimbus.RichTextInput.bulletedList",
158
+ description: "aria-label for the bulleted list button",
159
+ defaultMessage: "Bulleted list"
160
+ },
161
+ numberedList: {
162
+ id: "Nimbus.RichTextInput.numberedList",
163
+ description: "aria-label for the numbered list button",
164
+ defaultMessage: "Numbered list"
165
+ },
166
+ undo: {
167
+ id: "Nimbus.RichTextInput.undo",
168
+ description: "aria-label and tooltip for the undo button",
169
+ defaultMessage: "Undo"
170
+ },
171
+ redo: {
172
+ id: "Nimbus.RichTextInput.redo",
173
+ description: "aria-label and tooltip for the redo button",
174
+ defaultMessage: "Redo"
175
+ },
176
+ // Formatting Menu
177
+ moreFormattingOptions: {
178
+ id: "Nimbus.RichTextInput.moreFormattingOptions",
179
+ description: "aria-label for the more formatting options menu button",
180
+ defaultMessage: "More formatting options"
181
+ },
182
+ moreStyles: {
183
+ id: "Nimbus.RichTextInput.moreStyles",
184
+ description: "tooltip text for the more formatting options menu",
185
+ defaultMessage: "More styles"
186
+ },
187
+ strikethrough: {
188
+ id: "Nimbus.RichTextInput.strikethrough",
189
+ description: "label for the strikethrough menu item",
190
+ defaultMessage: "Strikethrough"
191
+ },
192
+ code: {
193
+ id: "Nimbus.RichTextInput.code",
194
+ description: "label for the code formatting menu item",
195
+ defaultMessage: "Code"
196
+ },
197
+ superscript: {
198
+ id: "Nimbus.RichTextInput.superscript",
199
+ description: "label for the superscript formatting menu item",
200
+ defaultMessage: "Superscript"
201
+ },
202
+ subscript: {
203
+ id: "Nimbus.RichTextInput.subscript",
204
+ description: "label for the subscript formatting menu item",
205
+ defaultMessage: "Subscript"
206
+ },
207
+ // Text Style Labels
208
+ paragraph: {
209
+ id: "Nimbus.RichTextInput.paragraph",
210
+ description: "label for paragraph text style",
211
+ defaultMessage: "Paragraph"
212
+ },
213
+ headingOne: {
214
+ id: "Nimbus.RichTextInput.headingOne",
215
+ description: "label for heading 1 text style",
216
+ defaultMessage: "Heading 1"
217
+ },
218
+ headingTwo: {
219
+ id: "Nimbus.RichTextInput.headingTwo",
220
+ description: "label for heading 2 text style",
221
+ defaultMessage: "Heading 2"
222
+ },
223
+ headingThree: {
224
+ id: "Nimbus.RichTextInput.headingThree",
225
+ description: "label for heading 3 text style",
226
+ defaultMessage: "Heading 3"
227
+ },
228
+ headingFour: {
229
+ id: "Nimbus.RichTextInput.headingFour",
230
+ description: "label for heading 4 text style",
231
+ defaultMessage: "Heading 4"
232
+ },
233
+ headingFive: {
234
+ id: "Nimbus.RichTextInput.headingFive",
235
+ description: "label for heading 5 text style",
236
+ defaultMessage: "Heading 5"
237
+ },
238
+ quote: {
239
+ id: "Nimbus.RichTextInput.quote",
240
+ description: "label for block quote text style",
241
+ defaultMessage: "Quote"
242
+ }
243
+ }), ht = (t) => [
244
+ {
245
+ id: "paragraph",
246
+ label: t.formatMessage(c.paragraph),
247
+ props: {
248
+ textStyle: "md",
249
+ fontWeight: "500"
250
+ }
251
+ },
252
+ {
253
+ id: "heading-one",
254
+ label: t.formatMessage(c.headingOne),
255
+ props: {
256
+ textStyle: "2xl",
257
+ fontWeight: "500"
258
+ }
259
+ },
260
+ {
261
+ id: "heading-two",
262
+ label: t.formatMessage(c.headingTwo),
263
+ props: {
264
+ textStyle: "xl",
265
+ fontWeight: "500"
266
+ }
267
+ },
268
+ {
269
+ id: "heading-three",
270
+ label: t.formatMessage(c.headingThree),
271
+ props: {
272
+ textStyle: "lg",
273
+ fontWeight: "500"
274
+ }
275
+ },
276
+ {
277
+ id: "heading-four",
278
+ label: t.formatMessage(c.headingFour),
279
+ props: {
280
+ textStyle: "md",
281
+ fontWeight: "500"
282
+ }
283
+ },
284
+ {
285
+ id: "heading-five",
286
+ label: t.formatMessage(c.headingFive),
287
+ props: {
288
+ textStyle: "xs",
289
+ fontWeight: "500"
290
+ }
291
+ },
292
+ {
293
+ id: "block-quote",
294
+ label: t.formatMessage(c.quote),
295
+ props: {
296
+ textStyle: "md",
297
+ fontWeight: "400"
298
+ }
299
+ }
300
+ ], ft = [
301
+ "heading-one",
302
+ "heading-two",
303
+ "heading-three",
304
+ "heading-four",
305
+ "heading-five",
306
+ "block-quote"
307
+ ], Re = `​
308
+ `, H = () => [
309
+ {
310
+ type: "paragraph",
311
+ children: [{ text: "" }]
312
+ }
313
+ ], pt = (t) => t.map(we).join(""), we = (t) => {
314
+ if (W.isText(t)) {
315
+ const s = t;
316
+ let n = X(s.text);
317
+ return s.bold && (n = `<strong>${n}</strong>`), s.code && (n = `<code>${n}</code>`), s.italic && (n = `<em>${n}</em>`), s.underline && (n = `<u>${n}</u>`), s.superscript && (n = `<sup>${n}</sup>`), s.subscript && (n = `<sub>${n}</sub>`), s.strikethrough && (n = `<del>${n}</del>`), n = n.replace(new RegExp(Re, "g"), "<br>"), n;
318
+ }
319
+ const e = t.children.map(we).join(""), r = t;
320
+ switch (r.type) {
321
+ case "block-quote":
322
+ return `<blockquote>${e}</blockquote>`;
323
+ case "paragraph":
324
+ return `<p>${e}</p>`;
325
+ case "code":
326
+ return `<pre><code>${e}</code></pre>`;
327
+ case "bulleted-list":
328
+ return `<ul>${e}</ul>`;
329
+ case "numbered-list":
330
+ return `<ol>${e}</ol>`;
331
+ case "list-item":
332
+ return `<li>${e}</li>`;
333
+ case "heading-one":
334
+ return `<h1>${e}</h1>`;
335
+ case "heading-two":
336
+ return `<h2>${e}</h2>`;
337
+ case "heading-three":
338
+ return `<h3>${e}</h3>`;
339
+ case "heading-four":
340
+ return `<h4>${e}</h4>`;
341
+ case "heading-five":
342
+ return `<h5>${e}</h5>`;
343
+ case "link": {
344
+ let s = "";
345
+ if (r.url) {
346
+ const l = gt(r.url);
347
+ s = ` href="${X(l)}"`;
348
+ }
349
+ let n = "";
350
+ if (r.htmlAttributes && typeof r.htmlAttributes == "object")
351
+ for (const [l, u] of Object.entries(r.htmlAttributes))
352
+ l.toLowerCase().startsWith("on") || (n += ` ${X(l)}="${X(String(u))}"`);
353
+ return `<a${s}${n}>${e}</a>`;
354
+ }
355
+ default:
356
+ return e;
357
+ }
358
+ }, oe = (t) => {
359
+ if (!t || t.trim() === "")
360
+ return H();
361
+ try {
362
+ if (t.includes("<p>") || t.includes("<h") || t.includes("<div>") || t.includes("<blockquote>") || t.includes("<ul>") || t.includes("<ol>")) {
363
+ const r = new DOMParser().parseFromString(t, "text/html").body, s = Array.from(r.childNodes).map(ke).filter(Boolean);
364
+ return Ie(s);
365
+ } else
366
+ return [
367
+ {
368
+ type: "paragraph",
369
+ children: [{ text: t }]
370
+ }
371
+ ];
372
+ } catch (e) {
373
+ return console.warn("Failed to parse HTML:", e), H();
374
+ }
375
+ }, ke = (t) => {
376
+ if (t.nodeType === Node.TEXT_NODE)
377
+ return (t.textContent || "").replace(/<br\s*\/?>/gi, Re);
378
+ if (t.nodeType !== Node.ELEMENT_NODE)
379
+ return null;
380
+ const e = t, r = e.tagName.toLowerCase(), s = Array.from(e.childNodes).map(ke).filter(Boolean);
381
+ if (r in he) {
382
+ const l = he[r], u = { type: l, children: [] };
383
+ if (l === "link") {
384
+ const d = e.getAttribute("href");
385
+ d && (u.url = d);
386
+ const f = {};
387
+ Array.from(e.attributes).forEach((m) => {
388
+ m.name !== "href" && !m.name.toLowerCase().startsWith("on") && (f[m.name] = m.value);
389
+ }), Object.keys(f).length > 0 && (u.htmlAttributes = f);
390
+ }
391
+ return u.children = mt(s), u;
392
+ }
393
+ if (r in fe) {
394
+ const l = fe[r];
395
+ return { text: te(s), [l]: !0 };
396
+ }
397
+ return r === "span" ? { text: te(s) } : { text: te(s) };
398
+ }, mt = (t) => {
399
+ const e = [];
400
+ for (const r of t)
401
+ typeof r == "string" ? r.trim() && e.push({ text: r }) : (r && W.isText(r) || r && q.isElement(r)) && e.push(r);
402
+ return e.length === 0 && e.push({ text: "" }), e;
403
+ }, ve = (t) => t.children.map((e) => W.isText(e) ? e.text : q.isElement(e) ? ve(e) : "").join(""), te = (t) => t.filter(Boolean).map((e) => typeof e == "string" ? e : e && typeof e == "object" && "text" in e ? e.text : e && typeof e == "object" && "children" in e ? ve(e) : String(e || "")).join(""), gt = (t) => {
404
+ const e = String(t).trim().toLowerCase();
405
+ return e.startsWith("javascript:") || e.startsWith("data:") || e.startsWith("vbscript:") ? "#" : String(t);
406
+ }, Ie = (t) => !Array.isArray(t) || t.length === 0 ? H() : t.map((e) => q.isElement(e) ? !e.children || e.children.length === 0 ? { ...e, children: [{ text: "" }] } : e : {
407
+ type: "paragraph",
408
+ children: [{ text: String(e) }]
409
+ }), pe = (t) => {
410
+ try {
411
+ const e = new URL(t);
412
+ return e.protocol === "http:" || e.protocol === "https:";
413
+ } catch {
414
+ return !1;
415
+ }
416
+ }, me = ["bulleted-list", "numbered-list"], bt = [
417
+ "bold",
418
+ "code",
419
+ "italic",
420
+ "underline",
421
+ "superscript",
422
+ "subscript",
423
+ "strikethrough"
424
+ ], j = (t) => bt.includes(t), yt = (t, e) => j(e) ? t[e] === !0 : !1, F = (t, e) => {
425
+ const { selection: r } = t;
426
+ if (!r || xe.isCollapsed(r)) {
427
+ const s = x.marks(t);
428
+ if (s && j(e))
429
+ return s[e] === !0;
430
+ if (!r && t.children.length > 0) {
431
+ const n = t.children[0];
432
+ if (n.children && n.children.length > 0) {
433
+ const l = n.children[0];
434
+ if (W.isText(l) && j(e))
435
+ return l[e] === !0;
436
+ }
437
+ }
438
+ return !1;
439
+ }
440
+ try {
441
+ const s = Array.from(
442
+ x.nodes(t, {
443
+ at: r,
444
+ match: (n) => W.isText(n)
445
+ })
446
+ );
447
+ if (s.length === 0) {
448
+ const n = x.marks(t);
449
+ return !n || !j(e) ? !1 : n[e] === !0;
450
+ }
451
+ return s.every(([n]) => yt(n, e));
452
+ } catch {
453
+ const s = x.marks(t);
454
+ return !s || !j(e) ? !1 : s[e] === !0;
455
+ }
456
+ }, P = (t, e) => {
457
+ const { selection: r } = t;
458
+ if (r) {
459
+ const [s] = Array.from(
460
+ x.nodes(t, {
461
+ at: x.unhangRange(t, r),
462
+ match: (n) => !x.isEditor(n) && q.isElement(n) && n.type === e
463
+ })
464
+ );
465
+ return !!s;
466
+ }
467
+ return t.children.length > 0 ? t.children[0].type === e : !1;
468
+ }, K = (t, e) => {
469
+ F(t, e) ? x.removeMark(t, e) : x.addMark(t, e, !0);
470
+ }, re = (t, e) => {
471
+ const r = P(t, e), s = me.includes(e);
472
+ I.unwrapNodes(t, {
473
+ match: (l) => !x.isEditor(l) && q.isElement(l) && me.includes(l.type),
474
+ split: !0
475
+ });
476
+ let n;
477
+ if (r ? n = { type: "paragraph" } : s ? n = { type: "list-item" } : n = { type: e }, I.setNodes(t, n), !r && s) {
478
+ const l = { type: e, children: [] };
479
+ I.wrapNodes(t, l);
480
+ }
481
+ }, xt = (t) => {
482
+ ne.focus(t);
483
+ }, Tt = (t, e) => {
484
+ const r = oe(e);
485
+ I.delete(t, {
486
+ at: {
487
+ anchor: x.start(t, []),
488
+ focus: x.end(t, [])
489
+ }
490
+ }), I.insertNodes(t, r), I.select(t, x.start(t, []));
491
+ }, Mt = (t) => {
492
+ const { insertData: e, insertText: r, isInline: s } = t;
493
+ return t.isInline = (n) => n.type === "link" ? !0 : s(n), t.insertText = (n) => {
494
+ n && pe(n) ? ge(t, n) : r(n);
495
+ }, t.insertData = (n) => {
496
+ const l = n.getData("text/plain");
497
+ l && pe(l) ? ge(t, l) : e(n);
498
+ }, t;
499
+ }, St = (t) => {
500
+ I.unwrapNodes(t, {
501
+ match: (e) => !x.isEditor(e) && q.isElement(e) && e.type === "link"
502
+ });
503
+ }, ge = (t, e) => {
504
+ P(t, "link") && St(t);
505
+ const { selection: r } = t, s = r && xe.isCollapsed(r), n = {
506
+ type: "link",
507
+ url: e,
508
+ children: s ? [{ text: e }] : []
509
+ };
510
+ s ? I.insertNodes(t, n) : (I.wrapNodes(t, n, { split: !0 }), I.collapse(t, { edge: "end" }));
511
+ }, Rt = ({
512
+ attributes: t,
513
+ children: e,
514
+ element: r
515
+ }) => {
516
+ const s = r, n = { textAlign: s.align };
517
+ switch (s.type) {
518
+ case "block-quote":
519
+ return /* @__PURE__ */ o("blockquote", { style: n, ...t, children: e });
520
+ case "bulleted-list":
521
+ return /* @__PURE__ */ o("ul", { style: n, ...t, children: e });
522
+ case "heading-one":
523
+ return /* @__PURE__ */ o("h1", { style: n, ...t, children: e });
524
+ case "heading-two":
525
+ return /* @__PURE__ */ o("h2", { style: n, ...t, children: e });
526
+ case "heading-three":
527
+ return /* @__PURE__ */ o("h3", { style: n, ...t, children: e });
528
+ case "heading-four":
529
+ return /* @__PURE__ */ o("h4", { style: n, ...t, children: e });
530
+ case "heading-five":
531
+ return /* @__PURE__ */ o("h5", { style: n, ...t, children: e });
532
+ case "list-item":
533
+ return /* @__PURE__ */ o("li", { style: n, ...t, children: e });
534
+ case "numbered-list":
535
+ return /* @__PURE__ */ o("ol", { style: n, ...t, children: e });
536
+ case "link":
537
+ return /* @__PURE__ */ o(
538
+ "a",
539
+ {
540
+ ...t,
541
+ href: s.url,
542
+ rel: "noopener noreferrer",
543
+ style: n,
544
+ children: e
545
+ }
546
+ );
547
+ default:
548
+ return /* @__PURE__ */ o("p", { style: n, ...t, children: e });
549
+ }
550
+ }, wt = ({
551
+ attributes: t,
552
+ children: e,
553
+ leaf: r
554
+ }) => {
555
+ const s = r;
556
+ return s.bold && (e = /* @__PURE__ */ o("strong", { children: e })), s.code && (e = /* @__PURE__ */ o("code", { children: e })), s.italic && (e = /* @__PURE__ */ o("em", { children: e })), s.underline && (e = /* @__PURE__ */ o("u", { children: e })), s.strikethrough && (e = /* @__PURE__ */ o("del", { children: e })), s.superscript && (e = /* @__PURE__ */ o("sup", { children: e })), s.subscript && (e = /* @__PURE__ */ o("sub", { children: e })), /* @__PURE__ */ o("span", { ...t, children: e });
557
+ }, kt = {
558
+ placeholderCharacter: `​
559
+ `
560
+ };
561
+ var k = {}, be;
562
+ function vt() {
563
+ if (be) return k;
564
+ be = 1, Object.defineProperty(k, "__esModule", {
565
+ value: !0
566
+ });
567
+ for (var t = typeof window < "u" && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform), e = {
568
+ alt: "altKey",
569
+ control: "ctrlKey",
570
+ meta: "metaKey",
571
+ shift: "shiftKey"
572
+ }, r = {
573
+ add: "+",
574
+ break: "pause",
575
+ cmd: "meta",
576
+ command: "meta",
577
+ ctl: "control",
578
+ ctrl: "control",
579
+ del: "delete",
580
+ down: "arrowdown",
581
+ esc: "escape",
582
+ ins: "insert",
583
+ left: "arrowleft",
584
+ mod: t ? "meta" : "control",
585
+ opt: "alt",
586
+ option: "alt",
587
+ return: "enter",
588
+ right: "arrowright",
589
+ space: " ",
590
+ spacebar: " ",
591
+ up: "arrowup",
592
+ win: "meta",
593
+ windows: "meta"
594
+ }, s = {
595
+ backspace: 8,
596
+ tab: 9,
597
+ enter: 13,
598
+ shift: 16,
599
+ control: 17,
600
+ alt: 18,
601
+ pause: 19,
602
+ capslock: 20,
603
+ escape: 27,
604
+ " ": 32,
605
+ pageup: 33,
606
+ pagedown: 34,
607
+ end: 35,
608
+ home: 36,
609
+ arrowleft: 37,
610
+ arrowup: 38,
611
+ arrowright: 39,
612
+ arrowdown: 40,
613
+ insert: 45,
614
+ delete: 46,
615
+ meta: 91,
616
+ numlock: 144,
617
+ scrolllock: 145,
618
+ ";": 186,
619
+ "=": 187,
620
+ ",": 188,
621
+ "-": 189,
622
+ ".": 190,
623
+ "/": 191,
624
+ "`": 192,
625
+ "[": 219,
626
+ "\\": 220,
627
+ "]": 221,
628
+ "'": 222
629
+ }, n = 1; n < 20; n++)
630
+ s["f" + n] = 111 + n;
631
+ function l(a, i, y) {
632
+ i && !("byKey" in i) && (y = i, i = null), Array.isArray(a) || (a = [a]);
633
+ var T = a.map(function(D) {
634
+ return f(D, i);
635
+ }), M = function(E) {
636
+ return T.some(function(N) {
637
+ return m(N, E);
638
+ });
639
+ }, O = y == null ? M : M(y);
640
+ return O;
641
+ }
642
+ function u(a, i) {
643
+ return l(a, i);
644
+ }
645
+ function d(a, i) {
646
+ return l(a, { byKey: !0 }, i);
647
+ }
648
+ function f(a, i) {
649
+ var y = i && i.byKey, T = {};
650
+ a = a.replace("++", "+add");
651
+ var M = a.split("+"), O = M.length;
652
+ for (var D in e)
653
+ T[e[D]] = !1;
654
+ var E = !0, N = !1, g = void 0;
655
+ try {
656
+ for (var _ = M[Symbol.iterator](), G; !(E = (G = _.next()).done); E = !0) {
657
+ var w = G.value, Z = w.endsWith("?") && w.length > 1;
658
+ Z && (w = w.slice(0, -1));
659
+ var z = p(w), R = e[z];
660
+ if (w.length > 1 && !R && !r[w] && !s[z])
661
+ throw new TypeError('Unknown modifier: "' + w + '"');
662
+ (O === 1 || !R) && (y ? T.key = z : T.which = S(w)), R && (T[R] = Z ? null : !0);
663
+ }
664
+ } catch ($) {
665
+ N = !0, g = $;
666
+ } finally {
667
+ try {
668
+ !E && _.return && _.return();
669
+ } finally {
670
+ if (N)
671
+ throw g;
672
+ }
673
+ }
674
+ return T;
675
+ }
676
+ function m(a, i) {
677
+ for (var y in a) {
678
+ var T = a[y], M = void 0;
679
+ if (T != null && (y === "key" && i.key != null ? M = i.key.toLowerCase() : y === "which" ? M = T === 91 && i.which === 93 ? 91 : i.which : M = i[y], !(M == null && T === !1) && M !== T))
680
+ return !1;
681
+ }
682
+ return !0;
683
+ }
684
+ function S(a) {
685
+ a = p(a);
686
+ var i = s[a] || a.toUpperCase().charCodeAt(0);
687
+ return i;
688
+ }
689
+ function p(a) {
690
+ return a = a.toLowerCase(), a = r[a] || a, a;
691
+ }
692
+ return k.default = l, k.isHotkey = l, k.isCodeHotkey = u, k.isKeyHotkey = d, k.parseHotkey = f, k.compareHotkey = m, k.toKeyCode = S, k.toKeyName = p, k;
693
+ }
694
+ var It = /* @__PURE__ */ vt();
695
+ const Ct = /* @__PURE__ */ Me(It), Et = ({ editor: t }) => ({ handleKeyDown: C(
696
+ (r) => {
697
+ if ((r.metaKey || r.ctrlKey) && r.key === "z") {
698
+ r.preventDefault(), r.shiftKey ? t.redo() : t.undo();
699
+ return;
700
+ }
701
+ for (const s in de)
702
+ if (Ct(s, r)) {
703
+ r.preventDefault();
704
+ const n = de[s];
705
+ K(t, n);
706
+ return;
707
+ }
708
+ if (r.shiftKey && r.key === "Enter") {
709
+ r.preventDefault(), t.insertText(kt.placeholderCharacter);
710
+ return;
711
+ }
712
+ },
713
+ [t]
714
+ ) }), Ce = function({
715
+ ref: e,
716
+ value: r,
717
+ onChange: s,
718
+ onFocus: n,
719
+ onBlur: l,
720
+ placeholder: u = Y.placeholder,
721
+ isDisabled: d = Y.isDisabled,
722
+ isReadOnly: f = Y.isReadOnly,
723
+ autoFocus: m = Y.autoFocus,
724
+ toolbar: S
725
+ //...props
726
+ }) {
727
+ const p = ye(null), a = ze(Ke(p, e)), i = A(() => {
728
+ const g = $e();
729
+ return Mt(qe(Pe(g)));
730
+ }, []), { handleKeyDown: y } = Et({ editor: i }), T = C(
731
+ (g) => {
732
+ n && n(g);
733
+ },
734
+ [n]
735
+ ), M = C(
736
+ (g) => {
737
+ l && l(g);
738
+ },
739
+ [l]
740
+ );
741
+ De(
742
+ a,
743
+ () => ({
744
+ focus: () => xt(i),
745
+ resetValue: (g) => Tt(i, g)
746
+ }),
747
+ [i]
748
+ );
749
+ const O = C(
750
+ (g) => /* @__PURE__ */ o(Rt, { ...g }),
751
+ []
752
+ ), D = C(
753
+ (g) => /* @__PURE__ */ o(wt, { ...g }),
754
+ []
755
+ ), E = H(), N = Array.isArray(r) && r.length > 0 ? r : E;
756
+ return /* @__PURE__ */ h(Be, { editor: i, value: N, onChange: s, children: [
757
+ S && /* @__PURE__ */ o(it, { children: S }),
758
+ /* @__PURE__ */ o(at, { asChild: !0, children: /* @__PURE__ */ o(
759
+ _e,
760
+ {
761
+ renderElement: O,
762
+ renderLeaf: D,
763
+ placeholder: u,
764
+ autoFocus: m,
765
+ readOnly: f || d,
766
+ onKeyDown: y,
767
+ onFocus: T,
768
+ onBlur: M,
769
+ "aria-label": "Rich text editor",
770
+ role: "textbox",
771
+ "aria-multiline": "true"
772
+ }
773
+ ) })
774
+ ] });
775
+ };
776
+ Ce.displayName = "RichTextEditor";
777
+ const Ee = (t) => C(
778
+ (e) => () => {
779
+ const { selection: r } = t;
780
+ e(), r && !t.selection && I.select(t, r), ne.isFocused(t) || ne.focus(t);
781
+ },
782
+ [t]
783
+ ), Nt = ({
784
+ withPreservedSelection: t,
785
+ textStyles: e
786
+ }) => {
787
+ const r = J(), s = A(() => ft.find(
788
+ (a) => P(r, a)
789
+ ) || "paragraph", [r.selection, r.children]), n = e.find((a) => a.id === s), l = n?.label || "", u = C(
790
+ (a) => {
791
+ t(() => {
792
+ re(r, a);
793
+ })();
794
+ },
795
+ [r, t]
796
+ ), d = C(
797
+ (a) => {
798
+ t(() => {
799
+ const i = Array.from(a)[0], y = P(r, "bulleted-list") ? "bulleted-list" : P(r, "numbered-list") ? "numbered-list" : null;
800
+ i ? re(r, i) : y && re(r, y);
801
+ })();
802
+ },
803
+ [r, t]
804
+ ), f = A(() => {
805
+ const a = [];
806
+ return F(r, "bold") && a.push("bold"), F(r, "italic") && a.push("italic"), F(r, "underline") && a.push("underline"), new Set(a);
807
+ }, [r.selection, r.children, x.marks(r)]), m = A(() => {
808
+ const a = [];
809
+ return P(r, "bulleted-list") && a.push("bulleted-list"), P(r, "numbered-list") && a.push("numbered-list"), new Set(a);
810
+ }, [r.selection, r.children]), S = A(() => r.history && r.history.undos.length > 0, [r.selection, r.children]), p = A(() => r.history && r.history.redos.length > 0, [r.selection, r.children]);
811
+ return {
812
+ currentTextStyle: s,
813
+ selectedTextStyle: n,
814
+ selectedTextStyleLabel: l,
815
+ handleTextStyleChange: u,
816
+ handleListToggle: d,
817
+ selectedFormatKeys: f,
818
+ selectedListKeys: m,
819
+ hasUndos: S,
820
+ hasRedos: p
821
+ };
822
+ }, At = ({
823
+ withPreservedSelection: t
824
+ }) => {
825
+ const e = J(), r = A(() => {
826
+ const u = [];
827
+ return ut.forEach((d) => {
828
+ F(e, d) && u.push(d);
829
+ }), new Set(u);
830
+ }, [e.selection, e.children, x.marks(e)]), s = A(() => {
831
+ const u = [];
832
+ return dt.forEach((d) => {
833
+ F(e, d) && u.push(d);
834
+ }), new Set(u);
835
+ }, [e.selection, e.children, x.marks(e)]), n = A(() => /* @__PURE__ */ new Set([
836
+ ...Array.from(r),
837
+ ...Array.from(s)
838
+ ]), [r, s]), l = C(
839
+ (u) => {
840
+ if (u === "all") return;
841
+ const d = Array.from(u), f = Array.from(n), m = d.filter(
842
+ (p) => !f.includes(p)
843
+ ), S = f.filter(
844
+ (p) => !d.includes(p)
845
+ );
846
+ [...m, ...S].forEach((p) => {
847
+ p === "superscript" || p === "subscript" ? t(() => {
848
+ const a = F(e, "superscript") ? "superscript" : F(e, "subscript") ? "subscript" : null;
849
+ m.includes(p) && a && a !== p && K(e, a), K(e, p);
850
+ })() : t(() => K(e, p))();
851
+ });
852
+ },
853
+ [e, n, t]
854
+ );
855
+ return {
856
+ selectedKeys: r,
857
+ selectedScriptKeys: s,
858
+ allSelectedKeys: n,
859
+ handleAllSelectionChange: l
860
+ };
861
+ }, Dt = ({ isDisabled: t = !1 }) => {
862
+ const e = Te(), r = J(), s = Ee(r), { allSelectedKeys: n, handleAllSelectionChange: l } = At({
863
+ withPreservedSelection: s
864
+ });
865
+ return /* @__PURE__ */ h(
866
+ v.Root,
867
+ {
868
+ selectionMode: "multiple",
869
+ selectedKeys: n,
870
+ onSelectionChange: l,
871
+ children: [
872
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
873
+ /* @__PURE__ */ o(v.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
874
+ se,
875
+ {
876
+ size: "xs",
877
+ variant: "ghost",
878
+ "aria-label": e.formatMessage(c.moreFormattingOptions),
879
+ isDisabled: t,
880
+ onMouseDown: (u) => u.preventDefault(),
881
+ children: /* @__PURE__ */ o(Ve, {})
882
+ }
883
+ ) }),
884
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.moreStyles) })
885
+ ] }),
886
+ /* @__PURE__ */ h(v.Content, { children: [
887
+ /* @__PURE__ */ o(v.Item, { id: "strikethrough", children: /* @__PURE__ */ h(B, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
888
+ /* @__PURE__ */ o(je, {}),
889
+ /* @__PURE__ */ o(L, { textStyle: "sm", children: e.formatMessage(c.strikethrough) })
890
+ ] }) }),
891
+ /* @__PURE__ */ o(v.Item, { id: "code", children: /* @__PURE__ */ h(B, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
892
+ /* @__PURE__ */ o(We, {}),
893
+ /* @__PURE__ */ o(L, { textStyle: "sm", children: e.formatMessage(c.code) })
894
+ ] }) }),
895
+ /* @__PURE__ */ o(v.Item, { id: "superscript", children: /* @__PURE__ */ h(B, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
896
+ /* @__PURE__ */ o(L, { children: "X²" }),
897
+ /* @__PURE__ */ o(L, { textStyle: "sm", children: e.formatMessage(c.superscript) })
898
+ ] }) }),
899
+ /* @__PURE__ */ o(v.Item, { id: "subscript", children: /* @__PURE__ */ h(B, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
900
+ /* @__PURE__ */ o(L, { children: "X₂" }),
901
+ /* @__PURE__ */ o(L, { textStyle: "sm", children: e.formatMessage(c.subscript) })
902
+ ] }) })
903
+ ] })
904
+ ]
905
+ }
906
+ );
907
+ }, Ne = ({
908
+ isDisabled: t = !1
909
+ }) => {
910
+ const e = Te(), r = J(), s = Ee(r), n = ht(e), {
911
+ currentTextStyle: l,
912
+ selectedTextStyleLabel: u,
913
+ handleTextStyleChange: d,
914
+ handleListToggle: f,
915
+ selectedFormatKeys: m,
916
+ selectedListKeys: S,
917
+ hasUndos: p,
918
+ hasRedos: a
919
+ } = Nt({ withPreservedSelection: s, textStyles: n });
920
+ return /* @__PURE__ */ h(
921
+ rt,
922
+ {
923
+ orientation: "horizontal",
924
+ "aria-label": e.formatMessage(c.textFormatting),
925
+ width: "full",
926
+ overflow: "hidden",
927
+ size: "xs",
928
+ children: [
929
+ /* @__PURE__ */ o(ae, { children: /* @__PURE__ */ h(
930
+ v.Root,
931
+ {
932
+ onAction: (i) => d(String(i)),
933
+ children: [
934
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
935
+ /* @__PURE__ */ o(
936
+ v.Trigger,
937
+ {
938
+ height: "800",
939
+ width: "4000",
940
+ bg: "primary.1",
941
+ borderRadius: "200",
942
+ _hover: { bg: "primary.2" },
943
+ isDisabled: t,
944
+ onMouseDown: (i) => i.preventDefault(),
945
+ "aria-label": e.formatMessage(c.textStyleMenu),
946
+ children: /* @__PURE__ */ h(B, { display: "flex", alignItems: "center", gap: "200", px: "200", children: [
947
+ /* @__PURE__ */ o(B, { display: "flex", alignItems: "center", gap: "200", flexGrow: "1", children: /* @__PURE__ */ o(L, { my: "auto", textStyle: "sm", fontWeight: "500", children: u }) }),
948
+ /* @__PURE__ */ o(Ge, {})
949
+ ] })
950
+ }
951
+ ),
952
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.textStyle) })
953
+ ] }),
954
+ /* @__PURE__ */ o(v.Content, { children: n.map((i) => /* @__PURE__ */ o(
955
+ v.Item,
956
+ {
957
+ id: i.id,
958
+ ...l === i.id && {
959
+ "data-state": "checked"
960
+ },
961
+ children: /* @__PURE__ */ o(L, { ...i.props, children: i.label })
962
+ },
963
+ i.id
964
+ )) })
965
+ ]
966
+ }
967
+ ) }),
968
+ /* @__PURE__ */ o(le, { orientation: "vertical" }),
969
+ /* @__PURE__ */ h(
970
+ ce.Root,
971
+ {
972
+ selectionMode: "multiple",
973
+ selectedKeys: m,
974
+ isDisabled: t,
975
+ children: [
976
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
977
+ /* @__PURE__ */ h(
978
+ U,
979
+ {
980
+ id: "bold",
981
+ size: "xs",
982
+ variant: "ghost",
983
+ "aria-label": e.formatMessage(c.bold),
984
+ isDisabled: t,
985
+ onMouseDown: (i) => i.preventDefault(),
986
+ onPress: s(() => K(r, "bold")),
987
+ children: [
988
+ /* @__PURE__ */ o(Xe, {}),
989
+ /* @__PURE__ */ o(V, { children: e.formatMessage(c.bold) })
990
+ ]
991
+ }
992
+ ),
993
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.bold) })
994
+ ] }),
995
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
996
+ /* @__PURE__ */ h(
997
+ U,
998
+ {
999
+ id: "italic",
1000
+ size: "xs",
1001
+ variant: "ghost",
1002
+ "aria-label": e.formatMessage(c.italic),
1003
+ isDisabled: t,
1004
+ onMouseDown: (i) => i.preventDefault(),
1005
+ onPress: s(() => K(r, "italic")),
1006
+ children: [
1007
+ /* @__PURE__ */ o(Ye, {}),
1008
+ /* @__PURE__ */ o(V, { children: e.formatMessage(c.italic) })
1009
+ ]
1010
+ }
1011
+ ),
1012
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.italic) })
1013
+ ] }),
1014
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
1015
+ /* @__PURE__ */ h(
1016
+ U,
1017
+ {
1018
+ id: "underline",
1019
+ size: "xs",
1020
+ variant: "ghost",
1021
+ "aria-label": e.formatMessage(c.underline),
1022
+ isDisabled: t,
1023
+ onMouseDown: (i) => i.preventDefault(),
1024
+ onPress: s(
1025
+ () => K(r, "underline")
1026
+ ),
1027
+ children: [
1028
+ /* @__PURE__ */ o(Qe, {}),
1029
+ /* @__PURE__ */ o(V, { children: e.formatMessage(c.underline) })
1030
+ ]
1031
+ }
1032
+ ),
1033
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.underline) })
1034
+ ] })
1035
+ ]
1036
+ }
1037
+ ),
1038
+ /* @__PURE__ */ o(Dt, { isDisabled: t }),
1039
+ /* @__PURE__ */ o(le, { orientation: "vertical" }),
1040
+ /* @__PURE__ */ h(
1041
+ ce.Root,
1042
+ {
1043
+ selectionMode: "single",
1044
+ selectedKeys: S,
1045
+ onSelectionChange: f,
1046
+ "aria-label": e.formatMessage(c.listFormatting),
1047
+ isDisabled: t,
1048
+ children: [
1049
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
1050
+ /* @__PURE__ */ o(
1051
+ U,
1052
+ {
1053
+ id: "bulleted-list",
1054
+ size: "xs",
1055
+ variant: "ghost",
1056
+ "aria-label": e.formatMessage(c.bulletedList),
1057
+ isDisabled: t,
1058
+ onMouseDown: (i) => i.preventDefault(),
1059
+ children: /* @__PURE__ */ o(Je, {})
1060
+ }
1061
+ ),
1062
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.bulletedList) })
1063
+ ] }),
1064
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
1065
+ /* @__PURE__ */ o(
1066
+ U,
1067
+ {
1068
+ id: "numbered-list",
1069
+ size: "xs",
1070
+ variant: "ghost",
1071
+ "aria-label": e.formatMessage(c.numberedList),
1072
+ isDisabled: t,
1073
+ onMouseDown: (i) => i.preventDefault(),
1074
+ children: /* @__PURE__ */ o(Ze, {})
1075
+ }
1076
+ ),
1077
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.numberedList) })
1078
+ ] })
1079
+ ]
1080
+ }
1081
+ ),
1082
+ /* @__PURE__ */ o(B, { flexGrow: "1" }),
1083
+ /* @__PURE__ */ h(ae, { children: [
1084
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
1085
+ /* @__PURE__ */ h(
1086
+ se,
1087
+ {
1088
+ size: "xs",
1089
+ variant: "ghost",
1090
+ "aria-label": e.formatMessage(c.undo),
1091
+ isDisabled: !p || t,
1092
+ onPress: s(() => r.undo()),
1093
+ onMouseDown: (i) => i.preventDefault(),
1094
+ children: [
1095
+ /* @__PURE__ */ o(et, {}),
1096
+ /* @__PURE__ */ o(V, { children: e.formatMessage(c.undo) })
1097
+ ]
1098
+ }
1099
+ ),
1100
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.undo) })
1101
+ ] }),
1102
+ /* @__PURE__ */ h(b.Root, { delay: 0, closeDelay: 0, children: [
1103
+ /* @__PURE__ */ h(
1104
+ se,
1105
+ {
1106
+ size: "xs",
1107
+ variant: "ghost",
1108
+ "aria-label": e.formatMessage(c.redo),
1109
+ isDisabled: !a || t,
1110
+ onPress: s(() => r.redo()),
1111
+ onMouseDown: (i) => i.preventDefault(),
1112
+ children: [
1113
+ /* @__PURE__ */ o(tt, {}),
1114
+ /* @__PURE__ */ o(V, { children: e.formatMessage(c.redo) })
1115
+ ]
1116
+ }
1117
+ ),
1118
+ /* @__PURE__ */ o(b.Content, { placement: "top", children: e.formatMessage(c.redo) })
1119
+ ] })
1120
+ ] })
1121
+ ]
1122
+ }
1123
+ );
1124
+ };
1125
+ Ne.displayName = "RichTextToolbar";
1126
+ const Lt = (t) => {
1127
+ const {
1128
+ ref: e,
1129
+ value: r,
1130
+ defaultValue: s,
1131
+ onChange: n,
1132
+ onFocus: l,
1133
+ onBlur: u,
1134
+ placeholder: d = "",
1135
+ isDisabled: f = !1,
1136
+ isReadOnly: m = !1,
1137
+ isInvalid: S = !1,
1138
+ autoFocus: p = !1,
1139
+ ...a
1140
+ } = t, i = He({ recipe: nt }), [y, T] = i.splitVariantProps({
1141
+ // Only semantic variants go here (none currently defined)
1142
+ ...a
1143
+ }), [M, O] = Oe(T), D = {
1144
+ "data-disabled": f ? "true" : void 0,
1145
+ "data-invalid": S ? "true" : void 0,
1146
+ "data-readonly": m ? "true" : void 0
1147
+ }, [E, N] = ie(() => {
1148
+ const R = r ?? s ?? "";
1149
+ try {
1150
+ return R ? oe(R) : H();
1151
+ } catch ($) {
1152
+ return console.warn("Failed to parse initial HTML, using empty value:", $), H();
1153
+ }
1154
+ }), [g, _] = ie(() => r ?? s ?? ""), G = ye(null);
1155
+ Le(() => {
1156
+ if (r !== void 0 && r !== g) {
1157
+ const R = r ? oe(r) : H();
1158
+ N(R), _(r);
1159
+ }
1160
+ }, [r, g]);
1161
+ const w = C(
1162
+ (R) => {
1163
+ const $ = pt(R), Ae = $ !== g;
1164
+ N(R), _($), Ae && n && n($);
1165
+ },
1166
+ [g, n]
1167
+ ), z = Ie(E);
1168
+ return /* @__PURE__ */ o(
1169
+ ot,
1170
+ {
1171
+ role: "group",
1172
+ ...y,
1173
+ ...M,
1174
+ ...O,
1175
+ ...D,
1176
+ ref: e,
1177
+ children: /* @__PURE__ */ o(
1178
+ Ce,
1179
+ {
1180
+ ref: G,
1181
+ value: z,
1182
+ onChange: w,
1183
+ onFocus: l,
1184
+ onBlur: u,
1185
+ placeholder: d,
1186
+ isDisabled: f,
1187
+ isReadOnly: m,
1188
+ autoFocus: p,
1189
+ toolbar: m ? null : /* @__PURE__ */ o(Ne, { isDisabled: f })
1190
+ }
1191
+ )
1192
+ }
1193
+ );
1194
+ };
1195
+ Lt.displayName = "RichTextInput";
1196
+ export {
1197
+ Lt as R,
1198
+ Me as g
1199
+ };
1200
+ //# sourceMappingURL=rich-text-input-BebV_CaK.es.js.map