{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "breadcrumb",
  "title": "Breadcrumb",
  "description": "Crumbs arrive one after another with their chevrons drawing themselves, a crumb for a deeper page slides in from the right, and links underline from their start.",
  "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/breadcrumb-core.ts",
      "content": "/* A breadcrumb trail, as a UI SDK primitive. UI SDK ships no breadcrumb, so it is defined here with\n   `definePrimitive`, with shadcn/ui's parts: a `nav` holding an ordered list of items, each a link or\n   the current page, with separators between them and an ellipsis for pages left out.\n\n   It follows the WAI-ARIA breadcrumb pattern: a navigation landmark with a name, links in an ordered\n   list, and the current page marked `aria-current=\"page\"`. Separators and the ellipsis are hidden\n   from assistive technology; put the ellipsis inside a menu trigger to list the pages it stands for. */\n\nimport { definePrimitive } from \"@ui-sdk/core\"\n\nimport { bindAgentContent } from \"@/components/keyframery/core/agent-content-core\"\n\nconst breadcrumb = definePrimitive({\n  name: \"breadcrumb\",\n  state: () => ({ content: \"\" }),\n  controlled: [\"content\"],\n  api: () => ({}),\n  slots: (slot) => ({\n    /* The navigation landmark. Name it with `aria-label`; the React part defaults it to \"Breadcrumb\". */\n    root: slot({\n      role: \"navigation\",\n      bind: (el, part) => bindAgentContent(el, (content) => part.store.set({ content })),\n    }),\n    list: slot({ role: \"list\" }),\n    item: slot({ role: \"listitem\" }),\n    /* A page above this one. Renders an <a>; pass `render` for your router's link. */\n    link: slot({}),\n    /* This page: not a link, so it can't be followed, but read as the last step of the trail. */\n    page: slot({\n      role: \"link\",\n      focus: { none: \"The current page is the end of the trail, not somewhere to go.\" },\n      press: { none: \"The current page does nothing when pressed.\" },\n      attrs: () => ({ \"aria-disabled\": \"true\", \"aria-current\": \"page\" }),\n    }),\n    separator: slot({\n      role: \"presentation\",\n      attrs: () => ({ \"aria-hidden\": \"true\" }),\n    }),\n    /* Stands for pages left out of a long trail. It's a picture: put it in a menu trigger with a name. */\n    ellipsis: slot({\n      role: \"presentation\",\n      attrs: () => ({ \"aria-hidden\": \"true\" }),\n    }),\n  }),\n  /* The trail is readable context; its links retain their native navigation. */\n  agent: { actions: [] },\n})\n\nexport { breadcrumb }\n",
      "type": "registry:component",
      "target": "components/keyframery/core/breadcrumb-core.ts"
    },
    {
      "path": "registry/components/keyframery/primitives/breadcrumb.tsx",
      "content": "\"use client\"\n\n/* Animated breadcrumb, on UI SDK's core. UI SDK ships no breadcrumb, so the behaviour is defined in\n   `@/components/core/breadcrumb` with `definePrimitive` and rendered here. This file adds motion only.\n   Colours, radii, shadows and spacing stay yours.\n\n   - Cascade: on first render the crumbs and separators arrive one after another from the left.\n   - Direction: a crumb added later (you went one level deeper) slides in from the right with a blur,\n     right away.\n   - Draw: each separator's chevron draws itself as it arrives.\n   - A link's underline grows from its start on hover or keyboard focus. */\n\nimport { createParts } from \"@ui-sdk/react/primitive\"\nimport * as React from \"react\"\n\nimport { breadcrumb } from \"@/components/keyframery/core/breadcrumb-core\"\nimport { cn } from \"@/lib/utils\"\n\n/* UI SDK accepts a class name or a function of state; keep both working. */\nfunction withClass<S>(base: string, className: string | ((state: S) => string | undefined) | undefined) {\n  return typeof className === \"function\" ? (state: S) => cn(base, className(state)) : cn(base, className)\n}\n\nconst {\n  Root: BreadcrumbRoot,\n  List: BreadcrumbListPart,\n  Item: BreadcrumbItemPart,\n  Link: BreadcrumbLinkPart,\n  Page: BreadcrumbPagePart,\n  Separator: BreadcrumbSeparatorPart,\n  Ellipsis: BreadcrumbEllipsisPart,\n} = createParts(breadcrumb, {\n  root: \"nav\",\n  list: \"ol\",\n  item: \"li\",\n  link: \"a\",\n  page: \"span\",\n  separator: \"li\",\n  ellipsis: \"span\",\n})\n\nfunction Breadcrumb({ \"aria-label\": label = \"Breadcrumb\", ...props }: React.ComponentProps<typeof BreadcrumbRoot>) {\n  return <BreadcrumbRoot aria-label={label} {...props} />\n}\n\n/* Holds the cascade's delays until the first crumbs are in; after that a new crumb arrives at once. */\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<typeof BreadcrumbListPart>) {\n  const ref = React.useRef<HTMLOListElement>(null)\n  const [settled, setSettled] = React.useState(false)\n  React.useEffect(() => {\n    const el = ref.current\n    const speed = (el && parseFloat(getComputedStyle(el).getPropertyValue(\"--kf-speed\"))) || 1\n    const timer = setTimeout(() => setSettled(true), 700 * speed)\n    return () => clearTimeout(timer)\n  }, [])\n  return (\n    <BreadcrumbListPart\n      ref={ref}\n      data-settled={settled || undefined}\n      className={withClass(\"group/breadcrumb\", className)}\n      {...props}\n    />\n  )\n}\n\n/* Arrives from the side, out of a blur. Only these three properties transition, so the delay never\n   slows anything else. */\nconst arrive = cn(\n  \"transition-[opacity,translate,filter] duration-[calc(460ms*var(--kf-speed,1))] ease-spring\",\n  \"starting:opacity-0 starting:translate-x-4 starting:blur-[4px] rtl:starting:-translate-x-4\",\n  \"[transition-delay:calc((min(sibling-index(),12)-1)*calc(36ms*var(--kf-speed,1)))] group-data-settled/breadcrumb:[transition-delay:0ms]\",\n  \"motion-reduce:transition-none!\",\n)\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<typeof BreadcrumbItemPart>) {\n  return <BreadcrumbItemPart className={withClass(arrive, className)} {...props} />\n}\n\n/* The underline is the link's `background`: a 1px line sized from 0 to 100% along the text. */\nfunction BreadcrumbLink({ className, ...props }: React.ComponentProps<typeof BreadcrumbLinkPart>) {\n  return (\n    <BreadcrumbLinkPart\n      className={withClass(\n        cn(\n          \"bg-[linear-gradient(currentColor,currentColor)] bg-[length:0%_1px] bg-left-bottom bg-no-repeat rtl:bg-right-bottom\",\n          \"[transition:color_calc(150ms*var(--kf-speed,1))_var(--ease-house),background-size_calc(320ms*var(--kf-speed,1))_var(--ease-spring)]\",\n          \"hover:bg-[length:100%_1px] focus-visible:bg-[length:100%_1px] data-hovered:bg-[length:100%_1px]\",\n          \"motion-reduce:[transition:none]!\",\n        ),\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\n/* When a link becomes the page (you went back up), its colour eases over. */\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<typeof BreadcrumbPagePart>) {\n  return (\n    <BreadcrumbPagePart\n      className={withClass(\"[transition:color_calc(200ms*var(--kf-speed,1))_var(--ease-house)] motion-reduce:[transition:none]!\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction Chevron() {\n  return (\n    <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\" className=\"rtl:-scale-x-100\">\n      <path\n        d=\"m6.5 3.5 4.5 4.5-4.5 4.5\"\n        pathLength={1}\n        className=\"[stroke-dasharray:1] [stroke-dashoffset:0] starting:[stroke-dashoffset:1] [transition:stroke-dashoffset_calc(300ms*var(--kf-speed,1))_var(--ease-house)_calc(80ms*var(--kf-speed,1))] motion-reduce:[transition:none]!\"\n      />\n    </svg>\n  )\n}\n\n/* Draws a chevron unless you pass your own mark. */\nfunction BreadcrumbSeparator({ className, children, ...props }: React.ComponentProps<typeof BreadcrumbSeparatorPart>) {\n  return (\n    <BreadcrumbSeparatorPart className={withClass(arrive, className)} {...props}>\n      {children ?? <Chevron />}\n    </BreadcrumbSeparatorPart>\n  )\n}\n\nfunction BreadcrumbEllipsis({ className, children, ...props }: React.ComponentProps<typeof BreadcrumbEllipsisPart>) {\n  return (\n    <BreadcrumbEllipsisPart className={className} {...props}>\n      {children ?? (\n        <svg viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\">\n          <circle cx=\"3.5\" cy=\"8\" r=\"1.15\" />\n          <circle cx=\"8\" cy=\"8\" r=\"1.15\" />\n          <circle cx=\"12.5\" cy=\"8\" r=\"1.15\" />\n        </svg>\n      )}\n    </BreadcrumbEllipsisPart>\n  )\n}\n\nexport {\n  Breadcrumb,\n  BreadcrumbEllipsis,\n  BreadcrumbItem,\n  BreadcrumbLink,\n  BreadcrumbList,\n  BreadcrumbPage,\n  BreadcrumbSeparator,\n}\n",
      "type": "registry:component",
      "target": "components/keyframery/primitives/breadcrumb.tsx"
    },
    {
      "path": "registry/components/keyframery/breadcrumb.tsx",
      "content": "\"use client\"\n\nexport * from \"@/components/keyframery/primitives/breadcrumb\"\n\n/* Theming variables (set on a part or ancestor; absent values preserve the theme):\n   --breadcrumb-ink: Link colour; default: text-muted-foreground.\n   --breadcrumb-current: Current page; default: text-foreground.\n   --breadcrumb-separator: Separator colour; default: text-muted-foreground/60.\n   --breadcrumb-font: Label size; default: text-[13px].\n   --breadcrumb-gap: Trail gap; default: gap-1.\n   --breadcrumb-item-gap: Icon gap; default: gap-1.5.\n   --breadcrumb-icon-size: Icon size; default: size-3.5.\n   --breadcrumb-radius: Link corners; default: rounded-[4px].\n*/\n\n/* Styled breadcrumb: the animated primitive plus the Keyframery look. Quiet links in the muted colour,\n   the current page in the foreground, small chevrons between them. */\n\nimport * as React from \"react\"\n\nimport {\n  Breadcrumb as BreadcrumbPrimitive,\n  BreadcrumbEllipsis as BreadcrumbEllipsisPrimitive,\n  BreadcrumbItem as BreadcrumbItemPrimitive,\n  BreadcrumbLink as BreadcrumbLinkPrimitive,\n  BreadcrumbList as BreadcrumbListPrimitive,\n  BreadcrumbPage as BreadcrumbPagePrimitive,\n  BreadcrumbSeparator as BreadcrumbSeparatorPrimitive,\n} from \"@/components/keyframery/primitives/breadcrumb\"\nimport { Speed, type SpeedProps } from \"@/lib/keyframery\"\nimport { cn } from \"@/lib/utils\"\n\n/* UI SDK accepts a class name or a function of state; keep both working. */\nfunction withClass<S>(base: string, className: string | ((state: S) => string | undefined) | undefined) {\n  return typeof className === \"function\" ? (state: S) => cn(base, className(state)) : cn(base, className)\n}\n\nfunction Breadcrumb({ speed, ...props }: React.ComponentProps<typeof BreadcrumbPrimitive> & SpeedProps) {\n  return (\n    <Speed speed={speed}>\n      <BreadcrumbPrimitive {...props} />\n    </Speed>\n  )\n}\n\nfunction BreadcrumbList({ className, ...props }: React.ComponentProps<typeof BreadcrumbListPrimitive>) {\n  return (\n    <BreadcrumbListPrimitive\n      className={withClass(\"flex min-w-0 flex-wrap items-center gap-[var(--breadcrumb-gap,0.25rem)] text-[length:var(--breadcrumb-font,13px)] leading-5 break-words text-[color:var(--breadcrumb-ink,var(--muted-foreground))]\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction BreadcrumbItem({ className, ...props }: React.ComponentProps<typeof BreadcrumbItemPrimitive>) {\n  return <BreadcrumbItemPrimitive className={withClass(\"inline-flex min-w-0 items-center gap-[var(--breadcrumb-item-gap,0.375rem)]\", className)} {...props} />\n}\n\nfunction BreadcrumbLink({ className, ...props }: React.ComponentProps<typeof BreadcrumbLinkPrimitive>) {\n  return (\n    <BreadcrumbLinkPrimitive\n      className={withClass(\n        cn(\n          \"inline-flex items-center gap-[var(--breadcrumb-item-gap,0.375rem)] rounded-[var(--breadcrumb-radius,4px)] outline-none hover:text-[color:var(--breadcrumb-current,var(--foreground))] focus-visible:text-[color:var(--breadcrumb-current,var(--foreground))] [&_svg]:size-[var(--breadcrumb-icon-size,0.875rem)] [&_svg]:shrink-0\",\n          \"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n        ),\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction BreadcrumbPage({ className, ...props }: React.ComponentProps<typeof BreadcrumbPagePrimitive>) {\n  return (\n    <BreadcrumbPagePrimitive\n      className={withClass(\"inline-flex items-center gap-[var(--breadcrumb-item-gap,0.375rem)] font-medium text-[color:var(--breadcrumb-current,var(--foreground))] [&_svg]:size-[var(--breadcrumb-icon-size,0.875rem)] [&_svg]:shrink-0\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction BreadcrumbSeparator({ className, ...props }: React.ComponentProps<typeof BreadcrumbSeparatorPrimitive>) {\n  return (\n    <BreadcrumbSeparatorPrimitive\n      className={withClass(\"inline-flex text-[color:var(--breadcrumb-separator,color-mix(in_oklab,var(--muted-foreground)_60%,transparent))] [&>svg]:size-[var(--breadcrumb-icon-size,0.875rem)]\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<typeof BreadcrumbEllipsisPrimitive>) {\n  return (\n    <BreadcrumbEllipsisPrimitive\n      className={withClass(\"flex size-6 items-center justify-center [&>svg]:size-4\", className)}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Breadcrumb,\n  BreadcrumbEllipsis,\n  BreadcrumbItem,\n  BreadcrumbLink,\n  BreadcrumbList,\n  BreadcrumbPage,\n  BreadcrumbSeparator,\n}\n",
      "type": "registry:component",
      "target": "components/keyframery/breadcrumb.tsx"
    }
  ],
  "type": "registry:component"
}