prosemirror-history
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -0,1 +1,7 @@ | ||
## 1.1.3 (2019-12-10) | ||
### Bug fixes | ||
Fixes a regression where appeneded transactions were combined into the previous history event even if that had been explicitly closed. | ||
## 1.1.2 (2019-11-20) | ||
@@ -65,3 +71,3 @@ | ||
A new function [`closeHistory`](http://prosemirror.net/docs/ref/version/0.19.0.html#history.closeHistory) can be used to force separation of history events at the start of a given transaction. | ||
A new function [`closeHistory`](https://prosemirror.net/docs/ref/version/0.19.0.html#history.closeHistory) can be used to force separation of history events at the start of a given transaction. | ||
@@ -90,3 +96,3 @@ ## 0.18.0 (2017-02-24) | ||
The [`history`](http://prosemirror.net/docs/ref/version/0.12.0.html#history.history) export is now a function | ||
The [`history`](https://prosemirror.net/docs/ref/version/0.12.0.html#history.history) export is now a function | ||
that creates a history plugin, rather than a plugin instance. | ||
@@ -97,3 +103,3 @@ | ||
Add a | ||
[`newGroupDelay`](http://prosemirror.net/docs/ref/version/0.12.0.html#history.history^config.newGroupDelay) plugin | ||
[`newGroupDelay`](https://prosemirror.net/docs/ref/version/0.12.0.html#history.history^config.newGroupDelay) plugin | ||
option. This brings back the behavior where pausing between edits will | ||
@@ -100,0 +106,0 @@ automatically cause the history to put subsequent changes in a new |
@@ -120,3 +120,3 @@ import RopeSequence from 'rope-sequence'; | ||
var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from | ||
? mirrorPos = maps.maps.length - item.mirrorOffset : null; | ||
? maps.maps.length - item.mirrorOffset : null; | ||
maps.appendMap(item.map, mirrorPos); | ||
@@ -282,4 +282,4 @@ }, from, to); | ||
// Group transforms that occur in quick succession into one event. | ||
var newGroup = !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || | ||
!isAdjacentTo(tr, history.prevRanges)); | ||
var newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || | ||
!isAdjacentTo(tr, history.prevRanges)); | ||
var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]); | ||
@@ -286,0 +286,0 @@ return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null, |
@@ -126,3 +126,3 @@ 'use strict'; | ||
var mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from | ||
? mirrorPos = maps.maps.length - item.mirrorOffset : null; | ||
? maps.maps.length - item.mirrorOffset : null; | ||
maps.appendMap(item.map, mirrorPos); | ||
@@ -288,4 +288,4 @@ }, from, to); | ||
// Group transforms that occur in quick succession into one event. | ||
var newGroup = !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || | ||
!isAdjacentTo(tr, history.prevRanges)); | ||
var newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || | ||
!isAdjacentTo(tr, history.prevRanges)); | ||
var prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]); | ||
@@ -292,0 +292,0 @@ return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null, |
{ | ||
"name": "prosemirror-history", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Undo history for ProseMirror", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# prosemirror-history | ||
[ [**WEBSITE**](http://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-history/blob/master/CHANGELOG.md) ] | ||
[ [**WEBSITE**](https://prosemirror.net) | [**ISSUES**](https://github.com/prosemirror/prosemirror/issues) | [**FORUM**](https://discuss.prosemirror.net) | [**GITTER**](https://gitter.im/ProseMirror/prosemirror) | [**CHANGELOG**](https://github.com/ProseMirror/prosemirror-history/blob/master/CHANGELOG.md) ] | ||
This is a [core module](http://prosemirror.net/docs/ref/#history) of [ProseMirror](http://prosemirror.net). | ||
This is a [core module](https://prosemirror.net/docs/ref/#history) of [ProseMirror](https://prosemirror.net). | ||
ProseMirror is a well-behaved rich semantic content editor based on | ||
@@ -10,8 +10,8 @@ contentEditable, with support for collaborative editing and custom | ||
This [module](http://prosemirror.net/docs/ref/#history) implements an | ||
This [module](https://prosemirror.net/docs/ref/#history) implements an | ||
undo/redo history plugin for ProseMirror. | ||
The [project page](http://prosemirror.net) has more information, a | ||
number of [examples](http://prosemirror.net/examples/) and the | ||
[documentation](http://prosemirror.net/docs/). | ||
The [project page](https://prosemirror.net) has more information, a | ||
number of [examples](https://prosemirror.net/examples/) and the | ||
[documentation](https://prosemirror.net/docs/). | ||
@@ -18,0 +18,0 @@ This code is released under an |
@@ -119,3 +119,3 @@ import RopeSequence from "rope-sequence" | ||
let mirrorPos = item.mirrorOffset != null && i - item.mirrorOffset >= from | ||
? mirrorPos = maps.maps.length - item.mirrorOffset : null | ||
? maps.maps.length - item.mirrorOffset : null | ||
maps.appendMap(item.map, mirrorPos) | ||
@@ -284,4 +284,4 @@ }, from, to) | ||
// Group transforms that occur in quick succession into one event. | ||
let newGroup = !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || | ||
!isAdjacentTo(tr, history.prevRanges)) | ||
let newGroup = history.prevTime == 0 || !appended && (history.prevTime < (tr.time || 0) - options.newGroupDelay || | ||
!isAdjacentTo(tr, history.prevRanges)) | ||
let prevRanges = appended ? mapRanges(history.prevRanges, tr.mapping) : rangesFor(tr.mapping.maps[tr.steps.length - 1]) | ||
@@ -288,0 +288,0 @@ return new HistoryState(history.done.addTransform(tr, newGroup ? state.selection.getBookmark() : null, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124169