{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chapter-card",
  "type": "registry:component",
  "title": "ChapterCard",
  "description": "Chapter-title scene block with a numbered eyebrow ('01 The setup'). The number fades in first in accent rose, the chapter title rises with a calm blur-reveal, and an optional accent underline punctuates the title. Composes FadeIn, BlurReveal, and Underline.",
  "dependencies": [
    "remotion",
    "zod",
    "react"
  ],
  "files": [
    {
      "path": "registry/components/chapter-card/ChapterCard.tsx",
      "type": "registry:component",
      "target": "components/onda/chapter-card/ChapterCard.tsx",
      "content": "import React from 'react';\nimport { useVideoConfig } from 'remotion';\nimport { FadeIn } from '../fade-in/FadeIn';\nimport { BlurReveal } from '../blur-reveal/BlurReveal';\nimport { Underline } from '../underline/Underline';\nimport { DURATION } from '../../../lib/motion';\nimport { PlacementBox, resolveSize } from '../../../lib/canvas';\nimport { chapterCardSchema, type ChapterCardProps } from './schema';\n\nexport { chapterCardSchema, type ChapterCardProps };\n\n// Beat offsets — all derived from `delay` so the whole card is one composed\n// sequence. The number lands first as a quiet eyebrow, the title rises 10\n// frames later (canonical Onda follow-up cadence), and the accent underline\n// punctuates the title as it settles.\nconst TITLE_OFFSET = 10;\nconst UNDERLINE_OFFSET = TITLE_OFFSET + 24;\n\n/**\n * Chapter-card scene block: a numbered eyebrow (\"01\") fades in above a large\n * chapter title that rises with the canonical Onda blur-reveal. When `accent`\n * is on, the number takes the dusty rose and a quiet underline draws beneath\n * the title — one earned accent moment that ties the two beats together.\n *\n * Pure composition over `FadeIn`, `BlurReveal`, and `Underline` — this scene\n * block sequences existing primitives and never invents new motion.\n *\n * @example\n * <ChapterCard number=\"01\" chapter=\"The setup\" />\n */\nexport const ChapterCard: React.FC<ChapterCardProps> = ({\n  chapter,\n  number,\n  delay,\n  accent,\n  numberColor,\n  color,\n  subtitleColor,\n  numberFontSize,\n  numberSize,\n  numberFontWeight,\n  numberLetterSpacing,\n  numberLineHeight,\n  titleFontSize,\n  titleSize,\n  titleFontWeight,\n  titleLetterSpacing,\n  titleLineHeight,\n  fontFamily,\n  placement,\n}) => {\n  const { width, height } = useVideoConfig();\n  const resolvedNumberFontSize = numberSize ? resolveSize(numberSize, { width, height }) : numberFontSize;\n  const resolvedTitleFontSize = titleSize ? resolveSize(titleSize, { width, height }) : titleFontSize;\n  return (\n    <PlacementBox placement={placement}>\n      <div\n        style={{\n          display: 'flex',\n          alignItems: 'center',\n          flexDirection: 'column',\n          gap: 24,\n        }}\n      >\n        {/* Numbered eyebrow — pure fade so the title (the next beat) owns the\n            rise. When accent is on, the number takes the rose; otherwise it\n            falls back to the dim metadata color. */}\n        <FadeIn kind=\"fade-in\"\n          text={number}\n          delay={delay}\n          duration={DURATION.base}\n          color={accent ? numberColor : subtitleColor}\n          fontSize={resolvedNumberFontSize}\n          fontFamily={fontFamily}\n          fontWeight={numberFontWeight}\n          letterSpacing={numberLetterSpacing}\n          lineHeight={numberLineHeight}\n        />\n\n        {/* Chapter title — the focal element. BlurReveal's spring-driven rise +\n            blur falloff is the canonical Onda entrance for headline text. */}\n        <BlurReveal kind=\"blur-reveal\"\n          text={chapter}\n          delay={delay + TITLE_OFFSET}\n          duration={DURATION.base}\n          color={color}\n          fontSize={resolvedTitleFontSize}\n          fontFamily={fontFamily}\n          fontWeight={titleFontWeight}\n          letterSpacing={titleLetterSpacing}\n          lineHeight={titleLineHeight}\n        />\n\n        {/* Accent underline — only when accent is on, so the rose stays earned\n            (one accent moment per scene). Empty text on the Underline primitive\n            means only the rule draws — the BlurReveal above already owns the\n            typography. */}\n        {accent ? (\n          <Underline kind=\"underline\"\n            text=\"\"\n            delay={delay + UNDERLINE_OFFSET}\n            duration={1}\n            lineDelay={0}\n            lineDuration={DURATION.fast}\n            color={color}\n            accentColor={numberColor}\n            lineThickness={3}\n            lineOffset={0}\n            fontSize={resolvedTitleFontSize}\n            fontFamily={fontFamily}\n          />\n        ) : null}\n      </div>\n    </PlacementBox>\n  );\n};\n\nexport default ChapterCard;\n"
    },
    {
      "path": "registry/components/chapter-card/schema.ts",
      "type": "registry:component",
      "target": "components/onda/chapter-card/schema.ts",
      "content": "import { z } from 'zod';\nimport { placementSchema, sizeRoleSchema } from '../../../lib/canvas-schemas';\n\n/** Zod schema for {@link ChapterCard} props. */\nexport const chapterCardSchema = z.object({\n  /** Discriminator literal — matches this entry's registry slug. Auto-populated when omitted (`schema.parse({})` works as before). Lets consumers build `z.discriminatedUnion('kind', [...])` directly over onda schemas. */\n  kind: z.literal('chapter-card').default('chapter-card'),\n  /** The chapter heading — the focal text on the card. */\n  chapter: z.string().default('The setup'),\n  /** Numbered index displayed above the chapter. String so leading zeros (`\"01\"`) read as intended. */\n  number: z.string().default('01'),\n  /** Frames before the number starts fading in. The whole card is sequenced relative to this. */\n  delay: z.number().int().min(0).default(0),\n  /** When `true`, the number renders in `numberColor` (the rose) and a quiet underline punctuates the title. */\n  accent: z.boolean().default(true),\n  /** Number color when `accent` is `true`. Defaults to `--onda-accent`. */\n  numberColor: z.string().default('var(--onda-accent, #D96B82)'),\n  /** Chapter title color. Defaults to `--onda-text`. */\n  color: z.string().default('var(--onda-text, #F2F2F4)'),\n  /** Number color when `accent` is `false`. Defaults to `--onda-dim` so the number reads as quiet metadata. */\n  subtitleColor: z.string().default('var(--onda-dim, #8E8E98)'),\n  /** Number font size in px — smaller than the title, sitting above it. Wins over `numberSize` if both are passed. */\n  numberFontSize: z.number().default(32),\n  /** Semantic role for the number — resolves to canvas-aware pixels. `numberFontSize` wins when both are passed. */\n  numberSize: sizeRoleSchema.optional(),\n  /** Font weight for the number. */\n  numberFontWeight: z.number().optional(),\n  /** CSS letter-spacing for the number (e.g. `'0.16em'`). */\n  numberLetterSpacing: z.string().optional(),\n  /** Unitless line height for the number. */\n  numberLineHeight: z.number().optional(),\n  /** Chapter title font size in px — the focal element on the card. Wins over `titleSize` if both are passed. */\n  titleFontSize: z.number().default(96),\n  /** Semantic role for the title — resolves to canvas-aware pixels. `titleFontSize` wins when both are passed. */\n  titleSize: sizeRoleSchema.optional(),\n  /** Font weight for the title. */\n  titleFontWeight: z.number().optional(),\n  /** CSS letter-spacing for the title (e.g. `'-0.02em'`). */\n  titleLetterSpacing: z.string().optional(),\n  /** Unitless line height for the title. */\n  titleLineHeight: z.number().optional(),\n  /** Onda display font. Applied to both number and title for tonal consistency. */\n  fontFamily: z.string().default('var(--onda-font-display, \"Clash Display\", sans-serif)'),\n  /** Where on the canvas this sits. Region (`'center'`, `'upper-third'`, ...) or `{ x, y, anchor }` in 0..1 canvas fractions. Coordinates may be negative or >1 for off-canvas. */\n  placement: placementSchema.optional(),\n});\n\n/** Inferred props for {@link ChapterCard}. */\nexport type ChapterCardProps = z.infer<typeof chapterCardSchema>;\n"
    },
    {
      "path": "registry/components/chapter-card/chapter-card.meta.json",
      "type": "registry:file",
      "target": "components/onda/chapter-card/chapter-card.meta.json",
      "content": "{\n  \"name\": \"chapter-card\",\n  \"title\": \"ChapterCard\",\n  \"description\": \"Chapter-title scene block with a numbered eyebrow ('01 The setup'). The number fades in first in accent rose, the chapter title rises with a calm blur-reveal, and an optional accent underline punctuates the title. Composes FadeIn, BlurReveal, and Underline.\",\n  \"pickWhen\": \"a calm chapter / section divider beat — \\\"Chapter 2: …\\\" — that should breathe before the next scene lands.\",\n  \"composes\": [\n    \"fade-in\",\n    \"blur-reveal\",\n    \"underline\"\n  ],\n  \"category\": \"scenes\",\n  \"tags\": [\n    \"scene\",\n    \"chapter\",\n    \"title\",\n    \"explainer\",\n    \"documentary\",\n    \"composition\"\n  ],\n  \"dependencies\": [\n    \"remotion\",\n    \"zod\",\n    \"react\"\n  ]\n}\n"
    },
    {
      "path": "registry/components/chapter-card/README.md",
      "type": "registry:file",
      "target": "components/onda/chapter-card/README.md",
      "content": "# ChapterCard\n\nA chapter-title scene block for explainer and documentary videos. A small numbered eyebrow (\"01\") fades in first, the chapter title rises beneath it with the canonical Onda blur-reveal, and when `accent` is on, a quiet rose underline punctuates the title — tying the number and the rule into a single earned-color moment. Composed entirely from `FadeIn`, `BlurReveal`, and `Underline` so the motion fingerprint matches the rest of the catalog; no new motion is invented here.\n\n## Props\n\n| Name | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `chapter` | `string` | `\"The setup\"` | The chapter heading — the focal text on the card. |\n| `number` | `string` | `\"01\"` | Numbered index. Kept as a string so leading zeros (`\"01\"`, `\"02\"`) render as written. |\n| `delay` | `integer >= 0` | `0` | Frames before the number starts fading in. The whole card is sequenced relative to this. |\n| `accent` | `boolean` | `true` | When `true`, the number takes `numberColor` (the rose) and a quiet underline draws beneath the title. When `false`, the number falls back to `subtitleColor` and no underline is drawn. |\n| `numberColor` | `string` | `\"#D96B82\"` | Number color when `accent` is `true`. Defaults to `--onda-accent` — the one earned-color moment on the card. |\n| `color` | `string` | `\"#F2F2F4\"` | Chapter title color. Defaults to `--onda-text`. |\n| `subtitleColor` | `string` | `\"#8E8E98\"` | Number color when `accent` is `false`. Defaults to `--onda-dim`, so the number reads as quiet metadata. |\n| `numberFontSize` | `number` | `32` | Pixels. The number sits above the title and is intentionally smaller — it's the eyebrow, not the headline. Wins over `numberSize` if both are passed. |\n| `numberSize` | `SizeRole?` | – | Semantic role for the number — `'hero'` \\| `'heading'` \\| `'subheading'` \\| `'body'` \\| `'caption'`. Resolves to canvas-aware pixels. `numberFontSize` wins when both are passed. |\n| `titleFontSize` | `number` | `96` | Pixels. The title is the focal element on the card. Wins over `titleSize` if both are passed. |\n| `titleSize` | `SizeRole?` | – | Semantic role for the title. `titleFontSize` wins when both are passed. |\n| `fontFamily` | `string` | `'\"Clash Display\", sans-serif'` | The Onda display font, applied to both number and title for tonal consistency. |\n| `placement` | `Placement` | `'center'` | Where on the canvas the chapter card sits. Pass a region (`'center'`, `'upper-third'`, `'top-right'`, …) or `{ x, y, anchor }` in 0..1 canvas fractions. Coordinates may be negative or >1 for off-canvas. |\n\n## Usage\n\n```tsx\nimport { Composition } from 'remotion';\nimport { ChapterCard, chapterCardSchema } from './components/onda/chapter-card/ChapterCard';\n\nexport const Root: React.FC = () => (\n  <Composition\n    id=\"ChapterCard\"\n    component={ChapterCard}\n    durationInFrames={120}\n    fps={30}\n    width={1920}\n    height={1080}\n    schema={chapterCardSchema}\n    defaultProps={{\n      chapter: 'The setup',\n      number: '01',\n      delay: 0,\n      accent: true,\n      numberColor: '#D96B82',\n      color: '#F2F2F4',\n      subtitleColor: '#8E8E98',\n      numberFontSize: 32,\n      titleFontSize: 96,\n      fontFamily: '\"Clash Display\", sans-serif',\n    }}\n  />\n);\n```\n\n## Motion notes\n\n- **Pure composition.** `ChapterCard` doesn't run any of its own springs or interpolations — every beat is delegated to a primitive that already encodes the Onda fingerprint. The scene block's job is sequencing, not motion.\n- **Sequence.** Number `FadeIn` starts at `delay`. The chapter title's `BlurReveal` starts at `delay + 10` so the eye reads the eyebrow first and then the title rises into its resting position. When `accent` is on, the rose `Underline` draws at `delay + 34` — punctuating the title as it settles. All beats use `DURATION.base` (18f) for the entrances and `DURATION.fast` (10f) for the line draw, keeping the timing vocabulary consistent with the rest of the catalog.\n- **One accent moment.** The dusty rose is used in exactly two places — the number above and the rule below — both gated by the same `accent` flag, so the color reads as one earned moment rather than a sprinkle. Toggle `accent` off when the card is composed alongside another accent moment in the same shot.\n- **Restraint by composition.** No glow, no chrome, no overshoot. The negative space and the calm cadence are the design.\n- **Deterministic by construction.** Every child is a pure function of `useCurrentFrame()`; no state, no random, no date. Frame N is correct with zero knowledge of frame N-1.\n"
    }
  ],
  "registryDependencies": [
    "blur-reveal",
    "fade-in",
    "lib-canvas",
    "lib-motion",
    "underline"
  ]
}
