对齐编辑器生成占位与面板参数

统一画布生成占位图标,按图片、规范、角色、图标、UI、视频、音频、宣发和快速编辑区分。

让图片、规范、宣发和视频新建占位按面板尺寸或固定输出尺寸创建,并在参数变化时同步占位大小。

完善快速编辑、音频生成、宣发素材和生成类面板相关契约与测试。

更新生成类面板 Lovart 改造文档和项目决策记录。
This commit is contained in:
2026-06-19 12:15:57 +08:00
parent 160c96a014
commit 0e47a54a91
49 changed files with 2106 additions and 758 deletions
@@ -985,9 +985,9 @@ describe('editorProjectClient', () => {
});
const result = await generateEditorSoundEffect({
sound: '金币掉落叮当声',
type: 'one-shot',
tempo: 120,
prompt: '金币掉落叮当声',
model: 'audio1.0',
duration: 7,
priceMudPoints: 10,
});
@@ -998,9 +998,9 @@ describe('editorProjectClient', () => {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
sound: '金币掉落叮当声',
type: 'one-shot',
tempo: 120,
prompt: '金币掉落叮当声',
model: 'audio1.0',
duration: 7,
priceMudPoints: 10,
}),
}),
@@ -1012,7 +1012,7 @@ describe('editorProjectClient', () => {
);
});
it('keeps editor sound effect tempo as null when BPM is not selected', async () => {
it('sends editor sound effect duration to Vidu instead of legacy type and tempo', async () => {
requestJsonMock.mockResolvedValueOnce({
audioSrc: '/generated-character-drafts/editor-audios/sfx-null.mp3',
width: 420,
@@ -1028,9 +1028,9 @@ describe('editorProjectClient', () => {
});
await generateEditorSoundEffect({
sound: '按钮确认短促音',
type: 'one-shot',
tempo: null,
prompt: '按钮确认短促音',
model: 'audio1.0',
duration: 5,
priceMudPoints: 10,
});
@@ -1038,9 +1038,9 @@ describe('editorProjectClient', () => {
'/api/editor/audios/sound-effects/generations',
expect.objectContaining({
body: JSON.stringify({
sound: '按钮确认短促音',
type: 'one-shot',
tempo: null,
prompt: '按钮确认短促音',
model: 'audio1.0',
duration: 5,
priceMudPoints: 10,
}),
}),
@@ -241,9 +241,9 @@ export type EditorVideoGenerationResult = {
};
export type EditorSoundEffectGenerationInput = {
sound: string;
type: 'one-shot' | 'loop';
tempo: number | null;
prompt: string;
model: 'audio1.0';
duration: number;
priceMudPoints: number;
};
@@ -679,9 +679,9 @@ export async function generateEditorSoundEffect(
return requestJson<EditorAudioGenerationResponse>(
EDITOR_SOUND_EFFECT_GENERATION_API,
jsonRequest('POST', {
sound: input.sound,
type: input.type,
tempo: input.tempo,
prompt: input.prompt,
model: input.model,
duration: input.duration,
priceMudPoints: input.priceMudPoints,
}),
'生成游戏音效失败',