yootd 0.2.39 → 0.2.41

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.
@@ -1,7 +1,7 @@
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
- }
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
+ }
@@ -49,6 +49,10 @@ export interface VideoPlayerProps {
49
49
  * AI 功能列表
50
50
  */
51
51
  aiFeatures?: AIFeature[];
52
+ /**
53
+ * 默认开始的AI功能列表
54
+ */
55
+ defaultAiFeatures?: AIFeature[];
52
56
  /**
53
57
  * 视频封面
54
58
  */
@@ -40,6 +40,8 @@ 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$defaultAiFeature = _ref.defaultAiFeatures,
44
+ defaultAiFeatures = _ref$defaultAiFeature === void 0 ? [] : _ref$defaultAiFeature,
43
45
  _ref$retryInterval = _ref.retryInterval,
44
46
  retryInterval = _ref$retryInterval === void 0 ? 5000 : _ref$retryInterval,
45
47
  className = _ref.className,
@@ -179,6 +181,15 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
179
181
  }
180
182
  }),
181
183
  configData = _useQuery.data;
184
+ useEffect(function () {
185
+ if (defaultAiFeatures == null || (defaultAiFeatures === null || defaultAiFeatures === void 0 ? void 0 : defaultAiFeatures.length) === 0) return;
186
+ setFeatures({
187
+ emotion: (aiFeatures === null || aiFeatures === void 0 ? void 0 : aiFeatures.includes('emotion')) && (defaultAiFeatures === null || defaultAiFeatures === void 0 ? void 0 : defaultAiFeatures.includes('emotion')),
188
+ character: (aiFeatures === null || aiFeatures === void 0 ? void 0 : aiFeatures.includes('character')) && (defaultAiFeatures === null || defaultAiFeatures === void 0 ? void 0 : defaultAiFeatures.includes('character')),
189
+ anchor: (aiFeatures === null || aiFeatures === void 0 ? void 0 : aiFeatures.includes('anchor')) && (defaultAiFeatures === null || defaultAiFeatures === void 0 ? void 0 : defaultAiFeatures.includes('anchor')),
190
+ pose: (aiFeatures === null || aiFeatures === void 0 ? void 0 : aiFeatures.includes('pose')) && (defaultAiFeatures === null || defaultAiFeatures === void 0 ? void 0 : defaultAiFeatures.includes('pose'))
191
+ });
192
+ }, [defaultAiFeatures]);
182
193
  useImperativeHandle(ref, function () {
183
194
  return {
184
195
  play: function play() {
@@ -456,13 +467,13 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
456
467
  male: '男',
457
468
  female: '女'
458
469
  };
459
- /* neutral: 'calm',
460
- happy: 'happy',
461
- sad: 'depressed',
462
- angry: 'angry',
463
- fearful: 'dread',
464
- disgusted: 'detest',
465
- surprised: 'surprised',
470
+ /* neutral: 'calm',
471
+ happy: 'happy',
472
+ sad: 'depressed',
473
+ angry: 'angry',
474
+ fearful: 'dread',
475
+ disgusted: 'detest',
476
+ surprised: 'surprised',
466
477
  */
467
478
 
468
479
  var emotionMap = {
@@ -2,7 +2,6 @@
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
5
-
6
5
  &-container {
7
6
  width: 100%;
8
7
  height: 100%;
@@ -17,7 +16,9 @@
17
16
  &__progress {
18
17
  visibility: visible;
19
18
  }
20
-
19
+ &__controls-content {
20
+ visibility: visible;
21
+ }
21
22
  &__controls-bottom-progress__bar {
22
23
  visibility: hidden;
23
24
  }
@@ -79,6 +80,7 @@
79
80
  user-select: none;
80
81
  position: relative;
81
82
  z-index: 10;
83
+ visibility: hidden;
82
84
  }
83
85
 
84
86
  &__controls-icon {
@@ -334,4 +336,4 @@
334
336
  100% {
335
337
  transform: rotate(360deg);
336
338
  }
337
- }
339
+ }
package/package.json CHANGED
@@ -1,93 +1,93 @@
1
- {
2
- "name": "yootd",
3
- "version": "0.2.39",
4
- "description": "基于 Antd 二次开发的组件库",
5
- "license": "MIT",
6
- "sideEffects": [
7
- "*.scss"
8
- ],
9
- "module": "dist/index.js",
10
- "types": "dist/index.d.ts",
11
- "files": [
12
- "dist"
13
- ],
14
- "scripts": {
15
- "build": "father build",
16
- "build:watch": "father dev",
17
- "dev": "dumi dev",
18
- "docs:build": "dumi build",
19
- "docs:preview": "dumi preview",
20
- "doctor": "father doctor",
21
- "lint": "npm run lint:es && npm run lint:css",
22
- "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
23
- "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
24
- "prepare": "husky install && dumi setup",
25
- "prepublishOnly": "father doctor && npm run build",
26
- "start": "npm run dev"
27
- },
28
- "commitlint": {
29
- "extends": [
30
- "@commitlint/config-conventional"
31
- ]
32
- },
33
- "lint-staged": {
34
- "*.{md,json}": [
35
- "prettier --write --no-error-on-unmatched-pattern"
36
- ],
37
- "*.{css,less}": [
38
- "stylelint --fix",
39
- "prettier --write"
40
- ],
41
- "*.{js,jsx}": [
42
- "eslint --fix",
43
- "prettier --write"
44
- ],
45
- "*.{ts,tsx}": [
46
- "eslint --fix",
47
- "prettier --parser=typescript --write"
48
- ]
49
- },
50
- "dependencies": {
51
- "@ant-design/icons": "^6.0.0",
52
- "@babel/runtime": "^7.26.9"
53
- },
54
- "devDependencies": {
55
- "@commitlint/cli": "^17.1.2",
56
- "@commitlint/config-conventional": "^17.1.0",
57
- "@tensorflow-models/pose-detection": ">=2.1.3",
58
- "@tensorflow/tfjs": ">=4.22.0",
59
- "@types/react": "^18.0.0",
60
- "@types/react-dom": "^18.0.0",
61
- "@umijs/lint": "^4.0.0",
62
- "@vladmandic/face-api": ">=1.7.14",
63
- "cross-env": "^10.0.0",
64
- "dumi": "^2.3.0",
65
- "dumi-theme-antd": "^0.4.2",
66
- "eslint": "^8.23.0",
67
- "father": "^4.1.0",
68
- "husky": "^8.0.1",
69
- "lint-staged": "^13.0.3",
70
- "prettier": "^2.7.1",
71
- "prettier-plugin-organize-imports": "^3.0.0",
72
- "prettier-plugin-packagejson": "^2.2.18",
73
- "sass": "^1.80.0",
74
- "stylelint": "^14.9.1"
75
- },
76
- "peerDependencies": {
77
- "@dnd-kit/core": ">=6.1.0",
78
- "@dnd-kit/modifiers": ">=7.0.0",
79
- "@dnd-kit/sortable": ">=8.0.0",
80
- "@dnd-kit/utilities": ">=3.2.2",
81
- "@tanstack/react-query": ">=5.59.15",
82
- "@xyflow/react": ">=12.3.3",
83
- "antd": ">=5.21.4",
84
- "axios": ">=1.7.7",
85
- "dayjs": ">=1.11.13",
86
- "react": ">=18.0.0",
87
- "react-dom": ">=18.0.0"
88
- },
89
- "publishConfig": {
90
- "access": "public"
91
- },
92
- "authors": []
93
- }
1
+ {
2
+ "name": "yootd",
3
+ "version": "0.2.41",
4
+ "description": "基于 Antd 二次开发的组件库",
5
+ "license": "MIT",
6
+ "sideEffects": [
7
+ "*.scss"
8
+ ],
9
+ "module": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "files": [
12
+ "dist"
13
+ ],
14
+ "scripts": {
15
+ "build": "father build",
16
+ "build:watch": "father dev",
17
+ "dev": "dumi dev",
18
+ "docs:build": "dumi build",
19
+ "docs:preview": "dumi preview",
20
+ "doctor": "father doctor",
21
+ "lint": "npm run lint:es && npm run lint:css",
22
+ "lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
23
+ "lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
24
+ "prepare": "husky install && dumi setup",
25
+ "prepublishOnly": "father doctor && npm run build",
26
+ "start": "npm run dev"
27
+ },
28
+ "commitlint": {
29
+ "extends": [
30
+ "@commitlint/config-conventional"
31
+ ]
32
+ },
33
+ "lint-staged": {
34
+ "*.{md,json}": [
35
+ "prettier --write --no-error-on-unmatched-pattern"
36
+ ],
37
+ "*.{css,less}": [
38
+ "stylelint --fix",
39
+ "prettier --write"
40
+ ],
41
+ "*.{js,jsx}": [
42
+ "eslint --fix",
43
+ "prettier --write"
44
+ ],
45
+ "*.{ts,tsx}": [
46
+ "eslint --fix",
47
+ "prettier --parser=typescript --write"
48
+ ]
49
+ },
50
+ "dependencies": {
51
+ "@ant-design/icons": "^6.0.0",
52
+ "@babel/runtime": "^7.26.9"
53
+ },
54
+ "devDependencies": {
55
+ "@commitlint/cli": "^17.1.2",
56
+ "@commitlint/config-conventional": "^17.1.0",
57
+ "@tensorflow-models/pose-detection": ">=2.1.3",
58
+ "@tensorflow/tfjs": ">=4.22.0",
59
+ "@types/react": "^18.0.0",
60
+ "@types/react-dom": "^18.0.0",
61
+ "@umijs/lint": "^4.0.0",
62
+ "@vladmandic/face-api": ">=1.7.14",
63
+ "cross-env": "^10.0.0",
64
+ "dumi": "^2.3.0",
65
+ "dumi-theme-antd": "^0.4.2",
66
+ "eslint": "^8.23.0",
67
+ "father": "^4.1.0",
68
+ "husky": "^8.0.1",
69
+ "lint-staged": "^13.0.3",
70
+ "prettier": "^2.7.1",
71
+ "prettier-plugin-organize-imports": "^3.0.0",
72
+ "prettier-plugin-packagejson": "^2.2.18",
73
+ "sass": "^1.80.0",
74
+ "stylelint": "^14.9.1"
75
+ },
76
+ "peerDependencies": {
77
+ "@dnd-kit/core": ">=6.1.0",
78
+ "@dnd-kit/modifiers": ">=7.0.0",
79
+ "@dnd-kit/sortable": ">=8.0.0",
80
+ "@dnd-kit/utilities": ">=3.2.2",
81
+ "@tanstack/react-query": ">=5.59.15",
82
+ "@xyflow/react": ">=12.3.3",
83
+ "antd": ">=5.21.4",
84
+ "axios": ">=1.7.7",
85
+ "dayjs": ">=1.11.13",
86
+ "react": ">=18.0.0",
87
+ "react-dom": ">=18.0.0"
88
+ },
89
+ "publishConfig": {
90
+ "access": "public"
91
+ },
92
+ "authors": []
93
+ }