{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "logos-split-grid",
  "type": "registry:block",
  "title": "Logos, heading beside grid",
  "description": "Two columns: the heading with up to two actions on the left, a grid of framed logo tiles on the right (two across on a phone, three on a wide container). Names without artwork are set as wordmarks.",
  "categories": [
    "logos"
  ],
  "dependencies": [
    "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",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/logos-split-grid/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/logos-split-grid/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, t } from '../_shared/schema';\n\nconst schema = z.object({\n  title: t(80),\n  action: link.partial().optional(),\n  secondaryAction: link.partial().optional(),\n  logos: z.array(z.object({ name: t(40).optional(), media, href: t(300).optional() })).min(2).max(12),\n});\n\nconst logo = (name: string) => ({ name, media: { src: '', alt: name } });\n\nexport const spec = defineSpec({\n  type: 'logos-split-grid',\n  aliases: ['logo-cloud/split-grid'],\n  sourceRuns: ['rmwj0wvt179f93f'],\n  name: 'Logos, heading beside grid',\n  category: 'logos',\n  role: 'body',\n  description: 'Two columns: the heading with up to two actions on the left, a grid of framed logo tiles on the right (two across on a phone, three on a wide container). Names without artwork are set as wordmarks.',\n  schema,\n  defaults: {\n    title: 'Say who relies on you in one line',\n    action: { label: 'Name the main action', href: '#primary' },\n    secondaryAction: { label: 'Name the quieter action', href: '#secondary' },\n    logos: ['First logo', 'Second logo', 'Third logo', 'Fourth logo', 'Fifth logo', 'Sixth logo'].map(logo),\n  },\n});\n"
    },
    {
      "path": "src/blocks/logos-split-grid/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/logos-split-grid/index.tsx",
      "content": "import type { ReactNode } from 'react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { ActionLink, Section, useEditing } from '../_shared/kit';\nimport { hasImage, 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\nconst TILE = 'flex items-center justify-center rounded-kh-lg border border-kh-line bg-kh-surface p-6 text-kh-ink';\n\nfunction Tile({ href, children }: { href: string | undefined; children: ReactNode }) {\n  return href ? <a href={safeHref(href)} className={cn(TILE, 'transition-colors hover:bg-kh-surface-2')}>{children}</a> : <div className={TILE}>{children}</div>;\n}\n\n// The heading and its actions left, the logo tiles right (the right column 1.4 times the left); one column on a phone.\nfunction LogosSplitGrid({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id}>\n      <div className=\"px-kh-gutter\">\n        <div className=\"mx-auto grid max-w-kh-page items-center gap-12 @5xl:grid-cols-[1fr_1.4fr] @5xl:gap-16\">\n          <div className=\"flex min-w-0 flex-col items-start gap-8\">\n            <div id={id}>\n              <Text path={['title']} value={props.title} as=\"h2\" className=\"font-kh-display text-kh-heading text-kh-ink\" />\n            </div>\n            {(props.action || props.secondaryAction) && (\n              <div className=\"flex flex-wrap items-center gap-3\">\n                {props.action && <ActionLink path={['action']} value={{ label: props.action.label ?? '', href: props.action.href ?? '' }} size=\"md\" className=\"rounded-kh-pill\" />}\n                {props.secondaryAction && <ActionLink path={['secondaryAction']} value={{ label: props.secondaryAction.label ?? '', href: props.secondaryAction.href ?? '' }} variant=\"secondary\" size=\"md\" className=\"rounded-kh-pill\" />}\n              </div>\n            )}\n          </div>\n          <ul className=\"grid min-w-0 grid-cols-2 gap-4 @2xl:grid-cols-3 @2xl:gap-6\">\n            {props.logos.map((l, i) => {\n              const image = hasImage(l.media);\n              return (\n                <li key={i} className=\"contents\">\n                  <Tile href={editing ? undefined : l.href}>\n                    {(image || editing) && (\n                      <div className=\"w-28 max-w-full\">\n                        <Media path={['logos', i, 'media']} value={l.media} ratio=\"3 / 1\" />\n                      </div>\n                    )}\n                    <Text path={['logos', i, 'name']} value={l.name ?? ''} as=\"span\" className={cn(image && !editing ? 'sr-only' : 'text-kh-small text-kh-ink')} />\n                  </Tile>\n                </li>\n              );\n            })}\n          </ul>\n        </div>\n      </div>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(LogosSplitGrid);\n"
    }
  ]
}
