adyou 0.6.12 → 0.6.13
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.
|
@@ -16,10 +16,19 @@ export const langName = (l) => LANG_NAME[l] || LANG_NAME[l.split('-')[0]] || l;
|
|
|
16
16
|
/** 훅 길이 제한 — 한글·전각 12자(wlen 24) · 라틴은 단어 경계에서 자른다(잘린 단어 금지) */
|
|
17
17
|
export function fitHook(t) {
|
|
18
18
|
const s = t.trim().replace(/\s+/g, ' ');
|
|
19
|
-
if (wlen(s) <=
|
|
19
|
+
if (wlen(s) <= 30)
|
|
20
20
|
return s;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
// 🔴 한글도 어절 경계에서 — 글자 단위로 자르면 「현대건설이 짓는, 힐스테이」(힐스테이트 실사고 · 2026-09-17). 한도 15자(wlen 30) · 줄나눔은 렌더가 맡는다
|
|
22
|
+
if (/[\u3000-\u9fff\uac00-\ud7af]/.test(s)) {
|
|
23
|
+
const ws = s.split(' ');
|
|
24
|
+
let out = '';
|
|
25
|
+
for (const w of ws) {
|
|
26
|
+
if (wlen((out + ' ' + w).trim()) > 30)
|
|
27
|
+
break;
|
|
28
|
+
out = (out + ' ' + w).trim();
|
|
29
|
+
}
|
|
30
|
+
return (out || fit(s, 30)).replace(/[\s,·:;\-—]+$/, '');
|
|
31
|
+
}
|
|
23
32
|
const words = s.split(' ');
|
|
24
33
|
let out = '';
|
|
25
34
|
for (const w of words) {
|
|
@@ -88,7 +97,7 @@ export async function generateStoryboards(brief, concept, o) {
|
|
|
88
97
|
const clips = p.clips.map((pc, i) => { const src = b.clips[i] || b.clips[b.clips.length - 1]; return { sec: pc.sec, kind: pc.kind, prompt: (src?.prompt || '').trim(), speech: src?.speech || undefined, continues: i > 0 ? !!src?.continues : false }; });
|
|
89
98
|
const caps = b.captions.map((c) => c.trim()).filter(Boolean).slice(0, 3);
|
|
90
99
|
// 🔴 장면 포맷의 voice 를 모델이 비우면 내레이션 없는 「음악만」 영상이 된다(힐스테이트 글자 훅 · 2026-09-17) → 자막 두 줄로 내레이션을 만든다
|
|
91
|
-
const voice = b.voice?.trim() || (p.format !== 'ugc_selfie' ? [caps[0], caps[1]].filter(Boolean).
|
|
100
|
+
const voice = b.voice?.trim() || (p.format !== 'ugc_selfie' ? [caps[0], caps[1]].filter(Boolean).map((c, i, a) => i < a.length - 1 && !/[.!?。!?,]$/.test(c) ? c + ',' : c).join(' ').replace(/[,]?$/, '').replace(/[^.!?。!?]$/, (m) => m + '.') : undefined);
|
|
92
101
|
boards.push({ id: `${concept.key}_${p.format}`, format: p.format, genre: p.format === 'ugc_selfie' ? 'ugc' : (b.genre && genres.includes(b.genre) ? b.genre : genres[0]) || 'photoreal', hook: fitHook(b.hook), captions: caps, voice, music: b.music || tone.music, cta, durationSec: o.durationSec, clips, lang, cast: b.cast || undefined });
|
|
93
102
|
}
|
|
94
103
|
return boards;
|
package/package.json
CHANGED