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.
Files changed (43) 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/InputFileButton.cjs +7 -7
  26. package/dist/components/InputFileButton.js +7 -7
  27. package/dist/components/ReadSheet.cjs +7 -32
  28. package/dist/components/ReadSheet.js +7 -32
  29. package/dist/components/Ring.cjs +10 -48
  30. package/dist/components/Ring.js +10 -48
  31. package/dist/components/ScrollMask.cjs +11 -97
  32. package/dist/components/ScrollMask.js +11 -97
  33. package/dist/components/SectionRing.cjs +15 -60
  34. package/dist/components/SectionRing.js +15 -60
  35. package/dist/components/TransitionBox.cjs +28 -118
  36. package/dist/components/TransitionBox.js +28 -118
  37. package/dist/components/TransitionNum.cjs +8 -8
  38. package/dist/components/TransitionNum.js +8 -8
  39. package/dist/components/Trapezium.cjs +9 -68
  40. package/dist/components/Trapezium.js +9 -68
  41. package/dist/components/Unify.cjs +19 -79
  42. package/dist/components/Unify.js +19 -79
  43. package/package.json +2 -2
@@ -23,19 +23,19 @@ const TransitionNum = /*#__PURE__*/ forwardRef((props, ref)=>{
23
23
  get: ()=>cache.current.show
24
24
  }), []);
25
25
  useEffect(()=>{
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;
26
+ const { num, period, show, numToStr } = cache.current;
27
+ ele.current.innerText = (numToStr || String)(show);
28
+ if (num === show) return;
29
29
  const div = ele.current;
30
- const speed = (num_0 - show) / period_0;
30
+ const speed = (num - show) / period;
31
31
  const cancel = setFrameInterval(()=>{
32
- const { num: num_1, numToStr: numToStr_1 } = cache.current;
32
+ const { num, numToStr } = cache.current;
33
33
  cache.current.show += speed;
34
- if (speed > 0 && cache.current.show > num_1 || speed < 0 && cache.current.show < num_1) {
34
+ if (speed > 0 && cache.current.show > num || speed < 0 && cache.current.show < num) {
35
35
  cancel();
36
- cache.current.show = num_1;
36
+ cache.current.show = num;
37
37
  }
38
- div.innerText = (numToStr_1 || String)(speed > 0 ? Math.floor(cache.current.show) : Math.ceil(cache.current.show));
38
+ div.innerText = (numToStr || String)(speed > 0 ? Math.floor(cache.current.show) : Math.ceil(cache.current.show));
39
39
  }, 1);
40
40
  return cancel;
41
41
  }, [
@@ -28,39 +28,12 @@ __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");
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 Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
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
- }
36
+ const { top, bottom, height, borderRadius, className, style, ...rest } = props;
64
37
  const diff = (bottom - top) / 2;
65
38
  const a = Math.atan(height / diff) / 2;
66
39
  const b = borderRadius / Math.tan(a);
@@ -70,52 +43,20 @@ const Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((
70
43
  const f = borderRadius / Math.tan(e);
71
44
  const g = f * Math.cos(2 * a);
72
45
  const h = f * Math.sin(2 * a);
73
- let t0;
74
- if ($[8] !== className) {
75
- t0 = (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
46
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
47
+ ref: ref,
48
+ className: (0, external_deepsea_tools_namespaceObject.clsx)((0, css_namespaceObject.css)`
76
49
  width: var(--width);
77
50
  height: var(--height);
78
51
  clip-path: var(--clip-path);
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)({
52
+ `, className),
53
+ style: (0, index_cjs_namespaceObject.transformCSSVariable)({
86
54
  width: (0, index_cjs_namespaceObject.px)(bottom),
87
55
  height: (0, index_cjs_namespaceObject.px)(height),
88
56
  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")`
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;
57
+ }, style),
58
+ ...rest
59
+ });
119
60
  });
120
61
  exports.Trapezium = __webpack_exports__.Trapezium;
121
62
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
@@ -1,38 +1,11 @@
1
1
  "use client"
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { c as compiler_runtime_c } from "react/compiler-runtime";
4
3
  import { css } from "@emotion/css";
5
4
  import { clsx } from "deepsea-tools";
6
5
  import { forwardRef } from "react";
7
6
  import { px, transformCSSVariable } from "../utils/index.js";
8
7
  const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
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
- }
8
+ const { top, bottom, height, borderRadius, className, style, ...rest } = props;
36
9
  const diff = (bottom - top) / 2;
37
10
  const a = Math.atan(height / diff) / 2;
38
11
  const b = borderRadius / Math.tan(a);
@@ -42,51 +15,19 @@ const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
42
15
  const f = borderRadius / Math.tan(e);
43
16
  const g = f * Math.cos(2 * a);
44
17
  const h = f * Math.sin(2 * a);
45
- let t0;
46
- if ($[8] !== className) {
47
- t0 = clsx(css`
18
+ return /*#__PURE__*/ jsx("div", {
19
+ ref: ref,
20
+ className: clsx(css`
48
21
  width: var(--width);
49
22
  height: var(--height);
50
23
  clip-path: var(--clip-path);
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({
24
+ `, className),
25
+ style: transformCSSVariable({
58
26
  width: px(bottom),
59
27
  height: px(height),
60
28
  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")`
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;
29
+ }, style),
30
+ ...rest
31
+ });
91
32
  });
