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

advanced-cropper

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advanced-cropper - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

6

package.json
{
"name": "advanced-cropper",
"version": "0.4.0",
"version": "0.4.1",
"description": "The core of the advanced cropper libraries family",

@@ -28,4 +28,4 @@ "author": "Norserium",

"lint:fix": "eslint --fix src/**/*.{js,vue}",
"prepare:dist": "copyfiles package.json dist && copyfiles prepublish.js dist",
"publish:dist": "npm run prepare:dist && cross-env RELEASE=true npm publish dist"
"prepare:dist": "copyfiles package.json dist",
"publish:dist": "npm run prepare:dist && npm publish dist"
},

@@ -32,0 +32,0 @@ "dependencies": {

@@ -1,6 +0,6 @@

import { Boundary, CropperSettings, CropperState, ImageSize, Transforms } from "../types";
import { Boundary, CropperSettings, CropperState, ImageSize, PartialTransforms } from "../types";
interface CreateStateOptions {
boundary: Boundary;
imageSize: ImageSize;
transforms?: Transforms;
transforms?: PartialTransforms;
priority?: 'visibleArea' | 'coordinates';

@@ -7,0 +7,0 @@ }

@@ -1,2 +0,2 @@

import { __assign } from 'tslib';
import 'tslib';
import { getDefaultCoordinates, getDefaultVisibleArea } from '../service/helpers.js';

@@ -7,2 +7,3 @@ import { setCoordinates } from './setCoordinates.js';

function createState(options, settings) {
var _a, _b;
var boundary = options.boundary, imageSize = options.imageSize, transforms = options.transforms, priority = options.priority;

@@ -19,4 +20,7 @@ var state = {

transforms: {
flip: __assign(__assign({}, (transforms && transforms.flip)), { horizontal: false, vertical: false }),
rotate: (transforms && transforms.rotate) || 0,
rotate: (transforms === null || transforms === void 0 ? void 0 : transforms.rotate) || 0,
flip: {
horizontal: ((_a = transforms === null || transforms === void 0 ? void 0 : transforms.flip) === null || _a === void 0 ? void 0 : _a.horizontal) || false,
vertical: ((_b = transforms === null || transforms === void 0 ? void 0 : transforms.flip) === null || _b === void 0 ? void 0 : _b.vertical) || false,
},
},

@@ -23,0 +27,0 @@ visibleArea: null,

@@ -93,2 +93,9 @@ interface Coordinates {

}
interface PartialTransforms {
rotate?: number;
flip?: {
horizontal?: boolean;
vertical?: boolean;
};
}
interface ImageTransform {

@@ -154,2 +161,2 @@ scale?: number | Scale;

type PostprocessFunction = (state: CropperState, settings: CropperSettings, action?: PostprocessAction) => CropperState;
export { Coordinates, VisibleArea, Limits, SizeRestrictions, AreaSizeRestrictions, PositionRestrictions, AreaPositionRestrictions, ResizeDirections, MoveDirections, Point, Size, ImageSize, Boundary, Intersections, AspectRatio, CropperEvent, Diff, Position, Priority, PositionDirection, HorizontalDirection, VerticalDirection, MainDirections, ImageRestriction, HorizontalCardinalDirection, VerticalCardinalDirection, CardinalDirection, OrdinalDirection, Scale, Rotate, Flip, Transforms, ImageTransform, CoordinatesTransform, CropperState, BoundarySizeAlgorithm, DefaultSize, DefaultPosition, DefaultVisibleArea, DefaultCoordinates, CropperSettings, CropperImage, CropperTransitions, Stencil, SimpleTouch, PostprocessAction, PostprocessFunction };
export { Coordinates, VisibleArea, Limits, SizeRestrictions, AreaSizeRestrictions, PositionRestrictions, AreaPositionRestrictions, ResizeDirections, MoveDirections, Point, Size, ImageSize, Boundary, Intersections, AspectRatio, CropperEvent, Diff, Position, Priority, PositionDirection, HorizontalDirection, VerticalDirection, MainDirections, ImageRestriction, HorizontalCardinalDirection, VerticalCardinalDirection, CardinalDirection, OrdinalDirection, Scale, Rotate, Flip, Transforms, PartialTransforms, ImageTransform, CoordinatesTransform, CropperState, BoundarySizeAlgorithm, DefaultSize, DefaultPosition, DefaultVisibleArea, DefaultCoordinates, CropperSettings, CropperImage, CropperTransitions, Stencil, SimpleTouch, PostprocessAction, PostprocessFunction };

Sorry, the diff of this file is too big to display

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