@onereach/ui-components 4.7.0-beta.2811.0 → 4.8.0-beta.2836.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (715) hide show
  1. package/dist/bundled/{v3/_baseAssignValue-22e630c1.js → v2/_baseAssignValue-008b033a.js} +1 -1
  2. package/dist/bundled/v2/{_baseIsEqual-a1cc156c.js → _baseIsEqual-9edac039.js} +5 -5
  3. package/dist/bundled/v2/_commonjsHelpers-6584e42b.js +11 -0
  4. package/dist/bundled/v2/components/OrAvatar/OrAvatar.js +6 -5
  5. package/dist/bundled/v2/components/OrAvatar/index.js +6 -5
  6. package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
  7. package/dist/bundled/v2/components/OrBottomSheetV3/index.js +2 -2
  8. package/dist/bundled/v2/components/OrButtonV2/OrButton.js +6 -5
  9. package/dist/bundled/v2/components/OrButtonV2/index.js +6 -5
  10. package/dist/bundled/v2/components/OrButtonV3/OrButton.js +2 -2
  11. package/dist/bundled/v2/components/OrButtonV3/index.js +2 -2
  12. package/dist/bundled/v2/components/OrCardCollection/OrCardCollection.js +7 -6
  13. package/dist/bundled/v2/components/OrCardCollection/index.js +7 -6
  14. package/dist/bundled/v2/components/OrCardCollectionV3/OrCardCollection.js +2 -2
  15. package/dist/bundled/v2/components/OrCardCollectionV3/index.js +2 -2
  16. package/dist/bundled/v2/components/OrCarousel/OrCarousel.js +6 -5
  17. package/dist/bundled/v2/components/OrCarousel/index.js +6 -5
  18. package/dist/bundled/v2/components/OrCheckbox/OrCheckbox.js +6 -5
  19. package/dist/bundled/v2/components/OrCheckbox/index.js +6 -5
  20. package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
  21. package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +2 -2
  22. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
  23. package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +2 -2
  24. package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +2 -2
  25. package/dist/bundled/v2/components/OrCheckboxV3/index.js +2 -2
  26. package/dist/bundled/v2/components/OrChip/OrChip.js +6 -5
  27. package/dist/bundled/v2/components/OrChip/index.js +6 -5
  28. package/dist/bundled/v2/components/OrChips/OrChips.js +6 -5
  29. package/dist/bundled/v2/components/OrChips/index.js +6 -5
  30. package/dist/bundled/v2/components/OrCode/OrCode.js +14 -3799
  31. package/dist/bundled/v2/components/OrCode/index.js +14 -9
  32. package/dist/bundled/v2/components/OrCode/lang.js +3941 -3
  33. package/dist/bundled/v2/components/OrCode/theme.js +2 -1
  34. package/dist/bundled/v2/components/OrCollapse/OrCollapse.js +6 -5
  35. package/dist/bundled/v2/components/OrCollapse/index.js +6 -5
  36. package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +8 -7
  37. package/dist/bundled/v2/components/OrColorPicker/index.js +8 -7
  38. package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +10 -8
  39. package/dist/bundled/v2/components/OrConfirm/index.js +10 -8
  40. package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +3 -3
  41. package/dist/bundled/v2/components/OrConfirmV3/index.js +3 -3
  42. package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +4 -4
  43. package/dist/bundled/v2/components/OrDatePickerV3/index.js +4 -4
  44. package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +10 -9
  45. package/dist/bundled/v2/components/OrDateTimePicker/index.js +10 -9
  46. package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +5 -5
  47. package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +5 -5
  48. package/dist/bundled/v2/components/OrFloating/OrFloating.js +6 -5
  49. package/dist/bundled/v2/components/OrFloating/index.js +6 -5
  50. package/dist/bundled/v2/components/OrIcon/OrIcon.js +6 -5
  51. package/dist/bundled/v2/components/OrIcon/index.js +6 -5
  52. package/dist/bundled/v2/components/OrIconButtonV2/OrIconButton.js +6 -5
  53. package/dist/bundled/v2/components/OrIconButtonV2/index.js +6 -5
  54. package/dist/bundled/v2/components/OrIconButtonV3/OrIconButton.js +2 -2
  55. package/dist/bundled/v2/components/OrIconButtonV3/index.js +2 -2
  56. package/dist/bundled/v2/components/OrInlineInputV3/OrInlineInput.js +2 -2
  57. package/dist/bundled/v2/components/OrInlineInputV3/index.js +2 -2
  58. package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +8 -7
  59. package/dist/bundled/v2/components/OrInlineTextEdit/index.js +8 -7
  60. package/dist/bundled/v2/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
  61. package/dist/bundled/v2/components/OrInlineTextareaV3/index.js +2 -2
  62. package/dist/bundled/v2/components/OrInput/OrInput.js +6 -5
  63. package/dist/bundled/v2/components/OrInput/index.js +6 -5
  64. package/dist/bundled/v2/components/OrInputV3/OrInput.js +2 -2
  65. package/dist/bundled/v2/components/OrInputV3/index.js +2 -2
  66. package/dist/bundled/v2/components/OrList/OrList.js +10 -9
  67. package/dist/bundled/v2/components/OrList/index.js +10 -9
  68. package/dist/bundled/v2/components/OrListOfInputs/OrListOfInputs.js +10 -9
  69. package/dist/bundled/v2/components/OrListOfInputs/index.js +10 -9
  70. package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +2 -2
  71. package/dist/bundled/v2/components/OrLoaderV3/index.js +2 -2
  72. package/dist/bundled/v2/components/OrMenuV3/OrMenu.js +2 -2
  73. package/dist/bundled/v2/components/OrMenuV3/index.js +2 -2
  74. package/dist/bundled/v2/components/OrModal/OrModal.js +10 -1352
  75. package/dist/bundled/v2/components/OrModal/index.js +9 -7
  76. package/dist/bundled/v2/components/OrModalV3/OrModal.js +4 -4
  77. package/dist/bundled/v2/components/OrModalV3/index.js +2 -2
  78. package/dist/bundled/v2/components/OrNotification/OrNotification.js +6 -5
  79. package/dist/bundled/v2/components/OrNotification/index.js +6 -5
  80. package/dist/bundled/v2/components/OrNotificationV3/OrNotification.js +2 -2
  81. package/dist/bundled/v2/components/OrNotificationV3/index.js +2 -2
  82. package/dist/bundled/v2/components/OrNumberInput/OrNumberInput.js +6 -5
  83. package/dist/bundled/v2/components/OrNumberInput/index.js +6 -5
  84. package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +8 -7
  85. package/dist/bundled/v2/components/OrOverflowMenu/index.js +8 -7
  86. package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +2 -2
  87. package/dist/bundled/v2/components/OrOverlayV3/index.js +2 -2
  88. package/dist/bundled/v2/components/OrPaginationV3/OrPagination.js +2 -2
  89. package/dist/bundled/v2/components/OrPaginationV3/index.js +2 -2
  90. package/dist/bundled/v2/components/OrPassword/OrPassword.js +8 -7
  91. package/dist/bundled/v2/components/OrPassword/index.js +8 -7
  92. package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +2 -2
  93. package/dist/bundled/v2/components/OrPopoverV3/index.js +2 -2
  94. package/dist/bundled/v2/components/OrProgress/OrProgress.js +6 -5
  95. package/dist/bundled/v2/components/OrProgress/index.js +6 -5
  96. package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +8 -7
  97. package/dist/bundled/v2/components/OrProgressV3/index.js +8 -7
  98. package/dist/bundled/v2/components/OrRadio/OrRadio.js +8 -7
  99. package/dist/bundled/v2/components/OrRadio/index.js +8 -7
  100. package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +2 -2
  101. package/dist/bundled/v2/components/OrRadioGroupV3/index.js +2 -2
  102. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +2201 -0
  103. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +220 -0
  104. package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +2 -0
  105. package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +73 -0
  106. package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +4 -0
  107. package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +7 -0
  108. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +6 -0
  109. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +38 -0
  110. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
  111. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +46 -0
  112. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
  113. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +184 -0
  114. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
  115. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +5 -0
  116. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
  117. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
  118. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
  119. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
  120. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
  121. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +6 -0
  122. package/dist/bundled/v2/components/OrSearch/OrSearch.js +7 -6
  123. package/dist/bundled/v2/components/OrSearch/index.js +7 -6
  124. package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +2 -2
  125. package/dist/bundled/v2/components/OrSearchV3/index.js +2 -2
  126. package/dist/bundled/v2/components/OrSelect/OrSelect.js +11 -10
  127. package/dist/bundled/v2/components/OrSelect/index.js +11 -10
  128. package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +2 -2
  129. package/dist/bundled/v2/components/OrSelectV3/index.js +2 -2
  130. package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +2 -2
  131. package/dist/bundled/v2/components/OrSidebar/index.js +2 -2
  132. package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +2 -2
  133. package/dist/bundled/v2/components/OrSidebarV3/index.js +2 -2
  134. package/dist/bundled/v2/components/OrSkeleton/index.js +6 -5
  135. package/dist/bundled/v2/components/OrSkeletonText/OrSkeletonText.js +6 -5
  136. package/dist/bundled/v2/components/OrSkeletonText/index.js +6 -5
  137. package/dist/bundled/v2/components/OrSkeletonTextV3/OrSkeletonText.js +6 -5
  138. package/dist/bundled/v2/components/OrSkeletonTextV3/index.js +6 -5
  139. package/dist/bundled/v2/components/OrSkeletonV3/index.js +6 -5
  140. package/dist/bundled/v2/components/OrSlider/OrSlider.js +8 -7
  141. package/dist/bundled/v2/components/OrSlider/index.js +8 -7
  142. package/dist/bundled/v2/components/OrStepper/OrStepper.js +6 -5
  143. package/dist/bundled/v2/components/OrStepper/index.js +6 -5
  144. package/dist/bundled/v2/components/OrSwitchV3/OrSwitch.js +2 -2
  145. package/dist/bundled/v2/components/OrSwitchV3/index.js +2 -2
  146. package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +2 -2
  147. package/dist/bundled/v2/components/OrTabsV3/index.js +2 -2
  148. package/dist/bundled/v2/components/OrTag/OrTag.js +6 -5
  149. package/dist/bundled/v2/components/OrTag/index.js +6 -5
  150. package/dist/bundled/v2/components/OrTagV3/OrTag.js +2 -2
  151. package/dist/bundled/v2/components/OrTagV3/index.js +2 -2
  152. package/dist/bundled/v2/components/OrTagsV3/OrTags.js +2 -2
  153. package/dist/bundled/v2/components/OrTagsV3/index.js +2 -2
  154. package/dist/bundled/v2/components/OrTextarea/OrTextarea.js +6 -5
  155. package/dist/bundled/v2/components/OrTextarea/index.js +6 -5
  156. package/dist/bundled/v2/components/OrTextbox/OrTextbox.js +6 -5
  157. package/dist/bundled/v2/components/OrTextbox/index.js +6 -5
  158. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +4 -4
  159. package/dist/bundled/v2/components/OrTimePickerV3/index.js +4 -4
  160. package/dist/bundled/v2/components/OrToast/OrToast.js +9 -8
  161. package/dist/bundled/v2/components/OrToast/Timer.js +1 -1
  162. package/dist/bundled/v2/components/OrToast/composable/index.js +2 -2
  163. package/dist/bundled/v2/components/OrToast/composable/useToast.js +2 -2
  164. package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +2 -2
  165. package/dist/bundled/v2/components/OrToast/index.js +11 -10
  166. package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +11 -10
  167. package/dist/bundled/v2/components/OrToastContainer/index.js +11 -10
  168. package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +2 -2
  169. package/dist/bundled/v2/components/OrToastContainerV3/index.js +2 -2
  170. package/dist/bundled/v2/components/OrToastV3/OrToast.js +2 -2
  171. package/dist/bundled/v2/components/OrToastV3/Timer.js +1 -1
  172. package/dist/bundled/v2/components/OrToastV3/composable/index.js +2 -2
  173. package/dist/bundled/v2/components/OrToastV3/composable/useToast.js +2 -2
  174. package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +2 -2
  175. package/dist/bundled/v2/components/OrToastV3/index.js +2 -2
  176. package/dist/bundled/v2/components/OrTooltip/OrTooltip.js +6 -5
  177. package/dist/bundled/v2/components/OrTooltip/index.js +6 -5
  178. package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.js +2 -2
  179. package/dist/bundled/v2/components/OrTooltipV3/index.js +2 -2
  180. package/dist/bundled/v2/components/index.d.ts +1 -0
  181. package/dist/bundled/v2/components/index.js +36 -21
  182. package/dist/bundled/{v3/dom-700444b4.js → v2/dom-c98dce89.js} +2 -2
  183. package/dist/bundled/v2/{eq-95cd2573.js → eq-037e6fce.js} +1 -1
  184. package/dist/bundled/{v3/get-ab1b7d93.js → v2/get-b30afe93.js} +3 -3
  185. package/dist/bundled/v2/hooks/index.d.ts +1 -0
  186. package/dist/bundled/v2/hooks/index.js +6 -2
  187. package/dist/bundled/v2/hooks/useOverflow.d.ts +2 -2
  188. package/dist/bundled/v2/hooks/useOverflow.js +2 -2
  189. package/dist/bundled/v2/hooks/usePopoverState.js +1 -1
  190. package/dist/bundled/v2/hooks/useResponsive/index.js +2 -2
  191. package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +2 -2
  192. package/dist/bundled/v2/hooks/useTheme.d.ts +2 -0
  193. package/dist/bundled/v2/hooks/useTheme.js +10125 -0
  194. package/dist/bundled/v2/{index-8a1b5b9c.js → index-06f6bbe4.js} +1 -1
  195. package/dist/bundled/v2/{index-cf2c3c27.js → index-0d224ae5.js} +3 -115
  196. package/dist/bundled/v2/index-80a3a4f4.js +9714 -0
  197. package/dist/bundled/v2/index-85c2efe8.js +7122 -0
  198. package/dist/bundled/v2/{index-6d94f832.js → index-af414338.js} +2 -2
  199. package/dist/bundled/{v3/OrCode.vue_vue_type_script_lang-7af61a76.js → v2/index-d92d0b48.js} +14 -235
  200. package/dist/bundled/v2/{index-82718479.js → index-dac0fb7c.js} +1 -1
  201. package/dist/bundled/v2/{lang-0fb8f78b.js → index-e9f6b2d8.js} +73 -4009
  202. package/dist/bundled/v2/index.es-3f39f316.js +115 -0
  203. package/dist/bundled/v2/index.js +42 -24
  204. package/dist/bundled/v2/{isArrayLike-e46b8eac.js → isArrayLike-61275a05.js} +1 -1
  205. package/dist/bundled/v2/{isEqual-44382965.js → isEqual-8bbb1110.js} +1 -1
  206. package/dist/bundled/{v3/isObject-fe8b81fd.js → v2/isObject-08fab135.js} +1 -1
  207. package/dist/bundled/v2/markdown-c78b4891.js +17977 -0
  208. package/dist/bundled/{v3/range-6f26eda4.js → v2/range-637f1361.js} +4 -4
  209. package/dist/bundled/{v3/round-f34440f4.js → v2/round-4a894f03.js} +4 -4
  210. package/dist/bundled/{v3/toFinite-74227610.js → v2/toFinite-675db18a.js} +1 -1
  211. package/dist/bundled/v2/{toInteger-2fd112a9.js → toInteger-27595771.js} +1 -1
  212. package/dist/bundled/{v3/toString-f3196832.js → v2/toString-a72d5149.js} +1 -1
  213. package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-6e26795e.js → v2/useFocusTrap-c1384da1.js} +4 -100
  214. package/dist/bundled/v2/utils/functions/dom.js +6 -5
  215. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-2a494943.js → OrAvatar.vue_vue_type_script_lang-36439ec1.js} +1 -1
  216. package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-2f9406a6.js → OrBottomSheet.vue_vue_type_script_lang-a4e73f9e.js} +2 -2
  217. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-af5ff967.js → OrButton.vue_vue_type_script_lang-d31ada75.js} +1 -1
  218. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-5ae410e5.js → OrButton.vue_vue_type_script_lang-fc3b3109.js} +1 -1
  219. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-86c25f0f.js → OrCardCollection.vue_vue_type_script_lang-0b7357dc.js} +3 -3
  220. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-decf25ee.js → OrCardCollection.vue_vue_type_script_lang-d1cba987.js} +4 -4
  221. package/dist/bundled/v3/{OrCarousel.vue_vue_type_script_lang-272cb9c9.js → OrCarousel.vue_vue_type_script_lang-cfd11d11.js} +1 -1
  222. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-a6d72885.js → OrCheckbox.vue_vue_type_script_lang-0fcd7886.js} +1 -1
  223. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-b1dd62bd.js → OrCheckbox.vue_vue_type_script_lang-579d41cf.js} +1 -1
  224. package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-b4421b8d.js → OrCheckboxGroup.vue_vue_type_script_lang-bf90c3cc.js} +2 -2
  225. package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-c7beacdf.js → OrCheckboxTree.vue_vue_type_script_lang-96fce5bf.js} +4 -4
  226. package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-a182e324.js → OrChip.vue_vue_type_script_lang-fcda103b.js} +1 -1
  227. package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-9e98c258.js → OrChips.vue_vue_type_script_lang-8d26707d.js} +1 -1
  228. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-22d2a803.js +237 -0
  229. package/dist/bundled/v3/{OrCollapse.vue_vue_type_script_lang-2a5c0929.js → OrCollapse.vue_vue_type_script_lang-00da895c.js} +1 -1
  230. package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-6143f82f.js → OrColorPicker.vue_vue_type_script_lang-476f49f1.js} +3 -3
  231. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-ac591c04.js → OrConfirm.vue_vue_type_script_lang-39a1bd4d.js} +6 -6
  232. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-cdd89236.js → OrConfirm.vue_vue_type_script_lang-b7cc200c.js} +6 -6
  233. package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-b9052966.js → OrDatePicker.vue_vue_type_script_lang-83dd873c.js} +4 -4
  234. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-111a251e.js → OrDateTimePicker.vue_vue_type_script_lang-77880140.js} +7 -7
  235. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-741b8048.js → OrDateTimePicker.vue_vue_type_script_lang-77e069a1.js} +5 -5
  236. package/dist/bundled/v3/{OrDateTimePickerMonthSelect-6c5e416a.js → OrDateTimePickerMonthSelect-3348fba1.js} +3 -3
  237. package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-894382f9.js → OrDateTimePickerPopoverHeader-cbe4de91.js} +1 -1
  238. package/dist/bundled/v3/{OrDateTimePickerTimeSelect-b04942c5.js → OrDateTimePickerTimeSelect-c2ad08b5.js} +1 -1
  239. package/dist/bundled/v3/{OrFloating.vue_vue_type_script_lang-d419627c.js → OrFloating.vue_vue_type_script_lang-8bc114e8.js} +1 -1
  240. package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-cd2da378.js → OrIcon.vue_vue_type_script_lang-52900ff4.js} +1 -1
  241. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-d1496a81.js → OrIconButton.vue_vue_type_script_lang-416cbbd3.js} +2 -2
  242. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-743eb1eb.js → OrIconButton.vue_vue_type_script_lang-a32f0635.js} +1 -1
  243. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-2df002e8.js → OrInlineInput.vue_vue_type_script_lang-d34f84b1.js} +1 -1
  244. package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-1e78da3c.js → OrInlineTextEdit.vue_vue_type_script_lang-7955bdac.js} +4 -4
  245. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-139602f1.js → OrInlineTextarea.vue_vue_type_script_lang-2f0d13e0.js} +1 -1
  246. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-30a2b358.js → OrInput.vue_vue_type_script_lang-2680e4e1.js} +2 -2
  247. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-bf9fa981.js → OrInput.vue_vue_type_script_lang-f887102b.js} +2 -2
  248. package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-ccab1c75.js → OrList.vue_vue_type_script_lang-cb8806b2.js} +11 -11
  249. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-32d935ae.js → OrListOfInputs.vue_vue_type_script_lang-14a99046.js} +4 -4
  250. package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-c1b5372a.js → OrLoader.vue_vue_type_script_lang-1e4c32ee.js} +1 -1
  251. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-90d57815.js → OrMenu.vue_vue_type_script_lang-2958c018.js} +1 -1
  252. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-910b80a1.js → OrModal.vue_vue_type_script_lang-a84affbb.js} +2 -2
  253. package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-b716f9f7.js +101 -0
  254. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-3f6dd187.js → OrNotification.vue_vue_type_script_lang-564035a6.js} +2 -2
  255. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-f414a938.js → OrNotification.vue_vue_type_script_lang-6d6d3de9.js} +1 -1
  256. package/dist/bundled/v3/{OrNumberInput.vue_vue_type_script_lang-1fb535e6.js → OrNumberInput.vue_vue_type_script_lang-e904d247.js} +1 -1
  257. package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-fb64f2d0.js → OrOverflowMenu.vue_vue_type_script_lang-396e26c0.js} +5 -5
  258. package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-93864f05.js → OrOverlay.vue_vue_type_script_lang-4a4c532b.js} +1 -1
  259. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-4d9cc1c9.js → OrPagination.vue_vue_type_script_lang-d29f6b11.js} +2 -2
  260. package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-d8bfee83.js → OrPassword.vue_vue_type_script_lang-ea54f428.js} +3 -3
  261. package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-dca9481d.js → OrPopover.vue_vue_type_script_lang-00135a32.js} +2 -2
  262. package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-1c15f38e.js → OrProgress.vue_vue_type_script_lang-9c13f877.js} +2 -2
  263. package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-a99362ae.js → OrProgress.vue_vue_type_script_lang-d4cf52da.js} +1 -1
  264. package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-3a551734.js → OrRadio.vue_vue_type_script_lang-5e642c5f.js} +2 -2
  265. package/dist/bundled/v3/{OrRadioGroup.vue_vue_type_script_lang-5734ced2.js → OrRadioGroup.vue_vue_type_script_lang-4b4d1420.js} +1 -1
  266. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-9bbcc18a.js +1889 -0
  267. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ba26f3af.js → OrSearch.vue_vue_type_script_lang-14e7fd28.js} +2 -2
  268. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-82b7b602.js → OrSearch.vue_vue_type_script_lang-3e7729fe.js} +3 -3
  269. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-a156c8b5.js → OrSelect.vue_vue_type_script_lang-19dc9748.js} +4 -4
  270. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-c9547f1b.js → OrSelect.vue_vue_type_script_lang-5bdf06cb.js} +11 -11
  271. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-55b5ffb4.js → OrSidebar.vue_vue_type_script_lang-2681fb99.js} +1 -1
  272. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-3914fce0.js → OrSidebar.vue_vue_type_script_lang-c96d5866.js} +2 -2
  273. package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-c2a5ab96.js → OrSkeletonText.vue_vue_type_script_lang-36cfe2f4.js} +1 -1
  274. package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-26b3cfd1.js → OrSkeletonText.vue_vue_type_script_lang-5cf21df0.js} +1 -1
  275. package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-22cc5cd5.js → OrSlider.vue_vue_type_script_lang-d933ca0c.js} +3 -3
  276. package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-67408a1a.js → OrStepper.vue_vue_type_script_lang-d4259c67.js} +1 -1
  277. package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-32427513.js → OrSwitch.vue_vue_type_script_lang-cde58199.js} +1 -1
  278. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-4c2cecd7.js → OrTabs.vue_vue_type_script_lang-d4356af4.js} +2 -2
  279. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-ce916e72.js → OrTag.vue_vue_type_script_lang-21f4b080.js} +1 -1
  280. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-cbb4a16d.js → OrTag.vue_vue_type_script_lang-2e2393a5.js} +1 -1
  281. package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-1f1278ce.js → OrTags.vue_vue_type_script_lang-dea58dbe.js} +3 -3
  282. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-1ab55f91.js → OrTextarea.vue_vue_type_script_lang-1585e4e5.js} +2 -2
  283. package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-1ec469f0.js → OrTextbox.vue_vue_type_script_lang-02b1c369.js} +3 -3
  284. package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-a03960c6.js → OrTimePicker.vue_vue_type_script_lang-77e08a6d.js} +4 -4
  285. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-592e1632.js → OrToastContainer.vue_vue_type_script_lang-364ee300.js} +1 -1
  286. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-9f5a5d56.js → OrToastContainer.vue_vue_type_script_lang-b1bb24ab.js} +1 -1
  287. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-a06d73f0.js → OrTooltip.vue_vue_type_script_lang-05d89296.js} +1 -1
  288. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-44e9f7e4.js → OrTooltip.vue_vue_type_script_lang-50478e4b.js} +1 -1
  289. package/dist/bundled/{v2/_baseAssignValue-22e630c1.js → v3/_baseAssignValue-008b033a.js} +1 -1
  290. package/dist/bundled/v3/{_baseIsEqual-a1cc156c.js → _baseIsEqual-9edac039.js} +5 -5
  291. package/dist/bundled/v3/_commonjsHelpers-6584e42b.js +11 -0
  292. package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +10 -9
  293. package/dist/bundled/v3/components/OrAvatar/index.js +9 -8
  294. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +5 -5
  295. package/dist/bundled/v3/components/OrBottomSheetV3/index.js +4 -4
  296. package/dist/bundled/v3/components/OrButtonV2/OrButton.js +10 -9
  297. package/dist/bundled/v3/components/OrButtonV2/index.js +11 -10
  298. package/dist/bundled/v3/components/OrButtonV3/OrButton.js +5 -5
  299. package/dist/bundled/v3/components/OrButtonV3/index.js +4 -4
  300. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +16 -15
  301. package/dist/bundled/v3/components/OrCardCollection/index.js +15 -14
  302. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +14 -14
  303. package/dist/bundled/v3/components/OrCardCollectionV3/index.js +13 -13
  304. package/dist/bundled/v3/components/OrCarousel/OrCarousel.js +10 -9
  305. package/dist/bundled/v3/components/OrCarousel/index.js +9 -8
  306. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +10 -9
  307. package/dist/bundled/v3/components/OrCheckbox/index.js +9 -8
  308. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +8 -8
  309. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +7 -7
  310. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +7 -7
  311. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +6 -6
  312. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +4 -4
  313. package/dist/bundled/v3/components/OrCheckboxV3/index.js +3 -3
  314. package/dist/bundled/v3/components/OrChip/OrChip.js +10 -9
  315. package/dist/bundled/v3/components/OrChip/index.js +9 -8
  316. package/dist/bundled/v3/components/OrChips/OrChips.js +11 -10
  317. package/dist/bundled/v3/components/OrChips/index.js +10 -9
  318. package/dist/bundled/v3/components/OrCode/OrCode.js +22 -17
  319. package/dist/bundled/v3/components/OrCode/index.js +20 -15
  320. package/dist/bundled/v3/components/OrCode/lang.js +3941 -3
  321. package/dist/bundled/v3/components/OrCode/theme.js +2 -1
  322. package/dist/bundled/v3/components/OrCollapse/OrCollapse.js +8 -7
  323. package/dist/bundled/v3/components/OrCollapse/index.js +7 -6
  324. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +11 -10
  325. package/dist/bundled/v3/components/OrColorPicker/index.js +10 -9
  326. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +20 -18
  327. package/dist/bundled/v3/components/OrConfirm/index.js +19 -17
  328. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +13 -13
  329. package/dist/bundled/v3/components/OrConfirmV3/index.js +12 -12
  330. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +14 -14
  331. package/dist/bundled/v3/components/OrDatePickerV3/index.js +13 -13
  332. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +17 -16
  333. package/dist/bundled/v3/components/OrDateTimePicker/index.js +16 -15
  334. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +15 -15
  335. package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +14 -14
  336. package/dist/bundled/v3/components/OrFloating/OrFloating.js +8 -7
  337. package/dist/bundled/v3/components/OrFloating/index.js +7 -6
  338. package/dist/bundled/v3/components/OrIcon/OrIcon.js +9 -8
  339. package/dist/bundled/v3/components/OrIcon/index.js +8 -7
  340. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +11 -10
  341. package/dist/bundled/v3/components/OrIconButtonV2/index.js +10 -9
  342. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +8 -8
  343. package/dist/bundled/v3/components/OrIconButtonV3/index.js +7 -7
  344. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +9 -9
  345. package/dist/bundled/v3/components/OrInlineInputV3/index.js +8 -8
  346. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +15 -14
  347. package/dist/bundled/v3/components/OrInlineTextEdit/index.js +14 -13
  348. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +9 -9
  349. package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +8 -8
  350. package/dist/bundled/v3/components/OrInput/OrInput.js +9 -8
  351. package/dist/bundled/v3/components/OrInput/index.js +8 -7
  352. package/dist/bundled/v3/components/OrInputV3/OrInput.js +10 -10
  353. package/dist/bundled/v3/components/OrInputV3/index.js +9 -9
  354. package/dist/bundled/v3/components/OrList/OrList.js +17 -16
  355. package/dist/bundled/v3/components/OrList/index.js +16 -15
  356. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +20 -19
  357. package/dist/bundled/v3/components/OrListOfInputs/index.js +19 -18
  358. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +4 -4
  359. package/dist/bundled/v3/components/OrLoaderV3/index.js +3 -3
  360. package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +7 -7
  361. package/dist/bundled/v3/components/OrMenuV3/index.js +6 -6
  362. package/dist/bundled/v3/components/OrModal/OrModal.js +15 -13
  363. package/dist/bundled/v3/components/OrModal/index.js +14 -12
  364. package/dist/bundled/v3/components/OrModalV3/OrModal.js +9 -9
  365. package/dist/bundled/v3/components/OrModalV3/index.js +8 -8
  366. package/dist/bundled/v3/components/OrNotification/OrNotification.js +12 -11
  367. package/dist/bundled/v3/components/OrNotification/index.js +11 -10
  368. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +9 -9
  369. package/dist/bundled/v3/components/OrNotificationV3/index.js +8 -8
  370. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.js +10 -9
  371. package/dist/bundled/v3/components/OrNumberInput/index.js +9 -8
  372. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +15 -14
  373. package/dist/bundled/v3/components/OrOverflowMenu/index.js +14 -13
  374. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +4 -4
  375. package/dist/bundled/v3/components/OrOverlayV3/index.js +3 -3
  376. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +10 -10
  377. package/dist/bundled/v3/components/OrPaginationV3/index.js +9 -9
  378. package/dist/bundled/v3/components/OrPassword/OrPassword.js +16 -15
  379. package/dist/bundled/v3/components/OrPassword/index.js +15 -14
  380. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +6 -6
  381. package/dist/bundled/v3/components/OrPopoverV3/index.js +5 -5
  382. package/dist/bundled/v3/components/OrProgress/OrProgress.js +8 -7
  383. package/dist/bundled/v3/components/OrProgress/index.js +7 -6
  384. package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +10 -9
  385. package/dist/bundled/v3/components/OrProgressV3/index.js +9 -8
  386. package/dist/bundled/v3/components/OrRadio/OrRadio.js +10 -9
  387. package/dist/bundled/v3/components/OrRadio/index.js +9 -8
  388. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +4 -4
  389. package/dist/bundled/v3/components/OrRadioGroupV3/index.js +3 -3
  390. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +286 -0
  391. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +220 -0
  392. package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +2 -0
  393. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +89 -0
  394. package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +4 -0
  395. package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +7 -0
  396. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +6 -0
  397. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +38 -0
  398. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
  399. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +46 -0
  400. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
  401. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +184 -0
  402. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
  403. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +5 -0
  404. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
  405. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
  406. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
  407. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
  408. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
  409. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +6 -0
  410. package/dist/bundled/v3/components/OrSearch/OrSearch.js +15 -14
  411. package/dist/bundled/v3/components/OrSearch/index.js +14 -13
  412. package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +11 -11
  413. package/dist/bundled/v3/components/OrSearchV3/index.js +10 -10
  414. package/dist/bundled/v3/components/OrSelect/OrSelect.js +17 -16
  415. package/dist/bundled/v3/components/OrSelect/index.js +16 -15
  416. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +13 -13
  417. package/dist/bundled/v3/components/OrSelectV3/index.js +12 -12
  418. package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +4 -4
  419. package/dist/bundled/v3/components/OrSidebar/index.js +3 -3
  420. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +9 -9
  421. package/dist/bundled/v3/components/OrSidebarV3/index.js +8 -8
  422. package/dist/bundled/v3/components/OrSkeleton/index.js +7 -6
  423. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.js +8 -7
  424. package/dist/bundled/v3/components/OrSkeletonText/index.js +7 -6
  425. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.js +8 -7
  426. package/dist/bundled/v3/components/OrSkeletonTextV3/index.js +7 -6
  427. package/dist/bundled/v3/components/OrSkeletonV3/index.js +7 -6
  428. package/dist/bundled/v3/components/OrSlider/OrSlider.js +12 -11
  429. package/dist/bundled/v3/components/OrSlider/index.js +11 -10
  430. package/dist/bundled/v3/components/OrStepper/OrStepper.js +11 -10
  431. package/dist/bundled/v3/components/OrStepper/index.js +10 -9
  432. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +5 -5
  433. package/dist/bundled/v3/components/OrSwitchV3/index.js +4 -4
  434. package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +8 -8
  435. package/dist/bundled/v3/components/OrTabsV3/index.js +7 -7
  436. package/dist/bundled/v3/components/OrTag/OrTag.js +10 -9
  437. package/dist/bundled/v3/components/OrTag/index.js +9 -8
  438. package/dist/bundled/v3/components/OrTagV3/OrTag.js +9 -9
  439. package/dist/bundled/v3/components/OrTagV3/index.js +8 -8
  440. package/dist/bundled/v3/components/OrTagsV3/OrTags.js +12 -12
  441. package/dist/bundled/v3/components/OrTagsV3/index.js +11 -11
  442. package/dist/bundled/v3/components/OrTextarea/OrTextarea.js +9 -8
  443. package/dist/bundled/v3/components/OrTextarea/index.js +8 -7
  444. package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +13 -12
  445. package/dist/bundled/v3/components/OrTextbox/index.js +12 -11
  446. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +13 -13
  447. package/dist/bundled/v3/components/OrTimePickerV3/index.js +12 -12
  448. package/dist/bundled/v3/components/OrToast/OrToast.js +14 -13
  449. package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
  450. package/dist/bundled/v3/components/OrToast/composable/index.js +2 -2
  451. package/dist/bundled/v3/components/OrToast/composable/useToast.js +2 -2
  452. package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
  453. package/dist/bundled/v3/components/OrToast/index.js +17 -16
  454. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +18 -17
  455. package/dist/bundled/v3/components/OrToastContainer/index.js +17 -16
  456. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +10 -10
  457. package/dist/bundled/v3/components/OrToastContainerV3/index.js +9 -9
  458. package/dist/bundled/v3/components/OrToastV3/OrToast.js +8 -8
  459. package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
  460. package/dist/bundled/v3/components/OrToastV3/composable/index.js +2 -2
  461. package/dist/bundled/v3/components/OrToastV3/composable/useToast.js +2 -2
  462. package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
  463. package/dist/bundled/v3/components/OrToastV3/index.js +9 -9
  464. package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +9 -8
  465. package/dist/bundled/v3/components/OrTooltip/index.js +8 -7
  466. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +7 -7
  467. package/dist/bundled/v3/components/OrTooltipV3/index.js +6 -6
  468. package/dist/bundled/v3/components/index.d.ts +1 -0
  469. package/dist/bundled/v3/components/index.js +107 -91
  470. package/dist/bundled/{v2/dom-700444b4.js → v3/dom-c98dce89.js} +2 -2
  471. package/dist/bundled/v3/{eq-95cd2573.js → eq-037e6fce.js} +1 -1
  472. package/dist/bundled/{v2/get-ab1b7d93.js → v3/get-b30afe93.js} +3 -3
  473. package/dist/bundled/v3/hooks/index.d.ts +1 -0
  474. package/dist/bundled/v3/hooks/index.js +6 -2
  475. package/dist/bundled/v3/hooks/useOverflow.d.ts +2 -2
  476. package/dist/bundled/v3/hooks/useOverflow.js +2 -2
  477. package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
  478. package/dist/bundled/v3/hooks/useResponsive/index.js +2 -2
  479. package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +2 -2
  480. package/dist/bundled/v3/hooks/useTheme.d.ts +2 -0
  481. package/dist/bundled/v3/hooks/useTheme.js +10125 -0
  482. package/dist/bundled/v3/{index-cf2c3c27.js → index-0d224ae5.js} +3 -115
  483. package/dist/bundled/v3/{index-5e8e7a46.js → index-40b35d94.js} +1 -1
  484. package/dist/bundled/v3/{index-51eb57bd.js → index-749f3444.js} +1 -1
  485. package/dist/bundled/v3/index-80a3a4f4.js +9714 -0
  486. package/dist/bundled/v3/index-85c2efe8.js +7122 -0
  487. package/dist/bundled/v3/{index-02705c13.js → index-ae815a7e.js} +2 -2
  488. package/dist/bundled/v3/index-d92d0b48.js +3805 -0
  489. package/dist/bundled/v3/{lang-0fb8f78b.js → index-e9f6b2d8.js} +73 -4009
  490. package/dist/bundled/v3/index.es-3f39f316.js +115 -0
  491. package/dist/bundled/v3/index.js +113 -94
  492. package/dist/bundled/v3/{isArrayLike-e46b8eac.js → isArrayLike-61275a05.js} +1 -1
  493. package/dist/bundled/v3/{isEqual-44382965.js → isEqual-8bbb1110.js} +1 -1
  494. package/dist/bundled/{v2/isObject-fe8b81fd.js → v3/isObject-08fab135.js} +1 -1
  495. package/dist/bundled/v3/markdown-c78b4891.js +17977 -0
  496. package/dist/bundled/{v2/range-6f26eda4.js → v3/range-637f1361.js} +4 -4
  497. package/dist/bundled/{v2/round-f34440f4.js → v3/round-4a894f03.js} +4 -4
  498. package/dist/bundled/{v2/toFinite-74227610.js → v3/toFinite-675db18a.js} +1 -1
  499. package/dist/bundled/v3/{toInteger-2fd112a9.js → toInteger-27595771.js} +1 -1
  500. package/dist/bundled/{v2/toString-f3196832.js → v3/toString-a72d5149.js} +1 -1
  501. package/dist/bundled/v3/useFocusTrap-a61a80ac.js +1349 -0
  502. package/dist/bundled/v3/utils/functions/dom.js +6 -5
  503. package/dist/esm/v2/{OrBottomSheet-0592ccb2.js → OrBottomSheet-4244ab1c.js} +3 -1
  504. package/dist/esm/v2/{OrCardCollection-2b9bc050.js → OrCardCollection-20e66b6e.js} +4 -4
  505. package/dist/esm/v2/{OrCheckbox-3a8c93ad.js → OrCheckbox-41f2822d.js} +2 -0
  506. package/dist/esm/v2/{OrCheckboxGroup-b0d95dd6.js → OrCheckboxGroup-97cfcbda.js} +1 -1
  507. package/dist/esm/v2/{OrCheckboxTree-54b0fdc1.js → OrCheckboxTree-a7dc126c.js} +1 -1
  508. package/dist/esm/v2/{OrConfirm-3f19c23b.js → OrConfirm-65cc835a.js} +4 -2
  509. package/dist/esm/v2/{OrDatePicker-e991e7b2.js → OrDatePicker-9fb8810c.js} +3 -3
  510. package/dist/esm/v2/{OrDateTimePicker-7bbd81d1.js → OrDateTimePicker-4032b280.js} +3 -3
  511. package/dist/esm/v2/{OrDateTimePickerMonthSelect-d75a849c.js → OrDateTimePickerMonthSelect-a50f9f56.js} +3 -3
  512. package/dist/esm/v2/{OrIconButton-75972865.js → OrIconButton-24be052f.js} +2 -2
  513. package/dist/esm/v2/{OrInlineInput-cf17dbb2.js → OrInlineInput-dd95fc1b.js} +3 -1
  514. package/dist/esm/v2/{OrInlineTextarea-2b0e2f39.js → OrInlineTextarea-194515fa.js} +3 -1
  515. package/dist/esm/v2/{OrInput-1a2b8ad9.js → OrInput-bfbb6522.js} +3 -1
  516. package/dist/esm/v2/{OrMenu-a35caf3b.js → OrMenu-a376f4a7.js} +3 -1
  517. package/dist/esm/v2/{OrModal-4aaae6bc.js → OrModal-e6acc87a.js} +4 -2
  518. package/dist/esm/v2/{OrNotification-a773f1df.js → OrNotification-650aab04.js} +1 -1
  519. package/dist/esm/v2/{OrOverlay-f791976c.js → OrOverlay-948346df.js} +2 -0
  520. package/dist/esm/v2/{OrPagination-3513165d.js → OrPagination-7be2401b.js} +4 -2
  521. package/dist/esm/v2/{OrPassword-1de0dc6c.js → OrPassword-681f8c53.js} +2 -0
  522. package/dist/esm/v2/{OrPopover-a8950b85.js → OrPopover-fff4a3a4.js} +3 -1
  523. package/dist/esm/v2/{OrProgress-102e3b5d.js → OrProgress-e079e857.js} +2 -0
  524. package/dist/esm/v2/{OrRadio-a812088f.js → OrRadio-23810acd.js} +2 -0
  525. package/dist/esm/v2/{OrRadioGroup-0de37d76.js → OrRadioGroup-0e1bf22c.js} +1 -1
  526. package/dist/esm/v2/OrRichTextEditor-c13801ba.js +919 -0
  527. package/dist/esm/v2/{OrSearch-19c157b3.js → OrSearch-9027a8e2.js} +1 -1
  528. package/dist/esm/v2/{OrSelect-991b8be3.js → OrSelect-b7e9eaa7.js} +6 -4
  529. package/dist/esm/v2/{OrSidebar-bfbb8b0a.js → OrSidebar-466d8244.js} +1 -1
  530. package/dist/esm/v2/{OrSidebarCollapseButton-a98037d6.js → OrSidebarCollapseButton-3009ed8e.js} +1 -1
  531. package/dist/esm/v2/{OrSwitch-9fae0bae.js → OrSwitch-cb97f4d3.js} +2 -0
  532. package/dist/esm/v2/{OrTabs-abf290af.js → OrTabs-cce59ff2.js} +2 -2
  533. package/dist/esm/v2/{OrTag-aa46cecd.js → OrTag-6a60ef87.js} +1 -1
  534. package/dist/esm/v2/{OrTags-2a567e79.js → OrTags-e4d6bf08.js} +4 -2
  535. package/dist/esm/v2/{OrTextarea-e5c66426.js → OrTextarea-01df0715.js} +2 -0
  536. package/dist/esm/v2/{OrTextbox-c85d7fe6.js → OrTextbox-a937432f.js} +2 -0
  537. package/dist/esm/v2/{OrTimePicker-766637cb.js → OrTimePicker-7cbcc2c0.js} +2 -2
  538. package/dist/esm/v2/{OrTooltip-0dc63c1a.js → OrTooltip-ab6c05c5.js} +3 -1
  539. package/dist/esm/v2/codemirrorView-be2c7423.js +353 -0
  540. package/dist/esm/v2/components/index.d.ts +1 -0
  541. package/dist/esm/v2/components/index.js +62 -36
  542. package/dist/esm/v2/components/or-bottom-sheet-v3/index.js +4 -2
  543. package/dist/esm/v2/components/or-card-collection-v3/index.js +11 -9
  544. package/dist/esm/v2/components/or-checkbox-group-v3/index.js +5 -3
  545. package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +4 -2
  546. package/dist/esm/v2/components/or-checkbox-v3/index.js +3 -1
  547. package/dist/esm/v2/components/or-confirm-v3/index.js +9 -7
  548. package/dist/esm/v2/components/or-date-picker-v3/index.js +10 -8
  549. package/dist/esm/v2/components/or-date-time-picker-v3/index.js +10 -8
  550. package/dist/esm/v2/components/or-icon-button-v3/index.js +7 -5
  551. package/dist/esm/v2/components/or-inline-input-v3/index.js +8 -6
  552. package/dist/esm/v2/components/or-inline-textarea-v3/index.js +8 -6
  553. package/dist/esm/v2/components/or-input-v3/index.js +8 -6
  554. package/dist/esm/v2/components/or-menu-v3/index.js +6 -4
  555. package/dist/esm/v2/components/or-modal-v3/index.js +8 -6
  556. package/dist/esm/v2/components/or-notification-v3/index.js +8 -6
  557. package/dist/esm/v2/components/or-overlay-v3/index.js +3 -1
  558. package/dist/esm/v2/components/or-pagination-v3/index.js +7 -5
  559. package/dist/esm/v2/components/or-password/index.js +3 -1
  560. package/dist/esm/v2/components/or-popover-v3/index.js +5 -3
  561. package/dist/esm/v2/components/or-progress-v3/index.js +3 -1
  562. package/dist/esm/v2/components/or-radio-group-v3/index.js +4 -2
  563. package/dist/esm/v2/components/or-radio-v3/index.js +3 -1
  564. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +220 -0
  565. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +2 -0
  566. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +62 -0
  567. package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +4 -0
  568. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  569. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
  570. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
  571. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
  572. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +7 -0
  573. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
  574. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
  575. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
  576. package/dist/esm/v2/components/or-search-v3/index.js +9 -7
  577. package/dist/esm/v2/components/or-select-v3/index.js +11 -9
  578. package/dist/esm/v2/components/or-sidebar-v3/index.js +9 -7
  579. package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +8 -6
  580. package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +8 -6
  581. package/dist/esm/v2/components/or-switch-v3/index.js +3 -1
  582. package/dist/esm/v2/components/or-tabs-v3/index.js +7 -5
  583. package/dist/esm/v2/components/or-tag-v3/index.js +8 -6
  584. package/dist/esm/v2/components/or-tags-v3/index.js +9 -7
  585. package/dist/esm/v2/components/or-textarea-v3/index.js +3 -1
  586. package/dist/esm/v2/components/or-textbox/index.js +3 -1
  587. package/dist/esm/v2/components/or-time-picker-v3/index.js +8 -6
  588. package/dist/esm/v2/components/or-toast-v3/index.js +8 -6
  589. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +8 -6
  590. package/dist/esm/v2/components/or-tooltip-v3/index.js +6 -4
  591. package/dist/esm/v2/hooks/index.d.ts +1 -0
  592. package/dist/esm/v2/hooks/index.js +3 -0
  593. package/dist/esm/v2/hooks/useOverflow.d.ts +2 -2
  594. package/dist/esm/v2/hooks/useTheme.d.ts +2 -0
  595. package/dist/esm/v2/index.js +63 -36
  596. package/dist/esm/v2/{types-f30860ee.js → types-08ab4707.js} +3 -1
  597. package/dist/esm/v2/useTheme-e23d13c8.js +9 -0
  598. package/dist/esm/v3/{OrBottomSheet-a39fb331.js → OrBottomSheet-e9463e4d.js} +3 -1
  599. package/dist/esm/v3/{OrCardCollection-3d652a34.js → OrCardCollection-dbe7dac6.js} +4 -4
  600. package/dist/esm/v3/{OrCheckbox-7093e9c2.js → OrCheckbox-2194e473.js} +2 -0
  601. package/dist/esm/v3/{OrCheckboxGroup-f755d216.js → OrCheckboxGroup-6c36527f.js} +1 -1
  602. package/dist/esm/v3/{OrCheckboxTree-99f6eaec.js → OrCheckboxTree-1873a941.js} +1 -1
  603. package/dist/esm/v3/{OrConfirm-cb0b2b78.js → OrConfirm-104754d0.js} +4 -2
  604. package/dist/esm/v3/{OrDatePicker-6a44ad41.js → OrDatePicker-c12fab59.js} +3 -3
  605. package/dist/esm/v3/{OrDateTimePicker-2cbcf8c7.js → OrDateTimePicker-ad360ebc.js} +3 -3
  606. package/dist/esm/v3/{OrDateTimePickerMonthSelect-2f61d92f.js → OrDateTimePickerMonthSelect-16e3f5b9.js} +3 -3
  607. package/dist/esm/v3/{OrIconButton-e34a20eb.js → OrIconButton-c6d15a51.js} +2 -2
  608. package/dist/esm/v3/{OrInlineInput-ad0d4264.js → OrInlineInput-48e936d2.js} +3 -1
  609. package/dist/esm/v3/{OrInlineTextarea-b5ec488d.js → OrInlineTextarea-3937421c.js} +3 -1
  610. package/dist/esm/v3/{OrInput-a9aeef6e.js → OrInput-14b88801.js} +3 -1
  611. package/dist/esm/v3/{OrMenu-f590d761.js → OrMenu-b90e6784.js} +3 -1
  612. package/dist/esm/v3/{OrModal-9dc09e95.js → OrModal-231fb401.js} +4 -2
  613. package/dist/esm/v3/{OrNotification-69031471.js → OrNotification-dde92a43.js} +1 -1
  614. package/dist/esm/v3/{OrOverlay-28952099.js → OrOverlay-489fdf76.js} +2 -0
  615. package/dist/esm/v3/{OrPagination-f3be120f.js → OrPagination-22356f86.js} +4 -2
  616. package/dist/esm/v3/{OrPassword-9192b9ea.js → OrPassword-cd8a3c46.js} +2 -0
  617. package/dist/esm/v3/{OrPopover-ebd57053.js → OrPopover-8ea2062a.js} +3 -1
  618. package/dist/esm/v3/{OrProgress-efa51d7b.js → OrProgress-a54a42c0.js} +2 -0
  619. package/dist/esm/v3/{OrRadio-a6c88f29.js → OrRadio-4f0026c9.js} +2 -0
  620. package/dist/esm/v3/{OrRadioGroup-5d1fe6fd.js → OrRadioGroup-d215409c.js} +1 -1
  621. package/dist/esm/v3/OrRichTextEditor-b7f30172.js +852 -0
  622. package/dist/esm/v3/{OrSearch-5576cf14.js → OrSearch-7bf5009e.js} +1 -1
  623. package/dist/esm/v3/{OrSelect-0b3ebce9.js → OrSelect-b7d87ded.js} +6 -4
  624. package/dist/esm/v3/{OrSidebar-303ef558.js → OrSidebar-84533704.js} +1 -1
  625. package/dist/esm/v3/{OrSidebarCollapseButton-d7f004df.js → OrSidebarCollapseButton-88a165e8.js} +1 -1
  626. package/dist/esm/v3/{OrSwitch-594f5a63.js → OrSwitch-ed9868db.js} +2 -0
  627. package/dist/esm/v3/{OrTabs-b6c8077c.js → OrTabs-ffb69679.js} +2 -2
  628. package/dist/esm/v3/{OrTag-4ac45254.js → OrTag-51d8f47d.js} +1 -1
  629. package/dist/esm/v3/{OrTags-de9f065e.js → OrTags-3ae4a908.js} +4 -2
  630. package/dist/esm/v3/{OrTextarea-93cf7da7.js → OrTextarea-0f9a2a27.js} +2 -0
  631. package/dist/esm/v3/{OrTextbox-56714f51.js → OrTextbox-8d2903db.js} +2 -0
  632. package/dist/esm/v3/{OrTimePicker-0fe72767.js → OrTimePicker-16a88b67.js} +2 -2
  633. package/dist/esm/v3/{OrTooltip-edb28095.js → OrTooltip-9a63f445.js} +3 -1
  634. package/dist/esm/v3/codemirrorView-be2c7423.js +353 -0
  635. package/dist/esm/v3/components/index.d.ts +1 -0
  636. package/dist/esm/v3/components/index.js +62 -36
  637. package/dist/esm/v3/components/or-bottom-sheet-v3/index.js +4 -2
  638. package/dist/esm/v3/components/or-card-collection-v3/index.js +11 -9
  639. package/dist/esm/v3/components/or-checkbox-group-v3/index.js +5 -3
  640. package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +4 -2
  641. package/dist/esm/v3/components/or-checkbox-v3/index.js +3 -1
  642. package/dist/esm/v3/components/or-confirm-v3/index.js +9 -7
  643. package/dist/esm/v3/components/or-date-picker-v3/index.js +10 -8
  644. package/dist/esm/v3/components/or-date-time-picker-v3/index.js +10 -8
  645. package/dist/esm/v3/components/or-icon-button-v3/index.js +7 -5
  646. package/dist/esm/v3/components/or-inline-input-v3/index.js +8 -6
  647. package/dist/esm/v3/components/or-inline-textarea-v3/index.js +8 -6
  648. package/dist/esm/v3/components/or-input-v3/index.js +8 -6
  649. package/dist/esm/v3/components/or-menu-v3/index.js +6 -4
  650. package/dist/esm/v3/components/or-modal-v3/index.js +8 -6
  651. package/dist/esm/v3/components/or-notification-v3/index.js +8 -6
  652. package/dist/esm/v3/components/or-overlay-v3/index.js +3 -1
  653. package/dist/esm/v3/components/or-pagination-v3/index.js +7 -5
  654. package/dist/esm/v3/components/or-password/index.js +3 -1
  655. package/dist/esm/v3/components/or-popover-v3/index.js +5 -3
  656. package/dist/esm/v3/components/or-progress-v3/index.js +3 -1
  657. package/dist/esm/v3/components/or-radio-group-v3/index.js +4 -2
  658. package/dist/esm/v3/components/or-radio-v3/index.js +3 -1
  659. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +220 -0
  660. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +2 -0
  661. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +60 -0
  662. package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +4 -0
  663. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  664. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
  665. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
  666. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
  667. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +7 -0
  668. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
  669. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
  670. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
  671. package/dist/esm/v3/components/or-search-v3/index.js +9 -7
  672. package/dist/esm/v3/components/or-select-v3/index.js +11 -9
  673. package/dist/esm/v3/components/or-sidebar-v3/index.js +9 -7
  674. package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +8 -6
  675. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +8 -6
  676. package/dist/esm/v3/components/or-switch-v3/index.js +3 -1
  677. package/dist/esm/v3/components/or-tabs-v3/index.js +7 -5
  678. package/dist/esm/v3/components/or-tag-v3/index.js +8 -6
  679. package/dist/esm/v3/components/or-tags-v3/index.js +9 -7
  680. package/dist/esm/v3/components/or-textarea-v3/index.js +3 -1
  681. package/dist/esm/v3/components/or-textbox/index.js +3 -1
  682. package/dist/esm/v3/components/or-time-picker-v3/index.js +8 -6
  683. package/dist/esm/v3/components/or-toast-v3/index.js +8 -6
  684. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +8 -6
  685. package/dist/esm/v3/components/or-tooltip-v3/index.js +6 -4
  686. package/dist/esm/v3/hooks/index.d.ts +1 -0
  687. package/dist/esm/v3/hooks/index.js +3 -0
  688. package/dist/esm/v3/hooks/useOverflow.d.ts +2 -2
  689. package/dist/esm/v3/hooks/useTheme.d.ts +2 -0
  690. package/dist/esm/v3/index.js +63 -36
  691. package/dist/esm/v3/{types-60f3dd35.js → types-03758078.js} +3 -1
  692. package/dist/esm/v3/useTheme-e23d13c8.js +9 -0
  693. package/package.json +26 -4
  694. package/src/components/index.ts +1 -0
  695. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +761 -0
  696. package/src/components/or-rich-text-editor-v3/index.ts +2 -0
  697. package/src/components/or-rich-text-editor-v3/props.ts +4 -0
  698. package/src/components/or-rich-text-editor-v3/styles.ts +53 -0
  699. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +40 -0
  700. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +254 -0
  701. package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +1 -0
  702. package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +213 -0
  703. package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +22 -0
  704. package/src/components/or-rich-text-editor-v3/utils/markdown.ts +120 -0
  705. package/src/hooks/index.ts +1 -0
  706. package/src/hooks/useElevation.ts +1 -4
  707. package/src/hooks/useOverflow.ts +3 -5
  708. package/src/hooks/useTheme.ts +7 -0
  709. package/src/shims-mdx.d.ts +4 -0
  710. package/src/shims-png.d.ts +2 -2
  711. package/src/shims-vue.d.ts +3 -2
  712. package/src/shims.d.ts +11 -2
  713. /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-769685bc.js → OrDateTimePickerMonthSelect-eb2c5c01.js} +0 -0
  714. /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-bc0df38f.js → OrDateTimePickerPopoverHeader-257ef8d8.js} +0 -0
  715. /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-e284797b.js → OrDateTimePickerTimeSelect-37dcd0a3.js} +0 -0
