///
import type { ComponentProps } from '@fluentui/react-components';
import type { ComponentState } from '@fluentui/react-components';
import type { ForwardRefComponent } from '@fluentui/react-components';
import type { InitialConfigType } from '@fluentui-copilot/react-text-editor';
import type { JSXElement } from '@fluentui/react-utilities';
import type { LexicalComposerContextWithEditor } from '@fluentui-copilot/react-text-editor';
import type { LexicalEditor } from '@fluentui-copilot/react-text-editor';
import type { LexicalPlainTextPlugin } from '@fluentui-copilot/react-text-editor';
import type { PresenceMotionSlotProps } from '@fluentui/react-motion';
import * as React_2 from 'react';
import type { Slot } from '@fluentui/react-components';
import type { SlotClassNames } from '@fluentui/react-components';
export declare const AnimatedPlaceholder: ForwardRefComponent;
export declare const animatedPlaceholderClassNames: SlotClassNames>;
/**
* AnimatedPlaceholder Props
*/
export declare type AnimatedPlaceholderProps = ComponentProps> & {
/**
* The placeholder value to animate.
*/
placeholderValue: string;
};
export declare type AnimatedPlaceholderSlots = {
root: NonNullable>;
motion: NonNullable>;
placeholder: NonNullable>;
};
/**
* State used in rendering AnimatedPlaceholder
*/
export declare type AnimatedPlaceholderState = ComponentState;
export declare const EditorInput: ForwardRefComponent;
export declare const editorInputClassNames: SlotClassNames;
export declare type EditorInputContextValues = {
lexicalComposer: LexicalComposerContextWithEditor;
};
/**
* EditorInput Props
*/
export declare type EditorInputProps = Omit, 'input'>, 'onChange' | 'onPaste' | 'defaultValue' | 'onSubmit'> & {
disabled?: boolean;
/**
* If defaultValue is a string, it will be added to the input on first render.
* If defaultValue is a function, it can call lexical $ functions to imperatively set the initial content with more complex nodes.
*/
defaultValue?: string | (() => void);
/**
* Called when the default value is given to the editor.
* If `defaultValue` was a function, this will be called with the state of the editor after
* calling that function.
* If `defaultValue` was a string, this will be called with the same string.
*/
onDefaultValueSet?: (defaultValue: string) => void;
/**
* Callback for when the user changes the value.
* TODO: Add proper event type for callback
*/
onChange?: (ev: any, data: EditorInputValueData) => void;
/**
* Callback for when content is pasted into the Editor.
*/
onPaste?: (ev: ClipboardEvent) => void;
/**
* When true, the input will be cleared when only whitespace is remaining.
* @default false
*/
trimWhiteSpace?: boolean;
/**
* Used to register any custom nodes used by plugins added. Can also be used to override the default nodes.
*/
customNodes?: InitialConfigType['nodes'];
/**
* The plugin which is in charge of initializing Lexical and is given the `input` and `placeholder` slots
* @default LexicalPlainTextPlugin
*/
textPlugin?: typeof LexicalPlainTextPlugin;
/**
* Controls whether history is tracked to provide undo and redo functionality
* @default true
*/
history?: boolean;
editorRef?: React.RefObject;
/**
* Customize the default styles of elements inserted by Lexical in the editor.
*/
customTheme?: InitialConfigType['theme'];
/**
* Whether or not to enable the sentinel node. The sentinel node is a node that is inserted at the end of the editor
* The SentinelNode fixes a Safari bug in lexical versions below 0.20.1
* @default true
*/
isSentinelNodeEnabled?: boolean;
};
export declare type EditorInputSlots = {
root: NonNullable>;
input: NonNullable>;
placeholderValue?: Slot<'span'>;
};
/**
* State used in rendering EditorInput
*/
export declare type EditorInputState = ComponentState & Required> & Partial> & {
handleOnChange: (value: string) => void;
lexicalEditor: LexicalEditor;
lexicalInitialConfig: InitialConfigType;
};
/**
* Data passed to the `onChange` callback when the chat input's value changes.
*/
export declare type EditorInputValueData = {
value: string;
};
/**
* Render the final JSX of AnimatedPlaceholder
*/
export declare const renderAnimatedPlaceholder_unstable: (state: AnimatedPlaceholderState) => JSXElement;
/**
* Render the final JSX of EditorInput
*/
export declare const renderEditorInput_unstable: (state: EditorInputState, contextValues: EditorInputContextValues) => JSXElement;
/**
* Create the state required to render AnimatedPlaceholder.
*
* The returned state can be modified with hooks such as useAnimatedPlaceholderStyles_unstable,
* before being passed to renderAnimatedPlaceholder_unstable.
*
* @param props - props from this instance of AnimatedPlaceholder
* @param ref - reference to root HTMLElement of AnimatedPlaceholder
*/
export declare const useAnimatedPlaceholder_unstable: (props: AnimatedPlaceholderProps, ref: React_2.Ref) => AnimatedPlaceholderState;
/**
* Apply styling to the AnimatedPlaceholder slots based on the state
*/
export declare const useAnimatedPlaceholderStyles_unstable: (state: AnimatedPlaceholderState) => AnimatedPlaceholderState;
/**
* Create the state required to render EditorInput.
*
* The returned state can be modified with hooks such as useEditorInputStyles_unstable,
* before being passed to renderEditorInput_unstable.
*
* @param props - props from this instance of EditorInput
* @param ref - reference to root HTMLElement of EditorInput
*/
export declare const useEditorInput_unstable: (props: EditorInputProps, ref: React_2.Ref) => EditorInputState;
export declare function useEditorInputContextValues(state: EditorInputState): EditorInputContextValues;
/**
* Apply styling to the EditorInput slots based on the state
*/
export declare const useEditorInputStyles_unstable: (state: EditorInputState) => EditorInputState;
export declare const useInputClassName: () => string;
export declare const useLexicalStyles: () => Record<"paragraph", string>;
export declare const usePlaceholderClassName: () => string;
export { }