deepsea-components 5.17.4 → 5.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AutoFit.cjs +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 +125 -14
- package/dist/components/Echart.d.ts +56 -11
- package/dist/components/Echart.js +51 -13
- 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 +4 -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 +209 -36
- 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) {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.n = (module)=>{
|
|
6
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
7
|
+
__webpack_require__.d(getter, {
|
|
8
|
+
a: getter
|
|
9
|
+
});
|
|
10
|
+
return getter;
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
4
13
|
(()=>{
|
|
5
14
|
__webpack_require__.d = (exports1, definition)=>{
|
|
6
15
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -25,53 +34,155 @@ var __webpack_require__ = {};
|
|
|
25
34
|
var __webpack_exports__ = {};
|
|
26
35
|
__webpack_require__.r(__webpack_exports__);
|
|
27
36
|
__webpack_require__.d(__webpack_exports__, {
|
|
37
|
+
Candlestick: ()=>Candlestick,
|
|
28
38
|
Pie: ()=>Pie,
|
|
39
|
+
Gauge: ()=>Gauge,
|
|
29
40
|
Line: ()=>Line,
|
|
30
|
-
|
|
41
|
+
Parallel: ()=>Parallel,
|
|
42
|
+
Bar: ()=>Bar,
|
|
43
|
+
Scatter: ()=>Scatter,
|
|
44
|
+
Custom: ()=>Custom,
|
|
45
|
+
EffectScatter: ()=>EffectScatter,
|
|
46
|
+
Radar: ()=>Radar,
|
|
47
|
+
Sunburst: ()=>Sunburst,
|
|
48
|
+
ThemeRiver: ()=>ThemeRiver,
|
|
49
|
+
Chord: ()=>Chord,
|
|
50
|
+
Heatmap: ()=>Heatmap,
|
|
51
|
+
Echart: ()=>Echart,
|
|
52
|
+
Map: ()=>Map,
|
|
53
|
+
Tree: ()=>Tree,
|
|
54
|
+
Treemap: ()=>Treemap,
|
|
55
|
+
PictorialBar: ()=>PictorialBar,
|
|
56
|
+
Sankey: ()=>Sankey,
|
|
57
|
+
Lines: ()=>Lines,
|
|
58
|
+
Funnel: ()=>Funnel,
|
|
59
|
+
Graph: ()=>Graph,
|
|
60
|
+
Boxplot: ()=>Boxplot
|
|
31
61
|
});
|
|
32
62
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
-
const external_echarts_namespaceObject = require("echarts");
|
|
34
63
|
const external_react_namespaceObject = require("react");
|
|
35
|
-
const
|
|
36
|
-
|
|
64
|
+
const external_echarts_namespaceObject = require("echarts");
|
|
65
|
+
const external_stable_hash_namespaceObject = require("stable-hash");
|
|
66
|
+
var external_stable_hash_default = /*#__PURE__*/ __webpack_require__.n(external_stable_hash_namespaceObject);
|
|
67
|
+
function Echart({ ref, width, height, locale, init: initOption, option, chart, ...rest }) {
|
|
37
68
|
const container = (0, external_react_namespaceObject.useRef)(null);
|
|
38
69
|
const chartRef = (0, external_react_namespaceObject.useRef)(null);
|
|
39
70
|
(0, external_react_namespaceObject.useLayoutEffect)(()=>{
|
|
40
71
|
const ele = container.current;
|
|
41
72
|
chartRef.current = (0, external_echarts_namespaceObject.init)(ele, option, {
|
|
73
|
+
...initOption,
|
|
42
74
|
width,
|
|
43
|
-
height
|
|
75
|
+
height,
|
|
76
|
+
locale
|
|
44
77
|
});
|
|
45
78
|
return ()=>{
|
|
46
79
|
var _chartRef_current;
|
|
47
80
|
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.dispose();
|
|
48
81
|
};
|
|
49
82
|
}, []);
|
|
50
|
-
(0, external_react_namespaceObject.useImperativeHandle)(ref, ()=>container.current
|
|
51
|
-
(0, external_react_namespaceObject.useImperativeHandle)(chart, ()=>chartRef.current
|
|
83
|
+
(0, external_react_namespaceObject.useImperativeHandle)(ref, ()=>container.current);
|
|
84
|
+
(0, external_react_namespaceObject.useImperativeHandle)(chart, ()=>chartRef.current);
|
|
52
85
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
53
|
-
var _chartRef_current
|
|
54
|
-
null == (_chartRef_current = chartRef.current)
|
|
55
|
-
|
|
86
|
+
var _chartRef_current;
|
|
87
|
+
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.setOption(option);
|
|
88
|
+
}, [
|
|
89
|
+
external_stable_hash_default()(option)
|
|
90
|
+
]);
|
|
91
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
92
|
+
var _chartRef_current;
|
|
93
|
+
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.resize({
|
|
56
94
|
width,
|
|
57
95
|
height
|
|
58
96
|
});
|
|
59
|
-
}
|
|
97
|
+
}, [
|
|
98
|
+
width,
|
|
99
|
+
height
|
|
100
|
+
]);
|
|
101
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
102
|
+
var _chartRef_current;
|
|
103
|
+
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.setOption({
|
|
104
|
+
locale
|
|
105
|
+
});
|
|
106
|
+
}, [
|
|
107
|
+
locale
|
|
108
|
+
]);
|
|
60
109
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
61
110
|
ref: container,
|
|
62
111
|
...rest
|
|
63
112
|
});
|
|
64
|
-
}
|
|
65
|
-
const Pie = Echart;
|
|
113
|
+
}
|
|
66
114
|
const Bar = Echart;
|
|
115
|
+
const Boxplot = Echart;
|
|
116
|
+
const Candlestick = Echart;
|
|
117
|
+
const Chord = Echart;
|
|
118
|
+
const Custom = Echart;
|
|
119
|
+
const EffectScatter = Echart;
|
|
120
|
+
const Funnel = Echart;
|
|
121
|
+
const Gauge = Echart;
|
|
122
|
+
const Graph = Echart;
|
|
123
|
+
const Heatmap = Echart;
|
|
67
124
|
const Line = Echart;
|
|
125
|
+
const Lines = Echart;
|
|
126
|
+
const Map = Echart;
|
|
127
|
+
const Parallel = Echart;
|
|
128
|
+
const PictorialBar = Echart;
|
|
129
|
+
const Pie = Echart;
|
|
130
|
+
const Radar = Echart;
|
|
131
|
+
const Sankey = Echart;
|
|
132
|
+
const Scatter = Echart;
|
|
133
|
+
const Sunburst = Echart;
|
|
134
|
+
const ThemeRiver = Echart;
|
|
135
|
+
const Tree = Echart;
|
|
136
|
+
const Treemap = Echart;
|
|
68
137
|
exports.Bar = __webpack_exports__.Bar;
|
|
138
|
+
exports.Boxplot = __webpack_exports__.Boxplot;
|
|
139
|
+
exports.Candlestick = __webpack_exports__.Candlestick;
|
|
140
|
+
exports.Chord = __webpack_exports__.Chord;
|
|
141
|
+
exports.Custom = __webpack_exports__.Custom;
|
|
142
|
+
exports.Echart = __webpack_exports__.Echart;
|
|
143
|
+
exports.EffectScatter = __webpack_exports__.EffectScatter;
|
|
144
|
+
exports.Funnel = __webpack_exports__.Funnel;
|
|
145
|
+
exports.Gauge = __webpack_exports__.Gauge;
|
|
146
|
+
exports.Graph = __webpack_exports__.Graph;
|
|
147
|
+
exports.Heatmap = __webpack_exports__.Heatmap;
|
|
69
148
|
exports.Line = __webpack_exports__.Line;
|
|
149
|
+
exports.Lines = __webpack_exports__.Lines;
|
|
150
|
+
exports.Map = __webpack_exports__.Map;
|
|
151
|
+
exports.Parallel = __webpack_exports__.Parallel;
|
|
152
|
+
exports.PictorialBar = __webpack_exports__.PictorialBar;
|
|
70
153
|
exports.Pie = __webpack_exports__.Pie;
|
|
154
|
+
exports.Radar = __webpack_exports__.Radar;
|
|
155
|
+
exports.Sankey = __webpack_exports__.Sankey;
|
|
156
|
+
exports.Scatter = __webpack_exports__.Scatter;
|
|
157
|
+
exports.Sunburst = __webpack_exports__.Sunburst;
|
|
158
|
+
exports.ThemeRiver = __webpack_exports__.ThemeRiver;
|
|
159
|
+
exports.Tree = __webpack_exports__.Tree;
|
|
160
|
+
exports.Treemap = __webpack_exports__.Treemap;
|
|
71
161
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
72
162
|
"Bar",
|
|
163
|
+
"Boxplot",
|
|
164
|
+
"Candlestick",
|
|
165
|
+
"Chord",
|
|
166
|
+
"Custom",
|
|
167
|
+
"Echart",
|
|
168
|
+
"EffectScatter",
|
|
169
|
+
"Funnel",
|
|
170
|
+
"Gauge",
|
|
171
|
+
"Graph",
|
|
172
|
+
"Heatmap",
|
|
73
173
|
"Line",
|
|
74
|
-
"
|
|
174
|
+
"Lines",
|
|
175
|
+
"Map",
|
|
176
|
+
"Parallel",
|
|
177
|
+
"PictorialBar",
|
|
178
|
+
"Pie",
|
|
179
|
+
"Radar",
|
|
180
|
+
"Sankey",
|
|
181
|
+
"Scatter",
|
|
182
|
+
"Sunburst",
|
|
183
|
+
"ThemeRiver",
|
|
184
|
+
"Tree",
|
|
185
|
+
"Treemap"
|
|
75
186
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
76
187
|
Object.defineProperty(exports, '__esModule', {
|
|
77
188
|
value: true
|
|
@@ -1,15 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ComponentProps, FC, ReactNode, Ref } from "react";
|
|
2
|
+
import { AngleAxisComponentOption, AriaComponentOption, AxisPointerComponentOption, BarSeriesOption, BoxplotSeriesOption, BrushComponentOption, CalendarComponentOption, CandlestickSeriesOption, ChordSeriesOption, ComposeOption, ContinousVisualMapComponentOption, CustomSeriesOption, DataZoomComponentOption, DatasetComponentOption, ECharts, EChartsInitOpts, EffectScatterSeriesOption, FunnelSeriesOption, GaugeSeriesOption, GeoComponentOption, GraphSeriesOption, GraphicComponentOption, GridComponentOption, HeatmapSeriesOption, InsideDataZoomComponentOption, LegendComponentOption, LineSeriesOption, LinesSeriesOption, MapSeriesOption, MarkAreaComponentOption, MarkLineComponentOption, MarkPointComponentOption, MatrixComponentOption, ParallelSeriesOption, PictorialBarSeriesOption, PieSeriesOption, PiecewiseVisualMapComponentOption, PlainLegendComponentOption, PolarComponentOption, RadarComponentOption, RadarSeriesOption, RadiusAxisComponentOption, SankeySeriesOption, ScatterSeriesOption, ScrollableLegendComponentOption, SeriesOption, SingleAxisComponentOption, SliderDataZoomComponentOption, SunburstSeriesOption, ThemeRiverSeriesOption, ThumbnailComponentOption, TimelineComponentOption, TitleComponentOption, ToolboxComponentOption, TooltipComponentOption, TreeSeriesOption, TreemapSeriesOption, VisualMapComponentOption, XAXisComponentOption, YAXisComponentOption } from "echarts";
|
|
3
|
+
import { ECBasicOption } from "echarts/types/src/util/types.js";
|
|
4
|
+
export type ChartOption<T extends SeriesOption = never> = ComposeOption<T | DatasetComponentOption | GridComponentOption | LegendComponentOption | TitleComponentOption | TooltipComponentOption | AxisPointerComponentOption | GeoComponentOption | MarkLineComponentOption | MarkPointComponentOption | MarkAreaComponentOption | DataZoomComponentOption | AriaComponentOption | BrushComponentOption | PolarComponentOption | RadarComponentOption | XAXisComponentOption | YAXisComponentOption | MatrixComponentOption | GraphicComponentOption | ToolboxComponentOption | CalendarComponentOption | TimelineComponentOption | AngleAxisComponentOption | RadiusAxisComponentOption | SingleAxisComponentOption | VisualMapComponentOption | ThumbnailComponentOption | PlainLegendComponentOption | InsideDataZoomComponentOption | SliderDataZoomComponentOption | PiecewiseVisualMapComponentOption | ContinousVisualMapComponentOption | ScrollableLegendComponentOption>;
|
|
5
|
+
export type BarOption = ChartOption<BarSeriesOption>;
|
|
6
|
+
export type BoxplotOption = ChartOption<BoxplotSeriesOption>;
|
|
7
|
+
export type CandlestickOption = ChartOption<CandlestickSeriesOption>;
|
|
8
|
+
export type ChordOption = ChartOption<ChordSeriesOption>;
|
|
9
|
+
export type CustomOption = ChartOption<CustomSeriesOption>;
|
|
10
|
+
export type EffectScatterOption = ChartOption<EffectScatterSeriesOption>;
|
|
11
|
+
export type FunnelOption = ChartOption<FunnelSeriesOption>;
|
|
12
|
+
export type GaugeOption = ChartOption<GaugeSeriesOption>;
|
|
13
|
+
export type GraphOption = ChartOption<GraphSeriesOption>;
|
|
14
|
+
export type HeatmapOption = ChartOption<HeatmapSeriesOption>;
|
|
15
|
+
export type LineOption = ChartOption<LineSeriesOption>;
|
|
16
|
+
export type LinesOption = ChartOption<LinesSeriesOption>;
|
|
17
|
+
export type MapOption = ChartOption<MapSeriesOption>;
|
|
18
|
+
export type ParallelOption = ChartOption<ParallelSeriesOption>;
|
|
19
|
+
export type PictorialBarOption = ChartOption<PictorialBarSeriesOption>;
|
|
20
|
+
export type PieOption = ChartOption<PieSeriesOption>;
|
|
21
|
+
export type RadarOption = ChartOption<RadarSeriesOption>;
|
|
22
|
+
export type SankeyOption = ChartOption<SankeySeriesOption>;
|
|
23
|
+
export type ScatterOption = ChartOption<ScatterSeriesOption>;
|
|
24
|
+
export type SunburstOption = ChartOption<SunburstSeriesOption>;
|
|
25
|
+
export type ThemeRiverOption = ChartOption<ThemeRiverSeriesOption>;
|
|
26
|
+
export type TreeOption = ChartOption<TreeSeriesOption>;
|
|
27
|
+
export type TreemapOption = ChartOption<TreemapSeriesOption>;
|
|
28
|
+
export type ModifiableEChartsInitOpts = Pick<EChartsInitOpts, "width" | "height" | "locale">;
|
|
29
|
+
export interface EChartInitOption extends Omit<EChartsInitOpts, keyof ModifiableEChartsInitOpts> {
|
|
30
|
+
}
|
|
31
|
+
export interface EchartProps<T extends ECBasicOption = ECBasicOption> extends Omit<ComponentProps<"div">, "children">, ModifiableEChartsInitOpts {
|
|
32
|
+
init?: EChartInitOption;
|
|
9
33
|
option: T;
|
|
10
|
-
chart?:
|
|
34
|
+
chart?: Ref<ECharts>;
|
|
11
35
|
}
|
|
12
|
-
export type EchartComponent<T extends
|
|
13
|
-
export declare
|
|
36
|
+
export type EchartComponent<T extends ECBasicOption = ECBasicOption> = FC<EchartProps<T>>;
|
|
37
|
+
export declare function Echart<T extends ECBasicOption = ECBasicOption>({ ref, width, height, locale, init: initOption, option, chart, ...rest }: EchartProps<T>): ReactNode;
|
|
14
38
|
export declare const Bar: EchartComponent<BarOption>;
|
|
39
|
+
export declare const Boxplot: EchartComponent<BoxplotOption>;
|
|
40
|
+
export declare const Candlestick: EchartComponent<CandlestickOption>;
|
|
41
|
+
export declare const Chord: EchartComponent<ChordOption>;
|
|
42
|
+
export declare const Custom: EchartComponent<CustomOption>;
|
|
43
|
+
export declare const EffectScatter: EchartComponent<EffectScatterOption>;
|
|
44
|
+
export declare const Funnel: EchartComponent<FunnelOption>;
|
|
45
|
+
export declare const Gauge: EchartComponent<GaugeOption>;
|
|
46
|
+
export declare const Graph: EchartComponent<GraphOption>;
|
|
47
|
+
export declare const Heatmap: EchartComponent<HeatmapOption>;
|
|
15
48
|
export declare const Line: EchartComponent<LineOption>;
|
|
49
|
+
export declare const Lines: EchartComponent<LinesOption>;
|
|
50
|
+
export declare const Map: EchartComponent<MapOption>;
|
|
51
|
+
export declare const Parallel: EchartComponent<ParallelOption>;
|
|
52
|
+
export declare const PictorialBar: EchartComponent<PictorialBarOption>;
|
|
53
|
+
export declare const Pie: EchartComponent<PieOption>;
|
|
54
|
+
export declare const Radar: EchartComponent<RadarOption>;
|
|
55
|
+
export declare const Sankey: EchartComponent<SankeyOption>;
|
|
56
|
+
export declare const Scatter: EchartComponent<ScatterOption>;
|
|
57
|
+
export declare const Sunburst: EchartComponent<SunburstOption>;
|
|
58
|
+
export declare const ThemeRiver: EchartComponent<ThemeRiverOption>;
|
|
59
|
+
export declare const Tree: EchartComponent<TreeOption>;
|
|
60
|
+
export declare const Treemap: EchartComponent<TreemapOption>;
|
|
@@ -1,38 +1,76 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react";
|
|
3
4
|
import { init } from "echarts";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
const { width, height, option, chart, ...rest } = props;
|
|
5
|
+
import stable_hash from "stable-hash";
|
|
6
|
+
function Echart({ ref, width, height, locale, init: initOption, option, chart, ...rest }) {
|
|
7
7
|
const container = useRef(null);
|
|
8
8
|
const chartRef = useRef(null);
|
|
9
9
|
useLayoutEffect(()=>{
|
|
10
10
|
const ele = container.current;
|
|
11
11
|
chartRef.current = init(ele, option, {
|
|
12
|
+
...initOption,
|
|
12
13
|
width,
|
|
13
|
-
height
|
|
14
|
+
height,
|
|
15
|
+
locale
|
|
14
16
|
});
|
|
15
17
|
return ()=>{
|
|
16
18
|
var _chartRef_current;
|
|
17
19
|
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.dispose();
|
|
18
20
|
};
|
|
19
21
|
}, []);
|
|
20
|
-
useImperativeHandle(ref, ()=>container.current
|
|
21
|
-
useImperativeHandle(chart, ()=>chartRef.current
|
|
22
|
+
useImperativeHandle(ref, ()=>container.current);
|
|
23
|
+
useImperativeHandle(chart, ()=>chartRef.current);
|
|
24
|
+
useEffect(()=>{
|
|
25
|
+
var _chartRef_current;
|
|
26
|
+
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.setOption(option);
|
|
27
|
+
}, [
|
|
28
|
+
stable_hash(option)
|
|
29
|
+
]);
|
|
22
30
|
useEffect(()=>{
|
|
23
|
-
var _chartRef_current
|
|
24
|
-
null == (_chartRef_current = chartRef.current)
|
|
25
|
-
null == (_chartRef_current1 = chartRef.current) || _chartRef_current1.resize({
|
|
31
|
+
var _chartRef_current;
|
|
32
|
+
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.resize({
|
|
26
33
|
width,
|
|
27
34
|
height
|
|
28
35
|
});
|
|
29
|
-
}
|
|
36
|
+
}, [
|
|
37
|
+
width,
|
|
38
|
+
height
|
|
39
|
+
]);
|
|
40
|
+
useEffect(()=>{
|
|
41
|
+
var _chartRef_current;
|
|
42
|
+
return null == (_chartRef_current = chartRef.current) ? void 0 : _chartRef_current.setOption({
|
|
43
|
+
locale
|
|
44
|
+
});
|
|
45
|
+
}, [
|
|
46
|
+
locale
|
|
47
|
+
]);
|
|
30
48
|
return /*#__PURE__*/ jsx("div", {
|
|
31
49
|
ref: container,
|
|
32
50
|
...rest
|
|
33
51
|
});
|
|
34
|
-
}
|
|
35
|
-
const Pie = Echart;
|
|
52
|
+
}
|
|
36
53
|
const Bar = Echart;
|
|
54
|
+
const Boxplot = Echart;
|
|
55
|
+
const Candlestick = Echart;
|
|
56
|
+
const Chord = Echart;
|
|
57
|
+
const Custom = Echart;
|
|
58
|
+
const EffectScatter = Echart;
|
|
59
|
+
const Funnel = Echart;
|
|
60
|
+
const Gauge = Echart;
|
|
61
|
+
const Graph = Echart;
|
|
62
|
+
const Heatmap = Echart;
|
|
37
63
|
const Line = Echart;
|
|
38
|
-
|
|
64
|
+
const Lines = Echart;
|
|
65
|
+
const Map = Echart;
|
|
66
|
+
const Parallel = Echart;
|
|
67
|
+
const PictorialBar = Echart;
|
|
68
|
+
const Pie = Echart;
|
|
69
|
+
const Radar = Echart;
|
|
70
|
+
const Sankey = Echart;
|
|
71
|
+
const Scatter = Echart;
|
|
72
|
+
const Sunburst = Echart;
|
|
73
|
+
const ThemeRiver = Echart;
|
|
74
|
+
const Tree = Echart;
|
|
75
|
+
const Treemap = Echart;
|
|
76
|
+
export { Bar, Boxplot, Candlestick, Chord, Custom, Echart, EffectScatter, Funnel, Gauge, Graph, Heatmap, Line, Lines, Map, Parallel, PictorialBar, Pie, Radar, Sankey, Scatter, Sunburst, ThemeRiver, Tree, Treemap };
|
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: [
|