@pointcloud/pcloud-components 0.1.21 → 0.1.24

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.
Files changed (69) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/AdvancedFilter/FormFilter.js +3 -3
  3. package/dist/esm/AdvancedFilter/interface.d.ts +3 -3
  4. package/dist/esm/AdvancedFilter/styles/index.less +146 -146
  5. package/dist/esm/AspectRatio/index.d.ts +9 -0
  6. package/dist/esm/AspectRatio/index.js +46 -0
  7. package/dist/esm/ColorPicker/index.js +1 -1
  8. package/dist/esm/ColorPicker/index.less +18 -18
  9. package/dist/esm/ColorPicker/interface.d.ts +3 -3
  10. package/dist/esm/ConfigProvider/interface.d.ts +1 -1
  11. package/dist/esm/DCascader/index.js +6 -6
  12. package/dist/esm/DCascader/index.less +24 -24
  13. package/dist/esm/DForm/DItem/itemType.d.ts +5 -1
  14. package/dist/esm/DForm/DItem/itemsRender.d.ts +2 -0
  15. package/dist/esm/DForm/DItem/itemsRender.js +8 -0
  16. package/dist/esm/DForm/helper.d.ts +2 -0
  17. package/dist/esm/DForm/helper.js +33 -10
  18. package/dist/esm/DForm/index.js +7 -4
  19. package/dist/esm/DForm/index.less +5 -0
  20. package/dist/esm/DInput/index.js +14 -14
  21. package/dist/esm/DModal/interface.d.ts +2 -2
  22. package/dist/esm/DModal/styles/index.less +27 -27
  23. package/dist/esm/DSelect/index.js +39 -45
  24. package/dist/esm/DTable/index.js +6 -6
  25. package/dist/esm/DTable/index.less +71 -71
  26. package/dist/esm/DTreeSelect/index.less +11 -11
  27. package/dist/esm/DUpload/helper.js +47 -47
  28. package/dist/esm/DUpload/index.less +19 -19
  29. package/dist/esm/ErrorBoundary/index.less +44 -44
  30. package/dist/esm/IPAddress/index.d.ts +20 -0
  31. package/dist/esm/IPAddress/index.js +248 -0
  32. package/dist/esm/IPAddress/index.less +75 -0
  33. package/dist/esm/IconFont/index.d.ts +17 -0
  34. package/dist/esm/IconFont/index.js +27 -0
  35. package/dist/esm/InfiniteScrollList/index.d.ts +9 -0
  36. package/dist/esm/InfiniteScrollList/index.js +9 -4
  37. package/dist/esm/InfiniteScrollList/styles/index.less +2 -0
  38. package/dist/esm/LabelValue/interface.d.ts +1 -1
  39. package/dist/esm/LabelValue/styles/index.less +23 -23
  40. package/dist/esm/Loading/hooks/useLoading.d.ts +6 -0
  41. package/dist/esm/Loading/hooks/useLoading.js +35 -0
  42. package/dist/esm/Loading/index.d.ts +5 -4
  43. package/dist/esm/Loading/index.js +9 -9
  44. package/dist/esm/Loading/interface.d.ts +6 -3
  45. package/dist/esm/Loading/loading.d.ts +2 -4
  46. package/dist/esm/Loading/loading.js +5 -3
  47. package/dist/esm/Loading/styles/index.less +25 -25
  48. package/dist/esm/NoData/styles/index.less +24 -24
  49. package/dist/esm/PictureCard/index.d.ts +1 -1
  50. package/dist/esm/PictureCard/index.less +28 -28
  51. package/dist/esm/RCropper/handler.d.ts +16 -0
  52. package/dist/esm/RCropper/handler.js +146 -0
  53. package/dist/esm/RCropper/index.d.ts +4 -0
  54. package/dist/esm/RCropper/index.js +183 -0
  55. package/dist/esm/RCropper/interface.d.ts +70 -0
  56. package/dist/esm/RCropper/interface.js +1 -0
  57. package/dist/esm/RCropper/styles/toolbar.less +25 -0
  58. package/dist/esm/RCropper/svgIcons.d.ts +28 -0
  59. package/dist/esm/RCropper/svgIcons.js +158 -0
  60. package/dist/esm/RCropper/toolbar.d.ts +5 -0
  61. package/dist/esm/RCropper/toolbar.js +84 -0
  62. package/dist/esm/WordCloud/index.d.ts +6 -2
  63. package/dist/esm/WordCloud/index.js +110 -5
  64. package/dist/esm/commonStyle/index.less +1 -1
  65. package/dist/esm/index.d.ts +9 -1
  66. package/dist/esm/index.js +6 -2
  67. package/dist/umd/pcloud-components.min.css +1 -1
  68. package/dist/umd/pcloud-components.min.js +1 -1
  69. package/package.json +107 -106
