refactor(web): rebuild web-embed-pdf on @simplepdf/embed, WebMCP on by default, PDF links in any case - #51
Merged
Merged
Conversation
…ndow.simplePDF unchanged
… test and the WordPress plugin's mirror
…one minor changeset
…aseDomain, never leave a stuck overlay
…rimming of the company identifier
…tor for non-document hrefs, untyped values never throw
bendersej
force-pushed
the
P074-02-web-embed-on-core
branch
from
September 28, 2026 09:15
a8a3941 to
b72f50a
Compare
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
@simplepdf/web-embed-pdfis loaded unpinned from unpkg by customer sites, so a publish reaches every site at once. It re-implemented what@simplepdf/embedalready owns: the editor URL, loading the document (host fetch, then the?openfallback) and the postMessage bridge. This PR rebuilds it oncreateEmbed.window.simplePDF, the script-tag attributes and the modal stay unchanged.Changes
createEmbed; the modal markup and CSS are kept byte for byte.webmcp="false"orsetConfig({ webMCP: { enabled: false } })turns it off. Every call goes through the editor's usual permissions.Consent.PDF,form.pdf?ver=2,guide.pdf#page=3); links already detected keep opening.web/src/__tests__/fixtures/pdf-link-cases.json) drives the unit test./documents/<id>link opens the stored document directly.companyIdentifierthat cannot form an editor address (a URL, spaces, dots, underscores) logs an error and opens nothing. An identifier with no account behind it opens the editor, which shows its own error page.data:,blob:), and so does an uppercasecompanyIdentifier.dist/index.js).minorchangeset (1.9.0).Notes
@simplepdf/embedalready ships (React 1.11+ has it today); above it, the document goes to the editor by URL.