react-konva
Advanced tools
Comparing version 17.0.2-4 to 17.0.2-5
@@ -18,11 +18,2 @@ /** | ||
var EXPECTED_REACT_VERSION = '17'; | ||
export var __matchRectVersion = React.version.split('.')[0] === EXPECTED_REACT_VERSION; | ||
// That warning is useful | ||
if (!__matchRectVersion) { | ||
var command = 'npm install react@' + EXPECTED_REACT_VERSION + ' react-dom@' + EXPECTED_REACT_VERSION; | ||
console.warn('Version mismatch detected for react-konva and react. react-konva expects to have react version ' + EXPECTED_REACT_VERSION + ', but it has version ' + React.version + '. Make sure versions are matched, otherwise, react-konva work is not guaranteed. You can use this command: "' + command + '"'); | ||
} | ||
function usePrevious(value) { | ||
@@ -29,0 +20,0 @@ var ref = React.useRef(); |
@@ -27,4 +27,4 @@ import Konva from 'konva/lib/Core'; | ||
if (!NodeClass) { | ||
console.error('Konva has no node with the type ' + type + '. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/' + type + '" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html'); | ||
return; | ||
console.error('Konva has no node with the type ' + type + '. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/' + type + '" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html'); | ||
NodeClass = Konva.Group; | ||
} | ||
@@ -31,0 +31,0 @@ |
@@ -11,3 +11,3 @@ /** | ||
exports.__esModule = true; | ||
exports.useStrictMode = exports.Stage = exports.Transformer = exports.Shape = exports.Arrow = exports.RegularPolygon = exports.Path = exports.Tag = exports.Arc = exports.Ring = exports.Star = exports.TextPath = exports.Text = exports.Image = exports.Sprite = exports.Line = exports.Wedge = exports.Ellipse = exports.Circle = exports.Rect = exports.Label = exports.Group = exports.FastLayer = exports.Layer = exports.__matchRectVersion = undefined; | ||
exports.useStrictMode = exports.Stage = exports.Transformer = exports.Shape = exports.Arrow = exports.RegularPolygon = exports.Path = exports.Tag = exports.Arc = exports.Ring = exports.Star = exports.TextPath = exports.Text = exports.Image = exports.Sprite = exports.Line = exports.Wedge = exports.Ellipse = exports.Circle = exports.Rect = exports.Label = exports.Group = exports.FastLayer = exports.Layer = undefined; | ||
@@ -38,11 +38,2 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var EXPECTED_REACT_VERSION = '17'; | ||
var __matchRectVersion = exports.__matchRectVersion = _react2.default.version.split('.')[0] === EXPECTED_REACT_VERSION; | ||
// That warning is useful | ||
if (!__matchRectVersion) { | ||
var command = 'npm install react@' + EXPECTED_REACT_VERSION + ' react-dom@' + EXPECTED_REACT_VERSION; | ||
console.warn('Version mismatch detected for react-konva and react. react-konva expects to have react version ' + EXPECTED_REACT_VERSION + ', but it has version ' + _react2.default.version + '. Make sure versions are matched, otherwise, react-konva work is not guaranteed. You can use this command: "' + command + '"'); | ||
} | ||
function usePrevious(value) { | ||
@@ -49,0 +40,0 @@ var ref = _react2.default.useRef(); |
@@ -84,4 +84,4 @@ 'use strict'; | ||
if (!NodeClass) { | ||
console.error('Konva has no node with the type ' + type + '. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/' + type + '" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html'); | ||
return; | ||
console.error('Konva has no node with the type ' + type + '. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/' + type + '" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html'); | ||
NodeClass = _Core2.default.Group; | ||
} | ||
@@ -88,0 +88,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "React binding to canvas element via Konva framework", | ||
"version": "17.0.2-4", | ||
"version": "17.0.2-5", | ||
"keywords": [ | ||
@@ -40,4 +40,4 @@ "react", | ||
"konva": "^8.0.1 || ^7.2.5", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2" | ||
"react": ">=16.8.0", | ||
"react-dom": ">=16.8.0" | ||
}, | ||
@@ -49,3 +49,3 @@ "devDependencies": { | ||
"enzyme": "3.11.0", | ||
"konva": "8", | ||
"konva": "^8.0.1", | ||
"nwb": "0.23.0", | ||
@@ -52,0 +52,0 @@ "react": "^17.0.2", |
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
53770
1065