@onereach/ui-components 4.1.0-beta.2511.0 → 4.1.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 (285) hide show
  1. package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +8 -1
  2. package/dist/bundled/v2/components/OrButtonV3/styles.js +3 -1
  3. package/dist/bundled/v2/components/OrCode/OrCode.js +3727 -5
  4. package/dist/bundled/v2/components/OrCode/index.js +2 -5
  5. package/dist/bundled/v2/components/OrCode/lang.js +3 -3897
  6. package/dist/bundled/v2/components/OrCode/theme.js +1 -2
  7. package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +8 -1
  8. package/dist/bundled/v2/components/index.d.ts +0 -1
  9. package/dist/bundled/v2/components/index.js +2 -14
  10. package/dist/bundled/v2/hooks/useElevation.js +3 -3
  11. package/dist/bundled/v2/{index-f5487f12.js → index-6976c52a.js} +115 -3
  12. package/dist/bundled/v2/index.js +5 -17
  13. package/dist/bundled/v2/{index-70ca38c5.js → lang-02d2bb2d.js} +3965 -73
  14. package/dist/bundled/v2/utils/isVisible.js +1 -1
  15. package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-1489a97d.js → OrBottomSheet.vue_vue_type_script_lang-01d7c429.js} +9 -2
  16. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-606eede5.js → OrCardCollection.vue_vue_type_script_lang-843e396a.js} +4 -4
  17. package/dist/bundled/v3/{index-16aee5bc.js → OrCode.vue_vue_type_script_lang-c5a9adb7.js} +234 -14
  18. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-7d9bcdc4.js → OrConfirm.vue_vue_type_script_lang-d069c95f.js} +3 -3
  19. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-42a8285c.js → OrIconButton.vue_vue_type_script_lang-41f12b45.js} +1 -1
  20. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-6b0f4112.js → OrInlineInput.vue_vue_type_script_lang-2b485aef.js} +1 -1
  21. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-6a7a22a3.js → OrInlineTextarea.vue_vue_type_script_lang-aa848373.js} +1 -1
  22. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-60b49ebd.js → OrInput.vue_vue_type_script_lang-fe526531.js} +1 -1
  23. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-2676b9cc.js → OrMenu.vue_vue_type_script_lang-4772731e.js} +1 -1
  24. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-9ed0d5c2.js → OrModal.vue_vue_type_script_lang-265f39e0.js} +2 -2
  25. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-9bd9811a.js → OrNotification.vue_vue_type_script_lang-1b2d17a2.js} +1 -1
  26. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-b08cc71a.js → OrPagination.vue_vue_type_script_lang-ddef5272.js} +2 -2
  27. package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-a9419b58.js → OrPopover.vue_vue_type_script_lang-9d3a7c2d.js} +9 -2
  28. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-3613e38d.js → OrSearch.vue_vue_type_script_lang-36ad17a9.js} +1 -1
  29. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-262351de.js → OrSelect.vue_vue_type_script_lang-410f4efc.js} +3 -3
  30. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-198126ca.js → OrSidebar.vue_vue_type_script_lang-ed7c92fb.js} +1 -1
  31. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-b723fa78.js → OrTabs.vue_vue_type_script_lang-4f5e0d90.js} +1 -1
  32. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-9deddfc8.js → OrTag.vue_vue_type_script_lang-fbc19deb.js} +1 -1
  33. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-703eaacb.js → OrTooltip.vue_vue_type_script_lang-b35199da.js} +1 -1
  34. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +3 -3
  35. package/dist/bundled/v3/components/OrBottomSheetV3/index.js +2 -2
  36. package/dist/bundled/v3/components/OrButtonV3/OrButton.js +2 -2
  37. package/dist/bundled/v3/components/OrButtonV3/index.js +1 -1
  38. package/dist/bundled/v3/components/OrButtonV3/styles.js +3 -1
  39. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +11 -11
  40. package/dist/bundled/v3/components/OrCardCollectionV3/index.js +10 -10
  41. package/dist/bundled/v3/components/OrCode/OrCode.js +5 -8
  42. package/dist/bundled/v3/components/OrCode/index.js +3 -6
  43. package/dist/bundled/v3/components/OrCode/lang.js +3 -3897
  44. package/dist/bundled/v3/components/OrCode/theme.js +1 -2
  45. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +9 -9
  46. package/dist/bundled/v3/components/OrConfirmV3/index.js +8 -8
  47. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +6 -6
  48. package/dist/bundled/v3/components/OrIconButtonV3/index.js +5 -5
  49. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +7 -7
  50. package/dist/bundled/v3/components/OrInlineInputV3/index.js +6 -6
  51. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +7 -7
  52. package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +6 -6
  53. package/dist/bundled/v3/components/OrInputV3/OrInput.js +7 -7
  54. package/dist/bundled/v3/components/OrInputV3/index.js +6 -6
  55. package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +5 -5
  56. package/dist/bundled/v3/components/OrMenuV3/index.js +4 -4
  57. package/dist/bundled/v3/components/OrModalV3/OrModal.js +7 -7
  58. package/dist/bundled/v3/components/OrModalV3/index.js +6 -6
  59. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +7 -7
  60. package/dist/bundled/v3/components/OrNotificationV3/index.js +6 -6
  61. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +2 -2
  62. package/dist/bundled/v3/components/OrOverlayV3/index.js +1 -1
  63. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +7 -7
  64. package/dist/bundled/v3/components/OrPaginationV3/index.js +6 -6
  65. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +4 -4
  66. package/dist/bundled/v3/components/OrPopoverV3/index.js +3 -3
  67. package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +8 -8
  68. package/dist/bundled/v3/components/OrSearchV3/index.js +7 -7
  69. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +9 -9
  70. package/dist/bundled/v3/components/OrSelectV3/index.js +8 -8
  71. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +7 -7
  72. package/dist/bundled/v3/components/OrSidebarV3/index.js +6 -6
  73. package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +6 -6
  74. package/dist/bundled/v3/components/OrTabsV3/index.js +5 -5
  75. package/dist/bundled/v3/components/OrTagV3/OrTag.js +7 -7
  76. package/dist/bundled/v3/components/OrTagV3/index.js +6 -6
  77. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +7 -7
  78. package/dist/bundled/v3/components/OrToastContainerV3/index.js +6 -6
  79. package/dist/bundled/v3/components/OrToastV3/OrToast.js +5 -5
  80. package/dist/bundled/v3/components/OrToastV3/index.js +6 -6
  81. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +5 -5
  82. package/dist/bundled/v3/components/OrTooltipV3/index.js +4 -4
  83. package/dist/bundled/v3/components/index.d.ts +0 -1
  84. package/dist/bundled/v3/components/index.js +24 -37
  85. package/dist/bundled/v3/hooks/useElevation.js +3 -3
  86. package/dist/bundled/v3/{index-f5487f12.js → index-6976c52a.js} +115 -3
  87. package/dist/bundled/v3/index.js +27 -40
  88. package/dist/bundled/v3/{index-70ca38c5.js → lang-02d2bb2d.js} +3965 -73
  89. package/dist/bundled/v3/utils/isVisible.js +1 -1
  90. package/dist/esm/v2/{OrBottomSheet-29df8db9.js → OrBottomSheet-2d3d8fbc.js} +9 -2
  91. package/dist/esm/v2/{OrButton-236d9c2e.js → OrButton-6b60a776.js} +3 -1
  92. package/dist/esm/v2/{OrCardCollection-97167234.js → OrCardCollection-6b43a9b2.js} +5 -5
  93. package/dist/esm/v2/{OrConfirm-cd41987e.js → OrConfirm-92e39afe.js} +3 -3
  94. package/dist/esm/v2/{OrIconButton-a9db16fa.js → OrIconButton-fbe52eb8.js} +2 -2
  95. package/dist/esm/v2/{OrInlineInput-79c86e6a.js → OrInlineInput-50bf7e7c.js} +1 -1
  96. package/dist/esm/v2/{OrInlineTextarea-3e24548d.js → OrInlineTextarea-78b8aa48.js} +1 -1
  97. package/dist/esm/v2/{OrInput-044a9c85.js → OrInput-6370bd94.js} +1 -1
  98. package/dist/esm/v2/{OrMenu-47b319a6.js → OrMenu-fce31ed4.js} +1 -1
  99. package/dist/esm/v2/{OrModal-fa99b102.js → OrModal-77d6cf30.js} +2 -2
  100. package/dist/esm/v2/{OrNotification-6411c891.js → OrNotification-2b2d81d5.js} +1 -1
  101. package/dist/esm/v2/{OrOverlay-2ce3cfd7.js → OrOverlay-b1609eef.js} +1 -1
  102. package/dist/esm/v2/{OrPagination-28ad44a3.js → OrPagination-ad0e1d23.js} +3 -3
  103. package/dist/esm/v2/{OrPopover-83c885d0.js → OrPopover-9df5572b.js} +10 -3
  104. package/dist/esm/v2/{OrSearch-83631294.js → OrSearch-a3038272.js} +1 -1
  105. package/dist/esm/v2/{OrSelect-affebf55.js → OrSelect-209a7a2c.js} +3 -3
  106. package/dist/esm/v2/{OrSidebar-9834d431.js → OrSidebar-26785a1e.js} +1 -1
  107. package/dist/esm/v2/{OrSidebarCollapseButton-3275b9dd.js → OrSidebarCollapseButton-9c424133.js} +1 -1
  108. package/dist/esm/v2/{OrTabs-f0e4db08.js → OrTabs-58881ef9.js} +2 -2
  109. package/dist/esm/v2/{OrTag-ca297170.js → OrTag-e9761c21.js} +1 -1
  110. package/dist/esm/v2/{OrTooltip-2c09dcaf.js → OrTooltip-82c59279.js} +1 -1
  111. package/dist/esm/v2/components/index.d.ts +0 -1
  112. package/dist/esm/v2/components/index.js +23 -47
  113. package/dist/esm/v2/components/or-bottom-sheet-v3/index.js +3 -3
  114. package/dist/esm/v2/components/or-button-v3/index.js +1 -1
  115. package/dist/esm/v2/components/or-card-collection-v3/index.js +11 -11
  116. package/dist/esm/v2/components/or-confirm-v3/index.js +9 -9
  117. package/dist/esm/v2/components/or-icon-button-v3/index.js +6 -6
  118. package/dist/esm/v2/components/or-inline-input-v3/index.js +7 -7
  119. package/dist/esm/v2/components/or-inline-textarea-v3/index.js +7 -7
  120. package/dist/esm/v2/components/or-input-v3/index.js +7 -7
  121. package/dist/esm/v2/components/or-menu-v3/index.js +5 -5
  122. package/dist/esm/v2/components/or-modal-v3/index.js +7 -7
  123. package/dist/esm/v2/components/or-notification-v3/index.js +7 -7
  124. package/dist/esm/v2/components/or-overlay-v3/index.js +2 -2
  125. package/dist/esm/v2/components/or-pagination-v3/index.js +7 -7
  126. package/dist/esm/v2/components/or-popover-v3/index.js +4 -4
  127. package/dist/esm/v2/components/or-search-v3/index.js +8 -8
  128. package/dist/esm/v2/components/or-select-v3/index.js +9 -9
  129. package/dist/esm/v2/components/or-sidebar-v3/index.js +8 -8
  130. package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +7 -7
  131. package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +7 -7
  132. package/dist/esm/v2/components/or-tabs-v3/index.js +6 -6
  133. package/dist/esm/v2/components/or-tag-v3/index.js +7 -7
  134. package/dist/esm/v2/components/or-toast-v3/index.js +7 -7
  135. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +7 -7
  136. package/dist/esm/v2/components/or-tooltip-v3/index.js +5 -5
  137. package/dist/esm/v2/hooks/index.js +1 -1
  138. package/dist/esm/v2/index.js +23 -47
  139. package/dist/esm/v2/{types-9b09f101.js → types-707995c5.js} +1 -1
  140. package/dist/esm/{v3/useElevation-92fce12c.js → v2/useElevation-df91fa50.js} +4 -4
  141. package/dist/esm/v3/{OrBottomSheet-0f24ecae.js → OrBottomSheet-95bc694e.js} +9 -2
  142. package/dist/esm/v3/{OrButton-b9bab32c.js → OrButton-8558588c.js} +3 -1
  143. package/dist/esm/v3/{OrCardCollection-5415b71b.js → OrCardCollection-631cb8e3.js} +5 -5
  144. package/dist/esm/v3/{OrConfirm-d7a152ab.js → OrConfirm-b0c7f796.js} +3 -3
  145. package/dist/esm/v3/{OrIconButton-65e83586.js → OrIconButton-786b9346.js} +2 -2
  146. package/dist/esm/v3/{OrInlineInput-2def321a.js → OrInlineInput-ca82ccc3.js} +1 -1
  147. package/dist/esm/v3/{OrInlineTextarea-6d38a261.js → OrInlineTextarea-864f1099.js} +1 -1
  148. package/dist/esm/v3/{OrInput-a7cbc8b9.js → OrInput-a43b53d2.js} +1 -1
  149. package/dist/esm/v3/{OrMenu-053a9ab7.js → OrMenu-f8132f3e.js} +1 -1
  150. package/dist/esm/v3/{OrModal-81dc4dcd.js → OrModal-cb236842.js} +2 -2
  151. package/dist/esm/v3/{OrNotification-da37f927.js → OrNotification-45b47899.js} +1 -1
  152. package/dist/esm/v3/{OrOverlay-7cf03aea.js → OrOverlay-d63d39c3.js} +1 -1
  153. package/dist/esm/v3/{OrPagination-f54ad672.js → OrPagination-1e334ccd.js} +3 -3
  154. package/dist/esm/v3/{OrPopover-3ac8f589.js → OrPopover-d6d82a06.js} +10 -3
  155. package/dist/esm/v3/{OrSearch-06f01165.js → OrSearch-d5d46937.js} +1 -1
  156. package/dist/esm/v3/{OrSelect-eab4bc19.js → OrSelect-f2911b60.js} +3 -3
  157. package/dist/esm/v3/{OrSidebar-bb1f7ea4.js → OrSidebar-0d715029.js} +1 -1
  158. package/dist/esm/v3/{OrSidebarCollapseButton-f2390f52.js → OrSidebarCollapseButton-4d7497ec.js} +1 -1
  159. package/dist/esm/v3/{OrTabs-d9e2a07e.js → OrTabs-f667cf9f.js} +2 -2
  160. package/dist/esm/v3/{OrTag-e8c12288.js → OrTag-dc1b8628.js} +1 -1
  161. package/dist/esm/v3/{OrTooltip-d91128f4.js → OrTooltip-56ed42c7.js} +1 -1
  162. package/dist/esm/v3/components/index.d.ts +0 -1
  163. package/dist/esm/v3/components/index.js +23 -47
  164. package/dist/esm/v3/components/or-bottom-sheet-v3/index.js +3 -3
  165. package/dist/esm/v3/components/or-button-v3/index.js +1 -1
  166. package/dist/esm/v3/components/or-card-collection-v3/index.js +11 -11
  167. package/dist/esm/v3/components/or-confirm-v3/index.js +9 -9
  168. package/dist/esm/v3/components/or-icon-button-v3/index.js +6 -6
  169. package/dist/esm/v3/components/or-inline-input-v3/index.js +7 -7
  170. package/dist/esm/v3/components/or-inline-textarea-v3/index.js +7 -7
  171. package/dist/esm/v3/components/or-input-v3/index.js +7 -7
  172. package/dist/esm/v3/components/or-menu-v3/index.js +5 -5
  173. package/dist/esm/v3/components/or-modal-v3/index.js +7 -7
  174. package/dist/esm/v3/components/or-notification-v3/index.js +7 -7
  175. package/dist/esm/v3/components/or-overlay-v3/index.js +2 -2
  176. package/dist/esm/v3/components/or-pagination-v3/index.js +7 -7
  177. package/dist/esm/v3/components/or-popover-v3/index.js +4 -4
  178. package/dist/esm/v3/components/or-search-v3/index.js +8 -8
  179. package/dist/esm/v3/components/or-select-v3/index.js +9 -9
  180. package/dist/esm/v3/components/or-sidebar-v3/index.js +8 -8
  181. package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +7 -7
  182. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +7 -7
  183. package/dist/esm/v3/components/or-tabs-v3/index.js +6 -6
  184. package/dist/esm/v3/components/or-tag-v3/index.js +7 -7
  185. package/dist/esm/v3/components/or-toast-v3/index.js +7 -7
  186. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +7 -7
  187. package/dist/esm/v3/components/or-tooltip-v3/index.js +5 -5
  188. package/dist/esm/v3/hooks/index.js +1 -1
  189. package/dist/esm/v3/index.js +23 -47
  190. package/dist/esm/v3/{types-0e3ddb0f.js → types-71d7c1df.js} +1 -1
  191. package/dist/esm/{v2/useElevation-92fce12c.js → v3/useElevation-df91fa50.js} +4 -4
  192. package/package.json +5 -25
  193. package/src/components/index.ts +0 -1
  194. package/src/components/or-bottom-sheet-v3/OrBottomSheet.vue +7 -1
  195. package/src/components/or-button-v3/styles.ts +6 -2
  196. package/src/components/or-popover-v3/OrPopover.vue +7 -1
  197. package/src/hooks/useElevation.ts +3 -2
  198. package/src/utils/isVisible.ts +1 -1
  199. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -2036
  200. package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -181
  201. package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +0 -1
  202. package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +0 -67
  203. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +0 -6
  204. package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +0 -38
  205. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
  206. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -45
  207. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
  208. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
  209. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
  210. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
  211. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
  212. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
  213. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
  214. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
  215. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
  216. package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +0 -5
  217. package/dist/bundled/v2/index-16aee5bc.js +0 -3740
  218. package/dist/bundled/v2/index-62c3221b.js +0 -6956
  219. package/dist/bundled/v2/index.es-3f39f316.js +0 -115
  220. package/dist/bundled/v2/markdown-00716a39.js +0 -18683
  221. package/dist/bundled/v2/tiptap-core.esm-f85402b1.js +0 -9360
  222. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-f9e835d0.js +0 -236
  223. package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-eb03c076.js +0 -1813
  224. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -226
  225. package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -181
  226. package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +0 -1
  227. package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +0 -83
  228. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +0 -6
  229. package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +0 -38
  230. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
  231. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -45
  232. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
  233. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -184
  234. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
  235. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -5
  236. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -24
  237. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -190
  238. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
  239. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
  240. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
  241. package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +0 -5
  242. package/dist/bundled/v3/index-62c3221b.js +0 -6956
  243. package/dist/bundled/v3/index.es-3f39f316.js +0 -115
  244. package/dist/bundled/v3/markdown-00716a39.js +0 -18683
  245. package/dist/bundled/v3/tiptap-core.esm-f85402b1.js +0 -9360
  246. package/dist/esm/v2/OrRichTextEditor-93ace5e2.js +0 -716
  247. package/dist/esm/v2/codemirrorView-be2c7423.js +0 -353
  248. package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -181
  249. package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +0 -1
  250. package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +0 -58
  251. package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  252. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
  253. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
  254. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
  255. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
  256. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
  257. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
  258. package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
  259. package/dist/esm/v3/OrRichTextEditor-d99a44df.js +0 -680
  260. package/dist/esm/v3/codemirrorView-be2c7423.js +0 -353
  261. package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -181
  262. package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +0 -1
  263. package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +0 -56
  264. package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
  265. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
  266. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
  267. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
  268. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -7
  269. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -24
  270. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
  271. package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
  272. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +0 -7
  273. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +0 -79
  274. package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -622
  275. package/src/components/or-rich-text-editor-v3/index.ts +0 -1
  276. package/src/components/or-rich-text-editor-v3/styles.ts +0 -64
  277. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +0 -40
  278. package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +0 -254
  279. package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +0 -1
  280. package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +0 -213
  281. package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +0 -22
  282. package/src/components/or-rich-text-editor-v3/utils/markdown.ts +0 -110
  283. /package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-fe412ca5.js → OrButton.vue_vue_type_script_lang-5650b394.js} +0 -0
  284. /package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-30f62546.js → OrOverlay.vue_vue_type_script_lang-47004a50.js} +0 -0
  285. /package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-117ff0b8.js → OrToastContainer.vue_vue_type_script_lang-96bc2f19.js} +0 -0
