@guardian/prosemirror-noting
Advanced tools
Comparing version 3.1.4-alpha.2 to 3.1.4
@@ -1062,3 +1062,6 @@ 'use strict'; | ||
var sideToRender = cursorAtWidgetAndInsideNote ? side - Math.sign(side) / 2 : 0 - side; | ||
var sideToRender = cursorAtWidgetAndInsideNote ? side - Math.sign(side) / 2 : 0 - side; // To make the order of widgets from different noting plugins stable as the caret | ||
// moves, we adjust the side properties by a constant derived from the plugin priority | ||
// (which is effectively an id). | ||
var sideAdjustedForPluginPriority = sideToRender + pluginPriority / Number.MAX_SAFE_INTEGER * Math.sign(side); // A unique key for the widget. It must change to force a render | ||
@@ -1086,5 +1089,2 @@ // every time we'd like the cursor behaviour to change. | ||
return prosemirrorView.Decoration.widget(notePos, toDom, { | ||
// MAX_SAFE_INTEGER is here to order note decorations consistently across | ||
// plugins without imposing a (realistic) limit on the number of noting | ||
// plugins that can run concurrently. | ||
key: key, | ||
@@ -1091,0 +1091,0 @@ side: sideAdjustedForPluginPriority, |
{ | ||
"name": "@guardian/prosemirror-noting", | ||
"version": "3.1.4-alpha.2", | ||
"version": "3.1.4", | ||
"description": "A plugin to allow noting in prosemirror", | ||
@@ -41,4 +41,2 @@ "main": "dist/noting.js", | ||
"prosemirror-test-builder": "^1.0.3", | ||
"prosemirror-state": "^1.3.3", | ||
"prosemirror-view": "^1.14.11", | ||
"rollup": "^2.7.6", | ||
@@ -52,2 +50,4 @@ "rollup-plugin-babel": "^4.0.0-beta.4", | ||
"dependencies": { | ||
"prosemirror-state": "^1.3.3", | ||
"prosemirror-view": "^1.14.7", | ||
"uuid": "^3.1.0" | ||
@@ -54,0 +54,0 @@ }, |
@@ -18,2 +18,6 @@ import { DecorationSet, Decoration } from "prosemirror-view"; | ||
: 0 - side; | ||
// To make the order of widgets from different noting plugins stable as the caret | ||
// moves, we adjust the side properties by a constant derived from the plugin priority | ||
// (which is effectively an id). | ||
const sideAdjustedForPluginPriority = | ||
@@ -49,5 +53,2 @@ sideToRender + (pluginPriority / Number.MAX_SAFE_INTEGER) * Math.sign(side); | ||
return Decoration.widget(notePos, toDom, { | ||
// MAX_SAFE_INTEGER is here to order note decorations consistently across | ||
// plugins without imposing a (realistic) limit on the number of noting | ||
// plugins that can run concurrently. | ||
key, | ||
@@ -54,0 +55,0 @@ side: sideAdjustedForPluginPriority, |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
272008
25
1
3
2495
+ Addedprosemirror-state@^1.3.3
+ Addedprosemirror-view@^1.14.7
+ Addedorderedmap@2.1.1(transitive)
+ Addedprosemirror-model@1.24.0(transitive)
+ Addedprosemirror-state@1.4.3(transitive)
+ Addedprosemirror-transform@1.10.2(transitive)
+ Addedprosemirror-view@1.37.0(transitive)