deepsea-components 5.16.4 → 5.16.6
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 +3 -3
- package/src/components/DraggableGrid.tsx +510 -506
|
@@ -1,45 +1,135 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { forwardRef, useEffect, useRef, useState } from "react";
|
|
4
5
|
import { useSize } from "soda-hooks";
|
|
5
6
|
const TransitionBox = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
|
-
const
|
|
7
|
+
const $ = c(34);
|
|
8
|
+
let children;
|
|
9
|
+
let containerClassName;
|
|
10
|
+
let containerStyle;
|
|
11
|
+
let rest;
|
|
12
|
+
let style;
|
|
13
|
+
let t0;
|
|
14
|
+
let t1;
|
|
15
|
+
let t2;
|
|
16
|
+
if ($[0] !== props) {
|
|
17
|
+
({ style, containerClassName, containerStyle, children, vertical: t0, horizontal: t1, time: t2, ...rest } = props);
|
|
18
|
+
$[0] = props;
|
|
19
|
+
$[1] = children;
|
|
20
|
+
$[2] = containerClassName;
|
|
21
|
+
$[3] = containerStyle;
|
|
22
|
+
$[4] = rest;
|
|
23
|
+
$[5] = style;
|
|
24
|
+
$[6] = t0;
|
|
25
|
+
$[7] = t1;
|
|
26
|
+
$[8] = t2;
|
|
27
|
+
} else {
|
|
28
|
+
children = $[1];
|
|
29
|
+
containerClassName = $[2];
|
|
30
|
+
containerStyle = $[3];
|
|
31
|
+
rest = $[4];
|
|
32
|
+
style = $[5];
|
|
33
|
+
t0 = $[6];
|
|
34
|
+
t1 = $[7];
|
|
35
|
+
t2 = $[8];
|
|
36
|
+
}
|
|
37
|
+
const vertical = void 0 === t0 ? true : t0;
|
|
38
|
+
const horizontal = void 0 === t1 ? true : t1;
|
|
39
|
+
const time = void 0 === t2 ? 3000 : t2;
|
|
7
40
|
const container = useRef(null);
|
|
8
41
|
const size = useSize(container);
|
|
9
|
-
const width = size
|
|
10
|
-
const height = size
|
|
42
|
+
const width = (null == size ? void 0 : size.width) ?? 0;
|
|
43
|
+
const height = (null == size ? void 0 : size.height) ?? 0;
|
|
11
44
|
const [count, setCount] = useState(0);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
45
|
+
let t3;
|
|
46
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
47
|
+
t3 = ()=>{
|
|
48
|
+
setCount(_temp);
|
|
49
|
+
};
|
|
50
|
+
$[9] = t3;
|
|
51
|
+
} else t3 = $[9];
|
|
52
|
+
let t4;
|
|
53
|
+
if ($[10] !== height || $[11] !== width) {
|
|
54
|
+
t4 = [
|
|
55
|
+
width,
|
|
56
|
+
height
|
|
57
|
+
];
|
|
58
|
+
$[10] = height;
|
|
59
|
+
$[11] = width;
|
|
60
|
+
$[12] = t4;
|
|
61
|
+
} else t4 = $[12];
|
|
62
|
+
useEffect(t3, t4);
|
|
63
|
+
let t5;
|
|
64
|
+
if ($[13] !== count || $[14] !== horizontal || $[15] !== vertical) {
|
|
65
|
+
t5 = 3 === count ? [
|
|
20
66
|
horizontal && "width",
|
|
21
67
|
vertical && "height"
|
|
22
|
-
].filter(Boolean).join(", ") : void 0
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
68
|
+
].filter(Boolean).join(", ") : void 0;
|
|
69
|
+
$[13] = count;
|
|
70
|
+
$[14] = horizontal;
|
|
71
|
+
$[15] = vertical;
|
|
72
|
+
$[16] = t5;
|
|
73
|
+
} else t5 = $[16];
|
|
74
|
+
const t6 = 3 === count ? `${time}ms` : void 0;
|
|
75
|
+
let t7;
|
|
76
|
+
if ($[17] !== height || $[18] !== style || $[19] !== t5 || $[20] !== t6 || $[21] !== width) {
|
|
77
|
+
t7 = {
|
|
78
|
+
transitionProperty: t5,
|
|
79
|
+
transitionDuration: t6,
|
|
80
|
+
width,
|
|
81
|
+
height,
|
|
82
|
+
overflow: "hidden",
|
|
83
|
+
position: "relative",
|
|
84
|
+
...style
|
|
85
|
+
};
|
|
86
|
+
$[17] = height;
|
|
87
|
+
$[18] = style;
|
|
88
|
+
$[19] = t5;
|
|
89
|
+
$[20] = t6;
|
|
90
|
+
$[21] = width;
|
|
91
|
+
$[22] = t7;
|
|
92
|
+
} else t7 = $[22];
|
|
93
|
+
const outerStyle = t7;
|
|
94
|
+
let t8;
|
|
95
|
+
if ($[23] !== containerStyle) {
|
|
96
|
+
t8 = {
|
|
97
|
+
position: "absolute",
|
|
98
|
+
...containerStyle
|
|
99
|
+
};
|
|
100
|
+
$[23] = containerStyle;
|
|
101
|
+
$[24] = t8;
|
|
102
|
+
} else t8 = $[24];
|
|
103
|
+
let t9;
|
|
104
|
+
if ($[25] !== children || $[26] !== containerClassName || $[27] !== t8) {
|
|
105
|
+
t9 = /*#__PURE__*/ jsx("div", {
|
|
35
106
|
className: containerClassName,
|
|
36
|
-
style:
|
|
37
|
-
position: "absolute",
|
|
38
|
-
...containerStyle
|
|
39
|
-
},
|
|
107
|
+
style: t8,
|
|
40
108
|
ref: container,
|
|
41
109
|
children: children
|
|
42
|
-
})
|
|
43
|
-
|
|
110
|
+
});
|
|
111
|
+
$[25] = children;
|
|
112
|
+
$[26] = containerClassName;
|
|
113
|
+
$[27] = t8;
|
|
114
|
+
$[28] = t9;
|
|
115
|
+
} else t9 = $[28];
|
|
116
|
+
let t10;
|
|
117
|
+
if ($[29] !== outerStyle || $[30] !== ref || $[31] !== rest || $[32] !== t9) {
|
|
118
|
+
t10 = /*#__PURE__*/ jsx("div", {
|
|
119
|
+
ref: ref,
|
|
120
|
+
style: outerStyle,
|
|
121
|
+
...rest,
|
|
122
|
+
children: t9
|
|
123
|
+
});
|
|
124
|
+
$[29] = outerStyle;
|
|
125
|
+
$[30] = ref;
|
|
126
|
+
$[31] = rest;
|
|
127
|
+
$[32] = t9;
|
|
128
|
+
$[33] = t10;
|
|
129
|
+
} else t10 = $[33];
|
|
130
|
+
return t10;
|
|
44
131
|
});
|
|
132
|
+
function _temp(count_0) {
|
|
133
|
+
return Math.min(count_0 + 1, 3);
|
|
134
|
+
}
|
|
45
135
|
export { TransitionBox };
|
|
@@ -51,19 +51,19 @@ const TransitionNum = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRe
|
|
|
51
51
|
get: ()=>cache.current.show
|
|
52
52
|
}), []);
|
|
53
53
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
54
|
-
const { num, period, show, numToStr } = cache.current;
|
|
55
|
-
ele.current.innerText = (
|
|
56
|
-
if (
|
|
54
|
+
const { num: num_0, period: period_0, show, numToStr: numToStr_0 } = cache.current;
|
|
55
|
+
ele.current.innerText = (numToStr_0 || String)(show);
|
|
56
|
+
if (num_0 === show) return;
|
|
57
57
|
const div = ele.current;
|
|
58
|
-
const speed = (
|
|
58
|
+
const speed = (num_0 - show) / period_0;
|
|
59
59
|
const cancel = (0, external_deepsea_tools_namespaceObject.setFrameInterval)(()=>{
|
|
60
|
-
const { num, numToStr } = cache.current;
|
|
60
|
+
const { num: num_1, numToStr: numToStr_1 } = cache.current;
|
|
61
61
|
cache.current.show += speed;
|
|
62
|
-
if (speed > 0 && cache.current.show >
|
|
62
|
+
if (speed > 0 && cache.current.show > num_1 || speed < 0 && cache.current.show < num_1) {
|
|
63
63
|
cancel();
|
|
64
|
-
cache.current.show =
|
|
64
|
+
cache.current.show = num_1;
|
|
65
65
|
}
|
|
66
|
-
div.innerText = (
|
|
66
|
+
div.innerText = (numToStr_1 || String)(speed > 0 ? Math.floor(cache.current.show) : Math.ceil(cache.current.show));
|
|
67
67
|
}, 1);
|
|
68
68
|
return cancel;
|
|
69
69
|
}, [
|
|
@@ -23,19 +23,19 @@ const TransitionNum = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
23
23
|
get: ()=>cache.current.show
|
|
24
24
|
}), []);
|
|
25
25
|
useEffect(()=>{
|
|
26
|
-
const { num, period, show, numToStr } = cache.current;
|
|
27
|
-
ele.current.innerText = (
|
|
28
|
-
if (
|
|
26
|
+
const { num: num_0, period: period_0, show, numToStr: numToStr_0 } = cache.current;
|
|
27
|
+
ele.current.innerText = (numToStr_0 || String)(show);
|
|
28
|
+
if (num_0 === show) return;
|
|
29
29
|
const div = ele.current;
|
|
30
|
-
const speed = (
|
|
30
|
+
const speed = (num_0 - show) / period_0;
|
|
31
31
|
const cancel = setFrameInterval(()=>{
|
|
32
|
-
const { num, numToStr } = cache.current;
|
|
32
|
+
const { num: num_1, numToStr: numToStr_1 } = cache.current;
|
|
33
33
|
cache.current.show += speed;
|
|
34
|
-
if (speed > 0 && cache.current.show >
|
|
34
|
+
if (speed > 0 && cache.current.show > num_1 || speed < 0 && cache.current.show < num_1) {
|
|
35
35
|
cancel();
|
|
36
|
-
cache.current.show =
|
|
36
|
+
cache.current.show = num_1;
|
|
37
37
|
}
|
|
38
|
-
div.innerText = (
|
|
38
|
+
div.innerText = (numToStr_1 || String)(speed > 0 ? Math.floor(cache.current.show) : Math.ceil(cache.current.show));
|
|
39
39
|
}, 1);
|
|
40
40
|
return cancel;
|
|
41
41
|
}, [
|
|
@@ -28,12 +28,39 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
Trapezium: ()=>Trapezium
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
34
|
const external_react_namespaceObject = require("react");
|
|
34
35
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
35
36
|
const Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
36
|
-
const
|
|
37
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(28);
|
|
38
|
+
let borderRadius;
|
|
39
|
+
let bottom;
|
|
40
|
+
let className;
|
|
41
|
+
let height;
|
|
42
|
+
let rest;
|
|
43
|
+
let style;
|
|
44
|
+
let top;
|
|
45
|
+
if ($[0] !== props) {
|
|
46
|
+
({ top, bottom, height, borderRadius, className, style, ...rest } = props);
|
|
47
|
+
$[0] = props;
|
|
48
|
+
$[1] = borderRadius;
|
|
49
|
+
$[2] = bottom;
|
|
50
|
+
$[3] = className;
|
|
51
|
+
$[4] = height;
|
|
52
|
+
$[5] = rest;
|
|
53
|
+
$[6] = style;
|
|
54
|
+
$[7] = top;
|
|
55
|
+
} else {
|
|
56
|
+
borderRadius = $[1];
|
|
57
|
+
bottom = $[2];
|
|
58
|
+
className = $[3];
|
|
59
|
+
height = $[4];
|
|
60
|
+
rest = $[5];
|
|
61
|
+
style = $[6];
|
|
62
|
+
top = $[7];
|
|
63
|
+
}
|
|
37
64
|
const diff = (bottom - top) / 2;
|
|
38
65
|
const a = Math.atan(height / diff) / 2;
|
|
39
66
|
const b = borderRadius / Math.tan(a);
|
|
@@ -43,20 +70,52 @@ const Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((
|
|
|
43
70
|
const f = borderRadius / Math.tan(e);
|
|
44
71
|
const g = f * Math.cos(2 * a);
|
|
45
72
|
const h = f * Math.sin(2 * a);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
73
|
+
let t0;
|
|
74
|
+
if ($[8] !== className) {
|
|
75
|
+
t0 = (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
|
|
49
76
|
width: var(--width);
|
|
50
77
|
height: var(--height);
|
|
51
78
|
clip-path: var(--clip-path);
|
|
52
|
-
`, className)
|
|
53
|
-
|
|
79
|
+
`, className);
|
|
80
|
+
$[8] = className;
|
|
81
|
+
$[9] = t0;
|
|
82
|
+
} else t0 = $[9];
|
|
83
|
+
let t1;
|
|
84
|
+
if ($[10] !== b || $[11] !== borderRadius || $[12] !== bottom || $[13] !== c || $[14] !== d || $[15] !== diff || $[16] !== f || $[17] !== g || $[18] !== h || $[19] !== height || $[20] !== style || $[21] !== top) {
|
|
85
|
+
t1 = (0, index_cjs_namespaceObject.transformCSSVariable)({
|
|
54
86
|
width: (0, index_cjs_namespaceObject.px)(bottom),
|
|
55
87
|
height: (0, index_cjs_namespaceObject.px)(height),
|
|
56
88
|
clipath: `path("M ${diff + f} 0 A ${borderRadius} ${borderRadius} 0 0 0 ${diff - g} ${h} L ${c} ${height - d} A ${borderRadius} ${borderRadius} 0 0 0 ${b} ${height} L ${bottom - b} ${height} A ${borderRadius} ${borderRadius} 0 0 0 ${bottom - c} ${height - d} L ${top + diff + g} ${h} A ${borderRadius} ${borderRadius} 0 0 0 ${top + diff - f} 0 Z")`
|
|
57
|
-
}, style)
|
|
58
|
-
|
|
59
|
-
|
|
89
|
+
}, style);
|
|
90
|
+
$[10] = b;
|
|
91
|
+
$[11] = borderRadius;
|
|
92
|
+
$[12] = bottom;
|
|
93
|
+
$[13] = c;
|
|
94
|
+
$[14] = d;
|
|
95
|
+
$[15] = diff;
|
|
96
|
+
$[16] = f;
|
|
97
|
+
$[17] = g;
|
|
98
|
+
$[18] = h;
|
|
99
|
+
$[19] = height;
|
|
100
|
+
$[20] = style;
|
|
101
|
+
$[21] = top;
|
|
102
|
+
$[22] = t1;
|
|
103
|
+
} else t1 = $[22];
|
|
104
|
+
let t2;
|
|
105
|
+
if ($[23] !== ref || $[24] !== rest || $[25] !== t0 || $[26] !== t1) {
|
|
106
|
+
t2 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
+
ref: ref,
|
|
108
|
+
className: t0,
|
|
109
|
+
style: t1,
|
|
110
|
+
...rest
|
|
111
|
+
});
|
|
112
|
+
$[23] = ref;
|
|
113
|
+
$[24] = rest;
|
|
114
|
+
$[25] = t0;
|
|
115
|
+
$[26] = t1;
|
|
116
|
+
$[27] = t2;
|
|
117
|
+
} else t2 = $[27];
|
|
118
|
+
return t2;
|
|
60
119
|
});
|
|
61
120
|
exports.Trapezium = __webpack_exports__.Trapezium;
|
|
62
121
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
@@ -1,11 +1,38 @@
|
|
|
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 { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
6
|
import { forwardRef } from "react";
|
|
6
7
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
7
8
|
const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
8
|
-
const
|
|
9
|
+
const $ = compiler_runtime_c(28);
|
|
10
|
+
let borderRadius;
|
|
11
|
+
let bottom;
|
|
12
|
+
let className;
|
|
13
|
+
let height;
|
|
14
|
+
let rest;
|
|
15
|
+
let style;
|
|
16
|
+
let top;
|
|
17
|
+
if ($[0] !== props) {
|
|
18
|
+
({ top, bottom, height, borderRadius, className, style, ...rest } = props);
|
|
19
|
+
$[0] = props;
|
|
20
|
+
$[1] = borderRadius;
|
|
21
|
+
$[2] = bottom;
|
|
22
|
+
$[3] = className;
|
|
23
|
+
$[4] = height;
|
|
24
|
+
$[5] = rest;
|
|
25
|
+
$[6] = style;
|
|
26
|
+
$[7] = top;
|
|
27
|
+
} else {
|
|
28
|
+
borderRadius = $[1];
|
|
29
|
+
bottom = $[2];
|
|
30
|
+
className = $[3];
|
|
31
|
+
height = $[4];
|
|
32
|
+
rest = $[5];
|
|
33
|
+
style = $[6];
|
|
34
|
+
top = $[7];
|
|
35
|
+
}
|
|
9
36
|
const diff = (bottom - top) / 2;
|
|
10
37
|
const a = Math.atan(height / diff) / 2;
|
|
11
38
|
const b = borderRadius / Math.tan(a);
|
|
@@ -15,19 +42,51 @@ const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
15
42
|
const f = borderRadius / Math.tan(e);
|
|
16
43
|
const g = f * Math.cos(2 * a);
|
|
17
44
|
const h = f * Math.sin(2 * a);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
45
|
+
let t0;
|
|
46
|
+
if ($[8] !== className) {
|
|
47
|
+
t0 = clsx(css`
|
|
21
48
|
width: var(--width);
|
|
22
49
|
height: var(--height);
|
|
23
50
|
clip-path: var(--clip-path);
|
|
24
|
-
`, className)
|
|
25
|
-
|
|
51
|
+
`, className);
|
|
52
|
+
$[8] = className;
|
|
53
|
+
$[9] = t0;
|
|
54
|
+
} else t0 = $[9];
|
|
55
|
+
let t1;
|
|
56
|
+
if ($[10] !== b || $[11] !== borderRadius || $[12] !== bottom || $[13] !== c || $[14] !== d || $[15] !== diff || $[16] !== f || $[17] !== g || $[18] !== h || $[19] !== height || $[20] !== style || $[21] !== top) {
|
|
57
|
+
t1 = transformCSSVariable({
|
|
26
58
|
width: px(bottom),
|
|
27
59
|
height: px(height),
|
|
28
60
|
clipath: `path("M ${diff + f} 0 A ${borderRadius} ${borderRadius} 0 0 0 ${diff - g} ${h} L ${c} ${height - d} A ${borderRadius} ${borderRadius} 0 0 0 ${b} ${height} L ${bottom - b} ${height} A ${borderRadius} ${borderRadius} 0 0 0 ${bottom - c} ${height - d} L ${top + diff + g} ${h} A ${borderRadius} ${borderRadius} 0 0 0 ${top + diff - f} 0 Z")`
|
|
29
|
-
}, style)
|
|
30
|
-
|
|
31
|
-
|
|
61
|
+
}, style);
|
|
62
|
+
$[10] = b;
|
|
63
|
+
$[11] = borderRadius;
|
|
64
|
+
$[12] = bottom;
|
|
65
|
+
$[13] = c;
|
|
66
|
+
$[14] = d;
|
|
67
|
+
$[15] = diff;
|
|
68
|
+
$[16] = f;
|
|
69
|
+
$[17] = g;
|
|
70
|
+
$[18] = h;
|
|
71
|
+
$[19] = height;
|
|
72
|
+
$[20] = style;
|
|
73
|
+
$[21] = top;
|
|
74
|
+
$[22] = t1;
|
|
75
|
+
} else t1 = $[22];
|
|
76
|
+
let t2;
|
|
77
|
+
if ($[23] !== ref || $[24] !== rest || $[25] !== t0 || $[26] !== t1) {
|
|
78
|
+
t2 = /*#__PURE__*/ jsx("div", {
|
|
79
|
+
ref: ref,
|
|
80
|
+
className: t0,
|
|
81
|
+
style: t1,
|
|
82
|
+
...rest
|
|
83
|
+
});
|
|
84
|
+
$[23] = ref;
|
|
85
|
+
$[24] = rest;
|
|
86
|
+
$[25] = t0;
|
|
87
|
+
$[26] = t1;
|
|
88
|
+
$[27] = t2;
|
|
89
|
+
} else t2 = $[27];
|
|
90
|
+
return t2;
|
|
32
91
|
});
|
|
33
92
|
export { Trapezium };
|
|
@@ -29,33 +29,93 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
UnifyConfigProvider: ()=>UnifyConfigProvider
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const compiler_runtime_namespaceObject = require("react/compiler-runtime");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
34
|
const external_react_namespaceObject = require("react");
|
|
34
35
|
const UnifyConfigContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({});
|
|
35
|
-
const UnifyConfigProvider = (
|
|
36
|
+
const UnifyConfigProvider = (t0)=>{
|
|
37
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(12);
|
|
38
|
+
const { className, style, children } = t0;
|
|
36
39
|
const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
let t1;
|
|
41
|
+
if ($[0] !== _className || $[1] !== className) {
|
|
42
|
+
t1 = (0, external_deepsea_tools_namespaceObject.clsx)(_className, className);
|
|
43
|
+
$[0] = _className;
|
|
44
|
+
$[1] = className;
|
|
45
|
+
$[2] = t1;
|
|
46
|
+
} else t1 = $[2];
|
|
47
|
+
let t2;
|
|
48
|
+
if ($[3] !== _style || $[4] !== style) {
|
|
49
|
+
t2 = {
|
|
50
|
+
..._style,
|
|
51
|
+
...style
|
|
52
|
+
};
|
|
53
|
+
$[3] = _style;
|
|
54
|
+
$[4] = style;
|
|
55
|
+
$[5] = t2;
|
|
56
|
+
} else t2 = $[5];
|
|
57
|
+
let t3;
|
|
58
|
+
if ($[6] !== t1 || $[7] !== t2) {
|
|
59
|
+
t3 = {
|
|
60
|
+
className: t1,
|
|
61
|
+
style: t2
|
|
62
|
+
};
|
|
63
|
+
$[6] = t1;
|
|
64
|
+
$[7] = t2;
|
|
65
|
+
$[8] = t3;
|
|
66
|
+
} else t3 = $[8];
|
|
67
|
+
let t4;
|
|
68
|
+
if ($[9] !== children || $[10] !== t3) {
|
|
69
|
+
t4 = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(UnifyConfigContext.Provider, {
|
|
70
|
+
value: t3,
|
|
71
|
+
children: children
|
|
72
|
+
});
|
|
73
|
+
$[9] = children;
|
|
74
|
+
$[10] = t3;
|
|
75
|
+
$[11] = t4;
|
|
76
|
+
} else t4 = $[11];
|
|
77
|
+
return t4;
|
|
78
|
+
};
|
|
79
|
+
function Unify(props) {
|
|
80
|
+
const $ = (0, compiler_runtime_namespaceObject.c)(12);
|
|
81
|
+
let className;
|
|
82
|
+
let rest;
|
|
83
|
+
let style;
|
|
84
|
+
let t0;
|
|
85
|
+
if ($[0] !== props) {
|
|
86
|
+
({ as: t0, className, style, ...rest } = props);
|
|
87
|
+
$[0] = props;
|
|
88
|
+
$[1] = className;
|
|
89
|
+
$[2] = rest;
|
|
90
|
+
$[3] = style;
|
|
91
|
+
$[4] = t0;
|
|
92
|
+
} else {
|
|
93
|
+
className = $[1];
|
|
94
|
+
rest = $[2];
|
|
95
|
+
style = $[3];
|
|
96
|
+
t0 = $[4];
|
|
97
|
+
}
|
|
98
|
+
const as = void 0 === t0 ? "div" : t0;
|
|
99
|
+
const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
|
|
100
|
+
let t1;
|
|
101
|
+
if ($[5] !== _className || $[6] !== _style || $[7] !== as || $[8] !== className || $[9] !== rest || $[10] !== style) {
|
|
102
|
+
t1 = /*#__PURE__*/ (0, external_react_namespaceObject.createElement)(as, {
|
|
39
103
|
className: (0, external_deepsea_tools_namespaceObject.clsx)(_className, className),
|
|
40
104
|
style: {
|
|
41
105
|
..._style,
|
|
42
106
|
...style
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
...style
|
|
56
|
-
},
|
|
57
|
-
...rest
|
|
58
|
-
});
|
|
107
|
+
},
|
|
108
|
+
...rest
|
|
109
|
+
});
|
|
110
|
+
$[5] = _className;
|
|
111
|
+
$[6] = _style;
|
|
112
|
+
$[7] = as;
|
|
113
|
+
$[8] = className;
|
|
114
|
+
$[9] = rest;
|
|
115
|
+
$[10] = style;
|
|
116
|
+
$[11] = t1;
|
|
117
|
+
} else t1 = $[11];
|
|
118
|
+
return t1;
|
|
59
119
|
}
|
|
60
120
|
exports.Unify = __webpack_exports__.Unify;
|
|
61
121
|
exports.UnifyConfigProvider = __webpack_exports__.UnifyConfigProvider;
|
package/dist/components/Unify.js
CHANGED
|
@@ -1,31 +1,91 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { clsx } from "deepsea-tools";
|
|
4
5
|
import { createContext, createElement, useContext } from "react";
|
|
5
6
|
const UnifyConfigContext = /*#__PURE__*/ createContext({});
|
|
6
|
-
const UnifyConfigProvider = (
|
|
7
|
+
const UnifyConfigProvider = (t0)=>{
|
|
8
|
+
const $ = c(12);
|
|
9
|
+
const { className, style, children } = t0;
|
|
7
10
|
const { className: _className, style: _style } = useContext(UnifyConfigContext);
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== _className || $[1] !== className) {
|
|
13
|
+
t1 = clsx(_className, className);
|
|
14
|
+
$[0] = _className;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = t1;
|
|
17
|
+
} else t1 = $[2];
|
|
18
|
+
let t2;
|
|
19
|
+
if ($[3] !== _style || $[4] !== style) {
|
|
20
|
+
t2 = {
|
|
21
|
+
..._style,
|
|
22
|
+
...style
|
|
23
|
+
};
|
|
24
|
+
$[3] = _style;
|
|
25
|
+
$[4] = style;
|
|
26
|
+
$[5] = t2;
|
|
27
|
+
} else t2 = $[5];
|
|
28
|
+
let t3;
|
|
29
|
+
if ($[6] !== t1 || $[7] !== t2) {
|
|
30
|
+
t3 = {
|
|
31
|
+
className: t1,
|
|
32
|
+
style: t2
|
|
33
|
+
};
|
|
34
|
+
$[6] = t1;
|
|
35
|
+
$[7] = t2;
|
|
36
|
+
$[8] = t3;
|
|
37
|
+
} else t3 = $[8];
|
|
38
|
+
let t4;
|
|
39
|
+
if ($[9] !== children || $[10] !== t3) {
|
|
40
|
+
t4 = /*#__PURE__*/ jsx(UnifyConfigContext.Provider, {
|
|
41
|
+
value: t3,
|
|
42
|
+
children: children
|
|
43
|
+
});
|
|
44
|
+
$[9] = children;
|
|
45
|
+
$[10] = t3;
|
|
46
|
+
$[11] = t4;
|
|
47
|
+
} else t4 = $[11];
|
|
48
|
+
return t4;
|
|
49
|
+
};
|
|
50
|
+
function Unify(props) {
|
|
51
|
+
const $ = c(12);
|
|
52
|
+
let className;
|
|
53
|
+
let rest;
|
|
54
|
+
let style;
|
|
55
|
+
let t0;
|
|
56
|
+
if ($[0] !== props) {
|
|
57
|
+
({ as: t0, className, style, ...rest } = props);
|
|
58
|
+
$[0] = props;
|
|
59
|
+
$[1] = className;
|
|
60
|
+
$[2] = rest;
|
|
61
|
+
$[3] = style;
|
|
62
|
+
$[4] = t0;
|
|
63
|
+
} else {
|
|
64
|
+
className = $[1];
|
|
65
|
+
rest = $[2];
|
|
66
|
+
style = $[3];
|
|
67
|
+
t0 = $[4];
|
|
68
|
+
}
|
|
69
|
+
const as = void 0 === t0 ? "div" : t0;
|
|
70
|
+
const { className: _className, style: _style } = useContext(UnifyConfigContext);
|
|
71
|
+
let t1;
|
|
72
|
+
if ($[5] !== _className || $[6] !== _style || $[7] !== as || $[8] !== className || $[9] !== rest || $[10] !== style) {
|
|
73
|
+
t1 = /*#__PURE__*/ createElement(as, {
|
|
10
74
|
className: clsx(_className, className),
|
|
11
75
|
style: {
|
|
12
76
|
..._style,
|
|
13
77
|
...style
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...style
|
|
27
|
-
},
|
|
28
|
-
...rest
|
|
29
|
-
});
|
|
78
|
+
},
|
|
79
|
+
...rest
|
|
80
|
+
});
|
|
81
|
+
$[5] = _className;
|
|
82
|
+
$[6] = _style;
|
|
83
|
+
$[7] = as;
|
|
84
|
+
$[8] = className;
|
|
85
|
+
$[9] = rest;
|
|
86
|
+
$[10] = style;
|
|
87
|
+
$[11] = t1;
|
|
88
|
+
} else t1 = $[11];
|
|
89
|
+
return t1;
|
|
30
90
|
}
|
|
31
91
|
export { Unify, UnifyConfigProvider };
|
|
@@ -32,7 +32,7 @@ const external_react_namespaceObject = require("react");
|
|
|
32
32
|
function WriteSheet(props) {
|
|
33
33
|
const { as, excel, onClick: _onClick, ...rest } = props;
|
|
34
34
|
function onClick(e) {
|
|
35
|
-
_onClick
|
|
35
|
+
null == _onClick || _onClick(e);
|
|
36
36
|
if (!excel) return;
|
|
37
37
|
(0, external_deepsea_tools_namespaceObject.writeSheet)(excel);
|
|
38
38
|
}
|