{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Section Frame component",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  A page section: the landmark named by its heading, the heading (h1 or h2), an optional lead, the body\n  (`children`) and optional media. `layout` stacks everything or puts the media beside the text; `boxed` puts\n  the body in a card. Axes: layout, media side, tone, density, align.\n-->\n<script lang=\"ts\" module>\n  import type { Snippet } from \"svelte\";\n  import type { SectionHeading, HeadLink, SectionMedia } from \"./section-frame.types\";\n  import { variants } from \"../utils\";\n\n  /** SectionFrame: the classes of each value (shadcn/cva style). */\n  export const sectionFrameVariants = variants({\n    base: \"w-full\",\n    variants: {\n      tone: {\n        default: \"\",\n        muted: \"bg-muted\",\n        inverse: \"bg-foreground text-background [&_.text-muted-foreground]:text-background/70\",\n      },\n      density: {\n        roomy: \"py-16\",\n        default: \"py-10\",\n        compact: \"py-6\",\n        flush: \"py-0\",\n      },\n      align: {\n        start: \"\",\n        center: \"text-center\",\n      },\n    },\n    defaultVariants: { tone: \"default\", density: \"default\", align: \"start\" },\n  });\n\n  export type SectionFrameProps = {\n    id: string;\n    title?: string;\n    lead?: string;\n    heading?: SectionHeading;\n    action?: HeadLink;\n    layout?: \"stack\" | \"split\";\n    media?: SectionMedia;\n    boxed?: boolean;\n    tone?: \"default\" | \"muted\" | \"inverse\";\n    density?: \"roomy\" | \"default\" | \"compact\" | \"flush\";\n    align?: \"start\" | \"center\";\n    measure?: \"default\" | \"landing\" | \"fill\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n    landmarkLabel?: string;\n    class?: string;\n    children?: Snippet;\n    aside?: Snippet;\n  };\n</script>\n\n<script lang=\"ts\">\n  import Block from \"../compose/Block.svelte\";\n  import Box from \"../compose/Box.svelte\";\n  import Container from \"../compose/Container.svelte\";\n  import Grid from \"../compose/Grid.svelte\";\n  import Stack from \"../compose/Stack.svelte\";\n  import SectionBox from \"../components/section-box.svelte\";\n  import SectionColumn from \"../components/section-column.svelte\";\n  import SectionHeader from \"../components/section-header.svelte\";\n  import { defaults } from \"../presets/defaults\";\n  import { cn } from \"../utils\";\n\n  let {\n    id,\n    title = \"\",\n    lead,\n    heading,\n    action,\n    layout = \"stack\",\n    media,\n    boxed = false,\n    tone = \"default\",\n    density = \"default\",\n    align = \"start\",\n    measure = \"default\",\n    landmarkLabel,\n    class: className,\n    children,\n    aside,\n  }: SectionFrameProps = $props();\n  const titleId = $derived(id + \"-title\");\n  const sectionTone = $derived(boxed ? \"default\" : tone);\n  const center = $derived((align as string) === \"center\");\n</script>\n\n<Block\n  tag=\"section\"\n  class={cn(sectionFrameVariants({ tone: sectionTone, density: density, align: align }), className)}\n  aria-labelledby={(landmarkLabel ? undefined : (((title as string) !== \"\") ? titleId : undefined))}\n  aria-label={(landmarkLabel ?? (((title as string) === \"\") ? id : undefined))}\n  data-tone={tone}\n  data-density={density}\n  data-slot=\"section\"\n>\n  <Container\n    class={\n      (measure as string) === \"landing\" ? cn(\"mx-auto w-full px-4\", defaults.section.landing)\n      : (measure as string) === \"fill\" ? \"w-full\"\n      : \"mx-auto w-full max-w-6xl px-4\"\n    }\n    data-slot=\"container\"\n  >\n    <SectionBox boxed={boxed}>\n      {#if ((layout as string) === \"split\")}\n        <Grid cols=\"1-2\" class={cn(\"gap-8\", ((media?.align === \"start\") ? \"items-start\" : \"items-center\"))}>\n          {#if (media?.show && (media?.side === \"start\"))}\n            <Box class=\"w-full\" data-slot=\"media\">\n              {@render aside?.()}\n            </Box>\n          {/if}\n          <Stack gap=\"6\" align=\"stretch\">\n            <SectionHeader titleId={titleId} title={title} heading={heading} action={action} lead={lead} center={center} />\n            {@render children?.()}\n          </Stack>\n          {#if (media?.show && (media?.side !== \"start\"))}\n            <Box class=\"w-full\" data-slot=\"media\">\n              {@render aside?.()}\n            </Box>\n          {/if}\n        </Grid>\n      {:else}\n        <SectionColumn measure={measure}>\n          <SectionHeader titleId={titleId} title={title} heading={heading} action={action} lead={lead} center={center} />\n          {@render children?.()}\n          {#if media?.show}\n            <Box class=\"w-full\" data-slot=\"media\">\n              {@render aside?.()}\n            </Box>\n          {/if}\n        </SectionColumn>\n      {/if}\n    </SectionBox>\n  </Container>\n</Block>\n",
      "path": "components/section-frame.svelte",
      "target": "components/section-frame.svelte"
    },
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n\nexport type SectionHeading = {\n  /** heading level */\n  level?: 1 | 2;\n  /** display: an oversized heading */\n  scale?: \"default\" | \"display\";\n  /** a short pill above the heading (e.g. New) */\n  badge?: string;\n};\n\nexport type HeadLink = {\n  /** text of the link (View all, Browse all); none: no link */\n  label?: string;\n  /** href of the link; none: no link */\n  href?: string;\n};\n\nexport type SectionMedia = {\n  /** the `aside` slot is shown */\n  show?: boolean;\n  /** side of the media in the split layout */\n  side?: \"end\" | \"start\";\n  /** split layout: the body and the media centred on each other, or both from the top */\n  align?: \"center\" | \"start\";\n};\n",
      "path": "components/section-frame.types.ts",
      "target": "components/section-frame.types.ts"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "svelte",
      "component"
    ]
  },
  "name": "section-frame",
  "registryDependencies": [
    "block",
    "box",
    "container",
    "grid",
    "presets",
    "section-box",
    "section-column",
    "section-header",
    "stack",
    "utils"
  ],
  "runtime": "svelte",
  "title": "Section Frame",
  "type": "registry:component"
}
