{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "end-card",
  "type": "registry:component",
  "title": "EndCard",
  "description": "Closing scene block: a hero CTA reveals with an optional accent underline, then a faint, staggered row of social handles or URLs fades in beneath it. Composes BlurReveal, Underline, and StaggerGroup so the motion fingerprint stays consistent with the rest of the catalog.",
  "dependencies": [
    "remotion",
    "zod",
    "react"
  ],
  "files": [
    {
      "path": "registry/components/end-card/EndCard.tsx",
      "type": "registry:component",
      "target": "components/onda/end-card/EndCard.tsx",
      "content": "import React from 'react';\nimport { useVideoConfig } from 'remotion';\nimport { BlurReveal } from '../blur-reveal/BlurReveal';\nimport { StaggerGroup } from '../stagger-group/StaggerGroup';\nimport { Underline } from '../underline/Underline';\nimport { DURATION, STAGGER } from '../../../lib/motion';\nimport { PlacementBox, resolveSize } from '../../../lib/canvas';\nimport { endCardSchema, type EndCardProps } from './schema';\n\nexport { endCardSchema, type EndCardProps };\n\n// Beat offsets — all derived from delay so the whole card is one composed\n// sequence. The CTA lands first, the underline draws as it settles, and the\n// handles row fades in last so the eye finishes on the social/URL strip.\nconst HANDLES_OFFSET = DURATION.base + 6;   // handles begin ~6 frames after the CTA finishes its rise\nconst UNDERLINE_OFFSET = DURATION.base - 4; // underline starts drawing just as the CTA settles\n\n/**\n * Closing scene block: a hero CTA reveals with an optional accent underline,\n * then a faint, staggered row of social handles or URLs fades in beneath it.\n *\n * Composes `BlurReveal`, `Underline`, and `StaggerGroup` so the motion\n * fingerprint stays consistent with the rest of the catalog.\n *\n * @example\n * <EndCard cta=\"Made with Onda\" handles={['@onda.video']} />\n */\nexport const EndCard: React.FC<EndCardProps> = ({\n  cta,\n  handles,\n  delay,\n  accent,\n  ctaFontSize,\n  ctaSize,\n  ctaFontWeight,\n  ctaLetterSpacing,\n  ctaLineHeight,\n  handlesFontSize,\n  handlesSize,\n  handlesFontWeight,\n  handlesLetterSpacing,\n  handlesLineHeight,\n  color,\n  handlesColor,\n  accentColor,\n  fontFamily,\n  placement,\n}) => {\n  const { width, height } = useVideoConfig();\n  const resolvedCtaFontSize = ctaSize ? resolveSize(ctaSize, { width, height }) : ctaFontSize;\n  const resolvedHandlesFontSize = handlesSize ? resolveSize(handlesSize, { width, height }) : handlesFontSize;\n  return (\n    <PlacementBox placement={placement}>\n      <div\n        style={{\n          display: 'flex',\n          alignItems: 'center',\n          flexDirection: 'column',\n          gap: 40,\n        }}\n      >\n        {/* CTA — composed BlurReveal, optionally followed by the accent underline. */}\n        {accent ? (\n          // Underline already renders the text + the accent line as a two-phase\n          // reveal, so when accent is on we delegate the headline to it. This\n          // keeps the underline visually attached to the CTA glyphs (which the\n          // Underline primitive measures) instead of stacking a separate line\n          // below a separately-revealed BlurReveal — composition over duplication.\n          <Underline kind=\"underline\"\n            text={cta}\n            delay={delay}\n            duration={DURATION.base}\n            lineDelay={UNDERLINE_OFFSET}\n            lineDuration={DURATION.fast}\n            color={color}\n            accentColor={accentColor}\n            fontSize={resolvedCtaFontSize}\n            fontFamily={fontFamily}\n            fontWeight={ctaFontWeight}\n            letterSpacing={ctaLetterSpacing}\n            lineHeight={ctaLineHeight}\n            lineThickness={3}\n            lineOffset={6}\n          />\n        ) : (\n          <BlurReveal kind=\"blur-reveal\"\n            text={cta}\n            delay={delay}\n            duration={DURATION.base}\n            color={color}\n            fontSize={resolvedCtaFontSize}\n            fontFamily={fontFamily}\n            fontWeight={ctaFontWeight}\n            letterSpacing={ctaLetterSpacing}\n            lineHeight={ctaLineHeight}\n          />\n        )}\n\n        {/* Handles row — staggered, faint, the closing beat. Rendered horizontally\n            so URLs and social handles read as a single strip of metadata, not a\n            stack. The dot separators are part of the items themselves so the\n            stagger fingerprint stays consistent (each handle is one beat). */}\n        <StaggerGroup kind=\"stagger-group\"\n          items={handles}\n          delay={delay + HANDLES_OFFSET}\n          duration={DURATION.base}\n          stagger={STAGGER}\n          direction=\"row\"\n          gap={32}\n          align=\"center\"\n          color={handlesColor}\n          fontSize={resolvedHandlesFontSize}\n          fontFamily={fontFamily}\n          fontWeight={handlesFontWeight}\n          letterSpacing={handlesLetterSpacing}\n          lineHeight={handlesLineHeight}\n        />\n      </div>\n    </PlacementBox>\n  );\n};\n"
    },
    {
      "path": "registry/components/end-card/schema.ts",
      "type": "registry:component",
      "target": "components/onda/end-card/schema.ts",
      "content": "import { z } from 'zod';\nimport { placementSchema, sizeRoleSchema } from '../../../lib/canvas-schemas';\n\n/** Zod schema for {@link EndCard} props. */\nexport const endCardSchema = 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('end-card').default('end-card'),\n  /** Hero CTA line. */\n  cta: z.string().default('Made with Onda'),\n  /** Social handles or URLs displayed in a row beneath the CTA. */\n  handles: z.array(z.string()).default(['@onda.video', 'onda.video/components']),\n  /** Frames before the CTA starts. */\n  delay: z.number().int().min(0).default(0),\n  /** Show the accent underline beneath the CTA. */\n  accent: z.boolean().default(true),\n  /** CTA font size in px. Wins over `ctaSize` if both are passed. */\n  ctaFontSize: z.number().default(96),\n  /** Semantic role for the CTA — resolves to canvas-aware pixels. `ctaFontSize` wins when both are passed. */\n  ctaSize: sizeRoleSchema.optional(),\n  /** Font weight for the CTA. */\n  ctaFontWeight: z.number().optional(),\n  /** CSS letter-spacing for the CTA (e.g. `'-0.02em'`). */\n  ctaLetterSpacing: z.string().optional(),\n  /** Unitless line height for the CTA. */\n  ctaLineHeight: z.number().optional(),\n  /** Handles row font size in px. Wins over `handlesSize` if both are passed. */\n  handlesFontSize: z.number().default(24),\n  /** Semantic role for the handles row — resolves to canvas-aware pixels. `handlesFontSize` wins when both are passed. */\n  handlesSize: sizeRoleSchema.optional(),\n  /** Font weight for the handles row. */\n  handlesFontWeight: z.number().optional(),\n  /** CSS letter-spacing for the handles row (e.g. `'0.06em'`). */\n  handlesLetterSpacing: z.string().optional(),\n  /** Unitless line height for the handles row. */\n  handlesLineHeight: z.number().optional(),\n  /** CTA color. Defaults to `--onda-text`. */\n  color: z.string().default('var(--onda-text, #F2F2F4)'),\n  /** Handles color. Defaults to `--onda-faint`. */\n  handlesColor: z.string().default('var(--onda-faint, #56565F)'),\n  /** Underline color. Defaults to `--onda-accent`. */\n  accentColor: z.string().default('var(--onda-accent, #D96B82)'),\n  /** Onda display font. */\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 EndCard}. */\nexport type EndCardProps = z.infer<typeof endCardSchema>;\n"
    },
    {
      "path": "registry/components/end-card/end-card.meta.json",
      "type": "registry:file",
      "target": "components/onda/end-card/end-card.meta.json",
      "content": "{\n  \"name\": \"end-card\",\n  \"title\": \"EndCard\",\n  \"description\": \"Closing scene block: a hero CTA reveals with an optional accent underline, then a faint, staggered row of social handles or URLs fades in beneath it. Composes BlurReveal, Underline, and StaggerGroup so the motion fingerprint stays consistent with the rest of the catalog.\",\n  \"pickWhen\": \"wrap a video on Onda's house outro — logo + tagline + CTA list, restraint over fanfare.\",\n  \"composes\": [\n    \"blur-reveal\",\n    \"underline\",\n    \"stagger-group\"\n  ],\n  \"category\": \"scenes\",\n  \"tags\": [\n    \"scene\",\n    \"end-card\",\n    \"cta\",\n    \"outro\",\n    \"composition\"\n  ],\n  \"dependencies\": [\n    \"remotion\",\n    \"zod\",\n    \"react\"\n  ]\n}\n"
    },
    {
      "path": "registry/components/end-card/README.md",
      "type": "registry:file",
      "target": "components/onda/end-card/README.md",
      "content": "# EndCard\n\nThe closing scene block. A hero call-to-action reveals with the canonical Onda blur-rise, an accent-rose underline draws beneath it as the headline settles, and a faint, staggered row of social handles or URLs fades in last — so the eye finishes on the contact strip. Composed from `BlurReveal`, `Underline`, and `StaggerGroup` so the motion fingerprint matches every other Onda surface; no new motion is invented here.\n\n## Props\n\n| Name | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `cta` | `string` | `\"Made with Onda\"` | The headline / call-to-action. |\n| `handles` | `string[]` | `['@onda.video', 'onda.video/components']` | Social handles, URLs, or any short contact strings. Rendered as a horizontal staggered row. |\n| `delay` | `integer >= 0` | `0` | Frames before the CTA starts. The whole card is sequenced relative to this. |\n| `accent` | `boolean` | `true` | When `true`, the CTA renders through `Underline` so the accent-rose line draws beneath it. When `false`, the CTA renders through `BlurReveal` alone. |\n| `ctaFontSize` | `number` | `96` | Pixels — the CTA is the focal element. Wins over `ctaSize` if both are passed. |\n| `ctaSize` | `SizeRole?` | – | Semantic role for the CTA — `'hero'` \\| `'heading'` \\| `'subheading'` \\| `'body'` \\| `'caption'`. Resolves to canvas-aware pixels. `ctaFontSize` wins when both are passed. |\n| `handlesFontSize` | `number` | `24` | Pixels — the handles row is supporting metadata, not headline. Wins over `handlesSize` if both are passed. |\n| `handlesSize` | `SizeRole?` | – | Semantic role for the handles row. `handlesFontSize` wins when both are passed. |\n| `color` | `string` | `\"#F2F2F4\"` | CTA color — defaults to `--onda-text`. |\n| `handlesColor` | `string` | `\"#56565F\"` | Handles color — defaults to `--onda-faint` so the row reads as a quiet caption. |\n| `accentColor` | `string` | `\"#D96B82\"` | Underline color — defaults to `--onda-accent`. The one earned color moment on the card. |\n| `fontFamily` | `string` | `'\"Clash Display\", sans-serif'` | The Onda display font, applied to both CTA and handles for tonal consistency. |\n| `placement` | `Placement` | `'center'` | Where on the canvas the end 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 { EndCard, endCardSchema } from './components/onda/end-card/EndCard';\n\nexport const Root: React.FC = () => (\n  <Composition\n    id=\"EndCard\"\n    component={EndCard}\n    durationInFrames={120}\n    fps={30}\n    width={1920}\n    height={1080}\n    schema={endCardSchema}\n    defaultProps={{\n      cta: 'Made with Onda',\n      handles: ['@onda.video', 'onda.video/components'],\n      delay: 0,\n      accent: true,\n      ctaFontSize: 96,\n      handlesFontSize: 24,\n      color: '#F2F2F4',\n      handlesColor: '#56565F',\n      accentColor: '#D96B82',\n      fontFamily: '\"Clash Display\", sans-serif',\n    }}\n  />\n);\n```\n\n## Motion notes\n\n- **Pure composition.** `EndCard` 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.** CTA enters at `delay`. The accent underline starts drawing at `delay + DURATION.base - 4` (just as the CTA settles, so the line and headline land together). The handles row begins its stagger at `delay + DURATION.base + 6` — a small beat of breathing room before the closing metadata strip.\n- **Accent toggle.** Setting `accent={false}` swaps the `Underline` for a bare `BlurReveal` so the CTA reveals without the accent line — useful when the card is composed alongside another accent moment in the same shot and you want the dusty rose to stay earned (one per moment).\n- **Handles as a row.** The handles use `StaggerGroup` with `direction='row'`, the canonical 4-frame stagger, and `--onda-faint` so the row reads as a quiet caption. Each handle gets one beat — no animated separators, no scrolling marquee — so the eye finishes on a settled strip rather than continuous motion.\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",
    "lib-canvas",
    "lib-motion",
    "stagger-group",
    "underline"
  ]
}
