antd-img-crop 4.5.2 → 4.6.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/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/dist/antd-img-crop.cjs.js +4 -4
- package/dist/antd-img-crop.d.ts +1 -1
- package/dist/antd-img-crop.esm.js +4 -4
- package/package.json +18 -19
package/README.md
CHANGED
|
@@ -10,16 +10,14 @@ An image cropper for Ant Design [Upload](https://ant.design/components/upload/)
|
|
|
10
10
|
|
|
11
11
|
English | [简体中文](./README.zh-CN.md)
|
|
12
12
|
|
|
13
|
-
## Demo
|
|
14
|
-
|
|
15
|
-
[](https://codesandbox.io/s/antd-img-crop-4qoom5p9x4?fontsize=14&hidenavigation=1&theme=dark)
|
|
16
|
-
|
|
17
13
|
## Install
|
|
18
14
|
|
|
19
15
|
```sh
|
|
16
|
+
pnpm add antd-img-crop
|
|
17
|
+
# or
|
|
20
18
|
yarn add antd-img-crop
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
# or
|
|
20
|
+
npm i antd-img-crop
|
|
23
21
|
```
|
|
24
22
|
|
|
25
23
|
## Usage
|
|
@@ -35,6 +33,8 @@ const Demo = () => (
|
|
|
35
33
|
);
|
|
36
34
|
```
|
|
37
35
|
|
|
36
|
+
[](https://codesandbox.io/s/antd-img-crop-4qoom5p9x4?fontsize=14&hidenavigation=1&theme=dark)
|
|
37
|
+
|
|
38
38
|
## Props
|
|
39
39
|
|
|
40
40
|
| Prop | Type | Default | Description |
|
|
@@ -107,10 +107,10 @@ module.exports = {
|
|
|
107
107
|
[MIT License](https://github.com/nanxiaobei/antd-img-crop/blob/main/LICENSE) (c) [nanxiaobei](https://lee.so/)
|
|
108
108
|
|
|
109
109
|
[react-easy-crop]: https://github.com/ricardo-ch/react-easy-crop#props
|
|
110
|
-
[existing props]: https://github.com/nanxiaobei/antd-img-crop/blob/main/src/
|
|
110
|
+
[existing props]: https://github.com/nanxiaobei/antd-img-crop/blob/main/src/EasyCrop.tsx#L74-L93
|
|
111
111
|
|
|
112
112
|
## FUTAKE
|
|
113
113
|
|
|
114
|
-
Try [**FUTAKE**](https://sotake.com/
|
|
114
|
+
Try [**FUTAKE**](https://sotake.com/futake) in WeChat. A mini app for your inspiration moments. 🌈
|
|
115
115
|
|
|
116
116
|

|
package/README.zh-CN.md
CHANGED
|
@@ -10,16 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
[English](./README.md) | 简体中文
|
|
12
12
|
|
|
13
|
-
## 示例
|
|
14
|
-
|
|
15
|
-
[](https://codesandbox.io/s/antd-img-crop-4qoom5p9x4?fontsize=14&hidenavigation=1&theme=dark)
|
|
16
|
-
|
|
17
13
|
## 安装
|
|
18
14
|
|
|
19
15
|
```sh
|
|
16
|
+
pnpm add antd-img-crop
|
|
17
|
+
# or
|
|
20
18
|
yarn add antd-img-crop
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
# or
|
|
20
|
+
npm i antd-img-crop
|
|
23
21
|
```
|
|
24
22
|
|
|
25
23
|
## 使用
|
|
@@ -35,6 +33,8 @@ const Demo = () => (
|
|
|
35
33
|
);
|
|
36
34
|
```
|
|
37
35
|
|
|
36
|
+
[](https://codesandbox.io/s/antd-img-crop-4qoom5p9x4?fontsize=14&hidenavigation=1&theme=dark)
|
|
37
|
+
|
|
38
38
|
## Props
|
|
39
39
|
|
|
40
40
|
| 属性 | 类型 | 默认 | 说明 |
|
|
@@ -107,10 +107,10 @@ module.exports = {
|
|
|
107
107
|
[MIT License](https://github.com/nanxiaobei/antd-img-crop/blob/main/LICENSE) (c) [nanxiaobei](https://lee.so/)
|
|
108
108
|
|
|
109
109
|
[react-easy-crop]: https://github.com/ricardo-ch/react-easy-crop#props
|
|
110
|
-
[已有 props]: https://github.com/nanxiaobei/antd-img-crop/blob/main/src/
|
|
110
|
+
[已有 props]: https://github.com/nanxiaobei/antd-img-crop/blob/main/src/EasyCrop.tsx#L74-L93
|
|
111
111
|
|
|
112
112
|
## FUTAKE
|
|
113
113
|
|
|
114
|
-
试试 [**FUTAKE**](https://sotake.com/
|
|
114
|
+
试试 [**FUTAKE**](https://sotake.com/futake) 小程序,你的灵感相册。🌈
|
|
115
115
|
|
|
116
116
|

|
|
@@ -18,12 +18,12 @@ var tslib = require('tslib');
|
|
|
18
18
|
var jsxRuntime = require('react/jsx-runtime');
|
|
19
19
|
var react = require('react');
|
|
20
20
|
var antd = require('antd');
|
|
21
|
-
var LocaleReceiver = require('antd/
|
|
22
|
-
var AntModal = require('antd/
|
|
23
|
-
var AntUpload = require('antd/
|
|
21
|
+
var LocaleReceiver = require('antd/lib/locale-provider/LocaleReceiver');
|
|
22
|
+
var AntModal = require('antd/lib/modal');
|
|
23
|
+
var AntUpload = require('antd/lib/upload');
|
|
24
24
|
var compareVersions = require('compare-versions');
|
|
25
25
|
var Cropper = require('react-easy-crop');
|
|
26
|
-
var AntSlider = require('antd/
|
|
26
|
+
var AntSlider = require('antd/lib/slider');
|
|
27
27
|
|
|
28
28
|
const PREFIX = 'img-crop';
|
|
29
29
|
const INIT_ZOOM = 1;
|
package/dist/antd-img-crop.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ import { __rest, __awaiter } from 'tslib';
|
|
|
14
14
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
15
15
|
import { forwardRef, useState, useRef, useCallback, useImperativeHandle, memo, useMemo } from 'react';
|
|
16
16
|
import { version } from 'antd';
|
|
17
|
-
import LocaleReceiver from 'antd/
|
|
18
|
-
import AntModal from 'antd/
|
|
19
|
-
import AntUpload from 'antd/
|
|
17
|
+
import LocaleReceiver from 'antd/lib/locale-provider/LocaleReceiver';
|
|
18
|
+
import AntModal from 'antd/lib/modal';
|
|
19
|
+
import AntUpload from 'antd/lib/upload';
|
|
20
20
|
import { compareVersions } from 'compare-versions';
|
|
21
21
|
import Cropper from 'react-easy-crop';
|
|
22
|
-
import AntSlider from 'antd/
|
|
22
|
+
import AntSlider from 'antd/lib/slider';
|
|
23
23
|
|
|
24
24
|
const PREFIX = 'img-crop';
|
|
25
25
|
const INIT_ZOOM = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antd-img-crop",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "An image cropper for Ant Design Upload",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -28,33 +28,32 @@
|
|
|
28
28
|
"react-dom": ">=16.8.0"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"compare-versions": "
|
|
32
|
-
"react-easy-crop": "^4.6.
|
|
33
|
-
"tslib": "^2.
|
|
31
|
+
"compare-versions": "6.0.0-rc.1",
|
|
32
|
+
"react-easy-crop": "^4.6.3",
|
|
33
|
+
"tslib": "^2.5.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@rollup/plugin-
|
|
37
|
-
"@rollup/plugin-typescript": "^10.0.1",
|
|
36
|
+
"@rollup/plugin-typescript": "^11.0.0",
|
|
38
37
|
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
|
39
|
-
"@types/node": "^18.11.
|
|
40
|
-
"@types/react": "^18.0.
|
|
41
|
-
"@types/react-dom": "^18.0.
|
|
38
|
+
"@types/node": "^18.11.18",
|
|
39
|
+
"@types/react": "^18.0.27",
|
|
40
|
+
"@types/react-dom": "^18.0.10",
|
|
42
41
|
"@types/rollup-plugin-less": "^1.1.2",
|
|
43
|
-
"@vitejs/plugin-react": "^
|
|
44
|
-
"antd": "^5.
|
|
45
|
-
"eslint": "^8.
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
42
|
+
"@vitejs/plugin-react": "^3.0.1",
|
|
43
|
+
"antd": "^5.1.6",
|
|
44
|
+
"eslint": "^8.32.0",
|
|
45
|
+
"eslint-config-prettier": "^8.6.0",
|
|
47
46
|
"eslint-config-react-app": "^7.0.1",
|
|
48
|
-
"prettier": "^2.8.
|
|
47
|
+
"prettier": "^2.8.3",
|
|
49
48
|
"react": "^18.2.0",
|
|
50
49
|
"react-dom": "^18.2.0",
|
|
51
|
-
"rollup": "3.
|
|
52
|
-
"rollup-plugin-dts": "^5.
|
|
50
|
+
"rollup": "3.11.0",
|
|
51
|
+
"rollup-plugin-dts": "^5.1.1",
|
|
53
52
|
"rollup-plugin-less": "^1.1.3",
|
|
54
|
-
"typescript": "^4.9.
|
|
55
|
-
"vite": "^
|
|
53
|
+
"typescript": "^4.9.4",
|
|
54
|
+
"vite": "^4.0.4"
|
|
56
55
|
},
|
|
57
56
|
"scripts": {
|
|
58
|
-
"build": "rollup -c --configPlugin @rollup/plugin-typescript"
|
|
57
|
+
"build": "rm -rf dist && rollup -c --configPlugin @rollup/plugin-typescript"
|
|
59
58
|
}
|
|
60
59
|
}
|