@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,716 +0,0 @@
1
- import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch } from 'vue-demi';
2
- import { onClickOutside } from '@vueuse/core';
3
- import { defaultMarkdownSerializer, MarkdownSerializer } from 'prosemirror-markdown';
4
- import { DOMParser as DOMParser$1 } from 'prosemirror-model';
5
- import { marked } from 'marked';
6
- import Paragraph from '@tiptap/extension-paragraph';
7
- import BulletList from '@tiptap/extension-bullet-list';
8
- import ListItem from '@tiptap/extension-list-item';
9
- import OrderedList from '@tiptap/extension-ordered-list';
10
- import Strike from '@tiptap/extension-strike';
11
- import Italic from '@tiptap/extension-italic';
12
- import HardBreak from '@tiptap/extension-hard-break';
13
- import Bold from '@tiptap/extension-bold';
14
- import CodeBlock from '@tiptap/extension-code-block';
15
- import Blockquote from '@tiptap/extension-blockquote';
16
- import Link from '@tiptap/extension-link';
17
- import Highlight from '@tiptap/extension-highlight';
18
- import { _ as __vue_component__$1 } from './OrIconButton-a9db16fa.js';
19
- import { _ as __vue_component__$2 } from './OrLabel-63380256.js';
20
- import { _ as __vue_component__$4 } from './OrMenu-47b319a6.js';
21
- import './OrPopover-83c885d0.js';
22
- import { _ as __vue_component__$3 } from './OrMenuItem-6f9b8a93.js';
23
- import { _ as __vue_component__$5 } from './OrModal-fa99b102.js';
24
- import { _ as __vue_component__$6 } from './OrInput-044a9c85.js';
25
- import { _ as __vue_component__$7 } from './OrButton-236d9c2e.js';
26
- import { Node, Editor, mergeAttributes } from '@tiptap/core';
27
- import StarterKit from '@tiptap/starter-kit';
28
- import Underline from '@tiptap/extension-underline';
29
- import Heading from '@tiptap/extension-heading';
30
- import Placeholder from '@tiptap/extension-placeholder';
31
- import { C as CodeMirrorView } from './codemirrorView-be2c7423.js';
32
- import { minimalSetup } from 'codemirror';
33
- import { javascript } from '@codemirror/lang-javascript';
34
- import { s as styleInject } from './style-inject.es-4c6f2515.js';
35
- import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
36
-
37
- const serializerNodes = {
38
- ...defaultMarkdownSerializer.nodes,
39
- [Paragraph.name]: defaultMarkdownSerializer.nodes.paragraph,
40
- [BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list,
41
- [ListItem.name]: defaultMarkdownSerializer.nodes.list_item,
42
- [OrderedList.name]: defaultMarkdownSerializer.nodes.ordered_list,
43
- [HardBreak.name]: defaultMarkdownSerializer.nodes.hard_break,
44
- [CodeBlock.name]: defaultMarkdownSerializer.nodes.code_block,
45
- [Blockquote.name]: defaultMarkdownSerializer.nodes.blockquote
46
- };
47
- const serializerMarks = {
48
- ...defaultMarkdownSerializer.marks,
49
- [Bold.name]: defaultMarkdownSerializer.marks.strong,
50
- [Strike.name]: {
51
- open: '~~',
52
- close: '~~',
53
- mixable: true,
54
- expelEnclosingWhitespace: true
55
- },
56
- [Italic.name]: {
57
- open: '_',
58
- close: '_',
59
- mixable: true,
60
- expelEnclosingWhitespace: true
61
- },
62
- [Highlight.name]: {
63
- open: '==',
64
- close: '==',
65
- mixable: true,
66
- expelEnclosingWhitespace: true
67
- },
68
- [Link.name]: {
69
- open(state, mark, parent, index) {
70
- return isPlainURL(mark, parent, index, 1) ? '<' : '[';
71
- },
72
- close(state, mark, parent, index) {
73
- const href = mark.attrs.canonicalSrc || mark.attrs.href;
74
- return isPlainURL(mark, parent, index, -1) ? '>' : `](${state.esc(href)}${mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''})`;
75
- }
76
- }
77
- };
78
- const isPlainURL = (link, parent, index, side) => {
79
- if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false;
80
- const content = parent.child(index + (side < 0 ? -1 : 0));
81
- if (!content.isText || content.text !== link.attrs.href || content.marks[content.marks.length - 1] !== link) return false;
82
- if (index === (side < 0 ? 1 : parent.childCount - 1)) return true;
83
- const next = parent.child(index + (side < 0 ? -2 : 1));
84
- return !link.isInSet(next.marks);
85
- };
86
- const serialize = (schema, content) => {
87
- const proseMirrorDocument = schema.nodeFromJSON(content);
88
- const serializer = new MarkdownSerializer(serializerNodes, serializerMarks);
89
- return serializer.serialize(proseMirrorDocument);
90
- };
91
- const deserialize = (schema, content) => {
92
- if (!content) return null;
93
- const html = marked.parse(content);
94
- if (!html) return null;
95
- const parser = new DOMParser();
96
- const {
97
- body
98
- } = parser.parseFromString(html, 'text/html');
99
- // append original source as a comment that nodes can access
100
- body.append(document.createComment(content));
101
- const state = DOMParser$1.fromSchema(schema).parse(body);
102
- return state.toJSON();
103
- };
104
-
105
- const EditorContainer = [
106
- // Colors
107
- 'border-outline', 'dark:border-outline-dark', 'focus-within:theme-border-1-primary', 'dark:focus-within:theme-border-1-primary-dark', 'focus-within:bg-primary-opacity-0-08', 'dark:focus-within:bg-primary-opacity-0-08-dark', 'focus-within:theme-outline-primary', 'dark:focus-within:theme-outline-primary-dark',
108
- // Sizing
109
- 'border-1', 'rounded-md', 'w-full'];
110
- const ToolbarContainer = [
111
- // Layout
112
- 'flex',
113
- //Spacing
114
- 'py-sm',
115
- //Sizing
116
- 'border-b-1',
117
- //Colors
118
- 'border-b-outline', 'dark:border-b-outline-dark'];
119
- const Toolbar = [
120
- // Layout
121
- 'flex',
122
- // Spacing
123
- 'px-sm', 'gap-md',
124
- // Sizing
125
- 'border-r-1',
126
- //Colors
127
- 'border-r-disabled', 'dark:border-r-outline-dark',
128
- // Last child
129
- 'last-of-type:border-none'];
130
- const ToolbarButton = [
131
- // Typography
132
- 'text-on-disabled', 'dark:text-on-disabled-dark'];
133
- const ToolbarButtonFocused = [
134
- // Typography
135
- 'text-outline', 'dark:text-outline-dark'];
136
- const EditorInput = [
137
- // Typography
138
- 'typography-body-2-regular', 'text-on-background', 'dark:text-on-background-dark',
139
- // Sizing
140
- 'min-h-[88px]'];
141
-
142
- var codemirrorNode = Node.create({
143
- name: 'codeBlock',
144
- content: 'text*',
145
- marks: '',
146
- group: 'block',
147
- code: true,
148
- defining: true,
149
- isolating: true,
150
- parseHTML() {
151
- return [{
152
- tag: 'pre',
153
- preserveWhitespace: 'full'
154
- }];
155
- },
156
- renderHTML() {
157
- return ['pre', ['code', 0]];
158
- },
159
- addNodeView() {
160
- return ({
161
- node,
162
- editor,
163
- getPos
164
- }) => {
165
- return new CodeMirrorView({
166
- node,
167
- view: editor.view,
168
- getPos: getPos,
169
- cmOptions: {
170
- extensions: [minimalSetup, javascript()]
171
- }
172
- });
173
- };
174
- }
175
- });
176
-
177
- var script = defineComponent({
178
- name: 'OrRichTextEditor',
179
- components: {
180
- OrIconButton: __vue_component__$1,
181
- OrLabel: __vue_component__$2,
182
- OrMenuItem: __vue_component__$3,
183
- OrMenu: __vue_component__$4,
184
- OrModal: __vue_component__$5,
185
- OrInput: __vue_component__$6,
186
- OrButton: __vue_component__$7
187
- },
188
- inheritAttrs: false,
189
- props: {
190
- modelValue: {
191
- type: String,
192
- default: undefined
193
- },
194
- value: {
195
- type: String,
196
- default: undefined
197
- },
198
- toolbar: {
199
- type: Array,
200
- default: () => [['heading'], ['bold', 'italic', 'strike'], ['underline', 'highlight'], ['link'], ['blockquote', 'codeBlock'], ['bulletList', 'orderedList'], ['undo', 'redo'], ['file']]
201
- },
202
- description: {
203
- type: String,
204
- default: ''
205
- },
206
- placeholder: {
207
- type: String,
208
- default: 'Write something...'
209
- },
210
- autofocus: {
211
- type: Boolean,
212
- default: false
213
- },
214
- markdownFormat: {
215
- type: Boolean,
216
- default: false
217
- },
218
- fullHeight: {
219
- type: Boolean,
220
- default: false
221
- }
222
- },
223
- emits: ['update:modelValue', 'input', 'file-upload'],
224
- expose: ['root'],
225
- setup(props, context) {
226
- // Refs
227
- const root = ref();
228
- let editor = null;
229
- const editorRef = ref();
230
- const containerRef = ref();
231
- const toolbarButtonRef = ref();
232
- const menuRef = ref();
233
- const isActive = ref({});
234
- const isFocused = ref(props.autofocus);
235
- const headingLevels = [1, 2, 3, 4];
236
- const activeHeadingLevel = ref(0);
237
- const markdownOutput = ref('');
238
- const isOpenLinkModal = ref(false);
239
- const text = ref('');
240
- const link = ref('');
241
- // let trap: UseFocusTrapReturn = useFocusTrap(editorRef, {
242
- // immediate: true,
243
- // fallbackFocus: '.container',
244
- // allowOutsideClick: true,
245
- // });
246
- const iconsEnum = ref({
247
- bold: 'format_bold',
248
- italic: 'format_italic',
249
- underline: 'format_underlined',
250
- strike: 'format_strikethrough',
251
- bulletList: 'format_list_bulleted',
252
- orderedList: 'format_list_numbered',
253
- link: 'link',
254
- highlight: 'highlight',
255
- redo: 'redo',
256
- undo: 'undo',
257
- codeBlock: 'code_blocks',
258
- blockquote: 'format_quote',
259
- file: 'attach_file'
260
- });
261
- const iconTooltipsEnum = ref({
262
- bold: 'Bold',
263
- italic: 'Italic',
264
- underline: 'Underline',
265
- strike: 'Strike',
266
- bulletList: 'Bulleted List',
267
- orderedList: 'Numbered List',
268
- link: 'Link',
269
- highlight: 'Highlight',
270
- redo: 'Redo',
271
- undo: 'Undo',
272
- codeBlock: 'Code Block',
273
- blockquote: 'Quote',
274
- file: 'File'
275
- });
276
- onMounted(() => {
277
- editor = new Editor({
278
- onUpdate: ({
279
- editor
280
- }) => {
281
- isFocused.value = true;
282
- setActiveFormats();
283
- const html = editor.getHTML();
284
- const text = editor.getText();
285
- if (props.markdownFormat) {
286
- markdownOutput.value = serialize(editor.schema, editor.getJSON());
287
- proxyModelValue.value = markdownOutput.value;
288
- } else {
289
- proxyModelValue.value = text === '' ? text : html;
290
- }
291
- },
292
- onCreate: ({
293
- editor
294
- }) => {
295
- if (props.markdownFormat) {
296
- const deserialized = deserialize(editor.schema, proxyModelValue.value);
297
- editor.commands.setContent(deserialized);
298
- } else {
299
- editor.commands.setContent(proxyModelValue.value);
300
- }
301
- },
302
- element: editorRef.value,
303
- autofocus: props.autofocus,
304
- extensions: [codemirrorNode, StarterKit.configure({
305
- heading: false,
306
- codeBlock: false
307
- }), Heading.configure({
308
- levels: headingLevels
309
- }).extend({
310
- levels: headingLevels,
311
- renderHTML({
312
- node,
313
- HTMLAttributes
314
- }) {
315
- return ['h' + node.attrs.level, mergeAttributes(HTMLAttributes, {
316
- class: `typography-headline-${node.attrs.level}`
317
- }), 0];
318
- }
319
- }), Underline, Link.configure({
320
- openOnClick: true,
321
- linkOnPaste: true,
322
- autolink: false,
323
- protocols: ['ftp', 'mailto', 'http', 'https'],
324
- validate: href => /^https?:\/\//.test(href),
325
- HTMLAttributes: {
326
- class: 'text-primary cursor-pointer'
327
- }
328
- }), Highlight, Placeholder.configure({
329
- placeholder: props.placeholder,
330
- emptyEditorClass: 'is-editor-empty text-outline'
331
- })],
332
- editorProps: {
333
- attributes: {
334
- class: 'focus:outline-none'
335
- }
336
- }
337
- });
338
- setActiveFormats();
339
- });
340
- onBeforeUnmount(() => {
341
- editor === null || editor === void 0 ? void 0 : editor.destroy();
342
- });
343
- onClickOutside(root, () => {
344
- isFocused.value = false;
345
- // trap.deactivate();
346
- });
347
- // Computed
348
- const proxyModelValue = computed({
349
- get: () => {
350
- var _a;
351
- return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
352
- },
353
-
354
- set: value => {
355
- context.emit('input', value);
356
- context.emit('update:modelValue', value);
357
- }
358
- });
359
- const getIndexOfHeading = computed(() => {
360
- return props.toolbar.flat().indexOf('heading');
361
- });
362
- const headingIcon = computed(() => {
363
- if (activeHeadingLevel.value && isActive.value.heading) {
364
- return `format_h${activeHeadingLevel.value}`;
365
- }
366
- return 'format_paragraph';
367
- });
368
- //Methods
369
- const handleEditorClick = () => {
370
- var _a;
371
- setActiveFormats();
372
- isFocused.value = true;
373
- editor === null || editor === void 0 ? void 0 : editor.commands.focus();
374
- activeHeadingLevel.value = ((_a = editor === null || editor === void 0 ? void 0 : editor.getAttributes('heading')) === null || _a === void 0 ? void 0 : _a.level) || 0;
375
- };
376
- const handleToolbarClick = (item, level) => {
377
- var _a, _b;
378
- switch (item) {
379
- case 'bulletList':
380
- case 'orderedList':
381
- item === 'bulletList' ? editor === null || editor === void 0 ? void 0 : editor.commands.toggleBulletList() : editor === null || editor === void 0 ? void 0 : editor.commands.toggleOrderedList();
382
- break;
383
- case 'link':
384
- if (editor) {
385
- const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
386
- const {
387
- from,
388
- to,
389
- empty
390
- } = editor.state.selection;
391
- const isLink = (_a = editor.view.state.doc.nodeAt(cursorPosition)) === null || _a === void 0 ? void 0 : _a.marks.filter(mark => mark.type.name === 'link');
392
- 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) || '' : '';
393
- text.value = empty ? existedText : editor.state.doc.textBetween(from, to, ' ');
394
- link.value = editor.getAttributes('link').href || '';
395
- }
396
- isOpenLinkModal.value = !isOpenLinkModal.value;
397
- break;
398
- case 'blockquote':
399
- editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
400
- break;
401
- case 'codeBlock':
402
- if (!isActive.value['codeBlock']) {
403
- editor === null || editor === void 0 ? void 0 : editor.commands.setNode(item, {
404
- language: 'javascript'
405
- });
406
- } else {
407
- editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
408
- }
409
- break;
410
- case 'heading':
411
- if (!level) {
412
- editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
413
- level: 0
414
- });
415
- activeHeadingLevel.value = 0;
416
- } else {
417
- activeHeadingLevel.value = level;
418
- editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
419
- level: level
420
- });
421
- }
422
- editor === null || editor === void 0 ? void 0 : editor.commands.focus();
423
- break;
424
- case 'undo':
425
- case 'redo':
426
- item === 'undo' ? editor === null || editor === void 0 ? void 0 : editor.commands.undo() : editor === null || editor === void 0 ? void 0 : editor.commands.redo();
427
- break;
428
- case 'file':
429
- context.emit('file-upload');
430
- break;
431
- default:
432
- editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleMark(item).run();
433
- break;
434
- }
435
- };
436
- const attachLink = async () => {
437
- var _a, _b;
438
- // empty
439
- if (link.value === '') {
440
- editor === null || editor === void 0 ? void 0 : editor.chain().focus().extendMarkRange('link').unsetLink().run();
441
- }
442
- const isEmptySelection = editor === null || editor === void 0 ? void 0 : editor.state.selection.empty;
443
- const cursorPosition = (editor === null || editor === void 0 ? void 0 : editor.state.selection.$anchor.pos) || 0;
444
- 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');
445
- 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 : '';
446
- if (link.value && isEmptySelection && !existedText) {
447
- editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
448
- href: link.value,
449
- target: '__blank'
450
- }).command(({
451
- tr
452
- }) => {
453
- const preparedValue = text.value[text.value.length - 1] === ' ' ? text.value : `${text.value} `;
454
- tr.insertText(preparedValue);
455
- return true;
456
- }).run();
457
- }
458
- if (link.value && existedText === text.value && isEmptySelection) {
459
- editor === null || editor === void 0 ? void 0 : editor.chain().extendMarkRange('link').updateAttributes('link', {
460
- href: link.value
461
- }).run();
462
- }
463
- if (link.value && !isEmptySelection) {
464
- editor === null || editor === void 0 ? void 0 : editor.chain().focus().setMark('link', {
465
- href: link.value,
466
- target: '__blank'
467
- }).run();
468
- }
469
- text.value = '';
470
- link.value = '';
471
- isOpenLinkModal.value = false;
472
- };
473
- const discardLink = () => {
474
- isOpenLinkModal.value = false;
475
- };
476
- const setActiveFormats = () => {
477
- const toolbarList = props.toolbar.flat();
478
- toolbarList.forEach(item => {
479
- isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
480
- });
481
- };
482
- // Styles
483
- const rootStyles = computed(() => {
484
- return ['or-rich-text-editor', ...(props.fullHeight ? ['h-full'] : [])];
485
- });
486
- const containerStyles = computed(() => {
487
- return [...EditorContainer, ...(props.fullHeight ? ['h-full'] : [])];
488
- });
489
- const toolbarContainerStyles = computed(() => {
490
- return [...ToolbarContainer];
491
- });
492
- const toolbarStyles = computed(() => {
493
- return [...Toolbar, ...(isFocused.value ? ToolbarButtonFocused : ToolbarButton)];
494
- });
495
- const editorInputStyles = computed(() => {
496
- return ['tiptap-editor', ...(props.fullHeight ? ['h-full'] : []), ...EditorInput];
497
- });
498
- //Effects
499
- watch(proxyModelValue, value => {
500
- if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
501
- editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
502
- }
503
- if (props.markdownFormat && value !== markdownOutput.value) {
504
- const deserialized = deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value);
505
- editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialized);
506
- }
507
- });
508
- return {
509
- editor,
510
- editorRef,
511
- containerRef,
512
- toolbarButtonRef,
513
- menuRef,
514
- iconsEnum,
515
- handleToolbarClick,
516
- handleEditorClick,
517
- isActive,
518
- iconTooltipsEnum,
519
- containerStyles,
520
- toolbarContainerStyles,
521
- toolbarStyles,
522
- rootStyles,
523
- root,
524
- editorInputStyles,
525
- getIndexOfHeading,
526
- headingLevels,
527
- headingIcon,
528
- attachLink,
529
- discardLink,
530
- isOpenLinkModal,
531
- text,
532
- link,
533
- isFocused
534
- };
535
- }
536
- });
537
-
538
- var css_248z = ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}.tiptap-editor .cm-editor{border:none;border-radius:4px}.tiptap-editor .cm-editor .cm-scroller{border-radius:4px}.tiptap-editor .cm-editor.cm-focused{outline:0}.tiptap-editor .cm-editor .cm-gutters{background-color:rgba(0,95,177,.08);border:none}.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement{padding:0 10px}.tiptap-editor .cm-editor .cm-gutters .cm-gutterElement.cm-activeLineGutter{background-color:rgba(0,95,177,.07)}";
539
- styleInject(css_248z);
540
-
541
- /* script */
542
- const __vue_script__ = script;
543
- /* template */
544
- var __vue_render__ = function () {
545
- var _vm = this;
546
- var _h = _vm.$createElement;
547
- var _c = _vm._self._c || _h;
548
- return _c('div', {
549
- ref: "root",
550
- class: _vm.rootStyles
551
- }, [_c('or-label', [_vm._v("\n " + _vm._s(_vm.description) + "\n ")]), _vm._v(" "), _c('div', {
552
- ref: "containerRef",
553
- class: _vm.containerStyles,
554
- on: {
555
- "click": function ($event) {
556
- return _vm.handleEditorClick();
557
- }
558
- }
559
- }, [_c('div', {
560
- class: _vm.toolbarContainerStyles
561
- }, _vm._l(_vm.toolbar, function (tool, index) {
562
- return _c('div', {
563
- key: index,
564
- class: _vm.toolbarStyles
565
- }, _vm._l(tool, function (item) {
566
- return _c('div', {
567
- key: item,
568
- staticClass: "flex gap-md"
569
- }, [item === 'heading' ? _c('or-icon-button', {
570
- ref: "toolbarButtonRef",
571
- refInFor: true,
572
- attrs: {
573
- "selected": _vm.isActive[item],
574
- "disabled": !_vm.isFocused,
575
- "tooltip": {
576
- text: item,
577
- placement: 'top'
578
- },
579
- "icon": {
580
- icon: _vm.headingIcon,
581
- variant: 'inherit',
582
- size: 'm'
583
- }
584
- },
585
- on: {
586
- "click": function ($event) {
587
- return _vm.menuRef.open();
588
- }
589
- }
590
- }) : _c('or-icon-button', {
591
- attrs: {
592
- "tooltip": {
593
- text: _vm.iconTooltipsEnum[item],
594
- placement: 'top'
595
- },
596
- "selected": _vm.isActive[item],
597
- "disabled": !_vm.isFocused,
598
- "icon": {
599
- icon: _vm.iconsEnum[item],
600
- variant: 'inherit',
601
- size: 'm'
602
- }
603
- },
604
- on: {
605
- "click": function ($event) {
606
- return _vm.handleToolbarClick(item);
607
- }
608
- }
609
- })], 1);
610
- }), 0);
611
- }), 0), _vm._v(" "), _c('div', {
612
- staticClass: "p-sm"
613
- }, [_c('div', {
614
- ref: "editorRef",
615
- class: _vm.editorInputStyles
616
- }), _vm._v(" "), _vm._t("files")], 2)]), _vm._v(" "), _vm.toolbarButtonRef ? _c('or-menu', {
617
- ref: "menuRef",
618
- attrs: {
619
- "trigger": _vm.toolbarButtonRef[_vm.getIndexOfHeading].root,
620
- "placement": "bottom-start"
621
- }
622
- }, [_vm._l(_vm.headingLevels, function (heading) {
623
- return _c('or-menu-item', {
624
- key: heading,
625
- on: {
626
- "click": function ($event) {
627
- return _vm.handleToolbarClick('heading', heading);
628
- }
629
- }
630
- }, [_vm._v("\n Heading " + _vm._s(heading) + "\n ")]);
631
- }), _vm._v(" "), _c('or-menu-item', {
632
- on: {
633
- "click": function ($event) {
634
- return _vm.handleToolbarClick('heading');
635
- }
636
- }
637
- }, [_vm._v("\n None\n ")])], 2) : _vm._e(), _vm._v(" "), _c('or-modal', {
638
- attrs: {
639
- "is-open": _vm.isOpenLinkModal,
640
- "size": "s"
641
- },
642
- scopedSlots: _vm._u([{
643
- key: "header",
644
- fn: function () {
645
- return [_c('p', {
646
- staticClass: "text-headline-2"
647
- }, [_vm._v("\n Add Link\n ")])];
648
- },
649
- proxy: true
650
- }, {
651
- key: "footer",
652
- fn: function () {
653
- return [_c('div', {
654
- staticClass: "flex ml-auto gap-md"
655
- }, [_c('or-button', {
656
- attrs: {
657
- "variant": "outlined"
658
- },
659
- on: {
660
- "click": _vm.discardLink
661
- }
662
- }, [_c('p', [_vm._v("Cancel")])]), _vm._v(" "), _c('or-button', {
663
- on: {
664
- "click": _vm.attachLink
665
- }
666
- }, [_c('p', [_vm._v("Save")])])], 1)];
667
- },
668
- proxy: true
669
- }])
670
- }, [_vm._v(" "), _c('div', [_c('or-label', [_vm._v("\n Text\n ")]), _vm._v(" "), _c('or-input', {
671
- staticClass: "pb-md",
672
- attrs: {
673
- "placeholder": "Placeholder"
674
- },
675
- model: {
676
- value: _vm.text,
677
- callback: function ($$v) {
678
- _vm.text = $$v;
679
- },
680
- expression: "text"
681
- }
682
- }), _vm._v(" "), _c('or-label', [_vm._v("\n Link\n ")]), _vm._v(" "), _c('or-input', {
683
- attrs: {
684
- "placeholder": "Placeholder"
685
- },
686
- model: {
687
- value: _vm.link,
688
- callback: function ($$v) {
689
- _vm.link = $$v;
690
- },
691
- expression: "link"
692
- }
693
- })], 1)])], 1);
694
- };
695
- var __vue_staticRenderFns__ = [];
696
-
697
- /* style */
698
- const __vue_inject_styles__ = undefined;
699
- /* scoped */
700
- const __vue_scope_id__ = undefined;
701
- /* module identifier */
702
- const __vue_module_identifier__ = undefined;
703
- /* functional template */
704
- const __vue_is_functional_template__ = false;
705
- /* style inject */
706
-
707
- /* style inject SSR */
708
-
709
- /* style inject shadow dom */
710
-
711
- const __vue_component__ = /*#__PURE__*/normalizeComponent({
712
- render: __vue_render__,
713
- staticRenderFns: __vue_staticRenderFns__
714
- }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
715
-
716
- export { __vue_component__ as _ };