@4399ywkf/cli 1.0.5 → 1.0.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.
Files changed (134) hide show
  1. package/dist/templates/actions.ts +11 -14
  2. package/dist/templates/initialState.ts +10 -28
  3. package/package.json +1 -1
  4. package/dist/templates/Loading/__tests__/Loading.test.tsx +0 -23
  5. package/dist/templates/Loading.test.tsx +0 -23
  6. package/dist/templates/__mocks__/fileMock.js +0 -1
  7. package/dist/templates/__mocks__/styleMock.ts +0 -1
  8. package/dist/templates/__tests__/Loading.test.tsx +0 -23
  9. package/dist/templates/__tests__/example.test.ts +0 -7
  10. package/dist/templates/app/locales/en-US/common.json +0 -74
  11. package/dist/templates/app/locales/en-US/generate.json +0 -71
  12. package/dist/templates/app/locales/en-US/nav.json +0 -10
  13. package/dist/templates/app/locales/en-US/overview.json +0 -6
  14. package/dist/templates/app/locales/en-US/retopology.json +0 -4
  15. package/dist/templates/app/locales/en-US/rigging.json +0 -21
  16. package/dist/templates/app/locales/en-US/segmentation.json +0 -4
  17. package/dist/templates/app/locales/en-US/stylization.json +0 -11
  18. package/dist/templates/app/locales/en-US/texture.json +0 -4
  19. package/dist/templates/app/locales/en-US/threeModel.json +0 -9
  20. package/dist/templates/app/locales/en-US/toolbox.json +0 -11
  21. package/dist/templates/app/locales/zh-CN/common.json +0 -74
  22. package/dist/templates/app/locales/zh-CN/generate.json +0 -71
  23. package/dist/templates/app/locales/zh-CN/nav.json +0 -10
  24. package/dist/templates/app/locales/zh-CN/overview.json +0 -6
  25. package/dist/templates/app/locales/zh-CN/retopology.json +0 -4
  26. package/dist/templates/app/locales/zh-CN/rigging.json +0 -21
  27. package/dist/templates/app/locales/zh-CN/segmentation.json +0 -4
  28. package/dist/templates/app/locales/zh-CN/stylization.json +0 -11
  29. package/dist/templates/app/locales/zh-CN/texture.json +0 -4
  30. package/dist/templates/app/locales/zh-CN/threeModel.json +0 -9
  31. package/dist/templates/app/locales/zh-CN/toolbox.json +0 -11
  32. package/dist/templates/app/src/__mocks__/fileMock.js +0 -1
  33. package/dist/templates/app/src/__mocks__/styleMock.ts +0 -1
  34. package/dist/templates/app/src/components/Loading/__tests__/Loading.test.tsx +0 -23
  35. package/dist/templates/app/src/loading.tsx +0 -52
  36. package/dist/templates/app/src/locales/default/chat.ts +0 -455
  37. package/dist/templates/app/src/pages/index.css +0 -282
  38. package/dist/templates/app/src/setupTests.ts +0 -39
  39. package/dist/templates/app/src/test-utils.tsx +0 -18
  40. package/dist/templates/app/src/utils/__tests__/example.test.ts +0 -7
  41. package/dist/templates/app/store/auth/index.tsx +0 -82
  42. package/dist/templates/app/store/auth/indexApi.tsx +0 -11
  43. package/dist/templates/app/store/global/index.tsx +0 -133
  44. package/dist/templates/app/store/global/indexApi.tsx +0 -19
  45. package/dist/templates/app/store/global/types.ts +0 -62
  46. package/dist/templates/app/store/theme/index.ts +0 -25
  47. package/dist/templates/auth/index.tsx +0 -82
  48. package/dist/templates/auth/indexApi.tsx +0 -11
  49. package/dist/templates/chat.ts +0 -455
  50. package/dist/templates/common.json +0 -74
  51. package/dist/templates/components/Loading/__tests__/Loading.test.tsx +0 -23
  52. package/dist/templates/default/chat.ts +0 -455
  53. package/dist/templates/en-US/common.json +0 -74
  54. package/dist/templates/en-US/generate.json +0 -71
  55. package/dist/templates/en-US/nav.json +0 -10
  56. package/dist/templates/en-US/overview.json +0 -6
  57. package/dist/templates/en-US/retopology.json +0 -4
  58. package/dist/templates/en-US/rigging.json +0 -21
  59. package/dist/templates/en-US/segmentation.json +0 -4
  60. package/dist/templates/en-US/stylization.json +0 -11
  61. package/dist/templates/en-US/texture.json +0 -4
  62. package/dist/templates/en-US/threeModel.json +0 -9
  63. package/dist/templates/en-US/toolbox.json +0 -11
  64. package/dist/templates/example.test.ts +0 -7
  65. package/dist/templates/fileMock.js +0 -1
  66. package/dist/templates/generate.json +0 -71
  67. package/dist/templates/global/index.tsx +0 -133
  68. package/dist/templates/global/indexApi.tsx +0 -19
  69. package/dist/templates/global/types.ts +0 -62
  70. package/dist/templates/loading.tsx +0 -52
  71. package/dist/templates/locales/default/chat.ts +0 -455
  72. package/dist/templates/locales/en-US/common.json +0 -74
  73. package/dist/templates/locales/en-US/generate.json +0 -71
  74. package/dist/templates/locales/en-US/nav.json +0 -10
  75. package/dist/templates/locales/en-US/overview.json +0 -6
  76. package/dist/templates/locales/en-US/retopology.json +0 -4
  77. package/dist/templates/locales/en-US/rigging.json +0 -21
  78. package/dist/templates/locales/en-US/segmentation.json +0 -4
  79. package/dist/templates/locales/en-US/stylization.json +0 -11
  80. package/dist/templates/locales/en-US/texture.json +0 -4
  81. package/dist/templates/locales/en-US/threeModel.json +0 -9
  82. package/dist/templates/locales/en-US/toolbox.json +0 -11
  83. package/dist/templates/locales/zh-CN/common.json +0 -74
  84. package/dist/templates/locales/zh-CN/generate.json +0 -71
  85. package/dist/templates/locales/zh-CN/nav.json +0 -10
  86. package/dist/templates/locales/zh-CN/overview.json +0 -6
  87. package/dist/templates/locales/zh-CN/retopology.json +0 -4
  88. package/dist/templates/locales/zh-CN/rigging.json +0 -21
  89. package/dist/templates/locales/zh-CN/segmentation.json +0 -4
  90. package/dist/templates/locales/zh-CN/stylization.json +0 -11
  91. package/dist/templates/locales/zh-CN/texture.json +0 -4
  92. package/dist/templates/locales/zh-CN/threeModel.json +0 -9
  93. package/dist/templates/locales/zh-CN/toolbox.json +0 -11
  94. package/dist/templates/nav.json +0 -10
  95. package/dist/templates/overview.json +0 -6
  96. package/dist/templates/pages/index.css +0 -282
  97. package/dist/templates/retopology.json +0 -4
  98. package/dist/templates/rigging.json +0 -21
  99. package/dist/templates/segmentation.json +0 -4
  100. package/dist/templates/setupTests.ts +0 -39
  101. package/dist/templates/src/__mocks__/fileMock.js +0 -1
  102. package/dist/templates/src/__mocks__/styleMock.ts +0 -1
  103. package/dist/templates/src/components/Loading/__tests__/Loading.test.tsx +0 -23
  104. package/dist/templates/src/loading.tsx +0 -52
  105. package/dist/templates/src/locales/default/chat.ts +0 -455
  106. package/dist/templates/src/pages/index.css +0 -282
  107. package/dist/templates/src/setupTests.ts +0 -39
  108. package/dist/templates/src/test-utils.tsx +0 -18
  109. package/dist/templates/src/utils/__tests__/example.test.ts +0 -7
  110. package/dist/templates/store/auth/index.tsx +0 -82
  111. package/dist/templates/store/auth/indexApi.tsx +0 -11
  112. package/dist/templates/store/global/index.tsx +0 -133
  113. package/dist/templates/store/global/indexApi.tsx +0 -19
  114. package/dist/templates/store/global/types.ts +0 -62
  115. package/dist/templates/store/theme/index.ts +0 -25
  116. package/dist/templates/styleMock.ts +0 -1
  117. package/dist/templates/stylization.json +0 -11
  118. package/dist/templates/test-utils.tsx +0 -18
  119. package/dist/templates/texture.json +0 -4
  120. package/dist/templates/theme/index.ts +0 -25
  121. package/dist/templates/threeModel.json +0 -9
  122. package/dist/templates/toolbox.json +0 -11
  123. package/dist/templates/utils/__tests__/example.test.ts +0 -7
  124. package/dist/templates/zh-CN/common.json +0 -74
  125. package/dist/templates/zh-CN/generate.json +0 -71
  126. package/dist/templates/zh-CN/nav.json +0 -10
  127. package/dist/templates/zh-CN/overview.json +0 -6
  128. package/dist/templates/zh-CN/retopology.json +0 -4
  129. package/dist/templates/zh-CN/rigging.json +0 -21
  130. package/dist/templates/zh-CN/segmentation.json +0 -4
  131. package/dist/templates/zh-CN/stylization.json +0 -11
  132. package/dist/templates/zh-CN/texture.json +0 -4
  133. package/dist/templates/zh-CN/threeModel.json +0 -9
  134. package/dist/templates/zh-CN/toolbox.json +0 -11
