import { default as default_2 } from 'react'; import * as React_2 from 'react'; /** Passed to `onAcceptAndPublish` from the split Accept dropdown (public vs internal). */ export declare type AcceptAndPublishVisibility = 'public' | 'internal'; /** * Listens to selectedItem from context and fetches diff via the provided callback. * Owns loading state and context updates; host (Storybook or Platform) supplies fetch logic. */ export declare function KnowledgeReviewDiffLoader({ fetchDiffForItem }: KnowledgeReviewDiffLoaderProps): null; export declare type KnowledgeReviewDiffLoaderProps = { /** Called when selectedItem changes. Return diff payload or null. */ fetchDiffForItem: (itemId: string) => Promise; }; /** * Panel that shows the selected diff (title + content), suggestion count, and article nav. * Must be used inside ReviewsSelectionProvider. Expects --knowledge-review-scroll-height * to be set by a parent for ScrollArea height. */ export declare function KnowledgeReviewPanel({ diffTitle, items, isLoading, totalItemsCount, showActionButtons, children, sourceIcon, sourceDescription, }: KnowledgeReviewPanelProps): default_2.JSX.Element; export declare type KnowledgeReviewPanelProps = { diffTitle: string; items: ReviewListItemProps[]; isLoading?: boolean; totalItemsCount?: number; showActionButtons?: boolean; children?: default_2.ReactNode; sourceIcon: default_2.ReactNode; sourceDescription: string | null; }; export declare const KnowledgeReviewScene: default_2.ForwardRefExoticComponent>; export declare type KnowledgeReviewSceneHandle = { selectedItem: ReviewListItemProps | null; setSelectedItem: (item: ReviewListItemProps | null) => void; }; export declare type KnowledgeReviewSceneProps = { diffTitle?: string; children: default_2.ReactNode; items: ReviewListItemProps[]; isLoading?: boolean; /** Total number of review list items available (can exceed currently loaded `items.length`). */ totalItemsCount?: number; /** Controls visibility of the Reject / Accept action buttons in the review header. */ showActionButtons?: boolean; className?: string; onApproveAllSuggestions: () => void | Promise; onRejectAllSuggestions: () => void | Promise; onAcceptAndPublish?: (visibility: AcceptAndPublishVisibility) => void | Promise; /** Bulk-apply against the live editor doc (new editor only). Runs before the server callback. */ onApplyAllInEditor?: () => Promise | void; /** Bulk-reject against the live editor doc (new editor only). Runs before the server callback. */ onRejectAllInEditor?: () => Promise | void; onOpenArticleLink?: () => void; onSourceLinkClick?: () => void; breadcrumb?: string; sourceIcon: default_2.ReactNode; sourceDescription: string | null; suggestionReasonBody?: string; hideAcceptAndPublishPublic?: boolean; }; export declare type LoadedDiffDoc = { isNew: boolean; diffTitle: string; diffContent: default_2.ReactNode; }; export declare interface ReviewListItemProps extends React_2.ButtonHTMLAttributes { /** Unique identifier for the knowledge article */ id: string; /** Primary text displayed in the first row */ title: string; /** Content rendered in the top-right corner (e.g. relative timestamp) */ timestamp: Date; /** Icon rendered at the start of the second row */ icon?: React_2.ReactNode; /** Text or content next to the icon in the second row */ description?: string | null; /** Whether this item is new */ isNew?: boolean; /** Whether this item has been accepted (e.g. accepted as draft) */ isAccepted?: boolean; /** Number of edits for this item */ editCount?: number; /** Whether this item is currently selected */ isSelected?: boolean; } declare type ReviewsProviderProps = { children: default_2.ReactNode; /** Optional initial selection (e.g. from server or mock data) */ defaultSelectedItem?: ReviewListItemProps | null; onApproveAllSuggestions: () => void | Promise; onRejectAllSuggestions: () => void | Promise; onAcceptAndPublish?: (visibility: AcceptAndPublishVisibility) => void | Promise; onApplyAllInEditor?: () => Promise | void; onRejectAllInEditor?: () => Promise | void; onOpenArticleLink?: () => void; onSourceLinkClick?: () => void; breadcrumb?: string; suggestionReasonBody?: string; hideAcceptAndPublishPublic?: boolean; }; export declare function ReviewsSelectionProvider({ children, defaultSelectedItem, onApproveAllSuggestions, onRejectAllSuggestions, onAcceptAndPublish, onApplyAllInEditor, onRejectAllInEditor, onOpenArticleLink, onSourceLinkClick, breadcrumb, suggestionReasonBody, hideAcceptAndPublishPublic, }: ReviewsProviderProps): default_2.JSX.Element; declare type ReviewsSelectionValue = { selectedItem: ReviewListItemProps | null; setSelectedItem: (item: ReviewListItemProps | null) => void; loadedDiffDoc: LoadedDiffDoc | null; setLoadedDiffDoc: (doc: LoadedDiffDoc | null) => void; loadingDiff: boolean; setLoadingDiff: (loading: boolean) => void; onApproveAllSuggestions: () => void | Promise; onRejectAllSuggestions: () => void | Promise; onAcceptAndPublish?: (visibility: AcceptAndPublishVisibility) => void | Promise; onApplyAllInEditor?: () => Promise | void; onRejectAllInEditor?: () => Promise | void; onOpenArticleLink?: () => void; onSourceLinkClick?: () => void; breadcrumb?: string; suggestionReasonBody?: string; /** When true, omit the "publish publicly" item from the Accept & publish menu. */ hideAcceptAndPublishPublic?: boolean; }; /** * Floating card that displays a single review suggestion with its source, * accept/reject actions, and an optional paginator for navigating within-article * suggestions. Purely presentational — the host wires callbacks to the * reviewSuggestions plugin / API layer. */ export declare const SuggestionCard: React_2.ForwardRefExoticComponent>; /** * Visual diff shown between the source row and the reason. Renders as a * single bordered row with the old text struck-through in destructive color * and the new text in link color. * * - For replace ops, set both `oldText` and `newText`. * - For delete ops, set only `oldText`. * - For insert ops, set only `newText`. * * When both fields are empty/undefined the diff row is not rendered. */ export declare interface SuggestionCardDiff { /** Original text being removed. Destructive. */ oldText?: string; /** Proposed replacement / insertion. Link color. */ newText?: string; } /** * Pagination state for the side paginator column. When omitted, the paginator * column (and its divider) is not rendered at all. */ export declare interface SuggestionCardPagination { /** 1-based index of this suggestion within the set. */ currentIndex: number; /** Total number of suggestions in the set. */ totalCount: number; /** Fires when the user navigates to the previous suggestion. Omit to hide the button. */ onPrevious?: () => void; /** Fires when the user navigates to the next suggestion. Omit to hide the button. */ onNext?: () => void; } export declare interface SuggestionCardProps extends Omit, 'onSelect'> { /** * Source metadata shown at the top of the card. Omit to skip the source * row entirely — useful when the host doesn't have source info to surface. */ source?: SuggestionCardSource; /** * Old vs. new text for the suggestion. Renders the bordered diff row * between the source and the reason. Omit to skip the diff row entirely. */ diff?: SuggestionCardDiff; /** * Host-provided explanation for why this suggestion was raised. Renders * as the body paragraph below the diff. Omit to skip the reason line. */ reason?: string; /** * Fires when the user accepts this suggestion. When omitted, the accept * button is rendered disabled (so the affordance is visible but inert). */ onAccept?: () => void; /** * Fires when the user rejects this suggestion. When omitted, the reject * button is rendered disabled. */ onReject?: () => void; /** Disable the accept button while an accept is in-flight. */ acceptDisabled?: boolean; /** Disable the reject button while a reject is in-flight. */ rejectDisabled?: boolean; /** * Paginator state. When omitted, the whole paginator column (and its * dividing border) is not rendered. */ pagination?: SuggestionCardPagination; readOnly?: boolean; } export declare interface SuggestionCardSource { /** Eyebrow label, e.g. "1 day ago from" — rendered uppercase by the card. */ label: string; /** Display name of the source, e.g. "team-meetingFEB.mp4". */ name: string; /** * Optional icon next to the source name. Pass a `@phosphor-icons/react` icon. */ icon?: React_2.ReactNode; } export declare function useReviewsSelection(): ReviewsSelectionValue; export { }