import type { ChatInputEntityData } from '@fluentui-copilot/chat-input-plugins'; import type { ChatInputEntityPluginProps } from '@fluentui-copilot/chat-input-plugins'; import type { ComponentProps } from '@fluentui/react-components'; import type { ComponentState } from '@fluentui/react-components'; import { DecoratorNode } from '@fluentui-copilot/text-editor'; import type { EditorConfig } from '@fluentui-copilot/text-editor'; import type { EditorState } from '@fluentui-copilot/text-editor'; import type { ForwardRefComponent } from '@fluentui/react-components'; import type { IImperativeControlBase } from '@fluentui-copilot/chat-input-plugins'; import type { IManualGhostTextBase } from '@fluentui-copilot/chat-input-plugins'; import type { JSXElement } from '@fluentui/react-utilities'; import type { LexicalEditor } from '@fluentui-copilot/text-editor'; import type { LexicalNode } from '@fluentui-copilot/text-editor'; import type { NodeKey } from '@fluentui-copilot/text-editor'; import { PasteUnfurlingPluginBaseProps } from '@fluentui-copilot/chat-input-plugins'; import * as React_2 from 'react'; import type { SerializedLexicalNode } from '@fluentui-copilot/text-editor'; import type { Slot } from '@fluentui/react-components'; import type { SlotClassNames } from '@fluentui/react-components'; import type { Spread } from '@fluentui-copilot/text-editor'; export declare function $createChatInputEntityNode(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey): ChatInputEntityNode; export declare function $createChatInputTokenNode(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey): ChatInputTokenNode; export declare function $createGhostTextNode(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps): GhostTextNode; export declare function $isChatInputEntityNode(node: LexicalNode | null | undefined): node is ChatInputEntityNode; export declare function $isChatInputTokenNode(node: LexicalNode | null | undefined): node is ChatInputTokenNode; export declare function $isGhostTextNode(node: LexicalNode | null | undefined): node is GhostTextNode; export declare const BasicFunctionalityPlugin: React_2.ForwardRefExoticComponent>; export declare type BasicFunctionalityPluginProps = { trimWhitespace?: boolean; onCountChanged?: (count: number) => void; onContentChange?: (value: string) => void; onPaste?: (event: ClipboardEvent) => void; isSentinelNodeEnabled?: boolean; }; export declare type BasicFunctionalityPluginRef = { setIsDisabled: (isDisabled: boolean) => void; }; export declare const ChatInputEntity: ForwardRefComponent; export declare const chatInputEntityClassNames: SlotClassNames; export declare class ChatInputEntityNode extends DecoratorNode { __pluginId: string; __text: string; __entityProps?: ChatInputEntityProps; __data?: T; static getType(): string; static clone(node: ChatInputEntityNode): ChatInputEntityNode; static importJSON(serializedNode: SerializedChatInputEntityNode): ChatInputEntityNode; isIsolated(): boolean; isInline(): boolean; isKeyboardSelectable(): boolean; getTextContent(): string; exportJSON(): SerializedChatInputEntityNode; constructor(pluginId: string, text: string, data?: T, entityProps?: ChatInputEntityProps, key?: NodeKey); createDOM(): HTMLElement; updateDOM(): boolean; decorate(_editor: LexicalEditor, config: EditorConfig): JSXElement | null; getEntityData(): ChatInputEntityData; updateEntityData(data: ChatInputEntityData): void; } export declare const ChatInputEntityPlugin: (props: ChatInputEntityPluginProps & { controlRef: React_2.Ref>; }) => null; export declare type ChatInputEntityPluginRef = { insertChatInputEntity: (props: ChatInputEntityData) => string | undefined; removeChatInputEntity: (keyOrPredicate: string | ((entity: ChatInputEntityData, i: number) => boolean)) => void; updateChatInputEntityProps: (keyOrPredicate: string | ((entity: ChatInputEntityData, i: number) => boolean), props: ChatInputEntityData | ((oldProps: ChatInputEntityData) => ChatInputEntityData)) => void; getActiveEntities: () => ChatInputEntityData[]; }; /** * ChatInputEntity Props */ export declare type ChatInputEntityProps = ComponentProps, 'text'> & {}; export declare type ChatInputEntitySlots = { root: NonNullable>; text: Slot<'span', 'a'>; sensitivity?: Slot<'span'>; }; /** * State used in rendering ChatInputEntity */ export declare type ChatInputEntityState = ComponentState; export declare const ChatInputToken: ForwardRefComponent; export declare const chatInputTokenClassNames: SlotClassNames; export declare class ChatInputTokenNode extends DecoratorNode { __text: string; __componentProps?: ChatInputTokenProps; static getType(): string; static clone(node: ChatInputTokenNode): ChatInputTokenNode; static importJSON(serializedNode: SerializedChatInputTokenNode): ChatInputTokenNode; isIsolated(): boolean; isInline(): boolean; getTextContent(): string; exportJSON(): SerializedChatInputTokenNode; constructor(text: string, componentProps?: ChatInputTokenProps, key?: NodeKey); createDOM(): HTMLElement; updateDOM(): boolean; decorate(_editor: LexicalEditor, config: EditorConfig): JSXElement | null; } /** * ChatInputToken Props */ export declare type ChatInputTokenProps = ComponentProps & {}; export declare type ChatInputTokenSlots = { root: Slot<'span'>; }; /** * State used in rendering ChatInputToken */ export declare type ChatInputTokenState = ComponentState; export declare const GhostText: ForwardRefComponent; export declare const ghostTextClassNames: SlotClassNames; export declare class GhostTextNode extends DecoratorNode { __content: string; __id: string; __allowCommitting?: boolean; __componentProps?: GhostTextProps; __exposeText?: boolean; static clone(node: GhostTextNode): GhostTextNode; static getType(): 'ghosttext'; static importJSON(serializedNode: SerializedGhostTextNode): GhostTextNode; exportJSON(): SerializedGhostTextNode; constructor(id: string, content: string, exposeText?: boolean, componentProps?: GhostTextProps, key?: NodeKey); isInline(): boolean; isIsolated(): boolean; getTextContent(): string; updateDOM(prevNode: unknown, dom: HTMLElement, config: EditorConfig): boolean; createDOM(config: EditorConfig): HTMLElement; decorate(): JSXElement | null; } export declare function GhostTextPlugin(props: GhostTextPluginProps): JSXElement | null; export declare type GhostTextPluginProps = { id: string; $getGhostText: (editor: LexicalEditor, editorState: EditorState, prevEditorState: EditorState) => Promise; ghostTextProps?: GhostTextProps; exposeText?: boolean; allowCompletion?: boolean; }; /** * GhostText Props */ export declare type GhostTextProps = ComponentProps & { nodeKey?: string; }; export declare type GhostTextSlots = { root: Slot<'span'>; indicator?: Slot<'span'>; }; /** * State used in rendering GhostText */ export declare type GhostTextState = ComponentState; export declare const ImperativeControlPlugin: React_2.ForwardRefExoticComponent>; export declare type ImperativeControlPluginProps = {}; export declare type ImperativeControlPluginRef = IImperativeControlBase; export declare const ManualGhostTextPlugin: React_2.ForwardRefExoticComponent>; export declare type ManualGhostTextProps = { id: string; }; export declare type ManualGhostTextRef = IManualGhostTextBase; export declare const PasteUnfurlingPlugin: (props: PasteUnfurlingPluginProps) => null; export declare type PasteUnfurlingPluginProps = Omit, '$createEntityNode'> & Pick>, '$createEntityNode'>; /** * Render the final JSX of ChatInputEntity */ export declare const renderChatInputEntity_unstable: (state: ChatInputEntityState) => JSXElement; /** * Render the final JSX of ChatInputToken */ export declare const renderChatInputToken_unstable: (state: ChatInputTokenState) => JSXElement; /** * Render the final JSX of GhostText */ export declare const renderGhostText_unstable: (state: GhostTextState) => JSXElement; export declare type SerializedChatInputEntityNode = Spread<{ pluginId: string; text: string; data?: T; entityProps?: ChatInputEntityProps; }, SerializedLexicalNode>; export declare type SerializedChatInputTokenNode = Spread<{ text: string; componentProps?: ChatInputTokenProps; }, SerializedLexicalNode>; export declare type SerializedGhostTextNode = Spread<{ content: string; id: string; componentProps?: GhostTextProps; exposeText?: boolean; }, SerializedLexicalNode>; /** * Create the state required to render ChatInputEntity. * * The returned state can be modified with hooks such as useChatInputEntityStyles_unstable, * before being passed to renderChatInputEntity_unstable. * * @param props - props from this instance of ChatInputEntity * @param ref - reference to root HTMLElement of ChatInputEntity */ export declare const useChatInputEntity_unstable: (props: ChatInputEntityProps, ref: React_2.Ref) => ChatInputEntityState; /** * Apply styling to the ChatInputEntity slots based on the state */ export declare const useChatInputEntityStyles_unstable: (state: ChatInputEntityState) => ChatInputEntityState; /** * Create the state required to render ChatInputToken. * * The returned state can be modified with hooks such as useChatInputTokenStyles_unstable, * before being passed to renderChatInputToken_unstable. * * @param props - props from this instance of ChatInputToken * @param ref - reference to root HTMLElement of ChatInputToken */ export declare const useChatInputToken_unstable: (props: ChatInputTokenProps, ref: React_2.Ref) => ChatInputTokenState; /** * Apply styling to the ChatInputToken slots based on the state */ export declare const useChatInputTokenStyles_unstable: (state: ChatInputTokenState) => ChatInputTokenState; /** * Create the state required to render GhostText. * * The returned state can be modified with hooks such as useGhostTextStyles_unstable, * before being passed to renderGhostText_unstable. * * @param props - props from this instance of GhostText * @param ref - reference to root HTMLElement of GhostText */ export declare const useGhostText_unstable: (props: GhostTextProps, ref: React_2.Ref) => GhostTextState; /** * Apply styling to the GhostText slots based on the state */ export declare const useGhostTextStyles_unstable: (state: GhostTextState) => GhostTextState; export { }