{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "newsletter-split",
  "type": "registry:block",
  "title": "Newsletter, split",
  "description": "Copy and a short benefit list on the left, a raised sign-up panel on the right. For a newsletter that needs a reason to subscribe, not just a field.",
  "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-c-proof.json",
    "https://ui.klarhimmel.com/r/kit-d-chrome.json"
  ],
  "files": [
    {
      "path": "src/blocks/newsletter-split/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/newsletter-split/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, formFields, t, req } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(100),\n  description: t(240),\n  benefits: z.array(t(80)).max(4),\n  formTitle: t(60),\n  placeholder: req(60),\n  submit: req(24),\n  consent: t(160),\n  /** Form wiring: `action` is where the form goes; with `method` it submits natively. See formFields. */\n  ...formFields,\n});\n\nexport const spec = defineSpec({\n  type: 'newsletter-split',\n  aliases: ['newsletter/split'],\n  name: 'Newsletter, split',\n  category: 'newsletter',\n  role: 'body',\n  description: 'Copy and a short benefit list on the left, a raised sign-up panel on the right. For a newsletter that needs a reason to subscribe, not just a field.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the newsletter',\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    benefits: ['Name a first benefit of subscribing', 'Name a second benefit of subscribing', 'Name a third benefit of subscribing'],\n    formTitle: 'Invite the visitor to join',\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-split/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/newsletter-split/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Container, Eyebrow, Opt, Section, useEditing } from '../_shared/kit';\nimport { CheckItem } from '../_shared/c-proof-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 NewsletterSplit({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id}>\n      <Container className=\"grid gap-12 @4xl:grid-cols-2 @4xl:items-center @4xl:gap-20\">\n        <div>\n          <Eyebrow path={['eyebrow']} value={props.eyebrow} />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className=\"text-kh-title font-semibold\" />\n          </div>\n          <Opt path={['description']} value={props.description} multiline className=\"mt-4 max-w-kh-lead text-kh-lead text-kh-muted\" placeholder=\"Description\" />\n          {(props.benefits.length > 0 || editing) && (\n            <ul className=\"mt-8 space-y-3\">\n              {props.benefits.map((b, i) => (\n                <CheckItem key={i} path={['benefits', i]} value={b} className=\"text-kh-body\" />\n              ))}\n            </ul>\n          )}\n        </div>\n        <div className=\"rounded-kh-xl border border-kh-line bg-kh-surface p-7 shadow-kh-2 @2xl:p-9\">\n          <Opt path={['formTitle']} value={props.formTitle} as=\"p\" className=\"mb-5 text-kh-heading font-semibold\" placeholder=\"Form title\" />\n          <EmailForm path={[]} placeholder={props.placeholder} submit={props.submit} form={props} size=\"lg\" />\n          <Opt path={['consent']} value={props.consent} className=\"mt-3 text-kh-caption text-kh-muted\" placeholder=\"Consent\" />\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(NewsletterSplit);\n"
    }
  ]
}
