@stesura/react-prosemirror 3.2.11-stesura.1

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 (296) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +939 -0
  3. package/dist/cjs/AbstractEditorView.js +4 -0
  4. package/dist/cjs/ReactEditorView.js +194 -0
  5. package/dist/cjs/StaticEditorView.js +89 -0
  6. package/dist/cjs/browser.js +53 -0
  7. package/dist/cjs/commands/reorderSiblings.js +72 -0
  8. package/dist/cjs/components/ChildNodeViews.js +418 -0
  9. package/dist/cjs/components/CursorWrapper.js +84 -0
  10. package/dist/cjs/components/EditorStateSelectorsProvider.js +90 -0
  11. package/dist/cjs/components/LayoutGroup.js +112 -0
  12. package/dist/cjs/components/NativeWidgetView.js +108 -0
  13. package/dist/cjs/components/OutputSpec.js +121 -0
  14. package/dist/cjs/components/ProseMirror.js +146 -0
  15. package/dist/cjs/components/ProseMirrorDoc.js +74 -0
  16. package/dist/cjs/components/SeparatorHackView.js +99 -0
  17. package/dist/cjs/components/TextNodeView.js +113 -0
  18. package/dist/cjs/components/TrailingHackView.js +87 -0
  19. package/dist/cjs/components/WidgetView.js +94 -0
  20. package/dist/cjs/components/WidgetViewComponentProps.js +4 -0
  21. package/dist/cjs/components/marks/DefaultMarkView.js +70 -0
  22. package/dist/cjs/components/marks/MarkView.js +85 -0
  23. package/dist/cjs/components/marks/MarkViewComponentProps.js +4 -0
  24. package/dist/cjs/components/marks/MarkViewConstructorView.js +116 -0
  25. package/dist/cjs/components/marks/ReactMarkView.js +109 -0
  26. package/dist/cjs/components/nodes/DefaultNodeView.js +68 -0
  27. package/dist/cjs/components/nodes/DocNodeView.js +97 -0
  28. package/dist/cjs/components/nodes/NodeView.js +129 -0
  29. package/dist/cjs/components/nodes/NodeViewComponentProps.js +4 -0
  30. package/dist/cjs/components/nodes/NodeViewConstructorView.js +145 -0
  31. package/dist/cjs/components/nodes/ReactNodeView.js +189 -0
  32. package/dist/cjs/constants.js +33 -0
  33. package/dist/cjs/contexts/ChildDescriptionsContext.js +19 -0
  34. package/dist/cjs/contexts/EditorContext.js +12 -0
  35. package/dist/cjs/contexts/EditorStateContext.js +12 -0
  36. package/dist/cjs/contexts/EditorStateStoreContext.js +45 -0
  37. package/dist/cjs/contexts/IgnoreMutationContext.js +12 -0
  38. package/dist/cjs/contexts/LayoutGroupContext.js +12 -0
  39. package/dist/cjs/contexts/NodeViewContext.js +12 -0
  40. package/dist/cjs/contexts/RenderStoreContext.js +54 -0
  41. package/dist/cjs/contexts/SelectNodeContext.js +12 -0
  42. package/dist/cjs/contexts/StopEventContext.js +12 -0
  43. package/dist/cjs/decorations/ReactWidgetType.js +58 -0
  44. package/dist/cjs/decorations/computeDocDeco.js +44 -0
  45. package/dist/cjs/decorations/internalTypes.js +4 -0
  46. package/dist/cjs/decorations/iterDeco.js +91 -0
  47. package/dist/cjs/decorations/viewDecorations.js +155 -0
  48. package/dist/cjs/dom.js +147 -0
  49. package/dist/cjs/findDOMNode.js +46 -0
  50. package/dist/cjs/hooks/useClientLayoutEffect.js +19 -0
  51. package/dist/cjs/hooks/useComponentEventListeners.js +72 -0
  52. package/dist/cjs/hooks/useEditor.js +130 -0
  53. package/dist/cjs/hooks/useEditorEffect.js +39 -0
  54. package/dist/cjs/hooks/useEditorEventCallback.js +38 -0
  55. package/dist/cjs/hooks/useEditorEventListener.js +34 -0
  56. package/dist/cjs/hooks/useEditorState.js +18 -0
  57. package/dist/cjs/hooks/useEditorStateSelector.js +17 -0
  58. package/dist/cjs/hooks/useEffectEvent.js +34 -0
  59. package/dist/cjs/hooks/useForceUpdate.js +15 -0
  60. package/dist/cjs/hooks/useIgnoreMutation.js +24 -0
  61. package/dist/cjs/hooks/useIsComposingIn.js +25 -0
  62. package/dist/cjs/hooks/useIsEditorStatic.js +15 -0
  63. package/dist/cjs/hooks/useIsNodeSelected.js +21 -0
  64. package/dist/cjs/hooks/useLayoutGroupEffect.js +20 -0
  65. package/dist/cjs/hooks/useMarkViewDescription.js +134 -0
  66. package/dist/cjs/hooks/useNodePos.js +18 -0
  67. package/dist/cjs/hooks/useNodeViewDescription.js +154 -0
  68. package/dist/cjs/hooks/useReactKeys.js +17 -0
  69. package/dist/cjs/hooks/useSelectNode.js +30 -0
  70. package/dist/cjs/hooks/useSetDom.js +57 -0
  71. package/dist/cjs/hooks/useStopEvent.js +24 -0
  72. package/dist/cjs/index.js +85 -0
  73. package/dist/cjs/package.json +3 -0
  74. package/dist/cjs/plugins/beforeInputPlugin.js +356 -0
  75. package/dist/cjs/plugins/reactKeys.js +121 -0
  76. package/dist/cjs/props.js +283 -0
  77. package/dist/cjs/refs.js +28 -0
  78. package/dist/cjs/testing/editorViewTestHelpers.js +109 -0
  79. package/dist/cjs/testing/setupProseMirrorView.js +94 -0
  80. package/dist/cjs/tiptap/ReactProseMirrorNodeView.js +26 -0
  81. package/dist/cjs/tiptap/TiptapEditor.js +34 -0
  82. package/dist/cjs/tiptap/TiptapEditorContent.js +143 -0
  83. package/dist/cjs/tiptap/TiptapEditorView.js +130 -0
  84. package/dist/cjs/tiptap/contexts/TiptapEditorContext.js +12 -0
  85. package/dist/cjs/tiptap/extensions/ReactProseMirror.js +40 -0
  86. package/dist/cjs/tiptap/extensions/ReactProseMirrorCommands.js +21 -0
  87. package/dist/cjs/tiptap/extensions/commands/updateAttributes.js +104 -0
  88. package/dist/cjs/tiptap/hooks/useEditor.js +318 -0
  89. package/dist/cjs/tiptap/hooks/useIsInReactProseMirror.js +15 -0
  90. package/dist/cjs/tiptap/hooks/useTiptapEditor.js +35 -0
  91. package/dist/cjs/tiptap/hooks/useTiptapEditorEffect.js +35 -0
  92. package/dist/cjs/tiptap/hooks/useTiptapEditorEventCallback.js +35 -0
  93. package/dist/cjs/tiptap/index.js +48 -0
  94. package/dist/cjs/tiptap/tiptapNodeView.js +245 -0
  95. package/dist/cjs/viewdesc.js +862 -0
  96. package/dist/esm/AbstractEditorView.js +1 -0
  97. package/dist/esm/ReactEditorView.js +194 -0
  98. package/dist/esm/StaticEditorView.js +79 -0
  99. package/dist/esm/browser.js +43 -0
  100. package/dist/esm/commands/reorderSiblings.js +63 -0
  101. package/dist/esm/components/ChildNodeViews.js +359 -0
  102. package/dist/esm/components/CursorWrapper.js +33 -0
  103. package/dist/esm/components/EditorStateSelectorsProvider.js +31 -0
  104. package/dist/esm/components/LayoutGroup.js +67 -0
  105. package/dist/esm/components/NativeWidgetView.js +57 -0
  106. package/dist/esm/components/OutputSpec.js +71 -0
  107. package/dist/esm/components/ProseMirror.js +95 -0
  108. package/dist/esm/components/ProseMirrorDoc.js +15 -0
  109. package/dist/esm/components/SeparatorHackView.js +48 -0
  110. package/dist/esm/components/TextNodeView.js +103 -0
  111. package/dist/esm/components/TrailingHackView.js +36 -0
  112. package/dist/esm/components/WidgetView.js +43 -0
  113. package/dist/esm/components/WidgetViewComponentProps.js +1 -0
  114. package/dist/esm/components/marks/DefaultMarkView.js +19 -0
  115. package/dist/esm/components/marks/MarkView.js +34 -0
  116. package/dist/esm/components/marks/MarkViewComponentProps.js +1 -0
  117. package/dist/esm/components/marks/MarkViewConstructorView.js +65 -0
  118. package/dist/esm/components/marks/ReactMarkView.js +58 -0
  119. package/dist/esm/components/nodes/DefaultNodeView.js +17 -0
  120. package/dist/esm/components/nodes/DocNodeView.js +46 -0
  121. package/dist/esm/components/nodes/NodeView.js +67 -0
  122. package/dist/esm/components/nodes/NodeViewComponentProps.js +1 -0
  123. package/dist/esm/components/nodes/NodeViewConstructorView.js +94 -0
  124. package/dist/esm/components/nodes/ReactNodeView.js +138 -0
  125. package/dist/esm/constants.js +15 -0
  126. package/dist/esm/contexts/ChildDescriptionsContext.js +9 -0
  127. package/dist/esm/contexts/EditorContext.js +7 -0
  128. package/dist/esm/contexts/EditorStateContext.js +2 -0
  129. package/dist/esm/contexts/EditorStateStoreContext.js +27 -0
  130. package/dist/esm/contexts/IgnoreMutationContext.js +2 -0
  131. package/dist/esm/contexts/LayoutGroupContext.js +2 -0
  132. package/dist/esm/contexts/NodeViewContext.js +2 -0
  133. package/dist/esm/contexts/RenderStoreContext.js +33 -0
  134. package/dist/esm/contexts/SelectNodeContext.js +2 -0
  135. package/dist/esm/contexts/StopEventContext.js +2 -0
  136. package/dist/esm/decorations/ReactWidgetType.js +40 -0
  137. package/dist/esm/decorations/computeDocDeco.js +44 -0
  138. package/dist/esm/decorations/internalTypes.js +1 -0
  139. package/dist/esm/decorations/iterDeco.js +85 -0
  140. package/dist/esm/decorations/viewDecorations.js +155 -0
  141. package/dist/esm/dom.js +110 -0
  142. package/dist/esm/findDOMNode.js +31 -0
  143. package/dist/esm/hooks/useClientLayoutEffect.js +9 -0
  144. package/dist/esm/hooks/useComponentEventListeners.js +87 -0
  145. package/dist/esm/hooks/useEditor.js +128 -0
  146. package/dist/esm/hooks/useEditorEffect.js +46 -0
  147. package/dist/esm/hooks/useEditorEventCallback.js +38 -0
  148. package/dist/esm/hooks/useEditorEventListener.js +28 -0
  149. package/dist/esm/hooks/useEditorState.js +10 -0
  150. package/dist/esm/hooks/useEditorStateSelector.js +14 -0
  151. package/dist/esm/hooks/useEffectEvent.js +24 -0
  152. package/dist/esm/hooks/useForceUpdate.js +8 -0
  153. package/dist/esm/hooks/useIgnoreMutation.js +14 -0
  154. package/dist/esm/hooks/useIsComposingIn.js +17 -0
  155. package/dist/esm/hooks/useIsEditorStatic.js +8 -0
  156. package/dist/esm/hooks/useIsNodeSelected.js +11 -0
  157. package/dist/esm/hooks/useLayoutGroupEffect.js +10 -0
  158. package/dist/esm/hooks/useMarkViewDescription.js +124 -0
  159. package/dist/esm/hooks/useNodePos.js +15 -0
  160. package/dist/esm/hooks/useNodeViewDescription.js +144 -0
  161. package/dist/esm/hooks/useReactKeys.js +7 -0
  162. package/dist/esm/hooks/useSelectNode.js +20 -0
  163. package/dist/esm/hooks/useSetDom.js +47 -0
  164. package/dist/esm/hooks/useStopEvent.js +14 -0
  165. package/dist/esm/index.js +19 -0
  166. package/dist/esm/plugins/beforeInputPlugin.js +346 -0
  167. package/dist/esm/plugins/reactKeys.js +106 -0
  168. package/dist/esm/props.js +267 -0
  169. package/dist/esm/refs.js +18 -0
  170. package/dist/esm/testing/editorViewTestHelpers.js +86 -0
  171. package/dist/esm/testing/setupProseMirrorView.js +76 -0
  172. package/dist/esm/tiptap/ReactProseMirrorNodeView.js +22 -0
  173. package/dist/esm/tiptap/TiptapEditor.js +24 -0
  174. package/dist/esm/tiptap/TiptapEditorContent.js +99 -0
  175. package/dist/esm/tiptap/TiptapEditorView.js +76 -0
  176. package/dist/esm/tiptap/contexts/TiptapEditorContext.js +2 -0
  177. package/dist/esm/tiptap/extensions/ReactProseMirror.js +30 -0
  178. package/dist/esm/tiptap/extensions/ReactProseMirrorCommands.js +11 -0
  179. package/dist/esm/tiptap/extensions/commands/updateAttributes.js +96 -0
  180. package/dist/esm/tiptap/hooks/useEditor.js +308 -0
  181. package/dist/esm/tiptap/hooks/useIsInReactProseMirror.js +9 -0
  182. package/dist/esm/tiptap/hooks/useTiptapEditor.js +31 -0
  183. package/dist/esm/tiptap/hooks/useTiptapEditorEffect.js +42 -0
  184. package/dist/esm/tiptap/hooks/useTiptapEditorEventCallback.js +35 -0
  185. package/dist/esm/tiptap/index.js +9 -0
  186. package/dist/esm/tiptap/tiptapNodeView.js +211 -0
  187. package/dist/esm/viewdesc.js +844 -0
  188. package/dist/tsconfig.tsbuildinfo +1 -0
  189. package/dist/types/AbstractEditorView.d.ts +28 -0
  190. package/dist/types/ReactEditorView.d.ts +102 -0
  191. package/dist/types/StaticEditorView.d.ts +26 -0
  192. package/dist/types/__tests__/viewdesc.test.d.ts +1 -0
  193. package/dist/types/browser.d.ts +15 -0
  194. package/dist/types/commands/__tests__/reorderSiblings.test.d.ts +1 -0
  195. package/dist/types/commands/reorderSiblings.d.ts +14 -0
  196. package/dist/types/components/ChildNodeViews.d.ts +9 -0
  197. package/dist/types/components/CursorWrapper.d.ts +3 -0
  198. package/dist/types/components/EditorStateSelectorsProvider.d.ts +10 -0
  199. package/dist/types/components/LayoutGroup.d.ts +12 -0
  200. package/dist/types/components/NativeWidgetView.d.ts +8 -0
  201. package/dist/types/components/OutputSpec.d.ts +10 -0
  202. package/dist/types/components/ProseMirror.d.ts +14 -0
  203. package/dist/types/components/ProseMirrorDoc.d.ts +16 -0
  204. package/dist/types/components/SeparatorHackView.d.ts +6 -0
  205. package/dist/types/components/TextNodeView.d.ts +27 -0
  206. package/dist/types/components/TrailingHackView.d.ts +6 -0
  207. package/dist/types/components/WidgetView.d.ts +8 -0
  208. package/dist/types/components/WidgetViewComponentProps.d.ts +7 -0
  209. package/dist/types/components/__tests__/ProseMirror.composition.test.d.ts +17 -0
  210. package/dist/types/components/__tests__/ProseMirror.domchange.test.d.ts +1 -0
  211. package/dist/types/components/__tests__/ProseMirror.draw-decoration.test.d.ts +1 -0
  212. package/dist/types/components/__tests__/ProseMirror.draw.test.d.ts +1 -0
  213. package/dist/types/components/__tests__/ProseMirror.memory-leak.test.d.ts +6 -0
  214. package/dist/types/components/__tests__/ProseMirror.mobile.test.d.ts +1 -0
  215. package/dist/types/components/__tests__/ProseMirror.node-view.test.d.ts +1 -0
  216. package/dist/types/components/__tests__/ProseMirror.selection.test.d.ts +1 -0
  217. package/dist/types/components/__tests__/ProseMirror.test.d.ts +1 -0
  218. package/dist/types/components/__tests__/stableContexts.test.d.ts +10 -0
  219. package/dist/types/components/marks/DefaultMarkView.d.ts +3 -0
  220. package/dist/types/components/marks/MarkView.d.ts +10 -0
  221. package/dist/types/components/marks/MarkViewComponentProps.d.ts +11 -0
  222. package/dist/types/components/marks/MarkViewConstructorView.d.ts +12 -0
  223. package/dist/types/components/marks/ReactMarkView.d.ts +12 -0
  224. package/dist/types/components/nodes/DefaultNodeView.d.ts +3 -0
  225. package/dist/types/components/nodes/DocNodeView.d.ts +12 -0
  226. package/dist/types/components/nodes/NodeView.d.ts +14 -0
  227. package/dist/types/components/nodes/NodeViewComponentProps.d.ts +13 -0
  228. package/dist/types/components/nodes/NodeViewConstructorView.d.ts +12 -0
  229. package/dist/types/components/nodes/ReactNodeView.d.ts +13 -0
  230. package/dist/types/constants.d.ts +4 -0
  231. package/dist/types/contexts/ChildDescriptionsContext.d.ts +7 -0
  232. package/dist/types/contexts/EditorContext.d.ts +18 -0
  233. package/dist/types/contexts/EditorStateContext.d.ts +2 -0
  234. package/dist/types/contexts/EditorStateStoreContext.d.ts +9 -0
  235. package/dist/types/contexts/IgnoreMutationContext.d.ts +5 -0
  236. package/dist/types/contexts/LayoutGroupContext.d.ts +5 -0
  237. package/dist/types/contexts/NodeViewContext.d.ts +9 -0
  238. package/dist/types/contexts/RenderStoreContext.d.ts +24 -0
  239. package/dist/types/contexts/SelectNodeContext.d.ts +5 -0
  240. package/dist/types/contexts/StopEventContext.d.ts +5 -0
  241. package/dist/types/contexts/__tests__/DeferredLayoutEffects.test.d.ts +1 -0
  242. package/dist/types/decorations/ReactWidgetType.d.ts +40 -0
  243. package/dist/types/decorations/computeDocDeco.d.ts +14 -0
  244. package/dist/types/decorations/internalTypes.d.ts +20 -0
  245. package/dist/types/decorations/iterDeco.d.ts +3 -0
  246. package/dist/types/decorations/viewDecorations.d.ts +14 -0
  247. package/dist/types/dom.d.ts +22 -0
  248. package/dist/types/findDOMNode.d.ts +3 -0
  249. package/dist/types/hooks/__tests__/useEditorEffect.test.d.ts +1 -0
  250. package/dist/types/hooks/useClientLayoutEffect.d.ts +2 -0
  251. package/dist/types/hooks/useComponentEventListeners.d.ts +34 -0
  252. package/dist/types/hooks/useEditor.d.ts +37 -0
  253. package/dist/types/hooks/useEditorEffect.d.ts +21 -0
  254. package/dist/types/hooks/useEditorEventCallback.d.ts +13 -0
  255. package/dist/types/hooks/useEditorEventListener.d.ts +8 -0
  256. package/dist/types/hooks/useEditorState.d.ts +5 -0
  257. package/dist/types/hooks/useEditorStateSelector.d.ts +10 -0
  258. package/dist/types/hooks/useEffectEvent.d.ts +1 -0
  259. package/dist/types/hooks/useForceUpdate.d.ts +5 -0
  260. package/dist/types/hooks/useIgnoreMutation.d.ts +2 -0
  261. package/dist/types/hooks/useIsComposingIn.d.ts +4 -0
  262. package/dist/types/hooks/useIsEditorStatic.d.ts +5 -0
  263. package/dist/types/hooks/useIsNodeSelected.d.ts +1 -0
  264. package/dist/types/hooks/useLayoutGroupEffect.d.ts +3 -0
  265. package/dist/types/hooks/useMarkViewDescription.d.ts +15 -0
  266. package/dist/types/hooks/useNodePos.d.ts +9 -0
  267. package/dist/types/hooks/useNodeViewDescription.d.ts +16 -0
  268. package/dist/types/hooks/useReactKeys.d.ts +2 -0
  269. package/dist/types/hooks/useSelectNode.d.ts +2 -0
  270. package/dist/types/hooks/useSetDom.d.ts +2 -0
  271. package/dist/types/hooks/useStopEvent.d.ts +2 -0
  272. package/dist/types/index.d.ts +21 -0
  273. package/dist/types/plugins/__tests__/reactKeys.test.d.ts +1 -0
  274. package/dist/types/plugins/beforeInputPlugin.d.ts +2 -0
  275. package/dist/types/plugins/reactKeys.d.ts +23 -0
  276. package/dist/types/props.d.ts +1173 -0
  277. package/dist/types/refs.d.ts +2 -0
  278. package/dist/types/testing/editorViewTestHelpers.d.ts +24 -0
  279. package/dist/types/testing/setupProseMirrorView.d.ts +2 -0
  280. package/dist/types/tiptap/ReactProseMirrorNodeView.d.ts +15 -0
  281. package/dist/types/tiptap/TiptapEditor.d.ts +6 -0
  282. package/dist/types/tiptap/TiptapEditorContent.d.ts +28 -0
  283. package/dist/types/tiptap/TiptapEditorView.d.ts +16 -0
  284. package/dist/types/tiptap/contexts/TiptapEditorContext.d.ts +6 -0
  285. package/dist/types/tiptap/extensions/ReactProseMirror.d.ts +9 -0
  286. package/dist/types/tiptap/extensions/ReactProseMirrorCommands.d.ts +2 -0
  287. package/dist/types/tiptap/extensions/commands/updateAttributes.d.ts +24 -0
  288. package/dist/types/tiptap/hooks/useEditor.d.ts +38 -0
  289. package/dist/types/tiptap/hooks/useIsInReactProseMirror.d.ts +6 -0
  290. package/dist/types/tiptap/hooks/useTiptapEditor.d.ts +11 -0
  291. package/dist/types/tiptap/hooks/useTiptapEditorEffect.d.ts +21 -0
  292. package/dist/types/tiptap/hooks/useTiptapEditorEventCallback.d.ts +13 -0
  293. package/dist/types/tiptap/index.d.ts +9 -0
  294. package/dist/types/tiptap/tiptapNodeView.d.ts +50 -0
  295. package/dist/types/viewdesc.d.ts +179 -0
  296. package/package.json +167 -0
