{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "app-assistant-showcase",
  "type": "registry:block",
  "title": "App, assistant showcase",
  "description": "Heading and link beside a mock assistant: thread, tool call, an approval with a recommended option, and a composer. A fixture UI, not interactive.",
  "categories": [
    "app"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/badge.json",
    "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/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/app-assistant-showcase/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/app-assistant-showcase/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  link,\n  thread: z.array(z.object({ role: z.enum(['user', 'assistant']), text: t(200) })).min(1).max(4),\n  tool: z.object({ label: t(40), detail: t(80), status: t(20) }),\n  approval: z.object({\n    title: t(80),\n    options: z.array(z.object({ label: t(80), recommended: z.boolean() })).min(1).max(3),\n    actions: z.array(t(30)).max(3),\n  }),\n  composer: z.object({ placeholder: t(60), attach: t(20), send: t(20) }),\n});\n\nexport const spec = defineSpec({\n  type: 'app-assistant-showcase',\n  aliases: ['app/assistant-showcase'],\n  name: 'App, assistant showcase',\n  category: 'app',\n  role: 'body',\n  description: 'Heading and link beside a mock assistant: thread, tool call, an approval with a recommended option, and a composer. A fixture UI, not interactive.',\n  schema,\n  defaults: {\n    \"eyebrow\": \"Assistant\",\n    \"title\": \"Name the screens the assistant works in\",\n    \"description\": \"Say in one or two sentences what the thread, the composer and the approvals let people do, and what they have in common.\",\n    \"link\": {\n      \"label\": \"Say where the link goes\",\n      \"href\": \"#assistant\"\n    },\n    \"thread\": [\n      {\n        \"role\": \"user\",\n        \"text\": \"Write what a person asks the assistant to do.\"\n      },\n      {\n        \"role\": \"assistant\",\n        \"text\": \"Say what the assistant found and the options it sees.\"\n      }\n    ],\n    \"tool\": {\n      \"label\": \"Name a tool call\",\n      \"detail\": \"Name the inputs it read\",\n      \"status\": \"Done\"\n    },\n    \"approval\": {\n      \"title\": \"Say what the person is asked to choose\",\n      \"options\": [\n        {\n          \"label\": \"Name the recommended option\",\n          \"recommended\": true\n        },\n        {\n          \"label\": \"Name the other option\",\n          \"recommended\": false\n        }\n      ],\n      \"actions\": [\n        \"Approve A\",\n        \"Choose B\",\n        \"Ask a question\"\n      ]\n    },\n    \"composer\": {\n      \"placeholder\": \"Say what to ask…\",\n      \"attach\": \"File\",\n      \"send\": \"Send\"\n    }\n  },\n});\n"
    },
    {
      "path": "src/blocks/app-assistant-showcase/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/app-assistant-showcase/index.tsx",
      "content": "import { useId } from 'react';\nimport { ArrowRight, ArrowUp, FileText, Plus, Sparkles } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { cn } from '../../lib/utils';\nimport { Badge } from '../../ui/badge';\nimport { ButtonLink } from '../../ui/button';\nimport { Container, Eyebrow, Opt, Section, useEditing } from '../_shared/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\n/** Button look for the fixture controls. They are not focusable: the panel is a picture of an assistant, not one. */\nconst fake = 'inline-flex min-h-9 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-kh px-3 text-kh-small font-medium';\n\nfunction AppAssistantShowcase({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id}>\n      <Container className=\"grid items-center gap-12 @4xl:grid-cols-[1fr_1.1fr] @4xl:gap-16\">\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.link.label || editing) && (\n            <ButtonLink href={props.link.href} variant=\"secondary\" size=\"lg\" iconEnd={<ArrowRight aria-hidden className=\"size-4\" />} className=\"mt-8\">\n              <Text path={['link', 'label']} value={props.link.label} as=\"span\" placeholder=\"Label\" />\n            </ButtonLink>\n          )}\n        </div>\n\n        <figure role=\"group\" aria-label=\"Example of an assistant conversation\" className=\"m-0 overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface shadow-kh-2\">\n          <ul className=\"flex flex-col gap-4 p-5 @xl:p-6\">\n            {props.thread.map((m, i) => (\n              <li key={i} className={cn('flex gap-3', m.role === 'user' && 'justify-end')}>\n                {m.role === 'assistant' && (\n                  <span aria-hidden className=\"mt-0.5 inline-flex size-7 shrink-0 items-center justify-center rounded-kh-pill bg-kh-accent-soft text-kh-accent-ink\">\n                    <Sparkles className=\"size-3.5\" />\n                  </span>\n                )}\n                <Text\n                  path={['thread', i, 'text']}\n                  value={m.text}\n                  as=\"p\"\n                  className={cn('max-w-[85%] text-kh-small', m.role === 'user' ? 'rounded-kh-lg bg-kh-surface-2 px-3.5 py-2.5 text-kh-ink' : 'pt-1 text-kh-ink')}\n                />\n              </li>\n            ))}\n          </ul>\n\n          <div className=\"mx-5 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-kh border border-kh-line bg-kh-surface-2 px-3 py-2 text-kh-small @xl:mx-6\">\n            <FileText aria-hidden className=\"size-4 shrink-0 text-kh-muted\" />\n            <Text path={['tool', 'label']} value={props.tool.label} as=\"span\" className=\"font-medium\" />\n            <Text path={['tool', 'detail']} value={props.tool.detail} as=\"span\" className=\"min-w-0 truncate font-kh-mono text-kh-caption text-kh-muted\" />\n            <Opt path={['tool', 'status']} value={props.tool.status} as=\"span\" className=\"ml-auto text-kh-caption font-medium text-kh-accent-ink\" placeholder=\"Status\" />\n          </div>\n\n          <div className=\"m-5 rounded-kh-lg border border-kh-line-strong bg-kh-canvas p-4 @xl:m-6 @xl:mt-4\">\n            <Text path={['approval', 'title']} value={props.approval.title} as=\"p\" className=\"text-kh-body font-semibold\" />\n            <ul className=\"mt-3 flex flex-col gap-2\">\n              {props.approval.options.map((o, i) => (\n                <li\n                  key={i}\n                  className={cn('flex flex-wrap items-center gap-x-3 gap-y-1 rounded-kh border px-3 py-2.5 text-kh-small', o.recommended ? 'border-kh-accent bg-kh-accent-soft' : 'border-kh-line bg-kh-surface')}\n                >\n                  <span aria-hidden className={cn('size-4 shrink-0 rounded-kh-pill border-2', o.recommended ? 'border-kh-accent bg-kh-accent' : 'border-kh-line-strong')} />\n                  <Text path={['approval', 'options', i, 'label']} value={o.label} as=\"span\" className=\"min-w-0 flex-1 basis-40\" />\n                  {o.recommended && <Badge tone=\"accent\">Recommended</Badge>}\n                </li>\n              ))}\n            </ul>\n            {props.approval.actions.length > 0 && (\n              <div className=\"mt-4 flex flex-wrap gap-2\">\n                {props.approval.actions.map((a, i) => (\n                  <Text\n                    key={i}\n                    path={['approval', 'actions', i]}\n                    value={a}\n                    as=\"span\"\n                    className={cn(fake, i === 0 ? 'bg-kh-ink text-kh-on-ink' : 'border border-kh-line-strong bg-kh-surface text-kh-ink')}\n                  />\n                ))}\n              </div>\n            )}\n          </div>\n\n          <div aria-hidden className=\"flex items-center gap-2 border-t border-kh-line p-3\">\n            <span className={cn(fake, 'text-kh-muted')}>\n              <Plus className=\"size-4\" />\n              <Text path={['composer', 'attach']} value={props.composer.attach} as=\"span\" />\n            </span>\n            <Text path={['composer', 'placeholder']} value={props.composer.placeholder} as=\"span\" className=\"min-w-0 flex-1 truncate text-kh-small text-kh-muted\" />\n            <span className={cn(fake, 'bg-kh-ink text-kh-on-ink')}>\n              <ArrowUp className=\"size-4\" />\n              <Text path={['composer', 'send']} value={props.composer.send} as=\"span\" />\n            </span>\n          </div>\n        </figure>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(AppAssistantShowcase);\n"
    }
  ]
}
