{"name":"jbm-ui","namespace":"@jbm","homepage":"https://jbm-ui.bns.studio","purpose":"jbm-ui is a personal component library for tacosdedatos, distributed as a shadcn registry, so an explainer video and a web page share one visual vocabulary. The same tokens and components render in plain React pages and in Remotion compositions: ui/ items are pure React with inline token styles and never import Remotion, motion/ items add timeline behavior, and lib/ items hold tokens and helpers. Illustrations are simple geometric line art in ink on cream, with vermilion as the single accent per composition.","install":{"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."],"categories":["UI","UI Bits","Layout","Motion","Interactive","Foundations"],"categoryDefinitions":{"UI":"Pure React pieces for pages and stages (type, cards, chips, charts, and text effects), set entirely by props.","UI Bits":"Paper illustrations of interface elements and desk objects, posed by props. Each component has its own preview and installation.","Layout":"Stages and scenes that place a subject inside a 16:9 or 9:16 frame.","Motion":"Plays a Remotion timeline: previews in a Player with frames and replay.","Interactive":"Responds to the reader at runtime: scroll, pointer, click, or hover.","Foundations":"Tokens, geometry, and hooks the other items are built from."},"capabilities":{"controls":"The preview exposes independent controls for states.","scroll":"The preview responds to scroll position.","replay":"The preview is a timeline that replays on request; it never autoplays.","portrait":"The preview compares landscape and vertical stages.","player":"The preview renders in a Remotion Player; needsRemotion is the separate dependency flag, and searching the gallery for \"remotion\" matches it."},"fields":{"api":"Exports with props or params; type, required, and default are extracted from source, descriptions are authored.","stage":"Size in stage pixels per orientation (\"declared\"), or \"fluid\"/\"n/a\" with a reason.","qa":"What to inspect before accepting a change.","galleryPreview":"Optional, Player items with cues. The frames worth inspecting on the gallery preview (frame 0, each cue, the last frame) as {label, frame, at, note}: frame zero-based and at in seconds at the preview's fps. These are the preview's timings, not the examples': demo (elements with props) and code (TSX) are what the preview renders. The QA page's strip view shows the frames side by side (strip), and ?frame=<frame> opens one.","page":"The item's QA page in the gallery, or null for a bundle, whose pageReason names the pages to open instead.","registryItem":"The shadcn registry item JSON; its files[].content holds the source code, so no repository checkout is needed.","files":"Each installed file: source path in the jbm-ui source tree, target path shadcn writes in the consumer project, and the import specifier.","endpoints":"Per-item Markdown and JSON with the same content as this entry plus install setup.","docs":"Optional. Guides that cover the item, as {title, url}; each is Markdown served by this site at /docs/<slug>.md.","schemas":"Optional. JSON Schemas for the item's input data (for scene-spec, the scenes file), as {title, url}.","related":"Other items by relation: installs (registry dependency), installed-by, re-exports, bundled-in, example-import."},"links":{"llms":"https://jbm-ui.bns.studio/llms.txt","llmsFull":"https://jbm-ui.bns.studio/llms-full.txt","catalog":"https://jbm-ui.bns.studio/catalog.json","itemMarkdown":"https://jbm-ui.bns.studio/catalog/{name}.md","itemJson":"https://jbm-ui.bns.studio/catalog/{name}.json","registryIndex":"https://jbm-ui.bns.studio/r/registry.json","contract":"https://jbm-ui.bns.studio/docs/agent-contract.md","doc":"https://jbm-ui.bns.studio/docs/{slug}.md"},"docs":[{"title":"Agent contract","url":"https://jbm-ui.bns.studio/docs/agent-contract.md"},{"title":"Paper and filing illustrations","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"},{"title":"Desk illustrations","url":"https://jbm-ui.bns.studio/docs/desk-components.md"},{"title":"JBM icons","url":"https://jbm-ui.bns.studio/docs/icons.md"},{"title":"Scene specs","url":"https://jbm-ui.bns.studio/docs/scene-spec.md"},{"title":"Surface depth","url":"https://jbm-ui.bns.studio/docs/surface-depth.md"},{"title":"Visual primitives from Design","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"},{"title":"Writing registers","url":"https://jbm-ui.bns.studio/docs/writing-registers.md"}],"items":[{"name":"tokens","entry":"component","title":"Tokens","description":"Cream, ink, and vermilion palette, Geist font stacks and tab-name metrics, radii, the shared ink outline weight, surface shadows and borders, stage safe areas, and a CSS variables string.","category":"Foundations","capabilities":[],"needsRemotion":false,"registryDependencies":[],"install":"npx shadcn@latest add @jbm/tokens","installName":"tokens","page":"https://jbm-ui.bns.studio/c/tokens","registryItem":"https://jbm-ui.bns.studio/r/tokens.json","sourcePath":"registry/jbm/lib/tokens.ts","files":[{"source":"registry/jbm/lib/tokens.ts","target":"src/jbm/lib/tokens.ts","import":"@/jbm/lib/tokens","type":"registry:lib"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/tokens.md","json":"https://jbm-ui.bns.studio/catalog/tokens.json"},"snippet":"import { color, font } from \"@/jbm/lib/tokens\"\n\n<div style={{ color: color.ink, background: color.bg, fontFamily: font.sans }} />","api":[{"export":"color","kind":"constant","summary":"Two-colour palette as hex strings: bg (cream canvas), card (raised surface), ink (text), dim (muted text), line (rules and borders), accent (vermilion, the one accent), accent2 (annotations), soft (emphasis on dark), dimOnDark (cream at 62% for muted text on ink), codeBg, and codeGreen."},{"export":"font","kind":"constant","summary":"Font stacks for sans and mono: the host's --font-sans / --font-mono CSS variable when set (for example by next/font), else Geist and Geist Mono, then system fallbacks."},{"export":"sansWidth","kind":"function","summary":"Estimated advance width of a line set in Geist 800 (tab names) or Geist 400 italic (sublabels), from a built-in per-glyph table measured in the browser, so layouts that size tabs match before fonts load and in Remotion. Accented letters measure as their base letter; other non-ASCII glyphs as an average. Kerning is ignored, so it errs slightly wide.","params":[{"name":"text","type":"string","required":true,"default":null,"description":"The line."},{"name":"size","type":"number","required":true,"default":null,"description":"Font size in the units you want back."},{"name":"italic","type":"boolean","required":false,"default":"false","description":"true for Geist 400 italic; default false (Geist 800)."}],"returns":"Width in the same units as size."},{"export":"radius","kind":"constant","summary":"Corner radii in pixels: chip 14, code 12, card 28, pill 10."},{"export":"stroke","kind":"constant","summary":"The shared ink outline, `stroke.outline`, in stage px: 3 (3px on a 1080 stage). Every desk, paper, and thread object (Hand, Folder, Cajon, FileCabinet, Escritorio, DeskTop, DeskProp, Bandeja, ToolCaddy, Document, Paper, Tear, Register, Slip, Hilo, VideoPrint, PunchedTag) draws its outline at this weight, so a composed scene reads as one line weight."},{"export":"outlineIn","kind":"function","summary":"The shared outline converted to a local unit system, for art whose viewBox or transform scales against the stage (Hand's 30-unit viewBox at 180 px, a scaled DeskProp group).","params":[{"name":"unitsPerPx","type":"number","required":false,"default":"1","description":"Local units per stage px; default 1. Non-finite or non-positive values count as 1."}],"returns":"stroke.outline × unitsPerPx, in local units."},{"export":"shadowLayers","kind":"constant","summary":"The surface recipes split into inset (edge light), contact, and ambient box-shadow layers for `card` and `cardDark`. Use it to compose or inspect individual layers; see docs/surface-depth.md."},{"export":"shadow","kind":"constant","summary":"Complete box-shadow strings `card` and `cardDark`, joined from shadowLayers (inset, contact, then ambient). Used by Card, StatCard, and CodeCard."},{"export":"surfaceBorder","kind":"constant","summary":"1px ink-tinted border shorthands `card` (12% ink) and `cardDark` (65% ink) that pair with the matching shadow."},{"export":"stage","kind":"constant","summary":"Stage size and safe area per orientation, in stage pixels: landscape 1920×1080 with 120 side padding, top 90, content bottom 920; vertical 1080×1920 with 72 side padding, top 100, content bottom 1440. Captions live below `bottom`."},{"export":"Orientation","kind":"type","summary":"The keys of `stage`: \"landscape\" or \"vertical\"."},{"export":"cssVars","kind":"constant","summary":"A `:root{…}` CSS string defining --jbm-bg, --jbm-card, --jbm-ink, --jbm-dim, --jbm-line, --jbm-accent, --jbm-accent2, and --jbm-soft for Tailwind or shadcn consumers. It omits dimOnDark, codeBg, and codeGreen."}],"stage":{"mode":"n/a","reason":"Token values only; nothing renders. The gallery shows the color entries as swatches."},"examples":[{"title":"Inline styles from tokens","code":"import { color, font } from \"@/jbm/lib/tokens\"\n\n<div style={{ color: color.ink, background: color.bg, fontFamily: font.sans }} />"},{"title":"Keep content inside the safe area","code":"import { stage, type Orientation } from \"@/jbm/lib/tokens\"\n\nconst o: Orientation = \"vertical\"\nconst { w, pad, top, bottom } = stage[o]\nconst contentWidth = w - pad * 2 // 936 stage px in vertical\nconst contentHeight = bottom - top // 1340 stage px in vertical"},{"title":"CSS variables for Tailwind","code":"import { cssVars } from \"@/jbm/lib/tokens\"\n\n<style>{cssVars}</style>\n// or paste the string into globals.css and use var(--jbm-accent)"}],"qa":["Check each swatch against the cream, ink, and vermilion palette; the accent stays the only saturated color.","After changing shadowLayers, compare light and dark Card, StatCard, and CodeCard; shadow.card must still equal the joined card layers for existing consumers.","When adding a color, decide whether cssVars should expose it; today it exports eight of the eleven colors.","Verify text using dim or dimOnDark keeps readable contrast on its background."],"related":[{"name":"label","relation":"installed-by"},{"name":"big","relation":"installed-by"},{"name":"card","relation":"installed-by"},{"name":"chip","relation":"installed-by"},{"name":"stat-card","relation":"installed-by"},{"name":"callout","relation":"installed-by"},{"name":"bullet-list","relation":"installed-by"},{"name":"brand","relation":"installed-by"},{"name":"paper","relation":"installed-by"},{"name":"replay-button","relation":"installed-by"},{"name":"scene","relation":"installed-by"},{"name":"prob-bar","relation":"installed-by"},{"name":"code-card","relation":"installed-by"},{"name":"captions","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","relation":"installed-by"},{"name":"scene-spec","relation":"installed-by"},{"name":"ui-button","relation":"installed-by"},{"name":"ui-input","relation":"installed-by"},{"name":"ui-card","relation":"installed-by"},{"name":"phone-frame","relation":"installed-by"},{"name":"badge","relation":"installed-by"},{"name":"token-glyph","relation":"installed-by"},{"name":"text-fill","relation":"installed-by"},{"name":"scroll-text-fill","relation":"installed-by"},{"name":"flip-text","relation":"installed-by"},{"name":"scroll-stack","relation":"installed-by"},{"name":"rule","relation":"installed-by"},{"name":"action-link","relation":"installed-by"},{"name":"index-row","relation":"installed-by"},{"name":"figure-caption","relation":"installed-by"},{"name":"ticket","relation":"installed-by"},{"name":"chat-bubble","relation":"installed-by"},{"name":"document","relation":"installed-by"},{"name":"folder","relation":"installed-by"},{"name":"score-scale","relation":"installed-by"},{"name":"comparison-bars","relation":"installed-by"},{"name":"clock","relation":"installed-by"},{"name":"cajon","relation":"installed-by"},{"name":"hand","relation":"installed-by"},{"name":"mano","relation":"installed-by"},{"name":"pluma","relation":"installed-by"},{"name":"bandeja","relation":"installed-by"},{"name":"tool-caddy","relation":"installed-by"},{"name":"escritorio","relation":"installed-by"},{"name":"desk-top","relation":"installed-by"},{"name":"ejes","relation":"installed-by"},{"name":"desk-prop","relation":"installed-by"},{"name":"burbuja","relation":"installed-by"},{"name":"file-cabinet","relation":"installed-by"},{"name":"paper-clip","relation":"installed-by"},{"name":"clipped-note","relation":"installed-by"},{"name":"punched-tag","relation":"installed-by"},{"name":"video-print","relation":"installed-by"},{"name":"hilo","relation":"installed-by"},{"name":"tear","relation":"installed-by"},{"name":"paper-line","relation":"installed-by"},{"name":"register","relation":"installed-by"},{"name":"slip","relation":"installed-by"},{"name":"stamp","relation":"installed-by"},{"name":"tape-marker","relation":"installed-by"},{"name":"paper-tape","relation":"installed-by"},{"name":"frontmatter","relation":"installed-by"},{"name":"folder-contents","relation":"installed-by"},{"name":"folder-carry","relation":"installed-by"},{"name":"icons","relation":"installed-by"}],"docs":[{"title":"Surface depth guide","url":"https://jbm-ui.bns.studio/docs/surface-depth.md"}]},{"name":"surface-depth","entry":"doc","title":"SurfaceDepth","description":"Fine borders, inset edge lighting, and layered shadows. Compare the original surface and inspect each layer.","category":"Foundations","capabilities":["controls"],"needsRemotion":false,"registryDependencies":[],"install":"npx shadcn@latest add @jbm/tokens","installName":"tokens","page":"https://jbm-ui.bns.studio/c/surface-depth","registryItem":"https://jbm-ui.bns.studio/r/tokens.json","sourcePath":"registry/jbm/lib/tokens.ts","files":[{"source":"registry/jbm/lib/tokens.ts","target":"src/jbm/lib/tokens.ts","import":"@/jbm/lib/tokens","type":"registry:lib"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/surface-depth.md","json":"https://jbm-ui.bns.studio/catalog/surface-depth.json"},"snippet":"import { shadow, surfaceBorder } from \"@/jbm/lib/tokens\"\n\n// Light surface (use cardDark for dark surfaces)\n<div style={{\n  boxShadow: shadow.card,\n  border: surfaceBorder.card,\n}} />","api":[{"export":"shadow","kind":"constant","summary":"Complete raised-surface box-shadows: `card` for light surfaces and `cardDark` for ink surfaces. Apply the whole recipe rather than copying layers into components."},{"export":"surfaceBorder","kind":"constant","summary":"The 1px border that defines the silhouette: `card` (ink at 12%) and `cardDark` (ink at 65%). Pair with the shadow of the same name."},{"export":"shadowLayers","kind":"constant","summary":"Each recipe split into `inset` (upper edge highlight and lower inner line), `contact` (1px crisp contact), and `ambient` (offsets 3, 6, 12, 24px with negative spread and falling opacity). The gallery lab toggles these independently."}],"stage":{"mode":"n/a","reason":"Documentation entry for token recipes; nothing installs as a component. The gallery lab renders two sample surfaces with layer toggles."},"examples":[{"title":"Light raised surface","code":"import { shadow, surfaceBorder } from \"@/jbm/lib/tokens\"\n\n// Light surface (use cardDark for dark surfaces)\n<div style={{\n  boxShadow: shadow.card,\n  border: surfaceBorder.card,\n}} />"},{"title":"Dark surface","code":"import { color, radius, shadow, surfaceBorder } from \"@/jbm/lib/tokens\"\n\n<div style={{\n  background: color.codeBg,\n  borderRadius: radius.card,\n  boxShadow: shadow.cardDark,\n  border: surfaceBorder.cardDark,\n}} />"}],"qa":["Toggle Before and Layered: Before shows the original single broad shadow and 2px border and disables the layer controls.","Toggle border, inset highlight, contact shadow, and soft outer shadows one at a time on both the light and dark samples; each change should be visible and none should leave a clipped shadow.","Inspect at actual display scale: edges readable without looking embossed, and the highlight reads as edge light rather than a separate stripe.","Press Copy token usage with and without clipboard access; the status line reports success or points to the Usage snippet.","Exercise the buttons and checkboxes by keyboard and confirm visible focus."],"related":[{"name":"label","relation":"installed-by"},{"name":"big","relation":"installed-by"},{"name":"card","relation":"installed-by"},{"name":"chip","relation":"installed-by"},{"name":"stat-card","relation":"installed-by"},{"name":"callout","relation":"installed-by"},{"name":"bullet-list","relation":"installed-by"},{"name":"brand","relation":"installed-by"},{"name":"paper","relation":"installed-by"},{"name":"replay-button","relation":"installed-by"},{"name":"scene","relation":"installed-by"},{"name":"prob-bar","relation":"installed-by"},{"name":"code-card","relation":"installed-by"},{"name":"captions","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","relation":"installed-by"},{"name":"scene-spec","relation":"installed-by"},{"name":"ui-button","relation":"installed-by"},{"name":"ui-input","relation":"installed-by"},{"name":"ui-card","relation":"installed-by"},{"name":"phone-frame","relation":"installed-by"},{"name":"badge","relation":"installed-by"},{"name":"token-glyph","relation":"installed-by"},{"name":"text-fill","relation":"installed-by"},{"name":"scroll-text-fill","relation":"installed-by"},{"name":"flip-text","relation":"installed-by"},{"name":"scroll-stack","relation":"installed-by"},{"name":"rule","relation":"installed-by"},{"name":"action-link","relation":"installed-by"},{"name":"index-row","relation":"installed-by"},{"name":"figure-caption","relation":"installed-by"},{"name":"ticket","relation":"installed-by"},{"name":"chat-bubble","relation":"installed-by"},{"name":"document","relation":"installed-by"},{"name":"folder","relation":"installed-by"},{"name":"score-scale","relation":"installed-by"},{"name":"comparison-bars","relation":"installed-by"},{"name":"clock","relation":"installed-by"},{"name":"cajon","relation":"installed-by"},{"name":"hand","relation":"installed-by"},{"name":"mano","relation":"installed-by"},{"name":"pluma","relation":"installed-by"},{"name":"bandeja","relation":"installed-by"},{"name":"tool-caddy","relation":"installed-by"},{"name":"escritorio","relation":"installed-by"},{"name":"desk-top","relation":"installed-by"},{"name":"ejes","relation":"installed-by"},{"name":"desk-prop","relation":"installed-by"},{"name":"burbuja","relation":"installed-by"},{"name":"file-cabinet","relation":"installed-by"},{"name":"paper-clip","relation":"installed-by"},{"name":"clipped-note","relation":"installed-by"},{"name":"punched-tag","relation":"installed-by"},{"name":"video-print","relation":"installed-by"},{"name":"hilo","relation":"installed-by"},{"name":"tear","relation":"installed-by"},{"name":"paper-line","relation":"installed-by"},{"name":"register","relation":"installed-by"},{"name":"slip","relation":"installed-by"},{"name":"stamp","relation":"installed-by"},{"name":"tape-marker","relation":"installed-by"},{"name":"paper-tape","relation":"installed-by"},{"name":"frontmatter","relation":"installed-by"},{"name":"folder-contents","relation":"installed-by"},{"name":"folder-carry","relation":"installed-by"},{"name":"icons","relation":"installed-by"}],"docs":[{"title":"Surface depth guide","url":"https://jbm-ui.bns.studio/docs/surface-depth.md"}]},{"name":"label","entry":"component","title":"Label","description":"Uppercase, tracked, muted kicker that names a scene or page section.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/label","installName":"label","page":"https://jbm-ui.bns.studio/c/label","registryItem":"https://jbm-ui.bns.studio/r/label.json","sourcePath":"registry/jbm/ui/label.tsx","files":[{"source":"registry/jbm/ui/label.tsx","target":"src/jbm/ui/label.tsx","import":"@/jbm/ui/label","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/label.md","json":"https://jbm-ui.bns.studio/catalog/label.json"},"snippet":"import { Label } from \"@/jbm/ui/label\"\n\n<Label>Una idea a la vez</Label>","api":[{"export":"Label","kind":"component","summary":"Block-level Geist sans kicker at 26px, weight 600, 4px letter spacing, uppercase, in the dim token color. Sits top-left of a scene or above a section.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Kicker text; rendered uppercase regardless of the source casing."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last; override color (for example color.soft on dark cards) or fontSize here."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"A block div that fills its container's width. One line is 26px type at the font's normal line height (not set explicitly, so the exact height depends on Geist's metrics); long text wraps and adds lines."},"examples":[{"title":"Section kicker","code":"import { Label } from \"@/jbm/ui/label\"\n\n<Label>Una idea a la vez</Label>"},{"title":"On a dark card","code":"import { Label } from \"@/jbm/ui/label\"\nimport { color } from \"@/jbm/lib/tokens\"\n\n<Label style={{ color: color.soft }}>Dark</Label>"}],"qa":["Confirm the text renders uppercase with visible tracking in the dim color on cream.","Check a long kicker wraps cleanly inside the safe area, and that style overrides (color on dark surfaces) keep readable contrast."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-spec","relation":"installed-by"}]},{"name":"big","entry":"component","title":"Big","description":"Display heading in Geist at weight 800 with tight tracking.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/big","installName":"big","page":"https://jbm-ui.bns.studio/c/big","registryItem":"https://jbm-ui.bns.studio/r/big.json","sourcePath":"registry/jbm/ui/big.tsx","files":[{"source":"registry/jbm/ui/big.tsx","target":"src/jbm/ui/big.tsx","import":"@/jbm/ui/big","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/big.md","json":"https://jbm-ui.bns.studio/catalog/big.json"},"snippet":"import { Big } from \"@/jbm/ui/big\"\nimport { color } from \"@/jbm/lib/tokens\"\n\n<Big size={76}>\n  Ideas que<br />\n  <span style={{ color: color.accent }}>se entienden.</span>\n</Big>","api":[{"export":"Big","kind":"component","summary":"Block-level display heading: Geist sans, weight 800, line-height 1.05, -2px letter spacing, ink by default. Children may include line breaks and accent spans.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Heading content; use <br /> for deliberate line breaks and a span with color.accent for the one accent word."},{"name":"size","type":"number","required":false,"default":"96","description":"Font size in stage pixels; 56 to 170 in practice."},{"name":"color","type":"string","required":false,"default":"color.ink","description":"Text color; defaults to ink. Use color.bg on dark surfaces."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last, for example textAlign or maxWidth."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":"fill","height":101},"vertical":{"width":"fill","height":101},"basis":"One line at the default size 96 with line-height 1.05: 96 × 1.05 ≈ 101 stage px. Height is lines × size × 1.05; the block div fills its container's width and wraps long text."},"examples":[{"title":"Headline with an accent phrase","code":"import { Big } from \"@/jbm/ui/big\"\nimport { color } from \"@/jbm/lib/tokens\"\n\n<Big size={76}>\n  Ideas que<br />\n  <span style={{ color: color.accent }}>se entienden.</span>\n</Big>"},{"title":"Cream heading on a dark card","code":"import { Big } from \"@/jbm/ui/big\"\nimport { color } from \"@/jbm/lib/tokens\"\nimport { Card } from \"@/jbm/ui/card\" // install @jbm/card separately\n\n<Card dark><Big size={48} color={color.bg}>Surface</Big></Card>"}],"qa":["Check the largest size used still fits the safe area in both orientations; portrait usually needs a smaller size or manual line breaks.","Confirm tight tracking does not collide glyphs at small sizes (below about 56px) and only one span uses the accent."],"related":[{"name":"tokens","relation":"installs"},{"name":"counter","relation":"installed-by"},{"name":"scene-spec","relation":"installed-by"},{"name":"card","relation":"example-import"}]},{"name":"card","entry":"component","title":"Card","description":"Raised surface with a fine border, layered depth, and inset edge light.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/card","installName":"card","page":"https://jbm-ui.bns.studio/c/card","registryItem":"https://jbm-ui.bns.studio/r/card.json","sourcePath":"registry/jbm/ui/card.tsx","files":[{"source":"registry/jbm/ui/card.tsx","target":"src/jbm/ui/card.tsx","import":"@/jbm/ui/card","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/card.md","json":"https://jbm-ui.bns.studio/catalog/card.json"},"snippet":"import { Card } from \"@/jbm/ui/card\"\nimport { color } from \"@/jbm/lib/tokens\"\nimport { Big } from \"@/jbm/ui/big\" // install @jbm/big separately\n\n<Card dark><Big color={color.bg}>Surface</Big></Card>","api":[{"export":"Card","kind":"component","summary":"Card-stock (or dark) container with the shared surface border, card shadow, 28px radius, and 40px padding.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Card content."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last; use for width, height, or layout, not for new shadows."},{"name":"dark","type":"boolean","required":false,"default":null,"description":"Uses the dark code-card fill with the dark border and shadow tokens."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Width fills its container and height follows the children. The card adds 40px padding and a 1px border on each side (82 stage pixels over the content); set style.width or style.height for a fixed box."},"examples":[{"title":"Dark card with a headline","code":"import { Card } from \"@/jbm/ui/card\"\nimport { color } from \"@/jbm/lib/tokens\"\nimport { Big } from \"@/jbm/ui/big\" // install @jbm/big separately\n\n<Card dark><Big color={color.bg}>Surface</Big></Card>"}],"qa":["Compare the light and dark surfaces on cream: fine border, layered shadow, and the inset highlight on the upper edge.","Check that content-driven height plus the 82px of padding and border still fits the safe area."],"related":[{"name":"tokens","relation":"installs"},{"name":"stat-card","relation":"installed-by"},{"name":"code-card","relation":"installed-by"},{"name":"big","relation":"example-import"}],"docs":[{"title":"Surface depth guide","url":"https://jbm-ui.bns.studio/docs/surface-depth.md"}]},{"name":"chip","entry":"component","title":"Chip","description":"Inline pill in outline, vermilion accent, or solid ink, with sans or mono type.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/chip","installName":"chip","page":"https://jbm-ui.bns.studio/c/chip","registryItem":"https://jbm-ui.bns.studio/r/chip.json","sourcePath":"registry/jbm/ui/chip.tsx","files":[{"source":"registry/jbm/ui/chip.tsx","target":"src/jbm/ui/chip.tsx","import":"@/jbm/ui/chip","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/chip.md","json":"https://jbm-ui.bns.studio/catalog/chip.json"},"snippet":"import { Chip } from \"@/jbm/ui/chip\"\n\n<Chip>Default</Chip>\n<Chip accent>Accent</Chip>\n<Chip solid>Solid</Chip>\n<Chip mono>Mono</Chip>","api":[{"export":"Chip","kind":"component","summary":"Inline-block, non-wrapping pill with a 2px border, 10×20px padding, and the 14px chip radius. Outline (card fill, line border, ink text) by default; `accent` fills vermilion, `solid` fills ink, both with cream text.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Chip text; kept on one line (white-space: nowrap)."},{"name":"accent","type":"boolean","required":false,"default":null,"description":"Fills and borders the chip with the vermilion accent. Takes precedence over `solid` when both are set."},{"name":"solid","type":"boolean","required":false,"default":null,"description":"Fills and borders the chip with ink."},{"name":"mono","type":"boolean","required":false,"default":null,"description":"Switches the face from Geist sans to Geist Mono."},{"name":"size","type":"number","required":false,"default":"26","description":"Font size in stage pixels."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Width follows the text. Height is 26px type at the font's normal line height (not set explicitly) plus 20px vertical padding and 4px of border; `size` scales the type only, not the padding."},"examples":[{"title":"Variants","code":"import { Chip } from \"@/jbm/ui/chip\"\n\n<Chip>Default</Chip>\n<Chip accent>Accent</Chip>\n<Chip solid>Solid</Chip>\n<Chip mono>Mono</Chip>"},{"title":"Staggered row in a video","code":"import { Chip } from \"@/jbm/ui/chip\"\nimport { Stagger } from \"@/jbm/motion/pop\" // install @jbm/pop separately\n\n<Stagger at={0.2} step={0.35}>\n  {[\"Idea\", \"Datos\"].map((text) => <Chip key={text}>{text}</Chip>)}\n</Stagger>"}],"qa":["Compare default, accent, solid, and mono side by side: outline on card fill, cream text on vermilion and ink.","Check that long chip text does not overflow the safe area, because chips never wrap; wrap the row container instead.","Keep at most one accent chip per composition."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-spec","relation":"installed-by"},{"name":"pop","relation":"example-import"}]},{"name":"stat-card","entry":"component","title":"StatCard","description":"One number with its context on a raised Card: mono label, large value, and a short sub line, stacked or in a row.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/card"],"install":"npx shadcn@latest add @jbm/stat-card","installName":"stat-card","page":"https://jbm-ui.bns.studio/c/stat-card","registryItem":"https://jbm-ui.bns.studio/r/stat-card.json","sourcePath":"registry/jbm/ui/stat-card.tsx","files":[{"source":"registry/jbm/ui/stat-card.tsx","target":"src/jbm/ui/stat-card.tsx","import":"@/jbm/ui/stat-card","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/stat-card.md","json":"https://jbm-ui.bns.studio/catalog/stat-card.json"},"snippet":"import { StatCard } from \"@/jbm/ui/stat-card\"\n\n<StatCard label=\"Contexto\" value=\"1M\" sub=\"tokens\" w={620} h={245} />\n<StatCard row label=\"Latencia\" value=\"0.8s\" sub=\"p50\" w={620} h={140} />","api":[{"export":"StatCard","kind":"component","summary":"Fixed-size Card (border-box) holding a mono label, an 800-weight value, and an optional sub line. Stacked by default for landscape; `row` puts the value (fixed 400px column) beside the label and sub for vertical stages.","props":[{"name":"label","type":"string","required":true,"default":null,"description":"Mono caption naming the number, 22px in the dim color."},{"name":"value","type":"React.ReactNode","required":true,"default":null,"description":"The number or short value; 96px stacked, 84px in row mode, -3px tracking."},{"name":"sub","type":"string","required":false,"default":null,"description":"Optional one-line context under the label (row) or under the value (stacked); dim when stacked, ink in row mode."},{"name":"valueColor","type":"string","required":false,"default":"color.accent","description":"Value color; defaults to the vermilion accent. Use color.ink when another element already carries the accent."},{"name":"w","type":"number","required":false,"default":"520","description":"Card width in stage pixels, including padding and border."},{"name":"h","type":"number","required":false,"default":"300","description":"Card height in stage pixels, including padding and border."},{"name":"row","type":"boolean","required":false,"default":"false","description":"Lays value, then label and sub, side by side with 22×34px padding and a 30px gap; the scene compiler uses it for vertical stages."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged after the size and row layout."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":520,"height":300},"vertical":{"width":520,"height":300},"basis":"Card is border-box, so the defaults w=520 and h=300 are the outer size in either orientation. For vertical stages SceneFromSpec renders `row` cards at the full content width (936) and h=180, and the gallery shows w=620 with h=245 stacked and h=140 in a row."},"examples":[{"title":"Stacked and row cards","code":"import { StatCard } from \"@/jbm/ui/stat-card\"\n\n<StatCard label=\"Contexto\" value=\"1M\" sub=\"tokens\" w={620} h={245} />\n<StatCard row label=\"Latencia\" value=\"0.8s\" sub=\"p50\" w={620} h={140} />"},{"title":"Ink value beside another accent","code":"import { StatCard } from \"@/jbm/ui/stat-card\"\nimport { color } from \"@/jbm/lib/tokens\"\n\n<StatCard label=\"Precisión\" value=\"86%\" valueColor={color.ink} />"}],"qa":["Content does not fit itself: check the widest value and longest sub stay inside w×h in both layouts, since the card has a fixed height and does not clip or shrink text.","In row mode the value column is a fixed 400px; with w below about 500 the label and sub have almost no room.","Compare stacked landscape and row vertical cards on cream: fine border, layered shadow, and inset highlight come from Card."],"related":[{"name":"tokens","relation":"installs"},{"name":"card","relation":"installs"},{"name":"scene-spec","relation":"installed-by"}]},{"name":"callout","entry":"component","title":"Callout","description":"Short sentence in a vermilion, ink, or outlined note pill.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/callout","installName":"callout","page":"https://jbm-ui.bns.studio/c/callout","registryItem":"https://jbm-ui.bns.studio/r/callout.json","sourcePath":"registry/jbm/ui/callout.tsx","files":[{"source":"registry/jbm/ui/callout.tsx","target":"src/jbm/ui/callout.tsx","import":"@/jbm/ui/callout","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/callout.md","json":"https://jbm-ui.bns.studio/catalog/callout.json"},"snippet":"import { Callout } from \"@/jbm/ui/callout\"\n\n<Callout>Primero, el problema.</Callout>\n<Callout variant=\"ink\">Luego, la idea.</Callout>\n<Callout variant=\"note\">Al final, cómo se usa.</Callout>","api":[{"export":"Callout","kind":"component","summary":"Inline-block pill with line-height 1.3 and a 2px border. `accent`: vermilion fill, cream sans, 14×22px padding, 16px radius. `ink`: ink fill, cream mono, 8×14px padding, 10px radius. `note`: transparent with an accent2 border and mono text, 10×18px padding, 12px radius, for footnotes.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"The sentence; wraps at maxWidth when set."},{"name":"variant","type":"\"accent\" | \"ink\" | \"note\"","required":false,"default":"\"accent\"","description":"\"accent\", \"ink\", or \"note\". Changes fill, face, padding, and radius together."},{"name":"size","type":"number","required":false,"default":"30","description":"Font size in stage pixels."},{"name":"maxWidth","type":"number","required":false,"default":null,"description":"Maximum width in stage pixels; unset lets the pill grow with its text up to the container width."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged after the variant."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":"auto","height":71},"vertical":{"width":"auto","height":71},"basis":"One line of the default accent variant: 30 × 1.3 = 39 plus 28px vertical padding and 4px border = 71 stage px. Ink is 59 and note is 63 at the same size; each wrapped line adds size × 1.3. Width follows the text."},"examples":[{"title":"Three variants","code":"import { Callout } from \"@/jbm/ui/callout\"\n\n<Callout>Primero, el problema.</Callout>\n<Callout variant=\"ink\">Luego, la idea.</Callout>\n<Callout variant=\"note\">Al final, cómo se usa.</Callout>"},{"title":"Wrapped in a column","code":"import { Callout } from \"@/jbm/ui/callout\"\n\n<Callout size={34} maxWidth={936}>Una idea clara vale más que diez diapositivas.</Callout>"}],"qa":["Compare accent, ink, and note on cream; note text uses accent2 and must stay legible at small sizes.","Wrap a long sentence with maxWidth and check line spacing and padding stay even.","Only one accent-filled callout per composition, and it should not compete with another accent element."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-spec","relation":"installed-by"}]},{"name":"bullet-list","entry":"component","title":"BulletList","description":"Vertical list of short strings with a vermilion arrow or dot marker.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/bullet-list","installName":"bullet-list","page":"https://jbm-ui.bns.studio/c/bullet-list","registryItem":"https://jbm-ui.bns.studio/r/bullet-list.json","sourcePath":"registry/jbm/ui/bullet-list.tsx","files":[{"source":"registry/jbm/ui/bullet-list.tsx","target":"src/jbm/ui/bullet-list.tsx","import":"@/jbm/ui/bullet-list","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/bullet-list.md","json":"https://jbm-ui.bns.studio/catalog/bullet-list.json"},"snippet":"import { BulletList } from \"@/jbm/ui/bullet-list\"\n\n<BulletList size={28} items={[\"El contexto\", \"La pregunta\", \"La respuesta\"]} />\n<BulletList size={28} marker=\"dot\" items={[\"Simple\", \"Reusable\", \"Consistente\"]} />","api":[{"export":"BulletList","kind":"component","summary":"Flex column of rows; each row is 600-weight sans ink text with line-height 1.25, preceded by an accent → or an 18px accent dot, 16px apart. Pure React; `renderItem` lets you wrap each row, for example in a motion Pop.","props":[{"name":"items","type":"string[]","required":true,"default":null,"description":"Row strings in order. Each string is also the React key, so items must be unique."},{"name":"marker","type":"\"arrow\" | \"dot\"","required":false,"default":"\"arrow\"","description":"\"arrow\" (vermilion →) or \"dot\" (18px vermilion circle)."},{"name":"size","type":"number","required":false,"default":"36","description":"Font size of each row in stage pixels."},{"name":"gap","type":"number","required":false,"default":"16","description":"Vertical space between rows in stage pixels."},{"name":"renderItem","type":"(node: React.ReactNode, i: number) => React.ReactNode","required":false,"default":null,"description":"Optional wrapper called with each finished row node and its index; return the node to render (for example inside a Pop with a staggered `at`)."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles on the column, merged last; set width here in a scene."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Fills its container's width; height is n rows × size × 1.25 plus (n − 1) × gap, so three default rows are 3 × 45 + 2 × 16 = 167 stage px. Long items wrap and add lines."},"examples":[{"title":"Arrow and dot lists","code":"import { BulletList } from \"@/jbm/ui/bullet-list\"\n\n<BulletList size={28} items={[\"El contexto\", \"La pregunta\", \"La respuesta\"]} />\n<BulletList size={28} marker=\"dot\" items={[\"Simple\", \"Reusable\", \"Consistente\"]} />"},{"title":"Staggered entry in a video","code":"import { BulletList } from \"@/jbm/ui/bullet-list\"\nimport { Pop } from \"@/jbm/motion/pop\" // install @jbm/pop separately\n\n<BulletList\n  items={[\"El contexto\", \"La pregunta\"]}\n  renderItem={(node, i) => <Pop at={0.4 + i * 0.6} from=\"left\" dist={14}>{node}</Pop>}\n/>"}],"qa":["Compare arrow and dot markers: the dot stays vertically centered on the first line and the arrow is vermilion.","Duplicate strings share a React key and trigger a warning; keep items unique.","Check the full list height fits the safe area in portrait, where the scene compiler uses a 22px gap.","With renderItem and Pop, step through the stagger and confirm every row ends fully visible."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-spec","relation":"installed-by"},{"name":"pop","relation":"example-import"}]},{"name":"brand","entry":"component","title":"Brand","description":"Centered tacosdedatos wordmark in Geist Mono with an optional tagline.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/brand","installName":"brand","page":"https://jbm-ui.bns.studio/c/brand","registryItem":"https://jbm-ui.bns.studio/r/brand.json","sourcePath":"registry/jbm/ui/brand.tsx","files":[{"source":"registry/jbm/ui/brand.tsx","target":"src/jbm/ui/brand.tsx","import":"@/jbm/ui/brand","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/brand.md","json":"https://jbm-ui.bns.studio/catalog/brand.json"},"snippet":"import { Brand } from \"@/jbm/ui/brand\"\n\n<Brand tagline=\"Ideas, datos y código.\" size={64} />","api":[{"export":"Brand","kind":"component","summary":"Centered lockup: \"tacos\" and \"datos\" in bold ink Geist Mono with \"de\" in the vermilion accent, and an optional dim sans tagline 10px below.","props":[{"name":"tagline","type":"string","required":false,"default":null,"description":"Optional line under the wordmark at round(size × 0.46) px."},{"name":"size","type":"number","required":false,"default":"56","description":"Wordmark font size in stage pixels; the tagline scales with it."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles on the centered wrapper, merged last."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"A centered block that fills its container's width. Height is one 56px mono line at the font's normal line height (not set explicitly), plus 10px and one round(size × 0.46) tagline line when a tagline is given."},"examples":[{"title":"Lockup with tagline","code":"import { Brand } from \"@/jbm/ui/brand\"\n\n<Brand tagline=\"Ideas, datos y código.\" size={64} />"}],"qa":["Check \"de\" is the only accent in the lockup and the wordmark has no spaces.","Confirm the tagline stays centered under the wordmark and scales with size.","In an end card, keep the lockup the only accent element on the frame."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-spec","relation":"installed-by"}]},{"name":"ui-button","entry":"component","title":"UiButton","description":"Illustrated pill button with a label bar, in ink, accent, or outlined paper tones.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/ui-button","installName":"ui-button","page":"https://jbm-ui.bns.studio/c/ui-button","registryItem":"https://jbm-ui.bns.studio/r/ui-button.json","sourcePath":"registry/jbm/ui/ui-button.tsx","files":[{"source":"registry/jbm/ui/ui-button.tsx","target":"src/jbm/ui/ui-button.tsx","import":"@/jbm/ui/ui-button","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/ui-button.md","json":"https://jbm-ui.bns.studio/catalog/ui-button.json"},"snippet":"import { UiButton } from \"@/jbm/ui/ui-button\"\n\n<UiButton w={220} h={70} tone=\"accent\" />","api":[{"export":"UiButton","kind":"component","summary":"Paper cut-out pill (radius h / 2) with a centred rounded bar standing in for the label. The bar is 42% of the width and 13% of the height (at least 6px); it is cream on ink and accent, ink on paper. Pure React with no text and no click handling: an illustration, not a control.","props":[{"name":"w","type":"number","required":false,"default":"220","description":"Width in stage pixels, including the 2px Paper edge."},{"name":"h","type":"number","required":false,"default":"70","description":"Height in stage pixels; also sets the pill radius (h / 2) and the label bar thickness."},{"name":"tone","type":"PaperTone","required":false,"default":"\"ink\"","description":"Paper stock: ink (default, filled), accent (vermilion), or paper (cream with an ink outline and ink bar)."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged over the flex centring; use for positioning, opacity, or transforms."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":220,"height":70},"vertical":{"width":220,"height":70},"basis":"Fixed w × h box (border-box, so the 2px edge is inside) at the defaults 220 × 70. `w` and `h` set it directly; the Paper shadow extends past the box by up to about 32px below."},"examples":[{"title":"Accent button","code":"import { UiButton } from \"@/jbm/ui/ui-button\"\n\n<UiButton w={220} h={70} tone=\"accent\" />"},{"title":"Outlined button in a paper row","code":"import { UiButton } from \"@/jbm/ui/ui-button\"\n\n<div style={{ display: \"flex\", gap: 24 }}>\n  <UiButton w={180} h={56} tone=\"paper\" />\n  <UiButton w={180} h={56} />\n</div>"}],"qa":["Compare ink, accent, and paper tones on cream: the paper tone keeps its 2px ink outline and ink bar; ink and accent show a cream bar.","Check extremes of h: at small heights the bar floors at 6px thick; at large heights the pill stays fully rounded.","Confirm the bar stays centred when style adds padding or positioning."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"},{"name":"piece","relation":"installed-by"}],"family":"Interface bits"},{"name":"replay-button","entry":"component","title":"ReplayButton","description":"Controlled replay icon whose arrow charges from tail to arrowhead as the host animation progresses, then unlocks.","category":"Interactive","capabilities":["replay"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/replay-button","installName":"replay-button","page":"https://jbm-ui.bns.studio/c/replay-button","registryItem":"https://jbm-ui.bns.studio/r/replay-button.json","sourcePath":"registry/jbm/ui/replay-button.tsx","files":[{"source":"registry/jbm/ui/replay-button.tsx","target":"src/jbm/ui/replay-button.tsx","import":"@/jbm/ui/replay-button","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/replay-button.md","json":"https://jbm-ui.bns.studio/catalog/replay-button.json"},"snippet":"import { ReplayButton } from \"@/jbm/ui/replay-button\"\n\n<ReplayButton\n  progress={progress} // 0–1 from your animation\n  charging={isPlaying}\n  onReplay={restartAnimation}\n  label=\"Replay animation\"\n/>","api":[{"export":"ReplayButton","kind":"component","summary":"Ink replay button with a 44px minimum hit area. While `charging`, the circular shaft draws on over the first 85% of `progress` and the arrowhead over the last 15%; clicks are ignored and the button stays focusable with aria-disabled. When not charging it shows the complete icon and calls `onReplay` on click. No internal timer and no Remotion dependency.","props":[{"name":"progress","type":"number","required":true,"default":null,"description":"Normalized progress of the host animation, 0–1. Clamped; non-finite values count as 0. Ignored (treated as 1) when `charging` is false."},{"name":"charging","type":"boolean","required":true,"default":null,"description":"True while the host animation plays: shows the partial charge and blocks activation (aria-disabled, still focusable). False shows the complete icon and allows replay."},{"name":"onReplay","type":"() => void","required":true,"default":null,"description":"Called on click only when neither `charging` nor `disabled` is set; restart your animation here."},{"name":"label","type":"string","required":false,"default":"\"Replay animation\"","description":"Accessible name (aria-label) for the button."},{"name":"iconSize","type":"number","required":false,"default":"26","description":"Width and height of the icon in pixels; the button adds 9px padding on each side."}],"passthrough":["Omit< React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\" | \"onClick\" | \"type\" | \"aria-label\" >"]}],"stage":{"mode":"declared","landscape":{"width":44,"height":44},"vertical":{"width":44,"height":44},"basis":"iconSize 26 plus 9px padding on each side gives 44×44, which is also the enforced minimum hit area. Size grows with iconSize (iconSize + 18); the gallery demo uses iconSize 52 for a 70×70 button."},"examples":[{"title":"Wire to any animation","code":"import { ReplayButton } from \"@/jbm/ui/replay-button\"\n\n<ReplayButton\n  progress={progress} // 0–1 from your animation\n  charging={isPlaying}\n  onReplay={restartAnimation}\n  label=\"Replay animation\"\n/>"},{"title":"Larger icon","code":"import { ReplayButton } from \"@/jbm/ui/replay-button\"\n\n<ReplayButton progress={1} charging={false} onReplay={() => player.seekTo(0)} iconSize={52} />"}],"qa":["Click replay and watch the charge: the shaft draws from its tail to the top-right, then the two arrowhead strokes draw in after 85% progress; at 100% the complete icon returns.","While charging, click and press Enter/Space: nothing restarts, focus stays on the button, and it announces as disabled.","Tab to the button and confirm the visible focus treatment on cream; check the 44×44 hit area at the default iconSize.","Pass progress values below 0, above 1, and NaN while charging: the icon clamps instead of overdrawing or disappearing."],"related":[{"name":"tokens","relation":"installs"}]},{"name":"motion-hooks","entry":"component","title":"MotionHooks","description":"Remotion timing hooks in seconds: elapsed time, a spring entrance, a cubic-out fade, and an eased progress value.","category":"Foundations","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":[],"install":"npx shadcn@latest add @jbm/motion-hooks","installName":"motion-hooks","page":"https://jbm-ui.bns.studio/c/motion-hooks","registryItem":"https://jbm-ui.bns.studio/r/motion-hooks.json","sourcePath":"registry/jbm/motion/hooks.ts","files":[{"source":"registry/jbm/motion/hooks.ts","target":"src/jbm/motion/hooks.ts","import":"@/jbm/motion/hooks","type":"registry:hook"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/motion-hooks.md","json":"https://jbm-ui.bns.studio/catalog/motion-hooks.json"},"snippet":"import { useSec, useIn, useFade, useProgress } from \"@/jbm/motion/hooks\"\n\n// Render inside a Remotion <Composition> or <Player>: hooks run in the component body.\nexport function TimelineReadout() {\n  const seconds = useSec()\n  const entrance = useIn(0.2)\n  const opacity = useFade(0.2)\n  const progress = useProgress(0.2, 100, 1.5)\n  return (\n    <div style={{ opacity, transform: `translateY(${(1 - entrance) * 30}px)` }}>\n      {progress.toFixed(0)}% at {seconds.toFixed(2)}s\n    </div>\n  )\n}","api":[{"export":"useSec","kind":"hook","summary":"Seconds elapsed since the start of the enclosing Remotion Sequence (current frame ÷ fps).","params":[],"returns":"Elapsed seconds as a number; fractional between frames."},{"export":"useIn","kind":"hook","summary":"Spring entrance that starts at `startSec` (rounded to the nearest frame) with mass 0.8. Stays 0 before the start and settles near 1; it can overshoot 1 slightly while settling.","params":[{"name":"startSec","type":"number","required":true,"default":null,"description":"Start time in seconds relative to the enclosing Sequence."},{"name":"opts","type":"{ damping?: number; stiffness?: number }","required":false,"default":null,"description":"Optional spring config: `damping` (default 14) and `stiffness` (default 120). Lower damping bounces more."}],"returns":"Spring value from 0 toward 1, for opacity, scale, or translate progress."},{"export":"useFade","kind":"hook","summary":"Cubic-out interpolation from 0 to 1 over `dur` seconds starting at `startSec`, clamped at both ends.","params":[{"name":"startSec","type":"number","required":true,"default":null,"description":"Start time in seconds relative to the enclosing Sequence."},{"name":"dur","type":"number","required":false,"default":"0.4","description":"Fade length in seconds."}],"returns":"Opacity-style value clamped to 0–1."},{"export":"useProgress","kind":"hook","summary":"Cubic-out interpolation from 0 to `target` over `dur` seconds starting at `startSec`, clamped at both ends. Use for bar fills, counters, and draw-on strokes.","params":[{"name":"startSec","type":"number","required":true,"default":null,"description":"Start time in seconds relative to the enclosing Sequence."},{"name":"target","type":"number","required":false,"default":"1","description":"Value reached at `startSec + dur` and held afterwards (e.g. 1, 100, or a probability)."},{"name":"dur","type":"number","required":false,"default":"0.7","description":"Seconds taken to reach `target`."}],"returns":"Number between 0 and `target`."}],"stage":{"mode":"n/a","reason":"Hooks only; they render nothing. The gallery preview is a demo component built on them."},"examples":[{"title":"Entrance, fade, and a counting value","code":"import { useSec, useIn, useFade, useProgress } from \"@/jbm/motion/hooks\"\n\n// Render inside a Remotion <Composition> or <Player>: hooks run in the component body.\nexport function TimelineReadout() {\n  const seconds = useSec()\n  const entrance = useIn(0.2)\n  const opacity = useFade(0.2)\n  const progress = useProgress(0.2, 100, 1.5)\n  return (\n    <div style={{ opacity, transform: `translateY(${(1 - entrance) * 30}px)` }}>\n      {progress.toFixed(0)}% at {seconds.toFixed(2)}s\n    </div>\n  )\n}"}],"qa":["Step to the first frame, the middle of the 1.5 s window, and the last frame: the percentage reads 0, an intermediate value, then exactly 100; useSec matches frame ÷ fps.","Check that times are relative to the enclosing Sequence: a component inside a Sequence that starts later still enters at its own `startSec`.","When changing spring defaults, re-check every consumer (Pop, ProbBar, RebuildScreens, Catalog) and the gallery preview durations measured from the same spring config."],"related":[{"name":"pop","relation":"installed-by"},{"name":"counter","relation":"installed-by"},{"name":"prob-bar","relation":"installed-by"},{"name":"captions","relation":"installed-by"},{"name":"rebuild-screens","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","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":52,"lastFrame":51,"strip":"https://jbm-ui.bns.studio/c/motion-hooks?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"Counting up","frame":15,"at":0.5,"note":"The percentage is mid-count while the block is still rising into place."},{"label":"End","frame":51,"at":1.7}],"demo":[{"code":"const entrance = useIn(0.2)\nconst opacity = useFade(0.2)\nconst progress = useProgress(0.2, 100, 1.5)\n// A Big number shows progress.toFixed(0) + \"%\", fading and rising in with opacity and entrance."}],"code":"const entrance = useIn(0.2)\nconst opacity = useFade(0.2)\nconst progress = useProgress(0.2, 100, 1.5)\n// A Big number shows progress.toFixed(0) + \"%\", fading and rising in with opacity and entrance."}},{"name":"scene","entry":"component","title":"Scene","description":"Full-bleed cream canvas that fills its composition and clips overflow; one per scene.","category":"Layout","capabilities":["player"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/scene","installName":"scene","page":"https://jbm-ui.bns.studio/c/scene","registryItem":"https://jbm-ui.bns.studio/r/scene.json","sourcePath":"registry/jbm/motion/scene.tsx","files":[{"source":"registry/jbm/motion/scene.tsx","target":"src/jbm/motion/scene.tsx","import":"@/jbm/motion/scene","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/scene.md","json":"https://jbm-ui.bns.studio/catalog/scene.json"},"snippet":"import { Scene } from \"@/jbm/motion/scene\"\nimport { Big } from \"@/jbm/ui/big\" // install @jbm/big separately\n\n<Scene><Big>Una idea a la vez.</Big></Scene>","api":[{"export":"Scene","kind":"component","summary":"Absolutely positioned div with inset 0, the canvas background color, and overflow hidden. Place one inside each Remotion Sequence and lay out blocks inside it.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Scene content; absolutely positioned children are placed relative to the scene."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last, e.g. flex centering or padding."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":"fill","height":1080},"vertical":{"width":"fill","height":1920},"basis":"inset: 0 fills the positioned parent, which in a composition is the full stage: 1920×1080 in landscape and 1080×1920 in vertical (stage tokens in lib/tokens.ts)."},"examples":[{"title":"A headline on the canvas","code":"import { Scene } from \"@/jbm/motion/scene\"\nimport { Big } from \"@/jbm/ui/big\" // install @jbm/big separately\n\n<Scene><Big>Una idea a la vez.</Big></Scene>"},{"title":"Centered content","code":"import { Scene } from \"@/jbm/motion/scene\"\n\n<Scene style={{ display: \"flex\", alignItems: \"center\", justifyContent: \"center\", padding: 120 }}>\n  {children}\n</Scene>"}],"qa":["Check the canvas covers the full composition in both orientations with no white edge, and content outside it is clipped.","The preview is a single still frame; confirm the background is the cream canvas token, not a hard-coded color."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-spec","relation":"installed-by"},{"name":"big","relation":"example-import"}]},{"name":"pop","entry":"component","title":"Pop","description":"Spring entrances for Remotion: Pop slides or scales one block in, Stagger cascades a list, and Leave fades a block out.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/motion-hooks"],"install":"npx shadcn@latest add @jbm/pop","installName":"pop","page":"https://jbm-ui.bns.studio/c/pop","registryItem":"https://jbm-ui.bns.studio/r/pop.json","sourcePath":"registry/jbm/motion/pop.tsx","files":[{"source":"registry/jbm/motion/pop.tsx","target":"src/jbm/motion/pop.tsx","import":"@/jbm/motion/pop","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/pop.md","json":"https://jbm-ui.bns.studio/catalog/pop.json"},"snippet":"import { Stagger } from \"@/jbm/motion/pop\"\nimport { Chip } from \"@/jbm/ui/chip\" // install @jbm/chip separately\n\n<Stagger at={0.2} step={0.35}>\n  {[\"Idea\", \"Datos\"].map(text => <Chip key={text}>{text}</Chip>)}\n</Stagger>","api":[{"export":"Pop","kind":"component","summary":"Wraps children in a div whose opacity follows a useIn spring from `at`, while it translates in from one side by `dist` or scales from 0.6 to 1.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Entrance start in seconds relative to the enclosing Sequence."},{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Content to reveal."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged onto the wrapper (after opacity and transform, so a transform here replaces the motion)."},{"name":"from","type":"\"up\" | \"down\" | \"left\" | \"right\" | \"scale\"","required":false,"default":"\"up\"","description":"Entrance direction: `up` rises from below, `down` drops from above, `left`/`right` slide in from that side, `scale` grows from 0.6×."},{"name":"dist","type":"number","required":false,"default":"40","description":"Travel distance in stage pixels for the directional entrances; ignored by `scale`."}],"passthrough":[]},{"export":"Stagger","kind":"component","summary":"Wraps each child in a Pop; child i enters at `at + i × step` seconds.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Start of the first child, in seconds relative to the enclosing Sequence."},{"name":"step","type":"number","required":false,"default":"0.3","description":"Seconds between consecutive children."},{"name":"from","type":"\"up\" | \"down\" | \"left\" | \"right\" | \"scale\"","required":false,"default":"\"up\"","description":"Entrance direction applied to every child (see Pop)."},{"name":"dist","type":"number","required":false,"default":"14","description":"Travel distance in stage pixels for every child."},{"name":"children","type":"React.ReactNode[]","required":true,"default":null,"description":"Array of children to cascade; each becomes its own Pop wrapper."}],"passthrough":[]},{"export":"Leave","kind":"component","summary":"Exit: from `at`, the wrapper fades out with cubic-out easing and drifts up by `dist` over 0.4 s, keeping its layout space.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Exit start in seconds relative to the enclosing Sequence."},{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Content that leaves."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged onto the wrapper (after opacity and transform)."},{"name":"dist","type":"number","required":false,"default":"30","description":"Upward drift in stage pixels at the end of the exit."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Each wrapper is a plain block div sized by its children; Pop, Stagger, and Leave add no box of their own. Translations and scale do not change layout size, so reserve room for `dist` travel near the safe-area edge."},"examples":[{"title":"Cascade chips","code":"import { Stagger } from \"@/jbm/motion/pop\"\nimport { Chip } from \"@/jbm/ui/chip\" // install @jbm/chip separately\n\n<Stagger at={0.2} step={0.35}>\n  {[\"Idea\", \"Datos\"].map(text => <Chip key={text}>{text}</Chip>)}\n</Stagger>"},{"title":"Enter, then leave before the scene ends","code":"import { Pop, Leave } from \"@/jbm/motion/pop\"\n\n<Leave at={3}>\n  <Pop at={0.4} from=\"left\" dist={60}>\n    <h2>Primero esto.</h2>\n  </Pop>\n</Leave>\n// Render inside a Remotion <Composition> or <Player>."}],"qa":["Step through the first frame (children invisible), mid-cascade (earlier children settled, later ones entering), and the last frame (all fully opaque at rest).","Try each `from` value: directional entrances move by `dist` and settle at 0 offset; `scale` grows without translating.","Check the spring overshoot does not push content past the safe area, especially with large `dist` values in vertical.","For Leave, confirm the block is fully transparent 0.4 s after `at` and its layout space remains."],"related":[{"name":"motion-hooks","relation":"installs"},{"name":"prob-bar","relation":"installed-by"},{"name":"rebuild-screens","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","relation":"installed-by"},{"name":"scene-spec","relation":"installed-by"},{"name":"chip","relation":"example-import"}],"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":46,"lastFrame":45,"strip":"https://jbm-ui.bns.studio/c/pop?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"First chip lands","frame":15,"at":0.5,"note":"“Idea” has scaled in; “Datos” is just starting."},{"label":"Second chip lands","frame":27,"at":0.9,"note":"“Datos” is nearly settled and “Historia” starts to scale in."},{"label":"End","frame":45,"at":1.5}],"demo":[{"component":"Stagger","props":{"at":0.2,"step":0.35,"from":"scale"},"children":[{"component":"Chip","children":"Idea"},{"component":"Chip","children":"Datos"},{"component":"Chip","children":"Historia"}]}],"code":"<Stagger at={0.2} step={0.35} from=\"scale\">\n  <Chip>Idea</Chip>\n  <Chip>Datos</Chip>\n  <Chip>Historia</Chip>\n</Stagger>"}},{"name":"counter","entry":"component","title":"Counter","description":"Number that counts up to a target.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/big","@jbm/motion-hooks"],"install":"npx shadcn@latest add @jbm/counter","installName":"counter","page":"https://jbm-ui.bns.studio/c/counter","registryItem":"https://jbm-ui.bns.studio/r/counter.json","sourcePath":"registry/jbm/motion/counter.tsx","files":[{"source":"registry/jbm/motion/counter.tsx","target":"src/jbm/motion/counter.tsx","import":"@/jbm/motion/counter","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/counter.md","json":"https://jbm-ui.bns.studio/catalog/counter.json"},"snippet":"import { Counter } from \"@/jbm/motion/counter\"\n\n<Counter n={1024} at={0.2} dur={1.5} />","api":[{"export":"Counter","kind":"component","summary":"Renders a Big numeral that eases from 0 to `n`, rounded to whole numbers, on the Remotion timeline.","props":[{"name":"n","type":"number","required":true,"default":null,"description":"Target value; the count ends here and holds."},{"name":"at","type":"number","required":true,"default":null,"description":"Start time in seconds from the start of the sequence."},{"name":"dur","type":"number","required":false,"default":"0.8","description":"Seconds the count takes to reach `n`."},{"name":"size","type":"number","required":false,"default":"140","description":"Font size in stage pixels, passed to Big."},{"name":"color","type":"string","required":false,"default":"color.accent","description":"Text color; keep the one vermilion accent per composition."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":"auto","height":147},"vertical":{"width":"auto","height":147},"basis":"One line of Big at size 140 with line-height 1.05. Height is size × 1.05; width follows the digit count of `n` (about 0.6 × size per digit)."},"examples":[{"title":"Count to a key number","code":"import { Counter } from \"@/jbm/motion/counter\"\n\n<Counter n={1024} at={0.2} dur={1.5} />"},{"title":"Smaller, in ink, beside other text","code":"import { Counter } from \"@/jbm/motion/counter\"\nimport { color } from \"@/jbm/lib/tokens\"\n\n<Counter n={42} at={1} size={96} color={color.ink} />\n// Render inside a Remotion <Composition> or <Player>."}],"qa":["Step to the first, middle, and last frames: 0 before `at`, an intermediate whole number mid-count, and exactly `n` at rest.","In a host composition, check the widest value of `n` stays inside the safe area at the chosen size in both orientations (the gallery bench previews landscape only).","Confirm only one element on the stage uses the accent color."],"related":[{"name":"big","relation":"installs"},{"name":"motion-hooks","relation":"installs"},{"name":"tokens","relation":"example-import"}],"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":52,"lastFrame":51,"strip":"https://jbm-ui.bns.studio/c/counter?view=strip","frames":[{"label":"Begin","frame":0,"at":0},{"label":"Counting up","frame":15,"at":0.5,"note":"The number is mid-count (about halfway), easing toward 1024."},{"label":"End","frame":51,"at":1.7}],"demo":[{"component":"Counter","props":{"n":1024,"at":0.2,"dur":1.5}}],"code":"<Counter n={1024} at={0.2} dur={1.5} />"}},{"name":"prob-bar","entry":"component","title":"ProbBar","description":"Labelled probability bar that slides in and fills to its value while the number counts up.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/tokens","@jbm/motion-hooks","@jbm/pop"],"install":"npx shadcn@latest add @jbm/prob-bar","installName":"prob-bar","page":"https://jbm-ui.bns.studio/c/prob-bar","registryItem":"https://jbm-ui.bns.studio/r/prob-bar.json","sourcePath":"registry/jbm/motion/prob-bar.tsx","files":[{"source":"registry/jbm/motion/prob-bar.tsx","target":"src/jbm/motion/prob-bar.tsx","import":"@/jbm/motion/prob-bar","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/prob-bar.md","json":"https://jbm-ui.bns.studio/catalog/prob-bar.json"},"snippet":"import { ProbBar } from \"@/jbm/motion/prob-bar\"\n\n<ProbBar label=\"Confianza\" p={0.86} at={0.2} />","api":[{"export":"ProbBar","kind":"component","summary":"One row: a 24px mono label, a rounded track whose vermilion fill eases to `p` over 0.7 s, and the live value to two decimals. The row pops in from the left by 12px at `at`.","props":[{"name":"label","type":"string","required":true,"default":null,"description":"Mono label on the left, in ink."},{"name":"p","type":"number","required":true,"default":null,"description":"Target probability, 0–1; the fill ends at p × track width and the value reads p to two decimals. Not clamped: values above 1 overflow the track and are clipped."},{"name":"at","type":"number","required":true,"default":null,"description":"Start of the entrance and fill in seconds relative to the enclosing Sequence."},{"name":"w","type":"number","required":false,"default":"520","description":"Row width budget in stage pixels; the track is w − labelW − 90 wide."},{"name":"labelW","type":"number","required":false,"default":"230","description":"Width reserved for the label in stage pixels; long labels wrap inside it."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":546,"height":29},"vertical":{"width":546,"height":29},"basis":"Label (labelW 230) + 18 gap + track (w − labelW − 90 = 200) + 18 gap + 80px value gives w + 26 = 546 at w 520. Height is one line of 24px mono text (about 29px at normal line-height; the track itself is 22px). A label that wraps in labelW adds lines. The wrapper is a block element, so it stretches to its container's width while the row content stays w + 26."},"examples":[{"title":"One probability","code":"import { ProbBar } from \"@/jbm/motion/prob-bar\"\n\n<ProbBar label=\"Confianza\" p={0.86} at={0.2} />"},{"title":"A ranked list","code":"import { ProbBar } from \"@/jbm/motion/prob-bar\"\n\n{[[\"gato\", 0.72], [\"perro\", 0.21], [\"zorro\", 0.07]].map(([label, p], i) => (\n  <ProbBar key={label} label={String(label)} p={Number(p)} at={0.4 + i * 0.3} w={720} />\n))}"}],"qa":["Step to the first frame (row hidden, value 0.00), mid-fill (partial bar, intermediate value), and the last frame (bar at p, value exactly p to two decimals).","Check p = 0 and p = 1: an empty track still reads, and a full fill stays inside the rounded track.","Try a long label: confirm it wraps within labelW and does not push the track; the exact row height at normal line-height is approximate (about 29px) and should be measured if layout depends on it."],"related":[{"name":"tokens","relation":"installs"},{"name":"motion-hooks","relation":"installs"},{"name":"pop","relation":"installs"}],"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":28,"lastFrame":27,"strip":"https://jbm-ui.bns.studio/c/prob-bar?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"Bar filling","frame":12,"at":0.4,"note":"The bar is part-way to 0.86 and the value readout matches its length."},{"label":"End","frame":27,"at":0.9}],"demo":[{"component":"ProbBar","props":{"label":"Confianza","p":0.86,"at":0.2,"w":620}}],"code":"<ProbBar label=\"Confianza\" p={0.86} at={0.2} w={620} />"}},{"name":"code-card","entry":"component","title":"CodeCard","description":"Dark code card that types each line in place at a steady character rate, one line after another.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/card","@jbm/tokens"],"install":"npx shadcn@latest add @jbm/code-card","installName":"code-card","page":"https://jbm-ui.bns.studio/c/code-card","registryItem":"https://jbm-ui.bns.studio/r/code-card.json","sourcePath":"registry/jbm/motion/code-card.tsx","files":[{"source":"registry/jbm/motion/code-card.tsx","target":"src/jbm/motion/code-card.tsx","import":"@/jbm/motion/code-card","type":"registry:component"},{"source":"registry/jbm/motion/code-card-timing.js","target":"src/jbm/motion/code-card-timing.js","import":"@/jbm/motion/code-card-timing.js","type":"registry:component"},{"source":"registry/jbm/motion/code-card-timing.d.ts","target":"src/jbm/motion/code-card-timing.d.ts","import":"@/jbm/motion/code-card-timing","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/code-card.md","json":"https://jbm-ui.bns.studio/catalog/code-card.json"},"snippet":"import { CodeCard } from \"@/jbm/motion/code-card\"\n\n<CodeCard title=\"hello.ts\" charsPerSecond={32} lines={[\n  { t: \"const idea = \\\"simple\\\"\", at: 0.2 },\n  { t: \"render(idea)\", at: 0.7, color: \"#FF8A6A\" },\n]} />","api":[{"export":"CodeCard","kind":"component","summary":"Fixed-size dark Card with three window dots, an optional mono title, and mono code lines. Each line starts typing at its `at` cue or when the previous line finishes, whichever is later, at `charsPerSecond`; empty rows keep their line height so the layout never jumps.","props":[{"name":"lines","type":"CodeLine[]","required":true,"default":null,"description":"Code lines in order: `t` is the text (whitespace preserved, no wrapping), `at` is the earliest start in seconds relative to the enclosing Sequence, and optional `color` overrides the cream text color."},{"name":"w","type":"number","required":false,"default":"900","description":"Card width in stage pixels."},{"name":"h","type":"number","required":false,"default":"520","description":"Card height in stage pixels; content beyond it is clipped."},{"name":"size","type":"number","required":false,"default":"24","description":"Code font size in stage pixels; lines are 1.55 × size tall."},{"name":"title","type":"string","required":false,"default":null,"description":"Optional mono file name beside the window dots."},{"name":"charsPerSecond","type":"number","required":false,"default":"32","description":"Typing rate in characters per second; must be positive and finite or the schedule throws."}],"passthrough":[]},{"export":"codeTypingSchedule","kind":"function","summary":"Builds the sequential typing schedule CodeCard uses, in frames. Use it in the host to budget scene duration: the last entry's `end` plus one terminal frame.","params":[{"name":"lines","type":"{ t: string; at: number }[]","required":true,"default":null,"description":"The same `{ t, at }` lines passed to CodeCard; `at` in seconds."},{"name":"fps","type":"number","required":true,"default":null,"description":"Composition frames per second."},{"name":"charsPerSecond","type":"number","required":false,"default":null,"description":"Typing rate; throws a RangeError unless positive and finite."}],"returns":"One `{ characters, start, end }` per line: the line split into characters (code points) and its start and end frames."},{"export":"typedCode","kind":"function","summary":"The visible prefix of one scheduled line at a given frame.","params":[{"name":"line","type":"CodeTypingLine","required":true,"default":null,"description":"One entry from codeTypingSchedule."},{"name":"frame","type":"number","required":true,"default":null,"description":"Current frame relative to the enclosing Sequence."},{"name":"fps","type":"number","required":true,"default":null,"description":"Composition frames per second."},{"name":"charsPerSecond","type":"number","required":false,"default":null,"description":"Typing rate; must match the value used for the schedule."}],"returns":"The typed text so far: empty before `start`, the full line from `end` on."}],"stage":{"mode":"declared","landscape":{"width":900,"height":520},"vertical":{"width":900,"height":520},"basis":"The card is border-box with width `w` (900) and height `h` (520) at the defaults, regardless of content. Scene specs pass w = min(usable width, 1200) and h 480 in landscape, the usable width (936) and h 520 in vertical, and the available height in illustration layouts. Long lines do not wrap; they clip at the card edge."},"examples":[{"title":"Type a short file","code":"import { CodeCard } from \"@/jbm/motion/code-card\"\n\n<CodeCard title=\"hello.ts\" charsPerSecond={32} lines={[\n  { t: \"const idea = \\\"simple\\\"\", at: 0.2 },\n  { t: \"render(idea)\", at: 0.7, color: \"#FF8A6A\" },\n]} />"},{"title":"Budget the scene length","code":"import { codeTypingSchedule } from \"@/jbm/motion/code-card-timing\"\n\nconst fps = 30\nconst schedule = codeTypingSchedule(lines, fps, 32)\nconst durationInFrames = (schedule.at(-1)?.end ?? 0) + 1"}],"qa":["Step to the first frame (empty rows at full height), mid-typing (a partially typed line, earlier lines complete), and the last frame (every line complete).","Give two lines overlapping `at` cues: the second waits for the first to finish instead of typing in parallel.","Check the longest line and the line count fit inside `w` × `h` at the chosen `size`; overflow is clipped, not wrapped.","Inspect the dark surface border and shadow at display scale (docs/surface-depth.md)."],"related":[{"name":"card","relation":"installs"},{"name":"tokens","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":69,"lastFrame":68,"strip":"https://jbm-ui.bns.studio/c/code-card?view=strip","frames":[{"label":"Begin","frame":0,"at":0},{"label":"First line typed","frame":27,"at":0.9,"note":"The first line is complete and the second has not started."},{"label":"Second line typed","frame":54,"at":1.8,"note":"Two lines are complete; the vermilion third line is next."},{"label":"End","frame":68,"at":2.267}],"demo":[{"component":"CodeCard","props":{"w":620,"h":280,"title":"hello.ts","lines":[{"t":"const idea = \"simple\";","at":0.2},{"t":"const story = explain(idea);","at":0.7},{"t":"render(story);","at":1.2,"color":"#FF8A6A"}]}}],"code":"<CodeCard w={620} h={280} title=\"hello.ts\" lines={[{ t: \"const idea = \\\"simple\\\";\", at: 0.2 }, { t: \"const story = explain(idea);\", at: 0.7 }, { t: \"render(story);\", at: 1.2, color: \"#FF8A6A\" }]} />"},"docs":[{"title":"Scene spec guide","url":"https://jbm-ui.bns.studio/docs/scene-spec.md"}]},{"name":"captions","entry":"component","title":"Captions","description":"Kinetic subtitle pill that groups aligned words into phrases and lights each word as it is spoken.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/tokens","@jbm/motion-hooks"],"install":"npx shadcn@latest add @jbm/captions","installName":"captions","page":"https://jbm-ui.bns.studio/c/captions","registryItem":"https://jbm-ui.bns.studio/r/captions.json","sourcePath":"registry/jbm/motion/captions.tsx","files":[{"source":"registry/jbm/motion/captions.tsx","target":"src/jbm/motion/captions.tsx","import":"@/jbm/motion/captions","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/captions.md","json":"https://jbm-ui.bns.studio/catalog/captions.json"},"snippet":"import { Captions } from \"@/jbm/motion/captions\"\n\n<Captions words={[\n  { w: \"Una\", s: 0, e: 0.7 },\n  { w: \"idea.\", s: 0.7, e: 1.5, emph: true },\n]} />","api":[{"export":"Captions","kind":"component","summary":"Absolutely positioned ink pill near the bottom of the stage. Words group into phrases that break after punctuation, at pauses over 0.55 s, or at 9 words (landscape) / 6 words (vertical). A phrase fades in and out over up to 0.12 s; unspoken words sit at 0.28 opacity, and emphasized words turn the soft accent color with a small bounce. Renders nothing between phrases.","props":[{"name":"words","type":"Word[]","required":true,"default":null,"description":"Aligned words in order: `w` is the word (trailing punctuation ends a phrase), `s` and `e` are start and end times in seconds, and `emph` marks an emphasized word."},{"name":"orientation","type":"Orientation","required":false,"default":"\"landscape\"","description":"Stage orientation: `vertical` uses a larger 54px font, 6-word phrases, a 940px max width, and sits 270px from the bottom; `landscape` uses 44px, 9 words, 1500px, and 84px."},{"name":"offset","type":"number","required":false,"default":"0","description":"Seconds subtracted from the Sequence time before matching words, for word timings measured from a different origin."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":"fill","height":83},"vertical":{"width":"fill","height":104},"basis":"Absolutely positioned from left 0 to right 0 of the positioned parent (the stage), bottom 84 in landscape and 270 in vertical. One line of text: 44px × 1.25 line-height + 2 × 14px padding = 83 in landscape; 54px × 1.25 + 2 × 18px = about 104 in vertical. Each wrapped line (past the 1500 / 940px max width) adds 55 / 68px."},"examples":[{"title":"Subtitles from aligned words","code":"import { Captions } from \"@/jbm/motion/captions\"\n\n<Captions words={[\n  { w: \"Una\", s: 0, e: 0.7 },\n  { w: \"idea.\", s: 0.7, e: 1.5, emph: true },\n]} />"},{"title":"Vertical video with a timing offset","code":"import { Captions } from \"@/jbm/motion/captions\"\n\n<Captions words={alignedWords} orientation=\"vertical\" offset={12.4} />\n// Place inside a positioned stage (e.g. Scene) in a Remotion composition."}],"qa":["Step through the first frame of a phrase (fading in), mid-phrase (spoken words bright, upcoming words dim, emphasis in the soft color), and the phrase end (fading out, then nothing between phrases).","Check grouping: a comma or period ends a phrase, a pause over 0.55 s starts a new one, and long runs split at 9 (landscape) or 6 (vertical) words.","Render in vertical: the pill sits above the lower safe area and long phrases wrap inside 940px without covering the subject.","The last phrase stays up to one second after its final word; confirm the composition is long enough to show its fade-out."],"related":[{"name":"tokens","relation":"installs"},{"name":"motion-hooks","relation":"installs"}],"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":136,"lastFrame":135,"strip":"https://jbm-ui.bns.studio/c/captions?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"Emphasis word","frame":33,"at":1.1,"note":"“idea” is spoken in the soft colour after its pop; later words wait at low opacity."},{"label":"Every word spoken","frame":75,"at":2.5,"note":"All words are at full opacity while the pill holds before fading out."},{"label":"End","frame":135,"at":4.5}],"demo":[{"component":"Pop","props":{"at":0},"children":[{"component":"Big","props":{"size":52},"children":"Cada palabra cuenta."}]},{"component":"Captions","props":{"words":[{"w":"Una","s":0,"e":0.7},{"w":"idea","s":0.7,"e":1.4,"emph":true},{"w":"a","s":1.4,"e":1.8},{"w":"la","s":1.8,"e":2.2},{"w":"vez.","s":2.2,"e":3.5}]}}],"code":"<Pop at={0}>\n  <Big size={52}>Cada palabra cuenta.</Big>\n</Pop>\n<Captions words={[{ w: \"Una\", s: 0, e: 0.7 }, { w: \"idea\", s: 0.7, e: 1.4, emph: true }, { w: \"a\", s: 1.4, e: 1.8 }, { w: \"la\", s: 1.8, e: 2.2 }, { w: \"vez.\", s: 2.2, e: 3.5 }]} />"}},{"name":"rebuild-screens","entry":"component","title":"RebuildScreens","description":"A phone screen assembled piece by piece, then rebuilt on each new screen that springs onto the pile; Stamp slams a loud word on top.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/motion-hooks","@jbm/pop","@jbm/ui-bits","@jbm/paper"],"install":"npx shadcn@latest add @jbm/rebuild-screens","installName":"rebuild-screens","page":"https://jbm-ui.bns.studio/c/rebuild-screens","registryItem":"https://jbm-ui.bns.studio/r/rebuild-screens.json","sourcePath":"registry/jbm/motion/rebuild-screens.tsx","files":[{"source":"registry/jbm/motion/rebuild-screens.tsx","target":"src/jbm/motion/rebuild-screens.tsx","import":"@/jbm/motion/rebuild-screens","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/rebuild-screens.md","json":"https://jbm-ui.bns.studio/catalog/rebuild-screens.json"},"snippet":"import { RebuildScreens } from \"@/jbm/motion/rebuild-screens\"\n\n<RebuildScreens w={936} h={1000}\n  pieces={[{ kind: \"button\", at: 1 }, { kind: \"input\", at: 2.8 }, { kind: \"card\", at: 5.3 }]}\n  again={[12.9, 14.5]} sticker={{ text: \"¿otra vez?\", at: 13 }} />","api":[{"export":"RebuildScreens","kind":"component","summary":"Fixed w × h box holding a pile of tilted PhoneFrames. The first screen is present from the start and its pieces (card, input, button, stacked in that order) pop in on their own cues. Each cue in `again` springs in another screen offset up and to the right, whose pieces rebuild in a quick stagger; the pile re-centres as screens arrive. An optional sticker stamps a word near the top left. The input piece's cursor blinks about 2.2 times per second.","props":[{"name":"w","type":"number","required":true,"default":null,"description":"Box width in stage pixels; also caps the phone width at 50% of w."},{"name":"h","type":"number","required":true,"default":null,"description":"Box height in stage pixels; the phone width is also capped at 47% of h (phone height is 1.82 × its width)."},{"name":"pieces","type":"ScreenPiece[]","required":true,"default":null,"description":"Pieces for the first screen: `kind` is button, input, or card and `at` is its entrance in seconds relative to the Sequence. One piece per kind; rendering order is always card, input, button."},{"name":"again","type":"number[]","required":false,"default":"[]","description":"Seconds at which each extra screen arrives; every cue adds one screen whose pieces rebuild starting 0.12 s after it."},{"name":"sticker","type":"{ text: string; at: number }","required":false,"default":null,"description":"Optional loud word: `text` and the `at` second it stamps in over the pile."},{"name":"rebuildStep","type":"number","required":false,"default":"0.22","description":"Seconds between pieces when a new screen rebuilds them, in the order the pieces are listed in `pieces`."},{"name":"phoneScale","type":"number","required":false,"default":"1","description":"Multiplies the default phone width; above 1 it is still limited so the whole pile fits in 90% of the box. Must be positive and finite or it throws."}],"passthrough":[]},{"export":"Stamp","kind":"component","summary":"Absolutely positioned Sticker that slams in from 1.7× to 1× scale on a bouncy spring (damping 9, stiffness 160) and fades in over the first half of the spring. Catalog reuses it.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Stamp time in seconds relative to the enclosing Sequence."},{"name":"text","type":"string","required":true,"default":null,"description":"The loud word or short phrase; it does not wrap."},{"name":"left","type":"number","required":true,"default":null,"description":"Left offset in stage pixels inside the positioned parent."},{"name":"top","type":"number","required":true,"default":null,"description":"Top offset in stage pixels inside the positioned parent."},{"name":"size","type":"number","required":true,"default":null,"description":"Sticker font size in stage pixels; the sticker's padding and corner radius scale with it."},{"name":"rotate","type":"number","required":false,"default":"-7","description":"Sticker tilt in degrees; negative tilts counter-clockwise."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":1680,"height":720},"vertical":{"width":936,"height":1000},"basis":"The component is exactly `w` × `h`; w and h are required, so these are the scene-spec `screens` defaults in flow layout: the usable width (1920 − 2 × 120, 1080 − 2 × 72) and h 720 landscape / 1000 vertical (override with the block's `h`). The phone is min(470, 0.5 w, 0.47 h) wide at phoneScale 1: 338 × 615 landscape, 468 × 852 vertical. Tilts and the arrival spring can reach slightly past the box."},"examples":[{"title":"Build, then rebuild twice","code":"import { RebuildScreens } from \"@/jbm/motion/rebuild-screens\"\n\n<RebuildScreens w={936} h={1000}\n  pieces={[{ kind: \"button\", at: 1 }, { kind: \"input\", at: 2.8 }, { kind: \"card\", at: 5.3 }]}\n  again={[12.9, 14.5]} sticker={{ text: \"¿otra vez?\", at: 13 }} />"},{"title":"Stamp a word on any scene","code":"import { Stamp } from \"@/jbm/motion/rebuild-screens\"\n\n<div style={{ position: \"relative\", width: 936, height: 600 }}>\n  <Stamp at={2} text=\"¡listo!\" left={420} top={60} size={96} />\n</div>"}],"qa":["Step to the start (empty first phone), mid-build (some pieces in), the moment each `again` screen arrives (spring from the upper right, pile re-centering), and the end (all screens rebuilt, sticker settled).","Check the rotated phones and sticker stay inside the safe area in both orientations, especially with phoneScale above 1 or three or more screens.","Rebuilt pieces stagger in `pieces` array order while pieces always stack card, input, button; confirm the rebuild order reads as intended. Duplicate kinds share a React key and are not supported.","Confirm the input cursor blink is visible but not distracting at the final render scale."],"related":[{"name":"motion-hooks","relation":"installs"},{"name":"pop","relation":"installs"},{"name":"ui-bits","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"catalog","relation":"installed-by"},{"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":132,"lastFrame":131,"strip":"https://jbm-ui.bns.studio/c/rebuild-screens?view=strip","frames":[{"label":"Begin","frame":0,"at":0},{"label":"First screen built","frame":63,"at":2.1,"note":"Button, input, and card have popped into the first phone; no second screen yet."},{"label":"Built again","frame":93,"at":3.1,"note":"The second screen has sprung in with its pieces rebuilt and the sticker stamped."},{"label":"End","frame":131,"at":4.367}],"demo":[{"component":"RebuildScreens","props":{"w":936,"h":620,"pieces":[{"kind":"button","at":0.2},{"kind":"input","at":0.7},{"kind":"card","at":1.2}],"again":[2.2,3.2],"sticker":{"text":"¿otra vez?","at":2.3}}}],"code":"<RebuildScreens w={936} h={620} pieces={[{ kind: \"button\", at: 0.2 }, { kind: \"input\", at: 0.7 }, { kind: \"card\", at: 1.2 }]} again={[2.2, 3.2]} sticker={{ text: \"¿otra vez?\", at: 2.3 }} />"},"docs":[{"title":"Scene spec guide","url":"https://jbm-ui.bns.studio/docs/scene-spec.md"}]},{"name":"catalog","entry":"component","title":"Catalog","description":"Catalogue sheet whose interface pieces arrive and get checked off, then unfolds a second row of design-token glyphs.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/tokens","@jbm/motion-hooks","@jbm/pop","@jbm/paper","@jbm/ui-bits","@jbm/rebuild-screens"],"install":"npx shadcn@latest add @jbm/catalog","installName":"catalog","page":"https://jbm-ui.bns.studio/c/catalog","registryItem":"https://jbm-ui.bns.studio/r/catalog.json","sourcePath":"registry/jbm/motion/catalog.tsx","files":[{"source":"registry/jbm/motion/catalog.tsx","target":"src/jbm/motion/catalog.tsx","import":"@/jbm/motion/catalog","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/catalog.md","json":"https://jbm-ui.bns.studio/catalog/catalog.json"},"snippet":"import { Catalog } from \"@/jbm/motion/catalog\"\n\n<Catalog w={936} at={3.2} title=\"catálogo\"\n  items={[{ kind: \"button\", label: \"botón\", at: 7.4 }]}\n  tokens={[{ kind: \"color\", label: \"color\", at: 18.2 }]} />","api":[{"export":"Catalog","kind":"component","summary":"Paper sheet that springs up into place at `at`, with one dashed slot per column. Each item's Piece pops into its slot on its cue and a check badge pops on `checkDelay` seconds later. At `tokensAt` the sheet grows downward over 0.55 s behind a dashed divider to reveal a row of TokenGlyphs that pop in on their own cues. An optional ink title sticker sits over the top edge and a stamp lands across the bottom edge, below the rows; it overlaps only the sheet's bottom padding and extends about half its height below the sheet, so leave room under the component.","props":[{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage pixels; padding, gaps, slot size, pieces, captions, and badges all scale from it."},{"name":"at","type":"number","required":true,"default":null,"description":"Sheet entrance in seconds relative to the enclosing Sequence."},{"name":"title","type":"string","required":false,"default":null,"description":"Optional ink sticker label over the top-left edge; adds 30px of top padding inside the sheet."},{"name":"items","type":"CatalogItem[]","required":true,"default":null,"description":"Top-row slots: `kind` (button, card, or input), a caption `label`, and the `at` second its piece pops in."},{"name":"tokens","type":"CatalogToken[]","required":false,"default":"[]","description":"Optional second-row slots: `kind` (color, type, or space), a caption `label`, and the `at` second its glyph pops in. Empty means no token row."},{"name":"tokensAt","type":"number","required":false,"default":null,"description":"Second at which the token row unfolds. Defaults to 0.6 s before the first token's cue."},{"name":"stamp","type":"{ text: string; at: number }","required":false,"default":null,"description":"Optional loud word: `text` and the `at` second it stamps across the sheet's bottom edge, below the rows, never over a slot or caption."},{"name":"checkDelay","type":"number","required":false,"default":"0.5","description":"Seconds between an item's arrival and its check badge."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":1200,"height":882},"vertical":{"width":936,"height":699},"basis":"Width is `w` (required); scene specs pass min(usable width, 1200) in landscape and 936 in vertical. Height is computed from w with three items, three tokens, and a title, fully unfolded: top padding (0.038 w + 30) + slot row (card height 0.8 × 0.78 slot width + caption + margin) + bottom padding + 4px border, plus the token block (two gaps of 0.031 w, a 3px divider, and a 0.9 × slot-width glyph row) once unfolded. Before unfolding it is 492 (landscape) / 393 (vertical). The title sticker extends 30px above the top edge. More columns shrink every slot."},"examples":[{"title":"Pieces, then tokens","code":"import { Catalog } from \"@/jbm/motion/catalog\"\n\n<Catalog w={936} at={3.2} title=\"catálogo\"\n  items={[{ kind: \"button\", label: \"botón\", at: 7.4 }]}\n  tokens={[{ kind: \"color\", label: \"color\", at: 18.2 }]} />"},{"title":"Full sheet with a stamp","code":"import { Catalog } from \"@/jbm/motion/catalog\"\n\n<Catalog w={936} at={0.2} title=\"catálogo\"\n  items={[\n    { kind: \"button\", label: \"botón\", at: 0.8 },\n    { kind: \"card\", label: \"tarjeta\", at: 1.2 },\n    { kind: \"input\", label: \"input\", at: 1.6 },\n  ]}\n  tokensAt={2.6}\n  tokens={[\n    { kind: \"color\", label: \"color\", at: 3.0 },\n    { kind: \"type\", label: \"tipografía\", at: 3.4 },\n    { kind: \"space\", label: \"espaciado\", at: 3.8 },\n  ]}\n  stamp={{ text: \"design tokens\", at: 4.4 }} />"}],"qa":["Step to the sheet entrance, each item arrival and its check badge, the middle of the unfold (token row partially revealed and clipped), and the end (all glyphs in, stamp settled across the bottom edge without covering any caption, including tipografía).","Check the fully unfolded sheet plus the title sticker above it fits the safe area in both orientations; the height grows by the token block when it unfolds.","Without tokens, confirm no divider or empty row appears and the stamp straddles the bottom edge just below the item row.","Check long captions at the scaled caption size stay inside their slots; captions are not truncated by the component."],"related":[{"name":"tokens","relation":"installs"},{"name":"motion-hooks","relation":"installs"},{"name":"pop","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"installs"},{"name":"rebuild-screens","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":159,"lastFrame":158,"strip":"https://jbm-ui.bns.studio/c/catalog?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"Pieces tested","frame":78,"at":2.6,"note":"Button, card, and input sit in their slots with checks; the token row is still folded."},{"label":"Tokens arriving","frame":105,"at":3.5,"note":"The sheet has unfolded and the colour glyph is in; type and spacing are still arriving."},{"label":"Tokens in","frame":129,"at":4.3,"note":"All three token glyphs have landed, just before the stamp."},{"label":"End","frame":158,"at":5.267}],"demo":[{"component":"Catalog","props":{"w":936,"at":0.2,"title":"catálogo","items":[{"kind":"button","label":"botón","at":0.8},{"kind":"card","label":"tarjeta","at":1.2},{"kind":"input","label":"input","at":1.6}],"tokensAt":2.6,"tokens":[{"kind":"color","label":"color","at":3},{"kind":"type","label":"tipografía","at":3.4},{"kind":"space","label":"espaciado","at":3.8}],"stamp":{"text":"design tokens","at":4.4}}}],"code":"<Catalog w={936} at={0.2} title=\"catálogo\" items={[{ kind: \"button\", label: \"botón\", at: 0.8 }, { kind: \"card\", label: \"tarjeta\", at: 1.2 }, { kind: \"input\", label: \"input\", at: 1.6 }]} tokensAt={2.6} tokens={[{ kind: \"color\", label: \"color\", at: 3 }, { kind: \"type\", label: \"tipografía\", at: 3.4 }, { kind: \"space\", label: \"espaciado\", at: 3.8 }]} stamp={{ text: \"design tokens\", at: 4.4 }} />"}},{"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"}]},{"name":"shelf","entry":"component","title":"Shelf","description":"A pile of tilted library cards that slide in on their own cues, plus Twice: a button, the same button again, and a vermilion cross drawn over the second.","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/shelf","installName":"shelf","page":"https://jbm-ui.bns.studio/c/shelf","registryItem":"https://jbm-ui.bns.studio/r/shelf.json","sourcePath":"registry/jbm/motion/shelf.tsx","files":[{"source":"registry/jbm/motion/shelf.tsx","target":"src/jbm/motion/shelf.tsx","import":"@/jbm/motion/shelf","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/shelf.md","json":"https://jbm-ui.bns.studio/catalog/shelf.json"},"snippet":"import { Shelf, Twice } from \"@/jbm/motion/shelf\"\n\n<Shelf w={936} items={[\n  { text: \"shadcn/ui\", at: 0.2 },\n  { text: \"Material UI\", at: 0.6 },\n  { text: \"jbm-ui\", at: 1.0, tone: \"accent\" },\n]} />\n<Twice w={936} at={2} second={2.8} strike={3.6} />\n// Render inside a Remotion <Composition> or <Player>.","api":[{"export":"Shelf","kind":"component","summary":"Column of wide Paper cards, each sliding in from the left (60px) with a spring at its own `at`, tilted −1.2°, 1°, −0.8° in turn. Each card shows its name in mono type and three tiny pieces (card, input without cursor, button). The button is accent on paper and ink cards, paper on an accent card.","props":[{"name":"w","type":"number","required":true,"default":null,"description":"Width of every card in stage pixels."},{"name":"items","type":"{ text: string; at: number; tone?: PaperTone }[]","required":true,"default":null,"description":"Cards from top to bottom: `text` (mono label, one line, not truncated), `at` (entrance in seconds), and optional `tone` (paper default, accent for the one that is yours, or ink)."},{"name":"cardH","type":"number","required":false,"default":null,"description":"Card height in stage pixels; defaults to round(0.16 × w). Label size, padding, radius, and piece size follow it."},{"name":"gap","type":"number","required":false,"default":"22","description":"Vertical space between cards in stage pixels."}],"passthrough":[]},{"export":"Twice","kind":"component","summary":"Closing gag: an ink button scales in at `at`, an identical one beside it at `second`, then two vermilion strokes draw a cross over the second (each 0.25 s, the second stroke 0.2 s after the first).","props":[{"name":"w","type":"number","required":true,"default":null,"description":"Row width in stage pixels; the buttons are centred with a gap of 5% of w."},{"name":"at","type":"number","required":true,"default":null,"description":"Seconds when the first button scales in."},{"name":"second","type":"number","required":true,"default":null,"description":"Seconds when the second, identical button scales in."},{"name":"strike","type":"number","required":false,"default":null,"description":"Seconds when the cross starts drawing; defaults to second + 0.5."},{"name":"bw","type":"number","required":false,"default":null,"description":"Button width in stage pixels; defaults to min(420, half the row minus the gap)."},{"name":"bh","type":"number","required":false,"default":null,"description":"Button height in stage pixels; defaults to round(0.34 × button width)."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Shelf is w wide and grows with its items: n × cardH + (n − 1) × gap, with cardH = round(0.16 × w) by default (three cards at w = 936 are 494px tall). Twice is w wide and bh + 52 tall (about 211px at w = 936). SceneFromSpec gives both min(W, 1100) and min(W, 1000) in landscape and the full safe-area width in vertical. Card tilt, the left slide, and the cross strokes reach past these boxes."},"examples":[{"title":"Library shelf, then the gag","code":"import { Shelf, Twice } from \"@/jbm/motion/shelf\"\n\n<Shelf w={936} items={[\n  { text: \"shadcn/ui\", at: 0.2 },\n  { text: \"Material UI\", at: 0.6 },\n  { text: \"jbm-ui\", at: 1.0, tone: \"accent\" },\n]} />\n<Twice w={936} at={2} second={2.8} strike={3.6} />\n// Render inside a Remotion <Composition> or <Player>."}],"qa":["Step through each card cue: cards slide in from the left in order and settle at alternating tilts; the accent card's button turns paper.","Try a long label at narrow w: the mono label does not wrap or truncate and can collide with the three pieces.","For Twice, inspect first button, second button, mid-strike, and final frame: both strokes fully drawn tail to head and the cross stays within the row's 26px padding.","Check the full stack height (items plus Twice) fits the safe area in both orientations."],"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":123,"lastFrame":122,"strip":"https://jbm-ui.bns.studio/c/shelf?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"Libraries stacked","frame":57,"at":1.9,"note":"All three library cards have landed with alternating tilt; the button row is still empty."},{"label":"One button","frame":81,"at":2.7,"note":"The first button has settled alone before its twin arrives."},{"label":"Built twice","frame":104,"at":3.45,"note":"Both buttons have settled side by side at full size; the vermilion cross has not started drawing."},{"label":"End","frame":122,"at":4.067}],"demo":[{"component":"Shelf","props":{"w":936,"items":[{"text":"shadcn/ui","at":0.2},{"text":"Material UI","at":0.6},{"text":"jbm-ui","at":1,"tone":"accent"}]}},{"component":"Twice","props":{"w":936,"at":2,"second":2.8,"strike":3.6}}],"code":"<Shelf w={936} items={[{ text: \"shadcn/ui\", at: 0.2 }, { text: \"Material UI\", at: 0.6 }, { text: \"jbm-ui\", at: 1, tone: \"accent\" }]} />\n<Twice w={936} at={2} second={2.8} strike={3.6} />"}},{"name":"scene-spec","entry":"component","title":"SceneFromSpec","description":"Compiles a YAML-shaped scene spec into a Remotion scene for either orientation, with timed blocks, explicit layouts, orientation overrides, and configurable safe areas.","category":"Layout","capabilities":["controls","replay","portrait","player"],"needsRemotion":true,"registryDependencies":["@jbm/tokens","@jbm/label","@jbm/big","@jbm/chip","@jbm/stat-card","@jbm/callout","@jbm/bullet-list","@jbm/scene","@jbm/pop","@jbm/code-card","@jbm/brand","@jbm/rebuild-screens","@jbm/catalog","@jbm/propagate","@jbm/shelf"],"install":"npx shadcn@latest add @jbm/scene-spec","installName":"scene-spec","page":"https://jbm-ui.bns.studio/c/scene-spec","registryItem":"https://jbm-ui.bns.studio/r/scene-spec.json","sourcePath":"registry/jbm/motion/compile.tsx","files":[{"source":"registry/jbm/motion/compile.tsx","target":"src/jbm/motion/compile.tsx","import":"@/jbm/motion/compile","type":"registry:component"},{"source":"registry/jbm/motion/spec.ts","target":"src/jbm/motion/spec.ts","import":"@/jbm/motion/spec","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/scene-spec.md","json":"https://jbm-ui.bns.studio/catalog/scene-spec.json"},"snippet":"import { SceneFromSpec } from \"@/jbm/motion/compile\"\nimport type { ScenesFile } from \"@/jbm/motion/spec\"\n\n// Placeholders: a parsed, schema-validated scenes file, and seconds from scene start per phrase.\ndeclare const scenes: ScenesFile\ndeclare const timings: Record<string, number>\n\nexport const FirstScene = () => (\n  <SceneFromSpec spec={scenes.scenes[0]} orientation=\"landscape\"\n    host={{ resolve: (phrase) => timings[phrase] }} />\n)\n// Every block and field: https://jbm-ui.bns.studio/docs/scene-spec.md","api":[{"export":"SceneFromSpec","kind":"component","summary":"Renders one SceneSpec as a full-canvas Scene for one orientation. Blocks (big, stat-row, note, callout, bullets, chips, code, spacer, screens, catalog, propagate, shelf, twice, brand, overlay) stack inside the safe area with `gap` between them; `composition` and `variants[orientation]` choose the layout (flow, hero, headline-illustration, illustration), safe area, headline ratio, subject scale, and optional block overrides. Anchors resolve through `host.resolve`, text through `host.t`. It does not fit, shrink, or paginate content, and throws on invalid layouts, anchors, gaps, or insets. It does not validate the spec's shape (an unknown block type renders nothing): validate parsed YAML against the JSON Schema in `schemas` first. Every block, field, default, unit, and error is listed in the scene spec guide in `docs`.","props":[{"name":"spec","type":"SceneSpec","required":true,"default":null,"description":"One parsed scene (SceneSpec): required id and blocks; optional anchors (needed only when a block time names an anchor), title, starts, composition, variants, gap, and valign. The compiler takes plain objects; parse YAML in the host (the guide uses js-yaml 4 `load`) and validate against #/$defs/SceneSpec of the JSON Schema."},{"name":"showSafeArea","type":"boolean","required":false,"default":"false","description":"Draws a dashed vermilion outline of the safe area for debugging; leave off for final renders."},{"name":"orientation","type":"Orientation","required":true,"default":null,"description":"landscape (for a 1920 × 1080 composition) or vertical (1080 × 1920); picks stage geometry, block sizes, and variants."},{"name":"host","type":"Host","required":true,"default":null,"description":"Injected services: `resolve(phrase)` returns seconds from scene start for an anchor's narration phrase; optional `t(string)` translates on-screen text."}],"passthrough":[]},{"export":"resolveAt","kind":"function","summary":"Resolves a block time: a number of seconds, an anchor name, or an anchor with a signed offset such as \"explain+0.2\".","params":[{"name":"at","type":"At","required":true,"default":null,"description":"Seconds from scene start, or an anchor name with an optional +/- offset in seconds."},{"name":"spec","type":"SceneSpec","required":true,"default":null,"description":"The scene whose `anchors` map names to narration phrases; its id appears in errors."},{"name":"host","type":"Host","required":true,"default":null,"description":"Supplies `resolve(phrase)` in seconds."}],"returns":"Seconds from scene start. Throws on malformed, unknown, or non-finite anchors."},{"export":"sceneGeometry","kind":"function","summary":"Safe-area rectangle in canvas pixels for an orientation and safe-area preset or custom insets.","params":[{"name":"orientation","type":"Orientation","required":true,"default":null,"description":"landscape or vertical; selects stage[orientation]."},{"name":"safeArea","type":"SafeArea","required":false,"default":"\"legacy\"","description":"legacy (default; portrait bottom 480), full (portrait 100/72/100/72, landscape 90/120/90/120), social (portrait 160/160/320/72), or explicit { top, right, bottom, left } insets."}],"returns":"{ left, top, width, height } in canvas pixels. Throws when insets are negative, non-finite, or leave no content area."},{"export":"Host","kind":"type","summary":"Timing and translation services injected by the video project: `resolve(phrase)` and optional `t(s)`."},{"export":"SceneSpec","kind":"type","summary":"One scene: required id and blocks; optional anchors, title, starts, composition, variants, gap, valign."},{"export":"ScenesFile","kind":"type","summary":"The parsed YAML file: `{ scenes: SceneSpec[] }`."},{"export":"Block","kind":"type","summary":"Any block body plus an optional `until` exit cue."},{"export":"CompositionOptions","kind":"type","summary":"safeArea, layout, headlineRatio, subjectScale, gap, valign, and an optional full blocks override."},{"export":"SafeArea","kind":"type","summary":"\"legacy\" | \"full\" | \"social\" | explicit pixel insets { top, right, bottom, left }. Social applies to vertical only; in landscape it falls back to full (90/120/90/120)."},{"export":"PerOrientation","kind":"type","summary":"`{ landscape, vertical }` pixel values, accepted wherever a size may differ per orientation (gap, spacer h, screens and propagate h)."},{"export":"StatItem","kind":"type","summary":"One stat-row card: at, label, value, optional sub and valueColor."},{"export":"Exit","kind":"type","summary":"The optional `until` cue every block accepts: fade out and drift up over 0.4 s."},{"export":"BlockBody","kind":"type","summary":"The block union without `until`, discriminated by `type`."},{"export":"SceneLayout","kind":"type","summary":"\"flow\" | \"hero\" | \"headline-illustration\" | \"illustration\"."},{"export":"At","kind":"type","summary":"A time: anchor name (optionally with an offset) or seconds."}],"stage":{"mode":"declared","landscape":{"width":1920,"height":1080},"vertical":{"width":1080,"height":1920},"basis":"SceneFromSpec renders a Scene that fills its parent (position absolute, inset 0); use a 1920 × 1080 composition for landscape and 1080 × 1920 for vertical. Blocks lay out inside sceneGeometry(orientation, safeArea)."},"examples":[{"title":"Compile a parsed scene","code":"import { SceneFromSpec } from \"@/jbm/motion/compile\"\nimport type { ScenesFile } from \"@/jbm/motion/spec\"\n\n// Placeholders: a parsed, schema-validated scenes file, and seconds from scene start per phrase.\ndeclare const scenes: ScenesFile\ndeclare const timings: Record<string, number>\n\nexport const FirstScene = () => (\n  <SceneFromSpec spec={scenes.scenes[0]} orientation=\"landscape\"\n    host={{ resolve: (phrase) => timings[phrase] }} />\n)\n// Every block and field: https://jbm-ui.bns.studio/docs/scene-spec.md"},{"title":"Headline and illustration, tuned for portrait","code":"import type { SceneSpec } from \"@/jbm/motion/spec\"\n\nconst spec: SceneSpec = {\n  id: \"library\",\n  anchors: { build: \"una biblioteca\" },\n  composition: { safeArea: \"full\", layout: \"headline-illustration\", subjectScale: 1.3 },\n  variants: { vertical: { headlineRatio: 0.23, gap: 48 } },\n  blocks: [\n    { type: \"big\", at: 0, text: \"Una biblioteca.\\nMuchas posibilidades.\", align: \"center\", size: 90 },\n    { type: \"screens\", pieces: [{ kind: \"card\", at: \"build\" }, { kind: \"button\", at: \"build+0.6\" }], phoneScale: 1.5 },\n  ],\n}"},{"title":"Parse, validate, and compile a YAML scenes file","code":"import { load } from \"js-yaml\"\nimport Ajv2020 from \"ajv/dist/2020\"\nimport { SceneFromSpec } from \"@/jbm/motion/compile\"\nimport type { ScenesFile } from \"@/jbm/motion/spec\"\nimport schema from \"./scene-spec.schema.json\" // curl -o scene-spec.schema.json https://jbm-ui.bns.studio/schemas/scene-spec.json\n\n// Placeholders: the YAML source, seconds from scene start per phrase, and a translator.\ndeclare const yamlText: string\ndeclare const timings: Record<string, number>\ndeclare const translate: (text: string) => string\n\nconst validate = new Ajv2020({ allErrors: true }).compile(schema)\nconst data: unknown = load(yamlText)\nif (!validate(data)) throw new Error(JSON.stringify(validate.errors, null, 2))\nconst { scenes } = data as ScenesFile\n\nexport const FirstScene = () => (\n  <SceneFromSpec spec={scenes[0]} orientation=\"vertical\"\n    host={{ resolve: (phrase) => timings[phrase], t: translate }} />\n)"},{"title":"Multi-scene vertical composition","code":"import { Composition, Series } from \"remotion\"\nimport { loadFont as loadGeist } from \"@remotion/google-fonts/Geist\"\nimport { loadFont as loadGeistMono } from \"@remotion/google-fonts/GeistMono\"\nimport { load } from \"js-yaml\"\nimport Ajv2020 from \"ajv/dist/2020\"\nimport { SceneFromSpec } from \"@/jbm/motion/compile\"\nimport type { ScenesFile } from \"@/jbm/motion/spec\"\nimport schema from \"./scene-spec.schema.json\" // curl -o scene-spec.schema.json https://jbm-ui.bns.studio/schemas/scene-spec.json\n\n// npm install remotion @remotion/google-fonts js-yaml ajv (and @types/js-yaml).\n// Token font stacks fall back to the family names \"Geist\" and \"Geist Mono\" these load.\nloadGeist(\"normal\", { weights: [\"400\", \"500\", \"600\", \"700\"], subsets: [\"latin\"] })\nloadGeistMono(\"normal\", { weights: [\"400\", \"500\"], subsets: [\"latin\"] })\n\nconst FPS = 30\nconst yamlText = `\nscenes:\n  - id: hook\n    anchors: { reveal: \"hecha de piezas\" }\n    blocks:\n      - { type: big, at: 0, text: \"Una biblioteca.\" }\n      - { type: note, at: reveal, text: \"Hecha de piezas.\" }\n  - id: pieces\n    composition: { safeArea: full, layout: illustration }\n    anchors: { build: \"una pieza\" }\n    blocks:\n      - type: screens\n        pieces:\n          - { kind: card, at: build }\n          - { kind: button, at: build+0.6 }\n`\n\n// No narration yet: a literal phrase → seconds (from its scene's start) table, and scene lengths.\nconst timings: Record<string, number> = { \"hecha de piezas\": 1.2, \"una pieza\": 0.8 }\nconst seconds: Record<string, number> = { hook: 4, pieces: 5 }\nconst resolve = (phrase: string) => {\n  const at = timings[phrase]\n  if (at === undefined) throw new Error(`No timing for \"${phrase}\"`)\n  return at\n}\n\nconst validate = new Ajv2020({ allErrors: true }).compile(schema)\nconst data: unknown = load(yamlText)\nif (!validate(data)) throw new Error(JSON.stringify(validate.errors, null, 2))\nconst { scenes } = data as ScenesFile\nconst frames = (id: string) => Math.round(seconds[id] * FPS)\n\n// One Series.Sequence per scene: each scene's times start at 0 inside its own sequence.\nexport const Explainer = () => (\n  <Series>\n    {scenes.map((spec) => (\n      <Series.Sequence key={spec.id} durationInFrames={frames(spec.id)}>\n        <SceneFromSpec spec={spec} orientation=\"vertical\" host={{ resolve }} />\n      </Series.Sequence>\n    ))}\n  </Series>\n)\n\n// Register in your Remotion root (registerRoot). Use 1920×1080 with orientation=\"landscape\".\nexport const RemotionRoot = () => (\n  <Composition\n    id=\"explainer-vertical\"\n    component={Explainer}\n    width={1080}\n    height={1920}\n    fps={FPS}\n    durationInFrames={scenes.reduce((total, spec) => total + frames(spec.id), 0)}\n  />\n)"}],"qa":["Switch the preview through hero, headline-illustration, and illustration layouts and full/social safe areas; inspect beginning, middle, and end frames in both landscape and portrait.","Turn guides on to see the safe area, then confirm showSafeArea is off in final renders.","Nothing auto-fits: check tall content (code, stat rows, long headlines) for overflow or clipping at the safe-area edges, especially in portrait.","Exercise error paths: unknown anchors, headline-illustration with other than two blocks or with a title, and invalid gap or insets must throw with the scene id or a clear message."],"related":[{"name":"tokens","relation":"installs"},{"name":"label","relation":"installs"},{"name":"big","relation":"installs"},{"name":"chip","relation":"installs"},{"name":"stat-card","relation":"installs"},{"name":"callout","relation":"installs"},{"name":"bullet-list","relation":"installs"},{"name":"scene","relation":"installs"},{"name":"pop","relation":"installs"},{"name":"code-card","relation":"installs"},{"name":"brand","relation":"installs"},{"name":"rebuild-screens","relation":"installs"},{"name":"catalog","relation":"installs"},{"name":"propagate","relation":"installs"},{"name":"shelf","relation":"installs"}],"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":43,"lastFrame":42,"strip":"https://jbm-ui.bns.studio/c/scene-spec?view=strip","frames":[{"label":"Begin","frame":0,"at":0},{"label":"Subject building","frame":24,"at":0.8,"note":"The headline is in and the screen's pieces are arriving (default layout; the hero layout ends before this cue and shows a Middle frame)."},{"label":"End","frame":42,"at":1.4}],"demo":[{"component":"SceneFromSpec","props":{"spec":{"id":"portrait-reference","composition":{"safeArea":"full","layout":"headline-illustration","subjectScale":1.3},"blocks":[{"type":"big","at":0,"text":"Una biblioteca.\nMuchas posibilidades.","align":"center","size":90},{"type":"screens","phoneScale":1.5,"pieces":[{"kind":"card","at":0.2},{"kind":"input","at":0.5},{"kind":"button","at":0.8}]}],"variants":{"vertical":{"headlineRatio":0.23,"gap":48}}},"orientation":"landscape"}}],"code":"<SceneFromSpec spec={{ id: \"portrait-reference\", composition: { safeArea: \"full\", layout: \"headline-illustration\", subjectScale: 1.3 }, blocks: [{ type: \"big\", at: 0, text: \"Una biblioteca.\\nMuchas posibilidades.\", align: \"center\", size: 90 }, { type: \"screens\", phoneScale: 1.5, pieces: [{ kind: \"card\", at: 0.2 }, { kind: \"input\", at: 0.5 }, { kind: \"button\", at: 0.8 }] }], variants: { vertical: { headlineRatio: 0.23, gap: 48 } } }} orientation=\"landscape\" />"},"docs":[{"title":"Scene spec guide","url":"https://jbm-ui.bns.studio/docs/scene-spec.md"}],"schemas":[{"title":"Scene spec JSON Schema","url":"https://jbm-ui.bns.studio/schemas/scene-spec.json"}]},{"name":"ui-input","entry":"component","title":"UiInput","description":"Illustrated outlined text field with a placeholder bar and a cursor you switch on or off.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/ui-input","installName":"ui-input","page":"https://jbm-ui.bns.studio/c/ui-input","registryItem":"https://jbm-ui.bns.studio/r/ui-input.json","sourcePath":"registry/jbm/ui/ui-input.tsx","files":[{"source":"registry/jbm/ui/ui-input.tsx","target":"src/jbm/ui/ui-input.tsx","import":"@/jbm/ui/ui-input","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/ui-input.md","json":"https://jbm-ui.bns.studio/catalog/ui-input.json"},"snippet":"import { UiInput } from \"@/jbm/ui/ui-input\"\n\n<UiInput w={220} h={70} cursorOn />","api":[{"export":"UiInput","kind":"component","summary":"Cream paper field with an ink outline, a 3px ink cursor (half the height), and a line-colour placeholder bar at 45% of the width. It has no internal timer and no real text entry: blink the cursor by toggling `cursorOn` from a timeline.","props":[{"name":"w","type":"number","required":false,"default":"220","description":"Width in stage pixels, including the 2px Paper edge."},{"name":"h","type":"number","required":false,"default":"70","description":"Height in stage pixels; sets the corner radius (22%), inner padding (28%), cursor height (50%), and placeholder thickness (12%, at least 6px)."},{"name":"cursorOn","type":"boolean","required":false,"default":"true","description":"Shows the cursor (opacity 1) when true, hides it (opacity 0) when false; the cursor keeps its space either way."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged over the field's flex row; use for positioning or opacity."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":220,"height":70},"vertical":{"width":220,"height":70},"basis":"Fixed w × h box (border-box) at the defaults 220 × 70. `w` and `h` set it directly; the Paper shadow extends below the box."},"examples":[{"title":"Field with the cursor showing","code":"import { UiInput } from \"@/jbm/ui/ui-input\"\n\n<UiInput w={220} h={70} cursorOn />"},{"title":"Blink the cursor on a Remotion timeline","code":"import { UiInput } from \"@/jbm/ui/ui-input\"\nimport { useSec } 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 BlinkingInput() {\n  const sec = useSec()\n  return <UiInput w={420} h={120} cursorOn={Math.floor(sec * 2) % 2 === 0} />\n}"}],"qa":["Toggle cursorOn: the cursor appears and disappears without shifting the placeholder bar.","Check small and large h: padding, radius, and cursor scale with h while the placeholder floors at 6px thick.","At narrow w with a tall h, confirm the placeholder bar and padding still fit inside the field (it does not clip its children)."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"},{"name":"piece","relation":"installed-by"},{"name":"motion-hooks","relation":"example-import"}],"family":"Interface bits"},{"name":"ui-card","entry":"component","title":"UiCard","description":"Illustrated content card with a line-art picture (hills and a vermilion sun) over two text bars.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/ui-card","installName":"ui-card","page":"https://jbm-ui.bns.studio/c/ui-card","registryItem":"https://jbm-ui.bns.studio/r/ui-card.json","sourcePath":"registry/jbm/ui/ui-card.tsx","files":[{"source":"registry/jbm/ui/ui-card.tsx","target":"src/jbm/ui/ui-card.tsx","import":"@/jbm/ui/ui-card","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/ui-card.md","json":"https://jbm-ui.bns.studio/catalog/ui-card.json"},"snippet":"import { UiCard } from \"@/jbm/ui/ui-card\"\n\n<UiCard w={220} h={170} />","api":[{"export":"UiCard","kind":"component","summary":"Cream paper card with an ink outline: an SVG picture slot taking half the height, then an ink title bar and a lighter subtitle bar. Padding (7% of w), radius (8% of w), and gaps (7% of h) all scale with the box. Pure React; static.","props":[{"name":"w","type":"number","required":false,"default":"220","description":"Width in stage pixels, including the 2px Paper edge; sets padding, radius, and bar widths."},{"name":"h","type":"number","required":false,"default":"170","description":"Height in stage pixels; the picture is 50% of it and the bar thicknesses follow it."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged over the card's column layout; use for positioning or opacity."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":220,"height":170},"vertical":{"width":220,"height":170},"basis":"Fixed w × h box (border-box) at the defaults 220 × 170. `w` and `h` set it directly; the Paper shadow extends below the box."},"examples":[{"title":"Card at its default size","code":"import { UiCard } from \"@/jbm/ui/ui-card\"\n\n<UiCard w={220} h={170} />"},{"title":"Card inside a phone","code":"import { UiCard } from \"@/jbm/ui/ui-card\"\nimport { PhoneFrame } from \"@/jbm/ui/phone-frame\" // install @jbm/phone-frame separately\n\n<PhoneFrame w={200} h={360} gap={14}>\n  <UiCard w={130} h={100} />\n</PhoneFrame>"}],"qa":["Inspect the picture slot: the picture width is computed as w minus padding without the 2px edges, so it may sit about 2px right of centre; confirm this is acceptable at large w.","Try a short, wide card (h well below 0.7 × w): the picture, gaps, and two bars must still fit inside the fixed height.","Check the single vermilion sun stays the only accent when the card sits next to other accent pieces."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"},{"name":"piece","relation":"installed-by"},{"name":"phone-frame","relation":"example-import"}],"family":"Interface bits"},{"name":"piece","entry":"component","title":"Piece","description":"Picks the button, input, or card illustration by kind and sizes it from one width.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/paper","@jbm/ui-button","@jbm/ui-input","@jbm/ui-card"],"install":"npx shadcn@latest add @jbm/piece","installName":"piece","page":"https://jbm-ui.bns.studio/c/piece","registryItem":"https://jbm-ui.bns.studio/r/piece.json","sourcePath":"registry/jbm/ui/piece.tsx","files":[{"source":"registry/jbm/ui/piece.tsx","target":"src/jbm/ui/piece.tsx","import":"@/jbm/ui/piece","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/piece.md","json":"https://jbm-ui.bns.studio/catalog/piece.json"},"snippet":"import { Piece } from \"@/jbm/ui/piece\"\n\n<Piece kind=\"button\" w={220} />","api":[{"export":"Piece","kind":"component","summary":"Renders UiButton, UiInput, or UiCard for `kind` at width `w`; height follows each piece's proportion (button and input 0.32 × w, card 0.78 × w). Lets a list of `{ kind }` entries render interface pieces without branching.","props":[{"name":"kind","type":"PieceKind","required":true,"default":null,"description":"Which piece to draw: button, input, or card."},{"name":"w","type":"number","required":true,"default":null,"description":"Width in stage pixels; height is derived from it per kind."},{"name":"tone","type":"PaperTone","required":false,"default":null,"description":"Button tone only (ink by default, accent, or paper); ignored by input and card."},{"name":"cursorOn","type":"boolean","required":false,"default":null,"description":"Input only: shows or hides the text cursor (UiInput default: shown); ignored by button and card."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles forwarded to the chosen piece."}],"passthrough":[]},{"export":"PieceKind","kind":"type","summary":"The piece names: \"button\" | \"input\" | \"card\"."}],"stage":{"mode":"declared","landscape":{"width":220,"height":70},"vertical":{"width":220,"height":70},"basis":"No defaults: `w` is required. At w = 220 a button or input is 220 × 70 (round(0.32 × w)); a card is 220 × 172 (round(0.78 × w))."},"examples":[{"title":"One button","code":"import { Piece } from \"@/jbm/ui/piece\"\n\n<Piece kind=\"button\" w={220} />"},{"title":"A row of every kind","code":"import { Piece, type PieceKind } from \"@/jbm/ui/piece\"\n\nconst kinds: PieceKind[] = [\"button\", \"input\", \"card\"]\n<div style={{ display: \"flex\", gap: 30, alignItems: \"center\" }}>\n  {kinds.map((kind) => <Piece key={kind} kind={kind} w={180} tone=\"accent\" cursorOn={false} />)}\n</div>"}],"qa":["Render all three kinds at the same w and check their heights (0.32, 0.32, 0.78 × w) and baseline alignment in a row.","Pass tone and cursorOn to each kind: tone changes only the button and cursorOn only the input."],"related":[{"name":"paper","relation":"installs"},{"name":"ui-button","relation":"installs"},{"name":"ui-input","relation":"installs"},{"name":"ui-card","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"}],"family":"Interface bits"},{"name":"phone-frame","entry":"component","title":"PhoneFrame","description":"Phone silhouette with a thick ink edge and speaker slot that stacks your content at the bottom of its screen.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/phone-frame","installName":"phone-frame","page":"https://jbm-ui.bns.studio/c/phone-frame","registryItem":"https://jbm-ui.bns.studio/r/phone-frame.json","sourcePath":"registry/jbm/ui/phone-frame.tsx","files":[{"source":"registry/jbm/ui/phone-frame.tsx","target":"src/jbm/ui/phone-frame.tsx","import":"@/jbm/ui/phone-frame","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/phone-frame.md","json":"https://jbm-ui.bns.studio/catalog/phone-frame.json"},"snippet":"import { PhoneFrame } from \"@/jbm/ui/phone-frame\"\nimport { UiCard } from \"@/jbm/ui/ui-card\" // install @jbm/ui-card separately\nimport { UiButton } from \"@/jbm/ui/ui-button\" // install @jbm/ui-button separately\n\n<PhoneFrame w={200} h={360} gap={14} rotate={-2}>\n  <UiCard w={130} h={100} />\n  <UiButton w={130} h={40} />\n</PhoneFrame>","api":[{"export":"PhoneFrame","kind":"component","summary":"Card-stock phone with an ink edge (1.6% of w, at least 5px), corner radius 13% of w, the paper shadow, and a speaker slot near the top. Children lay out as a centred column pushed to the bottom of the screen (justify flex-end). Content is not clipped or scaled to fit.","props":[{"name":"w","type":"number","required":false,"default":"420","description":"Width in stage pixels, including the edge; sets edge thickness, radius, padding (10% of w, plus 8% extra on top), and the speaker slot."},{"name":"h","type":"number","required":false,"default":"780","description":"Height in stage pixels, including the edge."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Tilt in degrees; applied as a CSS rotate, so the layout box stays w × h."},{"name":"children","type":"React.ReactNode","required":false,"default":null,"description":"Screen content, stacked as a column from the bottom up."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last; can override padding, alignment, or transform."},{"name":"gap","type":"number","required":false,"default":"26","description":"Space between children in stage pixels."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":420,"height":780},"vertical":{"width":420,"height":780},"basis":"Fixed w × h box (border-box) at the defaults 420 × 780. `w` and `h` set it directly; `rotate` tilts it visually without changing the layout box, and the shadow extends below."},"examples":[{"title":"Phone holding interface pieces","code":"import { PhoneFrame } from \"@/jbm/ui/phone-frame\"\nimport { UiCard } from \"@/jbm/ui/ui-card\" // install @jbm/ui-card separately\nimport { UiButton } from \"@/jbm/ui/ui-button\" // install @jbm/ui-button separately\n\n<PhoneFrame w={200} h={360} gap={14} rotate={-2}>\n  <UiCard w={130} h={100} />\n  <UiButton w={130} h={40} />\n</PhoneFrame>"}],"qa":["Fill the screen with children taller than the inner area: they overflow the top edge (nothing clips), so size content to h minus the padding.","Check small w: the edge floors at 5px and the speaker slot at 5px tall.","Rotate by a few degrees and confirm corners and shadow stay inside the composition's safe area."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"},{"name":"ui-card","relation":"example-import"},{"name":"ui-button","relation":"example-import"}],"family":"Interface bits"},{"name":"badge","entry":"component","title":"Badge","description":"Round check or cross badge in accent, ink, or paper tones for fixed and broken states.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/badge","installName":"badge","page":"https://jbm-ui.bns.studio/c/badge","registryItem":"https://jbm-ui.bns.studio/r/badge.json","sourcePath":"registry/jbm/ui/badge.tsx","files":[{"source":"registry/jbm/ui/badge.tsx","target":"src/jbm/ui/badge.tsx","import":"@/jbm/ui/badge","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/badge.md","json":"https://jbm-ui.bns.studio/catalog/badge.json"},"snippet":"import { Badge } from \"@/jbm/ui/badge\"\n\n<div style={{ display: \"flex\", gap: 40 }}>\n  <Badge kind=\"check\" size={100} />\n  <Badge kind=\"x\" size={100} tone=\"ink\" />\n</div>","api":[{"export":"Badge","kind":"component","summary":"Circle with the paper shadow and a stroked check or cross (55% of the size). Accent and ink fills draw a cream mark; paper draws an ink mark with a 2px ink outline. Static; animate it by wrapping or via style.","props":[{"name":"kind","type":"\"check\" | \"x\"","required":true,"default":null,"description":"Mark to draw: check (fixed) or x (broken)."},{"name":"size","type":"number","required":false,"default":"44","description":"Diameter in stage pixels."},{"name":"tone","type":"PaperTone","required":false,"default":"\"accent\"","description":"Fill: accent (vermilion, default), ink, or paper (cream with an ink outline)."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last; use for absolute placement, opacity, or transforms."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":44,"height":44},"vertical":{"width":44,"height":44},"basis":"Square size × size box at the default size 44; the shadow extends below it."},"examples":[{"title":"Fixed and broken","code":"import { Badge } from \"@/jbm/ui/badge\"\n\n<div style={{ display: \"flex\", gap: 40 }}>\n  <Badge kind=\"check\" size={100} />\n  <Badge kind=\"x\" size={100} tone=\"ink\" />\n</div>"}],"qa":["Compare all three tones with both marks: the mark stays legible (cream on accent and ink, ink on paper).","At small sizes the 4-unit stroke of the 24-unit icon scales down; check the check and cross remain readable around 24px."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"}],"family":"Interface bits"},{"name":"token-glyph","entry":"component","title":"TokenGlyph","description":"Square glyphs for design tokens: overlapping colour swatches, an Aa type sample, or a spacing dimension line.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/token-glyph","installName":"token-glyph","page":"https://jbm-ui.bns.studio/c/token-glyph","registryItem":"https://jbm-ui.bns.studio/r/token-glyph.json","sourcePath":"registry/jbm/ui/token-glyph.tsx","files":[{"source":"registry/jbm/ui/token-glyph.tsx","target":"src/jbm/ui/token-glyph.tsx","import":"@/jbm/ui/token-glyph","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/token-glyph.md","json":"https://jbm-ui.bns.studio/catalog/token-glyph.json"},"snippet":"import { TokenGlyph, type TokenKind } from \"@/jbm/ui/token-glyph\"\n\nconst kinds: TokenKind[] = [\"color\", \"type\", \"space\"]\n<div style={{ display: \"flex\", gap: 30 }}>\n  {kinds.map((kind) => <TokenGlyph key={kind} kind={kind} size={150} />)}\n</div>","api":[{"export":"TokenGlyph","kind":"component","summary":"One of three static illustrations in a size × size square: `color` draws an ink and a vermilion circle overlapping with the paper shadow; `type` draws a heavy Geist \"Aa\" with a vermilion a; `space` draws two ink blocks with a vermilion double-headed dimension arrow between them.","props":[{"name":"kind","type":"TokenKind","required":true,"default":null,"description":"Which token to illustrate: color, type, or space."},{"name":"size","type":"number","required":false,"default":"150","description":"Side of the square in stage pixels; every shape and the type size (70% of it) scale with it."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles on the outer element (a div for color and type, an svg for space)."}],"passthrough":[]},{"export":"TokenKind","kind":"type","summary":"The glyph names: \"color\" | \"type\" | \"space\"."}],"stage":{"mode":"declared","landscape":{"width":150,"height":150},"vertical":{"width":150,"height":150},"basis":"Square size × size box at the default size 150; the colour swatch shadows extend past it."},"examples":[{"title":"All three tokens","code":"import { TokenGlyph, type TokenKind } from \"@/jbm/ui/token-glyph\"\n\nconst kinds: TokenKind[] = [\"color\", \"type\", \"space\"]\n<div style={{ display: \"flex\", gap: 30 }}>\n  {kinds.map((kind) => <TokenGlyph key={kind} kind={kind} size={150} />)}\n</div>"}],"qa":["Render the three kinds side by side at one size: they share the square footprint and read at similar visual weight.","Check the type glyph renders in Geist (font.sans) and does not overflow the square when fonts load late.","Scale size down to about 60px: the spacing arrowheads and dimension line stay distinct."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"ui-bits","relation":"bundled-in"}],"family":"Interface bits"},{"name":"folder","entry":"component","title":"Folder","description":"Controlled folder illustration that pulls its sheet upright from 0 to 1.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/folder","installName":"folder","page":"https://jbm-ui.bns.studio/c/folder","registryItem":"https://jbm-ui.bns.studio/r/folder.json","sourcePath":"registry/jbm/ui/folder.tsx","files":[{"source":"registry/jbm/ui/folder.tsx","target":"src/jbm/ui/folder.tsx","import":"@/jbm/ui/folder","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/folder.md","json":"https://jbm-ui.bns.studio/catalog/folder.json"},"snippet":"import { Folder } from \"@/jbm/ui/folder\"\n\n<Folder label=\"Ideas\" open={0.5} />\n// open: 0 (closed) to 1 (open); no internal timer.","api":[{"export":"Folder","kind":"component","summary":"Accent, ink, or card folder whose sheet rotates upright and clears the front panel as `open` goes from 0 to 1. Pure React with no internal timer; drive `open` from a slider or a video timeline.","props":[{"name":"children","type":"React.ReactNode","required":false,"default":null,"description":"Replaces the default sheet entirely. Rendered untransformed, so `open` does not move custom contents; animate them yourself or use FolderContents."},{"name":"label","type":"string","required":false,"default":null,"description":"Folder name; also names the image for assistive technology. On the front panel (accent and ink default) it is Geist Mono 600 and follows fitLine: whole when it fits, compressed horizontally down to 0.8, then compressed with an ellipsis. On the tab (card default) it is a tab name in Geist 800, drawn whole: the tab widens to fit it (sansWidth from tokens), up to the body width, then the name compresses. The tab is on the back panel, so once `open` is above 0 (a sheet stands in front of it) the name prints on the front panel instead: never a fragment beside the sheet and never painted over it. Front-panel type keeps its proportions as the panel tilts (frontType)."},{"name":"open","type":"number","required":false,"default":"0","description":"Opening progress from 0 (closed) to 1 (sheet upright). Clamped; non-finite values render closed."},{"name":"tone","type":"FolderTone","required":false,"default":"\"accent\"","description":"Folder fill: \"accent\" (vermilion, cream label), \"ink\" (cream label), or \"card\" (plain cream with ink label, tab label by default). A closed card folder shows no sheet: its default sheet, in the folder's own stock, is seated below the front panel's top edge and rises straight out over the first 8% of open, then turns like the others. Accent and ink folders show their contrasting sheet above the panel when closed."},{"name":"sublabel","type":"string","required":false,"default":null,"description":"Short mono line on the front panel, placed with it as it opens (its glyphs keep their proportions): under a front label, or near the panel's top-left when the label is on the tab. Same overflow rule as a front label (fitLine)."},{"name":"labelOn","type":"\"front\" | \"tab\"","required":false,"default":"tone === \"card\" ? \"tab\" : \"front\"","description":"\"front\" or \"tab\": where the name prints while the folder is closed. Defaults to \"tab\" for the card tone and \"front\" for accent and ink. Once open is above 0 the name prints on the front panel either way; the tab keeps the width it was given."}],"passthrough":["React.SVGProps<SVGSVGElement>"]},{"export":"folderShape","kind":"constant","summary":"Folder's proportions in its 260×220 space, shared by every folder in the library: viewBox { w: 260, h: 220 }, body { x: 25, y: 55, w: 205, h: 150 } (tab top to the front panel's bottom edge), tab { width: 83, height: 27, slope: 17 }, and flap 95 (the front panel's top edge when closed). tableFolderGeometry and cajonLayout's folders are this body at another scale."},{"export":"folderScaleForDrawer","kind":"function","summary":"The scale that makes a standalone Folder the same object as the front folder of a drawer: render Folder with style.width = 260 × the result, or multiply folderShape by it. Cajon's front folder is the drawer width less 26 units a side (× w / 420 above the 420 reference); a FileCabinet's drawer is the cabinet width less 20.","params":[{"name":"drawerWidth","type":"number","required":true,"default":null,"description":"Drawer width in parent units (Cajon's w). Non-finite or non-positive widths use the 420 reference."}],"returns":"Folder units to parent units: 368 / 205 (about 1.80) for the 420 reference drawer."},{"export":"folderTones","kind":"constant","summary":"The fill and label color of each tone, from the palette tokens: accent, ink, card."},{"export":"FolderTone","kind":"type","summary":"\"accent\" | \"ink\" | \"card\"."},{"export":"fitLine","kind":"function","summary":"The one overflow rule for folder text: the line whole when it fits `room`, compressed horizontally down to 0.8 when that is enough, otherwise compressed to 0.8 and cut to end with an ellipsis.","params":[{"name":"text","type":"string","required":true,"default":null,"description":"The line."},{"name":"width","type":"(t: string) => number","required":true,"default":null,"description":"Measures a candidate string (e.g. a sansWidth or mono estimate)."},{"name":"room","type":"number","required":true,"default":null,"description":"Available width in the same units."}],"returns":"{ text, scale }: the string to draw and its horizontal scale."},{"export":"oklab","kind":"function","summary":"A #RRGGBB colour in OKLab ([lightness 0–1, a, b]); used to mix drawer shades and pick label ink.","params":[{"name":"hex","type":"string","required":true,"default":null,"description":"A #RRGGBB colour."}],"returns":"[L, a, b]."},{"export":"oklabHex","kind":"function","summary":"An OKLab triple back to #RRGGBB, clamped to sRGB.","params":[{"name":"lab","type":"readonly [number, number, number]","required":true,"default":null,"description":"[L, a, b]."}],"returns":"A #RRGGBB string."},{"export":"labelInkOn","kind":"function","summary":"Readable label colour for a fill: color.ink when its OKLab lightness is above 0.6, else color.bg (cream). Non-hex fills get cream.","params":[{"name":"fill","type":"string","required":true,"default":null,"description":"A #RRGGBB fill."}],"returns":"color.ink or color.bg."},{"export":"frontPlane","kind":"function","summary":"SVG transform for text printed on the front panel at a closed-folder point, so it widens and leans with the panel as the folder opens. Use it for marks that should lean with the panel; Folder sets its own type with frontType, so the glyphs are never squashed.","params":[{"name":"u","type":"number","required":true,"default":null,"description":"Baseline start x in the 260×220 folder space (closed)."},{"name":"v","type":"number","required":true,"default":null,"description":"Baseline y in the folder space (closed), between 95 and 205."},{"name":"open","type":"number","required":true,"default":null,"description":"Opening progress 0–1."}],"returns":"A matrix(…) string for a transform attribute."},{"export":"frontType","kind":"function","summary":"Transform for type on the front panel: the anchor follows frontPlane as the folder opens, but the glyphs keep their proportions (one uniform scale for the panel's foreshortening), never squashed or sheared. Folder uses it for its label and sublabel.","params":[{"name":"u","type":"number","required":true,"default":null,"description":"Baseline start x in the 260×220 folder space (closed)."},{"name":"v","type":"number","required":true,"default":null,"description":"Baseline y in the folder space (closed), between 95 and 205."},{"name":"open","type":"number","required":true,"default":null,"description":"Opening progress 0–1."}],"returns":"A matrix(k 0 0 k x y) string for a transform attribute."},{"export":"FolderOutline","kind":"component","summary":"The complete back silhouette with its tab, as an SVG path. Shared by Folder, FolderContents, FolderCarry, and filing drawers so hidden geometry stays consistent.","props":[{"name":"x","type":"number","required":false,"default":"25","description":"Left edge in the parent SVG's units."},{"name":"y","type":"number","required":false,"default":"55","description":"Top of the tab."},{"name":"w","type":"number","required":false,"default":"205","description":"Body width."},{"name":"h","type":"number","required":false,"default":"144","description":"Height from the top of the tab to the bottom edge."},{"name":"tabX","type":"number","required":false,"default":"x","description":"Left edge of the tab; defaults to the body's left edge."},{"name":"tabWidth","type":"number","required":false,"default":"83","description":"Tab width, including its slope."},{"name":"tabHeight","type":"number","required":false,"default":"27","description":"Tab height above the body."},{"name":"tabSlope","type":"number","required":false,"default":"17","description":"Horizontal run of the tab's slanted edge."},{"name":"fill","type":"string","required":false,"default":"color.accent","description":"Fill color; the ink edge (stroke.outline, 3px) is fixed."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":260,"height":220},"vertical":{"width":260,"height":220},"basis":"Fixed 260×220 viewBox rendered at 260×220 stage pixels. It keeps its aspect ratio: set style.width to scale (height is auto), and it shrinks to maxWidth 100% of its container."},"examples":[{"title":"Half-open folder","code":"import { Folder } from \"@/jbm/ui/folder\"\n\n<Folder label=\"Ideas\" open={0.5} />\n// open: 0 (closed) to 1 (open); no internal timer."},{"title":"Card folder with a tab label and sublabel","code":"import { Folder } from \"@/jbm/ui/folder\"\n\n<Folder tone=\"card\" label=\"Doorways\" sublabel=\"rigor · ir a la fuente\" />\n// Cream fill, ink text; the tab widens to fit the whole label."},{"title":"Match the folders in a drawer","code":"import { Folder, folderScaleForDrawer } from \"@/jbm/ui/folder\"\n\n// A loose folder the same size as the front folder of a 420-wide Cajon.\n<Folder tone=\"card\" label=\"Doorways\" style={{ width: 260 * folderScaleForDrawer(420) }} />"},{"title":"Drive it from a Remotion timeline","code":"import { Folder } from \"@/jbm/ui/folder\"\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 OpeningFolder() {\n  const open = useProgress(0.5, 1, 0.8)\n  return <Folder label=\"proyecto\" tone=\"ink\" open={open} style={{ width: 390 }} />\n}"}],"qa":["Drag open through 0, 0.5, and 1: the sheet never cuts through the front panel and its lower corner clears the folder edge.","Card tone closed: only the back panel, its tab and name, and the front panel show; no sheet edge or dog-ear above the front. Step open through 0.04, 0.08, and 0.12: the sheet rises straight out of the front before it turns, with no ink wedge pinched against the panel's top edge.","Beside a Cajon, a Folder at style.width 260 × folderScaleForDrawer(w) has the same body width as the drawer's front folder.","Check the label stays on the front plane while it foreshortens; a long label and sublabel follow the same rule: compressed to at most 0.8, then an ellipsis.","Compare accent, ink, and card tones; the ink folder keeps a visible 3px edge on cream. Vermilion appears only on the accent tone: the default sheet's heading bar is ink on ink and card folders.","Card tone: the tab name is bold sans (Geist 800), the tab widens for \"Doorways\", reaches the body width for \"Training Within Industry\", and never shows an ellipsis. At open 0.5 and 1 the whole name stays readable over the rising sheet.","Sublabel: stays on the front panel and leans with it through open 0 → 1, under a front label or near the top-left under a tab label.","Scale with style.width at narrow widths: the silhouette keeps its 260:220 proportions."],"related":[{"name":"tokens","relation":"installs"},{"name":"cajon","relation":"installed-by"},{"name":"folder-contents","relation":"installed-by"},{"name":"folder-carry","relation":"installed-by"},{"name":"motion-hooks","relation":"example-import"}],"family":"Folders & drawers","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"},{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"text-fill","entry":"component","title":"TextFill","description":"A controlled character sweep from muted text through vermilion into ink. Drive progress with a slider, scroll, or a video timeline.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/text-fill","installName":"text-fill","page":"https://jbm-ui.bns.studio/c/text-fill","registryItem":"https://jbm-ui.bns.studio/r/text-fill.json","sourcePath":"registry/jbm/ui/text-fill.tsx","files":[{"source":"registry/jbm/ui/text-fill.tsx","target":"src/jbm/ui/text-fill.tsx","import":"@/jbm/ui/text-fill","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/text-fill.md","json":"https://jbm-ui.bns.studio/catalog/text-fill.json"},"snippet":"import { TextFill } from \"@/jbm/ui/text-fill\"\n\n<TextFill text=\"Una idea toma forma.\" progress={0.5} style={{ fontSize: 40 }} />\n// progress: 0–1, controlled; no internal timer.","api":[{"export":"TextFill","kind":"component","summary":"Inline span that colors each grapheme by `progress`: characters ahead of the sweep stay dim, a short accent wave (about three characters) leads, and settled characters turn to text color. Pure React with no timers, browser globals, or Remotion; the full text is also rendered once in a visually hidden span for assistive technology, and the colored copy is aria-hidden.","props":[{"name":"text","type":"string","required":true,"default":null,"description":"The sentence to sweep. Split into words (whitespace preserved, words never break mid-word unless they overflow) and graphemes via Intl.Segmenter."},{"name":"progress","type":"number","required":true,"default":null,"description":"Fill progress from 0 (all dim) to 1 (all text color). Clamped to 0–1; non-finite values render as 0. Drive from a slider, scroll position, or a timeline."},{"name":"dimColor","type":"string","required":false,"default":"color.line","description":"Color of characters the sweep has not reached yet."},{"name":"accentColor","type":"string","required":false,"default":"color.accent","description":"Color of the leading wave between dim and settled characters; keep the vermilion accent."},{"name":"textColor","type":"string","required":false,"default":"color.ink","description":"Final color of settled characters, and of every character at progress 1."},{"name":"reducedMotion","type":"boolean","required":false,"default":"false","description":"When true, renders the complete text in textColor regardless of progress."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged over the defaults (Geist sans, weight 800, line-height 1.15, pre-wrap); set fontSize here."},{"name":"className","type":"string","required":false,"default":null,"description":"Class name on the outer span."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Inline text: width follows the container and height follows the wrapped lines at the inherited font size × 1.15 line-height. Nothing is fixed; set fontSize through style or a parent."},"examples":[{"title":"Half-filled sentence","code":"import { TextFill } from \"@/jbm/ui/text-fill\"\n\n<TextFill text=\"Una idea toma forma.\" progress={0.5} style={{ fontSize: 40 }} />\n// progress: 0–1, controlled; no internal timer."},{"title":"Drive it from a Remotion timeline","code":"import { TextFill } from \"@/jbm/ui/text-fill\"\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 FillingText() {\n  const progress = useProgress(0.2, 1, 2)\n  return <TextFill text=\"Letra por letra.\" progress={progress} style={{ fontSize: 72 }} />\n}"}],"qa":["Drag the progress slider through 0, about 0.5, and 1: all dim at 0, a dim → vermilion → ink gradient near the sweep front mid-way, and solid ink at 1 with no lingering accent.","Check wrapping on a narrow screen: words stay whole and whitespace is preserved; very long words wrap anywhere instead of overflowing.","With a screen reader, the sentence is read once from the hidden copy, not character by character.","Set reducedMotion and confirm the full ink text renders at any progress.","Try text with emoji or combining marks; each grapheme should color as one unit."],"related":[{"name":"tokens","relation":"installs"},{"name":"scroll-text-fill","relation":"installed-by"},{"name":"burbuja","relation":"installed-by"},{"name":"motion-hooks","relation":"example-import"}]},{"name":"scroll-text-fill","entry":"component","title":"ScrollTextFill","description":"Scroll to bring text into focus, one character at a time. Keyboard scrolling, reversible progress, and reduced-motion support.","category":"Interactive","capabilities":["scroll"],"needsRemotion":false,"registryDependencies":["@jbm/text-fill","@jbm/tokens"],"install":"npx shadcn@latest add @jbm/scroll-text-fill","installName":"scroll-text-fill","page":"https://jbm-ui.bns.studio/c/scroll-text-fill","registryItem":"https://jbm-ui.bns.studio/r/scroll-text-fill.json","sourcePath":"registry/jbm/ui/scroll-text-fill.tsx","files":[{"source":"registry/jbm/ui/scroll-text-fill.tsx","target":"src/jbm/ui/scroll-text-fill.tsx","import":"@/jbm/ui/scroll-text-fill","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/scroll-text-fill.md","json":"https://jbm-ui.bns.studio/catalog/scroll-text-fill.json"},"snippet":"import { ScrollTextFill } from \"@/jbm/ui/scroll-text-fill\"\n\n<ScrollTextFill\n  text=\"Una idea toma forma. Letra por letra.\"\n  height={320}\n  distance={640}\n  style={{ fontSize: 40 }}\n/>\n// Self-contained scroll region; respects prefers-reduced-motion.","api":[{"export":"ScrollTextFill","kind":"component","summary":"Self-contained, focusable scroll region that pins a TextFill in a sticky row and maps its own scroll position (0 at top, 1 at the bottom) to fill progress. Scrolling back rewinds; it never autoplays. Under reduced motion it renders the full text statically with no scroll region.","props":[{"name":"className","type":"string","required":false,"default":null,"description":"Class name on the TextFill span."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles for the TextFill span; set fontSize here."},{"name":"text","type":"string","required":true,"default":null,"description":"The sentence to fill; passed to TextFill."},{"name":"dimColor","type":"string","required":false,"default":null,"description":"Color of characters not yet reached; passed to TextFill."},{"name":"accentColor","type":"string","required":false,"default":null,"description":"Color of the leading wave; passed to TextFill."},{"name":"textColor","type":"string","required":false,"default":null,"description":"Final color of settled characters; passed to TextFill."},{"name":"reducedMotion","type":"boolean","required":false,"default":null,"description":"Overrides the system prefers-reduced-motion setting. True renders the complete text with auto height and no scrolling; undefined follows the system preference (and renders reduced on the server)."},{"name":"height","type":"number","required":false,"default":"320","description":"Height of the scroll viewport in stage pixels. Minimum 120; non-finite values fall back to 320."},{"name":"distance","type":"number","required":false,"default":"640","description":"Extra scroll distance in pixels beyond the viewport; the whole fill happens over this travel. Minimum 1; non-finite values fall back to 640."},{"name":"label","type":"string","required":false,"default":"\"Scroll to fill the text\"","description":"Accessible name of the scroll region."}],"passthrough":["Omit<TextFillProps, \"progress\">"]}],"stage":{"mode":"declared","landscape":{"width":"fill","height":320},"vertical":{"width":"fill","height":320},"basis":"The region is width 100% and exactly `height` (default 320, minimum 120) stage pixels tall; the scrollable content inside is height + distance. With reduced motion the height becomes auto: the text plus 24px padding on each side, with a minimum of `height`."},"examples":[{"title":"Contained scroll fill","code":"import { ScrollTextFill } from \"@/jbm/ui/scroll-text-fill\"\n\n<ScrollTextFill\n  text=\"Una idea toma forma. Letra por letra.\"\n  height={320}\n  distance={640}\n  style={{ fontSize: 40 }}\n/>\n// Self-contained scroll region; respects prefers-reduced-motion."}],"qa":["Scroll the region from top to bottom and back: fill tracks scroll position in both directions and is complete exactly at the bottom.","Focus the region with Tab and use ↓ / ↑ (and Page Down / Up): it scrolls and fills without scrolling the page (overscroll is contained).","Enable prefers-reduced-motion (or pass reducedMotion): the full ink text renders statically, the region is not focusable, and there is no scroll.","Check narrow screens: long text wraps inside the sticky row and stays vertically centered in the viewport.","Change text or height after mount and confirm progress recomputes (a ResizeObserver re-measures)."],"related":[{"name":"text-fill","relation":"installs"},{"name":"tokens","relation":"installs"}]},{"name":"flip-text","entry":"component","title":"FlipText","description":"Letters tumble on hover with a vermilion accent. Click, tap, or use the keyboard to flip the whole phrase. Respects reduced motion.","category":"Interactive","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/flip-text","installName":"flip-text","page":"https://jbm-ui.bns.studio/c/flip-text","registryItem":"https://jbm-ui.bns.studio/r/flip-text.json","sourcePath":"registry/jbm/ui/flip-text.tsx","files":[{"source":"registry/jbm/ui/flip-text.tsx","target":"src/jbm/ui/flip-text.tsx","import":"@/jbm/ui/flip-text","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/flip-text.md","json":"https://jbm-ui.bns.studio/catalog/flip-text.json"},"snippet":"import { FlipText } from \"@/jbm/ui/flip-text\"\n\n<FlipText duration={450} style={{ fontSize: 48 }}>Una idea viva.</FlipText>\n// Hover individual letters. Click, tap, Enter, or Space flips all.\n// A button: do not nest inside another button or link.","api":[{"export":"FlipText","kind":"component","summary":"A native button whose graphemes each flip 360° on the X axis (lifting 0.15em and passing through the accent color at the midpoint) using the Web Animations API. Mouse hover flips one character; click, tap, Enter, or Space flips every character in sequence, staggered 25ms apart. The accessible name is `Flip text: <children>`. No animation runs under reduced motion.","props":[{"name":"children","type":"string","required":true,"default":null,"description":"The phrase, as a plain string. Split into words and graphemes; whitespace is preserved."},{"name":"duration","type":"number","required":false,"default":"450","description":"Milliseconds for each character's flip. Negative values clamp to 0; non-finite values fall back to 450."},{"name":"accentColor","type":"string","required":false,"default":"color.accent","description":"Color each character passes through at the middle of its flip."},{"name":"reducedMotion","type":"boolean","required":false,"default":null,"description":"Overrides the system prefers-reduced-motion setting. When reduced, flips are skipped and any running flips are cancelled."},{"name":"className","type":"string","required":false,"default":null,"description":"Class name on the button."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged over the defaults (Geist sans, weight 800, line-height 1.3, ink, transparent background); set fontSize here."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"An inline-block button sized by its text: height is lines × fontSize × 1.3 plus 0.2em top and bottom padding, width follows the text up to 100% of the container, where it wraps."},"examples":[{"title":"Flip a headline","code":"import { FlipText } from \"@/jbm/ui/flip-text\"\n\n<FlipText duration={450} style={{ fontSize: 48 }}>Una idea viva.</FlipText>\n// Hover individual letters. Click, tap, Enter, or Space flips all.\n// A button: do not nest inside another button or link."}],"qa":["Hover single letters with a mouse: each tumbles once and returns to ink; re-hovering mid-flip restarts that letter cleanly.","Click, tap, and press Enter or Space with keyboard focus: every letter flips in a left-to-right stagger, then all characters return to ink.","Check touch: tapping flips the whole phrase; pointer-enter from touch does not flip single letters.","Enable prefers-reduced-motion, or pass reducedMotion: no letter moves, and flips in progress are cancelled when the preference turns on.","Check the focus ring is visible and the phrase wraps between words on a narrow screen."],"related":[{"name":"tokens","relation":"installs"}]},{"name":"scroll-stack","entry":"component","title":"ScrollStack","description":"Stack any React content as you scroll. Successive items scale into place while earlier ones fade. Page or contained scrolling, keyboard access, and a plain-list fallback.","category":"Interactive","capabilities":["controls","scroll"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/scroll-stack","installName":"scroll-stack","page":"https://jbm-ui.bns.studio/c/scroll-stack","registryItem":"https://jbm-ui.bns.studio/r/scroll-stack.json","sourcePath":"registry/jbm/ui/scroll-stack.tsx","files":[{"source":"registry/jbm/ui/scroll-stack.tsx","target":"src/jbm/ui/scroll-stack.tsx","import":"@/jbm/ui/scroll-stack","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/scroll-stack.md","json":"https://jbm-ui.bns.studio/catalog/scroll-stack.json"},"snippet":"import { ScrollStack } from \"@/jbm/ui/scroll-stack\"\nimport { Card } from \"@/jbm/ui/card\" // install @jbm/card separately\n\n<ScrollStack height={480} distance={120}>\n  <Card>First idea</Card>\n  <Card dark>Another idea</Card>\n  <div style={{ background: \"#fff\", padding: 24 }}>Any content</div>\n</ScrollStack>\n// Omit height for page scrolling; avoid overflow ancestors in page mode.","api":[{"export":"ScrollStack","kind":"component","summary":"A list region whose direct children become sticky items: each incoming item scales from 1.06 to 1 as it pins, and the item it covers shrinks toward `minScale` and fades out over the last 35% of its progress. Uses native scroll and sticky positioning (page or contained), never intercepts scroll, and scrolls a covered item back into view when keyboard focus reaches it. It falls back to a plain list under reduced motion, with fewer than two items, or when any item is taller than the viewport minus twice `top`.","props":[{"name":"children","type":"ReactNode","required":true,"default":null,"description":"Each direct child is one stack item; its content and styling stay yours. Keep backgrounds opaque for a solid stack; wrap related content in one element."},{"name":"height","type":"number","required":false,"default":null,"description":"Omit to stack against page scrolling. Set a number for a self-contained, focusable scroll viewport of that many stage pixels (minimum 160; non-finite falls back to 480)."},{"name":"distance","type":"number","required":false,"default":"120","description":"Scroll distance in pixels between successive items while stacking (also the margin between them). Minimum 0; non-finite falls back to 120. The plain list uses a fixed 24px gap."},{"name":"top","type":"number","required":false,"default":"24","description":"Sticky inset from the top of the viewport (or the contained region), in pixels; also the list's top padding. Minimum 0."},{"name":"minScale","type":"number","required":false,"default":"0.9","description":"Scale of an item once fully covered, clamped to 0.5–1."},{"name":"reducedMotion","type":"boolean","required":false,"default":null,"description":"True renders a plain list; false forces stacking. Undefined follows the system prefers-reduced-motion setting and updates when it changes."},{"name":"label","type":"string","required":false,"default":"\"Scroll through the stack\"","description":"Accessible name of the region."},{"name":"className","type":"string","required":false,"default":null,"description":"Class name on the outer region."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles for the outer region, merged before height and overflow (those are controlled by `height`)."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Width is 100% of the container. In page mode (height omitted) the height is the sum of the items plus `distance` between each, `top` padding, and a tail that lets the last item rest pinned. With `height` set the region is exactly that tall (minimum 160) and scrolls internally."},"examples":[{"title":"Contained stack of cards","code":"import { ScrollStack } from \"@/jbm/ui/scroll-stack\"\nimport { Card } from \"@/jbm/ui/card\" // install @jbm/card separately\n\n<ScrollStack height={480} distance={120}>\n  <Card>First idea</Card>\n  <Card dark>Another idea</Card>\n  <div style={{ background: \"#fff\", padding: 24 }}>Any content</div>\n</ScrollStack>\n// Omit height for page scrolling; avoid overflow ancestors in page mode."}],"qa":["Scroll the contained demo from top to bottom and back: each card pins at the top inset, the covered card shrinks and fades fully before the next settles, and the last card rests without a gap or jump.","Toggle Plain list: items render as an ordinary list with 24px gaps, no transforms, and full opacity; toggling back restores stacking.","Tab into the covered cards' controls (the demo's button): the stack scrolls the focused item into view and it stays clickable.","Resize to a narrow screen so an item is taller than the viewport: the component switches to the plain list (data-stack-mode=\"list\").","Check page mode separately (height omitted) inside a page without overflow ancestors; sticky positioning fails under overflow: hidden/auto parents.","Enable prefers-reduced-motion with reducedMotion undefined: it falls back to the list live."],"related":[{"name":"tokens","relation":"installs"},{"name":"card","relation":"example-import"}]},{"name":"rule","entry":"component","title":"Rule","description":"A labelled divider with ink or vermilion emphasis and two line weights.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/rule","installName":"rule","page":"https://jbm-ui.bns.studio/c/rule","registryItem":"https://jbm-ui.bns.studio/r/rule.json","sourcePath":"registry/jbm/ui/rule.tsx","files":[{"source":"registry/jbm/ui/rule.tsx","target":"src/jbm/ui/rule.tsx","import":"@/jbm/ui/rule","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/rule.md","json":"https://jbm-ui.bns.studio/catalog/rule.json"},"snippet":"import { Rule } from \"@/jbm/ui/rule\"\n\n<Rule label=\"Una idea a la vez\" accent strong />\n<Rule />\n<Rule label=\"El siguiente capítulo\" strong />","api":[{"export":"Rule","kind":"component","summary":"A full-width separator (role=\"separator\") with an optional uppercase mono label before a flexible line. The line is 1px hairline by default or 3px when strong; its color is the line token, ink when strong, or vermilion when accent. Other div attributes pass through.","props":[{"name":"label","type":"string","required":false,"default":null,"description":"Optional editorial label (Geist Mono, 13px, uppercase) shown before the line; also becomes the separator's aria-label. Dim, or vermilion with `accent`."},{"name":"strong","type":"boolean","required":false,"default":"false","description":"Uses a 3px line instead of 1px, and ink instead of the hairline color when not accented."},{"name":"accent","type":"boolean","required":false,"default":"false","description":"Colors the line and label vermilion. Keep to one accent per composition."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width is 100% of the container. Height is the line weight (1px, or 3px strong) without a label, or one line of 13px mono label text with a label; long labels wrap anywhere and add lines. The line keeps a 24px minimum width."},"examples":[{"title":"Labelled accent rule","code":"import { Rule } from \"@/jbm/ui/rule\"\n\n<Rule label=\"Una idea a la vez\" accent strong />\n<Rule />\n<Rule label=\"El siguiente capítulo\" strong />"}],"qa":["Compare the four looks on cream: plain hairline, strong ink, labelled, and accent strong; the label sits on the line's vertical center with a 16px gap.","Check a long label on a narrow screen: it wraps and the line keeps at least 24px.","Confirm the separator is announced with its label as the accessible name, and without one when unlabelled."],"related":[{"name":"tokens","relation":"installs"}]},{"name":"action-link","entry":"component","title":"ActionLink","description":"A text anchor with an optional arrow and visible hover and keyboard focus.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/action-link","installName":"action-link","page":"https://jbm-ui.bns.studio/c/action-link","registryItem":"https://jbm-ui.bns.studio/r/action-link.json","sourcePath":"registry/jbm/ui/action-link.tsx","files":[{"source":"registry/jbm/ui/action-link.tsx","target":"src/jbm/ui/action-link.tsx","import":"@/jbm/ui/action-link","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/action-link.md","json":"https://jbm-ui.bns.studio/catalog/action-link.json"},"snippet":"import { ActionLink } from \"@/jbm/ui/action-link\"\n\n<ActionLink href=\"/ideas\">Explora las ideas</ActionLink>\n<ActionLink href=\"/historia\" arrow={false}>Lee la historia completa</ActionLink>","api":[{"export":"ActionLink","kind":"component","summary":"A real <a> (all anchor attributes and the ref pass through) in Geist 18px bold with a 1px underline. On hover or keyboard focus it turns vermilion with a 2px underline; caller onMouseEnter, onMouseLeave, onFocus, and onBlur handlers still run. An optional decorative ↗ arrow follows the text.","props":[{"name":"arrow","type":"boolean","required":false,"default":"true","description":"Shows the trailing ↗ arrow (aria-hidden). Set false for a plain underlined link."}],"passthrough":["React.ComponentPropsWithRef<\"a\">"]}],"stage":{"mode":"fluid","reason":"Inline-flex, sized by its text up to 100% of the container: one line is 18px × 1.4 plus 6px padding above and below (about 37px); long text wraps anywhere and adds lines."},"examples":[{"title":"Link with and without the arrow","code":"import { ActionLink } from \"@/jbm/ui/action-link\"\n\n<ActionLink href=\"/ideas\">Explora las ideas</ActionLink>\n<ActionLink href=\"/historia\" arrow={false}>Lee la historia completa</ActionLink>"}],"qa":["Hover and Tab to each link: both switch to vermilion with a thicker underline and a visible focus outline offset 5px, then revert on leave or blur.","Check that the arrow is not read by screen readers and does not wrap onto its own line apart from the text.","Check a long link text on a narrow screen: it wraps without overflowing."],"related":[{"name":"tokens","relation":"installs"},{"name":"index-row","relation":"installed-by"}]},{"name":"index-row","entry":"component","title":"IndexRow","description":"A numbered record with optional evidence, linked title, and active state.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/action-link"],"install":"npx shadcn@latest add @jbm/index-row","installName":"index-row","page":"https://jbm-ui.bns.studio/c/index-row","registryItem":"https://jbm-ui.bns.studio/r/index-row.json","sourcePath":"registry/jbm/ui/index-row.tsx","files":[{"source":"registry/jbm/ui/index-row.tsx","target":"src/jbm/ui/index-row.tsx","import":"@/jbm/ui/index-row","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/index-row.md","json":"https://jbm-ui.bns.studio/catalog/index-row.json"},"snippet":"import { IndexRow } from \"@/jbm/ui/index-row\"\n\n<IndexRow index=\"01\" title=\"El contexto\" evidence=\"Empieza con una pregunta.\" href=\"/contexto\" active />\n<IndexRow index=\"02\" title=\"La evidencia\" href=\"/evidencia\" />\n<IndexRow index=\"03\" title=\"Una idea útil\" />","api":[{"export":"IndexRow","kind":"component","summary":"One row of a numbered index: a mono index, a 22px title (an ActionLink when `href` is set, otherwise bold text), and optional dim evidence below, with a hairline bottom border. Only the title is linked so evidence may contain its own links. Other div attributes pass through.","props":[{"name":"index","type":"React.ReactNode","required":true,"default":null,"description":"The row marker, such as \"01\"; Geist Mono 14px, dim or vermilion when active."},{"name":"title","type":"React.ReactNode","required":true,"default":null,"description":"The record's title, 22px. Rendered through ActionLink (with its arrow) when `href` is set."},{"name":"evidence","type":"React.ReactNode","required":false,"default":null,"description":"Optional supporting text below the title, 15px dim; may contain links or other nodes."},{"name":"href","type":"string","required":false,"default":null,"description":"Links the title. Without it the title is plain text."},{"name":"active","type":"boolean","required":false,"default":"false","description":"Marks the current row: index and title turn vermilion, and a linked title gets aria-current=\"step\"."}],"passthrough":["Omit< React.HTMLAttributes<HTMLDivElement>, \"title\" >"]}],"stage":{"mode":"fluid","reason":"Width fills the container. Height is 22px padding above and below plus the title (22px × 1.25–1.4 per line) and, when present, 8px + evidence lines at 15px × 1.55, plus the 1px bottom border. Long titles and evidence wrap and add lines."},"examples":[{"title":"Numbered index with an active row","code":"import { IndexRow } from \"@/jbm/ui/index-row\"\n\n<IndexRow index=\"01\" title=\"El contexto\" evidence=\"Empieza con una pregunta.\" href=\"/contexto\" active />\n<IndexRow index=\"02\" title=\"La evidencia\" href=\"/evidencia\" />\n<IndexRow index=\"03\" title=\"Una idea útil\" />"}],"qa":["Compare active, linked, and unlinked rows: only the active row uses vermilion, linked titles show the ActionLink underline and arrow, and plain titles are bold ink.","Hover and Tab to linked titles; the focus indicator is visible and aria-current=\"step\" is present only on the active row.","Check a narrow screen with long titles and evidence: text wraps beside the index, which stays baseline-aligned with the title's first line."],"related":[{"name":"tokens","relation":"installs"},{"name":"action-link","relation":"installs"}]},{"name":"figure-caption","entry":"component","title":"FigureCaption","description":"An editorial figure label, caption, and provenance that wraps on narrow screens.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/figure-caption","installName":"figure-caption","page":"https://jbm-ui.bns.studio/c/figure-caption","registryItem":"https://jbm-ui.bns.studio/r/figure-caption.json","sourcePath":"registry/jbm/ui/figure-caption.tsx","files":[{"source":"registry/jbm/ui/figure-caption.tsx","target":"src/jbm/ui/figure-caption.tsx","import":"@/jbm/ui/figure-caption","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/figure-caption.md","json":"https://jbm-ui.bns.studio/catalog/figure-caption.json"},"snippet":"import { FigureCaption } from \"@/jbm/ui/figure-caption\"\n\n<figure>\n  <img src=\"/chart.png\" alt=\"Descripción del gráfico\" />\n  <FigureCaption index=\"01\" provenance=\"Fuente: nuestro estudio\">\n    Menos ruido. Más señal.\n  </FigureCaption>\n</figure>","api":[{"export":"FigureCaption","kind":"component","summary":"A <figcaption> with a hairline top rule: an optional vermilion `Fig. <index>` label, the caption text (18px bold), and optional mono provenance below. Place it as the first or last child of a <figure>; figcaption attributes and ref pass through.","props":[{"name":"index","type":"React.ReactNode","required":false,"default":null,"description":"Figure number or label, rendered as `Fig. <index>` in uppercase vermilion mono. Omit (null/undefined) to hide."},{"name":"provenance","type":"React.ReactNode","required":false,"default":null,"description":"Optional source or credit line under the caption, 12px dim mono."},{"name":"layout","type":"\"inline\" | \"stacked\"","required":false,"default":"\"inline\"","description":"\"inline\" places the label beside the caption and wraps below it when narrower than about 180px of caption room; \"stacked\" always puts the label above."}],"passthrough":["React.ComponentPropsWithRef<\"figcaption\">"]}],"stage":{"mode":"fluid","reason":"Width fills the figure. Height is 18px top padding plus the 1px border, the caption lines (18px × 1.4), and optional provenance (8px + 12px × 1.6 per line); stacked layout, or inline layout that wraps, adds the label line plus a 10px gap."},"examples":[{"title":"Caption a chart","code":"import { FigureCaption } from \"@/jbm/ui/figure-caption\"\n\n<figure>\n  <img src=\"/chart.png\" alt=\"Descripción del gráfico\" />\n  <FigureCaption index=\"01\" provenance=\"Fuente: nuestro estudio\">\n    Menos ruido. Más señal.\n  </FigureCaption>\n</figure>"}],"qa":["Compare inline and stacked layouts; in inline, narrow the screen until the caption wraps below the label without overlap.","Check with and without index and provenance: no empty gaps appear when either is omitted.","Confirm it is used inside a <figure> so the caption is associated with the visual."],"related":[{"name":"tokens","relation":"installs"}]},{"name":"ticket","entry":"component","title":"Ticket","description":"Admission-style surface with a colored header, flexible body, and perforated footer stub.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/ticket","installName":"ticket","page":"https://jbm-ui.bns.studio/c/ticket","registryItem":"https://jbm-ui.bns.studio/r/ticket.json","sourcePath":"registry/jbm/ui/ticket.tsx","files":[{"source":"registry/jbm/ui/ticket.tsx","target":"src/jbm/ui/ticket.tsx","import":"@/jbm/ui/ticket","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/ticket.md","json":"https://jbm-ui.bns.studio/catalog/ticket.json"},"snippet":"import { Ticket } from \"@/jbm/ui/ticket\"\n\n<Ticket header=\"ADMIT ONE · OCT 2026\" stub=\"Tu nombre · Tu comunidad\" tone=\"accent\">\n  <h3>Un lugar para crear.</h3>\n  <p>Trae tu curiosidad.</p>\n</Ticket>","api":[{"export":"Ticket","kind":"component","summary":"A card-stock surface (shared card border, shadow, and radius tokens) with an optional ink or vermilion mono header band, a 24px-padded body for arbitrary children, and an optional stub below a dashed perforation line. Content semantics belong to the caller; div attributes pass through.","props":[{"name":"header","type":"React.ReactNode","required":false,"default":null,"description":"Optional header band content (12px mono, cream text). Omit (null/undefined) to hide the band."},{"name":"stub","type":"React.ReactNode","required":false,"default":null,"description":"Optional footer stub content (12px dim mono) below a dashed line. Omit to hide."},{"name":"tone","type":"\"ink\" | \"accent\"","required":false,"default":"\"ink\"","description":"Header band fill: \"ink\" or the vermilion \"accent\"."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width fills the container; height follows content: header band (14px padding × 2 + one 12px mono line), body (24px padding × 2 + children), and stub (16px padding × 2 + 12px × 1.5 lines), plus the card border. Set style.width for a fixed ticket."},"examples":[{"title":"Admission ticket","code":"import { Ticket } from \"@/jbm/ui/ticket\"\n\n<Ticket header=\"ADMIT ONE · OCT 2026\" stub=\"Tu nombre · Tu comunidad\" tone=\"accent\">\n  <h3>Un lugar para crear.</h3>\n  <p>Trae tu curiosidad.</p>\n</Ticket>"},{"title":"Work order with the same slots","code":"import { Ticket } from \"@/jbm/ui/ticket\"\n\n<Ticket header=\"orden de trabajo\" stub={<>Hecho es:<br />Las pruebas pasan.</>}>\n  <h3>Migrar los pagos</h3>\n  <p>Del cliente anterior al nuevo.</p>\n</Ticket>"}],"qa":["Toggle the Vermilion header control: the band switches between accent and ink while body and stub are unchanged.","Check the rounded corners clip the header band and the dashed perforation spans the full width above the stub.","Remove header or stub and confirm no empty band or dashed line remains.","Check long content on a narrow screen wraps inside the ticket (overflowWrap anywhere) and the surface border and shadow match Card."],"related":[{"name":"tokens","relation":"installs"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"chat-bubble","entry":"component","title":"ChatBubble","description":"Messages with optional speakers and tails, incoming/outgoing alignment, and three palette tones.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/chat-bubble","installName":"chat-bubble","page":"https://jbm-ui.bns.studio/c/chat-bubble","registryItem":"https://jbm-ui.bns.studio/r/chat-bubble.json","sourcePath":"registry/jbm/ui/chat-bubble.tsx","files":[{"source":"registry/jbm/ui/chat-bubble.tsx","target":"src/jbm/ui/chat-bubble.tsx","import":"@/jbm/ui/chat-bubble","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/chat-bubble.md","json":"https://jbm-ui.bns.studio/catalog/chat-bubble.json"},"snippet":"import { ChatBubble } from \"@/jbm/ui/chat-bubble\"\n\n<ChatBubble speaker=\"Tú\" tone=\"ink\">¿Y si lo hacemos más sencillo?</ChatBubble>\n<ChatBubble speaker=\"La idea\" side=\"end\" tone=\"accent\">\n  Una pieza a la vez.\n</ChatBubble>","api":[{"export":"ChatBubble","kind":"component","summary":"One message bubble, sized to its content up to the container width, with an optional mono speaker line and a small tail under the aligned corner. The paper tone is card stock with the shared ink outline (stroke.outline) around body and tail as one line: each side of the tail curves out of the bottom edge through a small fillet and the edge opens where the tail leaves it. Ink and accent bubbles are edged in their own fill, so every tone has the same size. No chat state or typing simulation; callers choose the list or conversation semantics. Div attributes pass through.","props":[{"name":"side","type":"\"start\" | \"end\"","required":false,"default":"\"start\"","description":"\"start\" aligns the bubble and tail to the inline start (incoming); \"end\" to the inline end (outgoing). RTL-aware via logical margins."},{"name":"tone","type":"\"paper\" | \"ink\" | \"accent\"","required":false,"default":"\"paper\"","description":"Fill: \"paper\" (card stock with ink text and an ink outline), \"ink\", or \"accent\" (vermilion); ink and accent use cream text and no ink edge."},{"name":"tail","type":"boolean","required":false,"default":"true","description":"Shows the tail below the bubble: its sides leave the bottom edge 37 and 57px in from the aligned side and meet at a tip 40px in (the outer side leans slightly inward, never back under the corner), 12.5px below the bubble with its outline, which adds 13px bottom margin and a minimum width of 90px, so even a one-word message keeps the tail on the straight run of the bottom edge, clear of both rounded corners. False removes all three."},{"name":"speaker","type":"React.ReactNode","required":false,"default":null,"description":"Optional speaker name above the message, 11px mono. Omit (null/undefined) to hide."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width fits the content up to 100% of the container (at least 90px with a tail); height is 16px top and bottom (13px padding inside the 3px edge) plus message lines at 18px × 1.5, an optional speaker line (11px + 6px gap), and 13px of margin for the tail when shown."},"examples":[{"title":"A short exchange","code":"import { ChatBubble } from \"@/jbm/ui/chat-bubble\"\n\n<ChatBubble speaker=\"Tú\" tone=\"ink\">¿Y si lo hacemos más sencillo?</ChatBubble>\n<ChatBubble speaker=\"La idea\" side=\"end\" tone=\"accent\">\n  Una pieza a la vez.\n</ChatBubble>"}],"qa":["Compare paper, ink, and accent tones on cream: text stays legible, the tail matches the bubble fill, and the paper bubble's ink edge runs around body and tail as one line.","Enlarge the paper bubble's tail at 8×: both sides curve out of the bottom edge without a step, gap, stub, or doubled edge, and no ink hairline crosses the opening.","Check start and end alignment: the tail leaves the bottom edge clear of the rounded corner, mirrored on the end side, and points toward that side. Repeat with a one-word message (\"Sí\") on both sides: the tail still sits on the straight bottom edge, never off a corner.","Turn off the tail and confirm the 13px gap below disappears.","Check a long unbroken message on a narrow screen wraps inside the bubble instead of overflowing."],"related":[{"name":"tokens","relation":"installs"},{"name":"burbuja","relation":"installed-by"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"cajon","entry":"component","title":"Cajon","description":"A fixed-size filing drawer whose complete folders fan front to back, darker with depth.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/folder"],"install":"npx shadcn@latest add @jbm/cajon","installName":"cajon","page":"https://jbm-ui.bns.studio/c/cajon","registryItem":"https://jbm-ui.bns.studio/r/cajon.json","sourcePath":"registry/jbm/motion/cajon.tsx","files":[{"source":"registry/jbm/motion/cajon.tsx","target":"src/jbm/motion/cajon.tsx","import":"@/jbm/motion/cajon","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/cajon.md","json":"https://jbm-ui.bns.studio/catalog/cajon.json"},"snippet":"import { Cajon } from \"@/jbm/motion/cajon\"\n\n<svg viewBox=\"0 -300 500 740\">\n  <Cajon x={40} y={10} open={1} folders={[\n    { name: \"Grove 1983\", sublabel: \"High Output Management\" },\n    { name: \"Mintzberg 1979\", sublabel: \"Structuring of Organizations\" },\n    { name: \"Simon 1947\", sublabel: \"Administrative Behavior\" },\n    { name: \"Training Within Industry 1940s\", sublabel: \"Job Instruction\", reveal: 0.5 },\n    { name: \"Taylor 1911\", sublabel: \"Principles of Scientific Management\" },\n  ]} />\n</svg>","api":[{"export":"Cajon","kind":"component","summary":"SVG <g> of a filing drawer: an interior of flat drawer shades (back wall, floor, and lighter side walls, so an empty drawer reads as an empty box), complete FolderOutline folders stepping up and narrowing toward the back, side walls, and a card front carrying a label holder near its top edge with a separate pull under it (flat rectangles at the shared outline: a cream label card and an ink bar). Each folder's light (k) darkens with depth, its name inks in with reveal, and its front flap can stand ajar. Folders are occluded by the front and by each other, never shortened. Controlled by open and per-folder values; no internal timer. Render inside an <svg>.","props":[{"name":"x","type":"number","required":false,"default":null,"description":"Left edge of the drawer in the parent SVG's user units."},{"name":"y","type":"number","required":false,"default":null,"description":"Top of the drawer's back edge reference in parent SVG units; the front and folders are placed from it."},{"name":"w","type":"number","required":false,"default":null,"description":"Drawer width in parent SVG units. The front folder is w − 52 wide (Folder's body at folderScaleForDrawer(w), so a loose Folder at that scale is the same object) and its height (and the front's) scales with it at 150:205; folders further back are narrower. Above the 420 reference the furniture grows with it: walls, margins, front travel, the front folder's rise, lift clearance, and the front's label holder and pull all scale by w / 420 (narrower drawers keep the reference sizes)."},{"name":"h","type":"number","required":false,"default":null,"description":"Nominal drawer depth, returned by cajonLayout for composites; the drawing does not use it (front height follows w)."},{"name":"folders","type":"readonly DrawerFolder[]","required":true,"default":null,"description":"Folders front to back (index 0 nearest the front, drawn last). Each is a DrawerFolder: name (drawn whole on its tab in Geist 800), accent, pulled, k, open, reveal, sublabel (Geist italic), sublabelReveal. A name wider than its folder's widest tab squeezes at most to 0.94, then ends in an ellipsis; glyphs are never visibly condensed."},{"name":"open","type":"number","required":false,"default":null,"description":"Drawer opening from 0 (closed) to 1 (front slid forward 104 units, folders raised 62 and fanned by depthSpacing; both × w / 420 above 420). Clamped; pulled and ajar folders only rise while open."},{"name":"depthSpacing","type":"number","required":false,"default":null,"description":"Rise from one folder to the next one back, in parent SVG units. Default: tab height + band + a lip of flap, so every tab and a band of back panel stay visible for up to six folders; more folders share the rise of six (five steps), so a crowded drawer packs tighter instead of growing: at 12 folders the stack is as tall as at six, names stay whole, and a sublabel whose band the folder in front covers is not printed. At labelSize 13 that is 46 (55 with sublabels). A smaller value packs folders and may hide names. A larger value is capped: the stack never rises more than the drawer front's height, and above six folders a given value packs like the default."},{"name":"tabLayout","type":"\"stair\" | \"stagger3\"","required":false,"default":null,"description":"\"stair\" (default) puts every tab at its folder's left edge, so tabs climb as back folders narrow; \"stagger3\" cycles tabs left, center, right."},{"name":"labelSize","type":"number","required":false,"default":null,"description":"Name size in parent SVG units (default 13). Tab height is 27/13 of it, the sublabel 0.8 of it. Tab widths come from sansWidth (Geist 800). Perspective does not depend on it: a folder's inset follows its depth in the drawer (its rise over the rise of eight folders), up to a fifth of the width at the back. For video at 1080 use about 24–36."}],"passthrough":["Partial<Box>"]},{"export":"cajonLayout","kind":"function","summary":"The geometry Cajon draws, for composites that attach threads, hands, or labels to folders.","params":[{"name":"x","type":"number","required":false,"default":"0","description":"Left edge of the drawer in the parent SVG's user units."},{"name":"y","type":"number","required":false,"default":"0","description":"Top of the drawer's back edge reference in parent SVG units; the front and folders are placed from it."},{"name":"w","type":"number","required":false,"default":"420","description":"Drawer width in parent SVG units. The front folder is w − 52 wide (Folder's body at folderScaleForDrawer(w), so a loose Folder at that scale is the same object) and its height (and the front's) scales with it at 150:205; folders further back are narrower. Above the 420 reference the furniture grows with it: walls, margins, front travel, the front folder's rise, lift clearance, and the front's label holder and pull all scale by w / 420 (narrower drawers keep the reference sizes)."},{"name":"h","type":"number","required":false,"default":"420","description":"Nominal drawer depth, returned by cajonLayout for composites; the drawing does not use it (front height follows w)."},{"name":"folders","type":"readonly DrawerFolder[]","required":true,"default":null,"description":"Folders front to back (index 0 nearest the front, drawn last). Each is a DrawerFolder: name (drawn whole on its tab in Geist 800), accent, pulled, k, open, reveal, sublabel (Geist italic), sublabelReveal. A name wider than its folder's widest tab squeezes at most to 0.94, then ends in an ellipsis; glyphs are never visibly condensed."},{"name":"open","type":"number","required":false,"default":"1","description":"Drawer opening from 0 (closed) to 1 (front slid forward 104 units, folders raised 62 and fanned by depthSpacing; both × w / 420 above 420). Clamped; pulled and ajar folders only rise while open."},{"name":"depthSpacing","type":"number","required":false,"default":null,"description":"Rise from one folder to the next one back, in parent SVG units. Default: tab height + band + a lip of flap, so every tab and a band of back panel stay visible for up to six folders; more folders share the rise of six (five steps), so a crowded drawer packs tighter instead of growing: at 12 folders the stack is as tall as at six, names stay whole, and a sublabel whose band the folder in front covers is not printed. At labelSize 13 that is 46 (55 with sublabels). A smaller value packs folders and may hide names. A larger value is capped: the stack never rises more than the drawer front's height, and above six folders a given value packs like the default."},{"name":"tabLayout","type":"\"stair\" | \"stagger3\"","required":false,"default":"\"stair\"","description":"\"stair\" (default) puts every tab at its folder's left edge, so tabs climb as back folders narrow; \"stagger3\" cycles tabs left, center, right."},{"name":"labelSize","type":"number","required":false,"default":"13","description":"Name size in parent SVG units (default 13). Tab height is 27/13 of it, the sublabel 0.8 of it. Tab widths come from sansWidth (Geist 800). Perspective does not depend on it: a folder's inset follows its depth in the drawer (its rise over the rise of eight folders), up to a fifth of the width at the back. For video at 1080 use about 24–36."}],"returns":"{ x, y, w, h, front, frontTop, frontHeight, hardware, scale, depthSpacing, labelSize, band, folders, anchors }. frontTop is the drawer front's top edge; hardware is { holder, pull }, the front's label holder (60 × 24, 18 below frontTop) and the pull under it (96 × 14, 14 lower), centred, as Boxes (× scale); scale is max(1, w / 420). Each folder has x, y (top of tab), w, h, tabX, tabWidth, tabHeight, tabSlope, anchor (tab grip point), label { x, y baseline, mid, end, text, scale } (text is the name as drawn, whole or ending in an ellipsis; scale is 1, or down to 0.94 when a barely-long name fits), sublabel { x, y, scale, width, visible } (visible is false whenever anything in front, a nearer folder's tab or top edge or the drawer front, covers any part of the line: a half-open drawer or a crowded one never prints a fragment), rule and flapEdge (whether, and with what ink 0–1, the closed front flap's top edge draws: side to side across the folder, like Folder's front panel, only where a tab height or more of flap shows under it clear of everything in front, fully inked from one and a half; a fan at rest shows none, since its thin lips of flap would read as seams, and a lifting folder gains its edge smoothly), flap (front flap's top edge), opening { drop, lean } (the ajar flap; lean is 0: the flap's top edge drops straight and is never wider than its folder), visible (0–1, how much of the tab shows above the drawer front; 0 inside a closed drawer), and light (effective k). anchors(i, n) returns n points on folder i's tab midline, from just before the name (clear of its first letter, where a knot sits) to the tab's straight edge; once a tab is below the drawer front's top edge the points stop at that rim, so threads never reach through the front. [] for an unknown folder or n < 1."},{"export":"drawerLight","kind":"function","summary":"Folder fill for a light value k, mixed in OKLab from the palette tokens only: k 1 is the card, lower k moves lightness toward ink by 1 − k while the hue warms toward cream; k 0 is ink.","params":[{"name":"k","type":"number","required":true,"default":null,"description":"Light from 0 to 1; clamped, non-finite values give the card."}],"returns":"An sRGB hex color."},{"export":"backLight","kind":"constant","summary":"0.72: the light of the backmost folder when k is not given (the front folder is 1)."},{"export":"drawerInside","kind":"constant","summary":"The open drawer's inside planes as hex fills { back, floor, left, right }, mixed in OKLab from Pencil Rule (the right wall, facing the light) toward Graphite (the back wall, half way), so an empty drawer reads as a box of the palette's rule tones. The side panels outside the walls are card."},{"export":"DrawerFolder","kind":"type","summary":"{ name, accent?, pulled?, k?, open?, reveal?, sublabel?, sublabelReveal? }: one folder. pulled 0–1 lifts it out and brings k to 1; k defaults to a ramp from 1 (front) to 0.72 (back); open 0–1 stands the front flap ajar: its top edge drops a fifth of the folder height, straight down and never wider than the folder, and the folder rises (by that drop plus a lip, at most as far as keeps the tab of the folder behind it in view) so at least half the shaded opening shows above whatever is in front of it (vermilion folders shade toward ink, never a new colour); reveal 0–1 inks the name in grapheme by grapheme (sublabelReveal defaults to it)."},{"export":"CajonProps","kind":"type","summary":"Box (x, y, w, h) plus folders, open, depthSpacing, tabLayout, and labelSize."}],"stage":{"mode":"declared","landscape":{"width":420,"height":382},"vertical":{"width":420,"height":382},"basis":"Parent SVG user units at the defaults w 420, open 1, and one folder: from the back edge at y + 10 to the front's bottom at y + 391 (front at y + 82, plus 32, plus a 277 front height from w). Each further folder rises depthSpacing (46 at labelSize 13, 55 with sublabels) above the one in front, from the front folder's top at y + 52: six or more folders reach y − 178 (y − 222 with sublabels). open 0 ends at y + 287. A lifted folder rises until its bottom is 14 units behind the drawer front's top edge (never floating clear of the drawer), so leave headroom (the gallery uses viewBox 0 −400 500 840)."},"examples":[{"title":"Six sources fanned by age","code":"import { Cajon } from \"@/jbm/motion/cajon\"\n\n<svg viewBox=\"0 -300 500 740\">\n  <Cajon x={40} y={10} open={1} folders={[\n    { name: \"Grove 1983\", sublabel: \"High Output Management\" },\n    { name: \"Mintzberg 1979\", sublabel: \"Structuring of Organizations\" },\n    { name: \"Simon 1947\", sublabel: \"Administrative Behavior\" },\n    { name: \"Training Within Industry 1940s\", sublabel: \"Job Instruction\", reveal: 0.5 },\n    { name: \"Taylor 1911\", sublabel: \"Principles of Scientific Management\" },\n  ]} />\n</svg>"},{"title":"Tie threads to a tab","code":"import { Cajon, cajonLayout } from \"@/jbm/motion/cajon\"\nimport { color } from \"@/jbm/lib/tokens\"\n\nconst props = { x: 40, y: 10, folders: [{ name: \"Procida 2017\" }, { name: \"Taylor 1911\" }] }\nconst ends = cajonLayout(props).anchors(0, 3)\n\n<svg viewBox=\"-200 -200 700 640\">\n  <Cajon {...props} />\n  {ends.map((p, i) => (\n    <path key={i} d={`M-180 ${i * 40}C-60 ${i * 40} ${p.x - 80} ${p.y} ${p.x} ${p.y}`} fill=\"none\" stroke={color.ink} strokeWidth={2} />\n  ))}\n</svg>"},{"title":"Point a hand at a folder tab","code":"import { Cajon, cajonLayout } from \"@/jbm/motion/cajon\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\nconst props = { x: 40, y: 10, open: 1, folders: [{ name: \"datos\", pulled: 0.4 }] }\nconst tab = cajonLayout(props).folders[0].anchor\n<svg viewBox=\"0 -260 500 700\">\n  <Cajon {...props} />\n  <Mano at={tab} pose=\"pinch\" size={120} anchor={{ x: 15, y: 5 }} />\n</svg>"}],"qa":["At index size the closed and open drawer read as a filing-cabinet drawer: a small cream label holder near the front's top edge and a separate ink pull under it, both centred; never one plate with a slot, and nothing floating mid-panel. The walls narrow toward the back and the front stays as tall as the folders it hides.","Drag Open through 0, 0.5, and 1: the front slides forward, folders rise and fan, and no folder shows below the front edge.","Try 0, 1, 3, and 6 folders with and without sublabels: every tab and the band under it stay visible, back folders are narrower and darker, never larger; with none, the inside reads as an empty box (back wall, floor, lighter side walls), not a dark block. At 8 and 12 folders the stair keeps the height of six: folders pack tighter, names stay whole, and sublabels the next folder would strike are not printed.","Sweep Name reveal 0 → 1: tabs start blank and names ink in from the left, one grapheme at a time; the tab never changes width.","Lift a back folder: it rises behind the folders in front and brightens to k 1; its complete outline appears as it clears them, and once a tab of its front flap shows, its flap edge inks in side to side.","With 1, 3, 5, 8, and 12 folders at Open 0, 0.5, and 1 (any Rise), no line crosses any folder body: a fan at rest shows tabs, sublabels, and stacked folder tops only, never a closed flap edge or a seam under the next tab.","Pick any folder in Target and set Flap ajar: the folder rises until its shaded opening shows above the folder (or drawer front) in front of it while the tab of the folder behind stays in view, the flap's top edge drops straight down, never wider than the folder (lifted or not), and the bottom corners stay fixed. On a vermilion folder the opening is a darker vermilion.","Tab names are bold sans (Geist 800), sublabels italic sans. Long names (\"Training Within Industry 1940s\" at Name size 36) widen the tab to the folder, then end in an ellipsis; no name is visibly condensed.","Set Name size to 24 with six folders: back folders narrow exactly as at 13; at w 900 the label holder, pull, walls, and travel grow with the drawer.","Switch Tab layout to stagger3: tabs cycle left, center, right and sublabels stay inside the folder.","The Mano anchor in the hand example is an estimate of the pinch fingertip; verify it visually for your pose."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"folder","relation":"installs"},{"name":"escritorio","relation":"installed-by"},{"name":"file-cabinet","relation":"installed-by"},{"name":"mano","relation":"example-import"}],"family":"Folders & drawers","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"file-cabinet","entry":"component","title":"FileCabinet","description":"SVG cabinet enclosure around a controlled filing drawer whose folders slide out and lift.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/cajon","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/file-cabinet","installName":"file-cabinet","page":"https://jbm-ui.bns.studio/c/file-cabinet","registryItem":"https://jbm-ui.bns.studio/r/file-cabinet.json","sourcePath":"registry/jbm/ui/file-cabinet.tsx","files":[{"source":"registry/jbm/ui/file-cabinet.tsx","target":"src/jbm/ui/file-cabinet.tsx","import":"@/jbm/ui/file-cabinet","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/file-cabinet.md","json":"https://jbm-ui.bns.studio/catalog/file-cabinet.json"},"snippet":"import { FileCabinet } from \"@/jbm/ui/file-cabinet\"\n\n<svg viewBox=\"0 -260 500 650\">\n  <FileCabinet x={80} folders={[{ name: \"datos\" }]} open={1} />\n</svg>","api":[{"export":"FileCabinet","kind":"component","summary":"An SVG <g> for use inside your own <svg>: a fixed card enclosure with a chamfered top, and a Cajon drawer inset 10px at the sides and 32px from the top. `open` and per-folder `pulled` are controlled 0–1; the enclosure never moves or resizes.","props":[{"name":"x","type":"number","required":false,"default":null,"description":"Left edge of the enclosure in the parent SVG's units."},{"name":"y","type":"number","required":false,"default":null,"description":"Top edge of the enclosure."},{"name":"w","type":"number","required":false,"default":null,"description":"Enclosure width; the drawer is w − 20."},{"name":"h","type":"number","required":false,"default":null,"description":"Enclosure height; the drawer is h − 44."},{"name":"folders","type":"readonly DrawerFolder[]","required":true,"default":null,"description":"Folders in the drawer, index 0 nearest the front. Each is a Cajon DrawerFolder: `name` (tab label, drawn whole; long names compress), optional `accent` fill, `pulled` 0–1 lift, light `k`, flap `open`, name `reveal`, and `sublabel`. Count never changes the drawer size; the folders pack within the same 48-unit rise."},{"name":"open","type":"number","required":false,"default":null,"description":"Drawer opening from 0 (closed) to 1 (open). Clamped."},{"name":"depthSpacing","type":"number","required":false,"default":null,"description":"Rise between folders. Defaults to the packed 48 / max(5, n − 1), so the drawer stays under the enclosure top; pass a larger value to fan the tabs (they then rise above the cabinet)."},{"name":"tabLayout","type":"\"stair\" | \"stagger3\"","required":false,"default":null,"description":"Tab placement; defaults to \"stagger3\" (left, center, right) in a cabinet so packed tabs stay readable. \"stair\" puts every tab at the left edge."},{"name":"labelSize","type":"number","required":false,"default":null,"description":"Tab name size in SVG units (default 13)."}],"passthrough":["Partial<Box>"]},{"export":"FileCabinetBody","kind":"component","summary":"The enclosure alone, so composites (such as Escritorio) can draw foreground furniture between it and the moving drawer.","props":[{"name":"x","type":"number","required":true,"default":null,"description":"Left edge in the parent SVG's units."},{"name":"y","type":"number","required":true,"default":null,"description":"Top edge."},{"name":"w","type":"number","required":true,"default":null,"description":"Width."},{"name":"h","type":"number","required":true,"default":null,"description":"Height."}],"passthrough":[]},{"export":"fileCabinetLayout","kind":"function","summary":"Computes the enclosure box and the drawer props FileCabinet renders, for composites that draw the parts separately.","params":[{"name":"x","type":"number","required":false,"default":"0","description":"Left edge of the enclosure."},{"name":"y","type":"number","required":false,"default":"0","description":"Top edge of the enclosure."},{"name":"w","type":"number","required":false,"default":"300","description":"Enclosure width."},{"name":"h","type":"number","required":false,"default":"360","description":"Enclosure height."},{"name":"folders","type":"readonly DrawerFolder[]","required":true,"default":null,"description":"Drawer folders, passed through to the drawer."},{"name":"open","type":"number","required":false,"default":null,"description":"Drawer opening 0–1, passed through to the drawer."},{"name":"depthSpacing","type":"number","required":false,"default":null,"description":"Rise, in parent SVG units, from one folder to the next one back. Defaults to tab height plus a band of back panel (the tab and band stay visible up to six folders; more folders pack into the same rise, so the stack never grows past six folders' height)."},{"name":"tabLayout","type":"\"stair\" | \"stagger3\"","required":false,"default":null,"description":"stair: every tab at its folder's left edge, so the tabs climb as folders narrow toward the back. stagger3: tabs cycle left, center, right."},{"name":"labelSize","type":"number","required":false,"default":null,"description":"Tab name size in parent SVG units; the tab height and sublabel size follow it."}],"returns":"`{ body: Box, drawer: CajonProps }`: the enclosure box and the inset drawer props (x + 10, y + 32, w − 20, h − 44)."}],"stage":{"mode":"declared","landscape":{"width":300,"height":360},"vertical":{"width":300,"height":360},"basis":"Default w 300 by h 360 in the parent SVG's units, placed at x, y. The drawer stays inside the enclosure at every opening, but lifted folders rise above the top by up to about their height plus 24 (roughly 190 units at the default width), so the parent viewBox needs headroom: the gallery uses \"0 -260 500 700\"."},"examples":[{"title":"Open cabinet with one folder","code":"import { FileCabinet } from \"@/jbm/ui/file-cabinet\"\n\n<svg viewBox=\"0 -260 500 650\">\n  <FileCabinet x={80} folders={[{ name: \"datos\" }]} open={1} />\n</svg>"},{"title":"Lift the front folder","code":"import { FileCabinet } from \"@/jbm/ui/file-cabinet\"\n\n<svg viewBox=\"0 -260 500 700\">\n  <FileCabinet x={85} y={-20} w={330} h={350} open={0.8}\n    folders={[{ name: \"análisis\", accent: true, pulled: 0.6 }, { name: \"diseño\" }]} />\n</svg>"}],"qa":["Drag Open through 0, 0.5, and 1: the enclosure never moves or resizes and only the drawer travels toward the viewer.","Try folder counts 0, 1, 3, 6, and 12: the drawer size is unchanged and extra folders pack toward the back.","Drag Lift front folder to 1: the folder body is complete behind the drawer front, keeps its size, and stays within the viewBox headroom.","Check the preview at narrow widths; the SVG scales with its viewBox."],"related":[{"name":"tokens","relation":"installs"},{"name":"cajon","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"escritorio","relation":"installed-by"}],"family":"Folders & drawers","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"score-scale","entry":"component","title":"ScoreScale","description":"A read-only score meter with endpoint labels and a controlled marker.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/score-scale","installName":"score-scale","page":"https://jbm-ui.bns.studio/c/score-scale","registryItem":"https://jbm-ui.bns.studio/r/score-scale.json","sourcePath":"registry/jbm/ui/score-scale.tsx","files":[{"source":"registry/jbm/ui/score-scale.tsx","target":"src/jbm/ui/score-scale.tsx","import":"@/jbm/ui/score-scale","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/score-scale.md","json":"https://jbm-ui.bns.studio/catalog/score-scale.json"},"snippet":"import { ScoreScale } from \"@/jbm/ui/score-scale\"\n\n<ScoreScale label=\"Claridad\" value={6} min={0} max={10}\n  labels={[\"Por explorar\", \"Lista para compartir\"]}\n  formatValue={(v) => `${v} / 10`} />\n// Read-only meter; clamps values to the range.","api":[{"export":"ScoreScale","kind":"component","summary":"Read-only meter (role meter, not an input): a label and formatted value above a track with five evenly spaced ticks and a vermilion marker, with endpoint captions below. The marker position is (value − min) / (max − min); the caller controls value. Throws RangeError for non-finite numbers or max ≤ min.","props":[{"name":"value","type":"number","required":true,"default":null,"description":"Score to display. Finite values are clamped to min…max before positioning and formatting."},{"name":"min","type":"number","required":false,"default":"0","description":"Low end of the scale; the left endpoint caption when labels is omitted."},{"name":"max","type":"number","required":false,"default":"10","description":"High end of the scale; must be greater than min. The right endpoint caption when labels is omitted."},{"name":"label","type":"string","required":true,"default":null,"description":"Visible heading and the meter's accessible name."},{"name":"labels","type":"[string, string]","required":false,"default":null,"description":"Endpoint captions [low, high] shown under the track instead of min and max."},{"name":"formatValue","type":"(value: number) => string","required":false,"default":"String","description":"Formats the clamped value for the accent readout and aria-valuetext, e.g. (v) => `${v} / 10`."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width fills its container (minWidth 0); the track spans it less 12px padding per side. Height is about 95 stage pixels at one line each: heading row, 22px gap, 24px track, 10px gap, 12px mono captions. Long label, value, or endpoint captions wrap and add lines."},"examples":[{"title":"Score out of ten with named endpoints","code":"import { ScoreScale } from \"@/jbm/ui/score-scale\"\n\n<ScoreScale label=\"Claridad\" value={6} min={0} max={10}\n  labels={[\"Por explorar\", \"Lista para compartir\"]}\n  formatValue={(v) => `${v} / 10`} />\n// Read-only meter; clamps values to the range."}],"qa":["Drag the score control through min, the middle, and max: the marker sits on the first, center, and last ticks and never leaves the track.","Pass a value outside the range: the marker and readout show the clamped value.","Check long labels and endpoint captions wrap without overlapping at narrow widths.","Screen readers announce a meter with aria-valuetext from formatValue; it is not focusable or draggable itself."],"related":[{"name":"tokens","relation":"installs"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"comparison-bars","entry":"component","title":"ComparisonBars","description":"Readable comparison rows on a shared zero-based scale, with optional emphasis.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/comparison-bars","installName":"comparison-bars","page":"https://jbm-ui.bns.studio/c/comparison-bars","registryItem":"https://jbm-ui.bns.studio/r/comparison-bars.json","sourcePath":"registry/jbm/ui/comparison-bars.tsx","files":[{"source":"registry/jbm/ui/comparison-bars.tsx","target":"src/jbm/ui/comparison-bars.tsx","import":"@/jbm/ui/comparison-bars","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/comparison-bars.md","json":"https://jbm-ui.bns.studio/catalog/comparison-bars.json"},"snippet":"import { ComparisonBars } from \"@/jbm/ui/comparison-bars\"\n\n<ComparisonBars max={100} formatValue={(v) => `${v} lecturas`} items={[\n  { label: \"Contexto\", value: 42 },\n  { label: \"Una buena pregunta\", value: 68 },\n  { label: \"Una idea clara\", value: 90, highlight: true },\n]} />\n// Values must be nonnegative; max must cover all values.","api":[{"export":"ComparisonBars","kind":"component","summary":"Description list of rows: label and formatted value on one line, then a 14px bar whose fill is value / max of the full width. Highlighted rows use vermilion for the value and fill; others use dim text and an ink fill. Bars are aria-hidden, so the text carries the data. Throws RangeError for negative or non-finite values, or a max that is not positive or below any value.","props":[{"name":"items","type":"{ label: string; value: number; highlight?: boolean }[]","required":true,"default":null,"description":"Rows in display order: label, a finite nonnegative value, and optional highlight to mark the one emphasized row."},{"name":"max","type":"number","required":false,"default":null,"description":"Shared scale ceiling. Defaults to the largest value (at least 1); set it to compare against a fixed range such as 100."},{"name":"formatValue","type":"(value: number) => string","required":false,"default":"String","description":"Formats each value for its readout, e.g. (v) => `${v}%`."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width fills its container; bars span the full row width. Each row is about 40 stage pixels (15px label line, 4px row gap, 4px margin, 14px bar), with 20px between rows, so height grows with items. Long labels or values wrap and add lines."},"examples":[{"title":"Three rows on a 0–100 scale","code":"import { ComparisonBars } from \"@/jbm/ui/comparison-bars\"\n\n<ComparisonBars max={100} formatValue={(v) => `${v} lecturas`} items={[\n  { label: \"Contexto\", value: 42 },\n  { label: \"Una buena pregunta\", value: 68 },\n  { label: \"Una idea clara\", value: 90, highlight: true },\n]} />\n// Values must be nonnegative; max must cover all values."}],"qa":["Check fills are proportional to value / max, a zero value shows an empty track, and a value equal to max fills the row.","Only the highlighted row uses vermilion; keep a single highlight per figure.","At narrow widths long labels wrap above their values and bars stay full width.","Read without the bars (they are aria-hidden): each dt/dd pair still states the label and value."],"related":[{"name":"tokens","relation":"installs"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"clock","entry":"component","title":"Clock","description":"A deterministic analog clock and time label. Supply time explicitly for web or video.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/clock","installName":"clock","page":"https://jbm-ui.bns.studio/c/clock","registryItem":"https://jbm-ui.bns.studio/r/clock.json","sourcePath":"registry/jbm/ui/clock.tsx","files":[{"source":"registry/jbm/ui/clock.tsx","target":"src/jbm/ui/clock.tsx","import":"@/jbm/ui/clock","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/clock.md","json":"https://jbm-ui.bns.studio/catalog/clock.json"},"snippet":"import { Clock } from \"@/jbm/ui/clock\"\n\n<Clock hours={8} minutes={30} size={64} />\n// Explicit time keeps rendering deterministic. No autoplay.","api":[{"export":"Clock","kind":"component","summary":"Analog face (dim ring, four quarter ticks, ink hour hand, vermilion minute hand) beside a mono HH:MM label. No timers: the time is (hours × 60 + minutes) wrapped to 24 hours, the hour hand moves continuously with the minutes, and the face is aria-hidden so the label carries the time. Throws RangeError for non-finite values or size ≤ 0.","props":[{"name":"hours","type":"number","required":true,"default":null,"description":"Hours on a 24-hour day; fractions and values outside 0–23 wrap."},{"name":"minutes","type":"number","required":false,"default":"0","description":"Minutes added to hours; may exceed 59 (e.g. hours 0, minutes 510 is 08:30) and wraps across days."},{"name":"size","type":"number","required":false,"default":"64","description":"Width and height of the clock face in stage pixels."},{"name":"label","type":"string","required":false,"default":null,"description":"Text shown instead of the zero-padded 24-hour HH:MM derived from the time."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"declared","landscape":{"width":"auto","height":64},"vertical":{"width":"auto","height":64},"basis":"Inline-flex row: a size × size face (64 by default), a 16px gap, and the label in 22px mono. Height equals size while it exceeds the text line; width follows the label. The row wraps when its container is narrower, putting the label below the face."},"examples":[{"title":"Half past eight","code":"import { Clock } from \"@/jbm/ui/clock\"\n\n<Clock hours={8} minutes={30} size={64} />\n// Explicit time keeps rendering deterministic. No autoplay."},{"title":"Drive it from minutes of the day","code":"import { Clock } from \"@/jbm/ui/clock\"\n\nconst minutes = 510 // e.g. from a slider or a video frame\n<Clock hours={0} minutes={minutes} size={96} label=\"Mañana\" />"}],"qa":["Sweep the time control from 00:00 to 23:59: the minute hand completes each hour, the hour hand advances smoothly, and the label matches.","Check 12:00 and 00:00 both point straight up and 06:00 straight down.","At a narrow width the label wraps below the face without clipping."],"related":[{"name":"tokens","relation":"installs"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"scene-geometry","entry":"component","title":"SceneGeometry","description":"Shared points, bounds, arc-length path interpolation and travel tilt.","category":"Foundations","capabilities":[],"needsRemotion":false,"registryDependencies":[],"install":"npx shadcn@latest add @jbm/scene-geometry","installName":"scene-geometry","page":"https://jbm-ui.bns.studio/c/scene-geometry","registryItem":"https://jbm-ui.bns.studio/r/scene-geometry.json","sourcePath":"registry/jbm/lib/geometry.ts","files":[{"source":"registry/jbm/lib/geometry.ts","target":"src/jbm/lib/geometry.ts","import":"@/jbm/lib/geometry","type":"registry:lib"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/scene-geometry.md","json":"https://jbm-ui.bns.studio/catalog/scene-geometry.json"},"snippet":"import { pointOn, pathTilt } from \"@/jbm/lib/geometry\"\n\nconst path = [{ x: 40, y: 170 }, { x: 220, y: 50 }, { x: 460, y: 130 }]\nconst at = pointOn(path, 0.5)\nconst angle = pathTilt(path, 0.5)\n<g transform={`translate(${at.x} ${at.y}) rotate(${angle})`} />","api":[{"export":"unit","kind":"function","summary":"Clamps a progress value to 0–1, treating non-finite input as 0.","params":[{"name":"value","type":"number","required":true,"default":null,"description":"Any number, usually a progress value."}],"returns":"The value clamped to 0–1, or 0 when it is NaN or infinite."},{"export":"pointOn","kind":"function","summary":"Point at a fraction of a polyline's total length (arc-length, not per segment). Repeated points and a one-point path are valid; an empty path throws.","params":[{"name":"path","type":"readonly Pt[]","required":true,"default":null,"description":"Polyline points in the caller's coordinate space; at least one."},{"name":"progress","type":"number","required":true,"default":null,"description":"0–1 fraction of the total length; clamped with unit."}],"returns":"A new { x, y } on the path; the last point at 1 or when the path has no length."},{"export":"pathTilt","kind":"function","summary":"Restrained travel tilt from the direction of travel around a progress point (sampled ±0.01), measured against horizontal regardless of left/right direction.","params":[{"name":"path","type":"readonly Pt[]","required":true,"default":null,"description":"Polyline points, as for pointOn."},{"name":"progress","type":"number","required":true,"default":null,"description":"0–1 fraction of the total length."}],"returns":"Degrees clamped to −18…18; positive when the path descends on screen (y grows)."},{"export":"Pt","kind":"type","summary":"A point { x, y } in scene (SVG user) units."},{"export":"Box","kind":"type","summary":"A Pt plus w and h: the top-left corner and size of a rectangle."}],"stage":{"mode":"n/a","reason":"Geometry helpers only; nothing renders. The gallery draws an example path to illustrate the points."},"examples":[{"title":"Place and tilt an object along a path","code":"import { pointOn, pathTilt } from \"@/jbm/lib/geometry\"\n\nconst path = [{ x: 40, y: 170 }, { x: 220, y: 50 }, { x: 460, y: 130 }]\nconst at = pointOn(path, 0.5)\nconst angle = pathTilt(path, 0.5)\n<g transform={`translate(${at.x} ${at.y}) rotate(${angle})`} />"}],"qa":["pointOn at 0, 0.5, and 1 returns the first point, the arc-length midpoint, and the last point; out-of-range progress clamps.","A path with repeated points or a single point never returns NaN.","pathTilt stays within ±18° on steep segments; objects moving right-to-left tilt the same way as left-to-right on the same slope."],"related":[{"name":"cajon","relation":"installed-by"},{"name":"mano","relation":"installed-by"},{"name":"pluma","relation":"installed-by"},{"name":"bandeja","relation":"installed-by"},{"name":"escritorio","relation":"installed-by"},{"name":"desk-top","relation":"installed-by"},{"name":"ejes","relation":"installed-by"},{"name":"desk-prop","relation":"installed-by"},{"name":"file-cabinet","relation":"installed-by"},{"name":"video-print","relation":"installed-by"},{"name":"hilo","relation":"installed-by"},{"name":"paper-line","relation":"installed-by"},{"name":"register","relation":"installed-by"},{"name":"slip","relation":"installed-by"},{"name":"stamp","relation":"installed-by"},{"name":"frontmatter","relation":"installed-by"},{"name":"folder-contents","relation":"installed-by"},{"name":"folder-carry","relation":"installed-by"}]},{"name":"folder-contents","entry":"component","title":"FolderContents","description":"Folder that opens to reveal a sheet and a fan of nested folders whose documents extract independently.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/folder"],"install":"npx shadcn@latest add @jbm/folder-contents","installName":"folder-contents","page":"https://jbm-ui.bns.studio/c/folder-contents","registryItem":"https://jbm-ui.bns.studio/r/folder-contents.json","sourcePath":"registry/jbm/ui/folder-contents.tsx","files":[{"source":"registry/jbm/ui/folder-contents.tsx","target":"src/jbm/ui/folder-contents.tsx","import":"@/jbm/ui/folder-contents","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/folder-contents.md","json":"https://jbm-ui.bns.studio/catalog/folder-contents.json"},"snippet":"import { FolderContents } from \"@/jbm/ui/folder-contents\"\n\n<FolderContents\n  label=\"proyecto\"\n  open={1}\n  sheet=\"README.md\"\n  entries={[\n    { id: \"scripts\", label: \"scripts/\" },\n    { id: \"assets\", label: \"assets/\", document: \"notas.md\", documentReveal: 1 },\n  ]}\n  width={320}\n  style={{ overflow: \"visible\" }}\n/>","api":[{"export":"FolderContents","kind":"component","summary":"Fills Folder's children slot with a front sheet and nested folders, each with an optional document. Every part is a rigid object that translates into view; nothing stretches. Pure React: `open`, per-entry `reveal` and `documentReveal`, and `lift` are independent 0–1 controls with no internal timer. Other SVG props pass through to the Folder svg.","props":[{"name":"label","type":"string","required":false,"default":null,"description":"Mono label for the outer folder; also names the image for assistive technology. On the front panel (accent and ink) it follows Folder's fitLine rule (compressed to 0.8, then an ellipsis); on the tab (card tone default, or labelOn \"tab\") it is a Geist 800 tab name drawn whole."},{"name":"tone","type":"FolderTone","required":false,"default":null,"description":"Outer folder fill: vermilion accent, ink, or plain cream card."},{"name":"open","type":"number","required":false,"default":null,"description":"Outer folder opening from 0 (closed, contents hidden) to 1 (contents shown). Clamped. Defaults to 1 here, unlike Folder's 0; every reveal is multiplied by it."},{"name":"sublabel","type":"string","required":false,"default":null,"description":"Short line printed on the front panel: under the label, or near the panel top when the label is on the tab."},{"name":"labelOn","type":"\"front\" | \"tab\"","required":false,"default":null,"description":"Where the label prints while the folder is closed. Defaults to the tab for the card tone, the front panel otherwise. Once open is above 0 the sheet stands in front of the tab, so the label prints on the front panel."},{"name":"entries","type":"FolderEntry[]","required":false,"default":"[]","description":"Nested folders, back to front. Their tabs pack between y 24 and 72 of the folder space, so more entries overlap more tightly instead of growing the folder. Empty by default."},{"name":"sheet","type":"string","required":false,"default":"\"README.md\"","description":"Label printed on the front sheet (first 15 characters). An empty string removes the sheet."},{"name":"lift","type":"number","required":false,"default":"0","description":"Raises all contents together by up to 240 folder units (0–1), clipped at the folder's top, for handing the whole group out."}],"passthrough":["Omit<ComponentProps<typeof Folder>, \"children\">"]},{"export":"FolderEntry","kind":"type","summary":"One nested folder: `id` (React key), `label` (truncated after 15 characters), `reveal` 0–1 (default 1; rises from the folder bottom), optional `document` label (12 characters shown), and `documentReveal` 0–1 (default 0; lifts the document 45 units out of its folder)."}],"stage":{"mode":"declared","landscape":{"width":260,"height":220},"vertical":{"width":260,"height":220},"basis":"Renders Folder's fixed 260×220 viewBox at 260×220 stage pixels; entry count, reveals, and lift never change the box. Pass width (or style.width) to scale with height auto, and it shrinks to maxWidth 100%. The gallery uses width={320} with overflow visible so the opened sheet above the viewBox stays visible."},"examples":[{"title":"Open project folder with one extracted document","code":"import { FolderContents } from \"@/jbm/ui/folder-contents\"\n\n<FolderContents\n  label=\"proyecto\"\n  open={1}\n  sheet=\"README.md\"\n  entries={[\n    { id: \"scripts\", label: \"scripts/\" },\n    { id: \"assets\", label: \"assets/\", document: \"notas.md\", documentReveal: 1 },\n  ]}\n  width={320}\n  style={{ overflow: \"visible\" }}\n/>"}],"qa":["Drag Open folder through 0, 0.5, and 1: the sheet and nested folders slide up as rigid shapes and never cut through the front panel.","Drag Extract documents and Lift contents independently; each moves only its own objects.","Set Nested folders to 0 and 8: zero entries with an empty sheet reads as an empty folder; eight entries pack tighter without resizing the folder.","Toggle Reveal nested folders: hidden folders sit fully below the rim with complete outlines, clipped only at the container bottom.","Uncertain: at open 1 the sheet and front folders extend above the 220-unit viewBox, so they rely on overflow visible; check clipping when overflow is left hidden."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"folder","relation":"installs"}],"family":"Folders & drawers","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"folder-carry","entry":"component","title":"FolderCarry","description":"Folder carried along a path by its tab, interpolating size and label between two resting places.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/folder"],"install":"npx shadcn@latest add @jbm/folder-carry","installName":"folder-carry","page":"https://jbm-ui.bns.studio/c/folder-carry","registryItem":"https://jbm-ui.bns.studio/r/folder-carry.json","sourcePath":"registry/jbm/ui/folder-carry.tsx","files":[{"source":"registry/jbm/ui/folder-carry.tsx","target":"src/jbm/ui/folder-carry.tsx","import":"@/jbm/ui/folder-carry","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/folder-carry.md","json":"https://jbm-ui.bns.studio/catalog/folder-carry.json"},"snippet":"import { FolderCarry, folderGrip, tableFolderGeometry } from \"@/jbm/ui/folder-carry\"\n\n// Both resting places stand on the floor at y 248: a folder frame is 205/260 of its width tall.\nconst onFloor = (x: number, width: number) => tableFolderGeometry({ x, y: 248 - (205 * width) / 260 }, width)\nconst from = onFloor(50, 100)\nconst to = onFloor(230, 190)\nconst path = [folderGrip(from), { x: 175, y: 80 }, folderGrip(to)]\n\n<svg viewBox=\"0 0 450 270\" width=\"100%\">\n  <FolderCarry from={from} to={to} path={path} progress={0.5} label=\"proyecto\" />\n</svg>","api":[{"export":"FolderCarry","kind":"component","summary":"SVG group (render inside an <svg>) drawing the shared folder silhouette at `carriedFolderGeometry(from, to, path, progress)`, with a fold line and its name printed in one place for the whole carry: the tab on light fills, the front panel on vermilion and ink. Pure React with no timer: drive `progress` from a slider or video timeline, and place a hand at `pointOn(path, progress)`.","props":[{"name":"from","type":"FolderGeometry","required":true,"default":null,"description":"Resting geometry at progress 0, in the parent SVG's units (see tableFolderGeometry)."},{"name":"to","type":"FolderGeometry","required":true,"default":null,"description":"Resting geometry at progress 1; may be a different scale or a drawer's own geometry."},{"name":"path","type":"readonly Pt[]","required":true,"default":null,"description":"Grip points in the parent SVG's units; start at folderGrip(from) and end at folderGrip(to) so the endpoints do not jump."},{"name":"progress","type":"number","required":true,"default":null,"description":"Carry progress from 0 (at `from`) to 1 (at `to`), by arc length along `path`. Clamped."},{"name":"label","type":"string","required":false,"default":null,"description":"Folder name; also labels the group as \"Carrying …\" for assistive technology. Printed once, fully opaque, where `labelOn` says. On the tab it follows Cajon's rule: drawn whole in Geist 800, compressed when the tab is short, never cut. On the front panel it follows Folder's fitLine rule."},{"name":"fill","type":"string","required":false,"default":"color.accent","description":"Folder fill passed to FolderOutline: a palette token such as color.accent (default, vermilion), color.ink, or color.card, or a drawer shade from drawerLight(k) for a folder lifted out of a Cajon."},{"name":"labelOn","type":"\"tab\" | \"front\"","required":false,"default":"lightFill(fill) ? \"tab\" : \"front\"","description":"\"tab\" or \"front\": where the name prints for the whole carry, never both. Defaults to Folder's rule: \"tab\" on light fills (OKLab lightness above 0.6: the card and every drawerLight shade, as in a Cajon), \"front\" on vermilion and ink, where the name stays clear of the hand holding the tab. On the tab a pinch at folderGrip (folderCarryHand) covers part of the name while carrying; pass \"front\" when a hand holds the tab or the name must read in transit, and render the resting Folder with the same placement."},{"name":"labelColor","type":"string","required":false,"default":"nameInkOn(fill)","description":"Label color. Defaults to Cajon's rule for any fill: color.ink or color.card, whichever has the higher WCAG contrast with it; every palette fill and drawer shade clears 4.5:1 (card on vermilion 5.0:1)."},{"name":"labelSize","type":"number","required":false,"default":null,"description":"Tab name size in the parent SVG's units. Defaults to 13/27 of the tab height, Cajon's ratio, so a folder carried out of a drawer keeps the drawer's tab type at the handoff."}],"passthrough":[]},{"export":"carriedFolderGeometry","kind":"function","summary":"Geometry of the carried folder: its grip sits on `pointOn(path, progress)` while width, height, tab size, and tab offset interpolate linearly from `from` to `to`.","params":[{"name":"from","type":"FolderGeometry","required":true,"default":null,"description":"Geometry at progress 0."},{"name":"to","type":"FolderGeometry","required":true,"default":null,"description":"Geometry at progress 1."},{"name":"path","type":"readonly Pt[]","required":true,"default":null,"description":"Grip path in SVG units; must have at least one point."},{"name":"progress","type":"number","required":true,"default":null,"description":"0–1 carry progress; clamped."}],"returns":"A FolderGeometry to pass to FolderOutline or to position a hand."},{"export":"folderGrip","kind":"function","summary":"Where a hand holds a folder: the tab's horizontal center, 10/27 of the tab height below the top.","params":[{"name":"g","type":"FolderGeometry","required":true,"default":null,"description":"Folder geometry."}],"returns":"The grip point in the same units as `g`."},{"export":"folderCarryHand","kind":"constant","summary":"Mano props that hold the folder by its tab from above: `{ pose: \"pinch\", angle: 155, anchor: { x: 6.4, y: 12.1 } }`. The pinch turns so the wrist is up and left and the pocket between index and thumb sits on the grip point: the tab's top edge runs through the pinch and its stepped silhouette stays in view. Spread it into a Mano at pointOn(path, progress); add up to ±15° to angle for a tilt that still reads as a pinch (further round, the hand reads as pointing)."},{"export":"tableFolderGeometry","kind":"function","summary":"Geometry of a Folder-sized silhouette resting at `at`, scaled from Folder's 260-unit frame (body 205×150 at offset 25,55; tab 83 wide, 27 tall, 17 slope).","params":[{"name":"at","type":"Pt","required":true,"default":null,"description":"Top-left of the 260-unit folder frame, in SVG units."},{"name":"width","type":"number","required":true,"default":null,"description":"Frame width in SVG units; 260 matches a standalone Folder."}],"returns":"A FolderGeometry for `from` or `to`."},{"export":"FolderGeometry","kind":"type","summary":"Folder silhouette box: `x`, `y` (top of the tab), `w`, `h`, `tabX`, `tabWidth`, and optional `tabHeight` (27), `tabSlope` (17), and `flap` (absolute y of the front flap's top edge; defaults to 40/27 of the tab height below `y`), all in SVG units. A cajonLayout() folder is a FolderGeometry, flap included, so the fold line matches the drawer's."}],"stage":{"mode":"fluid","reason":"Draws in the parent SVG's coordinate space with no box of its own; its extent is set by `from`, `to`, and `path`. The gallery demo uses a 450×270 viewBox at 100% width with folders 100 and 190 units wide standing on a floor line at y 248."},"examples":[{"title":"Carry a folder from a small to a large resting place","code":"import { FolderCarry, folderGrip, tableFolderGeometry } from \"@/jbm/ui/folder-carry\"\n\n// Both resting places stand on the floor at y 248: a folder frame is 205/260 of its width tall.\nconst onFloor = (x: number, width: number) => tableFolderGeometry({ x, y: 248 - (205 * width) / 260 }, width)\nconst from = onFloor(50, 100)\nconst to = onFloor(230, 190)\nconst path = [folderGrip(from), { x: 175, y: 80 }, folderGrip(to)]\n\n<svg viewBox=\"0 0 450 270\" width=\"100%\">\n  <FolderCarry from={from} to={to} path={path} progress={0.5} label=\"proyecto\" />\n</svg>"},{"title":"Carry a plain cream folder","code":"import { FolderCarry, folderGrip, tableFolderGeometry } from \"@/jbm/ui/folder-carry\"\nimport { color } from \"@/jbm/lib/tokens\"\n\nconst onFloor = (x: number, width: number) => tableFolderGeometry({ x, y: 248 - (205 * width) / 260 }, width)\nconst from = onFloor(50, 100)\nconst to = onFloor(230, 190)\nconst path = [folderGrip(from), { x: 175, y: 80 }, folderGrip(to)]\n\n<svg viewBox=\"0 0 450 270\" width=\"100%\">\n  <FolderCarry from={from} to={to} path={path} progress={0.5} label=\"Doorways\" fill={color.card} />\n</svg>"},{"title":"Hold the tab with a hand","code":"import { FolderCarry, folderCarryHand, folderGrip, tableFolderGeometry } from \"@/jbm/ui/folder-carry\"\nimport { pointOn } from \"@/jbm/lib/geometry\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\nconst onFloor = (x: number, width: number) => tableFolderGeometry({ x, y: 248 - (205 * width) / 260 }, width)\nconst from = onFloor(50, 100)\nconst to = onFloor(230, 190)\nconst path = [folderGrip(from), { x: 175, y: 80 }, folderGrip(to)]\nconst progress = 0.4\n\n<svg viewBox=\"0 0 450 270\" width=\"100%\">\n  <FolderCarry from={from} to={to} path={path} progress={progress} label=\"proyecto\" labelOn=\"front\" />\n  <Mano at={pointOn(path, progress)} size={70} {...folderCarryHand} />\n</svg>"}],"qa":["Set Folder fill to card and ink: the carried folder keeps that fill at every progress, with an ink label on card and a card label on ink and vermilion; vermilion appears only with the accent fill.","Drag Carry progress to 0, 0.5, and 1 for each fill: the folder matches its resting geometry exactly at both ends (standing on the floor line, inside the stage), and the name prints once, fully opaque (never faded or pale). The bench holds the tab with a hand, so it prints the name on the front for every fill (labelOn front); without a hand, card and drawer fills default to the tab.","Toggle Show hand and sweep progress: the pinch holds the tab from above, the tab's top edge runs through it, and the tab's stepped silhouette stays visible (the folder never reads as a plain box); sweep Hand tilt from −15° to 15°: the contact point does not drift and the hand never reads as pointing.","Check the scale change reads as smooth growth with no jump in tab shape at the endpoints.","Carry a folder out of a Cajon with fill drawerLight(0.8) and the drawer's folder as `from`: at progress 0 the tab name is ink, whole, the same size as the drawer's names, and the fold line sits on the drawer's flap line.","Check narrow screens: the demo SVG scales to 100% width without clipping either resting place."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"folder","relation":"installs"},{"name":"mano","relation":"example-import"}],"family":"Folders & drawers","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"bandeja","entry":"component","title":"Bandeja","description":"A shallow paper tray with optional sheets.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/bandeja","installName":"bandeja","page":"https://jbm-ui.bns.studio/c/bandeja","registryItem":"https://jbm-ui.bns.studio/r/bandeja.json","sourcePath":"registry/jbm/motion/bandeja.tsx","files":[{"source":"registry/jbm/motion/bandeja.tsx","target":"src/jbm/motion/bandeja.tsx","import":"@/jbm/motion/bandeja","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/bandeja.md","json":"https://jbm-ui.bns.studio/catalog/bandeja.json"},"snippet":"import { Bandeja } from \"@/jbm/motion/bandeja\"\n\n<svg viewBox=\"0 0 400 250\">\n  <Bandeja x={60} y={120} layers={3} />\n</svg>","api":[{"export":"Bandeja","kind":"component","summary":"SVG <g> of a shallow tray: back well, stacked card sheets, and a front lip with a finger notch that occludes their lower edges. Controlled by layers and landing; no internal timer. Render inside an <svg>.","props":[{"name":"x","type":"number","required":false,"default":null,"description":"Left edge of the tray in the parent SVG's user units."},{"name":"y","type":"number","required":false,"default":null,"description":"Top reference of the tray in parent SVG units; the back rim is at y + 16 and the base at y + 68."},{"name":"w","type":"number","required":false,"default":null,"description":"Tray width in parent SVG units; the rim, sheets, and front notch scale with it."},{"name":"layers","type":"number","required":false,"default":null,"description":"Settled sheet count. The bottom sheet lies in the well (top edge at y + 24); the second clears the back rim (y + 11) and each further sheet sits 5 units above the last (the shared 3-unit outline plus a 2-unit gap), so no edge fuses with the rim. Sheets under the top one show only their near edges, between upright stack sides. Floored; negative or non-finite values show none."},{"name":"landing","type":"number","required":false,"default":null,"description":"Arrival of one extra incoming sheet, 0–1: it drops from 90 units above the stack top and fades in, settling at 1. Clamped; 0 hides it."}],"passthrough":[]},{"export":"bandejaLayout","kind":"function","summary":"Tray geometry for composites that drop or pick up sheets.","params":[{"name":"x","type":"number","required":false,"default":"0","description":"Left edge of the tray in the parent SVG's user units."},{"name":"y","type":"number","required":false,"default":"0","description":"Top reference of the tray in parent SVG units; the back rim is at y + 16 and the base at y + 68."},{"name":"w","type":"number","required":false,"default":"280","description":"Tray width in parent SVG units; the rim, sheets, and front notch scale with it."},{"name":"layers","type":"number","required":false,"default":"0","description":"Settled sheet count. The bottom sheet lies in the well (top edge at y + 24); the second clears the back rim (y + 11) and each further sheet sits 5 units above the last (the shared 3-unit outline plus a 2-unit gap), so no edge fuses with the rim. Sheets under the top one show only their near edges, between upright stack sides. Floored; negative or non-finite values show none."},{"name":"landing","type":"number","required":false,"default":null,"description":"Accepted for parity with Bandeja's props; the layout ignores it."}],"returns":"{ x, y, w, count, floor, stackTop }: the floored sheet count, the tray floor centre (y + 41), and where the next sheet lands (17 units below its top edge: y + 41 with no sheets, y + 33 − 5 × count after), in parent SVG units."}],"stage":{"mode":"declared","landscape":{"width":280,"height":52},"vertical":{"width":280,"height":52},"basis":"Parent SVG user units at w 280: from the back rim at y + 16 to the base at y + 68. From two layers the top sheet rises over the back rim (top sheet at y + 16 − 5 × (layers − 1)), and a landing sheet starts 90 units above the stack, so leave headroom above y."},"examples":[{"title":"Tray with three sheets","code":"import { Bandeja } from \"@/jbm/motion/bandeja\"\n\n<svg viewBox=\"0 0 400 250\">\n  <Bandeja x={60} y={120} layers={3} />\n</svg>"},{"title":"Land a sheet and aim at the stack","code":"import { Bandeja, bandejaLayout } from \"@/jbm/motion/bandeja\"\n\nconst tray = { x: 70, y: 160, w: 360, layers: 4 }\nconst target = bandejaLayout(tray).stackTop // where the next sheet lands\n<svg viewBox=\"0 0 500 340\">\n  <Bandeja {...tray} landing={0.6} />\n  <circle cx={target.x} cy={target.y} r={4} />\n</svg>"}],"qa":["Drag Sheets from 0 to 12: the second sheet jumps clear of the back rim, then each steps up 5 units; no sheet edge fuses with the rim, a wall, or the sheet below, the stack's sides stay upright inside the wall posts, and tall stacks stay inside the viewBox.","Step landing through 0, 0.5, and 1: the incoming sheet fades in while descending and rests exactly on the stack at 1, then increment layers to settle it.","Check the front notch stays centred when w changes."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"}],"family":"Desk objects","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"tool-caddy","entry":"component","title":"ToolCaddy","description":"An empty divided desktop organizer.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/tool-caddy","installName":"tool-caddy","page":"https://jbm-ui.bns.studio/c/tool-caddy","registryItem":"https://jbm-ui.bns.studio/r/tool-caddy.json","sourcePath":"registry/jbm/motion/tool-caddy.tsx","files":[{"source":"registry/jbm/motion/tool-caddy.tsx","target":"src/jbm/motion/tool-caddy.tsx","import":"@/jbm/motion/tool-caddy","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/tool-caddy.md","json":"https://jbm-ui.bns.studio/catalog/tool-caddy.json"},"snippet":"import { ToolCaddy } from \"@/jbm/motion/tool-caddy\"\n\n<svg viewBox=\"0 0 400 250\">\n  <ToolCaddy x={80} y={40} />\n</svg>","api":[{"export":"ToolCaddy","kind":"component","summary":"SVG <g> of an empty desktop organizer in three-quarter view: card front, darker side and back, an ink opening, and a carry handle rising above the rim. Tools are separate objects placed by the caller. Render inside an <svg>.","props":[{"name":"x","type":"number","required":false,"default":"0","description":"Left edge in the parent SVG's user units."},{"name":"y","type":"number","required":false,"default":"0","description":"Top of the rim in parent SVG units; the handle rises 36 × (w / 240) above it."},{"name":"w","type":"number","required":false,"default":"240","description":"Width in parent SVG units; the whole drawing scales uniformly by w / 240, except the stroke, which stays the shared outline (stroke.outline) in parent units."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":240,"height":200},"vertical":{"width":240,"height":200},"basis":"Parent SVG user units at w 240: from the handle top at y − 36 to the base at y + 164. Everything scales by w / 240 (300 wide is 250 tall). Place y at least 36 × w / 240 below the viewBox top."},"examples":[{"title":"Empty caddy","code":"import { ToolCaddy } from \"@/jbm/motion/tool-caddy\"\n\n<svg viewBox=\"0 0 400 250\">\n  <ToolCaddy x={80} y={40} />\n</svg>"}],"qa":["The gallery preview is a still at w 300; there are no controls to exercise.","Check the handle is fully inside the viewBox (it sits above y) and its gap reads as a hole.","Scale w up and down: the ink stroke stays the shared outline in parent units at every size; confirm it matches nearby objects."],"related":[{"name":"tokens","relation":"installs"}],"family":"Desk objects","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"escritorio","entry":"component","title":"Escritorio","description":"An empty desk with separate finish and optional file cabinet.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/cajon","@jbm/file-cabinet"],"install":"npx shadcn@latest add @jbm/escritorio","installName":"escritorio","page":"https://jbm-ui.bns.studio/c/escritorio","registryItem":"https://jbm-ui.bns.studio/r/escritorio.json","sourcePath":"registry/jbm/motion/escritorio.tsx","files":[{"source":"registry/jbm/motion/escritorio.tsx","target":"src/jbm/motion/escritorio.tsx","import":"@/jbm/motion/escritorio","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/escritorio.md","json":"https://jbm-ui.bns.studio/catalog/escritorio.json"},"snippet":"import { Escritorio } from \"@/jbm/motion/escritorio\"\n\n<svg viewBox=\"0 0 820 530\">\n  <Escritorio box={{ x: 30, y: 65, w: 760, h: 420 }}\n    cabinet spec={{ finish: \"wood\", drawerSide: \"end\" }}\n    folders={[{ name: \"datos\", accent: true }, { name: \"notas\" }]} open={1} />\n</svg>","api":[{"export":"Escritorio","kind":"component","summary":"SVG <g> of an empty desk (slab, apron, and two legs) sized to a box, with a paper or wood finish and an optional file cabinet between the legs. The cabinet body is drawn behind the desk and its drawer (Cajón) in front, so drawer folders can rise over the apron. Controlled; no internal timer. Render inside an <svg>.","props":[{"name":"box","type":"Box","required":true,"default":null,"description":"Desk bounds { x, y, w, h } in the parent SVG's user units. The top slab starts at y + 2 and the legs reach the floor at y + h."},{"name":"spec","type":"DeskSpec","required":false,"default":null,"description":"Finish and cabinet side: finish paper (card fill, default) or wood (bg fill with grain lines); drawerSide start (left, default) or end (right)."},{"name":"cabinet","type":"boolean","required":false,"default":null,"description":"Shows the file cabinet and its drawer under the desk."},{"name":"folders","type":"readonly DrawerFolder[]","required":false,"default":null,"description":"Folders in the cabinet drawer, as for Cajón: name, accent, and pulled per folder, index 0 nearest the front."},{"name":"open","type":"number","required":false,"default":null,"description":"Cabinet drawer opening from 0 (closed) to 1 (open). Clamped."}],"passthrough":[]},{"export":"escritorioLayout","kind":"function","summary":"Shared desk geometry: the cabinet fits between the legs (at most 250 wide, 12 units of clearance) from below the apron to the floor.","params":[{"name":"box","type":"Box","required":true,"default":null,"description":"Desk bounds { x, y, w, h } in the parent SVG's user units. The top slab starts at y + 2 and the legs reach the floor at y + h."},{"name":"spec","type":"DeskSpec","required":false,"default":"{}","description":"Only drawerSide affects the layout; finish is visual."},{"name":"cabinet","type":"boolean","required":false,"default":null,"description":"Accepted for parity with Escritorio's props; the layout always computes cabinet and drawer geometry."},{"name":"folders","type":"readonly DrawerFolder[]","required":false,"default":"[]","description":"Folders in the cabinet drawer, as for Cajón: name, accent, and pulled per folder, index 0 nearest the front."},{"name":"open","type":"number","required":false,"default":"0","description":"Cabinet drawer opening from 0 (closed) to 1 (open). Clamped."}],"returns":"{ box, top, cabinet, drawer, plane, anchors }: top is box.y + 20; cabinet and drawer are the FileCabinet and Cajón props; plane holds innerLeft, innerRight, floor, and apronBottom; anchors.folders are the folder tab grip points, all in parent SVG units."},{"export":"DeskSpec","kind":"type","summary":"{ finish?: \"paper\" | \"wood\"; drawerSide?: \"start\" | \"end\" }."}],"stage":{"mode":"declared","landscape":{"width":760,"height":418},"vertical":{"width":760,"height":418},"basis":"Parent SVG user units for the documented box 760 × 420: width is box.w and height runs from the slab top at box.y + 2 to the floor at box.y + box.h (box.h − 2). A lifted folder in an open cabinet drawer can rise above the slab, so leave headroom when pulled is used."},"examples":[{"title":"Wood desk with a cabinet on the right","code":"import { Escritorio } from \"@/jbm/motion/escritorio\"\n\n<svg viewBox=\"0 0 820 530\">\n  <Escritorio box={{ x: 30, y: 65, w: 760, h: 420 }}\n    cabinet spec={{ finish: \"wood\", drawerSide: \"end\" }}\n    folders={[{ name: \"datos\", accent: true }, { name: \"notas\" }]} open={1} />\n</svg>"},{"title":"Reach for a folder with a hand","code":"import { Escritorio, escritorioLayout } from \"@/jbm/motion/escritorio\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\nconst desk = { box: { x: 30, y: 65, w: 760, h: 420 }, cabinet: true, folders: [{ name: \"datos\" }], open: 1 }\nconst tab = escritorioLayout(desk).anchors.folders[0]\n<svg viewBox=\"0 0 820 530\">\n  <Escritorio {...desk} />\n  <Mano at={tab} pose=\"pinch\" size={120} anchor={{ x: 15, y: 5 }} />\n</svg>"}],"qa":["Toggle Wood finish: only fills and grain lines change; geometry stays put.","Toggle File cabinet and Cabinet on right: the cabinet sits between the legs with equal clearance on both sides and shares the floor line.","With the cabinet on, drag Open and change folder count: the drawer front stays above the floor and folders draw over the apron without clipping.","Try a narrow box: the cabinet shrinks to fit between the legs; very small widths are untested and may collapse it.","The Mano anchor in the second example is an estimate of the pinch fingertip; verify it visually."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"cajon","relation":"installs"},{"name":"file-cabinet","relation":"installs"},{"name":"mano","relation":"example-import"}],"family":"Desk objects","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"desk-top","entry":"component","title":"DeskTop","description":"A cream desk seen from above, with light, a tilt-revealed front edge, and an optional pulled-out drawer.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/desk-top","installName":"desk-top","page":"https://jbm-ui.bns.studio/c/desk-top","registryItem":"https://jbm-ui.bns.studio/r/desk-top.json","sourcePath":"registry/jbm/ui/desk-top.tsx","files":[{"source":"registry/jbm/ui/desk-top.tsx","target":"src/jbm/ui/desk-top.tsx","import":"@/jbm/ui/desk-top","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/desk-top.md","json":"https://jbm-ui.bns.studio/catalog/desk-top.json"},"snippet":"import { DeskTop } from \"@/jbm/ui/desk-top\"\n\n<svg viewBox=\"0 0 1920 1080\">\n  <DeskTop box={{ x: 120, y: 90, w: 1680, h: 830 }} drawer=\"end\" drawerSize={520} />\n</svg>","api":[{"export":"DeskTop","kind":"component","summary":"SVG <g> of a top-down desk: an empty cream surface with an ink edge that sheets, axes, and props lie on, an optional open drawer pulled out at one edge, and a front edge band the camera tilt reveals. It owns no sheets, axes, hands, or drawer contents; compose Ejes, DeskProp, Paper, or Cajon on top. Controlled; no internal timer. Render inside an <svg>.","props":[{"name":"box","type":"Box","required":true,"default":null,"description":"Desk footprint { x, y, w, h } in the parent SVG's user units, including the front edge band and any drawer region. Tilt and the drawer never change it."},{"name":"light","type":"number","required":false,"default":"1","description":"Light on the whole desk, 0–1 (1 full cream): every fill mixes in OKLab toward the palette's line token, reaching it at 0.72 (the visual language's deepest folder), then toward ink (deskLight). The ink stroke and the ink drawer pull do not change. Clamped."},{"name":"edge","type":"number","required":false,"default":"0","description":"Camera tilt, 0–1: reveals a front band up to 22 units tall at 1, taken out of the surface's depth: the desk's front edge under the desk top, and a side drawer's own near face under it. 0 is straight down. Clamped."},{"name":"drawer","type":"DeskTopDrawerSide","required":false,"default":null,"description":"Edge that holds an open drawer (start left, end right, top, bottom). The drawer box is pulled out past the desk top's edge, which is the one seam line, and is narrower than the desk along it; its outer wall is its front, thicker than the other walls and carrying the pull (an ink bar, the same pull as on Cajon's front, seen from above). Its opening is darker than the desk and runs on under the desk top. Omit for no drawer."},{"name":"drawerSize","type":"number","required":false,"default":null,"description":"Drawer region depth across its edge in parent units, the 6-unit seam included: along the width for start and end, along the height for top and bottom. Defaults to 40% of that dimension; kept between 44 and 80% of the plan."}],"passthrough":[]},{"export":"deskTopLayout","kind":"function","summary":"Desk geometry for composites: where the flat surface is, where its centre is (Ejes cross there by default), and the drawer's region, box, opening, front, and pull.","params":[{"name":"box","type":"Box","required":true,"default":null,"description":"Desk footprint { x, y, w, h } in the parent SVG's user units, including the front edge band and any drawer region. Tilt and the drawer never change it."},{"name":"light","type":"number","required":false,"default":"1","description":"Light on the whole desk, 0–1 (1 full cream): every fill mixes in OKLab toward the palette's line token, reaching it at 0.72 (the visual language's deepest folder), then toward ink (deskLight). The ink stroke and the ink drawer pull do not change. Clamped."},{"name":"edge","type":"number","required":false,"default":"0","description":"Camera tilt, 0–1: reveals a front band up to 22 units tall at 1, taken out of the surface's depth: the desk's front edge under the desk top, and a side drawer's own near face under it. 0 is straight down. Clamped."},{"name":"drawer","type":"DeskTopDrawerSide","required":false,"default":null,"description":"Edge that holds an open drawer (start left, end right, top, bottom). The drawer box is pulled out past the desk top's edge, which is the one seam line, and is narrower than the desk along it; its outer wall is its front, thicker than the other walls and carrying the pull (an ink bar, the same pull as on Cajon's front, seen from above). Its opening is darker than the desk and runs on under the desk top. Omit for no drawer."},{"name":"drawerSize","type":"number","required":false,"default":null,"description":"Drawer region depth across its edge in parent units, the 6-unit seam included: along the width for start and end, along the height for top and bottom. Defaults to 40% of that dimension; kept between 44 and 80% of the plan."}],"returns":"{ box, surface, center, drawer, front, plan, slab, drawn, fill }: surface is the flat top Box; center its centre; drawer is { panel, body, well, front, pull } or null (panel the whole region, body the pulled-out box inside it, well its opening, front its thicker outer wall, pull the ink bar on it); front is the edge band Box (h 0 when flat); plan the surface, seam, and drawer region above the band; slab the desk top as drawn, out to the seam line; drawn is drawing geometry for DeskTop itself; fill holds the surface, handle (kept for compatibility; the pull is ink), front, panel, and well colours after light. All in parent SVG units."},{"export":"deskLight","kind":"function","summary":"A #rrggbb token colour under light k, kept on the palette: mixed in OKLab toward the line token as k falls from 1 to 0.72, then from line toward ink. DeskTop's fills use it.","params":[{"name":"hex","type":"string","required":true,"default":null,"description":"A #rrggbb colour, normally a jbm token such as color.bg or color.card."},{"name":"k","type":"number","required":true,"default":null,"description":"Light, 0–1 (clamped): 1 returns the colour, 0.72 the line token, 0 ink."}],"returns":"The lit colour as #rrggbb."},{"export":"deskShade","kind":"function","summary":"Scales a #rrggbb colour's OKLab lightness by k (clamped 0–1), keeping its chroma. Kept for compatibility; DeskTop now lights its fills with deskLight, which stays on the palette.","params":[{"name":"hex","type":"string","required":true,"default":null,"description":"A #rrggbb colour, normally a jbm token such as color.bg."},{"name":"k","type":"number","required":true,"default":null,"description":"Lightness multiplier, 0–1."}],"returns":"The shaded colour as #rrggbb."},{"export":"DESK_EDGE","kind":"constant","summary":"Front edge band height at full tilt (edge 1), in parent units: 22."}],"stage":{"mode":"declared","landscape":{"width":1680,"height":830},"vertical":{"width":936,"height":1340},"basis":"The desk fills its box exactly (parent SVG units = stage pixels in a 1920 × 1080 or 1080 × 1920 composition). The numbers are the safe area the act 2 layout gives it: landscape 1920 − 2 × 120 by 920 − 90, vertical 1080 − 2 × 72 by 1440 − 100. Tilt and the drawer region stay inside the box."},"examples":[{"title":"Desk with the drawer kept in frame on the right","code":"import { DeskTop } from \"@/jbm/ui/desk-top\"\n\n<svg viewBox=\"0 0 1920 1080\">\n  <DeskTop box={{ x: 120, y: 90, w: 1680, h: 830 }} drawer=\"end\" drawerSize={520} />\n</svg>"},{"title":"Axes on the surface, tilting to show the desk edge","code":"import { DeskTop, deskTopLayout } from \"@/jbm/ui/desk-top\"\nimport { Ejes } from \"@/jbm/ui/ejes\" // install @jbm/ejes separately\n\nconst desk = { box: { x: 120, y: 90, w: 1680, h: 830 }, edge: 1 }\nconst { surface } = deskTopLayout(desk)\n<svg viewBox=\"0 0 1920 1080\">\n  <DeskTop {...desk} />\n  <Ejes box={surface} h={1} v={1} quiet\n    labels={{ top: \"hacer\", bottom: \"entender\", left: \"aprender\", right: \"trabajar\" }} />\n</svg>"}],"qa":["At index size the default (Tilted, drawer end) reads as a desk with a drawer pulled out, not a tablet: a plain cream top with its front edge, and a narrower drawer box with a pull on its outer front.","Drag Edge from Flat to Tilted: the front band grows from the bottom inside the box, the surface loses the same depth, their shared edge stays one line with square corners where they meet, and a side drawer shows its own near face.","Step Drawer through none, start, end, top, and bottom: the box never moves; the drawer box sits on the chosen edge, narrower than the desk, meeting it at one seam line (never a double line); its opening is darker than the desk and open toward the seam; every drawer has exactly one pull, on its outer front; a top or bottom drawer takes 40% of the height, not of the width.","Drag Light from 1 to 0.72: every fill darkens together toward the line token (never taupe); the ink edge and the ink pull do not change.","At 8× zoom check the rounded corners, the seam where the drawer meets the desk and the band, and that no contour doubles, steps, or leaves a stub."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"ejes","relation":"example-import"}],"family":"Desk objects","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"desk-prop","entry":"component","title":"DeskProp","description":"A free-standing keycap, keyboard, or mug (from above or standing, from the side) to place on a desk.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/desk-prop","installName":"desk-prop","page":"https://jbm-ui.bns.studio/c/desk-prop","registryItem":"https://jbm-ui.bns.studio/r/desk-prop.json","sourcePath":"registry/jbm/ui/desk-prop.tsx","files":[{"source":"registry/jbm/ui/desk-prop.tsx","target":"src/jbm/ui/desk-prop.tsx","import":"@/jbm/ui/desk-prop","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/desk-prop.md","json":"https://jbm-ui.bns.studio/catalog/desk-prop.json"},"snippet":"import { DeskProp } from \"@/jbm/ui/desk-prop\"\n\n<svg viewBox=\"0 0 700 240\">\n  <DeskProp kind=\"keycap\" x={70} y={120} />\n  <DeskProp kind=\"keyboard\" x={290} y={120} rotate={-4} />\n  <DeskProp kind=\"mug\" x={520} y={120} />\n  <DeskProp kind=\"mug-side\" x={630} y={120} />\n</svg>","api":[{"export":"DeskProp","kind":"component","summary":"SVG <g> of one small desk object in the library's card fill and the shared ink outline (stroke.outline, 3 units), placed by its centre with scale and rotation. It owns no hand: compose Mano at deskPropLayout's contact point. Controlled; no internal timer. Render inside an <svg>.","props":[{"name":"kind","type":"DeskPropKind","required":true,"default":null,"description":"keycap (a single key, 56 × 56), keyboard (a compact 314 × 100 board: three letter rows of 14, 13, and 12 keys offset by tab, caps, and shift, then eight modifiers around a space bar), or mug (from above like the others: a round body with its rim and the handle's end to the right, 90 × 78); mug-side is the same mug standing upright seen from the side (a body a little taller than wide, the rim's ellipse across its top, and one C-shaped handle to the right, 90 × 78), for a hand that holds it."},{"name":"x","type":"number","required":true,"default":null,"description":"Centre of the footprint, in the parent SVG's user units."},{"name":"y","type":"number","required":true,"default":null,"description":"Centre of the footprint, in parent SVG units."},{"name":"scale","type":"number","required":false,"default":"1","description":"Uniform size multiplier (default 1). The ink stroke stays weight parent units at any scale."},{"name":"weight","type":"number","required":false,"default":"stroke.outline","description":"Ink stroke width in parent units (default stroke.outline, the shared 3-unit outline from tokens), kept at any scale. A preview that frames one prop in its own viewBox passes a weight that keeps the on-screen line the same as its neighbours'."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Rotation in degrees around the centre (default 0)."},{"name":"press","type":"number","required":false,"default":"0","description":"Key travel, 0–1: the keycap's dished top sinks, centres, and shrinks 4 units a side; on a keyboard, the keys listed in keys inset 3 units a side. A pressed face takes an ink wash (0.28 at 1, the depth of the visual language's 0.72 light) so the press shows at small sizes. Both mugs ignore it. Clamped."},{"name":"keys","type":"readonly number[]","required":false,"default":"[]","description":"Keyboard only: indices of the keys press applies to, row by row from the top left (0–13 the tab row, 14–26 the home row, 27–38 the shift row, 39–46 the modifier row, 42 the space bar; deskPropHomeKey, 20, is the home-row key nearest the middle)."}],"passthrough":[]},{"export":"deskPropLayout","kind":"function","summary":"Placement and contact points after scale and rotation, so a fingertip lands on the keycap or a key, a grip lands on the top-down mug's handle, and an upright hold lands on the side-view mug's free side with its thumb over the rim.","params":[{"name":"kind","type":"DeskPropKind","required":true,"default":null,"description":"keycap (a single key, 56 × 56), keyboard (a compact 314 × 100 board: three letter rows of 14, 13, and 12 keys offset by tab, caps, and shift, then eight modifiers around a space bar), or mug (from above like the others: a round body with its rim and the handle's end to the right, 90 × 78); mug-side is the same mug standing upright seen from the side (a body a little taller than wide, the rim's ellipse across its top, and one C-shaped handle to the right, 90 × 78), for a hand that holds it."},{"name":"x","type":"number","required":true,"default":null,"description":"Centre of the footprint, in the parent SVG's user units."},{"name":"y","type":"number","required":true,"default":null,"description":"Centre of the footprint, in parent SVG units."},{"name":"scale","type":"number","required":false,"default":"1","description":"Uniform size multiplier (default 1). The ink stroke stays weight parent units at any scale."},{"name":"weight","type":"number","required":false,"default":null,"description":"Ink stroke width in parent units (default stroke.outline, the shared 3-unit outline from tokens), kept at any scale. A preview that frames one prop in its own viewBox passes a weight that keeps the on-screen line the same as its neighbours'."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Rotation in degrees around the centre (default 0)."},{"name":"press","type":"number","required":false,"default":"0","description":"Key travel, 0–1: the keycap's dished top sinks, centres, and shrinks 4 units a side; on a keyboard, the keys listed in keys inset 3 units a side. A pressed face takes an ink wash (0.28 at 1, the depth of the visual language's 0.72 light) so the press shows at small sizes. Both mugs ignore it. Clamped."},{"name":"keys","type":"readonly number[]","required":false,"default":null,"description":"Keyboard only: indices of the keys press applies to, row by row from the top left (0–13 the tab row, 14–26 the home row, 27–38 the shift row, 39–46 the modifier row, 42 the space bar; deskPropHomeKey, 20, is the home-row key nearest the middle)."}],"returns":"{ kind, center, size, corners, contact, rim, keys, transform }: size is the scaled footprint; corners the four footprint corners; contact the keycap top, the home-row key nearest the middle (deskPropHomeKey), the middle of the top-down mug handle's visible end, or the middle of the side-view mug's left side (away from its handle); rim the side-view mug's near rim end, where a thumb crosses the top (null for the other kinds); keys every keyboard key centre (empty otherwise); transform the SVG transform the prop uses. Parent SVG units."},{"export":"deskPropSize","kind":"constant","summary":"Footprint of each kind at scale 1, in parent units: keycap 56 × 56, keyboard 314 × 100 (about 3:1), mug and mug-side 90 × 78."},{"export":"deskPropKeys","kind":"constant","summary":"The keyboard's 47 key rectangles in local units (centre origin) on a 20-unit pitch with 6-unit gaps (14-unit letter keys), row by row: tab, 12 letters, and backslash; caps, 11 letters, and return; shift, 10 letters, and shift; then ctrl, alt, cmd, a 119-unit space bar (index 42), cmd, alt, fn, and ctrl. Every row is 15 key units wide, so the modifiers offset the letter rows."},{"export":"deskPropHomeKey","kind":"constant","summary":"Index 20 in deskPropKeys: the home-row key nearest the keyboard's middle (H), where deskPropLayout puts a keyboard's contact and a typing fingertip lands."}],"stage":{"mode":"declared","landscape":{"width":314,"height":100},"vertical":{"width":314,"height":100},"basis":"Parent SVG units for the largest kind, a keyboard at scale 1 (314 × 100). A keycap is 56 × 56 and each mug 90 × 78; everything multiplies by scale, and rotation can widen the axis-aligned bounds to the rotated corners (deskPropLayout(...).corners). On a 1920 × 1080 desk the Doorways board draws them larger: about scale 1.5 for the keyboard and 2 to 2.4 for the keycap and mug."},"examples":[{"title":"Keyboard, keycap, and mug on a desk","code":"import { DeskProp } from \"@/jbm/ui/desk-prop\"\n\n<svg viewBox=\"0 0 700 240\">\n  <DeskProp kind=\"keycap\" x={70} y={120} />\n  <DeskProp kind=\"keyboard\" x={290} y={120} rotate={-4} />\n  <DeskProp kind=\"mug\" x={520} y={120} />\n  <DeskProp kind=\"mug-side\" x={630} y={120} />\n</svg>"},{"title":"A pointing finger presses the keycap","code":"import { DeskProp, deskPropLayout } from \"@/jbm/ui/desk-prop\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\nconst key = { kind: \"keycap\", x: 200, y: 180, scale: 1.5, press: 0.6 } as const\nconst tip = deskPropLayout(key).contact\n<svg viewBox=\"0 0 400 300\">\n  <DeskProp {...key} />\n  <Mano at={tip} pose=\"point\" size={120} angle={180} anchor={{ x: 9.5, y: 1.6 }} />\n</svg>"}],"qa":["Switch Prop through All four, keycap, keyboard, mug, and mug side view: each reads as its noun alone (a stranger says keyboard, not keypad or calculator, and mug, not speaker), the first three seen from above and the side-view mug standing upright, in card fill with the same on-screen ink line (the shared outline at the preview's full width) as each other.","Enlarge the keyboard at 8×: neighbouring key outlines stay apart (a cream gap between every pair), the offset rows never line up into a grid, and the modifier row sits evenly around the space bar.","Enlarge the side-view mug at 8×: the handle is one C-shaped loop whose ends tuck under the body without a gap or stub, and the rim's ellipse meets the body's sides at its ends.","Drag Scale from 0.5× to 2×: proportions hold and the on-screen stroke stays the same, not thinner or thicker.","Drag Rotation: each prop turns about its centre and stays inside the preview.","Drag Press on the keycap and the keyboard to Down: the keycap top visibly sinks and darkens; on the keyboard only the home-row key nearest the middle (deskPropHomeKey) insets and darkens, visible at index size.","Enlarge the mug at 30°: the handle's end meets the round body without a gap, stub, or doubled edge, and the rim ring is even.","The Mano anchor in the second example is an estimate of the fingertip; verify it visually."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"mano","relation":"example-import"}],"family":"Desk objects","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"hand","entry":"component","title":"Hand","description":"Static line-art hand in open-palm, pointing, pinching, gripping, typing, holding, or writing pose, independent of placement and props.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/hand","installName":"hand","page":"https://jbm-ui.bns.studio/c/hand","registryItem":"https://jbm-ui.bns.studio/r/hand.json","sourcePath":"registry/jbm/ui/hand.tsx","files":[{"source":"registry/jbm/ui/hand.tsx","target":"src/jbm/ui/hand.tsx","import":"@/jbm/ui/hand","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/hand.md","json":"https://jbm-ui.bns.studio/catalog/hand.json"},"snippet":"import { Hand } from \"@/jbm/ui/hand\"\n\n<Hand pose=\"pinch\" width={160} />","api":[{"export":"Hand","kind":"component","summary":"Card-filled, ink-outlined hand drawn in a 30×29 viewBox. The pose swaps the silhouette only; it owns no position, rotation, folder, pen, or timeline (use Mano from @jbm/mano for placement inside an SVG, Pluma from @jbm/pluma for a held pen). Other SVG attributes pass through to the root <svg>.","props":[{"name":"pose","type":"HandPose","required":false,"default":"\"point\"","description":"Silhouette: `open` (open palm, fingers together), `point` (index finger extended), `pinch` (index bent over the thumb; Pluma's default pen grip), `grip` (front-view fist: four fingers with knuckle bumps on top and the curled fingertips in a row beneath, the thumb lying across under them, pointing in; lay the knuckles over a sheet or tab edge), `type` (the hand from above on a keyboard with the fingers curled down onto the keys: four short stubs, the middle tallest, whose caps are the bent middle joints with the fingertips out of sight beneath (no marks across them), and the thumb low, pointing left toward the space bar; at thumbnail size it reads as the open palm with its fingers folded), or `hold` (upright, seen from the side: the palm rises straight from the wrist and its top sweeps up into a finger-width thumb that bends at a rounded joint and lies over the held object's rim, tip toward the fingers, with a short crease where it leaves the palm; the four fingers lie stacked on the right, wrapped round the object's side with their tips facing the palm, and the open pocket between palm, thumb, fingertips, and heel is where the object sits; draw a side-view mug or a sheet's corner behind it, the rim or top edge just under the thumb; the pose is drawn for an object, and on its own the stacked fingers read apart from the palm, so show it round one), or `write` (a right hand holding a pen in a tripod grip, traced from an owner-approved Quiver Arrow reference (Paper page hands, artboard Hands v7 · write (Quiver Arrow)) in its own frame at the shared outline weight: seen from the back and a little above, fingers toward the nib, the index lying along the barrel to its round tip near the nib, the thumb's round tip closing on the barrel just behind it in a round notch, the middle fingertip under the thumb, three curled knuckles down the right side with short dividers, the thumb's top edge running into the web as a crease, and a short wrist; turned so a held pen slants as pinch's does; drawn for a pen, so show it with Pluma pose write). Every pose draws its dividers from the outline's valley points in the outline's stroke width; grip, type, hold, and write draw all their ink as one path (interior lines retraced as spurs), so joins are tangent with no steps, and the valleys between fingertips and grip's palm edge between index and thumb round off in small fillets. The palm side meets the wrist cut in one tangent-continuous fillet. Also sets the accessible label, e.g. \"Hand: point\"."},{"name":"halo","type":"boolean","required":false,"default":"false","description":"Knock the hand out of what it overlaps: a card ring half the outline wide just outside the contour, so ink art passing behind the hand (a pen barrel, a thread) never fuses with its outline. The ring paints over everything under the hand, writing included; to cut only the art behind the hand, mask that art with handOutline instead (Pluma does). Default false."}],"passthrough":["SVGProps<SVGSVGElement>"]},{"export":"handOutline","kind":"function","summary":"A pose's closed outline in the Hand's 30×29 viewBox (for grip, type, hold, and write it also retraces the interior lines inside it, which add no area), for composites that cut art drawn behind the hand (a mask or clip path) instead of painting a halo over whatever else is under it. Place it with the same transforms as the Hand (Mano's translate, rotate, and anchor, then a scale of size / 30). For write it also names the parts that lie in front of a held pen (the thumb and index finger), so a pen drawn over the hand can stop at them.","params":[{"name":"pose","type":"HandPose","required":false,"default":"\"point\"","description":"Hand pose; defaults to point, like Hand."}],"returns":"{ d, transform, strokeWidth, front }: the outline path, the transform that places it in the viewBox, the outline's stroke width in path units, and (write only; otherwise undefined) `front`, the regions in front of a held pen as closed subpaths in the same units and transform, each bounded where it crosses the pen by the hand's own ink. Stroke a path at twice the width to cover the outline plus a gap half the outline wide."},{"export":"handPoses","kind":"constant","summary":"Every pose name in gallery order: open, point, pinch, grip, type, hold, write. HandPose is its element type."}],"stage":{"mode":"declared","landscape":{"width":180,"height":174},"vertical":{"width":180,"height":174},"basis":"The 30×29 viewBox renders at width 180; height is auto from the aspect ratio (180 × 29/30 = 174). Pass `width` (the gallery uses 155) or style.width to scale; maxWidth is 100% of the container. Every pose shares the box and the wrist sits at its lower edge."},"examples":[{"title":"Pinching hand","code":"import { Hand } from \"@/jbm/ui/hand\"\n\n<Hand pose=\"pinch\" width={160} />"},{"title":"Writing hand, holding a pen","code":"import { Hand } from \"@/jbm/ui/hand\"\nimport { Pluma } from \"@/jbm/motion/pluma\" // install @jbm/pluma separately\n\n// write is drawn for a pen: on its own it holds nothing.\n<Hand pose=\"write\" width={120} />\n// Pluma draws it with the pen, at the film's writing tilt.\n<svg viewBox=\"0 0 500 340\">\n  <Pluma at={{ x: 220, y: 150 }} size={180} angle={30} pose=\"write\" />\n</svg>"},{"title":"The four reader poses","code":"import { Hand } from \"@/jbm/ui/hand\"\n\n<Hand pose=\"point\" width={120} />\n<Hand pose=\"type\" width={120} />\n<Hand pose=\"grip\" width={120} />\n<Hand pose=\"hold\" width={120} />"},{"title":"Hold a side-view mug","code":"import { Hand } from \"@/jbm/ui/hand\"\nimport { DeskProp } from \"@/jbm/ui/desk-prop\" // install @jbm/desk-prop separately\n\n// A 180-wide hand: the mug's rim (deskPropLayout(...).rim) sits at 93 48.4, just under the thumb.\n<svg viewBox=\"0 0 222 174\">\n  <DeskProp kind=\"mug-side\" x={157} y={98} scale={1.6} />\n  <Hand pose=\"hold\" width={180} height={174} style={{ height: 174 }} />\n</svg>"},{"title":"Place and rotate inside an SVG","code":"import { Hand } from \"@/jbm/ui/hand\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\n<Hand pose=\"open\" width={120} />\n<svg viewBox=\"0 0 500 340\">\n  <Mano at={{ x: 160, y: 30 }} pose=\"point\" angle={12} />\n</svg>"}],"qa":["Switch Pose through all seven: each silhouette sits in the same box with the wrist at the bottom and keeps simple geometric line art and the same outline weight.","Enlarge every pose (point and pinch included) and inspect the finger joins: each interior divider starts on the outline's valley point, continues the finger's side, and has the outline's stroke width, with no notch or step, and grip, type, and hold keep the open palm's wrist cut exactly (grip and type also its right side); write closes along its own straight wrist cut. At 8×, grip, type, hold, and write show no step where a finger side meets a knuckle or fingertip arc, no sharp cusp between fingertips, and no hook at the wrist.","Name each pose at gallery size and compare it with its generated reference (Paper page hands, artboard Hands v5 for type and hold): grip reads as a fist gripping an edge (knuckles on top, fingertips in a row, thumb across beneath, pointing in), type as a hand from above with its fingers curled down onto keys (short stubs with no marks across them, thumb low toward the space bar), hold as an upright hand round an object (a finger-width thumb over the rim, no bigger than a finger and never a hook arching over the top; stacked fingers on the far side; an open pocket between; a palm no wider than the finger stack is tall).","Render all seven at 48px side by side: a stranger tells every pose apart, type from open above all (short folded fingers against tall straight ones), and the thumb and index tips never touch in pinch or hold (in write they meet by design, on the pen).","Overlay write on its reference (tools/blender/hand/reference/write.quiver.svg; out/write.trace.svg from tools/blender/hand/trace/write.py): the path runs on the reference's line centres everywhere the pen doesn't hide it, and every contour, stroke included, stays inside the box; the six other poses render exactly as before write was redrawn.","In context, grip over a Paper sheet's top edge, type over a DeskProp keyboard (fingertips on the upper rows, thumb over the space bar), and hold upright over a side-view mug (DeskProp kind mug-side: body in the pocket, rim just under the thumb) and over a sheet's top corner.","Check the card fill and ink stroke read on cream, and the aria-label follows the pose.","Scale with width at narrow screens: the 30:29 aspect ratio holds."],"related":[{"name":"tokens","relation":"installs"},{"name":"mano","relation":"installed-by"},{"name":"pluma","relation":"example-import"},{"name":"desk-prop","relation":"example-import"}],"family":"Hands","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"ejes","entry":"component","title":"Ejes","description":"Two ink axes that split an area into four named quadrants, with quiet labels and a focus quadrant.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/ejes","installName":"ejes","page":"https://jbm-ui.bns.studio/c/ejes","registryItem":"https://jbm-ui.bns.studio/r/ejes.json","sourcePath":"registry/jbm/ui/ejes.tsx","files":[{"source":"registry/jbm/ui/ejes.tsx","target":"src/jbm/ui/ejes.tsx","import":"@/jbm/ui/ejes","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/ejes.md","json":"https://jbm-ui.bns.studio/catalog/ejes.json"},"snippet":"import { Ejes } from \"@/jbm/ui/ejes\"\n\n<svg viewBox=\"0 0 1920 1080\">\n  <Ejes box={{ x: 120, y: 90, w: 1680, h: 830 }} h={1} v={1} quiet\n    labels={{ top: \"hacer\", bottom: \"entender\", left: \"aprender\", right: \"trabajar\" }}\n    focus=\"tl\" />\n</svg>","api":[{"export":"Ejes","kind":"component","summary":"SVG <g> of two crossing ink axes with a name on each side: top and bottom flank the horizontal axis at its left end, left and right flank the vertical axis at its top end. Each axis draws by its own progress; labels arrive with their axis and can shrink to quiet. One or more quadrants can be called out by a rounded outline or light fill. Vermilion appears only with focusTone accent. Controlled; no internal timer. Render inside an <svg>, usually over DeskTop.","props":[{"name":"box","type":"Box","required":true,"default":null,"description":"Area the axes span { x, y, w, h }, in the parent SVG's user units; usually DeskTop's surface."},{"name":"center","type":"Pt","required":false,"default":null,"description":"Where the axes cross. Defaults to the centre of box. Clamped to the range (ejesLayout().range) that keeps every label inside the box, the top and bottom labels left of the vertical axis, the right label right of it, and the top label below the left/right labels; a box too small for its labels crosses at its centre."},{"name":"h","type":"number","required":true,"default":null,"description":"Horizontal axis draw progress, 0–1. Clamped."},{"name":"v","type":"number","required":true,"default":null,"description":"Vertical axis draw progress, 0–1. Clamped."},{"name":"labels","type":"EjesLabels","required":true,"default":null,"description":"Half-plane names { top, bottom, left, right }. An empty string hides that label."},{"name":"quiet","type":"boolean | number","required":false,"default":"false","description":"Label size: false or 0 is full (36 units, weight 650), true or 1 is quiet (22 units, weight 500) at the same axis ends; numbers between interpolate the size and the (variable) weight together, so an animated shrink never pops."},{"name":"reveal","type":"Partial<Record<EjesSide, number>>","required":false,"default":null,"description":"Per-label opacity, 0–1, keyed top, bottom, left, right. A label left out fades in over 60 units as its axis's drawing tip passes it."},{"name":"origin","type":"\"center\" | \"start\"","required":false,"default":"\"center\"","description":"Axes grow out from the crossing (center, default) or from the left and top edges (start)."},{"name":"focus","type":"Quadrant | readonly Quadrant[]","required":false,"default":null,"description":"Quadrant or quadrants to call out: tl, tr, bl, br, or an array (all four together for the \"cuatro\" beat). Omit for none."},{"name":"focusTone","type":"EjesFocusTone","required":false,"default":"\"ink\"","description":"ink (default): ink outline. fill: light ink wash, no outline. accent: a vermilion outline on the first focused quadrant only (any others stay ink), opt-in for the one deliberate stamp (the board's @advina answer quadrant); never the default."},{"name":"focusProgress","type":"number","required":false,"default":"1","description":"Focus draw progress, 0–1 (default 1): outlines draw around their perimeter, fills fade in. Clamped."},{"name":"focusInset","type":"number","required":false,"default":"16","description":"Gap between a focus outline and the box edges and axes, in parent units (default 16). The four outlines are one size and hug the crossing, symmetric about both axes: as tall as the shorter row allows once the labels are cleared (the strip for the left/right labels at the top, the strips either side of the horizontal axis for the top and bottom labels) and as wide as the narrower column. An outline under 40 units on a side is not drawn."},{"name":"weight","type":"number","required":false,"default":"2","description":"Axis and outline stroke width in parent units (default 2, the desk's line weight)."}],"passthrough":[]},{"export":"ejesLayout","kind":"function","summary":"Axis, label, and quadrant geometry, for placing a sheet in each quadrant or a hand at an axis end.","params":[{"name":"center","type":"Pt","required":false,"default":null,"description":"Where the axes cross. Defaults to the centre of box. Clamped to the range (ejesLayout().range) that keeps every label inside the box, the top and bottom labels left of the vertical axis, the right label right of it, and the top label below the left/right labels; a box too small for its labels crosses at its centre."},{"name":"h","type":"number","required":true,"default":null,"description":"Horizontal axis draw progress, 0–1. Clamped."},{"name":"box","type":"Box","required":true,"default":null,"description":"Area the axes span { x, y, w, h }, in the parent SVG's user units; usually DeskTop's surface."},{"name":"v","type":"number","required":true,"default":null,"description":"Vertical axis draw progress, 0–1. Clamped."},{"name":"quiet","type":"boolean | number","required":false,"default":"false","description":"Label size: false or 0 is full (36 units, weight 650), true or 1 is quiet (22 units, weight 500) at the same axis ends; numbers between interpolate the size and the (variable) weight together, so an animated shrink never pops."},{"name":"reveal","type":"Partial<Record<EjesSide, number>>","required":false,"default":"{}","description":"Per-label opacity, 0–1, keyed top, bottom, left, right. A label left out fades in over 60 units as its axis's drawing tip passes it."},{"name":"origin","type":"\"center\" | \"start\"","required":false,"default":"\"center\"","description":"Axes grow out from the crossing (center, default) or from the left and top edges (start)."},{"name":"focusInset","type":"number","required":false,"default":"16","description":"Gap between a focus outline and the box edges and axes, in parent units (default 16). The four outlines are one size and hug the crossing, symmetric about both axes: as tall as the shorter row allows once the labels are cleared (the strip for the left/right labels at the top, the strips either side of the horizontal axis for the top and bottom labels) and as wide as the narrower column. An outline under 40 units on a side is not drawn."},{"name":"labels","type":"Partial<EjesLabels>","required":false,"default":null,"description":"Optional; when given, an empty label frees its strip so focus outlines can reach the axis."}],"returns":"{ box, center, horizontal: { x1, x2, y }, vertical: { x, y1, y2 }, type: { size, quiet }, labels: { top|bottom|left|right: { x, y, anchor, baseline, opacity } }, quadrants: { tl|tr|bl|br: Box }, range: { x: [min, max], y: [min, max] }, focus: { tl|tr|bl|br: Box } }, in parent SVG units; a focus box too small to draw has w and h 0."},{"export":"quadrants","kind":"constant","summary":"[\"tl\", \"tr\", \"bl\", \"br\"]: the four quadrant keys in spoken order of the board's readers."},{"export":"EJES_TYPE","kind":"constant","summary":"Label sizes in parent units: { full: 36, quiet: 22 }."}],"stage":{"mode":"declared","landscape":{"width":1680,"height":830},"vertical":{"width":936,"height":1340},"basis":"The axes span their box exactly (parent SVG units = stage pixels); labels and focus outlines stay inside it. The numbers are the act 2 desk surface at the safe area: landscape 1920 − 2 × 120 by 920 − 90, vertical 1080 − 2 × 72 by 1440 − 100."},"examples":[{"title":"Four places on the desk, labels quiet, answer quadrant outlined","code":"import { Ejes } from \"@/jbm/ui/ejes\"\n\n<svg viewBox=\"0 0 1920 1080\">\n  <Ejes box={{ x: 120, y: 90, w: 1680, h: 830 }} h={1} v={1} quiet\n    labels={{ top: \"hacer\", bottom: \"entender\", left: \"aprender\", right: \"trabajar\" }}\n    focus=\"tl\" />\n</svg>"},{"title":"Draw the axes on a timeline (Remotion)","code":"import { useCurrentFrame, interpolate } from \"remotion\"\nimport { Ejes } from \"@/jbm/ui/ejes\"\n\nfunction Brujula() {\n  const frame = useCurrentFrame()\n  const h = interpolate(frame, [120, 168], [0, 1], { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" })\n  const v = interpolate(frame, [204, 240], [0, 1], { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" })\n  return (\n    <svg viewBox=\"0 0 1920 1080\">\n      <Ejes box={{ x: 120, y: 90, w: 1680, h: 830 }} h={h} v={v}\n        labels={{ top: \"hacer\", bottom: \"entender\", left: \"aprender\", right: \"trabajar\" }} />\n    </svg>\n  )\n}"},{"title":"The one vermilion answer quadrant (opt-in)","code":"import { Ejes } from \"@/jbm/ui/ejes\"\n\n<svg viewBox=\"0 0 1920 1080\">\n  <Ejes box={{ x: 120, y: 90, w: 1680, h: 830 }} h={1} v={1} quiet\n    labels={{ top: \"hacer\", bottom: \"entender\", left: \"aprender\", right: \"trabajar\" }}\n    focus=\"tr\" focusTone=\"accent\" focusProgress={0.6} />\n</svg>"}],"qa":["Drag Horizontal and Vertical independently from Hidden to Drawn in both Grow from modes: each axis grows only by its own control, and each label fades in as the line reaches it, not before.","Drag Quiet from Full to Quiet: labels shrink toward the axis ends without moving off them; at Quiet they are small but readable.","Step Focus through each quadrant and All four with every Tone: outlines never cross a label or an axis, and all four are the same size, mirrored about both axes; Light fill has no outline; with Accent only one quadrant (the first) is vermilion, the rest ink.","Drag Outline: the rounded outline draws around its perimeter; at 0 nothing shows.","Check a narrow screen: the labels stay inside the box and stay legible at quiet size.","Pass a center near a corner (e.g. { x: 90, y: 300 } in a 580 × 380 box): the crossing moves only as far as its labels allow, no label leaves the box or crosses an axis, and focus outlines too small to read are not drawn."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"}],"docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"mano","entry":"component","title":"Mano","description":"Position and rotate the independent Hand illustration with controlled coordinates.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/hand","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/mano","installName":"mano","page":"https://jbm-ui.bns.studio/c/mano","registryItem":"https://jbm-ui.bns.studio/r/mano.json","sourcePath":"registry/jbm/motion/mano.tsx","files":[{"source":"registry/jbm/motion/mano.tsx","target":"src/jbm/motion/mano.tsx","import":"@/jbm/motion/mano","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/mano.md","json":"https://jbm-ui.bns.studio/catalog/mano.json"},"snippet":"import { Mano } from \"@/jbm/motion/mano\"\n\n<svg viewBox=\"0 0 500 340\">\n  <Mano at={{ x: 160, y: 30 }} pose=\"point\" size={155} angle={12} />\n</svg>","api":[{"export":"Mano","kind":"component","summary":"SVG <g> that places the Hand illustration at a point, scales it, and rotates it about that point. Hand owns the artwork and pose; callers own movement (e.g. pointOn and pathTilt along a path). No internal timer. Render inside an <svg>.","props":[{"name":"at","type":"Pt","required":true,"default":null,"description":"Point in the parent SVG's user units: the Hand box's top-left corner, or where the anchor point sits when anchor is set. Rotation pivots here."},{"name":"pose","type":"HandPose","required":false,"default":"\"point\"","description":"Hand pose: open, point, pinch, grip, type, or hold (see Hand)."},{"name":"size","type":"number","required":false,"default":"180","description":"Hand width in parent SVG units. Without anchor the box is size × 44/30 tall (264 at 180) with the 30×29 art centred vertically; with anchor it is size × 29/30 tall."},{"name":"angle","type":"number","required":false,"default":"0","description":"Rotation in degrees about at; positive is clockwise."},{"name":"anchor","type":"Pt","required":false,"default":null,"description":"Local point in the Hand's 30×29 viewBox held at `at`, including during rotation."},{"name":"halo","type":"boolean","required":false,"default":null,"description":"Pass Hand's card knock-out ring through, for ink art drawn behind the hand. Default false."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":180,"height":264},"vertical":{"width":180,"height":264},"basis":"Parent SVG user units at size 180 without anchor: a 180 × 264 box (size × 44/30) from at, with the 180 × 174 hand centred in it (about 45 units of empty space above and below). With anchor the box is size × 29/30 tall and offset so the anchor lands on at. angle rotates the box about at."},"examples":[{"title":"Pointing hand, slightly rotated","code":"import { Mano } from \"@/jbm/motion/mano\"\n\n<svg viewBox=\"0 0 500 340\">\n  <Mano at={{ x: 160, y: 30 }} pose=\"point\" size={155} angle={12} />\n</svg>"},{"title":"Follow a path with its travel tilt","code":"import { Mano, pointOn, pathTilt } from \"@/jbm/motion/mano\"\n\nconst path = [{ x: 40, y: 200 }, { x: 240, y: 60 }, { x: 440, y: 160 }]\nconst progress = 0.4 // from a slider or useProgress\n<svg viewBox=\"0 0 500 340\">\n  <Mano at={pointOn(path, progress)} angle={pathTilt(path, progress)}\n    pose=\"pinch\" size={120} anchor={{ x: 15, y: 14 }} />\n</svg>"}],"qa":["Switch pose through all seven at the same at: the hand stays in its box and does not jump unexpectedly.","Drag Rotation from −30 to 30: the hand pivots about at (or the anchor point), not its centre.","Drag Position through Left, Center, and Right: the hand crosses the stage from its left margin to its right margin without resizing, and stays inside the viewBox at every rotation from −30° to 30°.","Anchor coordinates are in the 30×29 viewBox but each pose applies its own internal transform, so the fingertip lands at a different local point per pose; check the anchor visually for each pose you use."],"related":[{"name":"tokens","relation":"installs"},{"name":"hand","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"pluma","relation":"installed-by"}],"family":"Hands","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"},{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"burbuja","entry":"component","title":"Burbuja","description":"Chat bubble whose selected words sweep to vermilion with a controlled 0–1 highlight.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/chat-bubble","@jbm/text-fill"],"install":"npx shadcn@latest add @jbm/burbuja","installName":"burbuja","page":"https://jbm-ui.bns.studio/c/burbuja","registryItem":"https://jbm-ui.bns.studio/r/burbuja.json","sourcePath":"registry/jbm/motion/burbuja.tsx","files":[{"source":"registry/jbm/motion/burbuja.tsx","target":"src/jbm/motion/burbuja.tsx","import":"@/jbm/motion/burbuja","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/burbuja.md","json":"https://jbm-ui.bns.studio/catalog/burbuja.json"},"snippet":"import { Burbuja } from \"@/jbm/motion/burbuja\"\n\n<Burbuja words={[\"Podemos\", \"reutilizar\", \"componentes.\"]}\n  highlight={[1]} progress={1} speaker=\"Tú\" />","api":[{"export":"Burbuja","kind":"component","summary":"Composes ChatBubble and TextFill: the message is a list of words joined by single spaces, and the words at the `highlight` indices sweep from the surrounding text color to the vermilion accent as `progress` goes from 0 to 1. Pure React with no timer; ordinary HTML handles wrapping.","props":[{"name":"side","type":"\"start\" | \"end\"","required":false,"default":null,"description":"Which side the bubble aligns to and where its tail sits: `start` or `end`."},{"name":"tone","type":"\"paper\" | \"ink\" | \"accent\"","required":false,"default":null,"description":"Bubble fill: `paper` (card with ink text and ChatBubble's ink outline), `ink`, or `accent` (both with cream text). Highlighted words always end in the vermilion accent, so avoid `accent` tone when they must stand out."},{"name":"tail","type":"boolean","required":false,"default":null,"description":"Shows ChatBubble's tail under the bubble, outlined with the body as one line on paper, and reserves 13px of bottom margin for it."},{"name":"speaker","type":"React.ReactNode","required":false,"default":null,"description":"Optional mono label above the message, e.g. the speaker's name."},{"name":"words","type":"readonly string[]","required":true,"default":null,"description":"Message words in order; rendered joined by single spaces."},{"name":"highlight","type":"readonly number[]","required":true,"default":null,"description":"Zero-based indices into `words` that receive the TextFill sweep. Out-of-range indices are ignored."},{"name":"progress","type":"number","required":false,"default":"1","description":"Highlight progress from 0 (highlighted words in the bubble's text color) to 1 (fully vermilion). Clamped by TextFill; non-finite values render as 0."}],"passthrough":["Omit<ChatBubbleProps, \"children\">"]}],"stage":{"mode":"fluid","reason":"ChatBubble is fit-content up to 100% of its container, so width follows the words and height follows wrapping. At 18px type with line-height 1.5 it adds 16px/20px of padding and edge, an optional ~20px speaker line, and 13px for the tail."},"examples":[{"title":"Highlight one word","code":"import { Burbuja } from \"@/jbm/motion/burbuja\"\n\n<Burbuja words={[\"Podemos\", \"reutilizar\", \"componentes.\"]}\n  highlight={[1]} progress={1} speaker=\"Tú\" />"},{"title":"Drive the highlight from a Remotion timeline","code":"import { Burbuja } from \"@/jbm/motion/burbuja\"\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 SpeakingBubble() {\n  const progress = useProgress(0.5, 1, 0.8)\n  return <Burbuja side=\"end\" words={[\"Una\", \"pieza\", \"a\", \"la\", \"vez.\"]} highlight={[1, 4]} progress={progress} />\n}"}],"qa":["Drag Highlight through 0, 0.5, and 1: only the selected words change color, the sweep runs left to right, and at 1 they rest in vermilion.","Check spacing and wrapping are unchanged by the highlight: highlighted words keep the bubble's font size, weight, and line height.","Compare paper, ink, and accent tones and both sides; note that the accent tone hides an accent highlight.","Verify at a narrow width that long words wrap inside the bubble and the tail stays attached."],"related":[{"name":"tokens","relation":"installs"},{"name":"chat-bubble","relation":"installs"},{"name":"text-fill","relation":"installs"},{"name":"motion-hooks","relation":"example-import"}],"docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"pluma","entry":"component","title":"Pluma","description":"A pen held in the Hand's pinch or tripod writing grip, with helpers that report the nib and grip points.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/mano"],"install":"npx shadcn@latest add @jbm/pluma","installName":"pluma","page":"https://jbm-ui.bns.studio/c/pluma","registryItem":"https://jbm-ui.bns.studio/r/pluma.json","sourcePath":"registry/jbm/motion/pluma.tsx","files":[{"source":"registry/jbm/motion/pluma.tsx","target":"src/jbm/motion/pluma.tsx","import":"@/jbm/motion/pluma","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/pluma.md","json":"https://jbm-ui.bns.studio/catalog/pluma.json"},"snippet":"import { Pluma, plumaNib } from \"@/jbm/motion/pluma\"\n\n// The nib ends the written word; solve the grip point from it.\nconst nib = { x: 260, y: 200 }\nconst o = plumaNib({ x: 0, y: 0 }, 30, undefined, 180, \"write\")\n<svg viewBox=\"0 0 600 340\">\n  <Pluma at={{ x: nib.x - o.x, y: nib.y - o.y }} angle={30} size={180} pose=\"write\" />\n</svg>","api":[{"export":"Pluma","kind":"component","summary":"SVG group: an ink pen (one silhouette: round-ended barrel tapering straight on to a pointed nib) held by the Hand through Mano, in one of two grips. `pinch` (default, unchanged): the pen weaves with the pinch: the nib and lower shaft pass behind the thumb and the index pad, and from the grip point (in the open pocket of the pinch, where the change of layer cannot show) the upper shaft crosses in front of the index knuckle. A mask cuts the lower pen along the hand's outline (handOutline) plus a gap half the outline wide; over the hand, a second mask cuts the hand's ink along the upper shaft plus the same half-outline gap (refilled with card only inside the hand's fill) and the shaft is drawn again on top. `write`: the Hand's tripod writing pose, turned so its pen slants as pinch's does at the same angle (a scene swaps grips without re-tuning); the pen lies over the hand (along the index finger and over the web and the back of the hand) and the hand's front (the thumb, handOutline's `front`) over the pen, so the thumb's tip closes on the barrel near the nib; a mask cuts the pen along the front plus its outline and a half-outline gap, so the barrel always stops at the thumb's drawn contour, and the hand's ink is cut along the pen plus the same gap (sparing the front's contours, refilled with card inside the hand's fill). In both grips the barrel's edges and the hand's contours stay separate at every crossing and nothing is painted on the page outside the hand, so writing under or beside the nib stays whole. Rotation, grip point, nib, and grip are props; no internal timer. Render inside an <svg>.","props":[{"name":"at","type":"Pt","required":true,"default":null,"description":"Grip point in parent SVG units: where the hand holds the pen (pinch: the pocket between the fingertips; write: where the barrel crosses the notch between the index and thumb tips). The hand and pen rotate about it."},{"name":"angle","type":"number","required":false,"default":"0","description":"Rotation in degrees about at for hand and pen together; positive is clockwise. At 0 the hand stands upright, wrist down, and both grips' nibs point down and to the left at the same slant; scenes write at about 20–35° and tug at about 50°."},{"name":"nibOffset","type":"Pt","required":false,"default":null,"description":"Nib position relative to at in parent units, before rotation. The pen runs from the nib through at and on past it (17/30 × size for pinch, 26.733/30 × size for write). Defaults to the pose's writing slant: pinch (−7.75, 9.81) × size/30, at size 180 (−46.5, 58.9); write (−5.421, 6.867) × size/30, at size 180 (−32.53, 41.2), the same direction as pinch's. A custom direction turns the hand about at by the same amount, so the barrel always lies in the grip rather than across the palm; the length sets the nib's reach."},{"name":"size","type":"number","required":false,"default":"180","description":"Hand width in parent units, as in Mano; the pen scales with it."},{"name":"hand","type":"boolean","required":false,"default":"true","description":"Draw the Hand. Set false for the pen alone, e.g. released on the desk."},{"name":"pose","type":"PlumaPose","required":false,"default":"\"pinch\"","description":"The grip: `pinch` (default; the Hand's pinch, exactly as before write existed) or `write` (the Hand's tripod writing pose: the barrel along the index finger, the thumb's tip over it near the nib, the upper barrel over the web; same default slant as pinch). plumaPoses lists both."}],"passthrough":[]},{"export":"plumaNib","kind":"function","summary":"Where the nib is for a Pluma drawn with the same at, angle, nibOffset, and size, so ink and pen share one point: drive a PaperLine's reveal, or a thread's start, from it.","params":[{"name":"at","type":"Pt","required":true,"default":null,"description":"The Pluma's grip point."},{"name":"angle","type":"number","required":false,"default":"0","description":"The Pluma's rotation in degrees."},{"name":"nibOffset","type":"Pt","required":false,"default":null,"description":"The Pluma's nibOffset, if set."},{"name":"size","type":"number","required":false,"default":"180","description":"The Pluma's hand width."},{"name":"pose","type":"PlumaPose","required":false,"default":"\"pinch\"","description":"The Pluma's pose; defaults to pinch."}],"returns":"The nib point { x, y } in parent units."},{"export":"plumaCaretGap","kind":"function","summary":"How far right of a caret (the end of the last written glyph) to put the nib so the pen's near edge, cone then barrel, clears the ink for `rise` units above the nib at this rotation. Add it to the caret's x before solving the grip point with plumaNib, so the pen never covers the last glyph.","params":[{"name":"angle","type":"number","required":false,"default":"0","description":"The Pluma's rotation in degrees."},{"name":"rise","type":"number","required":false,"default":"0","description":"How far above the nib the written ink reaches (its ascenders), in parent units."},{"name":"nibOffset","type":"Pt","required":false,"default":null,"description":"The Pluma's nibOffset, if set."},{"name":"size","type":"number","required":false,"default":"180","description":"The Pluma's hand width."},{"name":"pose","type":"PlumaPose","required":false,"default":"\"pinch\"","description":"The Pluma's pose; defaults to pinch."}],"returns":"A distance in parent units, 0 or more."},{"export":"plumaGrip","kind":"function","summary":"Where a pose holds the pen relative to the top-left corner of the Hand's box, for a hand size wide: draw Pluma at that corner plus this point and its hand lands exactly where a bare Hand (or Mano without an anchor) of that size would, e.g. to add the pen to a hand already placed in a scene.","params":[{"name":"pose","type":"PlumaPose","required":false,"default":"\"pinch\"","description":"pinch (default) or write."},{"name":"size","type":"number","required":false,"default":"180","description":"The hand width; default 180."}],"returns":"The grip point { x, y } in parent units."},{"export":"plumaPoses","kind":"constant","summary":"The grips Pluma draws: pinch, write. PlumaPose is its element type."}],"stage":{"mode":"declared","landscape":{"width":188,"height":186},"vertical":{"width":188,"height":186},"basis":"Parent SVG units at size 180, angle 0: the pinching hand fills the 180 × 174 box anchored on the grip point (6.4, 12.1 in the Hand viewBox, so at is 38.4 right of and 72.6 below its top-left corner). The nib reaches 8 left of the box and the barrel end about 12 above it, so the drawing spans about 188 × 186."},"examples":[{"title":"Write with the tripod grip at the film's tilt","code":"import { Pluma, plumaNib } from \"@/jbm/motion/pluma\"\n\n// The nib ends the written word; solve the grip point from it.\nconst nib = { x: 260, y: 200 }\nconst o = plumaNib({ x: 0, y: 0 }, 30, undefined, 180, \"write\")\n<svg viewBox=\"0 0 600 340\">\n  <Pluma at={{ x: nib.x - o.x, y: nib.y - o.y }} angle={30} size={180} pose=\"write\" />\n</svg>"},{"title":"Write a line: the reveal follows the nib","code":"import { Pluma, plumaNib } from \"@/jbm/motion/pluma\"\n\nconst line = { x: 120, y: 200, w: 360 }\nconst progress = 0.4 // from a slider or useProgress\nconst nib = { x: line.x + line.w * progress, y: line.y }\n// Solve the grip point from the nib you want: at = nib − offset.\nconst o = plumaNib({ x: 0, y: 0 })\nconst at = { x: nib.x - o.x, y: nib.y - o.y }\n<svg viewBox=\"0 0 600 340\">\n  <line x1={line.x} y1={line.y} x2={nib.x} y2={nib.y} stroke=\"#20241F\" strokeWidth={3} />\n  <Pluma at={at} />\n</svg>"},{"title":"Writing, then the pen released","code":"import { Pluma } from \"@/jbm/motion/pluma\"\n\n<svg viewBox=\"0 0 1920 1080\">\n  <Pluma at={{ x: 900, y: 460 }} size={260} angle={-10} />\n  <Pluma at={{ x: 1400, y: 820 }} size={260} angle={-80} hand={false} />\n</svg>"}],"qa":["Switch Grip to write and render it writing a word at 20°, 35°, and 50°, at 150 and 180, beside pinch at the same angles: a stranger says \"a hand writing with a pen\"; the pen slants as pinch's does and lands on the same nib point; the barrel runs along the index finger, the thumb's tip closes on it near the nib (the barrel stops a gap short of the thumb's contour), and the upper barrel crosses the web and leaves over the back of the hand.","Grip write at 2× and 8×: no ink of the hand runs into the barrel, no barrel edge ends in the middle of a finger, and the cut in the hand's outline where the barrel leaves over the back of the hand shows card inside the hand and nothing on the page.","Rotate from −40° to 40° with the nib marker on: plumaNib lands on the drawn nib tip at every angle and size.","Enlarge the pinch: the nib and lower shaft pass behind the thumb and the index pad, the pen shows in the pocket between them, and from there the upper shaft crosses in front of the index knuckle, one continuous pen with no gap or seam where it changes layer; a stranger says \"a hand writing with a pen\".","Turn Hand off: the pen alone keeps its length and nib; a stranger names it \"pen\".","At 8× and angles −30°, 0°, 30°: wherever the barrel meets the thumb or index contour a gap separates them (under the hand, the mask gap; over it, the cut in the hand's ink, whose ends fall short of the barrel both inside the hand and on the page); no outline disappears into the barrel, no card or cream ring shows around the hand on the page, and the last written glyph under the nib stays whole.","The underside of the bent index (the pad over the pen) is one smooth curve, with no corner where it turns down toward the thumb.","Set nibOffset to (0, 90) and (−80, 20): the hand turns with the pen and the barrel still passes through the pinch, never behind the palm.","On the bench, drag Write to End at Rotation −30° and 30°: the whole hand, barrel tail included, stays inside the stage."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"mano","relation":"installs"}],"family":"Hands","docs":[{"title":"Desk illustrations guide","url":"https://jbm-ui.bns.studio/docs/desk-components.md"}]},{"name":"paper","entry":"component","title":"Paper","description":"Paper cut-out primitives: a card-stock sheet that can crease, start to tear, and carry a real tab, a slanted Sticker with display type, and a centered Caption.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/paper","installName":"paper","page":"https://jbm-ui.bns.studio/c/paper","registryItem":"https://jbm-ui.bns.studio/r/paper.json","sourcePath":"registry/jbm/ui/paper.tsx","files":[{"source":"registry/jbm/ui/paper.tsx","target":"src/jbm/ui/paper.tsx","import":"@/jbm/ui/paper","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/paper.md","json":"https://jbm-ui.bns.studio/catalog/paper.json"},"snippet":"import { Paper } from \"@/jbm/ui/paper\"\n\n// Drive tension and reveal from your timeline, e.g. interpolate(frame, [0, 60], [0, 1]).\n<Paper\n  w={520}\n  h={760}\n  radius={10}\n  tension={0.9}\n  seam={380}\n  tab={{ label: \"Tutorial\", reveal: 1 }}\n/>","api":[{"export":"Paper","kind":"component","summary":"Flat piece of card stock (border-box, position relative) in cream, vermilion, or ink with an optional ink edge at the shared outline weight (stroke.outline, 3px), the paper drop shadow, and an optional rotation. Under `tension` each pulled corner sends a few short, soft creases into the sheet (under its writing, spreading apart, never meeting or converging) and, from 0.6, a frayed notch tears into the sheet at a seam; `tab` fixes a pestaña behind the top edge that slides out with its reveal. With neither set it renders exactly the original single div. Pure React and controlled; wrap in a motion Pop for entrances.","props":[{"name":"tone","type":"PaperTone","required":false,"default":"\"paper\"","description":"\"paper\" (card fill, ink edge), \"accent\" (vermilion), or \"ink\". Accent and ink edges match their fill."},{"name":"w","type":"number","required":false,"default":null,"description":"Width in stage pixels, including the edge; unset fills the container as a block."},{"name":"h","type":"number","required":false,"default":null,"description":"Height in stage pixels, including the edge; unset follows children."},{"name":"radius","type":"number","required":false,"default":"22","description":"Corner radius in stage pixels."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Rotation in degrees (positive is clockwise); 0 applies no transform."},{"name":"edge","type":"boolean","required":false,"default":"true","description":"Draws the ink edge at the shared outline weight (stroke.outline, 3px); false removes the border."},{"name":"shadow","type":"boolean","required":false,"default":"true","description":"Applies paperShadow; false renders flat."},{"name":"tension","type":"number","required":false,"default":"0","description":"0–1 stress on the sheet. Each pulled corner sends two short creases inward (deterministic in `seed`), turned 7–11° to either side of the corner's diagonal, the second shorter. They start at the pulled corner itself (a few px apart on the rounded contour) and only spread from there: no two share an end or meet. They fade from the corner, grow to full length at 0.8, and the longer is at most 14% of the sheet's shorter side, so they stay at the corner, under the writing's margins. From 0.6 a notch tears into the sheet at `seam`: square-root eased, it is already half its depth with a 17px mouth at 0.7, and at 1 runs in 14% of the width (at most 90px; 64px without `w`) with a 24px mouth. It is a frayed wedge, widest at the edge, narrowing fast and running out as a single crack; its lips are ink on the cream stock and a cream hairline on vermilion or ink stock, and the mouth shows the page beneath; inside the mouth a thin band of the house rule tone is the upper lip's shadow, so it reads as a hole cut into the sheet. 0 draws neither and keeps the plain rendering."},{"name":"pull","type":"PaperCorner[]","required":false,"default":"allCorners","description":"Corners being pulled, from \"tl\", \"tr\", \"br\", \"bl\", in any combination; each fans its own short creases. Default all four; [] creases nothing."},{"name":"seam","type":"number | null","required":false,"default":null,"description":"Y of the starting tear in stage px from the top edge; default half of `h` (50% without `h`). Use a Tear seam to continue the same edge. null draws creases only."},{"name":"seamSide","type":"\"left\" | \"right\"","required":false,"default":"\"left\"","description":"\"left\" or \"right\": the edge the tear starts from."},{"name":"seed","type":"number","required":false,"default":"1","description":"Fray pattern of the starting tear, and the creases' lengths and angles. With the same seed, seam, and w as a Tear, the midline between the lips follows that Tear's seam; each lip adds small fibres so the two sides are not a smooth mirror."},{"name":"tab","type":"PaperTab","required":false,"default":null,"description":"A pestaña fixed behind the top edge: `{ label, reveal = 1, offset = max(radius, 24), size = 32 }`. The label is Geist 800 at `size` stage px in the tone's text colour (ink on paper). `reveal` 0 hides the whole tab behind the sheet; 1 shows it with its base still tucked 14px behind the edge. It shares the sheet's stock, edge, and shadow. The tab stays on the sheet: it sits in a row from the left edge to the top-right radius, so a tab too long for its offset slides left; on a sized sheet a label too long for that row sets smaller (sansWidth) so the whole name fits, and without a width it ends in an ellipsis."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last, for example padding or layout for children."},{"name":"children","type":"React.ReactNode","required":false,"default":null,"description":"Content placed on the paper. Creases are folds in the stock and lie under it, so the writing is never crossed out (draw result boxes filled with the stock, as RegisterInk does, and no crease shows through them); the tear's lips and its shadow band draw above it, and the tear's mouth cuts through it, so writing across the seam never covers the hole."}],"passthrough":[]},{"export":"Sticker","kind":"component","summary":"Inline-block Paper holding one non-wrapping line of 800-weight display type; the loud word of a scene. Radius is round(size × 0.22) and padding round(size × 0.18) by round(size × 0.4); the edge is drawn only for the paper tone.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"The word or short phrase; kept on one line."},{"name":"tone","type":"PaperTone","required":false,"default":"\"accent\"","description":"\"accent\" (vermilion, default), \"ink\", or \"paper\"; text is cream on accent and ink, ink on paper."},{"name":"size","type":"number","required":false,"default":"72","description":"Font size in stage pixels; radius and padding scale with it."},{"name":"rotate","type":"number","required":false,"default":"-5","description":"Tilt in degrees; negative leans counter-clockwise."},{"name":"mono","type":"boolean","required":false,"default":null,"description":"Switches to Geist Mono and drops the negative tracking."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles passed to the underlying Paper, merged after display and padding."}],"passthrough":[]},{"export":"Caption","kind":"component","summary":"Small centered caption under an illustration: sans 600 with line-height 1.2, ink or dim.","props":[{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Caption text, usually lowercase."},{"name":"size","type":"number","required":false,"default":"34","description":"Font size in stage pixels."},{"name":"dim","type":"boolean","required":false,"default":null,"description":"Uses the dim color instead of ink."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged last."}],"passthrough":[]},{"export":"frayEdge","kind":"function","summary":"Deterministic torn edge along a horizontal line: fine, irregular grain at uneven spacing on a slow wander, with the odd fibre sticking out further, like torn paper rather than pinking shears. Paper's starting tear and Tear's seams share it, so the same seed, y, width, and amplitude give the same profile.","params":[{"name":"width","type":"number","required":true,"default":null,"description":"Length of the edge in stage px; it runs from x = 0 to x = width."},{"name":"y","type":"number","required":true,"default":null,"description":"The line the edge follows, in stage px; also keys the pattern."},{"name":"seed","type":"number","required":false,"default":"1","description":"Pattern seed; default 1."},{"name":"amplitude","type":"number","required":false,"default":"FRAY","description":"Tooth size in stage px; default FRAY."},{"name":"step","type":"number","required":false,"default":"12","description":"Spacing scale in stage px; points fall 0.25–0.8 × step apart (about half a step on average). Default 12."}],"returns":"Points `{ x, y }` from x = 0 to x = width, x strictly increasing, each within frayReach(amplitude) of y and most within one amplitude. Non-finite inputs are treated as 0."},{"export":"frayReach","kind":"function","summary":"How far a frayed edge can stray from its line.","params":[{"name":"amplitude","type":"number","required":false,"default":"FRAY","description":"Fray amplitude in stage px; default FRAY."}],"returns":"1.8 × amplitude (0 for a negative amplitude)."},{"export":"paperTension","kind":"function","summary":"Maps a tension value to the two quantities Paper draws.","params":[{"name":"tension","type":"number","required":true,"default":null,"description":"0–1; non-finite values count as 0."}],"returns":"`{ crease, tear }`: crease growth as a share of each crease's full length (tension / 0.8, capped at 1) and tear progress (√((tension − 0.6) / 0.4), from 0 to 1)."},{"export":"FRAY","kind":"constant","summary":"Default fray amplitude, 6 stage px, shared by Paper's starting tear and Tear."},{"export":"paperShadow","kind":"constant","summary":"Box-shadow string: the card contact and ambient layers from shadowLayers plus a longer 18px drop, without the inset edge light. Shared by the ui-bits illustrations."},{"export":"paperFill","kind":"function","summary":"Maps a tone to its fill color.","params":[{"name":"tone","type":"PaperTone","required":true,"default":null,"description":"PaperTone: \"paper\", \"accent\", or \"ink\"."}],"returns":"color.accent for accent, color.ink for ink, otherwise color.card."},{"export":"paperInk","kind":"function","summary":"Maps a tone to the text color that reads on its fill.","params":[{"name":"tone","type":"PaperTone","required":true,"default":null,"description":"PaperTone: \"paper\", \"accent\", or \"ink\"."}],"returns":"color.ink for paper, otherwise color.bg (cream)."},{"export":"PaperTone","kind":"type","summary":"\"paper\" | \"accent\" | \"ink\"."},{"export":"PaperCorner","kind":"type","summary":"\"tl\" | \"tr\" | \"br\" | \"bl\": top-left, top-right, bottom-right, bottom-left."},{"export":"PaperTab","kind":"type","summary":"`{ label: string; reveal?: number; offset?: number; size?: number }`, the tab prop."}],"stage":{"mode":"fluid","reason":"Paper takes w×h when given and otherwise fills its container's width with height following children. A tab rises size + 2 × round(size × 0.3) + 2 × edge width above the top edge at reveal 1 (58px at size 32 with the 3px edge; the 14px tuck is behind the sheet) without changing layout size; the tear cuts into the box and never adds to it. Sticker is inline and sized by its text: at the default size 72 it is about 72 × 1.05 + 2 × 13 ≈ 102 stage px tall. Rotation does not change layout size, so tilted corners can extend beyond the box."},"examples":[{"title":"A sheet pulled from four corners, with a tab","code":"import { Paper } from \"@/jbm/ui/paper\"\n\n// Drive tension and reveal from your timeline, e.g. interpolate(frame, [0, 60], [0, 1]).\n<Paper\n  w={520}\n  h={760}\n  radius={10}\n  tension={0.9}\n  seam={380}\n  tab={{ label: \"Tutorial\", reveal: 1 }}\n/>"},{"title":"Paper, sticker, and caption","code":"import { Paper, Sticker, Caption } from \"@/jbm/ui/paper\"\n\n<Paper w={200} h={130} rotate={-3} style={{ padding: 20 }}>\n  <Caption size={24}>papel</Caption>\n</Paper>\n<Sticker size={40} rotate={-5}>¿otra vez?</Sticker>\n<Sticker tone=\"ink\" size={28} rotate={2}>catálogo</Sticker>"},{"title":"Match a custom illustration to the paper recipe","code":"import { paperFill, paperInk, paperShadow } from \"@/jbm/ui/paper\"\n\n<div style={{ background: paperFill(\"accent\"), color: paperInk(\"accent\"), boxShadow: paperShadow, borderRadius: 22, padding: 24 }}>nota</div>"}],"qa":["Compare paper, accent, and ink tones: the paper tone keeps a 3px ink edge (stroke.outline), accent and ink edges match their fill, and cream text reads on both.","Check rotated pieces and stickers near the safe-area edge: rotation does not reserve layout space, so tilted corners and the longer drop shadow must not clip.","Stickers never wrap; check the longest word at the chosen size fits the frame in portrait.","Toggle edge and shadow off and confirm the piece still separates from the cream canvas where it is used.","Drag Tension through 0, 0.4, 0.7, and 1: two short creases (at most 14% of the shorter side) come in from each pulled corner, starting at the corner and spreading apart, fade toward their tips, and lie under the writing; none shows inside a result box, and at no tension do two meet, converge into a V, or read as an X or a crossed-out page. The tear opens only past 0.6 and at 0.7 is already a clearly visible notch cut into the sheet at the seam: a short frayed wedge narrowing into a crack, never a shape sticking out of the edge or a long spike. Its lips are an ink edge at the outline weight on the sheet's side of the cut (a cream hairline on ink stock), a thin shadow band sits under the upper lip, and the rest of the mouth shows what lies under the sheet rather than a painted fill; over the writing it stays inside the band gap. The mouth cuts the sheet's writing too: with Tear through the writing the notch runs through a table's ruled body and stays open through the rules.","Try each Pulled corners preset and Tear from the right edge, and the tear on the ink stock: there the writing is card-coloured and stays visible.","The bench shows only the sheet, its tension, and its tab; Sticker and Caption appear in the Usage examples.","Drag Tab reveal from 0 to 1: at 0 the whole tab is hidden behind the sheet; in between the label stays hidden until the tab shows most of its capitals, then fades in whole, so the sheet's edge never leaves glyph tops as specks; at 1 the label is Geist 800 at 32 stage px and the tab base stays tucked behind the edge.","With tension 0 and no tab the markup equals the original single div; existing scenes depend on it."],"related":[{"name":"tokens","relation":"installs"},{"name":"rebuild-screens","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","relation":"installed-by"},{"name":"ui-button","relation":"installed-by"},{"name":"ui-input","relation":"installed-by"},{"name":"ui-card","relation":"installed-by"},{"name":"piece","relation":"installed-by"},{"name":"phone-frame","relation":"installed-by"},{"name":"badge","relation":"installed-by"},{"name":"token-glyph","relation":"installed-by"},{"name":"clipped-note","relation":"installed-by"},{"name":"punched-tag","relation":"installed-by"},{"name":"video-print","relation":"installed-by"},{"name":"tear","relation":"installed-by"},{"name":"register","relation":"installed-by"},{"name":"slip","relation":"installed-by"},{"name":"tape-marker","relation":"installed-by"},{"name":"paper-tape","relation":"installed-by"}],"family":"Paper & writing","docs":[{"title":"Surface depth guide","url":"https://jbm-ui.bns.studio/docs/surface-depth.md"},{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"document","entry":"component","title":"Document","description":"Folded paper illustration with optional label and accent heading.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/document","installName":"document","page":"https://jbm-ui.bns.studio/c/document","registryItem":"https://jbm-ui.bns.studio/r/document.json","sourcePath":"registry/jbm/ui/document.tsx","files":[{"source":"registry/jbm/ui/document.tsx","target":"src/jbm/ui/document.tsx","import":"@/jbm/ui/document","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/document.md","json":"https://jbm-ui.bns.studio/catalog/document.json"},"snippet":"import { Document } from \"@/jbm/ui/document\"\n\n<Document label=\"idea.md\" accent style={{ width: 180 }} />","api":[{"export":"Document","kind":"component","summary":"Static SVG sheet with a folded top-right corner, a heading stroke, three grey text lines, and an optional mono label. Without a label it is decorative (aria-hidden); with one it is an image named by the label.","props":[{"name":"label","type":"string","required":false,"default":null,"description":"Mono filename printed near the bottom edge; also the accessible name. Truncated to 15 characters plus an ellipsis when longer than 16. Omit for a decorative sheet."},{"name":"accent","type":"boolean","required":false,"default":"false","description":"Draws the heading stroke in vermilion instead of ink."}],"passthrough":["React.SVGProps<SVGSVGElement>"]}],"stage":{"mode":"declared","landscape":{"width":160,"height":200},"vertical":{"width":160,"height":200},"basis":"Fixed 160×200 viewBox rendered at width 160 and height 200 stage pixels. The style sets height auto and maxWidth 100%, so set style.width to scale it with its 4:5 proportions; other SVG attributes pass through."},"examples":[{"title":"Labelled accent document","code":"import { Document } from \"@/jbm/ui/document\"\n\n<Document label=\"idea.md\" accent style={{ width: 180 }} />"},{"title":"Decorative pair, one tilted","code":"import { Document } from \"@/jbm/ui/document\"\n\n<div style={{ display: \"flex\", gap: 24 }}>\n  <Document style={{ width: \"42%\" }} />\n  <Document label=\"borrador.md\" style={{ width: \"42%\", transform: \"rotate(4deg)\" }} />\n</div>"}],"qa":["Compare accent and ink headings: only the heading stroke changes color.","Try a label longer than 16 characters: it ends with an ellipsis and stays inside the sheet.","Scale with style.width at narrow widths: the fold and ink edge (stroke.outline) keep their 160:200 proportions.","Without a label the SVG is aria-hidden; with one it exposes role img and the label as its name."],"related":[{"name":"tokens","relation":"installs"}],"family":"Paper & writing","docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}]},{"name":"video-print","entry":"component","title":"VideoPrint","description":"A printed video still on a Paper sheet: a pale 16:9 line sketch, an ink scrub rule with anchor ticks, title and date, and an optional punched link tag.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/paper","@jbm/punched-tag"],"install":"npx shadcn@latest add @jbm/video-print","installName":"video-print","page":"https://jbm-ui.bns.studio/c/video-print","registryItem":"https://jbm-ui.bns.studio/r/video-print.json","sourcePath":"registry/jbm/ui/video-print.tsx","files":[{"source":"registry/jbm/ui/video-print.tsx","target":"src/jbm/ui/video-print.tsx","import":"@/jbm/ui/video-print","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/video-print.md","json":"https://jbm-ui.bns.studio/catalog/video-print.json"},"snippet":"import { VideoPrint } from \"@/jbm/ui/video-print\"\n\n<VideoPrint\n  scrub={1}\n  title=\"Sample talk\"\n  date=\"Video · 4 nov 2025\"\n  link=\"example.com/watch?v=sample-talk\"\n/>","api":[{"export":"VideoPrint","kind":"component","summary":"A Paper sheet (radius 10, ink edge, paper shadow) carrying a 16:9 frame in pale ink (an opaque 8% ink-on-card tint, identical with or without the sheet, and an ink outline at the shared outline weight, the same as the sheet edge at every w) with a head-and-shoulders line sketch, a pale scrub track whose ink bar advances with `scrub`, ink ticks at the marks the bar has passed, the title (Geist 700) and date (Geist, Graphite), and, when `link` is set, a PunchedTag with the URL in Geist Mono hanging over the bottom edge. Composes Paper and PunchedTag unchanged. Controlled; no timers.","props":[{"name":"scrub","type":"number","required":true,"default":null,"description":"Playhead 0–1: how far the ink scrub bar has advanced along the rule. Clamped; NaN is 0."},{"name":"marks","type":"readonly number[]","required":false,"default":"[]","description":"Positions 0–1 along the rule. A mark leaves an ink tick once scrub reaches it; its anchor point exists from the start (videoPrintLayout().marks), so a thread can tie on as the tick appears."},{"name":"title","type":"string","required":true,"default":null,"description":"The video's title in bold type under the rule; one line, ellipsis when long."},{"name":"date","type":"string","required":true,"default":null,"description":"The line under the title, usually source and date (\"Video · 4 nov 2025\")."},{"name":"link","type":"string","required":false,"default":null,"description":"A URL set in mono on a punched tag straddling the bottom edge: the sign that this page was opened. One line; a URL longer than the print ends in an ellipsis, so the tag never passes the sheet's right edge. Omit for a print nobody opened."},{"name":"opened","type":"number","required":false,"default":"1","description":"0–1: the tag fades in over the first half and settles up 8 × w/480 px into place from just below its resting spot, so it never rises past it or crosses the date line. Only used with link; 0 hides it."},{"name":"w","type":"number","required":false,"default":"BASE","description":"Width in stage pixels (default 480). Everything scales with it; the height is 0.765 × w."},{"name":"sheet","type":"boolean","required":false,"default":"true","description":"Draw the Paper sheet (default). false keeps the same layout, anchors, and still tint without the sheet, for nesting on a Paper you already have."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged onto the outer box, e.g. position and left/top on a stage."}],"passthrough":[]},{"export":"videoPrintLayout","kind":"function","summary":"Where everything on the print sits, so Hilo threads and hands can reach it. Pass the print's stage position as `at` to get stage coordinates.","params":[{"name":"link","type":"string","required":false,"default":null,"description":"The URL, when the print carries a link tag; only its presence matters here."},{"name":"w","type":"number","required":false,"default":"BASE","description":"Print width in stage pixels (default 480); the layout scales with it."},{"name":"marks","type":"readonly number[]","required":false,"default":"[]","description":"Positions 0–1 along the scrub rule."},{"name":"at","type":"Pt","required":false,"default":"{ x: 0, y: 0 }","description":"The print's top-left corner on your stage (default { x: 0, y: 0 }); every returned point is offset by it."}],"returns":"{ scale, w, h, pad, frame: { x, y, w, h }, rule: { x, y, w }, titleY, dateY, marks: Pt[], tag: Pt | null, tagX, tagMaxW, bounds: { w, h } }. marks[i] is mark i's point on the rule's centreline; tag is the punched hole's centre (on the sheet's bottom edge), or null without a link; tagMaxW is the tag's widest extent from tagX (it stops a padding short of the sheet's right edge); bounds is the box everything draws in, the sheet plus, with a link, the half of the tag that hangs below it."},{"export":"VideoPrintProps","kind":"type","summary":"Props of VideoPrint."}],"stage":{"mode":"declared","landscape":{"width":480,"height":394},"vertical":{"width":480,"height":394},"basis":"At the default w 480: 22px padding, a 436 × 245.25 frame, the rule 12px under it, the title 18px under the rule, the date 30px under the title, then 18 + 22px: a 367.25px sheet. With link, the tag straddles the bottom edge and half of it (15.1 × w/480 + the 3px outline) hangs below, plus the 8 × w/480 it settles up from while `opened` is below 1: 393.35px in all, declared as 394. Every measurement scales with w (sheet height = 0.765 × w); videoPrintLayout().bounds gives the exact box. The tag never extends past the right edge: long URLs end in an ellipsis."},"examples":[{"title":"Video print with an opened link","code":"import { VideoPrint } from \"@/jbm/ui/video-print\"\n\n<VideoPrint\n  scrub={1}\n  title=\"Sample talk\"\n  date=\"Video · 4 nov 2025\"\n  link=\"example.com/watch?v=sample-talk\"\n/>"},{"title":"Tie a thread to a scrub tick","code":"import { VideoPrint, videoPrintLayout } from \"@/jbm/ui/video-print\"\nimport { Hilo } from \"@/jbm/ui/hilo\" // install @jbm/hilo separately\n\ndeclare const scrub: number\nconst at = { x: 1200, y: 300 }\nconst marks = [0.2, 0.45, 0.7]\nconst tick = videoPrintLayout({ marks }, at).marks[1]\n<div style={{ position: \"relative\", width: 1920, height: 1080 }}>\n  <VideoPrint scrub={scrub} marks={marks} title=\"Sample talk\" date=\"Video · 4 nov 2025\" style={{ position: \"absolute\", left: at.x, top: at.y }} />\n  <svg viewBox=\"0 0 1920 1080\" style={{ position: \"absolute\", inset: 0 }}>\n    <Hilo from={tick} to={{ x: 520, y: 400 }} curve=\"s\" bend={0.5} draw={scrub >= 0.45 ? 1 : 0} />\n  </svg>\n</div>"}],"qa":["Drag Scrub from 0 to 1: the ink bar grows from the left edge of the frame, each tick appears exactly when the bar reaches it, and nothing inks ahead of the bar.","The frame reads as a pale sketch (tinted fill, ink outline, head circle and shoulder arc), never a solid ink block; compare with the video and puertas board panels.","Toggle the link and drag Tag drops in: the mono URL tag straddles the bottom edge, its hole ringed in ink and scaled with the print (PunchedTag scale = w/480), and stays inside the declared bounds; a long URL ends in an ellipsis instead of wrapping or passing the sheet's right edge. At every step of the drop the tag's top edge stays below the date line, and at Half it is opaque.","Turn the sheet off: the frame, rule, and type keep their positions (anchors unchanged), and the still keeps exactly the same tint.","Check a thread tied to videoPrintLayout().marks lands on the tick centreline, at w 300 and 480.","The print uses no vermilion of its own."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"punched-tag","relation":"installs"},{"name":"hilo","relation":"example-import"}],"family":"Paper & writing","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"hilo","entry":"component","title":"Hilo","description":"An ink thread tied between two points that lays out, sags, and snaps into frayed ends with an optional vermilion notch.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/hilo","installName":"hilo","page":"https://jbm-ui.bns.studio/c/hilo","registryItem":"https://jbm-ui.bns.studio/r/hilo.json","sourcePath":"registry/jbm/ui/hilo.tsx","files":[{"source":"registry/jbm/ui/hilo.tsx","target":"src/jbm/ui/hilo.tsx","import":"@/jbm/ui/hilo","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/hilo.md","json":"https://jbm-ui.bns.studio/catalog/hilo.json"},"snippet":"import { Hilo } from \"@/jbm/ui/hilo\"\n\ndeclare const progress: number\n// Draw it over the stage, in the same units as your sheet and drawer.\n<svg viewBox=\"0 0 1920 1080\" style={{ position: \"absolute\", inset: 0 }}>\n  <Hilo from={{ x: 520, y: 402 }} to={{ x: 1340, y: 236 }} curve=\"s\" bend={0.5} draw={progress} />\n</svg>","api":[{"export":"Hilo","kind":"component","summary":"SVG <g> of an ink thread: one exact cubic Bézier while laying or tied, two pinned pieces after a snap (cut square, each end splitting into two or three short tapered strands), an optional vermilion tint on the broken tips, and ink knots at the tied points. No arrows. Controlled and deterministic: every quantity comes from props, with no timer or randomness. Render inside an <svg> whose units match your anchors.","props":[{"name":"from","type":"Pt","required":true,"default":null,"description":"Where the thread is tied first ({ x, y } in the parent SVG's user units). The first piece always starts exactly here."},{"name":"to","type":"Pt","required":true,"default":null,"description":"Where the thread is tied last ({ x, y }, same units). Once laid, the last piece always ends exactly here, snapped or not."},{"name":"bend","type":"number","required":false,"default":null,"description":"Curvature; 0 is straight. With curve `arc`, a sideways bow as a fraction of the from→to distance (positive bows left of travel: upward for a left-to-right thread). With curve `s`, the length of the level handles as a fraction of the horizontal distance (0.5 is a soft S), clamped to 0–1: shorter handles would point back past the anchors and hook the thread around its own knots."},{"name":"curve","type":"HiloCurve","required":false,"default":null,"description":"`arc` bows the thread sideways; `s` leaves `from` and arrives at `to` level, like a line of writing tied to a folder tab."},{"name":"draw","type":"number","required":false,"default":null,"description":"Progress 0–1. Without snapAt it lays the thread from `from` to `to` by arc length. With snapAt, 0 → snapAt lays it and snapAt → 1 snaps it: the ends recoil apart, fray, and hang by `slack`. Clamped; NaN is 0."},{"name":"width","type":"number","required":false,"default":null,"description":"Thread stroke width in user units (minimum 0.5); defaults to the shared outline, stroke.outline (3). Knots are 1.4× it in radius; frayed strands split the cut between them; the notch tints each broken tip at this width. A snapped end is cut square. The bench's Width runs from 1.5, so the thread never renders as a faint hairline."},{"name":"snapAt","type":"number","required":false,"default":null,"description":"The draw value (0–1) at which the laid thread snaps. Omit for a thread that never snaps. 0 starts fully laid, so draw drives only the snap."},{"name":"breakAt","type":"number","required":false,"default":null,"description":"Where the thread parts, as a fraction of its length from `from`; clamped to 0.05–0.95. The gap opens symmetrically around it: about a fifth of the length, at most 90 units (20 widths for a thick thread), moved inward just enough to leave each end a stub longer than its knot and strands."},{"name":"fray","type":"number","required":false,"default":null,"description":"0–1: how each broken end frays: two short tapered strands below 0.5, three from 0.5. Their bases tile the square cut (so the thread splits into them with no step and no round cap), and each runs straight on along the thread, turning at most 8° toward gravity, no longer than about 1.5 widths (never under 3 units): a frayed end, never claws, legs, or a fan. 0 is a clean, square cut."},{"name":"slack","type":"number","required":false,"default":null,"description":"0–1. Before a snap, how far the thread sags under gravity (the middle drops up to a quarter of the from→to distance). As the ends recoil that sag hands over to the ends: fully snapped, the route no longer sags and each end hangs from its own anchor, tangent there, its free tip dropping up to half its piece's length. With slack the bow of an arc relaxes as the ends recoil, so limp ends always droop downward, never arch up, whichever way the arc bowed."},{"name":"notch","type":"boolean","required":false,"default":null,"description":"Marks the break in vermilion on the broken ends themselves: the last max(5, 3 × width) units of each piece, along its own curve and at the thread's width, and their strands. Never a free capsule floating in the gap, so the snapped thread reads as two broken ends, not a thread with a bead. The only accent the thread draws."},{"name":"knots","type":"boolean","required":false,"default":null,"description":"Small ink dots at the tied points: `from` as soon as any thread is laid, `to` once it is fully laid."}],"passthrough":[]},{"export":"hiloGeometry","kind":"function","summary":"The geometry Hilo draws, for tests and composites (a hand pinching the thread, a label at the break).","params":[{"name":"from","type":"Pt","required":true,"default":null,"description":"Where the thread is tied first ({ x, y } in the parent SVG's user units). The first piece always starts exactly here."},{"name":"to","type":"Pt","required":true,"default":null,"description":"Where the thread is tied last ({ x, y }, same units). Once laid, the last piece always ends exactly here, snapped or not."},{"name":"bend","type":"number","required":false,"default":"0","description":"Curvature; 0 is straight. With curve `arc`, a sideways bow as a fraction of the from→to distance (positive bows left of travel: upward for a left-to-right thread). With curve `s`, the length of the level handles as a fraction of the horizontal distance (0.5 is a soft S), clamped to 0–1: shorter handles would point back past the anchors and hook the thread around its own knots."},{"name":"curve","type":"HiloCurve","required":false,"default":"\"arc\"","description":"`arc` bows the thread sideways; `s` leaves `from` and arrives at `to` level, like a line of writing tied to a folder tab."},{"name":"draw","type":"number","required":false,"default":"1","description":"Progress 0–1. Without snapAt it lays the thread from `from` to `to` by arc length. With snapAt, 0 → snapAt lays it and snapAt → 1 snaps it: the ends recoil apart, fray, and hang by `slack`. Clamped; NaN is 0."},{"name":"width","type":"number","required":false,"default":"stroke.outline","description":"Thread stroke width in user units (minimum 0.5); defaults to the shared outline, stroke.outline (3). Knots are 1.4× it in radius; frayed strands split the cut between them; the notch tints each broken tip at this width. A snapped end is cut square. The bench's Width runs from 1.5, so the thread never renders as a faint hairline."},{"name":"snapAt","type":"number","required":false,"default":null,"description":"The draw value (0–1) at which the laid thread snaps. Omit for a thread that never snaps. 0 starts fully laid, so draw drives only the snap."},{"name":"breakAt","type":"number","required":false,"default":"0.5","description":"Where the thread parts, as a fraction of its length from `from`; clamped to 0.05–0.95. The gap opens symmetrically around it: about a fifth of the length, at most 90 units (20 widths for a thick thread), moved inward just enough to leave each end a stub longer than its knot and strands."},{"name":"fray","type":"number","required":false,"default":"0.6","description":"0–1: how each broken end frays: two short tapered strands below 0.5, three from 0.5. Their bases tile the square cut (so the thread splits into them with no step and no round cap), and each runs straight on along the thread, turning at most 8° toward gravity, no longer than about 1.5 widths (never under 3 units): a frayed end, never claws, legs, or a fan. 0 is a clean, square cut."},{"name":"slack","type":"number","required":false,"default":"0","description":"0–1. Before a snap, how far the thread sags under gravity (the middle drops up to a quarter of the from→to distance). As the ends recoil that sag hands over to the ends: fully snapped, the route no longer sags and each end hangs from its own anchor, tangent there, its free tip dropping up to half its piece's length. With slack the bow of an arc relaxes as the ends recoil, so limp ends always droop downward, never arch up, whichever way the arc bowed."},{"name":"notch","type":"boolean","required":false,"default":"false","description":"Marks the break in vermilion on the broken ends themselves: the last max(5, 3 × width) units of each piece, along its own curve and at the thread's width, and their strands. Never a free capsule floating in the gap, so the snapped thread reads as two broken ends, not a thread with a bead. The only accent the thread draws."},{"name":"knots","type":"boolean","required":false,"default":"true","description":"Small ink dots at the tied points: `from` as soon as any thread is laid, `to` once it is fully laid."}],"returns":"{ base, length, lay, recoil, snapped, width, pieces, inked, strands, notch, knots, knotRadius }: base is the resting cubic [start, handle, handle, end]; lay and recoil are the two phases (0–1); pieces are the whole laid or snapped cubics (pieces[0][0] is always `from`, and when laid the last piece ends at `to`); inked are the pieces as drawn in ink, each broken end short of its tint; strands are tapered strand outlines [base corner, point, base corner]; notch is the list of vermilion tints (the exact ends of the pieces), empty without `notch`; knots are the tied points. A thread laid to within six widths of `to` counts as laid, so its far knot shows."},{"export":"cubicPoint","kind":"function","summary":"A point on a cubic Bézier, for placing things along hiloGeometry's pieces.","params":[{"name":"c","type":"HiloCubic","required":true,"default":null,"description":"Cubic [start, handle, handle, end]."},{"name":"t","type":"number","required":true,"default":null,"description":"Curve parameter 0–1 (not arc length)."}],"returns":"{ x, y } in the cubic's units."},{"export":"HiloProps","kind":"type","summary":"Props of Hilo and hiloGeometry."},{"export":"HiloCurve","kind":"type","summary":"\"arc\" | \"s\": the curve family bend shapes."},{"export":"HiloCubic","kind":"type","summary":"A cubic Bézier as four points: start, two handles, end."}],"stage":{"mode":"fluid","reason":"Spans its anchors: the box from `from` to `to`, plus the bow (bend × distance for `arc`), the sag (up to slack × a quarter of the distance below the chord), and after a snap the hanging ends (up to half of each piece below its anchor, replacing the sag). Knots add 1.4 × width around each anchor. Size the parent SVG for those extremes."},"examples":[{"title":"Tie a line of writing to a folder tab","code":"import { Hilo } from \"@/jbm/ui/hilo\"\n\ndeclare const progress: number\n// Draw it over the stage, in the same units as your sheet and drawer.\n<svg viewBox=\"0 0 1920 1080\" style={{ position: \"absolute\", inset: 0 }}>\n  <Hilo from={{ x: 520, y: 402 }} to={{ x: 1340, y: 236 }} curve=\"s\" bend={0.5} draw={progress} />\n</svg>"},{"title":"Snap into a vermilion gap","code":"import { Hilo } from \"@/jbm/ui/hilo\"\n\ndeclare const progress: number\n// draw 0 → 0.5 lays the thread; 0.5 → 1 snaps it.\n<svg viewBox=\"0 0 500 200\">\n  <Hilo from={{ x: 40, y: 100 }} to={{ x: 460, y: 100 }} draw={progress} snapAt={0.5} breakAt={0.4} fray={0.6} notch />\n</svg>"},{"title":"Thread from a drawer's folder tab","code":"import { Hilo } from \"@/jbm/ui/hilo\"\nimport { Cajon, cajonLayout } from \"@/jbm/motion/cajon\" // install @jbm/cajon separately\n\nconst drawer = { x: 520, y: 10, open: 1, folders: [{ name: \"Taylor 1911\" }] }\nconst tab = cajonLayout(drawer).folders[0].anchor\n<svg viewBox=\"0 -260 1000 700\">\n  <Cajon {...drawer} />\n  <Hilo from={{ x: 60, y: 120 }} to={tab} curve=\"s\" bend={0.5} slack={0.1} />\n</svg>"}],"qa":["Drag Draw from 0 to 1 without a snap: the thread grows from `from` along one smooth curve, the `from` knot appears first, and the `to` knot only when it arrives.","Turn on the snap and drag past 50%: at the snap the two pieces coincide with the tied thread (no jump), then recoil apart; `from` and `to` never move.","Snapped at the bench defaults reads as broken at a glance: two slack ends apart, each a square cut splitting into short strands, the broken tips tinted vermilion along their own curve at the thread's width (no floating bar or bead in the gap). Fray 0 is a clean square cut; 1 gives three strands per end that tile the cut, straight on along the thread, never claws, legs, or a fan.","Slack 0 keeps the snapped ends on the original line (the rompe look); 1 lets them hang limply as two ends, each from its own anchor, never one deep V. With Curve arc, Slack Limp, both halves droop (never arch up). The tints stay on the tips at every slack and are the only vermilion.","Try Break point 5% and 95%, Bend at both ends of its range (−0.3 to 0.3 for arc, 0 to 1 for S), both curve families, Slack 1, and Width 1 and 6 at 8× zoom: nothing leaves the viewBox, no S hooks around its knots at any width, and both tints sit on the tips at every combination.","Place the anchors on real objects (a Cajon tab from cajonLayout, a VideoPrint mark from videoPrintLayout) and check the knots land on them. In the bench's Thread to drawer scene, knots sit on each tab's left edge, more than a knot's radius clear of its name; a thread into a tab below the rim passes behind the side wall (the wall is drawn over its inside segment) and never across the wall's face or the drawer front; no two threads cross; closing the drawer hides each thread behind the front at its own spot. On a phone the scene uses a narrower stage, so tab names stay legible."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"cajon","relation":"example-import"}],"family":"Paper & writing","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"tear","entry":"component","title":"Tear","description":"A sheet torn into strips along seams: controlled progress moves each strip to its own destination, with frayed, seeded edges at every seam.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper","@jbm/register"],"install":"npx shadcn@latest add @jbm/tear","installName":"tear","page":"https://jbm-ui.bns.studio/c/tear","registryItem":"https://jbm-ui.bns.studio/r/tear.json","sourcePath":"registry/jbm/ui/tear.tsx","files":[{"source":"registry/jbm/ui/tear.tsx","target":"src/jbm/ui/tear.tsx","import":"@/jbm/ui/tear","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/tear.md","json":"https://jbm-ui.bns.studio/catalog/tear.json"},"snippet":"import { Tear } from \"@/jbm/ui/tear\"\n\n// progress comes from your timeline, e.g. interpolate(frame, [0, 45], [0, 1]).\n<Tear\n  w={520}\n  h={760}\n  seams={[190, 380, 570]}\n  progress={0.6}\n  stagger={0.1}\n  pieces={[\n    { to: { x: -40, y: -70, rotate: -5 } },\n    { to: { x: 36, y: -24, rotate: 3 } },\n    { to: { x: -30, y: 24, rotate: -2 } },\n    { to: { x: 34, y: 72, rotate: 3 } },\n  ]}\n>\n  {({ index, top }) => (\n    <div style={{ position: \"absolute\", left: 40, top: top + 32 }}>strip {index + 1}</div>\n  )}\n</Tear>","api":[{"export":"Tear","kind":"component","summary":"A w × h Paper-style sheet cut at `seams` into strips. At progress 0 the strips tile the sheet exactly and no seam shows; as progress rises each strip parts from its neighbours and then drifts and turns toward its destination (tearMotion), its frayed seam edges fade in over its first 5% of travel, and the sheet's shadow hands over to per-strip shadows. A seam that has not opened yet shows no line and no shadow, even while other strips move. Writing is laid out once on the whole sheet and clipped to each strip. Strips travel past the w × h root: reserve tearBounds. Pure React, controlled, and deterministic per frame.","props":[{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage px."},{"name":"h","type":"number","required":true,"default":null,"description":"Sheet height in stage px."},{"name":"seams","type":"number[]","required":true,"default":null,"description":"Seam y positions in stage px from the top; n usable seams make n + 1 strips. Non-finite values, seams closer than frayReach(fray) + 4 to an edge, and seams closer than twice that to the previous seam are dropped (see tearSeams)."},{"name":"progress","type":"number","required":true,"default":null,"description":"0 = the whole sheet, 1 = every strip at its destination. Clamped and not eased; ease it yourself."},{"name":"pieces","type":"TearPiece[]","required":false,"default":"[]","description":"Destinations top to bottom: `{ to: { x, y, rotate } }`, an offset in stage px from the strip's place in the whole sheet and a turn in degrees about the strip's centre. A missing entry or field stays put. `y` follows the strip's progress and `x` and `rotate` its square (tearMotion). With a stagger, give every strip but the last a y at or above the one below it (the last may move down), so no strip slides back into its neighbour."},{"name":"stagger","type":"number","required":false,"default":"0","description":"Delay between strips as a share of progress: strip i starts at i × stagger and all finish at 1. Capped at 0.9 / (strips − 1)."},{"name":"seed","type":"number","required":false,"default":"1","description":"Fray pattern. Paper's starting tear with the same seed, seam y, and w follows the same edge."},{"name":"fray","type":"number","required":false,"default":"FRAY","description":"Fray amplitude in stage px (default FRAY, 6); edges stay within 1.8 × fray of the seam."},{"name":"tone","type":"PaperTone","required":false,"default":"\"paper\"","description":"\"paper\" (card fill, ink edge), \"accent\", or \"ink\", as in Paper."},{"name":"radius","type":"number","required":false,"default":null,"description":"Corner radius of the sheet's four outer corners in stage px; strips keep square corners at seams. Default sheetRadius(w) from Register (6 px on a 360 px sheet, 6 × w / 360, at least 4), so a torn page keeps the corners of the Register sheet it was."},{"name":"edge","type":"boolean","required":false,"default":"true","description":"Draws the shared outline (stroke.outline) on straight edges and, once torn, on frayed edges."},{"name":"shadow","type":"boolean","required":false,"default":"true","description":"Paper shadow for the sheet and then each strip."},{"name":"children","type":"ReactNode | ((piece: TearPieceInfo) => ReactNode)","required":false,"default":null,"description":"The sheet's writing on the whole w × h sheet, clipped to each strip. A node is repeated in every strip; a function `({ index, top, bottom, progress }) => node` is called per strip (coordinates are the sheet's). Copies after the first strip are aria-hidden."},{"name":"contentStyle","type":"CSSProperties","required":false,"default":null,"description":"Styles for the w × h content layer each strip clips, for padding or layout."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged onto the w × h root."}],"passthrough":[]},{"export":"tearGeometry","kind":"function","summary":"Outlines for every strip in sheet coordinates. Neighbouring strips share the identical frayed polyline, so together they cover the sheet exactly; with an edge the straight sides sit half the shared outline (1.5px) in, on the centreline of Paper's border.","params":[{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage px."},{"name":"h","type":"number","required":true,"default":null,"description":"Sheet height in stage px."},{"name":"seams","type":"number[]","required":true,"default":null,"description":"Seam y positions; filtered by tearSeams."},{"name":"seed","type":"number","required":false,"default":"1","description":"Fray pattern; default 1."},{"name":"fray","type":"number","required":false,"default":"FRAY","description":"Fray amplitude; default FRAY."},{"name":"radius","type":"number","required":false,"default":null,"description":"Outer corner radius; default sheetRadius(w), Register's sheet corner."},{"name":"edge","type":"boolean","required":false,"default":"true","description":"Insets the straight sides by half the shared outline, on its centreline; default true."}],"returns":"One `{ index, top, bottom, outline, edges, seamAbove, seamBelow, center }` per strip: SVG path data for the closed outline, the straight edges, and each frayed seam (null at the sheet's top or bottom), plus the rotation centre."},{"export":"tearMotion","kind":"function","summary":"Where a strip is at its own progress: it parts along the seam first and drifts and turns as it travels, so the two torn edges of a seam separate as parallel copies and never cross while close.","params":[{"name":"to","type":"TearDestination","required":false,"default":"{}","description":"The strip's destination `{ x?, y?, rotate? }`."},{"name":"progress","type":"number","required":true,"default":null,"description":"The strip's own 0–1 progress (tearPieceProgress); clamped."}],"returns":"`{ x, y, rotate }`: to.x × p², to.y × p, to.rotate × p²."},{"export":"tearBounds","kind":"function","summary":"The box every strip, and with `shadow` its shadow, stays inside at every progress, in the sheet's px (origin at its top-left, so x and y can be negative). Tear's root is only w × h; reserve this box around it.","params":[{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage px, as passed to Tear."},{"name":"h","type":"number","required":true,"default":null,"description":"Sheet height in stage px."},{"name":"seams","type":"number[]","required":true,"default":null,"description":"Seam y positions; filtered by tearSeams."},{"name":"pieces","type":"TearPiece[]","required":false,"default":"[]","description":"The strips' destinations, as passed to Tear."},{"name":"fray","type":"number","required":false,"default":"FRAY","description":"Fray amplitude; default FRAY."},{"name":"shadow","type":"boolean","required":false,"default":"true","description":"Includes the shadows' room (default true): 16px at the sides, 8px above, and 34px below."}],"returns":"`{ x, y, w, h }` in stage px."},{"export":"tearSeams","kind":"function","summary":"The seams Tear uses, from the ones you pass.","params":[{"name":"h","type":"number","required":true,"default":null,"description":"Sheet height in stage px."},{"name":"seams","type":"number[]","required":true,"default":null,"description":"Candidate seam y positions."},{"name":"fray","type":"number","required":false,"default":"FRAY","description":"Fray amplitude; default FRAY."}],"returns":"Finite seams, sorted, at least frayReach(fray) + 4 inside the sheet and at least twice that apart, so frayed edges never cross each other or the sheet's edge."},{"export":"tearPieceProgress","kind":"function","summary":"One strip's own travel after stagger.","params":[{"name":"progress","type":"number","required":true,"default":null,"description":"0–1 overall progress."},{"name":"index","type":"number","required":true,"default":null,"description":"Strip index, top to bottom."},{"name":"count","type":"number","required":true,"default":null,"description":"Number of strips."},{"name":"stagger","type":"number","required":false,"default":"0","description":"Share of progress between strip starts; default 0."}],"returns":"0–1: clamp((progress − index × stagger) / (1 − stagger × (count − 1)))."},{"export":"TearProps","kind":"type","summary":"Props of Tear."},{"export":"TearPiece","kind":"type","summary":"`{ to?: TearDestination }`, one entry of `pieces`."},{"export":"TearDestination","kind":"type","summary":"`{ x?: number; y?: number; rotate?: number }`: offset in stage px and turn in degrees."},{"export":"TearPieceInfo","kind":"type","summary":"`{ index, top, bottom, progress }`, what a render-prop child receives per strip."},{"export":"TearGeometry","kind":"type","summary":"One strip from tearGeometry."}],"stage":{"mode":"fluid","reason":"The root is exactly w × h stage px, the size of the whole sheet; strips move by their destinations beyond it without changing layout. tearBounds(props) returns the box, relative to the root, that every strip and its shadow stays inside at any progress; give the stage at least that. The gallery sizes its stage as the union of tearBounds over every seam count it offers (a 520 × 760 sheet on a stage about 640 × 1000), so no strip or shadow is ever clipped."},"examples":[{"title":"A long page tearing into four register strips","code":"import { Tear } from \"@/jbm/ui/tear\"\n\n// progress comes from your timeline, e.g. interpolate(frame, [0, 45], [0, 1]).\n<Tear\n  w={520}\n  h={760}\n  seams={[190, 380, 570]}\n  progress={0.6}\n  stagger={0.1}\n  pieces={[\n    { to: { x: -40, y: -70, rotate: -5 } },\n    { to: { x: 36, y: -24, rotate: 3 } },\n    { to: { x: -30, y: 24, rotate: -2 } },\n    { to: { x: 34, y: 72, rotate: 3 } },\n  ]}\n>\n  {({ index, top }) => (\n    <div style={{ position: \"absolute\", left: 40, top: top + 32 }}>strip {index + 1}</div>\n  )}\n</Tear>"},{"title":"Continue a Paper's starting tear","code":"import { Paper } from \"@/jbm/ui/paper\"\nimport { sheetRadius } from \"@/jbm/ui/register\"\nimport { Tear } from \"@/jbm/ui/tear\"\n\n// The same seed, seam, and width give the same frayed edge in both; Tear defaults to the sheetRadius(w) corner.\nexport function Page({ torn }: { torn: boolean }) {\n  return torn ? (\n    <Tear w={520} h={760} seams={[380]} progress={0.4} pieces={[{ to: { y: -40, rotate: -3 } }, { to: { y: 40, rotate: 4 } }]} />\n  ) : (\n    <Paper w={520} h={760} radius={sheetRadius(520)} tension={1} seam={380} />\n  )\n}"}],"qa":["At Tear 0 the sheet must look whole: no seam line, hairline, or shadow between strips. Compare it with a plain Paper of the same size and radius.","Drag Tear through 0.02, 0.05, 0.5, and 1: seam edges fade in as the strips part, each strip keeps its frayed edges, and later strips overlap earlier ones.","At 8× zoom check where a frayed seam meets a straight side: the lines join on one centreline with the same 2px width, and each seam side is one clean frayed edge of irregular grain, not a regular zig-zag or two offset rows of teeth.","Drag Tear through 0.03 and 0.1 with Stagger 0.1 and 0.3: the parting strips' torn edges run as parallel copies and never cross, and the seams that have not opened yet show no line or shadow; the sheet's straight sides stay unbroken there.","Step Seams from 1 to 4 and Fray seed from 1 to 9: seams run only through clear rows of the page (a fray reach from every bar, header, numeral, and chevron, 8px from every box edge and table rule), so no torn edge cuts a table header or a bar into a black zig-zag or grazes a rule, frayed edges never cross each other or the sheet's edge, the pattern changes only with the seed, and every strip and shadow stays inside the stage.","Set Stagger to 0 and 0.3: every strip still reaches its destination at progress 1."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"register","relation":"installs"}],"family":"Paper & writing","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"register","entry":"component","title":"Register","description":"Paper sheet of drawn writing whose shape says who reads it: steps, lists, tables, sourced prose, or a mixed page.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/paper"],"install":"npx shadcn@latest add @jbm/register","installName":"register","page":"https://jbm-ui.bns.studio/c/register","registryItem":"https://jbm-ui.bns.studio/r/register.json","sourcePath":"registry/jbm/ui/register.tsx","files":[{"source":"registry/jbm/ui/register.tsx","target":"src/jbm/ui/register.tsx","import":"@/jbm/ui/register","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/register.md","json":"https://jbm-ui.bns.studio/catalog/register.json"},"snippet":"import { Register } from \"@/jbm/ui/register\"\n\n<div style={{ display: \"flex\", gap: 24 }}>\n  <Register kind=\"mono\" n={7} w={300} h={380} />\n  <Register kind=\"plain\" n={10} w={300} h={380} />\n  <Register kind=\"grid\" n={7} w={300} h={380} />\n  <Register kind=\"prose\" sources={8} w={300} h={380} />\n</div>","api":[{"export":"Register","kind":"component","summary":"A Paper sheet (ink edge at the shared outline weight, house paper shadow) carrying one register of drawn writing: bars, boxes, and rules, never legible prose. `mono` is a prompt chevron, prompt bar, and outlined result box per step; `plain` short numbered lists in two columns; `grid` ruled tables with an ink header; `prose` a justified block with paragraph ends (every fifth line and the last, never two in a row and never the first line after a gap) and a block of source ticks; `mixed` stacks registers on one long page. Every quantity is a prop (no timer), so a slider or video frame drives it. Anchors, seams, and the gap are in the sheet's px from its outer top-left corner, the same space `children` draw in.","props":[{"name":"kind","type":"RegisterKind","required":true,"default":null,"description":"Register: mono, plain, grid, prose, or mixed."},{"name":"n","type":"number","required":false,"default":null,"description":"Steps (mono, 0–24, default 7), list groups (plain, 0–24, default 10), tables (grid, 0–12, default 7; one column up to 4, then two, then three), source ticks (prose, 0–16, default 8), or bands (mixed, 0–4 of mono, plain, grid, prose; default 4). 0 draws a blank sheet (prose keeps its lines). Rounded and clamped. More items tighten the packing; the sheet never grows. List numerals set at 12 × scale; source ticks sit 14 × scale apart."},{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage px."},{"name":"h","type":"number","required":true,"default":null,"description":"Sheet height in stage px."},{"name":"sources","type":"number","required":false,"default":null,"description":"Prose only: source ticks, overriding n. In mixed, the prose band's ticks (default 3)."},{"name":"bands","type":"readonly RegisterBand[]","required":false,"default":null,"description":"Mixed only: the stacked registers, top to bottom, each `{ kind, n?, weight? }` (weight sets its share of the page before row pitches are capped; each band then sits at the height its writing actually uses, bands follow each other with even separators at least 2 × (frayReach() + 2) + 8 px tall so a Tear's fray or Paper's starting notch at a seam never reaches the writing, and any leftover height collects at the foot of the page; at most 8 bands). Overrides n. Give a mixed page about the board's proportions (460 × 1000): a squatter sheet compresses every band."},{"name":"gapAt","type":"number","required":false,"default":null,"description":"Row index where a gap opens: mono steps, plain and grid rows of cells, prose lines then the spacer then source rows; for mixed, the band index (0 = above the first band, bands.length = below the last). Rows from here down move to make room; omit for no gap."},{"name":"gap","type":"number","required":false,"default":null,"description":"Gap height in px when fully open. Defaults to a quarter of the writing height; clamped to 60% of it. Marks are sized for the open gap at every reflow value, so reflow moves writing without resizing it."},{"name":"reflow","type":"number","required":false,"default":null,"description":"How open the gap is, 0–1 (default 1): run 1 → 0 on the sheet a slip leaves (it closes) and 0 → 1 on the sheet it lands on (it makes room)."},{"name":"scale","type":"number","required":false,"default":null,"description":"Mark scale: bar thickness, strokes, and spacing. Defaults to w / 360 (clamped 0.4–4), so a 360 px sheet draws 6 px prompt bars and 1.5 px outlines."},{"name":"pad","type":"number","required":false,"default":null,"description":"Inset from the sheet edge to the writing in px (default 20 × scale)."},{"name":"reveal","type":"number","required":false,"default":null,"description":"Writing drawn so far, 0–1: cells ink in reading order, each one left to right; 0 is a blank sheet. The sheet itself is always there."},{"name":"tone","type":"PaperTone","required":false,"default":null,"description":"The stock the writing sits on (Paper's tone, default paper): ink writing on paper; on ink or vermilion stock the writing is card-coloured and dim marks cream at 62%. Result boxes and tables are filled with the stock, so whatever lies under the writing (Paper's creases) never shows through them."},{"name":"accent","type":"readonly number[]","required":false,"default":null,"description":"Cell indices (reading order, see registerLayout) whose lead mark is vermilion: the prompt bar, list heading, table header, prose line, or source tick. Everything else stays ink."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Sheet rotation in degrees (Paper's rotate)."},{"name":"label","type":"string","required":false,"default":null,"description":"Accessible name of the drawing; defaults to “Page of <kind> writing”."},{"name":"children","type":"ReactNode","required":false,"default":null,"description":"Laid over the sheet in sheet px (a Slip at registerGap, a tab, a thread origin)."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Styles merged onto the Paper sheet, e.g. position."}],"passthrough":[]},{"export":"RegisterInk","kind":"component","summary":"The writing alone as an SVG <g> in sheet px, for SVG scenes, tear pieces, or any other surface. Takes the RegisterSpec props plus reveal and accent. Render inside an <svg>.","props":[{"name":"kind","type":"RegisterKind","required":true,"default":null,"description":"Register: mono, plain, grid, prose, or mixed."},{"name":"n","type":"number","required":false,"default":null,"description":"Steps (mono, 0–24, default 7), list groups (plain, 0–24, default 10), tables (grid, 0–12, default 7; one column up to 4, then two, then three), source ticks (prose, 0–16, default 8), or bands (mixed, 0–4 of mono, plain, grid, prose; default 4). 0 draws a blank sheet (prose keeps its lines). Rounded and clamped. More items tighten the packing; the sheet never grows. List numerals set at 12 × scale; source ticks sit 14 × scale apart."},{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage px."},{"name":"h","type":"number","required":true,"default":null,"description":"Sheet height in stage px."},{"name":"sources","type":"number","required":false,"default":null,"description":"Prose only: source ticks, overriding n. In mixed, the prose band's ticks (default 3)."},{"name":"bands","type":"readonly RegisterBand[]","required":false,"default":null,"description":"Mixed only: the stacked registers, top to bottom, each `{ kind, n?, weight? }` (weight sets its share of the page before row pitches are capped; each band then sits at the height its writing actually uses, bands follow each other with even separators at least 2 × (frayReach() + 2) + 8 px tall so a Tear's fray or Paper's starting notch at a seam never reaches the writing, and any leftover height collects at the foot of the page; at most 8 bands). Overrides n. Give a mixed page about the board's proportions (460 × 1000): a squatter sheet compresses every band."},{"name":"gapAt","type":"number","required":false,"default":null,"description":"Row index where a gap opens: mono steps, plain and grid rows of cells, prose lines then the spacer then source rows; for mixed, the band index (0 = above the first band, bands.length = below the last). Rows from here down move to make room; omit for no gap."},{"name":"gap","type":"number","required":false,"default":null,"description":"Gap height in px when fully open. Defaults to a quarter of the writing height; clamped to 60% of it. Marks are sized for the open gap at every reflow value, so reflow moves writing without resizing it."},{"name":"reflow","type":"number","required":false,"default":null,"description":"How open the gap is, 0–1 (default 1): run 1 → 0 on the sheet a slip leaves (it closes) and 0 → 1 on the sheet it lands on (it makes room)."},{"name":"scale","type":"number","required":false,"default":null,"description":"Mark scale: bar thickness, strokes, and spacing. Defaults to w / 360 (clamped 0.4–4), so a 360 px sheet draws 6 px prompt bars and 1.5 px outlines."},{"name":"pad","type":"number","required":false,"default":null,"description":"Inset from the sheet edge to the writing in px (default 20 × scale)."},{"name":"reveal","type":"number","required":false,"default":"1","description":"Writing drawn so far, 0–1: cells ink in reading order, each one left to right; 0 is a blank sheet. The sheet itself is always there."},{"name":"tone","type":"PaperTone","required":false,"default":"\"paper\"","description":"The stock the writing sits on (Paper's tone, default paper): ink writing on paper; on ink or vermilion stock the writing is card-coloured and dim marks cream at 62%. Result boxes and tables are filled with the stock, so whatever lies under the writing (Paper's creases) never shows through them."},{"name":"accent","type":"readonly number[]","required":false,"default":"[]","description":"Cell indices (reading order, see registerLayout) whose lead mark is vermilion: the prompt bar, list heading, table header, prose line, or source tick. Everything else stays ink."}],"passthrough":[]},{"export":"registerLayout","kind":"function","summary":"Pure geometry for a register: every cell (reading order, band, row, kind, box, lead point, anchor, marks), row slots, band boxes, mixed seams, prose anchors, and the gap box, in sheet px. Register and RegisterInk draw exactly this, so hosts can attach threads and tears to the same points.","params":[{"name":"spec","type":"RegisterSpec","required":true,"default":null,"description":"RegisterSpec: kind, n, w, h, sources, bands, gapAt, gap, reflow, scale, pad."}],"returns":"RegisterLayout { w, h, scale, cells, rows, bands, seams, anchors, gap }."},{"export":"registerAnchors","kind":"function","summary":"Prose source tick centres (prose kind or the prose band of mixed), top to bottom, in sheet px: where threads leave the sheet.","params":[{"name":"spec","type":"RegisterSpec","required":true,"default":null,"description":"RegisterSpec."}],"returns":"Pt[]; empty when there is no prose."},{"export":"registerSeams","kind":"function","summary":"Mixed only: the y of each seam between bands, top to bottom, in sheet px, halfway through the space between bands. Tear lines follow them.","params":[{"name":"spec","type":"RegisterSpec","required":true,"default":null,"description":"RegisterSpec."}],"returns":"number[] (bands − 1 values); empty for single registers."},{"export":"registerGap","kind":"function","summary":"The gap's box in sheet px: full writing width, height gap × reflow. Place a slip at the fully open gap (reflow 1) so its resting place does not move while the gap animates.","params":[{"name":"spec","type":"RegisterSpec","required":true,"default":null,"description":"RegisterSpec with gapAt."}],"returns":"Box, or null without gapAt."},{"export":"sheetRadius","kind":"function","summary":"The corner radius of a writing sheet: SHEET_RADIUS × its mark scale, never under 4 px. Register draws its Paper with it and Tear defaults to it, so a torn page keeps the corners of the sheet it was; pass it to a Paper that stands in for a page.","params":[{"name":"w","type":"number","required":true,"default":null,"description":"Sheet width in stage px."},{"name":"scale","type":"number","required":false,"default":null,"description":"The sheet's mark scale, when set; defaults to w / 360 clamped to 0.4–4, as Register's."}],"returns":"Radius in stage px (6 on a 360 px sheet)."},{"export":"SHEET_RADIUS","kind":"constant","summary":"6: a writing sheet's corner radius per unit of mark scale (6 px on a 360 px sheet)."},{"export":"RegisterKind","kind":"type","summary":"\"mono\" | \"plain\" | \"grid\" | \"prose\" | \"mixed\"."},{"export":"RegisterBand","kind":"type","summary":"One band of a mixed page: `{ kind, n?, weight? }`."},{"export":"RegisterSpec","kind":"type","summary":"The geometry props shared by Register, RegisterInk, and the layout helpers."},{"export":"RegisterTone","kind":"type","summary":"\"ink\" | \"dim\" | \"accent\": the fill of a bar mark."},{"export":"RegisterMark","kind":"type","summary":"One drawn mark: bar, outlined box, rule, chevron, or numeral, in sheet px."},{"export":"RegisterCell","kind":"type","summary":"One unit of writing: index, band, row, kind, box, lead, optional anchor, marks."},{"export":"RegisterLayout","kind":"type","summary":"registerLayout's result."},{"export":"RegisterInkProps","kind":"type","summary":"RegisterSpec plus reveal and accent."},{"export":"RegisterProps","kind":"type","summary":"RegisterInkProps plus rotate, label, children, style."}],"stage":{"mode":"declared","landscape":{"width":300,"height":380},"vertical":{"width":300,"height":380},"basis":"Exactly w × h stage px (the gallery uses 300 × 380, and 300 × 700 for mixed, near the board's long-page proportions); n, reveal, gap, and reflow never change the box. Rotation and the paper shadow draw outside it. On a 1920 × 1080 stage the board's quadrant sheets are about 440 × 280 and the long mixed page about 460 × 1000."},"examples":[{"title":"Four readers, four registers","code":"import { Register } from \"@/jbm/ui/register\"\n\n<div style={{ display: \"flex\", gap: 24 }}>\n  <Register kind=\"mono\" n={7} w={300} h={380} />\n  <Register kind=\"plain\" n={10} w={300} h={380} />\n  <Register kind=\"grid\" n={7} w={300} h={380} />\n  <Register kind=\"prose\" sources={8} w={300} h={380} />\n</div>"},{"title":"Long mixed page with seams and source anchors","code":"import { Register, registerSeams, registerAnchors } from \"@/jbm/ui/register\"\n\nconst page = { kind: \"mixed\", w: 380, h: 840 } as const\nconst seams = registerSeams(page) // three y positions: tear lines\nconst anchors = registerAnchors(page) // prose source ticks: thread origins\n\n<Register {...page} reveal={0.6} />"},{"title":"A destination making room","code":"import { Register, registerGap } from \"@/jbm/ui/register\"\n\nconst reflow = 0.5 // from a slider or frame\nconst sheet = { kind: \"prose\", n: 3, w: 250, h: 300, gapAt: 4, gap: 66 } as const\nconst landing = registerGap({ ...sheet, reflow: 1 }) // where the slip settles\n\n<Register {...sheet} reflow={reflow} />"}],"qa":["Switch Kind through all five: each reads as one register at a glance (steps with result boxes, numbered lists, ruled tables, a justified block with source ticks, a stacked page) and no mark forms a legible word.","Step Count from 0 to its maximum for every kind: 0 is a blank sheet (no steps, lists, tables, or bands; prose keeps its lines), marks pack tighter inside the same sheet, nothing crosses the pad or the sheet edge, and grid switches to two columns above 4 tables.","Mixed: every band keeps readable proportions (list numerals at 12 × scale, tables with open rows, not squeezed), and the seams sit in the even gaps between bands.","Drag Reveal 0 → 1: a blank sheet, then cells ink in reading order, each left to right; no mark appears early or pops.","Turn on Gap and drag Reflow 1 → 0 → 1: rows below the gap slide while every mark keeps its size; at 0 the writing is evenly spaced again.","Show seams, anchors, gap: seams sit between mixed bands, anchor rings sit on the source ticks without touching each other or the sheet edge, and the gap box is empty.","Accent first mark: only that lead mark turns vermilion.","Check 2× zoom: chevrons, result-box corners, and table rules are crisp and consistent; outlines never exceed the prompt bar's weight."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"tear","relation":"installed-by"},{"name":"slip","relation":"installed-by"}],"family":"Paper & writing","docs":[{"title":"Writing registers guide","url":"https://jbm-ui.bns.studio/docs/writing-registers.md"}]},{"name":"paper-line","entry":"component","title":"PaperLine","description":"Line of text with controlled grapheme reveal, ink lift, strike-through, and dotted underline.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/paper-line","installName":"paper-line","page":"https://jbm-ui.bns.studio/c/paper-line","registryItem":"https://jbm-ui.bns.studio/r/paper-line.json","sourcePath":"registry/jbm/ui/paper-line.tsx","files":[{"source":"registry/jbm/ui/paper-line.tsx","target":"src/jbm/ui/paper-line.tsx","import":"@/jbm/ui/paper-line","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/paper-line.md","json":"https://jbm-ui.bns.studio/catalog/paper-line.json"},"snippet":"import { PaperLine } from \"@/jbm/ui/paper-line\"\n\n<PaperLine text=\"Una idea clara.\" reveal={0.7} lift={0} strike={0} />","api":[{"export":"PaperLine","kind":"component","summary":"Inline-block line of handwritten-on-paper text. Every progress input is controlled 0–1 (clamped; non-finite values count as 0) with no timer, so a slider or video timeline drives it. Hidden graphemes keep their space, and a visually hidden copy exposes the full text to assistive technology.","props":[{"name":"text","type":"string","required":true,"default":null,"description":"The line's text; revealed by whole graphemes (emoji and combined characters stay intact)."},{"name":"reveal","type":"number","required":false,"default":"1","description":"Share of graphemes shown, 0–1; visible count is ceil(reveal × graphemes). The full footprint is reserved at every value."},{"name":"lift","type":"number","required":false,"default":"0","description":"Ink lift 0–1: the line moves up to 60px right and 40px up, rotates up to −9°, and fades (opacity 1 − lift²)."},{"name":"strike","type":"number","required":false,"default":"0","description":"Vermilion 2px strike-through across the middle, drawn left to right as 0–1 of the line width. Meant for single short lines."},{"name":"dotted","type":"boolean","required":false,"default":"false","description":"Adds a 2px dotted underline in the dim color."},{"name":"accent","type":"boolean","required":false,"default":"false","description":"Uses the vermilion accent for the text instead of ink."},{"name":"mono","type":"boolean","required":false,"default":"false","description":"Uses the mono font stack instead of sans."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last onto the outer span, e.g. fontSize or fontWeight (both inherit by default)."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Inline-block text at the inherited font size with line-height 1.4; width follows the text up to 100% of the container and height grows when it wraps. Lift translates up to 60px right and 40px up without affecting layout, so leave headroom (the gallery pads 32px above)."},"examples":[{"title":"Partly written line","code":"import { PaperLine } from \"@/jbm/ui/paper-line\"\n\n<PaperLine text=\"Una idea clara.\" reveal={0.7} lift={0} strike={0} />"},{"title":"Crossed-out mono note","code":"import { PaperLine } from \"@/jbm/ui/paper-line\"\n\n<PaperLine text=\"v1 descartada\" mono dotted strike={1} style={{ fontSize: 22 }} />"}],"qa":["Drag Reveal from 0 to 1: graphemes appear left to right, the line never changes width, and 0 shows nothing.","Drag Lift ink to 1: the line drifts up-right, tilts, and fades out completely without overlapping controls.","Drag Strike to 1 on a single line; on a wrapped line the stroke sits at the block's vertical middle, so keep struck lines short.","Toggle Dotted underline and Accent ink independently, and check each combination with mono."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"}],"docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"slip","entry":"component","title":"Slip","description":"Taped paper slip of out-of-register writing that peels, lifts, and travels while registers reflow around it.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry","@jbm/paper","@jbm/register"],"install":"npx shadcn@latest add @jbm/slip","installName":"slip","page":"https://jbm-ui.bns.studio/c/slip","registryItem":"https://jbm-ui.bns.studio/r/slip.json","sourcePath":"registry/jbm/ui/slip.tsx","files":[{"source":"registry/jbm/ui/slip.tsx","target":"src/jbm/ui/slip.tsx","import":"@/jbm/ui/slip","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/slip.md","json":"https://jbm-ui.bns.studio/catalog/slip.json"},"snippet":"import { Slip } from \"@/jbm/ui/slip\"\n\n<Slip kind=\"prose\" w={240} h={72} flag />","api":[{"export":"Slip","kind":"component","summary":"A small paper strip carrying a few marks of one register (RegisterInk), with torn masking tape across its top edge. Controlled and timer-free: `lift` peels the tape flap (fully by 0.4), deepens the shadow, raises the slip by 10 × scale px, tilts it 3°, and scales it 4%; `offset` translates it from its resting place. It owns no hand and no path: place it absolutely where it rests (usually registerGap on the source sheet), drive offset along your own path, and hold it with Mano at slipGrip.","props":[{"name":"lift","type":"number","required":false,"default":null,"description":"0 flat on a sheet, 1 held above it. Clamped."},{"name":"offset","type":"Pt","required":false,"default":null,"description":"Translation in px from the resting place (default { x: 0, y: 0 })."},{"name":"tape","type":"boolean","required":false,"default":null,"description":"Masking tape across the top edge with torn ends (default true). Its right third is a flap that peels up as lift goes 0 → 0.4 and sticks again on landing; it stays hinged along its whole fold (it foreshortens as its free end rises), so no notch opens at the hinge."},{"name":"flag","type":"boolean","required":false,"default":null,"description":"Flags the slip as out of place with an ink bracket in the margin beside its left edge (default false): a spine 15 × scale px off the edge with arms reaching back toward the slip, at the shared outline, like an editor's margin mark. The slip keeps its solid edge, so it never reads as a selection marquee. Ink, not vermilion; it moves with the slip."},{"name":"dashed","type":"boolean","required":false,"default":null,"description":"Deprecated alias of flag, kept so existing callers still compile: it draws the same margin bracket, not a dashed outline. Ignored when flag is set."},{"name":"kind","type":"Exclude<RegisterKind, \"mixed\">","required":false,"default":null,"description":"Register drawn on the slip: mono, plain, grid, or prose (default prose)."},{"name":"n","type":"number","required":false,"default":null,"description":"Count for that register: prose source ticks (default 2), mono steps (1), plain groups or grid tables (2)."},{"name":"w","type":"number","required":false,"default":null,"description":"Slip width in px (default 240)."},{"name":"h","type":"number","required":false,"default":null,"description":"Slip height in px (default 72)."},{"name":"rotate","type":"number","required":false,"default":null,"description":"Resting rotation in degrees (default −2)."},{"name":"scale","type":"number","required":false,"default":null,"description":"Mark scale; pass the source sheet's scale (Register uses w / 360) so the slip's bars match the page it sits on. Default 1."},{"name":"reveal","type":"number","required":false,"default":null,"description":"Writing drawn on the slip so far, 0–1 (default 1)."},{"name":"accent","type":"readonly number[]","required":false,"default":null,"description":"Cell indices whose lead mark is vermilion."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Styles merged onto the outer box, e.g. position, left, top."}],"passthrough":[]},{"export":"slipPoint","kind":"function","summary":"Maps a point on the slip (local px from its top-left) to the host's px after lift, rotation, and offset, relative to the slip's resting top-left.","params":[{"name":"props","type":"SlipProps","required":true,"default":null,"description":"The Slip's props (lift, offset, w, h, rotate, scale)."},{"name":"local","type":"Pt","required":true,"default":null,"description":"Point on the slip in its own px."}],"returns":"Pt in the host's px."},{"export":"slipGrip","kind":"function","summary":"Where a pinch holds the slip: the middle of its bottom edge (default) or top edge, in the host's px relative to the resting top-left. Put Mano's pinch there (pose \"pinch\", anchor { x: 6, y: 10 }).","params":[{"name":"props","type":"SlipProps","required":true,"default":null,"description":"The Slip's props."},{"name":"edge","type":"\"top\" | \"bottom\"","required":false,"default":"\"bottom\"","description":"\"bottom\" (default) or \"top\"."}],"returns":"Pt in the host's px."},{"export":"SlipProps","kind":"type","summary":"Slip's props."}],"stage":{"mode":"declared","landscape":{"width":240,"height":72},"vertical":{"width":240,"height":72},"basis":"w × h stage px at the defaults (240 × 72). The tape reaches about 7 × scale px above the top edge, and a peeled flap about 20 × scale px more; lift adds up to 10 × scale px of rise and 4% scale, and offset moves it anywhere, all without affecting layout."},"examples":[{"title":"A taped prose slip, flagged","code":"import { Slip } from \"@/jbm/ui/slip\"\n\n<Slip kind=\"prose\" w={240} h={72} flag />"},{"title":"Lift from one register, land in another","code":"import { Register, registerGap } from \"@/jbm/ui/register\"\nimport { Slip, slipGrip } from \"@/jbm/ui/slip\"\nimport { Mano } from \"@/jbm/motion/mano\" // install @jbm/mano separately\n\nconst t = 0.5 // carry progress from a slider or frame\nconst sheet = { w: 250, h: 300, gap: 66 } as const\nconst src = { ...sheet, kind: \"mono\", n: 6, gapAt: 3 } as const\nconst dst = { ...sheet, kind: \"prose\", n: 3, gapAt: 4 } as const\nconst a = registerGap({ ...src, reflow: 1 })!\nconst b = registerGap({ ...dst, reflow: 1 })!\nconst from = { x: a.x + 30, y: a.y + 7 } // dst sheet sits 300 px to the right\nconst to = { x: 300 + b.x + 30, y: b.y + 7 }\nconst slip = { w: 190, h: 52, scale: 250 / 360, lift: 1,\n  offset: { x: (to.x - from.x) * t, y: (to.y - from.y) * t } }\nconst grip = slipGrip(slip)\n\n<div style={{ position: \"relative\", width: 560, height: 320 }}>\n  <Register {...src} reflow={1 - t} style={{ position: \"absolute\", left: 0, top: 0 }} />\n  <Register {...dst} reflow={t} style={{ position: \"absolute\", left: 300, top: 0 }} />\n  <Slip {...slip} style={{ position: \"absolute\", left: from.x, top: from.y }} />\n  <svg width={560} height={320} style={{ position: \"absolute\", inset: 0, overflow: \"visible\", pointerEvents: \"none\" }}>\n    <Mano at={{ x: from.x + grip.x, y: from.y + grip.y }} pose=\"pinch\" size={96} anchor={{ x: 6, y: 10 }} />\n  </svg>\n</div>"}],"qa":["Drag Lift 0 → 0.4 → 1: the tape flap peels up while staying hinged along its whole fold (no notch or wedge at the hinge), then the slip rises, tilts, and its shadow deepens; back to 0 it lies flat and the flap sticks down continuously.","Drag Carry 0 → 1 with Lift at Held: the slip leaves the Tutorial's gap, arcs over, and settles in the Explicación's gap; the source closes to evenly spaced steps while the destination opens exactly one slip-height of room, and no writing passes under the landed slip.","Toggle Tape, Out-of-place bracket, and Hand independently: each changes only its own object; the bracket is ink, stands in the margin left of the slip at the shared outline, and the slip's own edge stays solid.","With Hand on, check the pinch stays on the slip's bottom edge while the slip is lifted or carried, and that the hand lets go (opens and draws back from the edge) once it lies flat: at Taped + Flat and at Landed + Flat.","Check 2× zoom: torn tape teeth, the fold, and the outline corners join cleanly with even stroke widths."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"register","relation":"installs"},{"name":"mano","relation":"example-import"}],"family":"Paper & writing","docs":[{"title":"Writing registers guide","url":"https://jbm-ui.bns.studio/docs/writing-registers.md"}]},{"name":"paper-clip","entry":"component","title":"PaperClip","description":"Independent ink wire clip to lay across a paper edge.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/paper-clip","installName":"paper-clip","page":"https://jbm-ui.bns.studio/c/paper-clip","registryItem":"https://jbm-ui.bns.studio/r/paper-clip.json","sourcePath":"registry/jbm/ui/paper-clip.tsx","files":[{"source":"registry/jbm/ui/paper-clip.tsx","target":"src/jbm/ui/paper-clip.tsx","import":"@/jbm/ui/paper-clip","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/paper-clip.md","json":"https://jbm-ui.bns.studio/catalog/paper-clip.json"},"snippet":"import { PaperClip } from \"@/jbm/ui/paper-clip\"\n\n<div style={{ position: \"relative\", width: 220, height: 120, background: \"white\" }}>\n  <PaperClip style={{ position: \"absolute\", left: 18, top: -24 }} />\n</div>","api":[{"export":"PaperClip","kind":"component","summary":"Decorative (aria-hidden) wire clip: one 3px round-capped ink stroke in a 34×62 viewBox. It does not own the paper; position it over an edge yourself. All SVG attributes pass through to the root <svg>, so width, height, and style (e.g. absolute positioning) are set by the caller.","props":[],"passthrough":["SVGProps<SVGSVGElement>"]}],"stage":{"mode":"declared","landscape":{"width":26,"height":48},"vertical":{"width":26,"height":48},"basis":"Default width 26 and height 48 attributes on a 34×62 viewBox. Override width and height together to scale (the gallery shows 50×92); the viewBox keeps the drawing's proportions."},"examples":[{"title":"Clip across a card edge","code":"import { PaperClip } from \"@/jbm/ui/paper-clip\"\n\n<div style={{ position: \"relative\", width: 220, height: 120, background: \"white\" }}>\n  <PaperClip style={{ position: \"absolute\", left: 18, top: -24 }} />\n</div>"}],"qa":["Inspect the loop at default and enlarged sizes: the single stroke has round caps and even width.","Place it over a paper edge and check the part above the edge reads as clipped on, not floating.","Confirm it stays aria-hidden and adds no focusable element."],"related":[{"name":"tokens","relation":"installs"},{"name":"clipped-note","relation":"installed-by"}],"family":"Tape, clips & marks","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"clipped-note","entry":"component","title":"ClippedNote","description":"Paper note with an optional paper clip, rotation, and paper, accent, or ink stock.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper","@jbm/paper-clip"],"install":"npx shadcn@latest add @jbm/clipped-note","installName":"clipped-note","page":"https://jbm-ui.bns.studio/c/clipped-note","registryItem":"https://jbm-ui.bns.studio/r/clipped-note.json","sourcePath":"registry/jbm/ui/clipped-note.tsx","files":[{"source":"registry/jbm/ui/clipped-note.tsx","target":"src/jbm/ui/clipped-note.tsx","import":"@/jbm/ui/clipped-note","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/clipped-note.md","json":"https://jbm-ui.bns.studio/catalog/clipped-note.json"},"snippet":"import { ClippedNote } from \"@/jbm/ui/clipped-note\"\n\n<ClippedNote clip rotate={-3}>Revisar el resultado.</ClippedNote>","api":[{"export":"ClippedNote","kind":"component","summary":"Composes Paper (10px radius, 18px padding, 220px wide up to 100% of its container) and PaperClip. Children render in bold sans with ink matched to the stock and wrap anywhere.","props":[{"name":"children","type":"ReactNode","required":true,"default":null,"description":"Note content."},{"name":"clip","type":"boolean","required":false,"default":"true","description":"Shows the paper clip across the top edge at left 18px, top −24px. The clip extends above the note's box."},{"name":"tone","type":"PaperTone","required":false,"default":"\"paper\"","description":"Paper stock: `paper` (card with ink text), `accent` (vermilion), or `ink`; text switches to cream on accent and ink."},{"name":"rotate","type":"number","required":false,"default":"0","description":"Rotation of the whole note, clip included, in degrees."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last onto the Paper, e.g. width, padding, or font size."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Width is 220px (maxWidth 100%) unless style overrides it; height follows the wrapped children plus 36px padding and a 4px border. The clip adds 24px above the top edge, and rotation enlarges the visual footprint."},"examples":[{"title":"Rotated clipped note","code":"import { ClippedNote } from \"@/jbm/ui/clipped-note\"\n\n<ClippedNote clip rotate={-3}>Revisar el resultado.</ClippedNote>"},{"title":"Small note attached to a paper tape","code":"import { ClippedNote } from \"@/jbm/ui/clipped-note\"\nimport { PaperTape } from \"@/jbm/ui/paper-tape\" // install @jbm/paper-tape separately\n\n<PaperTape length={700} window={280} attachments={[{ id: \"note\", at: 650,\n  content: <ClippedNote style={{ width: 108, fontSize: 12, padding: 10 }}>12 de 30 rutas</ClippedNote> }]} />"}],"qa":["Toggle Paper clip: the note does not shift, and the clip overlaps the top edge rather than floating above it.","Toggle Accent paper and try ink: text stays legible on each stock.","Drag Note rotation to both extremes: the clip rotates with the note and nothing is clipped by the preview.","Check a long unbroken word wraps inside the 220px width on narrow screens."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"paper-clip","relation":"installs"},{"name":"paper-tape","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"}]},{"name":"punched-tag","entry":"component","title":"PunchedTag","description":"Card-stock luggage-style label with a punched hole and bold content, in paper, accent, or ink stock.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/punched-tag","installName":"punched-tag","page":"https://jbm-ui.bns.studio/c/punched-tag","registryItem":"https://jbm-ui.bns.studio/r/punched-tag.json","sourcePath":"registry/jbm/ui/punched-tag.tsx","files":[{"source":"registry/jbm/ui/punched-tag.tsx","target":"src/jbm/ui/punched-tag.tsx","import":"@/jbm/ui/punched-tag","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/punched-tag.md","json":"https://jbm-ui.bns.studio/catalog/punched-tag.json"},"snippet":"import { PunchedTag } from \"@/jbm/ui/punched-tag\"\n\n<PunchedTag tone=\"ink\">Modelo</PunchedTag>","api":[{"export":"PunchedTag","kind":"component","summary":"A card-stock luggage tag: the two corners at the hole end cut off at 45°, the other end rounded 12px, a 14px cream punched hole ringed in ink inside a flat line-grey reinforcement washer (4px; on ink or accent stock the ring is grey too, one eyelet), and one line of 28px extra-bold content beside it that ends in an ellipsis past maxWidth. Paper's stock, shared outline (kept the same width along the cuts), and shadow. No string: tie a Hilo at the hole (VideoPrint's layout gives the point). Width follows content up to maxWidth.","props":[{"name":"children","type":"ReactNode","required":true,"default":null,"description":"Tag content, usually a short name or a URL; kept on one line and cut with an ellipsis when it would pass maxWidth."},{"name":"tone","type":"PaperTone","required":false,"default":"\"paper\"","description":"Stock: `paper` (card with ink text), `accent` (vermilion), or `ink`; text switches to cream on accent and ink."},{"name":"scale","type":"number","required":false,"default":"1","description":"Size multiplier (default 1) for the tag's own geometry: hole (14 × scale px), its washer (4 × scale px), its ring (the shared outline, stroke.outline × scale, between 1px and stroke.outline), the corner cuts, radii, gap, padding, and type, so a tag on a smaller print keeps its proportions."},{"name":"cut","type":"number","required":false,"default":"14","description":"Depth of the hole end's two 45° corner cuts in px before scale (default 14). A slim tag (VideoPrint's) passes 8. Deeper than half the tag's height, the two cuts meet in one point (edge and stock clamp alike)."},{"name":"maxWidth","type":"number | string","required":false,"default":"\"100%\"","description":"Widest the tag gets, as px or a CSS length (default \"100%\"). Longer content stays on one line and ends in an ellipsis. In a grid or flex parent, give its track a zero minimum (minmax(0, 1fr), min-width: 0) so the one-line label cannot widen the track past the container."},{"name":"labelStyle","type":"CSSProperties","required":false,"default":null,"description":"Styles merged onto the one-line label, e.g. VideoPrint's Geist Mono at 14 × scale px. The one-line rule (nowrap, hidden overflow, ellipsis) stays unless you override it."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last onto the tag's box, e.g. padding or gap. The edge sits in a transparent 3px border, so padding keeps its meaning."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Width follows the content (14px hole + 18px gap + text) plus 40px horizontal padding and 6px of edge (the 3px shared outline each side), capped at maxWidth (default 100% of the container). Height is one 28px line at normal line height plus 32px padding and 6px of edge; the label never wraps."},"examples":[{"title":"Ink tag","code":"import { PunchedTag } from \"@/jbm/ui/punched-tag\"\n\n<PunchedTag tone=\"ink\">Modelo</PunchedTag>"}],"qa":["Toggle Ink stock: the hole stays cream inside one grey eyelet (ring and washer), never a radio-button target, and the text stays legible.","Check a long label or URL at narrow width: it stays on one line and ends in an ellipsis inside the tag, and the hole keeps its 14px circle.","Enlarge the cut corners at 8×: the ink edge keeps the shared outline's width along each cut, meets the straight edges without a step, and no square shadow corner shows beyond the cuts.","Compare the shadow and edge with other paper surfaces; the tag draws no string (Hilo is the connector).","Set scale to 0.575 (a 276px VideoPrint): the hole, ring, corner cuts, radii, and type shrink together and the hole stays in proportion to the text."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"video-print","relation":"installed-by"}],"family":"Tape, clips & marks","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"stamp","entry":"component","title":"Stamp","description":"Vermilion rubber-stamp impression that drops, makes contact, and inks in as a 0–1 press progresses.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/stamp","installName":"stamp","page":"https://jbm-ui.bns.studio/c/stamp","registryItem":"https://jbm-ui.bns.studio/r/stamp.json","sourcePath":"registry/jbm/ui/stamp.tsx","files":[{"source":"registry/jbm/ui/stamp.tsx","target":"src/jbm/ui/stamp.tsx","import":"@/jbm/ui/stamp","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/stamp.md","json":"https://jbm-ui.bns.studio/catalog/stamp.json"},"snippet":"import { Stamp } from \"@/jbm/ui/stamp\"\n\n<Stamp text=\"REVISADO\" press={0.9} angle={-7} />","api":[{"export":"Stamp","kind":"component","summary":"Bordered mono text in vermilion with a faint offset second impression. An ink impression, not a validation verdict. `press` is controlled with no timer: the stamp descends from 60px above until contact at 0.62, and its ink fades in from 0.5 to fully opaque at 0.8.","props":[{"name":"text","type":"string","required":true,"default":null,"description":"Impression text in 24px bold mono; wraps anywhere when space runs out."},{"name":"press","type":"number","required":false,"default":"1","description":"Press progress 0–1 (clamped). Invisible below 0.5, touches down at 0.62, fully inked from 0.8."},{"name":"angle","type":"number","required":false,"default":"-7","description":"Rotation of the impression in degrees; negative tilts counter-clockwise."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last onto the outer element. Setting transform or opacity here replaces the press animation."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Inline-block sized by the text: one 24px mono line plus 8px/16px padding and a 3px border, up to 100% of the container. Before contact it sits up to 60px higher, and rotation widens the footprint, so reserve headroom (the gallery pads 70px above)."},"examples":[{"title":"Nearly settled stamp","code":"import { Stamp } from \"@/jbm/ui/stamp\"\n\n<Stamp text=\"REVISADO\" press={0.9} angle={-7} />"}],"qa":["Drag Press through 0, 0.5, 0.62, 0.8, and 1: hidden, faint while descending, touching down, fully inked, and settled with no jump.","Drag Stamp angle to both extremes: the rotated box stays inside the preview on narrow screens.","Check the offset second impression reads as ink texture, not a duplicate label, and screen readers hear the text once."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"}],"family":"Tape, clips & marks","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"frontmatter","entry":"component","title":"Frontmatter","description":"Key/value metadata between literal YAML delimiters, with per-row emphasis, dimming, and a stacked layout.","category":"UI","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/scene-geometry"],"install":"npx shadcn@latest add @jbm/frontmatter","installName":"frontmatter","page":"https://jbm-ui.bns.studio/c/frontmatter","registryItem":"https://jbm-ui.bns.studio/r/frontmatter.json","sourcePath":"registry/jbm/ui/frontmatter.tsx","files":[{"source":"registry/jbm/ui/frontmatter.tsx","target":"src/jbm/ui/frontmatter.tsx","import":"@/jbm/ui/frontmatter","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/frontmatter.md","json":"https://jbm-ui.bns.studio/catalog/frontmatter.json"},"snippet":"import { Frontmatter } from \"@/jbm/ui/frontmatter\"\n\n<Frontmatter\n  stacked\n  rows={[\n    { key: \"name\", value: \"pdf-processing\", highlight: true },\n    { key: \"description\", value: \"Extrae tablas de archivos PDF.\" },\n    { key: \"license\", value: \"Apache-2.0\", dim: 0.6 },\n  ]}\n/>","api":[{"export":"Frontmatter","kind":"component","summary":"Mono definition list framed by `---` lines on a cream block. Two columns (keys at least 112px, values twice as wide) by default; `stacked` puts each value under its key at full width. Static: no timers or animation; change row props to emphasize or dim fields.","props":[{"name":"rows","type":"FrontmatterRow[]","required":true,"default":null,"description":"Fields in display order. Each row renders `key:` and its value; `key` is also the React key, so keep keys unique."},{"name":"stacked","type":"boolean","required":false,"default":"false","description":"Stack each value under its key in one full-width column, for narrow or portrait compositions."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last over the cream background, 18px padding, and 14px mono type; use for width or font size."}],"passthrough":[]},{"export":"FrontmatterRow","kind":"type","summary":"One field: `key` (string), `value` (ReactNode), optional `highlight` (3px vermilion bar left of the key), and optional `dim` from 0 to 1 (clamped; 1 fades key and value to 28% opacity)."}],"stage":{"mode":"fluid","reason":"Width fills the container (minWidth 0) and height follows the rows. Chrome adds 36px of padding, two delimiter lines, and 24px of list margin; rows are separated by 12px (6px plus 12px per value when stacked), and long values wrap anywhere. Set style.width for a fixed box."},"examples":[{"title":"Stacked skill metadata with an emphasized and a dimmed field","code":"import { Frontmatter } from \"@/jbm/ui/frontmatter\"\n\n<Frontmatter\n  stacked\n  rows={[\n    { key: \"name\", value: \"pdf-processing\", highlight: true },\n    { key: \"description\", value: \"Extrae tablas de archivos PDF.\" },\n    { key: \"license\", value: \"Apache-2.0\", dim: 0.6 },\n  ]}\n/>"}],"qa":["Toggle Stack fields: two-column mode keeps keys aligned at 112px minimum; stacked mode indents values under their keys with no overlap.","Toggle Highlight fields: only the vermilion bar appears; text position does not shift because the bar space is always reserved.","Drag Dim optional field from 0 to 1: key and value fade together to about 28% opacity and stay legible.","Check a long unbroken value on a narrow screen: it wraps inside the block instead of overflowing."],"related":[{"name":"tokens","relation":"installs"},{"name":"scene-geometry","relation":"installs"}],"docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"name":"tape-marker","entry":"component","title":"TapeMarker","description":"Folded vermilion paper checkpoint marker with an optional label above it.","category":"UI Bits","capabilities":["controls"],"needsRemotion":false,"registryDependencies":["@jbm/tokens","@jbm/paper"],"install":"npx shadcn@latest add @jbm/tape-marker","installName":"tape-marker","page":"https://jbm-ui.bns.studio/c/tape-marker","registryItem":"https://jbm-ui.bns.studio/r/tape-marker.json","sourcePath":"registry/jbm/ui/tape-marker.tsx","files":[{"source":"registry/jbm/ui/tape-marker.tsx","target":"src/jbm/ui/tape-marker.tsx","import":"@/jbm/ui/tape-marker","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/tape-marker.md","json":"https://jbm-ui.bns.studio/catalog/tape-marker.json"},"snippet":"import { TapeMarker } from \"@/jbm/ui/tape-marker\"\n\n<TapeMarker label=\"parar aquí\" />","api":[{"export":"TapeMarker","kind":"component","summary":"A 20×72 vermilion strip with the shared paper shadow and a darker 14px fold at the top. Usable alone or as PaperTape's checkpoint marker.","props":[{"name":"label","type":"string","required":false,"default":null,"description":"Optional bold vermilion text centered 8px above the marker. It does not wrap and sits outside the marker's box, so reserve headroom for it."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline styles merged last onto the marker strip, e.g. for positioning."}],"passthrough":[]}],"stage":{"mode":"declared","landscape":{"width":20,"height":72},"vertical":{"width":20,"height":72},"basis":"Fixed 20×72 box. The label is absolutely positioned above it (8px gap plus one line of inherited-size text) and does not add to the box; long labels extend sideways beyond 20px."},"examples":[{"title":"Labeled checkpoint","code":"import { TapeMarker } from \"@/jbm/ui/tape-marker\"\n\n<TapeMarker label=\"parar aquí\" />"}],"qa":["Toggle Marker label: the marker box does not move or resize, and the label centers above it.","Check the top fold reads as a darker band and the shadow matches other paper surfaces.","Check long labels at narrow widths: they do not wrap, so make sure they are not clipped by a parent."],"related":[{"name":"tokens","relation":"installs"},{"name":"paper","relation":"installs"},{"name":"paper-tape","relation":"installed-by"}],"family":"Tape, clips & marks","docs":[{"title":"Paper and filing illustrations guide","url":"https://jbm-ui.bns.studio/docs/design-video-components.md"}]},{"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"}]},{"name":"icons","entry":"component","title":"JbmIcon","description":"Twelve original geometric SVG icons with outline and paper treatments, inherited color, and optional accessible labels.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/icons","installName":"icons","page":"https://jbm-ui.bns.studio/c/icons","registryItem":"https://jbm-ui.bns.studio/r/icons.json","sourcePath":"registry/jbm/ui/icons.tsx","files":[{"source":"registry/jbm/ui/icons.tsx","target":"src/jbm/ui/icons.tsx","import":"@/jbm/ui/icons","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/icons.md","json":"https://jbm-ui.bns.studio/catalog/icons.json"},"snippet":"import { JbmIcon } from \"@/jbm/ui/icons\"\n\n<button><JbmIcon name=\"play\" size={20} /> Start lesson</button>","api":[{"export":"JbmIcon","kind":"component","summary":"A static 24-unit icon. Uses a 2.5-unit stroke derived from the shared outline token, round caps and joins. No timer, client boundary, or Remotion dependency. Decorative unless label is supplied; label an icon-only parent button separately.","props":[{"name":"name","type":"IconName","required":true,"default":null,"description":"arrow-right, search, close, check, play, replay, folder, notebook, dataset, chart, code, or agent."},{"name":"size","type":"number","required":false,"default":"24","description":"Square CSS-pixel size. Non-positive or non-finite values fall back to 24. Inspect 16, 20, 24 and 32px before use."},{"name":"color","type":"string","required":false,"default":"\"currentColor\"","description":"Stroke color. Inherits text color by default."},{"name":"treatment","type":"IconTreatment","required":false,"default":"\"outline\"","description":"outline has no fill; paper fills enclosed silhouettes. Open marks are identical in both treatments."},{"name":"paperColor","type":"string","required":false,"default":"palette.bg","description":"Paper fill, cream by default. Set explicitly on dark surfaces."},{"name":"label","type":"string","required":false,"default":null,"description":"Accessible name for standalone meaningful icons. Omit for decorative icons beside text."},{"name":"style","type":"CSSProperties","required":false,"default":null,"description":"Inline style overrides; width and height overrides can supersede size."}],"passthrough":[]},{"export":"iconPaths","kind":"constant","summary":"Original body and interior-mark SVG paths on a 24×24 grid, keyed by IconName. Body paths are closed and may be filled; marks remain unfilled."},{"export":"IconName","kind":"type","summary":"Union of the twelve keys in iconPaths."},{"export":"IconTreatment","kind":"type","summary":"outline | paper."}],"stage":{"mode":"declared","landscape":{"width":24,"height":24},"vertical":{"width":24,"height":24},"basis":"Square 24×24 viewBox; size sets width and height in pixels, default 24."},"examples":[{"title":"Beside a label","code":"import { JbmIcon } from \"@/jbm/ui/icons\"\n\n<button><JbmIcon name=\"play\" size={20} /> Start lesson</button>"},{"title":"Standalone paper icon","code":"import { JbmIcon } from \"@/jbm/ui/icons\"\n\n<JbmIcon name=\"folder\" treatment=\"paper\" paperColor=\"#C63D24\" color=\"#20241F\" size={32} label=\"Project folder\" />"}],"qa":["Open /icons to inspect all twelve silhouettes at 16, 20, 24, 32 and 48px and enlarged. Compare outline and paper treatments on cream and ink.","Check icon-only controls have an accessible name on the button; decorative SVGs must stay out of the accessibility tree.","Download an SVG from /icons and compare its treatment, size and colors with the selected grid specimen.","The notebook, folder and table are optically simplified icons, not scaled-down animated illustrations. No overlapping paper layers or animation are implied."],"related":[{"name":"tokens","relation":"installs"}],"docs":[{"title":"Icon drawing and review guide","url":"https://jbm-ui.bns.studio/docs/icons.md"}]},{"name":"ui-bits","entry":"bundle","title":"UiBits","description":"One install for the paper cut-out interface pieces: UiButton, UiInput, UiCard, Piece, PhoneFrame, Badge, and TokenGlyph.","category":"UI Bits","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/ui-button","@jbm/ui-input","@jbm/ui-card","@jbm/piece","@jbm/phone-frame","@jbm/badge","@jbm/token-glyph"],"install":"npx shadcn@latest add @jbm/ui-bits","installName":"ui-bits","page":null,"pageReason":"A backward-compatible barrel that only re-exports other items. Open /c/ui-button, /c/ui-input, /c/ui-card, /c/piece, /c/phone-frame, /c/badge, and /c/token-glyph for props, stage sizes, and previews.","registryItem":"https://jbm-ui.bns.studio/r/ui-bits.json","sourcePath":"registry/jbm/ui/ui-bits.tsx","files":[{"source":"registry/jbm/ui/ui-bits.tsx","target":"src/jbm/ui/ui-bits.tsx","import":"@/jbm/ui/ui-bits","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/ui-bits.md","json":"https://jbm-ui.bns.studio/catalog/ui-bits.json"},"snippet":"import { PhoneFrame, UiCard, UiInput, UiButton } from \"@/jbm/ui/ui-bits\"\n\n<PhoneFrame w={420} h={780}>\n  <UiCard w={290} />\n  <UiInput w={290} h={92} />\n  <UiButton w={290} h={92} tone=\"ink\" />\n</PhoneFrame>","api":[{"export":"UiButton","kind":"re-export","from":"ui-button"},{"export":"UiInput","kind":"re-export","from":"ui-input"},{"export":"UiCard","kind":"re-export","from":"ui-card"},{"export":"Piece","kind":"re-export","from":"piece"},{"export":"PhoneFrame","kind":"re-export","from":"phone-frame"},{"export":"Badge","kind":"re-export","from":"badge"},{"export":"TokenGlyph","kind":"re-export","from":"token-glyph"},{"export":"PieceKind","kind":"re-export","from":"piece"},{"export":"TokenKind","kind":"re-export","from":"token-glyph"}],"stage":{"mode":"n/a","reason":"A re-export barrel; each re-exported component declares its own stage size on its page."},"examples":[{"title":"Phone screen from cut-out pieces","code":"import { PhoneFrame, UiCard, UiInput, UiButton } from \"@/jbm/ui/ui-bits\"\n\n<PhoneFrame w={420} h={780}>\n  <UiCard w={290} />\n  <UiInput w={290} h={92} />\n  <UiButton w={290} h={92} tone=\"ink\" />\n</PhoneFrame>"},{"title":"Status badges and token glyphs","code":"import { Badge, TokenGlyph } from \"@/jbm/ui/ui-bits\"\n\n<Badge kind=\"check\" size={40} />\n<Badge kind=\"x\" size={40} tone=\"ink\" />\n<TokenGlyph kind=\"color\" size={70} />"}],"qa":["After adding or removing a component in the barrel, confirm registry.json registryDependencies still lists every re-exported item so one install brings in all of them.","Import each re-export from @/jbm/ui/ui-bits in a consumer build (pnpm consumer:check) and confirm it renders the same as the direct import from its own item."],"related":[{"name":"ui-button","relation":"re-exports"},{"name":"ui-input","relation":"re-exports"},{"name":"ui-card","relation":"re-exports"},{"name":"piece","relation":"re-exports"},{"name":"phone-frame","relation":"re-exports"},{"name":"badge","relation":"re-exports"},{"name":"token-glyph","relation":"re-exports"},{"name":"rebuild-screens","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","relation":"installed-by"}]}]}