92
33
  export { Trapezium };
@@ -29,93 +29,33 @@ __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");
33
32
  const external_deepsea_tools_namespaceObject = require("deepsea-tools");
34
33
  const external_react_namespaceObject = require("react");
35
34
  const UnifyConfigContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({});
36
- const UnifyConfigProvider = (t0)=>{
37
- const $ = (0, compiler_runtime_namespaceObject.c)(12);
38
- const { className, style, children } = t0;
35
+ const UnifyConfigProvider = ({ className, style, children })=>{
39
36
  const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
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, {
37
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(UnifyConfigContext.Provider, {
38
+ value: {
103
39
  className: (0, external_deepsea_tools_namespaceObject.clsx)(_className, className),
104
40
  style: {
105
41
  ..._style,
106
42
  ...style
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;
43
+ }
44
+ },
45
+ children: children
46
+ });
47
+ };
48
+ function Unify(props) {
49
+ const { as = "div", className, style, ...rest } = props;
50
+ const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
51
+ return /*#__PURE__*/ (0, external_react_namespaceObject.createElement)(as, {
52
+ className: (0, external_deepsea_tools_namespaceObject.clsx)(_className, className),
53
+ style: {
54
+ ..._style,
55
+ ...style
56
+ },
57
+ ...rest
58
+ });
119
59
  }
120
60
  exports.Unify = __webpack_exports__.Unify;
121
61
  exports.UnifyConfigProvider = __webpack_exports__.UnifyConfigProvider;
@@ -1,91 +1,31 @@
1
1
  "use client"
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { c } from "react/compiler-runtime";
4
3
  import { clsx } from "deepsea-tools";
5
4
  import { createContext, createElement, useContext } from "react";
6
5
  const UnifyConfigContext = /*#__PURE__*/ createContext({});
7
- const UnifyConfigProvider = (t0)=>{
8
- const $ = c(12);
9
- const { className, style, children } = t0;
6
+ const UnifyConfigProvider = ({ className, style, children })=>{
10
7
  const { className: _className, style: _style } = useContext(UnifyConfigContext);
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, {
8
+ return /*#__PURE__*/ jsx(UnifyConfigContext.Provider, {
9
+ value: {
74
10
  className: clsx(_className, className),
75
11
  style: {
76
12
  ..._style,
77
13
  ...style
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;
14
+ }
15
+ },
16
+ children: children
17
+ });
18
+ };
19
+ function Unify(props) {
20
+ const { as = "div", className, style, ...rest } = props;
21
+ const { className: _className, style: _style } = useContext(UnifyConfigContext);
22
+ return /*#__PURE__*/ createElement(as, {
23
+ className: clsx(_className, className),
24
+ style: {
25
+ ..._style,
26
+ ...style
27
+ },
28
+ ...rest
29
+ });
90
30
  }
91
31
  export { Unify, UnifyConfigProvider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepsea-components",
3
- "version": "5.16.16",
3
+ "version": "5.17.0",
4
4
  "description": "格数科技自用组件库",
5
5
  "type": "module",
6
6
  "exports": {
@@ -41,7 +41,7 @@
41
41
  "hls.js": "^1.6.9",
42
42
  "smooth-scrollbar": "^8.8.4",
43
43
  "deepsea-tools": "5.42.2",
44
- "soda-hooks": "6.14.6"
44
+ "soda-hooks": "6.15.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "typescript": "^5.9.2"