New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cropt

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cropt - npm Package Compare versions

Comparing version 0.9.1 to 1.0.0

14

package.json
{
"name": "cropt",
"version": "0.9.1",
"version": "1.0.0",
"description": "A lightweight JavaScript image cropper",

@@ -19,5 +19,5 @@ "files": [

"http-server": "^14.1.1",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"sass": "^1.77.6",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},

@@ -45,3 +45,9 @@ "scripts": {

},
"homepage": "http://devtheorem.github.io/cropt/"
"homepage": "http://devtheorem.github.io/cropt/",
"cspell": {
"words": [
"Cropt",
"cropt"
]
}
}

@@ -40,6 +40,7 @@ # Cropt - lightweight JavaScript image cropper

Type: `{ width: number, height: number, type: "square" | "circle" }`
Default value: `{ width: 220, height: 220, type: "square" }`
Type: `{ width: number, height: number, borderRadius: string }`
Default value: `{ width: 220, height: 220, borderRadius: "0px" }`
Defines the size and shape of the crop box.
For a circle shape, set the border radius to `"50%"`.

@@ -46,0 +47,0 @@ ### `zoomerInputClass`

@@ -9,3 +9,3 @@ type RecursivePartial<T> = {

height: number;
type: "square" | "circle";
borderRadius: string;
};

@@ -12,0 +12,0 @@ zoomerInputClass: string;

@@ -103,3 +103,3 @@ class Transform {

height: 220,
type: "square",
borderRadius: "0px",
},

@@ -249,10 +249,4 @@ zoomerInputClass: "cr-slider",

this.elements.zoomer.className = this.options.zoomerInputClass;
const circleClass = "cr-vp-circle";
const viewport = this.elements.viewport;
if (this.options.viewport.type === "circle") {
viewport.classList.add(circleClass);
}
else {
viewport.classList.remove(circleClass);
}
viewport.style.borderRadius = this.options.viewport.borderRadius;
viewport.style.width = this.options.viewport.width + "px";

@@ -259,0 +253,0 @@ viewport.style.height = this.options.viewport.height + "px";

@@ -119,3 +119,3 @@ class Transform {

height: number;
type: "square" | "circle";
borderRadius: string;
};

@@ -147,3 +147,3 @@ zoomerInputClass: string;

height: 220,
type: "square",
borderRadius: "0px",
},

@@ -325,11 +325,4 @@ zoomerInputClass: "cr-slider",

this.elements.zoomer.className = this.options.zoomerInputClass;
const circleClass = "cr-vp-circle";
const viewport = this.elements.viewport;
if (this.options.viewport.type === "circle") {
viewport.classList.add(circleClass);
} else {
viewport.classList.remove(circleClass);
}
viewport.style.borderRadius = this.options.viewport.borderRadius;
viewport.style.width = this.options.viewport.width + "px";

@@ -336,0 +329,0 @@ viewport.style.height = this.options.viewport.height + "px";

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc