{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-featured",
  "type": "registry:block",
  "title": "Pricing, featured",
  "description": "One tall featured plan card beside shorter plan cards stacked on its right, under a heading; on a phone the cards stack, the featured one first.",
  "categories": [
    "pricing"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-c-proof.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/pricing-featured/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/pricing-featured/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst featured = z.object({\n  name: t(40),\n  badge: t(24),\n  price: t(16),\n  per: t(40),\n  lead: t(160),\n  text: t(320),\n  points: z.array(t(100)).min(1).max(8),\n  action: link,\n});\n\nconst plan = z.object({\n  name: t(40),\n  price: t(16),\n  per: t(60),\n  description: t(200),\n  action: link,\n});\n\nconst schema = z.object({\n  eyebrow: t(40).optional(),\n  title: t(80),\n  /** A lead paragraph under the heading; drawn when set. */\n  description: t(200).optional(),\n  /** The heading at title size (the default) or at the smaller heading size. */\n  titleSize: z.enum(['title', 'heading']).optional(),\n  featured,\n  /** The shorter plans beside the featured one. */\n  plans: z.array(plan).min(1).max(3),\n  /** stacked (the default): upright short cards. sideways: each short card lies sideways (name and line left, price over its button right, centred in the card), the featured name is title size and its button spans the card. */\n  look: z.enum(['stacked', 'sideways']).optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'pricing-featured',\n  aliases: ['pricing/featured'],\n  sourceRuns: ['rmwj1xsov77d502', 'rmwj1pp873d8c1d', 'rmwj0rwhtf39990'],\n  name: 'Pricing, featured',\n  category: 'pricing',\n  role: 'body',\n  description: 'One tall featured plan card beside shorter plan cards stacked on its right, under a heading; on a phone the cards stack, the featured one first.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the kind of plans',\n    title: 'Say in one line what the visitor is choosing between',\n    featured: {\n      name: 'Name the plan most visitors should pick',\n      badge: 'Say why',\n      price: 'Price',\n      per: 'Say what the price covers',\n      lead: 'Say in one sentence who this plan is for and the main gain.',\n      text: 'Say in two sentences what comes with it and why it is worth more than the others, so the reader can decide.',\n      points: ['Name one thing this plan includes', 'Name a second thing it includes', 'Name a third thing it includes'],\n      action: { label: 'Choose this plan', href: '#featured' },\n    },\n    plans: [\n      { name: 'Name the second plan', price: 'Price', per: 'Say what the price covers', description: 'Say in one or two sentences which things this plan covers and who it suits.', action: { label: 'Choose this plan', href: '#second' } },\n      { name: 'Name the third plan', price: 'Price', per: 'Say what the price covers', description: 'Say in one or two sentences which things this plan covers and who it suits.', action: { label: 'Choose this plan', href: '#third' } },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/pricing-featured/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/pricing-featured/index.tsx",
      "content": "import { Check } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, Opt, Section } from '../_shared/kit';\nimport { useHeadingId } from '../_shared/c-proof-kit';\nimport { cn } from '../../lib/utils';\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\n// The captured arrangement: a tall featured card (1.4 parts) spanning both rows beside the plans (1 part) stacked, one column on a phone.\nfunction PricingFeatured({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const f = props.featured;\n  const side = props.look === 'sideways';\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <div className=\"max-w-kh-narrow\">\n          <Opt path={['eyebrow']} value={props.eyebrow} className=\"font-kh-mono text-kh-caption tracking-wider text-kh-muted uppercase\" placeholder=\"Eyebrow\" />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className={cn('mt-3 font-kh-display text-kh-ink', props.titleSize === 'heading' ? 'text-kh-heading' : 'text-kh-title')} />\n          </div>\n          <Opt path={['description']} value={props.description} multiline className=\"mt-4 text-kh-lead text-kh-ink-2\" placeholder=\"Description\" />\n        </div>\n        <div className=\"mt-10 grid grid-cols-1 gap-6 @4xl:grid-cols-[1.4fr_1fr]\">\n          <article className=\"flex flex-col rounded-kh-xl border border-kh-accent bg-kh-surface p-6 shadow-kh-2 @md:p-8 @4xl:row-span-2\">\n            <div className=\"flex min-w-0 items-center justify-between gap-3\">\n              <Text path={['featured', 'name']} value={f.name} as=\"h3\" className={cn('min-w-0 font-kh-display text-kh-ink', side ? 'text-kh-title' : 'text-kh-heading')} />\n              <Text path={['featured', 'badge']} value={f.badge} as=\"span\" className=\"shrink-0 whitespace-nowrap rounded-kh-pill bg-kh-accent-soft px-3 py-1 font-kh-mono text-kh-caption text-kh-accent-ink\" />\n            </div>\n            <p className=\"mt-6 flex flex-wrap items-baseline gap-x-2\">\n              <Text path={['featured', 'price']} value={f.price} as=\"span\" className=\"font-kh-display text-kh-display text-kh-ink\" />\n              <Text path={['featured', 'per']} value={f.per} as=\"span\" className=\"text-kh-small text-kh-muted\" />\n            </p>\n            <Text path={['featured', 'lead']} value={f.lead} as=\"p\" multiline className=\"mt-4 text-kh-lead text-kh-ink-2\" />\n            <Text path={['featured', 'text']} value={f.text} as=\"p\" multiline className=\"mt-4 text-kh-body text-kh-ink-2\" />\n            <ul className=\"mt-6 flex flex-col gap-3\">\n              {f.points.map((p, i) => (\n                <li key={i} className=\"flex items-start gap-3 text-kh-body text-kh-ink-2\">\n                  <Check aria-hidden=\"true\" className=\"mt-1 size-4 shrink-0 text-kh-accent\" strokeWidth={2} />\n                  <Text path={['featured', 'points', i]} value={p} as=\"span\" className=\"min-w-0\" />\n                </li>\n              ))}\n            </ul>\n            <div className=\"mt-auto pt-8\">\n              <ActionLink path={['featured', 'action']} value={f.action} className={cn('w-full rounded-kh-pill', !side && '@md:w-auto')} />\n            </div>\n          </article>\n          {props.plans.map((p, i) => side ? (\n            <article key={i} className=\"flex flex-col justify-center gap-4 rounded-kh-xl border border-kh-line bg-kh-surface-2 p-6 shadow-kh-1 @md:flex-row @md:items-center @md:justify-between @md:gap-6\">\n              <div className=\"min-w-0\">\n                <Text path={['plans', i, 'name']} value={p.name} as=\"h3\" className=\"font-kh-display text-kh-heading text-kh-ink\" />\n                <Text path={['plans', i, 'description']} value={p.description} as=\"p\" multiline className=\"mt-2 text-kh-small text-kh-ink-2\" />\n              </div>\n              <div className=\"flex shrink-0 flex-col @md:items-end\">\n                <p className=\"flex flex-wrap items-baseline gap-x-2\">\n                  <Text path={['plans', i, 'price']} value={p.price} as=\"span\" className=\"font-kh-display text-kh-heading text-kh-ink\" />\n                  <Text path={['plans', i, 'per']} value={p.per} as=\"span\" className=\"text-kh-small text-kh-muted\" />\n                </p>\n                <ActionLink path={['plans', i, 'action']} value={p.action} variant=\"secondary\" className=\"mt-3 rounded-kh-pill border border-kh-line-strong bg-kh-surface-2\" />\n              </div>\n            </article>\n          ) : (\n            <article key={i} className=\"flex flex-col rounded-kh-xl border border-kh-line bg-kh-surface-2 p-6 shadow-kh-1\">\n              <Text path={['plans', i, 'name']} value={p.name} as=\"h3\" className=\"font-kh-display text-kh-heading text-kh-ink\" />\n              <p className=\"mt-4 flex flex-wrap items-baseline gap-x-2\">\n                <Text path={['plans', i, 'price']} value={p.price} as=\"span\" className=\"font-kh-display text-kh-title text-kh-ink\" />\n                <Text path={['plans', i, 'per']} value={p.per} as=\"span\" className=\"text-kh-small text-kh-muted\" />\n              </p>\n              <Text path={['plans', i, 'description']} value={p.description} as=\"p\" multiline className=\"mt-4 text-kh-body text-kh-ink-2\" />\n              <div className=\"mt-auto pt-6\">\n                <ActionLink path={['plans', i, 'action']} value={p.action} variant=\"secondary\" className=\"w-full rounded-kh-pill border border-kh-line-strong bg-kh-surface-2 @md:w-auto\" />\n              </div>\n            </article>\n          ))}\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(PricingFeatured);\n"
    }
  ]
}
