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

prosemirror-history

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-history - npm Package Compare versions

Comparing version 0.18.0 to 0.19.0

19

dist/history.js

@@ -259,7 +259,8 @@ var RopeSequence = require("rope-sequence")

var newState = tr.getMeta(historyKey), rebased
if (newState) {
return newState
} else if (tr.steps.length == 0) {
if (tr.getMeta(closeHistoryKey)) { return new HistoryState(history.done, history.undone, null, 0) }
else { return history }
if (newState) { return newState }
if (tr.getMeta(closeHistoryKey)) { history = new HistoryState(history.done, history.undone, null, 0) }
if (tr.steps.length == 0) {
return history
} else if (tr.getMeta("addToHistory") !== false) {

@@ -321,4 +322,8 @@ // Group transforms that occur in quick succession into one event.

function closeHistory(state) {
return state.tr.setMeta(closeHistoryKey, true)
// :: (Transaction) → Transaction
// Set a flag on the given transaction that will prevent further steps
// from being appended to an existing history event (so that they
// require a separate undo command to undo).
function closeHistory(tr) {
return tr.setMeta(closeHistoryKey, true)
}

@@ -325,0 +330,0 @@ exports.closeHistory = closeHistory

{
"name": "prosemirror-history",
"version": "0.18.0",
"version": "0.19.0",
"description": "Undo history for ProseMirror",

@@ -19,4 +19,4 @@ "main": "dist/history.js",

"dependencies": {
"prosemirror-state": "^0.18.0",
"prosemirror-transform": "^0.18.0",
"prosemirror-state": "^0.19.0",
"prosemirror-transform": "^0.19.0",
"rope-sequence": "^1.2.0"

@@ -29,3 +29,3 @@ },

"rimraf": "^2.5.4",
"prosemirror-model": "^0.18.0"
"prosemirror-model": "^0.19.0"
},

@@ -32,0 +32,0 @@ "scripts": {

@@ -257,7 +257,8 @@ const RopeSequence = require("rope-sequence")

let newState = tr.getMeta(historyKey), rebased
if (newState) {
return newState
} else if (tr.steps.length == 0) {
if (tr.getMeta(closeHistoryKey)) return new HistoryState(history.done, history.undone, null, 0)
else return history
if (newState) return newState
if (tr.getMeta(closeHistoryKey)) history = new HistoryState(history.done, history.undone, null, 0)
if (tr.steps.length == 0) {
return history
} else if (tr.getMeta("addToHistory") !== false) {

@@ -319,4 +320,8 @@ // Group transforms that occur in quick succession into one event.

function closeHistory(state) {
return state.tr.setMeta(closeHistoryKey, true)
// :: (Transaction) → Transaction
// Set a flag on the given transaction that will prevent further steps
// from being appended to an existing history event (so that they
// require a separate undo command to undo).
function closeHistory(tr) {
return tr.setMeta(closeHistoryKey, true)
}

@@ -323,0 +328,0 @@ exports.closeHistory = closeHistory

@@ -12,1 +12,3 @@ An implementation of undo/redo history for ProseMirror.

@redoDepth
@closeHistory
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