{"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"}],"setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}