{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bungie-image",
  "title": "Bungie image",
  "description": "Renders a Bungie image, resolving an ImageRef to a URL via @engram/core's configurable image base.",
  "dependencies": [
    "@engram/core"
  ],
  "registryDependencies": [
    "@engram/cn",
    "@engram/tokens"
  ],
  "files": [
    {
      "path": "src/components/bungie-image.tsx",
      "content": "import { type ImageRef, resolveImageRef } from \"@engram/core\";\nimport type { ImgHTMLAttributes } from \"react\";\nimport { cn } from \"../lib/cn.js\";\n\nexport interface BungieImageProps\n  extends Omit<ImgHTMLAttributes<HTMLImageElement>, \"src\" | \"alt\"> {\n  /** An Engram ImageRef (relative path + base) or an already-resolved URL. */\n  src: ImageRef | string;\n  /** Alt text; falls back to the ImageRef's alt, then empty. */\n  alt?: string;\n  /** Override the configured image base for this image only. */\n  imageBase?: string;\n}\n\n/**\n * Renders a Bungie image, resolving an ImageRef to a URL via @engram/core's\n * configurable image base. The base primitive every icon-bearing component uses.\n */\nexport function BungieImage({\n  src,\n  alt,\n  imageBase,\n  className,\n  ...rest\n}: BungieImageProps) {\n  const url = typeof src === \"string\" ? src : resolveImageRef(src, imageBase);\n  const resolvedAlt =\n    alt ?? (typeof src === \"object\" ? src.alt : undefined) ?? \"\";\n  return (\n    <img\n      src={url}\n      alt={resolvedAlt}\n      className={cn(\"engram-bungie-image\", className)}\n      {...rest}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/engram/bungie-image.tsx"
    }
  ],
  "meta": {
    "level": "atom"
  },
  "docs": "Extend without forking: edit the copied source, use `asChild` (Radix Slot) to change the rendered element, pass the typed `annotations` prop for curated data (verdict/tags/per-plug), or use slot / render-prop props for arbitrary content. Requires the @engram/tokens theme (--engram-* CSS variables).",
  "categories": [
    "primitive"
  ],
  "type": "registry:component"
}