@nodaro/prompts 1.5.0 → 1.6.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/index.cjs CHANGED
@@ -69,6 +69,25 @@ function buildIdentityLockLine(ref, binding) {
69
69
  return text ? interpolate(text) : null;
70
70
  }
71
71
 
72
+ // src/reference-rules.ts
73
+ var REFERENCE_RULES = "Do not use anything from reference images unless specified explicitly. All elements taken from reference images must preserve likeness. Compose them naturally into a single image.";
74
+ var REFERENCE_RULES_MULTI_PERSON = "Do not take anything from the reference images unless specified explicitly. Do not alter face structure. Do not blend faces. Preserve the likeness of every element taken. Compose them naturally into a single image.";
75
+ var FILM_STILL_PREFIX = "Film still of";
76
+ function filmStillPrefix(shotSize) {
77
+ const shot = shotSize?.trim();
78
+ return shot ? `${shot} film still of` : FILM_STILL_PREFIX;
79
+ }
80
+ var SCENE_FRAME_RULE = "Nobody looks at the camera.";
81
+ var CINEMATIC_LOOK_TAIL = "Shot on Super 16mm Kodak 7298 with Canon K35 lenses, soft naturalistic window light mixed with dim tungsten practicals and muted fluorescent spill, earthy muted palette with faded greens, warm skin tones and gentle shadow fall-off";
82
+ function referenceRulesBlock(opts) {
83
+ const parts = [];
84
+ if (opts?.referenceRules !== false) {
85
+ parts.push(opts?.multiPerson === true ? REFERENCE_RULES_MULTI_PERSON : REFERENCE_RULES);
86
+ }
87
+ if (opts?.sceneFrame === true) parts.push(SCENE_FRAME_RULE);
88
+ return parts.join(" ");
89
+ }
90
+
72
91
  // src/framing.ts
