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