@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,76 @@
1
+ /**
2
+ * Canonical catalog of camera / film-stock choices.
3
+ *
4
+ * Capture-medium dimension of a shot — the physical or simulated sensor / film
5
+ * stock and its associated grain, color science, and aspect treatment. Independent
6
+ * of optics (lens), framing (shot size + composition), and camera motion.
7
+ *
8
+ * Shared between the picker UI and the prompt-hint injection on both the
9
+ * frontend DAG executor and the backend orchestrator.
10
+ */
11
+
12
+ export interface CameraFormat {
13
+ readonly id: string
14
+ readonly label: string
15
+ readonly description: string
16
+ readonly promptHint: string
17
+ }
18
+
19
+ export const CAMERA_FORMATS: ReadonlyArray<CameraFormat> = [
20
+ // Film stocks
21
+ { id: "35mm-film", label: "35mm Film", description: "Classic cinema film grain", promptHint: "shot on 35mm film, classic cinematic grain texture and color science" },
22
+ { id: "16mm-film", label: "16mm Film", description: "Indie / documentary grain", promptHint: "shot on 16mm film, indie documentary grain with characteristic muted tones" },
23
+ { id: "super-8", label: "Super 8", description: "Vintage 8mm home-movie look", promptHint: "shot on Super 8 film, soft vintage grain with warm color cast and subtle gate weave" },
24
+ { id: "imax-70mm", label: "IMAX 70mm", description: "Large-format pristine clarity", promptHint: "shot on IMAX 70mm film, ultra-high-resolution large-format with pristine clarity and rich tonal depth" },
25
+ { id: "anamorphic-scope", label: "Anamorphic Scope", description: "2.39:1 widescreen cinema look", promptHint: "shot in anamorphic scope, 2.39:1 widescreen aspect ratio with horizontal lens flares and oval bokeh" },
26
+ // Modern digital
27
+ { id: "arri-alexa", label: "Arri Alexa", description: "Premium digital cinema", promptHint: "shot on Arri Alexa, premium digital cinema with Arri color science and clean shadows" },
28
+ { id: "alexa-65", label: "ARRI Alexa 65", description: "Large-format 65mm IMAX-class cinema", promptHint: "shot on an ARRI Alexa 65 large-format cinema camera, the IMAX-class 65mm sensor delivering creamy bokeh, immense tonal latitude, and flagship Hollywood-blockbuster image quality" },
29
+ { id: "sony-venice", label: "Sony Venice", description: "Full-frame dual-base-ISO cinema", promptHint: "shot on a Sony Venice full-frame cinema camera, dual-base-ISO sensor producing clean shadows in low light, refined Sony cinema color science, and the polished premium-streaming-production look" },
30
+ { id: "blackmagic-pocket-6k", label: "Blackmagic Pocket 6K", description: "Indie RAW cinema camera", promptHint: "shot on a Blackmagic Pocket Cinema Camera 6K, indie-filmmaker RAW recording with rich color depth, organic film-like rendering, and the unmistakable Blackmagic gen-5 color science" },
31
+ { id: "red-komodo", label: "RED Komodo", description: "Compact 6K action cinema camera", promptHint: "shot on a RED Komodo 6K cinema camera, compact-body REDCODE RAW capture with crisp action-grade detail, RED IPP2 color science, and dynamic gimbal- or drone-friendly framing" },
32
+ { id: "dslr", label: "DSLR", description: "Crisp video-DSLR look", promptHint: "shot on DSLR, crisp clean video with shallow depth of field and modern digital color" },
33
+ { id: "mirrorless-a7iii", label: "Sony A7III", description: "Modern hybrid mirrorless", promptHint: "shot on a Sony A7III mirrorless camera, clean modern hybrid look with fast-AF aesthetic, slightly cool Sony color science, and crisp full-frame sensor rendering" },
34
+ { id: "canon-r5", label: "Canon EOS R5", description: "High-res fashion-editorial mirrorless", promptHint: "shot on a Canon EOS R5 mirrorless camera, high-resolution full-frame imagery with Canon's signature warm skin tones and clean editorial-fashion clarity" },
35
+ { id: "hasselblad-medium-format", label: "Hasselblad Medium Format", description: "Editorial medium format", promptHint: "shot on a Hasselblad medium-format camera, ultra-shallow depth of field with painterly tonal rolloff, prestigious editorial color science, and large-sensor microcontrast" },
36
+ { id: "leica-m-rangefinder", label: "Leica M Rangefinder", description: "Classic 35mm rangefinder", promptHint: "shot on a Leica M-series rangefinder, classic 35mm street-photography aesthetic with gentle bokeh, refined contrast, and signature Leica rendering" },
37
+ { id: "voigtlander", label: "Voigtlander", description: "Boutique rangefinder character", promptHint: "shot on a Voigtlander rangefinder, distinctive color rendition with subtle vintage character, slightly muted saturation, and unique micro-contrast signature" },
38
+ { id: "fuji-xt4", label: "Fujifilm X-T4", description: "Film-emulating Fuji color", promptHint: "shot on a Fujifilm X-T4, film-like Fuji color science with rich greens, warm reds, and the distinctive emulation-style tonal curve Fuji is known for" },
39
+ // Aerial / action
40
+ { id: "drone-aerial", label: "Drone (Aerial)", description: "Overhead gimbal-stabilized aerial", promptHint: "overhead drone aerial footage, slight wide-angle distortion with smooth gimbal stabilization, top-down or low-altitude perspective, and atmospheric haze on distant subjects" },
41
+ { id: "gopro-action-cam", label: "GoPro Action Cam", description: "Fisheye-wide action camera", promptHint: "shot on a GoPro action camera, heavy fisheye-wide distortion with high-contrast saturated color, motion-active framing, and characteristic warped horizon lines" },
42
+ // Lo-fi modern
43
+ { id: "webcam-facetime", label: "Webcam / FaceTime", description: "Low-res video call", promptHint: "low-resolution webcam or FaceTime call footage, soft compression artifacts with color-shifted skin tones, low frame-rate ghosting, and slightly laggy motion blur" },
44
+ // Vintage / lo-fi
45
+ { id: "vhs", label: "VHS", description: "Tape distortion + scanlines", promptHint: "shot on VHS, analog tape distortion with horizontal scanlines, color bleed, and tracking artifacts" },
46
+ { id: "camcorder", label: "Camcorder", description: "Consumer 90s video", promptHint: "shot on a 90s consumer camcorder, soft video with low resolution and slight chromatic fringing" },
47
+ { id: "polaroid", label: "Polaroid", description: "Instant film tonality", promptHint: "polaroid instant film, square frame with soft tonality, slight color shift, and characteristic white border" },
48
+ { id: "fuji-instax", label: "Fujifilm Instax", description: "Modern instant film", promptHint: "shot on Fujifilm Instax instant film, square frame with soft pastel tones, slight blue cast, gentle highlight rolloff, and the characteristic crisp white instax border" },
49
+ { id: "disposable-camera", label: "Disposable Camera", description: "Single-use 90s/2000s film", promptHint: "shot on a single-use disposable film camera, gritty 90s/2000s aesthetic with harsh on-camera flash, blown highlights, color shift toward magenta, and gritty grain in shadows" },
50
+ { id: "toy-camera-holga", label: "Toy Camera (Holga)", description: "Lo-fi Holga / Lomo plastic-lens", promptHint: "shot on a toy camera like a Holga or Lomo, heavy vignetting with light leaks, soft plastic-lens focus, lo-fi vintage character, and unpredictable color shifts" },
51
+ { id: "tintype-wet-plate", label: "Tintype / Wet Plate", description: "Vintage wet-plate collodion", promptHint: "vintage tintype wet-plate collodion photograph, silver-mirror tonality with ethereal blur on edges, sepia-leaning monochrome, slow-exposure stillness, and antique surface character" },
52
+ { id: "daguerreotype", label: "Daguerreotype", description: "1840s silver-mirror process", promptHint: "1840s daguerreotype photograph, silver-mirror surface with slight ghostly blur from long exposure, hyper-vintage tonality, and the unmistakable reflective polished-plate quality" },
53
+ { id: "security-cam", label: "Security Cam (CCTV)", description: "CCTV fisheye + timestamp overlay", promptHint: "CCTV security-camera footage, wide-angle fisheye distortion with visible timestamp overlay in the corner, low resolution monochrome or desaturated color, static interference lines, tracking artifacts, and surveillance-grade compression" },
54
+ { id: "bw-film", label: "B&W Film", description: "Black and white film stock", promptHint: "shot on black and white film, rich grayscale tonality with classic film grain" },
55
+ { id: "iphone", label: "iPhone", description: "Modern phone-camera look", promptHint: "shot on a modern iPhone, computational image processing with sharp clarity, slight HDR look, and characteristic phone-camera color science" },
56
+ ] as const
57
+
58
+ const formatById = new Map<string, CameraFormat>(CAMERA_FORMATS.map((f) => [f.id, f]))
59
+
60
+ export function getCameraFormat(id: string | undefined | null): CameraFormat | undefined {
61
+ if (!id) return undefined
62
+ return formatById.get(id)
63
+ }
64
+
65
+ export function getCameraFormatLabel(id: string | undefined | null, fallback?: string): string {
66
+ const f = getCameraFormat(id)
67
+ if (f) return f.label
68
+ if (fallback !== undefined) return fallback
69
+ return (id ?? "").replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase())
70
+ }
71
+
72
+ export function getCameraFormatPromptHint(id: string | undefined | null): string {
73
+ return getCameraFormat(id)?.promptHint ?? ""
74
+ }
75
+
76
+ export const CAMERA_FORMAT_IDS: ReadonlyArray<string> = CAMERA_FORMATS.map((f) => f.id)