feat(P074): consolidate React embed on the @simplepdf/embed core#38
Merged
Conversation
Rebuild @simplepdf/react-embed-pdf on the framework-free @simplepdf/embed core: grouped handle (actions / events / lifecycle), camelCase + agentic surface generated from embed-api.json, opt-in /ai-sdk. Non-breaking minor (react@1.11.0, embed@0.5.0).
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
simplepdf-webhooks | 5a28116 | Commit Preview URL Branch Preview URL |
Jun 26 2026, 04:15 PM |
…tablished, not cross-major)
…the iframe bridge for programmatic control
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Phase 7 of P074 (
plans/P074-embed-bridge-refactor.md): consolidate@simplepdf/react-embed-pdfonto the framework-free@simplepdf/embedcore so both packages share one generated, camelCase, agentic surface — shipped as a non-breaking minor (@simplepdf/embed@0.5.0,@simplepdf/react-embed-pdf@1.11.0).Changes
createEmbedreturns{ actions, events, lifecycle }—embed.actions.*(operations),embed.events.on(type, handler)(granular subscriptions),embed.lifecycle.dispose().embed-api.json; the snake_case wire is transformed at thepostMessageboundary. Outbound events stay verbatim snake_case (the stable 1.x contract).companyIdentifierreplacestenant; SimplePDF documents URLs load directly;routeToolCalltakes the actions group;zodis an opt-in peer (/tools,/ai-sdk,/schemas); the main entry is zero-dependency.1.11.0): built on the core; the flat 1.xEmbedActionsref is preserved (embedRef.current.selectTool(...)),onEmbedEventstays verbatim, modal is still the default,documentURLis a deprecated alias fordocument.useEmbed().actionsis now the full editor surface;selectTool/submitkeep their 1.x argument overloads.@simplepdf/react-embed-pdf/ai-sdksubpath (useEmbedTools(embedRef)), so the package root stays zod-free — mirroring the core's main vs/ai-sdksplit.useEmbedTools, camelCase tools/actions,DOCUMENT_LOADEDreadiness).embed+reactREADMEs anddocumentation/IFRAME.mdare rewritten for the grouped handle + agentic ("fill and read this for me") examples.Notes
embed@0.5.0,react@1.11.0) → merge that → auto-publish to npm (latest). Both changesets areminor(no major).copilot/package-lock.jsonis regenerated after the packages publish (it cannot reference versions that are not yet on npm): publish →npm installincopilot/→ deploy copilot (manual;deploy_on_push: false).