deepsea-components 5.16.15 → 5.17.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.
Files changed (48) hide show
  1. package/dist/components/AutoFit.cjs +9 -9
  2. package/dist/components/AutoFit.js +9 -9
  3. package/dist/components/AutoScroll.cjs +4 -4
  4. package/dist/components/AutoScroll.js +4 -4
  5. package/dist/components/AutoSizeTextarea.cjs +23 -81
  6. package/dist/components/AutoSizeTextarea.js +23 -81
  7. package/dist/components/CircleText.cjs +24 -120
  8. package/dist/components/CircleText.js +24 -120
  9. package/dist/components/CopyButton.cjs +2 -2
  10. package/dist/components/CopyButton.js +2 -2
  11. package/dist/components/DraggableGrid.cjs +98 -149
  12. package/dist/components/DraggableGrid.js +98 -149
  13. package/dist/components/Echart.cjs +24 -94
  14. package/dist/components/Echart.js +24 -94
  15. package/dist/components/Flow.cjs +8 -8
  16. package/dist/components/Flow.js +8 -8
  17. package/dist/components/FormLabel.cjs +27 -92
  18. package/dist/components/FormLabel.js +27 -92
  19. package/dist/components/HlsPlayer.cjs +24 -65
  20. package/dist/components/HlsPlayer.js +24 -65
  21. package/dist/components/IconFileType.cjs +4 -14
  22. package/dist/components/IconFileType.js +4 -14
  23. package/dist/components/InfiniteScroll.cjs +4 -4
  24. package/dist/components/InfiniteScroll.js +4 -4
  25. package/dist/components/InputFile.cjs +11 -2
  26. package/dist/components/InputFile.d.ts +8 -0
  27. package/dist/components/InputFile.js +11 -2
  28. package/dist/components/InputFileButton.cjs +18 -9
  29. package/dist/components/InputFileButton.js +18 -9
  30. package/dist/components/ReadSheet.cjs +7 -32
  31. package/dist/components/ReadSheet.js +7 -32
  32. package/dist/components/Ring.cjs +10 -48
  33. package/dist/components/Ring.js +10 -48
  34. package/dist/components/ScrollMask.cjs +11 -97
  35. package/dist/components/ScrollMask.js +11 -97
  36. package/dist/components/SectionRing.cjs +15 -60
  37. package/dist/components/SectionRing.js +15 -60
  38. package/dist/components/TransitionBox.cjs +28 -118
  39. package/dist/components/TransitionBox.js +28 -118
  40. package/dist/components/TransitionNum.cjs +8 -8
  41. package/dist/components/TransitionNum.js +8 -8
  42. package/dist/components/Trapezium.cjs +9 -68
  43. package/dist/components/Trapezium.js +9 -68
  44. package/dist/components/Unify.cjs +19 -79
  45. package/dist/components/Unify.js +19 -79
  46. package/package.json +3 -3
  47. package/src/components/InputFile.tsx +23 -2
  48. package/src/components/InputFileButton.tsx +16 -2
