@tiptap/y-tiptap 2.0.0 → 3.0.0-beta.2

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.
package/README.md CHANGED
@@ -16,7 +16,7 @@ This binding maps a Y.XmlFragment to the ProseMirror state.
16
16
  ```js
17
17
  import { ySyncPlugin, yCursorPlugin, yUndoPlugin, undo, redo, initProseMirrorDoc } from '@tiptap/y-tiptap'
18
18
  import { exampleSetup } from 'prosemirror-example-setup'
19
- import { keymap } from 'prosemirror-keymap'
19
+ import { keymap } from '@tiptap/pm/keymap'
20
20
  ..
21
21
 
22
22
  const type = ydocument.get('prosemirror', Y.XmlFragment)
package/dist/y-tiptap.cjs CHANGED
@@ -13,6 +13,7 @@ var object = require('lib0/object');
13
13
  var set = require('lib0/set');
14
14
  var diff = require('lib0/diff');
15
15
  var error = require('lib0/error');
16
+ var state = require('@tiptap/pm/state');
16
17
  var random = require('lib0/random');
17
18
  var environment = require('lib0/environment');
18
19
  var dom = require('lib0/dom');
@@ -58,21 +59,21 @@ var buf__namespace = /*#__PURE__*/_interopNamespace(buf);
58
59
  *
59
60
  * @public
60
61
  */
61
- const ySyncPluginKey = new prosemirrorState.PluginKey('y-sync');
62
+ const ySyncPluginKey = new state.PluginKey('y-sync');
62
63
 
63
64
  /**
64
65
  * The unique prosemirror plugin key for undoPlugin
65
66
  *
66
67
  * @public
67
68
  */
68
- const yUndoPluginKey = new prosemirrorState.PluginKey('y-undo');
69
+ const yUndoPluginKey = new state.PluginKey('y-undo');
69
70
 
70
71
  /**
71
72
  * The unique prosemirror plugin key for cursorPlugin
72
73
  *
73
74
  * @public
74
75
  */
75
- const yCursorPluginKey = new prosemirrorState.PluginKey('yjs-cursor');
76
+ const yCursorPluginKey = new state.PluginKey('yjs-cursor');
76
77
 
77
78
  /**
78
79
  * Custom function to transform sha256 hash to N byte
@@ -2087,7 +2088,7 @@ const defaultDeleteFilter = (item, protectedNodes) => !(item instanceof Y.Item)
2087
2088
  (item.content.type instanceof Y.XmlElement && protectedNodes.has(item.content.type.nodeName))) ||
2088
2089
  item.content.type._length === 0;
2089
2090
 
2090
- const yUndoPlugin = ({ protectedNodes = defaultProtectedNodes, trackedOrigins = [], undoManager = null } = {}) => new prosemirrorState.Plugin({
2091
+ const yUndoPlugin = ({ protectedNodes = defaultProtectedNodes, trackedOrigins = [], undoManager = null } = {}) => new state.Plugin({
2091
2092
  key: yUndoPluginKey,
2092
2093
  state: {
2093
2094
  init: (initargs, state) => {