@@ -1,3 +0,0 @@
1
- declare const serialize: (schema: any, content: any) => string;
2
- declare const deserialize: (schema: any, content: any) => any;
3
- export { serialize, deserialize };
@@ -1,7 +0,0 @@
1
- import { DocsPage } from '@storybook/addon-docs';
2
-
3
- ```ts
4
- import { OrRichTextEditorV3 as OrRichTextEditor } from '@onereach/ui-components';
5
- ```
6
-
7
- <DocsPage />
@@ -1,79 +0,0 @@
1
- // import { action } from '@storybook/addon-actions';
2
- import { Meta, StoryFn } from '@storybook/vue3';
3
- import { ref } from 'vue-demi';
4
- import OrRichTextEditorDocs from './OrRichTextEditor.docs.mdx';
5
- import OrRichTextEditor from './OrRichTextEditor.vue';
6
-
7
- export default {
8
- title: 'Experimental/OrRichTextEditor',
9
- component: OrRichTextEditor,
10
-
11
- argTypes: {
12
- // Props
13
- modelValue: {
14
- control: { type: 'text' },
15
- },
16
- value: { // TODO: Remove Vue 2 fallback
17
- table: { disable: true },
18
- },
19
- description: {
20
- control: { type: 'text' },
21
- },
22
- placeholder: {
23
- control: { type: 'text' },
24
- },
25
- markdownFormat: {
26
- control: { type: 'boolean' },
27
- },
28
- fullHeight: {
29
- control: { type: 'boolean' },
30
- },
31
- // Events
32
- 'update:modelValue': {
33
- table: { disable: true },
34
- },
35
-
36
- input: {
37
- table: { disable: true },
38
- },
39
- },
40
-
41
- parameters: {
42
- docs: {
43
- page: OrRichTextEditorDocs,
44
- },
45
-
46
- design: {
47
- type: 'figma',
48
- url: 'https://www.figma.com/file/o7DdkaznUW2PtX4wiSuhhQ/Core?node-id=608%3A2926',
49
- },
50
- },
51
- } as Meta<typeof OrRichTextEditor>;
52
-
53
- const Template: StoryFn<typeof OrRichTextEditor> = (args) => ({
54
- components: {
55
- OrRichTextEditor,
56
- },
57
-
58
- setup() {
59
- // Refs
60
- const model = ref<string>();
61
-
62
- return {
63
- args,
64
- model,
65
- };
66
- },
67
-
68
- template: `
69
- <div class="p-lg">
70
- <OrRichTextEditor
71
- v-model="model"
72
- v-bind="args"
73
- >
74
- </OrRichTextEditor>
75
- </div>
76
- `,
77
- });
78
-
79
- export const RichTextEditor = Template.bind({});
@@ -1,622 +0,0 @@
1
- <template>
2
- <div
3
- ref="root"
4
- :class="rootStyles"
5
- >
6
- <or-label>
7
- {{ description }}
8
- </or-label>
9
- <div
10
- ref="containerRef"
11
- :class="containerStyles"
12
- @click="handleEditorClick()"
13
- >
14
- <div :class="toolbarContainerStyles">
15
- <div
16
- v-for="(tool, index) in toolbar"
17
- :key="index"
18
- :class="toolbarStyles"
19
- >
20
- <div
21
- v-for="item in tool"
22
- :key="item"
23
- class="flex gap-md"
24
- >
25
- <or-icon-button
26
- v-if="item==='heading'"
27
- ref="toolbarButtonRef"
28
- :selected="isActive[item]"
29
- :disabled="!isFocused"
30
- :tooltip="{text: item, placement: 'top'}"
31
- :icon="{icon: headingIcon, variant: 'inherit', size: 'm'}"
32
- @click="menuRef.open()"
33
- />
34
- <or-icon-button
35
- v-else
36
- :tooltip="{text: iconTooltipsEnum[item], placement: 'top'}"
37
- :selected="isActive[item]"
38
- :disabled="!isFocused"
39
- :icon="{icon: iconsEnum[item], variant: 'inherit', size: 'm'}"
40
- @click="handleToolbarClick(item)"
41
- />
42
- </div>
43
- </div>
44
- </div>
45
- <div class="p-sm">
46
- <div
47
- ref="editorRef"
48
- :class="editorInputStyles"
49
- />
50
- <slot name="files" />
51
- </div>
52
- </div>
53
- <or-menu
54
- v-if="toolbarButtonRef"
55
- ref="menuRef"
56
- :trigger="toolbarButtonRef[getIndexOfHeading].root"
57
- placement="bottom-start"
58
- >
59
- <or-menu-item
60
- v-for="heading in headingLevels"
61
- :key="heading"
62
- @click="handleToolbarClick('heading', heading)"
63
- >
64
- Heading {{ heading }}
65
- </or-menu-item>
66
- <or-menu-item
67
- @click="handleToolbarClick('heading')"
68
- >
69
- None
70
- </or-menu-item>
71
- </or-menu>
72
- <or-modal
73
- :is-open="isOpenLinkModal"
74
- size="s"
75
- >
76
- <template v-slot:header>
77
- <p class="text-headline-2">
78
- Add Link
79
- </p>
80
- </template>
81
- <div>
82
- <or-label>
83
- Text
84
- </or-label>
85
- <or-input
86
- v-model="text"
87
- placeholder="Placeholder"
88
- class="pb-md"
89
- />
90
- <or-label>
91
- Link
92
- </or-label>
93
- <or-input
94
- v-model="link"
95
- placeholder="Placeholder"
96
- />
97
- </div>
98
- <template v-slot:footer>
99
- <div class="flex ml-auto gap-md">
100
- <or-button
101
- variant="outlined"
102
- @click="discardLink"
103
- >
104
- <p>Cancel</p>
105
- </or-button>
106
- <or-button
107
- @click="attachLink"
108
- >
109
- <p>Save</p>
110
- </or-button>
111
- </div>
112
- </template>
113
- </or-modal>
114
- </div>
115
- </template>
116
-
117
- <script lang="ts">
118
- import { defineComponent, ref, computed, onBeforeUnmount, onMounted, watch } from 'vue-demi';
119
- // import { useFocusTrap, UseFocusTrapReturn } from '@vueuse/integrations/useFocusTrap';
120
- import { onClickOutside } from '@vueuse/core';
121
- import { serialize, deserialize } from './utils/markdown';
122
-
123
- import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
124
- import { OrLabelV3 as OrLabel } from '../or-label-v3';
125
- import { OrMenuV3 as OrMenu } from '../or-menu-v3';
126
- import { OrMenuItemV3 as OrMenuItem } from '../or-menu-item-v3';
127
- import { OrModalV3 as OrModal } from '../or-modal-v3';
128
- import { OrInputV3 as OrInput } from '../or-input-v3';
129
- import { OrButtonV3 as OrButton } from '../or-button-v3';
130
-
131
- import {
132
- EditorContainer,
133
- ToolbarContainer,
134
- Toolbar,
135
- ToolbarButtonFocused,
136
- ToolbarButton,
137
- EditorInput,
138
- } from './styles';
139
-
140
- import { Editor, mergeAttributes } from '@tiptap/core';
141
- import StarterKit from '@tiptap/starter-kit';
142
- import Underline from '@tiptap/extension-underline';
143
- import Link from '@tiptap/extension-link';
144
- import Highlight from '@tiptap/extension-highlight';
145
- import Heading, { Level } from '@tiptap/extension-heading';
146
- import Placeholder from '@tiptap/extension-placeholder';
147
-
148
- import codemirrorNode from './utils/codemirror/codemirrorNode';
149
-
150
- export default defineComponent({
151
- name: 'OrRichTextEditor',
152
-
153
- components: {
154
- OrIconButton,
155
- OrLabel,
156
- OrMenuItem,
157
- OrMenu,
158
- OrModal,
159
- OrInput,
160
- OrButton,
161
- },
162
-
163
- inheritAttrs: false,
164
-
165
- props: {
166
- modelValue: {
167
- type: String,
168
- default: undefined,
169
- },
170
- value: { // TODO: Remove Vue 2 fallback
171
- type: String,
172
- default: undefined,
173
- },
174
- toolbar: {
175
- type: Array,
176
- default: () => [['heading'], ['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['blockquote', 'codeBlock'], ['bulletList', 'orderedList'], ['undo', 'redo'], ['file']],
177
- },
178
- description: {
179
- type: String,
180
- default: '',
181
- },
182
- placeholder: {
183
- type: String,
184
- default: 'Write something...',
185
- },
186
- autofocus: {
187
- type: Boolean,
188
- default: false,
189
- },
190
- markdownFormat: {
191
- type: Boolean,
192
- default: false,
193
- },
194
- fullHeight: {
195
- type: Boolean,
196
- default: false,
197
- },
198
- },
199
-
200
- emits: [
201
- 'update:modelValue',
202
-
203
- 'input',
204
- 'file-upload',
205
- ],
206
-
207
- expose: [
208
- 'root',
209
- ],
210
-
211
- setup(props, context) {
212
- // Refs
213
- const root = ref<HTMLElement>();
214
- let editor = null as Editor | null;
215
- const editorRef = ref<HTMLDivElement>();
216
- const containerRef = ref<HTMLDivElement>();
217
- const toolbarButtonRef = ref<InstanceType<typeof OrIconButton>>();
218
- const menuRef = ref<InstanceType<typeof OrMenu>>();
219
- const isActive = ref<{[key: string]: boolean;}>({});
220
- const isFocused = ref<boolean>(props.autofocus);
221
- const headingLevels = [1, 2, 3, 4] as Level[];
222
- const activeHeadingLevel = ref<number>(0);
223
- const markdownOutput = ref<string>('');
224
- const isOpenLinkModal = ref<boolean>(false);
225
- const text = ref<string>('');
226
- const link = ref<string>('');
227
- // let trap: UseFocusTrapReturn = useFocusTrap(editorRef, {
228
- // immediate: true,
229
- // fallbackFocus: '.container',
230
- // allowOutsideClick: true,
231
- // });
232
- const iconsEnum = ref<{[key: string]: string;}>({
233
- bold: 'format_bold',
234
- italic: 'format_italic',
235
- underline: 'format_underlined',
236
- strike: 'format_strikethrough',
237
- bulletList: 'format_list_bulleted',
238
- orderedList: 'format_list_numbered',
239
- link: 'link',
240
- highlight: 'highlight',
241
- redo: 'redo',
242
- undo: 'undo',
243
- codeBlock: 'code_blocks',
244
- blockquote: 'format_quote',
245
- file: 'attach_file',
246
- });
247
- const iconTooltipsEnum = ref<{[key: string]: string;}>({
248
- bold: 'Bold',
249
- italic: 'Italic',
250
- underline: 'Underline',
251
- strike: 'Strike',
252
- bulletList: 'Bulleted List',
253
- orderedList: 'Numbered List',
254
- link: 'Link',
255
- highlight: 'Highlight',
256
- redo: 'Redo',
257
- undo: 'Undo',
258
- codeBlock: 'Code Block',
259
- blockquote: 'Quote',
260
- file: 'File',
261
- });
262
-
263
- onMounted(() => {
264
- editor = new Editor({
265
- onUpdate: ({ editor }) => {
266
- isFocused.value = true;
267
- setActiveFormats();
268
- const html = editor.getHTML();
269
- const text = editor.getText();
270
- if (props.markdownFormat) {
271
- markdownOutput.value = serialize(editor.schema, editor.getJSON());
272
- proxyModelValue.value = markdownOutput.value;
273
- } else {
274
- proxyModelValue.value = text === '' ? text : html;
275
- }
276
- },
277
- onCreate: ({ editor }) => {
278
- if (props.markdownFormat) {
279
- const deserialized = deserialize(editor.schema, proxyModelValue.value);
280
- editor.commands.setContent(deserialized);
281
- } else {
282
- editor.commands.setContent(proxyModelValue.value as string);
283
- }
284
- },
285
- element: editorRef.value,
286
- autofocus: props.autofocus,
287
- extensions: [
288
- codemirrorNode,
289
- StarterKit.configure({
290
- heading: false,
291
- codeBlock: false,
292
- }),
293
- Heading.configure({ levels: headingLevels }).extend({
294
- levels: headingLevels,
295
- renderHTML({ node, HTMLAttributes }) {
296
- return [
297
- 'h' + node.attrs.level,
298
- mergeAttributes(HTMLAttributes, {
299
- class: `typography-headline-${node.attrs.level}`,
300
- }),
301
- 0,
302
- ];
303
- },
304
- }),
305
- Underline,
306
- Link.configure({
307
- openOnClick: true,
308
- linkOnPaste: true,
309
- autolink: false,
310
- protocols: ['ftp', 'mailto', 'http', 'https'],
311
- validate: href => /^https?:\/\//.test(href),
312
- HTMLAttributes: {
313
- class: 'text-primary cursor-pointer',
314
- },
315
- }),
316
- Highlight,
317
- Placeholder
318
- .configure({
319
- placeholder: props.placeholder,
320
- emptyEditorClass: 'is-editor-empty text-outline',
321
- }),
322
- ],
323
- editorProps: {
324
- attributes: {
325
- class: 'focus:outline-none',
326
- },
327
- },
328
- });
329
- setActiveFormats();
330
- });
331
-
332
- onBeforeUnmount(() => {
333
- editor?.destroy();
334
- });
335
-
336
- onClickOutside(root, () => {
337
- isFocused.value = false;
338
- // trap.deactivate();
339
- });
340
-
341
- // Computed
342
- const proxyModelValue = computed({
343
- get: () => {
344
- return props.modelValue ?? props.value; // TODO: Remove Vue 2 fallback
345
- },
346
-
347
- set: (value) => {
348
- context.emit('input', value);
349
- context.emit('update:modelValue', value);
350
- },
351
- });
352
-
353
- const getIndexOfHeading = computed(() => {
354
- return props.toolbar.flat().indexOf('heading');
355
- });
356
-
357
- const headingIcon = computed(() => {
358
- if (activeHeadingLevel.value && isActive.value.heading) {
359
- return `format_h${activeHeadingLevel.value}`;
360
- }
361
- return 'format_paragraph';
362
- });
363
-
364
- //Methods
365
- const handleEditorClick = () => {
366
- setActiveFormats();
367
- isFocused.value = true;
368
- editor?.commands.focus();
369
- activeHeadingLevel.value = editor?.getAttributes('heading')?.level || 0;
370
- };
371
-
372
- const handleToolbarClick = (item: string, level?: number) => {
373
- switch (item) {
374
- case 'bulletList':
375
- case 'orderedList':
376
- item === 'bulletList' ? editor?.commands.toggleBulletList() : editor?.commands.toggleOrderedList();
377
- break;
378
- case 'link':
379
- if (editor) {
380
- const cursorPosition = editor?.state.selection.$anchor.pos || 0;
381
- const { from, to, empty } = editor.state.selection;
382
- const isLink = editor.view.state.doc.nodeAt(cursorPosition)?.marks.filter((mark) => mark.type.name === 'link');
383
- const existedText = isLink?.length ? editor.view.state.doc.nodeAt(cursorPosition)?.text || '' : '';
384
-
385
- text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
386
- link.value = editor.getAttributes('link').href || '';
387
- }
388
- isOpenLinkModal.value = !isOpenLinkModal.value;
389
- break;
390
- case 'blockquote':
391
- editor?.chain().focus().toggleBlockquote().run();
392
- break;
393
- case 'codeBlock':
394
- if (!isActive.value['codeBlock']) {
395
- editor?.commands.setNode(item, { language: 'javascript' });
396
- } else {
397
- editor?.commands.setNode('paragraph');
398
- }
399
- break;
400
- case 'heading':
401
- if (!level) {
402
- editor?.commands.toggleHeading({ level: 0 as Level });
403
- activeHeadingLevel.value = 0;
404
- } else {
405
- activeHeadingLevel.value = level;
406
- editor?.commands.toggleHeading({ level: level as Level });
407
- }
408
- editor?.commands.focus();
409
- break;
410
- case 'undo':
411
- case 'redo':
412
- item === 'undo' ? editor?.commands.undo() : editor?.commands.redo();
413
- break;
414
- case 'file':
415
- context.emit('file-upload');
416
- break;
417
- default:
418
- editor?.chain().focus().toggleMark(item).run();
419
- break;
420
- }
421
- };
422
-
423
- const attachLink = async () => {
424
- // empty
425
- if (link.value === '') {
426
- editor?.chain().focus().extendMarkRange('link').unsetLink().run();
427
- }
428
-
429
- const isEmptySelection = editor?.state.selection.empty;
430
- const cursorPosition = editor?.state.selection.$anchor.pos || 0;
431
- const isLink = editor?.view.state.doc.nodeAt(cursorPosition)?.marks.filter((mark) => mark.type.name === 'link');
432
- const existedText = isLink?.length ? editor?.view.state.doc.nodeAt(cursorPosition)?.text : '';
433
-
434
- if (link.value && isEmptySelection && !existedText) {
435
- editor?.chain()
436
- .focus()
437
- .setMark('link', {
438
- href: link.value,
439
- target: '__blank',
440
- })
441
- .command(({ tr }) => {
442
- const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
443
- tr.insertText(preparedValue);
444
- return true;
445
- })
446
- .run();
447
- }
448
-
449
- if (link.value && existedText === text.value && isEmptySelection) {
450
- editor?.chain()
451
- .extendMarkRange('link')
452
- .updateAttributes('link', {
453
- href: link.value,
454
- })
455
- .run();
456
- }
457
-
458
- if (link.value && !isEmptySelection) {
459
- editor?.chain()
460
- .focus()
461
- .setMark('link', {
462
- href: link.value,
463
- target: '__blank',
464
- })
465
- .run();
466
- }
467
-
468
- text.value = '';
469
- link.value = '';
470
-
471
- isOpenLinkModal.value = false;
472
- };
473
-
474
- const discardLink = () => {
475
- isOpenLinkModal.value = false;
476
- };
477
-
478
- const setActiveFormats = () => {
479
- const toolbarList = props.toolbar.flat() as string[];
480
- toolbarList.forEach((item) => {
481
- isActive.value[item] = editor?.isActive(item) || false;
482
- });
483
- };
484
-
485
- // Styles
486
- const rootStyles = computed(() => {
487
- return [
488
- 'or-rich-text-editor',
489
- ...props.fullHeight ? ['h-full'] : [],
490
- ];
491
- });
492
-
493
- const containerStyles = computed(() => {
494
- return [
495
- ...EditorContainer,
496
- ...props.fullHeight ? ['h-full'] : [],
497
- ];
498
- });
499
-
500
- const toolbarContainerStyles = computed(() => {
501
- return [
502
- ...ToolbarContainer,
503
- ];
504
- });
505
-
506
- const toolbarStyles = computed(() => {
507
- return [
508
- ...Toolbar,
509
- ...isFocused.value ? ToolbarButtonFocused : ToolbarButton,
510
- ];
511
- });
512
-
513
- const editorInputStyles = computed(() => {
514
- return [
515
- 'tiptap-editor',
516
- ...props.fullHeight ? ['h-full'] : [],
517
- ...EditorInput,
518
- ];
519
- });
520
-
521
- //Effects
522
- watch(proxyModelValue, (value) => {
523
- if (value !== editor?.getHTML() && !props.markdownFormat) {
524
- editor?.commands.setContent(value as string);
525
- }
526
- if (props.markdownFormat && value !== markdownOutput.value) {
527
- const deserialized = deserialize(editor?.schema, value);
528
- editor?.commands.setContent(deserialized);
529
- }
530
- });
531
-
532
- return {
533
- editor,
534
- editorRef,
535
- containerRef,
536
- toolbarButtonRef,
537
- menuRef,
538
- iconsEnum,
539
- handleToolbarClick,
540
- handleEditorClick,
541
- isActive,
542
- iconTooltipsEnum,
543
- containerStyles,
544
- toolbarContainerStyles,
545
- toolbarStyles,
546
- rootStyles,
547
- root,
548
- editorInputStyles,
549
- getIndexOfHeading,
550
- headingLevels,
551
- headingIcon,
552
- attachLink,
553
- discardLink,
554
- isOpenLinkModal,
555
- text,
556
- link,
557
- isFocused,
558
- };
559
- },
560
- });
561
- </script>
562
-
563
- <style lang="scss">
564
- .tiptap-editor {
565
- ol { //see if editor can not inherit it
566
- margin: 0 24px;
567
- list-style: decimal;
568
- }
569
-
570
- ul {
571
- margin: 0 24px;
572
- list-style: initial;
573
- }
574
-
575
- pre { //TODO: test styles for code block, need to discuss with team
576
- background-color: rgba($color: #bad1ec, $alpha: .3);
577
- padding: 4px 8px;
578
- margin: 4px 0;
579
- width: 100%;
580
- border-radius: 4px;
581
- }
582
-
583
- blockquote {
584
- margin: 8px 24px;
585
- padding: 0 24px;
586
- border-left: 4px solid #bad1ec;
587
- }
588
-
589
- .is-editor-empty::before {
590
- content: attr(data-placeholder);
591
- height: 0;
592
- pointer-events: none;
593
- float: left;
594
- }
595
-
596
- .cm-editor {
597
- border: none;
598
- border-radius: 4px;
599
-
600
- .cm-scroller {
601
- border-radius: 4px;
602
- }
603
-
604
- &.cm-focused {
605
- outline: none;
606
- }
607
-
608
- .cm-gutters {
609
- background-color: rgba(0, 95, 177, 0.08);
610
- border: none;
611
-
612
- .cm-gutterElement {
613
- padding: 0 10px;
614
-
615
- &.cm-activeLineGutter {
616
- background-color: rgba(0, 95, 177, 0.07)
617
- }
618
- }
619
- }
620
- }
621
- }
622
- </style>
@@ -1 +0,0 @@
1
- export { default as OrRichTextEditorV3 } from './OrRichTextEditor.vue';