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

prosemirror-view

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-view - npm Package Compare versions

Comparing version 1.0.11 to 1.1.0

2

package.json
{
"name": "prosemirror-view",
"version": "1.0.11",
"version": "1.1.0",
"description": "ProseMirror's view component",

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

@@ -401,3 +401,3 @@ import {Selection, NodeSelection, TextSelection} from "prosemirror-state"

}
if (cut) view.dispatch(view.state.tr.deleteSelection().scrollIntoView())
if (cut) view.dispatch(view.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"))
}

@@ -432,3 +432,3 @@

let tr = singleNode ? view.state.tr.replaceSelectionWith(singleNode, view.shiftKey) : view.state.tr.replaceSelection(slice)
view.dispatch(tr.scrollIntoView().setMeta("paste", true))
view.dispatch(tr.scrollIntoView().setMeta("paste", true).setMeat("uiEvent", "paste"))
return true

@@ -474,3 +474,3 @@ }

let pos = sel.empty ? null : view.posAtCoords(eventCoords(e))
if (pos && pos.pos >= sel.from && pos.pos <= sel.to) {
if (pos && pos.pos >= sel.from && pos.pos <= (sel instanceof NodeSelection ? sel.to - 1: sel.to)) {
// In selection

@@ -521,2 +521,3 @@ } else if (mouseDown && mouseDown.mightDrag) {

let isNode = slice.openStart == 0 && slice.openEnd == 0 && slice.content.childCount == 1
let beforeInsert = tr.doc
if (isNode)

@@ -526,2 +527,4 @@ tr.replaceRangeWith(pos, pos, slice.content.firstChild)

tr.replaceRange(pos, pos, slice)
if (tr.doc.eq(beforeInsert)) return
let $pos = tr.doc.resolve(pos)

@@ -534,3 +537,3 @@ if (isNode && NodeSelection.isSelectable(slice.content.firstChild) &&

view.focus()
view.dispatch(tr)
view.dispatch(tr.setMeta("uiEvent", "drop"))
}

@@ -537,0 +540,0 @@

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

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