deepsea-components 5.15.22 → 5.15.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 (79) hide show
  1. package/README.md +23 -23
  2. package/dist/components/AutoFit.cjs +7 -7
  3. package/dist/components/AutoFit.js +30 -30
  4. package/dist/components/AutoScroll.cjs +7 -7
  5. package/dist/components/AutoScroll.js +30 -30
  6. package/dist/components/AutoSizeTextarea.cjs +4 -4
  7. package/dist/components/AutoSizeTextarea.js +17 -17
  8. package/dist/components/CircleText.js +4 -4
  9. package/dist/components/CopyButton.cjs +2 -2
  10. package/dist/components/CopyButton.js +13 -14
  11. package/dist/components/Echart.cjs +2 -2
  12. package/dist/components/Echart.js +12 -12
  13. package/dist/components/Flow.cjs +19 -19
  14. package/dist/components/Flow.js +44 -44
  15. package/dist/components/FormLabel.cjs +3 -3
  16. package/dist/components/FormLabel.js +9 -9
  17. package/dist/components/HlsPlayer.js +10 -10
  18. package/dist/components/IconFileType.cjs +4 -4
  19. package/dist/components/IconFileType.js +9 -9
  20. package/dist/components/InfiniteScroll.cjs +13 -13
  21. package/dist/components/InfiniteScroll.js +32 -32
  22. package/dist/components/InputFile.js +4 -4
  23. package/dist/components/InputFileButton.js +11 -11
  24. package/dist/components/LoopSwiper.cjs +33 -33
  25. package/dist/components/LoopSwiper.js +47 -47
  26. package/dist/components/ReadExcel.js +2 -2
  27. package/dist/components/ReadSheet.js +5 -5
  28. package/dist/components/Ring.js +4 -4
  29. package/dist/components/Scroll.cjs +15 -15
  30. package/dist/components/Scroll.js +32 -33
  31. package/dist/components/ScrollMask.js +13 -13
  32. package/dist/components/ScrollMask.module.cjs +2 -2
  33. package/dist/components/ScrollMask.module.js +2 -2
  34. package/dist/components/SectionRing.js +6 -6
  35. package/dist/components/Skeleton.cjs +17 -17
  36. package/dist/components/Skeleton.js +23 -23
  37. package/dist/components/Title.js +12 -12
  38. package/dist/components/TransitionBox.js +10 -10
  39. package/dist/components/TransitionNum.cjs +1 -1
  40. package/dist/components/TransitionNum.js +12 -12
  41. package/dist/components/Trapezium.cjs +4 -4
  42. package/dist/components/Trapezium.js +14 -14
  43. package/dist/components/Unify.js +10 -10
  44. package/dist/components/WriteExcel.js +2 -2
  45. package/dist/components/WriteSheet.js +4 -4
  46. package/dist/utils/getReactVersion.js +2 -2
  47. package/package.json +6 -5
  48. package/src/components/AutoFit.tsx +104 -104
  49. package/src/components/AutoScroll.tsx +150 -150
  50. package/src/components/AutoSizeTextarea.tsx +50 -50
  51. package/src/components/CircleText.tsx +81 -81
  52. package/src/components/CopyButton.tsx +31 -31
  53. package/src/components/Echart.tsx +69 -69
  54. package/src/components/Flow.tsx +271 -271
  55. package/src/components/FormLabel.tsx +41 -41
  56. package/src/components/HlsPlayer.tsx +34 -34
  57. package/src/components/IconFileType.tsx +162 -162
  58. package/src/components/InfiniteScroll.tsx +163 -163
  59. package/src/components/InputFile.tsx +93 -93
  60. package/src/components/InputFileButton.tsx +122 -122
  61. package/src/components/LoopSwiper.tsx +125 -125
  62. package/src/components/ReadExcel.tsx +13 -13
  63. package/src/components/ReadSheet.tsx +17 -17
  64. package/src/components/Ring.tsx +30 -30
  65. package/src/components/Scroll.tsx +97 -97
  66. package/src/components/ScrollMask.module.css +87 -87
  67. package/src/components/ScrollMask.tsx +68 -68
  68. package/src/components/SectionRing.tsx +40 -40
  69. package/src/components/Skeleton.tsx +45 -45
  70. package/src/components/Title.tsx +27 -27
  71. package/src/components/TransitionBox.tsx +44 -44
  72. package/src/components/TransitionNum.tsx +54 -54
  73. package/src/components/Trapezium.tsx +60 -60
  74. package/src/components/Unify.tsx +38 -38
  75. package/src/components/WriteExcel.tsx +13 -13
  76. package/src/components/WriteSheet.tsx +25 -25
  77. package/src/utils/getReactVersion.ts +7 -7
  78. package/src/utils/index.ts +33 -33
  79. package/tsconfig.json +16 -16
