@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 +1 -1
- package/dist/y-tiptap.cjs +5 -4
- package/dist/y-tiptap.cjs.map +1 -1
- package/dist/y-tiptap.js +3 -2
- package/dist/y-tiptap.js.map +1 -1
- package/package.json +4 -4
- package/dist/src/lib.d.ts +0 -117
- package/dist/src/plugins/cursor-plugin.d.ts +0 -17
- package/dist/src/plugins/keys.d.ts +0 -19
- package/dist/src/plugins/sync-plugin.d.ts +0 -125
- package/dist/src/plugins/undo-plugin.d.ts +0 -15
- package/dist/src/utils.d.ts +0 -1
- package/dist/src/y-tiptap.d.ts +0 -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 '@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
|
|
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
|
|
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
|
|
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
|
|
2091
|
+
const yUndoPlugin = ({ protectedNodes = defaultProtectedNodes, trackedOrigins = [], undoManager = null } = {}) => new state.Plugin({
|
|
2091
2092
|
key: yUndoPluginKey,
|
|
2092
2093
|
state: {
|
|
2093
2094
|
init: (initargs, state) => {
|