@nodaro/prompts 1.46.0 → 1.48.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/dist/{catalog-packs-C9CXEWfl.d.cts → catalog-packs-BDsrv8St.d.cts} +1 -1
- package/dist/{catalog-packs-D7NJpo4k.d.ts → catalog-packs-CAK42voB.d.ts} +1 -1
- package/dist/{chunk-SMKIVT7P.js → chunk-36XMRVY4.js} +4 -4
- package/dist/{chunk-SMKIVT7P.js.map → chunk-36XMRVY4.js.map} +1 -1
- package/dist/{chunk-JHEZJKTX.cjs → chunk-54BYDWAM.cjs} +62 -52
- package/dist/chunk-54BYDWAM.cjs.map +1 -0
- package/dist/{chunk-IKHRZ5UQ.js → chunk-BTV2I7EN.js} +3 -3
- package/dist/{chunk-IKHRZ5UQ.js.map → chunk-BTV2I7EN.js.map} +1 -1
- package/dist/{chunk-57PTYJJX.js → chunk-CMEUYFBZ.js} +13 -13
- package/dist/chunk-CMEUYFBZ.js.map +1 -0
- package/dist/{chunk-2OIKQ4WB.js → chunk-GZVCBSFG.js} +5 -5
- package/dist/{chunk-2OIKQ4WB.js.map → chunk-GZVCBSFG.js.map} +1 -1
- package/dist/{chunk-FCTK7RGO.cjs → chunk-IMQB7GIK.cjs} +42 -39
- package/dist/chunk-IMQB7GIK.cjs.map +1 -0
- package/dist/{chunk-2HJJBXGA.js → chunk-JHRVNWBS.js} +6 -6
- package/dist/{chunk-2HJJBXGA.js.map → chunk-JHRVNWBS.js.map} +1 -1
- package/dist/{chunk-OSKABA64.cjs → chunk-JV2WSMAA.cjs} +8 -8
- package/dist/{chunk-OSKABA64.cjs.map → chunk-JV2WSMAA.cjs.map} +1 -1
- package/dist/{chunk-VAK4RUNU.cjs → chunk-KNAKOSKV.cjs} +13 -13
- package/dist/{chunk-VAK4RUNU.cjs.map → chunk-KNAKOSKV.cjs.map} +1 -1
- package/dist/{chunk-TXHFL725.js → chunk-LD47QOKS.js} +62 -53
- package/dist/chunk-LD47QOKS.js.map +1 -0
- package/dist/{chunk-QKD2KUZW.cjs → chunk-MGK6SFTV.cjs} +20 -6
- package/dist/chunk-MGK6SFTV.cjs.map +1 -0
- package/dist/{chunk-YCCQXX3U.cjs → chunk-MYVJVOPB.cjs} +39 -39
- package/dist/{chunk-YCCQXX3U.cjs.map → chunk-MYVJVOPB.cjs.map} +1 -1
- package/dist/{chunk-PHR4UETI.cjs → chunk-PJFX3MFI.cjs} +18 -18
- package/dist/{chunk-PHR4UETI.cjs.map → chunk-PJFX3MFI.cjs.map} +1 -1
- package/dist/{chunk-PUWJ2ZBG.js → chunk-RRHU6MD5.js} +20 -6
- package/dist/chunk-RRHU6MD5.js.map +1 -0
- package/dist/{chunk-NN4FL7SB.js → chunk-XBRW75LM.js} +4 -4
- package/dist/{chunk-NN4FL7SB.js.map → chunk-XBRW75LM.js.map} +1 -1
- package/dist/{chunk-C4FDHCEZ.cjs → chunk-XGNUOU4F.cjs} +125 -125
- package/dist/{chunk-C4FDHCEZ.cjs.map → chunk-XGNUOU4F.cjs.map} +1 -1
- package/dist/{chunk-CPKYIVWP.js → chunk-YXJSPQC6.js} +12 -9
- package/dist/chunk-YXJSPQC6.js.map +1 -0
- package/dist/{chunk-OY7XOPDG.cjs → chunk-Z755PH3K.cjs} +57 -57
- package/dist/chunk-Z755PH3K.cjs.map +1 -0
- package/dist/entries/assembly.cjs +28 -28
- package/dist/entries/assembly.d.cts +1 -2
- package/dist/entries/assembly.d.ts +1 -2
- package/dist/entries/assembly.js +5 -5
- package/dist/entries/catalog-packs.d.cts +3 -3
- package/dist/entries/catalog-packs.d.ts +3 -3
- package/dist/entries/person.d.cts +2 -2
- package/dist/entries/person.d.ts +2 -2
- package/dist/entries/picker-catalogs.cjs +56 -56
- package/dist/entries/picker-catalogs.d.cts +26 -4
- package/dist/entries/picker-catalogs.d.ts +26 -4
- package/dist/entries/picker-catalogs.js +4 -4
- package/dist/entries/pickers.cjs +377 -373
- package/dist/entries/pickers.d.cts +473 -2
- package/dist/entries/pickers.d.ts +473 -2
- package/dist/entries/pickers.js +2 -2
- package/dist/entries/presets.cjs +35 -35
- package/dist/entries/presets.js +1 -1
- package/dist/entries/prompt-builder.cjs +75 -75
- package/dist/entries/prompt-builder.d.cts +2 -3
- package/dist/entries/prompt-builder.d.ts +2 -3
- package/dist/entries/prompt-builder.js +4 -4
- package/dist/index.cjs +564 -560
- package/dist/index.d.cts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +9 -9
- package/dist/{picker-catalogs-C3utGMRB.d.cts → picker-catalogs-BiRCs_5G.d.cts} +8 -0
- package/dist/{picker-catalogs-BM8IphF1.d.ts → picker-catalogs-CX8pHi8q.d.ts} +8 -0
- package/dist/{subject-registry-DFiGx49v.d.ts → subject-registry-Cf802LQ5.d.ts} +8 -4
- package/dist/{subject-registry-CQi_CZfJ.d.cts → subject-registry-D2uMBVpP.d.cts} +8 -4
- package/package.json +2 -2
- package/src/__tests__/assemble-video-input.test.ts +13 -11
- package/src/__tests__/direction-registry.test.ts +5 -5
- package/src/__tests__/factory-presets.test.ts +26 -2
- package/src/__tests__/image-unwired-reference-tokens.test.ts +3 -2
- package/src/__tests__/prompt-style-section.test.ts +2 -2
- package/src/__tests__/style-video-wording.test.ts +258 -0
- package/src/catalog-overlay.ts +15 -1
- package/src/direction-registry.ts +25 -7
- package/src/factory-presets/generate-image.ts +18 -4
- package/src/parameter-prompt-hint.ts +23 -7
- package/src/picker-catalogs.ts +11 -0
- package/src/style.ts +78 -49
- package/dist/chunk-57PTYJJX.js.map +0 -1
- package/dist/chunk-CPKYIVWP.js.map +0 -1
- package/dist/chunk-FCTK7RGO.cjs.map +0 -1
- package/dist/chunk-JHEZJKTX.cjs.map +0 -1
- package/dist/chunk-OY7XOPDG.cjs.map +0 -1
- package/dist/chunk-PUWJ2ZBG.js.map +0 -1
- package/dist/chunk-QKD2KUZW.cjs.map +0 -1
- package/dist/chunk-TXHFL725.js.map +0 -1
- package/dist/transitions-BLFfAJUH.d.cts +0 -450
- package/dist/transitions-BgwWM37i.d.ts +0 -450
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { renderTransitionBases, buildMoodHints, getFramingTerm, getFramingPromptHint, getLightingTerm, getLightingPromptHint, getExposureTerm, getExposurePromptHint, getTemporalTerm, getTemporalPromptHint, getCameraMotionTerm, getCameraMotionPromptHint, getPoseTerm, getPosePromptHint, getCompositionEffectTerm, getCompositionEffectPromptHint, getCameraFormatTerm, getCameraFormatPromptHint, getLensTerm, getLensPromptHint, getColorLookTerm, getColorLookPromptHint, buildAtmosphereHints, buildPostProcessHints, getStyleTerm, getStylePromptHint, buildAestheticHints, getPhotoGenreTerm, getPhotoGenrePromptHint, buildPhotographerHints, getRenderQualityTerm, getRenderQualityPromptHint, getSettingTerm, getSettingPromptHint, getEraTerm, getEraPromptHint, getBackdropTerm, getBackdropPromptHint, buildActionFxHints, getLoopSubjectTerm, getLoopSubjectPromptHint, composedHas, composedOption } from './chunk-
|
|
1
|
+
import { renderTransitionBases, buildMoodHints, getFramingTerm, getFramingPromptHint, getLightingTerm, getLightingPromptHint, getExposureTerm, getExposurePromptHint, getTemporalTerm, getTemporalPromptHint, getCameraMotionTerm, getCameraMotionPromptHint, getPoseTerm, getPosePromptHint, getCompositionEffectTerm, getCompositionEffectPromptHint, getCameraFormatTerm, getCameraFormatPromptHint, getLensTerm, getLensPromptHint, getColorLookTerm, getColorLookPromptHint, buildAtmosphereHints, buildPostProcessHints, getStyleTerm, getStyleVideoPromptHint, getStylePromptHint, buildAestheticHints, getPhotoGenreTerm, getPhotoGenrePromptHint, buildPhotographerHints, getRenderQualityTerm, getRenderQualityPromptHint, getSettingTerm, getSettingPromptHint, getEraTerm, getEraPromptHint, getBackdropTerm, getBackdropPromptHint, buildActionFxHints, getLoopSubjectTerm, getLoopSubjectPromptHint, composedHas, composedOption } from './chunk-LD47QOKS.js';
|
|
2
2
|
import { deriveTerm } from './chunk-XAMHEW76.js';
|
|
3
3
|
import { getAnimalPromptHint, getAnimalTerm, getVehicle, getWeapon, getFurniture } from '@nodaro/shared/catalogs';
|
|
4
4
|
|
|
@@ -218,6 +218,7 @@ var viaStringBuilder = (build) => (ids, mode) => {
|
|
|
218
218
|
const s = build(ids.length === 1 ? ids[0] : [...ids], mode);
|
|
219
219
|
return s.length > 0 ? [s] : [];
|
|
220
220
|
};
|
|
221
|
+
var perIdBySurface = (image, video, compact) => (ids, mode, surface) => perId(surface === "video" ? video : image, compact)(ids, mode);
|
|
221
222
|
var viaMood = (ids, mode) => buildMoodHints({ mood: ids.length === 1 ? ids[0] : [...ids] }, mode).filter(
|
|
222
223
|
(s) => s.length > 0
|
|
223
224
|
);
|
|
@@ -252,7 +253,7 @@ var DIRECTION_FIELDS = [
|
|
|
252
253
|
{ key: "atmosphere", surface: "both", family: "look", maxPicks: 2, render: viaListBuilder(buildAtmosphereHints) },
|
|
253
254
|
{ key: "postProcess", surface: "image", family: "look", maxPicks: 2, render: viaListBuilder(buildPostProcessHints) },
|
|
254
255
|
// Style.
|
|
255
|
-
{ key: "style", surface: "both", family: "look", styleGroup: "film", maxPicks: 1, userRef: "moodboard", render:
|
|
256
|
+
{ key: "style", surface: "both", family: "look", styleGroup: "film", maxPicks: 1, userRef: "moodboard", render: perIdBySurface(getStylePromptHint, getStyleVideoPromptHint, getStyleTerm) },
|
|
256
257
|
{ key: "mood", surface: "both", family: "look", maxPicks: 2, render: viaMood },
|
|
257
258
|
{ key: "aesthetic", surface: "both", family: "look", maxPicks: 2, render: viaStringBuilder(buildAestheticHints) },
|
|
258
259
|
{ key: "photoGenre", surface: "image", family: "look", maxPicks: 1, render: perId(getPhotoGenrePromptHint, getPhotoGenreTerm) },
|
|
@@ -268,7 +269,9 @@ var DIRECTION_FIELDS = [
|
|
|
268
269
|
{ key: "temporalFreeze", surface: "video", family: "motion", maxPicks: 1, render: temporal },
|
|
269
270
|
{ key: "temporalDirection", surface: "video", family: "motion", maxPicks: 1, render: temporal },
|
|
270
271
|
{ key: "temporalShutter", surface: "video", family: "motion", maxPicks: 1, render: temporal },
|
|
271
|
-
|
|
272
|
+
// Wrapped: `renderTransitionBases`' third parameter is a row's option values,
|
|
273
|
+
// not the surface `render` is handed.
|
|
274
|
+
{ key: "transition", surface: "video", family: "motion", maxPicks: 2, render: (ids, mode) => renderTransitionBases(ids, mode) },
|
|
272
275
|
{ key: "loopSubject", surface: "video", family: "motion", maxPicks: 1, render: perId(getLoopSubjectPromptHint, getLoopSubjectTerm) },
|
|
273
276
|
// ── LEGACY BLOCK — see the table doc above. Placed LAST, in today's exact
|
|
274
277
|
// `composePromptText` order, so every pre-registry caller is byte-identical.
|
|
@@ -310,13 +313,13 @@ function normalizeDirectionIds(value, maxPicks) {
|
|
|
310
313
|
}
|
|
311
314
|
return ids.slice(0, maxPicks);
|
|
312
315
|
}
|
|
313
|
-
function renderRow(spec, ids, mode, refs) {
|
|
316
|
+
function renderRow(spec, ids, mode, surface, refs) {
|
|
314
317
|
if (spec.userRef === void 0 || !ids.some((id) => parseUserDirectionRef(id) !== null)) {
|
|
315
|
-
return spec.render(ids, mode);
|
|
318
|
+
return spec.render(ids, mode, surface);
|
|
316
319
|
}
|
|
317
320
|
return ids.flatMap((id) => {
|
|
318
321
|
const ref = parseUserDirectionRef(id);
|
|
319
|
-
if (ref === null) return spec.render([id], mode);
|
|
322
|
+
if (ref === null) return spec.render([id], mode, surface);
|
|
320
323
|
const clause = ref.kind === spec.userRef ? refs?.get(id) : void 0;
|
|
321
324
|
return clause ? [clause] : [];
|
|
322
325
|
});
|
|
@@ -336,7 +339,7 @@ function renderDirectionHintClauses(direction, opts) {
|
|
|
336
339
|
spec.maxPicks
|
|
337
340
|
);
|
|
338
341
|
if (ids.length === 0) continue;
|
|
339
|
-
for (const hint of renderRow(spec, ids, modeForFamily(mode, spec.family), opts.refs)) {
|
|
342
|
+
for (const hint of renderRow(spec, ids, modeForFamily(mode, spec.family), opts.surface, opts.refs)) {
|
|
340
343
|
if (hint.length > 0 && !seen.has(hint)) {
|
|
341
344
|
seen.add(hint);
|
|
342
345
|
out.push({
|
|
@@ -384,5 +387,5 @@ function curatedFurnitureText(id) {
|
|
|
384
387
|
}
|
|
385
388
|
|
|
386
389
|
export { DIRECTION_ARRAY_CEILING, DIRECTION_FIELDS, DIRECTION_ID_MAX_CHARS, DIRECTION_KEYS, FILM_STYLE_KEYS, IMAGE_HINT_MODE_DEFAULT, USER_DIRECTION_REF_KINDS, VIDEO_HINT_MODE_DEFAULT, curatedAnimalPromptHint, curatedAnimalTerm, curatedFurnitureText, curatedVehicleText, curatedWeaponText, directionFieldsForSurface, directionKeyForUserRef, modeForFamily, nearestColorName, parseUserDirectionRef, renderDirectionHintClauses, renderDirectionHints, renderMoodboardClause, renderPaletteClause, styleReferenceDescription, userDirectionRefValue, userRefKindOfDirectionKey };
|
|
387
|
-
//# sourceMappingURL=chunk-
|
|
388
|
-
//# sourceMappingURL=chunk-
|
|
390
|
+
//# sourceMappingURL=chunk-YXJSPQC6.js.map
|
|
391
|
+
//# sourceMappingURL=chunk-YXJSPQC6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/color-names.ts","../src/user-direction-refs.ts","../src/direction-registry.ts","../src/shared-catalog-overlay.ts"],"names":["HEX_RE"],"mappings":";;;;;AAaA,IAAM,KAAA,GAA6D;AAAA;AAAA,EAEjE,CAAC,SAAS,SAAS,CAAA;AAAA,EACnB,CAAC,YAAY,SAAS,CAAA;AAAA,EACtB,CAAC,aAAa,SAAS,CAAA;AAAA,EACvB,CAAC,cAAc,SAAS,CAAA;AAAA,EACxB,CAAC,QAAQ,SAAS,CAAA;AAAA,EAClB,CAAC,aAAa,SAAS,CAAA;AAAA,EACvB,CAAC,UAAU,SAAS,CAAA;AAAA,EACpB,CAAC,cAAc,SAAS,CAAA;AAAA,EACxB,CAAC,aAAa,SAAS,CAAA;AAAA,EACvB,CAAC,SAAS,SAAS,CAAA;AAAA,EACnB,CAAC,SAAS,SAAS,CAAA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AAA,EAAO,OAAO,EAAE,IAAA,EAAM,EAAA,EAAI,MAAM,EAAA,EAAG;AACxC,EAAA,OAAO,EAAE,MAAM,SAAA,CAAU,KAAK,GAAG,IAAA,EAAM,SAAA,CAAU,KAAK,CAAA,EAAE;AAC1D;AAqBA,SAAS,iBAAiB,KAAA,EAA2C;AACnE,EAAA,OAAQ,KAAA,CAA4B,IAAA,IAAQ,UAAA,CAAW,KAAA,CAAM,KAAK,CAAA;AACpE;AAEO,SAAS,mBAAmB,EAAA,EAAY;AAC7C,EAAA,OAAO,iBAAiB,UAAA,EAAY,EAAA,EAAI,UAAA,CAAW,EAAE,GAAG,CAAC,CAAA,KAAM,CAAA,YAAA,EAAe,CAAA,CAAE,MAAM,WAAA,EAAa,KAAK,CAAA,CAAE,WAAW,IAAI,gBAAgB,CAAA;AAC3I;AACO,SAAS,kBAAkB,EAAA,EAAY;AAC5C,EAAA,OAAO,iBAAiB,SAAA,EAAW,EAAA,EAAI,SAAA,CAAU,EAAE,GAAG,CAAC,CAAA,KAAM,CAAA,OAAA,EAAU,CAAA,CAAE,MAAM,WAAA,EAAa,KAAK,CAAA,CAAE,WAAW,IAAI,gBAAgB,CAAA;AACpI;AACO,SAAS,qBAAqB,EAAA,EAAY;AAC/C,EAAA,OAAO,iBAAiB,WAAA,EAAa,EAAA,EAAI,YAAA,CAAa,EAAE,GAAG,CAAC,CAAA,KAAM,CAAA,YAAA,EAAe,CAAA,CAAE,MAAM,WAAA,EAAa,KAAK,CAAA,CAAE,WAAW,IAAI,gBAAgB,CAAA;AAC9I","file":"chunk-YXJSPQC6.js","sourcesContent":["/**\n * Plain colour names for a hex value — what a saved colour palette reads as\n * in a prompt (\"deep teal #0F4C5C\"). A model follows a named colour more\n * reliably than a bare hex code, and the hex keeps the exact value.\n *\n * NEAREST NAME, NOT A CLASSIFIER: a fixed table of everyday colour names, each\n * with a representative value, and the one closest to the input in CIE Lab\n * (ΔE 1976 — Euclidean distance in Lab, which tracks perceived difference far\n * better than RGB). Deterministic, dependency-free, and a name is always one a\n * person would say. Ties go to the earlier row.\n */\n\n/** Everyday colour names and a representative sRGB value for each. */\nconst NAMED: ReadonlyArray<readonly [name: string, hex: string]> = [\n // Neutrals\n [\"black\", \"#000000\"],\n [\"charcoal\", \"#36454F\"],\n [\"dark gray\", \"#555555\"],\n [\"slate gray\", \"#708090\"],\n [\"gray\", \"#808080\"],\n [\"warm gray\", \"#9A9088\"],\n [\"silver\", \"#C0C0C0\"],\n [\"light gray\", \"#D3D3D3\"],\n [\"off-white\", \"#F2F0EB\"],\n [\"white\", \"#FFFFFF\"],\n [\"ivory\", \"#FFFFF0\"],\n [\"cream\", \"#FFFDD0\"],\n [\"eggshell\", \"#F0EAD6\"],\n [\"linen\", \"#FAF0E6\"],\n [\"champagne\", \"#F7E7CE\"],\n [\"wheat\", \"#F5DEB3\"],\n // Earth tones and browns\n [\"sand\", \"#C2B280\"],\n [\"tan\", \"#D2B48C\"],\n [\"khaki\", \"#C3B091\"],\n [\"taupe\", \"#8B8589\"],\n [\"camel\", \"#C19A6B\"],\n [\"caramel\", \"#C68E17\"],\n [\"brown\", \"#964B00\"],\n [\"chocolate\", \"#7B3F00\"],\n [\"coffee\", \"#6F4E37\"],\n [\"espresso\", \"#4E312D\"],\n [\"walnut\", \"#773F1A\"],\n [\"chestnut\", \"#954535\"],\n [\"mahogany\", \"#C04000\"],\n [\"rust\", \"#B7410E\"],\n [\"terracotta\", \"#E2725B\"],\n [\"copper\", \"#B87333\"],\n [\"bronze\", \"#CD7F32\"],\n [\"ochre\", \"#CC7722\"],\n // Oranges\n [\"burnt orange\", \"#CC5500\"],\n [\"orange\", \"#FFA500\"],\n [\"tangerine\", \"#F28500\"],\n [\"apricot\", \"#FBCEB1\"],\n [\"peach\", \"#FFCBA4\"],\n [\"coral\", \"#FF7F50\"],\n [\"salmon\", \"#FA8072\"],\n // Reds\n [\"red\", \"#FF0000\"],\n [\"scarlet\", \"#FF2400\"],\n [\"crimson\", \"#DC143C\"],\n [\"cherry red\", \"#D2042D\"],\n [\"brick red\", \"#CB4154\"],\n [\"burgundy\", \"#800020\"],\n [\"maroon\", \"#800000\"],\n [\"wine red\", \"#722F37\"],\n [\"oxblood\", \"#4A0000\"],\n // Pinks\n [\"raspberry\", \"#E30B5C\"],\n [\"rose\", \"#FF007F\"],\n [\"hot pink\", \"#FF69B4\"],\n [\"pink\", \"#FFC0CB\"],\n [\"blush pink\", \"#E8B4B8\"],\n [\"dusty rose\", \"#C08081\"],\n [\"mauve\", \"#B784A7\"],\n // Purples\n [\"magenta\", \"#FF00FF\"],\n [\"orchid\", \"#DA70D6\"],\n [\"plum\", \"#8E4585\"],\n [\"eggplant\", \"#614051\"],\n [\"dusty purple\", \"#6E5A7E\"],\n [\"lilac\", \"#C8A2C8\"],\n [\"lavender\", \"#B57EDC\"],\n [\"pale lavender\", \"#E6E6FA\"],\n [\"amethyst\", \"#9966CC\"],\n [\"violet\", \"#8F00FF\"],\n [\"purple\", \"#800080\"],\n [\"indigo\", \"#4B0082\"],\n // Blues\n [\"navy blue\", \"#000080\"],\n [\"midnight blue\", \"#191970\"],\n [\"prussian blue\", \"#003153\"],\n [\"dusky blue\", \"#4B5E7D\"],\n [\"royal blue\", \"#4169E1\"],\n [\"cobalt blue\", \"#0047AB\"],\n [\"blue\", \"#0000FF\"],\n [\"cornflower blue\", \"#6495ED\"],\n [\"denim blue\", \"#1560BD\"],\n [\"steel blue\", \"#4682B4\"],\n [\"slate blue\", \"#6A5ACD\"],\n [\"periwinkle\", \"#CCCCFF\"],\n [\"sky blue\", \"#87CEEB\"],\n [\"baby blue\", \"#89CFF0\"],\n [\"powder blue\", \"#B0E0E6\"],\n [\"ice blue\", \"#D6ECEF\"],\n [\"azure\", \"#007FFF\"],\n [\"cerulean\", \"#007BA7\"],\n [\"petrol blue\", \"#005F6A\"],\n // Cyans and teals\n [\"cyan\", \"#00FFFF\"],\n [\"turquoise\", \"#40E0D0\"],\n [\"aquamarine\", \"#7FFFD4\"],\n [\"teal\", \"#008080\"],\n [\"dark teal\", \"#014D4E\"],\n [\"dark slate gray\", \"#2F4F4F\"],\n // Greens\n [\"sea green\", \"#2E8B57\"],\n [\"emerald green\", \"#50C878\"],\n [\"jade green\", \"#00A86B\"],\n [\"mint green\", \"#98FF98\"],\n [\"seafoam green\", \"#93E9BE\"],\n [\"sage green\", \"#9CAF88\"],\n [\"olive green\", \"#708238\"],\n [\"olive\", \"#808000\"],\n [\"moss green\", \"#8A9A5B\"],\n [\"forest green\", \"#228B22\"],\n [\"hunter green\", \"#355E3B\"],\n [\"bottle green\", \"#006A4E\"],\n [\"dark green\", \"#013220\"],\n [\"green\", \"#008000\"],\n [\"kelly green\", \"#4CBB17\"],\n [\"lime green\", \"#32CD32\"],\n [\"chartreuse\", \"#7FFF00\"],\n [\"pistachio\", \"#93C572\"],\n // Yellows and golds\n [\"yellow\", \"#FFFF00\"],\n [\"lemon yellow\", \"#FFF44F\"],\n [\"pale yellow\", \"#FDFD96\"],\n [\"canary yellow\", \"#FFEF00\"],\n [\"mustard yellow\", \"#E1AD01\"],\n [\"gold\", \"#FFD700\"],\n [\"amber\", \"#FFBF00\"],\n [\"honey\", \"#F0A830\"],\n [\"saffron\", \"#F4C430\"],\n]\n\nconst HEX_RE = /^#[0-9a-f]{6}$/i\n\ntype Lab = readonly [l: number, a: number, b: number]\n\nfunction channel(v: number): number {\n const c = v / 255\n return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4\n}\n\nfunction labPivot(t: number): number {\n return t > 216 / 24389 ? Math.cbrt(t) : (24389 / 27 * t + 16) / 116\n}\n\n/** sRGB hex → CIE Lab (D65). Only called with a value that passed `HEX_RE`. */\nfunction toLab(hex: string): Lab {\n const r = channel(parseInt(hex.slice(1, 3), 16))\n const g = channel(parseInt(hex.slice(3, 5), 16))\n const b = channel(parseInt(hex.slice(5, 7), 16))\n const x = labPivot((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / 0.95047)\n const y = labPivot(0.2126729 * r + 0.7151522 * g + 0.072175 * b)\n const z = labPivot((0.0193339 * r + 0.119192 * g + 0.9503041 * b) / 1.08883)\n return [116 * y - 16, 500 * (x - y), 200 * (y - z)]\n}\n\nlet namedLab: ReadonlyArray<readonly [string, Lab]> | null = null\n\n/**\n * The everyday name nearest to `hex` (`#RRGGBB`, any case), or `\"\"` when the\n * value is not a `#RRGGBB` colour.\n */\nexport function nearestColorName(hex: string): string {\n if (!HEX_RE.test(hex)) return \"\"\n namedLab ??= NAMED.map(([name, value]) => [name, toLab(value)] as const)\n const [l, a, b] = toLab(hex)\n let best = \"\"\n let bestDistance = Infinity\n for (const [name, [nl, na, nb]] of namedLab) {\n const d = (l - nl) ** 2 + (a - na) ** 2 + (b - nb) ** 2\n if (d < bestDistance) {\n bestDistance = d\n best = name\n }\n }\n return best\n}\n","/**\n * USER-OWNED DIRECTION REFERENCES — a `direction` value that names one of the\n * caller's own saved resources instead of a catalog id.\n *\n * Two rows of the direction registry take one (their `userRef` column):\n * - `colorLook: \"palette:<uuid>\"` — a saved colour palette;\n * - `style: \"moodboard:<uuid>\"` — a saved moodboard.\n * The prefix namespaces them, so they never collide with a catalog id\n * (catalog ids are slugs; none carries a colon).\n *\n * The wire carries the id, never the resolved text, so a re-run resolves it\n * again and an edited palette reaches the next run. RESOLVING is a database\n * read, so it happens in the platform before the (pure, synchronous) fold:\n * the caller hands the fold a map of value → rendered clause\n * (`renderDirectionHintClauses`' `refs`, `assembleImageInput`'s\n * `directionRefs`), and a moodboard's images as fill-only style references\n * (`assembleImageInput`'s `styleReferences`). This module holds what is pure:\n * the grammar and the WORDING of those clauses and reference lines.\n */\nimport { nearestColorName } from \"./color-names.js\"\n\n/** The kinds of saved resource a direction value can name. */\nexport type UserDirectionRefKind = \"palette\" | \"moodboard\"\n\nexport const USER_DIRECTION_REF_KINDS: ReadonlyArray<UserDirectionRefKind> = [\"palette\", \"moodboard\"]\n\n/** A parsed user-owned reference. `wellFormed` = its id is a uuid. */\nexport interface UserDirectionRef {\n readonly kind: UserDirectionRefKind\n readonly id: string\n readonly wellFormed: boolean\n}\n\nconst UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i\n\n/**\n * Read one direction value. `null` when it is not a user-owned reference at\n * all (a catalog id, an empty string, anything that is not a string). A value\n * with a known prefix is ALWAYS a reference — `wellFormed: false` when what\n * follows is not a uuid, so a caller can refuse it rather than treat it as an\n * unknown catalog id and skip it in silence.\n */\nexport function parseUserDirectionRef(value: unknown): UserDirectionRef | null {\n if (typeof value !== \"string\") return null\n for (const kind of USER_DIRECTION_REF_KINDS) {\n const prefix = `${kind}:`\n if (value.startsWith(prefix)) {\n const id = value.slice(prefix.length)\n return { kind, id, wellFormed: UUID_RE.test(id) }\n }\n }\n return null\n}\n\n/** The wire value for a saved resource: `palette:<id>` / `moodboard:<id>`. */\nexport function userDirectionRefValue(kind: UserDirectionRefKind, id: string): string {\n return `${kind}:${id}`\n}\n\n/** Collapse all whitespace (newlines included) to single spaces and trim. User\n * text never opens a line of its own inside the assembled prompt — a newline\n * there could start a fake `[style]:` section. */\nfunction oneLine(text: string | null | undefined): string {\n return (text ?? \"\").replace(/\\s+/g, \" \").trim()\n}\n\nconst HEX_RE = /^#[0-9a-f]{6}$/i\n\n/**\n * A saved palette as a look clause: every colour by its everyday name and its\n * exact hex, in the palette's order — `color palette: dark teal #0F4C5C,\n * saffron #E3B23C`. An entry that is not a `#RRGGBB` colour is skipped; no\n * valid colour renders nothing.\n */\nexport function renderPaletteClause(colors: ReadonlyArray<string>): string {\n const named = colors\n .filter((c) => HEX_RE.test(c))\n .map((c) => `${nearestColorName(c)} ${c.toUpperCase()}`)\n return named.length > 0 ? `color palette: ${named.join(\", \")}` : \"\"\n}\n\n/**\n * A saved moodboard's written description as its look clause: the user's own\n * words, on one line. No description renders nothing (the moodboard's images\n * still go along as style references).\n */\nexport function renderMoodboardClause(description: string | null | undefined): string {\n return oneLine(description)\n}\n\n/** One style reference image (a moodboard's image) handed to the assembler. */\nexport interface StyleReferenceInput {\n readonly url: string\n /** What the image is for — rides its reference line. */\n readonly caption?: string\n}\n\n/**\n * The line a style reference carries in the assembled prompt (its\n * `description` as a reference). The first one says what to take from a style\n * reference and what not to; the rest stay short, so a full moodboard does not\n * bury the prompt. A caption rides along on one line.\n */\nexport function styleReferenceDescription(index: number, caption?: string): string {\n const cap = oneLine(caption)\n const tail = cap ? ` (${cap})` : \"\"\n return index === 0\n ? `match the colors, light, texture and mood of this style reference${tail}, not its subject or layout`\n : `another style reference${tail}`\n}\n","/**\n * THE DIRECTION REGISTRY — the single, ordered table of every cinematic\n * dimension the flat `direction` channel carries, plus the one renderer that\n * folds it into prompt text.\n *\n * WHY IT EXISTS: before this module, five of the ~35 cinematic dimensions rode\n * the `direction` wire channel and every other dimension was folded into prompt\n * TEXT by the client. A production copied between clients therefore froze stale\n * catalog wording, and each client re-implemented the fold. The table below is\n * the platform-owned replacement: the wire carries ids, the platform renders\n * the clauses, and the fold ORDER is exported so a client preview cannot drift\n * from what the server actually emits.\n *\n * WIRE VOCABULARY: the keys are the platform's OWN node-data field names — the\n * ones `SINGLE_PICKER_WIRING[].valueField` and the four `*_FIELD_BY_CATEGORY`\n * maps already use (`shotSize`, `lightingStyle`, `isoValue`, `style`, `mood`,\n * `cameraMotion`, …). A Studio-emitted graph and a hand-built canvas node\n * therefore speak ONE vocabulary for one catalog, and every `build*Hints`\n * already consumes these names.\n *\n * IMPORT RULE (hard): this module imports only `get*PromptHint` / `get*Term` /\n * `build*Hints` FUNCTIONS — never a raw UPPERCASE catalog array.\n * `catalog-funnel-ratchet.test.ts` derives its watch set from\n * `picker-catalogs.ts`'s uppercase value imports and can only SHRINK, so a raw\n * array import here would be a new offender. Nothing here reads an environment\n * variable either (`content-free-contract.test.ts`) — verbosity and surface are\n * threaded parameters, never deployment state.\n *\n * DELIBERATELY EXCLUDED, so neither is filed as a gap:\n * - `characterFx` — a per-shot composer with catalog timing levers\n * (`composeCharacterFxHintFromConnections`) positioned at an in-prose effect\n * token, not a bare id. A single-id channel cannot carry it.\n * - Subject / Styling / prop dimensions (`animal`, `heldProp`, `material`,\n * Person, Styling) — a separate `subject` channel, deliberately out of scope\n * here. It now exists: `subject-registry.ts`, same table-driven shape, its\n * key set DISJOINT from this one (pinned by a test) so nothing folds twice.\n *\n * PACK BLINDNESS (parity, not a regression): `get*PromptHint` reads the frozen\n * base arrays, so ids added by a deployment-registered catalog pack resolve to\n * `\"\"` and contribute no clause. This is identical to the behavior of the five\n * keys that shipped before this table; routing through `getPickerCatalog` is a\n * deliberate non-goal.\n */\nimport type { PickerHintMode } from \"./term.js\"\nimport { getFramingPromptHint, getFramingTerm } from \"./framing.js\"\nimport { getLightingPromptHint, getLightingTerm } from \"./lighting.js\"\nimport { getLensPromptHint, getLensTerm } from \"./lens.js\"\nimport { getCameraFormatPromptHint, getCameraFormatTerm } from \"./camera-format.js\"\nimport { getCameraMotionPromptHint, getCameraMotionTerm } from \"./camera-motions.js\"\nimport { getPosePromptHint, getPoseTerm } from \"./pose.js\"\nimport {\n getCompositionEffectPromptHint,\n getCompositionEffectTerm,\n} from \"./composition-effects.js\"\nimport { getExposurePromptHint, getExposureTerm } from \"./exposure-settings.js\"\nimport { getColorLookPromptHint, getColorLookTerm } from \"./color-look.js\"\nimport { buildAtmosphereHints } from \"./atmosphere.js\"\nimport { buildPostProcessHints } from \"./post-process-effects.js\"\nimport { getStylePromptHint, getStyleTerm, getStyleVideoPromptHint } from \"./style.js\"\nimport { buildMoodHints } from \"./mood.js\"\nimport { buildAestheticHints } from \"./aesthetic.js\"\nimport { getPhotoGenrePromptHint, getPhotoGenreTerm } from \"./photo-genre.js\"\nimport { buildPhotographerHints } from \"./photographer.js\"\nimport { getRenderQualityPromptHint, getRenderQualityTerm } from \"./render-quality.js\"\nimport { getSettingPromptHint, getSettingTerm } from \"./setting.js\"\nimport { getEraPromptHint, getEraTerm } from \"./era.js\"\nimport { getBackdropPromptHint, getBackdropTerm } from \"./backdrop.js\"\nimport { buildActionFxHints } from \"./action-fx.js\"\nimport { getTemporalPromptHint, getTemporalTerm } from \"./temporal.js\"\nimport { renderTransitionBases } from \"./transitions.js\"\nimport { getLoopSubjectPromptHint, getLoopSubjectTerm } from \"./loop-subject.js\"\nimport { parseUserDirectionRef, type UserDirectionRefKind } from \"./user-direction-refs.js\"\n\n/** Which generation stages fold a dimension. */\nexport type DirectionSurface = \"image\" | \"video\" | \"both\"\n/**\n * Verbosity family — the video policy folds `motion` compact, `look` full.\n *\n * It is ALSO the body/section split (`prompt-style-section.ts`): `motion` stays\n * in the prompt body as shot prose, `look` moves to the `[style]` section. The\n * two meanings are deliberately the same column: camera motion is part of the\n * shot, not part of the look, on both axes, and a second column would let the\n * verbosity policy and the section boundary drift apart one row at a time.\n */\nexport type DirectionFamily = \"look\" | \"motion\"\n/**\n * Which `[style]` line a LOOK row renders on. `\"film\"` = the four dimensions\n * that describe the CAPTURE (stock, grade, style, era) plus the legacy camera\n * format key; every other look row falls to the scene line. Absent on `motion`\n * rows, which never reach the section at all.\n */\nexport type DirectionStyleGroup = \"film\"\n\nexport interface DirectionFieldSpec {\n /**\n * Wire key — also the `DirectionFields` property name and the canvas\n * node-data field name for the same catalog.\n */\n readonly key: string\n /**\n * Which generation stages fold this dimension. Filtering happens in the\n * RENDERER, never in the wire schema: an image-only key sent to\n * `/v1/generate-video` is accepted and simply contributes no hint.\n */\n readonly surface: DirectionSurface\n /** Verbosity family. The video policy folds `motion` compact, `look` full. */\n readonly family: DirectionFamily\n /**\n * `[style]`-section line for a `look` row. Omitted = the scene line. Meaningless\n * on a `motion` row (those stay in the body), which is why it is optional\n * rather than a required column with a null member.\n */\n readonly styleGroup?: DirectionStyleGroup\n /** Ids honored per dimension. Extras are SLICED at render, never a 400. */\n readonly maxPicks: number\n /**\n * The kind of the caller's OWN saved resource this row also takes, as\n * `<kind>:<uuid>` (`user-direction-refs.ts`) — a palette on `colorLook`, a\n * moodboard on `style`. Only single-pick rows carry one, so a pick budget can\n * never slice a reference away. The platform resolves the reference before\n * the fold and hands the rendered clause in as `refs`.\n */\n readonly userRef?: UserDirectionRefKind\n /**\n * Render selected ids in this catalog's own doctrine: per-id for independent\n * catalogs, ONE blended clause for Mood / Aesthetic / Photographer, the\n * catalog's own multi builder where it has one. `[]` when nothing resolves.\n *\n * `surface` is the stage being folded. Nearly every row ignores it (one\n * wording serves stills and video); a row whose catalog authors a video-only\n * wording (`style`, via `getStyleVideoPromptHint`) reads it. Absent reads as\n * `\"image\"`.\n */\n readonly render: (ids: readonly string[], mode: PickerHintMode, surface?: \"image\" | \"video\") => string[]\n}\n\n// ── Render adapters (module-private) ────────────────────────────────────────\n\n/**\n * Independent per-id emission — the default doctrine.\n *\n * Only ever passes NON-EMPTY strings (the normalizer drops empties), which is\n * what makes `getLoopSubjectPromptHint(id: string)`'s required-string signature\n * safe here alongside the `string | undefined | null` getters.\n */\nconst perId =\n (full: (id: string) => string, compact: (id: string) => string) =>\n (ids: readonly string[], mode: PickerHintMode): string[] => {\n const out: string[] = []\n for (const id of ids) {\n const frag = mode === \"compact\" ? compact(id) : full(id)\n if (frag.length > 0) out.push(frag)\n }\n return out\n }\n\n/** Catalogs whose own builder returns a LIST (atmosphere, post-process, action FX). */\nconst viaListBuilder =\n (build: (v: unknown, mode: PickerHintMode) => string[]) =>\n (ids: readonly string[], mode: PickerHintMode): string[] =>\n build(ids.length === 1 ? ids[0] : [...ids], mode).filter((s) => s.length > 0)\n\n/** Catalogs whose own builder returns ONE blended clause (aesthetic, photographer). */\nconst viaStringBuilder =\n (build: (v: unknown, mode: PickerHintMode) => string) =>\n (ids: readonly string[], mode: PickerHintMode): string[] => {\n const s = build(ids.length === 1 ? ids[0] : [...ids], mode)\n return s.length > 0 ? [s] : []\n }\n\n/**\n * Per-id emission whose FULL wording depends on the surface: the image getter\n * on a still, the video getter on video (which falls back to the image wording\n * for an id that authors none). The compact term is the same on both.\n */\nconst perIdBySurface =\n (image: (id: string) => string, video: (id: string) => string, compact: (id: string) => string) =>\n (ids: readonly string[], mode: PickerHintMode, surface?: \"image\" | \"video\"): string[] =>\n perId(surface === \"video\" ? video : image, compact)(ids, mode)\n\n/** Mood's builder takes a RECORD and returns a list — and blends multi picks. */\nconst viaMood = (ids: readonly string[], mode: PickerHintMode): string[] =>\n buildMoodHints({ mood: ids.length === 1 ? ids[0] : [...ids] }, mode).filter(\n (s) => s.length > 0,\n )\n\nconst framing = perId(getFramingPromptHint, getFramingTerm)\nconst lighting = perId(getLightingPromptHint, getLightingTerm)\nconst exposure = perId(getExposurePromptHint, getExposureTerm)\nconst temporal = perId(getTemporalPromptHint, getTemporalTerm)\n\n/**\n * THE TABLE. Declaration order IS fold order (`DIRECTION_KEYS`), pinned by\n * `__tests__/direction-registry.test.ts`.\n *\n * Group order: camera motion leads (matching the video hint order the canvas\n * and Studio both emit today), then composition → camera → exposure → light →\n * style → scene → motion, then the LEGACY BLOCK last.\n *\n * THE LEGACY BLOCK (the last five rows) is the pre-registry published\n * `DirectionFields`, placed LAST in today's exact `composePromptText` order so\n * every existing caller's fold is byte-identical. They are WHOLE-CATALOG keys —\n * `framingId` accepts ANY `FRAMINGS` id and `lightingId` ANY `LIGHTINGS` id —\n * so they are NOT aliases of `shotSize` / `lightingStyle`, and an alias table\n * would wrongly suppress a legal second selection. Overlap is handled instead\n * by the exact-string dedupe in `renderDirectionHints`.\n *\n * SECOND MEANING OF POSITION — SURVIVAL, NOT STRING POSITION: BOTH cap-aware\n * assemblers — `assembleImageInput` (stills) and `composeVideoPromptText`\n * (video) — shed hint clauses from the TAIL of this order when a provider's\n * prompt cap overflows, through the one shared arithmetic in\n * `hint-shedding.ts`. So a row's position is its survival order under the cap on\n * EVERY surface: reordering rows for one surface silently changes what the other\n * drops first, and the row a video-surface reorder would most likely touch\n * (`cameraMotion`) leads the fold. What position is NOT any more is the clause's\n * place in the assembled STRING: every `look` row is lifted out of the body into\n * the trailing `[style]` section (`prompt-style-section.ts`), so a look clause\n * reads after every motion clause however early it folds. That is a consequence\n * of reusing the fold order, not a ranking — this table stays a compatibility\n * order; anything that needs a real importance ranking should add an explicit\n * priority column rather than reorder these rows.\n *\n * WHERE THIS TABLE SITS IN THE COMBINED ORDER: both assemblers fold the SUBJECT\n * channel (`subject-registry.ts`) BEFORE this one and shed the combined list\n * tail-first, so every direction row here is dropped before any subject clause.\n * Deliberate — see `hint-shedding.ts` for the argument.\n */\nexport const DIRECTION_FIELDS = [\n { key: \"cameraMotion\", surface: \"video\", family: \"motion\", maxPicks: 1, render: perId(getCameraMotionPromptHint, getCameraMotionTerm) },\n\n // Composition (the Framing catalog, one row per category).\n { key: \"shotSize\", surface: \"both\", family: \"look\", maxPicks: 1, render: framing },\n { key: \"angle\", surface: \"both\", family: \"look\", maxPicks: 1, render: framing },\n { key: \"coverage\", surface: \"both\", family: \"look\", maxPicks: 1, render: framing },\n { key: \"composition\", surface: \"both\", family: \"look\", maxPicks: 2, render: framing },\n { key: \"vantage\", surface: \"both\", family: \"look\", maxPicks: 1, render: framing },\n { key: \"pose\", surface: \"both\", family: \"look\", maxPicks: 1, render: perId(getPosePromptHint, getPoseTerm) },\n { key: \"compositionEffect\", surface: \"both\", family: \"look\", maxPicks: 1, render: perId(getCompositionEffectPromptHint, getCompositionEffectTerm) },\n\n // Camera.\n { key: \"cameraFormat\", surface: \"both\", family: \"look\", styleGroup: \"film\", maxPicks: 1, render: perId(getCameraFormatPromptHint, getCameraFormatTerm) },\n { key: \"lens\", surface: \"both\", family: \"look\", maxPicks: 1, render: perId(getLensPromptHint, getLensTerm) },\n\n // Exposure (stills only — a video's exposure rides its own temporal levers).\n { key: \"aperture\", surface: \"image\", family: \"look\", maxPicks: 1, render: exposure },\n { key: \"shutterSpeed\", surface: \"image\", family: \"look\", maxPicks: 1, render: exposure },\n { key: \"isoValue\", surface: \"image\", family: \"look\", maxPicks: 1, render: exposure },\n\n // Light (the Lighting catalog, one row per category).\n { key: \"timeOfDay\", surface: \"both\", family: \"look\", maxPicks: 1, render: lighting },\n { key: \"lightingStyle\", surface: \"both\", family: \"look\", maxPicks: 2, render: lighting },\n { key: \"lightingDirection\", surface: \"both\", family: \"look\", maxPicks: 1, render: lighting },\n { key: \"lightingRatio\", surface: \"both\", family: \"look\", maxPicks: 1, render: lighting },\n { key: \"colorTemperature\", surface: \"both\", family: \"look\", maxPicks: 1, render: lighting },\n { key: \"colorLook\", surface: \"both\", family: \"look\", styleGroup: \"film\", maxPicks: 1, userRef: \"palette\", render: perId(getColorLookPromptHint, getColorLookTerm) },\n { key: \"atmosphere\", surface: \"both\", family: \"look\", maxPicks: 2, render: viaListBuilder(buildAtmosphereHints) },\n { key: \"postProcess\", surface: \"image\", family: \"look\", maxPicks: 2, render: viaListBuilder(buildPostProcessHints) },\n\n // Style.\n { key: \"style\", surface: \"both\", family: \"look\", styleGroup: \"film\", maxPicks: 1, userRef: \"moodboard\", render: perIdBySurface(getStylePromptHint, getStyleVideoPromptHint, getStyleTerm) },\n { key: \"mood\", surface: \"both\", family: \"look\", maxPicks: 2, render: viaMood },\n { key: \"aesthetic\", surface: \"both\", family: \"look\", maxPicks: 2, render: viaStringBuilder(buildAestheticHints) },\n { key: \"photoGenre\", surface: \"image\", family: \"look\", maxPicks: 1, render: perId(getPhotoGenrePromptHint, getPhotoGenreTerm) },\n { key: \"photographer\", surface: \"image\", family: \"look\", maxPicks: 2, render: viaStringBuilder(buildPhotographerHints) },\n { key: \"renderQuality\", surface: \"image\", family: \"look\", maxPicks: 1, render: perId(getRenderQualityPromptHint, getRenderQualityTerm) },\n\n // Scene.\n { key: \"setting\", surface: \"both\", family: \"look\", maxPicks: 1, render: perId(getSettingPromptHint, getSettingTerm) },\n { key: \"era\", surface: \"both\", family: \"look\", styleGroup: \"film\", maxPicks: 1, render: perId(getEraPromptHint, getEraTerm) },\n { key: \"backdrop\", surface: \"both\", family: \"look\", maxPicks: 1, render: perId(getBackdropPromptHint, getBackdropTerm) },\n\n // Motion & time.\n { key: \"actionFx\", surface: \"video\", family: \"motion\", maxPicks: 2, render: viaListBuilder(buildActionFxHints) },\n { key: \"temporalSpeed\", surface: \"video\", family: \"motion\", maxPicks: 1, render: temporal },\n { key: \"temporalFreeze\", surface: \"video\", family: \"motion\", maxPicks: 1, render: temporal },\n { key: \"temporalDirection\", surface: \"video\", family: \"motion\", maxPicks: 1, render: temporal },\n { key: \"temporalShutter\", surface: \"video\", family: \"motion\", maxPicks: 1, render: temporal },\n // Wrapped: `renderTransitionBases`' third parameter is a row's option values,\n // not the surface `render` is handed.\n { key: \"transition\", surface: \"video\", family: \"motion\", maxPicks: 2, render: (ids, mode) => renderTransitionBases(ids, mode) },\n { key: \"loopSubject\", surface: \"video\", family: \"motion\", maxPicks: 1, render: perId(getLoopSubjectPromptHint, getLoopSubjectTerm) },\n\n // ── LEGACY BLOCK — see the table doc above. Placed LAST, in today's exact\n // `composePromptText` order, so every pre-registry caller is byte-identical.\n { key: \"framingId\", surface: \"both\", family: \"look\", maxPicks: 1, render: framing },\n { key: \"framingAngleId\", surface: \"both\", family: \"look\", maxPicks: 1, render: framing },\n { key: \"lightingId\", surface: \"both\", family: \"look\", maxPicks: 1, render: lighting },\n { key: \"lensId\", surface: \"both\", family: \"look\", maxPicks: 1, render: perId(getLensPromptHint, getLensTerm) },\n { key: \"cameraFormatId\", surface: \"both\", family: \"look\", styleGroup: \"film\", maxPicks: 1, render: perId(getCameraFormatPromptHint, getCameraFormatTerm) },\n] as const satisfies ReadonlyArray<DirectionFieldSpec>\n\n/**\n * The table read at its DECLARED type. `styleGroup` is optional, so on the\n * `as const` tuple only the rows that carry it have the property at all — a\n * member-wise read would not compile. Every walk over the table goes through\n * this binding.\n */\nconst DIRECTION_SPECS: ReadonlyArray<DirectionFieldSpec> = DIRECTION_FIELDS\n\nexport type DirectionFieldRow = (typeof DIRECTION_FIELDS)[number]\nexport type DirectionKey = DirectionFieldRow[\"key\"]\nexport type ImageDirectionKey = Extract<DirectionFieldRow, { surface: \"image\" | \"both\" }>[\"key\"]\nexport type VideoDirectionKey = Extract<DirectionFieldRow, { surface: \"video\" | \"both\" }>[\"key\"]\n\n/**\n * Flat cinematic-direction ids (Studio / MCP / canvas node data).\n *\n * Every key accepts a single id OR an array: multi-pick dimensions always carry\n * an array, and a single-pick key may legitimately carry one (a client's\n * partition writer preserving legacy out-of-catalog ids). Absent ≠ empty — a\n * missing key means \"no hint\", never a default.\n */\nexport type DirectionFields = { readonly [K in DirectionKey]?: string | readonly string[] }\n\n/**\n * Table order — THE canonical fold order. Exported so a client's \"will inject\n * into prompt\" preview folds in the exact order the server does instead of\n * re-deriving one.\n */\nexport const DIRECTION_KEYS: ReadonlyArray<DirectionKey> = DIRECTION_FIELDS.map((f) => f.key)\n\n/**\n * The rows that render on the `[style]` section's FILM line, in table order —\n * derived from the table's `styleGroup` column so the grouping has exactly one\n * definition. Exported for clients that render the section themselves; the\n * platform's own renderer reads the column, not this list.\n */\nexport const FILM_STYLE_KEYS: ReadonlyArray<DirectionKey> = DIRECTION_SPECS.filter(\n (f) => f.styleGroup === \"film\",\n).map((f) => f.key as DirectionKey)\n\n/**\n * The direction key that takes a reference of this kind — `colorLook` for a\n * palette, `style` for a moodboard. Derived from the table's `userRef` column.\n */\nexport function directionKeyForUserRef(kind: UserDirectionRefKind): DirectionKey {\n const row = DIRECTION_SPECS.find((f) => f.userRef === kind)\n if (!row) throw new Error(`no direction row takes a ${kind} reference`)\n return row.key as DirectionKey\n}\n\n/** The kind of saved resource a direction key takes, or undefined (most keys). */\nexport function userRefKindOfDirectionKey(key: string): UserDirectionRefKind | undefined {\n return DIRECTION_SPECS.find((f) => f.key === key)?.userRef\n}\n\n/** Verbosity for a whole fold, or split per family. */\nexport type DirectionHintMode =\n | PickerHintMode\n | { readonly look: PickerHintMode; readonly motion: PickerHintMode }\n\n/** How a direction bag is folded. */\nexport interface DirectionRenderOptions {\n readonly surface: \"image\" | \"video\"\n readonly mode?: DirectionHintMode\n /**\n * Rendered clauses for the caller's OWN saved resources, keyed by the\n * direction value (`palette:<id>` → `color palette: …`), resolved by the\n * platform before the fold. A reference absent from the map renders nothing,\n * exactly like an unknown catalog id. Absent = no reference resolves.\n */\n readonly refs?: ReadonlyMap<string, string>\n}\n\n/** Image policy: full clause for every dimension (today's behavior). */\nexport const IMAGE_HINT_MODE_DEFAULT: DirectionHintMode = \"full\"\n\n/** Video policy: full look clauses, compact motion terms. */\nexport const VIDEO_HINT_MODE_DEFAULT: DirectionHintMode = { look: \"full\", motion: \"compact\" }\n\nexport function modeForFamily(mode: DirectionHintMode, family: DirectionFamily): PickerHintMode {\n return typeof mode === \"string\" ? mode : family === \"motion\" ? mode.motion : mode.look\n}\n\n/**\n * Wire tolerance ceiling for an array-valued direction key. The SEMANTIC cap is\n * the per-row render-time slice (`maxPicks`) — this is only the point past\n * which a body is malformed rather than merely over-generous.\n */\nexport const DIRECTION_ARRAY_CEILING = 8\n\n/**\n * Tolerance ceiling for the LENGTH of a single direction id. Catalog ids are\n * short slugs (<= ~40 chars); 100 is generous and closes an otherwise unbounded\n * string channel that lands verbatim in `jobs.input_data`.\n *\n * ONE literal for BOTH doors into the fold — the route's `directionSchema`\n * (`backend/src/lib/direction-schema.ts`) and the persisted-node reader\n * (`read-node-direction.ts`) — so the wire and the canvas cannot start\n * disagreeing about which strings are ids at all.\n */\nexport const DIRECTION_ID_MAX_CHARS = 100\n\n/**\n * `string | string[]` → deduped, non-empty, capped id list.\n *\n * The `ids.length >= maxPicks` bail is load-bearing, not an optimization: the\n * dedupe is an `includes` scan, so without it the cost is quadratic in the\n * CALLER's array length — and one caller (`readDirectionFields`) reads\n * untrusted persisted JSONB. Bailing is semantics-preserving: once `maxPicks`\n * unique ids exist, no later entry can change the sliced result (and\n * `maxPicks = 0` still yields `[]`).\n */\nfunction normalizeDirectionIds(value: unknown, maxPicks: number): string[] {\n const ids: string[] = []\n if (typeof value === \"string\") {\n if (value) ids.push(value)\n } else if (Array.isArray(value)) {\n for (const v of value) {\n if (ids.length >= maxPicks) break\n if (typeof v === \"string\" && v && !ids.includes(v)) ids.push(v)\n }\n }\n return ids.slice(0, maxPicks)\n}\n\n/**\n * One row's clauses. A row with no user-owned reference among its ids renders\n * through its catalog doctrine exactly as before (byte parity). On a row that\n * takes a reference (`userRef`), each id renders on its own, in order: a\n * reference of the row's kind becomes its resolved clause from `refs` (nothing\n * when unresolved), any other value goes through the catalog.\n */\nfunction renderRow(\n spec: DirectionFieldSpec,\n ids: readonly string[],\n mode: PickerHintMode,\n surface: \"image\" | \"video\",\n refs: ReadonlyMap<string, string> | undefined,\n): string[] {\n if (spec.userRef === undefined || !ids.some((id) => parseUserDirectionRef(id) !== null)) {\n return spec.render(ids, mode, surface)\n }\n return ids.flatMap((id) => {\n const ref = parseUserDirectionRef(id)\n if (ref === null) return spec.render([id], mode, surface)\n const clause = ref.kind === spec.userRef ? refs?.get(id) : undefined\n return clause ? [clause] : []\n })\n}\n\n/** The rows a given generation stage folds, in table order. */\nexport function directionFieldsForSurface(\n surface: \"image\" | \"video\",\n): ReadonlyArray<DirectionFieldSpec> {\n return DIRECTION_SPECS.filter((f) => f.surface === \"both\" || f.surface === surface)\n}\n\n/** One rendered clause, still carrying the table attributes it came from. */\nexport interface DirectionHintClause {\n readonly key: DirectionKey\n readonly family: DirectionFamily\n readonly styleGroup?: DirectionStyleGroup\n readonly text: string\n}\n\n/**\n * `renderDirectionHints` with the row each clause came from still attached —\n * what the `[style]` section needs to decide which line a clause belongs on\n * without a second table. Same order, same surface filter, same dedupe; the\n * plain renderer is this one's `.text` projection, so the two cannot drift.\n */\nexport function renderDirectionHintClauses(\n direction: DirectionFields | undefined,\n opts: DirectionRenderOptions,\n): DirectionHintClause[] {\n if (!direction) return []\n const mode = opts.mode ?? \"full\"\n const out: DirectionHintClause[] = []\n const seen = new Set<string>()\n for (const spec of DIRECTION_SPECS) {\n if (spec.surface !== \"both\" && spec.surface !== opts.surface) continue\n const ids = normalizeDirectionIds(\n (direction as Record<string, unknown>)[spec.key],\n spec.maxPicks,\n )\n if (ids.length === 0) continue\n for (const hint of renderRow(spec, ids, modeForFamily(mode, spec.family), opts.surface, opts.refs)) {\n if (hint.length > 0 && !seen.has(hint)) {\n seen.add(hint)\n out.push({\n key: spec.key as DirectionKey,\n family: spec.family,\n ...(spec.styleGroup !== undefined ? { styleGroup: spec.styleGroup } : {}),\n text: hint,\n })\n }\n }\n }\n return out\n}\n\n/**\n * Every clause the `direction` channel injects, in canonical table order.\n *\n * Iterates the TABLE (never the caller's object), so unknown wire keys are\n * ignored, the order is platform-owned, and off-surface dimensions are inert.\n * Unknown IDS are silently skipped too — every `get*PromptHint` returns `\"\"` on\n * a miss, so a retired or pack-only id contributes no clause rather than a 400.\n *\n * DEDUPE: the result is de-duplicated by exact clause string, FIRST OCCURRENCE\n * WINS (order-preserving). This is what lets the five legacy whole-catalog keys\n * (`framingId`, `lightingId`, …) coexist with their canonical counterparts\n * without an alias table: a caller sending `framingId` and `shotSize` with the\n * SAME id emits the clause once, while `lightingId: \"golden-hour\"` alongside\n * `lightingStyle: \"rembrandt\"` correctly emits BOTH (they are different ids in\n * the same catalog — an alias table would have wrongly suppressed one).\n * A caller sending two DIFFERENT ids for the same dimension gets both clauses,\n * exactly as two wired picker nodes of one family behave today.\n *\n * Exported so a client's \"will inject into prompt\" preview renders the exact\n * clauses the server does instead of re-implementing the fold. A preview of the\n * assembled STRING needs `prompt-style-section.ts` on top: the look clauses in\n * this list do not read in this position any more.\n */\nexport function renderDirectionHints(\n direction: DirectionFields | undefined,\n opts: DirectionRenderOptions,\n): string[] {\n return renderDirectionHintClauses(direction, opts).map((c) => c.text)\n}\n","import { getAnimalPromptHint, getAnimalTerm, getVehicle, getWeapon, getFurniture } from \"@nodaro/shared/catalogs\"\nimport { composedHas, composedOption } from \"./catalog-overlay.js\"\nimport { deriveTerm } from \"./term.js\"\n\n/**\n * The four object-entity catalogs — animals, vehicles, weapons, furniture —\n * are OWNED by `@nodaro/shared`, which cannot depend on this package, so\n * their getters cannot carry the `overlayEntry` the other 34 catalogs do.\n * These wrappers are the overlay for them, and EVERY prompt-text read of\n * those catalogs goes through here: the parameter-node dispatcher and the\n * subject fold both. Two call sites resolving the same id to different text\n * — one curated, one stock — is exactly what a second, un-overlaid path\n * produced during review.\n *\n * Precedence per id, same four outcomes as catalog-overlay.ts:\n * - no pack on the catalog → the stock getter, untouched\n * - denied / not in the pack → \"\" (nothing reaches the prompt)\n * - composed option present → ITS promptHint / term. A pack author\n * who rewrote an entry wrote the hint they want injected; rebuilding it\n * from label + description would discard that\n * - pack-added id (no stock row) → the composed option (covered by the\n * branch above — the stock getter is never consulted when a pack exists)\n */\n\nexport function curatedAnimalPromptHint(id: string): string {\n if (!id) return \"\"\n if (!composedHas(\"animals\", id)) return \"\"\n return composedOption(\"animals\", id)?.promptHint ?? getAnimalPromptHint(id)\n}\nexport function curatedAnimalTerm(id: string): string {\n if (!id) return \"\"\n if (!composedHas(\"animals\", id)) return \"\"\n return composedOption(\"animals\", id)?.term ?? getAnimalTerm(id)\n}\n\ntype ObjectEntity = { readonly label: string; readonly description: string }\n\nfunction objectEntityText(\n catalogId: string,\n id: string,\n stock: ObjectEntity | undefined,\n stockHint: (e: ObjectEntity) => string,\n stockTerm: (e: ObjectEntity) => string,\n): { readonly hint: string; readonly term: string } {\n if (!id || !composedHas(catalogId, id)) return { hint: \"\", term: \"\" }\n const composed = composedOption(catalogId, id)\n if (composed) return { hint: composed.promptHint, term: composed.term }\n if (!stock) return { hint: \"\", term: \"\" }\n return { hint: stockHint(stock), term: stockTerm(stock) }\n}\n\n/**\n * The compact fragment for an OBJECT-entity entry (animal / vehicle / weapon /\n * furniture). Those catalogs carry no `promptHint` of their own — the full\n * fragment is synthesized as \"featuring a {label}, {description}\" — so the\n * compact form is the authored `term` when there is one and the derived label\n * otherwise (a concrete object's label IS its trade term). The framing verb\n * (\"featuring a\", \"with a\") belongs to the HINT; a term drops bare into\n * whatever sentence the consumer is building, and \"the object is in the scene\"\n * is precisely what these four nodes mean.\n *\n * The fallback MUST be `deriveTerm` and not a bare `toLowerCase()`: it is the\n * same fallback `objectOptions` uses to build the `/v1/catalogs` projection,\n * so a parenthetical label (\"Rifle (bolt-action)\") must strip identically here\n * or the injected fragment and the projected term would disagree.\n *\n * `term` is read structurally because it is being added to the shared entity\n * interfaces separately; this stays correct before and after that lands.\n */\n\nfunction objectEntityTerm(entry: { readonly label: string }): string {\n return (entry as { term?: string }).term ?? deriveTerm(entry.label)\n}\n\nexport function curatedVehicleText(id: string) {\n return objectEntityText(\"vehicles\", id, getVehicle(id), (e) => `featuring a ${e.label.toLowerCase()}, ${e.description}`, objectEntityTerm)\n}\nexport function curatedWeaponText(id: string) {\n return objectEntityText(\"weapons\", id, getWeapon(id), (e) => `with a ${e.label.toLowerCase()}, ${e.description}`, objectEntityTerm)\n}\nexport function curatedFurnitureText(id: string) {\n return objectEntityText(\"furniture\", id, getFurniture(id), (e) => `including a ${e.label.toLowerCase()}, ${e.description}`, objectEntityTerm)\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkIMQB7GIK_cjs = require('./chunk-IMQB7GIK.cjs');
|
|
4
|
+
var chunk54BYDWAM_cjs = require('./chunk-54BYDWAM.cjs');
|
|
5
5
|
var chunk3UEA3UHQ_cjs = require('./chunk-3UEA3UHQ.cjs');
|
|
6
6
|
var chunkK6NT635Z_cjs = require('./chunk-K6NT635Z.cjs');
|
|
7
7
|
var chunkFY4AMIDB_cjs = require('./chunk-FY4AMIDB.cjs');
|
|
@@ -14,7 +14,7 @@ function optionsOf(catalog) {
|
|
|
14
14
|
return (catalog.dimensions ?? []).flatMap((d) => d.options);
|
|
15
15
|
}
|
|
16
16
|
function getAdultOnlyEntries() {
|
|
17
|
-
const catalogEntries =
|
|
17
|
+
const catalogEntries = chunk54BYDWAM_cjs.getRegisteredPickerCatalogs().filter((c) => ADULT_SWEPT_CATALOG_ID_SET.has(c.catalogId)).flatMap(optionsOf);
|
|
18
18
|
const all = [...chunkK6NT635Z_cjs.getRegisteredPeople(), ...catalogEntries];
|
|
19
19
|
return all.filter((e) => e.adultOnly === true);
|
|
20
20
|
}
|
|
@@ -212,28 +212,28 @@ var MOTION_INTENSITY_HINTS = {
|
|
|
212
212
|
moderate: { full: "moderate, natural motion at an even pace", compact: "moderate motion" },
|
|
213
213
|
dynamic: { full: "dynamic, energetic motion with fast, pronounced movement", compact: "dynamic motion" }
|
|
214
214
|
};
|
|
215
|
-
function getParameterPromptHint(node, ctx) {
|
|
216
|
-
return resolveParameterHint(node, ctx);
|
|
215
|
+
function getParameterPromptHint(node, ctx, opts) {
|
|
216
|
+
return resolveParameterHint(node, ctx, void 0, opts?.surface === "video" ? "video" : "image");
|
|
217
217
|
}
|
|
218
|
-
function resolveParameterHint(node, ctx, inherited) {
|
|
218
|
+
function resolveParameterHint(node, ctx, inherited, surface = "image") {
|
|
219
219
|
if (!node?.type) return "";
|
|
220
220
|
const data = node.data ?? {};
|
|
221
221
|
const mode = readHintMode(data) ?? inherited ?? "full";
|
|
222
222
|
if (node.type === "camera-motion") {
|
|
223
223
|
const motionId = asStr(data.cameraMotion) || void 0;
|
|
224
|
-
if (!ctx) return withCustomText(data,
|
|
224
|
+
if (!ctx) return withCustomText(data, chunk54BYDWAM_cjs.composeCameraMotionHintFromConnections(motionId, [], [], mode));
|
|
225
225
|
const startHints = [];
|
|
226
226
|
const endHints = [];
|
|
227
227
|
for (const edge of ctx.edges) {
|
|
228
228
|
if (edge.target !== node.id) continue;
|
|
229
229
|
const src = ctx.nodes.find((n) => n.id === edge.source);
|
|
230
230
|
if (!src) continue;
|
|
231
|
-
const hint = resolveParameterHint(src, void 0, mode);
|
|
231
|
+
const hint = resolveParameterHint(src, void 0, mode, surface);
|
|
232
232
|
if (!hint) continue;
|
|
233
233
|
if (edge.targetHandle === "startState") startHints.push(hint);
|
|
234
234
|
else if (edge.targetHandle === "endState") endHints.push(hint);
|
|
235
235
|
}
|
|
236
|
-
return withCustomText(data,
|
|
236
|
+
return withCustomText(data, chunk54BYDWAM_cjs.composeCameraMotionHintFromConnections(motionId, startHints, endHints, mode));
|
|
237
237
|
}
|
|
238
238
|
if (node.type === "transition") {
|
|
239
239
|
const raw = data.transition;
|
|
@@ -243,10 +243,10 @@ function resolveParameterHint(node, ctx, inherited) {
|
|
|
243
243
|
duration: asStr(data.duration),
|
|
244
244
|
intensity: asStr(data.intensity)
|
|
245
245
|
};
|
|
246
|
-
const optionValues =
|
|
246
|
+
const optionValues = chunk54BYDWAM_cjs.readTransitionOptionValues(data);
|
|
247
247
|
const hintOptions = optionValues ? { optionValues } : void 0;
|
|
248
248
|
if (!ctx) {
|
|
249
|
-
return withCustomText(data,
|
|
249
|
+
return withCustomText(data, chunk54BYDWAM_cjs.composeTransitionHintFromConnections(transitionId, [], [], timing, mode, hintOptions));
|
|
250
250
|
}
|
|
251
251
|
const startHints = [];
|
|
252
252
|
const endHints = [];
|
|
@@ -254,12 +254,12 @@ function resolveParameterHint(node, ctx, inherited) {
|
|
|
254
254
|
if (edge.target !== node.id) continue;
|
|
255
255
|
const src = ctx.nodes.find((n) => n.id === edge.source);
|
|
256
256
|
if (!src) continue;
|
|
257
|
-
const hint = resolveParameterHint(src, void 0, mode);
|
|
257
|
+
const hint = resolveParameterHint(src, void 0, mode, surface);
|
|
258
258
|
if (!hint) continue;
|
|
259
259
|
if (edge.targetHandle === "startState") startHints.push(hint);
|
|
260
260
|
else if (edge.targetHandle === "endState") endHints.push(hint);
|
|
261
261
|
}
|
|
262
|
-
return withCustomText(data,
|
|
262
|
+
return withCustomText(data, chunk54BYDWAM_cjs.composeTransitionHintFromConnections(transitionId, startHints, endHints, timing, mode, hintOptions));
|
|
263
263
|
}
|
|
264
264
|
if (node.type === "character-fx") {
|
|
265
265
|
const raw = data.characterFx;
|
|
@@ -270,7 +270,7 @@ function resolveParameterHint(node, ctx, inherited) {
|
|
|
270
270
|
intensity: asStr(data.intensity)
|
|
271
271
|
};
|
|
272
272
|
if (!ctx) {
|
|
273
|
-
return withCustomText(data,
|
|
273
|
+
return withCustomText(data, chunk54BYDWAM_cjs.composeCharacterFxHintFromConnections(effectId, [], timing, mode));
|
|
274
274
|
}
|
|
275
275
|
const targetNames = [];
|
|
276
276
|
for (const edge of ctx.edges) {
|
|
@@ -281,7 +281,7 @@ function resolveParameterHint(node, ctx, inherited) {
|
|
|
281
281
|
const name = extractCharacterRefName(src);
|
|
282
282
|
if (name) targetNames.push(name);
|
|
283
283
|
}
|
|
284
|
-
return withCustomText(data,
|
|
284
|
+
return withCustomText(data, chunk54BYDWAM_cjs.composeCharacterFxHintFromConnections(effectId, targetNames, timing, mode));
|
|
285
285
|
}
|
|
286
286
|
if (node.type === "character-motion") {
|
|
287
287
|
const raw = data.characterMotion;
|
|
@@ -291,109 +291,109 @@ function resolveParameterHint(node, ctx, inherited) {
|
|
|
291
291
|
pace: asStr(data.pace)
|
|
292
292
|
};
|
|
293
293
|
if (!ctx) {
|
|
294
|
-
return withCustomText(data,
|
|
294
|
+
return withCustomText(data, chunk54BYDWAM_cjs.composeCharacterMotionHintFromConnections(motionId, [], [], timing, mode));
|
|
295
295
|
}
|
|
296
296
|
const { targetNames, partnerNames, subjectMinor } = getCharacterMotionBindings(node, ctx);
|
|
297
297
|
return withCustomText(
|
|
298
298
|
data,
|
|
299
|
-
|
|
299
|
+
chunk54BYDWAM_cjs.composeCharacterMotionHintFromConnections(motionId, targetNames, partnerNames, timing, mode, { subjectMinor })
|
|
300
300
|
);
|
|
301
301
|
}
|
|
302
|
-
const base = resolveBaseHint(node.type, data, mode);
|
|
302
|
+
const base = resolveBaseHint(node.type, data, mode, surface);
|
|
303
303
|
if (base) return base;
|
|
304
|
-
const cat =
|
|
304
|
+
const cat = chunk54BYDWAM_cjs.getPickerCatalog(node.type);
|
|
305
305
|
if (cat?.kind === "single" && cat.valueField) {
|
|
306
306
|
const id = typeof data[cat.valueField] === "string" ? data[cat.valueField] : "";
|
|
307
307
|
const opt = cat.options?.find((o) => o.id === id);
|
|
308
|
-
if (opt) return byMode(mode, opt.promptHint, chunkFY4AMIDB_cjs.resolveTerm(opt));
|
|
308
|
+
if (opt) return byMode(mode, surface === "video" ? opt.videoPromptHint ?? opt.promptHint : opt.promptHint, chunkFY4AMIDB_cjs.resolveTerm(opt));
|
|
309
309
|
}
|
|
310
310
|
return base;
|
|
311
311
|
}
|
|
312
|
-
function resolveBaseHint(type, data, mode = "full") {
|
|
312
|
+
function resolveBaseHint(type, data, mode = "full", surface = "image") {
|
|
313
313
|
switch (type) {
|
|
314
314
|
case "framing":
|
|
315
|
-
return withCustomText(data,
|
|
315
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildFramingHints(data, false, mode).join(", "));
|
|
316
316
|
case "lighting":
|
|
317
|
-
return withCustomText(data,
|
|
317
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildLightingHints(data, mode).join(", "));
|
|
318
318
|
case "lens":
|
|
319
|
-
return withCustomText(data, byMode(mode,
|
|
319
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getLensPromptHint, chunk54BYDWAM_cjs.getLensTerm)(asStr(data.lens)));
|
|
320
320
|
case "camera-format":
|
|
321
|
-
return withCustomText(data, byMode(mode,
|
|
321
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getCameraFormatPromptHint, chunk54BYDWAM_cjs.getCameraFormatTerm)(asStr(data.cameraFormat)));
|
|
322
322
|
case "color-look":
|
|
323
|
-
return withCustomText(data, byMode(mode,
|
|
323
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getColorLookPromptHint, chunk54BYDWAM_cjs.getColorLookTerm)(asStr(data.colorLook)));
|
|
324
324
|
// build*Hints in music-* / voice-* / mood / person / etc. compose
|
|
325
325
|
// preText/postText internally — bypass the wrapper to avoid double-
|
|
326
326
|
// composition.
|
|
327
327
|
case "music-genre":
|
|
328
|
-
return
|
|
328
|
+
return chunk54BYDWAM_cjs.buildMusicGenreHints(data ?? {}, mode);
|
|
329
329
|
case "music-mood":
|
|
330
|
-
return
|
|
330
|
+
return chunk54BYDWAM_cjs.buildMusicMoodHints(data ?? {}, mode);
|
|
331
331
|
case "instrumentation":
|
|
332
|
-
return
|
|
332
|
+
return chunk54BYDWAM_cjs.buildInstrumentationHints(data ?? {}, mode);
|
|
333
333
|
case "voice-character":
|
|
334
|
-
return
|
|
334
|
+
return chunk54BYDWAM_cjs.buildVoiceCharacterHints(data ?? {}, mode);
|
|
335
335
|
case "voice-delivery":
|
|
336
|
-
return
|
|
336
|
+
return chunk54BYDWAM_cjs.buildVoiceDeliveryHints(data ?? {}, mode);
|
|
337
337
|
case "person":
|
|
338
338
|
return chunkK6NT635Z_cjs.buildPersonHints(data, mode).join(", ");
|
|
339
339
|
case "mood":
|
|
340
|
-
return
|
|
340
|
+
return chunk54BYDWAM_cjs.buildMoodHints(data, mode).join(", ");
|
|
341
341
|
case "pose":
|
|
342
|
-
return
|
|
342
|
+
return chunk54BYDWAM_cjs.buildPoseHints(data, mode).join(", ");
|
|
343
343
|
case "styling":
|
|
344
|
-
return
|
|
344
|
+
return chunk54BYDWAM_cjs.buildStylingHints(data, mode).join(", ");
|
|
345
345
|
case "atmosphere":
|
|
346
|
-
return withCustomText(data,
|
|
346
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildAtmosphereHints(data.atmosphere, mode).join(", "));
|
|
347
347
|
case "action-fx":
|
|
348
|
-
return withCustomText(data,
|
|
348
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildActionFxHints(data.actionFx, mode).join(", "));
|
|
349
349
|
case "style":
|
|
350
|
-
return withCustomText(data, byMode(mode,
|
|
350
|
+
return withCustomText(data, byMode(mode, surface === "video" ? chunk54BYDWAM_cjs.getStyleVideoPromptHint : chunk54BYDWAM_cjs.getStylePromptHint, chunk54BYDWAM_cjs.getStyleTerm)(asStr(data.style)));
|
|
351
351
|
case "setting":
|
|
352
|
-
return withCustomText(data, byMode(mode,
|
|
352
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getSettingPromptHint, chunk54BYDWAM_cjs.getSettingTerm)(asStr(data.setting)));
|
|
353
353
|
case "loop-subject":
|
|
354
|
-
return withCustomText(data, byMode(mode,
|
|
354
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getLoopSubjectPromptHint, chunk54BYDWAM_cjs.getLoopSubjectTerm)(asStr(data.loopSubject)));
|
|
355
355
|
case "material":
|
|
356
|
-
return withCustomText(data,
|
|
356
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildMaterialHints(data.material, mode));
|
|
357
357
|
// The four object-entity catalogs are owned by @nodaro/shared and overlaid
|
|
358
358
|
// in shared-catalog-overlay.ts — the ONE module every prompt-text read of
|
|
359
359
|
// them goes through (the subject fold uses it too). Each returns "" on a
|
|
360
360
|
// miss, so the entry lookup is the module's job, not this switch's.
|
|
361
361
|
case "animal":
|
|
362
|
-
return withCustomText(data, byMode(mode,
|
|
362
|
+
return withCustomText(data, byMode(mode, chunkIMQB7GIK_cjs.curatedAnimalPromptHint, chunkIMQB7GIK_cjs.curatedAnimalTerm)(asStr(data.animal)));
|
|
363
363
|
case "vehicle": {
|
|
364
|
-
const t =
|
|
364
|
+
const t = chunkIMQB7GIK_cjs.curatedVehicleText(asStr(data.vehicle));
|
|
365
365
|
return withCustomText(data, byMode(mode, t.hint, t.term));
|
|
366
366
|
}
|
|
367
367
|
case "weapon": {
|
|
368
|
-
const t =
|
|
368
|
+
const t = chunkIMQB7GIK_cjs.curatedWeaponText(asStr(data.weapon));
|
|
369
369
|
return withCustomText(data, byMode(mode, t.hint, t.term));
|
|
370
370
|
}
|
|
371
371
|
case "furniture": {
|
|
372
|
-
const t =
|
|
372
|
+
const t = chunkIMQB7GIK_cjs.curatedFurnitureText(asStr(data.furniture));
|
|
373
373
|
return withCustomText(data, byMode(mode, t.hint, t.term));
|
|
374
374
|
}
|
|
375
375
|
case "photo-genre":
|
|
376
|
-
return withCustomText(data, byMode(mode,
|
|
376
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getPhotoGenrePromptHint, chunk54BYDWAM_cjs.getPhotoGenreTerm)(asStr(data.photoGenre)));
|
|
377
377
|
case "backdrop":
|
|
378
|
-
return withCustomText(data, byMode(mode,
|
|
378
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getBackdropPromptHint, chunk54BYDWAM_cjs.getBackdropTerm)(asStr(data.backdrop)));
|
|
379
379
|
case "held-prop":
|
|
380
|
-
return withCustomText(data,
|
|
380
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildHeldPropHints(data.heldProp, mode).join(", "));
|
|
381
381
|
case "photographer":
|
|
382
|
-
return withCustomText(data,
|
|
382
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildPhotographerHints(data.photographer, mode));
|
|
383
383
|
case "aesthetic":
|
|
384
|
-
return withCustomText(data,
|
|
384
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildAestheticHints(data.aesthetic, mode));
|
|
385
385
|
case "era":
|
|
386
|
-
return withCustomText(data, byMode(mode,
|
|
386
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getEraPromptHint, chunk54BYDWAM_cjs.getEraTerm)(asStr(data.era)));
|
|
387
387
|
case "temporal":
|
|
388
|
-
return withCustomText(data,
|
|
388
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildTemporalHints(data, mode).join(", "));
|
|
389
389
|
case "exposure-settings":
|
|
390
|
-
return withCustomText(data,
|
|
390
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildExposureHints(data, mode).join(", "));
|
|
391
391
|
case "render-quality":
|
|
392
|
-
return withCustomText(data, byMode(mode,
|
|
392
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getRenderQualityPromptHint, chunk54BYDWAM_cjs.getRenderQualityTerm)(asStr(data.renderQuality)));
|
|
393
393
|
case "composition-effects":
|
|
394
|
-
return withCustomText(data, byMode(mode,
|
|
394
|
+
return withCustomText(data, byMode(mode, chunk54BYDWAM_cjs.getCompositionEffectPromptHint, chunk54BYDWAM_cjs.getCompositionEffectTerm)(asStr(data.compositionEffect)));
|
|
395
395
|
case "post-process-effects":
|
|
396
|
-
return withCustomText(data,
|
|
396
|
+
return withCustomText(data, chunk54BYDWAM_cjs.buildPostProcessHints(data.postProcess, mode).join(", "));
|
|
397
397
|
// Motion intensity: a Generation Settings node that a video node's
|
|
398
398
|
// Settings input takes as a prompt fragment (video only).
|
|
399
399
|
case "motion": {
|
|
@@ -425,5 +425,5 @@ exports.getAdultOnlyIds = getAdultOnlyIds;
|
|
|
425
425
|
exports.getCharacterMotionBindings = getCharacterMotionBindings;
|
|
426
426
|
exports.getMinorAgeHintStrings = getMinorAgeHintStrings;
|
|
427
427
|
exports.getParameterPromptHint = getParameterPromptHint;
|
|
428
|
-
//# sourceMappingURL=chunk-
|
|
429
|
-
//# sourceMappingURL=chunk-
|
|
428
|
+
//# sourceMappingURL=chunk-Z755PH3K.cjs.map
|
|
429
|
+
//# sourceMappingURL=chunk-Z755PH3K.cjs.map
|