@nodaro/prompts 1.0.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.
Files changed (150) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +27 -0
  3. package/dist/index.cjs +21240 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +3599 -0
  6. package/dist/index.d.ts +3599 -0
  7. package/dist/index.js +20854 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +49 -0
  10. package/src/__tests__/__snapshots__/prompt-builder-segments.test.ts.snap +65 -0
  11. package/src/__tests__/action-fx.test.ts +155 -0
  12. package/src/__tests__/apply-picker-json.test.ts +50 -0
  13. package/src/__tests__/assemble-image-input.test.ts +248 -0
  14. package/src/__tests__/assemble-suno-input.test.ts +283 -0
  15. package/src/__tests__/brand-tokens.test.ts +81 -0
  16. package/src/__tests__/build-image-prompt-element-injection.test.ts +118 -0
  17. package/src/__tests__/build-image-prompt-hybrid-format.test.ts +131 -0
  18. package/src/__tests__/build-image-prompt-mentions.test.ts +809 -0
  19. package/src/__tests__/build-image-prompt-reference-cap.test.ts +57 -0
  20. package/src/__tests__/build-image-prompt-reference-numbering.test.ts +237 -0
  21. package/src/__tests__/build-image-prompt-reference-order.test.ts +313 -0
  22. package/src/__tests__/camera-motions-from-connections.test.ts +71 -0
  23. package/src/__tests__/catalog-gapfill.test.ts +53 -0
  24. package/src/__tests__/character-convergence-image.test.ts +217 -0
  25. package/src/__tests__/character-default-role-image.test.ts +167 -0
  26. package/src/__tests__/character-default-role-video.test.ts +168 -0
  27. package/src/__tests__/character-default-role.test.ts +70 -0
  28. package/src/__tests__/character-fx.test.ts +200 -0
  29. package/src/__tests__/entity-prompts-location.test.ts +97 -0
  30. package/src/__tests__/entity-prompts.test.ts +240 -0
  31. package/src/__tests__/expand-extra-refs-role.test.ts +50 -0
  32. package/src/__tests__/factory-presets.test.ts +1045 -0
  33. package/src/__tests__/factory-snippets.test.ts +68 -0
  34. package/src/__tests__/framing-multi.test.ts +71 -0
  35. package/src/__tests__/framing-vantage.test.ts +39 -0
  36. package/src/__tests__/i18n-entry-completeness.test.ts +269 -0
  37. package/src/__tests__/identity-lock.test.ts +46 -0
  38. package/src/__tests__/instrumentation.test.ts +68 -0
  39. package/src/__tests__/lighting-multi.test.ts +68 -0
  40. package/src/__tests__/location-convergence-image.test.ts +124 -0
  41. package/src/__tests__/mention-lock-flag.test.ts +499 -0
  42. package/src/__tests__/multi-picker-spec.test.ts +71 -0
  43. package/src/__tests__/music-genre.test.ts +103 -0
  44. package/src/__tests__/music-mood.test.ts +87 -0
  45. package/src/__tests__/object-creature-convergence-image.test.ts +105 -0
  46. package/src/__tests__/parameter-prompt-hint.test.ts +270 -0
  47. package/src/__tests__/parameter-registry-sync.test.ts +243 -0
  48. package/src/__tests__/person-age.test.ts +80 -0
  49. package/src/__tests__/person-analyzer-invariants.test.ts +47 -0
  50. package/src/__tests__/person-body-axes.test.ts +67 -0
  51. package/src/__tests__/person-facial-geometry.test.ts +156 -0
  52. package/src/__tests__/person-regional-aesthetic.test.ts +161 -0
  53. package/src/__tests__/person-sections.test.ts +18 -0
  54. package/src/__tests__/picker-analyzer-registry.test.ts +108 -0
  55. package/src/__tests__/picker-catalogs-project.test.ts +85 -0
  56. package/src/__tests__/picker-catalogs.test.ts +53 -0
  57. package/src/__tests__/picker-limits.test.ts +20 -0
  58. package/src/__tests__/prompt-builder-segments.test.ts +183 -0
  59. package/src/__tests__/prompt-builder-structured-fields.test.ts +40 -0
  60. package/src/__tests__/prompt-builder.test.ts +1773 -0
  61. package/src/__tests__/prompt-wizard-categories.test.ts +31 -0
  62. package/src/__tests__/provider-prompt-doctrine.test.ts +49 -0
  63. package/src/__tests__/resolve-prompt-append.test.ts +58 -0
  64. package/src/__tests__/resolve-prompt.test.ts +44 -0
  65. package/src/__tests__/role-picker-shared.test.ts +208 -0
  66. package/src/__tests__/seedance-2-inputs.test.ts +173 -0
  67. package/src/__tests__/seedance-extend.test.ts +44 -0
  68. package/src/__tests__/sound-aggregator.test.ts +350 -0
  69. package/src/__tests__/style-presets.test.ts +34 -0
  70. package/src/__tests__/temporal-multi.test.ts +74 -0
  71. package/src/__tests__/transitions.test.ts +213 -0
  72. package/src/__tests__/video-reference-features.test.ts +41 -0
  73. package/src/__tests__/video-reference-leading-refs.test.ts +90 -0
  74. package/src/__tests__/video-reference-resolver.test.ts +233 -0
  75. package/src/__tests__/video-reference-roles.test.ts +96 -0
  76. package/src/__tests__/voice-character.test.ts +48 -0
  77. package/src/__tests__/voice-delivery.test.ts +41 -0
  78. package/src/__tests__/wardrobe.test.ts +25 -0
  79. package/src/action-fx.ts +255 -0
  80. package/src/aesthetic.ts +435 -0
  81. package/src/assemble-image-input.ts +236 -0
  82. package/src/assemble-suno-input.ts +147 -0
  83. package/src/atmosphere.ts +104 -0
  84. package/src/backdrop.ts +131 -0
  85. package/src/brand-tokens.ts +154 -0
  86. package/src/camera-format.ts +76 -0
  87. package/src/camera-motions.ts +615 -0
  88. package/src/character-fx.ts +274 -0
  89. package/src/color-look.ts +103 -0
  90. package/src/composition-effects.ts +67 -0
  91. package/src/entity-prompts.ts +231 -0
  92. package/src/era.ts +292 -0
  93. package/src/exposure-settings.ts +142 -0
  94. package/src/factory-presets/generate-image.ts +1644 -0
  95. package/src/factory-presets/generate-video.ts +1116 -0
  96. package/src/factory-presets/index.ts +46 -0
  97. package/src/factory-presets/lottie-overlay.ts +166 -0
  98. package/src/factory-presets/motion-graphics.ts +350 -0
  99. package/src/factory-presets/music.ts +734 -0
  100. package/src/factory-presets/sfx.ts +136 -0
  101. package/src/factory-presets/shared-image.ts +207 -0
  102. package/src/factory-presets/switchx.ts +65 -0
  103. package/src/factory-presets/text.ts +292 -0
  104. package/src/factory-presets/types.ts +51 -0
  105. package/src/factory-presets/video-edit.ts +136 -0
  106. package/src/factory-presets/voice.ts +172 -0
  107. package/src/factory-presets.ts +2 -0
  108. package/src/factory-snippets/catalog.ts +105 -0
  109. package/src/factory-snippets/index.ts +16 -0
  110. package/src/factory-snippets/types.ts +33 -0
  111. package/src/framing.ts +634 -0
  112. package/src/held-prop.ts +187 -0
  113. package/src/identity-lock.ts +213 -0
  114. package/src/index.ts +66 -0
  115. package/src/instrumentation.ts +337 -0
  116. package/src/lens.ts +59 -0
  117. package/src/lighting.ts +229 -0
  118. package/src/loop-subject.ts +276 -0
  119. package/src/materials.ts +184 -0
  120. package/src/mood.ts +186 -0
  121. package/src/music-genre.ts +662 -0
  122. package/src/music-mood.ts +137 -0
  123. package/src/object-asset-presets.ts +81 -0
  124. package/src/parameter-prompt-hint.ts +281 -0
  125. package/src/person.ts +1368 -0
  126. package/src/photo-genre.ts +151 -0
  127. package/src/photographer.ts +612 -0
  128. package/src/picker-analyzer-registry.ts +374 -0
  129. package/src/picker-catalogs.ts +858 -0
  130. package/src/pose.ts +246 -0
  131. package/src/post-process-effects.ts +94 -0
  132. package/src/prompt-builder-structured-fields.ts +116 -0
  133. package/src/prompt-builder.ts +2964 -0
  134. package/src/prompt-templates.ts +50 -0
  135. package/src/prompt-wizard-categories.ts +334 -0
  136. package/src/provider-prompt-doctrine.ts +85 -0
  137. package/src/render-quality.ts +89 -0
  138. package/src/resolve-prompt.ts +120 -0
  139. package/src/seedance-2-inputs.ts +100 -0
  140. package/src/setting.ts +130 -0
  141. package/src/sound-aggregator.ts +241 -0
  142. package/src/style-presets.ts +162 -0
  143. package/src/style.ts +99 -0
  144. package/src/styling.ts +585 -0
  145. package/src/temporal.ts +151 -0
  146. package/src/transitions.ts +333 -0
  147. package/src/video-reference-resolver.ts +823 -0
  148. package/src/voice-character.ts +237 -0
  149. package/src/voice-delivery.ts +142 -0
  150. package/src/wardrobe.ts +179 -0
