{"_id":"@bearcanrun/react-image-cropper","_rev":"3-db211d92de56d1a86635c6fd28e9ecbd","name":"@bearcanrun/react-image-cropper","dist-tags":{"latest":"1.3.6"},"versions":{"1.3.4":{"name":"@bearcanrun/react-image-cropper","version":"1.3.4","description":"react image crop","main":"app.js","scripts":{"start":"npm-run-all --parallel babel server","server":"cross-env NODE_ENV=dev node server.js","babel":"babel --watch component/ --out-dir lib/","build":"NODE_ENV=production webpack --mode production --config ./webpack.config.js","lint":"prettier-standard 'component/*.js'"},"repository":{"type":"git","url":"git+https://github.com/nearwood/react-image-cropper.git"},"keywords":["react","image crop","front crop","canvas","react component"],"author":{"name":"jerryshew"},"license":"MIT","homepage":"https://github.com/jerryshew","dependencies":{"deep-extend":"^0.6.0","npm-run-all":"^4.1.5","prop-types":"15.6.0","react":"16.5.2","react-dom":"16.5.2"},"pre-commit":["lint"],"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/preset-env":"^7.2.0","@babel/preset-react":"^7.0.0","autoprefixer-loader":"^3.1.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.4","babel-plugin-dynamic-import-node":"^2.2.0","babel-polyfill":"^6.26.0","babel-runtime":"^6.26.0","cross-env":"^1.0.8","css-loader":"^0.28.11","eslint":"^5.9.0","eslint-config-prettier":"^3.3.0","eslint-config-standard":"^12.0.0","eslint-config-standard-react":"^7.0.2","eslint-plugin-import":"^2.14.0","eslint-plugin-jsx-a11y":"^6.1.2","eslint-plugin-node":"^8.0.0","eslint-plugin-prettier":"^3.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^4.0.0","express":"^4.16.4","file-loader":"^1.1.11","koa-connect":"^2.0.1","less":"^3.9.0","less-loader":"^4.1.0","mini-css-extract-plugin":"^0.4.4","node-sass":"^4.11.0","postcss-loader":"^2.1.6","pre-commit":"^1.2.2","prettier":"^1.15.3","prettier-standard":"^8.0.1","react-transform-hmr":"^1.0.0","sass-loader":"^6.0.7","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.20.2","webpack-bundle-analyzer":"^3.0.2","webpack-cli":"^3.1.2","webpack-hot-client":"^4.1.1","webpack-merge":"^4.1.4","webpack-serve":"^1.0.4"},"standard":{"parser":"babel-eslint","ignore":["dist/","build/"]},"gitHead":"2b886d9db7e4150e084d625a9771ecac921a434a","bugs":{"url":"https://github.com/nearwood/react-image-cropper/issues"},"_id":"@bearcanrun/react-image-cropper@1.3.4","_npmVersion":"6.4.1","_nodeVersion":"10.8.0","_npmUser":{"name":"bearcanrun","email":"bearcanrun@gmail.com"},"dist":{"integrity":"sha512-uxsVtwymbwBTAYjPAKncfxfbzm3wqczoBxf+sbch5TbYXdtMmfOwVD0sYtArMuNjqO1Pplq37QSApYgBjWiu8w==","shasum":"41a98be4cbfa7b3ecf25c8d9dbf428f94a21892a","tarball":"https://registry.npmjs.org/@bearcanrun/react-image-cropper/-/react-image-cropper-1.3.4.tgz","fileCount":12,"unpackedSize":79322,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcB31xCRA9TVsSAnZWagAA4SUQAKDU6Da9EexTuerliqwc\nDKSH9aYsYl+TrQBU9FM9j42xDQ86+gAXZa4Df2O3c0fnxAsNLpdWNVbNYFmb\narxy5jQWGRSzK0w9UcbIX1gayRe+1Sfc1Fw+m5hKEN8MrJvK0stQHymw9V9g\nX+oY89oKZ81QUJ7UUDlSLQHCgugs4LqsihfdVoDHb8aEdHcDau3fj+q2mLr9\niQyG8eTobqsmd96DNnhrEcF6GWrLhWHpzK41jappOsxmovzwWShBpKZOzfSf\nevgZHwPZp9HuzkJN3RNidy3W4KmW3B+Lz3zhCuiMGWckT8Jdn087nwNFkWa3\nYyXe3/yWXA7cDph52jpjkOickCMem4doB8yf7GGNaWY84gv1mYxgEz7zrFX4\nIj5n3BtCS3dGOUvBrF95syf7/z0EoZ93tbc9u4DAskGHFzo82v350EF1LFCA\n73kChRAVepyhw+girZnfN7AtQdH02LoHoYoYJoUzSq1flt7X//JIModpU7sw\nzmKtsGwj/EUQ3oQm/U9OSuZp0pRC97MaxCzXZ6f9ATZGX9RlT9O9Im5MaNft\nf+K5YEjcGJMK/8n/sD/zsZvkKoWU2LaMovAXYI9+DjFWwnqy0aIRCK6Exb+x\nRzyq5SKQBcT+l4q3W204NMGzht9+bX6RVIvyjLgdfc0cf6LSjLVbzdApoRM+\nfdIu\r\n=vqEt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMn8VLW2kzW/KheuSGDbpiWdvc+Z5oH+aoeFVxlbRdtAiB1csVyLEhtJ9NStwMlVyr21AFmS8fZVCMpau+3IxtUUw=="}]},"maintainers":[{"name":"bearcanrun","email":"bearcanrun@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-image-cropper_1.3.4_1543994736861_0.7865615205151317"},"_hasShrinkwrap":false},"1.3.5":{"name":"@bearcanrun/react-image-cropper","version":"1.3.5","description":"react image crop","main":"app.js","scripts":{"start":"npm-run-all --parallel babel server","server":"cross-env NODE_ENV=development PORT=3001 webpack-serve --config ./webpack.dev.config.js","babel":"babel --watch component/ --out-dir lib/","build":"NODE_ENV=production webpack --mode production --config ./webpack.config.js","lint":"prettier-standard 'component/*.js'","lint-demo":"prettier-standard 'demo/*.js'"},"repository":{"type":"git","url":"git+https://github.com/nearwood/react-image-cropper.git"},"keywords":["react","image crop","front crop","canvas","react component"],"author":{"name":"jerryshew"},"license":"MIT","homepage":"https://github.com/jerryshew","dependencies":{"deep-extend":"^0.6.0","npm-run-all":"^4.1.5","prop-types":"15.6.0","react":"16.5.2","react-dom":"16.5.2"},"pre-commit":["lint"],"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/preset-env":"^7.2.0","@babel/preset-react":"^7.0.0","autoprefixer-loader":"^3.1.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.4","babel-plugin-dynamic-import-node":"^2.2.0","babel-polyfill":"^6.26.0","babel-runtime":"^6.26.0","connect-history-api-fallback":"^1.5.0","cross-env":"^1.0.8","css-loader":"^0.28.11","eslint":"^5.9.0","eslint-config-prettier":"^3.3.0","eslint-config-standard":"^12.0.0","eslint-config-standard-react":"^7.0.2","eslint-plugin-import":"^2.14.0","eslint-plugin-jsx-a11y":"^6.1.2","eslint-plugin-node":"^8.0.0","eslint-plugin-prettier":"^3.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^4.0.0","express":"^4.16.4","file-loader":"^1.1.11","koa-connect":"^2.0.1","less":"^3.9.0","less-loader":"^4.1.0","mini-css-extract-plugin":"^0.4.4","node-sass":"^4.11.0","optimize-css-assets-webpack-plugin":"^5.0.1","postcss-loader":"^2.1.6","pre-commit":"^1.2.2","prettier":"^1.15.3","prettier-standard":"^8.0.1","react-hot-loader":"^4.3.12","react-transform-hmr":"^1.0.0","sass-loader":"^6.0.7","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.20.2","webpack-bundle-analyzer":"^3.0.2","webpack-cli":"^3.1.2","webpack-hot-client":"^4.1.1","webpack-merge":"^4.1.4","webpack-serve":"^1.0.4"},"standard":{"parser":"babel-eslint","ignore":["dist/","build/"]},"gitHead":"320e43ec2e083bf50415cf107361afc6355defff","bugs":{"url":"https://github.com/nearwood/react-image-cropper/issues"},"_id":"@bearcanrun/react-image-cropper@1.3.5","_npmVersion":"6.4.1","_nodeVersion":"10.8.0","_npmUser":{"name":"bearcanrun","email":"bearcanrun@gmail.com"},"dist":{"integrity":"sha512-PnfrNDVvI2mYXLiha68Fd6lFfZ/aa8YYPCEe21APgnlazTZP5RgaJZeWhEGBspa7f1qPGRT1mboztWGJys69SQ==","shasum":"959a381c4224c9c73ff35deb8041cbd7fdc80b98","tarball":"https://registry.npmjs.org/@bearcanrun/react-image-cropper/-/react-image-cropper-1.3.5.tgz","fileCount":13,"unpackedSize":81672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCMnmCRA9TVsSAnZWagAA+UEP/jnmkqfObtaXTI9IzkyK\nBRImqWByTo0xOsjjMa5dUNiZn7Z+GztH2ykJLDeLx88QqPjOSfkkNhptvwFG\nwVhdBptnjRoU1/kdJRt29P6mLXkQsVpbRj73mMOhw13/Yne0/ANpbWFUBxHe\nv0Y0n+TuPdlQLLgfjk4hntjopOMw69UpVqgsCr3l4fa9g3s30W9xSds/AFTG\n5iW0WH3JG1B1ny6NVuWdQ25WdjBmzNR8Gx/kVwarJJ0hb5oKpzqGHrDnAnqI\nM/TtONujuAwLQ2jSRffEGIJLalzXie/oHCSuCPcr4w7cXzkadCU3fleety3X\ny+3VfoGuwI05b4aM/3WzbRBKhMYBUlaZBJ4KpWXI9OPG7yqIyWYxfXXzQWlq\n41IR81aIC0Odio/sAp2iWJiErJ7eHIMqm3ohUzF0B8zKboUoyZ0fT2hX3dHw\neVKy6N1qEaF3xbjJ+FJ/hmJL2dVwuX4zEGzvLPrt9kmOM5OFAvi3qYsqxQdA\nqPckZJGSSLdsxarr3uVNNMTu9xJH0nx/NrtVQS0V1+BzPPXGqbBmGt/ZvUTt\nZBf3yOM2POHJc7/QNuTcjcpr6jaKksE9Ov34UhX9gx3unAsykL54NKOg56gK\nkpb9Ii8ej1I8G6zvaVXGHykCQxj8AxUfow8dB4qaqsHM/KO1cD5Q9zFRAUL9\nHVXc\r\n=eBL5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzHM+qhW3S7kIT1Jlm1zTkcph6LLf0XOz7obLhd7yHlAIgKtX7kmA2jAKIc2yuwbywAUfalyPZUDtr5hxH/lMu/ug="}]},"maintainers":[{"name":"bearcanrun","email":"bearcanrun@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-image-cropper_1.3.5_1544079846089_0.12417672291031967"},"_hasShrinkwrap":false},"1.3.6":{"name":"@bearcanrun/react-image-cropper","version":"1.3.6","description":"react image crop","main":"app.js","scripts":{"start":"npm-run-all --parallel babel server","server":"cross-env NODE_ENV=development PORT=3001 webpack-serve --config ./webpack.dev.config.js","babel":"babel --watch component/ --out-dir lib/","build":"NODE_ENV=production webpack --mode production --config ./webpack.config.js","lint":"prettier-standard 'component/*.js'","lint-demo":"prettier-standard 'demo/*.js'"},"repository":{"type":"git","url":"git+https://github.com/nearwood/react-image-cropper.git"},"keywords":["react","image crop","front crop","canvas","react component"],"author":{"name":"jerryshew"},"license":"MIT","homepage":"https://github.com/jerryshew","dependencies":{"deep-extend":"^0.6.0","npm-run-all":"^4.1.5","prop-types":"15.6.0","react":"16.5.2","react-dom":"16.5.2"},"pre-commit":["lint"],"devDependencies":{"@babel/cli":"^7.2.0","@babel/core":"^7.2.0","@babel/plugin-proposal-class-properties":"^7.2.1","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/preset-env":"^7.2.0","@babel/preset-react":"^7.0.0","autoprefixer-loader":"^3.1.0","babel-eslint":"^10.0.1","babel-loader":"^8.0.4","babel-plugin-dynamic-import-node":"^2.2.0","babel-polyfill":"^6.26.0","babel-runtime":"^6.26.0","connect-history-api-fallback":"^1.5.0","cross-env":"^1.0.8","css-loader":"^0.28.11","eslint":"^5.9.0","eslint-config-prettier":"^3.3.0","eslint-config-standard":"^12.0.0","eslint-config-standard-react":"^7.0.2","eslint-plugin-import":"^2.14.0","eslint-plugin-jsx-a11y":"^6.1.2","eslint-plugin-node":"^8.0.0","eslint-plugin-prettier":"^3.0.0","eslint-plugin-promise":"^4.0.1","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^4.0.0","express":"^4.16.4","file-loader":"^1.1.11","koa-connect":"^2.0.1","less":"^3.9.0","less-loader":"^4.1.0","mini-css-extract-plugin":"^0.4.4","node-sass":"^4.11.0","optimize-css-assets-webpack-plugin":"^5.0.1","postcss-loader":"^2.1.6","pre-commit":"^1.2.2","prettier":"^1.15.3","prettier-standard":"^8.0.1","react-hot-loader":"^4.3.12","react-transform-hmr":"^1.0.0","sass-loader":"^6.0.7","style-loader":"^0.21.0","uglifyjs-webpack-plugin":"^1.3.0","webpack":"^4.20.2","webpack-bundle-analyzer":"^3.0.2","webpack-cli":"^3.1.2","webpack-hot-client":"^4.1.1","webpack-merge":"^4.1.4","webpack-serve":"^1.0.4"},"standard":{"parser":"babel-eslint","ignore":["dist/","build/"]},"gitHead":"f59e35c32119272f90df4bfa584a17a673c86153","bugs":{"url":"https://github.com/nearwood/react-image-cropper/issues"},"_id":"@bearcanrun/react-image-cropper@1.3.6","_npmVersion":"6.4.1","_nodeVersion":"10.8.0","_npmUser":{"name":"bearcanrun","email":"bearcanrun@gmail.com"},"dist":{"integrity":"sha512-/6F2rNd/bNR7jB/Pxhan1T6KDF+CHl9hEeybumtOyZrYc2foxawMNjxgD4MW0Z3Wh6GxZKDM9dlsxaaC+/y0Zg==","shasum":"86604e965a98b84d2abb43aa6810959694edf361","tarball":"https://registry.npmjs.org/@bearcanrun/react-image-cropper/-/react-image-cropper-1.3.6.tgz","fileCount":13,"unpackedSize":81785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcCNOgCRA9TVsSAnZWagAAg7oQAIqhUeNATksszXX7Hkt2\nGhWI5uEe96pLMc6PMYWlVgTz+kBkIVR/f5AN0nzEOHOnn3DHmb1g8pbqZUmt\nvuIZ1JS87drs5hVs62/5iyqIXB+OYWWkSH8VrfTv5PGYeSigEUFFoeu4lQfY\n/JnWblH/uSFTIMIrwqz7BgsypSmtPA9CeobPy4DPe97Qq5XCuKOqWLpxCjPv\n+C1wTK4RHErya8t+qDHmighDDMatCXFkbvlxGsL7b/EgariOy8ALxX5S7Md6\nPoJfPGAQFdpaIFfQzUps29GOg3ZNie4PKg0rFNjy/0cnYFyMhO0qYQsdMwZg\nfEW9JvKT9Luzxq+rcdrToDOyXmvnRK+E+sBIx02rDfrXLhuohoeugRFCm+QI\n/FOigTIpXxzagO1VsFn9D0Yk5NNCUIzc2ac7ctTCN8VcTlnJ6ca/stL0yk3/\nvvezKJfTaMPFsK01wU7jCi+tO8nXojnkjAFGgdsbhD+uAzhImhwMstOwd54S\nmaV1ANF2PkpcDwXqQeLZxMiqilqIM6gwhXmSHu3ff6Ww6M0iMw6yA9menDTK\nv+PzzQY7BiavNhHWn1SJF/0ew/QR6iD5FWowJaU4JI6cYIxXmJ7PBXA9qaSk\nikFn03ICk+rU4Dgz83cSje3p31COokvwnhJmeeLICKfLb7teMn+wBtN8lcU2\nWBo7\r\n=qwnY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6NpjoYFxovYZ1WVkOOFAadX1HWRb7vyQtGmpDGdStuAiB2JZCdauOY+UhMvGhowOobMV0KomxryDNVDZxHHnEOHQ=="}]},"maintainers":[{"name":"bearcanrun","email":"bearcanrun@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-image-cropper_1.3.6_1544082335938_0.8075047948156433"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-05T07:25:36.679Z","1.3.4":"2018-12-05T07:25:37.057Z","modified":"2022-04-04T18:06:12.593Z","1.3.5":"2018-12-06T07:04:06.191Z","1.3.6":"2018-12-06T07:45:36.049Z"},"maintainers":[{"name":"bearcanrun","email":"bearcanrun@gmail.com"}],"description":"react image crop","homepage":"https://github.com/jerryshew","keywords":["react","image crop","front crop","canvas","react component"],"repository":{"type":"git","url":"git+https://github.com/nearwood/react-image-cropper.git"},"author":{"name":"jerryshew"},"bugs":{"url":"https://github.com/nearwood/react-image-cropper/issues"},"license":"MIT","readme":"\n# Forked from original [React Image Cropper](https://github.com/jerryshew/react-image-cropper/blob/master/LICENSE)\nPackage no longer seemed to be maintained and required upgrading of package npm-run-all from critical security vulnerability.\nAlso merged in [LiHuang2's react16update](https://github.com/lihuang2/react-image-cropper.git) branch. Upgraded to Webpack 4.\n\n## React Image Cropper\n\nA React.JS Image Cropper\nTouch supported\n\n**[See the demo](http://braavos.me/react-image-cropper/)**\n\nCustom:\n\n+ initial cropper frame position\n+ frame width, height, ratio\n+ crop event\n\n### How to Use\n\n+ `import Cropper from '@bearcanrun/react-image-cropper'`\n\n+ styles are all inline\n\n+ define Cropper with src, and ref to execute crop method  \n\n```\n<Cropper\n    src=\"http://braavos.me/images/posts/college-rock/the-smiths.png\"\n    ref={ ref => { this.cropper = ref }}\n/>\n```\n\n+ crop and get image url\n\n`image.src = this.cropper.crop()`\n\n+ get crop values:\n\n`const values = this.cropper.values()`\n\nvalues:\n\n```\n{\n    // display values\n    display: {\n        width, // frame width\n        height, // frame height\n        x, // original x position\n        y, // original y position\n        imgWidth, // img width\n        imgHeight, // img height\n    },\n    // original values\n    original: {\n        width, // frame width\n        height, // frame height\n        x, // original x position\n        y, // original y position\n        imgWidth, // img width\n        imgHeight, // img height\n    }\n}\n```\n\n\n+ onChange for preview\n\n(values) => onChange(values)\n\n+ custom use\n\n| prop  |  value   |\n|:-------:|:--------|\n| rate | width / height |\n| disabled | boolean |\n| width | cropper frame width |\n| height | cropper frame height |\n| originX | cropper original position(x axis), according to image left |\n| originY | cropper original position(Y axis), according to image top |\n| fixedRatio | turn on/off fixed ratio (bool default true) |\n| allowNewSelection | allow user to create a new selection instead of reusing initial selection (bool default true) |\n| styles | specify styles to override inline styles |\n| imageLoaded | specify function callback to run when the image completed loading |\n| beforeImageLoaded | specify function callback to run when the image size value is ready but the image has not completed loading |\n| imageLoadError | specify function callback to run when the image errors during loading |\n| onDragStop | specify function callback to run when dragging the crop has ended |\n\n\n**[See the demo](http://braavos.me/react-image-cropper/)**\n","readmeFilename":"README.md"}