{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "report-audit-overview",
  "type": "registry:block",
  "title": "Audit, overview",
  "description": "A scored audit summary with scope, limitations and source provenance. An unassessed result is never rendered as zero.",
  "categories": [
    "report"
  ],
  "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/score-ring.json",
    "https://ui.klarhimmel.com/r/source-note.json"
  ],
  "files": [
    {
      "path": "src/blocks/report-audit-overview/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/report-audit-overview/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t, req, link } from '../_shared/schema';\nconst schema = z.object({ eyebrow: t(60), title: t(120), description: t(300), score: z.number().min(0).max(100).nullable(), scoreLabel: req(60), unavailable: t(100), verdict: t(160), facts: z.array(z.object({ label: req(40), value: t(120) })).max(6), source: t(100), sourceNote: t(200), action: link, });\nexport const spec = defineSpec({\n  type: 'report-audit-overview', aliases: ['report/audit-overview'], name: 'Audit, overview', category: 'report', role: 'body',\n  description: 'A scored audit summary with scope, limitations and source provenance. An unassessed result is never rendered as zero.', schema,\n  defaults: {\n  \"eyebrow\": \"Name the report type\",\n  \"title\": \"Name the audit and its subject\",\n  \"description\": \"Say what was checked, for whom and on what basis, and what the result does and does not tell.\",\n  \"score\": 68,\n  \"scoreLabel\": \"Name the score\",\n  \"unavailable\": \"Not assessed\",\n  \"verdict\": \"Say the verdict in one sentence, with what comes first.\",\n  \"facts\": [\n    {\n      \"label\": \"Fact one\",\n      \"value\": \"First value\"\n    },\n    {\n      \"label\": \"Fact two\",\n      \"value\": \"Second value\"\n    },\n    {\n      \"label\": \"Fact three\",\n      \"value\": \"Third value\"\n    }\n  ],\n  \"source\": \"Say where the data came from\",\n  \"sourceNote\": \"Say what is excluded and that this is a point in time.\",\n  \"action\": {\n    \"label\": \"Say where the action leads\",\n    \"href\": \"#recommendations\"\n  }\n},\n});\n"
    },
    {
      "path": "src/blocks/report-audit-overview/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/report-audit-overview/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Container, Section, SectionHeader, ActionLink } from '../_shared/kit';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\nimport { ScoreRing } from '../../ui/score-ring';\nimport { useEditing } from '../_shared/kit';\nimport { SourceNote } from '../../ui/source-note';\nfunction AuditOverview({ props }: BlockProps<Props>) {\n const id = useId(); const editing = useEditing();\n return <Section labelledBy={id}><Container>\n  <div className=\"grid gap-8 @3xl:grid-cols-[1fr_auto] @3xl:items-center\">\n   <div><SectionHeader id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n    <Text path={['verdict']} value={props.verdict} as=\"p\" className=\"mt-5 text-kh-lead font-medium\" />\n   </div>\n   <ScoreRing value={props.score} label={<Text path={['scoreLabel']} value={props.scoreLabel} as=\"span\" />} unavailable={<Text path={['unavailable']} value={props.unavailable} as=\"span\" />} />\n  </div>\n  {editing && props.score !== null && <span hidden><Text path={['unavailable']} value={props.unavailable} as=\"span\" /></span>}\n  <dl className=\"my-8 grid gap-4 @xl:grid-cols-3\">{props.facts.map((f,i)=><div key={i} className=\"border-t border-kh-line pt-3\"><dt className=\"text-kh-small text-kh-muted\"><Text path={['facts',i,'label']} value={f.label} as=\"span\" /></dt><dd className=\"mt-1 text-kh-body font-medium [overflow-wrap:anywhere]\"><Text path={['facts',i,'value']} value={f.value} as=\"span\" /></dd></div>)}</dl>\n  <SourceNote source={<Text path={['source']} value={props.source} as=\"span\" />}><Text path={['sourceNote']} value={props.sourceNote} as=\"p\" /></SourceNote>\n  <ActionLink path={['action']} value={props.action} className=\"mt-6\" />\n </Container></Section>;\n}\nexport default withHeadingLevel(AuditOverview);\n"
    }
  ]
}
