@hugsmidjan/getclevercropbox
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -6,5 +6,9 @@ # Change Log | ||
- ... <!-- Add new lines here. Version number will be decided later --> | ||
- feat: Add TypeScript declaration file | ||
- feat: Initial commmit - migrating logic + assertions from prototype repo | ||
## 1.1.0 | ||
_2019-10-05_ | ||
- feat: Export the input/output types | ||
## 1.0.0 | ||
@@ -14,1 +18,3 @@ | ||
- feat: Add TypeScript declaration file | ||
- feat: Initial commmit - migrating logic + assertions from prototype repo |
{ | ||
"name": "@hugsmidjan/getclevercropbox", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"main": "dist/getCleverCropBox.js", | ||
@@ -5,0 +5,0 @@ "module": "src/getCleverCropBox.js", |
@@ -1,2 +0,2 @@ | ||
type ImageInfo = { | ||
export type ImageDimensions = { | ||
width: number; | ||
@@ -6,3 +6,3 @@ height: number; | ||
type CropOpts = { | ||
export type CropOpts = { | ||
width?: number; | ||
@@ -21,14 +21,15 @@ height?: number; | ||
type FocalPointOpts = { | ||
export type FocalXY = { | ||
fx: number; | ||
fy: number; | ||
} & ( | ||
| {} | ||
| { | ||
r1x: number; | ||
r1y: number; | ||
r2x: number; | ||
r2y: number; | ||
}); | ||
}; | ||
export type FocalArea = { | ||
r1x: number; | ||
r1y: number; | ||
r2x: number; | ||
r2y: number; | ||
}; | ||
export type FocalPointOpts = FocalXY & (FocalArea | {}); | ||
// -------------------------------------------------------------------------- | ||
@@ -64,3 +65,3 @@ | ||
type CleverCropTargets = ScalingTarget & CroppingTarget; | ||
export type CleverCropTargets = ScalingTarget & CroppingTarget; | ||
@@ -70,5 +71,5 @@ // -------------------------------------------------------------------------- | ||
export default function getCleverCropBox( | ||
origSize: ImageInfo, | ||
origSize: ImageDimensions, | ||
cropInfo: CropOpts, | ||
focalPoint?: FocalPointOpts | ||
): null | CleverCropTargets; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117482
10
5049