{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "empty",
  "title": "Empty",
  "description": "Empty states arrive part by part: the icon tile pops and its strokes draw, then the title, the description and each action rise in out of a blur.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.9",
    "@ui-sdk/react@0.1.0-beta.9"
  ],
  "registryDependencies": [
    "@keyframery/motion",
    "@keyframery/agent-content"
  ],
  "files": [
    {
      "path": "registry/components/keyframery/core/empty-core.ts",
      "content": "/* Empty state, as a UI SDK primitive. UI SDK ships no empty state, so it is defined with its core:\n   the same definition renders in React, Vue, Svelte, Solid and web components.\n\n   An empty state stands in for content that isn't there yet: no results, an empty inbox, a\n   project with no files. Its parts are shadcn's: a header holding the media, title and\n   description, then content for the actions. It arrives with an entrance (`data-starting-style`\n   for its first frame, from `animateIn`). With `announce`, a screen reader hears its title and\n   description when it appears, as when a search finds nothing. */\n\nimport { animateIn, announce, definePrimitive, elements, prepareAnnouncements } from \"@ui-sdk/core\"\n\nimport { bindAgentContent } from \"@/components/keyframery/core/agent-content-core\"\n\ntype EmptyOptions = {\n  /** Reads the title and description to screen readers when the empty state appears. Use it when it replaces results someone was looking at. @defaultValue false */\n  announce?: boolean\n}\n\ntype EmptyMediaVariant = \"default\" | \"icon\"\n\nconst empty = definePrimitive({\n  name: \"empty\",\n  options: { announce: \"boolean\" },\n  state: (_options: EmptyOptions) => ({ content: \"\" }),\n  controlled: [\"content\"],\n  api: (context) => ({\n    /** Plays the entrance, and with `announce` reads the title and description once it is in. */\n    arrive(el: HTMLElement) {\n      const stop = animateIn(el)\n      if (!context.options().announce) return stop\n      prepareAnnouncements(el.ownerDocument)\n      /* After the regions exist, so screen readers that only watch regions already there hear it. */\n      const timer = setTimeout(() => {\n        const text = [...elements(context, \"title\"), ...elements(context, \"description\")]\n          .map((part) => part.el.textContent?.trim())\n          .filter(Boolean)\n          .join(\". \")\n        if (text) announce(text, { doc: el.ownerDocument })\n      }, 150)\n      return () => {\n        stop()\n        clearTimeout(timer)\n      }\n    },\n  }),\n  slots: (slot) => ({\n    root: slot({\n      state: () => ({}),\n      bind: (el, part) => {\n        const stopEntrance = part.api.arrive(el)\n        const stopContent = bindAgentContent(el, (content) => part.store.set({ content }))\n        return () => {\n          stopEntrance()\n          stopContent()\n        }\n      },\n    }),\n    header: slot({}),\n    media: slot<{ variant?: EmptyMediaVariant }, { variant: EmptyMediaVariant }>({\n      props: { variant: \"string\" },\n      state: (_state, part) => ({ variant: part.props.variant ?? \"default\" }),\n      attrs: (_state, part) => ({ \"data-variant\": part.props.variant ?? \"default\", \"aria-hidden\": \"true\" }),\n    }),\n    title: slot({}),\n    description: slot({}),\n    content: slot({}),\n  }),\n  /* Expose the empty state's title and description; its buttons own their actions. */\n  agent: { actions: [] },\n})\n\nexport { empty, type EmptyMediaVariant, type EmptyOptions }\n",
      "type": "registry:component",
      "target": "components/keyframery/core/empty-core.ts"
    },
    {
      "path": "registry/components/keyframery/primitives/empty.tsx",
      "content": "\"use client\"\n\n/* Animated empty state, on UI SDK's core. UI SDK ships no empty state, so the behaviour is defined\n   in `@/components/core/empty` with `definePrimitive` and rendered here. This file adds motion\n   only. Colours, radii, shadows and spacing stay yours.\n\n   Cascade: the parts arrive one after another. The media pops (`ease-pop`, from 0.6) and the\n   strokes of an icon inside it draw; then the title, the description and each action rise 10px out\n   of a 6px blur on a spring. It plays every time the empty state appears (after a search that\n   finds nothing, or when the last item is removed). Under reduced motion they only fade. */\n\nimport { createParts } from \"@ui-sdk/react/primitive\"\nimport * as React from \"react\"\n\nimport { empty } from \"@/components/keyframery/core/empty-core\"\nimport { cn } from \"@/lib/utils\"\n\n/* `className` may be a string or a function of the part's state: keep both working. */\nfunction withClass<C>(className: C, ...base: string[]): C {\n  return (typeof className === \"function\"\n    ? (state: unknown) => cn(...base, (className as (state: unknown) => string | undefined)(state))\n    : cn(...base, className as string | undefined)) as C\n}\n\nconst {\n  Root: EmptyRoot,\n  Header: EmptyHeaderPart,\n  Media: EmptyMediaPart,\n  Title: EmptyTitlePart,\n  Description: EmptyDescriptionPart,\n  Content: EmptyContentPart,\n} = createParts(empty, { root: \"div\", header: \"div\", media: \"div\", title: \"div\", description: \"p\", content: \"div\" })\n\nconst keyframes =\n  \"@keyframes kf-empty-rise{from{opacity:0;translate:0 10px;filter:blur(6px)}}\" +\n  \"@keyframes kf-empty-pop{from{opacity:0;scale:0.6;filter:blur(4px)}}\" +\n  \"@keyframes kf-empty-draw{from{stroke-dasharray:80;stroke-dashoffset:80}to{stroke-dasharray:80;stroke-dashoffset:0}}\" +\n  \"@media (prefers-reduced-motion:reduce){@keyframes kf-empty-rise{from{opacity:0}}@keyframes kf-empty-pop{from{opacity:0}}@keyframes kf-empty-draw{from{opacity:1}}}\"\n\nconst rise = \"animate-[kf-empty-rise_calc(560ms*var(--kf-speed,1))_var(--ease-spring)_backwards] motion-reduce:animate-none\"\n\nfunction Empty({ className, ...props }: React.ComponentProps<typeof EmptyRoot>) {\n  return (\n    <>\n      <style href=\"kf-empty\" precedence=\"default\">\n        {keyframes}\n      </style>\n      <EmptyRoot\n        className={withClass(className, \"transition-opacity duration-[calc(240ms*var(--kf-speed,1))] ease-house data-starting-style:opacity-0 motion-reduce:transition-none\")}\n        {...props}\n      />\n    </>\n  )\n}\n\nconst EmptyHeader = EmptyHeaderPart\n\nfunction EmptyMedia({ className, ...props }: React.ComponentProps<typeof EmptyMediaPart>) {\n  return (\n    <EmptyMediaPart\n      className={withClass(className, \"animate-[kf-empty-pop_calc(560ms*var(--kf-speed,1))_var(--ease-pop)_backwards]\",\n        \"[&_svg_*]:animate-[kf-empty-draw_calc(720ms*var(--kf-speed,1))_var(--ease-house)_backwards] [&_svg_*]:[animation-delay:calc(160ms*var(--kf-speed,1))]\",\n        /* Pictures in the media (a stack of photos) pop one after another. */\n        \"[&>img]:animate-[kf-empty-pop_calc(560ms*var(--kf-speed,1))_var(--ease-pop)_backwards] [&>img]:[animation-delay:calc((min(sibling-index(),6)-1)*70ms*var(--kf-speed,1))]\",\n        \"motion-reduce:animate-none motion-reduce:[&_svg_*]:animate-none motion-reduce:[&>img]:animate-none\")}\n      {...props}\n    />\n  )\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<typeof EmptyTitlePart>) {\n  return <EmptyTitlePart className={withClass(className, rise, \"[animation-delay:calc(110ms*var(--kf-speed,1))]\")} {...props} />\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<typeof EmptyDescriptionPart>) {\n  return <EmptyDescriptionPart className={withClass(className, rise, \"[animation-delay:calc(170ms*var(--kf-speed,1))]\")} {...props} />\n}\n\n/* Each action rises on its own beat after the description. */\nfunction EmptyContent({ className, ...props }: React.ComponentProps<typeof EmptyContentPart>) {\n  return (\n    <EmptyContentPart\n      className={withClass(className, \"*:animate-[kf-empty-rise_calc(560ms*var(--kf-speed,1))_var(--ease-spring)_backwards]\",\n        \"*:[animation-delay:calc((230ms+(min(sibling-index(),6)-1)*60ms)*var(--kf-speed,1))]\",\n        \"motion-reduce:*:animate-none\")}\n      {...props}\n    />\n  )\n}\n\nexport { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle }\n",
      "type": "registry:component",
      "target": "components/keyframery/primitives/empty.tsx"
    },
    {
      "path": "registry/components/keyframery/empty.tsx",
      "content": "\"use client\"\n\nexport * from \"@/components/keyframery/primitives/empty\"\n\n/* Theming variables (set on a part or ancestor; absent values preserve the theme):\n   --empty-face: Icon surface; default: bg-background.\n   --empty-ink: Icon and links; default: text-foreground.\n   --empty-muted: Description colour; default: text-muted-foreground.\n   --empty-radius: Icon corners; default: rounded-[13px].\n   --empty-font: Title size; default: text-[15px].\n   --empty-gap: Section gap; default: gap-5.\n   --empty-padding: Empty-state padding; default: p-8.\n   --empty-media-size: Icon tile size; default: size-12.\n*/\n\n/* Styled empty state: the animated primitive plus the Keyframery look. Centred and balanced; the\n   icon media is a raised key with the icon drawn in it; the title is the house title size. */\n\nimport * as React from \"react\"\n\nimport {\n  Empty as EmptyPrimitive,\n  EmptyContent as EmptyContentPrimitive,\n  EmptyDescription as EmptyDescriptionPrimitive,\n  EmptyHeader as EmptyHeaderPrimitive,\n  EmptyMedia as EmptyMediaPrimitive,\n  EmptyTitle as EmptyTitlePrimitive,\n} from \"@/components/keyframery/primitives/empty\"\nimport { Speed, type SpeedProps } from \"@/lib/keyframery\"\nimport { cn } from \"@/lib/utils\"\n\n/* `className` may be a string or a function of the part's state: keep both working. */\nfunction withClass<C>(className: C, ...base: string[]): C {\n  return (typeof className === \"function\"\n    ? (state: unknown) => cn(...base, (className as (state: unknown) => string | undefined)(state))\n    : cn(...base, className as string | undefined)) as C\n}\n\nfunction Empty({ speed, className, ...props }: React.ComponentProps<typeof EmptyPrimitive> & SpeedProps) {\n  return (\n    <Speed speed={speed}>\n      <EmptyPrimitive\n        className={withClass(className, \"flex min-w-0 flex-1 flex-col items-center justify-center gap-[var(--empty-gap,1.25rem)] rounded-[16px] p-[var(--empty-padding,2rem)] text-center text-balance\")}\n        {...props}\n      />\n    </Speed>\n  )\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<typeof EmptyHeaderPrimitive>) {\n  return <EmptyHeaderPrimitive className={withClass(className, \"flex max-w-[320px] flex-col items-center gap-1.5\")} {...props} />\n}\n\nfunction EmptyMedia({ className, variant = \"default\", ...props }: React.ComponentProps<typeof EmptyMediaPrimitive>) {\n  return (\n    <EmptyMediaPrimitive\n      variant={variant}\n      className={withClass(className, \"mb-2.5 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n        \"data-[variant=icon]:size-[var(--empty-media-size,3rem)] data-[variant=icon]:rounded-[var(--empty-radius,13px)] data-[variant=icon]:bg-[var(--empty-face,var(--background))] data-[variant=icon]:text-[color:var(--empty-ink,var(--foreground))] data-[variant=icon]:[&_svg:not([class*='size-'])]:size-[22px]\",\n        \"data-[variant=icon]:shadow-[0_0_0_1px_rgb(0_0_0/0.06),0_1px_1px_rgb(0_0_0/0.05),0_3px_6px_-2px_rgb(0_0_0/0.1)]\",\n        \"dark:data-[variant=icon]:bg-[var(--empty-face,var(--accent))] dark:data-[variant=icon]:shadow-[0_0_0_1px_rgb(255_255_255/0.07),inset_0_1px_0_rgb(255_255_255/0.08),0_2px_6px_-1px_rgb(0_0_0/0.6)]\")}\n      {...props}\n    />\n  )\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<typeof EmptyTitlePrimitive>) {\n  return <EmptyTitlePrimitive className={withClass(className, \"text-[length:var(--empty-font,15px)] leading-tight font-semibold tracking-tight\")} {...props} />\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<typeof EmptyDescriptionPrimitive>) {\n  return (\n    <EmptyDescriptionPrimitive\n      className={withClass(className, \"text-[13px] leading-[1.55] text-[color:var(--empty-muted,var(--muted-foreground))] [&>a]:font-medium [&>a]:text-[color:var(--empty-ink,var(--foreground))] [&>a]:underline [&>a]:underline-offset-4\")}\n      {...props}\n    />\n  )\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<typeof EmptyContentPrimitive>) {\n  return (\n    <EmptyContentPrimitive\n      className={withClass(className, \"flex w-full max-w-[320px] min-w-0 flex-wrap items-center justify-center gap-2 text-[13px]\")}\n      {...props}\n    />\n  )\n}\n\nexport { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle }\n",
      "type": "registry:component",
      "target": "components/keyframery/empty.tsx"
    }
  ],
  "type": "registry:component"
}