@onereach/ui-components 6.1.2 → 6.2.0-beta.3257.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 (741) hide show
  1. package/dist/bundled/{v3/_baseAssignValue-22e630c1.js → v2/_baseAssignValue-2250dbc9.js} +1 -1
  2. package/dist/bundled/v2/{_baseIsEqual-a1cc156c.js → _baseIsEqual-fe2002b6.js} +5 -5
  3. package/dist/bundled/v2/_commonjsHelpers-1789f0cf.js +7 -0
  4. package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +1 -1
  5. package/dist/bundled/v2/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
  6. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +1 -1
  7. package/dist/bundled/v2/components/OrCode/OrCode.js +3 -3
  8. package/dist/bundled/v2/components/OrCode/index.js +3 -2
  9. package/dist/bundled/v2/components/OrCode/lang.js +3 -2
  10. package/dist/bundled/v2/components/OrCode/libs.js +3 -2
  11. package/dist/bundled/v2/components/OrCode/theme.js +1 -1
  12. package/dist/bundled/v2/components/OrCodeV3/OrCode.js +5 -4
  13. package/dist/bundled/v2/components/OrCollapse/OrCollapse.js +1 -1
  14. package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +2 -2
  15. package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +3 -3
  16. package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +3 -3
  17. package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +2 -2
  18. package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +4 -4
  19. package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +3 -3
  20. package/dist/bundled/v2/components/OrFloating/OrFloating.js +1 -1
  21. package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
  22. package/dist/bundled/v2/components/OrInput/OrInput.js +1 -1
  23. package/dist/bundled/v2/components/OrList/OrList.js +8 -8
  24. package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +1 -1
  25. package/dist/bundled/v2/components/OrModal/OrModal.js +3 -1347
  26. package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
  27. package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +1 -1
  28. package/dist/bundled/v2/components/OrPassword/OrPassword.js +1 -1
  29. package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +2 -2
  30. package/dist/bundled/v2/components/OrProgress/OrProgress.js +1 -1
  31. package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +2 -2
  32. package/dist/bundled/v2/components/OrRadio/OrRadio.js +2 -2
  33. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +2169 -0
  34. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +194 -0
  35. package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +2 -0
  36. package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +2 -0
  37. package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +5 -0
  38. package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +7 -0
  39. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +6 -0
  40. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +38 -0
  41. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
  42. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +42 -0
  43. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
  44. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +183 -0
  45. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
  46. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -0
  47. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +17 -0
  48. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +199 -0
  49. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
  50. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
  51. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
  52. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +2 -0
  53. package/dist/bundled/v2/components/OrSearch/OrSearch.js +1 -1
  54. package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +1 -1
  55. package/dist/bundled/v2/components/OrSelect/OrSelect.js +7 -7
  56. package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +1 -1
  57. package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +1 -1
  58. package/dist/bundled/v2/components/OrSkeletonText/OrSkeletonText.js +1 -1
  59. package/dist/bundled/v2/components/OrSkeletonTextV3/OrSkeletonText.js +1 -1
  60. package/dist/bundled/v2/components/OrSlider/OrSlider.js +2 -2
  61. package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +1 -1
  62. package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
  63. package/dist/bundled/v2/components/OrTextarea/OrTextarea.js +1 -1
  64. package/dist/bundled/v2/components/OrTextarea/OrTextarea.vue.d.ts +2 -2
  65. package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
  66. package/dist/bundled/v2/components/OrTextbox/OrTextbox.js +1 -1
  67. package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
  68. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +2 -2
  69. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +2 -2
  70. package/dist/bundled/v2/components/OrToast/OrToast.vue.d.ts +2 -2
  71. package/dist/bundled/v2/components/OrToast/Timer.js +1 -1
  72. package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +2 -2
  73. package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +1 -1
  74. package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +1 -1
  75. package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
  76. package/dist/bundled/v2/components/OrToastV3/Timer.js +1 -1
  77. package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +2 -2
  78. package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
  79. package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
  80. package/dist/bundled/v2/components/OrTreeV3/OrTree.js +1 -1
  81. package/dist/bundled/v2/components/OrTreeV3/OrTree.vue.d.ts +2 -2
  82. package/dist/bundled/v2/components/index.d.ts +1 -0
  83. package/dist/bundled/v2/components/index.js +5 -2
  84. package/dist/bundled/{v3/dom-bb55b42a.js → v2/dom-cec392f3.js} +2 -2
  85. package/dist/bundled/v2/{eq-95cd2573.js → eq-44ea4d70.js} +1 -1
  86. package/dist/bundled/{v3/get-ab1b7d93.js → v2/get-34aa21f4.js} +3 -3
  87. package/dist/bundled/v2/hooks/useOverflow.js +1 -1
  88. package/dist/bundled/v2/hooks/usePopoverState.js +1 -1
  89. package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +1 -1
  90. package/dist/bundled/v2/{index-ec92055d.js → index-06f6bbe4.js} +1 -1
  91. package/dist/bundled/{v3/index-3d38888c.js → v2/index-0c287ab6.js} +2 -2
  92. package/dist/bundled/v2/index-1b2cfcc1.js +9715 -0
  93. package/dist/bundled/v2/{index-509d77a1.js → index-2b20f5f5.js} +2 -2
  94. package/dist/bundled/v2/{index-6617e2a7.js → index-3cae2d25.js} +2 -114
  95. package/dist/bundled/v2/index-3e178101.js +1817 -0
  96. package/dist/bundled/v2/{index-5915e78f.js → index-666dfe59.js} +70 -1882
  97. package/dist/bundled/v2/index-9444e0d2.js +115 -0
  98. package/dist/bundled/v2/{index-15e8c1f3.js → index-dac0fb7c.js} +1 -1
  99. package/dist/bundled/v2/{index-02646e58.js → index-de4975a3.js} +14 -3
  100. package/dist/bundled/v2/index-f671afe5.js +7127 -0
  101. package/dist/bundled/v2/index.js +7 -4
  102. package/dist/bundled/v2/{isArrayLike-e46b8eac.js → isArrayLike-e7fb5cae.js} +1 -1
  103. package/dist/bundled/v2/{isEqual-44382965.js → isEqual-7a8e6106.js} +1 -1
  104. package/dist/bundled/{v3/isObject-fe8b81fd.js → v2/isObject-b7415fc1.js} +1 -1
  105. package/dist/bundled/v2/markdown-119394e1.js +15365 -0
  106. package/dist/bundled/{v3/range-6f26eda4.js → v2/range-82efa3d4.js} +4 -4
  107. package/dist/bundled/{v3/round-f34440f4.js → v2/round-567ede34.js} +4 -4
  108. package/dist/bundled/{v3/toFinite-74227610.js → v2/toFinite-bc59ffb0.js} +1 -1
  109. package/dist/bundled/v2/{toInteger-2fd112a9.js → toInteger-9fa0151c.js} +1 -1
  110. package/dist/bundled/{v3/toString-f3196832.js → v2/toString-b6e4472a.js} +1 -1
  111. package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-089dd5fd.js → v2/useFocusTrap-d1b2c0b4.js} +4 -100
  112. package/dist/bundled/v2/utils/functions/dom.js +2 -2
  113. package/dist/bundled/v2/utils/index.js +1 -1
  114. package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-058f42b8.js → OrAvatar.vue_vue_type_script_lang-9024e842.js} +1 -1
  115. package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-4adbc880.js → OrBottomSheet.vue_vue_type_script_lang-aca902f2.js} +2 -2
  116. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-04789919.js → OrButton.vue_vue_type_script_lang-34c69de5.js} +1 -1
  117. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-22b24f8b.js → OrButton.vue_vue_type_script_lang-db6595f6.js} +1 -1
  118. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-b49e1183.js → OrCardCollection.vue_vue_type_script_lang-d0d332ba.js} +3 -3
  119. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-084e3a6c.js → OrCardCollection.vue_vue_type_script_lang-df1b372d.js} +3 -3
  120. package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-ab56a97e.js → OrCheckbox.vue_vue_type_script_lang-2d3ae971.js} +1 -1
  121. package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-ca6ba786.js → OrCheckboxGroup.vue_vue_type_script_lang-2d4980de.js} +1 -1
  122. package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-d3ed803b.js → OrCheckboxTree.vue_vue_type_script_lang-8d9ed718.js} +2 -2
  123. package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-1f55d1a7.js → OrChip.vue_vue_type_script_lang-bcdb6058.js} +1 -1
  124. package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-be1e7c30.js → OrChips.vue_vue_type_script_lang-8f63c2f0.js} +1 -1
  125. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-28b94dd1.js → OrCode.vue_vue_type_script_lang-5666b26f.js} +7 -6
  126. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-dce07d9f.js → OrCode.vue_vue_type_script_lang-81ea5cf0.js} +5 -5
  127. package/dist/bundled/v3/{OrCollapse.vue_vue_type_script_lang-69503c45.js → OrCollapse.vue_vue_type_script_lang-be1c8c66.js} +1 -1
  128. package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-250f679e.js → OrColorPicker.vue_vue_type_script_lang-1fe11508.js} +3 -3
  129. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-5218eed6.js → OrConfirm.vue_vue_type_script_lang-ac0a345b.js} +6 -6
  130. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-05c54fee.js → OrConfirm.vue_vue_type_script_lang-bd01b878.js} +6 -6
  131. package/dist/bundled/v3/{OrContextMenu.vue_vue_type_script_lang-f9c94c76.js → OrContextMenu.vue_vue_type_script_lang-8fa8823b.js} +1 -1
  132. package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-f0c601e9.js → OrDatePicker.vue_vue_type_script_lang-f5a656f1.js} +4 -4
  133. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-65c11848.js → OrDateTimePicker.vue_vue_type_script_lang-187e1c2b.js} +5 -5
  134. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-3329d4d8.js → OrDateTimePicker.vue_vue_type_script_lang-1b953be7.js} +7 -7
  135. package/dist/bundled/v3/{OrDateTimePickerMonthSelect-3d1478af.js → OrDateTimePickerMonthSelect-12b65874.js} +3 -3
  136. package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-daa7e47b.js → OrDateTimePickerPopoverHeader-135da975.js} +1 -1
  137. package/dist/bundled/v3/{OrDateTimePickerTimeSelect-96c4d657.js → OrDateTimePickerTimeSelect-fe701e75.js} +1 -1
  138. package/dist/bundled/v3/{OrFloating.vue_vue_type_script_lang-6be13add.js → OrFloating.vue_vue_type_script_lang-3fa1df9f.js} +1 -1
  139. package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-ac8f9d3e.js → OrIcon.vue_vue_type_script_lang-78ac61a5.js} +1 -1
  140. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-7c9e5033.js → OrIconButton.vue_vue_type_script_lang-85f1498b.js} +2 -2
  141. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-e6c61cfd.js → OrIconButton.vue_vue_type_script_lang-d8ff36fb.js} +1 -1
  142. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-47e464e3.js → OrInlineInput.vue_vue_type_script_lang-709c00b7.js} +1 -1
  143. package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-c9474fbe.js → OrInlineTextEdit.vue_vue_type_script_lang-1f854f02.js} +4 -4
  144. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-2785a182.js → OrInlineTextarea.vue_vue_type_script_lang-3db49cfa.js} +1 -1
  145. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-caf9e3f3.js → OrInput.vue_vue_type_script_lang-28e2c7b8.js} +2 -2
  146. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-863d3195.js → OrInput.vue_vue_type_script_lang-515ff78a.js} +2 -2
  147. package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-8622ae68.js → OrList.vue_vue_type_script_lang-9e670b9d.js} +11 -11
  148. package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-43cf4a6e.js → OrListOfInputs.vue_vue_type_script_lang-2705c3b7.js} +4 -4
  149. package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-0395ad21.js → OrLoader.vue_vue_type_script_lang-0ea76e45.js} +1 -1
  150. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-fa75c5f9.js → OrMenu.vue_vue_type_script_lang-d3fd1507.js} +1 -1
  151. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-46c6e9a0.js → OrModal.vue_vue_type_script_lang-59146f56.js} +2 -2
  152. package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-896a12c0.js +101 -0
  153. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-e8d9e29d.js → OrNotification.vue_vue_type_script_lang-2d1d8063.js} +1 -1
  154. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-d5cd06d6.js → OrNotification.vue_vue_type_script_lang-f7a1bedd.js} +2 -2
  155. package/dist/bundled/v3/{OrNumberInput.vue_vue_type_script_lang-4cc194fc.js → OrNumberInput.vue_vue_type_script_lang-b832e611.js} +1 -1
  156. package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-8976c7cb.js → OrOverflowMenu.vue_vue_type_script_lang-d1162f59.js} +5 -5
  157. package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-2da128a3.js → OrOverlay.vue_vue_type_script_lang-2b256188.js} +1 -1
  158. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-f203e797.js → OrPagination.vue_vue_type_script_lang-7d1fbc59.js} +2 -2
  159. package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-801df81f.js → OrPassword.vue_vue_type_script_lang-69655c43.js} +3 -3
  160. package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-1b2cb592.js → OrPopover.vue_vue_type_script_lang-8b17e94e.js} +3 -3
  161. package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-32e6da23.js → OrProgress.vue_vue_type_script_lang-56b4a5da.js} +2 -2
  162. package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-a99362ae.js → OrProgress.vue_vue_type_script_lang-c4bd7133.js} +1 -1
  163. package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-3a551734.js → OrRadio.vue_vue_type_script_lang-a4f043e9.js} +2 -2
  164. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-0b0d7afe.js +1909 -0
  165. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-db238842.js → OrSearch.vue_vue_type_script_lang-09597177.js} +2 -2
  166. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-a1d47bfb.js → OrSearch.vue_vue_type_script_lang-ccd97657.js} +3 -3
  167. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-6bdb35b4.js → OrSelect.vue_vue_type_script_lang-16b3f823.js} +5 -5
  168. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-0e16c49d.js → OrSelect.vue_vue_type_script_lang-5e93d6de.js} +11 -11
  169. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-5e39e11c.js → OrSidebar.vue_vue_type_script_lang-8c24f12e.js} +2 -2
  170. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-81941fe6.js → OrSidebar.vue_vue_type_script_lang-bd864765.js} +1 -1
  171. package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-26b3cfd1.js → OrSkeletonText.vue_vue_type_script_lang-502607ef.js} +1 -1
  172. package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-c2a5ab96.js → OrSkeletonText.vue_vue_type_script_lang-cfe360bb.js} +1 -1
  173. package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-ddeb981a.js → OrSlider.vue_vue_type_script_lang-137b7a6d.js} +3 -3
  174. package/dist/bundled/v3/{OrSorting.vue_vue_type_script_lang-a47a6c7c.js → OrSorting.vue_vue_type_script_lang-4b045a2f.js} +2 -2
  175. package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-35b3f789.js → OrStepper.vue_vue_type_script_lang-51a6aac8.js} +1 -1
  176. package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-a2f28112.js → OrSwitch.vue_vue_type_script_lang-fe6a5512.js} +1 -1
  177. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-d53cdbc8.js → OrTabs.vue_vue_type_script_lang-3334d9cd.js} +2 -2
  178. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-db85a592.js → OrTag.vue_vue_type_script_lang-36747a19.js} +1 -1
  179. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-e3c6c3ea.js → OrTag.vue_vue_type_script_lang-4059630f.js} +1 -1
  180. package/dist/bundled/v3/{OrTagInput.vue_vue_type_script_lang-aad1679e.js → OrTagInput.vue_vue_type_script_lang-276c07eb.js} +2 -2
  181. package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-34c8b8ea.js → OrTags.vue_vue_type_script_lang-d2e076f1.js} +3 -3
  182. package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-325050eb.js → OrTextarea.vue_vue_type_script_lang-5624556c.js} +2 -2
  183. package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-12a5099f.js → OrTextbox.vue_vue_type_script_lang-fdb184f3.js} +3 -3
  184. package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-ffafa6f3.js → OrTimePicker.vue_vue_type_script_lang-c64c8efc.js} +4 -4
  185. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-4b586b65.js → OrToastContainer.vue_vue_type_script_lang-33eb865e.js} +1 -1
  186. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-619af0a2.js → OrToastContainer.vue_vue_type_script_lang-e66ec8a5.js} +1 -1
  187. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-e18e400d.js → OrTooltip.vue_vue_type_script_lang-21382d48.js} +1 -1
  188. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-d59653b0.js → OrTooltip.vue_vue_type_script_lang-5e53867b.js} +1 -1
  189. package/dist/bundled/v3/{OrTree.vue_vue_type_script_lang-ffd5fbc3.js → OrTree.vue_vue_type_script_lang-ce5b0577.js} +2 -2
  190. package/dist/bundled/{v2/_baseAssignValue-22e630c1.js → v3/_baseAssignValue-2250dbc9.js} +1 -1
  191. package/dist/bundled/v3/{_baseIsEqual-a1cc156c.js → _baseIsEqual-fe2002b6.js} +5 -5
  192. package/dist/bundled/v3/_commonjsHelpers-1789f0cf.js +7 -0
  193. package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +2 -2
  194. package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +26 -11
  195. package/dist/bundled/v3/components/OrAvatar/index.js +1 -1
  196. package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +22 -7
  197. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
  198. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +568 -25
  199. package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.d.ts +1 -1
  200. package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
  201. package/dist/bundled/v3/components/OrBottomSheetV3/index.js +1 -1
  202. package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +51 -16
  203. package/dist/bundled/v3/components/OrButtonV2/OrButton.js +2 -2
  204. package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +57 -20
  205. package/dist/bundled/v3/components/OrButtonV2/index.js +2 -2
  206. package/dist/bundled/v3/components/OrButtonV3/OrButton.js +2 -2
  207. package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +35 -15
  208. package/dist/bundled/v3/components/OrButtonV3/index.js +1 -1
  209. package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +15 -7
  210. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +2 -2
  211. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +47 -21
  212. package/dist/bundled/v3/components/OrCardCollection/index.js +1 -1
  213. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +2 -2
  214. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +44 -17
  215. package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
  216. package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +7 -4
  217. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +2 -2
  218. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +35 -15
  219. package/dist/bundled/v3/components/OrCheckbox/index.js +1 -1
  220. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
  221. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +24 -6
  222. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +1 -1
  223. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
  224. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +43 -17
  225. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
  226. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +53 -23
  227. package/dist/bundled/v3/components/OrChip/OrChip.js +2 -2
  228. package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +25 -9
  229. package/dist/bundled/v3/components/OrChip/index.js +1 -1
  230. package/dist/bundled/v3/components/OrChips/OrChips.js +2 -2
  231. package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +51 -24
  232. package/dist/bundled/v3/components/OrChips/index.js +2 -2
  233. package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
  234. package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +69 -24
  235. package/dist/bundled/v3/components/OrCode/index.js +4 -3
  236. package/dist/bundled/v3/components/OrCode/lang.js +3 -2
  237. package/dist/bundled/v3/components/OrCode/libs.js +3 -2
  238. package/dist/bundled/v3/components/OrCode/theme.js +1 -1
  239. package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
  240. package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +83 -33
  241. package/dist/bundled/v3/components/OrCodeV3/index.js +1 -1
  242. package/dist/bundled/v3/components/OrCollapse/OrCollapse.js +2 -2
  243. package/dist/bundled/v3/components/OrCollapse/OrCollapse.vue.d.ts +39 -17
  244. package/dist/bundled/v3/components/OrCollapse/index.js +1 -1
  245. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +2 -2
  246. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +31 -13
  247. package/dist/bundled/v3/components/OrColorPicker/index.js +1 -1
  248. package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +30 -8
  249. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +2 -2
  250. package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +84 -23
  251. package/dist/bundled/v3/components/OrConfirm/index.js +1 -1
  252. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +2 -2
  253. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +91 -30
  254. package/dist/bundled/v3/components/OrConfirmV3/index.js +1 -1
  255. package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.js +2 -2
  256. package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.vue.d.ts +27 -13
  257. package/dist/bundled/v3/components/OrContextMenuV3/index.js +1 -1
  258. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +2 -2
  259. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +83 -88
  260. package/dist/bundled/v3/components/OrDatePickerV3/index.js +1 -1
  261. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +2 -2
  262. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +177 -68
  263. package/dist/bundled/v3/components/OrDateTimePicker/index.js +1 -1
  264. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +2 -2
  265. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +109 -94
  266. package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +1 -1
  267. package/dist/bundled/v3/components/OrEmptyStateV3/OrEmptyState.vue.d.ts +28 -11
  268. package/dist/bundled/v3/components/OrError/OrError.vue.d.ts +8 -4
  269. package/dist/bundled/v3/components/OrErrorTagV3/OrErrorTag.vue.d.ts +7 -4
  270. package/dist/bundled/v3/components/OrErrorV3/OrError.vue.d.ts +18 -9
  271. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.js +2 -2
  272. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +39 -16
  273. package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +1 -1
  274. package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +20 -8
  275. package/dist/bundled/v3/components/OrFloating/OrFloating.js +2 -2
  276. package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +46 -15
  277. package/dist/bundled/v3/components/OrFloating/index.js +1 -1
  278. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +30 -10
  279. package/dist/bundled/v3/components/OrHint/OrHint.vue.d.ts +8 -4
  280. package/dist/bundled/v3/components/OrHintV3/OrHint.vue.d.ts +18 -9
  281. package/dist/bundled/v3/components/OrIcon/OrIcon.js +2 -2
  282. package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +44 -16
  283. package/dist/bundled/v3/components/OrIcon/index.js +1 -1
  284. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +2 -2
  285. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +43 -13
  286. package/dist/bundled/v3/components/OrIconButtonV2/index.js +1 -1
  287. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +2 -2
  288. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +54 -16
  289. package/dist/bundled/v3/components/OrIconButtonV3/index.js +1 -1
  290. package/dist/bundled/v3/components/OrIconV3/OrIcon.vue.d.ts +18 -7
  291. package/dist/bundled/v3/components/OrInlineInputBoxV3/OrInlineInputBox.vue.d.ts +16 -7
  292. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +2 -2
  293. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +83 -39
  294. package/dist/bundled/v3/components/OrInlineInputV3/index.js +1 -1
  295. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
  296. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +95 -43
  297. package/dist/bundled/v3/components/OrInlineTextEdit/index.js +1 -1
  298. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
  299. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +79 -39
  300. package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +1 -1
  301. package/dist/bundled/v3/components/OrInput/OrInput.js +2 -2
  302. package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +87 -36
  303. package/dist/bundled/v3/components/OrInput/index.js +1 -1
  304. package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +22 -7
  305. package/dist/bundled/v3/components/OrInputV3/OrInput.js +2 -2
  306. package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +88 -38
  307. package/dist/bundled/v3/components/OrInputV3/index.js +1 -1
  308. package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +20 -9
  309. package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +26 -9
  310. package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +24 -7
  311. package/dist/bundled/v3/components/OrList/OrList.js +2 -2
  312. package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +47 -21
  313. package/dist/bundled/v3/components/OrList/index.js +1 -1
  314. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +2 -2
  315. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +27 -11
  316. package/dist/bundled/v3/components/OrListOfInputs/index.js +1 -1
  317. package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +26 -10
  318. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +2 -2
  319. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +34 -13
  320. package/dist/bundled/v3/components/OrLoaderV3/index.js +1 -1
  321. package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +34 -13
  322. package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +2 -2
  323. package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +33 -15
  324. package/dist/bundled/v3/components/OrMenuV3/index.js +1 -1
  325. package/dist/bundled/v3/components/OrModal/OrModal.js +2 -2
  326. package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +38 -14
  327. package/dist/bundled/v3/components/OrModal/index.js +1 -1
  328. package/dist/bundled/v3/components/OrModalV3/OrModal.js +2 -2
  329. package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +25 -13
  330. package/dist/bundled/v3/components/OrModalV3/index.js +1 -1
  331. package/dist/bundled/v3/components/OrNotification/OrNotification.js +2 -2
  332. package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +27 -9
  333. package/dist/bundled/v3/components/OrNotification/index.js +1 -1
  334. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +2 -2
  335. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +20 -9
  336. package/dist/bundled/v3/components/OrNotificationV3/index.js +1 -1
  337. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.js +2 -2
  338. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +70 -24
  339. package/dist/bundled/v3/components/OrNumberInput/index.js +1 -1
  340. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
  341. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +31 -13
  342. package/dist/bundled/v3/components/OrOverflowMenu/index.js +1 -1
  343. package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +16 -6
  344. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +2 -2
  345. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +14 -7
  346. package/dist/bundled/v3/components/OrOverlayV3/index.js +1 -1
  347. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +2 -2
  348. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +75 -27
  349. package/dist/bundled/v3/components/OrPaginationV3/index.js +1 -1
  350. package/dist/bundled/v3/components/OrPassword/OrPassword.js +2 -2
  351. package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +63 -22
  352. package/dist/bundled/v3/components/OrPassword/index.js +1 -1
  353. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +2 -2
  354. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +78 -25
  355. package/dist/bundled/v3/components/OrPopoverV3/index.js +1 -1
  356. package/dist/bundled/v3/components/OrProgress/OrProgress.js +2 -2
  357. package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +56 -20
  358. package/dist/bundled/v3/components/OrProgress/index.js +1 -1
  359. package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +2 -2
  360. package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +62 -25
  361. package/dist/bundled/v3/components/OrProgressV3/index.js +1 -1
  362. package/dist/bundled/v3/components/OrRadio/OrRadio.js +2 -2
  363. package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +35 -13
  364. package/dist/bundled/v3/components/OrRadio/index.js +1 -1
  365. package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.vue.d.ts +26 -9
  366. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +32 -6
  367. package/dist/bundled/v3/components/OrRadioV3/OrRadio.vue.d.ts +49 -21
  368. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +202 -0
  369. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +194 -0
  370. package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +2 -0
  371. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +2 -0
  372. package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +5 -0
  373. package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +7 -0
  374. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +6 -0
  375. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +38 -0
  376. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
  377. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +42 -0
  378. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
  379. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +183 -0
  380. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
  381. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -0
  382. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +17 -0
  383. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +199 -0
  384. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
  385. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
  386. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
  387. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +2 -0
  388. package/dist/bundled/v3/components/OrSearch/OrSearch.js +2 -2
  389. package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +65 -23
  390. package/dist/bundled/v3/components/OrSearch/index.js +1 -1
  391. package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +2 -2
  392. package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +41 -17
  393. package/dist/bundled/v3/components/OrSearchV3/index.js +1 -1
  394. package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +25 -9
  395. package/dist/bundled/v3/components/OrSelect/OrSelect.js +2 -2
  396. package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +77 -28
  397. package/dist/bundled/v3/components/OrSelect/index.js +1 -1
  398. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +2 -2
  399. package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +133 -44
  400. package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
  401. package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +2 -2
  402. package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +33 -14
  403. package/dist/bundled/v3/components/OrSidebar/index.js +1 -1
  404. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +2 -2
  405. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +63 -28
  406. package/dist/bundled/v3/components/OrSidebarV3/index.js +1 -1
  407. package/dist/bundled/v3/components/OrSkeleton/index.js +1 -1
  408. package/dist/bundled/v3/components/OrSkeletonCircle/OrSkeletonCircle.vue.d.ts +20 -9
  409. package/dist/bundled/v3/components/OrSkeletonCircleV3/OrSkeletonCircle.vue.d.ts +28 -13
  410. package/dist/bundled/v3/components/OrSkeletonRect/OrSkeletonRect.vue.d.ts +22 -9
  411. package/dist/bundled/v3/components/OrSkeletonRectV3/OrSkeletonRect.vue.d.ts +26 -11
  412. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.js +2 -2
  413. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +26 -10
  414. package/dist/bundled/v3/components/OrSkeletonText/index.js +1 -1
  415. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.js +2 -2
  416. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +40 -16
  417. package/dist/bundled/v3/components/OrSkeletonTextV3/index.js +1 -1
  418. package/dist/bundled/v3/components/OrSkeletonV3/index.js +1 -1
  419. package/dist/bundled/v3/components/OrSlider/OrSlider.js +2 -2
  420. package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +91 -35
  421. package/dist/bundled/v3/components/OrSlider/index.js +1 -1
  422. package/dist/bundled/v3/components/OrSortingV3/OrSorting.js +2 -2
  423. package/dist/bundled/v3/components/OrSortingV3/OrSorting.vue.d.ts +45 -13
  424. package/dist/bundled/v3/components/OrSortingV3/index.js +1 -1
  425. package/dist/bundled/v3/components/OrStepper/OrStepper.js +2 -2
  426. package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +43 -16
  427. package/dist/bundled/v3/components/OrStepper/index.js +1 -1
  428. package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +33 -12
  429. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +2 -2
  430. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +53 -22
  431. package/dist/bundled/v3/components/OrSwitchV3/index.js +1 -1
  432. package/dist/bundled/v3/components/OrTab/OrTab.vue.d.ts +22 -9
  433. package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.vue.d.ts +29 -13
  434. package/dist/bundled/v3/components/OrTabV3/OrTab.vue.d.ts +17 -10
  435. package/dist/bundled/v3/components/OrTabs/OrTabs.vue.d.ts +17 -4
  436. package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +2 -2
  437. package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +73 -26
  438. package/dist/bundled/v3/components/OrTabsV3/index.js +1 -1
  439. package/dist/bundled/v3/components/OrTag/OrTag.js +2 -2
  440. package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +27 -10
  441. package/dist/bundled/v3/components/OrTag/index.js +1 -1
  442. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +2 -2
  443. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.vue.d.ts +85 -37
  444. package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
  445. package/dist/bundled/v3/components/OrTagV3/OrTag.js +2 -2
  446. package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +23 -12
  447. package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
  448. package/dist/bundled/v3/components/OrTagsV3/OrTags.js +2 -2
  449. package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +68 -23
  450. package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
  451. package/dist/bundled/v3/components/OrTeleport/OrTeleport.vue3.vue.d.ts +10 -4
  452. package/dist/bundled/v3/components/OrTeleportV3/OrTeleport.vue3.vue.d.ts +10 -4
  453. package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +24 -11
  454. package/dist/bundled/v3/components/OrTextarea/OrTextarea.js +2 -2
  455. package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +85 -37
  456. package/dist/bundled/v3/components/OrTextarea/index.js +1 -1
  457. package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +73 -32
  458. package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +2 -2
  459. package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +137 -55
  460. package/dist/bundled/v3/components/OrTextbox/index.js +1 -1
  461. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +2 -2
  462. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +83 -88
  463. package/dist/bundled/v3/components/OrTimePickerV3/index.js +1 -1
  464. package/dist/bundled/v3/components/OrToast/OrToast.js +2 -2
  465. package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +31 -11
  466. package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
  467. package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
  468. package/dist/bundled/v3/components/OrToast/index.js +1 -1
  469. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +2 -2
  470. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +55 -25
  471. package/dist/bundled/v3/components/OrToastContainer/index.js +1 -1
  472. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +2 -2
  473. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +54 -24
  474. package/dist/bundled/v3/components/OrToastContainerV3/index.js +1 -1
  475. package/dist/bundled/v3/components/OrToastV3/OrToast.js +2 -2
  476. package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +38 -16
  477. package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
  478. package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
  479. package/dist/bundled/v3/components/OrToastV3/index.js +1 -1
  480. package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +2 -2
  481. package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +33 -14
  482. package/dist/bundled/v3/components/OrTooltip/index.js +1 -1
  483. package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +10 -4
  484. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +2 -2
  485. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +33 -15
  486. package/dist/bundled/v3/components/OrTooltipV3/index.js +1 -1
  487. package/dist/bundled/v3/components/OrTreeV3/OrTree.js +2 -2
  488. package/dist/bundled/v3/components/OrTreeV3/OrTree.vue.d.ts +19 -13
  489. package/dist/bundled/v3/components/OrTreeV3/index.js +1 -1
  490. package/dist/bundled/v3/components/index.d.ts +1 -0
  491. package/dist/bundled/v3/components/index.js +78 -75
  492. package/dist/bundled/v3/directives/dropdown-close.d.ts +1 -3
  493. package/dist/bundled/v3/directives/dropdown-open.d.ts +1 -3
  494. package/dist/bundled/{v2/dom-bb55b42a.js → v3/dom-cec392f3.js} +2 -2
  495. package/dist/bundled/v3/{eq-95cd2573.js → eq-44ea4d70.js} +1 -1
  496. package/dist/bundled/{v2/get-ab1b7d93.js → v3/get-34aa21f4.js} +3 -3
  497. package/dist/bundled/v3/hooks/useOverflow.js +1 -1
  498. package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
  499. package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  500. package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +1 -1
  501. package/dist/bundled/v3/{index-929e224a.js → index-0a01982b.js} +2 -2
  502. package/dist/bundled/{v2/index-3d38888c.js → v3/index-0c287ab6.js} +2 -2
  503. package/dist/bundled/v3/index-1b2cfcc1.js +9715 -0
  504. package/dist/bundled/v3/{index-6617e2a7.js → index-3cae2d25.js} +2 -114
  505. package/dist/bundled/v3/index-3e178101.js +1817 -0
  506. package/dist/bundled/v3/{index-f4d8e24c.js → index-40b35d94.js} +1 -1
  507. package/dist/bundled/v3/{index-5915e78f.js → index-666dfe59.js} +70 -1882
  508. package/dist/bundled/v3/{index-500b3ace.js → index-749f3444.js} +1 -1
  509. package/dist/bundled/v3/index-9444e0d2.js +115 -0
  510. package/dist/bundled/v3/{index-02646e58.js → index-de4975a3.js} +14 -3
  511. package/dist/bundled/v3/index-f671afe5.js +7127 -0
  512. package/dist/bundled/v3/index.js +81 -77
  513. package/dist/bundled/v3/{isArrayLike-e46b8eac.js → isArrayLike-e7fb5cae.js} +1 -1
  514. package/dist/bundled/v3/{isEqual-44382965.js → isEqual-7a8e6106.js} +1 -1
  515. package/dist/bundled/{v2/isObject-fe8b81fd.js → v3/isObject-b7415fc1.js} +1 -1
  516. package/dist/bundled/v3/markdown-119394e1.js +15365 -0
  517. package/dist/bundled/{v2/range-6f26eda4.js → v3/range-82efa3d4.js} +4 -4
  518. package/dist/bundled/{v2/round-f34440f4.js → v3/round-567ede34.js} +4 -4
  519. package/dist/bundled/{v2/toFinite-74227610.js → v3/toFinite-bc59ffb0.js} +1 -1
  520. package/dist/bundled/v3/{toInteger-2fd112a9.js → toInteger-9fa0151c.js} +1 -1
  521. package/dist/bundled/{v2/toString-f3196832.js → v3/toString-b6e4472a.js} +1 -1
  522. package/dist/bundled/v3/useFocusTrap-2302b843.js +1349 -0
  523. package/dist/bundled/v3/utils/functions/dom.js +2 -2
  524. package/dist/bundled/v3/utils/index.js +1 -1
  525. package/dist/esm/v2/OrRichTextEditor-ade23e24.js +980 -0
  526. package/dist/esm/v2/codemirrorView-020fe885.js +357 -0
  527. package/dist/esm/v2/components/index.d.ts +1 -0
  528. package/dist/esm/v2/components/index.js +23 -0
  529. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +194 -0
  530. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +2 -0
  531. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +66 -0
  532. package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +5 -0
  533. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  534. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
  535. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
  536. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
  537. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +9 -0
  538. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +17 -0
  539. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
  540. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
  541. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +2 -2
  542. package/dist/esm/v2/components/or-textarea/OrTextarea.vue.d.ts +2 -2
  543. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +2 -2
  544. package/dist/esm/v2/components/or-textbox/OrTextbox.vue.d.ts +2 -2
  545. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +2 -2
  546. package/dist/esm/v2/components/or-toast/OrToast.vue.d.ts +2 -2
  547. package/dist/esm/v2/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +2 -2
  548. package/dist/esm/v2/components/or-toast-v3/OrToast.vue.d.ts +2 -2
  549. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
  550. package/dist/esm/v2/components/or-tooltip/OrTooltip.vue.d.ts +2 -2
  551. package/dist/esm/v2/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +2 -2
  552. package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +2 -2
  553. package/dist/esm/v2/components/or-tree-v3/OrTree.vue.d.ts +2 -2
  554. package/dist/esm/v2/index.js +23 -0
  555. package/dist/esm/v3/OrRichTextEditor-d59ba053.js +912 -0
  556. package/dist/esm/v3/codemirrorView-020fe885.js +357 -0
  557. package/dist/esm/v3/components/index.d.ts +1 -0
  558. package/dist/esm/v3/components/index.js +23 -0
  559. package/dist/esm/v3/components/or-avatar/OrAvatar.vue.d.ts +26 -11
  560. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +22 -7
  561. package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +568 -25
  562. package/dist/esm/v3/components/or-bottom-sheet-v3/hooks/useBottomSheetSwipeState.d.ts +1 -1
  563. package/dist/esm/v3/components/or-button/OrButton.vue.d.ts +51 -16
  564. package/dist/esm/v3/components/or-button-v2/OrButton.vue.d.ts +57 -20
  565. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +35 -15
  566. package/dist/esm/v3/components/or-card/OrCard.vue.d.ts +15 -7
  567. package/dist/esm/v3/components/or-card-collection/OrCardCollection.vue.d.ts +47 -21
  568. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +44 -17
  569. package/dist/esm/v3/components/or-card-collection-v3/partials/OrCardCollectionView.vue3.vue.d.ts +14 -6
  570. package/dist/esm/v3/components/or-card-v3/OrCard.vue.d.ts +7 -4
  571. package/dist/esm/v3/components/or-checkbox/OrCheckbox.vue.d.ts +35 -15
  572. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +24 -6
  573. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +43 -17
  574. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +53 -23
  575. package/dist/esm/v3/components/or-chips/OrChips.vue.d.ts +51 -24
  576. package/dist/esm/v3/components/or-chips/or-chip/OrChip.vue.d.ts +25 -9
  577. package/dist/esm/v3/components/or-chips/partials/OrChipsInput.vue.d.ts +37 -17
  578. package/dist/esm/v3/components/or-code/OrCode.vue.d.ts +69 -24
  579. package/dist/esm/v3/components/or-code-v3/OrCode.vue.d.ts +83 -33
  580. package/dist/esm/v3/components/or-collapse/OrCollapse.vue.d.ts +39 -17
  581. package/dist/esm/v3/components/or-color-picker/OrColorPicker.vue.d.ts +31 -13
  582. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +30 -8
  583. package/dist/esm/v3/components/or-confirm/OrConfirm.vue.d.ts +84 -23
  584. package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +91 -30
  585. package/dist/esm/v3/components/or-context-menu-v3/OrContextMenu.vue.d.ts +27 -13
  586. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +83 -88
  587. package/dist/esm/v3/components/or-date-time-picker/OrDateTimePicker.vue.d.ts +177 -68
  588. package/dist/esm/v3/components/or-date-time-picker/partials/OrDateTimePickerCalendarItem.vue.d.ts +33 -12
  589. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +109 -94
  590. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +28 -11
  591. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +39 -17
  592. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +15 -7
  593. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +85 -23
  594. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +17 -9
  595. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +7 -4
  596. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +30 -11
  597. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +43 -17
  598. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +28 -11
  599. package/dist/esm/v3/components/or-error/OrError.vue.d.ts +8 -4
  600. package/dist/esm/v3/components/or-error-tag-v3/OrErrorTag.vue.d.ts +7 -4
  601. package/dist/esm/v3/components/or-error-v3/OrError.vue.d.ts +18 -9
  602. package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +39 -16
  603. package/dist/esm/v3/components/or-fab-v3/OrFab.vue.d.ts +20 -8
  604. package/dist/esm/v3/components/or-floating/OrFloating.vue.d.ts +46 -15
  605. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +30 -10
  606. package/dist/esm/v3/components/or-hint/OrHint.vue.d.ts +8 -4
  607. package/dist/esm/v3/components/or-hint-v3/OrHint.vue.d.ts +18 -9
  608. package/dist/esm/v3/components/or-icon/OrIcon.vue.d.ts +44 -16
  609. package/dist/esm/v3/components/or-icon-button-v2/OrIconButton.vue.d.ts +43 -13
  610. package/dist/esm/v3/components/or-icon-button-v2/partials/OrTooltipWrapper.vue.d.ts +10 -8
  611. package/dist/esm/v3/components/or-icon-button-v3/OrIconButton.vue.d.ts +54 -16
  612. package/dist/esm/v3/components/or-icon-v3/OrIcon.vue.d.ts +18 -7
  613. package/dist/esm/v3/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +16 -7
  614. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +83 -39
  615. package/dist/esm/v3/components/or-inline-text-edit/OrInlineTextEdit.vue.d.ts +95 -43
  616. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +79 -39
  617. package/dist/esm/v3/components/or-input/OrInput.vue.d.ts +87 -36
  618. package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +22 -7
  619. package/dist/esm/v3/components/or-input-box-v3/partials/or-input-box-addon/OrInputBoxAddon.vue.d.ts +18 -7
  620. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +88 -38
  621. package/dist/esm/v3/components/or-label/OrLabel.vue.d.ts +20 -9
  622. package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +26 -9
  623. package/dist/esm/v3/components/or-link-v3/OrLink.vue.d.ts +24 -7
  624. package/dist/esm/v3/components/or-list/OrList.vue.d.ts +47 -21
  625. package/dist/esm/v3/components/or-list-of-inputs/OrListOfInputs.vue.d.ts +27 -11
  626. package/dist/esm/v3/components/or-loader/OrLoader.vue.d.ts +26 -10
  627. package/dist/esm/v3/components/or-loader-v3/OrLoader.vue.d.ts +34 -13
  628. package/dist/esm/v3/components/or-menu-item-v3/OrMenuItem.vue.d.ts +34 -13
  629. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +33 -15
  630. package/dist/esm/v3/components/or-modal/OrModal.vue.d.ts +38 -14
  631. package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +25 -13
  632. package/dist/esm/v3/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue.d.ts +7 -4
  633. package/dist/esm/v3/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue.d.ts +7 -4
  634. package/dist/esm/v3/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue.d.ts +11 -6
  635. package/dist/esm/v3/components/or-notification/OrNotification.vue.d.ts +27 -9
  636. package/dist/esm/v3/components/or-notification-v3/OrNotification.vue.d.ts +20 -9
  637. package/dist/esm/v3/components/or-number-input/OrNumberInput.vue.d.ts +70 -24
  638. package/dist/esm/v3/components/or-overflow-menu/OrOverflowMenu.vue.d.ts +31 -13
  639. package/dist/esm/v3/components/or-overflow-menu/partials/OrOverflowMenuItem.vue.d.ts +23 -7
  640. package/dist/esm/v3/components/or-overlay/OrOverlay.vue.d.ts +16 -6
  641. package/dist/esm/v3/components/or-overlay-v3/OrOverlay.vue.d.ts +14 -7
  642. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +75 -27
  643. package/dist/esm/v3/components/or-password/OrPassword.vue.d.ts +63 -22
  644. package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +78 -25
  645. package/dist/esm/v3/components/or-progress/OrProgress.vue.d.ts +56 -20
  646. package/dist/esm/v3/components/or-progress-v3/OrProgress.vue.d.ts +62 -25
  647. package/dist/esm/v3/components/or-radio/OrRadio.vue.d.ts +35 -13
  648. package/dist/esm/v3/components/or-radio-group/OrRadioGroup.vue.d.ts +26 -9
  649. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +32 -6
  650. package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +49 -21
  651. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +194 -0
  652. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +2 -0
  653. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +64 -0
  654. package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +5 -0
  655. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  656. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
  657. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
  658. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
  659. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +9 -0
  660. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +17 -0
  661. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
  662. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
  663. package/dist/esm/v3/components/or-search/OrSearch.vue.d.ts +65 -23
  664. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +41 -17
  665. package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +25 -9
  666. package/dist/esm/v3/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +20 -8
  667. package/dist/esm/v3/components/or-select/OrSelect.vue.d.ts +77 -28
  668. package/dist/esm/v3/components/or-select/partials/OrSelectContent.vue.d.ts +49 -18
  669. package/dist/esm/v3/components/or-select/partials/OrSelectContentEmpty.vue.d.ts +16 -4
  670. package/dist/esm/v3/components/or-select/partials/OrSelectContentOptions.vue.d.ts +67 -13
  671. package/dist/esm/v3/components/or-select/partials/OrSelectInput.vue.d.ts +41 -16
  672. package/dist/esm/v3/components/or-select/partials/OrSelectInputValue.vue.d.ts +35 -16
  673. package/dist/esm/v3/components/or-select/partials/OrSelectMain.vue.d.ts +71 -24
  674. package/dist/esm/v3/components/or-select/partials/OrSelectOption.vue.d.ts +19 -7
  675. package/dist/esm/v3/components/or-select/partials/OrSelectSearchOptions.vue.d.ts +24 -11
  676. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +133 -44
  677. package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue.d.ts +14 -7
  678. package/dist/esm/v3/components/or-sidebar/OrSidebar.vue.d.ts +33 -14
  679. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +63 -28
  680. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +23 -10
  681. package/dist/esm/v3/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.vue.d.ts +20 -9
  682. package/dist/esm/v3/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.vue.d.ts +22 -9
  683. package/dist/esm/v3/components/or-skeleton/or-skeleton-text/OrSkeletonText.vue.d.ts +26 -10
  684. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +28 -13
  685. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +26 -11
  686. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +40 -16
  687. package/dist/esm/v3/components/or-slider/OrSlider.vue.d.ts +91 -35
  688. package/dist/esm/v3/components/or-sorting-v3/OrSorting.vue.d.ts +45 -13
  689. package/dist/esm/v3/components/or-stepper/OrStepper.vue.d.ts +43 -16
  690. package/dist/esm/v3/components/or-stepper/partials/OrStepperButtonOptions.vue.d.ts +20 -4
  691. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionHorizontal.vue.d.ts +26 -4
  692. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionVertical.vue.d.ts +26 -4
  693. package/dist/esm/v3/components/or-stepper/partials/OrStepperTitle.vue.d.ts +22 -6
  694. package/dist/esm/v3/components/or-stepper/partials/StatusIcon.vue.d.ts +12 -6
  695. package/dist/esm/v3/components/or-switch/OrSwitch.vue.d.ts +33 -12
  696. package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +53 -22
  697. package/dist/esm/v3/components/or-tab/OrTab.vue.d.ts +22 -9
  698. package/dist/esm/v3/components/or-tab-header-item/OrTabHeaderItem.vue.d.ts +29 -13
  699. package/dist/esm/v3/components/or-tab-v3/OrTab.vue.d.ts +17 -10
  700. package/dist/esm/v3/components/or-tabs/OrTabs.vue.d.ts +17 -4
  701. package/dist/esm/v3/components/or-tabs-v3/OrTabs.vue.d.ts +73 -26
  702. package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +27 -10
  703. package/dist/esm/v3/components/or-tag-input-v3/OrTagInput.vue.d.ts +85 -37
  704. package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +23 -12
  705. package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +68 -23
  706. package/dist/esm/v3/components/or-teleport/OrTeleport.vue3.vue.d.ts +10 -4
  707. package/dist/esm/v3/components/or-teleport-v3/OrTeleport.vue3.vue.d.ts +10 -4
  708. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +24 -11
  709. package/dist/esm/v3/components/or-textarea/OrTextarea.vue.d.ts +85 -37
  710. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +73 -32
  711. package/dist/esm/v3/components/or-textbox/OrTextbox.vue.d.ts +137 -55
  712. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +83 -88
  713. package/dist/esm/v3/components/or-toast/OrToast.vue.d.ts +31 -11
  714. package/dist/esm/v3/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +55 -25
  715. package/dist/esm/v3/components/or-toast-v3/OrToast.vue.d.ts +38 -16
  716. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +54 -24
  717. package/dist/esm/v3/components/or-tooltip/OrTooltip.vue.d.ts +33 -14
  718. package/dist/esm/v3/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +10 -4
  719. package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +33 -15
  720. package/dist/esm/v3/components/or-tree-v3/OrTree.vue.d.ts +19 -13
  721. package/dist/esm/v3/components/or-tree-v3/partials/or-tree-node/OrTreeNode.vue.d.ts +63 -31
  722. package/dist/esm/v3/directives/dropdown-close.d.ts +1 -3
  723. package/dist/esm/v3/directives/dropdown-open.d.ts +1 -3
  724. package/dist/esm/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  725. package/dist/esm/v3/index.js +23 -0
  726. package/package.json +23 -5
  727. package/src/components/index.ts +1 -0
  728. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +743 -0
  729. package/src/components/or-rich-text-editor-v3/index.ts +2 -0
  730. package/src/components/or-rich-text-editor-v3/props.ts +6 -0
  731. package/src/components/or-rich-text-editor-v3/styles.ts +53 -0
  732. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +40 -0
  733. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +254 -0
  734. package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +1 -0
  735. package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +238 -0
  736. package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +22 -0
  737. package/src/components/or-rich-text-editor-v3/utils/markdown.ts +172 -0
  738. /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-31a5687d.js → OrDateTimePickerMonthSelect-cc8c2a84.js} +0 -0
  739. /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-2c7e113b.js → OrDateTimePickerPopoverHeader-146c2f16.js} +0 -0
  740. /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-7fd83e23.js → OrDateTimePickerTimeSelect-7286977a.js} +0 -0
  741. /package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-de05b51f.js → OrExpansionPanel.vue_vue_type_script_lang-94976ae9.js} +0 -0
