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

prosemirror-state

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-state - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

10

dist/index.js

@@ -489,6 +489,8 @@ 'use strict';

var last = tr.steps.length - 1;
if (last < startLen || !(tr.steps[last] instanceof prosemirrorTransform.ReplaceStep)) { return }
if (last < startLen) { return }
var step = tr.steps[last];
if (!(step instanceof prosemirrorTransform.ReplaceStep || step instanceof prosemirrorTransform.ReplaceAroundStep)) { return }
var map = tr.mapping.maps[last], end;
map.forEach(function (_from, _to, _newFrom, newTo) { return end = newTo; });
if (end != null) { tr.setSelection(Selection.near(tr.doc.resolve(end), bias)); }
map.forEach(function (_from, _to, _newFrom, newTo) { if (end == null) { end = newTo; } });
tr.setSelection(Selection.near(tr.doc.resolve(end), bias));
}

@@ -636,3 +638,3 @@

if (inheritMarks !== false)
{ node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to))); }
{ node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || prosemirrorModel.Mark.none))); }
selection.replaceWith(this, node);

@@ -639,0 +641,0 @@ return this

2

package.json
{
"name": "prosemirror-state",
"version": "1.0.1",
"version": "1.0.2",
"description": "ProseMirror editor state",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

import {Slice, Fragment} from "prosemirror-model"
import {ReplaceStep} from "prosemirror-transform"
import {ReplaceStep, ReplaceAroundStep} from "prosemirror-transform"

@@ -459,6 +459,8 @@ const classesById = Object.create(null)

let last = tr.steps.length - 1
if (last < startLen || !(tr.steps[last] instanceof ReplaceStep)) return
if (last < startLen) return
let step = tr.steps[last]
if (!(step instanceof ReplaceStep || step instanceof ReplaceAroundStep)) return
let map = tr.mapping.maps[last], end
map.forEach((_from, _to, _newFrom, newTo) => end = newTo)
if (end != null) tr.setSelection(Selection.near(tr.doc.resolve(end), bias))
map.forEach((_from, _to, _newFrom, newTo) => { if (end == null) end = newTo })
tr.setSelection(Selection.near(tr.doc.resolve(end), bias))
}

@@ -136,3 +136,3 @@ import {Transform} from "prosemirror-transform"

if (inheritMarks !== false)
node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : selection.$from.marksAcross(selection.$to)))
node = node.mark(this.storedMarks || (selection.empty ? selection.$from.marks() : (selection.$from.marksAcross(selection.$to) || Mark.none)))
selection.replaceWith(this, node)

@@ -139,0 +139,0 @@ return this

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