docs(readme): fix Library use example — package name and renderTextToImages

The 'Library use' snippet imported `renderTextToPngs` from "pxpipe", but the
published package is "pxpipe-proxy" and the root barrel (src/core/index.ts)
exports `renderTextToImages`, not `renderTextToPngs`. Both the import
specifier and the function name were unrunnable as written.

- import from "pxpipe-proxy" (matches package.json "name")
- use renderTextToImages, which returns { pages, droppedChars, pixels }
- show pages[i].png (Uint8Array) instead of the stale RenderedImage[] comment
This commit is contained in:
Danil Silantyev
2026-07-04 12:27:52 +07:00
committed by Steven
parent 7dd54d395d
commit 3f61348a19
+2 -2
View File
@@ -117,9 +117,9 @@ sparse prose stays text. Events log to `~/.pxpipe/events.jsonl`.
## Library use (no proxy)
```ts
import { renderTextToPngs, transformAnthropicMessages } from "pxpipe";
import { renderTextToImages, transformAnthropicMessages } from "pxpipe-proxy";
const imgs = await renderTextToPngs(toolResultText); // RenderedImage[]
const { pages } = await renderTextToImages(toolResultText); // pages[i].png: Uint8Array
const { body, applied, info } = await transformAnthropicMessages({
body: requestBytes,
model: "claude-fable-5",