@wordpress/image-cropper 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/build-types/provider/index.d.ts +1 -1
- package/build-types/provider/index.d.ts.map +1 -1
- package/build-types/stories/index.story.d.ts +4 -2
- package/build-types/stories/index.story.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/stories/index.story.tsx +0 -1
- package/src/stories/style.css +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 1.15.0 (2026-07-14)
|
|
6
|
+
|
|
7
|
+
### Enhancements
|
|
8
|
+
|
|
9
|
+
- Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).
|
|
10
|
+
|
|
5
11
|
## 1.14.0 (2026-07-01)
|
|
6
12
|
|
|
7
13
|
## 1.13.0 (2026-06-24)
|
|
@@ -32,4 +38,4 @@
|
|
|
32
38
|
|
|
33
39
|
## 1.3.0 (2026-01-29)
|
|
34
40
|
|
|
35
|
-
## 1.2.0 (2026-01-16)
|
|
41
|
+
## 1.2.0 (2026-01-16)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ImageCropperContextValue } from '../types';
|
|
2
2
|
export declare const ImageCropperContext: import("react").Context<ImageCropperContextValue>;
|
|
3
|
-
export default function ImageCropperProvider({ children }: {
|
|
3
|
+
export default function ImageCropperProvider({ children, }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
6
6
|
export declare const useImageCropper: () => ImageCropperContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGzD,eAAO,MAAM,mBAAmB,mDAiB7B,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAE,EAC7C,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGzD,eAAO,MAAM,mBAAmB,mDAiB7B,CAAC;AAEJ,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAE,EAC7C,QAAQ,GACR,EAAE;IACF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,+BAaA;AAED,eAAO,MAAM,eAAe,gCAM3B,CAAC"}
|
|
@@ -9,16 +9,18 @@ declare const _default: {
|
|
|
9
9
|
component: typeof ImageCropper;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
12
|
+
declare const DefaultComponent: (args: ImageCropperProps) => import("react").JSX.Element;
|
|
12
13
|
export declare const Default: {
|
|
13
|
-
render:
|
|
14
|
+
render: typeof DefaultComponent;
|
|
14
15
|
args: {
|
|
15
16
|
src: string;
|
|
16
17
|
minZoom: number;
|
|
17
18
|
maxZoom: number;
|
|
18
19
|
};
|
|
19
20
|
};
|
|
21
|
+
declare const WithControlsComponent: (args: ImageCropperProps) => import("react").JSX.Element;
|
|
20
22
|
export declare const WithControls: {
|
|
21
|
-
render:
|
|
23
|
+
render: typeof WithControlsComponent;
|
|
22
24
|
args: {
|
|
23
25
|
src: string;
|
|
24
26
|
minZoom: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../src/stories/index.story.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,UAAU,CAAC;AAE7D,OAAO,aAAa,CAAC;;IAGpB,KAAK;IACL,SAAS;;;
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../src/stories/index.story.tsx"],"names":[],"mappings":"AAYA;;GAEG;AACH,OAAO,YAAY,MAAM,6BAA6B,CAAC;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,UAAU,CAAC;AAE7D,OAAO,aAAa,CAAC;;IAGpB,KAAK;IACL,SAAS;;;AAGV,QAAA,MAAM,gBAAgB,SAAW,iBAAiB,gCAUjD,CAAC;AAEF,eAAO,MAAM,OAAO;IACnB,MAAM;IACN,IAAI;QACH,GAAG;QACH,OAAO;QACP,OAAO;;CAER,CAAC;AAEF,QAAA,MAAM,qBAAqB,SAAW,iBAAiB,gCAMtD,CAAC;AAyKF,eAAO,MAAM,YAAY;IACxB,MAAM;IACN,IAAI;QACH,GAAG;QACH,OAAO;QACP,OAAO;;CAER,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/image-cropper",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "A basic image cropper component.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"types": "build-types",
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@wordpress/components": "^
|
|
47
|
-
"@wordpress/element": "^8.
|
|
48
|
-
"@wordpress/i18n": "^6.
|
|
46
|
+
"@wordpress/components": "^37.0.0",
|
|
47
|
+
"@wordpress/element": "^8.3.0",
|
|
48
|
+
"@wordpress/i18n": "^6.24.0",
|
|
49
49
|
"clsx": "^2.1.1",
|
|
50
50
|
"dequal": "^2.0.3",
|
|
51
51
|
"react-easy-crop": "^5.4.2"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@types/react": "^18
|
|
55
|
-
"react": "^18
|
|
56
|
-
"react-dom": "^18
|
|
54
|
+
"@types/react": "^18 || ^19",
|
|
55
|
+
"react": "^18 || ^19",
|
|
56
|
+
"react-dom": "^18 || ^19"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"@types/react": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "e9a74f9c14095a34398ecd4d1f7a908e55051205"
|
|
67
67
|
}
|
|
@@ -198,7 +198,6 @@ const WithControlsContent = ( args: ImageCropperProps ) => {
|
|
|
198
198
|
value={ cropperState.aspectRatio.toString() }
|
|
199
199
|
options={ aspectRatioOptions }
|
|
200
200
|
onChange={ handleAspectRatioChange }
|
|
201
|
-
__next40pxDefaultSize
|
|
202
201
|
/>
|
|
203
202
|
</VStack>
|
|
204
203
|
<HStack style={ { marginBottom: '20px' } } spacing={ 2 }>
|
package/src/stories/style.css
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
.image-cropper__container-wrapper-story {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
background: rgba(0, 0, 0, 0.1) !important;
|
|
3
|
+
height: 500px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
box-sizing: border-box;
|
|
9
9
|
}
|
|
10
10
|
.image-cropper__container-story {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
position: relative;
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
14
|
}
|
|
15
15
|
.image-cropper__crop-area {
|
|
16
|
-
|
|
17
|
-
}
|
|
16
|
+
box-shadow: unset !important;
|
|
17
|
+
}
|