{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "agent-activity",
  "title": "Agent activity",
  "description": "An agent's activity stream: each new step rises in while earlier rows glide into place. Adapted from beUI (MIT).",
  "dependencies": [
    "motion@^12.23.12"
  ],
  "registryDependencies": [
    "@khaeli/ease",
    "@khaeli/utils"
  ],
  "files": [
    {
      "path": "registry/khaeli/ui/agent-activity.tsx",
      "content": "\"use client\"\n\n/*\n * beUI, https://github.com/starc007/ui-components\n * MIT License, Copyright (c) 2026 Saurabh Chauhan\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// Adapted from beUI (MIT) https://beui.dev — components/agents/agent-activity.\n// Kept from beUI: the activity stream's row motion — each new item rises in\n// while earlier rows glide with layout animation.\n// Dropped: lucide icons and the collapse-on-complete disclosure; consumers\n// own their row content and glyphs.\n// The \"Thinking…\" indicator is a ThinkingOrb from loader.\n\nimport { useState, useSyncExternalStore } from \"react\"\nimport { useReducedMotion, type HTMLMotionProps } from \"motion/react\"\nimport * as m from \"motion/react-m\"\nimport { cn } from \"@/lib/utils\"\n\nimport { EASE_OUT, SPRING_LAYOUT } from \"@/lib/ease\"\n\nconst subscribeToNothing = () => () => {}\n\n/**\n * True for the life of a component whose first render hydrated server markup.\n * A server cannot read the motion setting, so its markup always carries the\n * animated start style, and the render that hydrates it has to write the same.\n */\nfunction useHydratedFromServer() {\n  const hydrating = !useSyncExternalStore(\n    subscribeToNothing,\n    () => true,\n    () => false\n  )\n  return useState(hydrating)[0]\n}\n\nexport function ActivityList({\n  className,\n  ...props\n}: React.ComponentPropsWithRef<\"div\">) {\n  return (\n    <div\n      data-slot=\"activity-list\"\n      role=\"list\"\n      className={cn(\"flex min-w-0 flex-col\", className)}\n      {...props}\n    />\n  )\n}\n\n/** One activity row: rises in on arrival, glides when later rows land. */\nexport function ActivityItem({\n  className,\n  ...props\n}: HTMLMotionProps<\"div\">) {\n  const reduce = useReducedMotion() ?? false\n  const fromServer = useHydratedFromServer()\n  // Under reduced motion a row is committed in place and only fades in. The\n  // one that cannot be is a row hydrated from server markup, which starts\n  // from the server's style: its offset goes at once, while it is still\n  // transparent.\n  const rises = !reduce || fromServer\n\n  return (\n    <m.div\n      data-slot=\"activity-item\"\n      role=\"listitem\"\n      // The glide that makes room for a new row is movement too: with reduced\n      // motion the rows below take their new place with the commit.\n      layout={reduce ? false : \"position\"}\n      initial={rises ? { opacity: 0, transform: \"translateY(6px)\" } : { opacity: 0 }}\n      animate={\n        rises\n          ? { opacity: 1, transform: reduce ? \"none\" : \"translateY(0px)\" }\n          : { opacity: 1 }\n      }\n      transition={\n        reduce\n          ? { duration: 0.18, ease: EASE_OUT, transform: { duration: 0 } }\n          : {\n              opacity: { duration: 0.18, ease: EASE_OUT },\n              transform: SPRING_LAYOUT,\n              layout: SPRING_LAYOUT,\n            }\n      }\n      className={cn(\"min-w-0\", className)}\n      {...props}\n    />\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "docs": "Install @khaeli/foundation first: this item's styling lives in its tokens and [data-slot] rules.",
  "type": "registry:ui"
}