@nodaro/prompts 1.7.2 → 1.7.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/prompts",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Nodaro's prompt-engineering layer — person/picker catalogs with prompt hints, identity-lock clauses, entity prompt builders, brand presets, and prompt/reference assembly shared by the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",
package/src/index.ts CHANGED
@@ -68,3 +68,4 @@ export * from "./style-presets.js"
68
68
  export * from "./object-asset-presets.js"
69
69
  export * from "./factory-snippets/index.js"
70
70
  export * from "./picker-wiring.js"
71
+ export * from "./surround-fill.js"
@@ -6,7 +6,7 @@
6
6
  * Pure data, no React. Extracted from the app's parameter-picker-registry so
7
7
  * THREE consumers share one definition and cannot drift:
8
8
  * 1. The app's community fallback registry (chip pickers, no rich previews).
9
- * 2. `@nodaroai/picker-ui`'s rich registry (attaches preview/Picker renderers).
9
+ * 2. `@nodaro/picker-ui`'s registry (attaches preview/Picker renderers).
10
10
  * 3. Nodaro Cine's builder panels.
11
11
  *
12
12
  * Renderers (preview components, multi-dim Picker components) deliberately do
@@ -87,8 +87,7 @@ precise subject → action details → scene/environment → lighting & color to
87
87
  - More than 4 referenced people gets unstable: group people into composite images of ≤4 first (image generation), then reference those composites.
88
88
  - Repeated extension degrades quality: prefer high-definition reference assets and avoid stacking many continuations.
89
89
 
90
- **Auto-path formula (community-sourced enrichment — apiyi.com Seedance 2.0 prompt guide,
91
- higgsfield.ai 4K breakdown; captured 2026-08-09)**
90
+ **Auto-path formula (community-sourced enrichment; captured 2026-08-09)**
92
91
  - Six steps IN ORDER, 60-100 words total (longer measurably degrades): Subject → Action → Environment → Camera → Style → Constraints.
93
92
  - ONE primary camera instruction per shot. Compound moves chain with "then": "camera slow tracking then subtle rise" — never two competing verbs. The 8 reliable camera types: push-in, pull-out, pan, tracking, orbit/arc, aerial, handheld, locked-off.
94
93
  - SEPARATE camera movement from subject movement — the single biggest quality lever: "The dancer spins slowly. Camera holds fixed framing." — never "spinning camera around a dancing person".
@@ -1,7 +1,7 @@
1
1
  import type { StyleDirectives } from "@nodaro/shared"
2
2
 
3
3
  /**
4
- * Style Gallery presets (north-star §6 ①).
4
+ * Style Gallery presets.
5
5
  *
6
6
  * Each preset is a named "look" the user picks at Start. Picking one sets the
7
7
  * pipeline's `style_directives`, which the Showrunner folds into the plan's
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Surround continuation — the fill prompt.
3
+ *
4
+ * Prompt engineering, so it lives here and not in `@nodaro/shared`: that
5
+ * package is published to npm under Apache-2.0, where every release is an
6
+ * irrevocable grant. This package is never published (`"private": true`).
7
+ * `@nodaro/shared` keeps only the wire contract — the direction enum and the
8
+ * carried-fraction defaults the route Zod schema and the SDK input type need.
9
+ */
10
+ import type { SurroundDirection } from "@nodaro/shared"
11
+
12
+ /** Which edge of the NEW frame holds the carried pixels vs the painted region. */
13
+ const EDGE: Record<SurroundDirection, { carried: string; painted: string }> = {
14
+ right: { carried: "left", painted: "right" },
15
+ left: { carried: "right", painted: "left" },
16
+ up: { carried: "bottom", painted: "top" },
17
+ down: { carried: "top", painted: "bottom" },
18
+ }
19
+
20
+ /** What a tilt must actually render (NOT a continuation of the landscape). */
21
+ const TILT_SUBJECT: Record<"up" | "down", { word: string; subject: string; where: string }> = {
22
+ up: {
23
+ word: "up",
24
+ subject: "the open sky directly overhead — sky, clouds, or (for an interior) the canopy or ceiling",
25
+ where: "overhead",
26
+ },
27
+ down: {
28
+ word: "down",
29
+ subject: "the ground directly below — terrain, floor, or water surface",
30
+ where: "below",
31
+ },
32
+ }
33
+
34
+ /**
35
+ * Build the fill prompt the model receives alongside the half-carry composite.
36
+ *
37
+ * `userPrompt` (an optional scene hint from the caller) is woven in front. PAN
38
+ * directions get the seamless-continuation prompt (with the anti-golden-hour
39
+ * negative that fights the documented warm-regrade drift). TILT directions get a
40
+ * subject-forcing prompt — render the sky / ground overhead / below, explicitly
41
+ * NOT a mirrored landscape — which is what stops the vertical echo.
42
+ */
43
+ export function buildSurroundFillPrompt(direction: SurroundDirection, userPrompt?: string): string {
44
+ const scene = userPrompt && userPrompt.trim() ? `${userPrompt.trim()}. ` : ""
45
+ const { carried, painted } = EDGE[direction]
46
+
47
+ if (direction === "up" || direction === "down") {
48
+ const t = TILT_SUBJECT[direction]
49
+ return (
50
+ `${scene}` +
51
+ `This is a camera tilted straight ${t.word} from the same scene. The ${carried} strip holds real, finished pixels from the edge of the horizon view; the ${painted} region is flat gray and MUST be painted as ${t.subject}. ` +
52
+ `Render what is genuinely ${t.where} — do NOT repeat, mirror, or continue the landscape, and do NOT draw a horizon line or distant scenery in the painted region. ` +
53
+ `CRITICAL: keep the ${carried} strip unchanged and match the scene's EXACT lighting, time of day, white balance, and color grade — the same light as the ${carried} strip; no golden hour, no sunset, no warm relight, no cinematic regrade. ` +
54
+ `Blend smoothly into the ${carried} strip with no visible seam. No people, no text, no labels, no watermarks.`
55
+ )
56
+ }
57
+
58
+ // pan (right / left)
59
+ return (
60
+ `${scene}` +
61
+ `This is a partial frame: the ${carried} portion contains real, finished pixels and the ${painted} portion is flat gray that MUST be painted in. ` +
62
+ `Paint ONLY the ${painted} gray region as a natural, seamless continuation of the ${carried} portion — same scene, same perspective, continuing the horizon, geometry, and content across the boundary with no break. ` +
63
+ `Keep the ${carried} portion completely unchanged. ` +
64
+ `CRITICAL: do NOT change the lighting, exposure, white balance, or time of day. Match the ${carried} portion's EXACT light, color temperature, and contrast across the whole frame — if it is flat overcast daylight, keep flat overcast daylight. No golden hour, no sunset, no warm relight, no cinematic regrade. ` +
65
+ `The seam between the ${carried} and ${painted} portions must be invisible. No people, no text, no labels, no watermarks.`
66
+ )
67
+ }