yootd 0.2.23 → 0.2.25
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/hooks/useBaseURL.d.ts +1 -0
- package/dist/hooks/useBaseURL.js +11 -0
- package/dist/video-player/index.d.ts +4 -0
- package/dist/video-player/index.js +111 -73
- package/dist/video-player/index.scss +28 -0
- package/package.json +92 -92
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useBaseURL: () => string;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import _ from "lodash";
|
2
|
+
import { useContext } from "react";
|
3
|
+
import { ConfigContext } from "../config-provider/context";
|
4
|
+
export var useBaseURL = function useBaseURL() {
|
5
|
+
var _useContext = useContext(ConfigContext),
|
6
|
+
baseURL = _useContext.baseURL;
|
7
|
+
if (_.isNil(baseURL)) {
|
8
|
+
throw new Error('baseURL is not found');
|
9
|
+
}
|
10
|
+
return baseURL;
|
11
|
+
};
|
@@ -19,6 +19,7 @@ import { Spin } from "./..";
|
|
19
19
|
import { useOSS } from "../hooks/useOSS";
|
20
20
|
import { useRequest } from "../hooks/useRequest";
|
21
21
|
import controlBottomBg from "./assets/control-background.png";
|
22
|
+
import { useBaseURL } from "../hooks/useBaseURL";
|
22
23
|
var PROGRESS_BAR_HEIGHT = 63;
|
23
24
|
var MIN_SCORE = 0.5; // minimum score
|
24
25
|
var MAX_RESULTS = 20; // maximum number of results to return
|
@@ -31,9 +32,11 @@ var speeds = ['2.0', '1.75', '1.5', '1.25', '1.0', '0.75', '0.5'];
|
|
31
32
|
export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
32
33
|
var src = _ref.src,
|
33
34
|
isLive = _ref.isLive,
|
34
|
-
controls = _ref.controls,
|
35
|
+
_ref$controls = _ref.controls,
|
36
|
+
controls = _ref$controls === void 0 ? true : _ref$controls,
|
35
37
|
autoPlay = _ref.autoPlay,
|
36
|
-
muted = _ref.muted,
|
38
|
+
_ref$muted = _ref.muted,
|
39
|
+
muted = _ref$muted === void 0 ? true : _ref$muted,
|
37
40
|
style = _ref.style,
|
38
41
|
_ref$aiFeatures = _ref.aiFeatures,
|
39
42
|
aiFeatures = _ref$aiFeatures === void 0 ? ['emotion', 'character', 'anchor', 'pose'] : _ref$aiFeatures,
|
@@ -43,7 +46,7 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
43
46
|
retryInterval = _ref$retryInterval === void 0 ? 5000 : _ref$retryInterval,
|
44
47
|
className = _ref.className,
|
45
48
|
_ref$audioEnable = _ref.audioEnable,
|
46
|
-
audioEnable = _ref$audioEnable === void 0 ?
|
49
|
+
audioEnable = _ref$audioEnable === void 0 ? false : _ref$audioEnable,
|
47
50
|
_ref$videoEnable = _ref.videoEnable,
|
48
51
|
videoEnable = _ref$videoEnable === void 0 ? true : _ref$videoEnable,
|
49
52
|
_ref$rotateWhenFullSc = _ref.rotateWhenFullScreen,
|
@@ -51,7 +54,9 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
51
54
|
_ref$miniProgram = _ref.miniProgram,
|
52
55
|
miniProgram = _ref$miniProgram === void 0 ? false : _ref$miniProgram,
|
53
56
|
_ref$showCapture = _ref.showCapture,
|
54
|
-
showCapture = _ref$showCapture === void 0 ?
|
57
|
+
showCapture = _ref$showCapture === void 0 ? false : _ref$showCapture,
|
58
|
+
_ref$showDownload = _ref.showDownload,
|
59
|
+
showDownload = _ref$showDownload === void 0 ? false : _ref$showDownload,
|
55
60
|
onPlayStateChange = _ref.onPlayStateChange,
|
56
61
|
onCapture = _ref.onCapture,
|
57
62
|
onCurrentTimeChange = _ref.onCurrentTimeChange,
|
@@ -63,109 +68,108 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
63
68
|
var detectAllFacesRef = useRef();
|
64
69
|
var getAdjacentPairsRef = useRef();
|
65
70
|
var request = useRequest();
|
71
|
+
var baseURL = useBaseURL();
|
72
|
+
console.log("baseURL", baseURL);
|
66
73
|
var _useState = useState(null),
|
67
74
|
_useState2 = _slicedToArray(_useState, 2),
|
68
75
|
poseDetector = _useState2[0],
|
69
76
|
setPoseDetector = _useState2[1];
|
70
77
|
var OSS = useOSS();
|
71
78
|
var bem = useBem('video-player');
|
72
|
-
var _useState3 = useState(
|
73
|
-
_useState4 = _slicedToArray(_useState3,
|
74
|
-
|
79
|
+
var _useState3 = useState(false),
|
80
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
81
|
+
isFullScreen = _useState4[0],
|
82
|
+
setIsFullScreen = _useState4[1];
|
75
83
|
var _useState5 = useState(false),
|
76
84
|
_useState6 = _slicedToArray(_useState5, 2),
|
77
|
-
|
78
|
-
|
79
|
-
var _useState7 = useState(
|
85
|
+
isPlaying = _useState6[0],
|
86
|
+
setIsPlaying = _useState6[1];
|
87
|
+
var _useState7 = useState(0),
|
80
88
|
_useState8 = _slicedToArray(_useState7, 2),
|
81
|
-
|
82
|
-
|
83
|
-
var _useState9 = useState(
|
89
|
+
volume = _useState8[0],
|
90
|
+
setVolume = _useState8[1];
|
91
|
+
var _useState9 = useState(false),
|
84
92
|
_useState10 = _slicedToArray(_useState9, 2),
|
85
|
-
|
86
|
-
|
87
|
-
var _useState11 = useState(
|
93
|
+
hasAudio = _useState10[0],
|
94
|
+
setHasAudio = _useState10[1];
|
95
|
+
var _useState11 = useState(0),
|
88
96
|
_useState12 = _slicedToArray(_useState11, 2),
|
89
|
-
|
90
|
-
|
91
|
-
var _useState13 = useState(
|
97
|
+
currentTime = _useState12[0],
|
98
|
+
setCurrentTime = _useState12[1];
|
99
|
+
var _useState13 = useState(),
|
92
100
|
_useState14 = _slicedToArray(_useState13, 2),
|
93
|
-
|
94
|
-
|
95
|
-
var _useState15 = useState(),
|
101
|
+
duration = _useState14[0],
|
102
|
+
setDuration = _useState14[1];
|
103
|
+
var _useState15 = useState(false),
|
96
104
|
_useState16 = _slicedToArray(_useState15, 2),
|
97
|
-
|
98
|
-
|
99
|
-
var _useState17 = useState(
|
105
|
+
showSpeedPicker = _useState16[0],
|
106
|
+
setShowSpeedPicker = _useState16[1];
|
107
|
+
var _useState17 = useState('1.0'),
|
100
108
|
_useState18 = _slicedToArray(_useState17, 2),
|
101
|
-
|
102
|
-
|
103
|
-
var _useState19 = useState(
|
109
|
+
speed = _useState18[0],
|
110
|
+
setSpeed = _useState18[1];
|
111
|
+
var _useState19 = useState(false),
|
104
112
|
_useState20 = _slicedToArray(_useState19, 2),
|
105
|
-
|
106
|
-
|
113
|
+
showVolumeSlider = _useState20[0],
|
114
|
+
setShowVolumeSlider = _useState20[1];
|
107
115
|
var _useState21 = useState(false),
|
108
116
|
_useState22 = _slicedToArray(_useState21, 2),
|
109
|
-
|
110
|
-
|
111
|
-
var _useState23 = useState(
|
117
|
+
mouseDown = _useState22[0],
|
118
|
+
setMouseDown = _useState22[1];
|
119
|
+
var _useState23 = useState(0),
|
112
120
|
_useState24 = _slicedToArray(_useState23, 2),
|
113
|
-
|
114
|
-
|
115
|
-
var _useState25 = useState(
|
121
|
+
buffered = _useState24[0],
|
122
|
+
setBuffered = _useState24[1];
|
123
|
+
var _useState25 = useState(false),
|
116
124
|
_useState26 = _slicedToArray(_useState25, 2),
|
117
|
-
|
118
|
-
|
125
|
+
showSettingPanel = _useState26[0],
|
126
|
+
setShowSettingPanel = _useState26[1];
|
119
127
|
var _useState27 = useState(false),
|
120
128
|
_useState28 = _slicedToArray(_useState27, 2),
|
121
|
-
|
122
|
-
|
123
|
-
var _useState29 = useState(
|
124
|
-
_useState30 = _slicedToArray(_useState29, 2),
|
125
|
-
tfInitialized = _useState30[0],
|
126
|
-
setTfInitialized = _useState30[1];
|
127
|
-
var _useState31 = useState({
|
129
|
+
tfInitialized = _useState28[0],
|
130
|
+
setTfInitialized = _useState28[1];
|
131
|
+
var _useState29 = useState({
|
128
132
|
emotion: false,
|
129
133
|
character: false,
|
130
134
|
anchor: false,
|
131
135
|
pose: false
|
132
136
|
}),
|
137
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
138
|
+
aiFeature = _useState30[0],
|
139
|
+
setAIFeature = _useState30[1];
|
140
|
+
var _useState31 = useState(null),
|
133
141
|
_useState32 = _slicedToArray(_useState31, 2),
|
134
|
-
|
135
|
-
|
136
|
-
var _useState33 = useState(
|
142
|
+
options = _useState32[0],
|
143
|
+
setOptions = _useState32[1];
|
144
|
+
var _useState33 = useState(false),
|
137
145
|
_useState34 = _slicedToArray(_useState33, 2),
|
138
|
-
|
139
|
-
|
140
|
-
var _useState35 = useState(
|
141
|
-
_useState36 = _slicedToArray(_useState35, 2),
|
142
|
-
faceApiInitialized = _useState36[0],
|
143
|
-
setFaceApiInitialized = _useState36[1];
|
144
|
-
var _useState37 = useState({
|
146
|
+
faceApiInitialized = _useState34[0],
|
147
|
+
setFaceApiInitialized = _useState34[1];
|
148
|
+
var _useState35 = useState({
|
145
149
|
width: 0,
|
146
150
|
height: 0
|
147
151
|
}),
|
148
|
-
|
149
|
-
canvasSize =
|
150
|
-
setCanvasSize =
|
151
|
-
var
|
152
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
153
|
+
canvasSize = _useState36[0],
|
154
|
+
setCanvasSize = _useState36[1];
|
155
|
+
var _useState37 = useState({
|
152
156
|
width: 0,
|
153
157
|
height: 0
|
154
158
|
}),
|
159
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
160
|
+
videoEleSize = _useState38[0],
|
161
|
+
setVideoEleSize = _useState38[1];
|
162
|
+
var _useState39 = useState(false),
|
155
163
|
_useState40 = _slicedToArray(_useState39, 2),
|
156
|
-
|
157
|
-
|
164
|
+
isSeeking = _useState40[0],
|
165
|
+
setIsSeeking = _useState40[1];
|
158
166
|
var _useState41 = useState(false),
|
159
167
|
_useState42 = _slicedToArray(_useState41, 2),
|
160
|
-
|
161
|
-
|
162
|
-
var _useState43 = useState(false),
|
168
|
+
setIsError = _useState42[1];
|
169
|
+
var _useState43 = useState(),
|
163
170
|
_useState44 = _slicedToArray(_useState43, 2),
|
164
|
-
|
165
|
-
|
166
|
-
_useState46 = _slicedToArray(_useState45, 2),
|
167
|
-
features = _useState46[0],
|
168
|
-
setFeatures = _useState46[1];
|
171
|
+
features = _useState44[0],
|
172
|
+
setFeatures = _useState44[1];
|
169
173
|
var _useQuery = useQuery({
|
170
174
|
queryKey: ['config'],
|
171
175
|
queryFn: function queryFn() {
|
@@ -637,6 +641,22 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
637
641
|
onCapture === null || onCapture === void 0 || onCapture(_base);
|
638
642
|
}
|
639
643
|
};
|
644
|
+
var handleDownload = function handleDownload() {
|
645
|
+
if (videoRef.current != null) {
|
646
|
+
if (videoRef.current.readyState != 4) {
|
647
|
+
return;
|
648
|
+
}
|
649
|
+
var filename = videoRef.current.src.split('/').pop() || 'video.mp4';
|
650
|
+
var a = document.createElement('a');
|
651
|
+
a.style.display = 'none';
|
652
|
+
// a.href = videoRef.current.src
|
653
|
+
a.href = "".concat(baseURL, "/v1/media/stream/download?url=").concat(videoRef.current.src);
|
654
|
+
a.download = filename;
|
655
|
+
document.body.appendChild(a);
|
656
|
+
a.click();
|
657
|
+
document.body.removeChild(a);
|
658
|
+
}
|
659
|
+
};
|
640
660
|
// 开始跳转时触发
|
641
661
|
var handleSeeking = function handleSeeking() {
|
642
662
|
setIsSeeking(true);
|
@@ -941,7 +961,7 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
941
961
|
,
|
942
962
|
onSeeked: handleSeeked,
|
943
963
|
onError: handleVideoError
|
944
|
-
})), controls === true &&
|
964
|
+
})), controls === true && /*#__PURE__*/React.createElement("div", {
|
945
965
|
className: "".concat(bem.b('container').e('controls'))
|
946
966
|
}, /*#__PURE__*/React.createElement("div", {
|
947
967
|
className: "".concat(bem.b('container').e('mask')),
|
@@ -1096,18 +1116,36 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1096
1116
|
id: "Vector",
|
1097
1117
|
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
1118
|
fill: "white"
|
1099
|
-
})))) : null, /*#__PURE__*/React.createElement("div", {
|
1119
|
+
})))) : null, showDownload && !isLive ? /*#__PURE__*/React.createElement("div", {
|
1120
|
+
className: "".concat(bem.b('container').e('controls-download'))
|
1121
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
1122
|
+
viewBox: "0 0 1024 1024",
|
1123
|
+
version: "1.1",
|
1124
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1125
|
+
width: "200",
|
1126
|
+
height: "200",
|
1127
|
+
onClick: handleDownload
|
1128
|
+
}, /*#__PURE__*/React.createElement("path", {
|
1129
|
+
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",
|
1130
|
+
"p-id": "937",
|
1131
|
+
fill: "#ffffff"
|
1132
|
+
}), /*#__PURE__*/React.createElement("path", {
|
1133
|
+
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",
|
1134
|
+
fill: "#ffffff"
|
1135
|
+
}))) : null, /*#__PURE__*/React.createElement("div", {
|
1100
1136
|
className: "".concat(bem.b('container').e('controls-setting'))
|
1101
1137
|
}, /*#__PURE__*/React.createElement("svg", {
|
1102
1138
|
viewBox: "0 0 1024 1024",
|
1103
1139
|
version: "1.1",
|
1104
1140
|
xmlns: "http://www.w3.org/2000/svg",
|
1141
|
+
"p-id": "1224",
|
1105
1142
|
width: "200",
|
1106
1143
|
height: "200",
|
1107
1144
|
onClick: handleShowSettingPanel
|
1108
1145
|
}, /*#__PURE__*/React.createElement("path", {
|
1109
|
-
d: "
|
1110
|
-
fill: "#ffffff"
|
1146
|
+
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",
|
1147
|
+
fill: "#ffffff",
|
1148
|
+
"p-id": "1225"
|
1111
1149
|
})), showSettingPanel ? /*#__PURE__*/React.createElement("div", {
|
1112
1150
|
className: "".concat(bem.b('container').e('controls-setting').e('panel')),
|
1113
1151
|
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.25",
|
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
|
+
}
|