{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "newsletter-inline",
  "type": "registry:block",
  "title": "Newsletter, inline",
  "description": "One-line email capture: headline and description beside an email field and a subscribe button.",
  "categories": [
    "newsletter"
  ],
  "dependencies": [
    "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-d-chrome.json"
  ],
  "files": [
    {
      "path": "src/blocks/newsletter-inline/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/newsletter-inline/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, formFields, t, req } from '../_shared/schema';\n\nconst schema = z.object({\n  title: t(100),\n  description: t(240),\n  placeholder: req(60),\n  submit: req(24),\n  consent: t(160),\n  /** Form wiring: `action` is where the form goes (and a flow edge in Canvas); with `method` it submits natively. See formFields. */\n  ...formFields,\n});\n\nexport const spec = defineSpec({\n  type: 'newsletter-inline',\n  aliases: ['newsletter/inline'],\n  name: 'Newsletter, inline',\n  category: 'newsletter',\n  role: 'body',\n  description: 'One-line email capture: headline and description beside an email field and a subscribe button.',\n  schema,\n  defaults: {\n    title: 'Say what subscribers get by email',\n    description: 'Say in one or two sentences what the emails cover and how often they come.',\n    placeholder: 'Your email address',\n    submit: 'Subscribe',\n    consent: 'Say how the address is kept and how to leave',\n  },\n});\n"
    },
    {
      "path": "src/blocks/newsletter-inline/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/newsletter-inline/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Container, Section } from '../_shared/kit';\nimport { EmailForm } from '../_shared/d-chrome-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 NewsletterInline({ props }: BlockProps<Props>) {\n  const id = useId();\n  return (\n    <Section labelledBy={id} className=\"py-14 @3xl:py-20\">\n      <Container className=\"grid items-center gap-8 @3xl:grid-cols-2 @3xl:gap-16\">\n        <div>\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className=\"text-kh-heading font-semibold @3xl:text-kh-title\" />\n          </div>\n          <Text path={['description']} value={props.description} as=\"p\" className=\"mt-3 max-w-kh-lead text-kh-body text-kh-muted\" />\n        </div>\n        <div>\n          <EmailForm path={[]} placeholder={props.placeholder} submit={props.submit} form={props} size=\"lg\" />\n          <Text path={['consent']} value={props.consent} as=\"p\" className=\"mt-3 text-kh-caption text-kh-muted\" />\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(NewsletterInline);\n"
    }
  ]
}