@@ -56,13 +56,13 @@ const AutoFit = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((pr
56
56
  setWidth((0, index_cjs_namespaceObject.px)(designWidth));
57
57
  setHeight((0, index_cjs_namespaceObject.px)(contentRect.height / scale));
58
58
  } else if ("vertical" === direction) {
59
- const scale_0 = contentRect.height / designHeight;
60
- setTransform(`scale(${scale_0})`);
61
- setWidth((0, index_cjs_namespaceObject.px)(contentRect.width / scale_0));
59
+ const scale = contentRect.height / designHeight;
60
+ setTransform(`scale(${scale})`);
61
+ setWidth((0, index_cjs_namespaceObject.px)(contentRect.width / scale));
62
62
  setHeight((0, index_cjs_namespaceObject.px)(designHeight));
63
63
  } else {
64
- const scale_1 = Math.min(contentRect.width / designWidth, contentRect.height / designHeight);
65
- setTransform(`translateX(${(contentRect.width - designWidth * scale_1) / 2}px) translateY(${(contentRect.height - designHeight * scale_1) / 2}px) scale(${scale_1})`);
64
+ const scale = Math.min(contentRect.width / designWidth, contentRect.height / designHeight);
65
+ setTransform(`translateX(${(contentRect.width - designWidth * scale) / 2}px) translateY(${(contentRect.height - designHeight * scale) / 2}px) scale(${scale})`);
66
66
  setWidth((0, index_cjs_namespaceObject.px)(designWidth));
67
67
  setHeight((0, index_cjs_namespaceObject.px)(designHeight));
68
68
  }
@@ -81,10 +81,10 @@ const AutoFit = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((pr
81
81
  var _ele_current1;
82
82
  (0, external_react_namespaceObject.useEffect)(()=>{
83
83
  var _ele_current;
84
- const parent_0 = null == (_ele_current = ele.current) ? void 0 : _ele_current.parentElement;
85
- if (!parent_0) return;
86
- const style_0 = getComputedStyle(parent_0);
87
- if ("static" === style_0.position) console.warn("AutoFit \u7EC4\u4EF6\u7684\u7236\u5143\u7D20\u7684 position \u5C5E\u6027\u4E0D\u5E94\u8BE5\u662F static");
84
+ const parent = null == (_ele_current = ele.current) ? void 0 : _ele_current.parentElement;
85
+ if (!parent) return;
86
+ const style = getComputedStyle(parent);
87
+ if ("static" === style.position) console.warn("AutoFit \u7EC4\u4EF6\u7684\u7236\u5143\u7D20\u7684 position \u5C5E\u6027\u4E0D\u5E94\u8BE5\u662F static");
88
88
  }, [
89
89
  null == (_ele_current1 = ele.current) ? void 0 : _ele_current1.parentElement
90
90
  ]);
@@ -28,13 +28,13 @@ const AutoFit = /*#__PURE__*/ forwardRef((props, ref)=>{
28
28
  setWidth(px(designWidth));
29
29
  setHeight(px(contentRect.height / scale));
30
30
  } else if ("vertical" === direction) {
31
- const scale_0 = contentRect.height / designHeight;
32
- setTransform(`scale(${scale_0})`);
33
- setWidth(px(contentRect.width / scale_0));
31
+ const scale = contentRect.height / designHeight;
32
+ setTransform(`scale(${scale})`);
33
+ setWidth(px(contentRect.width / scale));
34
34
  setHeight(px(designHeight));
35
35
  } else {
36
- const scale_1 = Math.min(contentRect.width / designWidth, contentRect.height / designHeight);
37
- setTransform(`translateX(${(contentRect.width - designWidth * scale_1) / 2}px) translateY(${(contentRect.height - designHeight * scale_1) / 2}px) scale(${scale_1})`);
36
+ const scale = Math.min(contentRect.width / designWidth, contentRect.height / designHeight);
37
+ setTransform(`translateX(${(contentRect.width - designWidth * scale) / 2}px) translateY(${(contentRect.height - designHeight * scale) / 2}px) scale(${scale})`);
38
38
  setWidth(px(designWidth));
39
39
  setHeight(px(designHeight));
40
40
  }
@@ -53,10 +53,10 @@ const AutoFit = /*#__PURE__*/ forwardRef((props, ref)=>{
53
53
  var _ele_current1;
54
54
  useEffect(()=>{
55
55
  var _ele_current;
56
- const parent_0 = null == (_ele_current = ele.current) ? void 0 : _ele_current.parentElement;
57
- if (!parent_0) return;
58
- const style_0 = getComputedStyle(parent_0);
59
- if ("static" === style_0.position) console.warn("AutoFit \u7EC4\u4EF6\u7684\u7236\u5143\u7D20\u7684 position \u5C5E\u6027\u4E0D\u5E94\u8BE5\u662F static");
56
+ const parent = null == (_ele_current = ele.current) ? void 0 : _ele_current.parentElement;
57
+ if (!parent) return;
58
+ const style = getComputedStyle(parent);
59
+ if ("static" === style.position) console.warn("AutoFit \u7EC4\u4EF6\u7684\u7236\u5143\u7D20\u7684 position \u5C5E\u6027\u4E0D\u5E94\u8BE5\u662F static");
60
60
  }, [
61
61
  null == (_ele_current1 = ele.current) ? void 0 : _ele_current1.parentElement
62
62
  ]);
@@ -69,8 +69,8 @@ const AutoScroll = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
69
69
  function listener(status) {
70
70
  const { y } = status.offset;
71
71
  const scrollToBottom = Math.abs(y + height - scrollHeight) / itemHeight <= 0.05;
72
- const target_0 = scrollToBottom ? 0 : range.find((item)=>item > y);
73
- scroll(target_0);
72
+ const target = scrollToBottom ? 0 : range.find((item)=>item > y);
73
+ scroll(target);
74
74
  }
75
75
  null == (_bar_current = bar.current) || _bar_current.addListener(listener);
76
76
  return ()=>{
@@ -92,10 +92,10 @@ const AutoScroll = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)(
92
92
  pausedRef.current = true;
93
93
  null == onMouseEnter || onMouseEnter(e);
94
94
  }
95
- function onContainerMouseLeave(e_0) {
95
+ function onContainerMouseLeave(e) {
96
96
  if (playOnMouseEnter) return;
97
97
  pausedRef.current = false;
98
- null == onMouseLeave || onMouseLeave(e_0);
98
+ null == onMouseLeave || onMouseLeave(e);
99
99
  }
100
100
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_Scroll_cjs_namespaceObject.Scroll, {
101
101
  ref: ele,
@@ -41,8 +41,8 @@ const AutoScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
41
41
  function listener(status) {
42
42
  const { y } = status.offset;
43
43
  const scrollToBottom = Math.abs(y + height - scrollHeight) / itemHeight <= 0.05;
44
- const target_0 = scrollToBottom ? 0 : range.find((item)=>item > y);
45
- scroll(target_0);
44
+ const target = scrollToBottom ? 0 : range.find((item)=>item > y);
45
+ scroll(target);
46
46
  }
47
47
  null == (_bar_current = bar.current) || _bar_current.addListener(listener);
48
48
  return ()=>{
@@ -64,10 +64,10 @@ const AutoScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
64
64
  pausedRef.current = true;
65
65
  null == onMouseEnter || onMouseEnter(e);
66
66
  }
67
- function onContainerMouseLeave(e_0) {
67
+ function onContainerMouseLeave(e) {
68
68
  if (playOnMouseEnter) return;
69
69
  pausedRef.current = false;
70
- null == onMouseLeave || onMouseLeave(e_0);
70
+ null == onMouseLeave || onMouseLeave(e);
71
71
  }
72
72
  return /*#__PURE__*/ jsx(Scroll, {
73
73
  ref: ele,
@@ -28,99 +28,41 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  AutoSizeTextArea: ()=>AutoSizeTextArea
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
- const compiler_runtime_namespaceObject = require("react/compiler-runtime");
32
31
  const css_namespaceObject = require("@emotion/css");
33
32
  const external_deepsea_tools_namespaceObject = require("deepsea-tools");
34
33
  const external_react_namespaceObject = require("react");
35
34
  const index_cjs_namespaceObject = require("../utils/index.cjs");
36
35
  const AutoSizeTextArea = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
37
- const $ = (0, compiler_runtime_namespaceObject.c)(17);
38
- let className;
39
- let rest;
40
- let style;
41
- if ($[0] !== props) {
42
- ({ className, style, ...rest } = props);
43
- $[0] = props;
44
- $[1] = className;
45
- $[2] = rest;
46
- $[3] = style;
47
- } else {
48
- className = $[1];
49
- rest = $[2];
50
- style = $[3];
51
- }
36
+ const { className, style, ...rest } = props;
52
37
  const [height, setHeight] = (0, external_react_namespaceObject.useState)(void 0);
53
38
  const ele = (0, external_react_namespaceObject.useRef)(null);
54
- let t0;
55
- let t1;
56
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
57
- t0 = ()=>ele.current;
58
- t1 = [];
59
- $[4] = t0;
60
- $[5] = t1;
61
- } else {
62
- t0 = $[4];
63
- t1 = $[5];
64
- }
65
- (0, external_react_namespaceObject.useImperativeHandle)(ref, t0, t1);
66
- let t2;
67
- let t3;
68
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
69
- t2 = ()=>{
70
- const textarea = ele.current;
71
- const resizeTextarea = function() {
72
- setHeight("auto");
73
- setHeight((0, index_cjs_namespaceObject.px)(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
74
- };
75
- resizeTextarea();
76
- textarea.addEventListener("input", resizeTextarea);
77
- textarea.addEventListener("change", resizeTextarea);
78
- return ()=>{
79
- textarea.removeEventListener("input", resizeTextarea);
80
- textarea.removeEventListener("change", resizeTextarea);
81
- };
39
+ (0, external_react_namespaceObject.useImperativeHandle)(ref, ()=>ele.current, []);
40
+ (0, external_react_namespaceObject.useLayoutEffect)(()=>{
41
+ const textarea = ele.current;
42
+ function resizeTextarea() {
43
+ setHeight("auto");
44
+ setHeight((0, index_cjs_namespaceObject.px)(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
45
+ }
46
+ resizeTextarea();
47
+ textarea.addEventListener("input", resizeTextarea);
48
+ textarea.addEventListener("change", resizeTextarea);
49
+ return ()=>{
50
+ textarea.removeEventListener("input", resizeTextarea);
51
+ textarea.removeEventListener("change", resizeTextarea);
82
52
  };
83
- t3 = [];
84
- $[6] = t2;
85
- $[7] = t3;
86
- } else {
87
- t2 = $[6];
88
- t3 = $[7];
89
- }
90
- (0, external_react_namespaceObject.useLayoutEffect)(t2, t3);
91
- let t4;
92
- if ($[8] !== className) {
93
- t4 = (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
53
+ }, []);
54
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
55
+ ref: ele,
56
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
94
57
  height: var(--height);
95
58
  resize: none;
96
59
  overflow-y: hidden;
97
- `, className);
98
- $[8] = className;
99
- $[9] = t4;
100
- } else t4 = $[9];
101
- let t5;
102
- if ($[10] !== height || $[11] !== style) {
103
- t5 = (0, index_cjs_namespaceObject.transformCSSVariable)({
60
+ `, className),
61
+ style: (0, index_cjs_namespaceObject.transformCSSVariable)({
104
62
  height
105
- }, style);
106
- $[10] = height;
107
- $[11] = style;
108
- $[12] = t5;
109
- } else t5 = $[12];
110
- let t6;
111
- if ($[13] !== rest || $[14] !== t4 || $[15] !== t5) {
112
- t6 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
113
- ref: ele,
114
- className: t4,
115
- style: t5,
116
- ...rest
117
- });
118
- $[13] = rest;
119
- $[14] = t4;
120
- $[15] = t5;
121
- $[16] = t6;
122
- } else t6 = $[16];
123
- return t6;
63
+ }, style),
64
+ ...rest
65
+ });
124
66
  });
125
67
  exports.AutoSizeTextArea = __webpack_exports__.AutoSizeTextArea;
126
68
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -1,97 +1,39 @@
1
1
  "use client"
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { c } from "react/compiler-runtime";
4
3
  import { css } from "@emotion/css";
5
4
  import { clsx } from "deepsea-tools";
6
5
  import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
7
6
  import { px, transformCSSVariable } from "../utils/index.js";
8
7
  const AutoSizeTextArea = /*#__PURE__*/ forwardRef((props, ref)=>{
9
- const $ = c(17);
10
- let className;
11
- let rest;
12
- let style;
13
- if ($[0] !== props) {
14
- ({ className, style, ...rest } = props);
15
- $[0] = props;
16
- $[1] = className;
17
- $[2] = rest;
18
- $[3] = style;
19
- } else {
20
- className = $[1];
21
- rest = $[2];
22
- style = $[3];
23
- }
8
+ const { className, style, ...rest } = props;
24
9
  const [height, setHeight] = useState(void 0);
25
10
  const ele = useRef(null);
26
- let t0;
27
- let t1;
28
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
29
- t0 = ()=>ele.current;
30
- t1 = [];
31
- $[4] = t0;
32
- $[5] = t1;
33
- } else {
34
- t0 = $[4];
35
- t1 = $[5];
36
- }
37
- useImperativeHandle(ref, t0, t1);
38
- let t2;
39
- let t3;
40
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
41
- t2 = ()=>{
42
- const textarea = ele.current;
43
- const resizeTextarea = function() {
44
- setHeight("auto");
45
- setHeight(px(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
46
- };
47
- resizeTextarea();
48
- textarea.addEventListener("input", resizeTextarea);
49
- textarea.addEventListener("change", resizeTextarea);
50
- return ()=>{
51
- textarea.removeEventListener("input", resizeTextarea);
52
- textarea.removeEventListener("change", resizeTextarea);
53
- };
11
+ useImperativeHandle(ref, ()=>ele.current, []);
12
+ useLayoutEffect(()=>{
13
+ const textarea = ele.current;
14
+ function resizeTextarea() {
15
+ setHeight("auto");
16
+ setHeight(px(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
17
+ }
18
+ resizeTextarea();
19
+ textarea.addEventListener("input", resizeTextarea);
20
+ textarea.addEventListener("change", resizeTextarea);
21
+ return ()=>{
22
+ textarea.removeEventListener("input", resizeTextarea);
23
+ textarea.removeEventListener("change", resizeTextarea);
54
24
  };
55
- t3 = [];
56
- $[6] = t2;
57
- $[7] = t3;
58
- } else {
59
- t2 = $[6];
60
- t3 = $[7];
61
- }
62
- useLayoutEffect(t2, t3);
63
- let t4;
64
- if ($[8] !== className) {
65
- t4 = clsx(css`
25
+ }, []);
26
+ return /*#__PURE__*/ jsx("textarea", {
27
+ ref: ele,
28
+ className: clsx(css`
66
29
  height: var(--height);
67
30
  resize: none;
68
31
  overflow-y: hidden;
69
- `, className);
70
- $[8] = className;
71
- $[9] = t4;
72
- } else t4 = $[9];
73
- let t5;
74
- if ($[10] !== height || $[11] !== style) {
75
- t5 = transformCSSVariable({
32
+ `, className),
33
+ style: transformCSSVariable({
76
34
  height
77
- }, style);
78
- $[10] = height;
79
- $[11] = style;
80
- $[12] = t5;
81
- } else t5 = $[12];
82
- let t6;
83
- if ($[13] !== rest || $[14] !== t4 || $[15] !== t5) {
84
- t6 = /*#__PURE__*/ jsx("textarea", {
85
- ref: ele,
86
- className: t4,
87
- style: t5,
88
- ...rest
89
- });
90
- $[13] = rest;
91
- $[14] = t4;
92
- $[15] = t5;
93
- $[16] = t6;
94
- } else t6 = $[16];
95
- return t6;
35
+ }, style),
36
+ ...rest
37
+ });
96
38
  });
97
39
  export { AutoSizeTextArea };
@@ -28,132 +28,36 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  CircleText: ()=>CircleText
29
29
  });
30
30
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
- const compiler_runtime_namespaceObject = require("react/compiler-runtime");
32
31
  const external_react_namespaceObject = require("react");
33
32
  const CircleText = (props)=>{
34
- const $ = (0, compiler_runtime_namespaceObject.c)(41);
35
- let children;
36
- let height;
37
- let radius;
38
- let rest;
39
- let separator;
40
- let style;
41
- let t0;
42
- let t1;
43
- let t2;
44
- let t3;
45
- let t4;
46
- let width;
47
- if ($[0] !== props) {
48
- ({ width, height, radius, startAngel: t0, gapAngel: t1, align: t2, style, direction: t3, reverse: t4, separator, children, ...rest } = props);
49
- $[0] = props;
50
- $[1] = children;
51
- $[2] = height;
52
- $[3] = radius;
53
- $[4] = rest;
54
- $[5] = separator;
55
- $[6] = style;
56
- $[7] = t0;
57
- $[8] = t1;
58
- $[9] = t2;
59
- $[10] = t3;
60
- $[11] = t4;
61
- $[12] = width;
62
- } else {
63
- children = $[1];
64
- height = $[2];
65
- radius = $[3];
66
- rest = $[4];
67
- separator = $[5];
68
- style = $[6];
69
- t0 = $[7];
70
- t1 = $[8];
71
- t2 = $[9];
72
- t3 = $[10];
73
- t4 = $[11];
74
- width = $[12];
75
- }
76
- const startAngel = void 0 === t0 ? 0 : t0;
77
- const gapAngel = void 0 === t1 ? 0 : t1;
78
- const align = void 0 === t2 ? "center" : t2;
79
- const direction = void 0 === t3 ? "outer" : t3;
80
- const reverse = void 0 === t4 ? false : t4;
33
+ const { width, height, radius, startAngel = 0, gapAngel = 0, align = "center", style, direction = "outer", reverse = false, separator, children, ...rest } = props;
81
34
  const unitAngle = 2 * Math.atan(width / 2 / radius);
82
35
  const totalAngle = (unitAngle + gapAngel) * children.length - gapAngel;
83
36
  const offsetAngle = "left" === align ? 0 : "right" === align ? totalAngle : totalAngle / 2;
84
- let t5;
85
- if ($[13] !== direction || $[14] !== gapAngel || $[15] !== height || $[16] !== offsetAngle || $[17] !== radius || $[18] !== startAngel || $[19] !== unitAngle || $[20] !== width) {
86
- t5 = function(idx) {
87
- const angle = startAngel - idx * (unitAngle + gapAngel) + offsetAngle - unitAngle / 2;
88
- const x = (radius + height / 2) * Math.cos(angle) - width / 2;
89
- const y = (radius + height / 2) * Math.sin(angle) * -1 - height / 2;
90
- const z = Math.PI / 2 - angle + ("inner" === direction ? Math.PI : 0);
91
- return `translateX(${x}px) translateY(${y}px) rotateZ(${z / Math.PI * 180}deg)`;
92
- };
93
- $[13] = direction;
94
- $[14] = gapAngel;
95
- $[15] = height;
96
- $[16] = offsetAngle;
97
- $[17] = radius;
98
- $[18] = startAngel;
99
- $[19] = unitAngle;
100
- $[20] = width;
101
- $[21] = t5;
102
- } else t5 = $[21];
103
- const getTransform = t5;
104
- let T0;
105
- let t6;
106
- if ($[22] !== children || $[23] !== getTransform || $[24] !== height || $[25] !== rest || $[26] !== reverse || $[27] !== separator || $[28] !== style || $[29] !== width) {
107
- const words = "function" == typeof separator ? separator(children) : children.split(separator ?? "");
108
- if (reverse) words.reverse();
109
- T0 = external_react_namespaceObject.Fragment;
110
- let t7;
111
- if ($[32] !== getTransform || $[33] !== height || $[34] !== rest || $[35] !== style || $[36] !== width) {
112
- t7 = (w, idx_0)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
113
- style: {
114
- position: "absolute",
115
- ...style,
116
- transform: getTransform(idx_0),
117
- textAlign: "center",
118
- width,
119
- lineHeight: `${height}px`,
120
- height
121
- },
122
- ...rest,
123
- children: w
124
- }, idx_0);
125
- $[32] = getTransform;
126
- $[33] = height;
127
- $[34] = rest;
128
- $[35] = style;
129
- $[36] = width;
130
- $[37] = t7;
131
- } else t7 = $[37];
132
- t6 = words.map(t7);
133
- $[22] = children;
134
- $[23] = getTransform;
135
- $[24] = height;
136
- $[25] = rest;
137
- $[26] = reverse;
138
- $[27] = separator;
139
- $[28] = style;
140
- $[29] = width;
141
- $[30] = T0;
142
- $[31] = t6;
143
- } else {
144
- T0 = $[30];
145
- t6 = $[31];
37
+ function getTransform(idx) {
38
+ const angle = startAngel - idx * (unitAngle + gapAngel) + offsetAngle - unitAngle / 2;
39
+ const x = (radius + height / 2) * Math.cos(angle) - width / 2;
40
+ const y = (radius + height / 2) * Math.sin(angle) * -1 - height / 2;
41
+ const z = Math.PI / 2 - angle + ("inner" === direction ? Math.PI : 0);
42
+ return `translateX(${x}px) translateY(${y}px) rotateZ(${z / Math.PI * 180}deg)`;
146
43
  }
147
- let t7;
148
- if ($[38] !== T0 || $[39] !== t6) {
149
- t7 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(T0, {
150
- children: t6
151
- });
152
- $[38] = T0;
153
- $[39] = t6;
154
- $[40] = t7;
155
- } else t7 = $[40];
156
- return t7;
44
+ const words = "function" == typeof separator ? separator(children) : children.split(separator ?? "");
45
+ if (reverse) words.reverse();
46
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_namespaceObject.Fragment, {
47
+ children: words.map((w, idx)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
48
+ style: {
49
+ position: "absolute",
50
+ ...style,
51
+ transform: getTransform(idx),
52
+ textAlign: "center",
53
+ width,
54
+ lineHeight: `${height}px`,
55
+ height: height
56
+ },
57
+ ...rest,
58
+ children: w
59
+ }, idx))
60
+ });
157
61
  };
158
62
  exports.CircleText = __webpack_exports__.CircleText;
159
63
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [