From 4c494b2c6eb7ecbbeacd23ab70ab80a48f280490 Mon Sep 17 00:00:00 2001 From: Dominic Tobias Date: Wed, 26 Sep 2018 23:06:22 +0100 Subject: [PATCH] Export using ES6 to solve a number of issues e.g. #178 --- dist/ReactCrop.js | 15 +++++++++++---- dist/ReactCrop.min.js | 2 +- lib/ReactCrop.js | 16 ++++++++++------ package-lock.json | 40 +++++++++++++++++++++++----------------- package.json | 4 ++-- 5 files changed, 47 insertions(+), 30 deletions(-) diff --git a/dist/ReactCrop.js b/dist/ReactCrop.js index 38fca1a..d92ed7a 100644 --- a/dist/ReactCrop.js +++ b/dist/ReactCrop.js @@ -289,6 +289,11 @@ module.exports = ReactPropTypesSecret; "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.containCrop = exports.makeAspectCrop = exports.getPixelCrop = exports.Component = exports.default = exports.ReactCrop = undefined; + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 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; }; /* globals document, window */ @@ -1143,10 +1148,12 @@ ReactCrop.defaultProps = { imageStyle: undefined }; -module.exports = ReactCrop; -module.exports.getPixelCrop = getPixelCrop; -module.exports.makeAspectCrop = makeAspectCrop; -module.exports.containCrop = containCrop; +exports.ReactCrop = ReactCrop; +exports.default = ReactCrop; +exports.Component = ReactCrop; +exports.getPixelCrop = getPixelCrop; +exports.makeAspectCrop = makeAspectCrop; +exports.containCrop = containCrop; /***/ }), /* 3 */ diff --git a/dist/ReactCrop.min.js b/dist/ReactCrop.min.js index cad90d0..29b8ac3 100644 --- a/dist/ReactCrop.min.js +++ b/dist/ReactCrop.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactCrop=t(require("react")):e.ReactCrop=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var a=r[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t100&&(r.height=100-e.y,r.width=r.height*e.aspect/t),e.x+(r.width||e.width)>100&&(r.width=100-e.x,r.height=r.width/e.aspect*t),r}function l(e,t){return e&&e.aspect&&(!e.width&&e.height||e.width&&!e.height)?f(e,t.naturalWidth/t.naturalHeight):e}function g(e,t){if(!e||!t)return null;var r=Math.round(e.naturalWidth*(t.x/100)),o=Math.round(e.naturalHeight*(t.y/100)),a=Math.round(e.naturalWidth*(t.width/100)),n=Math.round(e.naturalHeight*(t.height/100));return{x:r,y:o,width:h(a,0,e.naturalWidth-r),height:h(n,0,e.naturalHeight-o)}}function v(e,t,r){var o=y({},t),a=!1;o.x+o.width>100?(o.width=t.width+(100-(t.x+t.width)),o.x=t.x+(100-(t.x+o.width)),a=!0):o.x<0&&(o.width=t.x+t.width,o.x=0,a=!0),a&&t.aspect&&(o.height=o.width/t.aspect*r,e.y>o.y&&(o.y=t.y+(t.height-o.height)));var n=!1;return o.y+o.height>100?(o.height=t.height+(100-(t.y+t.height)),o.y=t.y+(100-(t.y+o.height)),n=!0):o.y<0&&(o.height=t.y+t.height,o.y=0,n=!0),n&&t.aspect&&(o.width=o.height*t.aspect/r,o.x-1?(e.x=c.x,e.y=c.y,e.width=c.width,e.height=c.height):t.xOrds.indexOf(o)>-1?(e.x=c.x,e.width=c.width):t.yOrds.indexOf(o)>-1&&(e.y=c.y,e.height=c.height),r.lastYCrossover=r.yCrossOver,this.crossOverCheck(),e}},{key:"straightenYPath",value:function(e){var t=this.evData,r=t.ord,o=t.cropOffset,a=t.cropStartWidth/100*this.imageRef.width,n=t.cropStartHeight/100*this.imageRef.height,i=void 0,s=void 0;return"nw"===r||"se"===r?(i=n/a,s=o.top-o.left*i):(i=-n/a,s=o.top+(n-o.left*i)),i*e+s}},{key:"createCropSelection",value:function(){var e=this,t=this.props.disabled,r=this.getCropStyle();return C.default.createElement("div",{ref:function(t){e.cropSelectRef=t},style:r,className:"ReactCrop__crop-selection",onMouseDown:this.onCropMouseTouchDown,onTouchStart:this.onCropMouseTouchDown,role:"presentation"},!t&&C.default.createElement("div",{className:"ReactCrop__drag-elements"},C.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),C.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),C.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),C.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w"})))}},{key:"makeNewCrop",value:function(){return y({},t.defaultCrop,this.props.crop)}},{key:"crossOverCheck",value:function(){var e=this.evData;(!e.xCrossOver&&-Math.abs(e.cropStartWidth)-e.xDiffPc>=0||e.xCrossOver&&-Math.abs(e.cropStartWidth)-e.xDiffPc<=0)&&(e.xCrossOver=!e.xCrossOver),(!e.yCrossOver&&-Math.abs(e.cropStartHeight)-e.yDiffPc>=0||e.yCrossOver&&-Math.abs(e.cropStartHeight)-e.yDiffPc<=0)&&(e.yCrossOver=!e.yCrossOver);var t=e.xCrossOver!==e.startXCrossOver,r=e.yCrossOver!==e.startYCrossOver;e.inversedXOrd=!!t&&p(e.ord),e.inversedYOrd=!!r&&p(e.ord)}},{key:"render",value:function(){var e=this,t=this.props,r=t.children,o=t.className,n=t.crossorigin,i=t.crop,s=t.disabled,c=t.imageAlt,d=t.onImageError,h=t.src,p=t.style,f=t.imageStyle,l=this.state.cropIsActive,g=void 0;u(i)&&(g=this.createCropSelection());var v=["ReactCrop"];return l&&v.push("ReactCrop--active"),i&&(i.aspect&&v.push("ReactCrop--fixed-aspect"),!l||i.width&&i.height||v.push("ReactCrop--crop-invisible")),s&&v.push("ReactCrop--disabled"),o&&v.push.apply(v,a(o.split(" "))),C.default.createElement("div",{ref:function(t){e.componentRef=t},className:v.join(" "),style:p,onTouchStart:this.onComponentMouseTouchDown,onMouseDown:this.onComponentMouseTouchDown,role:"presentation",tabIndex:"1",onKeyDown:this.onComponentKeyDown},C.default.createElement("img",{ref:function(t){e.imageRef=t},crossOrigin:n,className:"ReactCrop__image",style:f,src:h,onLoad:function(t){return e.onImageLoad(t.target)},onError:d,alt:c}),g,r)}}]),t}(w.PureComponent);R.xOrds=["e","w"],R.yOrds=["n","s"],R.xyOrds=["nw","ne","se","sw"],R.arrowKey={left:37,up:38,right:39,down:40},R.nudgeStep=.2,R.defaultCrop={x:0,y:0,width:0,height:0},R.propTypes={className:O.default.string,crossorigin:O.default.string,children:O.default.oneOfType([O.default.arrayOf(O.default.node),O.default.node]),crop:O.default.shape({aspect:O.default.number,x:O.default.number,y:O.default.number,width:O.default.number,height:O.default.number}),disabled:O.default.bool,imageAlt:O.default.string,imageStyle:O.default.shape({}),keepSelection:O.default.bool,minWidth:O.default.number,minHeight:O.default.number,maxWidth:O.default.number,maxHeight:O.default.number,onChange:O.default.func.isRequired,onImageError:O.default.func,onComplete:O.default.func,onImageLoaded:O.default.func,onDragStart:O.default.func,onDragEnd:O.default.func,src:O.default.string.isRequired,style:O.default.shape({})},R.defaultProps={className:void 0,crop:void 0,crossorigin:void 0,disabled:!1,imageAlt:"",maxWidth:100,maxHeight:100,minWidth:0,minHeight:0,keepSelection:!1,onComplete:function(){},onImageError:function(){},onImageLoaded:function(){},onDragStart:function(){},onDragEnd:function(){},children:void 0,style:void 0,imageStyle:void 0},e.exports=R,e.exports.getPixelCrop=g,e.exports.makeAspectCrop=f,e.exports.containCrop=v},function(t,r){t.exports=e},function(e,t,r){e.exports=r(3)()},function(e,t,r){"use strict";function o(){}var a=r(4);e.exports=function(){function e(e,t,r,o,n,i){if(i!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=o,r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactCrop=t(require("react")):e.ReactCrop=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var a=r[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t100&&(r.height=100-e.y,r.width=r.height*e.aspect/t),e.x+(r.width||e.width)>100&&(r.width=100-e.x,r.height=r.width/e.aspect*t),r}function l(e,t){return e&&e.aspect&&(!e.width&&e.height||e.width&&!e.height)?f(e,t.naturalWidth/t.naturalHeight):e}function g(e,t){if(!e||!t)return null;var r=Math.round(e.naturalWidth*(t.x/100)),o=Math.round(e.naturalHeight*(t.y/100)),a=Math.round(e.naturalWidth*(t.width/100)),n=Math.round(e.naturalHeight*(t.height/100));return{x:r,y:o,width:h(a,0,e.naturalWidth-r),height:h(n,0,e.naturalHeight-o)}}function v(e,t,r){var o=y({},t),a=!1;o.x+o.width>100?(o.width=t.width+(100-(t.x+t.width)),o.x=t.x+(100-(t.x+o.width)),a=!0):o.x<0&&(o.width=t.x+t.width,o.x=0,a=!0),a&&t.aspect&&(o.height=o.width/t.aspect*r,e.y>o.y&&(o.y=t.y+(t.height-o.height)));var n=!1;return o.y+o.height>100?(o.height=t.height+(100-(t.y+t.height)),o.y=t.y+(100-(t.y+o.height)),n=!0):o.y<0&&(o.height=t.y+t.height,o.y=0,n=!0),n&&t.aspect&&(o.width=o.height*t.aspect/r,o.x-1?(e.x=c.x,e.y=c.y,e.width=c.width,e.height=c.height):t.xOrds.indexOf(o)>-1?(e.x=c.x,e.width=c.width):t.yOrds.indexOf(o)>-1&&(e.y=c.y,e.height=c.height),r.lastYCrossover=r.yCrossOver,this.crossOverCheck(),e}},{key:"straightenYPath",value:function(e){var t=this.evData,r=t.ord,o=t.cropOffset,a=t.cropStartWidth/100*this.imageRef.width,n=t.cropStartHeight/100*this.imageRef.height,i=void 0,s=void 0;return"nw"===r||"se"===r?(i=n/a,s=o.top-o.left*i):(i=-n/a,s=o.top+(n-o.left*i)),i*e+s}},{key:"createCropSelection",value:function(){var e=this,t=this.props.disabled,r=this.getCropStyle();return C.default.createElement("div",{ref:function(t){e.cropSelectRef=t},style:r,className:"ReactCrop__crop-selection",onMouseDown:this.onCropMouseTouchDown,onTouchStart:this.onCropMouseTouchDown,role:"presentation"},!t&&C.default.createElement("div",{className:"ReactCrop__drag-elements"},C.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),C.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),C.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),C.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw"}),C.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w"})))}},{key:"makeNewCrop",value:function(){return y({},t.defaultCrop,this.props.crop)}},{key:"crossOverCheck",value:function(){var e=this.evData;(!e.xCrossOver&&-Math.abs(e.cropStartWidth)-e.xDiffPc>=0||e.xCrossOver&&-Math.abs(e.cropStartWidth)-e.xDiffPc<=0)&&(e.xCrossOver=!e.xCrossOver),(!e.yCrossOver&&-Math.abs(e.cropStartHeight)-e.yDiffPc>=0||e.yCrossOver&&-Math.abs(e.cropStartHeight)-e.yDiffPc<=0)&&(e.yCrossOver=!e.yCrossOver);var t=e.xCrossOver!==e.startXCrossOver,r=e.yCrossOver!==e.startYCrossOver;e.inversedXOrd=!!t&&p(e.ord),e.inversedYOrd=!!r&&p(e.ord)}},{key:"render",value:function(){var e=this,t=this.props,r=t.children,o=t.className,n=t.crossorigin,i=t.crop,s=t.disabled,c=t.imageAlt,d=t.onImageError,h=t.src,p=t.style,f=t.imageStyle,l=this.state.cropIsActive,g=void 0;u(i)&&(g=this.createCropSelection());var v=["ReactCrop"];return l&&v.push("ReactCrop--active"),i&&(i.aspect&&v.push("ReactCrop--fixed-aspect"),!l||i.width&&i.height||v.push("ReactCrop--crop-invisible")),s&&v.push("ReactCrop--disabled"),o&&v.push.apply(v,a(o.split(" "))),C.default.createElement("div",{ref:function(t){e.componentRef=t},className:v.join(" "),style:p,onTouchStart:this.onComponentMouseTouchDown,onMouseDown:this.onComponentMouseTouchDown,role:"presentation",tabIndex:"1",onKeyDown:this.onComponentKeyDown},C.default.createElement("img",{ref:function(t){e.imageRef=t},crossOrigin:n,className:"ReactCrop__image",style:f,src:h,onLoad:function(t){return e.onImageLoad(t.target)},onError:d,alt:c}),g,r)}}]),t}(w.PureComponent);b.xOrds=["e","w"],b.yOrds=["n","s"],b.xyOrds=["nw","ne","se","sw"],b.arrowKey={left:37,up:38,right:39,down:40},b.nudgeStep=.2,b.defaultCrop={x:0,y:0,width:0,height:0},b.propTypes={className:O.default.string,crossorigin:O.default.string,children:O.default.oneOfType([O.default.arrayOf(O.default.node),O.default.node]),crop:O.default.shape({aspect:O.default.number,x:O.default.number,y:O.default.number,width:O.default.number,height:O.default.number}),disabled:O.default.bool,imageAlt:O.default.string,imageStyle:O.default.shape({}),keepSelection:O.default.bool,minWidth:O.default.number,minHeight:O.default.number,maxWidth:O.default.number,maxHeight:O.default.number,onChange:O.default.func.isRequired,onImageError:O.default.func,onComplete:O.default.func,onImageLoaded:O.default.func,onDragStart:O.default.func,onDragEnd:O.default.func,src:O.default.string.isRequired,style:O.default.shape({})},b.defaultProps={className:void 0,crop:void 0,crossorigin:void 0,disabled:!1,imageAlt:"",maxWidth:100,maxHeight:100,minWidth:0,minHeight:0,keepSelection:!1,onComplete:function(){},onImageError:function(){},onImageLoaded:function(){},onDragStart:function(){},onDragEnd:function(){},children:void 0,style:void 0,imageStyle:void 0},t.ReactCrop=b,t.default=b,t.Component=b,t.getPixelCrop=g,t.makeAspectCrop=f,t.containCrop=v},function(t,r){t.exports=e},function(e,t,r){e.exports=r(3)()},function(e,t,r){"use strict";function o(){}var a=r(4);e.exports=function(){function e(e,t,r,o,n,i){if(i!==a){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return r.checkPropTypes=o,r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])}); \ No newline at end of file diff --git a/lib/ReactCrop.js b/lib/ReactCrop.js index 810c0ac..47ec98e 100644 --- a/lib/ReactCrop.js +++ b/lib/ReactCrop.js @@ -605,7 +605,7 @@ class ReactCrop extends PureComponent { onTouchStart={this.onCropMouseTouchDown} role="presentation" > - {!disabled && + {!disabled && (
@@ -621,7 +621,7 @@ class ReactCrop extends PureComponent {
- } + )}
); } @@ -802,7 +802,11 @@ ReactCrop.defaultProps = { imageStyle: undefined, }; -module.exports = ReactCrop; -module.exports.getPixelCrop = getPixelCrop; -module.exports.makeAspectCrop = makeAspectCrop; -module.exports.containCrop = containCrop; +export { + ReactCrop, + ReactCrop as default, + ReactCrop as Component, + getPixelCrop, + makeAspectCrop, + containCrop, +}; diff --git a/package-lock.json b/package-lock.json index 247f483..89952f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2897,9 +2897,9 @@ } }, "eslint": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.5.0.tgz", - "integrity": "sha512-m+az4vYehIJgl1Z0gb25KnFXeqQRdNreYsei1jdvkd9bB+UNQD3fsuiC2AWSQ56P+/t++kFSINZXFbfai+krOw==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.6.0.tgz", + "integrity": "sha512-/eVYs9VVVboX286mBK7bbKnO1yamUy2UCRjiY6MryhQL2PaaXCExsCQ2aO83OeYRhU2eCU/FMFP+tVMoOrzNrA==", "dev": true, "requires": { "@babel/code-frame": "7.0.0", @@ -2994,12 +2994,12 @@ } }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", + "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "eslint-scope": { @@ -3031,9 +3031,15 @@ "dev": true }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "punycode": { @@ -3258,9 +3264,9 @@ }, "dependencies": { "acorn": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.2.tgz", - "integrity": "sha512-cJrKCNcr2kv8dlDnbw+JPUGjHZzo4myaxOLmpOX8a+rgX94YeTcTMv/LFJUSByRpc+i4GgVnnhLxvMu/2Y+rqw==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", "dev": true } } @@ -4045,9 +4051,9 @@ } }, "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, "strip-ansi": { @@ -6872,7 +6878,7 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, diff --git a/package.json b/package.json index 7adae1f..d7a45cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-image-crop", - "version": "5.0.0", + "version": "6.0.0", "description": "A responsive image cropping tool for React", "repository": "https://github.com/DominicTobias/react-image-crop", "main": "index.js", @@ -34,7 +34,7 @@ "babel-preset-react": "^6.23.0", "babel-preset-stage-0": "^6.22.0", "cross-env": "^5.2.0", - "eslint": "^5.5.0", + "eslint": "^5.6.0", "eslint-config-airbnb": "^17.1.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.1.1",