@funhub/platform 0.1.51 → 0.1.52
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/README.md +13 -0
- package/bin/index.mjs +323 -0
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +1 -1
- package/dist/components/biz/business/banner-carousel/material.d.mts +1 -1
- package/dist/components/biz/business/channel-list/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +6 -6
- package/dist/components/biz/business/detail/materials/video-detail-actions/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/material.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/material.d.mts +1 -1
- package/dist/components/biz/business/floating-ball/material.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-avatar-icon/material.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/material.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/material.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-search/material.d.mts +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts +1 -1
- package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts +1 -1
- package/dist/components/biz/business/large-feature-grid/material.d.mts +2 -2
- package/dist/components/biz/business/marquee/material.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/material.d.mts +2 -2
- package/dist/components/biz/business/profile/profile-main/material.d.mts +1 -1
- package/dist/components/biz/business/search-history/material.d.mts +1 -1
- package/dist/components/biz/business/search-input/material.d.mts +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +1 -1
- package/dist/components/biz/business/tab-bar/material.d.mts +1 -1
- package/dist/components/biz/business/text-recommend/material.d.mts +1 -1
- package/dist/components/biz/business/video-horizontal-list/material.d.mts +1 -1
- package/dist/components/biz/example/button/material.d.mts +1 -1
- package/dist/components/biz/example/button/material.mjs +1 -1
- package/dist/components/pages/login/password.mjs +1 -1
- package/dist/components/pages/login/reset-password.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +1 -1
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +1 -1
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/i18n/locales/en.mjs +1 -1
- package/dist/i18n/locales/zh-CN.mjs +1 -1
- package/dist/utils/password-validator.d.mts +28 -0
- package/dist/utils/password-validator.mjs +2 -0
- package/dist/utils/schema/index.d.mts +1 -1
- package/dist/utils/schema/material.d.mts +7 -9
- package/dist/utils/schema/utils.d.mts +13 -3
- package/dist/utils/schema/utils.mjs +1 -1
- package/dist/utils.d.mts +3 -2
- package/dist/utils.mjs +1 -1
- package/package.json +7 -2
- package/templates/base/_meta.json +4 -0
- package/templates/base/template/README.md.template +32 -0
- package/templates/base/template/__dot__gitignore +6 -0
- package/templates/base/template/app/[locale]/layout.tsx.template +36 -0
- package/templates/base/template/app/[locale]/page.tsx.template +24 -0
- package/templates/base/template/app/globals.css +26 -0
- package/templates/base/template/app/layout.tsx.template +38 -0
- package/templates/base/template/eslint.config.mjs.template +68 -0
- package/templates/base/template/i18n/request.ts.template +3 -0
- package/templates/base/template/next-env.d.ts.template +4 -0
- package/templates/base/template/next.config.ts.template +21 -0
- package/templates/base/template/package.json.template +37 -0
- package/templates/base/template/postcss.config.js.template +18 -0
- package/templates/base/template/proxy.ts.template +18 -0
- package/templates/base/template/tailwind.config.cjs.template +13 -0
- package/templates/base/template/tsconfig.json.template +43 -0
package/README.md
CHANGED
|
@@ -16,6 +16,19 @@
|
|
|
16
16
|
pnpm add @funhub/platform
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## 初始化应用
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @funhub/platform init my-funhub-app
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
可选参数:
|
|
26
|
+
|
|
27
|
+
- `--template base`:使用内置最小 starter 模板
|
|
28
|
+
- `--pm pnpm`:指定包管理器
|
|
29
|
+
- `--no-install`:只生成文件,不安装依赖
|
|
30
|
+
- `--no-git`:跳过 Git 仓库初始化
|
|
31
|
+
|
|
19
32
|
## 导出模块
|
|
20
33
|
|
|
21
34
|
| 模块 | 路径 | 说明 |
|
package/bin/index.mjs
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/* eslint-disable no-console */
|
|
4
|
+
import { spawn } from 'node:child_process';
|
|
5
|
+
import { cpSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from 'node:fs';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import process from 'node:process';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { cac } from 'cac';
|
|
10
|
+
|
|
11
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
12
|
+
const packageRoot = path.resolve(path.dirname(currentFilePath), '..');
|
|
13
|
+
const templatesRoot = path.join(packageRoot, 'templates');
|
|
14
|
+
const platformPackageJson = JSON.parse(readFileSync(path.join(packageRoot, 'package.json'), 'utf8'));
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 获取可用模板列表。
|
|
18
|
+
* @returns {Array<{ name: string, title: string, description: string, directory: string }>}
|
|
19
|
+
*/
|
|
20
|
+
function getAvailableTemplates() {
|
|
21
|
+
if (!existsSync(templatesRoot)) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return readdirSync(templatesRoot)
|
|
26
|
+
.map((entryName) => {
|
|
27
|
+
const templateDir = path.join(templatesRoot, entryName);
|
|
28
|
+
if (!statSync(templateDir).isDirectory()) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const metaFilePath = path.join(templateDir, '_meta.json');
|
|
33
|
+
if (!existsSync(metaFilePath)) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const meta = JSON.parse(readFileSync(metaFilePath, 'utf8'));
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
name: entryName,
|
|
41
|
+
title: meta.title || entryName,
|
|
42
|
+
description: meta.description || '',
|
|
43
|
+
directory: templateDir,
|
|
44
|
+
};
|
|
45
|
+
})
|
|
46
|
+
.filter(Boolean);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 解析默认包管理器。
|
|
51
|
+
* @returns {'pnpm' | 'npm' | 'yarn' | 'bun'}
|
|
52
|
+
*/
|
|
53
|
+
function detectPackageManager() {
|
|
54
|
+
const userAgent = process.env.npm_config_user_agent || '';
|
|
55
|
+
|
|
56
|
+
if (userAgent.startsWith('yarn/')) {
|
|
57
|
+
return 'yarn';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (userAgent.startsWith('bun/')) {
|
|
61
|
+
return 'bun';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (userAgent.startsWith('npm/')) {
|
|
65
|
+
return 'npm';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return 'pnpm';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 根据当前平台返回命令名。
|
|
73
|
+
* @param {'pnpm' | 'npm' | 'yarn' | 'bun' | 'git'} command
|
|
74
|
+
* @returns {string}
|
|
75
|
+
*/
|
|
76
|
+
function resolveCommand(command) {
|
|
77
|
+
return process.platform === 'win32' ? `${command}.cmd` : command;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 将目录名转换为 npm 包名。
|
|
82
|
+
* @param {string} projectName
|
|
83
|
+
* @returns {string}
|
|
84
|
+
*/
|
|
85
|
+
function toPackageName(projectName) {
|
|
86
|
+
return projectName
|
|
87
|
+
.trim()
|
|
88
|
+
.toLowerCase()
|
|
89
|
+
.replace(/\s+/g, '-')
|
|
90
|
+
.replace(/[^a-z0-9-_.~/@]/g, '-')
|
|
91
|
+
.replace(/-+/g, '-');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 校验项目名是否合法。
|
|
96
|
+
* @param {string} projectName
|
|
97
|
+
*/
|
|
98
|
+
function validateProjectName(projectName) {
|
|
99
|
+
if (!projectName) {
|
|
100
|
+
throw new Error('项目名不能为空。');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (projectName === '.' || projectName === '..') {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!/^[\w.-]+$/.test(projectName)) {
|
|
108
|
+
throw new Error('项目目录名仅支持字母、数字、点、中划线和下划线。');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 递归遍历目录文件。
|
|
114
|
+
* @param {string} targetDir
|
|
115
|
+
* @returns {string[]}
|
|
116
|
+
*/
|
|
117
|
+
function collectFiles(targetDir) {
|
|
118
|
+
const entries = readdirSync(targetDir, { withFileTypes: true });
|
|
119
|
+
const filePaths = [];
|
|
120
|
+
|
|
121
|
+
for (const entry of entries) {
|
|
122
|
+
const entryPath = path.join(targetDir, entry.name);
|
|
123
|
+
if (entry.isDirectory()) {
|
|
124
|
+
filePaths.push(...collectFiles(entryPath));
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
filePaths.push(entryPath);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return filePaths;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 判断文件是否可按文本方式渲染。
|
|
135
|
+
* @param {string} filePath
|
|
136
|
+
* @returns {boolean}
|
|
137
|
+
*/
|
|
138
|
+
function isRenderableTextFile(filePath) {
|
|
139
|
+
return /\.(?:json|md|tsx?|jsx?|mjs|cjs|css|txt|ya?ml|gitignore)$/i.test(filePath);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* 渲染模板目录中的占位符文件。
|
|
144
|
+
* @param {string} targetDir
|
|
145
|
+
* @param {Record<string, string>} variables
|
|
146
|
+
*/
|
|
147
|
+
function renderTemplateFiles(targetDir, variables) {
|
|
148
|
+
const filePaths = collectFiles(targetDir);
|
|
149
|
+
|
|
150
|
+
for (const filePath of filePaths) {
|
|
151
|
+
const dirName = path.dirname(filePath);
|
|
152
|
+
const baseName = path.basename(filePath);
|
|
153
|
+
|
|
154
|
+
if (baseName === '__dot__gitignore') {
|
|
155
|
+
renameSync(filePath, path.join(dirName, '.gitignore'));
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (baseName.endsWith('.template')) {
|
|
160
|
+
const nextFilePath = path.join(dirName, baseName.replace(/\.template$/, ''));
|
|
161
|
+
renameSync(filePath, nextFilePath);
|
|
162
|
+
renderSingleFile(nextFilePath, variables);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
renderSingleFile(filePath, variables);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 渲染单个文本文件。
|
|
172
|
+
* @param {string} filePath
|
|
173
|
+
* @param {Record<string, string>} variables
|
|
174
|
+
*/
|
|
175
|
+
function renderSingleFile(filePath, variables) {
|
|
176
|
+
if (!isRenderableTextFile(filePath)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
let content = readFileSync(filePath, 'utf8');
|
|
181
|
+
for (const [key, value] of Object.entries(variables)) {
|
|
182
|
+
content = content.replaceAll(`{{${key}}}`, value);
|
|
183
|
+
}
|
|
184
|
+
writeFileSync(filePath, content);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* 执行子进程命令。
|
|
189
|
+
* @param {string} command
|
|
190
|
+
* @param {string[]} args
|
|
191
|
+
* @param {string} cwd
|
|
192
|
+
* @returns {Promise<void>}
|
|
193
|
+
*/
|
|
194
|
+
function runCommand(command, args, cwd) {
|
|
195
|
+
return new Promise((resolve, reject) => {
|
|
196
|
+
const child = spawn(resolveCommand(command), args, {
|
|
197
|
+
cwd,
|
|
198
|
+
stdio: 'inherit',
|
|
199
|
+
shell: false,
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
child.on('close', (code) => {
|
|
203
|
+
if (code === 0) {
|
|
204
|
+
resolve();
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
reject(new Error(`${command} ${args.join(' ')} 执行失败,退出码 ${code}`));
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 获取安装命令。
|
|
215
|
+
* @param {'pnpm' | 'npm' | 'yarn' | 'bun'} packageManager
|
|
216
|
+
* @returns {{ command: string, args: string[] }}
|
|
217
|
+
*/
|
|
218
|
+
function getInstallCommand(packageManager) {
|
|
219
|
+
switch (packageManager) {
|
|
220
|
+
case 'npm':
|
|
221
|
+
return { command: 'npm', args: ['install'] };
|
|
222
|
+
case 'yarn':
|
|
223
|
+
return { command: 'yarn', args: [] };
|
|
224
|
+
case 'bun':
|
|
225
|
+
return { command: 'bun', args: ['install'] };
|
|
226
|
+
default:
|
|
227
|
+
return { command: 'pnpm', args: ['install'] };
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* 初始化项目。
|
|
233
|
+
* @param {string | undefined} inputName
|
|
234
|
+
* @param {{ template?: string, pm?: 'pnpm' | 'npm' | 'yarn' | 'bun', install?: boolean, git?: boolean, force?: boolean }} options
|
|
235
|
+
*/
|
|
236
|
+
async function initProject(inputName, options) {
|
|
237
|
+
const templateName = options.template || 'base';
|
|
238
|
+
const packageManager = options.pm || detectPackageManager();
|
|
239
|
+
const availableTemplates = getAvailableTemplates();
|
|
240
|
+
const matchedTemplate = availableTemplates.find(item => item.name === templateName);
|
|
241
|
+
|
|
242
|
+
if (!matchedTemplate) {
|
|
243
|
+
throw new Error(`未找到模板 ${templateName},可用模板:${availableTemplates.map(item => item.name).join(', ')}`);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const workingDir = process.cwd();
|
|
247
|
+
const projectName = inputName || 'funhub-app';
|
|
248
|
+
validateProjectName(projectName);
|
|
249
|
+
|
|
250
|
+
const targetDir = path.resolve(workingDir, projectName);
|
|
251
|
+
const targetExists = existsSync(targetDir);
|
|
252
|
+
const targetBaseName = projectName === '.' ? path.basename(workingDir) : path.basename(targetDir);
|
|
253
|
+
const packageName = toPackageName(targetBaseName);
|
|
254
|
+
|
|
255
|
+
if (targetExists) {
|
|
256
|
+
const targetEntries = readdirSync(targetDir);
|
|
257
|
+
if (targetEntries.length > 0) {
|
|
258
|
+
if (!options.force) {
|
|
259
|
+
throw new Error(`目标目录 ${targetDir} 非空,请改用空目录或显式传入 --force。`);
|
|
260
|
+
}
|
|
261
|
+
rmSync(targetDir, { recursive: true, force: true });
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
mkdirSync(targetDir, { recursive: true });
|
|
266
|
+
|
|
267
|
+
const sourceTemplateDir = path.join(matchedTemplate.directory, 'template');
|
|
268
|
+
cpSync(sourceTemplateDir, targetDir, { recursive: true });
|
|
269
|
+
|
|
270
|
+
renderTemplateFiles(targetDir, {
|
|
271
|
+
PROJECT_NAME: targetBaseName,
|
|
272
|
+
PACKAGE_NAME: packageName,
|
|
273
|
+
PLATFORM_VERSION: platformPackageJson.version,
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
console.log(`\n已创建 Funhub 项目:${targetBaseName}`);
|
|
277
|
+
console.log(`模板:${matchedTemplate.title}`);
|
|
278
|
+
console.log(`目录:${targetDir}`);
|
|
279
|
+
|
|
280
|
+
if (options.install !== false) {
|
|
281
|
+
const installCommand = getInstallCommand(packageManager);
|
|
282
|
+
console.log(`\n正在安装依赖(${packageManager})...`);
|
|
283
|
+
await runCommand(installCommand.command, installCommand.args, targetDir);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (options.git !== false) {
|
|
287
|
+
console.log('\n正在初始化 Git 仓库...');
|
|
288
|
+
await runCommand('git', ['init'], targetDir);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const relativeTargetDir = path.relative(workingDir, targetDir) || '.';
|
|
292
|
+
console.log('\n下一步:');
|
|
293
|
+
if (relativeTargetDir !== '.') {
|
|
294
|
+
console.log(` cd ${relativeTargetDir}`);
|
|
295
|
+
}
|
|
296
|
+
if (options.install === false) {
|
|
297
|
+
const installCommand = getInstallCommand(packageManager);
|
|
298
|
+
console.log(` ${installCommand.command} ${installCommand.args.join(' ')}`.trimEnd());
|
|
299
|
+
}
|
|
300
|
+
console.log(` ${packageManager} dev`);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
const cli = cac('@funhub/platform');
|
|
304
|
+
|
|
305
|
+
cli
|
|
306
|
+
.command('init [project-name]', '初始化一个 Funhub 应用')
|
|
307
|
+
.option('--template <template>', '模板名称,默认 base')
|
|
308
|
+
.option('--pm <packageManager>', '包管理器,可选 pnpm/npm/yarn/bun')
|
|
309
|
+
.option('--no-install', '跳过依赖安装')
|
|
310
|
+
.option('--no-git', '跳过 git init')
|
|
311
|
+
.option('--force', '强制覆盖非空目录')
|
|
312
|
+
.action(async (projectName, options) => {
|
|
313
|
+
try {
|
|
314
|
+
await initProject(projectName, options);
|
|
315
|
+
}
|
|
316
|
+
catch (error) {
|
|
317
|
+
console.error(`\n❌ ${(error && error.message) || '初始化失败'}`);
|
|
318
|
+
process.exit(1);
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
|
|
322
|
+
cli.help();
|
|
323
|
+
cli.parse();
|
|
@@ -19,6 +19,6 @@ declare const basicBannerMaterial: DefineMaterialOption<typeof BasicBanner, type
|
|
|
19
19
|
renderer: "renderer";
|
|
20
20
|
editor: "editor";
|
|
21
21
|
}>>;
|
|
22
|
-
}, zod_v4_core0.$strip>, "basic-banner">;
|
|
22
|
+
}, zod_v4_core0.$strip>, "basic-banner", "内容组件">;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { basicBannerMaterial };
|
|
@@ -22,6 +22,6 @@ declare const BannerCarouselMaterial: DefineMaterialOption<typeof BannerCarousel
|
|
|
22
22
|
renderer: "renderer";
|
|
23
23
|
editor: "editor";
|
|
24
24
|
}>>;
|
|
25
|
-
}, zod_v4_core0.$strip>, "banner-carousel">;
|
|
25
|
+
}, zod_v4_core0.$strip>, "banner-carousel", "内容组件">;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { BannerCarouselMaterial };
|
|
@@ -18,6 +18,6 @@ declare const channelListMaterial: DefineMaterialOption<typeof BasicChannelListC
|
|
|
18
18
|
renderer: "renderer";
|
|
19
19
|
editor: "editor";
|
|
20
20
|
}>>;
|
|
21
|
-
}, zod_v4_core0.$strip>, "channel-list">;
|
|
21
|
+
}, zod_v4_core0.$strip>, "channel-list", "内容组件">;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { channelListMaterial };
|
|
@@ -29,31 +29,31 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
|
|
|
29
29
|
renderer: "renderer";
|
|
30
30
|
editor: "editor";
|
|
31
31
|
}>>;
|
|
32
|
-
}, z$1.core.$strip>, "video-detail-player">, DefineMaterialOption<typeof VideoDetailInfo, typeof VideoDetailInfoClient, z$1.ZodObject<{
|
|
32
|
+
}, z$1.core.$strip>, "video-detail-player", "视频模块">, DefineMaterialOption<typeof VideoDetailInfo, typeof VideoDetailInfoClient, z$1.ZodObject<{
|
|
33
33
|
showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
34
34
|
showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
35
35
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
36
36
|
renderer: "renderer";
|
|
37
37
|
editor: "editor";
|
|
38
38
|
}>>;
|
|
39
|
-
}, z$1.core.$strip>, "video-detail-info">, DefineMaterialOption<typeof VideoDetailInfoTitle, typeof VideoDetailInfoTitleClient, z$1.ZodObject<{
|
|
39
|
+
}, z$1.core.$strip>, "video-detail-info", "内容组件">, DefineMaterialOption<typeof VideoDetailInfoTitle, typeof VideoDetailInfoTitleClient, z$1.ZodObject<{
|
|
40
40
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
41
41
|
renderer: "renderer";
|
|
42
42
|
editor: "editor";
|
|
43
43
|
}>>;
|
|
44
|
-
}, z$1.core.$strip>, "video-detail-info-title">, DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodes, typeof VideoDetailInfoTitleTagsEpisodesClient, z$1.ZodObject<{
|
|
44
|
+
}, z$1.core.$strip>, "video-detail-info-title", "内容组件">, DefineMaterialOption<typeof VideoDetailInfoTitleTagsEpisodes, typeof VideoDetailInfoTitleTagsEpisodesClient, z$1.ZodObject<{
|
|
45
45
|
showTags: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
46
46
|
showEpisodes: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
47
47
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
48
48
|
renderer: "renderer";
|
|
49
49
|
editor: "editor";
|
|
50
50
|
}>>;
|
|
51
|
-
}, z$1.core.$strip>, "video-detail-info-title-tags-episodes">, DefineMaterialOption<typeof VideoDetailActions, typeof VideoDetailActionsClient, z$1.ZodObject<{
|
|
51
|
+
}, z$1.core.$strip>, "video-detail-info-title-tags-episodes", "内容组件">, DefineMaterialOption<typeof VideoDetailActions, typeof VideoDetailActionsClient, z$1.ZodObject<{
|
|
52
52
|
mode: z$1.ZodOptional<z$1.ZodEnum<{
|
|
53
53
|
renderer: "renderer";
|
|
54
54
|
editor: "editor";
|
|
55
55
|
}>>;
|
|
56
|
-
}, z$1.core.$strip>, "video-detail-actions">, DefineMaterialOption<typeof VideoDetailRecommend, typeof VideoDetailRecommendClient, z$1.ZodObject<{
|
|
56
|
+
}, z$1.core.$strip>, "video-detail-actions", "行为组件">, DefineMaterialOption<typeof VideoDetailRecommend, typeof VideoDetailRecommendClient, z$1.ZodObject<{
|
|
57
57
|
rows: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
58
58
|
columns: z$1.ZodNumber & SchemaHasDefaultValue;
|
|
59
59
|
smartTagEnabled: z$1.ZodBoolean & SchemaHasDefaultValue;
|
|
@@ -83,6 +83,6 @@ declare const videoDetailMaterials: MaterialMap<readonly [DefineMaterialOption<t
|
|
|
83
83
|
renderer: "renderer";
|
|
84
84
|
editor: "editor";
|
|
85
85
|
}>>;
|
|
86
|
-
}, z$1.core.$strip>, "video-detail-recommend">]>;
|
|
86
|
+
}, z$1.core.$strip>, "video-detail-recommend", "详情页">]>;
|
|
87
87
|
//#endregion
|
|
88
88
|
export { videoDetailMaterials };
|
|
@@ -11,6 +11,6 @@ declare const videoDetailActionsMaterial: DefineMaterialOption<typeof VideoDetai
|
|
|
11
11
|
renderer: "renderer";
|
|
12
12
|
editor: "editor";
|
|
13
13
|
}>>;
|
|
14
|
-
}, zod_v4_core0.$strip>, "video-detail-actions">;
|
|
14
|
+
}, zod_v4_core0.$strip>, "video-detail-actions", "行为组件">;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { videoDetailActionsMaterial };
|
|
@@ -15,6 +15,6 @@ declare const videoDetailInfoMaterial: DefineMaterialOption<typeof VideoDetailIn
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "video-detail-info">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "video-detail-info", "内容组件">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { videoDetailInfoMaterial };
|
package/dist/components/biz/business/detail/materials/video-detail-info-title/material.d.mts
CHANGED
|
@@ -11,6 +11,6 @@ declare const videoDetailInfoTitleMaterial: DefineMaterialOption<typeof VideoDet
|
|
|
11
11
|
renderer: "renderer";
|
|
12
12
|
editor: "editor";
|
|
13
13
|
}>>;
|
|
14
|
-
}, zod_v4_core0.$strip>, "video-detail-info-title">;
|
|
14
|
+
}, zod_v4_core0.$strip>, "video-detail-info-title", "内容组件">;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { videoDetailInfoTitleMaterial };
|
|
@@ -15,6 +15,6 @@ declare const videoDetailInfoTitleTagsEpisodesMaterial: DefineMaterialOption<typ
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "video-detail-info-title-tags-episodes">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "video-detail-info-title-tags-episodes", "内容组件">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { videoDetailInfoTitleTagsEpisodesMaterial };
|
|
@@ -11,6 +11,6 @@ declare const videoDetailPlayerMaterial: DefineMaterialOption<typeof VideoDetail
|
|
|
11
11
|
renderer: "renderer";
|
|
12
12
|
editor: "editor";
|
|
13
13
|
}>>;
|
|
14
|
-
}, zod_v4_core0.$strip>, "video-detail-player">;
|
|
14
|
+
}, zod_v4_core0.$strip>, "video-detail-player", "视频模块">;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { videoDetailPlayerMaterial };
|
|
@@ -38,6 +38,6 @@ declare const videoDetailRecommendMaterial: DefineMaterialOption<typeof VideoDet
|
|
|
38
38
|
renderer: "renderer";
|
|
39
39
|
editor: "editor";
|
|
40
40
|
}>>;
|
|
41
|
-
}, zod_v4_core0.$strip>, "video-detail-recommend">;
|
|
41
|
+
}, zod_v4_core0.$strip>, "video-detail-recommend", "详情页">;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { videoDetailRecommendMaterial };
|
|
@@ -15,6 +15,6 @@ declare const floatingBallMaterial: DefineMaterialOption<typeof FloatingBall, ty
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "floating-ball">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "floating-ball", "内容组件">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { floatingBallMaterial };
|
|
@@ -11,6 +11,6 @@ declare const headerAvatarIconMaterial: DefineMaterialOption<typeof HeaderAvatar
|
|
|
11
11
|
renderer: "renderer";
|
|
12
12
|
editor: "editor";
|
|
13
13
|
}>>;
|
|
14
|
-
}, zod_v4_core0.$strip>, "header-avatar-icon">;
|
|
14
|
+
}, zod_v4_core0.$strip>, "header-avatar-icon", "顶部功能">;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { headerAvatarIconMaterial };
|
|
@@ -15,6 +15,6 @@ declare const headerAvatarLogoSearchMaterial: DefineMaterialOption<typeof Header
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "header-avatar-logo-search">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "header-avatar-logo-search", "顶部功能">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { headerAvatarLogoSearchMaterial };
|
package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/material.d.mts
CHANGED
|
@@ -15,6 +15,6 @@ declare const headerAvatarLogoSearchIconMaterial: DefineMaterialOption<typeof He
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "header-avatar-logo-search-icon">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "header-avatar-logo-search-icon", "顶部功能">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { headerAvatarLogoSearchIconMaterial };
|
|
@@ -15,6 +15,6 @@ declare const headerLogoSearchMaterial: DefineMaterialOption<typeof HeaderLogoSe
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "header-logo-search">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "header-logo-search", "顶部功能">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { headerLogoSearchMaterial };
|
|
@@ -11,6 +11,6 @@ declare const headerSearchMaterial: DefineMaterialOption<typeof HeaderSearch, ty
|
|
|
11
11
|
renderer: "renderer";
|
|
12
12
|
editor: "editor";
|
|
13
13
|
}>>;
|
|
14
|
-
}, zod_v4_core0.$strip>, "header-search">;
|
|
14
|
+
}, zod_v4_core0.$strip>, "header-search", "顶部功能">;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { headerSearchMaterial };
|
package/dist/components/biz/business/home-recommend/variants/home-recommend-grid/material.d.mts
CHANGED
|
@@ -15,6 +15,6 @@ declare const homeRecommendGridMaterial: DefineMaterialOption<typeof HomeRecomme
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "home-recommend-grid">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "home-recommend-grid", "内容组件">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { homeRecommendGridMaterial };
|
package/dist/components/biz/business/home-recommend/variants/home-recommend-waterfall/material.d.mts
CHANGED
|
@@ -14,6 +14,6 @@ declare const homeRecommendWaterfallMaterial: DefineMaterialOption<typeof HomeRe
|
|
|
14
14
|
renderer: "renderer";
|
|
15
15
|
editor: "editor";
|
|
16
16
|
}>>;
|
|
17
|
-
}, zod_v4_core0.$strip>, "home-recommend-waterfall">;
|
|
17
|
+
}, zod_v4_core0.$strip>, "home-recommend-waterfall", "内容组件">;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { homeRecommendWaterfallMaterial };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { DefineMaterialOption } from "../../../../utils/schema/material.mjs";
|
|
2
|
+
import { DefineMaterialOption, MaterialCategory } from "../../../../utils/schema/material.mjs";
|
|
3
3
|
import * as react from "react";
|
|
4
4
|
import * as zod from "zod";
|
|
5
5
|
import * as zod_v4_core0 from "zod/v4/core";
|
|
@@ -7,6 +7,6 @@ import * as zod_v4_core0 from "zod/v4/core";
|
|
|
7
7
|
//#region components/biz/business/large-feature-grid/material.d.ts
|
|
8
8
|
declare const largeFeatureGridMaterial: DefineMaterialOption<react.ComponentType<any>, react.ComponentType<any>, zod.ZodObject<Readonly<{
|
|
9
9
|
[k: string]: zod_v4_core0.$ZodType<unknown, unknown, zod_v4_core0.$ZodTypeInternals<unknown, unknown>>;
|
|
10
|
-
}>, zod_v4_core0.$strip>, string>;
|
|
10
|
+
}>, zod_v4_core0.$strip>, string, MaterialCategory>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { largeFeatureGridMaterial };
|
|
@@ -35,6 +35,6 @@ declare const marqueeMaterial: DefineMaterialOption<typeof MarqueeServer, typeof
|
|
|
35
35
|
renderer: "renderer";
|
|
36
36
|
editor: "editor";
|
|
37
37
|
}>>;
|
|
38
|
-
}, zod_v4_core0.$strip>, "marquee">;
|
|
38
|
+
}, zod_v4_core0.$strip>, "marquee", "内容组件">;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { marqueeMaterial };
|
|
@@ -18,7 +18,7 @@ declare const profileHeaderMaterial: DefineMaterialOption<({
|
|
|
18
18
|
renderer: "renderer";
|
|
19
19
|
editor: "editor";
|
|
20
20
|
}>>;
|
|
21
|
-
}, zod_v4_core0.$strip>, "profile-header">;
|
|
21
|
+
}, zod_v4_core0.$strip>, "profile-header", "内容组件">;
|
|
22
22
|
declare const profileHeaderMaterialWithDisabledBackground: DefineMaterialOption<({
|
|
23
23
|
mode,
|
|
24
24
|
...props
|
|
@@ -30,6 +30,6 @@ declare const profileHeaderMaterialWithDisabledBackground: DefineMaterialOption<
|
|
|
30
30
|
renderer: "renderer";
|
|
31
31
|
editor: "editor";
|
|
32
32
|
}>>;
|
|
33
|
-
}, zod_v4_core0.$strip>, "profile-header-with-disabled-background">;
|
|
33
|
+
}, zod_v4_core0.$strip>, "profile-header-with-disabled-background", "内容组件">;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { profileHeaderMaterial, profileHeaderMaterialWithDisabledBackground };
|
|
@@ -11,6 +11,6 @@ declare const profileMainMaterial: DefineMaterialOption<typeof UserProfileMain,
|
|
|
11
11
|
renderer: "renderer";
|
|
12
12
|
editor: "editor";
|
|
13
13
|
}>>;
|
|
14
|
-
}, zod_v4_core0.$strip>, "profile-main">;
|
|
14
|
+
}, zod_v4_core0.$strip>, "profile-main", "内容组件">;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { profileMainMaterial };
|
|
@@ -15,6 +15,6 @@ declare const searchHistoryMaterial: DefineMaterialOption<typeof SearchHistorySe
|
|
|
15
15
|
renderer: "renderer";
|
|
16
16
|
editor: "editor";
|
|
17
17
|
}>>;
|
|
18
|
-
}, zod_v4_core0.$strip>, "search-history">;
|
|
18
|
+
}, zod_v4_core0.$strip>, "search-history", "行为组件">;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { searchHistoryMaterial };
|
|
@@ -14,6 +14,6 @@ declare const searchInputMaterial: DefineMaterialOption<typeof SearchInputServer
|
|
|
14
14
|
renderer: "renderer";
|
|
15
15
|
editor: "editor";
|
|
16
16
|
}>>;
|
|
17
|
-
}, zod_v4_core0.$strip>, "search-input">;
|
|
17
|
+
}, zod_v4_core0.$strip>, "search-input", "行为组件">;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { searchInputMaterial };
|
|
@@ -21,6 +21,6 @@ declare const shortcutGridMaterial: DefineMaterialOption<typeof ShortcutGrid, ty
|
|
|
21
21
|
renderer: "renderer";
|
|
22
22
|
editor: "editor";
|
|
23
23
|
}>>;
|
|
24
|
-
}, zod_v4_core0.$strip>, "shortcut-grid">;
|
|
24
|
+
}, zod_v4_core0.$strip>, "shortcut-grid", "金刚组件">;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { shortcutGridMaterial };
|
|
@@ -29,6 +29,6 @@ declare const tabBarMaterial: DefineMaterialOption<typeof TabBarServer, typeof T
|
|
|
29
29
|
renderer: "renderer";
|
|
30
30
|
editor: "editor";
|
|
31
31
|
}>>;
|
|
32
|
-
}, zod_v4_core0.$strip>, "tab-bar">;
|
|
32
|
+
}, zod_v4_core0.$strip>, "tab-bar", "行为组件">;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { tabBarMaterial };
|
|
@@ -18,6 +18,6 @@ declare const textRecommendMaterial: DefineMaterialOption<typeof TextRecommendSe
|
|
|
18
18
|
renderer: "renderer";
|
|
19
19
|
editor: "editor";
|
|
20
20
|
}>>;
|
|
21
|
-
}, zod_v4_core0.$strip>, "text-recommend">;
|
|
21
|
+
}, zod_v4_core0.$strip>, "text-recommend", "内容组件">;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { textRecommendMaterial };
|
|
@@ -38,6 +38,6 @@ declare const videoHorizontalListMaterial: DefineMaterialOption<typeof VideoHori
|
|
|
38
38
|
renderer: "renderer";
|
|
39
39
|
editor: "editor";
|
|
40
40
|
}>>;
|
|
41
|
-
}, zod_v4_core0.$strip>, "video-horizontal-list">;
|
|
41
|
+
}, zod_v4_core0.$strip>, "video-horizontal-list", "内容组件">;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { videoHorizontalListMaterial };
|
|
@@ -23,6 +23,6 @@ declare const exampleButtonMaterial: DefineMaterialOption<typeof Button, typeof
|
|
|
23
23
|
renderer: "renderer";
|
|
24
24
|
editor: "editor";
|
|
25
25
|
}>>;
|
|
26
|
-
}, zod_v4_core0.$strip>, "example-button">;
|
|
26
|
+
}, zod_v4_core0.$strip>, "example-button", "行为组件">;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { exampleButtonMaterial };
|