| @simplepdf/embed | minor |
|---|---|
| @simplepdf/react-embed-pdf | minor |
Add a TanStack AI adapter (the /tanstack-ai subpath) for client-side tool calling, alongside the existing Vercel AI SDK (/ai-sdk) adapter. Both wrap the same generated tool registry + bridge router, so the editor is drivable from either SDK with no duplicated logic.
@simplepdf/embed/tanstack-ai:simplePDFToolDefinitions()(server, forchat({ tools })) andcreateSimplePDFTools({ embed })(browser.client()tools forclientTools(...)thenuseChat({ tools })).@simplepdf/react-embed-pdf/tanstack-ai:useEmbedTools(embedRef), the editor-bound client tools. Server definitions stay in the React-free core@simplepdf/embed/tanstack-ai, so a server route never pulls React in.@tanstack/aiis a new optional peer, pulled only by the/tanstack-aisubpath; the package roots stay free of it (and ofzod).- Public exports trimmed to the strict minimum. These are breaking removals, but the only consumer is copilot (migrated in lockstep), so they ship as a minor rather than a major:
@simplepdf/embedroot drops the internal helpersbuildEditorDomain,encodeContext,isBridgeResultLike.@simplepdf/embed/protocoldrops the internalINTERNAL_PROTOCOL/InternalProtocolType(used only by the bridge).@simplepdf/react-embed-pdfroot no longer re-exports the whole@simplepdf/embedcore or the wire-protocol vocabulary; import those from@simplepdf/embed/@simplepdf/embed/protocoldirectly.@simplepdf/react-embed-pdf/ai-sdkno longer re-exportssimplePDFToolDefinitions(import it from@simplepdf/embed/ai-sdk); the browser-sidecreateSimplePDFExecutorstays. Server tool-definitions now live only in the React-free core, so a server route never pulls React in.