@nodaro/shared 1.12.0 → 1.13.1
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/dist/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/llm-models.test.ts +27 -0
- package/src/i18n/styling.ar.ts +7 -0
- package/src/i18n/styling.de.ts +7 -0
- package/src/i18n/styling.es.ts +7 -0
- package/src/i18n/styling.fr.ts +7 -0
- package/src/i18n/styling.he.ts +7 -0
- package/src/i18n/styling.hi.ts +7 -0
- package/src/i18n/styling.ja.ts +7 -0
- package/src/i18n/styling.ko.ts +7 -0
- package/src/i18n/styling.pt-BR.ts +7 -0
- package/src/i18n/styling.ru.ts +7 -0
- package/src/i18n/styling.zh-CN.ts +7 -0
- package/src/index.ts +1 -0
- package/src/llm-models.ts +22 -1
- package/src/parameter-node-value.ts +20 -0
|
@@ -27,6 +27,7 @@ const map: LocaleCatalogMap = {
|
|
|
27
27
|
"headwear-bandana": { label: "头巾", description: "绑在头上的方巾" },
|
|
28
28
|
"headwear-hood": { label: "帽兜", description: "拉起的连帽衫帽兜" },
|
|
29
29
|
"headwear-crown": { label: "皇冠", description: "皇冠或装饰冠" },
|
|
30
|
+
"headwear-nemes": { label: "奈迈斯头巾", description: "带圣蛇的条纹法老头巾" },
|
|
30
31
|
"headwear-helmet": { label: "头盔", description: "防护头盔" },
|
|
31
32
|
"headwear-veil": { label: "面纱", description: "覆盖脸 / 头发的面纱" },
|
|
32
33
|
"headwear-bucket-hat": { label: "渔夫帽", description: "软帽檐的休闲渔夫帽" },
|
|
@@ -136,6 +137,7 @@ const map: LocaleCatalogMap = {
|
|
|
136
137
|
"face-paint-dramatic": { label: "戏剧脸绘", description: "大胆艺术化的脸部彩绘" },
|
|
137
138
|
"face-paint-costume": { label: "角色彩妆", description: "Cosplay / 戏剧妆" },
|
|
138
139
|
"face-paint-tribal": { label: "部族纹绘", description: "部族风格的脸部纹绘" },
|
|
140
|
+
"face-paint-flag": { label: "国旗脸彩", description: "画在脸颊上的国旗,球迷风格" },
|
|
139
141
|
"face-paint-warpaint": { label: "战士涂彩", description: "勇士战斗般的涂彩条纹" },
|
|
140
142
|
|
|
141
143
|
// -------------------- Fabric --------------------
|
|
@@ -162,12 +164,14 @@ const map: LocaleCatalogMap = {
|
|
|
162
164
|
"outfit-evening-gown": { label: "晚礼服", description: "落地长款正式礼服" },
|
|
163
165
|
"outfit-wedding-dress": { label: "婚纱", description: "白色婚纱礼服" },
|
|
164
166
|
"outfit-cocktail-dress":{ label: "鸡尾酒裙", description: "及膝鸡尾酒裙" },
|
|
167
|
+
"outfit-sundress": { label: "太阳裙/长裙", description: "飘逸的挂脖太阳裙/印花长裙" },
|
|
165
168
|
"outfit-lab-coat": { label: "实验室白大褂", description: "白色医用大褂" },
|
|
166
169
|
"outfit-scrubs": { label: "医用刷手服", description: "纯色医用刷手服" },
|
|
167
170
|
"outfit-military": { label: "军装", description: "橄榄绿军用作训服" },
|
|
168
171
|
"outfit-lifeguard": { label: "救生员服", description: "红色救生员上衣加短裤" },
|
|
169
172
|
"outfit-athleisure": { label: "运动休闲套装", description: "上下成套的运动休闲" },
|
|
170
173
|
"outfit-tracksuit": { label: "运动套装", description: "前拉链两件套运动套装" },
|
|
174
|
+
"outfit-soccer-jersey": { label: "足球球衣", description: "带队徽的国家队球衣" },
|
|
171
175
|
"outfit-bikini": { label: "比基尼", description: "两件式泳装" },
|
|
172
176
|
"outfit-one-piece-swim":{ label: "连体泳衣", description: "贴身连体泳衣" },
|
|
173
177
|
"outfit-lingerie": { label: "内衣套装", description: "成套内衣" },
|
|
@@ -187,6 +191,7 @@ const map: LocaleCatalogMap = {
|
|
|
187
191
|
"outfit-pirate": { label: "海盗装", description: "海盗服:三角帽、腰带、荷叶边衬衫、长靴" },
|
|
188
192
|
"outfit-fairy": { label: "仙女装", description: "奇幻仙女:轻纱翅膀、花环、空灵长裙" },
|
|
189
193
|
"outfit-mermaid": { label: "美人鱼装", description: "奇幻美人鱼:鱼鳞鱼尾 / 半裙、贝壳上衣" },
|
|
194
|
+
"outfit-pharaoh": { label: "法老盛装", description: "古埃及王室:乌塞克项圈、胸饰、百褶围裙" },
|
|
190
195
|
|
|
191
196
|
// -------------------- Top --------------------
|
|
192
197
|
"top-tshirt": { label: "T 恤", description: "纯色圆领 T 恤" },
|
|
@@ -299,6 +304,8 @@ const map: LocaleCatalogMap = {
|
|
|
299
304
|
"state-tucked-in": { label: "塞进腰间", description: "上衣塞进下装" },
|
|
300
305
|
"state-half-tucked": { label: "半塞", description: "前面塞进、后面散开" },
|
|
301
306
|
"state-off-shoulder": { label: "一字肩", description: "滑落一边肩膀" },
|
|
307
|
+
"state-halter-neck": { label: "挂脖式", description: "肩带系于颈后" },
|
|
308
|
+
"state-plunging-neck": { label: "深V领口", description: "深邃的V形领口" },
|
|
302
309
|
"state-unbuttoned": { label: "敞开", description: "敞开 / 不扣扣子" },
|
|
303
310
|
"state-rolled-sleeves":{ label: "卷起袖子", description: "袖子卷至前臂" },
|
|
304
311
|
"state-layered": { label: "叠搭", description: "多层叠搭" },
|
package/src/index.ts
CHANGED
package/src/llm-models.ts
CHANGED
|
@@ -327,8 +327,29 @@ export function getLlmModalityCaps(modelId: string | undefined): { image: boolea
|
|
|
327
327
|
return LLM_MODALITY_CAPS[modelId] ?? { image: true, video: false, audio: false }
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Dash-form aliases resolve to their canonical dot-form ids. Several wire
|
|
332
|
+
* contracts carry dash forms (`PIPELINE_PINNABLE_SCRIPT_LLMS`, provider slugs,
|
|
333
|
+
* configs persisted before the id scheme settled), while `LLM_MODELS` keys the
|
|
334
|
+
* canonical `major.minor` form — an exact-only lookup makes every such caller
|
|
335
|
+
* throw "Unknown LLM model" at run time. Normalizing here (instead of editing
|
|
336
|
+
* the enums) keeps stored configs and published-package consumers valid.
|
|
337
|
+
*/
|
|
338
|
+
function dashAliasToCanonical(id: string): string {
|
|
339
|
+
return id.replace(/-(\d+)-(\d+)$/, "-$1.$2")
|
|
340
|
+
}
|
|
341
|
+
|
|
330
342
|
export function getLlmModel(id: string): LlmModelDef | undefined {
|
|
331
|
-
|
|
343
|
+
const exact = LLM_MODELS.find((m) => m.id === id)
|
|
344
|
+
if (exact) return exact
|
|
345
|
+
const canonical = dashAliasToCanonical(id)
|
|
346
|
+
if (canonical !== id) {
|
|
347
|
+
const aliased = LLM_MODELS.find((m) => m.id === canonical)
|
|
348
|
+
if (aliased) return aliased
|
|
349
|
+
}
|
|
350
|
+
// Last resort: provider slugs double as historical aliases (e.g. the
|
|
351
|
+
// dated Anthropic slugs) — accept any model whose slug matches exactly.
|
|
352
|
+
return LLM_MODELS.find((m) => m.kieSlugOrModel === id || m.directFallbackModel === id)
|
|
332
353
|
}
|
|
333
354
|
|
|
334
355
|
export function getLlmTier(id: string): LlmTier {
|
|
@@ -57,6 +57,26 @@ export const PARAMETER_NODE_TYPES: ReadonlySet<string> = new Set([
|
|
|
57
57
|
"voice-delivery",
|
|
58
58
|
])
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Parameter types that intentionally produce NO prompt hint from
|
|
62
|
+
* `getParameterPromptHint` (in `@nodaro/prompts`). They carry pure runtime
|
|
63
|
+
* parameters — counts, durations, aspect ratios, legacy motion intensity —
|
|
64
|
+
* consumed by the executor directly, never appended to a downstream prompt.
|
|
65
|
+
*
|
|
66
|
+
* Consumers that treat "parameter node" as "text producer" (the `{Label}`
|
|
67
|
+
* auto-fill in `main-text-handle.ts`, ref-map builders) must exclude these:
|
|
68
|
+
* their extracted output is undefined, so an auto-filled `{Label}` would stay
|
|
69
|
+
* in the outgoing prompt as literal brace text. Guarded by
|
|
70
|
+
* `parameter-registry-sync.test.ts` (each member really returns "") and
|
|
71
|
+
* `main-text-handle.test.ts` (members are not text-producing).
|
|
72
|
+
*/
|
|
73
|
+
export const HINT_EXEMPT_PARAMETER_TYPES: ReadonlySet<string> = new Set([
|
|
74
|
+
"motion",
|
|
75
|
+
"scene-count",
|
|
76
|
+
"duration",
|
|
77
|
+
"aspect-ratio",
|
|
78
|
+
])
|
|
79
|
+
|
|
60
80
|
export function getParameterValue(
|
|
61
81
|
data: Record<string, unknown>,
|
|
62
82
|
nodeType: string,
|