prosemirror-state
Advanced tools
Comparing version 0.15.0 to 0.16.0
@@ -214,3 +214,3 @@ // ::- Superclass for editor selections. | ||
function NodeSelection($from) { | ||
var $to = $from.plusOne() | ||
var $to = $from.node(0).resolve($from.pos + $from.nodeAfter.nodeSize) | ||
Selection.call(this, $from, $to) | ||
@@ -217,0 +217,0 @@ // :: Node The selected node. |
@@ -29,4 +29,4 @@ var ref = require("prosemirror-model"); | ||
new FieldDesc("selection", { | ||
init: function init$1(config, instance) { return config.selection || Selection.atStart(instance.doc) }, | ||
applyAction: function applyAction$1(action, selection) { | ||
init: function init(config, instance) { return config.selection || Selection.atStart(instance.doc) }, | ||
applyAction: function applyAction(action, selection) { | ||
if (action.type == "transform") | ||
@@ -41,4 +41,4 @@ { return action.selection || selection.map(action.transform.doc, action.transform.mapping) } | ||
new FieldDesc("storedMarks", { | ||
init: function init$2() { return null }, | ||
applyAction: function applyAction$2(action, storedMarks, state) { | ||
init: function init() { return null }, | ||
applyAction: function applyAction(action, storedMarks, state) { | ||
if (action.type == "transform") { return action.selection ? null : storedMarks } | ||
@@ -55,4 +55,4 @@ if (action.type == "selection") { return null } | ||
new FieldDesc("scrollToSelection", { | ||
init: function init$3() { return 0 }, | ||
applyAction: function applyAction$3(action, prev) { | ||
init: function init() { return 0 }, | ||
applyAction: function applyAction(action, prev) { | ||
return (action.type == "transform" || action.type == "selection") && action.scrollIntoView | ||
@@ -127,2 +127,3 @@ ? prev + 1 : prev | ||
if (action.type == null) { throw new RangeError("Not a valid action") } | ||
var newInstance = new EditorState(this.config), fields = this.config.fields | ||
@@ -129,0 +130,0 @@ for (var i = 0; i < fields.length; i++) { |
{ | ||
"name": "prosemirror-state", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"description": "ProseMirror editor state", | ||
@@ -19,7 +19,7 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"prosemirror-model": "^0.15.0", | ||
"prosemirror-transform": "^0.15.0" | ||
"prosemirror-model": "^0.16.0", | ||
"prosemirror-transform": "^0.16.0" | ||
}, | ||
"devDependencies": { | ||
"buble": "~0.14.0", | ||
"buble": "^0.15.1", | ||
"mocha": "^3.0.2", | ||
@@ -26,0 +26,0 @@ "ist": "^1.0.0", |
@@ -27,2 +27,19 @@ // ::- Plugins wrap extra functionality that can be added to an | ||
// itself. | ||
// | ||
// view:: ?(EditorView) → Object | ||
// When the plugin needs to interact with the editor view, or | ||
// set something up in the DOM, use this field. The function | ||
// will be called when the plugin's state is associated with an | ||
// editor view. | ||
// | ||
// return:: Object | ||
// Should return an object with the following optional | ||
// properties: | ||
// | ||
// update:: ?(EditorView) | ||
// Called whenever the view's state is updated. | ||
// | ||
// destroy:: ?() | ||
// Called when the view is destroyed or receives a state | ||
// with different plugins. | ||
constructor(options) { | ||
@@ -29,0 +46,0 @@ // :: EditorProps |
@@ -206,3 +206,3 @@ // ::- Superclass for editor selections. | ||
constructor($from) { | ||
let $to = $from.plusOne() | ||
let $to = $from.node(0).resolve($from.pos + $from.nodeAfter.nodeSize) | ||
super($from, $to) | ||
@@ -209,0 +209,0 @@ // :: Node The selected node. |
@@ -119,2 +119,3 @@ const {Mark, Node} = require("prosemirror-model") | ||
applyAction(action) { | ||
if (action.type == null) throw new RangeError("Not a valid action") | ||
let newInstance = new EditorState(this.config), fields = this.config.fields | ||
@@ -121,0 +122,0 @@ for (let i = 0; i < fields.length; i++) { |
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
70403
1450
+ Addedorderedmap@1.1.8(transitive)
+ Addedprosemirror-model@0.16.1(transitive)
+ Addedprosemirror-transform@0.16.0(transitive)
- Removedprosemirror-model@0.15.0(transitive)
- Removedprosemirror-transform@0.15.0(transitive)
Updatedprosemirror-model@^0.16.0