Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loro-prosemirror

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loro-prosemirror - npm Package Compare versions

Comparing version 0.0.4 to 0.0.6

CHANGELOG.md

16

package.json
{
"name": "loro-prosemirror",
"version": "0.0.4",
"version": "0.0.6",
"description": "Prosemirror Binding for Loro",

@@ -8,2 +8,7 @@ "main": "dist/index.js",

"typings": "dist/loro.d.ts",
"scripts": {
"build": "rollup -c",
"test": "vitest run",
"coverage": "vitest run --coverage"
},
"keywords": [

@@ -22,3 +27,3 @@ "rich-text",

"peerDependencies": {
"loro-crdt": "^0.16.4",
"loro-crdt": "^0.16.3",
"prosemirror-model": "^1.18.1",

@@ -45,8 +50,3 @@ "prosemirror-state": "^1.4.1",

"vitest": "^1.4.0"
},
"scripts": {
"build": "rollup -c",
"test": "vitest run",
"coverage": "vitest run --coverage"
}
}
}

@@ -10,3 +10,3 @@ export {

createNodeFromLoroObj,
updateLoroOnPmChange,
updateLoroToPmState,
ROOT_DOC_KEY,

@@ -13,0 +13,0 @@ NODE_NAME_KEY,

@@ -65,9 +65,8 @@ import { simpleDiff } from "lib0/diff";

export function updateLoroOnPmChange(
export function updateLoroToPmState(
doc: LoroDocType,
mapping: LoroNodeMapping,
oldEditorState: EditorState,
newEditorState: EditorState,
editorState: EditorState,
) {
const node = newEditorState.doc;
const node = editorState.doc;
const map = doc.getMap(ROOT_DOC_KEY);

@@ -74,0 +73,0 @@

@@ -15,3 +15,3 @@ import { Loro, LoroEventBatch } from "loro-crdt";

createNodeFromLoroObj,
updateLoroOnPmChange,
updateLoroToPmState,
} from "./lib";

@@ -72,3 +72,3 @@

case "doc-changed":
updateLoroOnPmChange(state.doc as LoroDocType, state.mapping, oldEditorState, newEditorState);
updateLoroToPmState(state.doc as LoroDocType, state.mapping, oldEditorState, newEditorState);
break;

@@ -75,0 +75,0 @@ case "update-state":

@@ -15,3 +15,3 @@ import { describe, assert, expect, test } from "vitest";

getLoroMapChildren,
updateLoroOnPmChange,
updateLoroToPmState,
} from "../src/lib";

@@ -202,3 +202,3 @@

const mapping: LoroNodeMapping = new Map();
updateLoroOnPmChange(loroDoc, mapping, editorState, editorState);
updateLoroToPmState(loroDoc, mapping, editorState, editorState);
expect(loroDoc.toJSON()).toEqual(exampleLoroContent);

@@ -217,3 +217,3 @@ });

updateLoroOnPmChange(loroDoc, mapping, editorState, editorState);
updateLoroToPmState(loroDoc, mapping, editorState, editorState);
expect(loroDoc.toJSON()).toEqual({

@@ -234,3 +234,3 @@ [ROOT_DOC_KEY]: {

updateLoroOnPmChange(loroDoc, mapping, editorState, editorState);
updateLoroToPmState(loroDoc, mapping, editorState, editorState);
expect(loroDoc.toJSON()).toEqual({

@@ -257,3 +257,3 @@ [ROOT_DOC_KEY]: {

updateLoroOnPmChange(loroDoc, mapping, editorState, editorState);
updateLoroToPmState(loroDoc, mapping, editorState, editorState);
expect(loroDoc.toJSON()).toEqual({

@@ -295,3 +295,3 @@ [ROOT_DOC_KEY]: {

updateLoroOnPmChange(loroDoc, mapping, editorState, editorState);
updateLoroToPmState(loroDoc, mapping, editorState, editorState);
expect(loroDoc.toJSON()).toEqual({

@@ -352,3 +352,3 @@ [ROOT_DOC_KEY]: {

updateLoroOnPmChange(loroDoc, mapping, editorState, editorState);
updateLoroToPmState(loroDoc, mapping, editorState, editorState);
expect(loroDoc.toJSON()).toEqual({

@@ -405,3 +405,3 @@ [ROOT_DOC_KEY]: {

const mapping: LoroNodeMapping = new Map();
updateLoroOnPmChange(loroDoc, mapping, _editorState, _editorState);
updateLoroToPmState(loroDoc, mapping, _editorState, _editorState);

@@ -408,0 +408,0 @@ const node = createNodeFromLoroObj(

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