themelia-react-ui 2.0.1 → 2.0.3

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 (490) hide show
  1. package/CHANGELOG.md +317 -131
  2. package/README.md +25 -9
  3. package/THIRD_PARTY_NOTICES.md +7 -0
  4. package/dist/{accordion-B6a3vVgA.js → accordion-Cjb6sx0G.js} +14 -13
  5. package/dist/accordion-Cjb6sx0G.js.map +1 -0
  6. package/dist/action-menu-CllU52Mm.js +280 -0
  7. package/dist/action-menu-CllU52Mm.js.map +1 -0
  8. package/dist/affordance-geometry.generated-tF36bREk.js +140 -0
  9. package/dist/affordance-geometry.generated-tF36bREk.js.map +1 -0
  10. package/dist/ai-artifact-DvTwDVyL.js +1148 -0
  11. package/dist/ai-artifact-DvTwDVyL.js.map +1 -0
  12. package/dist/{app-shell-ZK5RWdo6.js → app-shell-C4FhvCqF.js} +5 -5
  13. package/dist/{app-shell-ZK5RWdo6.js.map → app-shell-C4FhvCqF.js.map} +1 -1
  14. package/dist/attachment-BxDfL2mw.js +246 -0
  15. package/dist/attachment-BxDfL2mw.js.map +1 -0
  16. package/dist/{auth-CYxKfo69.js → auth-BGua8ouh.js} +58 -54
  17. package/dist/auth-BGua8ouh.js.map +1 -0
  18. package/dist/{avatar-BBnEJIx8.js → avatar-DAPlDvhJ.js} +7 -7
  19. package/dist/avatar-DAPlDvhJ.js.map +1 -0
  20. package/dist/{badge-MrKVNzW9.js → badge-HpFqoqSY.js} +40 -40
  21. package/dist/badge-HpFqoqSY.js.map +1 -0
  22. package/dist/base/accordion.js +1 -1
  23. package/dist/base/action-menu.js +1 -1
  24. package/dist/base/attachment.js +1 -1
  25. package/dist/base/avatar.js +1 -1
  26. package/dist/base/badge.js +1 -1
  27. package/dist/base/batch-action-bar.js +1 -1
  28. package/dist/base/buttons.js +1 -1
  29. package/dist/base/cards.js +2 -2
  30. package/dist/base/carousel.js +40 -36
  31. package/dist/base/carousel.js.map +1 -1
  32. package/dist/base/cascader.js +92 -92
  33. package/dist/base/cascader.js.map +1 -1
  34. package/dist/base/chart.js +1 -1
  35. package/dist/base/choice-inputs.js +2 -2
  36. package/dist/base/code-block.js +1 -1
  37. package/dist/base/combobox.js +2 -2
  38. package/dist/base/command.js +1 -1
  39. package/dist/base/copyable.js +1 -1
  40. package/dist/base/date-pickers.js +2 -2
  41. package/dist/base/display.js +6 -6
  42. package/dist/base/feedback.js +3 -3
  43. package/dist/base/forms-numeric.js +1 -1
  44. package/dist/base/forms.js +2 -2
  45. package/dist/base/inline-edit.js +14 -14
  46. package/dist/base/inline-edit.js.map +1 -1
  47. package/dist/base/item.js +1 -1
  48. package/dist/base/media-gallery.js +1 -1
  49. package/dist/base/metadata-list.js +1 -1
  50. package/dist/base/navigation.js +6 -6
  51. package/dist/base/popover-menu.js +1 -1
  52. package/dist/base/popover.js +1 -1
  53. package/dist/base/qr-code.js +1 -1
  54. package/dist/base/repeaters.js +171 -176
  55. package/dist/base/repeaters.js.map +1 -1
  56. package/dist/base/sheet.js +1 -1
  57. package/dist/base/sidebar.js +1 -1
  58. package/dist/base/signature-pad.js +6 -6
  59. package/dist/base/skeleton.js +1 -1
  60. package/dist/base/spinner.js +79 -2
  61. package/dist/base/spinner.js.map +1 -0
  62. package/dist/base/structure.js +1 -1
  63. package/dist/base/table.js +1 -1
  64. package/dist/base/text-inputs.js +2 -2
  65. package/dist/base/toaster.js +46 -45
  66. package/dist/base/toaster.js.map +1 -1
  67. package/dist/base/tree.js +1 -1
  68. package/dist/base/upload-queue.js +1 -1
  69. package/dist/base/upload.js +3 -3
  70. package/dist/base/value-inputs.js +1 -1
  71. package/dist/{batch-action-bar-BZGDG-Si.js → batch-action-bar-DnUJ21NQ.js} +6 -5
  72. package/dist/batch-action-bar-DnUJ21NQ.js.map +1 -0
  73. package/dist/blocks/admin.js +42 -42
  74. package/dist/blocks/admin.js.map +1 -1
  75. package/dist/blocks/ai.js +260 -240
  76. package/dist/blocks/ai.js.map +1 -1
  77. package/dist/blocks/analytics/usage-card.js +1 -1
  78. package/dist/blocks/analytics.js +620 -585
  79. package/dist/blocks/analytics.js.map +1 -1
  80. package/dist/blocks/collaboration.js +1 -1
  81. package/dist/blocks/commerce/receipt.js +1 -1
  82. package/dist/blocks/commerce.js +1152 -1109
  83. package/dist/blocks/commerce.js.map +1 -1
  84. package/dist/blocks/data-display.js +2 -2
  85. package/dist/blocks/onboarding.js +48 -39
  86. package/dist/blocks/onboarding.js.map +1 -1
  87. package/dist/blocks/planning.js +13 -12
  88. package/dist/blocks/planning.js.map +1 -1
  89. package/dist/blocks/timelines.js +1 -1
  90. package/dist/{breadcrumbs-D5t7I023.js → breadcrumbs-C-oqs1sQ.js} +5 -5
  91. package/dist/breadcrumbs-C-oqs1sQ.js.map +1 -0
  92. package/dist/{button-QYwiyhD2.js → button-DVzspB_G.js} +2 -2
  93. package/dist/{button-QYwiyhD2.js.map → button-DVzspB_G.js.map} +1 -1
  94. package/dist/{buttons-SbIcm1HJ.js → buttons-DPZekJFu.js} +20 -15
  95. package/dist/buttons-DPZekJFu.js.map +1 -0
  96. package/dist/cards-BaBZR-AU.js +68 -0
  97. package/dist/cards-BaBZR-AU.js.map +1 -0
  98. package/dist/{chart-QfrARkXl.js → chart-ZOYyK2xG.js} +58 -55
  99. package/dist/chart-ZOYyK2xG.js.map +1 -0
  100. package/dist/{checkbox-DhB6K0bK.js → checkbox-AWIhNhmo.js} +2 -2
  101. package/dist/{checkbox-DhB6K0bK.js.map → checkbox-AWIhNhmo.js.map} +1 -1
  102. package/dist/{choice-inputs-t6w3ATNz.js → choice-inputs-CNHvARCJ.js} +49 -45
  103. package/dist/choice-inputs-CNHvARCJ.js.map +1 -0
  104. package/dist/{code-block-Dgbu-CU3.js → code-block-DeneBJR_.js} +8 -8
  105. package/dist/code-block-DeneBJR_.js.map +1 -0
  106. package/dist/{collapsible-D8AEGU1-.js → collapsible-C-_l4hpy.js} +3 -3
  107. package/dist/{collapsible-D8AEGU1-.js.map → collapsible-C-_l4hpy.js.map} +1 -1
  108. package/dist/{collection-content-uK16Grv0.js → collection-content-By56pLog.js} +3 -3
  109. package/dist/{collection-content-uK16Grv0.js.map → collection-content-By56pLog.js.map} +1 -1
  110. package/dist/combobox-DaHESuiL.js +355 -0
  111. package/dist/combobox-DaHESuiL.js.map +1 -0
  112. package/dist/{combobox-DLl0bfiq.js → combobox-Dxo2fAYQ.js} +289 -279
  113. package/dist/combobox-Dxo2fAYQ.js.map +1 -0
  114. package/dist/{command-kNR20o7x.js → command-C25VMRII.js} +7 -7
  115. package/dist/{command-kNR20o7x.js.map → command-C25VMRII.js.map} +1 -1
  116. package/dist/{comments-BpDuCUUu.js → comments-DD0DUPwJ.js} +114 -105
  117. package/dist/comments-DD0DUPwJ.js.map +1 -0
  118. package/dist/components/base/badge/badge.recipes.d.ts +1 -1
  119. package/dist/components/base/buttons/loader-button.d.ts +2 -1
  120. package/dist/components/base/cards/card.recipes.d.ts +2 -3
  121. package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +3 -13
  122. package/dist/components/base/cards/smart-card.types.d.ts +11 -4
  123. package/dist/components/base/chart/chart.d.ts +2 -5
  124. package/dist/components/base/combobox/combobox-field.d.ts +16 -0
  125. package/dist/components/base/combobox/combobox.strings.d.ts +7 -0
  126. package/dist/components/base/combobox/index.d.ts +30 -4
  127. package/dist/components/base/forms/form-sizing.d.ts +11 -3
  128. package/dist/components/base/navigation/pagination.d.ts +5 -2
  129. package/dist/components/base/popover/popover.recipes.d.ts +15 -1
  130. package/dist/components/base/table/index.d.ts +9 -2
  131. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  132. package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +1 -1
  133. package/dist/components/blocks/ai/ai-shimmer/types.d.ts +3 -0
  134. package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +3 -1
  135. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +16 -8
  136. package/dist/components/features/activities/partials/activity-marker.d.ts +6 -3
  137. package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +5 -0
  138. package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +220 -0
  139. package/dist/components/features/appointment-calendar/appointment-calendar.utils.d.ts +41 -0
  140. package/dist/components/features/appointment-calendar/index.d.ts +3 -0
  141. package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +32 -0
  142. package/dist/components/features/appointment-calendar/partials/appointment-month.d.ts +13 -0
  143. package/dist/components/features/combobox/combobox.strings.d.ts +15 -1
  144. package/dist/components/features/combobox/types.d.ts +4 -0
  145. package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
  146. package/dist/components/features/rich-text-editor/index.d.ts +1 -1
  147. package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
  148. package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +9 -1
  149. package/dist/components/features/table/table-header.d.ts +1 -1
  150. package/dist/components/features/table/table.strings.d.ts +55 -1
  151. package/dist/components/features/table/table.types.d.ts +17 -4
  152. package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +5 -0
  153. package/dist/components/primitives/number.d.ts +4 -2
  154. package/dist/components/primitives/value.d.ts +3 -1
  155. package/dist/components/typography/text-link.d.ts +4 -0
  156. package/dist/components/ui/combobox-dismiss.d.ts +16 -0
  157. package/dist/components/ui/combobox.d.ts +16 -7
  158. package/dist/components/ui/dialog.d.ts +1 -1
  159. package/dist/components/ui/item.d.ts +8 -8
  160. package/dist/components/ui/popover.d.ts +1 -1
  161. package/dist/components/ui/sheet.d.ts +1 -1
  162. package/dist/components/ui/tabs.d.ts +1 -1
  163. package/dist/{containers-DmWiJa2I.js → containers-Mu1LMGV1.js} +2 -2
  164. package/dist/{containers-DmWiJa2I.js.map → containers-Mu1LMGV1.js.map} +1 -1
  165. package/dist/{copyable-B3Gwgdqc.js → copyable-ClBuk_UK.js} +4 -4
  166. package/dist/{copyable-B3Gwgdqc.js.map → copyable-ClBuk_UK.js.map} +1 -1
  167. package/dist/{data-display-DafIvCl5.js → data-display-DT_khPl_.js} +98 -87
  168. package/dist/data-display-DT_khPl_.js.map +1 -0
  169. package/dist/{date-BgK3bTdo.js → date-DCrsDTZc.js} +5 -5
  170. package/dist/{date-BgK3bTdo.js.map → date-DCrsDTZc.js.map} +1 -1
  171. package/dist/{date-picker-CF-DtUpF.js → date-picker-B2K3ucWn.js} +594 -593
  172. package/dist/date-picker-B2K3ucWn.js.map +1 -0
  173. package/dist/date-pickers-Ds8gLaoP.js +175 -0
  174. package/dist/date-pickers-Ds8gLaoP.js.map +1 -0
  175. package/dist/{display-DsQTVzMz.js → display-hAc1HjpI.js} +49 -49
  176. package/dist/display-hAc1HjpI.js.map +1 -0
  177. package/dist/dropdown-menu-Cl4X7L5S.js +193 -0
  178. package/dist/dropdown-menu-Cl4X7L5S.js.map +1 -0
  179. package/dist/editable-text-recipe-Cn61kEcv.js +10 -0
  180. package/dist/editable-text-recipe-Cn61kEcv.js.map +1 -0
  181. package/dist/features/activities.js +398 -375
  182. package/dist/features/activities.js.map +1 -1
  183. package/dist/features/ai-chat.js +188 -179
  184. package/dist/features/ai-chat.js.map +1 -1
  185. package/dist/features/appointment-calendar.js +683 -0
  186. package/dist/features/appointment-calendar.js.map +1 -0
  187. package/dist/features/async-preview.js +109 -107
  188. package/dist/features/async-preview.js.map +1 -1
  189. package/dist/features/combobox.js +1 -1
  190. package/dist/features/comments.js +1 -1
  191. package/dist/features/data-view.js +137 -137
  192. package/dist/features/data-view.js.map +1 -1
  193. package/dist/features/email-composer.js +255 -255
  194. package/dist/features/email-composer.js.map +1 -1
  195. package/dist/features/event-calendar.js +254 -248
  196. package/dist/features/event-calendar.js.map +1 -1
  197. package/dist/features/filters.js +1 -1
  198. package/dist/features/global-search.js +35 -32
  199. package/dist/features/global-search.js.map +1 -1
  200. package/dist/features/kanban.js +118 -117
  201. package/dist/features/kanban.js.map +1 -1
  202. package/dist/features/map.js +233 -231
  203. package/dist/features/map.js.map +1 -1
  204. package/dist/features/media-library.js +789 -775
  205. package/dist/features/media-library.js.map +1 -1
  206. package/dist/features/mentions.js +1 -1
  207. package/dist/features/overlays.js +1 -1
  208. package/dist/features/products.js +922 -902
  209. package/dist/features/products.js.map +1 -1
  210. package/dist/features/questionnaire.js +28 -24
  211. package/dist/features/questionnaire.js.map +1 -1
  212. package/dist/features/resource-assignment.js +18 -15
  213. package/dist/features/resource-assignment.js.map +1 -1
  214. package/dist/features/resource.js +12 -12
  215. package/dist/features/resource.js.map +1 -1
  216. package/dist/features/rich-text-editor.js +2 -2
  217. package/dist/features/schema-form.js +15 -13
  218. package/dist/features/schema-form.js.map +1 -1
  219. package/dist/features/suggestions.js +3 -3
  220. package/dist/features/sync.js +11 -5
  221. package/dist/features/sync.js.map +1 -1
  222. package/dist/features/table.js +1 -1
  223. package/dist/features/theme-tweaker.js +493 -489
  224. package/dist/features/theme-tweaker.js.map +1 -1
  225. package/dist/feedback-BYIhtitP.js +239 -0
  226. package/dist/feedback-BYIhtitP.js.map +1 -0
  227. package/dist/{field-affordance-recipes-qQeIf4lG.js → field-affordance-recipes-DZhnIL_Y.js} +11 -18
  228. package/dist/field-affordance-recipes-DZhnIL_Y.js.map +1 -0
  229. package/dist/{filters-BkHH53uv.js → filters-DJVAveHA.js} +589 -580
  230. package/dist/filters-DJVAveHA.js.map +1 -0
  231. package/dist/{form-field-DUt4UxSV.js → form-field-CwH9y77i.js} +6 -5
  232. package/dist/form-field-CwH9y77i.js.map +1 -0
  233. package/dist/{form-sizing-By94KzXE.js → form-sizing-BdP_Mf5p.js} +39 -44
  234. package/dist/form-sizing-BdP_Mf5p.js.map +1 -0
  235. package/dist/{forms-Bzha-Y3B.js → forms-B9G_xwzi.js} +8 -8
  236. package/dist/{forms-Bzha-Y3B.js.map → forms-B9G_xwzi.js.map} +1 -1
  237. package/dist/{forms-numeric-C0bvjRPZ.js → forms-numeric-B_jraJaQ.js} +309 -309
  238. package/dist/forms-numeric-B_jraJaQ.js.map +1 -0
  239. package/dist/{header-BOefOKd1.js → header-BSfIEWbI.js} +160 -153
  240. package/dist/header-BSfIEWbI.js.map +1 -0
  241. package/dist/{hooks-9k_TtmKh.js → hooks-ClH9thn4.js} +2 -2
  242. package/dist/{hooks-9k_TtmKh.js.map → hooks-ClH9thn4.js.map} +1 -1
  243. package/dist/{icon-badge-CAuKupo9.js → icon-badge-DYKIwvOV.js} +4 -4
  244. package/dist/{icon-badge-CAuKupo9.js.map → icon-badge-DYKIwvOV.js.map} +1 -1
  245. package/dist/index.js +3 -3
  246. package/dist/input-CZw8iU99.js +21 -0
  247. package/dist/input-CZw8iU99.js.map +1 -0
  248. package/dist/input-DQdEd0YD.js +263 -0
  249. package/dist/input-DQdEd0YD.js.map +1 -0
  250. package/dist/{interaction-recipes-CHr0dJUs.js → interaction-recipes-XR9ZpVYL.js} +2 -1
  251. package/dist/interaction-recipes-XR9ZpVYL.js.map +1 -0
  252. package/dist/item-K5_ghvze.js +275 -0
  253. package/dist/item-K5_ghvze.js.map +1 -0
  254. package/dist/layout/app-shell.js +1 -1
  255. package/dist/layout/auth.js +1 -1
  256. package/dist/layout/containers.js +1 -1
  257. package/dist/layout/header.js +1 -1
  258. package/dist/layout/hooks.js +1 -1
  259. package/dist/layout/navigation.js +1 -1
  260. package/dist/layout/page.js +1 -1
  261. package/dist/layout/settings.js +1 -1
  262. package/dist/layout/sidebar.js +2 -2
  263. package/dist/layout/workspace.js +1 -1
  264. package/dist/layout.js +10 -10
  265. package/dist/lib/affordance-geometry.generated.d.ts +71 -0
  266. package/dist/lib/editable-text-recipe.d.ts +4 -4
  267. package/dist/lib/field-affordance-recipes.d.ts +2 -2
  268. package/dist/lib/interaction-recipes.d.ts +5 -0
  269. package/dist/lib/theme-mode-css.d.ts +7 -0
  270. package/dist/lib/tone-recipes.d.ts +8 -0
  271. package/dist/lib/ui-provider/types.d.ts +2 -2
  272. package/dist/lib/use-popup-focus-recovery.d.ts +8 -0
  273. package/dist/lib/utils.js +1 -1
  274. package/dist/{media-gallery-DcTtAaeC.js → media-gallery-3zIVLMWH.js} +8 -8
  275. package/dist/media-gallery-3zIVLMWH.js.map +1 -0
  276. package/dist/{mentions-D-uyCh01.js → mentions-CGlEJ15c.js} +144 -142
  277. package/dist/mentions-CGlEJ15c.js.map +1 -0
  278. package/dist/{message-CdHgIWKf.js → message-DZ_ruyUV.js} +6 -5
  279. package/dist/message-DZ_ruyUV.js.map +1 -0
  280. package/dist/{metadata-list-X5rYAKSB.js → metadata-list-8N16ZMW_.js} +130 -119
  281. package/dist/metadata-list-8N16ZMW_.js.map +1 -0
  282. package/dist/{navigation-D3KwXmaq.js → navigation-Bnotn4AQ.js} +19 -19
  283. package/dist/navigation-Bnotn4AQ.js.map +1 -0
  284. package/dist/{navigation-HJf5zxlH.js → navigation-BzhHI3lo.js} +36 -35
  285. package/dist/navigation-BzhHI3lo.js.map +1 -0
  286. package/dist/{navigation-row-recipes-BVowojQw.js → navigation-row-recipes-BFLCk_Aq.js} +2 -2
  287. package/dist/{navigation-row-recipes-BVowojQw.js.map → navigation-row-recipes-BFLCk_Aq.js.map} +1 -1
  288. package/dist/{number-DMhe-Vsk.js → number-DbV1Dija.js} +36 -34
  289. package/dist/{number-DMhe-Vsk.js.map → number-DbV1Dija.js.map} +1 -1
  290. package/dist/{overflow-tab-bar-sQHXLlwQ.js → overflow-tab-bar-CWY7Nogn.js} +105 -103
  291. package/dist/overflow-tab-bar-CWY7Nogn.js.map +1 -0
  292. package/dist/{overlays-I0axtYA6.js → overlays-tMkF-VAN.js} +282 -278
  293. package/dist/overlays-tMkF-VAN.js.map +1 -0
  294. package/dist/{page-B5dTH9gE.js → page-CL9YeH_V.js} +8 -8
  295. package/dist/{page-B5dTH9gE.js.map → page-CL9YeH_V.js.map} +1 -1
  296. package/dist/{page-header-commands-DjzFEq3E.js → page-header-commands-DOb6WsfD.js} +5 -5
  297. package/dist/{page-header-commands-DjzFEq3E.js.map → page-header-commands-DOb6WsfD.js.map} +1 -1
  298. package/dist/pagination-BL25hu2s.js +158 -0
  299. package/dist/pagination-BL25hu2s.js.map +1 -0
  300. package/dist/{popover-Di55PyAI.js → popover-gnTOhbFM.js} +69 -66
  301. package/dist/popover-gnTOhbFM.js.map +1 -0
  302. package/dist/popover-menu-Cn9rUkdc.js +100 -0
  303. package/dist/popover-menu-Cn9rUkdc.js.map +1 -0
  304. package/dist/{popover.recipes-Bdyhj2db.js → popover.recipes-D3j8R8Yp.js} +17 -10
  305. package/dist/popover.recipes-D3j8R8Yp.js.map +1 -0
  306. package/dist/{primitives-B-CkiEMU.js → primitives-BFK08r9M.js} +45 -44
  307. package/dist/primitives-BFK08r9M.js.map +1 -0
  308. package/dist/primitives.js +4 -4
  309. package/dist/{progress-rnS8-uAW.js → progress-B1VnCT0K.js} +5 -5
  310. package/dist/{progress-rnS8-uAW.js.map → progress-B1VnCT0K.js.map} +1 -1
  311. package/dist/{receipt-D0oswZ0p.js → receipt-BVSOH3Xo.js} +9 -6
  312. package/dist/{receipt-D0oswZ0p.js.map → receipt-BVSOH3Xo.js.map} +1 -1
  313. package/dist/{rich-text-DvGulsNJ.js → rich-text-GOUyKQ-s.js} +3 -3
  314. package/dist/{rich-text-DvGulsNJ.js.map → rich-text-GOUyKQ-s.js.map} +1 -1
  315. package/dist/{rich-text-editor-sMU_Scqm.js → rich-text-editor-cRLC-eBK.js} +418 -426
  316. package/dist/rich-text-editor-cRLC-eBK.js.map +1 -0
  317. package/dist/rich-text-editor-toolbar-DfXg0-VC.js +94 -0
  318. package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +1 -0
  319. package/dist/{scroll-area-Bt_vXY2b.js → scroll-area-DcI-M1UT.js} +2 -2
  320. package/dist/{scroll-area-Bt_vXY2b.js.map → scroll-area-DcI-M1UT.js.map} +1 -1
  321. package/dist/{separator-C8DlRGwF.js → separator-BDV-Y648.js} +3 -3
  322. package/dist/{separator-C8DlRGwF.js.map → separator-BDV-Y648.js.map} +1 -1
  323. package/dist/{separator-CYHnjsAb.js → separator-Bom7NsGO.js} +2 -2
  324. package/dist/{separator-CYHnjsAb.js.map → separator-Bom7NsGO.js.map} +1 -1
  325. package/dist/services/actions.js +1 -1
  326. package/dist/{settings-CQW3b-Cu.js → settings-ybnjVwbd.js} +20 -19
  327. package/dist/settings-ybnjVwbd.js.map +1 -0
  328. package/dist/{sheet-4SEvVYzA.js → sheet-ijlsjq-n.js} +76 -73
  329. package/dist/sheet-ijlsjq-n.js.map +1 -0
  330. package/dist/{sidebar-C7WWR29L.js → sidebar-Db6gkh3U.js} +183 -182
  331. package/dist/sidebar-Db6gkh3U.js.map +1 -0
  332. package/dist/{sidebar-d7Dg80ln.js → sidebar-DkTO4VTO.js} +14 -13
  333. package/dist/{sidebar-d7Dg80ln.js.map → sidebar-DkTO4VTO.js.map} +1 -1
  334. package/dist/{skeleton-Cz890JZF.js → skeleton-Byjnt7qr.js} +3 -3
  335. package/dist/{skeleton-Cz890JZF.js.map → skeleton-Byjnt7qr.js.map} +1 -1
  336. package/dist/smart-card-DiC5aac3.js +604 -0
  337. package/dist/smart-card-DiC5aac3.js.map +1 -0
  338. package/dist/{structure-DC2dygdA.js → structure-BmisBK-3.js} +2 -2
  339. package/dist/{structure-DC2dygdA.js.map → structure-BmisBK-3.js.map} +1 -1
  340. package/dist/style.css +1 -1
  341. package/dist/table-BweFy_P9.js +1530 -0
  342. package/dist/table-BweFy_P9.js.map +1 -0
  343. package/dist/{table-CIKyLUsy.js → table-DsfzoUia.js} +75 -63
  344. package/dist/table-DsfzoUia.js.map +1 -0
  345. package/dist/{tabs-DwBJfjxX.js → tabs-CDocW5D1.js} +14 -13
  346. package/dist/tabs-CDocW5D1.js.map +1 -0
  347. package/dist/text-inputs-f9Ia-aCi.js +353 -0
  348. package/dist/text-inputs-f9Ia-aCi.js.map +1 -0
  349. package/dist/theme-mode-css-BB-_RYab.js +14 -0
  350. package/dist/theme-mode-css-BB-_RYab.js.map +1 -0
  351. package/dist/theme-scope-BJ6eE2xt.js +50 -0
  352. package/dist/theme-scope-BJ6eE2xt.js.map +1 -0
  353. package/dist/theme.css +285 -228
  354. package/dist/themes/green.css +16 -12
  355. package/dist/timelines-CwM_9IhD.js +457 -0
  356. package/dist/timelines-CwM_9IhD.js.map +1 -0
  357. package/dist/{tone-recipes-CPoExcTE.js → tone-recipes-BPsRAvhu.js} +5 -2
  358. package/dist/tone-recipes-BPsRAvhu.js.map +1 -0
  359. package/dist/{tooltip-CsfgrfS7.js → tooltip-yiRJUFjp.js} +4 -4
  360. package/dist/{tooltip-CsfgrfS7.js.map → tooltip-yiRJUFjp.js.map} +1 -1
  361. package/dist/{tree-BiKhg8AY.js → tree-WnKQzwbq.js} +9 -9
  362. package/dist/{tree-BiKhg8AY.js.map → tree-WnKQzwbq.js.map} +1 -1
  363. package/dist/typography/rich-text.js +1 -1
  364. package/dist/{typography-DTRkE9zL.js → typography-UTnveOEy.js} +6 -6
  365. package/dist/typography-UTnveOEy.js.map +1 -0
  366. package/dist/typography.js +2 -2
  367. package/dist/{ui-provider-1D_NSYzO.js → ui-provider-C_U0Xma4.js} +3 -3
  368. package/dist/ui-provider-C_U0Xma4.js.map +1 -0
  369. package/dist/ui-provider.js +2 -2
  370. package/dist/{upload-BO8-CLN6.js → upload-CXyxmQBP.js} +13 -12
  371. package/dist/upload-CXyxmQBP.js.map +1 -0
  372. package/dist/{upload-queue-EOC8g1gf.js → upload-queue-Boscubn9.js} +11 -9
  373. package/dist/upload-queue-Boscubn9.js.map +1 -0
  374. package/dist/{usage-card-obRaBskq.js → usage-card-BhO5eqkX.js} +53 -37
  375. package/dist/usage-card-BhO5eqkX.js.map +1 -0
  376. package/dist/use-popup-focus-recovery-C0QPvgOR.js +36 -0
  377. package/dist/use-popup-focus-recovery-C0QPvgOR.js.map +1 -0
  378. package/dist/{utils-l5LpDw2z.js → utils-BRhFDwuU.js} +59 -44
  379. package/dist/utils-BRhFDwuU.js.map +1 -0
  380. package/dist/{value-inputs-TAYMX111.js → value-inputs-TaX4OjNk.js} +268 -252
  381. package/dist/value-inputs-TaX4OjNk.js.map +1 -0
  382. package/dist/{value-typography-b8wpz1eX.js → value-typography-BP8OG6h5.js} +2 -2
  383. package/dist/{value-typography-b8wpz1eX.js.map → value-typography-BP8OG6h5.js.map} +1 -1
  384. package/dist/{workspace-DH0v0KcB.js → workspace-B-OEm3Kf.js} +34 -33
  385. package/dist/workspace-B-OEm3Kf.js.map +1 -0
  386. package/docs/consumer-skill/SKILL.md +3 -3
  387. package/docs/consumer-skill/references/agents-md.md +1 -1
  388. package/docs/consumer-skill/references/composition.md +8 -6
  389. package/docs/consumer-skill/references/installation.md +6 -0
  390. package/docs/consumer-skill/references/integration.md +4 -3
  391. package/docs/consumer-skill/references/public-api.json +105 -2
  392. package/docs/consumer-skill/references/review.md +7 -0
  393. package/docs/consumer-skill/references/theming.md +71 -6
  394. package/docs/consumer-skill/references/tokens.json +1 -1
  395. package/docs/consumer-skill/references/workflows.md +26 -0
  396. package/docs/consumer-skill/scripts/composition-policy.mjs +3 -2
  397. package/docs/consumer-skill/scripts/surface-policy.mjs +11 -0
  398. package/package.json +8 -4
  399. package/dist/accordion-B6a3vVgA.js.map +0 -1
  400. package/dist/action-menu-TzCoSlwL.js +0 -280
  401. package/dist/action-menu-TzCoSlwL.js.map +0 -1
  402. package/dist/affordance-geometry.generated-B5iu-Mkr.js +0 -69
  403. package/dist/affordance-geometry.generated-B5iu-Mkr.js.map +0 -1
  404. package/dist/ai-artifact-BMJdv-6q.js +0 -1115
  405. package/dist/ai-artifact-BMJdv-6q.js.map +0 -1
  406. package/dist/attachment-BtfhGm8i.js +0 -245
  407. package/dist/attachment-BtfhGm8i.js.map +0 -1
  408. package/dist/auth-CYxKfo69.js.map +0 -1
  409. package/dist/avatar-BBnEJIx8.js.map +0 -1
  410. package/dist/badge-MrKVNzW9.js.map +0 -1
  411. package/dist/batch-action-bar-BZGDG-Si.js.map +0 -1
  412. package/dist/breadcrumbs-D5t7I023.js.map +0 -1
  413. package/dist/buttons-SbIcm1HJ.js.map +0 -1
  414. package/dist/cards-CiiHpKYd.js +0 -66
  415. package/dist/cards-CiiHpKYd.js.map +0 -1
  416. package/dist/chart-QfrARkXl.js.map +0 -1
  417. package/dist/choice-inputs-t6w3ATNz.js.map +0 -1
  418. package/dist/code-block-Dgbu-CU3.js.map +0 -1
  419. package/dist/combobox-2Ic8N9bL.js +0 -278
  420. package/dist/combobox-2Ic8N9bL.js.map +0 -1
  421. package/dist/combobox-DLl0bfiq.js.map +0 -1
  422. package/dist/comments-BpDuCUUu.js.map +0 -1
  423. package/dist/data-display-DafIvCl5.js.map +0 -1
  424. package/dist/date-picker-CF-DtUpF.js.map +0 -1
  425. package/dist/date-pickers-BmzxJl5l.js +0 -174
  426. package/dist/date-pickers-BmzxJl5l.js.map +0 -1
  427. package/dist/display-DsQTVzMz.js.map +0 -1
  428. package/dist/dropdown-menu-E2qmdC7o.js +0 -193
  429. package/dist/dropdown-menu-E2qmdC7o.js.map +0 -1
  430. package/dist/editable-text-recipe-Bkm6wKHp.js +0 -10
  431. package/dist/editable-text-recipe-Bkm6wKHp.js.map +0 -1
  432. package/dist/feedback-qNuMBtRH.js +0 -233
  433. package/dist/feedback-qNuMBtRH.js.map +0 -1
  434. package/dist/field-affordance-recipes-qQeIf4lG.js.map +0 -1
  435. package/dist/filters-BkHH53uv.js.map +0 -1
  436. package/dist/form-field-DUt4UxSV.js.map +0 -1
  437. package/dist/form-sizing-By94KzXE.js.map +0 -1
  438. package/dist/forms-numeric-C0bvjRPZ.js.map +0 -1
  439. package/dist/header-BOefOKd1.js.map +0 -1
  440. package/dist/input-DWhBBBww.js +0 -262
  441. package/dist/input-DWhBBBww.js.map +0 -1
  442. package/dist/input-Ddi_LSYv.js +0 -20
  443. package/dist/input-Ddi_LSYv.js.map +0 -1
  444. package/dist/interaction-recipes-CHr0dJUs.js.map +0 -1
  445. package/dist/item-DEmDiTlD.js +0 -265
  446. package/dist/item-DEmDiTlD.js.map +0 -1
  447. package/dist/media-gallery-DcTtAaeC.js.map +0 -1
  448. package/dist/mentions-D-uyCh01.js.map +0 -1
  449. package/dist/message-CdHgIWKf.js.map +0 -1
  450. package/dist/metadata-list-X5rYAKSB.js.map +0 -1
  451. package/dist/navigation-D3KwXmaq.js.map +0 -1
  452. package/dist/navigation-HJf5zxlH.js.map +0 -1
  453. package/dist/overflow-tab-bar-sQHXLlwQ.js.map +0 -1
  454. package/dist/overlays-I0axtYA6.js.map +0 -1
  455. package/dist/pagination-3bPA_a6K.js +0 -149
  456. package/dist/pagination-3bPA_a6K.js.map +0 -1
  457. package/dist/popover-Di55PyAI.js.map +0 -1
  458. package/dist/popover-menu-B71Tn2Qz.js +0 -99
  459. package/dist/popover-menu-B71Tn2Qz.js.map +0 -1
  460. package/dist/popover.recipes-Bdyhj2db.js.map +0 -1
  461. package/dist/primitives-B-CkiEMU.js.map +0 -1
  462. package/dist/rich-text-editor-sMU_Scqm.js.map +0 -1
  463. package/dist/rich-text-editor.recipes-CadiF_Uu.js +0 -88
  464. package/dist/rich-text-editor.recipes-CadiF_Uu.js.map +0 -1
  465. package/dist/settings-CQW3b-Cu.js.map +0 -1
  466. package/dist/sheet-4SEvVYzA.js.map +0 -1
  467. package/dist/sidebar-C7WWR29L.js.map +0 -1
  468. package/dist/smart-card-lFKxn5Hu.js +0 -595
  469. package/dist/smart-card-lFKxn5Hu.js.map +0 -1
  470. package/dist/spinner-fa3h1Aif.js +0 -80
  471. package/dist/spinner-fa3h1Aif.js.map +0 -1
  472. package/dist/table-CIKyLUsy.js.map +0 -1
  473. package/dist/table-CrcLN9Io.js +0 -1458
  474. package/dist/table-CrcLN9Io.js.map +0 -1
  475. package/dist/tabs-DwBJfjxX.js.map +0 -1
  476. package/dist/text-inputs-aaK9wcDT.js +0 -326
  477. package/dist/text-inputs-aaK9wcDT.js.map +0 -1
  478. package/dist/theme-scope-kStaAer0.js +0 -39
  479. package/dist/theme-scope-kStaAer0.js.map +0 -1
  480. package/dist/timelines-C_SBwHNP.js +0 -442
  481. package/dist/timelines-C_SBwHNP.js.map +0 -1
  482. package/dist/tone-recipes-CPoExcTE.js.map +0 -1
  483. package/dist/typography-DTRkE9zL.js.map +0 -1
  484. package/dist/ui-provider-1D_NSYzO.js.map +0 -1
  485. package/dist/upload-BO8-CLN6.js.map +0 -1
  486. package/dist/upload-queue-EOC8g1gf.js.map +0 -1
  487. package/dist/usage-card-obRaBskq.js.map +0 -1
  488. package/dist/utils-l5LpDw2z.js.map +0 -1
  489. package/dist/value-inputs-TAYMX111.js.map +0 -1
  490. package/dist/workspace-DH0v0KcB.js.map +0 -1
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  import { interpolateString as e, useStrings as t } from "./lib/strings.js";
3
- import { t as n } from "./utils-l5LpDw2z.js";
4
- import { n as r } from "./buttons-SbIcm1HJ.js";
5
- import { s as i } from "./typography-DTRkE9zL.js";
6
- import { t as a } from "./structure-DC2dygdA.js";
3
+ import { t as n } from "./utils-BRhFDwuU.js";
4
+ import { n as r } from "./buttons-DPZekJFu.js";
5
+ import { c as i } from "./typography-UTnveOEy.js";
6
+ import { t as a } from "./structure-BmisBK-3.js";
7
7
  import { n as o } from "./safe-image-src-C6kQSMBZ.js";