@@ -1,11 +0,0 @@
1
- {
2
- "assets": "Assets",
3
- "myAssets": "My Assets",
4
- "collected": "Collected",
5
- "property": "Property",
6
- "material": "Material",
7
- "pbr": "PBR",
8
- "metallic": "Metallic",
9
- "roughness": "Roughness",
10
- "transform": "Transform"
11
- }
@@ -1,7 +0,0 @@
1
- // 假设您有一些工具函数需要测试
2
- describe('工具函数测试', () => {
3
- it('示例测试', () => {
4
- const result = 1 + 1;
5
- expect(result).toBe(2);
6
- });
7
- });
@@ -1 +0,0 @@
1
- module.exports = 'test-file-stub';
@@ -1,71 +0,0 @@
1
- {
2
- "title": "生成3D模型",
3
- "desc": "使用AI技术快速生成高质量的3D模型",
4
- "textTo3D": "文生模型",
5
- "imageTo3D": "图生模型",
6
- "multiViewsTo3D": "多视图生模型",
7
- "batch3DGen": "批量图生模型",
8
- "stayTuned": "即将上线",
9
- "style": {
10
- "title": "风格",
11
- "none": "无",
12
- "cartoon": "卡通",
13
- "christmas": "圣诞",
14
- "barbie": "芭比",
15
- "clay": "粘土",
16
- "steam_punk": "蒸汽朋克",
17
- "alien": "外星人",
18
- "gold": "黄金",
19
- "bronze": "青铜",
20
- "wood": "木头",
21
- "stone": "石头",
22
- "metal": "金属",
23
- "plastic": "塑料"
24
- },
25
- "hdTexture": {
26
- "title": "高清纹理",
27
- "desc": "高分辨率纹理,细节更丰富"
28
- },
29
- "modelVersion": {
30
- "title": "模型",
31
- "desc": "V2.5-20250123 前所未有的细节与真实感\nV2.0-20240919 行业内领先的几何体与 PBR"
32
- },
33
- "topology": {
34
- "title": "拓扑",
35
- "desc": "选择四边面将强制输出为 FBX 模型。",
36
- "quad": "四边面",
37
- "triangle": "三角面"
38
- },
39
- "polycount": {
40
- "title": "面数限制",
41
- "auto": "自动"
42
- },
43
- "textureAlignment": {
44
- "title": "纹理对齐",
45
- "desc": "图像对齐:与原始图像高度相似,可能存在3D细节上的差异\n结构对齐:保持精确的3D结构,可能与原始图像略有不同",
46
- "originalImageDesc": "图像对齐",
47
- "geometryDesc": "结构对齐"
48
- },
49
- "moreSettings": "高级设置",
50
- "generate": "生成",
51
- "front": "正视图",
52
- "left": "左视图",
53
- "right": "右视图",
54
- "back": "后视图",
55
- "multiViewToModel": {
56
- "imagesTip": "请上传至少一张正视图以及一张侧视图或后视图。"
57
- },
58
- "setting": {
59
- "autoSize": "尺寸缩放",
60
- "modelSeed": "模型种子",
61
- "textureSeed": "纹理种子",
62
- "autoSizeDesc": "自动将模型缩放到真实尺寸,单位为米。",
63
- "modelSeedDesc": "种子控制几何生成过程,使用相同种子时生成的模型相同",
64
- "textureSeedDesc": "使用相同的种子将产生相同的纹理",
65
- "pbrDesc": "通过模拟物理特性精准呈现物体外观"
66
- },
67
- "yes": "是",
68
- "no": "否",
69
- "on": "开",
70
- "off": "关"
71
- }
@@ -1,133 +0,0 @@
1
- import type { SiderRoutesProps } from '@store/types';
2
- import _ from 'lodash-es';
3
- import { create } from 'zustand';
4
- import {
5
- apiGetCopyright,
6
- apiGetCurrentUser,
7
- apiGetModule,
8
- apiGetNav,
9
- } from './indexApi';
10
- import type { BearState, MicroActiveAppsProps } from './types';
11
-
12
- function addApp(stateMicroActiveApps, appInfo, set) {
13
- // 如果已存在相同 id,则不处理
14
- if (stateMicroActiveApps.find(o => o.id === appInfo.id)) return;
15
- stateMicroActiveApps.push(appInfo);
16
- set({ microActiveApps: stateMicroActiveApps });
17
- }
18
-
19
- function removeApp(stateMicroActiveApps, appInfo, set) {
20
- const removeIndex = stateMicroActiveApps.findIndex(o => o.id === appInfo.id);
21
- if (removeIndex === -1) return;
22
- stateMicroActiveApps.splice(removeIndex, 1);
23
- set({ microActiveApps: stateMicroActiveApps });
24
- }
25
-
26
- function updateApp(stateMicroActiveApps, appInfo, set) {
27
- const updateIndex = stateMicroActiveApps.findIndex(o => o.id === appInfo.id);
28
- if (updateIndex === -1) return;
29
- stateMicroActiveApps[updateIndex] = appInfo;
30
- set({ microActiveApps: stateMicroActiveApps });
31
- }
32
-
33
- const useGlobalStore = create<BearState>()((set, get) => ({
34
- year: {
35
- s: '0',
36
- e: '0',
37
- },
38
- currentUser: {},
39
- navCode: [],
40
- microActiveApps: [],
41
- siderRoutes: {}, // 侧边栏路由配置
42
- getYearData: async (params: any) => {
43
- const { data } = await apiGetCopyright(params);
44
- set({ year: data.year });
45
- },
46
- syncGetCurrentUser: (params: any) => {
47
- apiGetCurrentUser(params).then(res => {
48
- const { data } = res;
49
- set({ currentUser: data?.user });
50
- });
51
- },
52
- getCurrentUser: async () => {
53
- const { data } = await apiGetCurrentUser({});
54
- set({ currentUser: data?.user });
55
- return { currentUser: data?.user };
56
- },
57
- syncGetNav: (params: any) => {
58
- apiGetNav(params).then(res => {
59
- const { data } = res;
60
- set({ navCode: data });
61
- });
62
- },
63
- getNav: async (params: any) => {
64
- const { data } = await apiGetNav(params);
65
- set({ navCode: data });
66
- return { navCode: data };
67
- },
68
- modules: [],
69
- syncGetModule: (params: any) => {
70
- apiGetModule(params).then(res => {
71
- const { data } = res;
72
- set({ modules: data });
73
- });
74
- },
75
- // 获取各个模块的信息 [{name: "模块名字", path: "激活路径", "perarr": "权限位", id: "xx", defaultroute: "应用默认打开路由"}]
76
- getModule: async (params: any) => {
77
- const { data } = await apiGetModule(params);
78
- set({ modules: data });
79
- return { modules: data };
80
- },
81
- getBasicInfo: async (params: any) => {
82
- try {
83
- const getCurrentUser = get().getCurrentUser;
84
- const currentUserRes = await getCurrentUser(params);
85
- const getNav = get().getNav;
86
- const navCodeRes = await getNav(params);
87
- const getModule = get().getModule;
88
- const modulesRes = await getModule(params);
89
- return {
90
- ...currentUserRes,
91
- ...navCodeRes,
92
- ...modulesRes,
93
- };
94
- } catch (error: any) {
95
- console.log(error);
96
- return {
97
- currentUser: '',
98
- navCode: [],
99
- modules: [],
100
- };
101
- }
102
- },
103
- layout: {
104
- renderFooter: false,
105
- renderHeader: true,
106
- renderSider: true,
107
- },
108
- setLayout: (params: BearState['layout']) => {
109
- const stateLayout = get().layout;
110
- set({ layout: { ...stateLayout, ...params } });
111
- },
112
- setMicroActiveApps: (params: MicroActiveAppsProps) => {
113
- const { action, appInfo } = params;
114
- const stateMicroActiveApps = _.cloneDeep(get().microActiveApps);
115
- switch (action) {
116
- case 'add':
117
- addApp(stateMicroActiveApps, appInfo, set);
118
- return;
119
- case 'delete':
120
- removeApp(stateMicroActiveApps, appInfo, set);
121
- return;
122
- case 'update':
123
- updateApp(stateMicroActiveApps, appInfo, set);
124
- return;
125
- }
126
- },
127
- setSiderRoutes: (params: SiderRoutesProps) => {
128
- const stateSiderRoutes = get().siderRoutes;
129
- set({ siderRoutes: { ...stateSiderRoutes, ...params } });
130
- },
131
- }));
132
-
133
- export default useGlobalStore;
@@ -1,19 +0,0 @@
1
- import { Request } from '@config/request';
2
-
3
- const request = new Request({});
4
-
5
- export function apiGetCopyright(params: any) {
6
- return request.get('/main/gateway/copyright', params);
7
- }
8
-
9
- export function apiGetCurrentUser(params: any) {
10
- return request.get('/main/gateway/profile', params);
11
- }
12
-
13
- export function apiGetNav(params: any) {
14
- return request.get('/main/gateway/perarr', params);
15
- }
16
-
17
- export function apiGetModule(params: any) {
18
- return request.get('/main/gateway/module', params);
19
- }
@@ -1,62 +0,0 @@
1
- import type { SiderRoutesProps } from '@store/types';
2
-
3
- export interface YearProps {
4
- s: string;
5
- e: string;
6
- }
7
-
8
- export interface moduleItemProps {
9
- defaultroute?: string;
10
- id: string;
11
- name: string;
12
- path: string;
13
- perarr: string;
14
- }
15
-
16
- export interface currentUserProps {
17
- apipasswd?: string;
18
- cname?: string;
19
- email?: string;
20
- name?: string;
21
- stype?: string;
22
- }
23
-
24
- export interface BearState {
25
- year: YearProps;
26
- getYearData: (params: any) => Promise<void>;
27
- currentUser: currentUserProps;
28
- getCurrentUser: (params: any) => Promise<{ currentUser: currentUserProps }>;
29
- navCode: string[];
30
- getNav: (params: any) => Promise<{ navCode: string[] }>;
31
- modules: moduleItemProps[];
32
- getModule: (params: any) => Promise<{ modules: moduleItemProps[] }>;
33
- getBasicInfo: (params: any) => Promise<BasicInfoResponse>;
34
-
35
- layout: {
36
- renderSider?: boolean;
37
- renderHeader?: boolean;
38
- renderFooter?: boolean;
39
- };
40
-
41
- setLayout: (params: BearState['layout']) => void;
42
-
43
- syncGetCurrentUser: (params: any) => void;
44
- syncGetNav: (params: any) => void;
45
- syncGetModule: (params: any) => void;
46
-
47
- microActiveApps: any[];
48
- setMicroActiveApps: (params: MicroActiveAppsProps) => void;
49
- siderRoutes: SiderRoutesProps;
50
- setSiderRoutes: (params: SiderRoutesProps) => void;
51
- }
52
-
53
- export interface MicroActiveAppsProps {
54
- action: 'add' | 'delete' | 'update';
55
- appInfo: any;
56
- }
57
-
58
- export interface BasicInfoResponse {
59
- currentUser: Object;
60
- navCode: string[];
61
- modules: moduleItemProps[];
62
- }
@@ -1,52 +0,0 @@
1
- import { useRequest } from 'ahooks';
2
- import { message } from 'antd';
3
- import React, { useEffect } from 'react';
4
-
5
- interface LoadingProps {
6
- name?: string;
7
- }
8
- const Loading = ({ name }: LoadingProps) => {
9
- const sendLoading = () => {
10
- return new Promise((resolve) => {
11
- resolve(
12
- message.info({
13
- content: <span className='ml-2'>{`${name} 正在挂载中...`}</span>,
14
- icon: (
15
- <svg
16
- aria-hidden='true'
17
- className='w-3 h-3 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600'
18
- viewBox='0 0 100 101'
19
- fill='none'
20
- xmlns='http://www.w3.org/2000/svg'
21
- >
22
- <path
23
- d='M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z'
24
- fill='currentColor'
25
- />
26
- <path
27
- d='M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z'
28
- fill='currentFill'
29
- />
30
- </svg>
31
- ),
32
- }),
33
- );
34
- });
35
- };
36
-
37
- const { run } = useRequest(sendLoading, {
38
- debounceWait: 3000,
39
- manual: true,
40
- });
41
-
42
- useEffect(() => {
43
- run();
44
- return () => {
45
- message.destroy();
46
- };
47
- }, []);
48
-
49
- return <></>;
50
- };
51
-
52
- export default Loading;