{"_id":"@boyuai/antd-img-crop","_rev":"4-2cf09accf4ed5d7b5a87fa0e5e21ad16","name":"@boyuai/antd-img-crop","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@boyuai/antd-img-crop","version":"1.0.0","description":"An image cropper for Ant Design Upload","keywords":["react","antd","ant-design","upload","image","crop"],"license":"MIT","author":{"name":"yiyuanyin","email":"keanever@outlook.com","url":"https://github.com/yiyuanyin"},"homepage":"https://github.com/boyuai/antd-img-crop","repository":{"type":"git","url":"git+https://github.com/boyuai/antd-img-crop.git"},"bugs":{"url":"https://github.com/boyuai/antd-img-crop/issues"},"main":"lib/index.js","module":"es/index.js","scripts":{"pretty":"prettier --write 'src/**/*.{jsx,scss}' .babelrc.js rollup.config.js '**/*.md'","clean":"rimraf lib es","build:commonjs":"cross-env NODE_ENV=cjs rollup -c -o lib/index.js","build:es":"cross-env NODE_ENV=esm rollup -c -o es/index.js","build":"npm run clean && npm run build:commonjs && npm run build:es"},"peerDependencies":{"antd":"^3.12.3","prop-types":"^15.6.2","react":"^16.7.0"},"dependencies":{"@babel/runtime":"^7.5.4","canvas-toBlob":"^1.0.0","react-image-crop":"8.1.0"},"devDependencies":{"@babel/core":"^7.5.4","@babel/plugin-proposal-class-properties":"^7.5.0","@babel/plugin-syntax-dynamic-import":"^7.2.0","@babel/plugin-transform-runtime":"^7.5.0","@babel/preset-env":"^7.5.4","@babel/preset-react":"^7.0.0","babel-eslint":"^10.0.2","babel-plugin-import":"^1.12.0","cross-env":"^5.2.0","eslint-plugin-react":"^7.14.2","husky":"^3.0.0","lint-staged":"^9.2.0","prettier":"^1.18.2","rimraf":"^2.6.2","rollup":"^1.16.7","rollup-plugin-babel":"^4.3.3","rollup-plugin-eslint":"^7.0.0","rollup-plugin-sass":"^1.2.2"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"src/**/*.{jsx,scss}":["prettier --write","git add"]},"gitHead":"225755e0e26f563af27d45ead5cf0c58a08f5fd8","_id":"@boyuai/antd-img-crop@1.0.0","_npmVersion":"6.3.0","_nodeVersion":"8.11.3","_npmUser":{"name":"tripley","email":"keanever@outlook.com"},"dist":{"integrity":"sha512-ebe+5Dh+DHnl50pqrPyLUIP9R0aPKFKrGzS71ZzfV+CN6+HsZQ461EmEsZuhZY07KxAN4j5gPKu+wNBLcttjcA==","shasum":"f8629cb952afcf02023837d3d15941b40d43e296","tarball":"https://registry.npmjs.org/@boyuai/antd-img-crop/-/antd-img-crop-1.0.0.tgz","fileCount":6,"unpackedSize":13846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPPHzCRA9TVsSAnZWagAAy1sP/1/Sg3KM6G+s6veMMD55\ndvFFuE/IXFoFLnpAt2A7DyDskyyZ9fskarZlMJmUWL4mcnoHrMAzkOyMC6Fq\nJl5ND/A7bngTyQx0bvuNvYgHGvADu6Fx7HZyFM2juq1mniMvA2hLLgCLboxb\nShuA6Cl29YdCHFY7yd0z7uyEd3UzOlgVg3Obu+ZuEiTXkX+FrQCHlvKwrqYe\n+aKIg/B3q5eGPUt3KABzIiZ2MEoju9TR/ZogGAuTu6qtwStSRdfRGsxh8Vu3\nm/vZxmuJlUCPXbLnkJDc/6dVNsFBMNN48fR70hQRlfRgAj7guiPtqFNTXQsO\nkSivOfENc2fGEKHrZQD71jtnASCbLwkw6xXavS6o32h10RBv3nOnzUvzSwjS\nfL6ifhrFg912C4BLz+3WVJocnzjhHgLGGZsKgiLDaiXxqQrTXwiSsZKcYCk6\nPMngaiSqZ8mAMhhI+FetxO9HXOcRMdXe6xQcbbmeCNwb1Nb2TZCdsUnpYtLg\n6b/3NvqmheAihDOG16HwaQGNsjRZkzlUzEfZv4UtaVyDbiLY63rJhf+d14vD\n6EfNL83K2KnVkisYtPboKXtFS111OT4ZBbScOgwDBnjiWV1Y21AX+3yiwnWL\nm5e2h3zOUdZOnP1n5WfYGGJ1yaRjxNDyZbNv1HfekalSwJyT796m9osBtZha\n2Qra\r\n=ti3C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX1dwK+RwQs4I2aogZBd/GYnBd1QpK8P9n961S7TOmeQIhAJ4H74UBAmUnNCWJVyRbKjsmcu3KB5478vWDBc6EJDEl"}]},"maintainers":[{"name":"tripley","email":"keanever@outlook.com"},{"name":"wangsijie","email":"i@sijie.wang"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/antd-img-crop_1.0.0_1564275186600_0.9130662836703862"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-28T00:53:06.378Z","1.0.0":"2019-07-28T00:53:06.924Z","modified":"2022-04-04T20:18:32.259Z"},"maintainers":[{"email":"helsonxiao@gmail.com","name":"helsonxiao"},{"email":"i@sijie.wang","name":"wangsijie"},{"email":"keanever@outlook.com","name":"tripley"},{"email":"864147974@qq.com","name":"weiyichong"},{"email":"xiangyujames@gmail.com","name":"qianyue"}],"description":"An image cropper for Ant Design Upload","homepage":"https://github.com/boyuai/antd-img-crop","keywords":["react","antd","ant-design","upload","image","crop"],"repository":{"type":"git","url":"git+https://github.com/boyuai/antd-img-crop.git"},"author":{"name":"yiyuanyin","email":"keanever@outlook.com","url":"https://github.com/yiyuanyin"},"bugs":{"url":"https://github.com/boyuai/antd-img-crop/issues"},"license":"MIT","readme":"# antd-img-crop\n\n[![npm](https://img.shields.io/npm/v/antd-img-crop.svg?style=flat-square)](https://www.npmjs.com/package/antd-img-crop)\n\nEnglish | [简体中文](./README.zh-CN.md)\n\nAn image cropper for Ant Design [Upload](https://ant.design/components/upload/).\n\n## Demo\n\n[https://codesandbox.io/s/4qoom5p9x4](https://codesandbox.io/s/4qoom5p9x4)\n\n## Install\n\n```bash\nyarn add antd-img-crop\n```\n\n## Usage\n\n```jsx harmony\nimport ImgCrop from 'antd-img-crop';\nimport { Upload } from 'antd';\n\nconst Demo = () => (\n  <ImgCrop>\n    <Upload>+ Add image</Upload>\n  </ImgCrop>\n);\n```\n\n## Props\n\n### width\n\ntype: `number`, default: `100`\n\nCrop width in `px`. If `useRatio` is `true`, it'll be ratio.\n\n### height\n\ntype: `number`, default: `100`\n\nCrop height in `px`. If `useRatio` is `true`, it'll be ratio.\n\n### useRatio\n\ntype: `boolean`, default: `false`\n\nIf use `width` and `height` as ratio, not real `px`. And crop will fill the width or height.\n\ne.g. `width={500} height={400}` and `width={5} height={4}` are exactly the same.\n\n### resize\n\ntype: `boolean`, default: `true`\n\nIf crop can resize.\n\n### resizeAndDrag\n\ntype: `boolean`, default: `true`\n\nIf crop can resize and drag.\n\n### modalTitle\n\ntype: `string`, default: `\"Edit image\"`\n\nModal title.\n\n### modalWidth\n\ntype: `number`, default: `520`\n\nModal width in `px`.\n\n### beforeCrop\n\ntype: `function`, default: -\n\nExecute before crop, if return `false`, modal will not open. (Not support `Promise`)\n\nAnt Design Upload `beforeUpload` prop will execute after crop, before upload.\n","readmeFilename":"README.md"}