{"name":"propagate","entry":"component","title":"Propagate","description":"One source card fans ink lines out to a row of phone screens; bug, fix, and recolour cues travel down the lines to every screen.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/tokens","@jbm/motion-hooks","@jbm/pop","@jbm/paper","@jbm/ui-bits"],"install":"npx shadcn@latest add @jbm/propagate","installName":"propagate","page":"https://jbm-ui.bns.studio/c/propagate","registryItem":"https://jbm-ui.bns.studio/r/propagate.json","sourcePath":"registry/jbm/motion/propagate.tsx","files":[{"source":"registry/jbm/motion/propagate.tsx","target":"src/jbm/motion/propagate.tsx","import":"@/jbm/motion/propagate","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/propagate.md","json":"https://jbm-ui.bns.studio/catalog/propagate.json"},"snippet":"import { Propagate } from \"@/jbm/motion/propagate\"\n\n<Propagate w={936} h={1040} at={0.9} targets={6}\n  label={{ text: \"una sola fuente de verdad\", at: 4 }}\n  bug={5.8} fix={6.6} fixed={7.7} recolor={10.5} recolored={11.7} />\n// Render inside a Remotion <Composition> or <Player>.","api":[{"export":"Propagate","kind":"component","summary":"Remotion illustration of one source of truth. At `at` the sheet springs in, the curved lines draw over 0.9 s from at + 0.25, and the screens pop up one by one (0.08 s apart). Optional cue pairs then play: `bug` puts a cross badge on the source and every screen; `fix` → `fixed` flips the source badge to a check, sends vermilion pulses down the lines, and flips every screen's badge on arrival; `recolor` → `recolored` crossfades the source buttons to vermilion (badges fade out from recolor − 0.2), sends pulses, and recolours every screen on arrival. Absent cues never fire.","props":[{"name":"w","type":"number","required":true,"default":null,"description":"Box width in stage pixels; the screens divide it into columns and the source card is 47% of it (at most 440)."},{"name":"h","type":"number","required":true,"default":null,"description":"Box height in stage pixels; screens fill the space below the source, capped at 1.6 × their width."},{"name":"at","type":"number","required":true,"default":null,"description":"Seconds from the start of the sequence when the sheet enters and the lines start drawing."},{"name":"label","type":"{ text: string; at: number }","required":false,"default":null,"description":"Optional sticker above the source: `text` and its entrance `at` in seconds. Reserves extra room above the source card."},{"name":"targets","type":"number","required":false,"default":"6","description":"Number of screens; a positive integer (throws otherwise). Up to 6 sit in one row; more split into two rows."},{"name":"bug","type":"number","required":false,"default":null,"description":"Seconds when the cross badges appear on the source and on every screen."},{"name":"fix","type":"number","required":false,"default":null,"description":"Seconds when the source badge flips to a check and fix pulses leave the source."},{"name":"fixed","type":"number","required":false,"default":null,"description":"Seconds when fix pulses arrive and every screen's badge flips to a check. Must be later than `fix`."},{"name":"recolor","type":"number","required":false,"default":null,"description":"Seconds when the source buttons turn vermilion (0.35 s crossfade) and recolour pulses leave; badges fade out from 0.2 s before."},{"name":"recolored","type":"number","required":false,"default":null,"description":"Seconds when recolour pulses arrive and every screen's buttons turn vermilion. Must be later than `recolor`."}],"passthrough":[]},{"export":"propagationProgress","kind":"function","summary":"Pulse position along the lines for one departure/arrival pair, eased in-out cubic and clamped. Used by Propagate; exported for tests and custom pulses.","params":[{"name":"sec","type":"number","required":true,"default":null,"description":"Current time in seconds (e.g. from useSec)."},{"name":"from","type":"number","required":false,"default":null,"description":"Departure cue in seconds; when either cue is missing the result is -1 (no pulse)."},{"name":"to","type":"number","required":false,"default":null,"description":"Arrival cue in seconds; must be finite and later than `from`, or it throws a RangeError."}],"returns":"Progress from 0 (at the source) to 1 (arrived), or -1 when a cue is missing. Pulses render only strictly between 0 and 1."}],"stage":{"mode":"declared","landscape":{"width":1680,"height":760},"vertical":{"width":936,"height":1040},"basis":"The box is exactly w × h (both required). The numbers are what SceneFromSpec passes in a legacy flow layout: the safe-area width (1920 − 2 × 120, 1080 − 2 × 72) and the default block height { landscape: 760, vertical: 1040 }. In illustration layouts it gets the allocated height instead. Badges (−22px on the source, −14px on screens), screen tilt, and shadows can reach past the box."},"examples":[{"title":"Bug, fix, and recolour across six screens","code":"import { Propagate } from \"@/jbm/motion/propagate\"\n\n<Propagate w={936} h={1040} at={0.9} targets={6}\n  label={{ text: \"una sola fuente de verdad\", at: 4 }}\n  bug={5.8} fix={6.6} fixed={7.7} recolor={10.5} recolored={11.7} />\n// Render inside a Remotion <Composition> or <Player>."},{"title":"Recolour only, eight screens in two rows","code":"import { Propagate } from \"@/jbm/motion/propagate\"\n\n<Propagate w={1680} h={760} at={0.2} targets={8}\n  recolor={3} recolored={4.2} />"}],"qa":["Step through at, mid-line draw, and each cue: badges scale in on `bug`, pulses travel only between departure and arrival, and screens change exactly on `fixed` and `recolored`.","Check the final frame: every screen shows vermilion buttons, badges have faded out after a recolour, and nothing is mid-flight.","Try targets 1, 6, and 7+: one row up to 6, two rows beyond; confirm screens do not become too short when h is small (height is floored by the space left under the source).","Without a label the source sits at the top of the box and its badge pokes 22px above it; leave room in the layout.","Inspect landscape and vertical widths: the last screen's badge and tilt can cross the right edge by about 14px."],"related":[{"name":"tokens","relation":"installs"},{"name":"motion-hooks","relation":"installs"},{"name":"pop","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"installs"},{"name":"scene-spec","relation":"installed-by"}],"galleryPreview":{"about":"Cue times are seconds on the gallery preview's timeline, which renders the demo below; the Usage examples may use other timings. Map a cue to your own props by its place in the demo.","fps":30,"durationInFrames":155,"lastFrame":154,"strip":"https://jbm-ui.bns.studio/c/propagate?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"Bug appears","frame":69,"at":2.3,"note":"Cross badges sit on the source and on every screen; no pulse has left yet."},{"label":"Fix travels","frame":84,"at":2.8,"note":"The source shows a check and vermilion pulses are mid-line; screens still show crosses."},{"label":"Fix lands","frame":111,"at":3.7,"note":"Every screen shows a check and nothing is in flight, before the recolour starts."},{"label":"End","frame":154,"at":5.133}],"demo":[{"component":"Propagate","props":{"w":936,"h":640,"at":0.2,"label":{"text":"una sola fuente de verdad","at":0.9},"targets":6,"bug":1.6,"fix":2.4,"fixed":3.2,"recolor":4,"recolored":4.8}}],"code":"<Propagate w={936} h={640} at={0.2} label={{ text: \"una sola fuente de verdad\", at: 0.9 }} targets={6} bug={1.6} fix={2.4} fixed={3.2} recolor={4} recolored={4.8} />"},"docs":[{"title":"Scene spec guide","url":"https://jbm-ui.bns.studio/docs/scene-spec.md"}],"setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}