@@ -0,0 +1,1909 @@
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch, nextTick } from 'vue-demi';
2
+ import { u as useFocusTrap } from './useFocusTrap-2302b843.js';
3
+ import { f as useResizeObserver, o as onClickOutside } from './index-0a01982b.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-119394e1.js';
5
+ import { EditorContainer, ToolbarContainer, Toolbar, ToolbarButtonFocused, ToolbarButton, EditorInput } from './components/OrRichTextEditorV3/styles.js';
6
+ import { Formats } from './components/OrRichTextEditorV3/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-1b2cfcc1.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-f671afe5.js';
9
+ import codemirrorNode from './components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js';
10
+ import './components/OrIconButtonV3/OrIconButton.js';
11
+ import './components/OrLabelV3/OrLabel.js';
12
+ import './components/OrMenuItemV3/OrMenuItem.js';
13
+ import './components/OrMenuV3/OrMenu.js';
14
+ import './components/OrModalV3/OrModal.js';
15
+ import './components/OrInputV3/OrInput.js';
16
+ import './components/OrButtonV3/OrButton.js';
17
+ import './components/OrPopoverV3/OrPopover.js';
18
+ import { s as script$1 } from './OrIconButton.vue_vue_type_script_lang-d8ff36fb.js';
19
+ import { s as script$2 } from './OrLabel.vue_vue_type_script_lang-fcdfd80d.js';
20
+ import { s as script$3 } from './OrMenuItem.vue_vue_type_script_lang-1785286a.js';
21
+ import { s as script$4 } from './OrMenu.vue_vue_type_script_lang-d3fd1507.js';
22
+ import { s as script$5 } from './OrModal.vue_vue_type_script_lang-59146f56.js';
23
+ import { s as script$6 } from './OrInput.vue_vue_type_script_lang-28e2c7b8.js';
24
+ import { s as script$7 } from './OrButton.vue_vue_type_script_lang-db6595f6.js';
25
+ import { s as script$8 } from './OrPopover.vue_vue_type_script_lang-8b17e94e.js';
26
+
27
+ const inputRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))$/;
28
+ const pasteRegex = /(?:^|\s)((?:`)((?:[^`]+))(?:`))/g;
29
+ const Code = Mark.create({
30
+ name: 'code',
31
+ addOptions() {
32
+ return {
33
+ HTMLAttributes: {}
34
+ };
35
+ },
36
+ excludes: '_',
37
+ code: true,
38
+ exitable: true,
39
+ parseHTML() {
40
+ return [{
41
+ tag: 'code'
42
+ }];
43
+ },
44
+ renderHTML(_ref) {
45
+ let {
46
+ HTMLAttributes
47
+ } = _ref;
48
+ return ['code', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
49
+ },
50
+ addCommands() {
51
+ return {
52
+ setCode: () => _ref2 => {
53
+ let {
54
+ commands
55
+ } = _ref2;
56
+ return commands.setMark(this.name);
57
+ },
58
+ toggleCode: () => _ref3 => {
59
+ let {
60
+ commands
61
+ } = _ref3;
62
+ return commands.toggleMark(this.name);
63
+ },
64
+ unsetCode: () => _ref4 => {
65
+ let {
66
+ commands
67
+ } = _ref4;
68
+ return commands.unsetMark(this.name);
69
+ }
70
+ };
71
+ },
72
+ addKeyboardShortcuts() {
73
+ return {
74
+ 'Mod-e': () => this.editor.commands.toggleCode()
75
+ };
76
+ },
77
+ addInputRules() {
78
+ return [markInputRule({
79
+ find: inputRegex,
80
+ type: this.type
81
+ })];
82
+ },
83
+ addPasteRules() {
84
+ return [markPasteRule({
85
+ find: pasteRegex,
86
+ type: this.type
87
+ })];
88
+ }
89
+ });
90
+
91
+ const Document = Node.create({
92
+ name: 'doc',
93
+ topNode: true,
94
+ content: 'block+'
95
+ });
96
+
97
+ /**
98
+ Create a plugin that, when added to a ProseMirror instance,
99
+ causes a decoration to show up at the drop position when something
100
+ is dragged over the editor.
101
+
102
+ Nodes may add a `disableDropCursor` property to their spec to
103
+ control the showing of a drop cursor inside them. This may be a
104
+ boolean or a function, which will be called with a view and a
105
+ position, and should return a boolean.
106
+ */
107
+ function dropCursor() {
108
+ let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
109
+ return new Plugin({
110
+ view(editorView) {
111
+ return new DropCursorView(editorView, options);
112
+ }
113
+ });
114
+ }
115
+ class DropCursorView {
116
+ constructor(editorView, options) {
117
+ var _a;
118
+ this.editorView = editorView;
119
+ this.cursorPos = null;
120
+ this.element = null;
121
+ this.timeout = -1;
122
+ this.width = (_a = options.width) !== null && _a !== void 0 ? _a : 1;
123
+ this.color = options.color === false ? undefined : options.color || "black";
124
+ this.class = options.class;
125
+ this.handlers = ["dragover", "dragend", "drop", "dragleave"].map(name => {
126
+ let handler = e => {
127
+ this[name](e);
128
+ };
129
+ editorView.dom.addEventListener(name, handler);
130
+ return {
131
+ name,
132
+ handler
133
+ };
134
+ });
135
+ }
136
+ destroy() {
137
+ this.handlers.forEach(_ref => {
138
+ let {
139
+ name,
140
+ handler
141
+ } = _ref;
142
+ return this.editorView.dom.removeEventListener(name, handler);
143
+ });
144
+ }
145
+ update(editorView, prevState) {
146
+ if (this.cursorPos != null && prevState.doc != editorView.state.doc) {
147
+ if (this.cursorPos > editorView.state.doc.content.size) this.setCursor(null);else this.updateOverlay();
148
+ }
149
+ }
150
+ setCursor(pos) {
151
+ if (pos == this.cursorPos) return;
152
+ this.cursorPos = pos;
153
+ if (pos == null) {
154
+ this.element.parentNode.removeChild(this.element);
155
+ this.element = null;
156
+ } else {
157
+ this.updateOverlay();
158
+ }
159
+ }
160
+ updateOverlay() {
161
+ let $pos = this.editorView.state.doc.resolve(this.cursorPos);
162
+ let isBlock = !$pos.parent.inlineContent,
163
+ rect;
164
+ if (isBlock) {
165
+ let before = $pos.nodeBefore,
166
+ after = $pos.nodeAfter;
167
+ if (before || after) {
168
+ let node = this.editorView.nodeDOM(this.cursorPos - (before ? before.nodeSize : 0));
169
+ if (node) {
170
+ let nodeRect = node.getBoundingClientRect();
171
+ let top = before ? nodeRect.bottom : nodeRect.top;
172
+ if (before && after) top = (top + this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top) / 2;
173
+ rect = {
174
+ left: nodeRect.left,
175
+ right: nodeRect.right,
176
+ top: top - this.width / 2,
177
+ bottom: top + this.width / 2
178
+ };
179
+ }
180
+ }
181
+ }
182
+ if (!rect) {
183
+ let coords = this.editorView.coordsAtPos(this.cursorPos);
184
+ rect = {
185
+ left: coords.left - this.width / 2,
186
+ right: coords.left + this.width / 2,
187
+ top: coords.top,
188
+ bottom: coords.bottom
189
+ };
190
+ }
191
+ let parent = this.editorView.dom.offsetParent;
192
+ if (!this.element) {
193
+ this.element = parent.appendChild(document.createElement("div"));
194
+ if (this.class) this.element.className = this.class;
195
+ this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;";
196
+ if (this.color) {
197
+ this.element.style.backgroundColor = this.color;
198
+ }
199
+ }
200
+ this.element.classList.toggle("prosemirror-dropcursor-block", isBlock);
201
+ this.element.classList.toggle("prosemirror-dropcursor-inline", !isBlock);
202
+ let parentLeft, parentTop;
203
+ if (!parent || parent == document.body && getComputedStyle(parent).position == "static") {
204
+ parentLeft = -pageXOffset;
205
+ parentTop = -pageYOffset;
206
+ } else {
207
+ let rect = parent.getBoundingClientRect();
208
+ parentLeft = rect.left - parent.scrollLeft;
209
+ parentTop = rect.top - parent.scrollTop;
210
+ }
211
+ this.element.style.left = rect.left - parentLeft + "px";
212
+ this.element.style.top = rect.top - parentTop + "px";
213
+ this.element.style.width = rect.right - rect.left + "px";
214
+ this.element.style.height = rect.bottom - rect.top + "px";
215
+ }
216
+ scheduleRemoval(timeout) {
217
+ clearTimeout(this.timeout);
218
+ this.timeout = setTimeout(() => this.setCursor(null), timeout);
219
+ }
220
+ dragover(event) {
221
+ if (!this.editorView.editable) return;
222
+ let pos = this.editorView.posAtCoords({
223
+ left: event.clientX,
224
+ top: event.clientY
225
+ });
226
+ let node = pos && pos.inside >= 0 && this.editorView.state.doc.nodeAt(pos.inside);
227
+ let disableDropCursor = node && node.type.spec.disableDropCursor;
228
+ let disabled = typeof disableDropCursor == "function" ? disableDropCursor(this.editorView, pos, event) : disableDropCursor;
229
+ if (pos && !disabled) {
230
+ let target = pos.pos;
231
+ if (this.editorView.dragging && this.editorView.dragging.slice) {
232
+ let point = dropPoint(this.editorView.state.doc, target, this.editorView.dragging.slice);
233
+ if (point != null) target = point;
234
+ }
235
+ this.setCursor(target);
236
+ this.scheduleRemoval(5000);
237
+ }
238
+ }
239
+ dragend() {
240
+ this.scheduleRemoval(20);
241
+ }
242
+ drop() {
243
+ this.scheduleRemoval(20);
244
+ }
245
+ dragleave(event) {
246
+ if (event.target == this.editorView.dom || !this.editorView.dom.contains(event.relatedTarget)) this.setCursor(null);
247
+ }
248
+ }
249
+
250
+ const Dropcursor = Extension.create({
251
+ name: 'dropCursor',
252
+ addOptions() {
253
+ return {
254
+ color: 'currentColor',
255
+ width: 1,
256
+ class: undefined
257
+ };
258
+ },
259
+ addProseMirrorPlugins() {
260
+ return [dropCursor(this.options)];
261
+ }
262
+ });
263
+
264
+ /**
265
+ Gap cursor selections are represented using this class. Its
266
+ `$anchor` and `$head` properties both point at the cursor position.
267
+ */
268
+ class GapCursor extends Selection {
269
+ /**
270
+ Create a gap cursor.
271
+ */
272
+ constructor($pos) {
273
+ super($pos, $pos);
274
+ }
275
+ map(doc, mapping) {
276
+ let $pos = doc.resolve(mapping.map(this.head));
277
+ return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);
278
+ }
279
+ content() {
280
+ return Slice.empty;
281
+ }
282
+ eq(other) {
283
+ return other instanceof GapCursor && other.head == this.head;
284
+ }
285
+ toJSON() {
286
+ return {
287
+ type: "gapcursor",
288
+ pos: this.head
289
+ };
290
+ }
291
+ /**
292
+ @internal
293
+ */
294
+ static fromJSON(doc, json) {
295
+ if (typeof json.pos != "number") throw new RangeError("Invalid input for GapCursor.fromJSON");
296
+ return new GapCursor(doc.resolve(json.pos));
297
+ }
298
+ /**
299
+ @internal
300
+ */
301
+ getBookmark() {
302
+ return new GapBookmark(this.anchor);
303
+ }
304
+ /**
305
+ @internal
306
+ */
307
+ static valid($pos) {
308
+ let parent = $pos.parent;
309
+ if (parent.isTextblock || !closedBefore($pos) || !closedAfter($pos)) return false;
310
+ let override = parent.type.spec.allowGapCursor;
311
+ if (override != null) return override;
312
+ let deflt = parent.contentMatchAt($pos.index()).defaultType;
313
+ return deflt && deflt.isTextblock;
314
+ }
315
+ /**
316
+ @internal
317
+ */
318
+ static findGapCursorFrom($pos, dir) {
319
+ let mustMove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
320
+ search: for (;;) {
321
+ if (!mustMove && GapCursor.valid($pos)) return $pos;
322
+ let pos = $pos.pos,
323
+ next = null;
324
+ // Scan up from this position
325
+ for (let d = $pos.depth;; d--) {
326
+ let parent = $pos.node(d);
327
+ if (dir > 0 ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
328
+ next = parent.child(dir > 0 ? $pos.indexAfter(d) : $pos.index(d) - 1);
329
+ break;
330
+ } else if (d == 0) {
331
+ return null;
332
+ }
333
+ pos += dir;
334
+ let $cur = $pos.doc.resolve(pos);
335
+ if (GapCursor.valid($cur)) return $cur;
336
+ }
337
+ // And then down into the next node
338
+ for (;;) {
339
+ let inside = dir > 0 ? next.firstChild : next.lastChild;
340
+ if (!inside) {
341
+ if (next.isAtom && !next.isText && !NodeSelection.isSelectable(next)) {
342
+ $pos = $pos.doc.resolve(pos + next.nodeSize * dir);
343
+ mustMove = false;
344
+ continue search;
345
+ }
346
+ break;
347
+ }
348
+ next = inside;
349
+ pos += dir;
350
+ let $cur = $pos.doc.resolve(pos);
351
+ if (GapCursor.valid($cur)) return $cur;
352
+ }
353
+ return null;
354
+ }
355
+ }
356
+ }
357
+ GapCursor.prototype.visible = false;
358
+ GapCursor.findFrom = GapCursor.findGapCursorFrom;
359
+ Selection.jsonID("gapcursor", GapCursor);
360
+ class GapBookmark {
361
+ constructor(pos) {
362
+ this.pos = pos;
363
+ }
364
+ map(mapping) {
365
+ return new GapBookmark(mapping.map(this.pos));
366
+ }
367
+ resolve(doc) {
368
+ let $pos = doc.resolve(this.pos);
369
+ return GapCursor.valid($pos) ? new GapCursor($pos) : Selection.near($pos);
370
+ }
371
+ }
372
+ function closedBefore($pos) {
373
+ for (let d = $pos.depth; d >= 0; d--) {
374
+ let index = $pos.index(d),
375
+ parent = $pos.node(d);
376
+ // At the start of this parent, look at next one
377
+ if (index == 0) {
378
+ if (parent.type.spec.isolating) return true;
379
+ continue;
380
+ }
381
+ // See if the node before (or its first ancestor) is closed
382
+ for (let before = parent.child(index - 1);; before = before.lastChild) {
383
+ if (before.childCount == 0 && !before.inlineContent || before.isAtom || before.type.spec.isolating) return true;
384
+ if (before.inlineContent) return false;
385
+ }
386
+ }
387
+ // Hit start of document
388
+ return true;
389
+ }
390
+ function closedAfter($pos) {
391
+ for (let d = $pos.depth; d >= 0; d--) {
392
+ let index = $pos.indexAfter(d),
393
+ parent = $pos.node(d);
394
+ if (index == parent.childCount) {
395
+ if (parent.type.spec.isolating) return true;
396
+ continue;
397
+ }
398
+ for (let after = parent.child(index);; after = after.firstChild) {
399
+ if (after.childCount == 0 && !after.inlineContent || after.isAtom || after.type.spec.isolating) return true;
400
+ if (after.inlineContent) return false;
401
+ }
402
+ }
403
+ return true;
404
+ }
405
+
406
+ /**
407
+ Create a gap cursor plugin. When enabled, this will capture clicks
408
+ near and arrow-key-motion past places that don't have a normally
409
+ selectable position nearby, and create a gap cursor selection for
410
+ them. The cursor is drawn as an element with class
411
+ `ProseMirror-gapcursor`. You can either include
412
+ `style/gapcursor.css` from the package's directory or add your own
413
+ styles to make it visible.
414
+ */
415
+ function gapCursor() {
416
+ return new Plugin({
417
+ props: {
418
+ decorations: drawGapCursor,
419
+ createSelectionBetween(_view, $anchor, $head) {
420
+ return $anchor.pos == $head.pos && GapCursor.valid($head) ? new GapCursor($head) : null;
421
+ },
422
+ handleClick,
423
+ handleKeyDown,
424
+ handleDOMEvents: {
425
+ beforeinput: beforeinput
426
+ }
427
+ }
428
+ });
429
+ }
430
+ const handleKeyDown = keydownHandler({
431
+ "ArrowLeft": arrow("horiz", -1),
432
+ "ArrowRight": arrow("horiz", 1),
433
+ "ArrowUp": arrow("vert", -1),
434
+ "ArrowDown": arrow("vert", 1)
435
+ });
436
+ function arrow(axis, dir) {
437
+ const dirStr = axis == "vert" ? dir > 0 ? "down" : "up" : dir > 0 ? "right" : "left";
438
+ return function (state, dispatch, view) {
439
+ let sel = state.selection;
440
+ let $start = dir > 0 ? sel.$to : sel.$from,
441
+ mustMove = sel.empty;
442
+ if (sel instanceof TextSelection) {
443
+ if (!view.endOfTextblock(dirStr) || $start.depth == 0) return false;
444
+ mustMove = false;
445
+ $start = state.doc.resolve(dir > 0 ? $start.after() : $start.before());
446
+ }
447
+ let $found = GapCursor.findGapCursorFrom($start, dir, mustMove);
448
+ if (!$found) return false;
449
+ if (dispatch) dispatch(state.tr.setSelection(new GapCursor($found)));
450
+ return true;
451
+ };
452
+ }
453
+ function handleClick(view, pos, event) {
454
+ if (!view || !view.editable) return false;
455
+ let $pos = view.state.doc.resolve(pos);
456
+ if (!GapCursor.valid($pos)) return false;
457
+ let clickPos = view.posAtCoords({
458
+ left: event.clientX,
459
+ top: event.clientY
460
+ });
461
+ if (clickPos && clickPos.inside > -1 && NodeSelection.isSelectable(view.state.doc.nodeAt(clickPos.inside))) return false;
462
+ view.dispatch(view.state.tr.setSelection(new GapCursor($pos)));
463
+ return true;
464
+ }
465
+ // This is a hack that, when a composition starts while a gap cursor
466
+ // is active, quickly creates an inline context for the composition to
467
+ // happen in, to avoid it being aborted by the DOM selection being
468
+ // moved into a valid position.
469
+ function beforeinput(view, event) {
470
+ if (event.inputType != "insertCompositionText" || !(view.state.selection instanceof GapCursor)) return false;
471
+ let {
472
+ $from
473
+ } = view.state.selection;
474
+ let insert = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
475
+ if (!insert) return false;
476
+ let frag = Fragment.empty;
477
+ for (let i = insert.length - 1; i >= 0; i--) frag = Fragment.from(insert[i].createAndFill(null, frag));
478
+ let tr = view.state.tr.replace($from.pos, $from.pos, new Slice(frag, 0, 0));
479
+ tr.setSelection(TextSelection.near(tr.doc.resolve($from.pos + 1)));
480
+ view.dispatch(tr);
481
+ return false;
482
+ }
483
+ function drawGapCursor(state) {
484
+ if (!(state.selection instanceof GapCursor)) return null;
485
+ let node = document.createElement("div");
486
+ node.className = "ProseMirror-gapcursor";
487
+ return DecorationSet.create(state.doc, [Decoration.widget(state.selection.head, node, {
488
+ key: "gapcursor"
489
+ })]);
490
+ }
491
+
492
+ const Gapcursor = Extension.create({
493
+ name: 'gapCursor',
494
+ addProseMirrorPlugins() {
495
+ return [gapCursor()];
496
+ },
497
+ extendNodeSchema(extension) {
498
+ var _a;
499
+ const context = {
500
+ name: extension.name,
501
+ options: extension.options,
502
+ storage: extension.storage
503
+ };
504
+ return {
505
+ allowGapCursor: (_a = callOrReturn(getExtensionField(extension, 'allowGapCursor', context))) !== null && _a !== void 0 ? _a : null
506
+ };
507
+ }
508
+ });
509
+
510
+ const Heading = Node.create({
511
+ name: 'heading',
512
+ addOptions() {
513
+ return {
514
+ levels: [1, 2, 3, 4, 5, 6],
515
+ HTMLAttributes: {}
516
+ };
517
+ },
518
+ content: 'inline*',
519
+ group: 'block',
520
+ defining: true,
521
+ addAttributes() {
522
+ return {
523
+ level: {
524
+ default: 1,
525
+ rendered: false
526
+ }
527
+ };
528
+ },
529
+ parseHTML() {
530
+ return this.options.levels.map(level => ({
531
+ tag: `h${level}`,
532
+ attrs: {
533
+ level
534
+ }
535
+ }));
536
+ },
537
+ renderHTML(_ref) {
538
+ let {
539
+ node,
540
+ HTMLAttributes
541
+ } = _ref;
542
+ const hasLevel = this.options.levels.includes(node.attrs.level);
543
+ const level = hasLevel ? node.attrs.level : this.options.levels[0];
544
+ return [`h${level}`, mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
545
+ },
546
+ addCommands() {
547
+ return {
548
+ setHeading: attributes => _ref2 => {
549
+ let {
550
+ commands
551
+ } = _ref2;
552
+ if (!this.options.levels.includes(attributes.level)) {
553
+ return false;
554
+ }
555
+ return commands.setNode(this.name, attributes);
556
+ },
557
+ toggleHeading: attributes => _ref3 => {
558
+ let {
559
+ commands
560
+ } = _ref3;
561
+ if (!this.options.levels.includes(attributes.level)) {
562
+ return false;
563
+ }
564
+ return commands.toggleNode(this.name, 'paragraph', attributes);
565
+ }
566
+ };
567
+ },
568
+ addKeyboardShortcuts() {
569
+ return this.options.levels.reduce((items, level) => ({
570
+ ...items,
571
+ ...{
572
+ [`Mod-Alt-${level}`]: () => this.editor.commands.toggleHeading({
573
+ level
574
+ })
575
+ }
576
+ }), {});
577
+ },
578
+ addInputRules() {
579
+ return this.options.levels.map(level => {
580
+ return textblockTypeInputRule({
581
+ find: new RegExp(`^(#{1,${level}})\\s$`),
582
+ type: this.type,
583
+ getAttributes: {
584
+ level
585
+ }
586
+ });
587
+ });
588
+ }
589
+ });
590
+
591
+ var GOOD_LEAF_SIZE = 200;
592
+
593
+ // :: class<T> A rope sequence is a persistent sequence data structure
594
+ // that supports appending, prepending, and slicing without doing a
595
+ // full copy. It is represented as a mostly-balanced tree.
596
+ var RopeSequence = function RopeSequence() {};
597
+ RopeSequence.prototype.append = function append(other) {
598
+ if (!other.length) {
599
+ return this;
600
+ }
601
+ other = RopeSequence.from(other);
602
+ return !this.length && other || other.length < GOOD_LEAF_SIZE && this.leafAppend(other) || this.length < GOOD_LEAF_SIZE && other.leafPrepend(this) || this.appendInner(other);
603
+ };
604
+
605
+ // :: (union<[T], RopeSequence<T>>) → RopeSequence<T>
606
+ // Prepend an array or other rope to this one, returning a new rope.
607
+ RopeSequence.prototype.prepend = function prepend(other) {
608
+ if (!other.length) {
609
+ return this;
610
+ }
611
+ return RopeSequence.from(other).append(this);
612
+ };
613
+ RopeSequence.prototype.appendInner = function appendInner(other) {
614
+ return new Append(this, other);
615
+ };
616
+
617
+ // :: (?number, ?number) → RopeSequence<T>
618
+ // Create a rope repesenting a sub-sequence of this rope.
619
+ RopeSequence.prototype.slice = function slice(from, to) {
620
+ if (from === void 0) from = 0;
621
+ if (to === void 0) to = this.length;
622
+ if (from >= to) {
623
+ return RopeSequence.empty;
624
+ }
625
+ return this.sliceInner(Math.max(0, from), Math.min(this.length, to));
626
+ };
627
+
628
+ // :: (number) → T
629
+ // Retrieve the element at the given position from this rope.
630
+ RopeSequence.prototype.get = function get(i) {
631
+ if (i < 0 || i >= this.length) {
632
+ return undefined;
633
+ }
634
+ return this.getInner(i);
635
+ };
636
+
637
+ // :: ((element: T, index: number) → ?bool, ?number, ?number)
638
+ // Call the given function for each element between the given
639
+ // indices. This tends to be more efficient than looping over the
640
+ // indices and calling `get`, because it doesn't have to descend the
641
+ // tree for every element.
642
+ RopeSequence.prototype.forEach = function forEach(f, from, to) {
643
+ if (from === void 0) from = 0;
644
+ if (to === void 0) to = this.length;
645
+ if (from <= to) {
646
+ this.forEachInner(f, from, to, 0);
647
+ } else {
648
+ this.forEachInvertedInner(f, from, to, 0);
649
+ }
650
+ };
651
+
652
+ // :: ((element: T, index: number) → U, ?number, ?number) → [U]
653
+ // Map the given functions over the elements of the rope, producing
654
+ // a flat array.
655
+ RopeSequence.prototype.map = function map(f, from, to) {
656
+ if (from === void 0) from = 0;
657
+ if (to === void 0) to = this.length;
658
+ var result = [];
659
+ this.forEach(function (elt, i) {
660
+ return result.push(f(elt, i));
661
+ }, from, to);
662
+ return result;
663
+ };
664
+
665
+ // :: (?union<[T], RopeSequence<T>>) → RopeSequence<T>
666
+ // Create a rope representing the given array, or return the rope
667
+ // itself if a rope was given.
668
+ RopeSequence.from = function from(values) {
669
+ if (values instanceof RopeSequence) {
670
+ return values;
671
+ }
672
+ return values && values.length ? new Leaf(values) : RopeSequence.empty;
673
+ };
674
+ var Leaf = /*@__PURE__*/function (RopeSequence) {
675
+ function Leaf(values) {
676
+ RopeSequence.call(this);
677
+ this.values = values;
678
+ }
679
+ if (RopeSequence) Leaf.__proto__ = RopeSequence;
680
+ Leaf.prototype = Object.create(RopeSequence && RopeSequence.prototype);
681
+ Leaf.prototype.constructor = Leaf;
682
+ var prototypeAccessors = {
683
+ length: {
684
+ configurable: true
685
+ },
686
+ depth: {
687
+ configurable: true
688
+ }
689
+ };
690
+ Leaf.prototype.flatten = function flatten() {
691
+ return this.values;
692
+ };
693
+ Leaf.prototype.sliceInner = function sliceInner(from, to) {
694
+ if (from == 0 && to == this.length) {
695
+ return this;
696
+ }
697
+ return new Leaf(this.values.slice(from, to));
698
+ };
699
+ Leaf.prototype.getInner = function getInner(i) {
700
+ return this.values[i];
701
+ };
702
+ Leaf.prototype.forEachInner = function forEachInner(f, from, to, start) {
703
+ for (var i = from; i < to; i++) {
704
+ if (f(this.values[i], start + i) === false) {
705
+ return false;
706
+ }
707
+ }
708
+ };
709
+ Leaf.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {
710
+ for (var i = from - 1; i >= to; i--) {
711
+ if (f(this.values[i], start + i) === false) {
712
+ return false;
713
+ }
714
+ }
715
+ };
716
+ Leaf.prototype.leafAppend = function leafAppend(other) {
717
+ if (this.length + other.length <= GOOD_LEAF_SIZE) {
718
+ return new Leaf(this.values.concat(other.flatten()));
719
+ }
720
+ };
721
+ Leaf.prototype.leafPrepend = function leafPrepend(other) {
722
+ if (this.length + other.length <= GOOD_LEAF_SIZE) {
723
+ return new Leaf(other.flatten().concat(this.values));
724
+ }
725
+ };
726
+ prototypeAccessors.length.get = function () {
727
+ return this.values.length;
728
+ };
729
+ prototypeAccessors.depth.get = function () {
730
+ return 0;
731
+ };
732
+ Object.defineProperties(Leaf.prototype, prototypeAccessors);
733
+ return Leaf;
734
+ }(RopeSequence);
735
+
736
+ // :: RopeSequence
737
+ // The empty rope sequence.
738
+ RopeSequence.empty = new Leaf([]);
739
+ var Append = /*@__PURE__*/function (RopeSequence) {
740
+ function Append(left, right) {
741
+ RopeSequence.call(this);
742
+ this.left = left;
743
+ this.right = right;
744
+ this.length = left.length + right.length;
745
+ this.depth = Math.max(left.depth, right.depth) + 1;
746
+ }
747
+ if (RopeSequence) Append.__proto__ = RopeSequence;
748
+ Append.prototype = Object.create(RopeSequence && RopeSequence.prototype);
749
+ Append.prototype.constructor = Append;
750
+ Append.prototype.flatten = function flatten() {
751
+ return this.left.flatten().concat(this.right.flatten());
752
+ };
753
+ Append.prototype.getInner = function getInner(i) {
754
+ return i < this.left.length ? this.left.get(i) : this.right.get(i - this.left.length);
755
+ };
756
+ Append.prototype.forEachInner = function forEachInner(f, from, to, start) {
757
+ var leftLen = this.left.length;
758
+ if (from < leftLen && this.left.forEachInner(f, from, Math.min(to, leftLen), start) === false) {
759
+ return false;
760
+ }
761
+ if (to > leftLen && this.right.forEachInner(f, Math.max(from - leftLen, 0), Math.min(this.length, to) - leftLen, start + leftLen) === false) {
762
+ return false;
763
+ }
764
+ };
765
+ Append.prototype.forEachInvertedInner = function forEachInvertedInner(f, from, to, start) {
766
+ var leftLen = this.left.length;
767
+ if (from > leftLen && this.right.forEachInvertedInner(f, from - leftLen, Math.max(to, leftLen) - leftLen, start + leftLen) === false) {
768
+ return false;
769
+ }
770
+ if (to < leftLen && this.left.forEachInvertedInner(f, Math.min(from, leftLen), to, start) === false) {
771
+ return false;
772
+ }
773
+ };
774
+ Append.prototype.sliceInner = function sliceInner(from, to) {
775
+ if (from == 0 && to == this.length) {
776
+ return this;
777
+ }
778
+ var leftLen = this.left.length;
779
+ if (to <= leftLen) {
780
+ return this.left.slice(from, to);
781
+ }
782
+ if (from >= leftLen) {
783
+ return this.right.slice(from - leftLen, to - leftLen);
784
+ }
785
+ return this.left.slice(from, leftLen).append(this.right.slice(0, to - leftLen));
786
+ };
787
+ Append.prototype.leafAppend = function leafAppend(other) {
788
+ var inner = this.right.leafAppend(other);
789
+ if (inner) {
790
+ return new Append(this.left, inner);
791
+ }
792
+ };
793
+ Append.prototype.leafPrepend = function leafPrepend(other) {
794
+ var inner = this.left.leafPrepend(other);
795
+ if (inner) {
796
+ return new Append(inner, this.right);
797
+ }
798
+ };
799
+ Append.prototype.appendInner = function appendInner(other) {
800
+ if (this.left.depth >= Math.max(this.right.depth, other.depth) + 1) {
801
+ return new Append(this.left, new Append(this.right, other));
802
+ }
803
+ return new Append(this, other);
804
+ };
805
+ return Append;
806
+ }(RopeSequence);
807
+
808
+ // ProseMirror's history isn't simply a way to roll back to a previous
809
+ // state, because ProseMirror supports applying changes without adding
810
+ // them to the history (for example during collaboration).
811
+ //
812
+ // To this end, each 'Branch' (one for the undo history and one for
813
+ // the redo history) keeps an array of 'Items', which can optionally
814
+ // hold a step (an actual undoable change), and always hold a position
815
+ // map (which is needed to move changes below them to apply to the
816
+ // current document).
817
+ //
818
+ // An item that has both a step and a selection bookmark is the start
819
+ // of an 'event' — a group of changes that will be undone or redone at
820
+ // once. (It stores only the bookmark, since that way we don't have to
821
+ // provide a document until the selection is actually applied, which
822
+ // is useful when compressing.)
823
+ // Used to schedule history compression
824
+ const max_empty_items = 500;
825
+ class Branch {
826
+ constructor(items, eventCount) {
827
+ this.items = items;
828
+ this.eventCount = eventCount;
829
+ }
830
+ // Pop the latest event off the branch's history and apply it
831
+ // to a document transform.
832
+ popEvent(state, preserveItems) {
833
+ if (this.eventCount == 0) return null;
834
+ let end = this.items.length;
835
+ for (;; end--) {
836
+ let next = this.items.get(end - 1);
837
+ if (next.selection) {
838
+ --end;
839
+ break;
840
+ }
841
+ }
842
+ let remap, mapFrom;
843
+ if (preserveItems) {
844
+ remap = this.remapping(end, this.items.length);
845
+ mapFrom = remap.maps.length;
846
+ }
847
+ let transform = state.tr;
848
+ let selection, remaining;
849
+ let addAfter = [],
850
+ addBefore = [];
851
+ this.items.forEach((item, i) => {
852
+ if (!item.step) {
853
+ if (!remap) {
854
+ remap = this.remapping(end, i + 1);
855
+ mapFrom = remap.maps.length;
856
+ }
857
+ mapFrom--;
858
+ addBefore.push(item);
859
+ return;
860
+ }
861
+ if (remap) {
862
+ addBefore.push(new Item(item.map));
863
+ let step = item.step.map(remap.slice(mapFrom)),
864
+ map;
865
+ if (step && transform.maybeStep(step).doc) {
866
+ map = transform.mapping.maps[transform.mapping.maps.length - 1];
867
+ addAfter.push(new Item(map, undefined, undefined, addAfter.length + addBefore.length));
868
+ }
869
+ mapFrom--;
870
+ if (map) remap.appendMap(map, mapFrom);
871
+ } else {
872
+ transform.maybeStep(item.step);
873
+ }
874
+ if (item.selection) {
875
+ selection = remap ? item.selection.map(remap.slice(mapFrom)) : item.selection;
876
+ remaining = new Branch(this.items.slice(0, end).append(addBefore.reverse().concat(addAfter)), this.eventCount - 1);
877
+ return false;
878
+ }
879
+ }, this.items.length, 0);
880
+ return {
881
+ remaining: remaining,
882
+ transform,
883
+ selection: selection
884
+ };
885
+ }
886
+ // Create a new branch with the given transform added.
887
+ addTransform(transform, selection, histOptions, preserveItems) {
888
+ let newItems = [],
889
+ eventCount = this.eventCount;
890
+ let oldItems = this.items,
891
+ lastItem = !preserveItems && oldItems.length ? oldItems.get(oldItems.length - 1) : null;
892
+ for (let i = 0; i < transform.steps.length; i++) {
893
+ let step = transform.steps[i].invert(transform.docs[i]);
894
+ let item = new Item(transform.mapping.maps[i], step, selection),
895
+ merged;
896
+ if (merged = lastItem && lastItem.merge(item)) {
897
+ item = merged;
898
+ if (i) newItems.pop();else oldItems = oldItems.slice(0, oldItems.length - 1);
899
+ }
900
+ newItems.push(item);
901
+ if (selection) {
902
+ eventCount++;
903
+ selection = undefined;
904
+ }
905
+ if (!preserveItems) lastItem = item;
906
+ }
907
+ let overflow = eventCount - histOptions.depth;
908
+ if (overflow > DEPTH_OVERFLOW) {
909
+ oldItems = cutOffEvents(oldItems, overflow);
910
+ eventCount -= overflow;
911
+ }
912
+ return new Branch(oldItems.append(newItems), eventCount);
913
+ }
914
+ remapping(from, to) {
915
+ let maps = new Mapping();
916
+ this.items.forEach((item, i) => {
917
+ let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from ? maps.maps.length - item.mirrorOffset : undefined;
918
+ maps.appendMap(item.map, mirrorPos);
919
+ }, from, to);
920
+ return maps;
921
+ }
922
+ addMaps(array) {
923
+ if (this.eventCount == 0) return this;
924
+ return new Branch(this.items.append(array.map(map => new Item(map))), this.eventCount);
925
+ }
926
+ // When the collab module receives remote changes, the history has
927
+ // to know about those, so that it can adjust the steps that were
928
+ // rebased on top of the remote changes, and include the position
929
+ // maps for the remote changes in its array of items.
930
+ rebased(rebasedTransform, rebasedCount) {
931
+ if (!this.eventCount) return this;
932
+ let rebasedItems = [],
933
+ start = Math.max(0, this.items.length - rebasedCount);
934
+ let mapping = rebasedTransform.mapping;
935
+ let newUntil = rebasedTransform.steps.length;
936
+ let eventCount = this.eventCount;
937
+ this.items.forEach(item => {
938
+ if (item.selection) eventCount--;
939
+ }, start);
940
+ let iRebased = rebasedCount;
941
+ this.items.forEach(item => {
942
+ let pos = mapping.getMirror(--iRebased);
943
+ if (pos == null) return;
944
+ newUntil = Math.min(newUntil, pos);
945
+ let map = mapping.maps[pos];
946
+ if (item.step) {
947
+ let step = rebasedTransform.steps[pos].invert(rebasedTransform.docs[pos]);
948
+ let selection = item.selection && item.selection.map(mapping.slice(iRebased + 1, pos));
949
+ if (selection) eventCount++;
950
+ rebasedItems.push(new Item(map, step, selection));
951
+ } else {
952
+ rebasedItems.push(new Item(map));
953
+ }
954
+ }, start);
955
+ let newMaps = [];
956
+ for (let i = rebasedCount; i < newUntil; i++) newMaps.push(new Item(mapping.maps[i]));
957
+ let items = this.items.slice(0, start).append(newMaps).append(rebasedItems);
958
+ let branch = new Branch(items, eventCount);
959
+ if (branch.emptyItemCount() > max_empty_items) branch = branch.compress(this.items.length - rebasedItems.length);
960
+ return branch;
961
+ }
962
+ emptyItemCount() {
963
+ let count = 0;
964
+ this.items.forEach(item => {
965
+ if (!item.step) count++;
966
+ });
967
+ return count;
968
+ }
969
+ // Compressing a branch means rewriting it to push the air (map-only
970
+ // items) out. During collaboration, these naturally accumulate
971
+ // because each remote change adds one. The `upto` argument is used
972
+ // to ensure that only the items below a given level are compressed,
973
+ // because `rebased` relies on a clean, untouched set of items in
974
+ // order to associate old items with rebased steps.
975
+ compress() {
976
+ let upto = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.items.length;
977
+ let remap = this.remapping(0, upto),
978
+ mapFrom = remap.maps.length;
979
+ let items = [],
980
+ events = 0;
981
+ this.items.forEach((item, i) => {
982
+ if (i >= upto) {
983
+ items.push(item);
984
+ if (item.selection) events++;
985
+ } else if (item.step) {
986
+ let step = item.step.map(remap.slice(mapFrom)),
987
+ map = step && step.getMap();
988
+ mapFrom--;
989
+ if (map) remap.appendMap(map, mapFrom);
990
+ if (step) {
991
+ let selection = item.selection && item.selection.map(remap.slice(mapFrom));
992
+ if (selection) events++;
993
+ let newItem = new Item(map.invert(), step, selection),
994
+ merged,
995
+ last = items.length - 1;
996
+ if (merged = items.length && items[last].merge(newItem)) items[last] = merged;else items.push(newItem);
997
+ }
998
+ } else if (item.map) {
999
+ mapFrom--;
1000
+ }
1001
+ }, this.items.length, 0);
1002
+ return new Branch(RopeSequence.from(items.reverse()), events);
1003
+ }
1004
+ }
1005
+ Branch.empty = new Branch(RopeSequence.empty, 0);
1006
+ function cutOffEvents(items, n) {
1007
+ let cutPoint;
1008
+ items.forEach((item, i) => {
1009
+ if (item.selection && n-- == 0) {
1010
+ cutPoint = i;
1011
+ return false;
1012
+ }
1013
+ });
1014
+ return items.slice(cutPoint);
1015
+ }
1016
+ class Item {
1017
+ constructor(
1018
+ // The (forward) step map for this item.
1019
+ map,
1020
+ // The inverted step
1021
+ step,
1022
+ // If this is non-null, this item is the start of a group, and
1023
+ // this selection is the starting selection for the group (the one
1024
+ // that was active before the first step was applied)
1025
+ selection,
1026
+ // If this item is the inverse of a previous mapping on the stack,
1027
+ // this points at the inverse's offset
1028
+ mirrorOffset) {
1029
+ this.map = map;
1030
+ this.step = step;
1031
+ this.selection = selection;
1032
+ this.mirrorOffset = mirrorOffset;
1033
+ }
1034
+ merge(other) {
1035
+ if (this.step && other.step && !other.selection) {
1036
+ let step = other.step.merge(this.step);
1037
+ if (step) return new Item(step.getMap().invert(), step, this.selection);
1038
+ }
1039
+ }
1040
+ }
1041
+ // The value of the state field that tracks undo/redo history for that
1042
+ // state. Will be stored in the plugin state when the history plugin
1043
+ // is active.
1044
+ class HistoryState {
1045
+ constructor(done, undone, prevRanges, prevTime, prevComposition) {
1046
+ this.done = done;
1047
+ this.undone = undone;
1048
+ this.prevRanges = prevRanges;
1049
+ this.prevTime = prevTime;
1050
+ this.prevComposition = prevComposition;
1051
+ }
1052
+ }
1053
+ const DEPTH_OVERFLOW = 20;
1054
+ // Record a transformation in undo history.
1055
+ function applyTransaction(history, state, tr, options) {
1056
+ let historyTr = tr.getMeta(historyKey),
1057
+ rebased;
1058
+ if (historyTr) return historyTr.historyState;
1059
+ if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0, -1);
1060
+ let appended = tr.getMeta("appendedTransaction");
1061
+ if (tr.steps.length == 0) {
1062
+ return history;
1063
+ } else if (appended && appended.getMeta(historyKey)) {
1064
+ 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);
1065
+ } else if (tr.getMeta("addToHistory") !== false && !(appended && appended.getMeta("addToHistory") === false)) {
1066
+ // Group transforms that occur in quick succession into one event.
1067
+ let composition = tr.getMeta("composition");
1068
+ let newGroup = history.prevTime == 0 || !appended && history.prevComposition != composition && (history.prevTime < (tr.time || 0) - options.newGroupDelay || !isAdjacentTo(tr, history.prevRanges));
1069
+ let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]);
1070
+ 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);
1071
+ } else if (rebased = tr.getMeta("rebased")) {
1072
+ // Used by the collab module to tell the history that some of its
1073
+ // content has been rebased.
1074
+ return new HistoryState(history.done.rebased(tr, rebased), history.undone.rebased(tr, rebased), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);
1075
+ } else {
1076
+ return new HistoryState(history.done.addMaps(tr.mapping.maps), history.undone.addMaps(tr.mapping.maps), mapRanges(history.prevRanges, tr.mapping), history.prevTime, history.prevComposition);
1077
+ }
1078
+ }
1079
+ function isAdjacentTo(transform, prevRanges) {
1080
+ if (!prevRanges) return false;
1081
+ if (!transform.docChanged) return true;
1082
+ let adjacent = false;
1083
+ transform.mapping.maps[0].forEach((start, end) => {
1084
+ for (let i = 0; i < prevRanges.length; i += 2) if (start <= prevRanges[i + 1] && end >= prevRanges[i]) adjacent = true;
1085
+ });
1086
+ return adjacent;
1087
+ }
1088
+ function rangesFor(map) {
1089
+ let result = [];
1090
+ map.forEach((_from, _to, from, to) => result.push(from, to));
1091
+ return result;
1092
+ }
1093
+ function mapRanges(ranges, mapping) {
1094
+ if (!ranges) return null;
1095
+ let result = [];
1096
+ for (let i = 0; i < ranges.length; i += 2) {
1097
+ let from = mapping.map(ranges[i], 1),
1098
+ to = mapping.map(ranges[i + 1], -1);
1099
+ if (from <= to) result.push(from, to);
1100
+ }
1101
+ return result;
1102
+ }
1103
+ // Apply the latest event from one branch to the document and shift the event
1104
+ // onto the other branch.
1105
+ function histTransaction(history, state, dispatch, redo) {
1106
+ let preserveItems = mustPreserveItems(state);
1107
+ let histOptions = historyKey.get(state).spec.config;
1108
+ let pop = (redo ? history.undone : history.done).popEvent(state, preserveItems);
1109
+ if (!pop) return;
1110
+ let selection = pop.selection.resolve(pop.transform.doc);
1111
+ let added = (redo ? history.done : history.undone).addTransform(pop.transform, state.selection.getBookmark(), histOptions, preserveItems);
1112
+ let newHist = new HistoryState(redo ? added : pop.remaining, redo ? pop.remaining : added, null, 0, -1);
1113
+ dispatch(pop.transform.setSelection(selection).setMeta(historyKey, {
1114
+ redo,
1115
+ historyState: newHist
1116
+ }).scrollIntoView());
1117
+ }
1118
+ let cachedPreserveItems = false,
1119
+ cachedPreserveItemsPlugins = null;
1120
+ // Check whether any plugin in the given state has a
1121
+ // `historyPreserveItems` property in its spec, in which case we must
1122
+ // preserve steps exactly as they came in, so that they can be
1123
+ // rebased.
1124
+ function mustPreserveItems(state) {
1125
+ let plugins = state.plugins;
1126
+ if (cachedPreserveItemsPlugins != plugins) {
1127
+ cachedPreserveItems = false;
1128
+ cachedPreserveItemsPlugins = plugins;
1129
+ for (let i = 0; i < plugins.length; i++) if (plugins[i].spec.historyPreserveItems) {
1130
+ cachedPreserveItems = true;
1131
+ break;
1132
+ }
1133
+ }
1134
+ return cachedPreserveItems;
1135
+ }
1136
+ const historyKey = new PluginKey("history");
1137
+ const closeHistoryKey = new PluginKey("closeHistory");
1138
+ /**
1139
+ Returns a plugin that enables the undo history for an editor. The
1140
+ plugin will track undo and redo stacks, which can be used with the
1141
+ [`undo`](https://prosemirror.net/docs/ref/#history.undo) and [`redo`](https://prosemirror.net/docs/ref/#history.redo) commands.
1142
+
1143
+ You can set an `"addToHistory"` [metadata
1144
+ property](https://prosemirror.net/docs/ref/#state.Transaction.setMeta) of `false` on a transaction
1145
+ to prevent it from being rolled back by undo.
1146
+ */
1147
+ function history() {
1148
+ let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1149
+ config = {
1150
+ depth: config.depth || 100,
1151
+ newGroupDelay: config.newGroupDelay || 500
1152
+ };
1153
+ return new Plugin({
1154
+ key: historyKey,
1155
+ state: {
1156
+ init() {
1157
+ return new HistoryState(Branch.empty, Branch.empty, null, 0, -1);
1158
+ },
1159
+ apply(tr, hist, state) {
1160
+ return applyTransaction(hist, state, tr, config);
1161
+ }
1162
+ },
1163
+ config,
1164
+ props: {
1165
+ handleDOMEvents: {
1166
+ beforeinput(view, e) {
1167
+ let inputType = e.inputType;
1168
+ let command = inputType == "historyUndo" ? undo : inputType == "historyRedo" ? redo : null;
1169
+ if (!command) return false;
1170
+ e.preventDefault();
1171
+ return command(view.state, view.dispatch);
1172
+ }
1173
+ }
1174
+ }
1175
+ });
1176
+ }
1177
+ /**
1178
+ A command function that undoes the last change, if any.
1179
+ */
1180
+ const undo = (state, dispatch) => {
1181
+ let hist = historyKey.getState(state);
1182
+ if (!hist || hist.done.eventCount == 0) return false;
1183
+ if (dispatch) histTransaction(hist, state, dispatch, false);
1184
+ return true;
1185
+ };
1186
+ /**
1187
+ A command function that redoes the last undone change, if any.
1188
+ */
1189
+ const redo = (state, dispatch) => {
1190
+ let hist = historyKey.getState(state);
1191
+ if (!hist || hist.undone.eventCount == 0) return false;
1192
+ if (dispatch) histTransaction(hist, state, dispatch, true);
1193
+ return true;
1194
+ };
1195
+
1196
+ const History = Extension.create({
1197
+ name: 'history',
1198
+ addOptions() {
1199
+ return {
1200
+ depth: 100,
1201
+ newGroupDelay: 500
1202
+ };
1203
+ },
1204
+ addCommands() {
1205
+ return {
1206
+ undo: () => _ref => {
1207
+ let {
1208
+ state,
1209
+ dispatch
1210
+ } = _ref;
1211
+ return undo(state, dispatch);
1212
+ },
1213
+ redo: () => _ref2 => {
1214
+ let {
1215
+ state,
1216
+ dispatch
1217
+ } = _ref2;
1218
+ return redo(state, dispatch);
1219
+ }
1220
+ };
1221
+ },
1222
+ addProseMirrorPlugins() {
1223
+ return [history(this.options)];
1224
+ },
1225
+ addKeyboardShortcuts() {
1226
+ return {
1227
+ 'Mod-z': () => this.editor.commands.undo(),
1228
+ 'Mod-y': () => this.editor.commands.redo(),
1229
+ 'Shift-Mod-z': () => this.editor.commands.redo(),
1230
+ // Russian keyboard layouts
1231
+ 'Mod-я': () => this.editor.commands.undo(),
1232
+ 'Shift-Mod-я': () => this.editor.commands.redo()
1233
+ };
1234
+ }
1235
+ });
1236
+
1237
+ const HorizontalRule = Node.create({
1238
+ name: 'horizontalRule',
1239
+ addOptions() {
1240
+ return {
1241
+ HTMLAttributes: {}
1242
+ };
1243
+ },
1244
+ group: 'block',
1245
+ parseHTML() {
1246
+ return [{
1247
+ tag: 'hr'
1248
+ }];
1249
+ },
1250
+ renderHTML(_ref) {
1251
+ let {
1252
+ HTMLAttributes
1253
+ } = _ref;
1254
+ return ['hr', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes)];
1255
+ },
1256
+ addCommands() {
1257
+ return {
1258
+ setHorizontalRule: () => _ref2 => {
1259
+ let {
1260
+ chain
1261
+ } = _ref2;
1262
+ return chain().insertContent({
1263
+ type: this.name
1264
+ })
1265
+ // set cursor after horizontal rule
1266
+ .command(_ref3 => {
1267
+ let {
1268
+ tr,
1269
+ dispatch
1270
+ } = _ref3;
1271
+ var _a;
1272
+ if (dispatch) {
1273
+ const {
1274
+ $to
1275
+ } = tr.selection;
1276
+ const posAfter = $to.end();
1277
+ if ($to.nodeAfter) {
1278
+ tr.setSelection(TextSelection.create(tr.doc, $to.pos));
1279
+ } else {
1280
+ // add node after horizontal rule if it’s the end of the document
1281
+ const node = (_a = $to.parent.type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.create();
1282
+ if (node) {
1283
+ tr.insert(posAfter, node);
1284
+ tr.setSelection(TextSelection.create(tr.doc, posAfter));
1285
+ }
1286
+ }
1287
+ tr.scrollIntoView();
1288
+ }
1289
+ return true;
1290
+ }).run();
1291
+ }
1292
+ };
1293
+ },
1294
+ addInputRules() {
1295
+ return [nodeInputRule({
1296
+ find: /^(?:---|—-|___\s|\*\*\*\s)$/,
1297
+ type: this.type
1298
+ })];
1299
+ }
1300
+ });
1301
+
1302
+ const Text = Node.create({
1303
+ name: 'text',
1304
+ group: 'inline'
1305
+ });
1306
+
1307
+ const StarterKit = Extension.create({
1308
+ name: 'starterKit',
1309
+ addExtensions() {
1310
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
1311
+ const extensions = [];
1312
+ if (this.options.blockquote !== false) {
1313
+ extensions.push(Blockquote.configure((_a = this.options) === null || _a === void 0 ? void 0 : _a.blockquote));
1314
+ }
1315
+ if (this.options.bold !== false) {
1316
+ extensions.push(Bold.configure((_b = this.options) === null || _b === void 0 ? void 0 : _b.bold));
1317
+ }
1318
+ if (this.options.bulletList !== false) {
1319
+ extensions.push(BulletList.configure((_c = this.options) === null || _c === void 0 ? void 0 : _c.bulletList));
1320
+ }
1321
+ if (this.options.code !== false) {
1322
+ extensions.push(Code.configure((_d = this.options) === null || _d === void 0 ? void 0 : _d.code));
1323
+ }
1324
+ if (this.options.codeBlock !== false) {
1325
+ extensions.push(CodeBlock.configure((_e = this.options) === null || _e === void 0 ? void 0 : _e.codeBlock));
1326
+ }
1327
+ if (this.options.document !== false) {
1328
+ extensions.push(Document.configure((_f = this.options) === null || _f === void 0 ? void 0 : _f.document));
1329
+ }
1330
+ if (this.options.dropcursor !== false) {
1331
+ extensions.push(Dropcursor.configure((_g = this.options) === null || _g === void 0 ? void 0 : _g.dropcursor));
1332
+ }
1333
+ if (this.options.gapcursor !== false) {
1334
+ extensions.push(Gapcursor.configure((_h = this.options) === null || _h === void 0 ? void 0 : _h.gapcursor));
1335
+ }
1336
+ if (this.options.hardBreak !== false) {
1337
+ extensions.push(HardBreak.configure((_j = this.options) === null || _j === void 0 ? void 0 : _j.hardBreak));
1338
+ }
1339
+ if (this.options.heading !== false) {
1340
+ extensions.push(Heading.configure((_k = this.options) === null || _k === void 0 ? void 0 : _k.heading));
1341
+ }
1342
+ if (this.options.history !== false) {
1343
+ extensions.push(History.configure((_l = this.options) === null || _l === void 0 ? void 0 : _l.history));
1344
+ }
1345
+ if (this.options.horizontalRule !== false) {
1346
+ extensions.push(HorizontalRule.configure((_m = this.options) === null || _m === void 0 ? void 0 : _m.horizontalRule));
1347
+ }
1348
+ if (this.options.italic !== false) {
1349
+ extensions.push(Italic.configure((_o = this.options) === null || _o === void 0 ? void 0 : _o.italic));
1350
+ }
1351
+ if (this.options.listItem !== false) {
1352
+ extensions.push(ListItem.configure((_p = this.options) === null || _p === void 0 ? void 0 : _p.listItem));
1353
+ }
1354
+ if (this.options.orderedList !== false) {
1355
+ extensions.push(OrderedList.configure((_q = this.options) === null || _q === void 0 ? void 0 : _q.orderedList));
1356
+ }
1357
+ if (this.options.paragraph !== false) {
1358
+ extensions.push(Paragraph.configure((_r = this.options) === null || _r === void 0 ? void 0 : _r.paragraph));
1359
+ }
1360
+ if (this.options.strike !== false) {
1361
+ extensions.push(Strike.configure((_s = this.options) === null || _s === void 0 ? void 0 : _s.strike));
1362
+ }
1363
+ if (this.options.text !== false) {
1364
+ extensions.push(Text.configure((_t = this.options) === null || _t === void 0 ? void 0 : _t.text));
1365
+ }
1366
+ return extensions;
1367
+ }
1368
+ });
1369
+
1370
+ const Placeholder = Extension.create({
1371
+ name: 'placeholder',
1372
+ addOptions() {
1373
+ return {
1374
+ emptyEditorClass: 'is-editor-empty',
1375
+ emptyNodeClass: 'is-empty',
1376
+ placeholder: 'Write something …',
1377
+ showOnlyWhenEditable: true,
1378
+ showOnlyCurrent: true,
1379
+ includeChildren: false
1380
+ };
1381
+ },
1382
+ addProseMirrorPlugins() {
1383
+ return [new Plugin({
1384
+ key: new PluginKey('placeholder'),
1385
+ props: {
1386
+ decorations: _ref => {
1387
+ let {
1388
+ doc,
1389
+ selection
1390
+ } = _ref;
1391
+ const active = this.editor.isEditable || !this.options.showOnlyWhenEditable;
1392
+ const {
1393
+ anchor
1394
+ } = selection;
1395
+ const decorations = [];
1396
+ if (!active) {
1397
+ return null;
1398
+ }
1399
+ // only calculate isEmpty once due to its performance impacts (see issue #3360)
1400
+ const emptyDocInstance = doc.type.createAndFill();
1401
+ const isEditorEmpty = (emptyDocInstance === null || emptyDocInstance === void 0 ? void 0 : emptyDocInstance.sameMarkup(doc)) && emptyDocInstance.content.findDiffStart(doc.content) === null;
1402
+ doc.descendants((node, pos) => {
1403
+ const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;
1404
+ const isEmpty = !node.isLeaf && !node.childCount;
1405
+ if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
1406
+ const classes = [this.options.emptyNodeClass];
1407
+ if (isEditorEmpty) {
1408
+ classes.push(this.options.emptyEditorClass);
1409
+ }
1410
+ const decoration = Decoration.node(pos, pos + node.nodeSize, {
1411
+ class: classes.join(' '),
1412
+ 'data-placeholder': typeof this.options.placeholder === 'function' ? this.options.placeholder({
1413
+ editor: this.editor,
1414
+ node,
1415
+ pos,
1416
+ hasAnchor
1417
+ }) : this.options.placeholder
1418
+ });
1419
+ decorations.push(decoration);
1420
+ }
1421
+ return this.options.includeChildren;
1422
+ });
1423
+ return DecorationSet.create(doc, decorations);
1424
+ }
1425
+ }
1426
+ })];
1427
+ }
1428
+ });
1429
+
1430
+ var script = defineComponent({
1431
+ name: 'OrRichTextEditor',
1432
+ components: {
1433
+ OrIconButton: script$1,
1434
+ OrLabel: script$2,
1435
+ OrMenuItem: script$3,
1436
+ OrMenu: script$4,
1437
+ OrModal: script$5,
1438
+ OrInput: script$6,
1439
+ OrButton: script$7,
1440
+ OrPopover: script$8
1441
+ },
1442
+ inheritAttrs: false,
1443
+ model: {
1444
+ prop: 'modelValue',
1445
+ event: 'update:modelValue'
1446
+ },
1447
+ props: {
1448
+ modelValue: {
1449
+ type: String,
1450
+ default: undefined
1451
+ },
1452
+ toolbar: {
1453
+ type: Array,
1454
+ default: () => []
1455
+ },
1456
+ description: {
1457
+ type: String,
1458
+ default: ''
1459
+ },
1460
+ placeholder: {
1461
+ type: String,
1462
+ default: ''
1463
+ },
1464
+ autofocus: {
1465
+ type: Boolean,
1466
+ default: false
1467
+ },
1468
+ format: {
1469
+ type: String,
1470
+ default: Formats.Markup
1471
+ },
1472
+ fullHeight: {
1473
+ type: Boolean,
1474
+ default: false
1475
+ }
1476
+ },
1477
+ emits: ['update:modelValue', 'input', 'file-upload'],
1478
+ expose: ['root'],
1479
+ setup(props, context) {
1480
+ // Refs
1481
+ const root = ref();
1482
+ let editor = null;
1483
+ const editorRef = ref();
1484
+ const textareaRef = ref();
1485
+ const containerRef = ref();
1486
+ const toolbarRef = ref();
1487
+ const moreButtonRef = ref();
1488
+ const moreRef = ref();
1489
+ const toolbarButtonRef = ref();
1490
+ const menuRef = ref();
1491
+ // isActive should be set with default values for all toolbar buttons, otherwise it will not work in vue2
1492
+ const isActive = ref({
1493
+ bold: false,
1494
+ italic: false,
1495
+ underline: false,
1496
+ strike: false,
1497
+ bulletList: false,
1498
+ orderedList: false,
1499
+ link: false,
1500
+ highlight: false,
1501
+ redo: false,
1502
+ undo: false,
1503
+ codeBlock: false,
1504
+ blockquote: false,
1505
+ file: false,
1506
+ source: false
1507
+ });
1508
+ const isFocused = ref(props.autofocus);
1509
+ const headingLevels = [1, 2, 3, 4];
1510
+ const activeHeadingLevel = ref(0);
1511
+ const markdownOutput = ref('');
1512
+ const isOpenLinkModal = ref(false);
1513
+ const disableMarkdown = ref(false);
1514
+ const text = ref('');
1515
+ const link = ref('');
1516
+ const countOfNotVisibleTools = ref(0);
1517
+ const sourceValue = ref('');
1518
+ let trap = useFocusTrap(editorRef, {
1519
+ immediate: true,
1520
+ fallbackFocus: '.container',
1521
+ allowOutsideClick: true
1522
+ });
1523
+ const iconsEnum = ref({
1524
+ bold: 'format_bold',
1525
+ italic: 'format_italic',
1526
+ underline: 'format_underlined',
1527
+ strike: 'format_strikethrough',
1528
+ bulletList: 'format_list_bulleted',
1529
+ orderedList: 'format_list_numbered',
1530
+ link: 'link',
1531
+ highlight: 'highlight',
1532
+ redo: 'redo',
1533
+ undo: 'undo',
1534
+ codeBlock: 'code_blocks',
1535
+ blockquote: 'format_quote',
1536
+ file: 'attach_file',
1537
+ source: 'source_notes'
1538
+ });
1539
+ const iconTooltipsEnum = ref({
1540
+ bold: 'Bold',
1541
+ italic: 'Italic',
1542
+ underline: 'Underline',
1543
+ strike: 'Strike',
1544
+ bulletList: 'Bulleted List',
1545
+ orderedList: 'Numbered List',
1546
+ link: 'Link',
1547
+ highlight: 'Highlight',
1548
+ redo: 'Redo',
1549
+ undo: 'Undo',
1550
+ codeBlock: 'Code Block',
1551
+ blockquote: 'Quote',
1552
+ file: 'File',
1553
+ source: 'Source'
1554
+ });
1555
+ useResizeObserver(root, entries => {
1556
+ var _a, _b;
1557
+ const entry = entries[0];
1558
+ const {
1559
+ width
1560
+ } = entry.contentRect;
1561
+ if (containerRef.value && toolbarRef.value && toolbarLength.value) {
1562
+ let lengthOfItem = 0;
1563
+ lengthOfItem = ((_b = (_a = toolbarRef.value.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild) === null || _b === void 0 ? void 0 : _b.offsetWidth) + 16;
1564
+ const count = width / lengthOfItem - 2;
1565
+ countOfNotVisibleTools.value = Math.round(toolbarLength.value - count);
1566
+ }
1567
+ });
1568
+ onMounted(() => {
1569
+ editor = new Editor({
1570
+ onUpdate: _ref => {
1571
+ let {
1572
+ editor
1573
+ } = _ref;
1574
+ isFocused.value = true;
1575
+ setActiveFormats();
1576
+ const html = editor.getHTML();
1577
+ const text = editor.getText();
1578
+ if (props.format === 'markdown') {
1579
+ markdownOutput.value = serialize(editor.schema, editor.getJSON());
1580
+ proxyModelValue.value = markdownOutput.value;
1581
+ } else {
1582
+ proxyModelValue.value = text === '' ? text : html;
1583
+ }
1584
+ },
1585
+ onCreate: _ref2 => {
1586
+ let {
1587
+ editor
1588
+ } = _ref2;
1589
+ if (props.format === 'markdown') {
1590
+ const deserialized = deserialize(editor.schema, proxyModelValue.value);
1591
+ editor.commands.setContent(deserialized);
1592
+ } else {
1593
+ editor.commands.setContent(proxyModelValue.value);
1594
+ }
1595
+ },
1596
+ element: editorRef.value,
1597
+ autofocus: props.autofocus,
1598
+ enableInputRules: true,
1599
+ enablePasteRules: true,
1600
+ extensions: [codemirrorNode, StarterKit.configure({
1601
+ heading: false,
1602
+ codeBlock: false,
1603
+ paragraph: false,
1604
+ bulletList: false,
1605
+ orderedList: false,
1606
+ blockquote: false
1607
+ }), Paragraph.configure({
1608
+ HTMLAttributes: {
1609
+ class: 'my-xs'
1610
+ }
1611
+ }), BulletList.configure({
1612
+ HTMLAttributes: {
1613
+ class: 'mx-lg my-xs list-disc'
1614
+ }
1615
+ }), OrderedList.configure({
1616
+ HTMLAttributes: {
1617
+ class: 'mx-lg my-xs list-decimal'
1618
+ }
1619
+ }), Blockquote.configure({
1620
+ HTMLAttributes: {
1621
+ class: 'my-sm mx-lg px-lg border-l-2 border-outline'
1622
+ }
1623
+ }), Heading.configure({
1624
+ levels: headingLevels
1625
+ }).extend({
1626
+ levels: headingLevels,
1627
+ renderHTML(_ref3) {
1628
+ let {
1629
+ node,
1630
+ HTMLAttributes
1631
+ } = _ref3;
1632
+ return ['h' + node.attrs.level, mergeAttributes(HTMLAttributes, {
1633
+ class: `typography-headline-${node.attrs.level} my-xs`
1634
+ }), 0];
1635
+ }
1636
+ }), Underline, Link.configure({
1637
+ openOnClick: true,
1638
+ linkOnPaste: true,
1639
+ autolink: false,
1640
+ protocols: ['ftp', 'mailto', 'http', 'https'],
1641
+ validate: href => /^https?:\/\//.test(href),
1642
+ HTMLAttributes: {
1643
+ class: 'text-primary cursor-pointer'
1644
+ }
1645
+ }), Highlight, Placeholder.configure({
1646
+ placeholder: props.placeholder,
1647
+ emptyEditorClass: 'is-editor-empty text-outline'
1648
+ })],
1649
+ editorProps: {
1650
+ attributes: {
1651
+ class: 'flex flex-col focus:outline-none gap-xs'
1652
+ }
1653
+ },
1654
+ parseOptions: {
1655
+ preserveWhitespace: true
1656
+ }
1657
+ });
1658
+ setActiveFormats();
1659
+ trap.activate();
1660
+ });
1661
+ onBeforeUnmount(() => {
1662
+ editor === null || editor === void 0 ? void 0 : editor.destroy();
1663
+ });
1664
+ onClickOutside(root, () => {
1665
+ isFocused.value = false;
1666
+ trap.deactivate();
1667
+ });
1668
+ // Computed
1669
+ const proxyModelValue = computed({
1670
+ get: () => {
1671
+ return props.modelValue;
1672
+ },
1673
+ set: value => {
1674
+ context.emit('input', value);
1675
+ context.emit('update:modelValue', value);
1676
+ }
1677
+ });
1678
+ const getIndexOfHeading = computed(() => {
1679
+ return props.toolbar.flat().indexOf('heading');
1680
+ });
1681
+ const headingIcon = computed(() => {
1682
+ if (activeHeadingLevel.value && isActive.value.heading) {
1683
+ return `format_h${activeHeadingLevel.value}`;
1684
+ }
1685
+ return 'format_paragraph';
1686
+ });
1687
+ const toolbarLength = computed(() => {
1688
+ return props.toolbar.flat().length;
1689
+ });
1690
+ const notVisibleTools = computed(() => {
1691
+ const count = countOfNotVisibleTools.value;
1692
+ const toolbar = props.toolbar.flat();
1693
+ let notVisible = new Set(toolbar.slice(toolbar.length - count, toolbar.length));
1694
+ props.toolbar.forEach(tools => {
1695
+ if (tools.some(item => notVisible.has(item))) {
1696
+ tools.forEach(item => notVisible.add(item));
1697
+ }
1698
+ });
1699
+ return notVisible;
1700
+ });
1701
+ //Methods
1702
+ const handleEditorClick = () => {
1703
+ var _a;
1704
+ setActiveFormats();
1705
+ isFocused.value = true;
1706
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
1707
+ activeHeadingLevel.value = ((_a = editor === null || editor === void 0 ? void 0 : editor.getAttributes('heading')) === null || _a === void 0 ? void 0 : _a.level) || 0;
1708
+ };
1709
+ const isVisible = value => {
1710
+ if (Array.isArray(value)) {
1711
+ const isHaveNotVisibleTools = value.some(item => notVisibleTools.value.has(item));
1712
+ return isHaveNotVisibleTools;
1713
+ }
1714
+ return !notVisibleTools.value.has(value);
1715
+ };
1716
+ const handleInput = event => {
1717
+ const target = event.target;
1718
+ const value = target.value;
1719
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value));
1720
+ markdownOutput.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
1721
+ proxyModelValue.value = markdownOutput.value;
1722
+ };
1723
+ const handleToolbarClick = (item, level) => {
1724
+ var _a, _b;
1725
+ switch (item) {
1726
+ case 'source':
1727
+ disableMarkdown.value = !disableMarkdown.value;
1728
+ sourceValue.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
1729
+ nextTick(() => {
1730
+ var _a;
1731
+ return (_a = textareaRef.value) === null || _a === void 0 ? void 0 : _a.focus();
1732
+ });
1733
+ break;
1734
+ case 'bulletList':
1735
+ case 'orderedList':
1736
+ item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
1737
+ break;
1738
+ case 'link':
1739
+ if (editor) {
1740
+ const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
1741
+ const {
1742
+ from,
1743
+ to,
1744
+ empty
1745
+ } = editor.state.selection;
1746
+ const isLink = (_a = editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
1747
+ 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) || '' : '';
1748
+ text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
1749
+ link.value = editor.getAttributes('link').href || '';
1750
+ }
1751
+ isOpenLinkModal.value = !isOpenLinkModal.value;
1752
+ break;
1753
+ case 'blockquote':
1754
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
1755
+ break;
1756
+ case 'codeBlock':
1757
+ if (!isActive.value['codeBlock']) {
1758
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
1759
+ language: 'javascript'
1760
+ });
1761
+ } else {
1762
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
1763
+ }
1764
+ break;
1765
+ case 'heading':
1766
+ if (!level) {
1767
+ editor === null || editor === void 0 ? void 0 : editor.commands.setParagraph();
1768
+ activeHeadingLevel.value = 0;
1769
+ } else {
1770
+ activeHeadingLevel.value = level;
1771
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
1772
+ level: level
1773
+ });
1774
+ }
1775
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
1776
+ break;
1777
+ case 'undo':
1778
+ case 'redo':
1779
+ item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
1780
+ break;
1781
+ case 'file':
1782
+ context.emit('file-upload');
1783
+ break;
1784
+ default:
1785
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
1786
+ break;
1787
+ }
1788
+ };
1789
+ const attachLink = async () => {
1790
+ var _a, _b;
1791
+ // empty
1792
+ if (link.value === '') {
1793
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
1794
+ }
1795
+ const isEmptySelection = editor === null || editor === void 0 ? void 0 : editor.state.selection.empty;
1796
+ const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
1797
+ 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');
1798
+ 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 : '';
1799
+ if (link.value && isEmptySelection && !existedText) {
1800
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
1801
+ href: link.value,
1802
+ target: '__blank'
1803
+ }).command(_ref4 => {
1804
+ let {
1805
+ tr
1806
+ } = _ref4;
1807
+ const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
1808
+ tr.insertText(preparedValue);
1809
+ return true;
1810
+ }).run();
1811
+ }
1812
+ if (link.value && existedText === text.value && isEmptySelection) {
1813
+ editor === null || editor === void 0 ? void 0 : editor.chain().extendMarkRange('link').updateAttributes('link', {
1814
+ href: link.value
1815
+ }).run();
1816
+ }
1817
+ if (link.value && !isEmptySelection) {
1818
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
1819
+ href: link.value,
1820
+ target: '__blank'
1821
+ }).run();
1822
+ }
1823
+ text.value = '';
1824
+ link.value = '';
1825
+ isOpenLinkModal.value = false;
1826
+ };
1827
+ const discardLink = () => {
1828
+ isOpenLinkModal.value = false;
1829
+ };
1830
+ const setActiveFormats = () => {
1831
+ const toolbarList = props.toolbar.flat();
1832
+ toolbarList.forEach(item => {
1833
+ if (item === 'source') {
1834
+ isActive.value[item] = disableMarkdown.value;
1835
+ } else {
1836
+ isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
1837
+ }
1838
+ });
1839
+ };
1840
+ // Styles
1841
+ const rootStyles = computed(() => {
1842
+ return ['or-rich-text-editor', ...(props.fullHeight ? ['h-full'] : [])];
1843
+ });
1844
+ const containerStyles = computed(() => {
1845
+ return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
1846
+ });
1847
+ const toolbarContainerStyles = computed(() => {
1848
+ return [...ToolbarContainer];
1849
+ });
1850
+ const toolbarStyles = computed(() => {
1851
+ return [...Toolbar,
1852
+ // 'overflow-x-hidden',
1853
+ ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
1854
+ });
1855
+ const editorInputStyles = computed(() => {
1856
+ return ['tiptap-editor-v3', ...(props.fullHeight ? ['h-full overflow-y-auto'] : []), ...EditorInput];
1857
+ });
1858
+ //Effects
1859
+ watch(proxyModelValue, value => {
1860
+ if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && props.format !== 'markdown') {
1861
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
1862
+ }
1863
+ if (props.format === 'markdown' && value !== markdownOutput.value) {
1864
+ //TODO: const deserialized = deserialize(editor?.schema, value);
1865
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
1866
+ }
1867
+ });
1868
+ return {
1869
+ editor,
1870
+ editorRef,
1871
+ toolbarRef,
1872
+ containerRef,
1873
+ toolbarButtonRef,
1874
+ moreButtonRef,
1875
+ textareaRef,
1876
+ moreRef,
1877
+ menuRef,
1878
+ iconsEnum,
1879
+ handleToolbarClick,
1880
+ handleEditorClick,
1881
+ isActive,
1882
+ iconTooltipsEnum,
1883
+ containerStyles,
1884
+ toolbarContainerStyles,
1885
+ toolbarStyles,
1886
+ rootStyles,
1887
+ root,
1888
+ editorInputStyles,
1889
+ getIndexOfHeading,
1890
+ headingLevels,
1891
+ headingIcon,
1892
+ attachLink,
1893
+ discardLink,
1894
+ isOpenLinkModal,
1895
+ text,
1896
+ link,
1897
+ isFocused,
1898
+ isVisible,
1899
+ countOfNotVisibleTools,
1900
+ notVisibleTools,
1901
+ handleInput,
1902
+ proxyModelValue,
1903
+ disableMarkdown,
1904
+ sourceValue
1905
+ };
1906
+ }
1907
+ });
1908
+
1909
+ export { script as s };