{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dk-bezeler",
  "title": "DKBezeler",
  "description": "Display components for DKBezeler's baked device frames: a framed still as a plain image, and the light and dark video versions swapped with CSS. Bake the assets with npx @diklein/dkbezeler.",
  "files": [
    {
      "path": "registry/dk-bezeler/dk-bezeler.tsx",
      "content": "import type { ReactNode } from 'react'\n\n/* Display components for DKBezeler's baked outputs. Both are deliberately plain:\n * the bake did the hard part, so a framed still is just an image and a framed clip\n * is just a pair of videos. No dependencies, no client JS. */\n\nexport interface DKBezelImageProps {\n  /** The baked -framed.png. */\n  src: string\n  alt?: string\n  /** Intrinsic pixels of the baked PNG (dkbezeler prints them). Declaring them\n   *  reserves layout before the file arrives. */\n  width: number\n  height: number\n  /** Display width cap. The bake is transparent outside the device, so it sits on\n   *  any background. */\n  maxWidth?: number\n  className?: string\n  /** Render the image yourself (e.g. with next/image). */\n  renderImage?: (src: string, ctx: { alt: string; className: string }) => ReactNode\n}\n\nexport function DKBezelImage({ src, alt, width, height, maxWidth = 460, className, renderImage }: DKBezelImageProps) {\n  return (\n    <figure className={`dkbz-figure${className ? ` ${className}` : ''}`} style={{ maxWidth }}>\n      {renderImage ? (\n        renderImage(src, { alt: alt ?? '', className: 'dkbz-img' })\n      ) : (\n        <img src={src} alt={alt ?? ''} width={width} height={height} className=\"dkbz-img\" loading=\"lazy\" />\n      )}\n    </figure>\n  )\n}\n\nexport interface DKBezelVideoProps {\n  /** Base path of the baked pair: `${base}-light.mp4`, `${base}-dark.mp4` and the\n   *  matching .jpg posters, exactly as dkbezeler wrote them. */\n  base: string\n  /** Accessible label for the clip. */\n  alt?: string\n  /** Intrinsic pixels of the baked videos (dkbezeler prints them). Declares the\n   *  aspect ratio so the box holds its size before video metadata arrives (a bare\n   *  <video> is 300x150 until then, which costs CLS). */\n  width: number\n  height: number\n  maxWidth?: number\n  className?: string\n}\n\n/**\n * H.264 has no alpha, so the bake writes a light version and a dark version with\n * corners matched to each theme's page background. Both render; CSS shows exactly one\n * (`.dark` class convention, falling back to prefers-color-scheme). The hidden one\n * is display:none, so it never fetches past metadata or plays.\n */\nexport function DKBezelVideo({ base, alt, width, height, maxWidth = 460, className }: DKBezelVideoProps) {\n  return (\n    <figure className={`dkbz-figure${className ? ` ${className}` : ''}`} style={{ maxWidth }}>\n      {(['light', 'dark'] as const).map((theme) => (\n        <video\n          key={theme}\n          className={`dkbz-video dkbz-${theme}`}\n          src={`${base}-${theme}.mp4`}\n          poster={`${base}-${theme}.jpg`}\n          style={{ aspectRatio: `${width} / ${height}` }}\n          autoPlay\n          muted\n          loop\n          playsInline\n          aria-label={alt}\n        />\n      ))}\n    </figure>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/dk-bezeler/dk-bezeler.tsx"
    },
    {
      "path": "registry/dk-bezeler/dk-bezeler.css",
      "content": "/* DKBezeler display components. Theme switching follows the shadcn convention\n * (a `.dark` class on <html>) and falls back to prefers-color-scheme when no\n * theme class is in play. */\n\n.dkbz-figure {\n  margin: 0 auto;\n  width: 100%;\n}\n\n.dkbz-img,\n.dkbz-video {\n  display: block;\n  width: 100%;\n  height: auto;\n}\n\n/* Exactly one master visible. The hidden one is display:none, so it never plays\n * or fetches past metadata. */\n.dkbz-dark {\n  display: none;\n}\n\n.dark .dkbz-light {\n  display: none;\n}\n\n.dark .dkbz-dark {\n  display: block;\n}\n\n@media (prefers-color-scheme: dark) {\n  :where(html:not(.light)) .dkbz-light {\n    display: none;\n  }\n\n  :where(html:not(.light)) .dkbz-dark {\n    display: block;\n  }\n}\n",
      "type": "registry:file",
      "target": "components/dk-bezeler/dk-bezeler.css"
    }
  ],
  "type": "registry:component"
}