deepsea-components 5.15.23 → 5.15.24

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 (36) hide show
  1. package/dist/components/AutoFit.js +24 -24
  2. package/dist/components/AutoScroll.js +24 -24
  3. package/dist/components/AutoSizeTextarea.js +14 -14
  4. package/dist/components/CircleText.js +4 -4
  5. package/dist/components/CopyButton.cjs +2 -2
  6. package/dist/components/CopyButton.js +13 -14
  7. package/dist/components/Echart.cjs +2 -2
  8. package/dist/components/Echart.js +12 -12
  9. package/dist/components/Flow.cjs +3 -3
  10. package/dist/components/Flow.js +31 -31
  11. package/dist/components/FormLabel.cjs +2 -2
  12. package/dist/components/FormLabel.js +8 -8
  13. package/dist/components/HlsPlayer.js +10 -10
  14. package/dist/components/IconFileType.cjs +4 -4
  15. package/dist/components/IconFileType.js +9 -9
  16. package/dist/components/InfiniteScroll.js +22 -22
  17. package/dist/components/InputFile.js +4 -4
  18. package/dist/components/InputFileButton.js +11 -11
  19. package/dist/components/LoopSwiper.js +15 -15
  20. package/dist/components/ReadExcel.js +2 -2
  21. package/dist/components/ReadSheet.js +5 -5
  22. package/dist/components/Ring.js +4 -4
  23. package/dist/components/Scroll.cjs +2 -2
  24. package/dist/components/Scroll.js +20 -21
  25. package/dist/components/ScrollMask.js +13 -13
  26. package/dist/components/SectionRing.js +6 -6
  27. package/dist/components/Skeleton.js +8 -8
  28. package/dist/components/Title.js +12 -12
  29. package/dist/components/TransitionBox.js +10 -10
  30. package/dist/components/TransitionNum.js +11 -11
  31. package/dist/components/Trapezium.js +11 -11
  32. package/dist/components/Unify.js +10 -10
  33. package/dist/components/WriteExcel.js +2 -2
  34. package/dist/components/WriteSheet.js +4 -4
  35. package/dist/utils/getReactVersion.js +2 -2
  36. package/package.json +5 -5
