You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

y-prosemirror

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.9 to 0.0.10

11

dist/y-prosemirror.js

@@ -830,3 +830,3 @@ 'use strict';

const yUndoPlugin = new prosemirrorState.Plugin({
const yUndoPlugin = ({ protectedNodes = new Set(['paragraph']) } = {}) => new prosemirrorState.Plugin({
key: yUndoPluginKey,

@@ -837,3 +837,10 @@ state: {

const ystate = ySyncPluginKey.getState(state);
const undoManager = new Y.UndoManager(ystate.type, new Set([null, ySyncPluginKey]));
const undoManager = new Y.UndoManager(ystate.type, {
trackedOrigins: new Set([null, ySyncPluginKey]),
deleteFilter: item => !(item instanceof Y.Item) ||
!(item.content instanceof Y.ContentType) ||
!(item.content.type instanceof Y.Text ||
(item.content.type instanceof Y.XmlElement && protectedNodes.has(item.content.type.nodeName))) ||
item.content.type._length === 0
});
return {

@@ -840,0 +847,0 @@ undoManager,

8

package.json
{
"name": "y-prosemirror",
"version": "0.0.9",
"version": "0.0.10",
"description": "Prosemirror bindings for Yjs",

@@ -41,6 +41,6 @@ "main": "./dist/y-prosemirror.js",

"dependencies": {
"lib0": "0.0.5"
"lib0": "0.0.6"
},
"peerDependencies": {
"yjs": ">=13.0.0-93",
"yjs": ">=13.0.0-96",
"y-protocols": ">=0.0.7",

@@ -64,4 +64,4 @@ "prosemirror-model": "^1.7.0",

"y-protocols": "0.0.7",
"yjs": "13.0.0-93"
"yjs": "13.0.0-96"
}
}

@@ -30,3 +30,3 @@ # y-prosemirror

yCursorPlugin(provider.awareness),
yUndoPlugin,
yUndoPlugin(),
keymap({

@@ -33,0 +33,0 @@ 'Mod-z': undo,

@@ -5,3 +5,3 @@

import { ySyncPluginKey, getRelativeSelection } from './sync-plugin.js'
import { UndoManager } from 'yjs'
import { UndoManager, Item, ContentType, XmlElement, Text } from 'yjs'

@@ -26,3 +26,3 @@ export const undo = state => {

export const yUndoPlugin = new Plugin({
export const yUndoPlugin = ({ protectedNodes = new Set(['paragraph']) } = {}) => new Plugin({
key: yUndoPluginKey,

@@ -33,3 +33,10 @@ state: {

const ystate = ySyncPluginKey.getState(state)
const undoManager = new UndoManager(ystate.type, new Set([null, ySyncPluginKey]))
const undoManager = new UndoManager(ystate.type, {
trackedOrigins: new Set([null, ySyncPluginKey]),
deleteFilter: item => !(item instanceof Item) ||
!(item.content instanceof ContentType) ||
!(item.content.type instanceof Text ||
(item.content.type instanceof XmlElement && protectedNodes.has(item.content.type.nodeName))) ||
item.content.type._length === 0
})
return {

@@ -36,0 +43,0 @@ undoManager,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc