@onereach/ui-components 4.5.1 → 4.6.0-beta.2748.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 (418) hide show
  1. package/dist/bundled/v2/components/OrCode/OrCode.js +6 -3792
  2. package/dist/bundled/v2/components/OrCode/index.js +6 -2
  3. package/dist/bundled/v2/components/OrCode/lang.js +3941 -3
  4. package/dist/bundled/v2/components/OrCode/theme.js +2 -1
  5. package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +2 -1
  6. package/dist/bundled/v2/components/OrConfirm/index.js +2 -1
  7. package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +1 -1
  8. package/dist/bundled/v2/components/OrConfirmV3/index.js +1 -1
  9. package/dist/bundled/v2/components/OrModal/OrModal.js +3 -1346
  10. package/dist/bundled/v2/components/OrModal/index.js +1 -0
  11. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +2196 -0
  12. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +220 -0
  13. package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +2 -0
  14. package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +70 -0
  15. package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +4 -0
  16. package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +7 -0
  17. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +6 -0
  18. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +38 -0
  19. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
  20. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +46 -0
  21. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
  22. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +184 -0
  23. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
  24. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +5 -0
  25. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
  26. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
  27. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
  28. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
  29. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
  30. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +5 -0
  31. package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
  32. package/dist/bundled/v2/components/OrTextarea/OrTextarea.vue.d.ts +2 -2
  33. package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
  34. package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
  35. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +2 -2
  36. package/dist/bundled/v2/components/OrToast/OrToast.vue.d.ts +2 -2
  37. package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
  38. package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
  39. package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
  40. package/dist/bundled/v2/components/index.d.ts +1 -0
  41. package/dist/bundled/v2/components/index.js +17 -3
  42. package/dist/bundled/{v3/index-cf2c3c27.js → v2/index-0d224ae5.js} +3 -115
  43. package/dist/bundled/v2/index-418d5c0d.js +9633 -0
  44. package/dist/bundled/v2/index-85c2efe8.js +7122 -0
  45. package/dist/bundled/{v3/OrCode.vue_vue_type_script_lang-74060519.js → v2/index-d92d0b48.js} +14 -235
  46. package/dist/bundled/{v3/lang-0fb8f78b.js → v2/index-e9f6b2d8.js} +73 -4009
  47. package/dist/bundled/v2/index.es-3f39f316.js +115 -0
  48. package/dist/bundled/v2/index.js +20 -6
  49. package/dist/bundled/v2/markdown-7c7c4ca6.js +17980 -0
  50. package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-ae842e5b.js → v2/useFocusTrap-48767a70.js} +3 -106
  51. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-7e29b3d0.js +237 -0
  52. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-e1390930.js → OrConfirm.vue_vue_type_script_lang-13397889.js} +1 -1
  53. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-e5a8f92a.js → OrConfirm.vue_vue_type_script_lang-4eaa8470.js} +2 -2
  54. package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-2c009ee0.js +108 -0
  55. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-ece43c52.js +1887 -0
  56. package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +26 -11
  57. package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +24 -8
  58. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +33 -20
  59. package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +51 -16
  60. package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +57 -20
  61. package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +35 -15
  62. package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +15 -7
  63. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +47 -21
  64. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +70 -22
  65. package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +7 -4
  66. package/dist/bundled/v3/components/OrCarousel/OrCarousel.vue.d.ts +676 -126
  67. package/dist/bundled/v3/components/OrCarouselItem/OrCarouselItem.vue.d.ts +1 -1
  68. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +35 -15
  69. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +24 -6
  70. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +43 -17
  71. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +53 -23
  72. package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +25 -9
  73. package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +51 -24
  74. package/dist/bundled/v3/components/OrCode/OrCode.js +10 -6
  75. package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +69 -24
  76. package/dist/bundled/v3/components/OrCode/index.js +8 -4
  77. package/dist/bundled/v3/components/OrCode/lang.js +3941 -3
  78. package/dist/bundled/v3/components/OrCode/theme.js +2 -1
  79. package/dist/bundled/v3/components/OrCollapse/OrCollapse.vue.d.ts +39 -17
  80. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +31 -13
  81. package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +30 -8
  82. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +5 -4
  83. package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +84 -23
  84. package/dist/bundled/v3/components/OrConfirm/index.js +4 -3
  85. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +3 -3
  86. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +91 -29
  87. package/dist/bundled/v3/components/OrConfirmV3/index.js +2 -2
  88. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +81 -25
  89. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +177 -68
  90. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +105 -31
  91. package/dist/bundled/v3/components/OrEmptyStateV3/OrEmptyState.vue.d.ts +28 -11
  92. package/dist/bundled/v3/components/OrError/OrError.vue.d.ts +8 -4
  93. package/dist/bundled/v3/components/OrErrorTagV3/OrErrorTag.vue.d.ts +7 -4
  94. package/dist/bundled/v3/components/OrErrorV3/OrError.vue.d.ts +18 -9
  95. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +35 -14
  96. package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +20 -8
  97. package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +46 -15
  98. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +30 -10
  99. package/dist/bundled/v3/components/OrHint/OrHint.vue.d.ts +8 -4
  100. package/dist/bundled/v3/components/OrHintV3/OrHint.vue.d.ts +18 -9
  101. package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +44 -16
  102. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +43 -13
  103. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +52 -16
  104. package/dist/bundled/v3/components/OrIconV3/OrIcon.vue.d.ts +18 -7
  105. package/dist/bundled/v3/components/OrInlineInputBoxV3/OrInlineInputBox.vue.d.ts +16 -7
  106. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +83 -39
  107. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +95 -43
  108. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +79 -39
  109. package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +87 -36
  110. package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +22 -7
  111. package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +85 -34
  112. package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +20 -9
  113. package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +24 -9
  114. package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +24 -7
  115. package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +47 -21
  116. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +27 -11
  117. package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +26 -10
  118. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +34 -13
  119. package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +34 -13
  120. package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +43 -16
  121. package/dist/bundled/v3/components/OrModal/OrModal.js +3 -2
  122. package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +38 -14
  123. package/dist/bundled/v3/components/OrModal/index.js +2 -1
  124. package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +31 -15
  125. package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +27 -9
  126. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +20 -9
  127. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +70 -24
  128. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +31 -13
  129. package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +16 -6
  130. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +14 -7
  131. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +75 -27
  132. package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +63 -22
  133. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +76 -28
  134. package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +56 -20
  135. package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +62 -25
  136. package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +35 -13
  137. package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.vue.d.ts +26 -9
  138. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +32 -6
  139. package/dist/bundled/v3/components/OrRadioV3/OrRadio.vue.d.ts +49 -21
  140. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +283 -0
  141. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +220 -0
  142. package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +2 -0
  143. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +86 -0
  144. package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +4 -0
  145. package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +7 -0
  146. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +6 -0
  147. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +38 -0
  148. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
  149. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +46 -0
  150. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
  151. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +184 -0
  152. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
  153. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +5 -0
  154. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
  155. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
  156. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
  157. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
  158. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
  159. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +5 -0
  160. package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +65 -23
  161. package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +41 -17
  162. package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +25 -9
  163. package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +77 -28
  164. package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +115 -37
  165. package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +33 -14
  166. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +63 -28
  167. package/dist/bundled/v3/components/OrSkeletonCircle/OrSkeletonCircle.vue.d.ts +20 -9
  168. package/dist/bundled/v3/components/OrSkeletonCircleV3/OrSkeletonCircle.vue.d.ts +28 -13
  169. package/dist/bundled/v3/components/OrSkeletonRect/OrSkeletonRect.vue.d.ts +22 -9
  170. package/dist/bundled/v3/components/OrSkeletonRectV3/OrSkeletonRect.vue.d.ts +26 -11
  171. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +26 -10
  172. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +40 -16
  173. package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +91 -35
  174. package/dist/bundled/v3/components/OrSortHeaderV3/OrSortHeader.vue.d.ts +25 -13
  175. package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +43 -16
  176. package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +33 -12
  177. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +53 -22
  178. package/dist/bundled/v3/components/OrTab/OrTab.vue.d.ts +22 -9
  179. package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.vue.d.ts +29 -13
  180. package/dist/bundled/v3/components/OrTabV3/OrTab.vue.d.ts +17 -10
  181. package/dist/bundled/v3/components/OrTabs/OrTabs.vue.d.ts +17 -4
  182. package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +71 -25
  183. package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +27 -10
  184. package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +23 -12
  185. package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +63 -19
  186. package/dist/bundled/v3/components/OrTeleport/OrTeleport.vue3.vue.d.ts +10 -4
  187. package/dist/bundled/v3/components/OrTeleportV3/OrTeleport.vue3.vue.d.ts +10 -4
  188. package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +24 -11
  189. package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +85 -37
  190. package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +73 -32
  191. package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +137 -55
  192. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +79 -25
  193. package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +31 -11
  194. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +55 -25
  195. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +54 -24
  196. package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +38 -16
  197. package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +33 -14
  198. package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +10 -4
  199. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +37 -13
  200. package/dist/bundled/v3/components/index.d.ts +1 -0
  201. package/dist/bundled/v3/components/index.js +22 -7
  202. package/dist/bundled/v3/directives/dropdown-close.d.ts +1 -3
  203. package/dist/bundled/v3/directives/dropdown-open.d.ts +1 -3
  204. package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  205. package/dist/bundled/{v2/index-cf2c3c27.js → v3/index-0d224ae5.js} +3 -115
  206. package/dist/bundled/v3/index-418d5c0d.js +9633 -0
  207. package/dist/bundled/v3/index-85c2efe8.js +7122 -0
  208. package/dist/bundled/v3/index-d92d0b48.js +3805 -0
  209. package/dist/bundled/{v2/lang-0fb8f78b.js → v3/index-e9f6b2d8.js} +73 -4009
  210. package/dist/bundled/v3/index.es-3f39f316.js +115 -0
  211. package/dist/bundled/v3/index.js +26 -11
  212. package/dist/bundled/v3/markdown-7c7c4ca6.js +17980 -0
  213. package/dist/bundled/v3/useFocusTrap-48767a70.js +1348 -0
  214. package/dist/esm/v2/OrRichTextEditor-e9989dec.js +919 -0
  215. package/dist/esm/v2/codemirrorView-be2c7423.js +353 -0
  216. package/dist/esm/v2/components/index.d.ts +1 -0
  217. package/dist/esm/v2/components/index.js +24 -0
  218. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +220 -0
  219. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +2 -0
  220. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +59 -0
  221. package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +4 -0
  222. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  223. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
  224. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
  225. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
  226. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +7 -0
  227. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
  228. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
  229. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
  230. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +2 -2
  231. package/dist/esm/v2/components/or-textarea/OrTextarea.vue.d.ts +2 -2
  232. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +2 -2
  233. package/dist/esm/v2/components/or-textbox/OrTextbox.vue.d.ts +2 -2
  234. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +2 -2
  235. package/dist/esm/v2/components/or-toast/OrToast.vue.d.ts +2 -2
  236. package/dist/esm/v2/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +2 -2
  237. package/dist/esm/v2/components/or-toast-v3/OrToast.vue.d.ts +2 -2
  238. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
  239. package/dist/esm/v2/components/or-tooltip/OrTooltip.vue.d.ts +2 -2
  240. package/dist/esm/v2/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +2 -2
  241. package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +2 -2
  242. package/dist/esm/v2/index.js +24 -0
  243. package/dist/esm/v3/OrRichTextEditor-d6b69fcd.js +852 -0
  244. package/dist/esm/v3/codemirrorView-be2c7423.js +353 -0
  245. package/dist/esm/v3/components/index.d.ts +1 -0
  246. package/dist/esm/v3/components/index.js +24 -0
  247. package/dist/esm/v3/components/or-avatar/OrAvatar.vue.d.ts +26 -11
  248. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +24 -8
  249. package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +33 -20
  250. package/dist/esm/v3/components/or-button/OrButton.vue.d.ts +51 -16
  251. package/dist/esm/v3/components/or-button-v2/OrButton.vue.d.ts +57 -20
  252. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +35 -15
  253. package/dist/esm/v3/components/or-card/OrCard.vue.d.ts +15 -7
  254. package/dist/esm/v3/components/or-card-collection/OrCardCollection.vue.d.ts +47 -21
  255. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +70 -22
  256. package/dist/esm/v3/components/or-card-collection-v3/partials/OrCardCollectionView.vue3.vue.d.ts +14 -6
  257. package/dist/esm/v3/components/or-card-v3/OrCard.vue.d.ts +7 -4
  258. package/dist/esm/v3/components/or-carousel/OrCarousel.vue.d.ts +676 -126
  259. package/dist/esm/v3/components/or-carousel/or-carousel-item/OrCarouselItem.vue.d.ts +1 -1
  260. package/dist/esm/v3/components/or-checkbox/OrCheckbox.vue.d.ts +35 -15
  261. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +24 -6
  262. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +43 -17
  263. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +53 -23
  264. package/dist/esm/v3/components/or-chips/OrChips.vue.d.ts +51 -24
  265. package/dist/esm/v3/components/or-chips/or-chip/OrChip.vue.d.ts +25 -9
  266. package/dist/esm/v3/components/or-chips/partials/OrChipsInput.vue.d.ts +37 -17
  267. package/dist/esm/v3/components/or-code/OrCode.vue.d.ts +69 -24
  268. package/dist/esm/v3/components/or-collapse/OrCollapse.vue.d.ts +39 -17
  269. package/dist/esm/v3/components/or-color-picker/OrColorPicker.vue.d.ts +31 -13
  270. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +30 -8
  271. package/dist/esm/v3/components/or-confirm/OrConfirm.vue.d.ts +84 -23
  272. package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +91 -29
  273. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +81 -25
  274. package/dist/esm/v3/components/or-date-time-picker/OrDateTimePicker.vue.d.ts +177 -68
  275. package/dist/esm/v3/components/or-date-time-picker/partials/OrDateTimePickerCalendarItem.vue.d.ts +33 -12
  276. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +105 -31
  277. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +28 -11
  278. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +39 -17
  279. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +15 -7
  280. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +85 -23
  281. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +11 -7
  282. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +7 -4
  283. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +28 -11
  284. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +37 -15
  285. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +28 -11
  286. package/dist/esm/v3/components/or-error/OrError.vue.d.ts +8 -4
  287. package/dist/esm/v3/components/or-error-tag-v3/OrErrorTag.vue.d.ts +7 -4
  288. package/dist/esm/v3/components/or-error-v3/OrError.vue.d.ts +18 -9
  289. package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +35 -14
  290. package/dist/esm/v3/components/or-fab-v3/OrFab.vue.d.ts +20 -8
  291. package/dist/esm/v3/components/or-floating/OrFloating.vue.d.ts +46 -15
  292. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +30 -10
  293. package/dist/esm/v3/components/or-hint/OrHint.vue.d.ts +8 -4
  294. package/dist/esm/v3/components/or-hint-v3/OrHint.vue.d.ts +18 -9
  295. package/dist/esm/v3/components/or-icon/OrIcon.vue.d.ts +44 -16
  296. package/dist/esm/v3/components/or-icon-button-v2/OrIconButton.vue.d.ts +43 -13
  297. package/dist/esm/v3/components/or-icon-button-v2/partials/OrTooltipWrapper.vue.d.ts +10 -8
  298. package/dist/esm/v3/components/or-icon-button-v3/OrIconButton.vue.d.ts +52 -16
  299. package/dist/esm/v3/components/or-icon-v3/OrIcon.vue.d.ts +18 -7
  300. package/dist/esm/v3/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +16 -7
  301. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +83 -39
  302. package/dist/esm/v3/components/or-inline-text-edit/OrInlineTextEdit.vue.d.ts +95 -43
  303. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +79 -39
  304. package/dist/esm/v3/components/or-input/OrInput.vue.d.ts +87 -36
  305. package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +22 -7
  306. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +85 -34
  307. package/dist/esm/v3/components/or-label/OrLabel.vue.d.ts +20 -9
  308. package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +24 -9
  309. package/dist/esm/v3/components/or-link-v3/OrLink.vue.d.ts +24 -7
  310. package/dist/esm/v3/components/or-list/OrList.vue.d.ts +47 -21
  311. package/dist/esm/v3/components/or-list-of-inputs/OrListOfInputs.vue.d.ts +27 -11
  312. package/dist/esm/v3/components/or-loader/OrLoader.vue.d.ts +26 -10
  313. package/dist/esm/v3/components/or-loader-v3/OrLoader.vue.d.ts +34 -13
  314. package/dist/esm/v3/components/or-menu-item-v3/OrMenuItem.vue.d.ts +34 -13
  315. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +43 -16
  316. package/dist/esm/v3/components/or-modal/OrModal.vue.d.ts +38 -14
  317. package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +31 -15
  318. package/dist/esm/v3/components/or-notification/OrNotification.vue.d.ts +27 -9
  319. package/dist/esm/v3/components/or-notification-v3/OrNotification.vue.d.ts +20 -9
  320. package/dist/esm/v3/components/or-number-input/OrNumberInput.vue.d.ts +70 -24
  321. package/dist/esm/v3/components/or-overflow-menu/OrOverflowMenu.vue.d.ts +31 -13
  322. package/dist/esm/v3/components/or-overflow-menu/partials/OrOverflowMenuItem.vue.d.ts +23 -7
  323. package/dist/esm/v3/components/or-overlay/OrOverlay.vue.d.ts +16 -6
  324. package/dist/esm/v3/components/or-overlay-v3/OrOverlay.vue.d.ts +14 -7
  325. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +75 -27
  326. package/dist/esm/v3/components/or-password/OrPassword.vue.d.ts +63 -22
  327. package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +76 -28
  328. package/dist/esm/v3/components/or-progress/OrProgress.vue.d.ts +56 -20
  329. package/dist/esm/v3/components/or-progress-v3/OrProgress.vue.d.ts +62 -25
  330. package/dist/esm/v3/components/or-radio/OrRadio.vue.d.ts +35 -13
  331. package/dist/esm/v3/components/or-radio-group/OrRadioGroup.vue.d.ts +26 -9
  332. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +32 -6
  333. package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +49 -21
  334. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +220 -0
  335. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +2 -0
  336. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +57 -0
  337. package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +4 -0
  338. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
  339. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
  340. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
  341. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
  342. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +7 -0
  343. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
  344. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
  345. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
  346. package/dist/esm/v3/components/or-search/OrSearch.vue.d.ts +65 -23
  347. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +41 -17
  348. package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +25 -9
  349. package/dist/esm/v3/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +20 -8
  350. package/dist/esm/v3/components/or-select/OrSelect.vue.d.ts +77 -28
  351. package/dist/esm/v3/components/or-select/partials/OrSelectContent.vue.d.ts +49 -18
  352. package/dist/esm/v3/components/or-select/partials/OrSelectContentEmpty.vue.d.ts +16 -4
  353. package/dist/esm/v3/components/or-select/partials/OrSelectContentOptions.vue.d.ts +67 -13
  354. package/dist/esm/v3/components/or-select/partials/OrSelectInput.vue.d.ts +41 -16
  355. package/dist/esm/v3/components/or-select/partials/OrSelectInputValue.vue.d.ts +35 -16
  356. package/dist/esm/v3/components/or-select/partials/OrSelectMain.vue.d.ts +71 -24
  357. package/dist/esm/v3/components/or-select/partials/OrSelectOption.vue.d.ts +19 -7
  358. package/dist/esm/v3/components/or-select/partials/OrSelectSearchOptions.vue.d.ts +24 -11
  359. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +115 -37
  360. package/dist/esm/v3/components/or-sidebar/OrSidebar.vue.d.ts +33 -14
  361. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +63 -28
  362. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +23 -10
  363. package/dist/esm/v3/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.vue.d.ts +20 -9
  364. package/dist/esm/v3/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.vue.d.ts +22 -9
  365. package/dist/esm/v3/components/or-skeleton/or-skeleton-text/OrSkeletonText.vue.d.ts +26 -10
  366. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +28 -13
  367. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +26 -11
  368. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +40 -16
  369. package/dist/esm/v3/components/or-slider/OrSlider.vue.d.ts +91 -35
  370. package/dist/esm/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +25 -13
  371. package/dist/esm/v3/components/or-stepper/OrStepper.vue.d.ts +43 -16
  372. package/dist/esm/v3/components/or-stepper/partials/OrStepperButtonOptions.vue.d.ts +20 -4
  373. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionHorizontal.vue.d.ts +26 -4
  374. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionVertical.vue.d.ts +26 -4
  375. package/dist/esm/v3/components/or-stepper/partials/OrStepperTitle.vue.d.ts +22 -6
  376. package/dist/esm/v3/components/or-stepper/partials/StatusIcon.vue.d.ts +12 -6
  377. package/dist/esm/v3/components/or-switch/OrSwitch.vue.d.ts +33 -12
  378. package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +53 -22
  379. package/dist/esm/v3/components/or-tab/OrTab.vue.d.ts +22 -9
  380. package/dist/esm/v3/components/or-tab-header-item/OrTabHeaderItem.vue.d.ts +29 -13
  381. package/dist/esm/v3/components/or-tab-v3/OrTab.vue.d.ts +17 -10
  382. package/dist/esm/v3/components/or-tabs/OrTabs.vue.d.ts +17 -4
  383. package/dist/esm/v3/components/or-tabs-v3/OrTabs.vue.d.ts +71 -25
  384. package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +27 -10
  385. package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +23 -12
  386. package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +63 -19
  387. package/dist/esm/v3/components/or-teleport/OrTeleport.vue3.vue.d.ts +10 -4
  388. package/dist/esm/v3/components/or-teleport-v3/OrTeleport.vue3.vue.d.ts +10 -4
  389. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +24 -11
  390. package/dist/esm/v3/components/or-textarea/OrTextarea.vue.d.ts +85 -37
  391. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +73 -32
  392. package/dist/esm/v3/components/or-textbox/OrTextbox.vue.d.ts +137 -55
  393. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +79 -25
  394. package/dist/esm/v3/components/or-toast/OrToast.vue.d.ts +31 -11
  395. package/dist/esm/v3/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +55 -25
  396. package/dist/esm/v3/components/or-toast-v3/OrToast.vue.d.ts +38 -16
  397. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +54 -24
  398. package/dist/esm/v3/components/or-tooltip/OrTooltip.vue.d.ts +33 -14
  399. package/dist/esm/v3/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +10 -4
  400. package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +37 -13
  401. package/dist/esm/v3/directives/dropdown-close.d.ts +1 -3
  402. package/dist/esm/v3/directives/dropdown-open.d.ts +1 -3
  403. package/dist/esm/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  404. package/dist/esm/v3/index.js +24 -0
  405. package/package.json +25 -5
  406. package/src/components/index.ts +1 -0
  407. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +761 -0
  408. package/src/components/or-rich-text-editor-v3/index.ts +2 -0
  409. package/src/components/or-rich-text-editor-v3/props.ts +4 -0
  410. package/src/components/or-rich-text-editor-v3/styles.ts +54 -0
  411. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +40 -0
  412. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +254 -0
  413. package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +1 -0
  414. package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +213 -0
  415. package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +22 -0
  416. package/src/components/or-rich-text-editor-v3/utils/markdown.ts +120 -0
  417. /package/dist/bundled/v2/{index-968c331a.js → index-f6664cb1.js} +0 -0
  418. /package/dist/bundled/v3/{index-968c331a.js → index-f6664cb1.js} +0 -0