@@ -0,0 +1,136 @@
1
+ import type { FactoryPreset } from "./types.js"
2
+
3
+ export const TEXT_TO_AUDIO_PRESETS: readonly FactoryPreset[] = [
4
+ // ── Transitions & Impacts ────────────────────────────────────────────────
5
+ {
6
+ id: "text-to-audio/whoosh",
7
+ name: "Whoosh Transition",
8
+ description: "Fast clean swoosh.",
9
+ group: "Transitions & Impacts",
10
+ data: { provider: "elevenlabs-sfx", duration: 1, promptInfluence: 0.7, prompt: "fast clean whoosh transition swoosh, smooth air movement" },
11
+ },
12
+ {
13
+ id: "text-to-audio/impact-boom",
14
+ name: "Impact / Boom",
15
+ description: "Deep cinematic hit.",
16
+ group: "Transitions & Impacts",
17
+ data: { provider: "elevenlabs-sfx", duration: 2, promptInfluence: 0.7, prompt: "deep cinematic impact boom, powerful sub hit with tail" },
18
+ },
19
+ {
20
+ id: "text-to-audio/riser",
21
+ name: "Riser / Build-Up",
22
+ description: "Rising tension sweep.",
23
+ group: "Transitions & Impacts",
24
+ data: { provider: "elevenlabs-sfx", duration: 4, promptInfluence: 0.6, prompt: "tension riser build-up sweep rising to a peak" },
25
+ },
26
+
27
+ // ── Ambiences (loopable) ─────────────────────────────────────────────────
28
+ {
29
+ id: "text-to-audio/rain-ambience",
30
+ name: "Rain Ambience",
31
+ description: "Steady gentle rain.",
32
+ group: "Ambiences (loopable)",
33
+ data: { provider: "elevenlabs-sfx", duration: 22, loop: true, promptInfluence: 0.4, prompt: "steady gentle rain ambience with distant soft thunder" },
34
+ },
35
+ {
36
+ id: "text-to-audio/forest-ambience",
37
+ name: "Forest Ambience",
38
+ description: "Birds and rustling leaves.",
39
+ group: "Ambiences (loopable)",
40
+ data: { provider: "elevenlabs-sfx", duration: 22, loop: true, promptInfluence: 0.4, prompt: "calm forest ambience, birdsong, gentle wind through leaves" },
41
+ },
42
+ {
43
+ id: "text-to-audio/fire-crackle",
44
+ name: "Fire Crackle",
45
+ description: "Cozy fireplace loop.",
46
+ group: "Ambiences (loopable)",
47
+ data: { provider: "elevenlabs-sfx", duration: 22, loop: true, promptInfluence: 0.4, prompt: "cozy fireplace crackling, warm popping embers" },
48
+ },
49
+ {
50
+ id: "text-to-audio/scifi-drone",
51
+ name: "Sci-Fi Drone",
52
+ description: "Ominous ambient hum.",
53
+ group: "Ambiences (loopable)",
54
+ data: { provider: "elevenlabs-sfx", duration: 22, loop: true, promptInfluence: 0.5, prompt: "low sci-fi ambient drone, ominous spaceship hum" },
55
+ },
56
+
57
+ // ── UI & Stingers ────────────────────────────────────────────────────────
58
+ {
59
+ id: "text-to-audio/ui-click",
60
+ name: "UI Click / Pop",
61
+ description: "Crisp interface tap.",
62
+ group: "UI & Stingers",
63
+ data: { provider: "elevenlabs-sfx", duration: 1, promptInfluence: 0.8, prompt: "crisp UI click pop, clean modern interface tap" },
64
+ },
65
+ {
66
+ id: "text-to-audio/notification",
67
+ name: "Notification Chime",
68
+ description: "Bright pleasant alert.",
69
+ group: "UI & Stingers",
70
+ data: { provider: "elevenlabs-sfx", duration: 2, promptInfluence: 0.8, prompt: "pleasant bright notification chime, short and clean" },
71
+ },
72
+ {
73
+ id: "text-to-audio/applause",
74
+ name: "Applause / Crowd",
75
+ description: "Enthusiastic cheering.",
76
+ group: "UI & Stingers",
77
+ data: { provider: "elevenlabs-sfx", duration: 5, promptInfluence: 0.6, prompt: "enthusiastic crowd applause and cheering" },
78
+ },
79
+ // ── Foley & Action ───────────────────────────────────────────────────────
80
+ {
81
+ id: "text-to-audio/footsteps",
82
+ name: "Footsteps",
83
+ description: "Walking on a hard floor.",
84
+ group: "Foley & Action",
85
+ data: { provider: "elevenlabs-sfx", duration: 4, promptInfluence: 0.6, prompt: "footsteps walking on a hard wooden floor, steady pace" },
86
+ },
87
+ {
88
+ id: "text-to-audio/door",
89
+ name: "Door Open / Close",
90
+ description: "Creak then shut.",
91
+ group: "Foley & Action",
92
+ data: { provider: "elevenlabs-sfx", duration: 3, promptInfluence: 0.7, prompt: "wooden door slowly creaking open then closing with a soft latch" },
93
+ },
94
+ {
95
+ id: "text-to-audio/glass-break",
96
+ name: "Glass Break",
97
+ description: "Sharp shatter.",
98
+ group: "Foley & Action",
99
+ data: { provider: "elevenlabs-sfx", duration: 2, promptInfluence: 0.8, prompt: "glass shattering, sharp break with falling shards" },
100
+ },
101
+ {
102
+ id: "text-to-audio/keyboard-typing",
103
+ name: "Keyboard Typing",
104
+ description: "Mechanical key clicks.",
105
+ group: "Foley & Action",
106
+ data: { provider: "elevenlabs-sfx", duration: 5, promptInfluence: 0.6, prompt: "fast mechanical keyboard typing, crisp key clicks" },
107
+ },
108
+ {
109
+ id: "text-to-audio/explosion",
110
+ name: "Explosion",
111
+ description: "Deep boom + debris.",
112
+ group: "Foley & Action",
113
+ data: { provider: "elevenlabs-sfx", duration: 3, promptInfluence: 0.7, prompt: "large explosion, deep boom with rumbling debris and tail" },
114
+ },
115
+ {
116
+ id: "text-to-audio/magic-sparkle",
117
+ name: "Magic Sparkle",
118
+ description: "Shimmering chime FX.",
119
+ group: "Foley & Action",
120
+ data: { provider: "elevenlabs-sfx", duration: 2, promptInfluence: 0.7, prompt: "magical sparkle shimmer, twinkling fairy-dust chimes" },
121
+ },
122
+ {
123
+ id: "text-to-audio/camera-shutter",
124
+ name: "Camera Shutter",
125
+ description: "DSLR click.",
126
+ group: "Foley & Action",
127
+ data: { provider: "elevenlabs-sfx", duration: 1, promptInfluence: 0.8, prompt: "DSLR camera shutter click, single crisp photo snap" },
128
+ },
129
+ {
130
+ id: "text-to-audio/error-buzzer",
131
+ name: "Error Buzzer",
132
+ description: "Wrong / fail tone.",
133
+ group: "Foley & Action",
134
+ data: { provider: "elevenlabs-sfx", duration: 1, promptInfluence: 0.8, prompt: "short error buzzer, negative fail tone" },
135
+ },
136
+ ]
@@ -0,0 +1,207 @@
1
+ import type { FactoryPreset } from "./types.js"
2
+
3
+ /**
4
+ * Selective-stylization presets shared by `modify-image` (transform an input photo) and
5
+ * `generate-image` (use a connected reference image). `modify-image` is slated for deprecation in
6
+ * favor of `generate-image`, so the catalog lives in ONE place to prevent the two from drifting —
7
+ * when `modify-image` is removed, just drop its key from `FACTORY_PRESETS` below. `nano-banana-pro`
8
+ * is a valid provider for both nodes' enums (IMAGE_GEN_PROVIDERS and MODIFY_IMAGE_PROVIDERS).
9
+ */
10
+ const STYLIZED_SUBJECT: ReadonlyArray<{
11
+ readonly slug: string
12
+ readonly name: string
13
+ readonly description: string
14
+ readonly data: Readonly<Record<string, unknown>>
15
+ }> = [
16
+ {
17
+ slug: "cartoon-person-real-world",
18
+ name: "Cartoon Person, Real World",
19
+ description: "Subject → 3D cartoon, rest stays photoreal.",
20
+ data: {
21
+ provider: "nano-banana-pro",
22
+ prompt:
23
+ "Restyle ONLY the person in the reference image into a polished 3D animated character — Pixar/Disney sensibility: soft subsurface skin shading, expressive oversized eyes, smoothly stylized hair, clean rounded forms. Preserve their identity, exact pose, expression, and framing. Everything else stays untouched and fully photorealistic: keep the original background, props, clothing fabric and texture, and the scene's real lighting, shadows, and color grade. Composite the stylized figure into the real plate so it sits naturally — matched light direction, contact shadows, and depth.",
24
+ negativePrompt:
25
+ "changing the background, altering the unstylized parts, restyling clothing fabric or props, relighting the scene, distorting the subject, changing identity or pose, flat 2D look, extra limbs, deformed hands, warped face",
26
+ },
27
+ },
28
+ {
29
+ slug: "caricature-real-photo",
30
+ name: "Caricature, Real Photo",
31
+ description: "Exaggerated cartoon head on a real scene.",
32
+ data: {
33
+ provider: "nano-banana-pro",
34
+ prompt:
35
+ "Turn ONLY the person into a playful hand-illustrated caricature: enlarge the head, exaggerate their most recognizable features, and amplify expression with bold, confident linework and clean cel-style shading — while keeping them clearly identifiable. Leave everything else exactly as shot and photorealistic: the body proportions below the neck, the clothing, the background, props, and the scene's real lighting and shadows remain unchanged. Blend the caricature head onto the real photo seamlessly with matched lighting and a believable neckline.",
36
+ negativePrompt:
37
+ "changing the background, altering the unstylized parts, restyling the body or clothing, relighting the scene, distorting the subject beyond intent, losing likeness, photorealistic head, harsh seam at the neck, deformed features",
38
+ },
39
+ },
40
+ {
41
+ slug: "anime-person-real-bg",
42
+ name: "Anime Person, Real Background",
43
+ description: "Subject → 2D anime, real environment.",
44
+ data: {
45
+ provider: "nano-banana-pro",
46
+ prompt:
47
+ "Restyle ONLY the person as a crisp 2D anime character — clean ink outlines, flat cel shading with sharp shadow shapes, glossy stylized hair, and expressive anime eyes — while preserving their identity, pose, expression, and framing. Keep the real-world background, environment, props, and the original photographic lighting, shadows, and color completely untouched and photorealistic. Integrate the 2D figure into the live-action plate so the light direction and contact shadows read naturally.",
48
+ negativePrompt:
49
+ "changing the background, altering the unstylized parts, restyling the environment or props, relighting the scene, distorting the subject, 3D render look, photorealistic skin on the subject, extra fingers, warped anatomy, broken outlines",
50
+ },
51
+ },
52
+ {
53
+ slug: "real-person-cartoon-world",
54
+ name: "Real Person, Cartoon World",
55
+ description: "Inverse — real subject, stylized world.",
56
+ data: {
57
+ provider: "nano-banana-pro",
58
+ prompt:
59
+ "Inverse stylization: keep the PERSON completely photorealistic and unchanged — real skin, hair, clothing, identity, pose, and framing all preserved exactly. Restyle ONLY the surrounding world into a vibrant, hand-crafted cartoon environment: simplified painterly shapes, bold saturated colors, soft graphic shading, and whimsical stylized props and scenery. Light the real person to match the cartoon world's color and direction so they sit convincingly inside it, with believable contact shadows.",
60
+ negativePrompt:
61
+ "stylizing or cartoonifying the person, altering the subject's skin, face, hair or clothing, distorting the subject, changing the subject's pose, photorealistic background, flat lifeless scene, harsh cut-out edges around the person",
62
+ },
63
+ },
64
+ {
65
+ slug: "claymation-figure-real-set",
66
+ name: "Claymation Figure, Real Set",
67
+ description: "Subject → clay figure, real surroundings.",
68
+ data: {
69
+ provider: "nano-banana-pro",
70
+ prompt:
71
+ "Restyle ONLY the person into a tactile stop-motion claymation figure — molded plasticine surface with visible fingerprints, tool marks, subtle seams, and a soft matte sheen, in the handmade spirit of Aardman puppets — while keeping their identity, pose, expression, and framing. Everything else stays exactly as shot and photorealistic: the real background, set, props, and the scene's natural lighting and shadows are unchanged. Seat the clay figure into the real plate with matched light direction and grounded contact shadows.",
72
+ negativePrompt:
73
+ "changing the background or set, altering the unstylized parts, restyling props, relighting the scene, distorting the subject, smooth plastic toy look, glossy CGI surface, melted or deformed figure, missing fingerprints, extra limbs",
74
+ },
75
+ },
76
+ ]
77
+
78
+ /** Build the Stylized Subject presets for a node type (id = `<nodeType>/<slug>`). */
79
+ export function stylizedSubjectFor(nodeType: string): FactoryPreset[] {
80
+ return STYLIZED_SUBJECT.map((p) => ({
81
+ id: `${nodeType}/${p.slug}`,
82
+ name: p.name,
83
+ description: p.description,
84
+ group: "Stylized Subject",
85
+ data: p.data,
86
+ }))
87
+ }
88
+
89
+ /**
90
+ * Image-edit presets shared by `modify-image` and `generate-image` (with a connected reference
91
+ * image) — common photo-edit operations where the instruction lives in the prompt. Same
92
+ * single-source rationale as STYLIZED_SUBJECT; when modify-image is removed, generate-image keeps them.
93
+ */
94
+ const IMAGE_EDITS: ReadonlyArray<{
95
+ readonly slug: string
96
+ readonly name: string
97
+ readonly description: string
98
+ readonly data: Readonly<Record<string, unknown>>
99
+ }> = [
100
+ {
101
+ slug: "background-remove",
102
+ name: "Remove Background",
103
+ description: "Cut out the subject on white.",
104
+ data: {
105
+ provider: "nano-banana-pro",
106
+ prompt:
107
+ "Cleanly cut the main subject out of the reference image and place it on a pure, solid white background. Trace a crisp, accurate edge — preserve fine detail like hair strands, fur, and translucent or wispy edges — with no leftover background pixels and no color fringing. Keep the subject itself completely unchanged: same pose, lighting, color, and full silhouette, nothing cropped.",
108
+ negativePrompt:
109
+ "fringing, color halo, cut-off subject, leftover background, jagged or rough edges, missing hair detail, semi-transparent matte, drop shadow, gray or off-white background, altering the subject",
110
+ },
111
+ },
112
+ {
113
+ slug: "background-replace",
114
+ name: "Replace Background",
115
+ description: "Swap in a new scene.",
116
+ data: {
117
+ provider: "nano-banana-pro",
118
+ prompt:
119
+ "Replace the background behind the subject with {scene || a sunlit Mediterranean terrace}. Keep the subject perfectly unchanged — identity, pose, edges, and proportions intact — and composite it into the new scene so it looks truly photographed there: relight the subject's rim and ambient tones to match the new environment, cast believable contact shadows, and match perspective, depth of field, and color grade.",
120
+ negativePrompt:
121
+ "altering the subject, changing the subject's pose or proportions, fringing, halo, floating subject, missing or wrong-direction shadows, mismatched lighting, flat composite, harsh cut-out edges, perspective mismatch",
122
+ },
123
+ },
124
+ {
125
+ slug: "colorize",
126
+ name: "Colorize B&W Photo",
127
+ description: "Natural color from grayscale.",
128
+ data: {
129
+ provider: "nano-banana-pro",
130
+ prompt:
131
+ "Colorize this black-and-white photograph with natural, historically plausible color. Give skin realistic, even tones, and assign believable hues to clothing, foliage, sky, and materials. Preserve every original detail, grain, contrast, and the exact composition — add color only, never invent or remove content.",
132
+ negativePrompt:
133
+ "oversaturated, anachronistic colors, neon or cartoon tones, color bleeding outside edges, blotchy or uneven skin, lost detail, altered composition, added or hallucinated objects, washed-out contrast",
134
+ },
135
+ },
136
+ {
137
+ slug: "restore-photo",
138
+ name: "Restore Old Photo",
139
+ description: "Repair scratches, denoise, sharpen.",
140
+ data: {
141
+ provider: "nano-banana-pro",
142
+ prompt:
143
+ "Restore this old, damaged photograph: remove scratches, dust, creases, stains, and noise, repair torn or missing areas by reconstructing what is plainly there, and gently recover sharpness and tonal detail. Keep the result authentic and true to the original — preserve identity, era, natural film grain, and composition. Repair only; do not beautify, restyle, or invent new features.",
144
+ negativePrompt:
145
+ "over-smoothed, plastic skin, waxy or airbrushed look, hallucinated details, invented faces or objects, changing identity or age, removing authentic grain, modern restyling, oversharpening halos, altered composition",
146
+ },
147
+ },
148
+ {
149
+ slug: "relight",
150
+ name: "Relight Scene",
151
+ description: "New lighting, same subject.",
152
+ data: {
153
+ provider: "nano-banana-pro",
154
+ prompt:
155
+ "Relight the image with {lighting style || soft golden-hour key light from the left}. Re-derive highlights, shadows, ambient fill, and color temperature consistently across the whole frame for a believable, physically plausible result. Keep the subject, pose, expression, materials, and composition completely unchanged — only the lighting changes.",
156
+ negativePrompt:
157
+ "changing the subject, pose, expression, or composition, altering materials or clothing, flat or inconsistent lighting, blown-out highlights, crushed shadows, color casts on skin, double or contradictory light directions, repositioning anything",
158
+ },
159
+ },
160
+ {
161
+ slug: "restyle-whole",
162
+ name: "Restyle (whole image)",
163
+ description: "Apply an art style to everything.",
164
+ data: {
165
+ provider: "nano-banana-pro",
166
+ prompt:
167
+ "Restyle the entire image in a {art style || soft watercolor illustration} look, applying the style consistently to the subject, background, and every element. Keep the composition, subject placement, and the subject clearly recognizable — reinterpret texture, color, and rendering, not the underlying content or layout.",
168
+ negativePrompt:
169
+ "changing the composition or layout, moving or removing the subject, losing recognizability, applying the style to only part of the image, photorealistic patches, added or hallucinated objects, distorted anatomy, inconsistent style across the frame",
170
+ },
171
+ },
172
+ {
173
+ slug: "doodle-overlay",
174
+ name: "Doodle Overlay",
175
+ description: "Hand-drawn marker doodles on top — photo stays untouched.",
176
+ data: {
177
+ provider: "nano-banana-pro",
178
+ prompt:
179
+ "Layer playful hand-drawn doodles ON TOP of the reference photo while keeping every pixel of the underlying photograph completely unchanged — same people, same colors, same lighting, same crop. Doodle style: wobbly hand-drawn felt-tip marker lines in white with a few yellow accents, like quick sketches on a printed photo. Add: loose outline traces hugging one or two key shapes, small sparkles and stars, a hand-drawn thought cloud or speech bubble with a short witty handwritten phrase that reacts to what is actually happening in the photo, and simple arrows or underlines pointing at fun details. Outlines only — never fill shapes with color. Never cover faces or the main focal point; place doodles in empty areas like sky, walls or margins. Keep it balanced: four to seven doodle elements total, charming and confident, not cluttered. The photo is the hero — the doodles are the seasoning.",
180
+ negativePrompt:
181
+ "altered photo, restyled or recolored scene, redrawn subject, covered faces, filled color shapes, digital sticker or emoji look, vector clipart, cluttered doodles, garbled or misspelled handwriting, watermark, blurry",
182
+ },
183
+ },
184
+ {
185
+ slug: "doodle-overlay-expressive",
186
+ name: "Doodle Overlay · Expressive",
187
+ description: "Looser free-form doodles — the model improvises.",
188
+ data: {
189
+ provider: "nano-banana-pro",
190
+ prompt:
191
+ "Decorate the reference photo with expressive hand-drawn doodles layered on top, keeping the underlying photograph itself completely unchanged. Free, confident hand-drawn marker linework — wobbly outlines, sparkles, squiggles, little flames or hearts where they fit the mood, and a short handwritten phrase that responds cleverly to the content of the photo (never a generic cliché). Mix of white and one or two bright accent colors. Outline style only, no filled shapes. Compose the doodles around the subject — never on top of faces or the focal point — using empty areas and edges. Loose, playful, zine-like energy: it should feel like a bored genius doodled on a printed photo. Keep the original image pixels intact beneath the doodle layer.",
192
+ negativePrompt:
193
+ "altered photo, restyled or recolored scene, covered faces, filled color blocks, sticker or clipart look, cliché phrases, garbled or misspelled handwriting, cluttered composition, watermark, blurry",
194
+ },
195
+ },
196
+ ]
197
+
198
+ /** Build the Edits presets for a node type (id = `<nodeType>/<slug>`). */
199
+ export function editsFor(nodeType: string): FactoryPreset[] {
200
+ return IMAGE_EDITS.map((p) => ({
201
+ id: `${nodeType}/${p.slug}`,
202
+ name: p.name,
203
+ description: p.description,
204
+ group: "Edits",
205
+ data: p.data,
206
+ }))
207
+ }
@@ -0,0 +1,65 @@
1
+ import type { FactoryPreset } from "./types.js"
2
+
3
+ // SwitchX (Beeble) relight & composite starting points — one per common job,
4
+ // so users get a tuned prompt + the right alpha mode instead of a blank node.
5
+ // Presets set alphaMode + a starter prompt (and keyframe for select); they
6
+ // deliberately leave resolution alone so they don't override the user's choice.
7
+ // A connected reference image is the biggest quality lever for all of these.
8
+ export const SWITCHX_PRESETS: readonly FactoryPreset[] = [
9
+ {
10
+ id: "switchx/relight-subject",
11
+ name: "Relight Subject",
12
+ description: "Auto-mask the subject and relight it to match a reference.",
13
+ group: "Relight & Composite",
14
+ data: {
15
+ alphaMode: "auto",
16
+ prompt:
17
+ "Relight the subject to match the reference: match its colour temperature, key-light direction and intensity, and add matching contact shadows. Keep the subject's motion, pose and identity unchanged.",
18
+ },
19
+ },
20
+ {
21
+ id: "switchx/swap-background",
22
+ name: "Swap Background",
23
+ description: "Keep the subject, replace the background, relight to fit.",
24
+ group: "Relight & Composite",
25
+ data: {
26
+ alphaMode: "auto",
27
+ prompt:
28
+ "Keep the foreground subject and replace the background with the environment from the reference. Relight the subject so it sits naturally in the new scene — match light direction, colour and shadows.",
29
+ },
30
+ },
31
+ {
32
+ id: "switchx/restyle-scene",
33
+ name: "Restyle Whole Scene",
34
+ description: "No mask — restyle the entire frame from a reference/prompt.",
35
+ group: "Relight & Composite",
36
+ data: {
37
+ alphaMode: "fill",
38
+ prompt:
39
+ "Restyle the entire frame to match the reference look — colour grade, lighting and mood — while preserving the original motion, composition and timing.",
40
+ },
41
+ },
42
+ {
43
+ id: "switchx/masked-composite",
44
+ name: "Masked Composite",
45
+ description: "Precise control via a one-frame mask (wire a Generate Mask node).",
46
+ group: "Relight & Composite",
47
+ data: {
48
+ alphaMode: "select",
49
+ alphaKeyframeIndex: 0,
50
+ prompt:
51
+ "Composite the masked region against the reference and relight it to match. Leave everything outside the mask untouched.",
52
+ },
53
+ },
54
+ {
55
+ id: "switchx/frame-accurate-matte",
56
+ name: "Frame-Accurate Matte",
57
+ description: "Exact per-frame control via a supplied alpha matte video.",
58
+ group: "Relight & Composite",
59
+ data: {
60
+ alphaMode: "custom",
61
+ prompt:
62
+ "Composite using the supplied per-frame matte and relight the kept region to match the reference. Preserve the original motion.",
63
+ },
64
+ },
65
+ ]