/** * Findings sidebar — built-in component for hosts that pass * ``items`` (OverlayItems) to LensPDF and want a polished list of * findings alongside the canvas. * * Behaviour out of the box: * * - Splits items into "Located in viewer" (clickable, drawn on the * canvas) and "Informational" (no bbox, surfaced separately) via * ``splitFindingsByLocation`` so consumers never have to write * the predicate themselves. * - Each group has a collapsible header with a count chip. * - Severity filter pills (all / error / warning / advisory / info) * along the top. * - Item buttons fire ``onSelect`` so the host can sync canvas * highlight + page jump. * * The component is intentionally opinionated about layout (vertical * sidebar, dark / brand palette honoured via Lens's existing * ThemeTokens). Hosts that need a totally different chrome should * import the underlying helpers and roll their own. * * @public */ import type * as React from "react"; import type { DecisionRecord, DecisionType, OverlayItem } from "../plugin"; export interface FindingsSidebarProps { /** All findings — both located and informational. Pass the same * superset you'd pass to ````. */ items: readonly OverlayItem[]; /** Current canvas selection, if any. Drives the highlighted row. */ selected?: OverlayItem | null; /** Fires when the user clicks a located item. Hosts typically * forward this to LensPDF's ``selectedItem`` prop so the canvas * jumps + tooltips the matching bbox. */ onSelect?: (item: OverlayItem | null) => void; /** Optional title shown in the sidebar header. Default: * ``"Preflight findings"`` — adapter authors mapping other * engines (callas, PitStop, Acrobat) can override. */ title?: string; /** Optional filename caption rendered under the title. */ filename?: string; /** Width class applied to the aside; defaults to ``w-80``. */ widthClass?: string; /** * Active decisions keyed by finding id. Populate from * ``GET /api/v1/jobs/{id}/decisions`` — the sidebar shows approval * state badges and a Revoke action when a decision is active. */ decisions?: Record; /** * Fires when the user clicks Approve / Waive / Reject / Suppress on a * finding row. The host calls the lint-pdf decisions API and re-fetches * decisions to update this prop. */ onDecide?: (item: OverlayItem, type: DecisionType, notes?: string) => void; /** * When true, spell-check findings (type === "spell_check") are hidden * from the list. The canvas squiggles hide simultaneously via LensPDF's * spellingHidden state. Default false. */ hideSpelling?: boolean; /** Fires when the user clicks the Spelling toggle pill. */ onToggleSpelling?: () => void; } /** * Sticky vertical sidebar for the LensPDF viewer. */ export declare function FindingsSidebar({ items, selected, onSelect, title, filename, widthClass, decisions, onDecide, hideSpelling, onToggleSpelling, }: FindingsSidebarProps): React.ReactElement; //# sourceMappingURL=FindingsSidebar.d.ts.map