{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A long read in one reading column, or beside a table of contents that links to the sections.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{* Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n    Source: packages/compose-gen/specs/organisms/article-body.json\n    A long read: sections with headings, text and an optional pull quote, in one reading column or beside a table of contents that links to each section. Axes: layout (column, toc), quotes (show, hide), tone. Highlighting the section being read is a port contract.\n    Props (p): id, title, sections, empty, tocTitle, layout, quotes, tone, landmarkLabel. *}\n{var $v_id = ($p['id'] ?? null)}\n{var $v_title = ($p['title'] ?? null)}\n{var $v_sections = ($p['sections'] ?? null)}\n{var $v_empty = ($p['empty'] ?? '')}\n{var $v_tocTitle = ($p['tocTitle'] ?? null)}\n{var $v_layout = ($p['layout'] ?? 'column')}\n{var $v_quotes = ($p['quotes'] ?? 'show')}\n{var $v_tone = ($p['tone'] ?? 'default')}\n{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}\n{capture $c_13}\n  {if og_t(og_eq(og_len($v_sections), 0))}\n    {=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'file-text', 'title' => $v_empty]])|noescape}\n  {else}\n    {capture $c_12}\n      {if og_t(og_eq($v_layout, 'toc'))}\n        {capture $c_6}\n          {capture $c_5}\n            {capture $c_1}\n              {=og_text($v_tocTitle)}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}\n            {capture $c_4}\n              {foreach og_l($v_sections) as $v_s}\n                {capture $c_3}\n                  {capture $c_2}\n                    {=og_text(og_get($v_s, ['title']))}\n                  {/capture}\n                  {=og_include('compose/Link.latte', ['href' => og_url(og_s(og_tpl('#{0}-{1}', [$v_id, og_get($v_s, ['id'])]))), 'variant' => 'default', 'class' => 'text-sm text-muted-foreground', 'attrs' => og_attrs(['data-slot', 'toc-link']), 'children' => (string) $c_2])|noescape}\n                {/capture}\n                {=og_include('compose/ListItem.latte', ['attrs' => og_attrs(['data-slot', 'sections-row']), 'children' => (string) $c_3])|noescape}\n              {/foreach}\n            {/capture}\n            {=og_include('compose/List.latte', ['class' => 'm-0 flex list-none flex-col gap-2 p-0', 'children' => (string) $c_4])|noescape}\n          {/capture}\n          {=og_include('compose/Stack.latte', ['gap' => '2', 'children' => (string) $c_5])|noescape}\n        {/capture}\n        {=og_include('blocks/nav-block.latte', ['p' => ['label' => (og_t($v_landmarkLabel) ? og_uniq(og_tpl('{0}, {1}', [$v_tocTitle, $v_landmarkLabel])) : $v_tocTitle), 'className' => og_cnv(['md:sticky md:top-4']), 'testid' => 'toc'], 'children' => og_markup($c_6)])|noescape}\n      {/if}\n      {capture $c_11}\n        {foreach og_l($v_sections) as $v_s}\n          {capture $c_10}\n            {capture $c_7}\n              {=og_text(og_get($v_s, ['title']))}\n            {/capture}\n            {=og_include('compose/Title.latte', ['as' => 3, 'size' => '2xl', 'weight' => 'bold', 'children' => (string) $c_7])|noescape}\n            {capture $c_8}\n              {=og_text(og_get($v_s, ['text']))}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'base', 'children' => (string) $c_8])|noescape}\n            {if og_t(og_eq($v_quotes, 'show'))}\n              {if og_t(og_get($v_s, ['quote']))}\n                {capture $c_9}\n                  {=og_text(og_get($v_s, ['quote']))}\n                {/capture}\n                {=og_include('compose/Text.latte', ['tag' => 'blockquote', 'class' => 'm-0 border-l border-border pl-4 text-lg', 'attrs' => og_attrs(['data-slot', 'quote']), 'children' => (string) $c_9])|noescape}\n              {/if}\n            {/if}\n          {/capture}\n          {=og_include('compose/Box.latte', ['class' => 'flex flex-col gap-4', 'attrs' => og_attrs(['id', og_tpl('{0}-{1}', [$v_id, og_get($v_s, ['id'])]), 'data-slot', 'item']), 'children' => (string) $c_10])|noescape}\n        {/foreach}\n      {/capture}\n      {=og_include('compose/Stack.latte', ['gap' => '8', 'align' => 'stretch', 'class' => 'mx-auto w-full max-w-2xl min-w-0', 'attrs' => og_attrs(['data-slot', 'article']), 'children' => (string) $c_11])|noescape}\n    {/capture}\n    {=og_include('compose/Grid.latte', ['cols' => '1', 'class' => og_s(og_cnv(['items-start gap-8', (og_t(og_eq($v_layout, 'toc')) ? 'md:grid-cols-[14rem_minmax(0,1fr)]' : '')])), 'children' => (string) $c_12])|noescape}\n  {/if}\n{/capture}\n{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_13)])|noescape}\n",
      "path": "blocks/article-body.latte",
      "target": "blocks/article-body.latte"
    }
  ],
  "meta": {
    "category": "content",
    "group": "blog",
    "kind": "block",
    "tags": [
      "latte",
      "block"
    ]
  },
  "name": "article-body",
  "registryDependencies": [
    "box",
    "empty-state",
    "grid",
    "link",
    "list",
    "list-item",
    "nav-block",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "latte",
  "title": "Article Body",
  "type": "registry:block"
}
