deepsea-components 5.16.4 → 5.16.5
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/dist/components/AutoFit.cjs +20 -15
- package/dist/components/AutoFit.js +20 -15
- package/dist/components/AutoScroll.cjs +12 -9
- package/dist/components/AutoScroll.js +12 -9
- package/dist/components/AutoSizeTextarea.cjs +81 -23
- package/dist/components/AutoSizeTextarea.js +81 -23
- package/dist/components/CircleText.cjs +120 -24
- package/dist/components/CircleText.js +120 -24
- package/dist/components/CopyButton.cjs +8 -2
- package/dist/components/CopyButton.js +8 -2
- package/dist/components/DraggableGrid.cjs +155 -104
- package/dist/components/DraggableGrid.d.ts +25 -23
- package/dist/components/DraggableGrid.js +155 -104
- package/dist/components/Echart.cjs +95 -21
- package/dist/components/Echart.js +95 -21
- package/dist/components/Flow.cjs +10 -10
- package/dist/components/Flow.js +10 -10
- package/dist/components/FormLabel.cjs +92 -27
- package/dist/components/FormLabel.js +92 -27
- package/dist/components/HlsPlayer.cjs +65 -24
- package/dist/components/HlsPlayer.js +65 -24
- package/dist/components/IconFileType.cjs +14 -4
- package/dist/components/IconFileType.js +14 -4
- package/dist/components/InfiniteScroll.cjs +17 -10
- package/dist/components/InfiniteScroll.js +17 -10
- package/dist/components/InputFile.cjs +5 -5
- package/dist/components/InputFile.js +5 -5
- package/dist/components/InputFileButton.cjs +14 -13
- package/dist/components/InputFileButton.js +14 -13
- package/dist/components/ReadSheet.cjs +32 -7
- package/dist/components/ReadSheet.js +32 -7
- package/dist/components/Ring.cjs +48 -10
- package/dist/components/Ring.js +48 -10
- package/dist/components/Scroll.cjs +10 -3
- package/dist/components/Scroll.js +10 -3
- package/dist/components/ScrollMask.cjs +97 -11
- package/dist/components/ScrollMask.js +97 -11
- package/dist/components/SectionRing.cjs +60 -15
- package/dist/components/SectionRing.js +60 -15
- package/dist/components/TransitionBox.cjs +120 -30
- package/dist/components/TransitionBox.js +120 -30
- package/dist/components/TransitionNum.cjs +8 -8
- package/dist/components/TransitionNum.js +8 -8
- package/dist/components/Trapezium.cjs +68 -9
- package/dist/components/Trapezium.js +68 -9
- package/dist/components/Unify.cjs +79 -19
- package/dist/components/Unify.js +79 -19
- package/dist/components/WriteSheet.cjs +1 -1
- package/dist/components/WriteSheet.js +1 -1
- package/package.json +1 -1
- package/src/components/DraggableGrid.tsx +32 -28
|
@@ -94,14 +94,21 @@ var __webpack_exports__ = {};
|
|
|
94
94
|
const bar = (0, react__WEBPACK_IMPORTED_MODULE_3__.useRef)(null);
|
|
95
95
|
(0, react__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>{
|
|
96
96
|
bar.current = smooth_scrollbar__WEBPACK_IMPORTED_MODULE_4___default().init(ele.current, scrollbarOptions);
|
|
97
|
-
return ()=>
|
|
97
|
+
return ()=>{
|
|
98
|
+
var _bar_current;
|
|
99
|
+
return null == (_bar_current = bar.current) ? void 0 : _bar_current.destroy();
|
|
100
|
+
};
|
|
98
101
|
}, []);
|
|
99
102
|
(0, react__WEBPACK_IMPORTED_MODULE_3__.useImperativeHandle)(ref, ()=>ele.current, []);
|
|
100
103
|
(0, react__WEBPACK_IMPORTED_MODULE_3__.useImperativeHandle)(scrollbar, ()=>bar.current, []);
|
|
101
104
|
(0, react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(()=>{
|
|
105
|
+
var _bar_current;
|
|
102
106
|
if (!onScrollbar) return;
|
|
103
|
-
bar.current
|
|
104
|
-
return ()=>
|
|
107
|
+
null == (_bar_current = bar.current) || _bar_current.addListener(onScrollbar);
|
|
108
|
+
return ()=>{
|
|
109
|
+
var _bar_current;
|
|
110
|
+
return null == (_bar_current = bar.current) ? void 0 : _bar_current.removeListener(onScrollbar);
|
|
111
|
+
};
|
|
105
112
|
}, [
|
|
106
113
|
onScrollbar
|
|
107
114
|
]);
|
|
@@ -13,14 +13,21 @@ const Scroll = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
13
13
|
const bar = useRef(null);
|
|
14
14
|
useLayoutEffect(()=>{
|
|
15
15
|
bar.current = smooth_scrollbar.init(ele.current, scrollbarOptions);
|
|
16
|
-
return ()=>
|
|
16
|
+
return ()=>{
|
|
17
|
+
var _bar_current;
|
|
18
|
+
return null == (_bar_current = bar.current) ? void 0 : _bar_current.destroy();
|
|
19
|
+
};
|
|
17
20
|
}, []);
|
|
18
21
|
useImperativeHandle(ref, ()=>ele.current, []);
|
|
19
22
|
useImperativeHandle(scrollbar, ()=>bar.current, []);
|
|
20
23
|
useEffect(()=>{
|
|
24
|
+
var _bar_current;
|
|
21
25
|
if (!onScrollbar) return;
|
|
22
|
-
bar.current
|
|
23
|
-
return ()=>
|
|
26
|
+
null == (_bar_current = bar.current) || _bar_current.addListener(onScrollbar);
|
|
27
|
+
return ()=>{
|
|
28
|
+
var _bar_current;
|
|
29
|
+
return null == (_bar_current = bar.current) ? void 0 : _bar_current.removeListener(onScrollbar);
|
|
30
|
+
};
|
|
24
31
|
}, [
|
|
25
32
|
onScrollbar
|
|
26
33
|
]);
|
|
@@ -36,32 +36,118 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
36
36
|
ScrollMask: ()=>ScrollMask
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
39
40
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
40
41
|
const external_react_namespaceObject = require("react");
|
|
41
42
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
42
43
|
const external_ScrollMask_module_cjs_namespaceObject = require("./ScrollMask.module.cjs");
|
|
43
44
|
var external_ScrollMask_module_cjs_default = /*#__PURE__*/ __webpack_require__.n(external_ScrollMask_module_cjs_namespaceObject);
|
|
44
|
-
const ScrollMask = (
|
|
45
|
+
const ScrollMask = (t0)=>{
|
|
46
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(31);
|
|
47
|
+
let className;
|
|
48
|
+
let contentClassName;
|
|
49
|
+
let contentStyle;
|
|
50
|
+
let rest;
|
|
51
|
+
let style;
|
|
52
|
+
let t1;
|
|
53
|
+
let t2;
|
|
54
|
+
let t3;
|
|
55
|
+
let t4;
|
|
56
|
+
let t5;
|
|
57
|
+
if ($[0] !== t0) {
|
|
58
|
+
({ className, style, position: t1, size: t2, from: t3, to: t4, contentClassName, contentStyle, showRadian: t5, ...rest } = t0);
|
|
59
|
+
$[0] = t0;
|
|
60
|
+
$[1] = className;
|
|
61
|
+
$[2] = contentClassName;
|
|
62
|
+
$[3] = contentStyle;
|
|
63
|
+
$[4] = rest;
|
|
64
|
+
$[5] = style;
|
|
65
|
+
$[6] = t1;
|
|
66
|
+
$[7] = t2;
|
|
67
|
+
$[8] = t3;
|
|
68
|
+
$[9] = t4;
|
|
69
|
+
$[10] = t5;
|
|
70
|
+
} else {
|
|
71
|
+
className = $[1];
|
|
72
|
+
contentClassName = $[2];
|
|
73
|
+
contentStyle = $[3];
|
|
74
|
+
rest = $[4];
|
|
75
|
+
style = $[5];
|
|
76
|
+
t1 = $[6];
|
|
77
|
+
t2 = $[7];
|
|
78
|
+
t3 = $[8];
|
|
79
|
+
t4 = $[9];
|
|
80
|
+
t5 = $[10];
|
|
81
|
+
}
|
|
82
|
+
const position = void 0 === t1 ? "top" : t1;
|
|
83
|
+
const size = void 0 === t2 ? 8 : t2;
|
|
84
|
+
const from = void 0 === t3 ? "rgba(0, 0, 0, 0.1)" : t3;
|
|
85
|
+
const to = void 0 === t4 ? "rgba(0, 0, 0, 0)" : t4;
|
|
86
|
+
const showRadian = void 0 === t5 ? false : t5;
|
|
45
87
|
const ref = (0, external_react_namespaceObject.useRef)(null);
|
|
46
88
|
const contentSize = (0, external_soda_hooks_namespaceObject.useSize)(ref);
|
|
47
89
|
const radius = (0, external_deepsea_tools_namespaceObject.isNonNullable)(contentSize) ? "top" === position || "bottom" === position ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) / (2 * contentSize.height) : (contentSize.height ** 2 / 4 + contentSize.width ** 2) / (2 * contentSize.width) : void 0;
|
|
48
90
|
const clipPath = showRadian && (0, external_deepsea_tools_namespaceObject.isNonNullable)(radius) ? "top" === position ? `circle(${radius}px at 50% -${radius - contentSize.height}px)` : "bottom" === position ? `circle(${radius}px at 50% ${radius}px)` : "left" === position ? `circle(${radius}px at -${radius - contentSize.width}px 50%)` : "right" === position ? `circle(${radius}px at ${radius}px 50%)` : "none" : "none";
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
91
|
+
const t6 = external_ScrollMask_module_cjs_default()[`${position}-scroll-mask`];
|
|
92
|
+
let t7;
|
|
93
|
+
if ($[11] !== className || $[12] !== t6) {
|
|
94
|
+
t7 = (0, external_deepsea_tools_namespaceObject.clsx)(external_ScrollMask_module_cjs_default()["scroll-mask"], t6, className);
|
|
95
|
+
$[11] = className;
|
|
96
|
+
$[12] = t6;
|
|
97
|
+
$[13] = t7;
|
|
98
|
+
} else t7 = $[13];
|
|
99
|
+
const t8 = `${size}px`;
|
|
100
|
+
let t9;
|
|
101
|
+
if ($[14] !== clipPath || $[15] !== from || $[16] !== style || $[17] !== t8 || $[18] !== to) {
|
|
102
|
+
t9 = {
|
|
103
|
+
"--scroll-mask-size": t8,
|
|
53
104
|
"--scroll-mask-color-from": from,
|
|
54
105
|
"--scroll-mask-color-to": to,
|
|
55
106
|
"--scroll-mask-clip-path": clipPath,
|
|
56
107
|
...style
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
108
|
+
};
|
|
109
|
+
$[14] = clipPath;
|
|
110
|
+
$[15] = from;
|
|
111
|
+
$[16] = style;
|
|
112
|
+
$[17] = t8;
|
|
113
|
+
$[18] = to;
|
|
114
|
+
$[19] = t9;
|
|
115
|
+
} else t9 = $[19];
|
|
116
|
+
const t10 = t9;
|
|
117
|
+
const t11 = external_ScrollMask_module_cjs_default()[`${position}-scroll-mask-content`];
|
|
118
|
+
let t12;
|
|
119
|
+
if ($[20] !== contentClassName || $[21] !== t11) {
|
|
120
|
+
t12 = (0, external_deepsea_tools_namespaceObject.clsx)(external_ScrollMask_module_cjs_default()["scroll-mask-content"], t11, contentClassName);
|
|
121
|
+
$[20] = contentClassName;
|
|
122
|
+
$[21] = t11;
|
|
123
|
+
$[22] = t12;
|
|
124
|
+
} else t12 = $[22];
|
|
125
|
+
let t13;
|
|
126
|
+
if ($[23] !== contentStyle || $[24] !== t12) {
|
|
127
|
+
t13 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
60
128
|
ref: ref,
|
|
61
|
-
className:
|
|
129
|
+
className: t12,
|
|
62
130
|
style: contentStyle
|
|
63
|
-
})
|
|
64
|
-
|
|
131
|
+
});
|
|
132
|
+
$[23] = contentStyle;
|
|
133
|
+
$[24] = t12;
|
|
134
|
+
$[25] = t13;
|
|
135
|
+
} else t13 = $[25];
|
|
136
|
+
let t14;
|
|
137
|
+
if ($[26] !== rest || $[27] !== t10 || $[28] !== t13 || $[29] !== t7) {
|
|
138
|
+
t14 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
139
|
+
className: t7,
|
|
140
|
+
style: t10,
|
|
141
|
+
...rest,
|
|
142
|
+
children: t13
|
|
143
|
+
});
|
|
144
|
+
$[26] = rest;
|
|
145
|
+
$[27] = t10;
|
|
146
|
+
$[28] = t13;
|
|
147
|
+
$[29] = t7;
|
|
148
|
+
$[30] = t14;
|
|
149
|
+
} else t14 = $[30];
|
|
150
|
+
return t14;
|
|
65
151
|
};
|
|
66
152
|
exports.ScrollMask = __webpack_exports__.ScrollMask;
|
|
67
153
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
@@ -1,28 +1,114 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { clsx, isNonNullable } from "deepsea-tools";
|
|
3
4
|
import { useRef } from "react";
|
|
4
5
|
import { useSize } from "soda-hooks";
|
|
5
6
|
import ScrollMask_module from "./ScrollMask.module.js";
|
|
6
|
-
const ScrollMask = (
|
|
7
|
+
const ScrollMask = (t0)=>{
|
|
8
|
+
const $ = c(31);
|
|
9
|
+
let className;
|
|
10
|
+
let contentClassName;
|
|
11
|
+
let contentStyle;
|
|
12
|
+
let rest;
|
|
13
|
+
let style;
|
|
14
|
+
let t1;
|
|
15
|
+
let t2;
|
|
16
|
+
let t3;
|
|
17
|
+
let t4;
|
|
18
|
+
let t5;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({ className, style, position: t1, size: t2, from: t3, to: t4, contentClassName, contentStyle, showRadian: t5, ...rest } = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = className;
|
|
23
|
+
$[2] = contentClassName;
|
|
24
|
+
$[3] = contentStyle;
|
|
25
|
+
$[4] = rest;
|
|
26
|
+
$[5] = style;
|
|
27
|
+
$[6] = t1;
|
|
28
|
+
$[7] = t2;
|
|
29
|
+
$[8] = t3;
|
|
30
|
+
$[9] = t4;
|
|
31
|
+
$[10] = t5;
|
|
32
|
+
} else {
|
|
33
|
+
className = $[1];
|
|
34
|
+
contentClassName = $[2];
|
|
35
|
+
contentStyle = $[3];
|
|
36
|
+
rest = $[4];
|
|
37
|
+
style = $[5];
|
|
38
|
+
t1 = $[6];
|
|
39
|
+
t2 = $[7];
|
|
40
|
+
t3 = $[8];
|
|
41
|
+
t4 = $[9];
|
|
42
|
+
t5 = $[10];
|
|
43
|
+
}
|
|
44
|
+
const position = void 0 === t1 ? "top" : t1;
|
|
45
|
+
const size = void 0 === t2 ? 8 : t2;
|
|
46
|
+
const from = void 0 === t3 ? "rgba(0, 0, 0, 0.1)" : t3;
|
|
47
|
+
const to = void 0 === t4 ? "rgba(0, 0, 0, 0)" : t4;
|
|
48
|
+
const showRadian = void 0 === t5 ? false : t5;
|
|
7
49
|
const ref = useRef(null);
|
|
8
50
|
const contentSize = useSize(ref);
|
|
9
51
|
const radius = isNonNullable(contentSize) ? "top" === position || "bottom" === position ? (contentSize.width ** 2 / 4 + contentSize.height ** 2) / (2 * contentSize.height) : (contentSize.height ** 2 / 4 + contentSize.width ** 2) / (2 * contentSize.width) : void 0;
|
|
10
52
|
const clipPath = showRadian && isNonNullable(radius) ? "top" === position ? `circle(${radius}px at 50% -${radius - contentSize.height}px)` : "bottom" === position ? `circle(${radius}px at 50% ${radius}px)` : "left" === position ? `circle(${radius}px at -${radius - contentSize.width}px 50%)` : "right" === position ? `circle(${radius}px at ${radius}px 50%)` : "none" : "none";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
53
|
+
const t6 = ScrollMask_module[`${position}-scroll-mask`];
|
|
54
|
+
let t7;
|
|
55
|
+
if ($[11] !== className || $[12] !== t6) {
|
|
56
|
+
t7 = clsx(ScrollMask_module["scroll-mask"], t6, className);
|
|
57
|
+
$[11] = className;
|
|
58
|
+
$[12] = t6;
|
|
59
|
+
$[13] = t7;
|
|
60
|
+
} else t7 = $[13];
|
|
61
|
+
const t8 = `${size}px`;
|
|
62
|
+
let t9;
|
|
63
|
+
if ($[14] !== clipPath || $[15] !== from || $[16] !== style || $[17] !== t8 || $[18] !== to) {
|
|
64
|
+
t9 = {
|
|
65
|
+
"--scroll-mask-size": t8,
|
|
15
66
|
"--scroll-mask-color-from": from,
|
|
16
67
|
"--scroll-mask-color-to": to,
|
|
17
68
|
"--scroll-mask-clip-path": clipPath,
|
|
18
69
|
...style
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
70
|
+
};
|
|
71
|
+
$[14] = clipPath;
|
|
72
|
+
$[15] = from;
|
|
73
|
+
$[16] = style;
|
|
74
|
+
$[17] = t8;
|
|
75
|
+
$[18] = to;
|
|
76
|
+
$[19] = t9;
|
|
77
|
+
} else t9 = $[19];
|
|
78
|
+
const t10 = t9;
|
|
79
|
+
const t11 = ScrollMask_module[`${position}-scroll-mask-content`];
|
|
80
|
+
let t12;
|
|
81
|
+
if ($[20] !== contentClassName || $[21] !== t11) {
|
|
82
|
+
t12 = clsx(ScrollMask_module["scroll-mask-content"], t11, contentClassName);
|
|
83
|
+
$[20] = contentClassName;
|
|
84
|
+
$[21] = t11;
|
|
85
|
+
$[22] = t12;
|
|
86
|
+
} else t12 = $[22];
|
|
87
|
+
let t13;
|
|
88
|
+
if ($[23] !== contentStyle || $[24] !== t12) {
|
|
89
|
+
t13 = /*#__PURE__*/ jsx("div", {
|
|
22
90
|
ref: ref,
|
|
23
|
-
className:
|
|
91
|
+
className: t12,
|
|
24
92
|
style: contentStyle
|
|
25
|
-
})
|
|
26
|
-
|
|
93
|
+
});
|
|
94
|
+
$[23] = contentStyle;
|
|
95
|
+
$[24] = t12;
|
|
96
|
+
$[25] = t13;
|
|
97
|
+
} else t13 = $[25];
|
|
98
|
+
let t14;
|
|
99
|
+
if ($[26] !== rest || $[27] !== t10 || $[28] !== t13 || $[29] !== t7) {
|
|
100
|
+
t14 = /*#__PURE__*/ jsx("div", {
|
|
101
|
+
className: t7,
|
|
102
|
+
style: t10,
|
|
103
|
+
...rest,
|
|
104
|
+
children: t13
|
|
105
|
+
});
|
|
106
|
+
$[26] = rest;
|
|
107
|
+
$[27] = t10;
|
|
108
|
+
$[28] = t13;
|
|
109
|
+
$[29] = t7;
|
|
110
|
+
$[30] = t14;
|
|
111
|
+
} else t14 = $[30];
|
|
112
|
+
return t14;
|
|
27
113
|
};
|
|
28
114
|
export { ScrollMask };
|
|
@@ -28,27 +28,72 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
SectionRing: ()=>SectionRing
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
31
32
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
32
33
|
const external_react_namespaceObject = require("react");
|
|
33
34
|
const SectionRing = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
34
|
-
const
|
|
35
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(16);
|
|
36
|
+
let a;
|
|
37
|
+
let c;
|
|
38
|
+
let i;
|
|
39
|
+
let o;
|
|
40
|
+
let rest;
|
|
41
|
+
let style;
|
|
42
|
+
if ($[0] !== props) {
|
|
43
|
+
({ outerRadius: o, innerRadius: i, count: c, angel: a, style, ...rest } = props);
|
|
44
|
+
$[0] = props;
|
|
45
|
+
$[1] = a;
|
|
46
|
+
$[2] = c;
|
|
47
|
+
$[3] = i;
|
|
48
|
+
$[4] = o;
|
|
49
|
+
$[5] = rest;
|
|
50
|
+
$[6] = style;
|
|
51
|
+
} else {
|
|
52
|
+
a = $[1];
|
|
53
|
+
c = $[2];
|
|
54
|
+
i = $[3];
|
|
55
|
+
o = $[4];
|
|
56
|
+
rest = $[5];
|
|
57
|
+
style = $[6];
|
|
58
|
+
}
|
|
35
59
|
const s = 2 * Math.PI / c - a;
|
|
36
|
-
|
|
60
|
+
const arc = function(radius, startAngle, endAngle, t0) {
|
|
61
|
+
const options = void 0 === t0 ? {} : t0;
|
|
37
62
|
return (0, external_deepsea_tools_namespaceObject.drawArc)(o, o, radius, startAngle, endAngle, options);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
63
|
+
};
|
|
64
|
+
const t1 = 2 * o;
|
|
65
|
+
const t2 = 2 * o;
|
|
66
|
+
const t3 = `path("${Array(c).fill(0).map((it, idx)=>`${arc(o, idx * (a + s), idx * (a + s) + a)} ${arc(i, idx * (a + s) + a, idx * (a + s), {
|
|
67
|
+
line: true,
|
|
68
|
+
anticlockwise: true
|
|
69
|
+
})}`).join(" ")} Z")`;
|
|
70
|
+
let t4;
|
|
71
|
+
if ($[7] !== style || $[8] !== t1 || $[9] !== t2 || $[10] !== t3) {
|
|
72
|
+
t4 = {
|
|
73
|
+
width: t1,
|
|
74
|
+
height: t2,
|
|
75
|
+
clipPath: t3,
|
|
48
76
|
...style
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
77
|
+
};
|
|
78
|
+
$[7] = style;
|
|
79
|
+
$[8] = t1;
|
|
80
|
+
$[9] = t2;
|
|
81
|
+
$[10] = t3;
|
|
82
|
+
$[11] = t4;
|
|
83
|
+
} else t4 = $[11];
|
|
84
|
+
let t5;
|
|
85
|
+
if ($[12] !== ref || $[13] !== rest || $[14] !== t4) {
|
|
86
|
+
t5 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
87
|
+
ref: ref,
|
|
88
|
+
style: t4,
|
|
89
|
+
...rest
|
|
90
|
+
});
|
|
91
|
+
$[12] = ref;
|
|
92
|
+
$[13] = rest;
|
|
93
|
+
$[14] = t4;
|
|
94
|
+
$[15] = t5;
|
|
95
|
+
} else t5 = $[15];
|
|
96
|
+
return t5;
|
|
52
97
|
});
|
|
53
98
|
exports.SectionRing = __webpack_exports__.SectionRing;
|
|
54
99
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
@@ -1,25 +1,70 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { c as compiler_runtime_c } from "react/compiler-runtime";
|
|
3
4
|
import { drawArc } from "deepsea-tools";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
6
|
const SectionRing = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
|
-
const
|
|
7
|
+
const $ = compiler_runtime_c(16);
|
|
8
|
+
let a;
|
|
9
|
+
let c;
|
|
10
|
+
let i;
|
|
11
|
+
let o;
|
|
12
|
+
let rest;
|
|
13
|
+
let style;
|
|
14
|
+
if ($[0] !== props) {
|
|
15
|
+
({ outerRadius: o, innerRadius: i, count: c, angel: a, style, ...rest } = props);
|
|
16
|
+
$[0] = props;
|
|
17
|
+
$[1] = a;
|
|
18
|
+
$[2] = c;
|
|
19
|
+
$[3] = i;
|
|
20
|
+
$[4] = o;
|
|
21
|
+
$[5] = rest;
|
|
22
|
+
$[6] = style;
|
|
23
|
+
} else {
|
|
24
|
+
a = $[1];
|
|
25
|
+
c = $[2];
|
|
26
|
+
i = $[3];
|
|
27
|
+
o = $[4];
|
|
28
|
+
rest = $[5];
|
|
29
|
+
style = $[6];
|
|
30
|
+
}
|
|
7
31
|
const s = 2 * Math.PI / c - a;
|
|
8
|
-
|
|
32
|
+
const arc = function(radius, startAngle, endAngle, t0) {
|
|
33
|
+
const options = void 0 === t0 ? {} : t0;
|
|
9
34
|
return drawArc(o, o, radius, startAngle, endAngle, options);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
35
|
+
};
|
|
36
|
+
const t1 = 2 * o;
|
|
37
|
+
const t2 = 2 * o;
|
|
38
|
+
const t3 = `path("${Array(c).fill(0).map((it, idx)=>`${arc(o, idx * (a + s), idx * (a + s) + a)} ${arc(i, idx * (a + s) + a, idx * (a + s), {
|
|
39
|
+
line: true,
|
|
40
|
+
anticlockwise: true
|
|
41
|
+
})}`).join(" ")} Z")`;
|
|
42
|
+
let t4;
|
|
43
|
+
if ($[7] !== style || $[8] !== t1 || $[9] !== t2 || $[10] !== t3) {
|
|
44
|
+
t4 = {
|
|
45
|
+
width: t1,
|
|
46
|
+
height: t2,
|
|
47
|
+
clipPath: t3,
|
|
20
48
|
...style
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
49
|
+
};
|
|
50
|
+
$[7] = style;
|
|
51
|
+
$[8] = t1;
|
|
52
|
+
$[9] = t2;
|
|
53
|
+
$[10] = t3;
|
|
54
|
+
$[11] = t4;
|
|
55
|
+
} else t4 = $[11];
|
|
56
|
+
let t5;
|
|
57
|
+
if ($[12] !== ref || $[13] !== rest || $[14] !== t4) {
|
|
58
|
+
t5 = /*#__PURE__*/ jsx("div", {
|
|
59
|
+
ref: ref,
|
|
60
|
+
style: t4,
|
|
61
|
+
...rest
|
|
62
|
+
});
|
|
63
|
+
$[12] = ref;
|
|
64
|
+
$[13] = rest;
|
|
65
|
+
$[14] = t4;
|
|
66
|
+
$[15] = t5;
|
|
67
|
+
} else t5 = $[15];
|
|
68
|
+
return t5;
|
|
24
69
|
});
|
|
25
70
|
export { SectionRing };
|
|
@@ -28,48 +28,138 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
TransitionBox: ()=>TransitionBox
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
31
32
|
const external_react_namespaceObject = require("react");
|
|
32
33
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
33
34
|
const TransitionBox = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
34
|
-
const
|
|
35
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(34);
|
|
36
|
+
let children;
|
|
37
|
+
let containerClassName;
|
|
38
|
+
let containerStyle;
|
|
39
|
+
let rest;
|
|
40
|
+
let style;
|
|
41
|
+
let t0;
|
|
42
|
+
let t1;
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[0] !== props) {
|
|
45
|
+
({ style, containerClassName, containerStyle, children, vertical: t0, horizontal: t1, time: t2, ...rest } = props);
|
|
46
|
+
$[0] = props;
|
|
47
|
+
$[1] = children;
|
|
48
|
+
$[2] = containerClassName;
|
|
49
|
+
$[3] = containerStyle;
|
|
50
|
+
$[4] = rest;
|
|
51
|
+
$[5] = style;
|
|
52
|
+
$[6] = t0;
|
|
53
|
+
$[7] = t1;
|
|
54
|
+
$[8] = t2;
|
|
55
|
+
} else {
|
|
56
|
+
children = $[1];
|
|
57
|
+
containerClassName = $[2];
|
|
58
|
+
containerStyle = $[3];
|
|
59
|
+
rest = $[4];
|
|
60
|
+
style = $[5];
|
|
61
|
+
t0 = $[6];
|
|
62
|
+
t1 = $[7];
|
|
63
|
+
t2 = $[8];
|
|
64
|
+
}
|
|
65
|
+
const vertical = void 0 === t0 ? true : t0;
|
|
66
|
+
const horizontal = void 0 === t1 ? true : t1;
|
|
67
|
+
const time = void 0 === t2 ? 3000 : t2;
|
|
35
68
|
const container = (0, external_react_namespaceObject.useRef)(null);
|
|
36
69
|
const size = (0, external_soda_hooks_namespaceObject.useSize)(container);
|
|
37
|
-
const width = size
|
|
38
|
-
const height = size
|
|
70
|
+
const width = (null == size ? void 0 : size.width) ?? 0;
|
|
71
|
+
const height = (null == size ? void 0 : size.height) ?? 0;
|
|
39
72
|
const [count, setCount] = (0, external_react_namespaceObject.useState)(0);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
73
|
+
let t3;
|
|
74
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
|
+
t3 = ()=>{
|
|
76
|
+
setCount(_temp);
|
|
77
|
+
};
|
|
78
|
+
$[9] = t3;
|
|
79
|
+
} else t3 = $[9];
|
|
80
|
+
let t4;
|
|
81
|
+
if ($[10] !== height || $[11] !== width) {
|
|
82
|
+
t4 = [
|
|
83
|
+
width,
|
|
84
|
+
height
|
|
85
|
+
];
|
|
86
|
+
$[10] = height;
|
|
87
|
+
$[11] = width;
|
|
88
|
+
$[12] = t4;
|
|
89
|
+
} else t4 = $[12];
|
|
90
|
+
(0, external_react_namespaceObject.useEffect)(t3, t4);
|
|
91
|
+
let t5;
|
|
92
|
+
if ($[13] !== count || $[14] !== horizontal || $[15] !== vertical) {
|
|
93
|
+
t5 = 3 === count ? [
|
|
48
94
|
horizontal && "width",
|
|
49
95
|
vertical && "height"
|
|
50
|
-
].filter(Boolean).join(", ") : void 0
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
96
|
+
].filter(Boolean).join(", ") : void 0;
|
|
97
|
+
$[13] = count;
|
|
98
|
+
$[14] = horizontal;
|
|
99
|
+
$[15] = vertical;
|
|
100
|
+
$[16] = t5;
|
|
101
|
+
} else t5 = $[16];
|
|
102
|
+
const t6 = 3 === count ? `${time}ms` : void 0;
|
|
103
|
+
let t7;
|
|
104
|
+
if ($[17] !== height || $[18] !== style || $[19] !== t5 || $[20] !== t6 || $[21] !== width) {
|
|
105
|
+
t7 = {
|
|
106
|
+
transitionProperty: t5,
|
|
107
|
+
transitionDuration: t6,
|
|
108
|
+
width,
|
|
109
|
+
height,
|
|
110
|
+
overflow: "hidden",
|
|
111
|
+
position: "relative",
|
|
112
|
+
...style
|
|
113
|
+
};
|
|
114
|
+
$[17] = height;
|
|
115
|
+
$[18] = style;
|
|
116
|
+
$[19] = t5;
|
|
117
|
+
$[20] = t6;
|
|
118
|
+
$[21] = width;
|
|
119
|
+
$[22] = t7;
|
|
120
|
+
} else t7 = $[22];
|
|
121
|
+
const outerStyle = t7;
|
|
122
|
+
let t8;
|
|
123
|
+
if ($[23] !== containerStyle) {
|
|
124
|
+
t8 = {
|
|
125
|
+
position: "absolute",
|
|
126
|
+
...containerStyle
|
|
127
|
+
};
|
|
128
|
+
$[23] = containerStyle;
|
|
129
|
+
$[24] = t8;
|
|
130
|
+
} else t8 = $[24];
|
|
131
|
+
let t9;
|
|
132
|
+
if ($[25] !== children || $[26] !== containerClassName || $[27] !== t8) {
|
|
133
|
+
t9 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
63
134
|
className: containerClassName,
|
|
64
|
-
style:
|
|
65
|
-
position: "absolute",
|
|
66
|
-
...containerStyle
|
|
67
|
-
},
|
|
135
|
+
style: t8,
|
|
68
136
|
ref: container,
|
|
69
137
|
children: children
|
|
70
|
-
})
|
|
71
|
-
|
|
138
|
+
});
|
|
139
|
+
$[25] = children;
|
|
140
|
+
$[26] = containerClassName;
|
|
141
|
+
$[27] = t8;
|
|
142
|
+
$[28] = t9;
|
|
143
|
+
} else t9 = $[28];
|
|
144
|
+
let t10;
|
|
145
|
+
if ($[29] !== outerStyle || $[30] !== ref || $[31] !== rest || $[32] !== t9) {
|
|
146
|
+
t10 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
147
|
+
ref: ref,
|
|
148
|
+
style: outerStyle,
|
|
149
|
+
...rest,
|
|
150
|
+
children: t9
|
|
151
|
+
});
|
|
152
|
+
$[29] = outerStyle;
|
|
153
|
+
$[30] = ref;
|
|
154
|
+
$[31] = rest;
|
|
155
|
+
$[32] = t9;
|
|
156
|
+
$[33] = t10;
|
|
157
|
+
} else t10 = $[33];
|
|
158
|
+
return t10;
|
|
72
159
|
});
|
|
160
|
+
function _temp(count_0) {
|
|
161
|
+
return Math.min(count_0 + 1, 3);
|
|
162
|
+
}
|
|
73
163
|
exports.TransitionBox = __webpack_exports__.TransitionBox;
|
|
74
164
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
75
165
|
"TransitionBox"
|