8
8
  import { n as s } from "./content-typography-CnwgMJ37.js";
9
- import { g as c } from "./primitives-B-CkiEMU.js";
10
- import { t as l } from "./number-DMhe-Vsk.js";
11
- import { t as u } from "./input-DWhBBBww.js";
12
- import { t as d } from "./form-field-DUt4UxSV.js";
13
- import { n as ee, t as f } from "./rich-text-editor.recipes-CadiF_Uu.js";
9
+ import { g as c } from "./primitives-BFK08r9M.js";
10
+ import { t as l } from "./number-DbV1Dija.js";
11
+ import { t as u } from "./input-DQdEd0YD.js";
12
+ import { t as d } from "./form-field-CwH9y77i.js";
13
+ import { n as f, t as ee } from "./rich-text-editor-toolbar-DfXg0-VC.js";
14
14
  import { t as te } from "./rich-text-editor.strings-CB59ekH2.js";
15
- import { forwardRef as p, useCallback as m, useEffect as h, useId as g, useImperativeHandle as ne, useMemo as _, useRef as v, useState as y } from "react";
16
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
17
- import { AlertCircle as C, Bold as re, ImagePlus as ie, Italic as ae, List as oe, ListOrdered as se, Loader2 as ce, Quote as le, Redo2 as ue, Strikethrough as de, Undo2 as fe } from "lucide-react";
18
- import * as w from "@tiptap/react";
19
- import * as T from "@tiptap/starter-kit";
20
- import { createPortal as pe } from "react-dom";
15
+ import { forwardRef as p, useCallback as m, useEffect as h, useId as ne, useImperativeHandle as re, useMemo as g, useRef as _, useState as v } from "react";
16
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
17
+ import { AlertCircle as ie, Bold as ae, ImagePlus as S, Italic as oe, List as se, ListOrdered as ce, Loader2 as le, Quote as ue, Redo2 as de, Strikethrough as fe, Undo2 as pe } from "lucide-react";
18
+ import * as C from "@tiptap/react";
19
+ import * as me from "@tiptap/starter-kit";
20
+ import { createPortal as he } from "react-dom";
21
21
  //#region src/components/features/rich-text-editor/partials/caret-helpers.ts
