Skip to content

chore: version packages#28

Merged
bendersej merged 1 commit into
mainfrom
changeset-release/main
Jun 29, 2026
Merged

chore: version packages#28
bendersej merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@simplepdf/embed@0.5.0

Minor Changes

  • 980906d: camelCase SDK surface grouped into actions / events / lifecycle, companyIdentifier, and direct loading of SimplePDF documents URLs.

    • Grouped handle: createEmbed returns { actions, events, lifecycle }embed.actions.* (operations), embed.events.on(type, handler) (subscriptions), embed.lifecycle.dispose() (teardown).
    • camelCase everywhere on the SDK, with the snake_case wire kept behind a transform owned by the bridge: method names + their arguments + results + the agentic tool names/args are camelCase (embed.actions.getFields(), embed.actions.setFieldValue({ fieldId, value }), embed.actions.submit({ downloadCopy }), tools.getDocumentContent). The editor's snake_case wire is generated from embed-api.json and transformed at the postMessage boundary — consumers never see it.
    • Events are the deliberate exception: embed.events.on(type, handler) delivers the editor's outbound payloads VERBATIM (snake_case fields, e.g. document_id) for EDITOR_READY / DOCUMENT_LOADED / PAGE_FOCUSED / SUBMISSION_SENT, so the React layer's onEmbedEvent is unchanged.
    • companyIdentifier replaces tenant in createEmbed (it is the consumer's own SimplePDF subdomain — tenant read as if SimplePDF were multi-tenant per consumer).
    • Documents URLs load directly: when document.url is a <tenant>.<baseDomain>/documents/<id> URL (https, single tenant label), createEmbed navigates the iframe straight to it (carrying ?context=) instead of host-fetching — so prefilled/stored documents open as themselves.
    • The React layer moved OUT of this package into @simplepdf/react-embed-pdf (the /react subpath is removed); the editor iframe is granted clipboard-read; clipboard-write by default.

@simplepdf/react-embed-pdf@1.11.0

Minor Changes

  • 980906d: Rebuilt on the @simplepdf/embed core, adding an AI-SDK-native agentic surface — a non-breaking superset of the existing component API.

    @simplepdf/react-embed-pdf no longer hand-rolls its own iframe bridge; it is a thin React layer over the shared @simplepdf/embed core (the same core web-embed-pdf and future framework adapters sit on).

    The existing <EmbedPDF> contract is preserved (drop-in): the props (companyIdentifier, documentURL, mode — still defaulting to "modal", onEmbedEvent, locale, baseDomain, context, className, style) and, crucially, onEmbedEvent still emits the editor's events VERBATIM: { type: 'EDITOR_READY' | 'DOCUMENT_LOADED' | 'PAGE_FOCUSED' | 'SUBMISSION_SENT', data } with snake_case payloads. useEmbed() still returns { embedRef, actions }.

    New (additive):

    • A new opt-in @simplepdf/react-embed-pdf/ai-sdk subpath exposes the agentic surface: useEmbedTools(embedRef) binds the tool registry to the live editor for the Vercel AI SDK (useChat({ tools })), plus simplePDFToolDefinitions (server) and createSimplePDFExecutor. It mirrors @simplepdf/embed's /ai-sdk, so the package root stays zod-free.
    • useEmbed().actions now exposes the FULL editor surface (camelCase): createField, getFields, setFieldValue, focusField, movePage, rotatePage, deletePages, download, … — not just the original six.
    • A typed document prop ({ url } | { dataUrl } | { file }), the same shape as createEmbed. It also accepts data URLs and File/Blob, and a SimplePDF documents URL loads directly (prefill etc.). documentURL is now @deprecated (still works) in favor of it.
    • An optional logger prop surfaces the bridge's structured lifecycle/error logging.
    • The forwarded ref (embedRef.current) stays the flat actions handle — embedRef.current.selectTool(...), etc. — now exposing the full camelCase action set. (The framework-free @simplepdf/embed core groups its handle as embed.actions / embed.events / embed.lifecycle; the React layer flattens it to keep the existing ref contract.)

    Imperative actions stay backward-compatible. selectTool and submit gained camelCase argument shapes to match the rest of the SDK (selectTool({ tool }), submit({ downloadCopy })), but the previous forms — selectTool(toolType) and submit({ downloadCopyOnDevice }) — still work as deprecated overloads that normalize to the new shape, so existing useEmbed().actions callers don't change. A relative documentURL / trigger href (e.g. /form.pdf) is still accepted — it is resolved against the page URL, as before.

    One behavioral note: calling an action before <EmbedPDF> has mounted now resolves to { success: false, error: { code: 'unexpected:iframe_not_mounted' } } (the previous form returned bad_request:embed_ref_not_available). Code that checks result.success is unaffected; only code branching on the exact pre-mount error string needs updating.

    Packaging is preserved: still dual CJS + ESM, so require() consumers keep working. zod remains a peer dependency, now required only by the agentic /ai-sdk subpath (it validates tool input) — the package root (<EmbedPDF>, useEmbed) is zod-free, so a non-agentic app never loads it. Install zod only if you import /ai-sdk; npm 7+ adds it automatically, pnpm / Yarn PnP users add it explicitly.

Patch Changes

  • Updated dependencies [980906d]
    • @simplepdf/embed@0.5.0

@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from 4989401 to 784cb83 Compare March 26, 2026 14:25
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 784cb83 to a19903d Compare March 31, 2026 09:11
@github-actions github-actions Bot force-pushed the changeset-release/main branch 15 times, most recently from 2e54c8f to 1e10411 Compare May 3, 2026 09:41
@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from c574a25 to 3f8a72d Compare May 5, 2026 16:13
@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from d3b0b89 to 24879fc Compare May 14, 2026 16:49
@github-actions github-actions Bot force-pushed the changeset-release/main branch 4 times, most recently from c6c9aba to 11516f2 Compare June 2, 2026 16:46
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 11516f2 to 7158c5b Compare June 12, 2026 12:57
@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from 7f62b68 to ddbf047 Compare June 22, 2026 16:32
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
simplepdf-webhooks 46ad8d0 Commit Preview URL

Branch Preview URL
Jun 29 2026, 09:03 AM

@github-actions github-actions Bot force-pushed the changeset-release/main branch 2 times, most recently from 861109d to 09935fd Compare June 29, 2026 08:36
@bendersej bendersej self-requested a review June 29, 2026 08:37
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 09935fd to 46ad8d0 Compare June 29, 2026 09:02
@bendersej bendersej merged commit 02563ce into main Jun 29, 2026
4 checks passed
@bendersej bendersej deleted the changeset-release/main branch June 29, 2026 09:03
bendersej added a commit that referenced this pull request Jun 29, 2026
…#40)

## Background

Merging the Version PR (#28) triggered the publish, but it **failed
before shipping anything** (npm still at `@simplepdf/embed@0.4.0` /
`@simplepdf/react-embed-pdf@1.10.0`).

`release.yaml` has no build step — it relies on `changeset publish`'s
`prepublishOnly` hooks. But those don't build in dependency order:
`react`'s `prepublishOnly` (`rollup -c`) runs before
`@simplepdf/embed`'s type declarations exist, so `rpt2` can't resolve
`@simplepdf/embed` / `/tools` / `/ai-sdk` (TS7016) and the whole publish
aborts. `dist` is gitignored, so CI must build it — and the ordering
can't be left to the publish hooks.

## Changes

- `release.yaml` builds all workspaces in dependency order (`embed →
react → web`) before the publish step, so each package's types exist
before the next builds.

## Notes

Verified locally from a clean `dist`: `npm run build --workspaces
--if-present` builds embed (8 `.d.ts`) then react with no TS7016, exit
0. Merging this re-runs `release.yaml` on `main` (the changesets are
already consumed, so it takes the publish path) → builds → publishes
`0.5.0` / `1.11.0`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant