yootd 0.2.37 → 0.2.39
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/useAssets.js +1 -2
- package/dist/hooks/useBaseURL.js +1 -2
- package/dist/hooks/useBem.js +4 -5
- package/dist/hooks/useOSS.js +1 -2
- package/dist/hooks/useRequest.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{Preview → preview}/components/preview/phone.js +5 -1
- package/dist/{Preview → preview}/components/preview/phone.scss +7 -8
- package/dist/utils/script.js +0 -1
- package/dist/utils/utils.d.ts +1 -0
- package/dist/utils/utils.js +13 -0
- package/dist/video-player/index.js +1 -3
- package/package.json +1 -3
- /package/dist/{Preview → preview}/assets/phonebg.png +0 -0
- /package/dist/{Preview → preview}/components/icons/AdaptIcon.d.ts +0 -0
- /package/dist/{Preview → preview}/components/icons/AdaptIcon.js +0 -0
- /package/dist/{Preview → preview}/components/icons/MagnifyIcon.d.ts +0 -0
- /package/dist/{Preview → preview}/components/icons/MagnifyIcon.js +0 -0
- /package/dist/{Preview → preview}/components/icons/ResetIcon.d.ts +0 -0
- /package/dist/{Preview → preview}/components/icons/ResetIcon.js +0 -0
- /package/dist/{Preview → preview}/components/icons/ShrinkIcon.d.ts +0 -0
- /package/dist/{Preview → preview}/components/icons/ShrinkIcon.js +0 -0
- /package/dist/{Preview → preview}/components/preview/phone.d.ts +0 -0
- /package/dist/{Preview → preview}/components/preview/web.d.ts +0 -0
- /package/dist/{Preview → preview}/components/preview/web.js +0 -0
- /package/dist/{Preview → preview}/components/reactflow/Controls.d.ts +0 -0
- /package/dist/{Preview → preview}/components/reactflow/Controls.js +0 -0
- /package/dist/{Preview → preview}/components/reactflow/TopPreview.d.ts +0 -0
- /package/dist/{Preview → preview}/components/reactflow/TopPreview.js +0 -0
- /package/dist/{Preview → preview}/index.d.ts +0 -0
- /package/dist/{Preview → preview}/index.js +0 -0
- /package/dist/{Preview → preview}/index.scss +0 -0
- /package/dist/{Preview → preview}/types/type.d.ts +0 -0
package/dist/hooks/useAssets.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import _ from 'lodash';
|
2
1
|
import { useContext } from 'react';
|
3
2
|
import { ConfigContext } from "../config-provider/context";
|
4
3
|
export var useAssets = function useAssets() {
|
5
4
|
var _useContext = useContext(ConfigContext),
|
6
5
|
assetsURL = _useContext.assetsURL;
|
7
|
-
if (
|
6
|
+
if (assetsURL == null) {
|
8
7
|
throw new Error('assetsURL is not found');
|
9
8
|
}
|
10
9
|
return assetsURL;
|
package/dist/hooks/useBaseURL.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import _ from "lodash";
|
2
1
|
import { useContext } from "react";
|
3
2
|
import { ConfigContext } from "../config-provider/context";
|
4
3
|
export var useBaseURL = function useBaseURL() {
|
5
4
|
var _useContext = useContext(ConfigContext),
|
6
5
|
baseURL = _useContext.baseURL;
|
7
|
-
if (
|
6
|
+
if (baseURL == null) {
|
8
7
|
throw new Error('baseURL is not found');
|
9
8
|
}
|
10
9
|
return baseURL;
|
package/dist/hooks/useBem.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
4
|
-
import _ from 'lodash';
|
5
4
|
import { useRef } from 'react';
|
6
5
|
var Bem = /*#__PURE__*/function () {
|
7
6
|
function Bem(_namespace) {
|
@@ -17,7 +16,7 @@ var Bem = /*#__PURE__*/function () {
|
|
17
16
|
key: "b",
|
18
17
|
value: function b(block) {
|
19
18
|
var suffix = this.suffix;
|
20
|
-
if (
|
19
|
+
if (block !== "") {
|
21
20
|
suffix = suffix + '-' + block;
|
22
21
|
}
|
23
22
|
return new Bem(this.namespace).setSuffix(suffix);
|
@@ -28,7 +27,7 @@ var Bem = /*#__PURE__*/function () {
|
|
28
27
|
key: "e",
|
29
28
|
value: function e(element) {
|
30
29
|
var suffix = this.suffix;
|
31
|
-
if (
|
30
|
+
if (element !== "") {
|
32
31
|
suffix = suffix + '__' + element;
|
33
32
|
}
|
34
33
|
return new Bem(this.namespace).setSuffix(suffix);
|
@@ -39,7 +38,7 @@ var Bem = /*#__PURE__*/function () {
|
|
39
38
|
key: "m",
|
40
39
|
value: function m(modifier) {
|
41
40
|
var suffix = this.suffix;
|
42
|
-
if (
|
41
|
+
if (modifier !== "") {
|
43
42
|
suffix = suffix + '--' + modifier;
|
44
43
|
}
|
45
44
|
return new Bem(this.namespace).setSuffix(suffix);
|
@@ -59,7 +58,7 @@ var Bem = /*#__PURE__*/function () {
|
|
59
58
|
key: "toString",
|
60
59
|
value: function toString() {
|
61
60
|
var className = "".concat(this.prefix, "-").concat(this.namespace);
|
62
|
-
if (
|
61
|
+
if (this.suffix !== "") {
|
63
62
|
className = className + this.suffix;
|
64
63
|
}
|
65
64
|
return className;
|
package/dist/hooks/useOSS.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import _ from 'lodash';
|
2
1
|
import { useContext } from 'react';
|
3
2
|
import { ConfigContext } from "../config-provider/context";
|
4
3
|
export var useOSS = function useOSS() {
|
5
4
|
var _useContext = useContext(ConfigContext),
|
6
5
|
ossURL = _useContext.ossURL;
|
7
|
-
if (
|
6
|
+
if (ossURL == null) {
|
8
7
|
throw new Error('ossURL is not found');
|
9
8
|
}
|
10
9
|
return ossURL;
|
package/dist/hooks/useRequest.js
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
import _ from 'lodash';
|
2
1
|
import { useContext } from 'react';
|
3
2
|
import { ConfigContext } from "../config-provider/context";
|
4
3
|
export var useRequest = function useRequest() {
|
5
4
|
var _useContext = useContext(ConfigContext),
|
6
5
|
request = _useContext.request;
|
7
|
-
if (
|
6
|
+
if (request == null) {
|
8
7
|
throw new Error('request is not found');
|
9
8
|
}
|
10
9
|
return request;
|
package/dist/index.d.ts
CHANGED
@@ -147,7 +147,7 @@ export { Popconfirm } from './pop-confirm';
|
|
147
147
|
export type { PopconfirmProps } from './pop-confirm';
|
148
148
|
export { Progress } from './progress';
|
149
149
|
export type { ProgressProps } from './progress';
|
150
|
-
export { Preview } from './
|
150
|
+
export { Preview } from './preview';
|
151
151
|
export { Result } from './result';
|
152
152
|
export type { ResultProps } from './result';
|
153
153
|
export { Skeleton } from './skeleton';
|
package/dist/index.js
CHANGED
@@ -78,7 +78,7 @@ export { Modal } from "./modal";
|
|
78
78
|
export { notification } from "./notification";
|
79
79
|
export { Popconfirm } from "./pop-confirm";
|
80
80
|
export { Progress } from "./progress";
|
81
|
-
export { Preview } from "./
|
81
|
+
export { Preview } from "./preview";
|
82
82
|
export { Result } from "./result";
|
83
83
|
export { Skeleton } from "./skeleton";
|
84
84
|
export { Spin } from "./spin";
|
@@ -1,10 +1,14 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { useBem } from "../../../hooks/useBem";
|
3
|
+
import phoeBg from "../../assets/phonebg.png";
|
3
4
|
import "./phone.scss";
|
4
5
|
export default function Phone(_ref) {
|
5
6
|
var data = _ref.data;
|
6
7
|
var mb = useBem('preview-phone');
|
7
8
|
return /*#__PURE__*/React.createElement("div", {
|
8
|
-
className: "".concat(mb)
|
9
|
+
className: "".concat(mb),
|
10
|
+
style: {
|
11
|
+
backgroundImage: "url(\"".concat(phoeBg, "\")")
|
12
|
+
}
|
9
13
|
}, data === null || data === void 0 ? void 0 : data.value);
|
10
14
|
}
|
@@ -1,8 +1,7 @@
|
|
1
|
-
.yot-preview-phone {
|
2
|
-
width: 398px;
|
3
|
-
height: 829px;
|
4
|
-
background-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
}
|
1
|
+
.yot-preview-phone {
|
2
|
+
width: 398px;
|
3
|
+
height: 829px;
|
4
|
+
background-size: 100% 100%;
|
5
|
+
padding: 96px 36px 20px 36px;
|
6
|
+
box-sizing: border-box;
|
7
|
+
}
|
package/dist/utils/script.js
CHANGED
package/dist/utils/utils.d.ts
CHANGED
package/dist/utils/utils.js
CHANGED
@@ -4,4 +4,17 @@ export var arrayMove = function arrayMove(arr, from, to) {
|
|
4
4
|
newArr.splice(from, 1);
|
5
5
|
newArr.splice(to, 0, arr[from]);
|
6
6
|
return newArr;
|
7
|
+
};
|
8
|
+
export var throttle = function throttle(callback, delay) {
|
9
|
+
var isWaiting = false;
|
10
|
+
return function () {
|
11
|
+
if (isWaiting) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
callback.apply(void 0, arguments);
|
15
|
+
isWaiting = true;
|
16
|
+
setTimeout(function () {
|
17
|
+
isWaiting = false;
|
18
|
+
}, delay);
|
19
|
+
};
|
7
20
|
};
|
@@ -13,12 +13,12 @@ import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef,
|
|
13
13
|
import { useBem } from "../hooks/useBem";
|
14
14
|
import "./index.scss";
|
15
15
|
import { useQuery } from '@tanstack/react-query';
|
16
|
-
import { throttle } from 'lodash';
|
17
16
|
import { Spin } from "./..";
|
18
17
|
import { useBaseURL } from "../hooks/useBaseURL";
|
19
18
|
import { useOSS } from "../hooks/useOSS";
|
20
19
|
import { useRequest } from "../hooks/useRequest";
|
21
20
|
import { loadScript } from "../utils/script";
|
21
|
+
import { throttle } from "../utils/utils";
|
22
22
|
import controlBottomBg from "./assets/control-background.png";
|
23
23
|
var PROGRESS_BAR_HEIGHT = 63;
|
24
24
|
var MIN_SCORE = 0.5; // minimum score
|
@@ -40,8 +40,6 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
40
40
|
style = _ref.style,
|
41
41
|
_ref$aiFeatures = _ref.aiFeatures,
|
42
42
|
aiFeatures = _ref$aiFeatures === void 0 ? ['emotion', 'character', 'anchor', 'pose'] : _ref$aiFeatures,
|
43
|
-
_ref$retry = _ref.retry,
|
44
|
-
retry = _ref$retry === void 0 ? false : _ref$retry,
|
45
43
|
_ref$retryInterval = _ref.retryInterval,
|
46
44
|
retryInterval = _ref$retryInterval === void 0 ? 5000 : _ref$retryInterval,
|
47
45
|
className = _ref.className,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "yootd",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.39",
|
4
4
|
"description": "基于 Antd 二次开发的组件库",
|
5
5
|
"license": "MIT",
|
6
6
|
"sideEffects": [
|
@@ -56,7 +56,6 @@
|
|
56
56
|
"@commitlint/config-conventional": "^17.1.0",
|
57
57
|
"@tensorflow-models/pose-detection": ">=2.1.3",
|
58
58
|
"@tensorflow/tfjs": ">=4.22.0",
|
59
|
-
"@types/lodash": "^4.17.12",
|
60
59
|
"@types/react": "^18.0.0",
|
61
60
|
"@types/react-dom": "^18.0.0",
|
62
61
|
"@umijs/lint": "^4.0.0",
|
@@ -84,7 +83,6 @@
|
|
84
83
|
"antd": ">=5.21.4",
|
85
84
|
"axios": ">=1.7.7",
|
86
85
|
"dayjs": ">=1.11.13",
|
87
|
-
"lodash": ">=4.17.21",
|
88
86
|
"react": ">=18.0.0",
|
89
87
|
"react-dom": ">=18.0.0"
|
90
88
|
},
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|