@waterwx/dsh-novel-forge 1.2.0 → 1.3.0
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 +5 -0
- package/lib/client.js +2100 -651
- package/lib/client.js.map +1 -1
- package/lib/index.js +567 -173
- package/lib/index.js.map +1 -1
- package/lib/types/client/api.d.ts +4 -4
- package/lib/types/client/panel/NovelPanel.d.ts +1 -1
- package/lib/types/comic-presets.d.ts +12 -0
- package/lib/types/engine.d.ts +16 -13
- package/lib/types/index.d.ts +6 -0
- package/lib/types/protocol.d.ts +128 -89
- package/package.json +1 -1
- package/src/client/api.ts +10 -10
- package/src/client/panel/NovelPanel.tsx +650 -172
- package/src/comic-presets.ts +67 -0
- package/src/engine.ts +344 -188
- package/src/index.ts +15 -0
- package/src/protocol.ts +121 -96
- package/src/routes.ts +173 -52
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** 漫画风格预设:每个预设对应一组出图提示词与排版偏好。 */
|
|
2
|
+
|
|
3
|
+
export interface ComicStylePreset {
|
|
4
|
+
id: string
|
|
5
|
+
label: string
|
|
6
|
+
/** 注入 imagePrompt 的风格描述词。 */
|
|
7
|
+
prompt: string
|
|
8
|
+
/** 可选:排版偏好说明。 */
|
|
9
|
+
layoutHint?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const COMIC_STYLE_PRESETS: ComicStylePreset[] = [
|
|
13
|
+
{
|
|
14
|
+
id: 'japan',
|
|
15
|
+
label: '日漫 / 黑白',
|
|
16
|
+
prompt: 'manga style, screentone, bold ink lines, high contrast, black and white, cel shading',
|
|
17
|
+
layoutHint: '页漫优先',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'korea',
|
|
21
|
+
label: '韩漫 / 条漫',
|
|
22
|
+
prompt: 'manhwa style, soft cel shading, vibrant colors, clean lineart, webtoon vertical composition, glossy highlights',
|
|
23
|
+
layoutHint: '条漫优先',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'china',
|
|
27
|
+
label: '国漫 / 古风',
|
|
28
|
+
prompt: 'chinese ink painting style, flowing brush strokes, traditional palette, ethereal atmosphere, xianxia aesthetic',
|
|
29
|
+
layoutHint: '页漫/条漫均可',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'america',
|
|
33
|
+
label: '美漫 / 超级英雄',
|
|
34
|
+
prompt: 'american comic style, bold outlines, dramatic lighting, dynamic poses, vibrant colors, halftone shading',
|
|
35
|
+
layoutHint: '页漫优先',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'chibi',
|
|
39
|
+
label: 'Q版 / 搞笑',
|
|
40
|
+
prompt: 'chibi style, cute proportions, big head, exaggerated expressions, simple background, bright colors',
|
|
41
|
+
layoutHint: '条漫/四格优先',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'realistic',
|
|
45
|
+
label: '写实 / 电影感',
|
|
46
|
+
prompt: 'realistic cinematic style, detailed textures, natural lighting, film grain, high detail',
|
|
47
|
+
layoutHint: '页漫/全彩',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'cyber',
|
|
51
|
+
label: '赛博 / 暗黑',
|
|
52
|
+
prompt: 'cyberpunk style, neon lights, dark atmosphere, high contrast, futuristic city, cool tones',
|
|
53
|
+
layoutHint: '页漫/全彩',
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
export function getComicStylePrompt(styleId?: string): string {
|
|
58
|
+
if (!styleId) return ''
|
|
59
|
+
const preset = COMIC_STYLE_PRESETS.find(s => s.id === styleId)
|
|
60
|
+
return preset?.prompt ?? ''
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function getComicStyleLabel(styleId?: string): string {
|
|
64
|
+
if (!styleId) return ''
|
|
65
|
+
const preset = COMIC_STYLE_PRESETS.find(s => s.id === styleId)
|
|
66
|
+
return preset?.label ?? styleId
|
|
67
|
+
}
|