{"_id":"@origin-space/image-cropper","_rev":"10-c8c8aa00172fc116731fddcc02f34da1","name":"@origin-space/image-cropper","dist-tags":{"latest":"0.1.9"},"versions":{"0.1.0":{"name":"@origin-space/image-cropper","version":"0.1.0","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.0","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"c99593b1d66a98b734b757f91a4e79c3d3418e85","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.0.tgz","fileCount":7,"integrity":"sha512-jfdYIpg91y72EbgdXMQY+S3cHdWLsr684ku/90hGFh7ICIiCQ4ilcAK2NcmLgvwiUn56qCcarj5xNrwG1KDVYA==","signatures":[{"sig":"MEYCIQDX6Kcm6QjsoXcAg/2+ElEv2Wvh1otpU0IchTBJsh57gQIhALPnmOzf81JUeRlE9wX80hDSSvIdsVd1i+ndw8L8VITI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63413},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"d5c8e4c26d4162182d6e961c6de5a6fb430072d9","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.0_1746100703320_0.9657648863438031","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@origin-space/image-cropper","version":"0.1.1","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.1","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"279e7255e6ce638594b2069303027a59ea0bcc71","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.1.tgz","fileCount":7,"integrity":"sha512-/hPjZ/HRg1o6egh7zccBpGsppLK6bZ/SbNYGm4y/l7J0QLT/9bj4ndI9Dkhl+MzCAReVjXY6HFmNctTZIowyig==","signatures":[{"sig":"MEYCIQCp4/5j1h8D4xXVVmiA/k+ba2PB+kMQDtWSKl/6rVT4lwIhAM+wjfb2HeWoEXFAnSPOlpVNsPUXscpt9eyFGLJFV0XT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63365},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"2b16126ade1f52b181c831480290f7f8c37a896d","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.1_1746100856103_0.9571523704771423","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@origin-space/image-cropper","version":"0.1.2","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.2","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"138f95e9178da979411cdb198fd3de9edc20e97f","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.2.tgz","fileCount":7,"integrity":"sha512-a0cKEe/syIPlqzPtEeSN2JBe5G1x/40uYyXGWUdAQbnMyuzK1EuxAMyixTRMhE+0nZIb/z2oz0RgXx/NdZJOig==","signatures":[{"sig":"MEQCICCrTRVSlSbYQThgPKYS7Y6u7YKVhYXYUw52o7YP7hOgAiBaoXS/HwODsJFR1nDdgv3t/UP3V9MiHZssx9Q1kpe0KQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63518},"main":"./dist/index.cjs","_from":"file:origin-space-image-cropper-0.1.2.tgz","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"_resolved":"/private/var/folders/kx/rdzkchg515s19rbbc9qstlh40000gn/T/001cfc4c0c3930ce3f51d4667370f56a/origin-space-image-cropper-0.1.2.tgz","_integrity":"sha512-a0cKEe/syIPlqzPtEeSN2JBe5G1x/40uYyXGWUdAQbnMyuzK1EuxAMyixTRMhE+0nZIb/z2oz0RgXx/NdZJOig==","repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.2_1746106293068_0.36334939781181697","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@origin-space/image-cropper","version":"0.1.3","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.3","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"3457945f1cacaf745df665f299dffca8233b7feb","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.3.tgz","fileCount":7,"integrity":"sha512-lFbCTaztCH85n8Fc8xVfTW4z6t7BURv2AIDjAx1UE0RVs+pgvapQ/sX9VzXCRzONK4ee44zVzEeu8+4MVgyp2w==","signatures":[{"sig":"MEUCICEPM0tbJTmRlkKyps+CGReGMAtOyTef6rYqhFG91sESAiEA+qby24IPbTompZOtXhUo+bLYXCu6ceEL0U15JuvON78=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63558},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"85ab762174f02000ff9818f09e982439524f952b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.3_1746106488077_0.24251840081001186","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@origin-space/image-cropper","version":"0.1.4","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.4","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"993963fe5fa4d6ca40bc613c9610750ce542569a","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.4.tgz","fileCount":7,"integrity":"sha512-CWxi1ivnJba5U+kWyVAviAymUn72+IJC7BMHuzZMLsa55ibVr9/L7gEz1cLxMLbJGdokTLHMq2u9gsjlSTBBGA==","signatures":[{"sig":"MEYCIQCviFtBWsmDuqlso95z9dcgeHsy91sUJpzbY1+Xkjqa+gIhAOlRYrLECrH3lMRzkvx9Kts37pdM2gJolZstHZgGcrSU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63562},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"9fca24cf07630b1242204bf0afae4c7a4a871464","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.4_1746106973976_0.6842375840148454","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@origin-space/image-cropper","version":"0.1.5","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.5","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"648eb59ef27ab13532bfeffc21df19b46e9f2dda","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.5.tgz","fileCount":7,"integrity":"sha512-hQhJGLI8GdhZWuz5NDyVrA3g2ws+DTo+wqcP4IodO7hU1YuJUBLLzeKf03vhMF9Mu9UluEojHftWxm+XgSe3Ng==","signatures":[{"sig":"MEUCIEn89gzBmElGtM4W6Q9maEeuBmjpoP/8XY7fAKQ2UDJWAiEAz74JK97h2I8hNI5/5XF1uGMJfFdz8AHfith1N5HJKZE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63420},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"87669d2cbca675947362459f31d6b992f0be2563","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.5_1746109000157_0.31741211795151214","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@origin-space/image-cropper","version":"0.1.6","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.6","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"130454bc97eb4a918dbc3061cb723fd8e00531de","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.6.tgz","fileCount":7,"integrity":"sha512-ivURddm2MIKUlzI1+hTyNY7X9gw8J1e+Jlr4uOkDSA4NGDgmwDQL9AHGvhah2o1MQZrjvufyxJIPl73K1XTayA==","signatures":[{"sig":"MEUCIQCl6FMqd8Kbsf1giD7w6Mhjuy+Fp4GPp4yWBSU5Q8UYSwIgXFUquVKWrivRbkaqvyb4wG4oR+AQgQReOrtucmtjnXE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":63108},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"536ad14a6228c5279fb3058724d7e5924f4fe4d2","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.6_1746110112126_0.996310302283467","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@origin-space/image-cropper","version":"0.1.7","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.7","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"766b1a23e45ed331f93fc4e738ed70a96155aeee","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.7.tgz","fileCount":7,"integrity":"sha512-Z7yg11Zit7Idk4CKjRnAJNem/nGKPxDncnlh0SB0e/iDNqPjRLmm/U1zFvIAhWiOWV1BebPGfak5SGskl78+cA==","signatures":[{"sig":"MEQCIGlW6Psf8AgcWXKk6F3kewttUGuhOZaKnycrhLk9/SyzAiAm5CP6RnxOGcT4da0HO48y9kEmATckzl+zZFGEaImPGw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65644},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"f4681dda117b67c65687fd7d5550a3c2211c06ed","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.7_1746113623262_0.6102561228548151","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@origin-space/image-cropper","version":"0.1.8","keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","_id":"@origin-space/image-cropper@0.1.8","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"homepage":"https://github.com/origin-space/image-cropper#readme","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"dist":{"shasum":"9fbdb053881447c1887d2261b37d272ed5ee236d","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.8.tgz","fileCount":7,"integrity":"sha512-xO+0m/urkjW2E1IYRFLTRfJYXeqJi3YVz7WtWnKamiInI6MIKOPbKt22HUL5mwmxWuCJOmxZ5APTBWXPiauJFg==","signatures":[{"sig":"MEQCICc+G2VoJ7H028bslMzRfZ5YTc3uC2Zs1SshJjPb1Lr3AiAKgvyxY9AnVEqvAe+yGHdAnv9Nb4rGSfUAPgLU9uwjbg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":65671},"main":"./dist/index.cjs","types":"./dist/types/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"1f0ab83c1d5ba0b4c0ce33437d11d26d6a6be56b","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build"},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"repository":{"url":"git+https://github.com/origin-space/image-cropper.git","type":"git"},"_npmVersion":"10.9.2","description":"A headless React component for image cropping","directories":{},"_nodeVersion":"23.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.4.0","typescript":"^5.8.3","@types/react":"^19.1.2","@types/react-dom":"^19.1.3"},"peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"_npmOperationalInternal":{"tmp":"tmp/image-cropper_0.1.8_1746113716686_0.13756120696778829","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@origin-space/image-cropper","version":"0.1.9","description":"A headless React component for image cropping","main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/types/index.d.ts","exports":{".":{"import":{"types":"./dist/types/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/types/index.d.ts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"npm run build","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/origin-space/image-cropper.git"},"keywords":["react","component","headless","crop","image","cropper"],"author":{"name":"origin-space"},"license":"MIT","bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"homepage":"https://github.com/origin-space/image-cropper#readme","peerDependencies":{"react":"^19.1.0","react-dom":"^19.1.0"},"devDependencies":{"@types/react":"^19.1.2","@types/react-dom":"^19.1.3","tsup":"^8.4.0","typescript":"^5.8.3"},"publishConfig":{"access":"public"},"_id":"@origin-space/image-cropper@0.1.9","gitHead":"561819aaa08c8176761bb8dd7e90ac913f05fbe2","_nodeVersion":"23.4.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Ebl57I6beh7uKjSv8+r3VObEoOXIXhx4SicDUdxa9U7NVY18SzEGfqPDuhNyXuFIB5G/S8nYUToNlIRp9wwB9Q==","shasum":"9e0d2388619728d0c171a3dbecdc1297280d13d8","tarball":"https://registry.npmjs.org/@origin-space/image-cropper/-/image-cropper-0.1.9.tgz","fileCount":7,"unpackedSize":65674,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAY8iCqO9lbN8TgJqXXB2Sk6BYHQEytrFHesI+4KKLfUAiEAxvh8Lt42ojE8khL4IgPNsu/LBkZnNuSIsWJuPSJj2r4="}]},"_npmUser":{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"},"directories":{},"maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/image-cropper_0.1.9_1746170918553_0.8859661563388677"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-01T11:58:23.241Z","modified":"2025-05-02T07:28:38.988Z","0.1.0":"2025-05-01T11:58:23.524Z","0.1.1":"2025-05-01T12:00:56.338Z","0.1.2":"2025-05-01T13:31:33.266Z","0.1.3":"2025-05-01T13:34:48.267Z","0.1.4":"2025-05-01T13:42:54.151Z","0.1.5":"2025-05-01T14:16:40.334Z","0.1.6":"2025-05-01T14:35:12.338Z","0.1.7":"2025-05-01T15:33:43.530Z","0.1.8":"2025-05-01T15:35:16.932Z","0.1.9":"2025-05-02T07:28:38.745Z"},"bugs":{"url":"https://github.com/origin-space/image-cropper/issues"},"author":{"name":"origin-space"},"license":"MIT","homepage":"https://github.com/origin-space/image-cropper#readme","keywords":["react","component","headless","crop","image","cropper"],"repository":{"type":"git","url":"git+https://github.com/origin-space/image-cropper.git"},"description":"A headless React component for image cropping","maintainers":[{"name":"pasqualevitiello","email":"pasqualevitiello@gmail.com"}],"readme":"# React Image Cropper\n\n[![npm version](https://badge.fury.io/js/%40origin%2Fimage-cropper.svg)](https://badge.fury.io/js/%40origin%2Fimage-cropper)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA simple, composable, headless React component for interactive image cropping — inspired by the experience on <a href=\"https://x.com\" target=\"_blank\">X</a>.\n\n![React Image Cropper](https://raw.githubusercontent.com/origin-space/image-cropper/HEAD/media/cropper.png)\n\n## Features\n\n*   **Headless & Composable:** Provides building blocks (`Cropper.Root`, `Cropper.Image`, `Cropper.CropArea`, `Cropper.Description`) for full control over structure and styling.\n*   **Interactive:** Supports zooming (mouse wheel, pinch gesture) and panning (mouse drag, touch drag, arrow keys).\n*   **Aspect Ratio:** Enforces a specified aspect ratio for the crop area.\n*   **Controlled/Uncontrolled:** Manage zoom state internally or control it via props.\n*   **Crop Calculation:** Outputs precise pixel coordinates of the cropped area relative to the original image.\n*   **Accessible:** Designed with ARIA attributes and requires a description element for screen reader users.\n*   **Customizable:** Control zoom limits, sensitivity, padding, keyboard steps, and apply custom styles.\n\n## Installation\n\n```bash\nnpm install @origin/image-cropper\n# or\nyarn add @origin/image-cropper\n# or\npnpm add @origin/image-cropper\n```\n\n## Usage\n\nHere's a basic example of how to use the `Cropper` primitive components:\n\n```tsx\nimport { Cropper } from \"@origin-space/image-cropper\"\nimport React from \"react\"\n\nfunction MyImageCropper() {\n  const [cropData, setCropData] = React.useState<Area | null>(null)\n\n  return (\n    <div>\n      <Cropper.Root\n        image=\"https://images.unsplash.com/photo-1494790108377-be9c29b29330\"\n        aspectRatio={1}\n        onCropChange={setCropData}\n        className=\"relative flex h-80 w-full cursor-move touch-none items-center justify-center overflow-hidden rounded-md border focus:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n      >\n        {/* Required for accessibility */}\n        <Cropper.Description className=\"sr-only\" />\n        <Cropper.Image className=\"pointer-events-none h-full w-full select-none object-cover\" />\n        <Cropper.CropArea className=\"pointer-events-none absolute border-2 border-dashed border-background shadow-[0_0_0_9999px_rgba(0,0,0,0.6)]\" />\n      </Cropper.Root>\n\n      {cropData && (\n        <pre className=\"mt-4 overflow-auto rounded bg-muted p-2 text-sm\">\n          {JSON.stringify(cropData, null, 2)}\n        </pre>\n      )}\n    </div>\n  )\n}\n```\n\nFor more examples and integration with UI frameworks, check out the implementation on [Origin UI](http://originui.com/image-cropper).\n\n## Origin UI Abstraction\n\nOrigin UI provides a [pre-styled component](https://github.com/origin-space/originui/blob/main/registry/default/ui/cropper.tsx) built on top of `@origin-space/image-cropper`. If you're using Origin UI or want a quicker setup, you can use this abstraction.\n\n### Usage with Abstraction\n\nUsing the Origin UI abstraction simplifies the markup:\n\n```tsx\n\"use client\"\n\nimport React from \"react\"\nimport {\n  Cropper,\n  CropperCropArea,\n  CropperDescription,\n  CropperImage,\n} from \"@/registry/default/ui/cropper\"\n\ntype Area = { x: number; y: number; width: number; height: number }\n\nexport default function Component() {\n  const [cropData, setCropData] = React.useState<Area | null>(null)\n\n  return (\n    <div className=\"flex flex-col gap-4\">\n      <Cropper\n        className=\"h-80\"\n        image=\"https://images.unsplash.com/photo-1494790108377-be9c29b29330\"\n        aspectRatio={1}\n        onCropChange={setCropData}\n      >\n        <CropperDescription />\n        <CropperImage />\n        <CropperCropArea />\n      </Cropper>\n\n      {cropData && (\n        <pre className=\"overflow-auto rounded bg-muted p-2 text-sm\">\n          {JSON.stringify(cropData, null, 2)}\n        </pre>\n      )}\n    </div>\n  )\n}\n```\n\n## Components\n\n*   **`Cropper.Root`**: The main container and controller. It handles logic, state, and interactions.\n*   **`Cropper.Image`**: Renders the actual `<img>` tag. It's positioned and scaled by `Cropper.Root`.\n*   **`Cropper.CropArea`**: A simple `<div>` representing the visual crop area. You style this component to show the bounds.\n*   **`Cropper.Description`**: Renders a `<div>` intended for accessibility instructions. Its `id` is automatically linked via `aria-describedby` on the `Root` element. **This component is required for accessibility.**\n\n## `Cropper.Root` Props\n\n| Prop             | Type                           | Default     | Description                                                                                                  |\n|------------------|--------------------------------|-------------|--------------------------------------------------------------------------------------------------------------|\n| `image`          | `string`                       | **Required**| URL of the image to crop.                                                                                    |\n| `children`       | `React.ReactNode`              | **Required**| Should include `Cropper.Image`, `Cropper.CropArea`, and `Cropper.Description`.                               |\n| `aspectRatio`    | `number`                       | `1`         | The desired width/height aspect ratio (e.g., `1`, `1.5`, `4 / 3`, `16 / 9`).                                 |\n| `cropPadding`    | `number`                       | `25`        | Minimum padding (in pixels) between the crop area edges and the container edges.                             |\n| `minZoom`        | `number`                       | `1`         | Minimum zoom level (1 = 100% original size relative to crop area).                                           |\n| `maxZoom`        | `number`                       | `3`         | Maximum zoom level.                                                                                          |\n| `zoomSensitivity`| `number`                       | `0.005`     | Multiplier for mouse wheel delta to control zoom speed.                                                      |\n| `keyboardStep`   | `number`                       | `10`        | Number of pixels to pan the image when using arrow keys.                                                     |\n| `zoom`           | `number`                       | `undefined` | Controlled zoom level. If provided, component zoom state is controlled externally.                           |\n| `onCropChange`   | `(pixels: Area \\| null) => void` | `undefined` | Callback function triggered whenever the crop area changes. Receives pixel data or `null` if invalid.      |\n| `onZoomChange`   | `(zoom: number) => void`       | `undefined` | Callback function triggered when the zoom level changes interactively. Essential for controlled `zoom` prop. |\n| `className`      | `string`                       | `undefined` | CSS class for the root container element.                                                                    |\n| `style`          | `React.CSSProperties`          | `undefined` | Inline styles for the root container element.                                                                |\n| *...restProps*   |                                |             | Any other standard `HTMLDivElement` props are passed to the root container.                                  |\n\n### `onCropChange` Data (`Area`)\n\nThe `Area` object received by `onCropChange` contains the following properties relative to the *original* image dimensions:\n\n*   `x`: The x-coordinate of the top-left corner of the cropped area.\n*   `y`: The y-coordinate of the top-left corner of the cropped area.\n*   `width`: The width of the cropped area in pixels.\n*   `height`: The height of the cropped area in pixels.\n\n## Accessibility\n\nIt is crucial to include a `Cropper.Description` component within `Cropper.Root`. This provides necessary context for screen reader users about how to interact with the cropper. If you don't provide one, a warning will appear in the console. You can visually hide the description using standard CSS techniques (e.g., an `sr-only` class).\n\n## Styling\n\nThe component is headless, meaning it doesn't come with built-in styles beyond basic positioning for the image. You are expected to style the `Cropper.Root`, `Cropper.Image`, and especially the `Cropper.CropArea` using CSS classes (`className`) or inline styles (`style`) to match your application's design. The `Cropper.CropArea` typically needs styling to appear as an overlay (e.g., border, semi-transparent background outside the area).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}