deepsea-components 5.17.4 → 5.17.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 +1 -1
- package/dist/components/AutoFit.js +1 -1
- package/dist/components/AutoScroll.cjs +1 -1
- package/dist/components/AutoScroll.js +1 -1
- package/dist/components/AutoSizeTextarea.cjs +1 -1
- package/dist/components/AutoSizeTextarea.js +1 -1
- package/dist/components/CopyButton.cjs +1 -1
- package/dist/components/CopyButton.d.ts +1 -1
- package/dist/components/CopyButton.js +1 -1
- package/dist/components/DraggableGrid.cjs +1 -1
- package/dist/components/DraggableGrid.js +1 -1
- package/dist/components/Echart.cjs +1 -1
- package/dist/components/Echart.d.ts +1 -1
- package/dist/components/Echart.js +1 -1
- package/dist/components/Flow.cjs +1 -1
- package/dist/components/Flow.js +1 -1
- package/dist/components/HlsPlayer.cjs +1 -1
- package/dist/components/HlsPlayer.js +1 -1
- package/dist/components/InfiniteScroll.cjs +1 -1
- package/dist/components/InfiniteScroll.js +1 -1
- package/dist/components/LoopSwiper.cjs +9 -5
- package/dist/components/LoopSwiper.d.ts +1 -0
- package/dist/components/LoopSwiper.js +9 -5
- package/dist/components/ReadSheet.d.ts +1 -1
- package/dist/components/Scroll.cjs +11 -11
- package/dist/components/Scroll.js +1 -1
- package/dist/components/ScrollMask.cjs +1 -1
- package/dist/components/ScrollMask.js +1 -1
- package/dist/components/SectionRing.cjs +1 -1
- package/dist/components/SectionRing.js +1 -1
- package/dist/components/Skeleton.cjs +1 -1
- package/dist/components/Skeleton.js +1 -1
- package/dist/components/TransitionNum.cjs +1 -1
- package/dist/components/TransitionNum.js +1 -1
- package/dist/components/Trapezium.cjs +1 -1
- package/dist/components/Trapezium.js +1 -1
- package/dist/components/Unify.cjs +1 -1
- package/dist/components/Unify.js +1 -1
- package/dist/components/WriteSheet.cjs +1 -1
- package/dist/components/WriteSheet.d.ts +1 -1
- package/dist/components/WriteSheet.js +1 -1
- package/package.json +3 -3
- package/src/components/AutoFit.tsx +1 -1
- package/src/components/AutoScroll.tsx +1 -1
- package/src/components/AutoSizeTextarea.tsx +1 -1
- package/src/components/CopyButton.tsx +1 -1
- package/src/components/DraggableGrid.tsx +1 -1
- package/src/components/Echart.tsx +11 -11
- package/src/components/Flow.tsx +1 -1
- package/src/components/HlsPlayer.tsx +1 -1
- package/src/components/InfiniteScroll.tsx +1 -1
- package/src/components/LoopSwiper.tsx +15 -4
- package/src/components/ReadSheet.tsx +1 -1
- package/src/components/Scroll.tsx +1 -1
- package/src/components/ScrollMask.tsx +1 -1
- package/src/components/SectionRing.tsx +1 -1
- package/src/components/Skeleton.tsx +1 -1
- package/src/components/TransitionNum.tsx +1 -1
- package/src/components/Trapezium.tsx +1 -1
- package/src/components/Unify.tsx +1 -1
- package/src/components/WriteSheet.tsx +1 -1
|
@@ -28,9 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
AutoFit: ()=>AutoFit
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
34
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
35
35
|
const AutoFit = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
36
36
|
var _ele_current;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
7
7
|
const AutoFit = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
8
8
|
var _ele_current;
|
|
@@ -28,9 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
AutoScroll: ()=>AutoScroll
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
34
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
35
35
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
36
36
|
const external_Scroll_cjs_namespaceObject = require("./Scroll.cjs");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx, getArray } from "deepsea-tools";
|
|
5
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
6
6
|
import { useSize } from "soda-hooks";
|
|
7
7
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
8
8
|
import { Scroll } from "./Scroll.js";
|
|
@@ -28,9 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
AutoSizeTextArea: ()=>AutoSizeTextArea
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
34
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
35
35
|
const AutoSizeTextArea = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
36
36
|
const { className, style, ...rest } = props;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
7
7
|
const AutoSizeTextArea = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
8
8
|
const { className, style, ...rest } = props;
|
|
@@ -38,9 +38,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
Event: ()=>external_clipboard_namespaceObject.Event
|
|
39
39
|
});
|
|
40
40
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
41
|
+
const external_react_namespaceObject = require("react");
|
|
41
42
|
const external_clipboard_namespaceObject = require("clipboard");
|
|
42
43
|
var external_clipboard_default = /*#__PURE__*/ __webpack_require__.n(external_clipboard_namespaceObject);
|
|
43
|
-
const external_react_namespaceObject = require("react");
|
|
44
44
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
45
45
|
const CopyButton = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
46
46
|
const { text, onCopySuccess: _onCoptSuccess, onCopyError: _onCopyError, ...rest } = props;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import clipboard_0, { Event } from "clipboard";
|
|
4
3
|
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
4
|
+
import clipboard_0, { Event } from "clipboard";
|
|
5
5
|
import { useLatest } from "soda-hooks";
|
|
6
6
|
const CopyButton = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
7
|
const { text, onCopySuccess: _onCoptSuccess, onCopyError: _onCopyError, ...rest } = props;
|
|
@@ -36,8 +36,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
36
36
|
DraggableGrid: ()=>DraggableGrid
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
-
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
40
39
|
const external_react_namespaceObject = require("react");
|
|
40
|
+
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
41
41
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
42
42
|
const external_DraggableGrid_module_cjs_namespaceObject = require("./DraggableGrid.module.cjs");
|
|
43
43
|
var external_DraggableGrid_module_cjs_default = /*#__PURE__*/ __webpack_require__.n(external_DraggableGrid_module_cjs_namespaceObject);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx, getArray, isNullable } from "deepsea-tools";
|
|
3
2
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { clsx, getArray, isNullable } from "deepsea-tools";
|
|
4
4
|
import { useDragMove } from "soda-hooks";
|
|
5
5
|
import DraggableGrid_module from "./DraggableGrid.module.js";
|
|
6
6
|
function isTheSameArray(a, b) {
|
|
@@ -30,8 +30,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
30
30
|
Bar: ()=>Bar
|
|
31
31
|
});
|
|
32
32
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
-
const external_echarts_namespaceObject = require("echarts");
|
|
34
33
|
const external_react_namespaceObject = require("react");
|
|
34
|
+
const external_echarts_namespaceObject = require("echarts");
|
|
35
35
|
const Echart = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
36
36
|
const { width, height, option, chart, ...rest } = props;
|
|
37
37
|
const container = (0, external_react_namespaceObject.useRef)(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BarSeriesOption, ComposeOption, DatasetComponentOption, ECharts, GridComponentOption, LineSeriesOption, PieSeriesOption, TitleComponentOption, TooltipComponentOption } from "echarts";
|
|
2
1
|
import { ComponentPropsWithoutRef, ForwardRefExoticComponent, ForwardedRef, RefAttributes } from "react";
|
|
2
|
+
import { BarSeriesOption, ComposeOption, DatasetComponentOption, ECharts, GridComponentOption, LineSeriesOption, PieSeriesOption, TitleComponentOption, TooltipComponentOption } from "echarts";
|
|
3
3
|
export type PieOption = ComposeOption<PieSeriesOption | TitleComponentOption | DatasetComponentOption | GridComponentOption | TooltipComponentOption>;
|
|
4
4
|
export type BarOption = ComposeOption<BarSeriesOption | TitleComponentOption | DatasetComponentOption | GridComponentOption | TooltipComponentOption>;
|
|
5
5
|
export type LineOption = ComposeOption<LineSeriesOption | TitleComponentOption | DatasetComponentOption | GridComponentOption | TooltipComponentOption>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { init } from "echarts";
|
|
4
3
|
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
|
|
4
|
+
import { init } from "echarts";
|
|
5
5
|
const Echart = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
6
|
const { width, height, option, chart, ...rest } = props;
|
|
7
7
|
const container = useRef(null);
|
package/dist/components/Flow.cjs
CHANGED
|
@@ -31,9 +31,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
31
31
|
Flow: ()=>Flow
|
|
32
32
|
});
|
|
33
33
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
|
+
const external_react_namespaceObject = require("react");
|
|
34
35
|
const css_namespaceObject = require("@emotion/css");
|
|
35
36
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
36
|
-
const external_react_namespaceObject = require("react");
|
|
37
37
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
38
38
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
39
39
|
function getGapRange(gap) {
|
package/dist/components/Flow.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
6
6
|
import { useSize } from "soda-hooks";
|
|
7
7
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
8
8
|
function getGapRange(gap) {
|
|
@@ -37,9 +37,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
37
37
|
HlsPlayer: ()=>HlsPlayer
|
|
38
38
|
});
|
|
39
39
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const external_react_namespaceObject = require("react");
|
|
40
41
|
const external_hls_js_namespaceObject = require("hls.js");
|
|
41
42
|
var external_hls_js_default = /*#__PURE__*/ __webpack_require__.n(external_hls_js_namespaceObject);
|
|
42
|
-
const external_react_namespaceObject = require("react");
|
|
43
43
|
const HlsPlayer = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
44
44
|
const { src, ...rest } = props;
|
|
45
45
|
const video = (0, external_react_namespaceObject.useRef)(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import hls_0 from "hls.js";
|
|
4
3
|
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
4
|
+
import hls_0 from "hls.js";
|
|
5
5
|
const HlsPlayer = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
6
|
const { src, ...rest } = props;
|
|
7
7
|
const video = useRef(null);
|
|
@@ -28,9 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
InfiniteScroll: ()=>InfiniteScroll
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
34
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
35
35
|
const InfiniteScroll = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
36
36
|
const { className, direction = "vertical", children, containerClassName, containerStyle, gap = 0, duration, withGap, withEqual, pauseOnHover, onMouseEnter, onMouseLeave, ...rest } = props;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
6
6
|
import { useSize } from "soda-hooks";
|
|
7
7
|
const InfiniteScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
8
8
|
const { className, direction = "vertical", children, containerClassName, containerStyle, gap = 0, duration, withGap, withEqual, pauseOnHover, onMouseEnter, onMouseLeave, ...rest } = props;
|
|
@@ -31,7 +31,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
32
32
|
const css_namespaceObject = require("@emotion/css");
|
|
33
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
34
|
-
const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, container: containerClassName, mirror: mirrorClassName } = {}, children, direction, period, reverse, gap = 0, ...rest })=>{
|
|
34
|
+
const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, container: containerClassName, mirror: mirrorClassName } = {}, children, direction, period, reverse, pauseOnHover = true, gap = 0, ...rest })=>{
|
|
35
35
|
const wrapper = (0, external_react_namespaceObject.useRef)(null);
|
|
36
36
|
const container = (0, external_react_namespaceObject.useRef)(null);
|
|
37
37
|
const [swiper, setSwiper] = (0, external_react_namespaceObject.useState)(false);
|
|
@@ -78,7 +78,7 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
78
78
|
transform: translateX(0);
|
|
79
79
|
}
|
|
80
80
|
to {
|
|
81
|
-
transform: translateX(-100%);
|
|
81
|
+
transform: translateX(calc(-100% - ${gap}px));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -87,7 +87,7 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
87
87
|
transform: translateX(0);
|
|
88
88
|
}
|
|
89
89
|
to {
|
|
90
|
-
transform: translateX(100%);
|
|
90
|
+
transform: translateX(calc(100% + ${gap}px));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -96,7 +96,7 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
96
96
|
transform: translateY(0);
|
|
97
97
|
}
|
|
98
98
|
to {
|
|
99
|
-
transform: translateY(-100%);
|
|
99
|
+
transform: translateY(calc(-100% - ${gap}px));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -105,9 +105,13 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
105
105
|
transform: translateY(0);
|
|
106
106
|
}
|
|
107
107
|
to {
|
|
108
|
-
transform: translateY(100%);
|
|
108
|
+
transform: translateY(calc(100% + ${gap}px));
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
${pauseOnHover ? `&:hover > * {
|
|
113
|
+
animation-play-state: paused;
|
|
114
|
+
}` : ""}
|
|
111
115
|
`, className, rootClassName),
|
|
112
116
|
...rest,
|
|
113
117
|
children: [
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
4
4
|
import { css } from "@emotion/css";
|
|
5
5
|
import { clsx } from "deepsea-tools";
|
|
6
|
-
const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, container: containerClassName, mirror: mirrorClassName } = {}, children, direction, period, reverse, gap = 0, ...rest })=>{
|
|
6
|
+
const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, container: containerClassName, mirror: mirrorClassName } = {}, children, direction, period, reverse, pauseOnHover = true, gap = 0, ...rest })=>{
|
|
7
7
|
const wrapper = useRef(null);
|
|
8
8
|
const container = useRef(null);
|
|
9
9
|
const [swiper, setSwiper] = useState(false);
|
|
@@ -50,7 +50,7 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
50
50
|
transform: translateX(0);
|
|
51
51
|
}
|
|
52
52
|
to {
|
|
53
|
-
transform: translateX(-100%);
|
|
53
|
+
transform: translateX(calc(-100% - ${gap}px));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -59,7 +59,7 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
59
59
|
transform: translateX(0);
|
|
60
60
|
}
|
|
61
61
|
to {
|
|
62
|
-
transform: translateX(100%);
|
|
62
|
+
transform: translateX(calc(100% + ${gap}px));
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -68,7 +68,7 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
68
68
|
transform: translateY(0);
|
|
69
69
|
}
|
|
70
70
|
to {
|
|
71
|
-
transform: translateY(-100%);
|
|
71
|
+
transform: translateY(calc(-100% - ${gap}px));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -77,9 +77,13 @@ const LoopSwiper = ({ ref, className, classNames: { root: rootClassName, contain
|
|
|
77
77
|
transform: translateY(0);
|
|
78
78
|
}
|
|
79
79
|
to {
|
|
80
|
-
transform: translateY(100%);
|
|
80
|
+
transform: translateY(calc(100% + ${gap}px));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
${pauseOnHover ? `&:hover > * {
|
|
85
|
+
animation-play-state: paused;
|
|
86
|
+
}` : ""}
|
|
83
87
|
`, className, rootClassName),
|
|
84
88
|
...rest,
|
|
85
89
|
children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WorkBookData, WorkSheetData } from "deepsea-tools";
|
|
2
1
|
import { FC } from "react";
|
|
2
|
+
import { WorkBookData, WorkSheetData } from "deepsea-tools";
|
|
3
3
|
import { InputFileProps } from "./InputFile";
|
|
4
4
|
export interface ReadSheetProps extends Omit<InputFileProps<false, "arrayBuffer">, "multiple" | "accept" | "type" | "onValueChange"> {
|
|
5
5
|
onValueChange?: <Sheet = WorkSheetData>(data: WorkBookData<Sheet>) => void;
|
|
@@ -71,9 +71,9 @@ var __webpack_exports__ = {};
|
|
|
71
71
|
Scrollbar: ()=>smooth_scrollbar__WEBPACK_IMPORTED_MODULE_4___default.a
|
|
72
72
|
});
|
|
73
73
|
var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react/jsx-runtime");
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
74
|
+
var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("react");
|
|
75
|
+
var _emotion_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@emotion/css");
|
|
76
|
+
var deepsea_tools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("deepsea-tools");
|
|
77
77
|
var smooth_scrollbar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("smooth-scrollbar");
|
|
78
78
|
var smooth_scrollbar__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/ __webpack_require__.n(smooth_scrollbar__WEBPACK_IMPORTED_MODULE_4__);
|
|
79
79
|
var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("@/utils");
|
|
@@ -87,21 +87,21 @@ var __webpack_exports__ = {};
|
|
|
87
87
|
return smooth_scrollbar_interfaces__WEBPACK_IMPORTED_MODULE_6__[key];
|
|
88
88
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
89
89
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
90
|
-
const Scroll = /*#__PURE__*/ (0,
|
|
90
|
+
const Scroll = /*#__PURE__*/ (0, react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, ref)=>{
|
|
91
91
|
const { children, options, className, style, scrollbar, onScrollbar, ...rest } = props;
|
|
92
92
|
const { thumbWidth, thumbRadius, thumbColor, trackColor, ...scrollbarOptions } = options || {};
|
|
93
|
-
const ele = (0,
|
|
94
|
-
const bar = (0,
|
|
95
|
-
(0,
|
|
93
|
+
const ele = (0, react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
94
|
+
const bar = (0, react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
95
|
+
(0, react__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(()=>{
|
|
96
96
|
bar.current = smooth_scrollbar__WEBPACK_IMPORTED_MODULE_4___default().init(ele.current, scrollbarOptions);
|
|
97
97
|
return ()=>{
|
|
98
98
|
var _bar_current;
|
|
99
99
|
return null == (_bar_current = bar.current) ? void 0 : _bar_current.destroy();
|
|
100
100
|
};
|
|
101
101
|
}, []);
|
|
102
|
-
(0,
|
|
103
|
-
(0,
|
|
104
|
-
(0,
|
|
102
|
+
(0, react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(ref, ()=>ele.current, []);
|
|
103
|
+
(0, react__WEBPACK_IMPORTED_MODULE_1__.useImperativeHandle)(scrollbar, ()=>bar.current, []);
|
|
104
|
+
(0, react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
|
|
105
105
|
var _bar_current;
|
|
106
106
|
if (!onScrollbar) return;
|
|
107
107
|
null == (_bar_current = bar.current) || _bar_current.addListener(onScrollbar);
|
|
@@ -114,7 +114,7 @@ var __webpack_exports__ = {};
|
|
|
114
114
|
]);
|
|
115
115
|
return /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
|
|
116
116
|
ref: ele,
|
|
117
|
-
className: (0,
|
|
117
|
+
className: (0, deepsea_tools__WEBPACK_IMPORTED_MODULE_3__.clsx)((0, _emotion_css__WEBPACK_IMPORTED_MODULE_2__.css)`
|
|
118
118
|
.scrollbar-track.scrollbar-track-x {
|
|
119
119
|
${void 0 !== thumbWidth ? "height: var(--thumb-width);" : ""} ${void 0 !== trackColor ? "background-color: var(--track-color);" : ""}
|
|
120
120
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
|
|
6
6
|
import smooth_scrollbar from "smooth-scrollbar";
|
|
7
7
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
8
8
|
export * from "smooth-scrollbar/interfaces";
|
|
@@ -36,8 +36,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
36
36
|
ScrollMask: ()=>ScrollMask
|
|
37
37
|
});
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
-
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
40
39
|
const external_react_namespaceObject = require("react");
|
|
40
|
+
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
41
41
|
const external_soda_hooks_namespaceObject = require("soda-hooks");
|
|
42
42
|
const external_ScrollMask_module_cjs_namespaceObject = require("./ScrollMask.module.cjs");
|
|
43
43
|
var external_ScrollMask_module_cjs_default = /*#__PURE__*/ __webpack_require__.n(external_ScrollMask_module_cjs_namespaceObject);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { clsx, isNonNullable } from "deepsea-tools";
|
|
3
2
|
import { useRef } from "react";
|
|
3
|
+
import { clsx, isNonNullable } from "deepsea-tools";
|
|
4
4
|
import { useSize } from "soda-hooks";
|
|
5
5
|
import ScrollMask_module from "./ScrollMask.module.js";
|
|
6
6
|
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 })=>{
|
|
@@ -28,8 +28,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
SectionRing: ()=>SectionRing
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
32
31
|
const external_react_namespaceObject = require("react");
|
|
32
|
+
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
33
|
const SectionRing = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
34
34
|
const { outerRadius: o, innerRadius: i, count: c, angel: a, style, ...rest } = props;
|
|
35
35
|
const s = 2 * Math.PI / c - a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { drawArc } from "deepsea-tools";
|
|
4
3
|
import { forwardRef } from "react";
|
|
4
|
+
import { drawArc } from "deepsea-tools";
|
|
5
5
|
const SectionRing = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
6
|
const { outerRadius: o, innerRadius: i, count: c, angel: a, style, ...rest } = props;
|
|
7
7
|
const s = 2 * Math.PI / c - a;
|
|
@@ -28,9 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
Skeleton: ()=>Skeleton
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
34
|
const Skeleton = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
35
35
|
const { className, children, loading = null == children, ...rest } = props;
|
|
36
36
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
6
|
const Skeleton = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
7
7
|
const { className, children, loading = null == children, ...rest } = props;
|
|
8
8
|
return /*#__PURE__*/ jsx("div", {
|
|
@@ -28,8 +28,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
TransitionNum: ()=>TransitionNum
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
32
31
|
const external_react_namespaceObject = require("react");
|
|
32
|
+
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
33
|
const TransitionNum = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
34
34
|
const { children: num, period, numToStr, ins, ...rest } = props;
|
|
35
35
|
if (!Number.isInteger(num) || !Number.isInteger(period) || period <= 0) throw new RangeError("目标数字必须是整数,周期必须是正整数");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { setFrameInterval } from "deepsea-tools";
|
|
4
3
|
import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
|
|
4
|
+
import { setFrameInterval } from "deepsea-tools";
|
|
5
5
|
const TransitionNum = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
6
6
|
const { children: num, period, numToStr, ins, ...rest } = props;
|
|
7
7
|
if (!Number.isInteger(num) || !Number.isInteger(period) || period <= 0) throw new RangeError("目标数字必须是整数,周期必须是正整数");
|
|
@@ -28,9 +28,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
Trapezium: ()=>Trapezium
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_react_namespaceObject = require("react");
|
|
31
32
|
const css_namespaceObject = require("@emotion/css");
|
|
32
33
|
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
|
-
const external_react_namespaceObject = require("react");
|
|
34
34
|
const index_cjs_namespaceObject = require("../utils/index.cjs");
|
|
35
35
|
const Trapezium = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>{
|
|
36
36
|
const { top, bottom, height, borderRadius, className, style, ...rest } = props;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
3
4
|
import { css } from "@emotion/css";
|
|
4
5
|
import { clsx } from "deepsea-tools";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
6
|
import { px, transformCSSVariable } from "../utils/index.js";
|
|
7
7
|
const Trapezium = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
8
8
|
const { top, bottom, height, borderRadius, className, style, ...rest } = props;
|
|
@@ -29,8 +29,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
UnifyConfigProvider: ()=>UnifyConfigProvider
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
-
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
33
32
|
const external_react_namespaceObject = require("react");
|
|
33
|
+
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
34
34
|
const UnifyConfigContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({});
|
|
35
35
|
const UnifyConfigProvider = ({ className, style, children })=>{
|
|
36
36
|
const { className: _className, style: _style } = (0, external_react_namespaceObject.useContext)(UnifyConfigContext);
|
package/dist/components/Unify.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { clsx } from "deepsea-tools";
|
|
4
3
|
import { createContext, createElement, useContext } from "react";
|
|
4
|
+
import { clsx } from "deepsea-tools";
|
|
5
5
|
const UnifyConfigContext = /*#__PURE__*/ createContext({});
|
|
6
6
|
const UnifyConfigProvider = ({ className, style, children })=>{
|
|
7
7
|
const { className: _className, style: _style } = useContext(UnifyConfigContext);
|
|
@@ -27,8 +27,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
28
28
|
WriteSheet: ()=>WriteSheet
|
|
29
29
|
});
|
|
30
|
-
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
31
30
|
const external_react_namespaceObject = require("react");
|
|
31
|
+
const external_deepsea_tools_namespaceObject = require("deepsea-tools");
|
|
32
32
|
function WriteSheet(props) {
|
|
33
33
|
const { as, excel, onClick: _onClick, ...rest } = props;
|
|
34
34
|
function onClick(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WriteSheetParams } from "deepsea-tools";
|
|
2
1
|
import { ComponentProps, JSX, JSXElementConstructor } from "react";
|
|
2
|
+
import { WriteSheetParams } from "deepsea-tools";
|
|
3
3
|
export type WriteSheetProps<AS extends keyof JSX.IntrinsicElements | JSXElementConstructor<any> = "button"> = Omit<ComponentProps<AS>, "as" | "excel"> & {
|
|
4
4
|
as?: AS;
|
|
5
5
|
excel?: WriteSheetParams;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deepsea-components",
|
|
3
|
-
"version": "5.17.
|
|
3
|
+
"version": "5.17.5",
|
|
4
4
|
"description": "格数科技自用组件库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"echarts": "^6.0.0",
|
|
41
41
|
"hls.js": "^1.6.13",
|
|
42
42
|
"smooth-scrollbar": "^8.8.4",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"deepsea-tools": "5.42.4",
|
|
44
|
+
"soda-hooks": "6.15.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"typescript": "^5.9.3"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx } from "deepsea-tools"
|
|
5
|
-
import { HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
|
|
6
6
|
|
|
7
7
|
import { px, transformCSSVariable } from "@/utils"
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { CSSProperties, MouseEvent as ReactMouseEvent, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx, getArray } from "deepsea-tools"
|
|
5
|
-
import { CSSProperties, MouseEvent as ReactMouseEvent, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
6
6
|
import Scrollbar from "smooth-scrollbar"
|
|
7
7
|
import { ScrollStatus } from "smooth-scrollbar/interfaces/scrollbar"
|
|
8
8
|
import { useSize } from "soda-hooks"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { TextareaHTMLAttributes, forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx } from "deepsea-tools"
|
|
5
|
-
import { TextareaHTMLAttributes, forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react"
|
|
6
6
|
|
|
7
7
|
import { px, transformCSSVariable } from "@/utils"
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import ClipboardJS, { Event } from "clipboard"
|
|
4
3
|
import { ComponentPropsWithoutRef, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
4
|
+
import ClipboardJS, { Event } from "clipboard"
|
|
5
5
|
import { useLatest } from "soda-hooks"
|
|
6
6
|
|
|
7
7
|
export { Event } from "clipboard"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { clsx, getArray, isNullable } from "deepsea-tools"
|
|
2
1
|
import { CSSProperties, ComponentProps, Key, ReactNode, useEffect, useMemo, useRef, useState } from "react"
|
|
2
|
+
import { clsx, getArray, isNullable } from "deepsea-tools"
|
|
3
3
|
import { DragMoveEvent, DragMoveEvents, useDragMove } from "soda-hooks"
|
|
4
4
|
|
|
5
5
|
import styles from "./DraggableGrid.module.css"
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
ComponentPropsWithoutRef,
|
|
5
|
+
ForwardRefExoticComponent,
|
|
6
|
+
ForwardedRef,
|
|
7
|
+
RefAttributes,
|
|
8
|
+
forwardRef,
|
|
9
|
+
useEffect,
|
|
10
|
+
useImperativeHandle,
|
|
11
|
+
useLayoutEffect,
|
|
12
|
+
useRef,
|
|
13
|
+
} from "react"
|
|
3
14
|
import {
|
|
4
15
|
BarSeriesOption,
|
|
5
16
|
ComposeOption,
|
|
@@ -12,17 +23,6 @@ import {
|
|
|
12
23
|
TooltipComponentOption,
|
|
13
24
|
init,
|
|
14
25
|
} from "echarts"
|
|
15
|
-
import {
|
|
16
|
-
ComponentPropsWithoutRef,
|
|
17
|
-
ForwardRefExoticComponent,
|
|
18
|
-
ForwardedRef,
|
|
19
|
-
RefAttributes,
|
|
20
|
-
forwardRef,
|
|
21
|
-
useEffect,
|
|
22
|
-
useImperativeHandle,
|
|
23
|
-
useLayoutEffect,
|
|
24
|
-
useRef,
|
|
25
|
-
} from "react"
|
|
26
26
|
|
|
27
27
|
export type PieOption = ComposeOption<PieSeriesOption | TitleComponentOption | DatasetComponentOption | GridComponentOption | TooltipComponentOption>
|
|
28
28
|
|
package/src/components/Flow.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { CSSProperties, HTMLAttributes, Key, ReactNode, Ref, useEffect, useImperativeHandle, useRef, useState } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx } from "deepsea-tools"
|
|
5
|
-
import { CSSProperties, HTMLAttributes, Key, ReactNode, Ref, useEffect, useImperativeHandle, useRef, useState } from "react"
|
|
6
6
|
import { useSize } from "soda-hooks"
|
|
7
7
|
|
|
8
8
|
import { px, transformCSSVariable } from "@/utils"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import Hls from "hls.js"
|
|
4
3
|
import { MediaHTMLAttributes, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
4
|
+
import Hls from "hls.js"
|
|
5
5
|
|
|
6
6
|
export interface HlsPlayerProps extends Omit<MediaHTMLAttributes<HTMLVideoElement>, "src"> {
|
|
7
7
|
src: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { CSSProperties, ComponentPropsWithoutRef, MouseEvent as ReactMouseEvent, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx } from "deepsea-tools"
|
|
5
|
-
import { CSSProperties, ComponentPropsWithoutRef, MouseEvent as ReactMouseEvent, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
6
6
|
import { useSize } from "soda-hooks"
|
|
7
7
|
|
|
8
8
|
export type InfiniteScrollProps = ComponentPropsWithoutRef<"div"> & {
|
|
@@ -15,6 +15,7 @@ export interface LoopSwiperProps extends ComponentProps<"div"> {
|
|
|
15
15
|
direction?: "horizontal" | "vertical"
|
|
16
16
|
reverse?: boolean
|
|
17
17
|
period: number
|
|
18
|
+
pauseOnHover?: boolean
|
|
18
19
|
gap?: number
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -27,6 +28,7 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
27
28
|
direction,
|
|
28
29
|
period,
|
|
29
30
|
reverse,
|
|
31
|
+
pauseOnHover = true,
|
|
30
32
|
gap = 0,
|
|
31
33
|
...rest
|
|
32
34
|
}) => {
|
|
@@ -58,6 +60,7 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
58
60
|
let wrapperHeight = 0
|
|
59
61
|
let containerWidth = 0
|
|
60
62
|
let containerHeight = 0
|
|
63
|
+
|
|
61
64
|
const observer = new ResizeObserver(entries => {
|
|
62
65
|
entries.forEach(entry => {
|
|
63
66
|
if (entry.target === wrapperEle) {
|
|
@@ -68,8 +71,10 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
68
71
|
containerHeight = entry.contentRect.height
|
|
69
72
|
}
|
|
70
73
|
})
|
|
74
|
+
|
|
71
75
|
setSwiper(directionRef.current === "vertical" ? containerHeight > wrapperHeight : containerWidth > wrapperWidth)
|
|
72
76
|
})
|
|
77
|
+
|
|
73
78
|
observer.observe(wrapperEle)
|
|
74
79
|
observer.observe(containerEle)
|
|
75
80
|
}, [])
|
|
@@ -89,7 +94,7 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
89
94
|
transform: translateX(0);
|
|
90
95
|
}
|
|
91
96
|
to {
|
|
92
|
-
transform: translateX(-100%);
|
|
97
|
+
transform: translateX(calc(-100% - ${gap}px));
|
|
93
98
|
}
|
|
94
99
|
}
|
|
95
100
|
|
|
@@ -98,7 +103,7 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
98
103
|
transform: translateX(0);
|
|
99
104
|
}
|
|
100
105
|
to {
|
|
101
|
-
transform: translateX(100%);
|
|
106
|
+
transform: translateX(calc(100% + ${gap}px));
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
109
|
|
|
@@ -107,7 +112,7 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
107
112
|
transform: translateY(0);
|
|
108
113
|
}
|
|
109
114
|
to {
|
|
110
|
-
transform: translateY(-100%);
|
|
115
|
+
transform: translateY(calc(-100% - ${gap}px));
|
|
111
116
|
}
|
|
112
117
|
}
|
|
113
118
|
|
|
@@ -116,9 +121,15 @@ export const LoopSwiper: FC<LoopSwiperProps> = ({
|
|
|
116
121
|
transform: translateY(0);
|
|
117
122
|
}
|
|
118
123
|
to {
|
|
119
|
-
transform: translateY(100%);
|
|
124
|
+
transform: translateY(calc(100% + ${gap}px));
|
|
120
125
|
}
|
|
121
126
|
}
|
|
127
|
+
|
|
128
|
+
${pauseOnHover
|
|
129
|
+
? `&:hover > * {
|
|
130
|
+
animation-play-state: paused;
|
|
131
|
+
}`
|
|
132
|
+
: ""}
|
|
122
133
|
`,
|
|
123
134
|
className,
|
|
124
135
|
rootClassName,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { CSSProperties, ForwardedRef, HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx } from "deepsea-tools"
|
|
5
|
-
import { CSSProperties, ForwardedRef, HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react"
|
|
6
6
|
import Scrollbar from "smooth-scrollbar"
|
|
7
7
|
import type { ScrollListener, ScrollbarOptions } from "smooth-scrollbar/interfaces"
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { DrawArcOptions, drawArc } from "deepsea-tools"
|
|
4
3
|
import { HTMLAttributes, forwardRef } from "react"
|
|
4
|
+
import { DrawArcOptions, drawArc } from "deepsea-tools"
|
|
5
5
|
|
|
6
6
|
export interface SectionRingProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
outerRadius: number
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
+
import { HTMLAttributes, forwardRef } from "react"
|
|
3
4
|
import { css } from "@emotion/css"
|
|
4
5
|
import { clsx } from "deepsea-tools"
|
|
5
|
-
import { HTMLAttributes, forwardRef } from "react"
|
|
6
6
|
|
|
7
7
|
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
loading?: boolean
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { setFrameInterval } from "deepsea-tools"
|
|
4
3
|
import { ForwardedRef, HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
4
|
+
import { setFrameInterval } from "deepsea-tools"
|
|
5
5
|
|
|
6
6
|
export interface TransitionNumProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
7
7
|
/** 当前数字 */
|
package/src/components/Unify.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { clsx } from "deepsea-tools"
|
|
4
3
|
import { CSSProperties, ComponentProps, FC, JSX, JSXElementConstructor, ReactNode, createContext, createElement, useContext } from "react"
|
|
4
|
+
import { clsx } from "deepsea-tools"
|
|
5
5
|
|
|
6
6
|
export interface UnifyConfig {
|
|
7
7
|
className?: string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { WriteSheetParams, writeSheet } from "deepsea-tools"
|
|
4
3
|
import { ComponentProps, JSX, JSXElementConstructor, MouseEvent as ReactMouseEvent, createElement } from "react"
|
|
4
|
+
import { WriteSheetParams, writeSheet } from "deepsea-tools"
|
|
5
5
|
|
|
6
6
|
export type WriteSheetProps<AS extends keyof JSX.IntrinsicElements | JSXElementConstructor<any> = "button"> = Omit<ComponentProps<AS>, "as" | "excel"> & {
|
|
7
7
|
as?: AS
|