@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,181 +0,0 @@
1
- import { Editor } from '@tiptap/core';
2
- import { Level } from '@tiptap/extension-heading';
3
- declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
4
- editor: Editor | null;
5
- editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
6
- containerRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
7
- toolbarButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
8
- [x: string]: ((...args: any[]) => any) | null;
9
- } | string[], {} & {}, {
10
- [x: number]: string;
11
- } | {}, true> | undefined>;
12
- menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
13
- [x: string]: ((...args: any[]) => any) | null;
14
- } | string[], {} & {}, {
15
- [x: number]: string;
16
- } | {}, true> | undefined>;
17
- iconsEnum: import("@vue/composition-api").Ref<{
18
- [x: string]: string;
19
- }>;
20
- handleToolbarClick: (item: string, level?: number) => void;
21
- handleEditorClick: () => void;
22
- isActive: import("@vue/composition-api").Ref<{
23
- [x: string]: boolean;
24
- }>;
25
- iconTooltipsEnum: import("@vue/composition-api").Ref<{
26
- [x: string]: string;
27
- }>;
28
- containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
29
- toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
30
- toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
31
- rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
32
- root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
33
- editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
34
- getIndexOfHeading: import("@vue/composition-api").ComputedRef<number>;
35
- headingLevels: Level[];
36
- headingIcon: import("@vue/composition-api").ComputedRef<string>;
37
- attachLink: () => Promise<void>;
38
- discardLink: () => void;
39
- isOpenLinkModal: import("@vue/composition-api").Ref<boolean>;
40
- text: import("@vue/composition-api").Ref<string>;
41
- link: import("@vue/composition-api").Ref<string>;
42
- isFocused: import("@vue/composition-api").Ref<boolean>;
43
- }> & import("@vue/composition-api").Data, {}, {}, {
44
- modelValue: {
45
- type: StringConstructor;
46
- default: undefined;
47
- };
48
- value: {
49
- type: StringConstructor;
50
- default: undefined;
51
- };
52
- toolbar: {
53
- type: ArrayConstructor;
54
- default: () => string[][];
55
- };
56
- description: {
57
- type: StringConstructor;
58
- default: string;
59
- };
60
- placeholder: {
61
- type: StringConstructor;
62
- default: string;
63
- };
64
- autofocus: {
65
- type: BooleanConstructor;
66
- default: boolean;
67
- };
68
- markdownFormat: {
69
- type: BooleanConstructor;
70
- default: boolean;
71
- };
72
- fullHeight: {
73
- type: BooleanConstructor;
74
- default: boolean;
75
- };
76
- }, import("@vue/composition-api").ExtractPropTypes<{
77
- modelValue: {
78
- type: StringConstructor;
79
- default: undefined;
80
- };
81
- value: {
82
- type: StringConstructor;
83
- default: undefined;
84
- };
85
- toolbar: {
86
- type: ArrayConstructor;
87
- default: () => string[][];
88
- };
89
- description: {
90
- type: StringConstructor;
91
- default: string;
92
- };
93
- placeholder: {
94
- type: StringConstructor;
95
- default: string;
96
- };
97
- autofocus: {
98
- type: BooleanConstructor;
99
- default: boolean;
100
- };
101
- markdownFormat: {
102
- type: BooleanConstructor;
103
- default: boolean;
104
- };
105
- fullHeight: {
106
- type: BooleanConstructor;
107
- default: boolean;
108
- };
109
- }>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
110
- modelValue: string;
111
- value: string;
112
- toolbar: unknown[];
113
- description: string;
114
- placeholder: string;
115
- autofocus: boolean;
116
- markdownFormat: boolean;
117
- fullHeight: boolean;
118
- } & {} & {
119
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
120
- }, import("@vue/composition-api").ShallowUnwrapRef<{
121
- editor: Editor | null;
122
- editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
123
- containerRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
124
- toolbarButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
125
- [x: string]: ((...args: any[]) => any) | null;
126
- } | string[], {} & {}, {
127
- [x: number]: string;
128
- } | {}, true> | undefined>;
129
- menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
130
- [x: string]: ((...args: any[]) => any) | null;
131
- } | string[], {} & {}, {
132
- [x: number]: string;
133
- } | {}, true> | undefined>;
134
- iconsEnum: import("@vue/composition-api").Ref<{
135
- [x: string]: string;
136
- }>;
137
- handleToolbarClick: (item: string, level?: number) => void;
138
- handleEditorClick: () => void;
139
- isActive: import("@vue/composition-api").Ref<{
140
- [x: string]: boolean;
141
- }>;
142
- iconTooltipsEnum: import("@vue/composition-api").Ref<{
143
- [x: string]: string;
144
- }>;
145
- containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
146
- toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
147
- toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
148
- rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
149
- root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
150
- editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
151
- getIndexOfHeading: import("@vue/composition-api").ComputedRef<number>;
152
- headingLevels: Level[];
153
- headingIcon: import("@vue/composition-api").ComputedRef<string>;
154
- attachLink: () => Promise<void>;
155
- discardLink: () => void;
156
- isOpenLinkModal: import("@vue/composition-api").Ref<boolean>;
157
- text: import("@vue/composition-api").Ref<string>;
158
- link: import("@vue/composition-api").Ref<string>;
159
- isFocused: import("@vue/composition-api").Ref<boolean>;
160
- }>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
161
- modelValue: string;
162
- value: string;
163
- toolbar: unknown[];
164
- description: string;
165
- placeholder: string;
166
- autofocus: boolean;
167
- markdownFormat: boolean;
168
- fullHeight: boolean;
169
- } & {} & {
170
- [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
171
- }, {
172
- modelValue: string;
173
- value: string;
174
- toolbar: unknown[];
175
- description: string;
176
- placeholder: string;
177
- autofocus: boolean;
178
- markdownFormat: boolean;
179
- fullHeight: boolean;
180
- }, true>);
181
- export default _default;
@@ -1 +0,0 @@
1
- export { default as OrRichTextEditorV3 } from './OrRichTextEditor.vue';
@@ -1,67 +0,0 @@
1
- export { default as OrRichTextEditorV3 } from './OrRichTextEditor.js';
2
- import 'vue-demi';
3
- import '@vueuse/core';
4
- import '../../markdown-00716a39.js';
5
- import '../../index-62c3221b.js';
6
- import 'node:punycode';
7
- import '../../tiptap-core.esm-f85402b1.js';
8
- import '../../index.es-3f39f316.js';
9
- import './styles.js';
10
- import './utils/codemirror/codemirrorNode.js';
11
- import './utils/codemirror/codemirrorView.js';
12
- import '../../index-f5487f12.js';
13
- import './utils/codemirror/theme.js';
14
- import '../../index-16aee5bc.js';
15
- import '../../index-70ca38c5.js';
16
- import '../OrIconButtonV3/OrIconButton.js';
17
- import '../OrIconButtonV3/props.js';
18
- import '../OrIconV3/props.js';
19
- import '../OrIconButtonV3/styles.js';
20
- import '../OrIconV3/OrIcon.js';
21
- import '../OrIconV3/styles.js';
22
- import '../../normalize-component-6e8e3d80.js';
23
- import '../OrTooltipV3/OrTooltip.js';
24
- import '../OrTooltipV3/styles.js';
25
- import '../OrPopoverV3/OrPopover.js';
26
- import '../../floating-ui.dom.esm-83eba816.js';
27
- import '../OrPopoverV3/props.js';
28
- import '../OrPopoverV3/styles.js';
29
- import '../OrBottomSheetV3/OrBottomSheet.js';
30
- import '../OrBottomSheetV3/styles.js';
31
- import '../OrOverlayV3/OrOverlay.js';
32
- import '../OrOverlayV3/styles.js';
33
- import '../OrTeleportV3/OrTeleport.js';
34
- import 'portal-vue';
35
- import '../../hooks/useElevation.js';
36
- import '../../utils/isVisible.js';
37
- import '../../hooks/useResponsive/useResponsive.js';
38
- import '../OrLabelV3/OrLabel.js';
39
- import '../OrLabelV3/props.js';
40
- import '../OrLabelV3/styles.js';
41
- import '../OrMenuItemV3/OrMenuItem.js';
42
- import '../OrMenuItemV3/styles.js';
43
- import '../OrMenuV3/OrMenu.js';
44
- import '../OrMenuV3/styles.js';
45
- import '../OrModalV3/OrModal.js';
46
- import '../OrModalV3/props.js';
47
- import '../OrModalV3/styles.js';
48
- import '../OrInputV3/OrInput.js';
49
- import '../OrInputV3/props.js';
50
- import '../OrInputBoxV3/props.js';
51
- import '../OrInputV3/styles.js';
52
- import '../OrErrorV3/OrError.js';
53
- import '../OrErrorV3/styles.js';
54
- import '../OrHintV3/OrHint.js';
55
- import '../OrHintV3/styles.js';
56
- import '../OrInputBoxV3/OrInputBox.js';
57
- import '../OrInputBoxV3/styles.js';
58
- import '../OrLoaderV3/OrLoader.js';
59
- import '../OrLoaderV3/props.js';
60
- import '../OrLoaderV3/styles.js';
61
- import '../../hooks/useIdAttribute.js';
62
- import '../../hooks/useControlAttributes.js';
63
- import '../../hooks/useValidationAttributes.js';
64
- import '../../style-inject.es-4c6f2515.js';
65
- import '../OrButtonV3/OrButton.js';
66
- import '../OrButtonV3/props.js';
67
- import '../OrButtonV3/styles.js';
@@ -1,6 +0,0 @@
1
- export declare const EditorContainer: string[];
2
- export declare const ToolbarContainer: string[];
3
- export declare const Toolbar: string[];
4
- export declare const ToolbarButton: string[];
5
- export declare const ToolbarButtonFocused: string[];
6
- export declare const EditorInput: string[];
@@ -1,38 +0,0 @@
1
- const EditorContainer = [
2
- // Colors
3
- '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',
4
- // Sizing
5
- 'border-1', 'rounded-md', 'w-full'];
6
- const ToolbarContainer = [
7
- // Layout
8
- 'flex',
9
- //Spacing
10
- 'py-sm',
11
- //Sizing
12
- 'border-b-1',
13
- //Colors
14
- 'border-b-outline', 'dark:border-b-outline-dark'];
15
- const Toolbar = [
16
- // Layout
17
- 'flex',
18
- // Spacing
19
- 'px-sm', 'gap-md',
20
- // Sizing
21
- 'border-r-1',
22
- //Colors
23
- 'border-r-disabled', 'dark:border-r-outline-dark',
24
- // Last child
25
- 'last-of-type:border-none'];
26
- const ToolbarButton = [
27
- // Typography
28
- 'text-on-disabled', 'dark:text-on-disabled-dark'];
29
- const ToolbarButtonFocused = [
30
- // Typography
31
- 'text-outline', 'dark:text-outline-dark'];
32
- const EditorInput = [
33
- // Typography
34
- 'typography-body-2-regular', 'text-on-background', 'dark:text-on-background-dark',
35
- // Sizing
36
- 'min-h-[88px]'];
37
-
38
- export { EditorContainer, EditorInput, Toolbar, ToolbarButton, ToolbarButtonFocused, ToolbarContainer };
@@ -1,3 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- declare const _default: Node<any, any>;
3
- export default _default;
@@ -1,45 +0,0 @@
1
- import { N as Node } from '../../../../tiptap-core.esm-f85402b1.js';
2
- import CodeMirrorView from './codemirrorView.js';
3
- import { m as minimalSetup } from '../../../../index-16aee5bc.js';
4
- import { e as javascript } from '../../../../index-70ca38c5.js';
5
- import '../../../../index-62c3221b.js';
6
- import '../../../../index.es-3f39f316.js';
7
- import '../../../../index-f5487f12.js';
8
- import './theme.js';
9
-
10
- var codemirrorNode = Node.create({
11
- name: 'codeBlock',
12
- content: 'text*',
13
- marks: '',
14
- group: 'block',
15
- code: true,
16
- defining: true,
17
- isolating: true,
18
- parseHTML() {
19
- return [{
20
- tag: 'pre',
21
- preserveWhitespace: 'full'
22
- }];
23
- },
24
- renderHTML() {
25
- return ['pre', ['code', 0]];
26
- },
27
- addNodeView() {
28
- return ({
29
- node,
30
- editor,
31
- getPos
32
- }) => {
33
- return new CodeMirrorView({
34
- node,
35
- view: editor.view,
36
- getPos: getPos,
37
- cmOptions: {
38
- extensions: [minimalSetup, javascript()]
39
- }
40
- });
41
- };
42
- }
43
- });
44
-
45
- export { codemirrorNode as default };
@@ -1,27 +0,0 @@
1
- import { TextSelection } from 'prosemirror-state';
2
- import { EditorView, NodeView } from 'prosemirror-view';
3
- import { Node as ProsemirrorNode } from 'prosemirror-model';
4
- import { Transaction as CMTransaction } from '@codemirror/state';
5
- import { Command, EditorView as CMView } from '@codemirror/view';
6
- import { CodeMirrorViewOptions } from './types';
7
- declare class CodeMirrorView implements NodeView {
8
- name: string;
9
- node: ProsemirrorNode;
10
- view: EditorView;
11
- dom: HTMLElement;
12
- cm: CMView;
13
- getPos: () => number;
14
- updating: boolean;
15
- constructor(options: CodeMirrorViewOptions);
16
- forwardSelection(): void;
17
- asProseMirrorSelection(doc: ProsemirrorNode): TextSelection;
18
- dispatch(cmTr: CMTransaction): void;
19
- mayBeEscape(unit: 'char' | 'line', dir: -1 | 1): Command;
20
- update(node: ProsemirrorNode): boolean;
21
- setSelection(anchor: number, head: number): void;
22
- focus(): void;
23
- selectNode(): void;
24
- stopEvent(): boolean;
25
- destroy(): void;
26
- }
27
- export default CodeMirrorView;
@@ -1,184 +0,0 @@
1
- import { n as exitCode, T as TextSelection, S as Selection } from '../../../../index-62c3221b.js';
2
- import { a as EditorState, E as EditorView, Y as highlightActiveLine, B as highlightActiveLineGutter, z as lineNumbers, k as keymap } from '../../../../index-f5487f12.js';
3
- import theme from './theme.js';
4
- import '../../../../index.es-3f39f316.js';
5
-
6
- const computeChange = (oldVal, newVal) => {
7
- if (oldVal === newVal) {
8
- return null;
9
- }
10
- let start = 0;
11
- let oldEnd = oldVal.length;
12
- let newEnd = newVal.length;
13
- while (start < oldEnd && oldVal.charCodeAt(start) === newVal.charCodeAt(start)) {
14
- start += 1;
15
- }
16
- while (oldEnd > start && newEnd > start && oldVal.charCodeAt(oldEnd - 1) === newVal.charCodeAt(newEnd - 1)) {
17
- oldEnd -= 1;
18
- newEnd -= 1;
19
- }
20
- return {
21
- from: start,
22
- to: oldEnd,
23
- text: newVal.slice(start, newEnd)
24
- };
25
- };
26
- class CodeMirrorView {
27
- constructor(options) {
28
- var _a;
29
- this.updating = false;
30
- // Store for later
31
- this.node = options.node;
32
- this.view = options.view;
33
- const cmExtensions = ((_a = options.cmOptions) === null || _a === void 0 ? void 0 : _a.extensions) || [];
34
- this.name = 'codeBlock', this.getPos = options.getPos;
35
- const changeFilter = EditorState.changeFilter.of(tr => {
36
- if (!tr.docChanged && !this.updating) {
37
- this.forwardSelection();
38
- }
39
- return true;
40
- });
41
- // Create a CodeMirror instancew
42
- this.cm = new EditorView({
43
- dispatch: this.dispatch.bind(this)
44
- });
45
- // The editor's outer node is our DOM representation
46
- this.dom = this.cm.dom;
47
- const cmState = EditorState.create({
48
- doc: this.node.textContent,
49
- extensions: [theme, changeFilter, highlightActiveLine(), highlightActiveLineGutter(), lineNumbers(), keymap.of([{
50
- key: 'ArrowUp',
51
- run: this.mayBeEscape('line', -1)
52
- }, {
53
- key: 'ArrowLeft',
54
- run: this.mayBeEscape('char', -1)
55
- }, {
56
- key: 'ArrowDown',
57
- run: this.mayBeEscape('line', 1)
58
- }, {
59
- key: 'ArrowRight',
60
- run: this.mayBeEscape('char', 1)
61
- }, {
62
- key: 'Ctrl-Enter',
63
- run: () => {
64
- if (exitCode(this.view.state, this.view.dispatch)) {
65
- this.view.focus();
66
- return true;
67
- }
68
- return false;
69
- }
70
- }]), cmExtensions]
71
- });
72
- this.cm.setState(cmState);
73
- }
74
- forwardSelection() {
75
- if (!this.cm.hasFocus) {
76
- return;
77
- }
78
- const {
79
- state
80
- } = this.view;
81
- const selection = this.asProseMirrorSelection(state.doc);
82
- if (!selection.eq(state.selection)) {
83
- this.view.dispatch(state.tr.setSelection(selection));
84
- }
85
- }
86
- asProseMirrorSelection(doc) {
87
- const offset = this.getPos() + 1;
88
- const {
89
- anchor,
90
- head
91
- } = this.cm.state.selection.main;
92
- return TextSelection.create(doc, anchor + offset, head + offset);
93
- }
94
- dispatch(cmTr) {
95
- this.cm.setState(cmTr.state);
96
- if (cmTr.docChanged && !this.updating) {
97
- const start = this.getPos() + 1;
98
- const cmValue = cmTr.state.doc.toString();
99
- const change = computeChange(this.node.textContent, cmValue);
100
- if (!change) {
101
- return;
102
- }
103
- const content = change.text ? this.view.state.schema.text(change.text) : null;
104
- const tr = this.view.state.tr.replaceWith(change.from + start, change.to + start, content);
105
- this.view.dispatch(tr);
106
- this.forwardSelection();
107
- }
108
- }
109
- mayBeEscape(unit, dir) {
110
- return view => {
111
- const {
112
- state
113
- } = view;
114
- const {
115
- selection
116
- } = state;
117
- const offsetToPos = () => {
118
- const offset = selection.main.from;
119
- const line = state.doc.lineAt(offset);
120
- return {
121
- line: line.number,
122
- ch: offset - line.from
123
- };
124
- };
125
- const pos = offsetToPos();
126
- const hasSelection = state.selection.ranges.some(r => !r.empty);
127
- const firstLine = 1;
128
- const lastLine = state.doc.lineAt(state.doc.length).number;
129
- if (hasSelection || pos.line !== (dir < 0 ? firstLine : lastLine) || unit === 'char' && pos.ch !== (dir < 0 ? 0 : state.doc.line(pos.line).length)) {
130
- return false;
131
- }
132
- const targetPos = this.getPos() + (dir < 0 ? 0 : this.node.nodeSize);
133
- const pmSelection = Selection.near(this.view.state.doc.resolve(targetPos), dir);
134
- this.view.dispatch(this.view.state.tr.setSelection(pmSelection).scrollIntoView());
135
- this.view.focus();
136
- return true;
137
- };
138
- }
139
- update(node) {
140
- if (node.type !== this.node.type) {
141
- return false;
142
- }
143
- this.node = node;
144
- const change = computeChange(this.cm.state.doc.toString(), node.textContent);
145
- if (change) {
146
- this.updating = true;
147
- this.cm.dispatch({
148
- changes: {
149
- from: change.from,
150
- to: change.to,
151
- insert: change.text
152
- }
153
- });
154
- this.updating = false;
155
- }
156
- return true;
157
- }
158
- setSelection(anchor, head) {
159
- this.focus();
160
- this.updating = true;
161
- this.cm.dispatch({
162
- selection: {
163
- anchor,
164
- head
165
- }
166
- });
167
- this.updating = false;
168
- }
169
- focus() {
170
- this.cm.focus();
171
- this.forwardSelection();
172
- }
173
- selectNode() {
174
- this.focus();
175
- }
176
- stopEvent() {
177
- return true;
178
- }
179
- destroy() {
180
- this.cm.destroy();
181
- }
182
- }
183
-
184
- export { CodeMirrorView as default };
@@ -1 +0,0 @@
1
- export { default as CodeMirrorView } from './codemirrorView';
@@ -1,5 +0,0 @@
1
- export { default as CodeMirrorView } from './codemirrorView.js';
2
- import '../../../../index-62c3221b.js';
3
- import '../../../../index-f5487f12.js';
4
- import '../../../../index.es-3f39f316.js';
5
- import './theme.js';
@@ -1,24 +0,0 @@
1
- import { Extension } from '@codemirror/state';
2
- import { HighlightStyle } from '@codemirror/language';
3
- export declare const color: {
4
- chalky: string;
5
- coral: string;
6
- cyan: string;
7
- invalid: string;
8
- ivory: string;
9
- stone: string;
10
- malibu: string;
11
- sage: string;
12
- whiskey: string;
13
- violet: string;
14
- darkBackground: string;
15
- highlightBackground: string;
16
- background: string;
17
- tooltipBackground: string;
18
- selection: string;
19
- cursor: string;
20
- };
21
- export declare const orCodeTheme: Extension;
22
- export declare const orCodeHighlightStyle: HighlightStyle;
23
- declare const theme: Extension;
24
- export default theme;