@@ -0,0 +1,183 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _typeof from "@babel/runtime/helpers/esm/typeof";
3
+ import React, { forwardRef, useContext, useEffect, useImperativeHandle, useRef, useCallback, useMemo } from 'react';
4
+ import Cropper, { toKebabCase } from 'cropperjs';
5
+ import classNames from 'classnames';
6
+ import { ConfigContext } from "../ConfigProvider";
7
+ import { createCropperHandlers } from "./handler";
8
+ import Toolbar from "./toolbar";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { Fragment as _Fragment } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var isNonEmptyObject = function isNonEmptyObject(obj) {
13
+ return _typeof(obj) === 'object' && obj !== null && !Array.isArray(obj) && Object.keys(obj).length > 0;
14
+ };
15
+
16
+ /**
17
+ * 属性设置方法
18
+ * @param element DOM元素
19
+ * @param attrName 属性名(kebab-case)
20
+ * @param value 属性值
21
+ */
22
+ var setElementAttribute = function setElementAttribute(element, attrName, value) {
23
+ if (!element) return;
24
+ // 处理布尔值
25
+ if (typeof value === 'boolean') {
26
+ // eslint-disable-next-line no-unused-expressions, @typescript-eslint/no-unused-expressions
27
+ value ? element.setAttribute(attrName, '') : element.removeAttribute(attrName);
28
+ } else if (value === null || value === undefined) {
29
+ element.removeAttribute(attrName);
30
+ } else {
31
+ element.setAttribute(attrName, String(value));
32
+ }
33
+ };
34
+ var RCropper = /*#__PURE__*/forwardRef(function (props, ref) {
35
+ var src = props.src,
36
+ _props$alt = props.alt,
37
+ alt = _props$alt === void 0 ? 'image' : _props$alt,
38
+ className = props.className,
39
+ style = props.style,
40
+ grid = props.grid,
41
+ canvas = props.canvas,
42
+ selection = props.selection,
43
+ dragMode = props.dragMode,
44
+ onCrop = props.onCrop,
45
+ onZoom = props.onZoom,
46
+ onRotate = props.onRotate,
47
+ onFlip = props.onFlip,
48
+ onReset = props.onReset,
49
+ onCancelCrop = props.onCancelCrop;
50
+ var _useContext = useContext(ConfigContext),
51
+ prefixCls = _useContext.prefixCls,
52
+ getPrefixCls = _useContext.getPrefixCls;
53
+ var classname = getPrefixCls('rcropper');
54
+ var wrapperClass = classNames(_defineProperty({}, "".concat(prefixCls, "-rcropper"), !!prefixCls), classname, className);
55
+ var cropperRef = useRef(null);
56
+ var cropperInstanceRef = useRef(null);
57
+ var imgTransformRef = useRef();
58
+ var setCropperElementAttributes = useCallback(function (elementGetter, props) {
59
+ var nextTick = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
60
+ if (cropperInstanceRef.current && isNonEmptyObject(props)) {
61
+ var element = elementGetter(cropperInstanceRef.current);
62
+ Object.keys(props).forEach(function (key) {
63
+ var kebabKey = toKebabCase(key);
64
+ if (props[key] !== undefined) {
65
+ var setAttr = function setAttr() {
66
+ return setElementAttribute(element, kebabKey, props[key]);
67
+ };
68
+ if (nextTick) {
69
+ var _element$$nextTick;
70
+ element === null || element === void 0 || (_element$$nextTick = element.$nextTick) === null || _element$$nextTick === void 0 || _element$$nextTick.call(element, setAttr);
71
+ } else {
72
+ setAttr();
73
+ }
74
+ }
75
+ });
76
+ }
77
+ }, []);
78
+ var setGrid = useCallback(function (_grid) {
79
+ setCropperElementAttributes(function (cropper) {
80
+ var _cropper$getCropperSe;
81
+ return (_cropper$getCropperSe = cropper.getCropperSelection()) === null || _cropper$getCropperSe === void 0 ? void 0 : _cropper$getCropperSe.querySelector('cropper-grid');
82
+ }, _grid);
83
+ }, []);
84
+ var setSelection = useCallback(function (_selection) {
85
+ setCropperElementAttributes(function (cropper) {
86
+ return cropper.getCropperSelection();
87
+ }, _selection, true);
88
+ }, []);
89
+ var setCanvas = useCallback(function (_canvas) {
90
+ setCropperElementAttributes(function (cropper) {
91
+ return cropper.getCropperCanvas();
92
+ }, _canvas, true);
93
+ }, []);
94
+ var setDragMode = function setDragMode(_dragMode) {
95
+ if (cropperInstanceRef.current) {
96
+ var selectionDom = cropperInstanceRef.current.getCropperSelection();
97
+ var handleDom = selectionDom === null || selectionDom === void 0 ? void 0 : selectionDom.querySelector('cropper-handle');
98
+ handleDom === null || handleDom === void 0 || handleDom.setAttribute('action', _dragMode || 'crop');
99
+ }
100
+ };
101
+ // initialize cropper options
102
+ var initializeOptions = useCallback(function () {
103
+ if (isNonEmptyObject(grid)) setGrid(grid);
104
+ if (isNonEmptyObject(canvas)) setCanvas(canvas);
105
+ if (isNonEmptyObject(selection)) setSelection(selection);
106
+ if (dragMode) setDragMode(dragMode);
107
+ }, [dragMode, grid, canvas, selection]);
108
+ var handleAction = useMemo(function () {
109
+ return createCropperHandlers(cropperInstanceRef, imgTransformRef, {
110
+ onCrop: onCrop,
111
+ onZoom: onZoom,
112
+ onRotate: onRotate,
113
+ onFlip: onFlip,
114
+ onReset: onReset,
115
+ onCancelCrop: onCancelCrop
116
+ });
117
+ }, [onCrop, onZoom, onRotate, onFlip, onReset, onCancelCrop]);
118
+ useImperativeHandle(ref, function () {
119
+ var _cropperInstanceRef$c, _cropperInstanceRef$c2, _cropperInstanceRef$c3, _cropperInstanceRef$c4, _cropperInstanceRef$c5, _cropperInstanceRef$c6;
120
+ return {
121
+ cropper: cropperInstanceRef.current,
122
+ image: (_cropperInstanceRef$c = (_cropperInstanceRef$c2 = cropperInstanceRef.current) === null || _cropperInstanceRef$c2 === void 0 ? void 0 : _cropperInstanceRef$c2.getCropperImage()) !== null && _cropperInstanceRef$c !== void 0 ? _cropperInstanceRef$c : null,
123
+ canvas: (_cropperInstanceRef$c3 = (_cropperInstanceRef$c4 = cropperInstanceRef.current) === null || _cropperInstanceRef$c4 === void 0 ? void 0 : _cropperInstanceRef$c4.getCropperCanvas()) !== null && _cropperInstanceRef$c3 !== void 0 ? _cropperInstanceRef$c3 : null,
124
+ selection: (_cropperInstanceRef$c5 = (_cropperInstanceRef$c6 = cropperInstanceRef.current) === null || _cropperInstanceRef$c6 === void 0 ? void 0 : _cropperInstanceRef$c6.getCropperSelection()) !== null && _cropperInstanceRef$c5 !== void 0 ? _cropperInstanceRef$c5 : null
125
+ };
126
+ });
127
+ // handle dragMode
128
+ useEffect(function () {
129
+ if (dragMode) {
130
+ setDragMode(dragMode);
131
+ }
132
+ }, [dragMode]);
133
+ useEffect(function () {
134
+ if (canvas) {
135
+ setCanvas(canvas);
136
+ }
137
+ }, [canvas]);
138
+ useEffect(function () {
139
+ if (selection) {
140
+ setSelection(selection);
141
+ }
142
+ }, [selection]);
143
+ useEffect(function () {
144
+ if (cropperInstanceRef.current) {
145
+ var imgDom = cropperInstanceRef.current.getCropperImage();
146
+ var selectionDom = cropperInstanceRef.current.getCropperSelection();
147
+ if (!src) {
148
+ imgDom === null || imgDom === void 0 || imgDom.setAttribute('src', src);
149
+ } else {
150
+ selectionDom === null || selectionDom === void 0 || selectionDom.$reset();
151
+ selectionDom === null || selectionDom === void 0 || selectionDom.setAttribute('hidden', 'true');
152
+ }
153
+ }
154
+ }, [src]);
155
+ useEffect(function () {
156
+ if (cropperRef.current && !cropperInstanceRef.current) {
157
+ cropperInstanceRef.current = new Cropper(cropperRef.current);
158
+ var img = cropperInstanceRef.current.getCropperImage();
159
+ var cropperCanvas = cropperInstanceRef.current.getCropperCanvas();
160
+ cropperCanvas === null || cropperCanvas === void 0 || cropperCanvas.$addStyles(":host { height: 100%; }");
161
+ img === null || img === void 0 || img.$ready(function () {
162
+ img.setAttribute('crossOrigin', 'Anonymous');
163
+ // 缓存图片初始transform
164
+ imgTransformRef.current = img.$getTransform();
165
+ initializeOptions();
166
+ });
167
+ }
168
+ }, []);
169
+ return /*#__PURE__*/_jsxs(_Fragment, {
170
+ children: [/*#__PURE__*/_jsx("div", {
171
+ className: wrapperClass,
172
+ style: style,
173
+ children: /*#__PURE__*/_jsx("img", {
174
+ ref: cropperRef,
175
+ src: src,
176
+ alt: alt
177
+ })
178
+ }), /*#__PURE__*/_jsx(Toolbar, {
179
+ onAction: handleAction
180
+ })]
181
+ });
182
+ });
183
+ export default RCropper;
@@ -0,0 +1,70 @@
1
+ /// <reference types="react" />
2
+ import type Cropper from 'cropperjs';
3
+ import type { CropperGrid, CropperSelection, CropperImage, CropperCanvas, CropperHandle } from 'cropperjs';
4
+ export declare type RCropperGrid = Partial<Pick<CropperGrid, 'rows' | 'columns'>>;
5
+ export declare type RCropperSelection = Partial<Pick<CropperSelection, 'x' | 'y' | 'width' | 'height' | 'aspectRatio' | 'initialAspectRatio' | 'zoomable' | 'resizable'>>;
6
+ export declare type RCropperImage = Partial<Pick<CropperImage, 'rotatable' | 'scalable' | 'skewable' | 'translatable'>>;
7
+ export declare type RCropperCanvas = Partial<Pick<CropperCanvas, 'scaleStep' | 'disabled'>>;
8
+ export interface RCropperEvents {
9
+ onCrop?(_src: string | undefined, _file?: File): void;
10
+ onZoom?(imgData: number[] | undefined): void;
11
+ onRotate?(imgData: number[] | undefined): void;
12
+ onFlip?(imgData: number[] | undefined): void;
13
+ onReset?(imgData: number[] | undefined): void;
14
+ onCancelCrop?(selectionData: {
15
+ x: number;
16
+ y: number;
17
+ width: number;
18
+ height: number;
19
+ }): void;
20
+ }
21
+ export interface RCropperActionHandlers {
22
+ handleCrop: () => Promise<void>;
23
+ handleZoomIn: () => void;
24
+ handleZoomOut: () => void;
25
+ handleRotateLeft: () => void;
26
+ handleRotateRight: () => void;
27
+ handleFlipX: () => void;
28
+ handleFlipY: () => void;
29
+ handleReset: () => void;
30
+ handleCancelCrop: () => void;
31
+ }
32
+ export interface RCropperRef {
33
+ cropper: Cropper | null;
34
+ image: CropperImage | null;
35
+ canvas: CropperCanvas | null;
36
+ selection: CropperSelection | null;
37
+ }
38
+ export interface RCropperProps extends RCropperEvents {
39
+ /**
40
+ * 图片的源地址
41
+ * @description 可以是本地图片路径或网络图片URL
42
+ */
43
+ src: string;
44
+ alt?: string;
45
+ className?: string;
46
+ style?: React.CSSProperties;
47
+ /**
48
+ * 拖拽模式
49
+ * @default 'crop'
50
+ * @description 'crop' - 裁剪模式, 'move' - 移动模式, 'none' - 禁用拖拽
51
+ */
52
+ dragMode?: 'crop' | 'move' | 'none';
53
+ grid?: RCropperGrid;
54
+ /**
55
+ * 裁剪区域的配置
56
+ * @description 可以设置裁剪区域的宽度、高度、纵横比等属性
57
+ */
58
+ selection?: RCropperSelection;
59
+ /**
60
+ * 图片的配置
61
+ * @description 可以设置图片的旋转、缩放、倾斜、平移等属性
62
+ */
63
+ image?: RCropperImage;
64
+ /**
65
+ * 画布的配置
66
+ * @description 可以设置画布的缩放步长、禁用状态等属性
67
+ */
68
+ canvas?: RCropperCanvas;
69
+ }
70
+ export declare type RCropperElement = CropperCanvas | CropperGrid | CropperSelection | CropperImage | CropperHandle | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ .toolbar {
2
+ display: flex;
3
+ background-color: rgba(0, 0, 0, 50%);
4
+ justify-content: center;
5
+ align-items: center;
6
+ color: #fff;
7
+
8
+ button {
9
+ background-color: transparent;
10
+ border-width: 0;
11
+ cursor: pointer;
12
+ display: flex;
13
+ align-items: center;
14
+ // width: 32px;
15
+ // height: 32px;
16
+
17
+ &:hover {
18
+ background-color: #0074d9;
19
+ }
20
+ }
21
+
22
+ .icon > path {
23
+ fill: #fff;
24
+ }
25
+ }
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export declare const CropIcon: React.FC<{
3
+ className?: string;
4
+ }>;
5
+ export declare const ZoomInIcon: React.FC<{
6
+ className?: string;
7
+ }>;
8
+ export declare const ZoomOutIcon: React.FC<{
9
+ className?: string;
10
+ }>;
11
+ export declare const FlipHIcon: React.FC<{
12
+ className?: string;
13
+ }>;
14
+ export declare const FlipVIcon: React.FC<{
15
+ className?: string;
16
+ }>;
17
+ export declare const RotateLeftIcon: React.FC<{
18
+ className?: string;
19
+ }>;
20
+ export declare const RotateRightIcon: React.FC<{
21
+ className?: string;
22
+ }>;
23
+ export declare const ResetIcon: React.FC<{
24
+ className?: string;
25
+ }>;
26
+ export declare const OkIcon: React.FC<{
27
+ className?: string;
28
+ }>;
@@ -0,0 +1,158 @@
1
+ import React from 'react';
2
+
3
+ // 所有图标统一使用24x24的尺寸
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ var iconSize = 24;
7
+
8
+ // 隐藏选区图标
9
+ export var CropIcon = function CropIcon(_ref) {
10
+ var className = _ref.className;
11
+ return /*#__PURE__*/_jsx("svg", {
12
+ className: className,
13
+ viewBox: "0 0 1024 1024",
14
+ version: "1.1",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ width: iconSize,
17
+ height: iconSize,
18
+ children: /*#__PURE__*/_jsx("path", {
19
+ d: "M832 760V250.5c0-8.5 3.4-16.6 9.4-22.6L1001 68.3c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L796.1 182.6c-6 6-14.1 9.4-22.6 9.4H264c-4.4 0-8-3.6-8-8V8c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v176c0 4.4-3.6 8-8 8H8c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h176c4.4 0 8 3.6 8 8v504c0 35.3 28.7 64 64 64h504c4.4 0 8 3.6 8 8v176c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V840c0-4.4 3.6-8 8-8h176c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H840c-4.4 0-8-3.6-8-8zM264 256h439.4c7.1 0 10.7 8.6 5.7 13.7L269.7 709.1c-5 5-13.7 1.5-13.7-5.7V264c0-4.4 3.6-8 8-8z m496 512H320.6c-7.1 0-10.7-8.6-5.7-13.7l439.4-439.4c5-5 13.7-1.5 13.7 5.7V760c0 4.4-3.6 8-8 8z"
20
+ })
21
+ });
22
+ };
23
+
24
+ // 放大图标 - 放大镜中间带加号
25
+ export var ZoomInIcon = function ZoomInIcon(_ref2) {
26
+ var className = _ref2.className;
27
+ return /*#__PURE__*/_jsx("svg", {
28
+ className: className,
29
+ viewBox: "0 0 1024 1024",
30
+ version: "1.1",
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ width: iconSize,
33
+ height: iconSize,
34
+ children: /*#__PURE__*/_jsx("path", {
35
+ d: "M415.146667 42.666667c205.824 0 372.906667 166.741333 372.906666 372.48 0 88.874667-31.274667 170.666667-83.2 234.666666L981.333333 925.866667 925.866667 981.333333l-276.053334-276.48a371.626667 371.626667 0 0 1-234.666666 83.2C209.408 788.053333 42.666667 620.970667 42.666667 415.146667A372.48 372.48 0 0 1 415.146667 42.666667z m294.4 372.48a294.4 294.4 0 1 0-588.757334 0.042666A294.4 294.4 0 0 0 709.546667 415.146667z m-256.426667-196.693334v156.586667h156.586667v78.08h-156.586667v156.586667H375.04v-156.586667H218.453333V375.04h156.586667V218.453333h78.08z"
36
+ })
37
+ });
38
+ };
39
+
40
+ // 缩小图标 - 放大镜中间带减号
41
+ export var ZoomOutIcon = function ZoomOutIcon(_ref3) {
42
+ var className = _ref3.className;
43
+ return /*#__PURE__*/_jsx("svg", {
44
+ className: className,
45
+ viewBox: "0 0 1024 1024",
46
+ version: "1.1",
47
+ xmlns: "http://www.w3.org/2000/svg",
48
+ width: iconSize,
49
+ height: iconSize,
50
+ children: /*#__PURE__*/_jsx("path", {
51
+ d: "M415.146667 42.666667c205.824 0 372.906667 166.741333 372.906666 372.48 0 88.874667-31.274667 170.666667-83.2 234.666666L981.333333 925.866667 925.866667 981.333333l-276.053334-276.48a371.626667 371.626667 0 0 1-234.666666 83.2C209.408 788.053333 42.666667 620.970667 42.666667 415.146667A372.48 372.48 0 0 1 415.146667 42.666667z m294.4 372.48a294.4 294.4 0 1 0-588.757334 0.042666A294.4 294.4 0 0 0 709.546667 415.146667zM218.453333 375.04h391.253334v78.08H218.453333V375.04z"
52
+ })
53
+ });
54
+ };
55
+
56
+ // 水平翻转图标
57
+ export var FlipHIcon = function FlipHIcon(_ref4) {
58
+ var className = _ref4.className;
59
+ return /*#__PURE__*/_jsx("svg", {
60
+ className: className,
61
+ viewBox: "0 0 1024 1024",
62
+ version: "1.1",
63
+ xmlns: "http://www.w3.org/2000/svg",
64
+ width: iconSize,
65
+ height: iconSize,
66
+ children: /*#__PURE__*/_jsx("path", {
67
+ d: "M809.984 917.952V832H896c0 46.016-40 86.016-86.016 86.016z m0-342.016V491.968H896v83.968h-86.016zM640 235.968V149.952h86.016v86.016H640z m169.984 512v-86.016H896v86.016h-86.016z m-339.968 256V64h84.032v939.968H470.016z m339.968-854.016c46.016 0 86.016 40.064 86.016 86.016h-86.016V149.952zM128 235.968c0-45.952 40-86.016 86.016-86.016H384v86.016H214.016V832H384v86.016H214.016C168 918.016 128 878.016 128 832V235.968z m681.984 169.984V320H896v86.016h-86.016z m-169.984 512V832h86.016v86.016H640z"
68
+ })
69
+ });
70
+ };
71
+
72
+ // 垂直翻转图标 - 与水平翻转保持一致,但方向不同
73
+ export var FlipVIcon = function FlipVIcon(_ref5) {
74
+ var className = _ref5.className;
75
+ return /*#__PURE__*/_jsx("svg", {
76
+ className: className,
77
+ viewBox: "0 0 1024 1024",
78
+ version: "1.1",
79
+ xmlns: "http://www.w3.org/2000/svg",
80
+ width: iconSize,
81
+ height: iconSize,
82
+ children: /*#__PURE__*/_jsx("path", {
83
+ d: "M106.048 809.984H192V896c-46.016 0-86.016-40-86.016-86.016z m342.016 0h83.968V896H448.064v-86.016zM788.032 640h86.016v86.016h-86.016V640z m-512 169.984h86.016V896H276.032v-86.016z m-256-339.968H960v84.032H20.032V470.016z m854.016 339.968c0 46.016-40.064 86.016-86.016 86.016v-86.016h86.016zM788.032 128c45.952 0 86.016 40 86.016 86.016V384h-86.016V214.016H192V384H105.984V214.016C105.984 168 145.984 128 192 128h596.032zM618.048 809.984H704V896H618.048v-86.016z m-512-169.984H192v86.016H106.048V640z"
84
+ })
85
+ });
86
+ };
87
+
88
+ // 向左旋转图标
89
+ export var RotateLeftIcon = function RotateLeftIcon(_ref6) {
90
+ var className = _ref6.className;
91
+ return /*#__PURE__*/_jsxs("svg", {
92
+ className: className,
93
+ viewBox: "0 0 1024 1024",
94
+ version: "1.1",
95
+ xmlns: "http://www.w3.org/2000/svg",
96
+ width: iconSize,
97
+ height: iconSize,
98
+ children: [/*#__PURE__*/_jsx("path", {
99
+ d: "M512 128a383.104 383.104 0 0 1 298.666667 142.506667V149.333333a21.290667 21.290667 0 1 1 42.666666 0v170.666667c0 11.733333-9.6 21.333333-21.333333 21.333333h-170.666667a21.333333 21.333333 0 1 1 0-42.666666h116.906667A340.394667 340.394667 0 0 0 512 170.666667a341.376 341.376 0 0 0 0 682.666666 341.205333 341.205333 0 0 0 340.48-320.426666 21.418667 21.418667 0 0 1 42.666667 2.56A383.957333 383.957333 0 0 1 128 512c0-212.053333 172.032-384 384-384z"
100
+ }), /*#__PURE__*/_jsx("path", {
101
+ d: "M123.733333 512c0-214.357333 173.781333-388.266667 388.138667-388.266667V128v-4.266667 4.266667-4.266667q88.832 0 168.405333 38.314667 78.634667 37.845333 133.546667 105.898667l-3.285333 2.688h-4.266667V149.333333h4.266667-4.266667a25.6 25.6 0 0 1 25.6-25.6V128v-4.266667a25.6 25.6 0 0 1 25.6 25.6h-4.266667 4.266667v170.666667h-4.266667 4.266667a25.6 25.6 0 0 1-25.6 25.6V341.333333v4.266667h-170.666667V341.333333v4.266667a25.6 25.6 0 0 1-25.557333-25.6h4.266667-4.266667a25.6 25.6 0 0 1 25.6-25.6V298.666667v-4.266667h117.077333V298.666667l-3.328 2.645333 3.328-2.645333-3.328 2.645333q-47.744-59.562667-116.266666-92.757333-69.376-33.578667-146.858667-33.578667V170.666667v4.266666A336.981333 336.981333 0 0 0 174.933333 512H170.666667h4.266666c0 186.112 150.869333 337.066667 336.938667 337.066667v4.266666-4.266666 4.266666-4.266666q65.792 0 126.293333-24.533334 58.581333-23.68 104.789334-67.157333 46.165333-43.434667 73.301333-100.394667 28.032-58.794667 32-124.16v-0.042666q0.682667-10.666667 8.618667-17.664 7.936-6.997333 18.517333-6.4l-0.256 4.266666 0.256-4.266666c14.08 0.853333 24.874667 13.013333 23.936 27.136l-4.266667-0.256 4.266667 0.256-4.266667-0.256 4.266667 0.256q-4.565333 75.349333-36.821333 143.104-31.274667 65.621333-84.48 115.669333-53.162667 50.133333-120.618667 77.44-69.76 28.202667-145.493333 28.202667V896v4.266667C297.386667 900.266667 123.733333 726.442667 123.733333 512H128h-4.266667z m8.533334 0c0 209.706667 169.898667 379.733333 379.605333 379.733333q74.154667 0 142.336-27.605333 65.962667-26.709333 118.016-75.690667 51.968-48.981333 82.56-113.152 31.573333-66.261333 36.010667-139.946666a16.981333 16.981333 0 0 0-15.914667-18.090667q-7.04-0.426667-12.373333 4.266667-5.290667 4.693333-5.76 11.818666l-4.266667-0.298666 4.266667 0.298666-4.266667-0.298666 4.266667 0.256q-4.053333 67.072-32.768 127.36-27.861333 58.368-75.178667 102.912-47.36 44.586667-107.392 68.906666-62.08 25.088-129.536 25.088A345.557333 345.557333 0 0 1 166.4 512c0-190.848 154.624-345.6 345.472-345.6q79.445333 0 150.613333 34.474667 70.229333 34.005333 119.168 95.146666l-3.328 6.912h-117.077333a17.066667 17.066667 0 1 0 0 34.133334h170.624a17.066667 17.066667 0 0 0 17.066667-17.066667v-170.666667a17.066667 17.066667 0 0 0-34.133334 0v121.301334l-7.594666 2.645333q-53.76-66.56-130.645334-103.552-77.824-37.461333-164.693333-37.461333C302.208 132.266667 132.266667 302.336 132.266667 512z m743.125333-3.242667l-0.256 4.266667 0.256-4.266667z m15.402667 26.538667l4.266666 0.298667-4.266666-0.256z m-83.584-261.973333l3.328-2.688h4.266666v12.074666l-7.594666-9.386666z m-28.885334 29.610666V298.666667l3.328-2.688 5.546667 6.954666h-8.874667z m69.930667 229.845334l4.266667 0.256-4.266667-0.256z"
102
+ })]
103
+ });
104
+ };
105
+
106
+ // 向右旋转图标
107
+ export var RotateRightIcon = function RotateRightIcon(_ref7) {
108
+ var className = _ref7.className;
109
+ return /*#__PURE__*/_jsxs("svg", {
110
+ className: className,
111
+ viewBox: "0 0 1024 1024",
112
+ version: "1.1",
113
+ xmlns: "http://www.w3.org/2000/svg",
114
+ width: iconSize,
115
+ height: iconSize,
116
+ children: [/*#__PURE__*/_jsx("path", {
117
+ d: "M192 128c11.818667 0 21.333333 9.514667 21.333333 21.333333v121.173334A383.104 383.104 0 0 1 512 128c211.968 0 384 171.946667 384 384s-172.032 384-384 384a383.957333 383.957333 0 0 1-383.146667-360.533333 21.333333 21.333333 0 1 1 42.666667-2.56A341.205333 341.205333 0 0 0 853.333333 512c0-188.544-152.917333-341.333333-341.333333-341.333333a340.394667 340.394667 0 0 0-266.24 128H362.666667a21.333333 21.333333 0 1 1 0 42.666666h-170.666667a21.376 21.376 0 0 1-21.333333-21.333333v-170.666667a21.333333 21.333333 0 0 1 21.333333-21.333333z"
118
+ }), /*#__PURE__*/_jsx("path", {
119
+ d: "M388.352 320a25.6 25.6 0 0 1-25.6 25.6V341.333333v4.266667H192.128V341.333333v4.266667a25.6 25.6 0 0 1-25.6-25.6h4.266667-4.266667v-170.666667h4.266667-4.266667a25.6 25.6 0 0 1 25.6-25.6V128v-4.266667a25.6 25.6 0 0 1 25.6 25.6h-4.266667 4.266667v121.301334h-4.266667l-3.328-2.688 3.328 2.688-3.328-2.688q54.954667-68.053333 133.546667-105.898667Q423.338667 123.733333 512.170667 123.733333V128v-4.266667c214.442667 0 388.138667 173.824 388.138666 388.266667H896h4.266667c0 214.357333-173.781333 388.266667-388.138667 388.266667V896v4.266667-4.266667 4.266667q-75.776 0-145.493333-28.245334-67.498667-27.306667-120.704-77.397333-53.162667-50.048-84.437334-115.669333-32.256-67.754667-36.821333-143.104l4.266667-0.256-4.266667 0.256a25.514667 25.514667 0 0 1 23.936-27.093334l0.256 4.266667-0.256-4.266667 0.256 4.266667-0.256-4.266667q10.581333-0.64 18.517333 6.4 7.936 6.997333 8.661334 17.621334 3.925333 65.408 31.957333 124.16 27.136 57.002667 73.301333 100.437333 46.208 43.477333 104.746667 67.157333 60.586667 24.490667 126.293333 24.490667v4.266667-4.266667A336.981333 336.981333 0 0 0 849.066667 512h4.266666-4.266666c0-186.112-150.826667-337.066667-336.938667-337.066667V170.666667v4.266666V170.666667v4.266666q-77.482667 0-146.858667 33.621334-68.522667 33.194667-116.266666 92.757333L245.674667 298.666667v-4.266667h117.077333V298.666667v-4.266667a25.6 25.6 0 0 1 25.6 25.6h-4.266667 4.266667z m-8.533333 0a17.066667 17.066667 0 0 0-17.066667-17.066667H245.674667l-3.328-6.954666q48.938667-61.098667 119.210666-95.104 71.125333-34.432 150.570667-34.432A345.557333 345.557333 0 0 1 857.6 512c0 190.848-154.624 345.6-345.472 345.6q-67.413333 0-129.536-25.173333-60.032-24.277333-107.392-68.864-47.36-44.544-75.178667-102.912-28.714667-60.288-32.768-127.36l4.266667-0.256-4.266667 0.256 4.266667-0.256-4.266667 0.298666q-0.426667-7.125333-5.76-11.818666-5.290667-4.693333-12.373333-4.266667a16.981333 16.981333 0 0 0-15.914667 18.048q4.437333 73.728 36.010667 139.946667 30.592 64.213333 82.56 113.194666 52.053333 48.981333 118.016 75.690667 68.181333 27.605333 142.336 27.605333c209.664 0 379.605333-170.069333 379.605333-379.733333 0-209.706667-169.898667-379.733333-379.605333-379.733333q-86.869333 0-164.693333 37.461333-76.885333 37.034667-130.645334 103.552l-7.594666-2.645333V149.333333a17.066667 17.066667 0 0 0-34.133334 0v170.666667a17.066667 17.066667 0 0 0 17.066667 17.066667h170.666667a17.066667 17.066667 0 0 0 17.024-17.066667zM242.346667 295.978667L245.674667 298.666667v4.266666H236.8l5.546667-6.954666z m-109.141334 239.36l-4.266666 0.256 4.266666-0.298667z m75.989334-264.704h4.266666l3.328 2.645333-7.594666 9.386667v-12.032z m-33.408 262.144l-4.266667 0.256 4.266667-0.256z"
120
+ })]
121
+ });
122
+ };
123
+
124
+ // 重置图标
125
+ export var ResetIcon = function ResetIcon(_ref8) {
126
+ var className = _ref8.className;
127
+ return /*#__PURE__*/_jsxs("svg", {
128
+ className: className,
129
+ viewBox: "0 0 1024 1024",
130
+ version: "1.1",
131
+ xmlns: "http://www.w3.org/2000/svg",
132
+ width: iconSize,
133
+ height: iconSize,
134
+ children: [/*#__PURE__*/_jsx("path", {
135
+ d: "M535.893333 128.853333a21.418667 21.418667 0 0 0-2.56 42.666667A341.077333 341.077333 0 0 1 853.333333 512a341.333333 341.333333 0 0 1-128 266.666667V661.333333a21.376 21.376 0 0 0-42.666666 0v170.666667a21.333333 21.333333 0 0 0 21.333333 21.333333h170.666667a21.333333 21.333333 0 0 0 0-42.666666h-121.173334A383.573333 383.573333 0 0 0 896 512c0-203.221333-158.293333-370.816-360.106667-383.146667zM320 170.666667h-170.666667a21.333333 21.333333 0 0 0 0 42.666666h121.173334A383.36 383.36 0 0 0 128 512c0 203.946667 159.232 372.053333 361.813333 383.573333a21.333333 21.333333 0 1 0 2.56-42.666666C312.32 842.666667 170.666667 693.248 170.666667 512c0-105.386667 48.128-202.24 128-266.24V362.666667a21.333333 21.333333 0 1 0 42.666666 0v-170.666667a21.333333 21.333333 0 0 0-21.333333-21.333333z"
136
+ }), /*#__PURE__*/_jsx("path", {
137
+ d: "M535.637333 133.12q-7.04-0.426667-12.373333 4.266667-5.290667 4.693333-5.717333 11.776-0.426667 7.082667 4.266666 12.373333 4.693333 5.290667 11.776 5.717333 66.986667 4.096 127.232 32.853334 58.368 27.818667 102.869334 75.093333 44.544 47.36 68.821333 107.349333Q857.6 444.586667 857.6 512q0 79.402667-34.474667 150.656-34.048 70.4-95.146666 119.338667l-6.912 5.546666V661.333333a17.066667 17.066667 0 0 0-34.133334 0v170.666667c0 9.386667 7.68 17.066667 17.066667 17.066667h170.666667a17.066667 17.066667 0 0 0 0-34.133334h-133.248l9.386666-7.594666-9.386666 7.594666 9.386666-7.594666q66.474667-53.717333 103.466667-130.645334 37.461333-77.909333 37.461333-164.693333 0-74.112-27.562666-142.250667Q837.461333 303.786667 788.48 251.733333q-48.938667-51.968-113.066667-82.602666-66.176-31.573333-139.818666-36.053334z m0.512-8.533333q75.306667 4.608 142.976 36.906666 65.578667 31.274667 115.626667 84.437334t77.312 120.618666Q900.266667 436.266667 900.266667 512q0 88.746667-38.314667 168.362667-37.845333 78.677333-105.813333 133.632L753.493333 810.666667l2.688 3.328L753.493333 810.666667v-4.266667h121.173334a25.6 25.6 0 1 1 0 51.2h-170.666667a25.6 25.6 0 0 1-25.6-25.6v-170.666667a25.6 25.6 0 1 1 51.2 0v117.333334H725.333333l-2.688-3.328q59.562667-47.701333 92.8-116.394667 33.621333-69.504 33.621334-146.944 0-65.749333-24.448-126.293333-23.68-58.453333-67.157334-104.661334-43.392-46.08-100.266666-73.258666-58.794667-28.032-124.16-32-10.538667-0.682667-17.578667-8.576-7.082667-7.936-6.4-18.56 0.597333-10.581333 8.533333-17.621334 7.978667-7.082667 18.56-6.4zM320 174.933333h-170.666667a17.066667 17.066667 0 0 0 0 34.133334h133.248l-9.386666 7.594666 9.386666-7.594666-9.386666 7.594666q-66.474667 53.76-103.466667 130.602667Q132.266667 425.130667 132.266667 512q0 74.325333 27.733333 142.72 26.837333 66.176 76.032 118.272 49.194667 52.053333 113.621333 82.602667 66.517333 31.530667 140.373334 35.712a17.194667 17.194667 0 0 0 18.133333-16q0.426667-7.082667-4.309333-12.416-4.693333-5.333333-11.733334-5.717334-67.242667-3.84-127.786666-32.512-58.666667-27.733333-103.424-75.136-44.8-47.445333-69.248-107.648Q166.4 579.626667 166.4 512q0-79.445333 34.474667-150.485333 34.005333-70.101333 95.146666-119.082667l6.912-5.546667V362.666667a17.066667 17.066667 0 0 0 34.133334 0v-170.666667a17.066667 17.066667 0 0 0-17.066667-17.066667z m0-8.533333a25.6 25.6 0 0 1 25.6 25.6v170.666667a25.6 25.6 0 0 1-51.2 0V245.76H298.666667l2.688 3.328Q241.706667 296.874667 208.554667 365.226667 174.933333 434.517333 174.933333 512q0 65.962667 24.618667 126.677333 23.850667 58.709333 67.541333 104.96t100.864 73.301334q59.050667 27.989333 124.672 31.701333 10.538667 0.597333 17.621334 8.576 7.04 7.978667 6.4 18.517333a25.685333 25.685333 0 0 1-27.093334 24.106667q-75.52-4.266667-143.573333-36.522667-65.877333-31.232-116.138667-84.48-50.346667-53.248-77.738666-120.917333Q123.733333 588.032 123.733333 512q0-88.832 38.314667-168.405333 37.802667-78.592 105.813333-133.546667L270.506667 213.333333l-2.688-3.328L270.506667 213.333333v4.266667H149.333333a25.6 25.6 0 0 1 0-51.2h170.666667z"
138
+ })]
139
+ });
140
+ };
141
+
142
+ // 确认/裁剪图标
143
+ export var OkIcon = function OkIcon(_ref9) {
144
+ var className = _ref9.className;
145
+ return /*#__PURE__*/_jsxs("svg", {
146
+ className: className,
147
+ viewBox: "0 0 1024 1024",
148
+ version: "1.1",
149
+ xmlns: "http://www.w3.org/2000/svg",
150
+ width: iconSize,
151
+ height: iconSize,
152
+ children: [/*#__PURE__*/_jsx("path", {
153
+ d: "M874.496 223.146667c14.421333-15.616 21.376-31.146667 42.666667-9.813334 21.333333 21.333333 24.618667 26.197333 10.24 41.813334L411.562667 840.106667a35.242667 35.242667 0 0 1-52.48 0l-209.92-243.626667c-14.336-15.616-14.336-26.624 0-42.24 14.464-15.616 28.245333-15.616 42.666666 0l192 213.76 490.666667-544.853333z"
154
+ }), /*#__PURE__*/_jsx("path", {
155
+ d: "M193.450667 552.789333l192 213.76-1.621334 1.450667-1.578666-1.450667 490.666666-544.853333q2.005333-2.133333 5.632-6.4 5.376-6.229333 8.021334-8.661333 4.522667-4.181333 8.789333-5.376 10.026667-2.773333 23.338667 10.538666L917.162667 213.333333l1.536-1.536-1.536 1.536 1.536-1.536q9.088 9.173333 12.714666 13.525334 4.992 5.973333 6.314667 10.453333 1.450667 5.034667-0.938667 10.154667-2.005333 4.309333-7.808 10.666666l-1.578666-1.450666 1.621333 1.408-515.84 584.96a37.76 37.76 0 0 1-55.637333 0h-0.085334l-209.92-243.626667 1.621334-1.408-1.536 1.450667 1.536-1.450667-1.536 1.450667q-11.349333-12.373333-11.349334-22.613334 0-10.24 11.349334-22.528 11.434667-12.373333 22.869333-12.373333 11.477333 0 22.912 12.373333z m-3.2 2.858667l1.578666-1.408-1.536 1.450667q-10.24-11.050667-19.797333-11.050667-9.557333 0-19.754667 11.050667l-1.578666-1.450667 1.578666 1.450667-1.578666-1.450667 1.578666 1.450667q-10.197333 11.093333-10.197333 19.626666 0 8.618667 10.24 19.712v0.042667l209.92 243.626667-1.621333 1.408 1.578666-1.450667a33.536 33.536 0 0 0 49.365334 0l1.536 1.450667-1.578667-1.408 515.84-584.96v-0.042667q5.376-5.845333 7.082667-9.557333 1.706667-3.669333 0.725333-7.168-1.706667-5.845333-17.962667-22.144-11.52-11.562667-19.2-9.429334-3.242667 0.853333-7.04 4.352-2.432 2.304-7.68 8.362667-3.626667 4.266667-5.674666 6.485333l-1.578667-1.450666 1.578667 1.450666-1.578667-1.450666 1.621333 1.408-490.666666 544.853333h-3.2l-192-213.76z m3.2-2.858667l-1.621334 1.450667 1.578667-1.450667z m188.8 216.618667L383.829333 768l1.578667 1.408-1.578667 1.792-1.578666-1.792z m-231.466667-174.336l-1.621333 1.408 1.578666-1.450667 0.042667 0.042667z m-3.157333-42.282667l1.536 1.450667-1.536-1.450667z m778.24-299.093333l1.536 1.450667-1.578667-1.408v-0.042667zM357.461333 841.472l1.621334-1.365333-1.536 1.450666h-0.042667v-0.085333zM872.96 221.696l1.536 1.450667-1.578667-1.450667zM413.141333 841.557333l-1.578666-1.450666 1.621333 1.408z"
156
+ })]
157
+ });
158
+ };
@@ -0,0 +1,5 @@
1
+ import './styles/toolbar.less';
2
+ declare const Toolbar: ({ onAction }: {
3
+ onAction: any;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default Toolbar;
@@ -0,0 +1,84 @@
1
+ import { CropIcon, ZoomInIcon, ZoomOutIcon, FlipHIcon, FlipVIcon, RotateLeftIcon, RotateRightIcon, ResetIcon, OkIcon } from "./svgIcons";
2
+ import "./styles/toolbar.less";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ var Toolbar = function Toolbar(_ref) {
6
+ var onAction = _ref.onAction;
7
+ var handleCancelCrop = onAction.handleCancelCrop,
8
+ handleCrop = onAction.handleCrop,
9
+ handleZoomIn = onAction.handleZoomIn,
10
+ handleZoomOut = onAction.handleZoomOut,
11
+ handleRotateLeft = onAction.handleRotateLeft,
12
+ handleRotateRight = onAction.handleRotateRight,
13
+ handleReset = onAction.handleReset,
14
+ handleFlipX = onAction.handleFlipX,
15
+ handleFlipY = onAction.handleFlipY;
16
+ return /*#__PURE__*/_jsxs("div", {
17
+ className: "toolbar",
18
+ children: [/*#__PURE__*/_jsx("button", {
19
+ type: "button",
20
+ onClick: handleCancelCrop,
21
+ title: "\u9690\u85CF\u9009\u533A",
22
+ children: /*#__PURE__*/_jsx(CropIcon, {
23
+ className: "icon"
24
+ })
25
+ }), /*#__PURE__*/_jsx("button", {
26
+ type: "button",
27
+ onClick: handleZoomIn,
28
+ title: "\u653E\u5927",
29
+ children: /*#__PURE__*/_jsx(ZoomInIcon, {
30
+ className: "icon"
31
+ })
32
+ }), /*#__PURE__*/_jsx("button", {
33
+ type: "button",
34
+ onClick: handleZoomOut,
35
+ title: "\u7F29\u5C0F",
36
+ children: /*#__PURE__*/_jsx(ZoomOutIcon, {
37
+ className: "icon"
38
+ })
39
+ }), /*#__PURE__*/_jsx("button", {
40
+ type: "button",
41
+ onClick: handleFlipX,
42
+ title: "\u6C34\u5E73\u7FFB\u8F6C",
43
+ children: /*#__PURE__*/_jsx(FlipHIcon, {
44
+ className: "icon"
45
+ })
46
+ }), /*#__PURE__*/_jsx("button", {
47
+ type: "button",
48
+ onClick: handleFlipY,
49
+ title: "\u5782\u76F4\u7FFB\u8F6C",
50
+ children: /*#__PURE__*/_jsx(FlipVIcon, {
51
+ className: "icon"
52
+ })
53
+ }), /*#__PURE__*/_jsx("button", {
54
+ type: "button",
55
+ onClick: handleRotateLeft,
56
+ title: "\u5411\u5DE6\u65CB\u8F6C",
57
+ children: /*#__PURE__*/_jsx(RotateLeftIcon, {
58
+ className: "icon"
59
+ })
60
+ }), /*#__PURE__*/_jsx("button", {
61
+ type: "button",
62
+ onClick: handleRotateRight,
63
+ title: "\u5411\u53F3\u65CB\u8F6C",
64
+ children: /*#__PURE__*/_jsx(RotateRightIcon, {
65
+ className: "icon"
66
+ })
67
+ }), /*#__PURE__*/_jsx("button", {
68
+ type: "button",
69
+ onClick: handleReset,
70
+ title: "\u91CD\u7F6E",
71
+ children: /*#__PURE__*/_jsx(ResetIcon, {
72
+ className: "icon"
73
+ })
74
+ }), /*#__PURE__*/_jsx("button", {
75
+ type: "button",
76
+ onClick: handleCrop,
77
+ title: "\u88C1\u526A",
78
+ children: /*#__PURE__*/_jsx(OkIcon, {
79
+ className: "icon"
80
+ })
81
+ })]
82
+ });
83
+ };
84
+ export default Toolbar;
@@ -1,6 +1,10 @@
1
- import { Props } from 'react-wordcloud';
2
- export declare type WordCloudProps = Props & {
1
+ import WordCloud2 from 'wordcloud';
2
+ export declare type WordCloudProps = {
3
+ list: WordCloud2.Options['list'];
3
4
  className?: string;
5
+ tooltip?: boolean;
6
+ onClick?: WordCloud2.EventCallback;
7
+ options?: Partial<Omit<WordCloud2.Options, 'list' | 'hover' | 'click'>>;
4
8
  };
5
9
  declare const WordCloud: (props: WordCloudProps) => import("react/jsx-runtime").JSX.Element;
6
10
  export default WordCloud;