{
  "name": "command",
  "title": "Command",
  "description": "Kura Command component source.",
  "type": "ui",
  "add": "when-added",
  "files": [
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import type { Command as CommandPrimitive, Dialog as DialogPrimitive } from 'bits-ui';\n  import type { Snippet } from 'svelte';\n  import Command from './command.svelte';\n  import * as Dialog from '$lib/components/ui/dialog/index.js';\n  import { cn, type WithoutChildrenOrChild } from '$lib/utils.js';\n\n  let {\n    open = $bindable(false),\n    ref = $bindable(null),\n    value = $bindable(''),\n    title = 'Command Palette',\n    description = 'Search for a command to run...',\n    showCloseButton = false,\n    portalProps,\n    children,\n    class: className,\n    ...restProps\n  }: WithoutChildrenOrChild<DialogPrimitive.RootProps> &\n    WithoutChildrenOrChild<CommandPrimitive.RootProps> & {\n      portalProps?: DialogPrimitive.PortalProps;\n      children: Snippet;\n      title?: string;\n      description?: string;\n      showCloseButton?: boolean;\n      class?: string;\n    } = $props();\n</script>\n\n<Dialog.Root bind:open {...restProps}>\n  <Dialog.Header class=\"sr-only\">\n    <Dialog.Title>{title}</Dialog.Title>\n    <Dialog.Description>{description}</Dialog.Description>\n  </Dialog.Header>\n  <Dialog.Content\n    class={cn('top-1/3 translate-y-0 overflow-hidden border-border bg-popover p-0 ', className)}\n    {showCloseButton}\n    {portalProps}\n  >\n    <Command {...restProps} bind:value bind:ref {children} />\n  </Dialog.Content>\n</Dialog.Root>\n",
      "path": "command/command-dialog.svelte",
      "_imports_": [
        {
          "import": "./command.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command.svelte"
          },
          "meta": {}
        },
        {
          "import": "$lib/components/ui/dialog/index.js",
          "item": "dialog",
          "file": {
            "type": "ui",
            "path": "dialog/index.ts"
          },
          "meta": {}
        },
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    ...restProps\n  }: CommandPrimitive.EmptyProps = $props();\n</script>\n\n<CommandPrimitive.Empty\n  bind:ref\n  data-slot=\"command-empty\"\n  class={cn('py-6 text-center  text-xs   text-muted-foreground/50', className)}\n  {...restProps}\n/>\n",
      "path": "command/command-empty.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive, useId } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    children,\n    heading,\n    value,\n    ...restProps\n  }: CommandPrimitive.GroupProps & {\n    heading?: string;\n  } = $props();\n</script>\n\n<CommandPrimitive.Group\n  bind:ref\n  data-slot=\"command-group\"\n  class={cn(\n    'overflow-hidden p-1.5 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]: **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]: **:[[cmdk-group-heading]]: **:[[cmdk-group-heading]]:text-muted-foreground/50',\n    className\n  )}\n  value={value ?? heading ?? `----${useId()}`}\n  {...restProps}\n>\n  {#if heading}\n    <CommandPrimitive.GroupHeading\n      class=\"px-2 py-1.5  text-xs font-medium   text-muted-foreground/50\"\n    >\n      {heading}\n    </CommandPrimitive.GroupHeading>\n  {/if}\n  <CommandPrimitive.GroupItems {children} />\n</CommandPrimitive.Group>\n",
      "path": "command/command-group.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n  import * as InputGroup from '$lib/components/ui/input-group/index.js';\n  import MagnifyingGlassIcon from 'phosphor-svelte/lib/MagnifyingGlassIcon';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    value = $bindable(''),\n    ...restProps\n  }: CommandPrimitive.InputProps = $props();\n</script>\n\n<div data-slot=\"command-input-wrapper\" class=\"border-b border-border bg-popover p-1\">\n  <InputGroup.Root\n    class=\"border-transparent bg-muted shadow-[inset_0_0_0_1px_rgba(161,161,170,0.12)]\"\n  >\n    <CommandPrimitive.Input\n      {value}\n      data-slot=\"command-input\"\n      class={cn(\n        'w-full px-2  text-xs text-foreground placeholder:text-muted-foreground/50 outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n        className\n      )}\n      {...restProps}\n    >\n      {#snippet child({ props })}\n        <InputGroup.Input {...props} bind:value bind:ref />\n      {/snippet}\n    </CommandPrimitive.Input>\n    <InputGroup.Addon class=\"px-2\">\n      <MagnifyingGlassIcon class=\"size-3.5 shrink-0 text-link opacity-80\" />\n    </InputGroup.Addon>\n  </InputGroup.Root>\n</div>\n",
      "path": "command/command-input.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        },
        {
          "import": "$lib/components/ui/input-group/index.js",
          "item": "input-group",
          "file": {
            "type": "ui",
            "path": "input-group/index.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n  import CheckIcon from 'phosphor-svelte/lib/CheckIcon';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    children,\n    ...restProps\n  }: CommandPrimitive.ItemProps = $props();\n</script>\n\n<CommandPrimitive.Item\n  bind:ref\n  data-slot=\"command-item\"\n  class={cn(\n    \"group/command-item relative flex cursor-default items-center gap-2 border border-transparent px-2 py-1.5  text-xs   text-muted-foreground outline-hidden select-none data-selected:border-primary/50 data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-link data-[checked=true]:text-link rounded-item in-data-[slot=dialog-content]:rounded-item! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n    className\n  )}\n  {...restProps}\n>\n  {@render children?.()}\n  <CheckIcon\n    class=\"cn-command-item-indicator ml-auto text-link opacity-0 group-has-[[data-slot=command-shortcut]]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\"\n  />\n</CommandPrimitive.Item>\n",
      "path": "command/command-item.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    ...restProps\n  }: CommandPrimitive.LinkItemProps = $props();\n</script>\n\n<CommandPrimitive.LinkItem\n  bind:ref\n  data-slot=\"command-item\"\n  class={cn(\n    \"relative flex cursor-default items-center gap-2 border border-transparent px-2 py-1.5  text-xs   text-muted-foreground outline-hidden select-none aria-selected:border-primary/50 aria-selected:bg-muted aria-selected:text-foreground rounded-item [&_svg:not([class*='text-'])]:text-link data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n    className\n  )}\n  {...restProps}\n/>\n",
      "path": "command/command-link-item.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    ...restProps\n  }: CommandPrimitive.ListProps = $props();\n</script>\n\n<CommandPrimitive.List\n  bind:ref\n  data-slot=\"command-list\"\n  class={cn(\n    'no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto border-t border-border outline-none',\n    className\n  )}\n  {...restProps}\n/>\n",
      "path": "command/command-list.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    ...restProps\n  }: CommandPrimitive.LoadingProps = $props();\n</script>\n\n<CommandPrimitive.Loading\n  bind:ref\n  class={cn('px-3 py-2  text-xs   text-muted-foreground/50', className)}\n  {...restProps}\n/>\n",
      "path": "command/command-loading.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { Command as CommandPrimitive } from 'bits-ui';\n  import { cn } from '$lib/utils.js';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    ...restProps\n  }: CommandPrimitive.SeparatorProps = $props();\n</script>\n\n<CommandPrimitive.Separator\n  bind:ref\n  data-slot=\"command-separator\"\n  class={cn('-mx-1.5 my-1.5 h-px bg-border', className)}\n  {...restProps}\n/>\n",
      "path": "command/command-separator.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { cn, type WithElementRef } from '$lib/utils.js';\n  import type { HTMLAttributes } from 'svelte/elements';\n\n  let {\n    ref = $bindable(null),\n    class: className,\n    children,\n    ...restProps\n  }: WithElementRef<HTMLAttributes<HTMLSpanElement>> = $props();\n</script>\n\n<span\n  bind:this={ref}\n  data-slot=\"command-shortcut\"\n  class={cn(\n    'ml-auto  text-[11px]   text-muted-foreground/50 group-data-selected/command-item:text-link',\n    className\n  )}\n  {...restProps}\n>\n  {@render children?.()}\n</span>\n",
      "path": "command/command-shortcut.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "<script lang=\"ts\">\n  import { cn } from '$lib/utils.js';\n  import { Command as CommandPrimitive } from 'bits-ui';\n\n  export type CommandRootApi = CommandPrimitive.Root;\n\n  let {\n    api = $bindable(null),\n    ref = $bindable(null),\n    value = $bindable(''),\n    class: className,\n    ...restProps\n  }: CommandPrimitive.RootProps & {\n    api?: CommandRootApi | null;\n  } = $props();\n</script>\n\n<CommandPrimitive.Root\n  bind:this={api}\n  bind:value\n  bind:ref\n  data-slot=\"command\"\n  class={cn(\n    'flex size-full flex-col overflow-hidden rounded-overlay border border-border bg-popover text-foreground ',\n    className\n  )}\n  {...restProps}\n/>\n",
      "path": "command/command.svelte",
      "_imports_": [
        {
          "import": "$lib/utils.js",
          "item": "utils",
          "file": {
            "type": "lib",
            "path": "utils.ts"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    },
    {
      "type": "ui",
      "role": "file",
      "content": "import Root from './command.svelte';\nimport Loading from './command-loading.svelte';\nimport Dialog from './command-dialog.svelte';\nimport Empty from './command-empty.svelte';\nimport Group from './command-group.svelte';\nimport Item from './command-item.svelte';\nimport Input from './command-input.svelte';\nimport List from './command-list.svelte';\nimport Separator from './command-separator.svelte';\nimport Shortcut from './command-shortcut.svelte';\nimport LinkItem from './command-link-item.svelte';\n\nexport {\n  Root,\n  Dialog,\n  Empty,\n  Group,\n  Item,\n  LinkItem,\n  Input,\n  List,\n  Separator,\n  Shortcut,\n  Loading,\n  //\n  Root as Command,\n  Dialog as CommandDialog,\n  Empty as CommandEmpty,\n  Group as CommandGroup,\n  Item as CommandItem,\n  LinkItem as CommandLinkItem,\n  Input as CommandInput,\n  List as CommandList,\n  Separator as CommandSeparator,\n  Shortcut as CommandShortcut,\n  Loading as CommandLoading\n};\n",
      "path": "command/index.ts",
      "_imports_": [
        {
          "import": "./command.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-loading.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-loading.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-dialog.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-dialog.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-empty.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-empty.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-group.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-group.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-item.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-item.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-input.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-input.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-list.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-list.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-separator.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-separator.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-shortcut.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-shortcut.svelte"
          },
          "meta": {}
        },
        {
          "import": "./command-link-item.svelte",
          "item": "command",
          "file": {
            "type": "ui",
            "path": "command/command-link-item.svelte"
          },
          "meta": {}
        }
      ],
      "registryDependencies": [],
      "dependencies": [],
      "devDependencies": []
    }
  ],
  "registryDependencies": [
    "styles",
    "dialog",
    "utils",
    "input-group"
  ],
  "dependencies": [
    {
      "ecosystem": "js",
      "name": "bits-ui",
      "version": "^2.18.1"
    },
    {
      "ecosystem": "js",
      "name": "phosphor-svelte",
      "version": "^3.1.0"
    }
  ],
  "devDependencies": []
}