@@ -0,0 +1,2201 @@
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch, nextTick } from 'vue-demi';
2
+ import { u as useFocusTrap } from '../../useFocusTrap-c1384da1.js';
3
+ import { f as useResizeObserver, o as onClickOutside } from '../../index-af414338.js';
4
+ import { B as Blockquote, a as Bold, b as BulletList, C as CodeBlock, H as HardBreak, I as Italic, L as ListItem, O as OrderedList, P as Paragraph, S as Strike, s as serialize, d as deserialize, U as Underline, c as Link, e as Highlight } from '../../markdown-c78b4891.js';
5
+ import { EditorContainer, ToolbarContainer, Toolbar, ToolbarButtonFocused, ToolbarButton, EditorInput } from './styles.js';
6
+ import { Formats } from './props.js';
7
+ import { M as Mark, m as mergeAttributes, a as markInputRule, b as markPasteRule, N as Node, E as Extension, k as keydownHandler, D as DecorationSet, c as Decoration, d as callOrReturn, g as getExtensionField, t as textblockTypeInputRule, n as nodeInputRule, e as Editor } from '../../index-80a3a4f4.js';
8
+ import { P as Plugin, d as dropPoint, S as Selection, N as NodeSelection, F as Fragment, a as Slice, T as TextSelection, b as PluginKey, M as Mapping } from '../../index-85c2efe8.js';
9
+ import codemirrorNode from './utils/codemirror/codemirrorNode.js';
10
+ import __vue_component__$1 from '../OrIconButtonV3/OrIconButton.js';
11
+ import __vue_component__$2 from '../OrLabelV3/OrLabel.js';
12
+ import __vue_component__$3 from '../OrMenuItemV3/OrMenuItem.js';
13
+ import __vue_component__$4 from '../OrMenuV3/OrMenu.js';
14
+ import __vue_component__$5 from '../OrModalV3/OrModal.js';
15
+ import __vue_component__$6 from '../OrInputV3/OrInput.js';
16
+ import __vue_component__$7 from '../OrButtonV3/OrButton.js';
17
+ import { s as styleInject } from '../../style-inject.es-4c6f2515.js';
18
+ import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
19
+ import '../../index-06f6bbe4.js';
20
+ import '../../_commonjsHelpers-6584e42b.js';
21
+ import 'node:punycode';
22
+ import '../../index.es-3f39f316.js';
23
+ import './utils/codemirror/codemirrorView.js';
24
+ import '../../index-0d224ae5.js';
25
+ import './utils/codemirror/theme.js';
26
+ import '../../index-d92d0b48.js';
27
+ import '../../index-e9f6b2d8.js';
28
+ import '../OrIconButtonV3/props.js';
29
+ import '../OrIconV3/props.js';
30
+ import '../OrIconButtonV3/styles.js';
31
+ import '../OrIconV3/OrIcon.js';
32
+ import '../OrIconV3/styles.js';
33
+ import '../OrTooltipV3/OrTooltip.js';
34
+ import '../OrTooltipV3/styles.js';
35
+ import '../OrPopoverV3/OrPopover.js';
36
+ import '../../floating-ui.dom.esm-83eba816.js';
37
+ import '../OrPopoverV3/props.js';
38
+ import '../OrPopoverV3/styles.js';
39
+ import '../OrBottomSheetV3/OrBottomSheet.js';
40
+ import '../OrBottomSheetV3/props.js';
41
+ import '../OrBottomSheetV3/styles.js';
42
+ import '../OrOverlayV3/OrOverlay.js';
43
+ import '../OrOverlayV3/styles.js';
44
+ import '../OrTeleportV3/OrTeleport.js';
45
+ import 'vue';
46
+ import '../../hooks/useElevation.js';
47
+ import '../../utils/isVisible.js';
48
+ import '../../hooks/usePopoverState.js';
49
+ import '../../hooks/useResponsive/useResponsive.js';
50
+ import '../OrLabelV3/props.js';
51
+ import '../OrLabelV3/styles.js';
52
+ import '../OrMenuItemV3/styles.js';
53
+ import '../OrMenuV3/styles.js';
54
+ import '../OrModalV3/props.js';
55
+ import '../OrModalV3/styles.js';
56
+ import '../OrInputV3/props.js';
57
+ import '../OrInputBoxV3/props.js';
58
+ import '../OrInputV3/styles.js';
59
+ import '../OrErrorV3/OrError.js';
60
+ import '../OrErrorV3/styles.js';
61
+ import '../OrHintV3/OrHint.js';
62
+ import '../OrHintV3/styles.js';
63
+ import '../OrInputBoxV3/OrInputBox.js';
64
+ import '../OrInputBoxV3/styles.js';
65
+ import '../OrLoaderV3/OrLoader.js';
66
+ import '../OrLoaderV3/props.js';
67
+ import '../OrLoaderV3/styles.js';
68
+ import '../../hooks/useIdAttribute.js';
69
+ import '../../hooks/useControlAttributes.js';
70
+ import '../../hooks/useValidationAttributes.js';
71
+ import '../OrButtonV3/props.js';
72
+ import '../OrButtonV3/styles.js';
73
+
74
+ const inputRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;
75
+ const pasteRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/g;
76
+ const Code = Mark.create({
77
+ name: 'code',
78
+ addOptions() {
79
+ return {
80
+ HTMLAttributes: {}
81
+ };
82
+ },
83
+ excludes: '_',
84
+ code: true,
85
+ exitable: true,
86
+ parseHTML() {
87
+ return [{
88
+ tag: 'code'
89
+ }];
90
+ },
91
+ renderHTML(_ref) {
92
+ let {
93
+ HTMLAttributes
94
+ } = _ref;
95
+ return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
96
+ },
97
+ addCommands() {
98
+ return {
99
+ setCode: () => _ref2 => {
100
+ let {
101
+ commands
102
+ } = _ref2;
103
+ return commands.setMark(this.name);
104
+ },
105
+ toggleCode: () => _ref3 => {
106
+ let {
107
+ commands
108
+ } = _ref3;
109
+ return commands.toggleMark(this.name);
110
+ },
111
+ unsetCode: () => _ref4 => {
112
+ let {
113
+ commands
114
+ } = _ref4;
115
+ return commands.unsetMark(this.name);
116
+ }
117
+ };
118
+ },
119
+ addKeyboardShortcuts() {
120
+ return {
121
+ 'Mod-e': () => this.editor.commands.toggleCode()
122
+ };
123
+ },
124
+ addInputRules() {
125
+ return [markInputRule({
126
+ find: inputRegex,
127
+ type: this.type
128
+ })];
129
+ },
130
+ addPasteRules() {
131
+ return [markPasteRule({
132
+ find: pasteRegex,
133
+ type: this.type
134
+ })];
135
+ }
136
+ });
137
+
138
+ const Document = Node.create({
139
+ name: 'doc',
140
+ topNode: true,
141
+ content: 'block+'
142
+ });
143
+
144
+ /**
145
+ Create a plugin that, when added to a ProseMirror instance,
146
+ causes a decoration to show up at the drop position when something
147
+ is dragged over the editor.
148
+
149
+ Nodes may add a `disableDropCursor` property to their spec to
150
+ control the showing of a drop cursor inside them. This may be a
151
+ boolean or a function, which will be called with a view and a
152
+ position, and should return a boolean.
153
+ */
154
+ function dropCursor() {
155
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
156
+ return new Plugin({
157
+ view(editorView) {
158
+ return new DropCursorView(editorView, options);
159
+ }
160
+ });
161
+ }
162
+ class DropCursorView {
163
+ constructor(editorView, options) {
164
+ var _a;
165
+ this.editorView = editorView;
166
+ this.cursorPos = null;
167
+ this.element = null;
168
+ this.timeout = -1;
169
+ this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;
170
+ this.color = options.color === false ? undefined : options.color || "black";
171
+ this.class = options.class;
172
+ this.handlers = ["dragover", "dragend", "drop", "dragleave"].map(name => {
173
+ let handler = e => {
174
+ this[name](e);
175
+ };
176
+ editorView.dom.addEventListener(name, handler);
177
+ return {
178
+ name,
179
+ handler
180
+ };
181
+ });
182
+ }
183
+ destroy() {
184
+ this.handlers.forEach(_ref => {
185
+ let {
186
+ name,
187
+ handler
188
+ } = _ref;
189
+ return this.editorView.dom.removeEventListener(name, handler);
190
+ });
191
+ }
192
+ update(editorView, prevState) {
193
+ if (this.cursorPos != null && prevState.doc != editorView.state.doc) {
194
+ if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);else this.updateOverlay();
195
+ }
196
+ }
197
+ setCursor(pos) {
198
+ if (pos == this.cursorPos) return;
199
+ this.cursorPos = pos;
200
+ if (pos == null) {
201
+ this.element.parentNode.removeChild(this.element);
202
+ this.element = null;
203
+ } else {
204
+ this.updateOverlay();
205
+ }
206
+ }
207
+ updateOverlay() {
208
+ let $pos = this.editorView.state.doc.resolve(this.cursorPos);
209
+ let isBlock = !$pos.parent.inlineContent,
210
+ rect;
211
+ if (isBlock) {
212
+ let before = $pos.nodeBefore,
213
+ after = $pos.nodeAfter;
214
+ if (before || after) {
215
+ let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0));
216
+ if (node) {
217
+ let nodeRect = node.getBoundingClientRect();
218
+ let top = before ? nodeRect.bottom : nodeRect.top;
219
+ if (before && after) top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;
220
+ rect = {
221
+ left: nodeRect.left,
222
+ right: nodeRect.right,
223
+ top: top - this.width / 2,
224
+ bottom: top + this.width / 2
225
+ };
226
+ }
227
+ }
228
+ }
229
+ if (!rect) {
230
+ let coords = this.editorView.coordsAtPos(this.cursorPos);
231
+ rect = {
232
+ left: coords.left - this.width / 2,
233
+ right: coords.left + this.width / 2,
234
+ top: coords.top,
235
+ bottom: coords.bottom
236
+ };
237
+ }
238
+ let parent = this.editorView.dom.offsetParent;
239
+ if (!this.element) {
240
+ this.element = parent.appendChild(document.createElement("div"));
241
+ if (this.class) this.element.className = this.class;
242
+ this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;";
243
+ if (this.color) {
244
+ this.element.style.backgroundColor = this.color;
245
+ }
246
+ }
247
+ this.element.classList.toggle("prosemirror-dropcursor-block", isBlock);
248
+ this.element.classList.toggle("prosemirror-dropcursor-inline", !isBlock);
249
+ let parentLeft, parentTop;
250
+ if (!parent || parent == document.body && getComputedStyle(parent).position == "static") {
251
+ parentLeft = -pageXOffset;
252
+ parentTop = -pageYOffset;
253
+ } else {
254
+ let rect = parent.getBoundingClientRect();
255
+ parentLeft = rect.left - parent.scrollLeft;
256
+ parentTop = rect.top - parent.scrollTop;
257
+ }
258
+ this.element.style.left = rect.left - parentLeft + "px";
259
+ this.element.style.top = rect.top - parentTop + "px";
260
+ this.element.style.width = rect.right - rect.left + "px";
261
+ this.element.style.height = rect.bottom - rect.top + "px";
262
+ }
263
+ scheduleRemoval(timeout) {
264
+ clearTimeout(this.timeout);
265
+ this.timeout = setTimeout(() => this.setCursor(null), timeout);
266
+ }
267
+ dragover(event) {
268
+ if (!this.editorView.editable) return;
269
+ let pos = this.editorView.posAtCoords({
270
+ left: event.clientX,
271
+ top: event.clientY
272
+ });
273
+ let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);
274
+ let disableDropCursor = node && node.type.spec.disableDropCursor;
275
+ let disabled = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor;
276
+ if (pos && !disabled) {
277
+ let target = pos.pos;
278
+ if (this.editorView.dragging && this.editorView.dragging.slice) {
279
+ let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);
280
+ if (point != null) target = point;
281
+ }
282
+ this.setCursor(target);
283
+ this.scheduleRemoval(5000);
284
+ }
285
+ }
286
+ dragend() {
287
+ this.scheduleRemoval(20);
288
+ }
289
+ drop() {
290
+ this.scheduleRemoval(20);
291
+ }
292
+ dragleave(event) {
293
+ if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget)) this.setCursor(null);
294
+ }
295
+ }
296
+
297
+ const Dropcursor = Extension.create({
298
+ name: 'dropCursor',
299
+ addOptions() {
300
+ return {
301
+ color: 'currentColor',
302
+ width: 1,
303
+ class: undefined
304
+ };
305
+ },
306
+ addProseMirrorPlugins() {
307
+ return [dropCursor(this.options)];
308
+ }
309
+ });
310
+
311
+ /**
312
+ Gap cursor selections are represented using this class. Its
313
+ `$anchor` and `$head` properties both point at the cursor position.
314
+ */
315
+ class GapCursor extends Selection {
316
+ /**
317
+ Create a gap cursor.
318
+ */
319
+ constructor($pos) {
320
+ super($pos, $pos);
321
+ }
322
+ map(doc, mapping) {
323
+ let $pos = doc.resolve(mapping.map(this.head));
324
+ return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);
325
+ }
326
+ content() {
327
+ return Slice.empty;
328
+ }
329
+ eq(other) {
330
+ return other instanceof GapCursor && other.head == this.head;
331
+ }
332
+ toJSON() {
333
+ return {
334
+ type: "gapcursor",
335
+ pos: this.head
336
+ };
337
+ }
338
+ /**
339
+ @internal
340
+ */
341
+ static fromJSON(doc, json) {
342
+ if (typeof json.pos != "number") throw new RangeError("Invalid input for GapCursor.fromJSON");
343
+ return new GapCursor(doc.resolve(json.pos));
344
+ }
345
+ /**
346
+ @internal
347
+ */
348
+ getBookmark() {
349
+ return new GapBookmark(this.anchor);
350
+ }
351
+ /**
352
+ @internal
353
+ */
354
+ static valid($pos) {
355
+ let parent = $pos.parent;
356
+ if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) return false;
357
+ let override = parent.type.spec.allowGapCursor;
358
+ if (override != null) return override;
359
+ let deflt = parent.contentMatchAt($pos.index()).defaultType;
360
+ return deflt && deflt.isTextblock;
361
+ }
362
+ /**
363
+ @internal
364
+ */
365
+ static findGapCursorFrom($pos, dir) {
366
+ let mustMove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
367
+ search: for (;;) {
368
+ if (!mustMove && GapCursor.valid($pos)) return $pos;
369
+ let pos = $pos.pos,
370
+ next = null;
371
+ // Scan up from this position
372
+ for (let d = $pos.depth;; d--) {
373
+ let parent = $pos.node(d);
374
+ if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
375
+ next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);
376
+ break;
377
+ } else if (d == 0) {
378
+ return null;
379
+ }
380
+ pos += dir;
381
+ let $cur = $pos.doc.resolve(pos);
382
+ if (GapCursor.valid($cur)) return $cur;
383
+ }
384
+ // And then down into the next node
385
+ for (;;) {
386
+ let inside = dir > 0 ? next.firstChild : next.lastChild;
387
+ if (!inside) {
388
+ if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {
389
+ $pos = $pos.doc.resolve(pos + next.nodeSize * dir);
390
+ mustMove = false;
391
+ continue search;
392
+ }
393
+ break;
394
+ }
395
+ next = inside;
396
+ pos += dir;
397
+ let $cur = $pos.doc.resolve(pos);
398
+ if (GapCursor.valid($cur)) return $cur;
399
+ }
400
+ return null;
401
+ }
402
+ }
403
+ }
404
+ GapCursor.prototype.visible = false;
405
+ GapCursor.findFrom = GapCursor.findGapCursorFrom;
406
+ Selection.jsonID("gapcursor", GapCursor);
407
+ class GapBookmark {
408
+ constructor(pos) {
409
+ this.pos = pos;
410
+ }
411
+ map(mapping) {
412
+ return new GapBookmark(mapping.map(this.pos));
413
+ }
414
+ resolve(doc) {
415
+ let $pos = doc.resolve(this.pos);
416
+ return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);
417
+ }
418
+ }
419
+ function closedBefore($pos) {
420
+ for (let d = $pos.depth; d >= 0; d--) {
421
+ let index = $pos.index(d),
422
+ parent = $pos.node(d);
423
+ // At the start of this parent, look at next one
424
+ if (index == 0) {
425
+ if (parent.type.spec.isolating) return true;
426
+ continue;
427
+ }
428
+ // See if the node before (or its first ancestor) is closed
429
+ for (let before = parent.child(index - 1);; before = before.lastChild) {
430
+ if (before.childCount == 0 && !before.inlineContent || before.isAtom || before.type.spec.isolating) return true;
431
+ if (before.inlineContent) return false;
432
+ }
433
+ }
434
+ // Hit start of document
435
+ return true;
436
+ }
437
+ function closedAfter($pos) {
438
+ for (let d = $pos.depth; d >= 0; d--) {
439
+ let index = $pos.indexAfter(d),
440
+ parent = $pos.node(d);
441
+ if (index == parent.childCount) {
442
+ if (parent.type.spec.isolating) return true;
443
+ continue;
444
+ }
445
+ for (let after = parent.child(index);; after = after.firstChild) {
446
+ if (after.childCount == 0 && !after.inlineContent || after.isAtom || after.type.spec.isolating) return true;
447
+ if (after.inlineContent) return false;
448
+ }
449
+ }
450
+ return true;
451
+ }
452
+
453
+ /**
454
+ Create a gap cursor plugin. When enabled, this will capture clicks
455
+ near and arrow-key-motion past places that don't have a normally
456
+ selectable position nearby, and create a gap cursor selection for
457
+ them. The cursor is drawn as an element with class
458
+ `ProseMirror-gapcursor`. You can either include
459
+ `style/gapcursor.css` from the package's directory or add your own
460
+ styles to make it visible.
461
+ */
462
+ function gapCursor() {
463
+ return new Plugin({
464
+ props: {
465
+ decorations: drawGapCursor,
466
+ createSelectionBetween(_view, $anchor, $head) {
467
+ return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null;
468
+ },
469
+ handleClick,
470
+ handleKeyDown,
471
+ handleDOMEvents: {
472
+ beforeinput: beforeinput
473
+ }
474
+ }
475
+ });
476
+ }
477
+ const handleKeyDown = keydownHandler({
478
+ "ArrowLeft": arrow("horiz", -1),
479
+ "ArrowRight": arrow("horiz", 1),
480
+ "ArrowUp": arrow("vert", -1),
481
+ "ArrowDown": arrow("vert", 1)
482
+ });
483
+ function arrow(axis, dir) {
484
+ const dirStr = axis == "vert" ? dir > 0 ? "down" : "up" : dir > 0 ? "right" : "left";
485
+ return function (state, dispatch, view) {
486
+ let sel = state.selection;
487
+ let $start = dir > 0 ? sel.$to : sel.$from,
488
+ mustMove = sel.empty;
489
+ if (sel instanceof TextSelection) {
490
+ if (!view.endOfTextblock(dirStr) || $start.depth == 0) return false;
491
+ mustMove = false;
492
+ $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());
493
+ }
494
+ let $found = GapCursor.findGapCursorFrom($start, dir, mustMove);
495
+ if (!$found) return false;
496
+ if (dispatch) dispatch(state.tr.setSelection(new GapCursor($found)));
497
+ return true;
498
+ };
499
+ }
500
+ function handleClick(view, pos, event) {
501
+ if (!view || !view.editable) return false;
502
+ let $pos = view.state.doc.resolve(pos);
503
+ if (!GapCursor.valid($pos)) return false;
504
+ let clickPos = view.posAtCoords({
505
+ left: event.clientX,
506
+ top: event.clientY
507
+ });
508
+ if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside))) return false;
509
+ view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));
510
+ return true;
511
+ }
512
+ // This is a hack that, when a composition starts while a gap cursor
513
+ // is active, quickly creates an inline context for the composition to
514
+ // happen in, to avoid it being aborted by the DOM selection being
515
+ // moved into a valid position.
516
+ function beforeinput(view, event) {
517
+ if (event.inputType != "insertCompositionText" || !(view.state.selection instanceof GapCursor)) return false;
518
+ let {
519
+ $from
520
+ } = view.state.selection;
521
+ let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
522
+ if (!insert) return false;
523
+ let frag = Fragment.empty;
524
+ for (let i = insert.length - 1; i >= 0; i--) frag = Fragment.from(insert[i].createAndFill(null, frag));
525
+ let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));
526
+ tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1)));
527
+ view.dispatch(tr);
528
+ return false;
529
+ }
530
+ function drawGapCursor(state) {
531
+ if (!(state.selection instanceof GapCursor)) return null;
532
+ let node = document.createElement("div");
533
+ node.className = "ProseMirror-gapcursor";
534
+ return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, {
535
+ key: "gapcursor"
536
+ })]);
537
+ }
538
+
539
+ const Gapcursor = Extension.create({
540
+ name: 'gapCursor',
541
+ addProseMirrorPlugins() {
542
+ return [gapCursor()];
543
+ },
544
+ extendNodeSchema(extension) {
545
+ var _a;
546
+ const context = {
547
+ name: extension.name,
548
+ options: extension.options,
549
+ storage: extension.storage
550
+ };
551
+ return {
552
+ allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null
553
+ };
554
+ }
555
+ });
556
+
557
+ const Heading = Node.create({
558
+ name: 'heading',
559
+ addOptions() {
560
+ return {
561
+ levels: [1, 2, 3, 4, 5, 6],
562
+ HTMLAttributes: {}
563
+ };
564
+ },
565
+ content: 'inline*',
566
+ group: 'block',
567
+ defining: true,
568
+ addAttributes() {
569
+ return {
570
+ level: {
571
+ default: 1,
572
+ rendered: false
573
+ }
574
+ };
575
+ },
576
+ parseHTML() {
577
+ return this.options.levels.map(level => ({
578
+ tag: `h${level}`,
579
+ attrs: {
580
+ level
581
+ }
582
+ }));
583
+ },
584
+ renderHTML(_ref) {
585
+ let {
586
+ node,
587
+ HTMLAttributes
588
+ } = _ref;
589
+ const hasLevel = this.options.levels.includes(node.attrs.level);
590
+ const level = hasLevel ? node.attrs.level : this.options.levels[0];
591
+ return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
592
+ },
593
+ addCommands() {
594
+ return {
595
+ setHeading: attributes => _ref2 => {
596
+ let {
597
+ commands
598
+ } = _ref2;
599
+ if (!this.options.levels.includes(attributes.level)) {
600
+ return false;
601
+ }
602
+ return commands.setNode(this.name, attributes);
603
+ },
604
+ toggleHeading: attributes => _ref3 => {
605
+ let {
606
+ commands
607
+ } = _ref3;
608
+ if (!this.options.levels.includes(attributes.level)) {
609
+ return false;
610
+ }
611
+ return commands.toggleNode(this.name, 'paragraph', attributes);
612
+ }
613
+ };
614
+ },
615
+ addKeyboardShortcuts() {
616
+ return this.options.levels.reduce((items, level) => ({
617
+ ...items,
618
+ ...{
619
+ [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({
620
+ level
621
+ })
622
+ }
623
+ }), {});
624
+ },
625
+ addInputRules() {
626
+ return this.options.levels.map(level => {
627
+ return textblockTypeInputRule({
628
+ find: new RegExp(`^(#{1,${level}})\\s$`),
629
+ type: this.type,
630
+ getAttributes: {
631
+ level
632
+ }
633
+ });
634
+ });
635
+ }
636
+ });
637
+
638
+ var GOOD_LEAF_SIZE = 200;
639
+
640
+ // :: class<T> A rope sequence is a persistent sequence data structure
641
+ // that supports appending, prepending, and slicing without doing a
642
+ // full copy. It is represented as a mostly-balanced tree.
643
+ var RopeSequence = function RopeSequence() {};
644
+ RopeSequence.prototype.append = function append(other) {
645
+ if (!other.length) {
646
+ return this;
647
+ }
648
+ other = RopeSequence.from(other);
649
+ return !this.length && other || other.length < GOOD_LEAF_SIZE && this.leafAppend(other) || this.length < GOOD_LEAF_SIZE && other.leafPrepend(this) || this.appendInner(other);
650
+ };
651
+
652
+ // :: (union<[T], RopeSequence<T>>) → RopeSequence<T>
653
+ // Prepend an array or other rope to this one, returning a new rope.
654
+ RopeSequence.prototype.prepend = function prepend(other) {
655
+ if (!other.length) {
656
+ return this;
657
+ }
658
+ return RopeSequence.from(other).append(this);
659
+ };
660
+ RopeSequence.prototype.appendInner = function appendInner(other) {
661
+ return new Append(this, other);
662
+ };
663
+
664
+ // :: (?number, ?number) → RopeSequence<T>
665
+ // Create a rope repesenting a sub-sequence of this rope.
666
+ RopeSequence.prototype.slice = function slice(from, to) {
667
+ if (from === void 0) from = 0;
668
+ if (to === void 0) to = this.length;
669
+ if (from >= to) {
670
+ return RopeSequence.empty;
671
+ }
672
+ return this.sliceInner(Math.max(0, from), Math.min(this.length, to));
673
+ };
674
+
675
+ // :: (number) → T
676
+ // Retrieve the element at the given position from this rope.
677
+ RopeSequence.prototype.get = function get(i) {
678
+ if (i < 0 || i >= this.length) {
679
+ return undefined;
680
+ }
681
+ return this.getInner(i);
682
+ };
683
+
684
+ // :: ((element: T, index: number) → ?bool, ?number, ?number)
685
+ // Call the given function for each element between the given
686
+ // indices. This tends to be more efficient than looping over the
687
+ // indices and calling `get`, because it doesn't have to descend the
688
+ // tree for every element.
689
+ RopeSequence.prototype.forEach = function forEach(f, from, to) {
690
+ if (from === void 0) from = 0;
691
+ if (to === void 0) to = this.length;
692
+ if (from <= to) {
693
+ this.forEachInner(f, from, to, 0);
694
+ } else {
695
+ this.forEachInvertedInner(f, from, to, 0);
696
+ }
697
+ };
698
+
699
+ // :: ((element: T, index: number) → U, ?number, ?number) → [U]
700
+ // Map the given functions over the elements of the rope, producing
701
+ // a flat array.
702
+ RopeSequence.prototype.map = function map(f, from, to) {
703
+ if (from === void 0) from = 0;
704
+ if (to === void 0) to = this.length;
705
+ var result = [];
706
+ this.forEach(function (elt, i) {
707
+ return result.push(f(elt, i));
708
+ }, from, to);
709
+ return result;
710
+ };
711
+
712
+ // :: (?union<[T], RopeSequence<T>>) → RopeSequence<T>
713
+ // Create a rope representing the given array, or return the rope
714
+ // itself if a rope was given.
715
+ RopeSequence.from = function from(values) {
716
+ if (values instanceof RopeSequence) {
717
+ return values;
718
+ }
719
+ return values && values.length ? new Leaf(values) : RopeSequence.empty;
720
+ };
721
+ var Leaf = /*@__PURE__*/function (RopeSequence) {
722
+ function Leaf(values) {
723
+ RopeSequence.call(this);
724
+ this.values = values;
725
+ }
726
+ if (RopeSequence) Leaf.__proto__ = RopeSequence;
727
+ Leaf.prototype = Object.create(RopeSequence && RopeSequence.prototype);
728
+ Leaf.prototype.constructor = Leaf;
729
+ var prototypeAccessors = {
730
+ length: {
731
+ configurable: true
732
+ },
733
+ depth: {
734
+ configurable: true
735
+ }
736
+ };
737
+ Leaf.prototype.flatten = function flatten() {
738
+ return this.values;
739
+ };
740
+ Leaf.prototype.sliceInner = function sliceInner(from, to) {
741
+ if (from == 0 && to == this.length) {
742
+ return this;
743
+ }
744
+ return new Leaf(this.values.slice(from, to));
745
+ };
746
+ Leaf.prototype.getInner = function getInner(i) {
747
+ return this.values[i];
748
+ };
749
+ Leaf.prototype.forEachInner = function forEachInner(f, from, to, start) {
750
+ for (var i = from; i < to; i++) {
751
+ if (f(this.values[i], start + i) === false) {
752
+ return false;
753
+ }
754
+ }
755
+ };
756
+ Leaf.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {
757
+ for (var i = from - 1; i >= to; i--) {
758
+ if (f(this.values[i], start + i) === false) {
759
+ return false;
760
+ }
761
+ }
762
+ };
763
+ Leaf.prototype.leafAppend = function leafAppend(other) {
764
+ if (this.length + other.length <= GOOD_LEAF_SIZE) {
765
+ return new Leaf(this.values.concat(other.flatten()));
766
+ }
767
+ };
768
+ Leaf.prototype.leafPrepend = function leafPrepend(other) {
769
+ if (this.length + other.length <= GOOD_LEAF_SIZE) {
770
+ return new Leaf(other.flatten().concat(this.values));
771
+ }
772
+ };
773
+ prototypeAccessors.length.get = function () {
774
+ return this.values.length;
775
+ };
776
+ prototypeAccessors.depth.get = function () {
777
+ return 0;
778
+ };
779
+ Object.defineProperties(Leaf.prototype, prototypeAccessors);
780
+ return Leaf;
781
+ }(RopeSequence);
782
+
783
+ // :: RopeSequence
784
+ // The empty rope sequence.
785
+ RopeSequence.empty = new Leaf([]);
786
+ var Append = /*@__PURE__*/function (RopeSequence) {
787
+ function Append(left, right) {
788
+ RopeSequence.call(this);
789
+ this.left = left;
790
+ this.right = right;
791
+ this.length = left.length + right.length;
792
+ this.depth = Math.max(left.depth, right.depth) + 1;
793
+ }
794
+ if (RopeSequence) Append.__proto__ = RopeSequence;
795
+ Append.prototype = Object.create(RopeSequence && RopeSequence.prototype);
796
+ Append.prototype.constructor = Append;
797
+ Append.prototype.flatten = function flatten() {
798
+ return this.left.flatten().concat(this.right.flatten());
799
+ };
800
+ Append.prototype.getInner = function getInner(i) {
801
+ return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length);
802
+ };
803
+ Append.prototype.forEachInner = function forEachInner(f, from, to, start) {
804
+ var leftLen = this.left.length;
805
+ if (from < leftLen && this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false) {
806
+ return false;
807
+ }
808
+ if (to > leftLen && this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false) {
809
+ return false;
810
+ }
811
+ };
812
+ Append.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {
813
+ var leftLen = this.left.length;
814
+ if (from > leftLen && this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false) {
815
+ return false;
816
+ }
817
+ if (to < leftLen && this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false) {
818
+ return false;
819
+ }
820
+ };
821
+ Append.prototype.sliceInner = function sliceInner(from, to) {
822
+ if (from == 0 && to == this.length) {
823
+ return this;
824
+ }
825
+ var leftLen = this.left.length;
826
+ if (to <= leftLen) {
827
+ return this.left.slice(from, to);
828
+ }
829
+ if (from >= leftLen) {
830
+ return this.right.slice(from - leftLen, to - leftLen);
831
+ }
832
+ return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen));
833
+ };
834
+ Append.prototype.leafAppend = function leafAppend(other) {
835
+ var inner = this.right.leafAppend(other);
836
+ if (inner) {
837
+ return new Append(this.left, inner);
838
+ }
839
+ };
840
+ Append.prototype.leafPrepend = function leafPrepend(other) {
841
+ var inner = this.left.leafPrepend(other);
842
+ if (inner) {
843
+ return new Append(inner, this.right);
844
+ }
845
+ };
846
+ Append.prototype.appendInner = function appendInner(other) {
847
+ if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1) {
848
+ return new Append(this.left, new Append(this.right, other));
849
+ }
850
+ return new Append(this, other);
851
+ };
852
+ return Append;
853
+ }(RopeSequence);
854
+ var ropeSequence = RopeSequence;
855
+
856
+ // ProseMirror's history isn't simply a way to roll back to a previous
857
+ // state, because ProseMirror supports applying changes without adding
858
+ // them to the history (for example during collaboration).
859
+ //
860
+ // To this end, each 'Branch' (one for the undo history and one for
861
+ // the redo history) keeps an array of 'Items', which can optionally
862
+ // hold a step (an actual undoable change), and always hold a position
863
+ // map (which is needed to move changes below them to apply to the
864
+ // current document).
865
+ //
866
+ // An item that has both a step and a selection bookmark is the start
867
+ // of an 'event' — a group of changes that will be undone or redone at
868
+ // once. (It stores only the bookmark, since that way we don't have to
869
+ // provide a document until the selection is actually applied, which
870
+ // is useful when compressing.)
871
+ // Used to schedule history compression
872
+ const max_empty_items = 500;
873
+ class Branch {
874
+ constructor(items, eventCount) {
875
+ this.items = items;
876
+ this.eventCount = eventCount;
877
+ }
878
+ // Pop the latest event off the branch's history and apply it
879
+ // to a document transform.
880
+ popEvent(state, preserveItems) {
881
+ if (this.eventCount == 0) return null;
882
+ let end = this.items.length;
883
+ for (;; end--) {
884
+ let next = this.items.get(end - 1);
885
+ if (next.selection) {
886
+ --end;
887
+ break;
888
+ }
889
+ }
890
+ let remap, mapFrom;
891
+ if (preserveItems) {
892
+ remap = this.remapping(end, this.items.length);
893
+ mapFrom = remap.maps.length;
894
+ }
895
+ let transform = state.tr;
896
+ let selection, remaining;
897
+ let addAfter = [],
898
+ addBefore = [];
899
+ this.items.forEach((item, i) => {
900
+ if (!item.step) {
901
+ if (!remap) {
902
+ remap = this.remapping(end, i + 1);
903
+ mapFrom = remap.maps.length;
904
+ }
905
+ mapFrom--;
906
+ addBefore.push(item);
907
+ return;
908
+ }
909
+ if (remap) {
910
+ addBefore.push(new Item(item.map));
911
+ let step = item.step.map(remap.slice(mapFrom)),
912
+ map;
913
+ if (step && transform.maybeStep(step).doc) {
914
+ map = transform.mapping.maps[transform.mapping.maps.length - 1];
915
+ addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length));
916
+ }
917
+ mapFrom--;
918
+ if (map) remap.appendMap(map, mapFrom);
919
+ } else {
920
+ transform.maybeStep(item.step);
921
+ }
922
+ if (item.selection) {
923
+ selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;
924
+ remaining = new Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1);
925
+ return false;
926
+ }
927
+ }, this.items.length, 0);
928
+ return {
929
+ remaining: remaining,
930
+ transform,
931
+ selection: selection
932
+ };
933
+ }
934
+ // Create a new branch with the given transform added.
935
+ addTransform(transform, selection, histOptions, preserveItems) {
936
+ let newItems = [],
937
+ eventCount = this.eventCount;
938
+ let oldItems = this.items,
939
+ lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;
940
+ for (let i = 0; i < transform.steps.length; i++) {
941
+ let step = transform.steps[i].invert(transform.docs[i]);
942
+ let item = new Item(transform.mapping.maps[i], step, selection),
943
+ merged;
944
+ if (merged = lastItem && lastItem.merge(item)) {
945
+ item = merged;
946
+ if (i) newItems.pop();else oldItems = oldItems.slice(0, oldItems.length - 1);
947
+ }
948
+ newItems.push(item);
949
+ if (selection) {
950
+ eventCount++;
951
+ selection = undefined;
952
+ }
953
+ if (!preserveItems) lastItem = item;
954
+ }
955
+ let overflow = eventCount - histOptions.depth;
956
+ if (overflow > DEPTH_OVERFLOW) {
957
+ oldItems = cutOffEvents(oldItems, overflow);
958
+ eventCount -= overflow;
959
+ }
960
+ return new Branch(oldItems.append(newItems), eventCount);
961
+ }
962
+ remapping(from, to) {
963
+ let maps = new Mapping();
964
+ this.items.forEach((item, i) => {
965
+ let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from ? maps.maps.length - item.mirrorOffset : undefined;
966
+ maps.appendMap(item.map, mirrorPos);
967
+ }, from, to);
968
+ return maps;
969
+ }
970
+ addMaps(array) {
971
+ if (this.eventCount == 0) return this;
972
+ return new Branch(this.items.append(array.map(map => new Item(map))), this.eventCount);
973
+ }
974
+ // When the collab module receives remote changes, the history has
975
+ // to know about those, so that it can adjust the steps that were
976
+ // rebased on top of the remote changes, and include the position
977
+ // maps for the remote changes in its array of items.
978
+ rebased(rebasedTransform, rebasedCount) {
979
+ if (!this.eventCount) return this;
980
+ let rebasedItems = [],
981
+ start = Math.max(0, this.items.length - rebasedCount);
982
+ let mapping = rebasedTransform.mapping;
983
+ let newUntil = rebasedTransform.steps.length;
984
+ let eventCount = this.eventCount;
985
+ this.items.forEach(item => {
986
+ if (item.selection) eventCount--;
987
+ }, start);
988
+ let iRebased = rebasedCount;
989
+ this.items.forEach(item => {
990
+ let pos = mapping.getMirror(--iRebased);
991
+ if (pos == null) return;
992
+ newUntil = Math.min(newUntil, pos);
993
+ let map = mapping.maps[pos];
994
+ if (item.step) {
995
+ let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);
996
+ let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));
997
+ if (selection) eventCount++;
998
+ rebasedItems.push(new Item(map, step, selection));
999
+ } else {
1000
+ rebasedItems.push(new Item(map));
1001
+ }
1002
+ }, start);
1003
+ let newMaps = [];
1004
+ for (let i = rebasedCount; i < newUntil; i++) newMaps.push(new Item(mapping.maps[i]));
1005
+ let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);
1006
+ let branch = new Branch(items, eventCount);
1007
+ if (branch.emptyItemCount() > max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length);
1008
+ return branch;
1009
+ }
1010
+ emptyItemCount() {
1011
+ let count = 0;
1012
+ this.items.forEach(item => {
1013
+ if (!item.step) count++;
1014
+ });
1015
+ return count;
1016
+ }
1017
+ // Compressing a branch means rewriting it to push the air (map-only
1018
+ // items) out. During collaboration, these naturally accumulate
1019
+ // because each remote change adds one. The `upto` argument is used
1020
+ // to ensure that only the items below a given level are compressed,
1021
+ // because `rebased` relies on a clean, untouched set of items in
1022
+ // order to associate old items with rebased steps.
1023
+ compress() {
1024
+ let upto = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.items.length;
1025
+ let remap = this.remapping(0, upto),
1026
+ mapFrom = remap.maps.length;
1027
+ let items = [],
1028
+ events = 0;
1029
+ this.items.forEach((item, i) => {
1030
+ if (i >= upto) {
1031
+ items.push(item);
1032
+ if (item.selection) events++;
1033
+ } else if (item.step) {
1034
+ let step = item.step.map(remap.slice(mapFrom)),
1035
+ map = step && step.getMap();
1036
+ mapFrom--;
1037
+ if (map) remap.appendMap(map, mapFrom);
1038
+ if (step) {
1039
+ let selection = item.selection && item.selection.map(remap.slice(mapFrom));
1040
+ if (selection) events++;
1041
+ let newItem = new Item(map.invert(), step, selection),
1042
+ merged,
1043
+ last = items.length - 1;
1044
+ if (merged = items.length && items[last].merge(newItem)) items[last] = merged;else items.push(newItem);
1045
+ }
1046
+ } else if (item.map) {
1047
+ mapFrom--;
1048
+ }
1049
+ }, this.items.length, 0);
1050
+ return new Branch(ropeSequence.from(items.reverse()), events);
1051
+ }
1052
+ }
1053
+ Branch.empty = new Branch(ropeSequence.empty, 0);
1054
+ function cutOffEvents(items, n) {
1055
+ let cutPoint;
1056
+ items.forEach((item, i) => {
1057
+ if (item.selection && n-- == 0) {
1058
+ cutPoint = i;
1059
+ return false;
1060
+ }
1061
+ });
1062
+ return items.slice(cutPoint);
1063
+ }
1064
+ class Item {
1065
+ constructor(
1066
+ // The (forward) step map for this item.
1067
+ map,
1068
+ // The inverted step
1069
+ step,
1070
+ // If this is non-null, this item is the start of a group, and
1071
+ // this selection is the starting selection for the group (the one
1072
+ // that was active before the first step was applied)
1073
+ selection,
1074
+ // If this item is the inverse of a previous mapping on the stack,
1075
+ // this points at the inverse's offset
1076
+ mirrorOffset) {
1077
+ this.map = map;
1078
+ this.step = step;
1079
+ this.selection = selection;
1080
+ this.mirrorOffset = mirrorOffset;
1081
+ }
1082
+ merge(other) {
1083
+ if (this.step && other.step && !other.selection) {
1084
+ let step = other.step.merge(this.step);
1085
+ if (step) return new Item(step.getMap().invert(), step, this.selection);
1086
+ }
1087
+ }
1088
+ }
1089
+ // The value of the state field that tracks undo/redo history for that
1090
+ // state. Will be stored in the plugin state when the history plugin
1091
+ // is active.
1092
+ class HistoryState {
1093
+ constructor(done, undone, prevRanges, prevTime, prevComposition) {
1094
+ this.done = done;
1095
+ this.undone = undone;
1096
+ this.prevRanges = prevRanges;
1097
+ this.prevTime = prevTime;
1098
+ this.prevComposition = prevComposition;
1099
+ }
1100
+ }
1101
+ const DEPTH_OVERFLOW = 20;
1102
+ // Record a transformation in undo history.
1103
+ function applyTransaction(history, state, tr, options) {
1104
+ let historyTr = tr.getMeta(historyKey),
1105
+ rebased;
1106
+ if (historyTr) return historyTr.historyState;
1107
+ if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1);
1108
+ let appended = tr.getMeta("appendedTransaction");
1109
+ if (tr.steps.length == 0) {
1110
+ return history;
1111
+ } else if (appended && appended.getMeta(historyKey)) {
1112
+ if (appended.getMeta(historyKey).redo) return new HistoryState(history.done.addTransform(tr, undefined, options, mustPreserveItems(state)), history.undone, rangesFor(tr.mapping.maps[tr.steps.length - 1]), history.prevTime, history.prevComposition);else return new HistoryState(history.done, history.undone.addTransform(tr, undefined, options, mustPreserveItems(state)), null, history.prevTime, history.prevComposition);
1113
+ } else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
1114
+ // Group transforms that occur in quick succession into one event.
1115
+ let composition = tr.getMeta("composition");
1116
+ let newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));
1117
+ let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]);
1118
+ return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : undefined, options, mustPreserveItems(state)), Branch.empty, prevRanges, tr.time, composition == null ? history.prevComposition : composition);
1119
+ } else if (rebased = tr.getMeta("rebased")) {
1120
+ // Used by the collab module to tell the history that some of its
1121
+ // content has been rebased.
1122
+ return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);
1123
+ } else {
1124
+ return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);
1125
+ }
1126
+ }
1127
+ function isAdjacentTo(transform, prevRanges) {
1128
+ if (!prevRanges) return false;
1129
+ if (!transform.docChanged) return true;
1130
+ let adjacent = false;
1131
+ transform.mapping.maps[0].forEach((start, end) => {
1132
+ for (let i = 0; i < prevRanges.length; i += 2) if (start <= prevRanges[i + 1] && end >= prevRanges[i]) adjacent = true;
1133
+ });
1134
+ return adjacent;
1135
+ }
1136
+ function rangesFor(map) {
1137
+ let result = [];
1138
+ map.forEach((_from, _to, from, to) => result.push(from, to));
1139
+ return result;
1140
+ }
1141
+ function mapRanges(ranges, mapping) {
1142
+ if (!ranges) return null;
1143
+ let result = [];
1144
+ for (let i = 0; i < ranges.length; i += 2) {
1145
+ let from = mapping.map(ranges[i], 1),
1146
+ to = mapping.map(ranges[i + 1], -1);
1147
+ if (from <= to) result.push(from, to);
1148
+ }
1149
+ return result;
1150
+ }
1151
+ // Apply the latest event from one branch to the document and shift the event
1152
+ // onto the other branch.
1153
+ function histTransaction(history, state, dispatch, redo) {
1154
+ let preserveItems = mustPreserveItems(state);
1155
+ let histOptions = historyKey.get(state).spec.config;
1156
+ let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);
1157
+ if (!pop) return;
1158
+ let selection = pop.selection.resolve(pop.transform.doc);
1159
+ let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);
1160
+ let newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1);
1161
+ dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {
1162
+ redo,
1163
+ historyState: newHist
1164
+ }).scrollIntoView());
1165
+ }
1166
+ let cachedPreserveItems = false,
1167
+ cachedPreserveItemsPlugins = null;
1168
+ // Check whether any plugin in the given state has a
1169
+ // `historyPreserveItems` property in its spec, in which case we must
1170
+ // preserve steps exactly as they came in, so that they can be
1171
+ // rebased.
1172
+ function mustPreserveItems(state) {
1173
+ let plugins = state.plugins;
1174
+ if (cachedPreserveItemsPlugins != plugins) {
1175
+ cachedPreserveItems = false;
1176
+ cachedPreserveItemsPlugins = plugins;
1177
+ for (let i = 0; i < plugins.length; i++) if (plugins[i].spec.historyPreserveItems) {
1178
+ cachedPreserveItems = true;
1179
+ break;
1180
+ }
1181
+ }
1182
+ return cachedPreserveItems;
1183
+ }
1184
+ const historyKey = new PluginKey("history");
1185
+ const closeHistoryKey = new PluginKey("closeHistory");
1186
+ /**
1187
+ Returns a plugin that enables the undo history for an editor. The
1188
+ plugin will track undo and redo stacks, which can be used with the
1189
+ [`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands.
1190
+
1191
+ You can set an `"addToHistory"` [metadata
1192
+ property](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction
1193
+ to prevent it from being rolled back by undo.
1194
+ */
1195
+ function history() {
1196
+ let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1197
+ config = {
1198
+ depth: config.depth || 100,
1199
+ newGroupDelay: config.newGroupDelay || 500
1200
+ };
1201
+ return new Plugin({
1202
+ key: historyKey,
1203
+ state: {
1204
+ init() {
1205
+ return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);
1206
+ },
1207
+ apply(tr, hist, state) {
1208
+ return applyTransaction(hist, state, tr, config);
1209
+ }
1210
+ },
1211
+ config,
1212
+ props: {
1213
+ handleDOMEvents: {
1214
+ beforeinput(view, e) {
1215
+ let inputType = e.inputType;
1216
+ let command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null;
1217
+ if (!command) return false;
1218
+ e.preventDefault();
1219
+ return command(view.state, view.dispatch);
1220
+ }
1221
+ }
1222
+ }
1223
+ });
1224
+ }
1225
+ /**
1226
+ A command function that undoes the last change, if any.
1227
+ */
1228
+ const undo = (state, dispatch) => {
1229
+ let hist = historyKey.getState(state);
1230
+ if (!hist || hist.done.eventCount == 0) return false;
1231
+ if (dispatch) histTransaction(hist, state, dispatch, false);
1232
+ return true;
1233
+ };
1234
+ /**
1235
+ A command function that redoes the last undone change, if any.
1236
+ */
1237
+ const redo = (state, dispatch) => {
1238
+ let hist = historyKey.getState(state);
1239
+ if (!hist || hist.undone.eventCount == 0) return false;
1240
+ if (dispatch) histTransaction(hist, state, dispatch, true);
1241
+ return true;
1242
+ };
1243
+
1244
+ const History = Extension.create({
1245
+ name: 'history',
1246
+ addOptions() {
1247
+ return {
1248
+ depth: 100,
1249
+ newGroupDelay: 500
1250
+ };
1251
+ },
1252
+ addCommands() {
1253
+ return {
1254
+ undo: () => _ref => {
1255
+ let {
1256
+ state,
1257
+ dispatch
1258
+ } = _ref;
1259
+ return undo(state, dispatch);
1260
+ },
1261
+ redo: () => _ref2 => {
1262
+ let {
1263
+ state,
1264
+ dispatch
1265
+ } = _ref2;
1266
+ return redo(state, dispatch);
1267
+ }
1268
+ };
1269
+ },
1270
+ addProseMirrorPlugins() {
1271
+ return [history(this.options)];
1272
+ },
1273
+ addKeyboardShortcuts() {
1274
+ return {
1275
+ 'Mod-z': () => this.editor.commands.undo(),
1276
+ 'Mod-y': () => this.editor.commands.redo(),
1277
+ 'Shift-Mod-z': () => this.editor.commands.redo(),
1278
+ // Russian keyboard layouts
1279
+ 'Mod-я': () => this.editor.commands.undo(),
1280
+ 'Shift-Mod-я': () => this.editor.commands.redo()
1281
+ };
1282
+ }
1283
+ });
1284
+
1285
+ const HorizontalRule = Node.create({
1286
+ name: 'horizontalRule',
1287
+ addOptions() {
1288
+ return {
1289
+ HTMLAttributes: {}
1290
+ };
1291
+ },
1292
+ group: 'block',
1293
+ parseHTML() {
1294
+ return [{
1295
+ tag: 'hr'
1296
+ }];
1297
+ },
1298
+ renderHTML(_ref) {
1299
+ let {
1300
+ HTMLAttributes
1301
+ } = _ref;
1302
+ return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
1303
+ },
1304
+ addCommands() {
1305
+ return {
1306
+ setHorizontalRule: () => _ref2 => {
1307
+ let {
1308
+ chain
1309
+ } = _ref2;
1310
+ return chain().insertContent({
1311
+ type: this.name
1312
+ })
1313
+ // set cursor after horizontal rule
1314
+ .command(_ref3 => {
1315
+ let {
1316
+ tr,
1317
+ dispatch
1318
+ } = _ref3;
1319
+ var _a;
1320
+ if (dispatch) {
1321
+ const {
1322
+ $to
1323
+ } = tr.selection;
1324
+ const posAfter = $to.end();
1325
+ if ($to.nodeAfter) {
1326
+ tr.setSelection(TextSelection.create(tr.doc, $to.pos));
1327
+ } else {
1328
+ // add node after horizontal rule if it’s the end of the document
1329
+ const node = (_a = $to.parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
1330
+ if (node) {
1331
+ tr.insert(posAfter, node);
1332
+ tr.setSelection(TextSelection.create(tr.doc, posAfter));
1333
+ }
1334
+ }
1335
+ tr.scrollIntoView();
1336
+ }
1337
+ return true;
1338
+ }).run();
1339
+ }
1340
+ };
1341
+ },
1342
+ addInputRules() {
1343
+ return [nodeInputRule({
1344
+ find: /^(?:---|—-|___\s|\*\*\*\s)$/,
1345
+ type: this.type
1346
+ })];
1347
+ }
1348
+ });
1349
+
1350
+ const Text = Node.create({
1351
+ name: 'text',
1352
+ group: 'inline'
1353
+ });
1354
+
1355
+ const StarterKit = Extension.create({
1356
+ name: 'starterKit',
1357
+ addExtensions() {
1358
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1359
+ const extensions = [];
1360
+ if (this.options.blockquote !== false) {
1361
+ extensions.push(Blockquote.configure((_a = this.options) === null || _a === void 0 ? void 0 : _a.blockquote));
1362
+ }
1363
+ if (this.options.bold !== false) {
1364
+ extensions.push(Bold.configure((_b = this.options) === null || _b === void 0 ? void 0 : _b.bold));
1365
+ }
1366
+ if (this.options.bulletList !== false) {
1367
+ extensions.push(BulletList.configure((_c = this.options) === null || _c === void 0 ? void 0 : _c.bulletList));
1368
+ }
1369
+ if (this.options.code !== false) {
1370
+ extensions.push(Code.configure((_d = this.options) === null || _d === void 0 ? void 0 : _d.code));
1371
+ }
1372
+ if (this.options.codeBlock !== false) {
1373
+ extensions.push(CodeBlock.configure((_e = this.options) === null || _e === void 0 ? void 0 : _e.codeBlock));
1374
+ }
1375
+ if (this.options.document !== false) {
1376
+ extensions.push(Document.configure((_f = this.options) === null || _f === void 0 ? void 0 : _f.document));
1377
+ }
1378
+ if (this.options.dropcursor !== false) {
1379
+ extensions.push(Dropcursor.configure((_g = this.options) === null || _g === void 0 ? void 0 : _g.dropcursor));
1380
+ }
1381
+ if (this.options.gapcursor !== false) {
1382
+ extensions.push(Gapcursor.configure((_h = this.options) === null || _h === void 0 ? void 0 : _h.gapcursor));
1383
+ }
1384
+ if (this.options.hardBreak !== false) {
1385
+ extensions.push(HardBreak.configure((_j = this.options) === null || _j === void 0 ? void 0 : _j.hardBreak));
1386
+ }
1387
+ if (this.options.heading !== false) {
1388
+ extensions.push(Heading.configure((_k = this.options) === null || _k === void 0 ? void 0 : _k.heading));
1389
+ }
1390
+ if (this.options.history !== false) {
1391
+ extensions.push(History.configure((_l = this.options) === null || _l === void 0 ? void 0 : _l.history));
1392
+ }
1393
+ if (this.options.horizontalRule !== false) {
1394
+ extensions.push(HorizontalRule.configure((_m = this.options) === null || _m === void 0 ? void 0 : _m.horizontalRule));
1395
+ }
1396
+ if (this.options.italic !== false) {
1397
+ extensions.push(Italic.configure((_o = this.options) === null || _o === void 0 ? void 0 : _o.italic));
1398
+ }
1399
+ if (this.options.listItem !== false) {
1400
+ extensions.push(ListItem.configure((_p = this.options) === null || _p === void 0 ? void 0 : _p.listItem));
1401
+ }
1402
+ if (this.options.orderedList !== false) {
1403
+ extensions.push(OrderedList.configure((_q = this.options) === null || _q === void 0 ? void 0 : _q.orderedList));
1404
+ }
1405
+ if (this.options.paragraph !== false) {
1406
+ extensions.push(Paragraph.configure((_r = this.options) === null || _r === void 0 ? void 0 : _r.paragraph));
1407
+ }
1408
+ if (this.options.strike !== false) {
1409
+ extensions.push(Strike.configure((_s = this.options) === null || _s === void 0 ? void 0 : _s.strike));
1410
+ }
1411
+ if (this.options.text !== false) {
1412
+ extensions.push(Text.configure((_t = this.options) === null || _t === void 0 ? void 0 : _t.text));
1413
+ }
1414
+ return extensions;
1415
+ }
1416
+ });
1417
+
1418
+ const Placeholder = Extension.create({
1419
+ name: 'placeholder',
1420
+ addOptions() {
1421
+ return {
1422
+ emptyEditorClass: 'is-editor-empty',
1423
+ emptyNodeClass: 'is-empty',
1424
+ placeholder: 'Write something …',
1425
+ showOnlyWhenEditable: true,
1426
+ showOnlyCurrent: true,
1427
+ includeChildren: false
1428
+ };
1429
+ },
1430
+ addProseMirrorPlugins() {
1431
+ return [new Plugin({
1432
+ key: new PluginKey('placeholder'),
1433
+ props: {
1434
+ decorations: _ref => {
1435
+ let {
1436
+ doc,
1437
+ selection
1438
+ } = _ref;
1439
+ const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;
1440
+ const {
1441
+ anchor
1442
+ } = selection;
1443
+ const decorations = [];
1444
+ if (!active) {
1445
+ return null;
1446
+ }
1447
+ // only calculate isEmpty once due to its performance impacts (see issue #3360)
1448
+ const emptyDocInstance = doc.type.createAndFill();
1449
+ const isEditorEmpty = (emptyDocInstance === null || emptyDocInstance === void 0 ? void 0 : emptyDocInstance.sameMarkup(doc)) && emptyDocInstance.content.findDiffStart(doc.content) === null;
1450
+ doc.descendants((node, pos) => {
1451
+ const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;
1452
+ const isEmpty = !node.isLeaf && !node.childCount;
1453
+ if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
1454
+ const classes = [this.options.emptyNodeClass];
1455
+ if (isEditorEmpty) {
1456
+ classes.push(this.options.emptyEditorClass);
1457
+ }
1458
+ const decoration = Decoration.node(pos, pos + node.nodeSize, {
1459
+ class: classes.join(' '),
1460
+ 'data-placeholder': typeof this.options.placeholder === 'function' ? this.options.placeholder({
1461
+ editor: this.editor,
1462
+ node,
1463
+ pos,
1464
+ hasAnchor
1465
+ }) : this.options.placeholder
1466
+ });
1467
+ decorations.push(decoration);
1468
+ }
1469
+ return this.options.includeChildren;
1470
+ });
1471
+ return DecorationSet.create(doc, decorations);
1472
+ }
1473
+ }
1474
+ })];
1475
+ }
1476
+ });
1477
+
1478
+ var script = defineComponent({
1479
+ name: 'OrRichTextEditor',
1480
+ components: {
1481
+ OrIconButton: __vue_component__$1,
1482
+ OrLabel: __vue_component__$2,
1483
+ OrMenuItem: __vue_component__$3,
1484
+ OrMenu: __vue_component__$4,
1485
+ OrModal: __vue_component__$5,
1486
+ OrInput: __vue_component__$6,
1487
+ OrButton: __vue_component__$7
1488
+ },
1489
+ inheritAttrs: false,
1490
+ model: {
1491
+ prop: 'modelValue',
1492
+ event: 'update:modelValue'
1493
+ },
1494
+ props: {
1495
+ modelValue: {
1496
+ type: String,
1497
+ default: undefined
1498
+ },
1499
+ toolbar: {
1500
+ type: Array,
1501
+ default: () => []
1502
+ },
1503
+ description: {
1504
+ type: String,
1505
+ default: ''
1506
+ },
1507
+ placeholder: {
1508
+ type: String,
1509
+ default: ''
1510
+ },
1511
+ autofocus: {
1512
+ type: Boolean,
1513
+ default: false
1514
+ },
1515
+ format: {
1516
+ type: String,
1517
+ default: Formats.Markup
1518
+ },
1519
+ fullHeight: {
1520
+ type: Boolean,
1521
+ default: false
1522
+ }
1523
+ },
1524
+ emits: ['update:modelValue', 'input', 'file-upload'],
1525
+ expose: ['root'],
1526
+ setup(props, context) {
1527
+ // Refs
1528
+ const root = ref();
1529
+ let editor = null;
1530
+ const editorRef = ref();
1531
+ const textareaRef = ref();
1532
+ const containerRef = ref();
1533
+ const toolbarRef = ref();
1534
+ const moreButtonRef = ref();
1535
+ const moreRef = ref();
1536
+ const toolbarButtonRef = ref();
1537
+ const menuRef = ref();
1538
+ // isActive should be set with default values for all toolbar buttons, otherwise it will not work in vue2
1539
+ const isActive = ref({
1540
+ bold: false,
1541
+ italic: false,
1542
+ underline: false,
1543
+ strike: false,
1544
+ bulletList: false,
1545
+ orderedList: false,
1546
+ link: false,
1547
+ highlight: false,
1548
+ redo: false,
1549
+ undo: false,
1550
+ codeBlock: false,
1551
+ blockquote: false,
1552
+ file: false,
1553
+ source: false
1554
+ });
1555
+ const isFocused = ref(props.autofocus);
1556
+ const headingLevels = [1, 2, 3, 4];
1557
+ const activeHeadingLevel = ref(0);
1558
+ const markdownOutput = ref('');
1559
+ const isOpenLinkModal = ref(false);
1560
+ const disableMarkdown = ref(false);
1561
+ const text = ref('');
1562
+ const link = ref('');
1563
+ const countOfNotVisibleTools = ref(0);
1564
+ const sourceValue = ref('');
1565
+ let trap = useFocusTrap(editorRef, {
1566
+ immediate: true,
1567
+ fallbackFocus: '.container',
1568
+ allowOutsideClick: true
1569
+ });
1570
+ const iconsEnum = ref({
1571
+ bold: 'format_bold',
1572
+ italic: 'format_italic',
1573
+ underline: 'format_underlined',
1574
+ strike: 'format_strikethrough',
1575
+ bulletList: 'format_list_bulleted',
1576
+ orderedList: 'format_list_numbered',
1577
+ link: 'link',
1578
+ highlight: 'highlight',
1579
+ redo: 'redo',
1580
+ undo: 'undo',
1581
+ codeBlock: 'code_blocks',
1582
+ blockquote: 'format_quote',
1583
+ file: 'attach_file',
1584
+ source: 'source_notes'
1585
+ });
1586
+ const iconTooltipsEnum = ref({
1587
+ bold: 'Bold',
1588
+ italic: 'Italic',
1589
+ underline: 'Underline',
1590
+ strike: 'Strike',
1591
+ bulletList: 'Bulleted List',
1592
+ orderedList: 'Numbered List',
1593
+ link: 'Link',
1594
+ highlight: 'Highlight',
1595
+ redo: 'Redo',
1596
+ undo: 'Undo',
1597
+ codeBlock: 'Code Block',
1598
+ blockquote: 'Quote',
1599
+ file: 'File',
1600
+ source: 'Source'
1601
+ });
1602
+ useResizeObserver(root, entries => {
1603
+ var _a, _b;
1604
+ const entry = entries[0];
1605
+ const {
1606
+ width
1607
+ } = entry.contentRect;
1608
+ if (containerRef.value && toolbarRef.value && toolbarLength.value) {
1609
+ let lengthOfItem = 0;
1610
+ lengthOfItem = ((_b = (_a = toolbarRef.value.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild) === null || _b === void 0 ? void 0 : _b.offsetWidth) + 16;
1611
+ const count = width / lengthOfItem - 2;
1612
+ countOfNotVisibleTools.value = Math.round(toolbarLength.value - count);
1613
+ }
1614
+ });
1615
+ onMounted(() => {
1616
+ editor = new Editor({
1617
+ onUpdate: _ref => {
1618
+ let {
1619
+ editor
1620
+ } = _ref;
1621
+ isFocused.value = true;
1622
+ setActiveFormats();
1623
+ const html = editor.getHTML();
1624
+ const text = editor.getText();
1625
+ if (props.format === 'markdown') {
1626
+ markdownOutput.value = serialize(editor.schema, editor.getJSON());
1627
+ proxyModelValue.value = markdownOutput.value;
1628
+ } else {
1629
+ proxyModelValue.value = text === '' ? text : html;
1630
+ }
1631
+ },
1632
+ onCreate: _ref2 => {
1633
+ let {
1634
+ editor
1635
+ } = _ref2;
1636
+ if (props.format === 'markdown') {
1637
+ const deserialized = deserialize(editor.schema, proxyModelValue.value);
1638
+ editor.commands.setContent(deserialized);
1639
+ } else {
1640
+ editor.commands.setContent(proxyModelValue.value);
1641
+ }
1642
+ },
1643
+ element: editorRef.value,
1644
+ autofocus: props.autofocus,
1645
+ enableInputRules: true,
1646
+ enablePasteRules: true,
1647
+ extensions: [codemirrorNode, StarterKit.configure({
1648
+ heading: false,
1649
+ codeBlock: false
1650
+ }), Heading.configure({
1651
+ levels: headingLevels
1652
+ }).extend({
1653
+ levels: headingLevels,
1654
+ renderHTML(_ref3) {
1655
+ let {
1656
+ node,
1657
+ HTMLAttributes
1658
+ } = _ref3;
1659
+ return ['h' + node.attrs.level, mergeAttributes(HTMLAttributes, {
1660
+ class: `typography-headline-${node.attrs.level}`
1661
+ }), 0];
1662
+ }
1663
+ }), Underline, Link.configure({
1664
+ openOnClick: true,
1665
+ linkOnPaste: true,
1666
+ autolink: false,
1667
+ protocols: ['ftp', 'mailto', 'http', 'https'],
1668
+ validate: href => /^https?:\/\//.test(href),
1669
+ HTMLAttributes: {
1670
+ class: 'text-primary cursor-pointer'
1671
+ }
1672
+ }), Highlight, Placeholder.configure({
1673
+ placeholder: props.placeholder,
1674
+ emptyEditorClass: 'is-editor-empty text-outline'
1675
+ })],
1676
+ editorProps: {
1677
+ attributes: {
1678
+ class: 'flex flex-col focus:outline-none gap-xs'
1679
+ }
1680
+ },
1681
+ parseOptions: {
1682
+ preserveWhitespace: true
1683
+ }
1684
+ });
1685
+ setActiveFormats();
1686
+ trap.activate();
1687
+ });
1688
+ onBeforeUnmount(() => {
1689
+ editor === null || editor === void 0 ? void 0 : editor.destroy();
1690
+ });
1691
+ onClickOutside(root, () => {
1692
+ isFocused.value = false;
1693
+ trap.deactivate();
1694
+ });
1695
+ // Computed
1696
+ const proxyModelValue = computed({
1697
+ get: () => {
1698
+ return props.modelValue;
1699
+ },
1700
+ set: value => {
1701
+ context.emit('input', value);
1702
+ context.emit('update:modelValue', value);
1703
+ }
1704
+ });
1705
+ const getIndexOfHeading = computed(() => {
1706
+ return props.toolbar.flat().indexOf('heading');
1707
+ });
1708
+ const headingIcon = computed(() => {
1709
+ if (activeHeadingLevel.value && isActive.value.heading) {
1710
+ return `format_h${activeHeadingLevel.value}`;
1711
+ }
1712
+ return 'format_paragraph';
1713
+ });
1714
+ const toolbarLength = computed(() => {
1715
+ return props.toolbar.flat().length;
1716
+ });
1717
+ const notVisibleTools = computed(() => {
1718
+ const count = countOfNotVisibleTools.value;
1719
+ const toolbar = props.toolbar.flat();
1720
+ let notVisible = new Set(toolbar.slice(toolbar.length - count, toolbar.length));
1721
+ props.toolbar.forEach(tools => {
1722
+ if (tools.some(item => notVisible.has(item))) {
1723
+ tools.forEach(item => notVisible.add(item));
1724
+ }
1725
+ });
1726
+ return notVisible;
1727
+ });
1728
+ //Methods
1729
+ const handleEditorClick = () => {
1730
+ var _a;
1731
+ setActiveFormats();
1732
+ isFocused.value = true;
1733
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
1734
+ activeHeadingLevel.value = ((_a = editor === null || editor === void 0 ? void 0 : editor.getAttributes('heading')) === null || _a === void 0 ? void 0 : _a.level) || 0;
1735
+ };
1736
+ const isVisible = value => {
1737
+ if (Array.isArray(value)) {
1738
+ const isHaveNotVisibleTools = value.some(item => notVisibleTools.value.has(item));
1739
+ return isHaveNotVisibleTools;
1740
+ }
1741
+ return !notVisibleTools.value.has(value);
1742
+ };
1743
+ const handleInput = event => {
1744
+ const target = event.target;
1745
+ const value = target.value;
1746
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value));
1747
+ markdownOutput.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
1748
+ proxyModelValue.value = markdownOutput.value;
1749
+ };
1750
+ const handleToolbarClick = (item, level) => {
1751
+ var _a, _b;
1752
+ switch (item) {
1753
+ case 'source':
1754
+ disableMarkdown.value = !disableMarkdown.value;
1755
+ sourceValue.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
1756
+ nextTick(() => {
1757
+ var _a;
1758
+ return (_a = textareaRef.value) === null || _a === void 0 ? void 0 : _a.focus();
1759
+ });
1760
+ break;
1761
+ case 'bulletList':
1762
+ case 'orderedList':
1763
+ item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
1764
+ break;
1765
+ case 'link':
1766
+ if (editor) {
1767
+ const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
1768
+ const {
1769
+ from,
1770
+ to,
1771
+ empty
1772
+ } = editor.state.selection;
1773
+ const isLink = (_a = editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
1774
+ const existedText = (isLink === null || isLink === void 0 ? void 0 : isLink.length) ? ((_b = editor.view.state.doc.nodeAt(cursorPosition)) === null || _b === void 0 ? void 0 : _b.text) || '' : '';
1775
+ text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
1776
+ link.value = editor.getAttributes('link').href || '';
1777
+ }
1778
+ isOpenLinkModal.value = !isOpenLinkModal.value;
1779
+ break;
1780
+ case 'blockquote':
1781
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
1782
+ break;
1783
+ case 'codeBlock':
1784
+ if (!isActive.value['codeBlock']) {
1785
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
1786
+ language: 'javascript'
1787
+ });
1788
+ } else {
1789
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
1790
+ }
1791
+ break;
1792
+ case 'heading':
1793
+ if (!level) {
1794
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
1795
+ level: 0
1796
+ });
1797
+ activeHeadingLevel.value = 0;
1798
+ } else {
1799
+ activeHeadingLevel.value = level;
1800
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
1801
+ level: level
1802
+ });
1803
+ }
1804
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
1805
+ break;
1806
+ case 'undo':
1807
+ case 'redo':
1808
+ item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
1809
+ break;
1810
+ case 'file':
1811
+ context.emit('file-upload');
1812
+ break;
1813
+ default:
1814
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
1815
+ break;
1816
+ }
1817
+ };
1818
+ const attachLink = async () => {
1819
+ var _a, _b;
1820
+ // empty
1821
+ if (link.value === '') {
1822
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
1823
+ }
1824
+ const isEmptySelection = editor === null || editor === void 0 ? void 0 : editor.state.selection.empty;
1825
+ const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
1826
+ const isLink = (_a = editor === null || editor === void 0 ? void 0 : editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
1827
+ const existedText = (isLink === null || isLink === void 0 ? void 0 : isLink.length) ? (_b = editor === null || editor === void 0 ? void 0 : editor.view.state.doc.nodeAt(cursorPosition)) === null || _b === void 0 ? void 0 : _b.text : '';
1828
+ if (link.value && isEmptySelection && !existedText) {
1829
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
1830
+ href: link.value,
1831
+ target: '__blank'
1832
+ }).command(_ref4 => {
1833
+ let {
1834
+ tr
1835
+ } = _ref4;
1836
+ const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
1837
+ tr.insertText(preparedValue);
1838
+ return true;
1839
+ }).run();
1840
+ }
1841
+ if (link.value && existedText === text.value && isEmptySelection) {
1842
+ editor === null || editor === void 0 ? void 0 : editor.chain().extendMarkRange('link').updateAttributes('link', {
1843
+ href: link.value
1844
+ }).run();
1845
+ }
1846
+ if (link.value && !isEmptySelection) {
1847
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
1848
+ href: link.value,
1849
+ target: '__blank'
1850
+ }).run();
1851
+ }
1852
+ text.value = '';
1853
+ link.value = '';
1854
+ isOpenLinkModal.value = false;
1855
+ };
1856
+ const discardLink = () => {
1857
+ isOpenLinkModal.value = false;
1858
+ };
1859
+ const setActiveFormats = () => {
1860
+ const toolbarList = props.toolbar.flat();
1861
+ toolbarList.forEach(item => {
1862
+ if (item === 'source') {
1863
+ isActive.value[item] = disableMarkdown.value;
1864
+ } else {
1865
+ isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
1866
+ }
1867
+ });
1868
+ };
1869
+ // Styles
1870
+ const rootStyles = computed(() => {
1871
+ return ['or-rich-text-editor', ...(props.fullHeight ? ['h-full'] : [])];
1872
+ });
1873
+ const containerStyles = computed(() => {
1874
+ return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
1875
+ });
1876
+ const toolbarContainerStyles = computed(() => {
1877
+ return [...ToolbarContainer];
1878
+ });
1879
+ const toolbarStyles = computed(() => {
1880
+ return [...Toolbar,
1881
+ // 'overflow-x-hidden',
1882
+ ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
1883
+ });
1884
+ const editorInputStyles = computed(() => {
1885
+ return ['tiptap-editor-v3', ...(props.fullHeight ? ['h-full overflow-y-auto'] : []), ...EditorInput];
1886
+ });
1887
+ //Effects
1888
+ watch(proxyModelValue, value => {
1889
+ if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && props.format !== 'markdown') {
1890
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
1891
+ }
1892
+ if (props.format === 'markdown' && value !== markdownOutput.value) {
1893
+ // const deserialized = deserialize(editor?.schema, value);
1894
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
1895
+ }
1896
+ });
1897
+ return {
1898
+ editor,
1899
+ editorRef,
1900
+ toolbarRef,
1901
+ containerRef,
1902
+ toolbarButtonRef,
1903
+ moreButtonRef,
1904
+ textareaRef,
1905
+ moreRef,
1906
+ menuRef,
1907
+ iconsEnum,
1908
+ handleToolbarClick,
1909
+ handleEditorClick,
1910
+ isActive,
1911
+ iconTooltipsEnum,
1912
+ containerStyles,
1913
+ toolbarContainerStyles,
1914
+ toolbarStyles,
1915
+ rootStyles,
1916
+ root,
1917
+ editorInputStyles,
1918
+ getIndexOfHeading,
1919
+ headingLevels,
1920
+ headingIcon,
1921
+ attachLink,
1922
+ discardLink,
1923
+ isOpenLinkModal,
1924
+ text,
1925
+ link,
1926
+ isFocused,
1927
+ isVisible,
1928
+ countOfNotVisibleTools,
1929
+ notVisibleTools,
1930
+ handleInput,
1931
+ proxyModelValue,
1932
+ disableMarkdown,
1933
+ sourceValue
1934
+ };
1935
+ }
1936
+ });
1937
+
1938
+ var css_248z = ".tiptap-editor-v3 ol{margin-left:24px;margin-right:24px;list-style:decimal}.tiptap-editor-v3 .ProseMirror h1, .tiptap-editor-v3 .ProseMirror h2, .tiptap-editor-v3 .ProseMirror h3, .tiptap-editor-v3 .ProseMirror h4, .tiptap-editor-v3 .ProseMirror h5, .tiptap-editor-v3 .ProseMirror h6, .tiptap-editor-v3 .ProseMirror p{margin:4px}.tiptap-editor-v3 ul{margin-left:24px;margin-right:24px;list-style:disc outside none;list-style:initial}.tiptap-editor-v3 blockquote{margin-left:24px;margin-right:24px;margin-top:8px;margin-bottom:8px;padding-left:24px;padding-right:24px;border-left:4px solid rgba(0, 95, 177, 0.16)}.tiptap-editor-v3 .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}.tiptap-editor-v3 .cm-editor{border:none;border-radius:4px;}.tiptap-editor-v3 .cm-editor .cm-scroller{border-radius:4px}.tiptap-editor-v3 .cm-editor.cm-focused{outline:0}.tiptap-editor-v3 .cm-editor .cm-gutters{background-color:rgba(0, 95, 177, 0.12);border:none}.tiptap-editor-v3 .cm-editor .cm-gutters .cm-gutterElement{padding-left:11px;padding-right:11px}.tiptap-editor-v3 .cm-editor .cm-gutters .cm-gutterElement.cm-activeLineGutter{background-color:rgba(0, 95, 177, 0.16)}";
1939
+ styleInject(css_248z);
1940
+
1941
+ /* script */
1942
+ const __vue_script__ = script;
1943
+ /* template */
1944
+ var __vue_render__ = function () {
1945
+ var _vm = this;
1946
+ var _h = _vm.$createElement;
1947
+ var _c = _vm._self._c || _h;
1948
+ return _c('div', {
1949
+ ref: "root",
1950
+ class: _vm.rootStyles
1951
+ }, [_c('or-label', [_vm._v("\n " + _vm._s(_vm.description) + "\n ")]), _vm._v(" "), _c('div', {
1952
+ ref: "containerRef",
1953
+ class: _vm.containerStyles,
1954
+ on: {
1955
+ "click": function ($event) {
1956
+ return _vm.handleEditorClick();
1957
+ }
1958
+ }
1959
+ }, [_c('div', {
1960
+ ref: "toolbarRef",
1961
+ class: _vm.toolbarContainerStyles
1962
+ }, [_vm._l(_vm.toolbar, function (tools, index) {
1963
+ return _c('div', {
1964
+ key: index,
1965
+ class: _vm.toolbarStyles.concat([{
1966
+ 'hidden': _vm.isVisible(tools)
1967
+ }])
1968
+ }, _vm._l(tools, function (item) {
1969
+ return _c('div', {
1970
+ key: item,
1971
+ class: ['flex gap-md', {
1972
+ 'hidden': !_vm.isVisible(item)
1973
+ }]
1974
+ }, [item === 'heading' ? _c('or-icon-button', {
1975
+ ref: "toolbarButtonRef",
1976
+ refInFor: true,
1977
+ attrs: {
1978
+ "selected": _vm.isActive[item],
1979
+ "disabled": !_vm.isFocused,
1980
+ "tooltip": {
1981
+ text: item,
1982
+ placement: 'top'
1983
+ },
1984
+ "icon": {
1985
+ icon: _vm.headingIcon,
1986
+ variant: 'inherit',
1987
+ size: 'm'
1988
+ }
1989
+ },
1990
+ on: {
1991
+ "click": function ($event) {
1992
+ return _vm.menuRef.open();
1993
+ }
1994
+ }
1995
+ }) : _vm.isVisible(item) ? _c('or-icon-button', {
1996
+ attrs: {
1997
+ "tooltip": {
1998
+ text: _vm.iconTooltipsEnum[item],
1999
+ placement: 'top'
2000
+ },
2001
+ "selected": _vm.isActive[item],
2002
+ "disabled": !_vm.isFocused,
2003
+ "icon": {
2004
+ icon: _vm.iconsEnum[item],
2005
+ variant: 'inherit',
2006
+ size: 'm'
2007
+ }
2008
+ },
2009
+ on: {
2010
+ "click": function ($event) {
2011
+ return _vm.handleToolbarClick(item);
2012
+ }
2013
+ }
2014
+ }) : _vm._e()], 1);
2015
+ }), 0);
2016
+ }), _vm._v(" "), _vm.countOfNotVisibleTools > 0 ? _c('or-icon-button', {
2017
+ ref: "moreButtonRef",
2018
+ staticClass: "px-sm",
2019
+ attrs: {
2020
+ "disabled": !_vm.isFocused,
2021
+ "icon": {
2022
+ icon: 'more_horiz',
2023
+ variant: 'inherit',
2024
+ size: 'm'
2025
+ }
2026
+ },
2027
+ on: {
2028
+ "click": function ($event) {
2029
+ return _vm.moreRef.open();
2030
+ }
2031
+ }
2032
+ }) : _vm._e()], 2), _vm._v(" "), _c('div', {
2033
+ class: ['p-sm', {
2034
+ 'h-[calc(100%-32px)] md:h-[calc(100%-36px)]': _vm.fullHeight
2035
+ }]
2036
+ }, [_c('textarea', {
2037
+ directives: [{
2038
+ name: "show",
2039
+ rawName: "v-show",
2040
+ value: _vm.disableMarkdown,
2041
+ expression: "disableMarkdown"
2042
+ }, {
2043
+ name: "model",
2044
+ rawName: "v-model",
2045
+ value: _vm.sourceValue,
2046
+ expression: "sourceValue"
2047
+ }],
2048
+ ref: "textareaRef",
2049
+ staticClass: "w-full h-full resize-none border-none outline-none bg-transparent typography-body-2-regular",
2050
+ attrs: {
2051
+ "auto-focus": "",
2052
+ "activated": _vm.disableMarkdown
2053
+ },
2054
+ domProps: {
2055
+ "value": _vm.sourceValue
2056
+ },
2057
+ on: {
2058
+ "input": [function ($event) {
2059
+ if ($event.target.composing) {
2060
+ return;
2061
+ }
2062
+ _vm.sourceValue = $event.target.value;
2063
+ }, _vm.handleInput]
2064
+ }
2065
+ }), _vm._v(" "), _c('div', {
2066
+ directives: [{
2067
+ name: "show",
2068
+ rawName: "v-show",
2069
+ value: !_vm.disableMarkdown,
2070
+ expression: "!disableMarkdown"
2071
+ }],
2072
+ ref: "editorRef",
2073
+ class: _vm.editorInputStyles
2074
+ }), _vm._v(" "), _vm._t("files")], 2)]), _vm._v(" "), _vm.moreButtonRef ? _c('or-menu', {
2075
+ ref: "moreRef",
2076
+ attrs: {
2077
+ "trigger": _vm.moreButtonRef.root
2078
+ }
2079
+ }, _vm._l(_vm.notVisibleTools, function (item) {
2080
+ return _c('or-menu-item', {
2081
+ key: item,
2082
+ on: {
2083
+ "click": function ($event) {
2084
+ return _vm.handleToolbarClick(item);
2085
+ }
2086
+ }
2087
+ }, [_c('or-icon-button', {
2088
+ attrs: {
2089
+ "tooltip": {
2090
+ text: _vm.iconTooltipsEnum[item],
2091
+ placement: 'top'
2092
+ },
2093
+ "selected": _vm.isActive[item],
2094
+ "icon": {
2095
+ icon: _vm.iconsEnum[item],
2096
+ variant: 'inherit',
2097
+ size: 'm'
2098
+ }
2099
+ }
2100
+ })], 1);
2101
+ }), 1) : _vm._e(), _vm._v(" "), _vm.toolbarButtonRef ? _c('or-menu', {
2102
+ ref: "menuRef",
2103
+ attrs: {
2104
+ "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
2105
+ "placement": "bottom-start"
2106
+ }
2107
+ }, [_vm._l(_vm.headingLevels, function (heading) {
2108
+ return _c('or-menu-item', {
2109
+ key: heading,
2110
+ on: {
2111
+ "click": function ($event) {
2112
+ return _vm.handleToolbarClick('heading', heading);
2113
+ }
2114
+ }
2115
+ }, [_vm._v("\n Heading " + _vm._s(heading) + "\n ")]);
2116
+ }), _vm._v(" "), _c('or-menu-item', {
2117
+ on: {
2118
+ "click": function ($event) {
2119
+ return _vm.handleToolbarClick('heading');
2120
+ }
2121
+ }
2122
+ }, [_vm._v("\n None\n ")])], 2) : _vm._e(), _vm._v(" "), _c('or-modal', {
2123
+ attrs: {
2124
+ "is-open": _vm.isOpenLinkModal,
2125
+ "size": "s"
2126
+ },
2127
+ scopedSlots: _vm._u([{
2128
+ key: "header",
2129
+ fn: function () {
2130
+ return [_c('p', {
2131
+ staticClass: "text-headline-2"
2132
+ }, [_vm._v("\n Add Link\n ")])];
2133
+ },
2134
+ proxy: true
2135
+ }, {
2136
+ key: "footer",
2137
+ fn: function () {
2138
+ return [_c('div', {
2139
+ staticClass: "flex ml-auto gap-md"
2140
+ }, [_c('or-button', {
2141
+ attrs: {
2142
+ "variant": "outlined"
2143
+ },
2144
+ on: {
2145
+ "click": _vm.discardLink
2146
+ }
2147
+ }, [_c('p', [_vm._v("Cancel")])]), _vm._v(" "), _c('or-button', {
2148
+ on: {
2149
+ "click": _vm.attachLink
2150
+ }
2151
+ }, [_c('p', [_vm._v("Save")])])], 1)];
2152
+ },
2153
+ proxy: true
2154
+ }])
2155
+ }, [_vm._v(" "), _c('div', [_c('or-label', [_vm._v("\n Text\n ")]), _vm._v(" "), _c('or-input', {
2156
+ staticClass: "pb-md",
2157
+ attrs: {
2158
+ "placeholder": "Placeholder"
2159
+ },
2160
+ model: {
2161
+ value: _vm.text,
2162
+ callback: function ($$v) {
2163
+ _vm.text = $$v;
2164
+ },
2165
+ expression: "text"
2166
+ }
2167
+ }), _vm._v(" "), _c('or-label', [_vm._v("\n Link\n ")]), _vm._v(" "), _c('or-input', {
2168
+ attrs: {
2169
+ "placeholder": "Placeholder"
2170
+ },
2171
+ model: {
2172
+ value: _vm.link,
2173
+ callback: function ($$v) {
2174
+ _vm.link = $$v;
2175
+ },
2176
+ expression: "link"
2177
+ }
2178
+ })], 1)])], 1);
2179
+ };
2180
+ var __vue_staticRenderFns__ = [];
2181
+
2182
+ /* style */
2183
+ const __vue_inject_styles__ = undefined;
2184
+ /* scoped */
2185
+ const __vue_scope_id__ = undefined;
2186
+ /* module identifier */
2187
+ const __vue_module_identifier__ = undefined;
2188
+ /* functional template */
2189
+ const __vue_is_functional_template__ = false;
2190
+ /* style inject */
2191
+
2192
+ /* style inject SSR */
2193
+
2194
+ /* style inject shadow dom */
2195
+
2196
+ const __vue_component__ = /*#__PURE__*/normalizeComponent({
2197
+ render: __vue_render__,
2198
+ staticRenderFns: __vue_staticRenderFns__
2199
+ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
2200
+
2201
+ export { __vue_component__ as default };