{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Grey blocks in the shape of what is coming: cards, a list or an article.",
  "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 * The loading state of a page: grey blocks in the shape of the content that is coming (cards, a list of rows or\n * an article). Axes: shape (cards, list, article), tone. The label tells assistive technology that the content\n * is loading. The shimmer itself belongs to the Skeleton part.\n */\nimport { type ReactNode } from \"react\";\nimport { Block, Grid, Group, Skeleton, Stack } from \"../compose\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport type { Line } from \"./skeleton-layout.types\";\n\nexport type SkeletonLayoutProps = {\n  id: string;\n  title: string;\n  label: string;\n  lines: Line[];\n  shape?: \"cards\" | \"list\" | \"article\";\n  tone?: \"default\" | \"muted\";\n  landmarkLabel?: string;\n};\n\nexport function SkeletonLayout({\n  id,\n  title,\n  label,\n  lines,\n  shape = \"cards\",\n  tone = \"default\",\n  landmarkLabel,\n}: SkeletonLayoutProps) {\n  return (\n    <SectionFrame id={id} title={title} tone={tone} landmarkLabel={landmarkLabel}>\n      <Block tag=\"div\" className=\"w-full\" role=\"status\" aria-label={label} data-shape={shape} data-slot=\"skeleton\">\n        {((shape as string) === \"cards\") ? (\n          <Grid cols=\"1-3\" className=\"gap-4\">\n            {(lines ?? []).map((l) => (\n              <Stack key={l.id} gap=\"4\" className=\"rounded bg-card inset-ring inset-ring-border p-4\" data-slot=\"item\">\n                <Skeleton className=\"aspect-video w-full\" />\n                <Skeleton className=\"h-4 w-2/3\" />\n                <Skeleton className=\"h-4 w-full\" />\n              </Stack>\n            ))}\n          </Grid>\n        ) : ((shape as string) === \"list\") ? (\n          <Stack gap=\"4\" align=\"stretch\">\n            {(lines ?? []).map((l) => (\n              <Group key={l.id} gap=\"4\" align=\"center\" data-slot=\"item\">\n                <Skeleton className=\"size-10 shrink-0 rounded-full\" />\n                <Stack gap=\"2\" className=\"flex-1\">\n                  <Skeleton className=\"h-4 w-1/3\" />\n                  <Skeleton className=\"h-4 w-full\" />\n                </Stack>\n              </Group>\n            ))}\n          </Stack>\n        ) : (\n          <Stack gap=\"4\" align=\"stretch\" className=\"mx-auto max-w-2xl\">\n            <Skeleton className=\"h-8 w-3/4\" />\n            {(lines ?? []).map((l) => (\n              <Stack key={l.id} gap=\"2\" data-slot=\"item\">\n                <Skeleton className=\"h-4 w-full\" />\n                <Skeleton className=\"h-4 w-5/6\" />\n              </Stack>\n            ))}\n          </Stack>\n        )}\n      </Block>\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/skeleton-layout.tsx",
      "target": "blocks/skeleton-layout.tsx"
    },
    {
      "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 Line = {\n  id: string;\n};\n",
      "path": "blocks/skeleton-layout.types.ts",
      "target": "blocks/skeleton-layout.types.ts"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "states",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "skeleton-layout",
  "registryDependencies": [
    "compose",
    "section-frame",
    "utils"
  ],
  "runtime": "react",
  "title": "Skeleton Layout",
  "type": "registry:block"
}
