{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "download-apps",
  "type": "registry:block",
  "title": "Download, mobile app",
  "description": "Get the mobile app: a headline, one to three store buttons (each a link with the store named in text), a QR code with a caption for people on a desktop, and an optional line about requirements. The QR image is a Media slot; the buttons never depend on it.",
  "categories": [
    "download"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-c-proof.json"
  ],
  "files": [
    {
      "path": "src/blocks/download-apps/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/download-apps/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  /** Store links as our own buttons (icon, small line, store name), not the stores' artwork. */\n  stores: z.array(z.object({ small: t(30), store: t(30), href: t(300) })).min(1).max(3),\n  qr: z.object({ image: media, caption: t(100) }),\n  /** An optional line under the buttons (\"Needs iOS 16 or Android 10\"). */\n  note: t(120).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'download-apps',\n  aliases: ['download/apps'],\n  name: 'Download, mobile app',\n  category: 'download',\n  role: 'body',\n  description: 'Get the mobile app: a headline, one to three store buttons (each a link with the store named in text), a QR code with a caption for people on a desktop, and an optional line about requirements. The QR image is a Media slot; the buttons never depend on it.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the topic',\n    title: 'Say where the app goes with them',\n    description: 'Say in one or two sentences what the app lets them do and what it costs.',\n    stores: [\n      { small: 'Get it from the', store: 'First store', href: '#app-store' },\n      { small: 'Available on', store: 'Second store', href: '#google-play' },\n    ],\n    qr: { image: { src: '', alt: 'A QR code that opens the app page for their phone' }, caption: 'Say to scan the code with a phone' },\n    note: 'Say which system versions it needs.',\n  },\n});\n"
    },
    {
      "path": "src/blocks/download-apps/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/download-apps/index.tsx",
      "content": "import { Smartphone } from 'lucide-react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { Container, Opt, Section } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-kit';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\n\nfunction DownloadApps({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section labelledBy={id}>\n      <Container className=\"grid items-center gap-12 @4xl:grid-cols-[1.3fr_1fr] @4xl:gap-20\">\n        <div>\n          <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n          <ul className=\"mt-10 flex flex-wrap gap-3\">\n            {props.stores.map((s, i) => (\n              <li key={i}>\n                <a\n                  href={safeHref(s.href)}\n                  className=\"inline-flex min-h-14 items-center gap-3 rounded-kh-lg bg-kh-ink px-5 py-2 text-kh-on-ink hover:bg-[color-mix(in_oklab,var(--kh-ink)_86%,var(--kh-canvas))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--kh-focus)\"\n                >\n                  <Smartphone aria-hidden className=\"size-6 shrink-0\" />\n                  <span className=\"flex flex-col text-left leading-tight\">\n                    <Text path={['stores', i, 'small']} value={s.small} as=\"span\" className=\"text-kh-caption\" />\n                    <Text path={['stores', i, 'store']} value={s.store} as=\"span\" className=\"text-kh-body font-semibold\" />\n                  </span>\n                </a>\n              </li>\n            ))}\n          </ul>\n          <Opt path={['note']} value={props.note} className=\"mt-6 text-kh-small text-kh-muted\" placeholder=\"Requirements\" />\n        </div>\n        <figure className=\"m-0 flex flex-col items-center gap-4 rounded-kh-xl border border-kh-line bg-kh-surface p-8 text-center shadow-kh-1\">\n          <Media path={['qr', 'image']} value={props.qr.image} ratio=\"1 / 1\" className=\"size-40 rounded-kh border border-kh-line\" />\n          <Text path={['qr', 'caption']} value={props.qr.caption} as=\"figcaption\" className=\"max-w-56 text-kh-small text-kh-muted\" />\n        </figure>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(DownloadApps);\n"
    }
  ]
}