22
- function me() {
22
+ function ge() {
23
23
  if (typeof window > "u") return null;
24
24
  let e = window.getSelection();
25
25
  if (!e || e.rangeCount === 0) return null;
@@ -49,7 +49,7 @@ function me() {
49
49
  rect: c
50
50
  };
51
51
  }
52
- function he(e, t, n, r) {
52
+ function _e(e, t, n, r) {
53
53
  if (typeof window > "u") return;
54
54
  if (e) {
55
55
  let { selection: i } = e.state;
@@ -71,7 +71,7 @@ function he(e, t, n, r) {
71
71
  let e = Math.min(c, o);
72
72
  if (c -= e, o -= e, o === 0) break;
73
73
  }
74
- let e = D(s);
74
+ let e = w(s);
75
75
  if (!e) break;
76
76
  s = e, c = e.textContent?.length ?? 0;
77
77
  }
@@ -82,7 +82,7 @@ function he(e, t, n, r) {
82
82
  let d = s?.parentElement?.closest?.("[contenteditable=\"true\"]") ?? null;
83
83
  d && r(d.innerHTML);
84
84
  }
85
- function E(e, t) {
85
+ function ve(e, t) {
86
86
  if (typeof window > "u" || !e) return;
87
87
  e.focus();
88
88
  let n = window.getSelection();
@@ -99,7 +99,7 @@ function E(e, t) {
99
99
  let i = document.createRange().createContextualFragment(t);
100
100
  r.insertNode(i), r.collapse(!1), n.removeAllRanges(), n.addRange(r);
101
101
  }
102
- function D(e) {
102
+ function w(e) {
103
103
  let t = e;
104
104
  for (; t;) {
105
105
  if (t.previousSibling) {
@@ -113,24 +113,24 @@ function D(e) {
113
113
  }
114
114
  //#endregion
115
115
  //#region src/components/features/rich-text-editor/partials/counts-footer.tsx
116
- function O({ text: e, maxLength: t, strings: r, className: a }) {
116
+ function T({ text: e, maxLength: t, strings: r, className: a }) {
117
117
  let o = e.length, s = e.trim().length > 0 ? e.trim().split(/\s+/).length : 0, u = typeof t == "number" && o > t;
118
- return /* @__PURE__ */ S("div", {
118
+ return /* @__PURE__ */ x("div", {
119
119
  className: n("counts-footer-text--component border-border flex items-center justify-end gap-space-lg border-t px-control py-space-sm", a),
120
- children: [/* @__PURE__ */ S(i, {
120
+ children: [/* @__PURE__ */ x(i, {
121
121
  tag: "span",
122
122
  size: "xs",
123
123
  type: u ? "error" : "secondary",
124
124
  weight: u ? "medium" : "regular",
125
125
  className: n("tabular-nums"),
126
126
  children: [
127
- /* @__PURE__ */ x(l, {
127
+ /* @__PURE__ */ b(l, {
128
128
  value: o,
129
129
  size: "xs",
130
130
  type: u ? "error" : "secondary",
131
131
  align: "left"
132
132
  }),
133
- typeof t == "number" && /* @__PURE__ */ S(b, { children: [" / ", /* @__PURE__ */ x(l, {
133
+ typeof t == "number" && /* @__PURE__ */ x(y, { children: [" / ", /* @__PURE__ */ b(l, {
134
134
  value: t,
135
135
  size: "xs",
136
136
  type: u ? "error" : "secondary",
@@ -139,11 +139,11 @@ function O({ text: e, maxLength: t, strings: r, className: a }) {
139
139
  " ",
140
140
  r.counts.characters
141
141
  ]
142
- }), /* @__PURE__ */ S(c, {
142
+ }), /* @__PURE__ */ x(c, {
143
143
  size: "xs",
144
144
  className: "tabular-nums",
145
145
  children: [
146
- /* @__PURE__ */ x(l, {
146
+ /* @__PURE__ */ b(l, {
147
147
  value: s,
148
148
  size: "xs",
149
149
  type: "secondary",
@@ -155,43 +155,43 @@ function O({ text: e, maxLength: t, strings: r, className: a }) {
155
155
  })]
156
156
  });
157
157
  }
158
- O.displayName = "CountsFooterText";
159
- function ge({ editor: e, sourceMode: t, sourceValue: n, maxLength: r, strings: i }) {
158
+ T.displayName = "CountsFooterText";
159
+ function E({ editor: e, sourceMode: t, sourceValue: n, maxLength: r, strings: i }) {
160
160
  let a = t ? n.replace(/<[^>]*>/g, "") : e?.getText() ?? "";
161
- return /* @__PURE__ */ x(O, {
161
+ return /* @__PURE__ */ b(T, {
162
162
  text: a,
163
163
  maxLength: r,
164
164
  strings: i
165
165
  });
166
166
  }
167
- ge.displayName = "CountsFooter";
167
+ E.displayName = "CountsFooter";
168
168
  //#endregion
169
169
  //#region src/components/features/rich-text-editor/partials/html-helpers.ts
170
- function k(e) {
170
+ function D(e) {
171
171
  let t = e.trim();
172
172
  return t === "" || t === "<p></p>" || t === "<p><br></p>" ? "" : t;
173
173
  }
174
- function A(e) {
175
- let t = k(e);
174
+ function O(e) {
175
+ let t = D(e);
176
176
  return t === "" ? "<p></p>" : t;
177
177
  }
178
178
  //#endregion
179
179
  //#region src/components/features/rich-text-editor/partials/inline-reference-node.ts
180
- var j = "rsc-mention inline-reference--chip", M = "inlineReference";
181
- function N(e) {
180
+ var k = "rsc-mention inline-reference--chip", A = "inlineReference";
181
+ function j(e) {
182
182
  return ({ editor: t }) => t.commands.command(({ tr: t, state: n }) => {
183
183
  let { selection: r } = n;
184
184
  if (!r.empty) return !1;
185
185
  let { $from: i } = r, a = e === "backward" ? i.nodeBefore : i.nodeAfter;
186
- if (a?.type.name !== M) return !1;
186
+ if (a?.type.name !== A) return !1;
187
187
  let o = e === "backward" ? i.pos - a.nodeSize : i.pos;
188
188
  return t.delete(o, o + a.nodeSize), !0;
189
189
  });
190
190
  }
191
- var P = null;
192
- function _e() {
193
- return P ??= w.Node.create({
194
- name: M,
191
+ var M = null;
192
+ function N() {
193
+ return M ??= C.Node.create({
194
+ name: A,
195
195
  group: "inline",
196
196
  inline: !0,
197
197
  atom: !0,
@@ -227,7 +227,7 @@ function _e() {
227
227
  renderHTML({ node: e, HTMLAttributes: t }) {
228
228
  return [
229
229
  "span",
230
- w.mergeAttributes({
230
+ C.mergeAttributes({
231
231
  class: "rsc-mention",
232
232
  contenteditable: "false"
233
233
  }, t),
@@ -240,34 +240,34 @@ function _e() {
240
240
  addNodeView() {
241
241
  return ({ node: e }) => {
242
242
  let t = document.createElement("span");
243
- return t.className = j, t.setAttribute("contenteditable", "false"), t.setAttribute("data-ref-id", String(e.attrs.id ?? "")), e.attrs.kind && t.setAttribute("data-ref-kind", String(e.attrs.kind)), e.attrs.tone && t.setAttribute("data-ref-tone", String(e.attrs.tone)), t.textContent = String(e.attrs.label ?? ""), { dom: t };
243
+ return t.className = k, t.setAttribute("contenteditable", "false"), t.setAttribute("data-ref-id", String(e.attrs.id ?? "")), e.attrs.kind && t.setAttribute("data-ref-kind", String(e.attrs.kind)), e.attrs.tone && t.setAttribute("data-ref-tone", String(e.attrs.tone)), t.textContent = String(e.attrs.label ?? ""), { dom: t };
244
244
  };
245
245
  },
246
246
  addKeyboardShortcuts() {
247
247
  return {
248
- Backspace: N("backward"),
249
- Delete: N("forward")
248
+ Backspace: j("backward"),
249
+ Delete: j("forward")
250
250
  };
251
251
  }
252
- }), P;
252
+ }), M;
253
253
  }
254
- var F = "data-rte-upload", I = "rich-text-editor--upload my-space-xs flex min-h-control items-center rounded-inner border border-dashed border-input bg-muted/30 px-row-x py-row-y", ve = RegExp(`<span[^>]*\\b${F}="[^"]*"[^>]*>[\\s\\S]*?</span>`, "g");
255
- function L(e) {
256
- return e.includes("data-rte-upload") ? e.replace(ve, "") : e;
254
+ var P = "data-rte-upload", ye = "rich-text-editor--upload my-space-xs flex min-h-control items-center rounded-inner border border-dashed border-input bg-muted/30 px-row-x py-row-y", F = RegExp(`<span[^>]*\\b${P}="[^"]*"[^>]*>[\\s\\S]*?</span>`, "g");
255
+ function be(e) {
256
+ return e.includes("data-rte-upload") ? e.replace(F, "") : e;
257
257
  }
258
- function R(e, t) {
258
+ function I(e, t) {
259
259
  let n = e.type.toLowerCase(), r = e.name.toLowerCase();
260
260
  return t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean).some((e) => e.startsWith(".") ? r.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
261
261
  }
262
- function z(e) {
262
+ function L(e) {
263
263
  return e.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").trim();
264
264
  }
265
- function ye(e) {
265
+ function xe(e) {
266
266
  return Array.from(e?.files ?? []).filter((e) => e.type.startsWith("image/"));
267
267
  }
268
- var B = 0;
269
- function be(t, n, r) {
270
- let [i, a] = y([]), [s, c] = y(null), l = v(/* @__PURE__ */ new Map());
268
+ var R = 0;
269
+ function Se(t, n, r) {
270
+ let [i, a] = v([]), [s, c] = v(null), l = _(/* @__PURE__ */ new Map());
271
271
  h(() => () => {
272
272
  for (let e of l.current.values()) e.controller?.abort();
273
273
  }, []);
@@ -293,7 +293,7 @@ function be(t, n, r) {
293
293
  let c = n.current?.findPlaceholder(e);
294
294
  u(e), c && n.current?.resolvePlaceholder(e, {
295
295
  src: s,
296
- alt: a.alt ?? z(r.file.name),
296
+ alt: a.alt ?? L(r.file.name),
297
297
  width: a.width,
298
298
  height: a.height
299
299
  });
@@ -317,14 +317,14 @@ function be(t, n, r) {
317
317
  if (!t) return;
318
318
  let a = t.accept ?? "image/png,image/jpeg,image/gif,image/webp", o = [];
319
319
  for (let s of i) {
320
- let i = R(s, a) ? t.maxSize && s.size > t.maxSize ? r.tooLarge : null : r.unsupported;
320
+ let i = I(s, a) ? t.maxSize && s.size > t.maxSize ? r.tooLarge : null : r.unsupported;
321
321
  if (i) {
322
322
  let n = e(i, { name: s.name });
323
323
  o.push(n), t.onError?.(Error(n), s);
324
324
  continue;
325
325
  }
326
- B += 1;
327
- let c = `upload-${B}`;
326
+ R += 1;
327
+ let c = `upload-${R}`;
328
328
  l.current.set(c, { file: s }), n.current?.insertPlaceholder(c), d(c);
329
329
  }
330
330
  c(o.length > 0 ? o.join(" ") : null);
@@ -346,9 +346,9 @@ function be(t, n, r) {
346
346
  }, [n, u])
347
347
  };
348
348
  }
349
- function V({ upload: t, strings: n, onRetry: o, onRemove: s }) {
349
+ function z({ upload: t, strings: n, onRetry: o, onRemove: s }) {
350
350
  let c = t.status === "error";
351
- return /* @__PURE__ */ S(a, {
351
+ return /* @__PURE__ */ x(a, {
352
352
  direction: "horizontal",
353
353
  align: "center",
354
354
  gap: "sm",
@@ -356,14 +356,14 @@ function V({ upload: t, strings: n, onRetry: o, onRemove: s }) {
356
356
  className: "rich-text-editor--upload-status w-full min-w-0",
357
357
  "data-status": t.status,
358
358
  children: [
359
- c ? /* @__PURE__ */ x(C, {
359
+ c ? /* @__PURE__ */ b(ie, {
360
360
  className: "size-icon shrink-0 text-destructive",
361
361
  "aria-hidden": "true"
362
- }) : /* @__PURE__ */ x(ce, {
362
+ }) : /* @__PURE__ */ b(le, {
363
363
  className: "size-icon shrink-0 animate-spin text-muted-foreground motion-reduce:animate-none",
364
364
  "aria-hidden": "true"
365
365
  }),
366
- /* @__PURE__ */ x(i, {
366
+ /* @__PURE__ */ b(i, {
367
367
  tag: "span",
368
368
  size: "xs",
369
369
  type: c ? "error" : "secondary",
@@ -371,13 +371,13 @@ function V({ upload: t, strings: n, onRetry: o, onRemove: s }) {
371
371
  className: "min-w-0 flex-1 basis-40 break-words",
372
372
  children: e(c ? n.failed : n.uploading, { name: t.name })
373
373
  }),
374
- c && /* @__PURE__ */ x(r, {
374
+ c && /* @__PURE__ */ b(r, {
375
375
  type: "button",
376
376
  size: "sm",
377
377
  onClick: o,
378
378
  children: n.retry
379
379
  }),
380
- /* @__PURE__ */ x(r, {
380
+ /* @__PURE__ */ b(r, {
381
381
  type: "button",
382
382
  size: "sm",
383
383
  buttonStyle: "ghost",
@@ -387,10 +387,10 @@ function V({ upload: t, strings: n, onRetry: o, onRemove: s }) {
387
387
  ]
388
388
  });
389
389
  }
390
- function xe({ queue: e, adapterRef: t, strings: n }) {
391
- return /* @__PURE__ */ x(b, { children: e.uploads.map((r) => {
390
+ function Ce({ queue: e, adapterRef: t, strings: n }) {
391
+ return /* @__PURE__ */ b(y, { children: e.uploads.map((r) => {
392
392
  let i = t.current?.findPlaceholder(r.id);
393
- return i ? pe(/* @__PURE__ */ x(V, {
393
+ return i ? he(/* @__PURE__ */ b(z, {
394
394
  upload: r,
395
395
  strings: n,
396
396
  onRetry: () => e.retry(r.id),
@@ -398,21 +398,21 @@ function xe({ queue: e, adapterRef: t, strings: n }) {
398
398
  }), i, r.id) : null;
399
399
  }) });
400
400
  }
401
- function Se(e, t, n, r) {
402
- let i = v(null), a = v(r);
401
+ function we(e, t, n, r) {
402
+ let i = _(null), a = _(r);
403
403
  a.current = r;
404
404
  let o = !!e;
405
405
  return {
406
- item: _(() => o ? {
406
+ item: g(() => o ? {
407
407
  id: "insert-image",
408
- icon: ie,
408
+ icon: S,
409
409
  label: t.insert,
410
410
  toggle: !1,
411
411
  onClick: () => {
412
412
  a.current?.(), i.current?.click();
413
413
  }
414
414
  } : null, [o, t.insert]),
415
- input: e ? /* @__PURE__ */ x("input", {
415
+ input: e ? /* @__PURE__ */ b("input", {
416
416
  ref: i,
417
417
  type: "file",
418
418
  accept: e.accept ?? "image/png,image/jpeg,image/gif,image/webp",
@@ -427,44 +427,44 @@ function Se(e, t, n, r) {
427
427
  }) : null
428
428
  };
429
429
  }
430
- function Ce({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s, strings: c }) {
431
- let l = g();
432
- return e === null && !o ? null : /* @__PURE__ */ S(a, {
430
+ function Te({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s, strings: c }) {
431
+ let l = ne();
432
+ return e === null && !o ? null : /* @__PURE__ */ x(a, {
433
433
  gap: "sm",
434
434
  className: "rich-text-editor--image-details border-t border-border/60 px-control py-space-sm",
435
- children: [!!o && /* @__PURE__ */ S(a, {
435
+ children: [!!o && /* @__PURE__ */ x(a, {
436
436
  direction: "horizontal",
437
437
  align: "center",
438
438
  gap: "sm",
439
- children: [/* @__PURE__ */ x(i, {
439
+ children: [/* @__PURE__ */ b(i, {
440
440
  tag: "span",
441
441
  size: "xs",
442
442
  type: "error",
443
443
  role: "alert",
444
444
  className: "min-w-0 flex-1",
445
445
  children: o
446
- }), /* @__PURE__ */ x(r, {
446
+ }), /* @__PURE__ */ b(r, {
447
447
  type: "button",
448
448
  size: "sm",
449
449
  buttonStyle: "ghost",
450
450
  onClick: s,
451
451
  children: c.remove
452
452
  })]
453
- }), e !== null && /* @__PURE__ */ x(d, {
453
+ }), e !== null && /* @__PURE__ */ b(d, {
454
454
  label: c.descriptionLabel,
455
455
  hint: c.descriptionHint,
456
456
  htmlFor: l,
457
- children: /* @__PURE__ */ x(b, { children: /* @__PURE__ */ S(a, {
457
+ children: /* @__PURE__ */ b(y, { children: /* @__PURE__ */ x(a, {
458
458
  direction: "horizontal",
459
459
  align: "center",
460
460
  gap: "sm",
461
461
  wrap: !1,
462
- children: [/* @__PURE__ */ x(u, {
462
+ children: [/* @__PURE__ */ b(u, {
463
463
  id: l,
464
464
  value: e,
465
465
  className: "min-w-0 flex-1",
466
466
  onChange: (e) => t(e.target.value)
467
- }), /* @__PURE__ */ x(r, {
467
+ }), /* @__PURE__ */ b(r, {
468
468
  type: "button",
469
469
  buttonStyle: "outline",
470
470
  onClick: n,
@@ -476,13 +476,13 @@ function Ce({ alt: e, onAltChange: t, onRemove: n, notice: o, onDismissNotice: s
476
476
  }
477
477
  //#endregion
478
478
  //#region src/components/features/rich-text-editor/partials/image-nodes.ts
479
- function H(e) {
479
+ function B(e) {
480
480
  let t = Number(e);
481
481
  return Number.isFinite(t) && t > 0 ? t : null;
482
482
  }
483
- var U = null, W = null;
484
- function G() {
485
- return U ??= w.Node.create({
483
+ var V = null, H = null;
484
+ function U() {
485
+ return V ??= C.Node.create({
486
486
  name: "image",
487
487
  group: "inline",
488
488
  inline: !0,
@@ -502,11 +502,11 @@ function G() {
502
502
  title: { default: null },
503
503
  width: {
504
504
  default: null,
505
- parseHTML: (e) => H(e.getAttribute("width"))
505
+ parseHTML: (e) => B(e.getAttribute("width"))
506
506
  },
507
507
  height: {
508
508
  default: null,
509
- parseHTML: (e) => H(e.getAttribute("height"))
509
+ parseHTML: (e) => B(e.getAttribute("height"))
510
510
  }
511
511
  };
512
512
  },
@@ -518,12 +518,12 @@ function G() {
518
518
  },
519
519
  renderHTML({ HTMLAttributes: e }) {
520
520
  let t = o(e.src);
521
- return ["img", w.mergeAttributes(e, { src: t ?? null })];
521
+ return ["img", C.mergeAttributes(e, { src: t ?? null })];
522
522
  }
523
- }), U;
523
+ }), V;
524
524
  }
525
- function we() {
526
- return W ??= w.Node.create({
525
+ function W() {
526
+ return H ??= C.Node.create({
527
527
  name: "imageUpload",
528
528
  group: "inline",
529
529
  inline: !0,
@@ -536,150 +536,150 @@ function we() {
536
536
  return [];
537
537
  },
538
538
  renderHTML({ node: e }) {
539
- return ["span", { [F]: e.attrs.id }];
539
+ return ["span", { [P]: e.attrs.id }];
540
540
  },
541
541
  addNodeView() {
542
542
  return ({ node: e }) => {
543
543
  let t = document.createElement("span");
544
- return t.setAttribute(F, String(e.attrs.id)), t.setAttribute("contenteditable", "false"), t.className = I, {
544
+ return t.setAttribute(P, String(e.attrs.id)), t.setAttribute("contenteditable", "false"), t.className = ye, {
545
545
  dom: t,
546
546
  ignoreMutation: () => !0,
547
547
  stopEvent: () => !0
548
548
  };
549
549
  };
550
550
  }
551
- }), W;
551
+ }), H;
552
552
  }
553
553
  //#endregion
554
554
  //#region src/components/features/rich-text-editor/partials/rich-text-editor-tiptap.tsx
555
- function K(e) {
556
- return k(L(e?.getHTML() ?? ""));
555
+ function G(e) {
556
+ return D(be(e?.getHTML() ?? ""));
557
557
  }
558
- var Te = w.EditorContent, q = w.useEditor, J = "default" in T ? T.default : T, Ee = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, minHeight: c, maxHeight: l, disabled: u = !1, showCounts: d = !1, maxLength: p, extraToolbarItems: g, toolbarTrailing: b, footerSlot: C, hideSourceToggle: ie = !1, autoFocus: ce = !1, className: w, onCaretChange: T, strings: pe, images: E }, D) {
559
- let O = t(te, pe), j = !!E, M = v(null), N = v(null), [P, F] = y(!1), [I, ve] = y(!1), [L, R] = y(""), z = v(!1), B = v(k(e)), V = v(T);
560
- V.current = T;
561
- let H = q({
562
- extensions: _(() => [
558
+ var K = C.EditorContent, q = C.useEditor, J = "default" in me ? me.default : me, Y = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, bodyHeight: c, minHeight: l, maxHeight: u, disabled: d = !1, showCounts: p = !1, maxLength: ne, extraToolbarItems: y, toolbarTrailing: ie, footerSlot: S, hideSourceToggle: le = !1, autoFocus: C = !1, className: me, onCaretChange: he, strings: ve, images: w }, T) {
559
+ let k = t(te, ve), A = !!w, j = _(null), M = _(null), [P, ye] = v(!1), [F, be] = v(!1), [I, L] = v(""), R = _(!1), z = _(D(e)), B = _(he);
560
+ B.current = he;
561
+ let V = q({
562
+ extensions: g(() => [
563
563
  J,
564
- _e(),
565
- ...j ? [G(), we()] : []
566
- ], [j]),
567
- content: A(e),
568
- editable: !u,
564
+ N(),
565
+ ...A ? [U(), W()] : []
566
+ ], [A]),
567
+ content: O(e),
568
+ editable: !d,
569
569
  immediatelyRender: !1,
570
- autofocus: ce ? "end" : !1,
570
+ autofocus: C ? "end" : !1,
571
571
  onFocus: () => {
572
- z.current = !0, F(!0);
572
+ R.current = !0, ye(!0);
573
573
  },
574
574
  onBlur: () => {
575
- z.current = !1, F(!1);
575
+ R.current = !1, ye(!1);
576
576
  },
577
577
  onUpdate: ({ editor: e }) => {
578
- M.current?.prune();
579
- let t = K(e);
580
- z.current && (t !== B.current && (B.current = t, r(t)), V.current?.());
578
+ j.current?.prune();
579
+ let t = G(e);
580
+ R.current && (t !== z.current && (z.current = t, r(t)), B.current?.());
581
581
  },
582
582
  editorProps: {
583
583
  handlePaste: (e, t) => {
584
- let n = ye(t.clipboardData);
585
- return !M.current || !U.current || n.length === 0 ? !1 : (M.current.addFiles(n), !0);
584
+ let n = xe(t.clipboardData);
585
+ return !j.current || !H.current || n.length === 0 ? !1 : (j.current.addFiles(n), !0);
586
586
  },
587
587
  handleDrop: (e, t, n, r) => {
588
- let i = ye(t.dataTransfer);
589
- if (r || !M.current || !U.current || i.length === 0) return !1;
588
+ let i = xe(t.dataTransfer);
589
+ if (r || !j.current || !H.current || i.length === 0) return !1;
590
590
  let a = e.posAtCoords({
591
591
  left: t.clientX,
592
592
  top: t.clientY
593
593
  });
594
- return a && N.current?.commands.setTextSelection(a.pos), M.current.addFiles(i), !0;
594
+ return a && M.current?.commands.setTextSelection(a.pos), j.current.addFiles(i), !0;
595
595
  },
596
596
  attributes: {
597
597
  role: "textbox",
598
- "aria-label": O.editorLabel,
598
+ "aria-label": k.editorLabel,
599
599
  "aria-multiline": "true",
600
600
  class: s
601
601
  }
602
602
  }
603
- }, [j]);
603
+ }, [A]);
604
604
  h(() => {
605
- if (!H) return;
606
- let t = K(H), n = k(e);
607
- B.current = n, t !== n && H.commands.setContent(A(n), { emitUpdate: !1 });
608
- }, [H, e]), h(() => {
609
- H && H.setEditable(!u);
610
- }, [u, H]), h(() => {
605
+ if (!V) return;
606
+ let t = G(V), n = D(e);
607
+ z.current = n, t !== n && V.commands.setContent(O(n), { emitUpdate: !1 });
608
+ }, [V, e]), h(() => {
609
+ V && V.setEditable(!d);
610
+ }, [d, V]), h(() => {
611
611
  if (typeof document > "u") return;
612
612
  let e = () => {
613
- z.current && V.current?.();
613
+ R.current && B.current?.();
614
614
  };
615
615
  return document.addEventListener("selectionchange", e), () => document.removeEventListener("selectionchange", e);
616
- }, []), ne(D, () => ({
616
+ }, []), re(T, () => ({
617
617
  focus: () => {
618
- H?.chain().focus().run();
618
+ V?.chain().focus().run();
619
619
  },
620
- getHTML: () => K(H),
620
+ getHTML: () => G(V),
621
621
  setHTML: (e) => {
622
- let t = k(e);
623
- B.current = t, H?.commands.setContent(A(t), { emitUpdate: !1 }), r(t);
622
+ let t = D(e);
623
+ z.current = t, V?.commands.setContent(O(t), { emitUpdate: !1 }), r(t);
624
624
  },
625
625
  insertHTML: (e) => {
626
- H && H.chain().focus().insertContent(e).run();
626
+ V && V.chain().focus().insertContent(e).run();
627
627
  },
628
- isEmpty: () => K(H) === "",
628
+ isEmpty: () => G(V) === "",
629
629
  clear: () => {
630
- B.current = "", H?.commands.setContent("<p></p>", { emitUpdate: !1 }), r("");
630
+ z.current = "", V?.commands.setContent("<p></p>", { emitUpdate: !1 }), r("");
631
631
  },
632
- getCaretContext: () => me(),
632
+ getCaretContext: () => ge(),
633
633
  replaceBeforeCaret: (e, t) => {
634
- he(H, e, t, (e) => {
635
- B.current = k(e), r(B.current);
634
+ _e(V, e, t, (e) => {
635
+ z.current = D(e), r(z.current);
636
636
  });
637
637
  }
638
- }), [H, r]), N.current = H ?? null;
639
- let U = v(E);
640
- U.current = E;
641
- let W = m(() => {
642
- if (!H) return;
643
- let e = K(H);
644
- e !== B.current && (B.current = e, r(e));
645
- }, [H, r]), Ee = m((e) => {
638
+ }), [V, r]), M.current = V ?? null;
639
+ let H = _(w);
640
+ H.current = w;
641
+ let Y = m(() => {
642
+ if (!V) return;
643
+ let e = G(V);
644
+ e !== z.current && (z.current = e, r(e));
645
+ }, [V, r]), Ee = m((e) => {
646
646
  let t = null;
647
- return H?.state.doc.descendants((n, r) => (!t && e(n) && (t = {
647
+ return V?.state.doc.descendants((n, r) => (!t && e(n) && (t = {
648
648
  pos: r,
649
649
  node: n
650
650
  }), !t)), t;
651
- }, [H]), Y = v(null);
652
- Y.current = H ? {
651
+ }, [V]), X = _(null);
652
+ X.current = V ? {
653
653
  insertPlaceholder: (e) => {
654
- H.chain().focus().insertContent({
654
+ V.chain().focus().insertContent({
655
655
  type: "imageUpload",
656
656
  attrs: { id: e }
657
657
  }).run();
658
658
  },
659
- findPlaceholder: (e) => H.view.dom.querySelector(`[data-rte-upload="${e}"]`),
659
+ findPlaceholder: (e) => V.view.dom.querySelector(`[data-rte-upload="${e}"]`),
660
660
  resolvePlaceholder: (e, t) => {
661
661
  let n = Ee((t) => t.type.name === "imageUpload" && t.attrs.id === e);
662
662
  if (!n) return;
663
- let r = H.schema.nodes.image.create({
663
+ let r = V.schema.nodes.image.create({
664
664
  src: t.src,
665
665
  alt: t.alt ?? "",
666
666
  width: t.width ?? null,
667
667
  height: t.height ?? null
668
668
  });
669
- H.view.dispatch(H.state.tr.replaceWith(n.pos, n.pos + n.node.nodeSize, r)), W();
669
+ V.view.dispatch(V.state.tr.replaceWith(n.pos, n.pos + n.node.nodeSize, r)), Y();
670
670
  },
671
671
  removePlaceholder: (e) => {
672
672
  let t = Ee((t) => t.type.name === "imageUpload" && t.attrs.id === e);
673
- t && (H.view.dispatch(H.state.tr.delete(t.pos, t.pos + t.node.nodeSize)), W());
673
+ t && (V.view.dispatch(V.state.tr.delete(t.pos, t.pos + t.node.nodeSize)), Y());
674
674
  }
675
675
  } : null;
676
- let X = be(E, Y, O.images);
677
- M.current = j ? X : null;
678
- let De = Se(E, O.images, X.addFiles), Oe = _(() => De.item ? [De.item, ...g ?? []] : g, [g, De.item]), [Z, Q] = y(null);
676
+ let Z = Se(w, X, k.images);
677
+ j.current = A ? Z : null;
678
+ let De = we(w, k.images, Z.addFiles), Oe = g(() => De.item ? [De.item, ...y ?? []] : y, [y, De.item]), [Q, $] = v(null);
679
679
  h(() => {
680
- if (!H || !j) return;
680
+ if (!V || !A) return;
681
681
  let e = () => {
682
- let e = H.state.selection, t = null;
682
+ let e = V.state.selection, t = null;
683
683
  if (e.node?.type.name === "image") t = {
684
684
  pos: e.from,
685
685
  alt: String(e.node.attrs.alt ?? "")
@@ -694,200 +694,196 @@ var Te = w.EditorContent, q = w.useEditor, J = "default" in T ? T.default : T, E
694
694
  alt: String(r.attrs.alt ?? "")
695
695
  });
696
696
  }
697
- Q(t);
697
+ $(t);
698
698
  };
699
- return H.on("selectionUpdate", e), H.on("update", e), () => {
700
- H.off("selectionUpdate", e), H.off("update", e);
699
+ return V.on("selectionUpdate", e), V.on("update", e), () => {
700
+ V.off("selectionUpdate", e), V.off("update", e);
701
701
  };
702
- }, [H, j]);
703
- let $ = _(() => ({
704
- minHeight: c ?? (o ? "2rem" : "12rem"),
705
- ...l ? {
706
- maxHeight: l,
702
+ }, [V, A]);
703
+ let ke = f.bodyMinHeight[c ?? (o ? "control" : "document")], Ae = g(() => ({
704
+ ...l ? { minHeight: l } : {},
705
+ ...u ? {
706
+ maxHeight: u,
707
707
  overflowY: "auto"
708
708
  } : {}
709
- }), [
710
- o,
711
- l,
712
- c
713
- ]), ke = m(() => {
714
- if (H) {
715
- if (I) {
716
- let e = A(L);
717
- H.commands.setContent(e, { emitUpdate: !1 });
718
- let t = k(L);
719
- B.current = t, r(t), ve(!1);
720
- } else R(H.getHTML()), ve(!0);
709
+ }), [u, l]), je = m(() => {
710
+ if (V) {
711
+ if (F) {
712
+ let e = O(I);
713
+ V.commands.setContent(e, { emitUpdate: !1 });
714
+ let t = D(I);
715
+ z.current = t, r(t), be(!1);
716
+ } else L(V.getHTML()), be(!0);
721
717
  }
722
718
  }, [
723
- H,
719
+ V,
724
720
  r,
725
- I,
726
- L
727
- ]), Ae = m((e) => {
721
+ F,
722
+ I
723
+ ]), Me = m((e) => {
728
724
  let t = e.target.value;
729
- R(t);
730
- let n = k(t);
731
- B.current = n, r(n);
732
- }, [r]), je = _(() => [
725
+ L(t);
726
+ let n = D(t);
727
+ z.current = n, r(n);
728
+ }, [r]), Ne = g(() => [
733
729
  {
734
730
  id: "bold",
735
- icon: re,
736
- label: O.toolbar.bold,
737
- isActive: () => !!H?.isActive("bold"),
731
+ icon: ae,
732
+ label: k.toolbar.bold,
733
+ isActive: () => !!V?.isActive("bold"),
738
734
  toggle: !0,
739
- run: () => H?.chain().focus().toggleBold().run()
735
+ run: () => V?.chain().focus().toggleBold().run()
740
736
  },
741
737
  {
742
738
  id: "italic",
743
- icon: ae,
744
- label: O.toolbar.italic,
745
- isActive: () => !!H?.isActive("italic"),
739
+ icon: oe,
740
+ label: k.toolbar.italic,
741
+ isActive: () => !!V?.isActive("italic"),
746
742
  toggle: !0,
747
- run: () => H?.chain().focus().toggleItalic().run()
743
+ run: () => V?.chain().focus().toggleItalic().run()
748
744
  },
749
745
  {
750
746
  id: "strike",
751
- icon: de,
752
- label: O.toolbar.strike,
753
- isActive: () => !!H?.isActive("strike"),
747
+ icon: fe,
748
+ label: k.toolbar.strike,
749
+ isActive: () => !!V?.isActive("strike"),
754
750
  toggle: !0,
755
- run: () => H?.chain().focus().toggleStrike().run()
751
+ run: () => V?.chain().focus().toggleStrike().run()
756
752
  },
757
753
  {
758
754
  id: "bullet-list",
759
- icon: oe,
760
- label: O.toolbar.bulletList,
761
- isActive: () => !!H?.isActive("bulletList"),
755
+ icon: se,
756
+ label: k.toolbar.bulletList,
757
+ isActive: () => !!V?.isActive("bulletList"),
762
758
  toggle: !0,
763
- run: () => H?.chain().focus().toggleBulletList().run()
759
+ run: () => V?.chain().focus().toggleBulletList().run()
764
760
  },
765
761
  {
766
762
  id: "ordered-list",
767
- icon: se,
768
- label: O.toolbar.orderedList,
769
- isActive: () => !!H?.isActive("orderedList"),
763
+ icon: ce,
764
+ label: k.toolbar.orderedList,
765
+ isActive: () => !!V?.isActive("orderedList"),
770
766
  toggle: !0,
771
- run: () => H?.chain().focus().toggleOrderedList().run()
767
+ run: () => V?.chain().focus().toggleOrderedList().run()
772
768
  },
773
769
  {
774
770
  id: "blockquote",
775
- icon: le,
776
- label: O.toolbar.blockquote,
777
- isActive: () => !!H?.isActive("blockquote"),
771
+ icon: ue,
772
+ label: k.toolbar.blockquote,
773
+ isActive: () => !!V?.isActive("blockquote"),
778
774
  toggle: !0,
779
- run: () => H?.chain().focus().toggleBlockquote().run()
775
+ run: () => V?.chain().focus().toggleBlockquote().run()
780
776
  },
781
777
  {
782
778
  id: "undo",
783
- icon: fe,
784
- label: O.toolbar.undo,
779
+ icon: pe,
780
+ label: k.toolbar.undo,
785
781
  isActive: () => !1,
786
- run: () => H?.chain().focus().undo().run(),
787
- disabled: !H?.can().chain().focus().undo().run()
782
+ run: () => V?.chain().focus().undo().run(),
783
+ disabled: !V?.can().chain().focus().undo().run()
788
784
  },
789
785
  {
790
786
  id: "redo",
791
- icon: ue,
792
- label: O.toolbar.redo,
787
+ icon: de,
788
+ label: k.toolbar.redo,
793
789
  isActive: () => !1,
794
- run: () => H?.chain().focus().redo().run(),
795
- disabled: !H?.can().chain().focus().redo().run()
790
+ run: () => V?.chain().focus().redo().run(),
791
+ disabled: !V?.can().chain().focus().redo().run()
796
792
  }
797
- ], [H, O]), Me = d && H ? /* @__PURE__ */ x(ge, {
798
- editor: H,
799
- sourceMode: I,
800
- sourceValue: L,
801
- maxLength: p,
802
- strings: O
803
- }) : null, Ne = typeof a == "string" ? a : "", Pe = Ne.length > 0 && !P && H?.isEmpty ? /* @__PURE__ */ x(i, {
793
+ ], [V, k]), Pe = p && V ? /* @__PURE__ */ b(E, {
794
+ editor: V,
795
+ sourceMode: F,
796
+ sourceValue: I,
797
+ maxLength: ne,
798
+ strings: k
799
+ }) : null, Fe = typeof a == "string" ? a : "", Ie = Fe.length > 0 && !P && V?.isEmpty ? /* @__PURE__ */ b(i, {
804
800
  tag: "span",
805
801
  size: "sm",
806
802
  type: "secondary",
807
803
  className: "pointer-events-none absolute inset-0 px-control py-control-y-offset",
808
- children: Ne
804
+ children: Fe
809
805
  }) : null;
810
- return /* @__PURE__ */ S("div", {
811
- className: n(f.frame, u && f.disabled, w),
806
+ return /* @__PURE__ */ x("div", {
807
+ className: n(f.frame, d && f.disabled, me),
812
808
  children: [
813
- /* @__PURE__ */ x(ee, {
814
- buttons: je,
809
+ /* @__PURE__ */ b(ee, {
810
+ buttons: Ne,
815
811
  extraToolbarItems: Oe,
816
- hideSourceToggle: ie,
817
- sourceMode: I,
818
- toggleSourceMode: ke,
819
- disabled: u,
820
- hasEditor: !!H,
821
- toolbarTrailing: b,
822
- strings: O
812
+ hideSourceToggle: le,
813
+ sourceMode: F,
814
+ toggleSourceMode: je,
815
+ disabled: d,
816
+ hasEditor: !!V,
817
+ toolbarTrailing: ie,
818
+ strings: k
823
819
  }),
824
- I ? /* @__PURE__ */ x("textarea", {
825
- "aria-label": O.sourceLabel,
826
- value: L,
827
- onChange: Ae,
828
- disabled: u,
820
+ F ? /* @__PURE__ */ b("textarea", {
821
+ "aria-label": k.sourceLabel,
822
+ value: I,
823
+ onChange: Me,
824
+ disabled: d,
829
825
  spellCheck: !1,
830
- className: n(f.source, u && "cursor-not-allowed"),
831
- style: $
832
- }) : /* @__PURE__ */ S("div", {
833
- className: "relative",
834
- style: $,
835
- children: [Pe, /* @__PURE__ */ x(Te, {
836
- editor: H,
826
+ className: n(f.source, ke, d && "cursor-not-allowed"),
827
+ style: Ae
828
+ }) : /* @__PURE__ */ x("div", {
829
+ className: n("relative", ke),
830
+ style: Ae,
831
+ children: [Ie, /* @__PURE__ */ b(K, {
832
+ editor: V,
837
833
  className: f.content
838
834
  })]
839
835
  }),
840
- j && /* @__PURE__ */ x(Ce, {
841
- alt: Z ? Z.alt : null,
836
+ A && /* @__PURE__ */ b(Te, {
837
+ alt: Q ? Q.alt : null,
842
838
  onAltChange: (e) => {
843
- if (!H || !Z) return;
844
- let t = H.state.doc.nodeAt(Z.pos);
845
- t?.type.name === "image" && (H.view.dispatch(H.state.tr.setNodeMarkup(Z.pos, void 0, {
839
+ if (!V || !Q) return;
840
+ let t = V.state.doc.nodeAt(Q.pos);
841
+ t?.type.name === "image" && (V.view.dispatch(V.state.tr.setNodeMarkup(Q.pos, void 0, {
846
842
  ...t.attrs,
847
843
  alt: e
848
- })), Q({
849
- ...Z,
844
+ })), $({
845
+ ...Q,
850
846
  alt: e
851
- }), W());
847
+ }), Y());
852
848
  },
853
849
  onRemove: () => {
854
- if (!H || !Z) return;
855
- let e = H.state.doc.nodeAt(Z.pos);
856
- e?.type.name === "image" && (H.view.dispatch(H.state.tr.delete(Z.pos, Z.pos + e.nodeSize)), Q(null), W(), H.commands.focus());
850
+ if (!V || !Q) return;
851
+ let e = V.state.doc.nodeAt(Q.pos);
852
+ e?.type.name === "image" && (V.view.dispatch(V.state.tr.delete(Q.pos, Q.pos + e.nodeSize)), $(null), Y(), V.commands.focus());
857
853
  },
858
- notice: X.notice,
859
- onDismissNotice: X.dismissNotice,
860
- strings: O.images
854
+ notice: Z.notice,
855
+ onDismissNotice: Z.dismissNotice,
856
+ strings: k.images
861
857
  }),
862
- !!C && /* @__PURE__ */ x("div", {
858
+ !!S && /* @__PURE__ */ b("div", {
863
859
  className: "px-control pb-space-md pt-space-xs",
864
- children: C
860
+ children: S
865
861
  }),
866
- Me,
862
+ Pe,
867
863
  De.input,
868
- j && /* @__PURE__ */ x(xe, {
869
- queue: X,
870
- adapterRef: Y,
871
- strings: O.images
864
+ A && /* @__PURE__ */ b(Ce, {
865
+ queue: Z,
866
+ adapterRef: X,
867
+ strings: k.images
872
868
  })
873
869
  ]
874
870
  });
875
871
  });
876
- Ee.displayName = "TiptapRichTextEditor";
877
- var Y = ((e) => typeof e == "function" || typeof e == "object" && !!e && "$$typeof" in e)(Te) && typeof q == "function" && typeof J == "object" && !!J;
872
+ Y.displayName = "TiptapRichTextEditor";
873
+ var Ee = ((e) => typeof e == "function" || typeof e == "object" && !!e && "$$typeof" in e)(K) && typeof q == "function" && typeof J == "object" && !!J;
878
874
  //#endregion
879
875
  //#region src/components/features/rich-text-editor/partials/rich-text-editor-fallback.tsx
880
876
  function X(e) {
881
877
  if (!e) return "";
882
878
  if (!e.querySelector("[data-rte-upload]")) return e.innerHTML;
883
879
  let t = e.cloneNode(!0);
884
- for (let e of Array.from(t.querySelectorAll(`[${F}]`))) e.remove();
880
+ for (let e of Array.from(t.querySelectorAll(`[${P}]`))) e.remove();
885
881
  return t.innerHTML;
886
882
  }
887
- function De(e) {
883
+ function Z(e) {
888
884
  for (let t of Array.from(e.querySelectorAll("img"))) o(t.getAttribute("src")) || t.remove();
889
885
  }
890
- function Oe(e) {
886
+ function De(e) {
891
887
  let t = window.getSelection();
892
888
  if (!t || t.rangeCount === 0) return null;
893
889
  let n = t.getRangeAt(0);
@@ -897,7 +893,7 @@ function Oe(e) {
897
893
  let { startContainer: r, startOffset: i } = n;
898
894
  return (r.nodeType === Node.TEXT_NODE ? [i === 0 ? r.previousSibling : null, i === (r.textContent?.length ?? 0) ? r.nextSibling : null] : [r.childNodes[i - 1] ?? null, r.childNodes[i] ?? null]).find((e) => e instanceof HTMLImageElement) ?? null;
899
895
  }
900
- function Z(e, t) {
896
+ function Oe(e, t) {
901
897
  let n = document, r = n.caretRangeFromPoint?.(e, t) ?? null;
902
898
  if (!r) {
903
899
  let i = n.caretPositionFromPoint?.(e, t);
@@ -908,128 +904,124 @@ function Z(e, t) {
908
904
  let i = window.getSelection();
909
905
  i?.removeAllRanges(), i?.addRange(r);
910
906
  }
911
- var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, minHeight: c, maxHeight: l, disabled: u = !1, showCounts: d = !1, maxLength: p, extraToolbarItems: g, toolbarTrailing: b, footerSlot: C, hideSourceToggle: ie = !1, autoFocus: ce = !1, className: w, onCaretChange: T, strings: pe, images: D }, ge) {
912
- let j = t(te, pe), M = v(null), N = v(null), [P, _e] = y(null), [ve, L] = y(""), [R, z] = y(!1), [B, V] = y(!1), [H, U] = y(""), W = v(k(e)), G = v(T);
913
- G.current = T;
914
- let we = m((e) => {
915
- M.current = e, e && e.innerHTML === "" && (e.innerHTML = A(W.current));
907
+ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1, bodyHeight: c, minHeight: l, maxHeight: u, disabled: d = !1, showCounts: p = !1, maxLength: ne, extraToolbarItems: y, toolbarTrailing: ie, footerSlot: S, hideSourceToggle: le = !1, autoFocus: C = !1, className: me, onCaretChange: he, strings: w, images: E }, k) {
908
+ let A = t(te, w), j = _(null), M = _(null), [N, F] = v(null), [be, I] = v(""), [L, R] = v(!1), [z, B] = v(!1), [V, H] = v(""), U = _(D(e)), W = _(he);
909
+ W.current = he;
910
+ let G = m((e) => {
911
+ j.current = e, e && e.innerHTML === "" && (e.innerHTML = O(U.current));
916
912
  }, []);
917
913
  h(() => {
918
- let t = M.current;
919
- if (!t || R) return;
920
- let n = A(e);
921
- k(X(t)) !== k(n) && (t.innerHTML = n), W.current = k(e);
922
- }, [R, e]), h(() => {
923
- ce && M.current?.focus();
924
- }, [ce]);
914
+ let t = j.current;
915
+ if (!t || L) return;
916
+ let n = O(e);
917
+ D(X(t)) !== D(n) && (t.innerHTML = n), U.current = D(e);
918
+ }, [L, e]), h(() => {
919
+ C && j.current?.focus();
920
+ }, [C]);
925
921
  let K = m(() => {
926
- let e = M.current, t = k(X(e));
927
- W.current = t, r(t), G.current?.();
928
- }, [r]), Te = v(null);
929
- Te.current = {
922
+ let e = j.current, t = D(X(e));
923
+ U.current = t, r(t), W.current?.();
924
+ }, [r]), q = _(null);
925
+ q.current = {
930
926
  insertPlaceholder: (e) => {
931
- let t = M.current;
927
+ let t = j.current;
932
928
  if (!t) return;
933
- let n = N.current;
929
+ let n = M.current;
934
930
  if (n && t.contains(n.commonAncestorContainer) && !t.contains(document.activeElement)) {
935
931
  t.focus();
936
932
  let e = window.getSelection();
937
933
  e?.removeAllRanges(), e?.addRange(n);
938
934
  }
939
- E(t, `<span ${F}="${e}" contenteditable="false" class="${I}"></span>`);
935
+ ve(t, `<span ${P}="${e}" contenteditable="false" class="${ye}"></span>`);
940
936
  },
941
- findPlaceholder: (e) => M.current?.querySelector(`[data-rte-upload="${e}"]`) ?? null,
937
+ findPlaceholder: (e) => j.current?.querySelector(`[data-rte-upload="${e}"]`) ?? null,
942
938
  resolvePlaceholder: (e, t) => {
943
- let n = M.current?.querySelector(`[${F}="${e}"]`);
939
+ let n = j.current?.querySelector(`[${P}="${e}"]`);
944
940
  if (!n) return;
945
941
  let r = document.createElement("img");
946
942
  r.setAttribute("src", t.src), r.setAttribute("alt", t.alt ?? ""), t.width && r.setAttribute("width", String(t.width)), t.height && r.setAttribute("height", String(t.height)), n.replaceWith(r), K();
947
943
  },
948
944
  removePlaceholder: (e) => {
949
- M.current?.querySelector(`[${F}="${e}"]`)?.remove(), K();
945
+ j.current?.querySelector(`[${P}="${e}"]`)?.remove(), K();
950
946
  }
951
947
  };
952
- let q = be(D, Te, j.images), J = Se(D, j.images, q.addFiles, () => {
948
+ let J = Se(E, q, A.images), Y = we(E, A.images, J.addFiles, () => {
953
949
  let e = window.getSelection(), t = e && e.rangeCount > 0 ? e.getRangeAt(0) : null;
954
- N.current = t && M.current?.contains(t.commonAncestorContainer) ? t.cloneRange() : null;
955
- }), Ee = _(() => J.item ? [J.item, ...g ?? []] : g, [g, J.item]), Y = m(() => {
956
- let e = M.current;
957
- if (!D || !e) return;
950
+ M.current = t && j.current?.contains(t.commonAncestorContainer) ? t.cloneRange() : null;
951
+ }), Ee = g(() => Y.item ? [Y.item, ...y ?? []] : y, [y, Y.item]), Q = m(() => {
952
+ let e = j.current;
953
+ if (!E || !e) return;
958
954
  let t = window.getSelection();
959
955
  if (t && t.rangeCount > 0 && !e.contains(t.getRangeAt(0).commonAncestorContainer)) return;
960
- let n = Oe(e);
961
- _e(n), L(n?.getAttribute("alt") ?? "");
962
- }, [D]);
956
+ let n = De(e);
957
+ F(n), I(n?.getAttribute("alt") ?? "");
958
+ }, [E]);
963
959
  h(() => {
964
- if (D && typeof document < "u") return document.addEventListener("selectionchange", Y), () => document.removeEventListener("selectionchange", Y);
965
- }, [D, Y]);
966
- let Q = m(() => {
967
- let e = M.current;
968
- D && e && (De(e), q.prune(), P && !P.isConnected && _e(null)), K();
960
+ if (E && typeof document < "u") return document.addEventListener("selectionchange", Q), () => document.removeEventListener("selectionchange", Q);
961
+ }, [E, Q]);
962
+ let $ = m(() => {
963
+ let e = j.current;
964
+ E && e && (Z(e), J.prune(), N && !N.isConnected && F(null)), K();
969
965
  }, [
970
- P,
966
+ N,
971
967
  K,
972
- D,
973
- q
968
+ E,
969
+ J
974
970
  ]);
975
- ne(ge, () => ({
976
- focus: () => M.current?.focus(),
977
- getHTML: () => k(X(M.current)),
971
+ re(k, () => ({
972
+ focus: () => j.current?.focus(),
973
+ getHTML: () => D(X(j.current)),
978
974
  setHTML: (e) => {
979
- let t = k(e);
980
- W.current = t, M.current && (M.current.innerHTML = A(t)), r(t);
975
+ let t = D(e);
976
+ U.current = t, j.current && (j.current.innerHTML = O(t)), r(t);
981
977
  },
982
978
  insertHTML: (e) => {
983
- E(M.current, e), K();
979
+ ve(j.current, e), K();
984
980
  },
985
- isEmpty: () => k(X(M.current)) === "",
981
+ isEmpty: () => D(X(j.current)) === "",
986
982
  clear: () => {
987
- W.current = "", M.current && (M.current.innerHTML = "<p></p>"), r("");
983
+ U.current = "", j.current && (j.current.innerHTML = "<p></p>"), r("");
988
984
  },
989
- getCaretContext: () => me(),
985
+ getCaretContext: () => ge(),
990
986
  replaceBeforeCaret: (e, t) => {
991
- he(null, e, t, () => K());
987
+ _e(null, e, t, () => K());
992
988
  }
993
989
  }), [K, r]);
994
- let $ = _(() => ({
995
- minHeight: c ?? (o ? "2rem" : "12rem"),
996
- ...l ? {
997
- maxHeight: l,
990
+ let ke = f.bodyMinHeight[c ?? (o ? "control" : "document")], Ae = g(() => ({
991
+ ...l ? { minHeight: l } : {},
992
+ ...u ? {
993
+ maxHeight: u,
998
994
  overflowY: "auto"
999
995
  } : {}
1000
- }), [
1001
- o,
1002
- l,
1003
- c
1004
- ]), ke = m(() => {
1005
- if (B) {
1006
- let e = k(H);
1007
- W.current = e, M.current && (M.current.innerHTML = A(e)), r(e), V(!1);
996
+ }), [u, l]), je = m(() => {
997
+ if (z) {
998
+ let e = D(V);
999
+ U.current = e, j.current && (j.current.innerHTML = O(e)), r(e), B(!1);
1008
1000
  return;
1009
1001
  }
1010
- U(M.current?.innerHTML ?? A(e)), V(!0);
1002
+ H(j.current?.innerHTML ?? O(e)), B(!0);
1011
1003
  }, [
1012
1004
  r,
1013
- B,
1014
- H,
1005
+ z,
1006
+ V,
1015
1007
  e
1016
- ]), Ae = m((e) => {
1008
+ ]), Me = m((e) => {
1017
1009
  let t = e.target.value;
1018
- U(t);
1019
- let n = k(t);
1020
- W.current = n, r(n);
1021
- }, [r]), je = typeof a == "string" ? a : "", Me = k(W.current) === "" && q.uploads.length === 0, Ne = je.length > 0 && !R && Me ? /* @__PURE__ */ x(i, {
1010
+ H(t);
1011
+ let n = D(t);
1012
+ U.current = n, r(n);
1013
+ }, [r]), Ne = typeof a == "string" ? a : "", Pe = D(U.current) === "" && J.uploads.length === 0, Fe = Ne.length > 0 && !L && Pe ? /* @__PURE__ */ b(i, {
1022
1014
  tag: "span",
1023
1015
  size: "sm",
1024
1016
  type: "secondary",
1025
1017
  className: "pointer-events-none absolute inset-0 px-control py-control-y-offset",
1026
- children: je
1027
- }) : null, Pe = _(() => [
1018
+ children: Ne
1019
+ }) : null, Ie = g(() => [
1028
1020
  {
1029
1021
  id: "bold",
1030
1022
  toggle: !0,
1031
- icon: re,
1032
- label: j.toolbar.bold,
1023
+ icon: ae,
1024
+ label: A.toolbar.bold,
1033
1025
  isActive: () => !1,
1034
1026
  run: () => void 0,
1035
1027
  disabled: !0
@@ -1037,8 +1029,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
1037
1029
  {
1038
1030
  id: "italic",
1039
1031
  toggle: !0,
1040
- icon: ae,
1041
- label: j.toolbar.italic,
1032
+ icon: oe,
1033
+ label: A.toolbar.italic,
1042
1034
  isActive: () => !1,
1043
1035
  run: () => void 0,
1044
1036
  disabled: !0
@@ -1046,8 +1038,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
1046
1038
  {
1047
1039
  id: "strike",
1048
1040
  toggle: !0,
1049
- icon: de,
1050
- label: j.toolbar.strike,
1041
+ icon: fe,
1042
+ label: A.toolbar.strike,
1051
1043
  isActive: () => !1,
1052
1044
  run: () => void 0,
1053
1045
  disabled: !0
@@ -1055,8 +1047,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
1055
1047
  {
1056
1048
  id: "bullet-list",
1057
1049
  toggle: !0,
1058
- icon: oe,
1059
- label: j.toolbar.bulletList,
1050
+ icon: se,
1051
+ label: A.toolbar.bulletList,
1060
1052
  isActive: () => !1,
1061
1053
  run: () => void 0,
1062
1054
  disabled: !0
@@ -1064,8 +1056,8 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
1064
1056
  {
1065
1057
  id: "ordered-list",
1066
1058
  toggle: !0,
1067
- icon: se,
1068
- label: j.toolbar.orderedList,
1059
+ icon: ce,
1060
+ label: A.toolbar.orderedList,
1069
1061
  isActive: () => !1,
1070
1062
  run: () => void 0,
1071
1063
  disabled: !0
@@ -1073,113 +1065,113 @@ var Q = p(function({ value: e, onValueChange: r, placeholder: a, compact: o = !1
1073
1065
  {
1074
1066
  id: "blockquote",
1075
1067
  toggle: !0,
1076
- icon: le,
1077
- label: j.toolbar.blockquote,
1068
+ icon: ue,
1069
+ label: A.toolbar.blockquote,
1078
1070
  isActive: () => !1,
1079
1071
  run: () => void 0,
1080
1072
  disabled: !0
1081
1073
  },
1082
1074
  {
1083
1075
  id: "undo",
1084
- icon: fe,
1085
- label: j.toolbar.undo,
1076
+ icon: pe,
1077
+ label: A.toolbar.undo,
1086
1078
  isActive: () => !1,
1087
1079
  run: () => void 0,
1088
1080
  disabled: !0
1089
1081
  },
1090
1082
  {
1091
1083
  id: "redo",
1092
- icon: ue,
1093
- label: j.toolbar.redo,
1084
+ icon: de,
1085
+ label: A.toolbar.redo,
1094
1086
  isActive: () => !1,
1095
1087
  run: () => void 0,
1096
1088
  disabled: !0
1097
1089
  }
1098
- ], [j]), Fe = B ? H.replace(/<[^>]*>/g, "") : M.current?.innerText ?? k(e).replace(/<[^>]*>/g, ""), Ie = d ? /* @__PURE__ */ x(O, {
1099
- text: Fe,
1100
- maxLength: p,
1101
- strings: j
1090
+ ], [A]), Le = z ? V.replace(/<[^>]*>/g, "") : j.current?.innerText ?? D(e).replace(/<[^>]*>/g, ""), Re = p ? /* @__PURE__ */ b(T, {
1091
+ text: Le,
1092
+ maxLength: ne,
1093
+ strings: A
1102
1094
  }) : null;
1103
- return /* @__PURE__ */ S("div", {
1104
- className: n(f.frame, u && f.disabled, w),
1095
+ return /* @__PURE__ */ x("div", {
1096
+ className: n(f.frame, d && f.disabled, me),
1105
1097
  children: [
1106
- /* @__PURE__ */ x(ee, {
1107
- buttons: Pe,
1098
+ /* @__PURE__ */ b(ee, {
1099
+ buttons: Ie,
1108
1100
  extraToolbarItems: Ee,
1109
- hideSourceToggle: ie,
1110
- sourceMode: B,
1111
- toggleSourceMode: ke,
1112
- disabled: u,
1101
+ hideSourceToggle: le,
1102
+ sourceMode: z,
1103
+ toggleSourceMode: je,
1104
+ disabled: d,
1113
1105
  hasEditor: !0,
1114
- toolbarTrailing: b,
1115
- strings: j
1106
+ toolbarTrailing: ie,
1107
+ strings: A
1116
1108
  }),
1117
- B ? /* @__PURE__ */ x("textarea", {
1118
- "aria-label": j.sourceLabel,
1119
- value: H,
1120
- onChange: Ae,
1121
- disabled: u,
1109
+ z ? /* @__PURE__ */ b("textarea", {
1110
+ "aria-label": A.sourceLabel,
1111
+ value: V,
1112
+ onChange: Me,
1113
+ disabled: d,
1122
1114
  spellCheck: !1,
1123
- className: n(f.source, u && "cursor-not-allowed"),
1124
- style: $
1125
- }) : /* @__PURE__ */ S("div", {
1126
- className: "relative",
1127
- style: $,
1128
- children: [Ne, /* @__PURE__ */ x("div", {
1129
- ref: we,
1115
+ className: n(f.source, ke, d && "cursor-not-allowed"),
1116
+ style: Ae
1117
+ }) : /* @__PURE__ */ x("div", {
1118
+ className: n("relative", ke),
1119
+ style: Ae,
1120
+ children: [Fe, /* @__PURE__ */ b("div", {
1121
+ ref: G,
1130
1122
  role: "textbox",
1131
- "aria-label": j.editorLabel,
1123
+ "aria-label": A.editorLabel,
1132
1124
  "aria-multiline": "true",
1133
- contentEditable: !u,
1125
+ contentEditable: !d,
1134
1126
  suppressContentEditableWarning: !0,
1135
- onInput: Q,
1136
- onKeyUp: () => G.current?.(),
1137
- onMouseUp: () => G.current?.(),
1138
- onClick: D ? (e) => {
1127
+ onInput: $,
1128
+ onKeyUp: () => W.current?.(),
1129
+ onMouseUp: () => W.current?.(),
1130
+ onClick: E ? (e) => {
1139
1131
  if (!(e.target instanceof HTMLImageElement)) return;
1140
1132
  let t = document.createRange();
1141
1133
  t.selectNode(e.target);
1142
1134
  let n = window.getSelection();
1143
1135
  n?.removeAllRanges(), n?.addRange(t);
1144
1136
  } : void 0,
1145
- onPaste: D ? (e) => {
1146
- let t = ye(e.clipboardData);
1147
- t.length !== 0 && (e.preventDefault(), q.addFiles(t));
1137
+ onPaste: E ? (e) => {
1138
+ let t = xe(e.clipboardData);
1139
+ t.length !== 0 && (e.preventDefault(), J.addFiles(t));
1148
1140
  } : void 0,
1149
- onDragOver: D ? (e) => {
1141
+ onDragOver: E ? (e) => {
1150
1142
  Array.from(e.dataTransfer.types).includes("Files") && e.preventDefault();
1151
1143
  } : void 0,
1152
- onDrop: D ? (e) => {
1153
- let t = ye(e.dataTransfer);
1154
- t.length !== 0 && (e.preventDefault(), M.current?.focus(), Z(e.clientX, e.clientY), q.addFiles(t));
1144
+ onDrop: E ? (e) => {
1145
+ let t = xe(e.dataTransfer);
1146
+ t.length !== 0 && (e.preventDefault(), j.current?.focus(), Oe(e.clientX, e.clientY), J.addFiles(t));
1155
1147
  } : void 0,
1156
- onFocus: () => z(!0),
1157
- onBlur: () => z(!1),
1158
- className: n(s, "h-full min-h-full", u && "cursor-not-allowed")
1148
+ onFocus: () => R(!0),
1149
+ onBlur: () => R(!1),
1150
+ className: n(s, "h-full min-h-full", d && "cursor-not-allowed")
1159
1151
  })]
1160
1152
  }),
1161
- !!D && /* @__PURE__ */ x(Ce, {
1162
- alt: P ? ve : null,
1153
+ !!E && /* @__PURE__ */ b(Te, {
1154
+ alt: N ? be : null,
1163
1155
  onAltChange: (e) => {
1164
- L(e), P?.setAttribute("alt", e), K();
1156
+ I(e), N?.setAttribute("alt", e), K();
1165
1157
  },
1166
1158
  onRemove: () => {
1167
- P?.remove(), _e(null), K(), M.current?.focus();
1159
+ N?.remove(), F(null), K(), j.current?.focus();
1168
1160
  },
1169
- notice: q.notice,
1170
- onDismissNotice: q.dismissNotice,
1171
- strings: j.images
1161
+ notice: J.notice,
1162
+ onDismissNotice: J.dismissNotice,
1163
+ strings: A.images
1172
1164
  }),
1173
- !!C && /* @__PURE__ */ x("div", {
1165
+ !!S && /* @__PURE__ */ b("div", {
1174
1166
  className: "px-control pb-space-md pt-space-xs",
1175
- children: C
1167
+ children: S
1176
1168
  }),
1177
- Ie,
1178
- J.input,
1179
- /* @__PURE__ */ x(xe, {
1180
- queue: q,
1181
- adapterRef: Te,
1182
- strings: j.images
1169
+ Re,
1170
+ Y.input,
1171
+ /* @__PURE__ */ b(Ce, {
1172
+ queue: J,
1173
+ adapterRef: q,
1174
+ strings: A.images
1183
1175
  })
1184
1176
  ]
1185
1177
  });
@@ -1188,10 +1180,10 @@ Q.displayName = "FallbackRichTextEditor";
1188
1180
  //#endregion
1189
1181
  //#region src/components/features/rich-text-editor/rich-text-editor.tsx
1190
1182
  var $ = p(function(e, t) {
1191
- return Y ? /* @__PURE__ */ x(Ee, {
1183
+ return Ee ? /* @__PURE__ */ b(Y, {
1192
1184
  ...e,
1193
1185
  ref: t
1194
- }) : /* @__PURE__ */ x(Q, {
1186
+ }) : /* @__PURE__ */ b(Q, {
1195
1187
  className: "rich-text-editor--component",
1196
1188
  ...e,
1197
1189
  ref: t
@@ -1199,6 +1191,6 @@ var $ = p(function(e, t) {
1199
1191
  });
1200
1192
  $.displayName = "RichTextEditor";
1201
1193
  //#endregion
1202
- export { O as n, $ as t };
1194
+ export { T as n, $ as t };
1203
1195
 
1204
- //# sourceMappingURL=rich-text-editor-sMU_Scqm.js.map
1196
+ //# sourceMappingURL=rich-text-editor-cRLC-eBK.js.map