package/README.md CHANGED
@@ -1,23 +1,23 @@
1
- # deepsea-components
2
-
3
- [![NPM version](https://img.shields.io/npm/v/deepsea-components.svg?style=flat)](https://npmjs.org/package/deepsea-components)
4
- [![NPM downloads](http://img.shields.io/npm/dm/deepsea-components.svg?style=flat)](https://npmjs.org/package/deepsea-components)
5
-
6
- ## Install
7
-
8
- ```bash
9
- $ yarn install
10
- ```
11
-
12
- ```bash
13
- $ npm run dev
14
- $ npm run build
15
- ```
16
-
17
- ## Options
18
-
19
- TODO
20
-
21
- ## LICENSE
22
-
23
- MIT
1
+ # deepsea-components
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/deepsea-components.svg?style=flat)](https://npmjs.org/package/deepsea-components)
4
+ [![NPM downloads](http://img.shields.io/npm/dm/deepsea-components.svg?style=flat)](https://npmjs.org/package/deepsea-components)
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ $ yarn install
10
+ ```
11
+
12
+ ```bash
13
+ $ npm run dev
14
+ $ npm run build
15
+ ```
16
+
17
+ ## Options
18
+
19
+ TODO
20
+
21
+ ## LICENSE
22
+
23
+ MIT
@@ -80,7 +80,7 @@ const AutoFit = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((pr
80
80
  const parent = ele.current?.parentElement;
81
81
  if (!parent) return;
82
82
  const style = getComputedStyle(parent);
83
- if ("static" === style.position) console.warn("AutoFit 组件的父元素的 position 属性不应该是 static");
83
+ if ("static" === style.position) console.warn("AutoFit \u7EC4\u4EF6\u7684\u7236\u5143\u7D20\u7684 position \u5C5E\u6027\u4E0D\u5E94\u8BE5\u662F static");
84
84
  }, [
85
85
  ele.current?.parentElement
86
86
  ]);
@@ -92,12 +92,12 @@ const AutoFit = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((pr
92
92
  });
93
93
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
94
94
  ref: ele,
95
- className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
96
- position: absolute;
97
- transform: var(--transform);
98
- transform-origin: top left;
99
- width: var(--width);
100
- height: var(--height);
95
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
96
+ position: absolute;
97
+ transform: var(--transform);
98
+ transform-origin: top left;
99
+ width: var(--width);
100
+ height: var(--height);
101
101
  `, className),
102
102
  style: (0, index_cjs_namespaceObject.transformCSSVariable)({
103
103
  transform,
@@ -1,20 +1,20 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
7
- const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx } from "deepsea-tools";
5
+ import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
6
+ import { px, transformCSSVariable } from "../utils/index.js";
7
+ const AutoFit = /*#__PURE__*/ forwardRef((props, ref)=>{
8
8
  const { width: designWidth = 1920, height: designHeight = 1080, direction, className, style, ...rest } = props;
9
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
10
- const [show, setShow] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
11
- const [transform, setTransform] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
12
- const [width, setWidth] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
13
- const [height, setHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
14
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, [
9
+ const ele = useRef(null);
10
+ const [show, setShow] = useState(false);
11
+ const [transform, setTransform] = useState(void 0);
12
+ const [width, setWidth] = useState(void 0);
13
+ const [height, setHeight] = useState(void 0);
14
+ useImperativeHandle(ref, ()=>ele.current, [
15
15
  ele.current
16
16
  ]);
17
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
17
+ useLayoutEffect(()=>{
18
18
  const element = ele.current;
19
19
  const parent = element?.parentElement;
20
20
  if (!element || !parent) return;
@@ -24,18 +24,18 @@ const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(
24
24
  if ("horizontal" === direction) {
25
25
  const scale = contentRect.width / designWidth;
26
26
  setTransform(`scale(${scale})`);
27
- setWidth((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designWidth));
28
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(contentRect.height / scale));
27
+ setWidth(px(designWidth));
28
+ setHeight(px(contentRect.height / scale));
29
29
  } else if ("vertical" === direction) {
30
30
  const scale = contentRect.height / designHeight;
31
31
  setTransform(`scale(${scale})`);
32
- setWidth((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(contentRect.width / scale));
33
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designHeight));
32
+ setWidth(px(contentRect.width / scale));
33
+ setHeight(px(designHeight));
34
34
  } else {
35
35
  const scale = Math.min(contentRect.width / designWidth, contentRect.height / designHeight);
36
36
  setTransform(`translateX(${(contentRect.width - designWidth * scale) / 2}px) translateY(${(contentRect.height - designHeight * scale) / 2}px) scale(${scale})`);
37
- setWidth((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designWidth));
38
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designHeight));
37
+ setWidth(px(designWidth));
38
+ setHeight(px(designHeight));
39
39
  }
40
40
  setShow(true);
41
41
  }
@@ -48,30 +48,30 @@ const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(
48
48
  designHeight,
49
49
  direction
50
50
  ]);
51
- if ("development" === process.env.NODE_ENV) (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
51
+ if ("development" === process.env.NODE_ENV) useEffect(()=>{
52
52
  const parent = ele.current?.parentElement;
53
53
  if (!parent) return;
54
54
  const style = getComputedStyle(parent);
55
- if ("static" === style.position) console.warn("AutoFit 组件的父元素的 position 属性不应该是 static");
55
+ if ("static" === style.position) console.warn("AutoFit \u7EC4\u4EF6\u7684\u7236\u5143\u7D20\u7684 position \u5C5E\u6027\u4E0D\u5E94\u8BE5\u662F static");
56
56
  }, [
57
57
  ele.current?.parentElement
58
58
  ]);
59
- if (!show) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
59
+ if (!show) return /*#__PURE__*/ jsx("div", {
60
60
  ref: ele,
61
61
  style: {
62
62
  display: "none"
63
63
  }
64
64
  });
65
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
65
+ return /*#__PURE__*/ jsx("div", {
66
66
  ref: ele,
67
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
68
- position: absolute;
69
- transform: var(--transform);
70
- transform-origin: top left;
71
- width: var(--width);
72
- height: var(--height);
67
+ className: clsx(css`
68
+ position: absolute;
69
+ transform: var(--transform);
70
+ transform-origin: top left;
71
+ width: var(--width);
72
+ height: var(--height);
73
73
  `, className),
74
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
74
+ style: transformCSSVariable({
75
75
  transform,
76
76
  width,
77
77
  height
@@ -101,13 +101,13 @@ const AutoScroll = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
101
101
  onMouseLeave: onContainerMouseLeave,
102
102
  ...rest,
103
103
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
104
- className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
105
- display: flex;
106
- flex-direction: column;
107
- gap: var(--gap, 0);
108
- & > * {
109
- flex: none;
110
- }
104
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
105
+ display: flex;
106
+ flex-direction: column;
107
+ gap: var(--gap, 0);
108
+ & > * {
109
+ flex: none;
110
+ }
111
111
  `, containerClassName),
112
112
  style: (0, index_cjs_namespaceObject.transformCSSVariable)({
113
113
  gap: (0, index_cjs_namespaceObject.px)(gap)
@@ -1,31 +1,31 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__ from "soda-hooks";
7
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
8
- import * as __WEBPACK_EXTERNAL_MODULE__Scroll_js_70befd9e__ from "./Scroll.js";
9
- const AutoScroll = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx, getArray } from "deepsea-tools";
5
+ import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
6
+ import { useSize } from "soda-hooks";
7
+ import { px, transformCSSVariable } from "../utils/index.js";
8
+ import { Scroll } from "./Scroll.js";
9
+ const AutoScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
10
10
  const { count, itemHeight, animation = 1000, duration = 3000, onMouseEnter, onMouseLeave, gap = 0, containerClassName, containerStyle, children, playOnMouseEnter, scrollbar, paused, ...rest } = props;
11
- const bar = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
12
- const timeout = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(void 0);
13
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
14
- const size = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useSize)(ele);
15
- const pausedRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(false);
16
- const pausedProps = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(paused);
11
+ const bar = useRef(null);
12
+ const timeout = useRef(void 0);
13
+ const ele = useRef(null);
14
+ const size = useSize(ele);
15
+ const pausedRef = useRef(false);
16
+ const pausedProps = useRef(paused);
17
17
  pausedProps.current = paused;
18
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, []);
19
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(scrollbar, ()=>bar.current, []);
20
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
18
+ useImperativeHandle(ref, ()=>ele.current, []);
19
+ useImperativeHandle(scrollbar, ()=>bar.current, []);
20
+ useEffect(()=>{
21
21
  if (playOnMouseEnter) pausedRef.current = false;
22
22
  }, [
23
23
  playOnMouseEnter
24
24
  ]);
25
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
25
+ useEffect(()=>{
26
26
  if (!size || 0 === count) return;
27
27
  const { height } = size;
28
- const range = (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.getArray)(count, (index)=>(itemHeight + gap) * (index + 1) - (index === count - 1 ? gap : 0));
28
+ const range = getArray(count, (index)=>(itemHeight + gap) * (index + 1) - (index === count - 1 ? gap : 0));
29
29
  const scrollHeight = range[range.length - 1];
30
30
  if (height >= scrollHeight) return;
31
31
  function scroll(target) {
@@ -66,23 +66,23 @@ const AutoScroll = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRe
66
66
  pausedRef.current = false;
67
67
  onMouseLeave?.(e);
68
68
  }
69
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Scroll_js_70befd9e__.Scroll, {
69
+ return /*#__PURE__*/ jsx(Scroll, {
70
70
  ref: ele,
71
71
  scrollbar: bar,
72
72
  onMouseEnter: onContainerMouseEnter,
73
73
  onMouseLeave: onContainerMouseLeave,
74
74
  ...rest,
75
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
76
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
77
- display: flex;
78
- flex-direction: column;
79
- gap: var(--gap, 0);
80
- & > * {
81
- flex: none;
82
- }
75
+ children: /*#__PURE__*/ jsx("div", {
76
+ className: clsx(css`
77
+ display: flex;
78
+ flex-direction: column;
79
+ gap: var(--gap, 0);
80
+ & > * {
81
+ flex: none;
82
+ }
83
83
  `, containerClassName),
84
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
85
- gap: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(gap)
84
+ style: transformCSSVariable({
85
+ gap: px(gap)
86
86
  }, containerStyle),
87
87
  children: children
88
88
  })
@@ -53,10 +53,10 @@ const AutoSizeTextArea = /*#__PURE__*/ (0, external_react_namespaceObject.forwar
53
53
  }, []);
54
54
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
55
55
  ref: ele,
56
- className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
57
- height: var(--height);
58
- resize: none;
59
- overflow-y: hidden;
56
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
57
+ height: var(--height);
58
+ resize: none;
59
+ overflow-y: hidden;
60
60
  `, className),
61
61
  style: (0, index_cjs_namespaceObject.transformCSSVariable)({
62
62
  height
@@ -1,19 +1,19 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
7
- const AutoSizeTextArea = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx } from "deepsea-tools";
5
+ import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
6
+ import { px, transformCSSVariable } from "../utils/index.js";
7
+ const AutoSizeTextArea = /*#__PURE__*/ forwardRef((props, ref)=>{
8
8
  const { className, style, ...rest } = props;
9
- const [height, setHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
10
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
11
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, []);
12
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
9
+ const [height, setHeight] = useState(void 0);
10
+ const ele = useRef(null);
11
+ useImperativeHandle(ref, ()=>ele.current, []);
12
+ useLayoutEffect(()=>{
13
13
  const textarea = ele.current;
14
14
  function resizeTextarea() {
15
15
  setHeight("auto");
16
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
16
+ setHeight(px(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
17
17
  }
18
18
  resizeTextarea();
19
19
  textarea.addEventListener("input", resizeTextarea);
@@ -23,14 +23,14 @@ const AutoSizeTextArea = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.for
23
23
  textarea.removeEventListener("change", resizeTextarea);
24
24
  };
25
25
  }, []);
26
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("textarea", {
26
+ return /*#__PURE__*/ jsx("textarea", {
27
27
  ref: ele,
28
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
29
- height: var(--height);
30
- resize: none;
31
- overflow-y: hidden;
28
+ className: clsx(css`
29
+ height: var(--height);
30
+ resize: none;
31
+ overflow-y: hidden;
32
32
  `, className),
33
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
33
+ style: transformCSSVariable({
34
34
  height
35
35
  }, style),
36
36
  ...rest
@@ -1,6 +1,6 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Fragment } from "react";
4
4
  const CircleText = (props)=>{
5
5
  const { width, height, radius, startAngel = 0, gapAngel = 0, align = "center", style, direction = "outer", reverse = false, separator, children, ...rest } = props;
6
6
  const unitAngle = 2 * Math.atan(width / 2 / radius);
@@ -15,8 +15,8 @@ const CircleText = (props)=>{
15
15
  }
16
16
  const words = "function" == typeof separator ? separator(children) : children.split(separator ?? "");
17
17
  if (reverse) words.reverse();
18
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, {
19
- children: words.map((w, idx)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
18
+ return /*#__PURE__*/ jsx(Fragment, {
19
+ children: words.map((w, idx)=>/*#__PURE__*/ jsx("span", {
20
20
  style: {
21
21
  position: "absolute",
22
22
  ...style,
@@ -34,8 +34,8 @@ var __webpack_require__ = {};
34
34
  var __webpack_exports__ = {};
35
35
  __webpack_require__.r(__webpack_exports__);
36
36
  __webpack_require__.d(__webpack_exports__, {
37
- Event: ()=>external_clipboard_namespaceObject.Event,
38
- CopyButton: ()=>CopyButton
37
+ CopyButton: ()=>CopyButton,
38
+ Event: ()=>external_clipboard_namespaceObject.Event
39
39
  });
40
40
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
41
41
  const external_clipboard_namespaceObject = require("clipboard");
@@ -1,27 +1,26 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_clipboard__ from "clipboard";
4
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
5
- import * as __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__ from "soda-hooks";
6
- const CopyButton = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import clipboard_0, { Event } from "clipboard";
4
+ import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
5
+ import { useLatest } from "soda-hooks";
6
+ const CopyButton = /*#__PURE__*/ forwardRef((props, ref)=>{
7
7
  const { text, onCopySuccess: _onCoptSuccess, onCopyError: _onCopyError, ...rest } = props;
8
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
9
- const onCopySuccess = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useLatest)(_onCoptSuccess);
10
- const onCopyError = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useLatest)(_onCopyError);
11
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, [
8
+ const ele = useRef(null);
9
+ const onCopySuccess = useLatest(_onCoptSuccess);
10
+ const onCopyError = useLatest(_onCopyError);
11
+ useImperativeHandle(ref, ()=>ele.current, [
12
12
  ele.current
13
13
  ]);
14
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
15
- const clipboard = new __WEBPACK_EXTERNAL_MODULE_clipboard__["default"](ele.current);
14
+ useEffect(()=>{
15
+ const clipboard = new clipboard_0(ele.current);
16
16
  clipboard.on("success", (event)=>onCopySuccess.current?.(event));
17
17
  clipboard.on("error", (event)=>onCopyError.current?.(event));
18
18
  return ()=>clipboard.destroy();
19
19
  }, []);
20
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
20
+ return /*#__PURE__*/ jsx("button", {
21
21
  ref: ele,
22
22
  ...rest,
23
23
  "data-clipboard-text": text
24
24
  });
25
25
  });
26
- var __webpack_exports__Event = __WEBPACK_EXTERNAL_MODULE_clipboard__.Event;
27
- export { CopyButton, __webpack_exports__Event as Event };
26
+ export { CopyButton, Event };
@@ -26,8 +26,8 @@ var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
28
  Pie: ()=>Pie,
29
- Bar: ()=>Bar,
30
- Line: ()=>Line
29
+ Line: ()=>Line,
30
+ Bar: ()=>Bar
31
31
  });
32
32
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
33
  const external_echarts_namespaceObject = require("echarts");
@@ -1,29 +1,29 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_echarts__ from "echarts";
4
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
5
- const Echart = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { init } from "echarts";
4
+ import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
5
+ const Echart = /*#__PURE__*/ forwardRef((props, ref)=>{
6
6
  const { width, height, option, chart, ...rest } = props;
7
- const container = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
8
- const chartRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
9
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
7
+ const container = useRef(null);
8
+ const chartRef = useRef(null);
9
+ useLayoutEffect(()=>{
10
10
  const ele = container.current;
11
- chartRef.current = (0, __WEBPACK_EXTERNAL_MODULE_echarts__.init)(ele, option, {
11
+ chartRef.current = init(ele, option, {
12
12
  width,
13
13
  height
14
14
  });
15
15
  return ()=>chartRef.current?.dispose();
16
16
  }, []);
17
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>container.current, []);
18
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(chart, ()=>chartRef.current, []);
19
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
17
+ useImperativeHandle(ref, ()=>container.current, []);
18
+ useImperativeHandle(chart, ()=>chartRef.current, []);
19
+ useEffect(()=>{
20
20
  chartRef.current?.setOption(option);
21
21
  chartRef.current?.resize({
22
22
  width,
23
23
  height
24
24
  });
25
25
  });
26
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
26
+ return /*#__PURE__*/ jsx("div", {
27
27
  ref: container,
28
28
  ...rest
29
29
  });
@@ -25,10 +25,10 @@ var __webpack_require__ = {};
25
25
  var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
- Flow: ()=>Flow,
29
- getGapCountAndSize: ()=>getGapCountAndSize,
30
28
  getGapRange: ()=>getGapRange,
31
- ManualFlow: ()=>ManualFlow
29
+ getGapCountAndSize: ()=>getGapCountAndSize,
30
+ ManualFlow: ()=>ManualFlow,
31
+ Flow: ()=>Flow
32
32
  });
33
33
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
34
  const css_namespaceObject = require("@emotion/css");
@@ -137,24 +137,24 @@ function ManualFlow(props) {
137
137
  ]);
138
138
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
139
139
  ref: ele,
140
- className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
141
- position: relative;
142
- height: var(--height);
143
- overflow: hidden;
140
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
141
+ position: relative;
142
+ height: var(--height);
143
+ overflow: hidden;
144
144
  `, className),
145
145
  style: (0, index_cjs_namespaceObject.transformCSSVariable)({
146
146
  height: (0, index_cjs_namespaceObject.px)(height)
147
147
  }, style),
148
148
  ...rest,
149
149
  children: data.map((item, index, arr)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
150
- className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
151
- position: absolute;
152
- width: var(--width);
153
- height: var(--height);
154
- transition: var(--transition);
155
- left: 0;
156
- top: 0;
157
- transform: translate(var(--left), var(--top));
150
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
151
+ position: absolute;
152
+ width: var(--width);
153
+ height: var(--height);
154
+ transition: var(--transition);
155
+ left: 0;
156
+ top: 0;
157
+ transform: translate(var(--left), var(--top));
158
158
  `, wrapperClassName),
159
159
  style: (0, index_cjs_namespaceObject.transformCSSVariable)({
160
160
  width: (0, index_cjs_namespaceObject.px)(itemWidth),
@@ -164,10 +164,10 @@ function ManualFlow(props) {
164
164
  top: (0, index_cjs_namespaceObject.px)(getPosition(index).top)
165
165
  }, wrapperStyle),
166
166
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
167
- className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
168
- width: 100%;
169
- height: 100%;
170
- display: var(--display);
167
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
168
+ width: 100%;
169
+ height: 100%;
170
+ display: var(--display);
171
171
  `, containerClassName),
172
172
  style: (0, index_cjs_namespaceObject.transformCSSVariable)({
173
173
  display: getHidden(index) ? "none" : "block"