///
import type { ComponentProps } from '@fluentui/react-components';
import type { ComponentState } from '@fluentui/react-components';
import type { Context } from '@fluentui/react-context-selector';
import type { ContextSelector } from '@fluentui/react-context-selector';
import type { DesignVersion } from '@fluentui-copilot/react-provider';
import { FC } from 'react';
import type { ForwardRefComponent } from '@fluentui/react-components';
import { ForwardRefComponent as ForwardRefComponent_2 } from '@fluentui/react-utilities';
import { JSXElement } from '@fluentui/react-utilities';
import type { PreviewHeaderProps } from '@fluentui-copilot/react-preview';
import type { PreviewMetadataProps } from '@fluentui-copilot/react-preview';
import type { PreviewProps } from '@fluentui-copilot/react-preview';
import type { PreviewSurfaceProps } from '@fluentui-copilot/react-preview';
import { Provider } from 'react';
import { ProviderProps } from 'react';
import * as React_2 from 'react';
import { Ref } from 'react';
import type { SensitivityLabelProps } from '@fluentui-copilot/react-sensitivity-label';
import type { Slot } from '@fluentui/react-components';
import type { SlotClassNames } from '@fluentui/react-components';
import { SlotClassNames as SlotClassNames_2 } from '@fluentui/react-utilities';
export declare const Citation: ForwardRefComponent;
export declare const citationClassNames: SlotClassNames;
/**
* Citation Props
*/
export declare type CitationProps = ComponentProps> & DesignVersion & {
/**
* HREF to the associated `Reference`.
*/
referenceHref?: string;
/**
* Whether the citation is a block citation and has no built in margins.
* Citations are inline by default with margins to separate them from inline text.
*/
block?: boolean;
};
export declare type CitationSlots = {
/**
* The root slot.
*/
root: NonNullable>;
};
/**
* State used in rendering Citation
*/
export declare type CitationState = ComponentState & Required> & {
isPopoverLocked: boolean;
};
/**
* Function to generate a Citation - Reference pair with correctly wired props.
* Both the Citation and the Reference act as trigger components to Previews that are also correctly wired by the function.
* Props can either be passed in to the function or applied directly to the generated components in JSX.
*
* A `useReferenceCitationPreview` hook exists that calls this function and memoizes its return value based on the props.
* You should use the hook when the props used to generate the Citation - Reference pair can change dynamically.
* If they are static, or in case you wanted to generate multiple pairs within a cycle, you should call
* `generateReferenceCitationPreview` directly.
*
* @returns A Citation - Reference pair with correctly wired props.
*/
export declare const generateReferenceCitationPreview: ReferenceCitationPreviewGenerator;
export declare type PackagedCitation = React_2.FC;
/** @deprecated use PackagedCitation */
export declare type PackagedCitationV2 = PackagedCitation;
export declare type PackagedPreviewContentProps = Pick & {
content?: React_2.ReactNode;
};
/** @deprecated use PackagedPreviewContentProps */
export declare type PackagedPreviewContentV2Props = PackagedPreviewContentProps;
export declare type PackagedReference = React_2.FC;
/** @deprecated use PackagedReference */
export declare type PackagedReferenceV2 = PackagedReference;
export declare const Reference: ForwardRefComponent;
export declare type ReferenceCitationPreviewGenerator = (props: ReferenceCitationPreviewGeneratorProps) => {
Citation: PackagedCitation;
Reference: PackagedReference;
};
export declare type ReferenceCitationPreviewGeneratorProps = {
citationPreviewProps?: Omit & Partial>;
citationPreviewSurfaceProps?: PreviewSurfaceProps;
citationProps?: CitationProps;
index: number;
previewContentProps?: PackagedPreviewContentProps;
previewHeaderProps?: PreviewHeaderProps;
referencePreviewProps?: Omit & Partial>;
referencePreviewSurfaceProps?: PreviewSurfaceProps;
referenceProps?: ReferenceProps;
sensitivityLabelProps?: SensitivityLabelProps;
};
export declare const referenceClassNames: SlotClassNames;
export declare const referenceExtraClassNames: {
graphicChild: string;
};
export declare const ReferenceList: ForwardRefComponent;
export declare const referenceListClassNames: SlotClassNames;
export declare const ReferenceListContext: Context;
export declare const ReferenceListContextProvider: Provider & FC>;
/**
* Context shared between ReferenceList and its children components
*/
export declare type ReferenceListContextValue = Pick;
export declare type ReferenceListContextValues = {
referenceList: ReferenceListContextValue;
};
export declare type ReferenceListProps = ComponentProps> & {
/**
* The maximum number of references to display before the overflow button is shown even if there is
* enough space available to show more.
* If not set, the overflow functionality will be disabled.
* If this value is less than `minVisibleReferences`, then `minVisibleReferences` will take precedence.
* @default undefined
*/
maxVisibleReferences?: number;
/**
* The minimum number of references to always show before overflowing.
* If this value exceeds the number of references, the overflow functionality will be disabled.
* If this value is greater than `maxVisibleReferences`, then this will take precedence.
* @default undefined
*/
minVisibleReferences?: number;
};
export declare type ReferenceListSlots = {
/** The root of the component that contains the list of references. */
root: NonNullable>;
/** The region that contains the references and is used for arrow navigation. */
arrowableRegion: NonNullable>;
/** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */
showMoreButton?: Slot<'span'>;
/** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */
showLessButton?: Slot<'span'>;
};
export declare type ReferenceListState = ComponentState & Pick & {
areReferencesExpanded: boolean;
overflowButtonTriggeredViaKeyboard: React.MutableRefObject;
referenceListRef: React.RefObject;
shouldUseOverflow: boolean;
totalReferencesCount: number;
};
/** @deprecated use ReferenceList */
export declare const ReferenceListV2: ForwardRefComponent_2;
/** @deprecated use referenceListClassNames */
export declare const referenceListV2ClassNames: SlotClassNames_2;
/** @deprecated use ReferenceListContextValues */
export declare type ReferenceListV2ContextValues = ReferenceListContextValues;
/** @deprecated use ReferenceListProps */
export declare type ReferenceListV2Props = ReferenceListProps;
/** @deprecated use ReferenceListSlots */
export declare type ReferenceListV2Slots = ReferenceListSlots;
/** @deprecated use ReferenceListState */
export declare type ReferenceListV2State = ReferenceListState;
export declare const ReferenceOverflowButton: ForwardRefComponent;
export declare const referenceOverflowButtonClassNames: SlotClassNames;
/**
* ReferenceOverflowButton Props
*/
export declare type ReferenceOverflowButtonProps = ComponentProps & DesignVersion & {
/**
* The text that is displayed inside of the overflow button. This text is only displayed when `children` has not been passed to the component.
* If a string is passed, that is what is rendered verbatim.
* If a callback is passed, the callback is called with the number of items that are overflowing, and the result of the callback is rendered.
*/
text?: string | ((overflowCount: number) => React.ReactNode);
};
export declare type ReferenceOverflowButtonSlots = {
/** The root of the component that renders the overflow button. */
root: Slot<'button'>;
};
/**
* State used in rendering ReferenceOverflowButton
*/
export declare type ReferenceOverflowButtonState = ComponentState & Pick, 'designVersion'> & {
id: string;
shouldRenderOverflowButton: boolean;
};
export declare type ReferenceProps = ComponentProps> & DesignVersion & {};
export declare type ReferenceSlots = {
/** The root of the component that renders the reference as either a button or an anchor element. */
root: NonNullable>;
/** The number of the citation this reference corresponds to. */
citation?: Slot<'span'>;
/** A divider that visually separates the citation from the content of the reference. */
divider?: Slot<'span'>;
/** A space containing the content of the reference, which goes into an ellipsis if it overflows. */
content?: Slot<'span'>;
/** A space within the content slot where a graphic such as an icon or an image can be displayed before the rest of the content. */
graphic?: Slot<'span'>;
};
export declare type ReferenceState = ComponentState & Required> & Pick;
/** @deprecated use Reference */
export declare const ReferenceV2: ForwardRefComponent_2;
/** @deprecated use referenceClassNames */
export declare const referenceV2ClassNames: SlotClassNames_2;
/** @deprecated use referenceExtraClassNames */
export declare const referenceV2ExtraClassNames: {
graphicChild: string;
};
/** @deprecated use ReferenceProps */
export declare type ReferenceV2Props = ReferenceProps;
/** @deprecated use ReferenceSlots */
export declare type ReferenceV2Slots = ReferenceSlots;
/** @deprecated use ReferenceState */
export declare type ReferenceV2State = ReferenceState;
/**
* Render the final JSX of Citation
*/
export declare const renderCitation_unstable: (state: CitationState) => JSXElement;
export declare const renderReference_unstable: (state: ReferenceState) => JSXElement;
/**
* Render the final JSX of ReferenceList
*/
export declare const renderReferenceList_unstable: (state: ReferenceListState, contextValues: ReferenceListContextValues) => JSXElement;
/** @deprecated use renderReferenceList_unstable */
export declare const renderReferenceListV2_unstable: (state: ReferenceListState, contextValues: ReferenceListContextValues) => JSXElement;
/**
* Render the final JSX of ReferenceOverflowButton
*/
export declare const renderReferenceOverflowButton_unstable: (state: ReferenceOverflowButtonState) => JSXElement | null;
/** @deprecated use renderReference_unstable */
export declare const renderReferenceV2_unstable: (state: ReferenceState) => JSXElement;
/**
* Create the state required to render Citation.
*
* The returned state can be modified with hooks such as useCitationStyles_unstable,
* before being passed to renderCitation_unstable.
*
* @param props - props from this instance of Citation
* @param ref - reference to root HTMLElement of Citation
*/
export declare const useCitation_unstable: (props: CitationProps, ref: React.Ref) => CitationState;
/**
* Apply styling to the Citation slots based on the state
*/
export declare const useCitationStyles_unstable: (state: CitationState) => CitationState;
/**
* Create the state required to render Reference.
*
* The returned state can be modified with hooks such as useReferenceStyles_unstable,
* before being passed to renderReference_unstable.
*
* @param props - props from this instance of Reference
* @param ref - reference to root HTMLElement of Reference
*/
export declare const useReference_unstable: (props: ReferenceProps, ref: React_2.Ref) => ReferenceState;
export declare type UseReferenceCitationPreview = ReferenceCitationPreviewGenerator;
/**
* Hook to generate a Citation - Reference pair with correctly wired props.
* Both the Citation and the Reference act as trigger components to Previews that are also correctly wired by the hook.
* Props can either be passed in to the hook or applied directly to the generated components in JSX.
*
* This hook internally calls the `generateReferenceCitationPreview` function and memoizes its return value based on the props.
* You should only use this hook when the props used to generate the Citation - Reference pair can change dynamically.
* If they are static, or in case you wanted to generate multiple pairs within a cycle, you should call
* `generateReferenceCitationPreview` directly.
*
* @returns A Citation - Reference pair with correctly wired props.
*/
export declare const useReferenceCitationPreview: UseReferenceCitationPreview;
export declare type UseReferenceCitationPreviewProps = ReferenceCitationPreviewGeneratorProps;
/** @deprecated use UseReferenceCitationPreview */
export declare type UseReferenceCitationPreviewV2 = UseReferenceCitationPreview;
/** @deprecated use useReferenceCitationPreview */
export declare const useReferenceCitationPreviewV2: ReferenceCitationPreviewGenerator;
/** @deprecated use UseReferenceCitationPreviewProps */
export declare type UseReferenceCitationPreviewV2Props = UseReferenceCitationPreviewProps;
/**
* Create the state required to render ReferenceList.
*
* The returned state can be modified with hooks such as useReferenceListStyles_unstable,
* before being passed to renderReferenceList_unstable.
*
* @param props - props from this instance of ReferenceList
* @param ref - reference to root HTMLElement of ReferenceList
*/
export declare const useReferenceList_unstable: (props: ReferenceListProps, ref: React_2.Ref) => ReferenceListState;
export declare const useReferenceListContext_unstable: (selector: ContextSelector) => T;
/**
* Apply styling to the ReferenceList slots based on the state
*/
export declare const useReferenceListStyles_unstable: (state: ReferenceListState) => ReferenceListState;
/** @deprecated use useReferenceList_unstable */
export declare const useReferenceListV2_unstable: (props: ReferenceListProps, ref: Ref) => ReferenceListState;
/** @deprecated use useReferenceListStyles_unstable */
export declare const useReferenceListV2Styles_unstable: (state: ReferenceListState) => ReferenceListState;
/**
* Create the state required to render ReferenceOverflowButton.
*
* The returned state can be modified with hooks such as useReferenceOverflowButtonStyles_unstable,
* before being passed to renderReferenceOverflowButton_unstable.
*
* @param props - props from this instance of ReferenceOverflowButton
* @param ref - reference to root HTMLElement of ReferenceOverflowButton
*/
export declare const useReferenceOverflowButton_unstable: (props: ReferenceOverflowButtonProps, ref: React_2.Ref) => ReferenceOverflowButtonState;
/**
* Apply styling to the ReferenceOverflowButton slots based on the state
*/
export declare const useReferenceOverflowButtonStyles_unstable: (state: ReferenceOverflowButtonState) => ReferenceOverflowButtonState;
/**
* Apply styling to the Reference slots based on the state
*/
export declare const useReferenceStyles_unstable: (state: ReferenceState) => ReferenceState;
/** @deprecated use useReference_unstable */
export declare const useReferenceV2_unstable: (props: ReferenceProps, ref: Ref) => ReferenceState;
/** @deprecated use useReferenceStyles_unstable */
export declare const useReferenceV2Styles_unstable: (state: ReferenceState) => ReferenceState;
export { }