Unified React page component for rendering markdown-backed legal documents (privacy policy, terms of service, etc.), replacing duplicate per-document page components with a single configurable implementation. ## Key Components ### `LegalDocumentPage` Main exported component. Fetches and renders a legal document via `useLegalDocs`, handling loading skeletons, error states, and empty states. Conditionally wraps output in `PageShell` based on the `shell` prop. ### `LegalDocumentPageProps` Full configuration interface including: - `docType` — drives the default `/api/legal/` endpoint - `title`, `fallbackDescription`, `contactEmail` — display copy - `errorTitle`, `errorContactPrompt`, `emptyStateMessage` — state-specific messaging - `initialData` / `initialLastUpdatedLabel` — SSR hydration support - `MarkdownRenderer` — injectable renderer component (defaults to `RichMarkdownRenderer`) - `backButton` — configurable back navigation or `false` to hide - `shell` — toggle `PageShell` wrapper for embed contexts ### `LegalDocumentMarkdownRendererProps` Interface for the pluggable `MarkdownRenderer` component contract: `content`, optional `sectionIds`, and `demoteMarkdownH1ToH2`. ## Usage Example ```typescript import { LegalDocumentPage } from './legal-document-page'; // Basic usage (Privacy Policy) // Embedded mode — host provides layout, custom renderer ``` **Source:** [`legal-document-page.tsx`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/legal-document-page.tsx)