{
  "name": "aspect-ratio",
  "type": "ui:component",
  "title": "AspectRatio",
  "description": "Native CSS aspect-ratio media wrapper for images, videos, and embeds.",
  "dependencies": [],
  "registryDependencies": [
    "theme"
  ],
  "files": [
    {
      "path": "src/ui/aspect-ratio.tsx",
      "target": "src/ui/aspect-ratio.tsx",
      "sha256": "b442e26bd593987c6afae3aafa6eddb35b742e2de7a4398cce223a5be629da9b",
      "content": "import './theme.css';\nimport { scope, type View } from '@fierst/blokd';\n\nconst arScope = scope`\n  :scope {\n    position: relative;\n    width: 100%;\n    overflow: hidden;\n    border-radius: var(--blokd-radius-md);\n    background: var(--blokd-surface-muted);\n  }\n  :scope > img,\n  :scope > video,\n  :scope > iframe {\n    width: 100%;\n    height: 100%;\n    object-fit: cover;\n    display: block;\n    border: none;\n  }\n`;\n\nexport function AspectRatio({\n  ratio = 16 / 9,\n  class: extraClass,\n  children,\n}: {\n  ratio?: number | string;\n  class?: string;\n  children?: View;\n}) {\n  return (\n    <div\n      class={[arScope, extraClass].filter(Boolean).join(' ')}\n      style={{ aspectRatio: String(ratio) }}\n    >\n      {children}\n    </div>\n  );\n}\n"
    }
  ]
}