@@ -0,0 +1,852 @@
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch, nextTick } from 'vue-demi';
2
+ import { useFocusTrap } from '@vueuse/integrations/useFocusTrap';
3
+ import { useResizeObserver, onClickOutside } from '@vueuse/core';
4
+ import { defaultMarkdownSerializer, MarkdownSerializer } from 'prosemirror-markdown';
5
+ import { DOMParser as DOMParser$1 } from 'prosemirror-model';
6
+ import { marked } from 'marked';
7
+ import Paragraph from '@tiptap/extension-paragraph';
8
+ import BulletList from '@tiptap/extension-bullet-list';
9
+ import ListItem from '@tiptap/extension-list-item';
10
+ import OrderedList from '@tiptap/extension-ordered-list';
11
+ import Strike from '@tiptap/extension-strike';
12
+ import Italic from '@tiptap/extension-italic';
13
+ import HardBreak from '@tiptap/extension-hard-break';
14
+ import Bold from '@tiptap/extension-bold';
15
+ import CodeBlock from '@tiptap/extension-code-block';
16
+ import Blockquote from '@tiptap/extension-blockquote';
17
+ import Link from '@tiptap/extension-link';
18
+ import Highlight from '@tiptap/extension-highlight';
19
+ import Underline from '@tiptap/extension-underline';
20
+ import { s as script$1 } from './OrIconButton-b7217ea5.js';
21
+ import { s as script$2 } from './OrLabel-4da56db0.js';
22
+ import { s as script$4 } from './OrMenu-8a53ccf9.js';
23
+ import './OrPopover-15c2968f.js';
24
+ import { s as script$3 } from './OrMenuItem-dbee450f.js';
25
+ import { s as script$5 } from './OrModal-1366926a.js';
26
+ import { s as script$6 } from './OrInput-af5bb98a.js';
27
+ import { s as script$7 } from './OrButton-c2b6aa9e.js';
28
+ import { Node, Editor, mergeAttributes } from '@tiptap/core';
29
+ import StarterKit from '@tiptap/starter-kit';
30
+ import Heading from '@tiptap/extension-heading';
31
+ import Placeholder from '@tiptap/extension-placeholder';
32
+ import { C as CodeMirrorView } from './codemirrorView-be2c7423.js';
33
+ import { minimalSetup } from 'codemirror';
34
+ import { javascript } from '@codemirror/lang-javascript';
35
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createBlock, createCommentVNode, withDirectives, vShow, vModelText, renderSlot } from 'vue';
36
+ import { s as styleInject } from './style-inject.es-4c6f2515.js';
37
+
38
+ const serializerNodes = {
39
+ ...defaultMarkdownSerializer.nodes,
40
+ [Paragraph.name]: defaultMarkdownSerializer.nodes.paragraph,
41
+ [BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list,
42
+ [ListItem.name]: defaultMarkdownSerializer.nodes.list_item,
43
+ [OrderedList.name]: defaultMarkdownSerializer.nodes.ordered_list,
44
+ [HardBreak.name]: defaultMarkdownSerializer.nodes.hard_break,
45
+ [CodeBlock.name]: defaultMarkdownSerializer.nodes.code_block,
46
+ [Blockquote.name]: defaultMarkdownSerializer.nodes.blockquote
47
+ };
48
+ const serializerMarks = {
49
+ ...defaultMarkdownSerializer.marks,
50
+ [Bold.name]: defaultMarkdownSerializer.marks.strong,
51
+ [Strike.name]: {
52
+ open: '~~',
53
+ close: '~~',
54
+ mixable: true,
55
+ expelEnclosingWhitespace: true
56
+ },
57
+ [Italic.name]: {
58
+ open: ' _',
59
+ close: '_ ',
60
+ mixable: true,
61
+ expelEnclosingWhitespace: true
62
+ },
63
+ [Highlight.name]: {
64
+ open: '==',
65
+ close: '==',
66
+ mixable: true,
67
+ expelEnclosingWhitespace: true
68
+ },
69
+ [Underline.name]: {
70
+ open: '',
71
+ close: '',
72
+ mixable: true,
73
+ expelEnclosingWhitespace: true
74
+ },
75
+ [Link.name]: {
76
+ open(state, mark, parent, index) {
77
+ return isPlainURL(mark, parent, index, 1) ? '<' : '[';
78
+ },
79
+ close(state, mark, parent, index) {
80
+ const href = mark.attrs.canonicalSrc || mark.attrs.href;
81
+ return isPlainURL(mark, parent, index, -1) ? '>' : `](${state.esc(href)}${mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''})`;
82
+ }
83
+ }
84
+ };
85
+ const isPlainURL = (link, parent, index, side) => {
86
+ if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false;
87
+ const content = parent.child(index + (side < 0 ? -1 : 0));
88
+ if (!content.isText || content.text !== link.attrs.href || content.marks[content.marks.length - 1] !== link) return false;
89
+ if (index === (side < 0 ? 1 : parent.childCount - 1)) return true;
90
+ const next = parent.child(index + (side < 0 ? -2 : 1));
91
+ return !link.isInSet(next.marks);
92
+ };
93
+ const serialize = (schema, content) => {
94
+ const proseMirrorDocument = schema.nodeFromJSON(content);
95
+ const serializer = new MarkdownSerializer(serializerNodes, serializerMarks);
96
+ return serializer.serialize(proseMirrorDocument, {
97
+ tightLists: true
98
+ });
99
+ };
100
+ const deserialize = (schema, content) => {
101
+ if (!content) return null;
102
+ const html = marked(content, {
103
+ gfm: true,
104
+ breaks: true
105
+ });
106
+ if (!html) return null;
107
+ const parser = new DOMParser();
108
+ const {
109
+ body
110
+ } = parser.parseFromString(html, 'text/html');
111
+ // append original source as a comment that nodes can access
112
+ body.append(document.createComment(content));
113
+ const state = DOMParser$1.fromSchema(schema).parse(body);
114
+ return state.toJSON();
115
+ };
116
+
117
+ const EditorContainer = [
118
+ // Colors
119
+ 'border-outline', 'focus-within:theme-border-1-primary', 'focus-within:bg-primary-opacity-0-08', 'focus-within:theme-outline-primary',
120
+ // Sizing
121
+ 'border-1', 'rounded-md', 'w-full'];
122
+ const ToolbarContainer = [
123
+ // Layout
124
+ 'flex',
125
+ //Spacing
126
+ 'py-sm',
127
+ //Sizing
128
+ 'border-b-1',
129
+ //Colors
130
+ 'border-b-outline'];
131
+ const Toolbar = [
132
+ // Layout
133
+ 'flex',
134
+ // Spacing
135
+ 'px-sm', 'gap-md',
136
+ // Sizing
137
+ 'border-l-1',
138
+ //Colors
139
+ 'border-r-disabled',
140
+ // Last child
141
+ 'first-of-type:border-none'];
142
+ const ToolbarButton = [
143
+ // Typography
144
+ 'text-on-disabled'];
145
+ const ToolbarButtonFocused = [
146
+ // Typography
147
+ 'text-outline'];
148
+ const EditorInput = [
149
+ // Typography
150
+ 'typography-body-2-regular',
151
+ // Sizing
152
+ 'min-h-[88px]'];
153
+
154
+ var Formats;
155
+ (function (Formats) {
156
+ Formats["Markdown"] = "markdown";
157
+ Formats["Markup"] = "markup";
158
+ })(Formats || (Formats = {}));
159
+
160
+ var codemirrorNode = Node.create({
161
+ name: 'codeBlock',
162
+ content: 'text*',
163
+ marks: '',
164
+ group: 'block',
165
+ code: true,
166
+ defining: true,
167
+ isolating: true,
168
+ parseHTML() {
169
+ return [{
170
+ tag: 'pre',
171
+ preserveWhitespace: 'full'
172
+ }];
173
+ },
174
+ renderHTML() {
175
+ return ['pre', ['code', 0]];
176
+ },
177
+ addNodeView() {
178
+ return _ref => {
179
+ let {
180
+ node,
181
+ editor,
182
+ getPos
183
+ } = _ref;
184
+ return new CodeMirrorView({
185
+ node,
186
+ view: editor.view,
187
+ getPos: getPos,
188
+ cmOptions: {
189
+ extensions: [minimalSetup, javascript()]
190
+ }
191
+ });
192
+ };
193
+ }
194
+ });
195
+
196
+ var script = defineComponent({
197
+ name: 'OrRichTextEditor',
198
+ components: {
199
+ OrIconButton: script$1,
200
+ OrLabel: script$2,
201
+ OrMenuItem: script$3,
202
+ OrMenu: script$4,
203
+ OrModal: script$5,
204
+ OrInput: script$6,
205
+ OrButton: script$7
206
+ },
207
+ inheritAttrs: false,
208
+ model: {
209
+ prop: 'modelValue',
210
+ event: 'update:modelValue'
211
+ },
212
+ props: {
213
+ modelValue: {
214
+ type: String,
215
+ default: undefined
216
+ },
217
+ toolbar: {
218
+ type: Array,
219
+ default: () => []
220
+ },
221
+ description: {
222
+ type: String,
223
+ default: ''
224
+ },
225
+ placeholder: {
226
+ type: String,
227
+ default: ''
228
+ },
229
+ autofocus: {
230
+ type: Boolean,
231
+ default: false
232
+ },
233
+ format: {
234
+ type: String,
235
+ default: Formats.Markup
236
+ },
237
+ fullHeight: {
238
+ type: Boolean,
239
+ default: false
240
+ }
241
+ },
242
+ emits: ['update:modelValue', 'input', 'file-upload'],
243
+ expose: ['root'],
244
+ setup(props, context) {
245
+ // Refs
246
+ const root = ref();
247
+ let editor = null;
248
+ const editorRef = ref();
249
+ const textareaRef = ref();
250
+ const containerRef = ref();
251
+ const toolbarRef = ref();
252
+ const moreButtonRef = ref();
253
+ const moreRef = ref();
254
+ const toolbarButtonRef = ref();
255
+ const menuRef = ref();
256
+ // isActive should be set with default values for all toolbar buttons, otherwise it will not work in vue2
257
+ const isActive = ref({
258
+ bold: false,
259
+ italic: false,
260
+ underline: false,
261
+ strike: false,
262
+ bulletList: false,
263
+ orderedList: false,
264
+ link: false,
265
+ highlight: false,
266
+ redo: false,
267
+ undo: false,
268
+ codeBlock: false,
269
+ blockquote: false,
270
+ file: false,
271
+ source: false
272
+ });
273
+ const isFocused = ref(props.autofocus);
274
+ const headingLevels = [1, 2, 3, 4];
275
+ const activeHeadingLevel = ref(0);
276
+ const markdownOutput = ref('');
277
+ const isOpenLinkModal = ref(false);
278
+ const disableMarkdown = ref(false);
279
+ const text = ref('');
280
+ const link = ref('');
281
+ const countOfNotVisibleTools = ref(0);
282
+ const sourceValue = ref('');
283
+ let trap = useFocusTrap(editorRef, {
284
+ immediate: true,
285
+ fallbackFocus: '.container',
286
+ allowOutsideClick: true
287
+ });
288
+ const iconsEnum = ref({
289
+ bold: 'format_bold',
290
+ italic: 'format_italic',
291
+ underline: 'format_underlined',
292
+ strike: 'format_strikethrough',
293
+ bulletList: 'format_list_bulleted',
294
+ orderedList: 'format_list_numbered',
295
+ link: 'link',
296
+ highlight: 'highlight',
297
+ redo: 'redo',
298
+ undo: 'undo',
299
+ codeBlock: 'code_blocks',
300
+ blockquote: 'format_quote',
301
+ file: 'attach_file',
302
+ source: 'source_notes'
303
+ });
304
+ const iconTooltipsEnum = ref({
305
+ bold: 'Bold',
306
+ italic: 'Italic',
307
+ underline: 'Underline',
308
+ strike: 'Strike',
309
+ bulletList: 'Bulleted List',
310
+ orderedList: 'Numbered List',
311
+ link: 'Link',
312
+ highlight: 'Highlight',
313
+ redo: 'Redo',
314
+ undo: 'Undo',
315
+ codeBlock: 'Code Block',
316
+ blockquote: 'Quote',
317
+ file: 'File',
318
+ source: 'Source'
319
+ });
320
+ useResizeObserver(root, entries => {
321
+ var _a, _b;
322
+ const entry = entries[0];
323
+ const {
324
+ width
325
+ } = entry.contentRect;
326
+ if (containerRef.value && toolbarRef.value && toolbarLength.value) {
327
+ let lengthOfItem = 0;
328
+ lengthOfItem = ((_b = (_a = toolbarRef.value.firstElementChild) === null || _a === void 0 ? void 0 : _a.firstElementChild) === null || _b === void 0 ? void 0 : _b.offsetWidth) + 16;
329
+ const count = width / lengthOfItem - 2;
330
+ countOfNotVisibleTools.value = Math.round(toolbarLength.value - count);
331
+ }
332
+ });
333
+ onMounted(() => {
334
+ editor = new Editor({
335
+ onUpdate: _ref => {
336
+ let {
337
+ editor
338
+ } = _ref;
339
+ isFocused.value = true;
340
+ setActiveFormats();
341
+ const html = editor.getHTML();
342
+ const text = editor.getText();
343
+ if (props.format === 'markdown') {
344
+ markdownOutput.value = serialize(editor.schema, editor.getJSON());
345
+ proxyModelValue.value = markdownOutput.value;
346
+ } else {
347
+ proxyModelValue.value = text === '' ? text : html;
348
+ }
349
+ },
350
+ onCreate: _ref2 => {
351
+ let {
352
+ editor
353
+ } = _ref2;
354
+ if (props.format === 'markdown') {
355
+ const deserialized = deserialize(editor.schema, proxyModelValue.value);
356
+ editor.commands.setContent(deserialized);
357
+ } else {
358
+ editor.commands.setContent(proxyModelValue.value);
359
+ }
360
+ },
361
+ element: editorRef.value,
362
+ autofocus: props.autofocus,
363
+ enableInputRules: true,
364
+ enablePasteRules: true,
365
+ extensions: [codemirrorNode, StarterKit.configure({
366
+ heading: false,
367
+ codeBlock: false
368
+ }), Heading.configure({
369
+ levels: headingLevels
370
+ }).extend({
371
+ levels: headingLevels,
372
+ renderHTML(_ref3) {
373
+ let {
374
+ node,
375
+ HTMLAttributes
376
+ } = _ref3;
377
+ return ['h' + node.attrs.level, mergeAttributes(HTMLAttributes, {
378
+ class: `typography-headline-${node.attrs.level}`
379
+ }), 0];
380
+ }
381
+ }), Underline, Link.configure({
382
+ openOnClick: true,
383
+ linkOnPaste: true,
384
+ autolink: false,
385
+ protocols: ['ftp', 'mailto', 'http', 'https'],
386
+ validate: href => /^https?:\/\//.test(href),
387
+ HTMLAttributes: {
388
+ class: 'text-primary cursor-pointer'
389
+ }
390
+ }), Highlight, Placeholder.configure({
391
+ placeholder: props.placeholder,
392
+ emptyEditorClass: 'is-editor-empty text-outline'
393
+ })],
394
+ editorProps: {
395
+ attributes: {
396
+ class: 'flex flex-col focus:outline-none gap-xs'
397
+ }
398
+ },
399
+ parseOptions: {
400
+ preserveWhitespace: true
401
+ }
402
+ });
403
+ setActiveFormats();
404
+ trap.activate();
405
+ });
406
+ onBeforeUnmount(() => {
407
+ editor === null || editor === void 0 ? void 0 : editor.destroy();
408
+ });
409
+ onClickOutside(root, () => {
410
+ isFocused.value = false;
411
+ trap.deactivate();
412
+ });
413
+ // Computed
414
+ const proxyModelValue = computed({
415
+ get: () => {
416
+ return props.modelValue;
417
+ },
418
+ set: value => {
419
+ context.emit('input', value);
420
+ context.emit('update:modelValue', value);
421
+ }
422
+ });
423
+ const getIndexOfHeading = computed(() => {
424
+ return props.toolbar.flat().indexOf('heading');
425
+ });
426
+ const headingIcon = computed(() => {
427
+ if (activeHeadingLevel.value && isActive.value.heading) {
428
+ return `format_h${activeHeadingLevel.value}`;
429
+ }
430
+ return 'format_paragraph';
431
+ });
432
+ const toolbarLength = computed(() => {
433
+ return props.toolbar.flat().length;
434
+ });
435
+ const notVisibleTools = computed(() => {
436
+ const count = countOfNotVisibleTools.value;
437
+ const toolbar = props.toolbar.flat();
438
+ let notVisible = new Set(toolbar.slice(toolbar.length - count, toolbar.length));
439
+ props.toolbar.forEach(tools => {
440
+ if (tools.some(item => notVisible.has(item))) {
441
+ tools.forEach(item => notVisible.add(item));
442
+ }
443
+ });
444
+ return notVisible;
445
+ });
446
+ //Methods
447
+ const handleEditorClick = () => {
448
+ var _a;
449
+ setActiveFormats();
450
+ isFocused.value = true;
451
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
452
+ activeHeadingLevel.value = ((_a = editor === null || editor === void 0 ? void 0 : editor.getAttributes('heading')) === null || _a === void 0 ? void 0 : _a.level) || 0;
453
+ };
454
+ const isVisible = value => {
455
+ if (Array.isArray(value)) {
456
+ const isHaveNotVisibleTools = value.some(item => notVisibleTools.value.has(item));
457
+ return isHaveNotVisibleTools;
458
+ }
459
+ return !notVisibleTools.value.has(value);
460
+ };
461
+ const handleInput = event => {
462
+ const target = event.target;
463
+ const value = target.value;
464
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value));
465
+ markdownOutput.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
466
+ proxyModelValue.value = markdownOutput.value;
467
+ };
468
+ const handleToolbarClick = (item, level) => {
469
+ var _a, _b;
470
+ switch (item) {
471
+ case 'source':
472
+ disableMarkdown.value = !disableMarkdown.value;
473
+ sourceValue.value = serialize(editor === null || editor === void 0 ? void 0 : editor.schema, editor === null || editor === void 0 ? void 0 : editor.getJSON());
474
+ nextTick(() => {
475
+ var _a;
476
+ return (_a = textareaRef.value) === null || _a === void 0 ? void 0 : _a.focus();
477
+ });
478
+ break;
479
+ case 'bulletList':
480
+ case 'orderedList':
481
+ item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
482
+ break;
483
+ case 'link':
484
+ if (editor) {
485
+ const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
486
+ const {
487
+ from,
488
+ to,
489
+ empty
490
+ } = editor.state.selection;
491
+ const isLink = (_a = editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
492
+ 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) || '' : '';
493
+ text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
494
+ link.value = editor.getAttributes('link').href || '';
495
+ }
496
+ isOpenLinkModal.value = !isOpenLinkModal.value;
497
+ break;
498
+ case 'blockquote':
499
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
500
+ break;
501
+ case 'codeBlock':
502
+ if (!isActive.value['codeBlock']) {
503
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
504
+ language: 'javascript'
505
+ });
506
+ } else {
507
+ editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
508
+ }
509
+ break;
510
+ case 'heading':
511
+ if (!level) {
512
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
513
+ level: 0
514
+ });
515
+ activeHeadingLevel.value = 0;
516
+ } else {
517
+ activeHeadingLevel.value = level;
518
+ editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
519
+ level: level
520
+ });
521
+ }
522
+ editor === null || editor === void 0 ? void 0 : editor.commands.focus();
523
+ break;
524
+ case 'undo':
525
+ case 'redo':
526
+ item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
527
+ break;
528
+ case 'file':
529
+ context.emit('file-upload');
530
+ break;
531
+ default:
532
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
533
+ break;
534
+ }
535
+ };
536
+ const attachLink = async () => {
537
+ var _a, _b;
538
+ // empty
539
+ if (link.value === '') {
540
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
541
+ }
542
+ const isEmptySelection = editor === null || editor === void 0 ? void 0 : editor.state.selection.empty;
543
+ const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
544
+ 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');
545
+ 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 : '';
546
+ if (link.value && isEmptySelection && !existedText) {
547
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
548
+ href: link.value,
549
+ target: '__blank'
550
+ }).command(_ref4 => {
551
+ let {
552
+ tr
553
+ } = _ref4;
554
+ const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
555
+ tr.insertText(preparedValue);
556
+ return true;
557
+ }).run();
558
+ }
559
+ if (link.value && existedText === text.value && isEmptySelection) {
560
+ editor === null || editor === void 0 ? void 0 : editor.chain().extendMarkRange('link').updateAttributes('link', {
561
+ href: link.value
562
+ }).run();
563
+ }
564
+ if (link.value && !isEmptySelection) {
565
+ editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
566
+ href: link.value,
567
+ target: '__blank'
568
+ }).run();
569
+ }
570
+ text.value = '';
571
+ link.value = '';
572
+ isOpenLinkModal.value = false;
573
+ };
574
+ const discardLink = () => {
575
+ isOpenLinkModal.value = false;
576
+ };
577
+ const setActiveFormats = () => {
578
+ const toolbarList = props.toolbar.flat();
579
+ toolbarList.forEach(item => {
580
+ if (item === 'source') {
581
+ isActive.value[item] = disableMarkdown.value;
582
+ } else {
583
+ isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
584
+ }
585
+ });
586
+ };
587
+ // Styles
588
+ const rootStyles = computed(() => {
589
+ return ['or-rich-text-editor', ...(props.fullHeight ? ['h-full'] : [])];
590
+ });
591
+ const containerStyles = computed(() => {
592
+ return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
593
+ });
594
+ const toolbarContainerStyles = computed(() => {
595
+ return [...ToolbarContainer];
596
+ });
597
+ const toolbarStyles = computed(() => {
598
+ return [...Toolbar,
599
+ // 'overflow-x-hidden',
600
+ ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
601
+ });
602
+ const editorInputStyles = computed(() => {
603
+ return ['tiptap-editor-v3', ...(props.fullHeight ? ['h-full overflow-y-auto'] : []), ...EditorInput];
604
+ });
605
+ //Effects
606
+ watch(proxyModelValue, value => {
607
+ if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && props.format !== 'markdown') {
608
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
609
+ }
610
+ if (props.format === 'markdown' && value !== markdownOutput.value) {
611
+ // const deserialized = deserialize(editor?.schema, value);
612
+ editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
613
+ }
614
+ });
615
+ return {
616
+ editor,
617
+ editorRef,
618
+ toolbarRef,
619
+ containerRef,
620
+ toolbarButtonRef,
621
+ moreButtonRef,
622
+ textareaRef,
623
+ moreRef,
624
+ menuRef,
625
+ iconsEnum,
626
+ handleToolbarClick,
627
+ handleEditorClick,
628
+ isActive,
629
+ iconTooltipsEnum,
630
+ containerStyles,
631
+ toolbarContainerStyles,
632
+ toolbarStyles,
633
+ rootStyles,
634
+ root,
635
+ editorInputStyles,
636
+ getIndexOfHeading,
637
+ headingLevels,
638
+ headingIcon,
639
+ attachLink,
640
+ discardLink,
641
+ isOpenLinkModal,
642
+ text,
643
+ link,
644
+ isFocused,
645
+ isVisible,
646
+ countOfNotVisibleTools,
647
+ notVisibleTools,
648
+ handleInput,
649
+ proxyModelValue,
650
+ disableMarkdown,
651
+ sourceValue
652
+ };
653
+ }
654
+ });
655
+
656
+ const _hoisted_1 = ["activated"];
657
+ const _hoisted_2 = /*#__PURE__*/createElementVNode("p", {
658
+ class: "text-headline-2"
659
+ }, " Add Link ", -1 /* HOISTED */);
660
+ const _hoisted_3 = {
661
+ class: "flex ml-auto gap-md"
662
+ };
663
+ const _hoisted_4 = /*#__PURE__*/createElementVNode("p", null, "Cancel", -1 /* HOISTED */);
664
+ const _hoisted_5 = /*#__PURE__*/createElementVNode("p", null, "Save", -1 /* HOISTED */);
665
+
666
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
667
+ const _component_or_label = resolveComponent("or-label");
668
+ const _component_or_icon_button = resolveComponent("or-icon-button");
669
+ const _component_or_menu_item = resolveComponent("or-menu-item");
670
+ const _component_or_menu = resolveComponent("or-menu");
671
+ const _component_or_input = resolveComponent("or-input");
672
+ const _component_or_button = resolveComponent("or-button");
673
+ const _component_or_modal = resolveComponent("or-modal");
674
+ return openBlock(), createElementBlock("div", {
675
+ ref: "root",
676
+ class: normalizeClass(_ctx.rootStyles)
677
+ }, [createVNode(_component_or_label, null, {
678
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.description), 1 /* TEXT */)]),
679
+
680
+ _: 1 /* STABLE */
681
+ }), createElementVNode("div", {
682
+ ref: "containerRef",
683
+ class: normalizeClass(_ctx.containerStyles),
684
+ onClick: _cache[4] || (_cache[4] = $event => _ctx.handleEditorClick())
685
+ }, [createElementVNode("div", {
686
+ ref: "toolbarRef",
687
+ class: normalizeClass(_ctx.toolbarContainerStyles)
688
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.toolbar, (tools, index) => {
689
+ return openBlock(), createElementBlock("div", {
690
+ key: index,
691
+ class: normalizeClass([..._ctx.toolbarStyles, {
692
+ 'hidden': _ctx.isVisible(tools)
693
+ }])
694
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(tools, item => {
695
+ return openBlock(), createElementBlock("div", {
696
+ key: item,
697
+ class: normalizeClass(['flex gap-md', {
698
+ 'hidden': !_ctx.isVisible(item)
699
+ }])
700
+ }, [item === 'heading' ? (openBlock(), createBlock(_component_or_icon_button, {
701
+ key: 0,
702
+ ref_for: true,
703
+ ref: "toolbarButtonRef",
704
+ selected: _ctx.isActive[item],
705
+ disabled: !_ctx.isFocused,
706
+ tooltip: {
707
+ text: item,
708
+ placement: 'top'
709
+ },
710
+ icon: {
711
+ icon: _ctx.headingIcon,
712
+ variant: 'inherit',
713
+ size: 'm'
714
+ },
715
+ onClick: _cache[0] || (_cache[0] = $event => _ctx.menuRef.open())
716
+ }, null, 8 /* PROPS */, ["selected", "disabled", "tooltip", "icon"])) : _ctx.isVisible(item) ? (openBlock(), createBlock(_component_or_icon_button, {
717
+ key: 1,
718
+ tooltip: {
719
+ text: _ctx.iconTooltipsEnum[item],
720
+ placement: 'top'
721
+ },
722
+ selected: _ctx.isActive[item],
723
+ disabled: !_ctx.isFocused,
724
+ icon: {
725
+ icon: _ctx.iconsEnum[item],
726
+ variant: 'inherit',
727
+ size: 'm'
728
+ },
729
+ onClick: $event => _ctx.handleToolbarClick(item)
730
+ }, null, 8 /* PROPS */, ["tooltip", "selected", "disabled", "icon", "onClick"])) : createCommentVNode("v-if", true)], 2 /* CLASS */);
731
+ }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */);
732
+ }), 128 /* KEYED_FRAGMENT */)), _ctx.countOfNotVisibleTools > 0 ? (openBlock(), createBlock(_component_or_icon_button, {
733
+ key: 0,
734
+ ref: "moreButtonRef",
735
+ disabled: !_ctx.isFocused,
736
+ icon: {
737
+ icon: 'more_horiz',
738
+ variant: 'inherit',
739
+ size: 'm'
740
+ },
741
+ class: "px-sm",
742
+ onClick: _cache[1] || (_cache[1] = $event => _ctx.moreRef.open())
743
+ }, null, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 2 /* CLASS */), createElementVNode("div", {
744
+ class: normalizeClass(['p-sm', {
745
+ 'h-[calc(100%-32px)] md:h-[calc(100%-36px)]': _ctx.fullHeight
746
+ }])
747
+ }, [withDirectives(createElementVNode("textarea", {
748
+ ref: "textareaRef",
749
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => _ctx.sourceValue = $event),
750
+ "auto-focus": "",
751
+ activated: _ctx.disableMarkdown,
752
+ class: "w-full h-full resize-none border-none outline-none bg-transparent typography-body-2-regular",
753
+ onInput: _cache[3] || (_cache[3] = function () {
754
+ return _ctx.handleInput && _ctx.handleInput(...arguments);
755
+ })
756
+ }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_1), [[vShow, _ctx.disableMarkdown], [vModelText, _ctx.sourceValue]]), withDirectives(createElementVNode("div", {
757
+ ref: "editorRef",
758
+ class: normalizeClass(_ctx.editorInputStyles)
759
+ }, null, 2 /* CLASS */), [[vShow, !_ctx.disableMarkdown]]), renderSlot(_ctx.$slots, "files")], 2 /* CLASS */)], 2 /* CLASS */), _ctx.moreButtonRef ? (openBlock(), createBlock(_component_or_menu, {
760
+ key: 0,
761
+ ref: "moreRef",
762
+ trigger: _ctx.moreButtonRef.root
763
+ }, {
764
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.notVisibleTools, item => {
765
+ return openBlock(), createBlock(_component_or_menu_item, {
766
+ key: item,
767
+ onClick: $event => _ctx.handleToolbarClick(item)
768
+ }, {
769
+ default: withCtx(() => [createVNode(_component_or_icon_button, {
770
+ tooltip: {
771
+ text: _ctx.iconTooltipsEnum[item],
772
+ placement: 'top'
773
+ },
774
+ selected: _ctx.isActive[item],
775
+ icon: {
776
+ icon: _ctx.iconsEnum[item],
777
+ variant: 'inherit',
778
+ size: 'm'
779
+ }
780
+ }, null, 8 /* PROPS */, ["tooltip", "selected", "icon"])]),
781
+ _: 2 /* DYNAMIC */
782
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
783
+ }), 128 /* KEYED_FRAGMENT */))]),
784
+
785
+ _: 1 /* STABLE */
786
+ }, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true), _ctx.toolbarButtonRef ? (openBlock(), createBlock(_component_or_menu, {
787
+ key: 1,
788
+ ref: "menuRef",
789
+ trigger: _ctx.toolbarButtonRef[_ctx.getIndexOfHeading].root,
790
+ placement: "bottom-start"
791
+ }, {
792
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.headingLevels, heading => {
793
+ return openBlock(), createBlock(_component_or_menu_item, {
794
+ key: heading,
795
+ onClick: $event => _ctx.handleToolbarClick('heading', heading)
796
+ }, {
797
+ default: withCtx(() => [createTextVNode(" Heading " + toDisplayString(heading), 1 /* TEXT */)]),
798
+
799
+ _: 2 /* DYNAMIC */
800
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"]);
801
+ }), 128 /* KEYED_FRAGMENT */)), createVNode(_component_or_menu_item, {
802
+ onClick: _cache[5] || (_cache[5] = $event => _ctx.handleToolbarClick('heading'))
803
+ }, {
804
+ default: withCtx(() => [createTextVNode(" None ")]),
805
+ _: 1 /* STABLE */
806
+ })]),
807
+
808
+ _: 1 /* STABLE */
809
+ }, 8 /* PROPS */, ["trigger"])) : createCommentVNode("v-if", true), createVNode(_component_or_modal, {
810
+ "is-open": _ctx.isOpenLinkModal,
811
+ size: "s"
812
+ }, {
813
+ header: withCtx(() => [_hoisted_2]),
814
+ footer: withCtx(() => [createElementVNode("div", _hoisted_3, [createVNode(_component_or_button, {
815
+ variant: "outlined",
816
+ onClick: _ctx.discardLink
817
+ }, {
818
+ default: withCtx(() => [_hoisted_4]),
819
+ _: 1 /* STABLE */
820
+ }, 8 /* PROPS */, ["onClick"]), createVNode(_component_or_button, {
821
+ onClick: _ctx.attachLink
822
+ }, {
823
+ default: withCtx(() => [_hoisted_5]),
824
+ _: 1 /* STABLE */
825
+ }, 8 /* PROPS */, ["onClick"])])]),
826
+ default: withCtx(() => [createElementVNode("div", null, [createVNode(_component_or_label, null, {
827
+ default: withCtx(() => [createTextVNode(" Text ")]),
828
+ _: 1 /* STABLE */
829
+ }), createVNode(_component_or_input, {
830
+ modelValue: _ctx.text,
831
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => _ctx.text = $event),
832
+ placeholder: "Placeholder",
833
+ class: "pb-md"
834
+ }, null, 8 /* PROPS */, ["modelValue"]), createVNode(_component_or_label, null, {
835
+ default: withCtx(() => [createTextVNode(" Link ")]),
836
+ _: 1 /* STABLE */
837
+ }), createVNode(_component_or_input, {
838
+ modelValue: _ctx.link,
839
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => _ctx.link = $event),
840
+ placeholder: "Placeholder"
841
+ }, null, 8 /* PROPS */, ["modelValue"])])]),
842
+ _: 1 /* STABLE */
843
+ }, 8 /* PROPS */, ["is-open"])], 2 /* CLASS */);
844
+ }
845
+
846
+ var css_248z = ".tiptap-editor-v3 ol {\n@apply mx-lg;\n list-style: decimal;\n}\n.tiptap-editor-v3 .ProseMirror h1, .tiptap-editor-v3 .ProseMirror h2, .tiptap-editor-v3 .ProseMirror h3, .tiptap-editor-v3 .ProseMirror h4, .tiptap-editor-v3 .ProseMirror h5, .tiptap-editor-v3 .ProseMirror h6, .tiptap-editor-v3 .ProseMirror p {\n@apply m-xs;\n}\n.tiptap-editor-v3 ul {\n@apply mx-lg;\n list-style: initial;\n}\n.tiptap-editor-v3 blockquote {\n@apply mx-lg;\n@apply my-sm;\n@apply px-lg;\n border-left: 4px solid theme(\"borderColor.primary-opacity-0-16\");\n}\n.tiptap-editor-v3 .is-editor-empty::before {\n content: attr(data-placeholder);\n height: 0;\n pointer-events: none;\n float: left;\n}\n.tiptap-editor-v3 .cm-editor {\n border: none;\n@apply rounded-md;\n}\n.tiptap-editor-v3 .cm-editor .cm-scroller {\n@apply rounded-md;\n}\n.tiptap-editor-v3 .cm-editor.cm-focused {\n outline: none;\n}\n.tiptap-editor-v3 .cm-editor .cm-gutters {\n background-color: theme(\"backgroundColor.primary-opacity-0-12\");\n border: none;\n}\n.tiptap-editor-v3 .cm-editor .cm-gutters .cm-gutterElement {\n@apply px-sm+*;\n}\n.tiptap-editor-v3 .cm-editor .cm-gutters .cm-gutterElement.cm-activeLineGutter {\n background-color: theme(\"backgroundColor.primary-opacity-0-16\");\n}";
847
+ styleInject(css_248z);
848
+
849
+ script.render = render;
850
+ script.__file = "src/components/or-rich-text-editor-v3/OrRichTextEditor.vue";
851
+
852
+ export { Formats as F, script as s };