@@ -0,0 +1,2 @@
1
+ import { Ref, RefCallback } from "react";
2
+ export declare function useMergedDOMRefs<Value>(...refs: Ref<Value>[]): RefCallback<Value>;
@@ -0,0 +1,24 @@
1
+ import { Node } from "prosemirror-model";
2
+ import { Selection } from "prosemirror-state";
3
+ import { doc } from "prosemirror-test-builder";
4
+ import { EditorView as EditorViewT } from "prosemirror-view";
5
+ import { Props } from "../components/ProseMirror.js";
6
+ import { DOMNode } from "../dom.js";
7
+ declare module "expect-webdriverio" {
8
+ interface AsymmetricMatchers {
9
+ toEqualNode(actual: Node): void;
10
+ }
11
+ interface Matchers<R, T> {
12
+ toEqualNode(actual: Node): R;
13
+ }
14
+ }
15
+ export declare function tempEditor({ doc: startDoc, selection, controlled, plugins, ...props }: {
16
+ doc?: ReturnType<typeof doc>;
17
+ selection?: Selection;
18
+ controlled?: boolean;
19
+ } & Omit<Props, "state">): {
20
+ view: EditorViewT;
21
+ rerender: (props?: Omit<Props, "state" | "plugins">) => void;
22
+ unmount: () => void;
23
+ };
24
+ export declare function findTextNode(node: DOMNode, text: string): Text;
@@ -0,0 +1,2 @@
1
+ export declare function setupProseMirrorView(): void;
2
+ export declare function teardownProseMirrorView(): void;
@@ -0,0 +1,15 @@
1
+ import { Editor, NodeView, NodeViewRendererOptions, NodeViewRendererProps } from "@tiptap/core";
2
+ /**
3
+ * Subclass of Tiptap's NodeView to be used in tiptapNodeView.
4
+ *
5
+ * Allows us to pass in an existing dom and contentDOM from React ProseMirror's
6
+ * ViewDesc, so that we can call Tiptap's default stopEvent and ignoreMutation
7
+ * methods
8
+ */
9
+ export declare class ReactProseMirrorNodeView<Component, NodeEditor extends Editor = Editor, Options extends NodeViewRendererOptions = NodeViewRendererOptions> extends NodeView<Component, NodeEditor, Options> {
10
+ private _dom;
11
+ private _contentDOM;
12
+ constructor(component: Component, props: NodeViewRendererProps, dom: HTMLElement, contentDOM: HTMLElement | null, options?: Partial<Options>);
13
+ get dom(): HTMLElement;
14
+ get contentDOM(): HTMLElement | null;
15
+ }
@@ -0,0 +1,6 @@
1
+ import { Editor, type EditorOptions } from "@tiptap/core";
2
+ import type { EditorView } from "prosemirror-view";
3
+ export declare class TiptapEditor extends Editor {
4
+ constructor(options?: Partial<EditorOptions>);
5
+ get view(): EditorView;
6
+ }
@@ -0,0 +1,28 @@
1
+ import { Editor } from "@tiptap/core";
2
+ import { ReactRenderer } from "@tiptap/react";
3
+ import React, { ElementType, ForwardedRef, HTMLProps, ReactPortal } from "react";
4
+ export type ContentComponent = {
5
+ setRenderer(id: string, renderer: ReactRenderer): void;
6
+ removeRenderer(id: string): void;
7
+ subscribe: (callback: () => void) => () => void;
8
+ getSnapshot: () => Record<string, ReactPortal>;
9
+ getServerSnapshot: () => Record<string, ReactPortal>;
10
+ };
11
+ export interface EditorContentProps extends HTMLProps<HTMLDivElement> {
12
+ editor: Editor | null;
13
+ innerRef?: ForwardedRef<HTMLDivElement | null>;
14
+ }
15
+ interface Props extends Omit<HTMLProps<HTMLElement>, "as"> {
16
+ editor: Editor;
17
+ as?: ElementType;
18
+ }
19
+ /**
20
+ * Renders the actual editable ProseMirror document.
21
+ *
22
+ * This **must** be passed as a child to the `TiptapEditorView`
23
+ * component. It may be wrapped in other components, and other
24
+ * childern may be passed before or after. It must be passed the
25
+ * same `editor` as is passed to the `TiptapEditorView`.
26
+ */
27
+ export declare function TiptapEditorContent({ editor: editorProp, ...props }: Props): React.JSX.Element;
28
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Editor } from "@tiptap/core";
2
+ import React, { ComponentType, ReactNode } from "react";
3
+ import { MarkViewComponentProps } from "../components/marks/MarkViewComponentProps.js";
4
+ import { NodeViewComponentProps } from "../components/nodes/NodeViewComponentProps.js";
5
+ interface Props {
6
+ editor: Editor;
7
+ nodeViewComponents?: Record<string, ComponentType<NodeViewComponentProps>>;
8
+ markViewComponents?: Record<string, ComponentType<MarkViewComponentProps>>;
9
+ children?: ReactNode;
10
+ static?: boolean;
11
+ }
12
+ /**
13
+ * Render a Tiptap-compatible React ProseMirror editor.
14
+ */
15
+ export declare function TiptapEditorView({ editor, nodeViewComponents, markViewComponents, children, static: isStatic, }: Props): React.JSX.Element;
16
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface TiptapEditorContextValue {
2
+ isEditorInitialized: boolean;
3
+ onEditorInitialize: () => void;
4
+ onEditorDeinitialize: () => void;
5
+ }
6
+ export declare const TiptapEditorContext: import("react").Context<TiptapEditorContextValue>;
@@ -0,0 +1,9 @@
1
+ import { Extension } from "@tiptap/core";
2
+ declare module "@tiptap/core" {
3
+ interface Commands<ReturnType> {
4
+ reactProseMirrorCommands: {
5
+ reorderSiblings: (pos: number, order: number[]) => ReturnType;
6
+ };
7
+ }
8
+ }
9
+ export declare const ReactProseMirror: Extension<any, any>;
@@ -0,0 +1,2 @@
1
+ import { Extension } from "@tiptap/core";
2
+ export declare const ReactProseMirrorCommands: Extension<any, any>;
@@ -0,0 +1,24 @@
1
+ import { RawCommands } from "@tiptap/core";
2
+ import type { MarkType, NodeType } from "@tiptap/pm/model";
3
+ declare module "@tiptap/core" {
4
+ interface Commands<ReturnType> {
5
+ updateAttributes: {
6
+ /**
7
+ * Update attributes of a node or mark.
8
+ * @param typeOrName The type or name of the node or mark.
9
+ * @param attributes The attributes of the node or mark.
10
+ * @example editor.commands.updateAttributes('mention', { userId: "2" })
11
+ */
12
+ updateAttributes: (
13
+ /**
14
+ * The type or name of the node or mark.
15
+ */
16
+ typeOrName: string | NodeType | MarkType,
17
+ /**
18
+ * The attributes of the node or mark.
19
+ */
20
+ attributes: Record<string, any>) => ReturnType;
21
+ };
22
+ }
23
+ }
24
+ export declare const updateAttributes: RawCommands["updateAttributes"];
@@ -0,0 +1,38 @@
1
+ import { Editor, type EditorOptions } from "@tiptap/core";
2
+ import { DependencyList } from "react";
3
+ /**
4
+ * The options for the `useEditor` hook.
5
+ */
6
+ export type UseEditorOptions = Partial<EditorOptions> & {
7
+ /**
8
+ * Whether to render the editor on the first render.
9
+ * If client-side rendering, set this to `true`.
10
+ * If server-side rendering, set this to `false`.
11
+ * @default true
12
+ */
13
+ immediatelyRender?: boolean;
14
+ /**
15
+ * Whether to re-render the editor on each transaction.
16
+ * This is legacy behavior that will be removed in future versions.
17
+ * @default false
18
+ */
19
+ shouldRerenderOnTransaction?: boolean;
20
+ };
21
+ /**
22
+ * This hook allows you to create an editor instance.
23
+ * @param options The editor options
24
+ * @param deps The dependencies to watch for changes
25
+ * @returns The editor instance
26
+ * @example const editor = useEditor({ extensions: [...] })
27
+ */
28
+ export declare function useEditor(options: UseEditorOptions & {
29
+ immediatelyRender: false;
30
+ }, deps?: DependencyList): Editor | null;
31
+ /**
32
+ * This hook allows you to create an editor instance.
33
+ * @param options The editor options
34
+ * @param deps The dependencies to watch for changes
35
+ * @returns The editor instance
36
+ * @example const editor = useEditor({ extensions: [...] })
37
+ */
38
+ export declare function useEditor(options: UseEditorOptions, deps?: DependencyList): Editor;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true if the hook is called in a
3
+ * component that's a descendant of the
4
+ * ProseMirror component
5
+ */
6
+ export declare function useIsInReactProseMirror(): boolean;
@@ -0,0 +1,11 @@
1
+ import { DependencyList } from "react";
2
+ import { useEditor } from "./useEditor.js";
3
+ export type UseTiptapEditorOptions = Omit<Parameters<typeof useEditor>[0], "element">;
4
+ /**
5
+ * Create a React ProseMirror integrated Tiptap Editor instance.
6
+ * @param options The editor options
7
+ * @param deps The dependencies to watch for changes
8
+ * @returns The editor instance
9
+ * @example const editor = useEditor({ extensions: [...] })
10
+ */
11
+ export declare function useTiptapEditor(options: UseTiptapEditorOptions, deps?: DependencyList): import("@tiptap/core").Editor;
@@ -0,0 +1,21 @@
1
+ import { Editor } from "@tiptap/core";
2
+ import { DependencyList } from "react";
3
+ /**
4
+ * Registers a layout effect to run after the EditorView has
5
+ * been updated with the latest EditorState and Decorations.
6
+ *
7
+ * Effects can take a Tiptap Editor instance as an argument.
8
+ * This hook should be used to execute layout effects that
9
+ * depend on the Editor, such as for positioning DOM
10
+ * nodes based on ProseMirror positions.
11
+ *
12
+ * Layout effects registered with this hook still fire
13
+ * synchronously after all DOM mutations, but they do so
14
+ * _after_ the Editor has been updated, even when the
15
+ * Editor lives in an ancestor component.
16
+ *
17
+ * This hook can only be used in a component that is mounted
18
+ * as a child of the TiptapEditorView component, including
19
+ * React node view components.
20
+ */
21
+ export declare function useTiptapEditorEffect(effect: (editor: Editor) => void | (() => void), dependencies?: DependencyList): void;
@@ -0,0 +1,13 @@
1
+ import { Editor } from "@tiptap/core";
2
+ /**
3
+ * Returns a stable function reference to be used as an
4
+ * event handler callback.
5
+ *
6
+ * The callback will be called with the Tiptap Editor instance
7
+ * as its first argument.
8
+ *
9
+ * This hook can only be used in a component that is mounted
10
+ * as a child of the TiptapEditorView component, including
11
+ * React node view components.
12
+ */
13
+ export declare function useTiptapEditorEventCallback<T extends unknown[], R>(callback: (editor: Editor, ...args: T) => R): (...args: T) => R;
@@ -0,0 +1,9 @@
1
+ export { tiptapNodeView } from "./tiptapNodeView.js";
2
+ export { TiptapEditorView } from "./TiptapEditorView.js";
3
+ export { TiptapEditorContent } from "./TiptapEditorContent.js";
4
+ export { useTiptapEditorEffect } from "./hooks/useTiptapEditorEffect.js";
5
+ export { useIsInReactProseMirror } from "./hooks/useIsInReactProseMirror.js";
6
+ export { useTiptapEditorEventCallback } from "./hooks/useTiptapEditorEventCallback.js";
7
+ export { TiptapEditor } from "./TiptapEditor.js";
8
+ export { type UseTiptapEditorOptions, useTiptapEditor, } from "./hooks/useTiptapEditor.js";
9
+ export { ReactProseMirror } from "./extensions/ReactProseMirror.js";
@@ -0,0 +1,50 @@
1
+ import { type ReactNodeViewProps } from "@tiptap/react";
2
+ import { type Node as ProseMirrorNode } from "prosemirror-model";
3
+ import { ViewMutationRecord } from "prosemirror-view";
4
+ import React, { type ComponentType, ElementType, Ref } from "react";
5
+ import { NodeViewComponentProps } from "../components/nodes/NodeViewComponentProps.js";
6
+ export interface TiptapNodeViewProps {
7
+ component: ComponentType<Omit<ReactNodeViewProps, "ref"> & {
8
+ ref?: Ref<HTMLElement | null>;
9
+ }>;
10
+ extension: ReactNodeViewProps["extension"];
11
+ className?: string | undefined;
12
+ attrs?: Record<string, string> | ((props: {
13
+ node: ProseMirrorNode;
14
+ HTMLAttributes: Record<string, unknown>;
15
+ }) => Record<string, string>) | undefined;
16
+ as?: ElementType | undefined;
17
+ stopEvent?: ((props: {
18
+ event: Event;
19
+ defaultStopEvent: (event: Event) => boolean;
20
+ }) => boolean) | null;
21
+ ignoreMutation?: ((props: {
22
+ mutation: ViewMutationRecord;
23
+ defaultIgnoreMutation: (mutation: ViewMutationRecord) => boolean;
24
+ }) => boolean) | null;
25
+ contentDOMElementTag?: ElementType | undefined;
26
+ }
27
+ /**
28
+ * Convert a Tiptap node view component to a React ProseMirror node view component
29
+ *
30
+ * Given a Tiptap-compatible React component and a Tiptap extension, returns
31
+ * a React component that can be passed to React ProseMirror as a custom node view.
32
+ *
33
+ * Example:
34
+ *
35
+ * ```tsx
36
+ * const nodeViews = {
37
+ * codeBlock: nodeView({
38
+ * component: function CodeBlock(nodeViewProps) {
39
+ * return (
40
+ * <pre>
41
+ * <NodeViewContent as="code" />
42
+ * </pre>
43
+ * )
44
+ * },
45
+ * extension: CodeBlockExtension,
46
+ * }),
47
+ * }
48
+ * ```
49
+ */
50
+ export declare function tiptapNodeView({ component: WrappedComponent, extension, as, className, attrs, contentDOMElementTag: InnerTag, stopEvent, ignoreMutation, }: TiptapNodeViewProps): React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<NodeViewComponentProps, "ref"> & React.RefAttributes<HTMLElement | null>>>;
@@ -0,0 +1,179 @@
1
+ import { Fragment, Mark, Node, TagParseRule } from "prosemirror-model";
2
+ import { Decoration, DecorationSource, EditorView, NodeView } from "prosemirror-view";
3
+ import { ReactEditorView } from "./ReactEditorView.js";
4
+ import { DOMNode } from "./dom.js";
5
+ declare global {
6
+ interface Node {
7
+ pmViewDesc?: ViewDesc;
8
+ }
9
+ }
10
+ export type ViewMutationRecord = MutationRecord | {
11
+ type: "selection";
12
+ target: DOMNode;
13
+ };
14
+ export declare function sortViewDescs(a: ViewDesc, b: ViewDesc): number;
15
+ export declare const placeViewDesc: (siblings: ViewDesc[], desc: ViewDesc) => void;
16
+ export declare class ViewDesc {
17
+ parent: ViewDesc | undefined;
18
+ children: ViewDesc[];
19
+ getPos: () => number;
20
+ dom: DOMNode;
21
+ contentDOM: HTMLElement | null;
22
+ dirty: number;
23
+ node: Node | null;
24
+ constructor(parent: ViewDesc | undefined, children: ViewDesc[], getPos: () => number, dom: DOMNode, contentDOM: HTMLElement | null);
25
+ matchesWidget(_widget: Decoration): boolean;
26
+ matchesMark(_mark: Mark): boolean;
27
+ matchesNode(_node: Node, _outerDeco: readonly Decoration[], _innerDeco: DecorationSource): boolean;
28
+ matchesHack(nodeName: string): boolean;
29
+ parseRule(): Omit<TagParseRule, "tag"> | null;
30
+ stopEvent(event: Event): boolean;
31
+ get size(): number;
32
+ get border(): number;
33
+ destroy(): void;
34
+ posBeforeChild(child: ViewDesc): number;
35
+ get posBefore(): number;
36
+ get posAtStart(): number;
37
+ get posAfter(): number;
38
+ get posAtEnd(): number;
39
+ localPosFromDOM(dom: DOMNode, offset: number, bias: number): number;
40
+ nearestDesc(dom: DOMNode): ViewDesc | undefined;
41
+ nearestDesc(dom: DOMNode, onlyNodes: true): NodeViewDesc | undefined;
42
+ getDesc(dom: DOMNode): ViewDesc | undefined;
43
+ posFromDOM(dom: DOMNode, offset: number, bias: number): number;
44
+ descAt(pos: number): ViewDesc | undefined;
45
+ domFromPos(pos: number, side: number): {
46
+ node: DOMNode;
47
+ offset: number;
48
+ atom?: number;
49
+ };
50
+ parseRange(from: number, to: number, base?: number): {
51
+ node: DOMNode;
52
+ from: number;
53
+ to: number;
54
+ fromOffset: number;
55
+ toOffset: number;
56
+ };
57
+ emptyChildAt(side: number): boolean;
58
+ domAfterPos(pos: number): DOMNode;
59
+ setSelection(anchor: number, head: number, view: ReactEditorView, force?: boolean): void;
60
+ ignoreMutation(mutation: ViewMutationRecord): boolean;
61
+ get contentLost(): boolean | null;
62
+ markDirty(from: number, to: number): void;
63
+ markParentsDirty(): void;
64
+ get domAtom(): boolean;
65
+ get ignoreForCoords(): boolean;
66
+ get ignoreForSelection(): boolean;
67
+ isText(_text: string): boolean;
68
+ }
69
+ export declare class WidgetViewDesc extends ViewDesc {
70
+ widget: Decoration;
71
+ constructor(parent: ViewDesc | undefined, getPos: () => number, widget: Decoration, dom: DOMNode);
72
+ matchesWidget(widget: Decoration): any;
73
+ parseRule(): {
74
+ ignore: boolean;
75
+ };
76
+ stopEvent(event: Event): any;
77
+ ignoreMutation(mutation: ViewMutationRecord): any;
78
+ get domAtom(): boolean;
79
+ get ignoreForSelection(): boolean;
80
+ get side(): number;
81
+ }
82
+ export declare class CompositionViewDesc extends ViewDesc {
83
+ textDOM: Text;
84
+ text: string;
85
+ constructor(parent: ViewDesc | undefined, getPos: () => number, dom: DOMNode, textDOM: Text, text: string);
86
+ get size(): number;
87
+ localPosFromDOM(dom: DOMNode, offset: number): number;
88
+ domFromPos(pos: number): {
89
+ node: Text;
90
+ offset: number;
91
+ };
92
+ ignoreMutation(mut: ViewMutationRecord): boolean;
93
+ }
94
+ export interface MarkView {
95
+ dom: HTMLElement;
96
+ contentDOM?: HTMLElement | null;
97
+ update?: (mark: Mark) => boolean;
98
+ ignoreMutation?: (mutation: ViewMutationRecord) => boolean;
99
+ destroy?: () => void;
100
+ }
101
+ export declare class MarkViewDesc extends ViewDesc {
102
+ mark: Mark;
103
+ spec: MarkView;
104
+ constructor(parent: ViewDesc | undefined, children: ViewDesc[], getPos: () => number, mark: Mark, dom: HTMLElement, contentDOM: HTMLElement, spec: MarkView);
105
+ parseRule(): {
106
+ mark: string;
107
+ attrs: import("prosemirror-model").Attrs;
108
+ contentElement: HTMLElement;
109
+ } | null;
110
+ matchesMark(mark: Mark): boolean;
111
+ markDirty(from: number, to: number): void;
112
+ ignoreMutation(mutation: ViewMutationRecord): boolean;
113
+ destroy(): void;
114
+ }
115
+ export declare class NodeViewDesc extends ViewDesc {
116
+ node: Node;
117
+ outerDeco: readonly Decoration[];
118
+ innerDeco: DecorationSource;
119
+ nodeDOM: DOMNode;
120
+ constructor(parent: ViewDesc | undefined, children: ViewDesc[], getPos: () => number, node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource, dom: DOMNode, contentDOM: HTMLElement | null, nodeDOM: DOMNode);
121
+ parseRule(addedNodes?: readonly DOMNode[]): Omit<TagParseRule, "tag"> | null;
122
+ matchesNode(node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource): boolean;
123
+ get size(): number;
124
+ get border(): 0 | 1;
125
+ updateChildren(_view: EditorView, _pos: number): void;
126
+ update(node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource, view: EditorView): boolean;
127
+ updateInner(node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource, view: EditorView): void;
128
+ updateOuterDeco(outerDeco: readonly Decoration[]): void;
129
+ selectNode(): void;
130
+ deselectNode(): void;
131
+ get domAtom(): boolean;
132
+ }
133
+ export declare class TextViewDesc extends NodeViewDesc {
134
+ constructor(parent: ViewDesc | undefined, children: ViewDesc[], getPos: () => number, node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource, dom: DOMNode, nodeDOM: DOMNode);
135
+ parseRule(): {
136
+ skip: any;
137
+ };
138
+ update(node: Node, outerDeco: readonly Decoration[], _innerDeco: DecorationSource, _view: ReactEditorView): boolean;
139
+ inParent(): boolean;
140
+ domFromPos(pos: number): {
141
+ node: globalThis.Node;
142
+ offset: number;
143
+ };
144
+ localPosFromDOM(dom: DOMNode, offset: number, bias: number): number;
145
+ markDirty(from: number, to: number): void;
146
+ get domAtom(): boolean;
147
+ isText(text: string): boolean;
148
+ ignoreMutation(mutation: ViewMutationRecord): boolean;
149
+ }
150
+ export declare class TrailingHackViewDesc extends ViewDesc {
151
+ parseRule(): {
152
+ ignore: boolean;
153
+ };
154
+ matchesHack(nodeName: string): boolean;
155
+ get domAtom(): boolean;
156
+ get ignoreForCoords(): boolean;
157
+ }
158
+ declare class CustomNodeViewDesc extends NodeViewDesc {
159
+ readonly spec: NodeView;
160
+ constructor(parent: ViewDesc | undefined, children: ViewDesc[], getPos: () => number, node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource, dom: HTMLElement, contentDOM: HTMLElement | null, nodeDOM: HTMLElement, spec: NodeView);
161
+ update(node: Node, outerDeco: readonly Decoration[], innerDeco: DecorationSource, view: EditorView): boolean;
162
+ selectNode(): void;
163
+ deselectNode(): void;
164
+ setSelection(anchor: number, head: number, view: ReactEditorView, force: boolean): void;
165
+ destroy(): void;
166
+ stopEvent(event: Event): boolean;
167
+ ignoreMutation(mutation: ViewMutationRecord): boolean;
168
+ }
169
+ export declare class ReactMarkViewDesc extends MarkViewDesc {
170
+ destroy(): void;
171
+ }
172
+ export declare class ReactNodeViewDesc extends CustomNodeViewDesc {
173
+ updateChildren(_view: EditorView, _pos: number): void;
174
+ updateOuterDeco(outerDeco: readonly Decoration[]): void;
175
+ destroy(): void;
176
+ }
177
+ export declare function sameOuterDeco(a: readonly Decoration[], b: readonly Decoration[]): boolean;
178
+ export declare function findTextInFragment(frag: Fragment, text: string, from: number, to: number): number;
179
+ export {};
package/package.json ADDED
@@ -0,0 +1,167 @@
1
+ {
2
+ "name": "@stesura/react-prosemirror",
3
+ "version": "3.2.11-stesura.1",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "dist/cjs/index.js",
7
+ "module": "dist/esm/index.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/esm/index.js",
13
+ "require": "./dist/cjs/index.js"
14
+ },
15
+ "./tiptap": {
16
+ "types": "./dist/types/tiptap/index.d.ts",
17
+ "import": "./dist/esm/tiptap/index.js",
18
+ "require": "./dist/cjs/tiptap/index.js"
19
+ },
20
+ "./src": "./src/index.ts"
21
+ },
22
+ "files": [
23
+ "README.md",
24
+ "LICENSE.txt",
25
+ "dist"
26
+ ],
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/stesura/react-prosemirror.git"
30
+ },
31
+ "scripts": {
32
+ "build:cjs": "swc ./src --ignore **/__tests__/** -d ./dist/cjs/ --no-swcrc --config-file .swcrc-cjs",
33
+ "build:esm": "swc ./src --ignore **/__tests__/** -d ./dist/esm/",
34
+ "build:types": "tsc --noEmit false --emitDeclarationOnly",
35
+ "build": "concurrently -P 'npm:build:* {@}' --",
36
+ "check:format": "prettier --check .",
37
+ "check:lint": "eslint --cache .",
38
+ "check:types": "tsc",
39
+ "check": "concurrently -P 'npm:check:* {@}' --",
40
+ "clean": "rimraf \"./dist/!(cjs/package.json)\"",
41
+ "demo": "yarn vite",
42
+ "demo:build": "yarn vite build --outDir docs --base=/react-prosemirror/",
43
+ "dev": "yarn build -- --watch",
44
+ "fix:format": "prettier --write .",
45
+ "fix:lint": "eslint --cache --fix .",
46
+ "fix:toc": "markdown-toc --bullets='-' -i README.md",
47
+ "fix": "concurrently -P 'npm:fix:* {@}' --",
48
+ "prepack": "yarn build",
49
+ "test:wdio": "wdio run ./wdio.conf.ts",
50
+ "test:unit": "jest",
51
+ "test": "yarn test:unit && yarn test:wdio"
52
+ },
53
+ "devDependencies": {
54
+ "@codemirror/commands": "^6.8.0",
55
+ "@codemirror/lang-javascript": "^6.2.2",
56
+ "@codemirror/state": "^6.5.1",
57
+ "@codemirror/view": "^6.36.2",
58
+ "@handlewithcare/remark-prosemirror": "^0.1.5",
59
+ "@jest/globals": "^29.6.2",
60
+ "@swc/cli": "^0.1.61",
61
+ "@swc/core": "^1.3.32",
62
+ "@swc/jest": "^0.2.24",
63
+ "@testing-library/dom": "^10.4.0",
64
+ "@testing-library/react": "^16.3.0",
65
+ "@testing-library/user-event": "^14.6.1",
66
+ "@tiptap/core": "^3.15.3",
67
+ "@tiptap/pm": "^3.15.3",
68
+ "@tiptap/react": "^3.15.3",
69
+ "@types/css-tree": "^2.3.10",
70
+ "@types/jest": "^27.0.0",
71
+ "@types/react": "^18.2.0",
72
+ "@types/react-dom": "^18.2.0",
73
+ "@types/react-reconciler": "^0.28.9",
74
+ "@typescript-eslint/eslint-plugin": "^5.51.0",
75
+ "@typescript-eslint/parser": "^5.51.0",
76
+ "@uiw/react-codemirror": "^4.23.7",
77
+ "@vitejs/plugin-basic-ssl": "^2.3.0",
78
+ "@vitejs/plugin-react": "^4.3.1",
79
+ "@wdio/browser-runner": "^9.18.1",
80
+ "@wdio/cli": "^9.18.1",
81
+ "@wdio/dot-reporter": "^9.18.0",
82
+ "@wdio/globals": "^9.17.0",
83
+ "@wdio/logger": "^9.18.0",
84
+ "@wdio/mocha-framework": "^9.18.0",
85
+ "@wdio/spec-reporter": "^9.18.0",
86
+ "@wdio/types": "^9.16.2",
87
+ "@yarnpkg/sdks": "^3.0.0-rc.38",
88
+ "concurrently": "^7.6.0",
89
+ "eslint": "^8.33.0",
90
+ "eslint-config-prettier": "^8.6.0",
91
+ "eslint-import-resolver-typescript": "^3.5.3",
92
+ "eslint-plugin-import": "^2.27.5",
93
+ "eslint-plugin-jest": "^27.2.1",
94
+ "eslint-plugin-react": "^7.32.2",
95
+ "eslint-plugin-react-hooks": "^4.6.0",
96
+ "expect": "^29.7.0",
97
+ "expect-webdriverio": "^5.4.0",
98
+ "husky": "^8.0.3",
99
+ "jest": "^29.7.0",
100
+ "jest-environment-jsdom": "^29.7.0",
101
+ "lint-staged": "^13.1.0",
102
+ "markdown-toc": "^1.2.0",
103
+ "mdast-util-gfm-table": "^2.0.0",
104
+ "micromark-extension-gfm-table": "^2.1.1",
105
+ "prettier": "^2.8.3",
106
+ "prosemirror-commands": "^1.7.1",
107
+ "prosemirror-gapcursor": "^1.4.1",
108
+ "prosemirror-history": "^1.5.0",
109
+ "prosemirror-inputrules": "^1.5.1",
110
+ "prosemirror-keymap": "^1.2.3",
111
+ "prosemirror-model": "^1.25.8",
112
+ "prosemirror-schema-list": "^1.5.1",
113
+ "prosemirror-state": "^1.4.4",
114
+ "prosemirror-tables": "^1.8.5",
115
+ "prosemirror-test-builder": "^1.1.1",
116
+ "prosemirror-transform": "^1.12.0",
117
+ "prosemirror-view": "1.42.3",
118
+ "puppeteer-core": "^25.0.4",
119
+ "react": "^18.2.0",
120
+ "react-dom": "^18.2.0",
121
+ "react-reconciler": "^0.29.0",
122
+ "remark-parse": "^11.0.0",
123
+ "rimraf": "^3.0.2",
124
+ "tsx": "^4.20.3",
125
+ "typescript": "^6.0.3",
126
+ "unified": "^11.0.5",
127
+ "vite": "^5.4.5",
128
+ "webdriver": "^9.18.0",
129
+ "webdriverio": "^9.18.1"
130
+ },
131
+ "resolutions": {
132
+ "prosemirror-view": "1.42.3"
133
+ },
134
+ "peerDependencies": {
135
+ "@tiptap/core": "^3.0.0",
136
+ "@tiptap/pm": "^3.0.0",
137
+ "@tiptap/react": "^3.0.0",
138
+ "prosemirror-model": "^1.0.0",
139
+ "prosemirror-state": "^1.0.0",
140
+ "prosemirror-transform": "^1.8.0",
141
+ "prosemirror-view": "1.42.3",
142
+ "react": ">=17 <20",
143
+ "react-dom": ">=17 <20",
144
+ "react-reconciler": ">=0.26.1 <=0.33.0"
145
+ },
146
+ "packageManager": "yarn@4.11.0",
147
+ "engines": {
148
+ "node": ">=16.9"
149
+ },
150
+ "peerDependenciesMeta": {
151
+ "@tiptap/core": {
152
+ "optional": true
153
+ },
154
+ "@tiptap/pm": {
155
+ "optional": true
156
+ },
157
+ "@tiptap/react": {
158
+ "optional": true
159
+ }
160
+ },
161
+ "dependencies": {
162
+ "classnames": "^2.5.1"
163
+ },
164
+ "publishConfig": {
165
+ "access": "restricted"
166
+ }
167
+ }