Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/cropperjs

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/cropperjs - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

cropperjs/LICENSE

82

cropperjs/index.d.ts

@@ -13,5 +13,12 @@ // Type definitions for cropperjs

}
export interface CropperCustomEvent extends CustomEvent {
export interface CropperReadyEvent extends CustomEvent { }
export interface CropperCropEvent extends CustomEvent {
detail: Data;
}
export interface CropperCropStepEvent extends CustomEvent {
detail: CropStepData;
}
export interface CropperZoomEvent extends CustomEvent {
detail: ZoomData;
}
export interface CropperOptions {

@@ -21,20 +28,24 @@ /**

*/
ready?: (event: CropperCustomEvent) => void;
ready?: (event: CropperReadyEvent) => void;
/**
* Function called when crop box is moved or resized
*/
crop?: (event: CropperCustomEvent) => void;
crop?: (event: CropperCropEvent) => void;
/**
* Function called at start of crop box being moved or resized
*/
cropstart?: (event: CropperCustomEvent) => void;
cropstart?: (event: CropperCropStepEvent) => void;
/**
* Function called when crop box is moved
*/
cropmove?: (event: CropperCustomEvent) => void;
cropmove?: (event: CropperCropStepEvent) => void;
/**
* Function called when crop box is finished being moved or resized
*/
cropend?: (event: CropperCustomEvent) => void;
cropend?: (event: CropperCropStepEvent) => void;
/**
* Function called when a cropper instance starts to zoom in or zoom out its canvas (image wrapper).
*/
zoom?: (event: CropperZoomEvent) => void;
/**
* Define the view mode of the cropper.

@@ -236,2 +247,43 @@ * @default 0

}
interface CropStepData {
/**
* The original event that was triggered
* Options:
* `cropstart`: mousedown, touchstart and pointerdown
* `cropmove`: mousemove, touchmove and pointermove
* `cropend`: mouseup, touchend, touchcancel, pointerup and pointercancel
*/
originalEvent: Event;
/**
* Options:
* 'crop': create a new crop box
* 'move': move the canvas (image wrapper)
* 'zoom': zoom in / out the canvas (image wrapper) by touch
* 'e': resize the east side of the crop box
* 'w': resize the west side of the crop box
* 's': resize the south side of the crop box
* 'n': resize the north side of the crop box
* 'se': resize the southeast side of the crop box
* 'sw': resize the southwest side of the crop box
* 'ne': resize the northeast side of the crop box
* 'nw': resize the northwest side of the crop box
* 'all': move the crop box (all directions)
*/
action: string;
}
interface ZoomData {
/**
* The original event that was triggered
* Options: wheel, touchmove
*/
originalEvent: Event;
/**
* The old (current) ratio of the canvas
*/
oldRatio: number;
/**
* The new (next) ratio of the canvas (canvasData.width / canvasData.naturalWidth)
*/
ratio: number;
}
interface ContainerData {

@@ -344,4 +396,4 @@ /**

/**
* Show the crop box manually.
*/
* Show the crop box manually.
*/
crop(): void;

@@ -399,2 +451,9 @@

/**
* Zoom the canvas (image wrapper) to an absolute ratio.
* Zoom in: requires a positive number (ratio > 0)
* Zoom out: requires a negative number (ratio < 0)
*/
zoomTo(ratio: number): void;
/**
* Rotate the canvas (image wrapper) with a relative degree.

@@ -407,2 +466,9 @@ * Rotate right: requires a positive number (degree > 0)

/**
* Rotate the canvas (image wrapper) to an absolute degree.
* Rotate right: requires a positive number (degree > 0)
* Rotate left: requires a negative number (degree < 0)
*/
rotateTo(degree: number): void;
/**
* Clear the crop box.

@@ -409,0 +475,0 @@ */

11

cropperjs/package.json
{
"name": "@types/cropperjs",
"version": "0.0.23",
"version": "0.0.24",
"description": "TypeScript definitions for cropperjs",
"license": "MIT",
"author": "Stepan Mikhaylyuk <https://github.com/stepancar>",
"contributors": [
{
"name": "Stepan Mikhaylyuk",
"url": "https://github.com/stepancar"
}
],
"main": "",

@@ -15,4 +20,4 @@ "repository": {

"peerDependencies": {},
"typesPublisherContentHash": "68c51cade19784706f08a986a3a239b8f021a6d995f3b5d14df668ef72cc4584",
"typesPublisherContentHash": "b615ff3e3fe3616ee5a4ecce9d685c6c1324ed2db28df538994755c0c2710eb3",
"typeScriptVersion": "2.0"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/cropperjs
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cropperjs
Additional Details
* Last updated: Fri, 20 Jan 2017 00:12:50 GMT
* Last updated: Mon, 24 Apr 2017 15:16:44 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: Cropper

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