Socket
Socket
Sign inDemoInstall

y-prosemirror

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

y-prosemirror - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

6

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

@@ -44,3 +44,3 @@ "main": "./dist/y-prosemirror.cjs",

"peerDependencies": {
"yjs": ">=13.0.0-105",
"yjs": ">=13.0.0-106",
"y-protocols": "^0.2.0",

@@ -65,4 +65,4 @@ "prosemirror-model": "^1.7.1",

"y-protocols": "^0.2.0",
"yjs": "13.0.0-105"
"yjs": "13.0.0-106"
}
}

@@ -82,9 +82,9 @@ import { ProsemirrorMapping } from './plugins/sync-plugin.js' // eslint-disable-line

* @param {Y.Doc} y
* @param {Y.XmlFragment} yDoc Top level type that is bound to pView
* @param {Y.XmlFragment} documentType Top level type that is bound to pView
* @param {any} relPos Encoded Yjs based relative position
* @param {ProsemirrorMapping} mapping
*/
export const relativePositionToAbsolutePosition = (y, yDoc, relPos, mapping) => {
export const relativePositionToAbsolutePosition = (y, documentType, relPos, mapping) => {
const decodedPos = Y.createAbsolutePositionFromRelativePosition(relPos, y)
if (decodedPos === null) {
if (decodedPos === null || !Y.isParentOf(documentType, decodedPos.type._item)) {
return null

@@ -113,3 +113,3 @@ }

}
while (type !== yDoc && type._item !== null) {
while (type !== documentType && type._item !== null) {
// @ts-ignore

@@ -116,0 +116,0 @@ const parent = type._item.parent

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc