import * as Dialog from '@radix-ui/react-dialog'; import type { FileSectionReference } from '@xrpl/ai-core'; import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type ElementType, type ReactElement, type ReactNode } from 'react'; import Markdown from 'react-markdown'; import type { PolymorphicComponentPropWithRef, SearchResultComponentProps } from '../types.js'; type RootProps = Dialog.DialogProps & { display?: 'plain' | 'dialog'; }; /** * The Markprompt context provider and dialog root. */ declare function Root(props: RootProps): ReactElement; type DialogTriggerProps = ComponentPropsWithRef; /** * A button to open the Markprompt dialog. */ declare const DialogTrigger: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; type PortalProps = ComponentPropsWithoutRef; /** * The Markprompt dialog portal. */ declare function Portal(props: PortalProps): ReactElement; declare namespace Portal { var displayName: string; } type OverlayProps = ComponentPropsWithRef; /** * The Markprompt dialog overlay. */ declare const Overlay: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; type ContentProps = ComponentPropsWithRef & { /** * Show the Markprompt footer. */ showBranding?: boolean; /** * Show Algolia attribution in the footer. **/ showAlgolia?: boolean; }; /** * The Markprompt dialog content. */ declare const Content: React.ForwardRefExoticComponent & React.RefAttributes>; type PlainContentProps = ComponentPropsWithRef<'div'> & { /** * Show the Markprompt footer. */ showBranding?: boolean; /** * Show Algolia attribution in the footer. **/ showAlgolia?: boolean; }; /** * The Markprompt plain content. */ declare const PlainContent: React.ForwardRefExoticComponent & React.RefAttributes>; type CloseProps = ComponentPropsWithRef; /** * A button to close the Markprompt dialog and abort an ongoing request. */ declare const Close: React.ForwardRefExoticComponent, "ref"> & React.RefAttributes>; type TitleProps = ComponentPropsWithRef & { hide?: boolean; }; declare const Title: React.ForwardRefExoticComponent & React.RefAttributes>; type DescriptionProps = ComponentPropsWithRef & { hide?: boolean; }; /** * A visually hidden aria description. */ declare const Description: React.ForwardRefExoticComponent & React.RefAttributes>; type FormProps = ComponentPropsWithRef<'form'>; /** * A form which, when submitted, submits the current prompt. */ declare const Form: React.ForwardRefExoticComponent, HTMLFormElement>, "ref"> & { ref?: ((instance: HTMLFormElement | null) => void) | React.RefObject | null | undefined; }, "ref"> & React.RefAttributes>; type PromptProps = ComponentPropsWithRef<'input'> & { /** The label for the input. */ label?: ReactNode; /** The class name of the label element. */ labelClassName?: string; }; /** * The Markprompt input prompt. User input will update the prompt in the Markprompt context. */ declare const Prompt: React.ForwardRefExoticComponent & React.RefAttributes>; type AnswerProps = Omit, 'children'> & { answer: string; }; /** * Render the markdown answer from the Markprompt API. */ declare function Answer(props: AnswerProps): ReactElement; declare namespace Answer { var displayName: string; } type AutoScrollerProps = ComponentPropsWithRef<'div'> & { /** * Whether or not to enable automatic scrolling. * * @default true */ autoScroll?: boolean; /** * The behaviour to use for scrolling. * * @default 'smooth' */ scrollBehavior?: ScrollBehavior; /** * The element scrolls when this prop changes * @default undefined * */ scrollTrigger?: unknown; }; /** * A component automatically that scrolls to the bottom. */ declare const AutoScroller: React.NamedExoticComponent; interface ReferencesProps> { /** * The wrapper component to render. * @default 'ul' */ RootComponent?: TRoot; /** * The component to render for each reference. * @default 'li' */ ReferenceComponent?: TReference; references: FileSectionReference[]; } /** * Render the references that Markprompt returned. */ declare const ForwardedReferences: React.ForwardRefExoticComponent> & React.RefAttributes>; type SearchResultsProps = PolymorphicComponentPropWithRef<'ul', { label?: string; SearchResultComponent?: ElementType; searchResults: SearchResultComponentProps[]; }>; declare const SearchResults: React.ForwardRefExoticComponent & React.RefAttributes>; type SearchResultProps = PolymorphicComponentPropWithRef<'li', SearchResultComponentProps & { onMouseMove?: () => void; onClick?: () => void; }>; declare const SearchResult: React.ForwardRefExoticComponent & React.RefAttributes>; export { Answer, AutoScroller, Close, Content, Description, DialogTrigger, Form, Overlay, PlainContent, Portal, Prompt, ForwardedReferences as References, Root, SearchResult, SearchResults, Title, type AnswerProps, type AutoScrollerProps, type CloseProps, type ContentProps, type DescriptionProps, type DialogTriggerProps, type FormProps, type OverlayProps, type PortalProps, type PromptProps, type ReferencesProps, type RootProps, type SearchResultProps, type SearchResultsProps, type TitleProps, }; //# sourceMappingURL=headless.d.ts.map