73
92
  var FRAMINGS = [
74
93
  // Shot size (how much of the subject is in frame)
@@ -10513,6 +10532,7 @@ function assembleSunoInput(input) {
10513
10532
  styleWeight: data.styleWeight,
10514
10533
  weirdnessConstraint: data.weirdnessConstraint,
10515
10534
  audioWeight: data.audioWeight,
10535
+ duration: data.duration,
10516
10536
  customMode,
10517
10537
  instrumental: data.instrumental ?? false,
10518
10538
  ...input.persona ?? {}
@@ -26040,14 +26060,15 @@ function buildWardrobeHints(value) {
26040
26060
 
26041
26061
  // src/provider-prompt-doctrine.ts
26042
26062
  var SEEDANCE_2_DOCTRINE = {
26043
- providers: ["seedance-2", "seedance-2-fast", "seedance-2-mini"],
26044
- heading: "Seedance 2.0 (seedance-2, seedance-2-fast, seedance-2-mini)",
26063
+ providers: ["seedance-2", "seedance-2-fast", "seedance-2-mini", "seedance-2-5"],
26064
+ heading: "Seedance 2 (seedance-2, seedance-2-fast, seedance-2-mini, seedance-2-5)",
26045
26065
  tips: [
26046
26066
  "Storyboard complex videos as 'Shot 1: \u2026 Shot 2: \u2026' WITHOUT timestamps \u2014 timed shots like '(0-3s)' are officially unstable and can break generation.",
26047
26067
  "One camera movement per shot; describe actions per body part with degree ('slowly raises a hand'); express emotion as physical detail, never abstract words.",
26048
26068
  "Native multi-track audio \u2014 cue it inline: \uFF08background music\uFF09, <sound effects>, and quoted dialogue.",
26049
26069
  "References go by ordinal (@Image 1, Video 2) in attachment order; earlier = higher priority. Identity = ONE headshot + ONE full-body (multi-view sheets cause ID drift). 4-5 assets total beats maxing the 9/3/3 caps.",
26050
- "No negative-prompt parameter \u2014 put constraints in the prompt: 'keep it subtitle-free, do not generate a watermark, do not generate a logo'."
26070
+ "No negative-prompt parameter \u2014 put constraints in the prompt: 'keep it subtitle-free, do not generate a watermark, do not generate a logo'.",
26071
+ "seedance-2-5 only: one shot runs to 30s (the 2.0 SKUs stop at 15s), so storyboard a whole beat instead of planning a stitch. Ref caps are wider (30/10/10), but 4-5 assets still gives the best identity fidelity."
26051
26072
  ],
26052
26073
  doctrine: `Prompt structure (front-load what matters most):
26053
26074
  precise subject \u2192 action details \u2192 scene/environment \u2192 lighting & color tone \u2192 camera movement \u2192 visual style \u2192 image quality \u2192 constraints.
@@ -26059,6 +26080,12 @@ precise subject \u2192 action details \u2192 scene/environment \u2192 lighting &
26059
26080
  - Prefer slow, gentle, continuous movements over high-burst action (sprints, big jumps, violent rolls morph). Describe actions per body part with quantified degree: "slowly raises a hand", "pushes hard off the ground". Chain actions with inertia: "uses the momentum of the turn to naturally raise an arm".
26060
26081
  - Express emotion as externalized physical detail, never abstract words: not "very sad" but "lowering the head, shoulders trembling slightly, eyes reddening, fingers clutching the corner of clothing".
26061
26082
 
26083
+ **Generation differences (seedance-2-5 vs the 2.0 SKUs)**
26084
+ - A single 2.5 shot runs to 30s, where every 2.0 SKU stops at 15s. Plan a complete 4-6 shot beat inside ONE generation instead of splitting it into two clips and stitching \u2014 no seam to hide, and continuity holds because it never leaves the model.
26085
+ - 2.5 also takes far more reference material (30 images / 10 videos / 10 audio vs 9/3/3). Treat that as room for COVERAGE \u2014 more distinct characters, locations and props in one shot \u2014 not as licence to pile refs onto one identity. The "ONE headshot + ONE full-body, 4-5 assets total" rule above still produces the best likeness on 2.5.
26086
+ - 2.5 renders at 480p/720p only: there is no 1080p or 4K tier, so route a job that needs one to seedance-2 (which has both) or upscale afterwards.
26087
+ - With a start frame, 2.5 always derives the output aspect from that frame \u2014 an explicit aspect ratio is rejected outright, so compose the frame at the ratio you want.
26088
+
26062
26089
  **References (when reference media is attached)**
26063
26090
  - Refer to assets by ordinal in attachment order: "@Image 1", "Video 2", "Audio 1". Asset ORDER is priority \u2014 put the most identity-critical asset first. (In the editor, the \`{image:N:label}\` / \`{video:N}\` / \`{audio:N}\` prompt tokens auto-emit this binding \u2014 \`{image:1:person}\` resolves to "the person from @image_1" \u2014 so a wired reference and its mention stay in sync.)
26064
26091
  - Define each subject once, then reuse the label consistently: 'Define the woman in the red dress in Image 1 as the courier' \u2026 'the courier opens the door'. In multi-character scenes bind every character to its image ("the man from Image 1 hands the box to the woman from Image 2") and append: "do not generate duplicate copies of the same character".
@@ -26117,9 +26144,45 @@ var KLING_AUDIO_DOCTRINE = {
26117
26144
  - Kling 2.6 prompts cap at 1000 characters \u2014 front-load scene + dialogue and trim style tails first. kling-3.0 accepts long prompts.
26118
26145
  - Durations: 2.6 = 5/10s; 3.0/omni = 3-15s. A spoken line needs roughly 1s per 2-3 words \u2014 don't script more dialogue than the clip can hold.`
26119
26146
  };
26147
+ var MINIMAX_H3_DOCTRINE = {
26148
+ providers: ["minimax-h3"],
26149
+ heading: "MiniMax Hailuo 3 (minimax-h3)",
26150
+ tips: [
26151
+ "Natural-language prompts up to 7000 chars. Front-load what matters: subject \u2192 action \u2192 scene/environment \u2192 lighting \u2192 camera move \u2192 style. One camera movement per shot.",
26152
+ "Output 2K (default) or 768P (cheaper tier). Aspect: pure text-to-video needs a concrete ratio (21:9/16:9/4:3/1:1/3:4/9:16); reference runs default to adaptive (match the input).",
26153
+ "References go by ordinal in attachment order (@Image 1, Video 1) \u2014 earlier = higher priority. Caps: 9 images, 3 videos (2-15s each, \u226415s total), 3 audio clips (\u226415s total).",
26154
+ "Reference audio drives speech/lip-sync but never rides alone \u2014 pair it with an image or video reference. Audio input is free; the first 5 input images are free, extras bill per image.",
26155
+ "No negative-prompt parameter \u2014 put constraints in the prompt text: 'keep it subtitle-free, do not generate a watermark, do not generate a logo'."
26156
+ ],
26157
+ doctrine: `Prompt structure (front-load what matters most):
26158
+ precise subject \u2192 action details \u2192 scene/environment \u2192 lighting & color tone \u2192 camera movement \u2192 visual style \u2192 image quality \u2192 constraints. Prompts are natural language, 1-7000 characters, across all three modes.
26159
+
26160
+ **Modes (picked automatically from the wired inputs)**
26161
+ - First frame and/or last frame connected, nothing else \u2192 exact frame mode (image-to-video): the output opens on the first frame and/or closes on the last. The clip's aspect is inferred from the frame \u2014 there is no aspect parameter in this mode.
26162
+ - ANY reference connected (image, video, or audio) \u2192 reference mode (reference-to-video): frames ride along as reference images with a prompt directive binding them to the opening/closing position. Aspect defaults to adaptive (matches the input); a concrete ratio can be forced.
26163
+ - Nothing visual connected \u2192 text-to-video. A concrete aspect ratio is required (21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 \u2014 no adaptive); Nodaro renders 16:9 unless one is picked.
26164
+
26165
+ **References (when reference media is attached)**
26166
+ - Refer to assets by ordinal in attachment order: "@Image 1", "Video 1", "Audio 1". Put the identity-critical asset first. (In the editor, the \`{image:N:label}\` / \`{video:N}\` / \`{audio:N}\` prompt tokens auto-emit this binding, so a wired reference and its mention stay in sync.)
26167
+ - Caps: 9 reference images; 3 reference videos, each 2-15s and \u226415s combined; 3 reference audio clips, \u226415s combined. Reference audio cannot be used alone \u2014 it must accompany an image or video reference.
26168
+ - Define each subject once, then reuse the label consistently ("the woman from @Image 1 \u2026 the woman opens the door"). A focused set of 4-5 assets beats maxing every cap.
26169
+ - Billing note: generated seconds AND reference-video input seconds bill at the same per-second rate; the first 5 input images are free and each extra image adds a small surcharge; audio input is free.
26170
+
26171
+ **Audio**
26172
+ - Audio is always generated \u2014 there is no on/off toggle. With reference audio attached, the model syncs speech to the supplied track (the platform's lip-sync surface routes image + voice line through this mode automatically).
26173
+ - Quoted dialogue in the prompt gives the model the line to perform; describe the voice in words when no reference audio is supplied.
26174
+
26175
+ **Duration & pacing**
26176
+ - 4-15 seconds, integer, default 6. Per-second pricing \u2014 a 15s clip costs ~3.7\xD7 a 4s clip, so pick the shortest duration that serves the shot.
26177
+ - One camera movement type per shot; chain actions with physical, quantified detail ("slowly raises a hand", "pushes hard off the ground") rather than abstract emotion words.
26178
+
26179
+ **Constraints**
26180
+ - There is NO negative-prompt parameter \u2014 all constraints belong in the prompt text itself: "keep it subtitle-free, do not generate a watermark, do not generate a logo, stable picture".`
26181
+ };
26120
26182
  var PROVIDER_PROMPT_DOCTRINES = [
26121
26183
  SEEDANCE_2_DOCTRINE,
26122
- KLING_AUDIO_DOCTRINE
26184
+ KLING_AUDIO_DOCTRINE,
26185
+ MINIMAX_H3_DOCTRINE
26123
26186
  ];
26124
26187
  var DOCTRINE_BY_PROVIDER = new Map(
26125
26188
  PROVIDER_PROMPT_DOCTRINES.flatMap((d) => d.providers.map((p) => [p, d]))
@@ -26299,6 +26362,8 @@ var PROVIDER_CAPABILITIES = {
26299
26362
  "seedance-2": "Seedance 2.0 \u2014 multimodal refs (9 images / 3 videos / 3 audio), native multi-track audio, multi-shot storytelling, 4-15s",
26300
26363
  "seedance-2-fast": "Seedance 2.0 Fast \u2014 same multimodal + audio capabilities, cheaper and quicker",
26301
26364
  "seedance-2-mini": "Seedance 2.0 Mini \u2014 same multimodal + audio capabilities, budget tier, 480p/720p, 4-15s",
26365
+ "seedance-2-5": "Seedance 2.5 \u2014 up to 30s in ONE shot (no stitching), wider multimodal refs (30 images / 10 videos / 10 audio), native audio, 480p/720p",
26366
+ "minimax-h3": "MiniMax Hailuo 3 \u2014 premium multimodal refs (9 images / 3 videos / 3 audio), always-on audio, 2K or 768P, 4-15s per-second pricing",
26302
26367
  "wan": "Versatile, good for animations and transformations",
26303
26368
  "wan-turbo": "Faster Wan generation",
26304
26369
  "hailuo-standard": "Standard quality, cost-effective",
@@ -26325,6 +26390,8 @@ var PROVIDER_CAPABILITIES = {
26325
26390
  "seedance-2": "Seedance 2.0 \u2014 start/end frame + multimodal refs, native audio, 4-15s",
26326
26391
  "seedance-2-fast": "Seedance 2.0 Fast \u2014 same capabilities, cheaper and quicker",
26327
26392
  "seedance-2-mini": "Seedance 2.0 Mini \u2014 same capabilities, budget tier, 480p/720p",
26393
+ "seedance-2-5": "Seedance 2.5 \u2014 start/end frame + wide multimodal refs, native audio, up to 30s, 480p/720p",
26394
+ "minimax-h3": "MiniMax Hailuo 3 \u2014 first/last frame + multimodal refs, always-on audio, 2K or 768P, 4-15s",
26328
26395
  "hailuo-2.3-pro": "Premium Hailuo animation",
26329
26396
  "hailuo-2.3": "Standard Hailuo animation",
26330
26397
  "hailuo-standard": "Cost-effective animation",
@@ -31335,7 +31402,24 @@ var FACTORY_SNIPPETS = [
31335
31402
  { id: "wardrobe-lock", name: "Wardrobe Lock", description: "Outfit continuity across shots and edits", text: "wearing exactly the same outfit as the reference \u2014 same garments, colors, fabrics, and accessories, unchanged", target: "prompt", media: B, category: "Identity & Consistency" },
31336
31403
  { id: "no-beautify", name: "No Beautify", description: "Stop the model 'improving' a face", text: "preserve natural skin texture, age lines, and asymmetries; do not beautify, smooth, slim, or rejuvenate the face", target: "prompt", media: I, category: "Identity & Consistency" },
31337
31404
  // ── Reference locks (prompt) — insert at the START of a reference prompt ──
31338
- { id: "reference-lock", name: "Reference Lock", description: "Default-deny + preserve likeness + compose into one image (full scenes)", text: "Do not use anything from reference images unless specified explicitly. All elements taken from reference images must preserve likeness. Compose them naturally into a single image.", target: "prompt", media: I, category: "Reference locks" },
31405
+ // Text comes from the shared constant, not a hand-written twin. This entry used
31406
+ // to carry its own wording — no face rules, likeness phrased as a passive —
31407
+ // which scored 0/4 on moving a garment between references where the merged
31408
+ // block scored 4/4 (see reference-rules.ts). A snippet is copied into the
31409
+ // prompt at INSERT time, so changing it here only affects future insertions.
31410
+ { id: "reference-lock", name: "Reference Lock", description: "Default-deny + preserve likeness + compose into one image (full scenes)", text: REFERENCE_RULES, target: "prompt", media: I, category: "Reference locks" },
31411
+ // The eyeline suppressor, kept OUT of Reference Lock on purpose: a portrait
31412
+ // or a piece to camera wants the eyeline. 4/4 on a brief where the lock alone
31413
+ // was 0/4, at no measured cost to identity or wardrobe.
31414
+ { id: "scene-frame", name: "Scene Frame", description: "Reads as a frame from a film, not a posed photo \u2014 nobody faces the lens", text: SCENE_FRAME_RULE, target: "prompt", media: I, category: "Reference locks" },
31415
+ // A PREFIX, not a sentence — it swallows the scene that follows it, which is
31416
+ // exactly why it costs nothing. The same idea written as a standalone claim
31417
+ // ("This image is a scene start frame of a video.") lost the lead's identity
31418
+ // in 3 of 3 draws. Goes at the very TOP, above the scene.
31419
+ { id: "film-still-of", name: "Film Still Of", description: 'Put at the very top, before the scene \u2014 lead with the shot size, e.g. "Medium wide\u2026"', text: `Medium wide ${FILM_STILL_PREFIX.charAt(0).toLowerCase()}${FILM_STILL_PREFIX.slice(1)}`, target: "prompt", media: I, category: "Reference locks" },
31420
+ // Goes at the very END. An example to edit — a different film wants a
31421
+ // different stock; what generalises is that the look comes LAST.
31422
+ { id: "cinematic-look", name: "Cinematic Look (16mm)", description: "Append at the END \u2014 film stock, lens, light and palette", text: CINEMATIC_LOOK_TAIL, target: "prompt", media: I, category: "Reference locks" },
31339
31423
  { id: "reference-extract", name: "Reference Extract", description: "Isolate only the specified elements \u2014 no scene, no figure", text: "Take only what is specified from the reference images. Do not take anything else.", target: "prompt", media: I, category: "Reference locks" },
31340
31424
  { id: "ghost-mannequin", name: "Ghost Mannequin", description: "Show worn garments without a wearer (product shot)", text: "Ghost-mannequin product shot: the garment in its natural worn shape, with no person, body, face, or mannequin visible.", target: "prompt", media: I, category: "Reference locks" },
31341
31425
  // ── Quality (prompt) ──
@@ -31459,6 +31543,7 @@ exports.CHARACTER_FX = CHARACTER_FX;
31459
31543
  exports.CHARACTER_FX_CATEGORY_LABELS = CHARACTER_FX_CATEGORY_LABELS;
31460
31544
  exports.CHARACTER_FX_CATEGORY_ORDER = CHARACTER_FX_CATEGORY_ORDER;
31461
31545
  exports.CHARACTER_FX_IDS = CHARACTER_FX_IDS;
31546
+ exports.CINEMATIC_LOOK_TAIL = CINEMATIC_LOOK_TAIL;
31462
31547
  exports.COLOR_LOOKS = COLOR_LOOKS;
31463
31548
  exports.COLOR_LOOK_CATEGORY_LABELS = COLOR_LOOK_CATEGORY_LABELS;
31464
31549
  exports.COLOR_LOOK_CATEGORY_ORDER = COLOR_LOOK_CATEGORY_ORDER;
@@ -31478,6 +31563,7 @@ exports.EXPOSURE_IDS = EXPOSURE_IDS;
31478
31563
  exports.EXPOSURE_SETTINGS = EXPOSURE_SETTINGS;
31479
31564
  exports.FACTORY_PRESETS = FACTORY_PRESETS;
31480
31565
  exports.FACTORY_SNIPPETS = FACTORY_SNIPPETS;
31566
+ exports.FILM_STILL_PREFIX = FILM_STILL_PREFIX;
31481
31567
  exports.FRAMINGS = FRAMINGS;
31482
31568
  exports.FRAMING_CATEGORY_LABELS = FRAMING_CATEGORY_LABELS;
31483
31569
  exports.FRAMING_CATEGORY_ORDER = FRAMING_CATEGORY_ORDER;
@@ -31562,9 +31648,12 @@ exports.PRODUCTION_STYLES = PRODUCTION_STYLES;
31562
31648
  exports.PROVIDER_CAPABILITIES = PROVIDER_CAPABILITIES;
31563
31649
  exports.PROVIDER_PROMPT_DOCTRINES = PROVIDER_PROMPT_DOCTRINES;
31564
31650
  exports.REFERENCE_IMAGE_ROLES = REFERENCE_IMAGE_ROLES;
31651
+ exports.REFERENCE_RULES = REFERENCE_RULES;
31652
+ exports.REFERENCE_RULES_MULTI_PERSON = REFERENCE_RULES_MULTI_PERSON;
31565
31653
  exports.REF_BINDING = REF_BINDING;
31566
31654
  exports.RENDER_QUALITIES = RENDER_QUALITIES;
31567
31655
  exports.RENDER_QUALITY_IDS = RENDER_QUALITY_IDS;
31656
+ exports.SCENE_FRAME_RULE = SCENE_FRAME_RULE;
31568
31657
  exports.SCENE_PROMPT_MAX_LENGTH = SCENE_PROMPT_MAX_LENGTH;
31569
31658
  exports.SETTINGS = SETTINGS;
31570
31659
  exports.SETTING_CATEGORY_LABELS = SETTING_CATEGORY_LABELS;
@@ -31666,6 +31755,7 @@ exports.computeLlmChatFields = computeLlmChatFields;
31666
31755
  exports.computeNodePrompt = computeNodePrompt;
31667
31756
  exports.expandImagePositionRefs = expandImagePositionRefs;
31668
31757
  exports.expandImageRefTokens = expandImageRefTokens;
31758
+ exports.filmStillPrefix = filmStillPrefix;
31669
31759
  exports.getActionFx = getActionFx;
31670
31760
  exports.getActionFxLabel = getActionFxLabel;
31671
31761
  exports.getActionFxPromptHint = getActionFxPromptHint;
@@ -31800,6 +31890,7 @@ exports.migratePersonValue = migratePersonValue;
31800
31890
  exports.pickerFanoutTargets = pickerFanoutTargets;
31801
31891
  exports.projectPickerCatalog = projectPickerCatalog;
31802
31892
  exports.promptBindsFirstFrame = promptBindsFirstFrame;
31893
+ exports.referenceRulesBlock = referenceRulesBlock;
31803
31894
  exports.renderStructuredFields = renderStructuredFields;
31804
31895
  exports.resolveBrandInput = resolveBrandInput;
31805
31896
  exports.resolveCharacterMentions = resolveCharacterMentions;