yootd 0.2.22 → 0.2.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.
- package/dist/tabs/index.js +43 -27
- package/dist/video-player/index.d.ts +4 -0
- package/dist/video-player/index.js +83 -15
- package/dist/video-player/index.scss +28 -0
- package/package.json +92 -92
package/dist/tabs/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
|
-
var _excluded = ["size", "capsule", "className", "items", "onChange", "activeKey", "destroyInactiveTabPane", "isTabMargin"];
|
4
|
+
var _excluded = ["size", "capsule", "className", "items", "onChange", "activeKey", "defaultActiveKey", "destroyInactiveTabPane", "isTabMargin"];
|
5
5
|
import { Tabs as AntTabs, Radio } from 'antd';
|
6
6
|
import React, { useEffect, useState } from 'react';
|
7
7
|
import { useBem } from "../hooks/useBem";
|
@@ -14,16 +14,18 @@ export var TabsComponent = function TabsComponent(_ref) {
|
|
14
14
|
items = _ref.items,
|
15
15
|
_onChange = _ref.onChange,
|
16
16
|
activeKey = _ref.activeKey,
|
17
|
+
defaultActiveKey = _ref.defaultActiveKey,
|
17
18
|
_ref$destroyInactiveT = _ref.destroyInactiveTabPane,
|
18
19
|
destroyInactiveTabPane = _ref$destroyInactiveT === void 0 ? false : _ref$destroyInactiveT,
|
19
20
|
_ref$isTabMargin = _ref.isTabMargin,
|
20
21
|
isTabMargin = _ref$isTabMargin === void 0 ? true : _ref$isTabMargin,
|
21
22
|
rest = _objectWithoutProperties(_ref, _excluded);
|
22
23
|
var mb = useBem('tabs');
|
23
|
-
|
24
|
+
// const [key, setKey] = useState<string>();
|
25
|
+
var _useState = useState(activeKey !== null && activeKey !== void 0 ? activeKey : defaultActiveKey),
|
24
26
|
_useState2 = _slicedToArray(_useState, 2),
|
25
|
-
|
26
|
-
|
27
|
+
capsuleKey = _useState2[0],
|
28
|
+
setCapsuleKey = _useState2[1];
|
27
29
|
var _useState3 = useState(new Set()),
|
28
30
|
_useState4 = _slicedToArray(_useState3, 2),
|
29
31
|
renderKey = _useState4[0],
|
@@ -40,22 +42,28 @@ export var TabsComponent = function TabsComponent(_ref) {
|
|
40
42
|
// 默认为小尺寸
|
41
43
|
_className = "".concat(mb.b('large'));
|
42
44
|
}
|
45
|
+
console.log("capsuleKey", capsuleKey);
|
46
|
+
|
43
47
|
// 给key设置默认值
|
44
48
|
useEffect(function () {
|
45
|
-
if (
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
+
if (capsuleKey != null) {
|
50
|
+
setRenderKey(function (prev) {
|
51
|
+
var newSet = new Set(prev);
|
52
|
+
newSet.add(capsuleKey);
|
53
|
+
return newSet;
|
49
54
|
});
|
50
55
|
} else {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
var _items$0$
|
55
|
-
|
56
|
+
setRenderKey(function (prev) {
|
57
|
+
var _items$;
|
58
|
+
var newSet = new Set(prev);
|
59
|
+
var firstKey = items === null || items === void 0 || (_items$ = items[0]) === null || _items$ === void 0 ? void 0 : _items$.key;
|
60
|
+
if (firstKey != null) {
|
61
|
+
newSet.add(firstKey);
|
62
|
+
}
|
63
|
+
return newSet;
|
56
64
|
});
|
57
65
|
}
|
58
|
-
}, [
|
66
|
+
}, [capsuleKey, items]);
|
59
67
|
return /*#__PURE__*/React.createElement("div", {
|
60
68
|
className: "".concat(mb)
|
61
69
|
}, capsule ? /*#__PURE__*/React.createElement("div", {
|
@@ -65,22 +73,30 @@ export var TabsComponent = function TabsComponent(_ref) {
|
|
65
73
|
style: {
|
66
74
|
paddingBottom: isTabMargin ? 16 : 0
|
67
75
|
}
|
68
|
-
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
69
|
-
value:
|
76
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, _extends({}, activeKey != null ? {
|
77
|
+
value: activeKey
|
78
|
+
} : {}, defaultActiveKey != null ? {
|
79
|
+
defaultValue: defaultActiveKey
|
80
|
+
} : {}, {
|
70
81
|
onChange: function onChange(e) {
|
71
|
-
setKey(e.target.value);
|
72
82
|
setRenderKey(function (pre) {
|
73
83
|
return pre.add(e.target.value);
|
74
84
|
});
|
85
|
+
if (activeKey == null) {
|
86
|
+
setCapsuleKey(e.target.value);
|
87
|
+
}
|
75
88
|
_onChange === null || _onChange === void 0 || _onChange(e.target.value);
|
76
|
-
}
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
89
|
+
},
|
90
|
+
block: true,
|
91
|
+
optionType: "button",
|
92
|
+
options: items === null || items === void 0 ? void 0 : items.map(function (item) {
|
93
|
+
return {
|
94
|
+
value: item.key,
|
95
|
+
label: item.label
|
96
|
+
};
|
97
|
+
})
|
82
98
|
}))), destroyInactiveTabPane ? /*#__PURE__*/React.createElement("div", null, items === null || items === void 0 || (_items$find = items.find(function (item) {
|
83
|
-
return item.key ===
|
99
|
+
return item.key === capsuleKey;
|
84
100
|
})) === null || _items$find === void 0 ? void 0 : _items$find.children) : /*#__PURE__*/React.createElement("div", {
|
85
101
|
className: "".concat(mb.b('capsule').e('value'))
|
86
102
|
}, items === null || items === void 0 || (_items$filter = items.filter(function (item) {
|
@@ -89,17 +105,17 @@ export var TabsComponent = function TabsComponent(_ref) {
|
|
89
105
|
return /*#__PURE__*/React.createElement("div", {
|
90
106
|
key: item.key,
|
91
107
|
style: {
|
92
|
-
display:
|
108
|
+
display: capsuleKey === item.key ? 'block' : 'none'
|
93
109
|
}
|
94
110
|
}, item.children);
|
95
111
|
}))) : /*#__PURE__*/React.createElement(AntTabs, _extends({
|
96
|
-
activeKey:
|
112
|
+
activeKey: activeKey,
|
113
|
+
defaultActiveKey: defaultActiveKey,
|
97
114
|
size: size,
|
98
115
|
items: items,
|
99
116
|
className: "".concat(className !== null && className !== void 0 ? className : '', " ").concat(_className, " ").concat(isTabMargin ? '' : mb.b('istabmargin'), " "),
|
100
117
|
destroyInactiveTabPane: destroyInactiveTabPane,
|
101
118
|
onChange: function onChange(e) {
|
102
|
-
setKey(e);
|
103
119
|
_onChange === null || _onChange === void 0 || _onChange(e);
|
104
120
|
}
|
105
121
|
}, rest)));
|
@@ -31,9 +31,11 @@ var speeds = ['2.0', '1.75', '1.5', '1.25', '1.0', '0.75', '0.5'];
|
|
31
31
|
export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
32
32
|
var src = _ref.src,
|
33
33
|
isLive = _ref.isLive,
|
34
|
-
controls = _ref.controls,
|
34
|
+
_ref$controls = _ref.controls,
|
35
|
+
controls = _ref$controls === void 0 ? true : _ref$controls,
|
35
36
|
autoPlay = _ref.autoPlay,
|
36
|
-
muted = _ref.muted,
|
37
|
+
_ref$muted = _ref.muted,
|
38
|
+
muted = _ref$muted === void 0 ? true : _ref$muted,
|
37
39
|
style = _ref.style,
|
38
40
|
_ref$aiFeatures = _ref.aiFeatures,
|
39
41
|
aiFeatures = _ref$aiFeatures === void 0 ? ['emotion', 'character', 'anchor', 'pose'] : _ref$aiFeatures,
|
@@ -43,7 +45,7 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
43
45
|
retryInterval = _ref$retryInterval === void 0 ? 5000 : _ref$retryInterval,
|
44
46
|
className = _ref.className,
|
45
47
|
_ref$audioEnable = _ref.audioEnable,
|
46
|
-
audioEnable = _ref$audioEnable === void 0 ?
|
48
|
+
audioEnable = _ref$audioEnable === void 0 ? false : _ref$audioEnable,
|
47
49
|
_ref$videoEnable = _ref.videoEnable,
|
48
50
|
videoEnable = _ref$videoEnable === void 0 ? true : _ref$videoEnable,
|
49
51
|
_ref$rotateWhenFullSc = _ref.rotateWhenFullScreen,
|
@@ -51,7 +53,9 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
51
53
|
_ref$miniProgram = _ref.miniProgram,
|
52
54
|
miniProgram = _ref$miniProgram === void 0 ? false : _ref$miniProgram,
|
53
55
|
_ref$showCapture = _ref.showCapture,
|
54
|
-
showCapture = _ref$showCapture === void 0 ?
|
56
|
+
showCapture = _ref$showCapture === void 0 ? false : _ref$showCapture,
|
57
|
+
_ref$showDownload = _ref.showDownload,
|
58
|
+
showDownload = _ref$showDownload === void 0 ? false : _ref$showDownload,
|
55
59
|
onPlayStateChange = _ref.onPlayStateChange,
|
56
60
|
onCapture = _ref.onCapture,
|
57
61
|
onCurrentTimeChange = _ref.onCurrentTimeChange,
|
@@ -62,16 +66,17 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
62
66
|
var poseCanvasRef = useRef(null);
|
63
67
|
var detectAllFacesRef = useRef();
|
64
68
|
var getAdjacentPairsRef = useRef();
|
65
|
-
var
|
66
|
-
var _useState = useState(null),
|
69
|
+
var _useState = useState(false),
|
67
70
|
_useState2 = _slicedToArray(_useState, 2),
|
68
|
-
|
69
|
-
|
71
|
+
downloading = _useState2[0],
|
72
|
+
setDownloading = _useState2[1];
|
73
|
+
var request = useRequest();
|
74
|
+
var _useState3 = useState(null),
|
75
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
76
|
+
poseDetector = _useState4[0],
|
77
|
+
setPoseDetector = _useState4[1];
|
70
78
|
var OSS = useOSS();
|
71
79
|
var bem = useBem('video-player');
|
72
|
-
var _useState3 = useState(true),
|
73
|
-
_useState4 = _slicedToArray(_useState3, 1),
|
74
|
-
show = _useState4[0];
|
75
80
|
var _useState5 = useState(false),
|
76
81
|
_useState6 = _slicedToArray(_useState5, 2),
|
77
82
|
isFullScreen = _useState6[0],
|
@@ -637,6 +642,39 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
637
642
|
onCapture === null || onCapture === void 0 || onCapture(_base);
|
638
643
|
}
|
639
644
|
};
|
645
|
+
var handleDownload = function handleDownload() {
|
646
|
+
if (downloading) {
|
647
|
+
return;
|
648
|
+
}
|
649
|
+
if (videoRef.current != null) {
|
650
|
+
if (videoRef.current.readyState != 4) {
|
651
|
+
return;
|
652
|
+
}
|
653
|
+
// 检测 fetch 是否可用
|
654
|
+
if (typeof fetch === 'undefined') {
|
655
|
+
onError === null || onError === void 0 || onError("fetch 不可用,无法现在视频");
|
656
|
+
return;
|
657
|
+
}
|
658
|
+
setDownloading(true);
|
659
|
+
var filename = videoRef.current.src.split('/').pop() || 'video.mp4';
|
660
|
+
fetch(src).then(function (res) {
|
661
|
+
return res.blob();
|
662
|
+
}).then(function (blob) {
|
663
|
+
var url = URL.createObjectURL(blob);
|
664
|
+
var a = document.createElement('a');
|
665
|
+
a.style.display = 'none';
|
666
|
+
a.href = url;
|
667
|
+
a.download = filename;
|
668
|
+
document.body.appendChild(a);
|
669
|
+
a.click();
|
670
|
+
document.body.removeChild(a);
|
671
|
+
}).catch(function (e) {
|
672
|
+
onError === null || onError === void 0 || onError("发生错误:" + e);
|
673
|
+
}).finally(function () {
|
674
|
+
setDownloading(false);
|
675
|
+
});
|
676
|
+
}
|
677
|
+
};
|
640
678
|
// 开始跳转时触发
|
641
679
|
var handleSeeking = function handleSeeking() {
|
642
680
|
setIsSeeking(true);
|
@@ -941,7 +979,7 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
941
979
|
,
|
942
980
|
onSeeked: handleSeeked,
|
943
981
|
onError: handleVideoError
|
944
|
-
})), controls === true &&
|
982
|
+
})), controls === true && /*#__PURE__*/React.createElement("div", {
|
945
983
|
className: "".concat(bem.b('container').e('controls'))
|
946
984
|
}, /*#__PURE__*/React.createElement("div", {
|
947
985
|
className: "".concat(bem.b('container').e('mask')),
|
@@ -1096,18 +1134,48 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1096
1134
|
id: "Vector",
|
1097
1135
|
d: "M13.8982 2.31663C13.9446 2.39087 13.976 2.47352 13.9904 2.55987C14.0049 2.64622 14.0022 2.73457 13.9825 2.81987C13.9628 2.90518 13.9265 2.98577 13.8757 3.05705C13.8249 3.12833 13.7605 3.1889 13.6862 3.2353L9.26624 5.99663L11.9429 7.66863L11.9782 7.66996C12.7357 7.70479 13.4555 8.01026 14.0069 8.53084C14.5582 9.05142 14.9044 9.75255 14.9826 10.5068C15.0608 11.261 14.8657 12.0182 14.4329 12.6408C14.0001 13.2634 13.3582 13.7101 12.624 13.8995C11.8898 14.089 11.112 14.0087 10.4319 13.6732C9.75191 13.3378 9.21482 12.7695 8.9183 12.0716C8.62178 11.3737 8.58553 10.5926 8.81613 9.87026C9.04673 9.14791 9.52887 8.53228 10.1749 8.1353L8.00891 6.78263L5.83424 8.14063C6.48043 8.54091 6.96107 9.16026 7.1884 9.88559C7.41573 10.6109 7.37458 11.3938 7.07246 12.0913C6.77034 12.7888 6.22741 13.3543 5.54282 13.6847C4.85823 14.015 4.07767 14.0881 3.34367 13.8905C2.60968 13.693 1.97123 13.238 1.54492 12.6087C1.11862 11.9793 0.932898 11.2177 1.02168 10.4628C1.11047 9.70786 1.46783 9.01007 2.02851 8.49684C2.58919 7.9836 3.31578 7.68916 4.07558 7.6673L6.75091 5.99663L2.33224 3.2353C2.19381 3.14873 2.09195 3.01437 2.04599 2.8577C2.00004 2.70102 2.01317 2.53293 2.08291 2.3853L2.12024 2.31663C2.16664 2.24239 2.22721 2.17802 2.29849 2.12718C2.36977 2.07635 2.45036 2.04005 2.53567 2.02037C2.62098 2.00068 2.70932 1.99799 2.79567 2.01245C2.88202 2.02691 2.96467 2.05823 3.03891 2.10463L8.00891 5.21063L12.9796 2.10463C13.0538 2.05823 13.1365 2.02691 13.2228 2.01245C13.3092 1.99799 13.3975 2.00068 13.4828 2.02037C13.5681 2.04005 13.6487 2.07635 13.72 2.12718C13.7913 2.17802 13.8518 2.24239 13.8982 2.31663ZM4.16691 8.99996C3.68068 8.99996 3.21437 9.19312 2.87055 9.53694C2.52673 9.88075 2.33358 10.3471 2.33358 10.8333C2.33358 11.3195 2.52673 11.7858 2.87055 12.1297C3.21437 12.4735 3.68068 12.6666 4.16691 12.6666C4.65314 12.6666 5.11946 12.4735 5.46327 12.1297C5.80709 11.7858 6.00024 11.3195 6.00024 10.8333C6.00024 10.3471 5.80709 9.88075 5.46327 9.53694C5.11946 9.19312 4.65314 8.99996 4.16691 8.99996ZM11.8336 8.99996C11.3473 8.99996 10.881 9.19312 10.5372 9.53694C10.1934 9.88075 10.0002 10.3471 10.0002 10.8333C10.0002 11.3195 10.1934 11.7858 10.5372 12.1297C10.881 12.4735 11.3473 12.6666 11.8336 12.6666C12.3198 12.6666 12.7861 12.4735 13.1299 12.1297C13.4738 11.7858 13.6669 11.3195 13.6669 10.8333C13.6669 10.3471 13.4738 9.88075 13.1299 9.53694C12.7861 9.19312 12.3198 8.99996 11.8336 8.99996Z",
|
1098
1136
|
fill: "white"
|
1099
|
-
})))) : null, /*#__PURE__*/React.createElement("div", {
|
1137
|
+
})))) : null, showDownload && !isLive ? /*#__PURE__*/React.createElement("div", {
|
1138
|
+
className: "".concat(bem.b('container').e('controls-download'))
|
1139
|
+
}, downloading ? /*#__PURE__*/React.createElement("svg", {
|
1140
|
+
viewBox: "0 0 1024 1024",
|
1141
|
+
version: "1.1",
|
1142
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1143
|
+
"p-id": "1136",
|
1144
|
+
width: "200",
|
1145
|
+
height: "200",
|
1146
|
+
className: "".concat(bem.b('container').e('controls-download').e('downloading-icon'))
|
1147
|
+
}, /*#__PURE__*/React.createElement("path", {
|
1148
|
+
d: "M300.580571 796.562286c0 40.009143-32.585143 73.142857-73.142857 73.142857-40.009143 0-73.142857-33.133714-73.142857-73.142857 0-40.557714 33.133714-73.142857 73.142857-73.142857 40.557714 0 73.142857 32.585143 73.142857 73.142857zM585.142857 914.285714c0 40.557714-32.585143 73.142857-73.142857 73.142857s-73.142857-32.585143-73.142857-73.142857 32.585143-73.142857 73.142857-73.142857 73.142857 32.585143 73.142857 73.142857zM182.857143 512c0 40.557714-32.585143 73.142857-73.142857 73.142857s-73.142857-32.585143-73.142857-73.142857 32.585143-73.142857 73.142857-73.142857 73.142857 32.585143 73.142857 73.142857z m686.848 284.562286c0 40.009143-33.133714 73.142857-73.142857 73.142857-40.557714 0-73.142857-33.133714-73.142857-73.142857 0-40.557714 32.585143-73.142857 73.142857-73.142857 40.009143 0 73.142857 32.585143 73.142857 73.142857zM318.866286 227.437714c0 50.285714-41.142857 91.428571-91.428572 91.428572s-91.428571-41.142857-91.428571-91.428572 41.142857-91.428571 91.428571-91.428571 91.428571 41.142857 91.428572 91.428571zM987.428571 512c0 40.557714-32.585143 73.142857-73.142857 73.142857s-73.142857-32.585143-73.142857-73.142857 32.585143-73.142857 73.142857-73.142857 73.142857 32.585143 73.142857 73.142857zM621.714286 109.714286a109.750857 109.750857 0 0 1-219.428572 0 109.750857 109.750857 0 0 1 219.428572 0z m302.848 117.723428c0 70.838857-57.709714 128-128 128a127.817143 127.817143 0 0 1-128-128c0-70.290286 57.161143-128 128-128 70.290286 0 128 57.709714 128 128z",
|
1149
|
+
fill: "#ffffff",
|
1150
|
+
"p-id": "1137"
|
1151
|
+
})) : /*#__PURE__*/React.createElement("svg", {
|
1152
|
+
viewBox: "0 0 1024 1024",
|
1153
|
+
version: "1.1",
|
1154
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1155
|
+
width: "200",
|
1156
|
+
height: "200",
|
1157
|
+
onClick: handleDownload
|
1158
|
+
}, /*#__PURE__*/React.createElement("path", {
|
1159
|
+
d: "M503.30070282 717.74528263c4.41869063 5.66144737 12.97990373 5.66144737 17.39859436 0l154.65417219-195.66514461c5.66144737-7.18037229 0.55233633-17.81284661-8.69929719-17.81284662h-102.32030498V36.99075687c0-6.07569962-4.97102697-11.04672658-11.0467266-11.04672659h-82.85044937c-6.07569962 0-11.04672658 4.97102697-11.04672659 11.04672659v467.13845044H357.34582782c-9.25163351 0-14.36074457 10.63247434-8.69929719 17.81284661l154.65417219 195.80322871z",
|
1160
|
+
"p-id": "937",
|
1161
|
+
fill: "#ffffff"
|
1162
|
+
}), /*#__PURE__*/React.createElement("path", {
|
1163
|
+
d: "M1017.38774124 669.41585383h-82.85044939c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672659v212.64948675H100.50943473V680.46258042c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659h-82.85044939c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672659v273.40648295c0 24.44088257 19.74602377 44.18690634 44.18690634 44.18690635h944.49512296c24.44088257 0 44.18690634-19.74602377 44.18690634-44.18690635V680.46258042c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",
|
1164
|
+
fill: "#ffffff"
|
1165
|
+
}))) : null, /*#__PURE__*/React.createElement("div", {
|
1100
1166
|
className: "".concat(bem.b('container').e('controls-setting'))
|
1101
1167
|
}, /*#__PURE__*/React.createElement("svg", {
|
1102
1168
|
viewBox: "0 0 1024 1024",
|
1103
1169
|
version: "1.1",
|
1104
1170
|
xmlns: "http://www.w3.org/2000/svg",
|
1171
|
+
"p-id": "1224",
|
1105
1172
|
width: "200",
|
1106
1173
|
height: "200",
|
1107
1174
|
onClick: handleShowSettingPanel
|
1108
1175
|
}, /*#__PURE__*/React.createElement("path", {
|
1109
|
-
d: "
|
1110
|
-
fill: "#ffffff"
|
1176
|
+
d: "M390.10687737 2.54788165a26.81326939 26.81326939 0 0 0-26.81326938 26.8132694v113.90276834a401.77002848 401.77002848 0 0 0-77.91936085 45.07310584l-98.72645789-56.97819742a26.81326939 26.81326939 0 0 0-36.62692596 9.81365657l-134.06634694 232.20291288a26.81326939 26.81326939 0 0 0 9.81365661 36.62692599l98.69964459 56.97819744a406.59641697 406.59641697 0 0 0 0 90.03895862l-98.67283133 56.97819744a26.81326939 26.81326939 0 0 0-11.26157315 33.8115327l1.42110328 2.81539329 134.06634694 232.20291288a26.81326939 26.81326939 0 0 0 36.62692596 9.81365657l98.72645789-56.97819742a401.77002848 401.77002848 0 0 0 77.91936085 45.04629256V994.63884895a26.81326939 26.81326939 0 0 0 26.81326938 26.8132694h268.13269386a26.81326939 26.81326939 0 0 0 26.8132694-26.8132694v-113.90276834a401.77002848 401.77002848 0 0 0 77.94617409-45.07310584l98.7264579 56.97819742a26.81326939 26.81326939 0 0 0 36.62692596-9.81365657l134.06634692-232.20291288a26.81326939 26.81326939 0 0 0-7.18595618-34.91087677l-2.62770039-1.71604922-98.69964462-56.97819744a406.59641697 406.59641697 0 0 0 0-90.03895862l98.67283135-56.97819744a26.81326939 26.81326939 0 0 0 11.26157314-33.8115327l-1.4211033-2.81539329-134.06634692-232.20291288a26.81326939 26.81326939 0 0 0-36.62692596-9.81365657l-98.7264579 56.97819742a401.77002848 401.77002848 0 0 0-77.91936083-45.04629256V29.36115105a26.81326939 26.81326939 0 0 0-26.81326938-26.8132694h-268.13269386z m53.62653877 80.43980816h160.87961632v112.91067741l48.26388489 21.07522973c22.04050743 9.65277699 42.95485757 21.74556148 62.31403805 36.06384731l42.36496565 31.31789864 97.94887306-56.52237184 80.43980815 139.32174771-97.8148067 56.44193207 5.81847944 52.2858753a326.15660881 326.15660881 0 0 1 0 72.23494772l-5.81847944 52.2858753 97.8148067 56.44193207-80.43980815 139.32174771-97.92205978-56.52237184-42.39177893 31.31789864c-19.35918049 14.31828585-40.2735306 26.41107036-62.31403805 36.06384731l-48.26388489 21.07522973V941.01231019h-160.87961632v-112.91067741l-48.23707162-21.07522973c-22.04050743-9.65277699-42.95485757-21.74556148-62.31403806-36.06384731l-42.36496563-31.31789864-97.94887308 56.52237184-80.43980813-139.32174771 97.81480672-56.44193207-5.81847947-52.2858753a326.15660881 326.15660881 0 0 1 0-72.23494772l5.81847947-52.2858753-97.81480672-56.44193207 80.43980813-139.32174771 97.92205981 56.52237184 42.3917789-31.31789864a321.33022032 321.33022032 0 0 1 62.31403806-36.06384731l48.2638849-21.07522973V82.98768981z m79.23321104 241.31942448a187.69288571 187.69288571 0 1 0 0 375.38577142 187.69288571 187.69288571 0 0 0 0-375.38577142z m0 80.43980816a107.25307755 107.25307755 0 1 1 0 214.5061551 107.25307755 107.25307755 0 0 1 0-214.5061551z",
|
1177
|
+
fill: "#ffffff",
|
1178
|
+
"p-id": "1225"
|
1111
1179
|
})), showSettingPanel ? /*#__PURE__*/React.createElement("div", {
|
1112
1180
|
className: "".concat(bem.b('container').e('controls-setting').e('panel')),
|
1113
1181
|
onClick: function onClick(e) {
|
@@ -2,6 +2,7 @@
|
|
2
2
|
display: flex;
|
3
3
|
justify-content: center;
|
4
4
|
align-items: center;
|
5
|
+
|
5
6
|
&-container {
|
6
7
|
width: 100%;
|
7
8
|
height: 100%;
|
@@ -219,6 +220,23 @@
|
|
219
220
|
}
|
220
221
|
}
|
221
222
|
|
223
|
+
&__controls-download {
|
224
|
+
position: relative;
|
225
|
+
margin-right: 20px;
|
226
|
+
display: flex;
|
227
|
+
align-items: center;
|
228
|
+
|
229
|
+
svg {
|
230
|
+
width: 16px;
|
231
|
+
height: 16px;
|
232
|
+
cursor: pointer;
|
233
|
+
}
|
234
|
+
|
235
|
+
&__downloading-icon {
|
236
|
+
animation: downloadIconSpin 1s linear infinite;
|
237
|
+
}
|
238
|
+
}
|
239
|
+
|
222
240
|
&__controls-setting {
|
223
241
|
position: relative;
|
224
242
|
margin-right: 20px;
|
@@ -307,3 +325,13 @@
|
|
307
325
|
height: 100vw !important;
|
308
326
|
}
|
309
327
|
}
|
328
|
+
|
329
|
+
@keyframes downloadIconSpin {
|
330
|
+
0% {
|
331
|
+
transform: rotate(0deg);
|
332
|
+
}
|
333
|
+
|
334
|
+
100% {
|
335
|
+
transform: rotate(360deg);
|
336
|
+
}
|
337
|
+
}
|
package/package.json
CHANGED
@@ -1,92 +1,92 @@
|
|
1
|
-
{
|
2
|
-
"name": "yootd",
|
3
|
-
"version": "0.2.
|
4
|
-
"description": "基于 Antd 二次开发的组件库",
|
5
|
-
"license": "MIT",
|
6
|
-
"module": "dist/index.js",
|
7
|
-
"types": "dist/index.d.ts",
|
8
|
-
"files": [
|
9
|
-
"dist"
|
10
|
-
],
|
11
|
-
"scripts": {
|
12
|
-
"build": "father build",
|
13
|
-
"build:watch": "father dev",
|
14
|
-
"dev": "dumi dev",
|
15
|
-
"docs:build": "dumi build",
|
16
|
-
"docs:preview": "dumi preview",
|
17
|
-
"doctor": "father doctor",
|
18
|
-
"lint": "npm run lint:es && npm run lint:css",
|
19
|
-
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
20
|
-
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
21
|
-
"prepare": "husky install && dumi setup",
|
22
|
-
"prepublishOnly": "father doctor && npm run build",
|
23
|
-
"start": "npm run dev"
|
24
|
-
},
|
25
|
-
"commitlint": {
|
26
|
-
"extends": [
|
27
|
-
"@commitlint/config-conventional"
|
28
|
-
]
|
29
|
-
},
|
30
|
-
"lint-staged": {
|
31
|
-
"*.{md,json}": [
|
32
|
-
"prettier --write --no-error-on-unmatched-pattern"
|
33
|
-
],
|
34
|
-
"*.{css,less}": [
|
35
|
-
"stylelint --fix",
|
36
|
-
"prettier --write"
|
37
|
-
],
|
38
|
-
"*.{js,jsx}": [
|
39
|
-
"eslint --fix",
|
40
|
-
"prettier --write"
|
41
|
-
],
|
42
|
-
"*.{ts,tsx}": [
|
43
|
-
"eslint --fix",
|
44
|
-
"prettier --parser=typescript --write"
|
45
|
-
]
|
46
|
-
},
|
47
|
-
"dependencies": {
|
48
|
-
"@ant-design/icons": "^6.0.0",
|
49
|
-
"@babel/runtime": "^7.26.9"
|
50
|
-
},
|
51
|
-
"devDependencies": {
|
52
|
-
"@commitlint/cli": "^17.1.2",
|
53
|
-
"@commitlint/config-conventional": "^17.1.0",
|
54
|
-
"@types/lodash": "^4.17.12",
|
55
|
-
"@types/react": "^18.0.0",
|
56
|
-
"@types/react-dom": "^18.0.0",
|
57
|
-
"@umijs/lint": "^4.0.0",
|
58
|
-
"dumi": "^2.3.0",
|
59
|
-
"dumi-theme-antd": "^0.4.2",
|
60
|
-
"eslint": "^8.23.0",
|
61
|
-
"father": "^4.1.0",
|
62
|
-
"husky": "^8.0.1",
|
63
|
-
"lint-staged": "^13.0.3",
|
64
|
-
"prettier": "^2.7.1",
|
65
|
-
"prettier-plugin-organize-imports": "^3.0.0",
|
66
|
-
"prettier-plugin-packagejson": "^2.2.18",
|
67
|
-
"sass": "^1.80.0",
|
68
|
-
"stylelint": "^14.9.1"
|
69
|
-
},
|
70
|
-
"peerDependencies": {
|
71
|
-
"@dnd-kit/core": ">=6.1.0",
|
72
|
-
"@dnd-kit/modifiers": ">=7.0.0",
|
73
|
-
"@dnd-kit/sortable": ">=8.0.0",
|
74
|
-
"@dnd-kit/utilities": ">=3.2.2",
|
75
|
-
"@tanstack/react-query": ">=5.59.15",
|
76
|
-
"@tensorflow-models/pose-detection": ">=2.1.3",
|
77
|
-
"@tensorflow/tfjs": ">=4.22.0",
|
78
|
-
"@vladmandic/face-api": ">=1.7.14",
|
79
|
-
"@xyflow/react": ">=12.3.3",
|
80
|
-
"antd": ">=5.21.4",
|
81
|
-
"axios": ">=1.7.7",
|
82
|
-
"dayjs": ">=1.11.13",
|
83
|
-
"lodash": ">=4.17.21",
|
84
|
-
"react": ">=18.0.0",
|
85
|
-
"react-dom": ">=18.0.0",
|
86
|
-
"yootd-webrtc-sdk": ">=1.0.1"
|
87
|
-
},
|
88
|
-
"publishConfig": {
|
89
|
-
"access": "public"
|
90
|
-
},
|
91
|
-
"authors": []
|
92
|
-
}
|
1
|
+
{
|
2
|
+
"name": "yootd",
|
3
|
+
"version": "0.2.24",
|
4
|
+
"description": "基于 Antd 二次开发的组件库",
|
5
|
+
"license": "MIT",
|
6
|
+
"module": "dist/index.js",
|
7
|
+
"types": "dist/index.d.ts",
|
8
|
+
"files": [
|
9
|
+
"dist"
|
10
|
+
],
|
11
|
+
"scripts": {
|
12
|
+
"build": "father build",
|
13
|
+
"build:watch": "father dev",
|
14
|
+
"dev": "dumi dev",
|
15
|
+
"docs:build": "dumi build",
|
16
|
+
"docs:preview": "dumi preview",
|
17
|
+
"doctor": "father doctor",
|
18
|
+
"lint": "npm run lint:es && npm run lint:css",
|
19
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
20
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
21
|
+
"prepare": "husky install && dumi setup",
|
22
|
+
"prepublishOnly": "father doctor && npm run build",
|
23
|
+
"start": "npm run dev"
|
24
|
+
},
|
25
|
+
"commitlint": {
|
26
|
+
"extends": [
|
27
|
+
"@commitlint/config-conventional"
|
28
|
+
]
|
29
|
+
},
|
30
|
+
"lint-staged": {
|
31
|
+
"*.{md,json}": [
|
32
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
33
|
+
],
|
34
|
+
"*.{css,less}": [
|
35
|
+
"stylelint --fix",
|
36
|
+
"prettier --write"
|
37
|
+
],
|
38
|
+
"*.{js,jsx}": [
|
39
|
+
"eslint --fix",
|
40
|
+
"prettier --write"
|
41
|
+
],
|
42
|
+
"*.{ts,tsx}": [
|
43
|
+
"eslint --fix",
|
44
|
+
"prettier --parser=typescript --write"
|
45
|
+
]
|
46
|
+
},
|
47
|
+
"dependencies": {
|
48
|
+
"@ant-design/icons": "^6.0.0",
|
49
|
+
"@babel/runtime": "^7.26.9"
|
50
|
+
},
|
51
|
+
"devDependencies": {
|
52
|
+
"@commitlint/cli": "^17.1.2",
|
53
|
+
"@commitlint/config-conventional": "^17.1.0",
|
54
|
+
"@types/lodash": "^4.17.12",
|
55
|
+
"@types/react": "^18.0.0",
|
56
|
+
"@types/react-dom": "^18.0.0",
|
57
|
+
"@umijs/lint": "^4.0.0",
|
58
|
+
"dumi": "^2.3.0",
|
59
|
+
"dumi-theme-antd": "^0.4.2",
|
60
|
+
"eslint": "^8.23.0",
|
61
|
+
"father": "^4.1.0",
|
62
|
+
"husky": "^8.0.1",
|
63
|
+
"lint-staged": "^13.0.3",
|
64
|
+
"prettier": "^2.7.1",
|
65
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
66
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
67
|
+
"sass": "^1.80.0",
|
68
|
+
"stylelint": "^14.9.1"
|
69
|
+
},
|
70
|
+
"peerDependencies": {
|
71
|
+
"@dnd-kit/core": ">=6.1.0",
|
72
|
+
"@dnd-kit/modifiers": ">=7.0.0",
|
73
|
+
"@dnd-kit/sortable": ">=8.0.0",
|
74
|
+
"@dnd-kit/utilities": ">=3.2.2",
|
75
|
+
"@tanstack/react-query": ">=5.59.15",
|
76
|
+
"@tensorflow-models/pose-detection": ">=2.1.3",
|
77
|
+
"@tensorflow/tfjs": ">=4.22.0",
|
78
|
+
"@vladmandic/face-api": ">=1.7.14",
|
79
|
+
"@xyflow/react": ">=12.3.3",
|
80
|
+
"antd": ">=5.21.4",
|
81
|
+
"axios": ">=1.7.7",
|
82
|
+
"dayjs": ">=1.11.13",
|
83
|
+
"lodash": ">=4.17.21",
|
84
|
+
"react": ">=18.0.0",
|
85
|
+
"react-dom": ">=18.0.0",
|
86
|
+
"yootd-webrtc-sdk": ">=1.0.1"
|
87
|
+
},
|
88
|
+
"publishConfig": {
|
89
|
+
"access": "public"
|
90
|
+
},
|
91
|
+
"authors": []
|
92
|
+
}
|