@@ -1,20 +1,20 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
7
- const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx } from "deepsea-tools";
5
+ import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
6
+ import { px, transformCSSVariable } from "../utils/index.js";
7
+ const AutoFit = /*#__PURE__*/ forwardRef((props, ref)=>{
8
8
  const { width: designWidth = 1920, height: designHeight = 1080, direction, className, style, ...rest } = props;
9
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
10
- const [show, setShow] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
11
- const [transform, setTransform] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
12
- const [width, setWidth] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
13
- const [height, setHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
14
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, [
9
+ const ele = useRef(null);
10
+ const [show, setShow] = useState(false);
11
+ const [transform, setTransform] = useState(void 0);
12
+ const [width, setWidth] = useState(void 0);
13
+ const [height, setHeight] = useState(void 0);
14
+ useImperativeHandle(ref, ()=>ele.current, [
15
15
  ele.current
16
16
  ]);
17
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
17
+ useLayoutEffect(()=>{
18
18
  const element = ele.current;
19
19
  const parent = element?.parentElement;
20
20
  if (!element || !parent) return;
@@ -24,18 +24,18 @@ const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(
24
24
  if ("horizontal" === direction) {
25
25
  const scale = contentRect.width / designWidth;
26
26
  setTransform(`scale(${scale})`);
27
- setWidth((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designWidth));
28
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(contentRect.height / scale));
27
+ setWidth(px(designWidth));
28
+ setHeight(px(contentRect.height / scale));
29
29
  } else if ("vertical" === direction) {
30
30
  const scale = contentRect.height / designHeight;
31
31
  setTransform(`scale(${scale})`);
32
- setWidth((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(contentRect.width / scale));
33
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designHeight));
32
+ setWidth(px(contentRect.width / scale));
33
+ setHeight(px(designHeight));
34
34
  } else {
35
35
  const scale = Math.min(contentRect.width / designWidth, contentRect.height / designHeight);
36
36
  setTransform(`translateX(${(contentRect.width - designWidth * scale) / 2}px) translateY(${(contentRect.height - designHeight * scale) / 2}px) scale(${scale})`);
37
- setWidth((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designWidth));
38
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(designHeight));
37
+ setWidth(px(designWidth));
38
+ setHeight(px(designHeight));
39
39
  }
40
40
  setShow(true);
41
41
  }
@@ -48,7 +48,7 @@ const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(
48
48
  designHeight,
49
49
  direction
50
50
  ]);
51
- if ("development" === process.env.NODE_ENV) (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
51
+ if ("development" === process.env.NODE_ENV) useEffect(()=>{
52
52
  const parent = ele.current?.parentElement;
53
53
  if (!parent) return;
54
54
  const style = getComputedStyle(parent);
@@ -56,22 +56,22 @@ const AutoFit = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(
56
56
  }, [
57
57
  ele.current?.parentElement
58
58
  ]);
59
- if (!show) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
59
+ if (!show) return /*#__PURE__*/ jsx("div", {
60
60
  ref: ele,
61
61
  style: {
62
62
  display: "none"
63
63
  }
64
64
  });
65
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
65
+ return /*#__PURE__*/ jsx("div", {
66
66
  ref: ele,
67
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
67
+ className: clsx(css`
68
68
  position: absolute;
69
69
  transform: var(--transform);
70
70
  transform-origin: top left;
71
71
  width: var(--width);
72
72
  height: var(--height);
73
73
  `, className),
74
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
74
+ style: transformCSSVariable({
75
75
  transform,
76
76
  width,
77
77
  height
@@ -1,31 +1,31 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__ from "soda-hooks";
7
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
8
- import * as __WEBPACK_EXTERNAL_MODULE__Scroll_js_70befd9e__ from "./Scroll.js";
9
- const AutoScroll = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx, getArray } from "deepsea-tools";
5
+ import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
6
+ import { useSize } from "soda-hooks";
7
+ import { px, transformCSSVariable } from "../utils/index.js";
8
+ import { Scroll } from "./Scroll.js";
9
+ const AutoScroll = /*#__PURE__*/ forwardRef((props, ref)=>{
10
10
  const { count, itemHeight, animation = 1000, duration = 3000, onMouseEnter, onMouseLeave, gap = 0, containerClassName, containerStyle, children, playOnMouseEnter, scrollbar, paused, ...rest } = props;
11
- const bar = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
12
- const timeout = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(void 0);
13
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
14
- const size = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useSize)(ele);
15
- const pausedRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(false);
16
- const pausedProps = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(paused);
11
+ const bar = useRef(null);
12
+ const timeout = useRef(void 0);
13
+ const ele = useRef(null);
14
+ const size = useSize(ele);
15
+ const pausedRef = useRef(false);
16
+ const pausedProps = useRef(paused);
17
17
  pausedProps.current = paused;
18
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, []);
19
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(scrollbar, ()=>bar.current, []);
20
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
18
+ useImperativeHandle(ref, ()=>ele.current, []);
19
+ useImperativeHandle(scrollbar, ()=>bar.current, []);
20
+ useEffect(()=>{
21
21
  if (playOnMouseEnter) pausedRef.current = false;
22
22
  }, [
23
23
  playOnMouseEnter
24
24
  ]);
25
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
25
+ useEffect(()=>{
26
26
  if (!size || 0 === count) return;
27
27
  const { height } = size;
28
- const range = (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.getArray)(count, (index)=>(itemHeight + gap) * (index + 1) - (index === count - 1 ? gap : 0));
28
+ const range = getArray(count, (index)=>(itemHeight + gap) * (index + 1) - (index === count - 1 ? gap : 0));
29
29
  const scrollHeight = range[range.length - 1];
30
30
  if (height >= scrollHeight) return;
31
31
  function scroll(target) {
@@ -66,14 +66,14 @@ const AutoScroll = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRe
66
66
  pausedRef.current = false;
67
67
  onMouseLeave?.(e);
68
68
  }
69
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Scroll_js_70befd9e__.Scroll, {
69
+ return /*#__PURE__*/ jsx(Scroll, {
70
70
  ref: ele,
71
71
  scrollbar: bar,
72
72
  onMouseEnter: onContainerMouseEnter,
73
73
  onMouseLeave: onContainerMouseLeave,
74
74
  ...rest,
75
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
76
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
75
+ children: /*#__PURE__*/ jsx("div", {
76
+ className: clsx(css`
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  gap: var(--gap, 0);
@@ -81,8 +81,8 @@ const AutoScroll = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRe
81
81
  flex: none;
82
82
  }
83
83
  `, containerClassName),
84
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
85
- gap: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(gap)
84
+ style: transformCSSVariable({
85
+ gap: px(gap)
86
86
  }, containerStyle),
87
87
  children: children
88
88
  })
@@ -1,19 +1,19 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
7
- const AutoSizeTextArea = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx } from "deepsea-tools";
5
+ import { forwardRef, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
6
+ import { px, transformCSSVariable } from "../utils/index.js";
7
+ const AutoSizeTextArea = /*#__PURE__*/ forwardRef((props, ref)=>{
8
8
  const { className, style, ...rest } = props;
9
- const [height, setHeight] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(void 0);
10
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
11
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, []);
12
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
9
+ const [height, setHeight] = useState(void 0);
10
+ const ele = useRef(null);
11
+ useImperativeHandle(ref, ()=>ele.current, []);
12
+ useLayoutEffect(()=>{
13
13
  const textarea = ele.current;
14
14
  function resizeTextarea() {
15
15
  setHeight("auto");
16
- setHeight((0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
16
+ setHeight(px(textarea.scrollHeight + textarea.offsetHeight - textarea.clientHeight));
17
17
  }
18
18
  resizeTextarea();
19
19
  textarea.addEventListener("input", resizeTextarea);
@@ -23,14 +23,14 @@ const AutoSizeTextArea = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.for
23
23
  textarea.removeEventListener("change", resizeTextarea);
24
24
  };
25
25
  }, []);
26
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("textarea", {
26
+ return /*#__PURE__*/ jsx("textarea", {
27
27
  ref: ele,
28
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
28
+ className: clsx(css`
29
29
  height: var(--height);
30
30
  resize: none;
31
31
  overflow-y: hidden;
32
32
  `, className),
33
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
33
+ style: transformCSSVariable({
34
34
  height
35
35
  }, style),
36
36
  ...rest
@@ -1,6 +1,6 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { Fragment } from "react";
4
4
  const CircleText = (props)=>{
5
5
  const { width, height, radius, startAngel = 0, gapAngel = 0, align = "center", style, direction = "outer", reverse = false, separator, children, ...rest } = props;
6
6
  const unitAngle = 2 * Math.atan(width / 2 / radius);
@@ -15,8 +15,8 @@ const CircleText = (props)=>{
15
15
  }
16
16
  const words = "function" == typeof separator ? separator(children) : children.split(separator ?? "");
17
17
  if (reverse) words.reverse();
18
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, {
19
- children: words.map((w, idx)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
18
+ return /*#__PURE__*/ jsx(Fragment, {
19
+ children: words.map((w, idx)=>/*#__PURE__*/ jsx("span", {
20
20
  style: {
21
21
  position: "absolute",
22
22
  ...style,
@@ -34,8 +34,8 @@ var __webpack_require__ = {};
34
34
  var __webpack_exports__ = {};
35
35
  __webpack_require__.r(__webpack_exports__);
36
36
  __webpack_require__.d(__webpack_exports__, {
37
- Event: ()=>external_clipboard_namespaceObject.Event,
38
- CopyButton: ()=>CopyButton
37
+ CopyButton: ()=>CopyButton,
38
+ Event: ()=>external_clipboard_namespaceObject.Event
39
39
  });
40
40
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
41
41
  const external_clipboard_namespaceObject = require("clipboard");
@@ -1,27 +1,26 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_clipboard__ from "clipboard";
4
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
5
- import * as __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__ from "soda-hooks";
6
- const CopyButton = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import clipboard_0, { Event } from "clipboard";
4
+ import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
5
+ import { useLatest } from "soda-hooks";
6
+ const CopyButton = /*#__PURE__*/ forwardRef((props, ref)=>{
7
7
  const { text, onCopySuccess: _onCoptSuccess, onCopyError: _onCopyError, ...rest } = props;
8
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
9
- const onCopySuccess = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useLatest)(_onCoptSuccess);
10
- const onCopyError = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useLatest)(_onCopyError);
11
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>ele.current, [
8
+ const ele = useRef(null);
9
+ const onCopySuccess = useLatest(_onCoptSuccess);
10
+ const onCopyError = useLatest(_onCopyError);
11
+ useImperativeHandle(ref, ()=>ele.current, [
12
12
  ele.current
13
13
  ]);
14
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
15
- const clipboard = new __WEBPACK_EXTERNAL_MODULE_clipboard__["default"](ele.current);
14
+ useEffect(()=>{
15
+ const clipboard = new clipboard_0(ele.current);
16
16
  clipboard.on("success", (event)=>onCopySuccess.current?.(event));
17
17
  clipboard.on("error", (event)=>onCopyError.current?.(event));
18
18
  return ()=>clipboard.destroy();
19
19
  }, []);
20
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
20
+ return /*#__PURE__*/ jsx("button", {
21
21
  ref: ele,
22
22
  ...rest,
23
23
  "data-clipboard-text": text
24
24
  });
25
25
  });
26
- var __webpack_exports__Event = __WEBPACK_EXTERNAL_MODULE_clipboard__.Event;
27
- export { CopyButton, __webpack_exports__Event as Event };
26
+ export { CopyButton, Event };
@@ -26,8 +26,8 @@ var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
28
  Pie: ()=>Pie,
29
- Bar: ()=>Bar,
30
- Line: ()=>Line
29
+ Line: ()=>Line,
30
+ Bar: ()=>Bar
31
31
  });
32
32
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
33
  const external_echarts_namespaceObject = require("echarts");
@@ -1,29 +1,29 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_echarts__ from "echarts";
4
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
5
- const Echart = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { init } from "echarts";
4
+ import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
5
+ const Echart = /*#__PURE__*/ forwardRef((props, ref)=>{
6
6
  const { width, height, option, chart, ...rest } = props;
7
- const container = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
8
- const chartRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
9
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect)(()=>{
7
+ const container = useRef(null);
8
+ const chartRef = useRef(null);
9
+ useLayoutEffect(()=>{
10
10
  const ele = container.current;
11
- chartRef.current = (0, __WEBPACK_EXTERNAL_MODULE_echarts__.init)(ele, option, {
11
+ chartRef.current = init(ele, option, {
12
12
  width,
13
13
  height
14
14
  });
15
15
  return ()=>chartRef.current?.dispose();
16
16
  }, []);
17
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>container.current, []);
18
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(chart, ()=>chartRef.current, []);
19
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
17
+ useImperativeHandle(ref, ()=>container.current, []);
18
+ useImperativeHandle(chart, ()=>chartRef.current, []);
19
+ useEffect(()=>{
20
20
  chartRef.current?.setOption(option);
21
21
  chartRef.current?.resize({
22
22
  width,
23
23
  height
24
24
  });
25
25
  });
26
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
26
+ return /*#__PURE__*/ jsx("div", {
27
27
  ref: container,
28
28
  ...rest
29
29
  });
@@ -25,10 +25,10 @@ var __webpack_require__ = {};
25
25
  var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
- Flow: ()=>Flow,
29
- getGapCountAndSize: ()=>getGapCountAndSize,
30
28
  getGapRange: ()=>getGapRange,
31
- ManualFlow: ()=>ManualFlow
29
+ getGapCountAndSize: ()=>getGapCountAndSize,
30
+ ManualFlow: ()=>ManualFlow,
31
+ Flow: ()=>Flow
32
32
  });
33
33
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
34
  const css_namespaceObject = require("@emotion/css");
@@ -1,10 +1,10 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
4
- import * as __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__ from "deepsea-tools";
5
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
6
- import * as __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__ from "soda-hooks";
7
- import * as __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__ from "../utils/index.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { css } from "@emotion/css";
4
+ import { clsx } from "deepsea-tools";
5
+ import { useEffect, useImperativeHandle, useRef, useState } from "react";
6
+ import { useSize } from "soda-hooks";
7
+ import { px, transformCSSVariable } from "../utils/index.js";
8
8
  function getGapRange(gap) {
9
9
  if ("number" == typeof gap) return [
10
10
  gap,
@@ -44,8 +44,8 @@ function ManualFlow(props) {
44
44
  rowGap ??= gap;
45
45
  columnGap ??= gap;
46
46
  const [minColumnGap, maxColumnGap] = getGapRange(columnGap);
47
- const [{ count: columnCount, gap: columnGapSize }, setGapAndCount] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(()=>getGapCountAndSize(width, itemWidth, minColumnGap, maxColumnGap));
48
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
47
+ const [{ count: columnCount, gap: columnGapSize }, setGapAndCount] = useState(()=>getGapCountAndSize(width, itemWidth, minColumnGap, maxColumnGap));
48
+ const ele = useRef(null);
49
49
  const contentRows = Math.ceil(data.length / columnCount);
50
50
  const contentShownRows = "number" == typeof maxRows ? Math.min(contentRows, maxRows) : contentRows;
51
51
  const height = contentShownRows > 0 ? contentShownRows * (itemHeight + rowGap) - rowGap : 0;
@@ -61,10 +61,10 @@ function ManualFlow(props) {
61
61
  if ("number" != typeof maxRows) return false;
62
62
  return index >= maxRows * columnCount;
63
63
  }
64
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(element, ()=>ele.current, [
64
+ useImperativeHandle(element, ()=>ele.current, [
65
65
  ele.current
66
66
  ]);
67
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
67
+ useEffect(()=>{
68
68
  function task() {
69
69
  setGapAndCount(getGapCountAndSize(width, itemWidth, minColumnGap, maxColumnGap));
70
70
  }
@@ -78,7 +78,7 @@ function ManualFlow(props) {
78
78
  minColumnGap,
79
79
  maxColumnGap
80
80
  ]);
81
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
81
+ useEffect(()=>{
82
82
  onSizeChange?.({
83
83
  width,
84
84
  height,
@@ -104,19 +104,19 @@ function ManualFlow(props) {
104
104
  itemHeight,
105
105
  maxRows
106
106
  ]);
107
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
107
+ return /*#__PURE__*/ jsx("div", {
108
108
  ref: ele,
109
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
109
+ className: clsx(css`
110
110
  position: relative;
111
111
  height: var(--height);
112
112
  overflow: hidden;
113
113
  `, className),
114
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
115
- height: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(height)
114
+ style: transformCSSVariable({
115
+ height: px(height)
116
116
  }, style),
117
117
  ...rest,
118
- children: data.map((item, index, arr)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
119
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
118
+ children: data.map((item, index, arr)=>/*#__PURE__*/ jsx("div", {
119
+ className: clsx(css`
120
120
  position: absolute;
121
121
  width: var(--width);
122
122
  height: var(--height);
@@ -125,20 +125,20 @@ function ManualFlow(props) {
125
125
  top: 0;
126
126
  transform: translate(var(--left), var(--top));
127
127
  `, wrapperClassName),
128
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
129
- width: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(itemWidth),
130
- height: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(itemHeight),
128
+ style: transformCSSVariable({
129
+ width: px(itemWidth),
130
+ height: px(itemHeight),
131
131
  transition: 0 === transitionDuration ? "none" : `all ${transitionDuration || 400}ms`,
132
- left: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(getPosition(index).left),
133
- top: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.px)(getPosition(index).top)
132
+ left: px(getPosition(index).left),
133
+ top: px(getPosition(index).top)
134
134
  }, wrapperStyle),
135
- children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
136
- className: (0, __WEBPACK_EXTERNAL_MODULE_deepsea_tools_8ecdf5a5__.clsx)((0, __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__.css)`
135
+ children: /*#__PURE__*/ jsx("div", {
136
+ className: clsx(css`
137
137
  width: 100%;
138
138
  height: 100%;
139
139
  display: var(--display);
140
140
  `, containerClassName),
141
- style: (0, __WEBPACK_EXTERNAL_MODULE__utils_index_js_6619c453__.transformCSSVariable)({
141
+ style: transformCSSVariable({
142
142
  display: getHidden(index) ? "none" : "block"
143
143
  }, containerStyle),
144
144
  children: render(item, index, arr)
@@ -148,18 +148,18 @@ function ManualFlow(props) {
148
148
  }
149
149
  function Flow(props) {
150
150
  const { itemWidth, itemHeight, columnGap, rowGap, gap, maxRows, data, render, keyExactor, wrapperClassName, wrapperStyle, containerClassName, containerStyle, throttle, transitionDuration, onSizeChange, element, ...rest } = props;
151
- const ele = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
152
- const size = (0, __WEBPACK_EXTERNAL_MODULE_soda_hooks_b1fef7dd__.useSize)(ele);
153
- const width = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(size?.width || 0);
151
+ const ele = useRef(null);
152
+ const size = useSize(ele);
153
+ const width = useRef(size?.width || 0);
154
154
  if (size && 0 !== size.width) width.current = size.width;
155
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(element, ()=>ele.current, [
155
+ useImperativeHandle(element, ()=>ele.current, [
156
156
  ele.current
157
157
  ]);
158
- if (0 === width.current) return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
158
+ if (0 === width.current) return /*#__PURE__*/ jsx("div", {
159
159
  ref: ele,
160
160
  ...rest
161
161
  });
162
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ManualFlow, {
162
+ return /*#__PURE__*/ jsx(ManualFlow, {
163
163
  element: ele,
164
164
  ...props,
165
165
  width: width.current
@@ -25,9 +25,9 @@ var __webpack_require__ = {};
25
25
  var __webpack_exports__ = {};
26
26
  __webpack_require__.r(__webpack_exports__);
27
27
  __webpack_require__.d(__webpack_exports__, {
28
- FormLabelConfigContext: ()=>FormLabelConfigContext,
29
28
  FormLabel: ()=>FormLabel,
30
- FormLabelConfigProvider: ()=>FormLabelConfigProvider
29
+ FormLabelConfigProvider: ()=>FormLabelConfigProvider,
30
+ FormLabelConfigContext: ()=>FormLabelConfigContext
31
31
  });
32
32
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
33
33
  const external_react_namespaceObject = require("react");
@@ -1,8 +1,8 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
4
- const FormLabelConfigContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)({});
5
- const FormLabelConfigProvider = ({ width, before, children })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FormLabelConfigContext.Provider, {
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { Fragment, createContext, useContext } from "react";
4
+ const FormLabelConfigContext = /*#__PURE__*/ createContext({});
5
+ const FormLabelConfigProvider = ({ width, before, children })=>/*#__PURE__*/ jsx(FormLabelConfigContext.Provider, {
6
6
  value: {
7
7
  width,
8
8
  before
@@ -10,11 +10,11 @@ const FormLabelConfigProvider = ({ width, before, children })=>/*#__PURE__*/ (0,
10
10
  children: children
11
11
  });
12
12
  const FormLabel = (props)=>{
13
- const { width: _width, before: _before } = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(FormLabelConfigContext);
13
+ const { width: _width, before: _before } = useContext(FormLabelConfigContext);
14
14
  const { style, width = _width, before = _before, ...rest } = props;
15
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react__.Fragment, {
15
+ return /*#__PURE__*/ jsxs(Fragment, {
16
16
  children: [
17
- !!before && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
17
+ !!before && /*#__PURE__*/ jsx("div", {
18
18
  style: {
19
19
  width: 11,
20
20
  color: "transparent",
@@ -22,7 +22,7 @@ const FormLabel = (props)=>{
22
22
  },
23
23
  children: "\u2002"
24
24
  }),
25
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
25
+ /*#__PURE__*/ jsx("div", {
26
26
  style: {
27
27
  width,
28
28
  textAlign: "justify",
@@ -1,20 +1,20 @@
1
1
  "use client"
2
- import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
3
- import * as __WEBPACK_EXTERNAL_MODULE_hls_js_a9a66012__ from "hls.js";
4
- import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
5
- const HlsPlayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)((props, ref)=>{
2
+ import { jsx } from "react/jsx-runtime";
3
+ import hls_0 from "hls.js";
4
+ import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
5
+ const HlsPlayer = /*#__PURE__*/ forwardRef((props, ref)=>{
6
6
  const { src, ...rest } = props;
7
- const video = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
8
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useImperativeHandle)(ref, ()=>video.current, []);
9
- (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
7
+ const video = useRef(null);
8
+ useImperativeHandle(ref, ()=>video.current, []);
9
+ useEffect(()=>{
10
10
  const { current: player } = video;
11
11
  if (!player || !src) return;
12
12
  if (player.canPlayType("application/vnd.apple.mpegurl")) {
13
13
  player.src = src;
14
14
  return;
15
15
  }
16
- if (__WEBPACK_EXTERNAL_MODULE_hls_js_a9a66012__["default"].isSupported()) {
17
- const hls = new __WEBPACK_EXTERNAL_MODULE_hls_js_a9a66012__["default"]();
16
+ if (hls_0.isSupported()) {
17
+ const hls = new hls_0();
18
18
  hls.loadSource(src);
19
19
  hls.attachMedia(player);
20
20
  return ()=>{
@@ -24,7 +24,7 @@ const HlsPlayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef
24
24
  }, [
25
25
  src
26
26
  ]);
27
- return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("video", {
27
+ return /*#__PURE__*/ jsx("video", {
28
28
  ref: video,
29
29
  ...rest
30
30
  });
@@ -24,11 +24,11 @@ var __webpack_require__ = {};
24
24
  var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
- IconFileTypeText: ()=>IconFileTypeText,
28
- IconFileTypeBase: ()=>IconFileTypeBase,
29
- IconFileTypePage: ()=>IconFileTypePage,
30
27
  IconFileType: ()=>IconFileType,
31
- IconFileTypeDogEar: ()=>IconFileTypeDogEar
28
+ IconFileTypeDogEar: ()=>IconFileTypeDogEar,
29
+ IconFileTypeBase: ()=>IconFileTypeBase,
30
+ IconFileTypeText: ()=>IconFileTypeText,
31
+ IconFileTypePage: ()=>IconFileTypePage
32
32
  });
33
33
  const jsx_runtime_namespaceObject = require("react/jsx-runtime");
34
34
  const GOLD = (Math.sqrt(5) - 1) / 2;