# Changelog All notable changes to **pdfnative-react** are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [1.0.0] — Stable release First stable release. The public API is now covered by semantic versioning. This release integrates the authoring features added by the `pdfnative` engine through 1.5.0 and ships the previously-planned 0.4.0 authoring conveniences. ### Breaking Changes - **`pdfnative` is now a peer dependency** (`^1.5.0`) instead of a bundled dependency. Install it alongside the wrapper: `npm install pdfnative-react pdfnative react`. This lets your app control the engine version and matches how `pdfnative` is treated as external in the build. The engine floor is raised to **1.5.0**. ### Added - **Bookmarks / outline & page labels** on `` (and `DocSpec`): `outline` accepts a nested `OutlineItem[]` tree or `'auto'` (derived from headings); `pageLabels` controls viewer page numbering. Both PDF/A-safe. - **`
`** — a composite helper pairing a heading with its grouped content (`title`, `level`, `color`, `break`). - **Nested lists** — `` may nest a child ``, directly nested `` children, or use the `items` data prop (`{ text, items }`). The `DocSpec` `ul`/`ol` grammar accepts the same nested items. - **Table styling** — `cellBorders` (sides, color, width, dash style) and `cellVAlign`, plus per-column `ColumnDef.vAlign` and `kind: 'amount'`. - **Layout inspection & debugging** — `inspectDocument(node)` / `inspectSpec(spec)` return page/block geometry without rendering, and `layout.debug` overlays margin/content/cell boxes. - **Viewer preferences** — `layout.viewerPreferences` (page mode/layout, toolbar/menubar visibility, `displayDocTitle`, …). - **`renderToFileStream`** / `renderSpecToFileStream` — constant-memory file output that preserves document-level features (outline, page labels). - **Font convenience** — `resolveFonts(map)` registers loaders and returns `FontEntry[]`; the async entry points accept the loader map as `options.fonts`. Enables the bundled Noto Sans Math font (`'math'`) and other scripts ergonomically. - **Image helpers** — `fromUrl(url)` and `fromBase64(payload)` produce the bytes `` expects. - **`validateFontData(data)`** — opt-in, read-only structural check of a custom font module before embedding (`{ valid, errors, warnings }`); `FontValidationResult` type re-exported. - **AI-governance / human-in-the-loop contract** (aligned with the `pdfnative` monorepo): `.github/ai-governance.json`, `.github/AGENT_RULES.md`, `.github/drafts/` staging area, [docs/AI_GOVERNANCE.md](docs/AI_GOVERNANCE.md), and a `npm run verify:issue` CLI (`scripts/verify-issue.mjs`) that validates a draft issue locally. AI agents act strictly as *draftsmen* — no autonomous GitHub writes. Covered by `tests/governance.test.ts`. - **SVG ``/``** now renders as native, selectable PDF text (flows through the existing `` — no API change). - New type re-exports: `OutlineItem`, `PageLabelRange`, `PageLabelStyle`, `ViewerPreferences`, `LayoutDebugOptions`, `LayoutInspection`, `InspectedPage`, `InspectedBlock`, `CellBorders`, `ListItem`, `StreamToFileResult`, `FontsMap`, `FontLoader`, `FontData`, `FontValidationResult`. - **11 new samples** covering every new feature, and matching test coverage. ### Changed - Scope is stated explicitly: pdfnative-react covers document *authoring*. Byte-level post-processing (merge/split, annotations, signing, crypto providers, font compilation) is done with the `pdfnative` engine directly. ## [0.2.0] — First implemented release ### Added - **Declarative component model** mapping 1:1 onto the `pdfnative` block flow: `Document`, `Page`, `Heading`, `Paragraph` (`Text` alias), `List`/`Item`, `Table`/`Row`/`Cell`, `Image`, `Link`, `Spacer`, `PageBreak`, `TableOfContents` (`Toc` alias), `Barcode`, `Svg`, and `FormField`. - **Custom React reconciler** that compiles a JSX tree into a `pdfnative` `DocumentParams` object — no DOM, no headless browser, no native deps. - **Render entry points**: `renderToBytes`, `renderToBlob`, `renderToStream` (true constant-memory streaming), `renderToFile` (Node), and `compileDocument`. - **Client hooks**: `usePdf` (bytes / blob / object URL / `update()`), `usePdfStream` (streaming factory). - **Client components**: `PDFViewer` (live `