@tiptap/y-tiptap 3.0.0-beta.1 → 3.0.0-beta.3
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 +1 -1
- package/dist/src/plugins/keys.d.ts +1 -1
- package/dist/src/plugins/undo-plugin.d.ts +1 -1
- package/dist/y-tiptap.cjs +4 -5
- package/dist/y-tiptap.cjs.map +1 -1
- package/dist/y-tiptap.js +2 -3
- package/dist/y-tiptap.js.map +1 -1
- package/package.json +11 -5
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 '
|
|
19
|
+
import { keymap } from 'prosemirror-keymap'
|
|
20
20
|
..
|
|
21
21
|
|
|
22
22
|
const type = ydocument.get('prosemirror', Y.XmlFragment)
|
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
|
|
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
|
|
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
|
|
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
|
|
2090
|
+
const yUndoPlugin = ({ protectedNodes = defaultProtectedNodes, trackedOrigins = [], undoManager = null } = {}) => new prosemirrorState.Plugin({
|
|
2092
2091
|
key: yUndoPluginKey,
|
|
2093
2092
|
state: {
|
|
2094
2093
|
init: (initargs, state) => {
|