{"name":"paper-tape","entry":"component","title":"PaperTape","description":"Strip of paper fed out by length, with printed marks, checkpoint markers, and attachments on one coordinate system.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper","@jbm/tape-marker"],"install":"npx shadcn@latest add @jbm/paper-tape","installName":"paper-tape","page":"https://jbm-ui.bns.studio/c/paper-tape","registryItem":"https://jbm-ui.bns.studio/r/paper-tape.json","sourcePath":"registry/jbm/ui/paper-tape.tsx","files":[{"source":"registry/jbm/ui/paper-tape.tsx","target":"src/jbm/ui/paper-tape.tsx","import":"@/jbm/ui/paper-tape","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/paper-tape.md","json":"https://jbm-ui.bns.studio/catalog/paper-tape.json"},"snippet":"import { PaperTape, paperAt } from \"@/jbm/ui/paper-tape\"\n\n<PaperTape length={700} window={320} markers={[{ id: \"review\", at: 520, label: \"revisar\" }]} />\n// paperAt(700, 520) === 180: marks and attachments share this origin.","api":[{"export":"PaperTape","kind":"component","summary":"A card strip with an ink edge and paper shadow that grows from the source as `length` increases. Paired ink dashes are printed every 72 paper px, and markers and attachments ride on the same paper coordinates, so feeding the tape moves them together. Only marks, markers, and attachments inside the visible window render; the viewport clips at its bounds.","props":[{"name":"length","type":"number","required":true,"default":null,"description":"Paper fed out so far, in stage px. Increase it to feed the tape; negative or non-finite values count as 0."},{"name":"window","type":"number","required":false,"default":"400","description":"Visible run in stage px; also the component's width (horizontal) or height (vertical)."},{"name":"thickness","type":"number","required":false,"default":"48","description":"Strip thickness in stage px; minimum 16."},{"name":"direction","type":"\"horizontal\" | \"vertical\"","required":false,"default":"\"horizontal\"","description":"`horizontal` feeds along x; `vertical` feeds along y and turns markers 90°."},{"name":"markers","type":"{ id: string; at: number; label?: string }[]","required":false,"default":"[]","description":"Checkpoint TapeMarkers placed at paper coordinate `at` (0 = start of the paper). `id` must be unique within the tape; `label` shows above the marker."},{"name":"attachments","type":"TapeAttachment[]","required":false,"default":"[]","description":"Arbitrary React content pinned at paper coordinate `at`, below the strip (horizontal) or beside it (vertical). IDs must be unique across markers and attachments."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last onto the outer viewport, e.g. width or overflow."}],"passthrough":[]},{"export":"paperAt","kind":"function","summary":"Converts a paper coordinate to its screen distance from the tape's origin; markers, attachments, and printed marks all use it.","params":[{"name":"length","type":"number","required":true,"default":null,"description":"Paper fed out so far, as passed to PaperTape."},{"name":"coordinate","type":"number","required":true,"default":null,"description":"Position on the paper, measured from the start of the paper."}],"returns":"Screen offset in stage px: length − coordinate (length clamped to ≥ 0). Values within the window are visible."}],"stage":{"mode":"declared","landscape":{"width":400,"height":198},"vertical":{"width":400,"height":198},"basis":"Horizontal default: width = window (400), height = thickness + 150 (48 + 150); the strip sits 48px from the top to leave room for markers and labels. direction=\"vertical\" gives width thickness + 180 (228) by height window (400). maxWidth is 100% of the container. Stage orientation does not change the box."},"examples":[{"title":"Tape with a checkpoint","code":"import { PaperTape, paperAt } from \"@/jbm/ui/paper-tape\"\n\n<PaperTape length={700} window={320} markers={[{ id: \"review\", at: 520, label: \"revisar\" }]} />\n// paperAt(700, 520) === 180: marks and attachments share this origin."},{"title":"Feed from a Remotion timeline","code":"import { PaperTape } from \"@/jbm/ui/paper-tape\"\nimport { useProgress } from \"@/jbm/motion/hooks\" // install @jbm/motion-hooks separately\n\n// Render inside a Remotion <Composition> or <Player>: hooks run in the component body.\nexport function FeedingTape() {\n  const feed = useProgress(0.2, 1000, 4)\n  return <PaperTape length={feed} window={280} direction=\"vertical\" markers={[{ id: \"stop\", at: 520 }]} />\n}"}],"qa":["Drag Feed from 0 to 1: the strip grows from zero, printed dashes, the marker, and the note move together, and nothing appears before its coordinate is fed out.","Toggle Vertical tape: markers rotate 90° and attachments sit beside the strip; check both directions at narrow widths.","Toggle Checkpoint marker: the tape and note do not move.","Try a very long length: only the visible dashes render and content past the window is clipped at the edge."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"tape-marker","relation":"installs"},{"name":"motion-hooks","relation":"example-import"}],"family":"Tape, clips & marks","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.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"}}