diff --git a/CHANGELOG.md b/CHANGELOG.md index cc24983f8..368ee3465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +# [2.0.0-beta.5](https://github.com/fengyuanchen/cropperjs/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2024-04-21) + + +### Bug Fixes + +* **cropper-viewer:** calculate translateY correctly when rotated 90deg ([#1152](https://github.com/fengyuanchen/cropperjs/issues/1152)) ([2dea551](https://github.com/fengyuanchen/cropperjs/commit/2dea551f33d3181561eeed7bb0d52b9ea2fc492b)), closes [#1031](https://github.com/fengyuanchen/cropperjs/issues/1031) + + +### Features + +* **cropper-selection:** add `$clear` method and improve `$reset` method ([#1157](https://github.com/fengyuanchen/cropperjs/issues/1157)) ([8e6dbb0](https://github.com/fengyuanchen/cropperjs/commit/8e6dbb04f7c6b3c0150bf8cb48c34bdde6bc0b68)) +* export `DEFAULT_TEMPLATE` ([#1156](https://github.com/fengyuanchen/cropperjs/issues/1156)) ([2208e73](https://github.com/fengyuanchen/cropperjs/commit/2208e7319a69a33b481dbe23ddb6e41e690dd37d)) + + + # [2.0.0-beta.4](https://github.com/fengyuanchen/cropperjs/compare/v2.0.0-beta.3...v2.0.0-beta.4) (2023-08-20) diff --git a/lerna.json b/lerna.json index 0f5d78143..b4cbaddd3 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "command": { "version": { "conventionalCommits": true, diff --git a/package-lock.json b/package-lock.json index d718643ee..fc54742e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cropperjs", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cropperjs", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "workspaces": [ "packages/*" ], @@ -19355,120 +19355,120 @@ } }, "packages/cropperjs": { - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/elements": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/elements": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element": { "name": "@cropper/element", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-canvas": { "name": "@cropper/element-canvas", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-crosshair": { "name": "@cropper/element-crosshair", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-grid": { "name": "@cropper/element-grid", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-handle": { "name": "@cropper/element-handle", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-image": { "name": "@cropper/element-image", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-selection": { "name": "@cropper/element-selection", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-image": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-image": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-shade": { "name": "@cropper/element-shade", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-selection": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-selection": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/element-viewer": { "name": "@cropper/element-viewer", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-image": "^2.0.0-beta.4", - "@cropper/element-selection": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-image": "^2.0.0-beta.5", + "@cropper/element-selection": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" } }, "packages/elements": { "name": "@cropper/elements", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-crosshair": "^2.0.0-beta.4", - "@cropper/element-grid": "^2.0.0-beta.4", - "@cropper/element-handle": "^2.0.0-beta.4", - "@cropper/element-image": "^2.0.0-beta.4", - "@cropper/element-selection": "^2.0.0-beta.4", - "@cropper/element-shade": "^2.0.0-beta.4", - "@cropper/element-viewer": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-crosshair": "^2.0.0-beta.5", + "@cropper/element-grid": "^2.0.0-beta.5", + "@cropper/element-handle": "^2.0.0-beta.5", + "@cropper/element-image": "^2.0.0-beta.5", + "@cropper/element-selection": "^2.0.0-beta.5", + "@cropper/element-shade": "^2.0.0-beta.5", + "@cropper/element-viewer": "^2.0.0-beta.5" } }, "packages/utils": { "name": "@cropper/utils", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "license": "MIT" } } diff --git a/package.json b/package.json index c54f30a4d..1aa21a339 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cropperjs", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "private": true, "workspaces": [ "packages/*" diff --git a/packages/cropperjs/package.json b/packages/cropperjs/package.json index 8e852fd26..e973da167 100644 --- a/packages/cropperjs/package.json +++ b/packages/cropperjs/package.json @@ -1,6 +1,6 @@ { "name": "cropperjs", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "JavaScript image cropper.", "main": "dist/cropper.raw.js", "module": "dist/cropper.esm.raw.js", @@ -49,8 +49,8 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/cropperjs/#readme", "dependencies": { - "@cropper/elements": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/elements": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "tag": "next" diff --git a/packages/element-canvas/package.json b/packages/element-canvas/package.json index 0c2770a8b..539e73e3c 100644 --- a/packages/element-canvas/package.json +++ b/packages/element-canvas/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-canvas", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom canvas element for the Cropper.", "main": "dist/element-canvas.raw.js", "module": "dist/element-canvas.esm.raw.js", @@ -36,8 +36,8 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-canvas/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-crosshair/package.json b/packages/element-crosshair/package.json index 29cb4c989..d8a532893 100644 --- a/packages/element-crosshair/package.json +++ b/packages/element-crosshair/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-crosshair", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom crosshair element for the Cropper.", "main": "dist/element-crosshair.raw.js", "module": "dist/element-crosshair.esm.raw.js", @@ -36,8 +36,8 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-crosshair/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-grid/package.json b/packages/element-grid/package.json index b971db3d3..9526ebbed 100644 --- a/packages/element-grid/package.json +++ b/packages/element-grid/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-grid", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom grid element for the Cropper.", "main": "dist/element-grid.raw.js", "module": "dist/element-grid.esm.raw.js", @@ -36,8 +36,8 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-grid/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-handle/package.json b/packages/element-handle/package.json index cb8bb541a..f44d5bc6c 100644 --- a/packages/element-handle/package.json +++ b/packages/element-handle/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-handle", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom handle element for the Cropper.", "main": "dist/element-handle.raw.js", "module": "dist/element-handle.esm.raw.js", @@ -36,8 +36,8 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-handle/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-image/package.json b/packages/element-image/package.json index 382c08735..393fea3b8 100644 --- a/packages/element-image/package.json +++ b/packages/element-image/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-image", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom image element for the Cropper.", "main": "dist/element-image.raw.js", "module": "dist/element-image.esm.raw.js", @@ -36,9 +36,9 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-image/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-selection/package.json b/packages/element-selection/package.json index e0e3bc41f..e4bae4de7 100644 --- a/packages/element-selection/package.json +++ b/packages/element-selection/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-selection", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom selection element for the Cropper.", "main": "dist/element-selection.raw.js", "module": "dist/element-selection.esm.raw.js", @@ -36,10 +36,10 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-selection/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-image": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-image": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-shade/package.json b/packages/element-shade/package.json index cd5568960..165387105 100644 --- a/packages/element-shade/package.json +++ b/packages/element-shade/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-shade", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom shade element for the Cropper.", "main": "dist/element-shade.raw.js", "module": "dist/element-shade.esm.raw.js", @@ -36,10 +36,10 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-shade/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-selection": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-selection": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element-viewer/package.json b/packages/element-viewer/package.json index 0e60d8428..072ea226b 100644 --- a/packages/element-viewer/package.json +++ b/packages/element-viewer/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element-viewer", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A custom viewer element for the Cropper.", "main": "dist/element-viewer.raw.js", "module": "dist/element-viewer.esm.raw.js", @@ -36,11 +36,11 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element-viewer/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-image": "^2.0.0-beta.4", - "@cropper/element-selection": "^2.0.0-beta.4", - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-image": "^2.0.0-beta.5", + "@cropper/element-selection": "^2.0.0-beta.5", + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/element/package.json b/packages/element/package.json index bf6d271d0..71014d3ad 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/element", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "An abstract class for constructing Cropper elements.", "main": "dist/element.raw.js", "module": "dist/element.esm.raw.js", @@ -36,7 +36,7 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/element/#readme", "dependencies": { - "@cropper/utils": "^2.0.0-beta.4" + "@cropper/utils": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/elements/package.json b/packages/elements/package.json index 541738b97..f342dff9e 100644 --- a/packages/elements/package.json +++ b/packages/elements/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/elements", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A series of custom elements for the Cropper.", "main": "dist/elements.raw.js", "module": "dist/elements.esm.raw.js", @@ -33,15 +33,15 @@ "bugs": "https://github.com/fengyuanchen/cropperjs-next/issues", "homepage": "https://github.com/fengyuanchen/cropperjs-next/tree/next/packages/elements/#readme", "dependencies": { - "@cropper/element": "^2.0.0-beta.4", - "@cropper/element-canvas": "^2.0.0-beta.4", - "@cropper/element-crosshair": "^2.0.0-beta.4", - "@cropper/element-grid": "^2.0.0-beta.4", - "@cropper/element-handle": "^2.0.0-beta.4", - "@cropper/element-image": "^2.0.0-beta.4", - "@cropper/element-selection": "^2.0.0-beta.4", - "@cropper/element-shade": "^2.0.0-beta.4", - "@cropper/element-viewer": "^2.0.0-beta.4" + "@cropper/element": "^2.0.0-beta.5", + "@cropper/element-canvas": "^2.0.0-beta.5", + "@cropper/element-crosshair": "^2.0.0-beta.5", + "@cropper/element-grid": "^2.0.0-beta.5", + "@cropper/element-handle": "^2.0.0-beta.5", + "@cropper/element-image": "^2.0.0-beta.5", + "@cropper/element-selection": "^2.0.0-beta.5", + "@cropper/element-shade": "^2.0.0-beta.5", + "@cropper/element-viewer": "^2.0.0-beta.5" }, "publishConfig": { "access": "public", diff --git a/packages/utils/package.json b/packages/utils/package.json index 6d6ba6b75..3849e327f 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@cropper/utils", - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "description": "A series of common constants and utility functions for Cropper.", "main": "dist/utils.raw.js", "module": "dist/utils.esm.raw.js",