import * as React from 'react'; import { commandScore } from './score.js'; import type { ChangeDetails, PartProps } from '../../contracts/components.js'; export type CommandFilter = (query: string, value: string, keywords?: readonly string[]) => number; export type CommandRootProps = Omit, 'onChange'> & { /** Custom scoring function for items against the query (0 hides an item). */ filter?: CommandFilter | undefined; /** Filters and sorts items by the query; set false to filter yourself. */ shouldFilter?: boolean | undefined; /** Controlled value. Pair with `onValueChange`. */ value?: string | undefined; /** Initial value when uncontrolled. */ defaultValue?: string | undefined; /** Called with the new value whenever it changes. */ onValueChange?: ((value: string, details: ChangeDetails) => void) | undefined; /** Called with the query whenever it changes. */ onQueryChange?: ((query: string) => void) | undefined; /** Wraps keyboard focus from the last item back to the first. */ loop?: boolean | undefined; }; declare function CommandRoot({ filter, shouldFilter, value: _value, defaultValue: _defaultValue, onValueChange, onQueryChange, loop, children, render, ...rest }: CommandRootProps): React.JSX.Element; declare namespace CommandRoot { var displayName: string; } export type CommandInputProps = PartProps<'input'> & { placeholder?: string | undefined; }; declare function CommandInput({ placeholder, render, ...rest }: CommandInputProps): React.JSX.Element; declare namespace CommandInput { var displayName: string; } export declare function CommandList({ children, render, ...rest }: PartProps<'div'>): React.JSX.Element; export declare namespace CommandList { var displayName: string; } export type CommandGroupProps = PartProps<'div'> & { heading?: React.ReactNode; }; declare function CommandGroup({ heading, children, render, ...rest }: CommandGroupProps): React.ReactElement>; declare namespace CommandGroup { var displayName: string; } export type CommandItemProps = Omit, 'value' | 'onSelect'> & { value: string; keywords?: readonly string[] | undefined; onSelect?: (() => void) | undefined; disabled?: boolean | undefined; shortcut?: React.ReactNode; }; declare function CommandItem({ value, keywords, onSelect, disabled, shortcut, children, render, ...rest }: CommandItemProps): React.JSX.Element | null; declare namespace CommandItem { var displayName: string; } export declare function CommandEmpty({ children, render, ...rest }: PartProps<'div'>): React.ReactElement> | null; export declare namespace CommandEmpty { var displayName: string; } export declare function CommandLoading({ children, render, ...rest }: PartProps<'div'>): React.ReactElement>; export declare namespace CommandLoading { var displayName: string; } export declare function CommandSeparator({ render, ...rest }: PartProps<'div'>): React.ReactElement>; export declare namespace CommandSeparator { var displayName: string; } export declare const Command: { score: typeof commandScore; Root: typeof CommandRoot; Input: typeof CommandInput; List: typeof CommandList; Group: typeof CommandGroup; Item: typeof CommandItem; Empty: typeof CommandEmpty; Loading: typeof CommandLoading; Separator: typeof CommandSeparator; }; export {}; //# sourceMappingURL=Command.d.ts.map