deepsea-components 5.16.16 → 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.
- package/dist/components/AutoFit.cjs +9 -9
- package/dist/components/AutoFit.js +9 -9
- package/dist/components/AutoScroll.cjs +4 -4
- package/dist/components/AutoScroll.js +4 -4
- package/dist/components/AutoSizeTextarea.cjs +23 -81
- package/dist/components/AutoSizeTextarea.js +23 -81
- package/dist/components/CircleText.cjs +24 -120
- package/dist/components/CircleText.js +24 -120
- package/dist/components/CopyButton.cjs +2 -2
- package/dist/components/CopyButton.js +2 -2
- package/dist/components/DraggableGrid.cjs +98 -149
- package/dist/components/DraggableGrid.js +98 -149
- package/dist/components/Echart.cjs +24 -94
- package/dist/components/Echart.js +24 -94
- package/dist/components/Flow.cjs +8 -8
- package/dist/components/Flow.js +8 -8
- package/dist/components/FormLabel.cjs +27 -92
- package/dist/components/FormLabel.js +27 -92
- package/dist/components/HlsPlayer.cjs +24 -65
- package/dist/components/HlsPlayer.js +24 -65
- package/dist/components/IconFileType.cjs +4 -14
- package/dist/components/IconFileType.js +4 -14
- package/dist/components/InfiniteScroll.cjs +4 -4
- package/dist/components/InfiniteScroll.js +4 -4
- package/dist/components/InputFileButton.cjs +7 -7
- package/dist/components/InputFileButton.js +7 -7
- package/dist/components/ReadSheet.cjs +7 -32
- package/dist/components/ReadSheet.js +7 -32
- package/dist/components/Ring.cjs +10 -48
- package/dist/components/Ring.js +10 -48
- package/dist/components/ScrollMask.cjs +11 -97
- package/dist/components/ScrollMask.js +11 -97
- package/dist/components/SectionRing.cjs +15 -60
- package/dist/components/SectionRing.js +15 -60
- package/dist/components/TransitionBox.cjs +28 -118
- package/dist/components/TransitionBox.js +28 -118
- package/dist/components/TransitionNum.cjs +8 -8
- package/dist/components/TransitionNum.js +8 -8
- package/dist/components/Trapezium.cjs +9 -68
- package/dist/components/Trapezium.js +9 -68
- package/dist/components/Unify.cjs +19 -79
- package/dist/components/Unify.js +19 -79
- package/package.json +2 -2
|
@@ -1,73 +1,32 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import hls_0 from "hls.js";
|
|
5
4
|
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
6
5
|
const HlsPlayer = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
|
-
const
|
|
8
|
-
let rest;
|
|
9
|
-
let src;
|
|
10
|
-
if ($[0] !== props) {
|
|
11
|
-
({ src, ...rest } = props);
|
|
12
|
-
$[0] = props;
|
|
13
|
-
$[1] = rest;
|
|
14
|
-
$[2] = src;
|
|
15
|
-
} else {
|
|
16
|
-
rest = $[1];
|
|
17
|
-
src = $[2];
|
|
18
|
-
}
|
|
6
|
+
const { src, ...rest } = props;
|
|
19
7
|
const video = useRef(null);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const hls = new hls_0();
|
|
44
|
-
hls.loadSource(src);
|
|
45
|
-
hls.attachMedia(player);
|
|
46
|
-
return ()=>{
|
|
47
|
-
hls.destroy();
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
t3 = [
|
|
52
|
-
src
|
|
53
|
-
];
|
|
54
|
-
$[5] = src;
|
|
55
|
-
$[6] = t2;
|
|
56
|
-
$[7] = t3;
|
|
57
|
-
} else {
|
|
58
|
-
t2 = $[6];
|
|
59
|
-
t3 = $[7];
|
|
60
|
-
}
|
|
61
|
-
useEffect(t2, t3);
|
|
62
|
-
let t4;
|
|
63
|
-
if ($[8] !== rest) {
|
|
64
|
-
t4 = /*#__PURE__*/ jsx("video", {
|
|
65
|
-
ref: video,
|
|
66
|
-
...rest
|
|
67
|
-
});
|
|
68
|
-
$[8] = rest;
|
|
69
|
-
$[9] = t4;
|
|
70
|
-
} else t4 = $[9];
|
|
71
|
-
return t4;
|
|
8
|
+
useImperativeHandle(ref, ()=>video.current, []);
|
|
9
|
+
useEffect(()=>{
|
|
10
|
+
const { current: player } = video;
|
|
11
|
+
if (!player || !src) return;
|
|
12
|
+
if (player.canPlayType("application/vnd.apple.mpegurl")) {
|
|
13
|
+
player.src = src;
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (hls_0.isSupported()) {
|
|
17
|
+
const hls = new hls_0();
|
|
18
|
+
hls.loadSource(src);
|
|
19
|
+
hls.attachMedia(player);
|
|
20
|
+
return ()=>{
|
|
21
|
+
hls.destroy();
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}, [
|
|
25
|
+
src
|
|
26
|
+
]);
|
|
27
|
+
return /*#__PURE__*/ jsx("video", {
|
|
28
|
+
ref: video,
|
|
29
|
+
...rest
|
|
30
|
+
});
|
|
72
31
|
});
|
|
73
32
|
export { HlsPlayer };
|
|
@@ -31,24 +31,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
IconFileTypePage: ()=>IconFileTypePage
|
|
32
32
|
});
|
|
33
33
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
-
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
35
34
|
const GOLD = (Math.sqrt(5) - 1) / 2;
|
|
36
35
|
const GOLD_T = Math.sqrt(1 - GOLD * GOLD);
|
|
37
36
|
const HANDLE_LENGTH = (1 - GOLD) * GOLD_T;
|
|
38
37
|
const FileTypeSize = 512;
|
|
39
|
-
const IconFileTypeBase = (props)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
t0 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg", {
|
|
44
|
-
viewBox: `${-(FileTypeSize / 2)} ${-(FileTypeSize / 2)} ${FileTypeSize} ${FileTypeSize}`,
|
|
45
|
-
...props
|
|
46
|
-
});
|
|
47
|
-
$[0] = props;
|
|
48
|
-
$[1] = t0;
|
|
49
|
-
} else t0 = $[1];
|
|
50
|
-
return t0;
|
|
51
|
-
};
|
|
38
|
+
const IconFileTypeBase = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("svg", {
|
|
39
|
+
viewBox: `${-(FileTypeSize / 2)} ${-(FileTypeSize / 2)} ${FileTypeSize} ${FileTypeSize}`,
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
52
42
|
const IconFileTypePage = ({ pageColor = "#f31260", pageWidth = 0.75 * FileTypeSize, pageBessel = 0.75 * FileTypeSize * GOLD, ...rest })=>{
|
|
53
43
|
const radius = pageBessel * (1 - GOLD);
|
|
54
44
|
const offset = pageBessel * HANDLE_LENGTH;
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
2
|
const GOLD = (Math.sqrt(5) - 1) / 2;
|
|
4
3
|
const GOLD_T = Math.sqrt(1 - GOLD * GOLD);
|
|
5
4
|
const HANDLE_LENGTH = (1 - GOLD) * GOLD_T;
|
|
6
5
|
const FileTypeSize = 512;
|
|
7
|
-
const IconFileTypeBase = (props)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
t0 = /*#__PURE__*/ jsx("svg", {
|
|
12
|
-
viewBox: `${-(FileTypeSize / 2)} ${-(FileTypeSize / 2)} ${FileTypeSize} ${FileTypeSize}`,
|
|
13
|
-
...props
|
|
14
|
-
});
|
|
15
|
-
$[0] = props;
|
|
16
|
-
$[1] = t0;
|
|
17
|
-
} else t0 = $[1];
|
|
18
|
-
return t0;
|
|
19
|
-
};
|
|
6
|
+
const IconFileTypeBase = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
7
|
+
viewBox: `${-(FileTypeSize / 2)} ${-(FileTypeSize / 2)} ${FileTypeSize} ${FileTypeSize}`,
|
|
8
|
+
...props
|
|
9
|
+
});
|
|
20
10
|
const IconFileTypePage = ({ pageColor = "#f31260", pageWidth = 0.75 * FileTypeSize, pageBessel = 0.75 * FileTypeSize * GOLD, ...rest })=>{
|
|
21
11
|
const radius = pageBessel * (1 - GOLD);
|
|
22
12
|
const offset = pageBessel * HANDLE_LENGTH;
|
|
@@ -42,8 +42,8 @@ const InfiniteScroll = /*#__PURE__*/ (0, external_react_namespaceObject.forwardR
|
|
|
42
42
|
]);
|
|
43
43
|
const container = (0, external_react_namespaceObject.useRef)(null);
|
|
44
44
|
const containerSize = (0, external_soda_hooks_namespaceObject.useSize)(container);
|
|
45
|
-
function bigger(
|
|
46
|
-
return withEqual ?
|
|
45
|
+
function bigger(containerSize, wrapperSize) {
|
|
46
|
+
return withEqual ? containerSize + (withGap ? gap : 0) >= wrapperSize : containerSize + (withGap ? gap : 0) > wrapperSize;
|
|
47
47
|
}
|
|
48
48
|
const overflow = wrapperSize && containerSize ? "vertical" === direction ? bigger(containerSize.height, wrapperSize.height) : bigger(containerSize.width, wrapperSize.width) : false;
|
|
49
49
|
const animation = (0, external_react_namespaceObject.useRef)(void 0);
|
|
@@ -78,10 +78,10 @@ const InfiniteScroll = /*#__PURE__*/ (0, external_react_namespaceObject.forwardR
|
|
|
78
78
|
if (pauseOnHover) null == (_animation_current = animation.current) || _animation_current.pause();
|
|
79
79
|
null == onMouseEnter || onMouseEnter(e);
|
|
80
80
|
}
|
|
81
|
-
function leave(
|
|
81
|
+
function leave(e) {
|
|
82
82
|
var _animation_current;
|
|
83
83
|
if (pauseOnHover) null == (_animation_current = animation.current) || _animation_current.play();
|
|
84
|
-
null == onMouseLeave || onMouseLeave(
|
|
84
|
+
null == onMouseLeave || onMouseLeave(e);
|
|
85
85
|
}
|
|
86
86
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
87
87
|
var _animation_current, _animation_current1;
|
|
@@ -14,8 +14,8 @@ const InfiniteScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
14
14
|
]);
|
|
15
15
|
const container = useRef(null);
|
|
16
16
|
const containerSize = useSize(container);
|
|
17
|
-
function bigger(
|
|
18
|
-
return withEqual ?
|
|
17
|
+
function bigger(containerSize, wrapperSize) {
|
|
18
|
+
return withEqual ? containerSize + (withGap ? gap : 0) >= wrapperSize : containerSize + (withGap ? gap : 0) > wrapperSize;
|
|
19
19
|
}
|
|
20
20
|
const overflow = wrapperSize && containerSize ? "vertical" === direction ? bigger(containerSize.height, wrapperSize.height) : bigger(containerSize.width, wrapperSize.width) : false;
|
|
21
21
|
const animation = useRef(void 0);
|
|
@@ -50,10 +50,10 @@ const InfiniteScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
50
50
|
if (pauseOnHover) null == (_animation_current = animation.current) || _animation_current.pause();
|
|
51
51
|
null == onMouseEnter || onMouseEnter(e);
|
|
52
52
|
}
|
|
53
|
-
function leave(
|
|
53
|
+
function leave(e) {
|
|
54
54
|
var _animation_current;
|
|
55
55
|
if (pauseOnHover) null == (_animation_current = animation.current) || _animation_current.play();
|
|
56
|
-
null == onMouseLeave || onMouseLeave(
|
|
56
|
+
null == onMouseLeave || onMouseLeave(e);
|
|
57
57
|
}
|
|
58
58
|
useEffect(()=>{
|
|
59
59
|
var _animation_current, _animation_current1;
|
|
@@ -43,11 +43,11 @@ function InputFileButton(props) {
|
|
|
43
43
|
null == (_input_current = input.current) || _input_current.click();
|
|
44
44
|
null == _onClick || _onClick(e);
|
|
45
45
|
}
|
|
46
|
-
async function onDrop(
|
|
47
|
-
null == _onDrop || _onDrop(
|
|
46
|
+
async function onDrop(e) {
|
|
47
|
+
null == _onDrop || _onDrop(e);
|
|
48
48
|
if (disabled || !dragFile) return;
|
|
49
|
-
|
|
50
|
-
const { files } =
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
const { files } = e.dataTransfer;
|
|
51
51
|
if (!files || 0 === files.length) return;
|
|
52
52
|
setDisabled(true);
|
|
53
53
|
try {
|
|
@@ -78,10 +78,10 @@ function InputFileButton(props) {
|
|
|
78
78
|
setDisabled(false);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function onDragOver(
|
|
82
|
-
null == _onDragOver || _onDragOver(
|
|
81
|
+
function onDragOver(e) {
|
|
82
|
+
null == _onDragOver || _onDragOver(e);
|
|
83
83
|
if (disabled || !dragFile) return;
|
|
84
|
-
|
|
84
|
+
e.preventDefault();
|
|
85
85
|
}
|
|
86
86
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_react_namespaceObject.Fragment, {
|
|
87
87
|
children: [
|
|
@@ -15,11 +15,11 @@ function InputFileButton(props) {
|
|
|
15
15
|
null == (_input_current = input.current) || _input_current.click();
|
|
16
16
|
null == _onClick || _onClick(e);
|
|
17
17
|
}
|
|
18
|
-
async function onDrop(
|
|
19
|
-
null == _onDrop || _onDrop(
|
|
18
|
+
async function onDrop(e) {
|
|
19
|
+
null == _onDrop || _onDrop(e);
|
|
20
20
|
if (disabled || !dragFile) return;
|
|
21
|
-
|
|
22
|
-
const { files } =
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
const { files } = e.dataTransfer;
|
|
23
23
|
if (!files || 0 === files.length) return;
|
|
24
24
|
setDisabled(true);
|
|
25
25
|
try {
|
|
@@ -50,10 +50,10 @@ function InputFileButton(props) {
|
|
|
50
50
|
setDisabled(false);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function onDragOver(
|
|
54
|
-
null == _onDragOver || _onDragOver(
|
|
53
|
+
function onDragOver(e) {
|
|
54
|
+
null == _onDragOver || _onDragOver(e);
|
|
55
55
|
if (disabled || !dragFile) return;
|
|
56
|
-
|
|
56
|
+
e.preventDefault();
|
|
57
57
|
}
|
|
58
58
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
59
59
|
children: [
|
|
@@ -28,41 +28,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
ReadSheet: ()=>ReadSheet
|
|
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_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
32
|
const external_InputFile_cjs_namespaceObject = require("./InputFile.cjs");
|
|
34
33
|
const ReadSheet = (props)=>{
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
$[2] = rest;
|
|
43
|
-
} else {
|
|
44
|
-
onValueChange = $[1];
|
|
45
|
-
rest = $[2];
|
|
46
|
-
}
|
|
47
|
-
let t0;
|
|
48
|
-
if ($[3] !== onValueChange) {
|
|
49
|
-
t0 = (data)=>null == onValueChange ? void 0 : onValueChange((0, external_deepsea_tools_namespaceObject.readSheet)(data));
|
|
50
|
-
$[3] = onValueChange;
|
|
51
|
-
$[4] = t0;
|
|
52
|
-
} else t0 = $[4];
|
|
53
|
-
let t1;
|
|
54
|
-
if ($[5] !== rest || $[6] !== t0) {
|
|
55
|
-
t1 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_InputFile_cjs_namespaceObject.InputFile, {
|
|
56
|
-
accept: ".xlsx",
|
|
57
|
-
type: "arrayBuffer",
|
|
58
|
-
onValueChange: t0,
|
|
59
|
-
...rest
|
|
60
|
-
});
|
|
61
|
-
$[5] = rest;
|
|
62
|
-
$[6] = t0;
|
|
63
|
-
$[7] = t1;
|
|
64
|
-
} else t1 = $[7];
|
|
65
|
-
return t1;
|
|
34
|
+
const { onValueChange, ...rest } = props;
|
|
35
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_InputFile_cjs_namespaceObject.InputFile, {
|
|
36
|
+
accept: ".xlsx",
|
|
37
|
+
type: "arrayBuffer",
|
|
38
|
+
onValueChange: (data)=>null == onValueChange ? void 0 : onValueChange((0, external_deepsea_tools_namespaceObject.readSheet)(data)),
|
|
39
|
+
...rest
|
|
40
|
+
});
|
|
66
41
|
};
|
|
67
42
|
exports.ReadSheet = __webpack_exports__.ReadSheet;
|
|
68
43
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
@@ -1,39 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { readSheet } from "deepsea-tools";
|
|
5
4
|
import { InputFile } from "./InputFile.js";
|
|
6
5
|
const ReadSheet = (props)=>{
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$[2] = rest;
|
|
15
|
-
} else {
|
|
16
|
-
onValueChange = $[1];
|
|
17
|
-
rest = $[2];
|
|
18
|
-
}
|
|
19
|
-
let t0;
|
|
20
|
-
if ($[3] !== onValueChange) {
|
|
21
|
-
t0 = (data)=>null == onValueChange ? void 0 : onValueChange(readSheet(data));
|
|
22
|
-
$[3] = onValueChange;
|
|
23
|
-
$[4] = t0;
|
|
24
|
-
} else t0 = $[4];
|
|
25
|
-
let t1;
|
|
26
|
-
if ($[5] !== rest || $[6] !== t0) {
|
|
27
|
-
t1 = /*#__PURE__*/ jsx(InputFile, {
|
|
28
|
-
accept: ".xlsx",
|
|
29
|
-
type: "arrayBuffer",
|
|
30
|
-
onValueChange: t0,
|
|
31
|
-
...rest
|
|
32
|
-
});
|
|
33
|
-
$[5] = rest;
|
|
34
|
-
$[6] = t0;
|
|
35
|
-
$[7] = t1;
|
|
36
|
-
} else t1 = $[7];
|
|
37
|
-
return t1;
|
|
6
|
+
const { onValueChange, ...rest } = props;
|
|
7
|
+
return /*#__PURE__*/ jsx(InputFile, {
|
|
8
|
+
accept: ".xlsx",
|
|
9
|
+
type: "arrayBuffer",
|
|
10
|
+
onValueChange: (data)=>null == onValueChange ? void 0 : onValueChange(readSheet(data)),
|
|
11
|
+
...rest
|
|
12
|
+
});
|
|
38
13
|
};
|
|
39
14
|
export { ReadSheet };
|
package/dist/components/Ring.cjs
CHANGED
|
@@ -28,59 +28,21 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
Ring: ()=>Ring
|
|
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 Ring = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
34
|
-
const
|
|
35
|
-
let innerWidth;
|
|
36
|
-
let outerWidth;
|
|
37
|
-
let rest;
|
|
38
|
-
let style;
|
|
39
|
-
if ($[0] !== props) {
|
|
40
|
-
({ outerWidth, innerWidth, style, ...rest } = props);
|
|
41
|
-
$[0] = props;
|
|
42
|
-
$[1] = innerWidth;
|
|
43
|
-
$[2] = outerWidth;
|
|
44
|
-
$[3] = rest;
|
|
45
|
-
$[4] = style;
|
|
46
|
-
} else {
|
|
47
|
-
innerWidth = $[1];
|
|
48
|
-
outerWidth = $[2];
|
|
49
|
-
rest = $[3];
|
|
50
|
-
style = $[4];
|
|
51
|
-
}
|
|
33
|
+
const { outerWidth, innerWidth, style, ...rest } = props;
|
|
52
34
|
const outerRadius = outerWidth / 2;
|
|
53
35
|
const innerRadius = innerWidth / 2;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
let t3;
|
|
58
|
-
if ($[5] !== style || $[6] !== t0 || $[7] !== t1 || $[8] !== t2) {
|
|
59
|
-
t3 = {
|
|
36
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
37
|
+
ref: ref,
|
|
38
|
+
style: {
|
|
60
39
|
...style,
|
|
61
|
-
width:
|
|
62
|
-
height:
|
|
63
|
-
clipPath:
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
$[7] = t1;
|
|
68
|
-
$[8] = t2;
|
|
69
|
-
$[9] = t3;
|
|
70
|
-
} else t3 = $[9];
|
|
71
|
-
let t4;
|
|
72
|
-
if ($[10] !== ref || $[11] !== rest || $[12] !== t3) {
|
|
73
|
-
t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
74
|
-
ref: ref,
|
|
75
|
-
style: t3,
|
|
76
|
-
...rest
|
|
77
|
-
});
|
|
78
|
-
$[10] = ref;
|
|
79
|
-
$[11] = rest;
|
|
80
|
-
$[12] = t3;
|
|
81
|
-
$[13] = t4;
|
|
82
|
-
} else t4 = $[13];
|
|
83
|
-
return t4;
|
|
40
|
+
width: `${outerWidth}px`,
|
|
41
|
+
height: `${outerWidth}px`,
|
|
42
|
+
clipPath: `path("M0,${outerRadius} a${outerRadius},${outerRadius},0,1,0,${outerWidth},0 a${outerRadius},${outerRadius},0,1,0,-${outerWidth},0 l${outerRadius - innerRadius},0 a${innerRadius},${innerRadius},0,0,1,${2 * innerRadius},0 a${innerRadius},${innerRadius},0,0,1,-${2 * innerRadius},0 Z")`
|
|
43
|
+
},
|
|
44
|
+
...rest
|
|
45
|
+
});
|
|
84
46
|
});
|
|
85
47
|
exports.Ring = __webpack_exports__.Ring;
|
|
86
48
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
package/dist/components/Ring.js
CHANGED
|
@@ -1,57 +1,19 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
3
|
import { forwardRef } from "react";
|
|
5
4
|
const Ring = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
|
-
const
|
|
7
|
-
let innerWidth;
|
|
8
|
-
let outerWidth;
|
|
9
|
-
let rest;
|
|
10
|
-
let style;
|
|
11
|
-
if ($[0] !== props) {
|
|
12
|
-
({ outerWidth, innerWidth, style, ...rest } = props);
|
|
13
|
-
$[0] = props;
|
|
14
|
-
$[1] = innerWidth;
|
|
15
|
-
$[2] = outerWidth;
|
|
16
|
-
$[3] = rest;
|
|
17
|
-
$[4] = style;
|
|
18
|
-
} else {
|
|
19
|
-
innerWidth = $[1];
|
|
20
|
-
outerWidth = $[2];
|
|
21
|
-
rest = $[3];
|
|
22
|
-
style = $[4];
|
|
23
|
-
}
|
|
5
|
+
const { outerWidth, innerWidth, style, ...rest } = props;
|
|
24
6
|
const outerRadius = outerWidth / 2;
|
|
25
7
|
const innerRadius = innerWidth / 2;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
let t3;
|
|
30
|
-
if ($[5] !== style || $[6] !== t0 || $[7] !== t1 || $[8] !== t2) {
|
|
31
|
-
t3 = {
|
|
8
|
+
return /*#__PURE__*/ jsx("div", {
|
|
9
|
+
ref: ref,
|
|
10
|
+
style: {
|
|
32
11
|
...style,
|
|
33
|
-
width:
|
|
34
|
-
height:
|
|
35
|
-
clipPath:
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
$[7] = t1;
|
|
40
|
-
$[8] = t2;
|
|
41
|
-
$[9] = t3;
|
|
42
|
-
} else t3 = $[9];
|
|
43
|
-
let t4;
|
|
44
|
-
if ($[10] !== ref || $[11] !== rest || $[12] !== t3) {
|
|
45
|
-
t4 = /*#__PURE__*/ jsx("div", {
|
|
46
|
-
ref: ref,
|
|
47
|
-
style: t3,
|
|
48
|
-
...rest
|
|
49
|
-
});
|
|
50
|
-
$[10] = ref;
|
|
51
|
-
$[11] = rest;
|
|
52
|
-
$[12] = t3;
|
|
53
|
-
$[13] = t4;
|
|
54
|
-
} else t4 = $[13];
|
|
55
|
-
return t4;
|
|
12
|
+
width: `${outerWidth}px`,
|
|
13
|
+
height: `${outerWidth}px`,
|
|
14
|
+
clipPath: `path("M0,${outerRadius} a${outerRadius},${outerRadius},0,1,0,${outerWidth},0 a${outerRadius},${outerRadius},0,1,0,-${outerWidth},0 l${outerRadius - innerRadius},0 a${innerRadius},${innerRadius},0,0,1,${2 * innerRadius},0 a${innerRadius},${innerRadius},0,0,1,-${2 * innerRadius},0 Z")`
|
|
15
|
+
},
|
|
16
|
+
...rest
|
|
17
|
+
});
|
|
56
18
|
});
|
|
57
19
|
export { Ring };
|
|
@@ -36,118 +36,32 @@ __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");
|
|
40
39
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
41
40
|
const external_react_namespaceObject = require("react");
|
|
42
41
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
43
42
|
const external_ScrollMask_module_cjs_namespaceObject = require("./ScrollMask.module.cjs");
|
|
44
43
|
var external_ScrollMask_module_cjs_default = /*#__PURE__*/ __webpack_require__.n(external_ScrollMask_module_cjs_namespaceObject);
|
|
45
|
-
const ScrollMask = (
|
|
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;
|
|
44
|
+
const ScrollMask = ({ className, style, position = "top", size = 8, from = "rgba(0, 0, 0, 0.1)", to = "rgba(0, 0, 0, 0)", contentClassName, contentStyle, showRadian = false, ...rest })=>{
|
|
87
45
|
const ref = (0, external_react_namespaceObject.useRef)(null);
|
|
88
46
|
const contentSize = (0, external_soda_hooks_namespaceObject.useSize)(ref);
|
|
89
47
|
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;
|
|
90
48
|
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";
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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,
|
|
49
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
50
|
+
className: (0, external_deepsea_tools_namespaceObject.clsx)(external_ScrollMask_module_cjs_default()["scroll-mask"], external_ScrollMask_module_cjs_default()[`${position}-scroll-mask`], className),
|
|
51
|
+
style: {
|
|
52
|
+
"--scroll-mask-size": `${size}px`,
|
|
104
53
|
"--scroll-mask-color-from": from,
|
|
105
54
|
"--scroll-mask-color-to": to,
|
|
106
55
|
"--scroll-mask-clip-path": clipPath,
|
|
107
56
|
...style
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
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", {
|
|
57
|
+
},
|
|
58
|
+
...rest,
|
|
59
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
128
60
|
ref: ref,
|
|
129
|
-
className:
|
|
61
|
+
className: (0, external_deepsea_tools_namespaceObject.clsx)(external_ScrollMask_module_cjs_default()["scroll-mask-content"], external_ScrollMask_module_cjs_default()[`${position}-scroll-mask-content`], contentClassName),
|
|
130
62
|
style: contentStyle
|
|
131
|
-
})
|
|
132
|
-
|
|
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;
|
|
63
|
+
})
|
|
64
|
+
});
|
|
151
65
|
};
|
|
152
66
|
exports.ScrollMask = __webpack_exports__.ScrollMask;
|
|
153
67
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|