diff --git a/.changeset/tanstack-ai-adapter.md b/.changeset/tanstack-ai-adapter.md deleted file mode 100644 index 699d697..0000000 --- a/.changeset/tanstack-ai-adapter.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@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, for `chat({ tools })`) and `createSimplePDFTools({ embed })` (browser `.client()` tools for `clientTools(...)` then `useChat({ 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/ai` is a new optional peer, pulled only by the `/tanstack-ai` subpath; the package roots stay free of it (and of `zod`). -- **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/embed` root drops the internal helpers `buildEditorDomain`, `encodeContext`, `isBridgeResultLike`. - - `@simplepdf/embed/protocol` drops the internal `INTERNAL_PROTOCOL` / `InternalProtocolType` (used only by the bridge). - - `@simplepdf/react-embed-pdf` root no longer re-exports the whole `@simplepdf/embed` core or the wire-protocol vocabulary; import those from `@simplepdf/embed` / `@simplepdf/embed/protocol` directly. - - `@simplepdf/react-embed-pdf/ai-sdk` no longer re-exports `simplePDFToolDefinitions` (import it from `@simplepdf/embed/ai-sdk`); the browser-side `createSimplePDFExecutor` stays. Server tool-definitions now live only in the React-free core, so a server route never pulls React in. diff --git a/.changeset/violet-melons-poke.md b/.changeset/violet-melons-poke.md deleted file mode 100644 index a845151..0000000 --- a/.changeset/violet-melons-poke.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/embed/CHANGELOG.md b/embed/CHANGELOG.md index 3f556cd..c994bcc 100644 --- a/embed/CHANGELOG.md +++ b/embed/CHANGELOG.md @@ -1,5 +1,20 @@ # @simplepdf/embed +## 0.6.0 + +### Minor Changes + +- e91b4c7: 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, for `chat({ tools })`) and `createSimplePDFTools({ embed })` (browser `.client()` tools for `clientTools(...)` then `useChat({ 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/ai` is a new optional peer, pulled only by the `/tanstack-ai` subpath; the package roots stay free of it (and of `zod`). + - **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/embed` root drops the internal helpers `buildEditorDomain`, `encodeContext`, `isBridgeResultLike`. + - `@simplepdf/embed/protocol` drops the internal `INTERNAL_PROTOCOL` / `InternalProtocolType` (used only by the bridge). + - `@simplepdf/react-embed-pdf` root no longer re-exports the whole `@simplepdf/embed` core or the wire-protocol vocabulary; import those from `@simplepdf/embed` / `@simplepdf/embed/protocol` directly. + - `@simplepdf/react-embed-pdf/ai-sdk` no longer re-exports `simplePDFToolDefinitions` (import it from `@simplepdf/embed/ai-sdk`); the browser-side `createSimplePDFExecutor` stays. Server tool-definitions now live only in the React-free core, so a server route never pulls React in. + ## 0.5.0 ### Minor Changes diff --git a/embed/package.json b/embed/package.json index e097fdb..f00c1ef 100644 --- a/embed/package.json +++ b/embed/package.json @@ -1,6 +1,6 @@ { "name": "@simplepdf/embed", - "version": "0.5.0", + "version": "0.6.0", "description": "Embed and programmatically drive the SimplePDF editor over its iframe bridge", "type": "module", "private": false, diff --git a/react/CHANGELOG.md b/react/CHANGELOG.md index 8040416..c516398 100644 --- a/react/CHANGELOG.md +++ b/react/CHANGELOG.md @@ -1,5 +1,25 @@ # @simplepdf/react-embed-pdf +## 1.12.0 + +### Minor Changes + +- e91b4c7: 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, for `chat({ tools })`) and `createSimplePDFTools({ embed })` (browser `.client()` tools for `clientTools(...)` then `useChat({ 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/ai` is a new optional peer, pulled only by the `/tanstack-ai` subpath; the package roots stay free of it (and of `zod`). + - **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/embed` root drops the internal helpers `buildEditorDomain`, `encodeContext`, `isBridgeResultLike`. + - `@simplepdf/embed/protocol` drops the internal `INTERNAL_PROTOCOL` / `InternalProtocolType` (used only by the bridge). + - `@simplepdf/react-embed-pdf` root no longer re-exports the whole `@simplepdf/embed` core or the wire-protocol vocabulary; import those from `@simplepdf/embed` / `@simplepdf/embed/protocol` directly. + - `@simplepdf/react-embed-pdf/ai-sdk` no longer re-exports `simplePDFToolDefinitions` (import it from `@simplepdf/embed/ai-sdk`); the browser-side `createSimplePDFExecutor` stays. Server tool-definitions now live only in the React-free core, so a server route never pulls React in. + +### Patch Changes + +- Updated dependencies [e91b4c7] + - @simplepdf/embed@0.6.0 + ## 1.11.0 ### Minor Changes diff --git a/react/package.json b/react/package.json index abbd9ec..02bff0e 100644 --- a/react/package.json +++ b/react/package.json @@ -1,6 +1,6 @@ { "name": "@simplepdf/react-embed-pdf", - "version": "1.11.0", + "version": "1.12.0", "description": "SimplePDF straight into your React app", "repository": { "type": "git", @@ -49,7 +49,7 @@ "check:api": "node ../scripts/check-api.mjs ." }, "dependencies": { - "@simplepdf/embed": "^0.5.0" + "@simplepdf/embed": "^0.6.0" }, "peerDependencies": { "@tanstack/ai": "^0.38.0",