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 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
- [![Edit antd-img-crop](https://codesandbox.io/static/img/play-codesandbox.svg)](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
- # npm install antd-img-crop
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
+ [![Edit antd-img-crop](https://codesandbox.io/static/img/play-codesandbox.svg)](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/easy-crop.tsx#L98-L114
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/f) in WeChat. A mini app for your inspiration moments. 🌈
114
+ Try [**FUTAKE**](https://sotake.com/futake) in WeChat. A mini app for your inspiration moments. 🌈
115
115
 
116
116
  ![](https://s3.bmp.ovh/imgs/2022/07/21/452dd47aeb790abd.png)
package/README.zh-CN.md CHANGED
@@ -10,16 +10,14 @@
10
10
 
11
11
  [English](./README.md) | 简体中文
12
12
 
13
- ## 示例
14
-
15
- [![Edit antd-img-crop](https://codesandbox.io/static/img/play-codesandbox.svg)](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
- # npm install antd-img-crop
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
+ [![Edit antd-img-crop](https://codesandbox.io/static/img/play-codesandbox.svg)](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/easy-crop.tsx#L98-L114
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/f) 小程序,你的灵感相册。🌈
114
+ 试试 [**FUTAKE**](https://sotake.com/futake) 小程序,你的灵感相册。🌈
115
115
 
116
116
  ![](https://s3.bmp.ovh/imgs/2022/07/21/452dd47aeb790abd.png)
@@ -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/es/locale-provider/LocaleReceiver');
22
- var AntModal = require('antd/es/modal');
23
- var AntUpload = require('antd/es/upload');
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/es/slider');
26
+ var AntSlider = require('antd/lib/slider');
27
27
 
28
28
  const PREFIX = 'img-crop';
29
29
  const INIT_ZOOM = 1;
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import Cropper, { CropperProps } from 'react-easy-crop';
3
- import { RcFile } from 'antd/es/upload/interface';
3
+ import { RcFile } from 'antd/lib/upload/interface';
4
4
 
5
5
  type ImgCropProps = {
6
6
  aspect?: number;
@@ -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/es/locale-provider/LocaleReceiver';
18
- import AntModal from 'antd/es/modal';
19
- import AntUpload from 'antd/es/upload';
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/es/slider';
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.5.2",
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": "^5.0.1",
32
- "react-easy-crop": "^4.6.2",
33
- "tslib": "^2.4.1"
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-replace": "^5.0.1",
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.10",
40
- "@types/react": "^18.0.25",
41
- "@types/react-dom": "^18.0.9",
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": "^2.2.0",
44
- "antd": "^5.0.3",
45
- "eslint": "^8.28.0",
46
- "eslint-config-prettier": "^8.5.0",
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.0",
47
+ "prettier": "^2.8.3",
49
48
  "react": "^18.2.0",
50
49
  "react-dom": "^18.2.0",
51
- "rollup": "3.5.1",
52
- "rollup-plugin-dts": "^5.0.0",
50
+ "rollup": "3.11.0",
51
+ "rollup-plugin-dts": "^5.1.1",
53
52
  "rollup-plugin-less": "^1.1.3",
54
- "typescript": "^4.9.3",
55
- "vite": "^3.2.4"
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
  }