{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "conversation-search-svelte",
  "title": "Conversation Search (Svelte)",
  "description": "A find bar over a conversation's messages that counts matches, moves between them and marks them on the scrollbar.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/svelte@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/svelte/conversation-search/ConversationSearch.svelte",
      "content": "<!--\n  A find bar over a Conversation's messages: the field with its count, Previous, Next and Close, unless you pass a\n  `children` snippet. Pass `conversation` the Conversation's controller and wire `onMarksChange` to its `marks`.\n-->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import ConversationSearchInput from \"./ConversationSearchInput.svelte\";\n  import { parts } from \"./parts\";\n\n  let {\n    children,\n    query = $bindable(),\n    open = $bindable(),\n    ...props\n  }: ComponentProps<typeof parts.Root> = $props();\n</script>\n\n{#snippet fallback()}<ConversationSearchInput /><parts.Previous /><parts.Next /><parts.Close />{/snippet}\n\n<parts.Root {...props} bind:query bind:open children={children ?? fallback} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation-search/ConversationSearch.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation-search/ConversationSearchCount.svelte",
      "content": "<!-- \"3 of 12\", or \"0 of 0\" without a match, while there's a search, unless you pass a `children` snippet. -->\n<script lang=\"ts\">\n  import type { ComponentProps } from \"svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Count> = $props();\n</script>\n\n{#snippet words({ text }: { text: string })}{text}{/snippet}\n\n<parts.Count {...props} children={children ?? words} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation-search/ConversationSearchCount.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation-search/ConversationSearchInput.svelte",
      "content": "<!-- The search field with its count, unless you pass a `children` snippet. Pass its state to UI SDK Input. -->\n<script lang=\"ts\">\n  import type { ConversationSearchInputState } from \"@kind-ui/agent-ui/core\";\n  import { Input, InputGroup } from \"@ui-sdk/svelte/input\";\n  import type { ComponentProps } from \"svelte\";\n  import ConversationSearchCount from \"./ConversationSearchCount.svelte\";\n  import { parts } from \"./parts\";\n\n  let { children, ...props }: ComponentProps<typeof parts.Input> = $props();\n</script>\n\n{#snippet field(state: ConversationSearchInputState)}\n  <InputGroup\n    ><Input\n      type=\"search\"\n      controller={state.controller}\n      defaultValue={state.defaultValue}\n      aria-label={state.label}\n      aria-describedby={state.describedBy}\n      placeholder=\"Find…\"\n      data-agent-hidden=\"\"\n    /><ConversationSearchCount /></InputGroup\n  >\n{/snippet}\n\n<parts.Input {...props} children={children ?? field} />\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation-search/ConversationSearchInput.svelte"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation-search/index.ts",
      "content": "import type { ComponentProps } from \"svelte\";\nimport ConversationSearch from \"./ConversationSearch.svelte\";\nimport ConversationSearchCount from \"./ConversationSearchCount.svelte\";\nimport ConversationSearchInput from \"./ConversationSearchInput.svelte\";\nimport { parts } from \"./parts\";\n\n/** Moves to the previous match. Its icon is drawn in CSS; render it empty. */\nexport const ConversationSearchPrevious = parts.Previous;\n/** Moves to the next match. Its icon is drawn in CSS; render it empty. */\nexport const ConversationSearchNext = parts.Next;\n/** Closes the bar and moves focus back where it was. Its icon is drawn in CSS; render it empty. */\nexport const ConversationSearchClose = parts.Close;\n\nexport { ConversationSearch, ConversationSearchCount, ConversationSearchInput };\nexport type ConversationSearchProps = ComponentProps<typeof ConversationSearch>;\nexport type ConversationSearchInputProps = ComponentProps<typeof ConversationSearchInput>;\nexport type ConversationSearchCountProps = ComponentProps<typeof ConversationSearchCount>;\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation-search/index.ts"
    },
    {
      "path": "packages/agent-ui/src/svelte/conversation-search/parts.ts",
      "content": "import { conversationSearchPrimitive } from \"@kind-ui/agent-ui/core\";\nimport { createParts } from \"@ui-sdk/svelte/primitive\";\n\nexport const parts = createParts(conversationSearchPrimitive, {\n  root: \"div\",\n  input: \"div\",\n  count: \"span\",\n  previous: \"button\",\n  next: \"button\",\n  close: \"button\",\n});\n",
      "type": "registry:ui",
      "target": "@ui/svelte/conversation-search/parts.ts"
    }
  ],
  "meta": {
    "layer": "svelte"
  },
  "type": "registry:ui"
}
