diff --git a/.github/workflows/wordpress-release.yaml b/.github/workflows/wordpress-release.yaml new file mode 100644 index 00000000..ee12608c --- /dev/null +++ b/.github/workflows/wordpress-release.yaml @@ -0,0 +1,24 @@ +name: WordPress release + +# Run by hand once the SVN tag is committed: WordPress.org releases happen outside GitHub. +on: + workflow_dispatch: + +jobs: + announce: + name: Announce the plugin release on Discord + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "24" + + - name: Announce the release + run: node scripts/announce-wordpress-release.mjs + env: + DISCORD_RELEASES_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASES_WEBHOOK_URL }} diff --git a/.github/workflows/wordpress.yaml b/.github/workflows/wordpress.yaml new file mode 100644 index 00000000..983678fb --- /dev/null +++ b/.github/workflows/wordpress.yaml @@ -0,0 +1,55 @@ +name: WordPress + +on: + pull_request: + branches: + - main + paths: + - wordpress/** + - .github/workflows/wordpress.yaml + +jobs: + test: + name: Plugin on PHP ${{ matrix.php }} + runs-on: ubuntu-latest + strategy: + matrix: + # 5.6 is the plugin's "Requires PHP" floor (wordpress/svn/trunk/README.txt). + php: ["5.6", "8.3"] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Lint the plugin + run: | + for file in wordpress/svn/trunk/*.php; do + docker run --rm -v "$PWD":/w php:${{ matrix.php }}-cli php -l "/w/$file" + done + + - name: Test the PDF link rule against the shared cases + run: docker run --rm -v "$PWD":/w php:${{ matrix.php }}-cli php /w/wordpress/tests/pdf-links-test.php + + vendored-bundle: + name: Vendored web-embed matches the pinned version + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Re-vendor from npm and compare + working-directory: wordpress + run: | + npm ci + npm run copy-src + npm run copy-build + npm run copy-fixtures + git diff --exit-code -- svn/trunk/src svn/trunk/build tests/fixtures + test -z "$(git status --porcelain -- svn/trunk/src svn/trunk/build tests/fixtures)" + + - name: The plugin enqueues the pinned version + working-directory: wordpress + run: | + pinned_version=$(node -p "require('./package.json').dependencies['@simplepdf/web-embed-pdf']") + grep -q "define('SIMPLEPDF_WEB_EMBED_VERSION', '${pinned_version}');" svn/trunk/simplepdf-embed.php diff --git a/scripts/announce-release.mjs b/scripts/announce-release.mjs index 3a014a82..cd9df650 100644 --- a/scripts/announce-release.mjs +++ b/scripts/announce-release.mjs @@ -13,9 +13,9 @@ export const EXIT_CODES = { discord_rejected_message: 4, } -const BRAND_BLUE = 0x3665e1 +export const BRAND_BLUE = 0x3665e1 const BREAKING_RED = 0xcc2222 -const LOGO_URL = 'https://simplepdf.com/android-chrome-512x512.png' +export const LOGO_URL = 'https://simplepdf.com/android-chrome-512x512.png' // Discord caps an embed description at 4096 characters; the headroom keeps the closing link line. const DESCRIPTION_LIMIT = 3800 @@ -170,7 +170,7 @@ const parsePublishedPackages = (value) => { } } -const postToDiscord = async ({ webhookUrl, message }) => { +export const postToDiscord = async ({ webhookUrl, message }) => { const response = await fetch(webhookUrl, { method: 'POST', headers: { 'content-type': 'application/json' }, diff --git a/scripts/announce-wordpress-release.mjs b/scripts/announce-wordpress-release.mjs new file mode 100644 index 00000000..fd2152bd --- /dev/null +++ b/scripts/announce-wordpress-release.mjs @@ -0,0 +1,120 @@ +// Posts a WordPress plugin release to the Discord releases channel, from the changelog in README.txt. +// The plugin ships through WordPress.org SVN, which GitHub never sees: the "WordPress release" workflow is run by +// hand after the SVN commit, and this script refuses to post until WordPress.org serves the Stable tag. +// Usage: DISCORD_RELEASES_WEBHOOK_URL=… node scripts/announce-wordpress-release.mjs (DRY_RUN=1 prints the message) +import { readFile } from 'node:fs/promises' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { BRAND_BLUE, LOGO_URL, postToDiscord } from './announce-release.mjs' + +export const EXIT_CODES = { + success: 0, + stable_tag_not_found: 2, + changelog_section_not_found: 3, + discord_rejected_message: 4, + wordpress_org_unreachable: 5, + not_live_on_wordpress_org: 6, +} + +const PLUGIN_URL = 'https://wordpress.org/plugins/simplepdf-embed/' +const PLUGIN_INFO_URL = 'https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&slug=simplepdf-embed' +const SOURCE_URL = 'https://github.com/SimplePDF/simplepdf-embed/tree/main/wordpress' + +// The Stable tag and its `= =` changelog bullets, or null without a Stable tag. +export const parseReadme = (readme) => { + const version = /^Stable tag:\s*(\S+)\s*$/m.exec(readme)?.[1] ?? null + if (version === null) { + return null + } + + const lines = readme.split('\n') + const changelogStart = lines.findIndex((line) => line.trim() === '== Changelog ==') + const versionStart = lines.findIndex((line, index) => index > changelogStart && line.trim() === `= ${version} =`) + if (changelogStart === -1 || versionStart === -1) { + return { version, entries: [] } + } + + const sectionLines = lines.slice(versionStart + 1) + const end = sectionLines.findIndex((line) => line.trim().startsWith('=')) + const entries = (end === -1 ? sectionLines : sectionLines.slice(0, end)) + .filter((line) => line.startsWith('* ')) + .map((line) => line.slice(2).trim()) + + return { version, entries } +} + +export const buildWordPressReleaseMessage = ({ version, entries }) => ({ + username: 'SimplePDF Releases', + avatar_url: LOGO_URL, + allowed_mentions: { parse: [] }, + embeds: [ + { + title: `SimplePDF Embed for WordPress ${version}`, + url: PLUGIN_URL, + color: BRAND_BLUE, + description: ["**What's new**", ...entries.map((entry) => `- ${entry}`)].join('\n'), + fields: [ + { + name: 'Get started', + value: 'New site: Plugins > Add New, search for "SimplePDF Embed".\nAlready installed: update from Dashboard > Updates.', + }, + { name: 'Links', value: `[Plugin page](${PLUGIN_URL}) · [Changelog](${PLUGIN_URL}#developers) · [Source](${SOURCE_URL})` }, + ], + footer: { text: 'SimplePDF · GPLv2 or later', icon_url: LOGO_URL }, + timestamp: new Date().toISOString(), + }, + ], +}) + +const fetchLiveVersion = async () => { + try { + const response = await fetch(PLUGIN_INFO_URL) + const pluginInfo = response.ok ? await response.json() : null + return typeof pluginInfo?.version === 'string' ? pluginInfo.version : null + } catch { + return null + } +} + +const main = async () => { + const rootDir = path.join(path.dirname(fileURLToPath(import.meta.url)), '..') + const readme = await readFile(path.join(rootDir, 'wordpress/svn/trunk/README.txt'), 'utf8') + const release = parseReadme(readme) + if (release === null) { + console.error('wordpress/svn/trunk/README.txt has no Stable tag') + return EXIT_CODES.stable_tag_not_found + } + if (release.entries.length === 0) { + console.error(`README.txt has no "= ${release.version} =" changelog entries`) + return EXIT_CODES.changelog_section_not_found + } + + const message = buildWordPressReleaseMessage(release) + const webhookUrl = process.env.DISCORD_RELEASES_WEBHOOK_URL + if (webhookUrl === undefined || webhookUrl === '' || process.env.DRY_RUN === '1') { + console.log(JSON.stringify(message, null, 2)) + return EXIT_CODES.success + } + + const liveVersion = await fetchLiveVersion() + if (liveVersion === null) { + console.error(`Could not read the live version from ${PLUGIN_INFO_URL}`) + return EXIT_CODES.wordpress_org_unreachable + } + if (liveVersion !== release.version) { + console.error(`WordPress.org serves ${liveVersion}, not ${release.version}: commit the SVN tag first, then run this again`) + return EXIT_CODES.not_live_on_wordpress_org + } + + const failure = await postToDiscord({ webhookUrl, message }) + if (failure !== null) { + console.error(`Discord rejected the announcement for ${release.version}: ${failure}`) + return EXIT_CODES.discord_rejected_message + } + console.log(`Announced SimplePDF Embed for WordPress ${release.version}`) + return EXIT_CODES.success +} + +if (process.argv[1] === fileURLToPath(import.meta.url)) { + process.exit(await main()) +} diff --git a/scripts/announce-wordpress-release.test.mjs b/scripts/announce-wordpress-release.test.mjs new file mode 100644 index 00000000..0203e367 --- /dev/null +++ b/scripts/announce-wordpress-release.test.mjs @@ -0,0 +1,42 @@ +import assert from 'node:assert/strict' +import { readFile } from 'node:fs/promises' +import { test } from 'node:test' +import { buildWordPressReleaseMessage, parseReadme } from './announce-wordpress-release.mjs' + +const README = `=== SimplePDF Embed === +Stable tag: 1.2.0 + +== Changelog == + += 1.2.0 = +* New settings page +* Update web-embed-pdf to 1.9.0 + += 1.1.3 = +* An older fix +` + +test('reads the Stable tag and only its changelog entries', () => { + assert.deepEqual(parseReadme(README), { version: '1.2.0', entries: ['New settings page', 'Update web-embed-pdf to 1.9.0'] }) + assert.equal(parseReadme('=== SimplePDF Embed ===\n'), null) + assert.deepEqual(parseReadme(README.replace('= 1.2.0 =', '= 1.2.1 =')), { version: '1.2.0', entries: [] }) +}) + +test('the committed readme has entries for its Stable tag', async () => { + const readme = await readFile(new URL('../wordpress/svn/trunk/README.txt', import.meta.url), 'utf8') + const release = parseReadme(readme) + + assert.notEqual(release, null) + assert.ok(release.entries.length > 0) +}) + +test('the message links the plugin page, never pings, and lists every entry', () => { + const message = buildWordPressReleaseMessage(parseReadme(README)) + const [embed] = message.embeds + + assert.deepEqual(message.allowed_mentions, { parse: [] }) + assert.equal(embed.title, 'SimplePDF Embed for WordPress 1.2.0') + assert.equal(embed.url, 'https://wordpress.org/plugins/simplepdf-embed/') + assert.equal(embed.description, "**What's new**\n- New settings page\n- Update web-embed-pdf to 1.9.0") + assert.match(embed.fields[1].value, /\[Plugin page\]\(https:\/\/wordpress\.org\/plugins\/simplepdf-embed\/\)/) +}) diff --git a/wordpress/README.md b/wordpress/README.md index 836cc1ed..d8be165e 100644 --- a/wordpress/README.md +++ b/wordpress/README.md @@ -12,10 +12,7 @@ brew install svn svn checkout https://plugins.svn.wordpress.org/simplepdf-embed svn ``` -1. Update the version of `@simplepdf/web-embed-pdf` in [simplepdf-embed.php](./svn/trunk/simplepdf-embed.php) to the one specified in [package.json](./package.json): -``` -wp_enqueue_script('simplepdf-web-embed-pdf', $script_src, array(), '', true); -``` +1. Set `SIMPLEPDF_WEB_EMBED_VERSION` in [simplepdf-embed.php](./svn/trunk/simplepdf-embed.php) to the `@simplepdf/web-embed-pdf` version pinned in [package.json](./package.json) (CI fails on a mismatch) 2. Update the TAG / version in [simplepdf-embed.php](./svn/trunk/simplepdf-embed.php) 3. Update the TAG / version in [README.txt](./svn/trunk/README.txt) @@ -30,3 +27,5 @@ svn up svn cp trunk tags/ svn commit -m 'Tagging version ' ``` + +7. Once https://wordpress.org/plugins/simplepdf-embed/ shows the new version, announce it on Discord: run the **WordPress release** workflow (`gh workflow run wordpress-release.yaml --repo SimplePDF/simplepdf-embed`). It posts the `README.txt` changelog for the Stable tag, and refuses to post until WordPress.org serves that version. diff --git a/wordpress/package-lock.json b/wordpress/package-lock.json index f780bc82..f8e21804 100644 --- a/wordpress/package-lock.json +++ b/wordpress/package-lock.json @@ -5,14 +5,38 @@ "packages": { "": { "dependencies": { - "@simplepdf/web-embed-pdf": "^1.8.4" + "@simplepdf/web-embed-pdf": "1.9.0" + } + }, + "node_modules/@simplepdf/embed": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@simplepdf/embed/-/embed-0.7.0.tgz", + "integrity": "sha512-iKmJpBhz59MRkseZF9ElevnLHw8bH3nJWcsjJauZTapOkKD5daFAXpbkohq4/0uGmAgfSUpbQCu9woszOcGKPg==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@tanstack/ai": "^0.38.0", + "zod": "^4.0.0" + }, + "peerDependenciesMeta": { + "@tanstack/ai": { + "optional": true + }, + "zod": { + "optional": true + } } }, "node_modules/@simplepdf/web-embed-pdf": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/@simplepdf/web-embed-pdf/-/web-embed-pdf-1.8.4.tgz", - "integrity": "sha512-W7iTEMEi7fxvMEniwAY36YgY3lNtl8YEjSZFA2XcB/hlrwvgxy0tEs4JG3GS0jJE4d/NI5lcnrlu55+nzysdJg==", - "license": "MIT" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@simplepdf/web-embed-pdf/-/web-embed-pdf-1.9.0.tgz", + "integrity": "sha512-FYOQnKElotHxKVCrfLs3jLpHPfjOrYu2MrhYpcCaFl6IJ8+HjrOJSqauWeoM4yooojCEWgs5e25bSEkqJlY0nA==", + "license": "MIT", + "dependencies": { + "@simplepdf/embed": "0.7.0" + } } } } diff --git a/wordpress/package.json b/wordpress/package.json index 1cac17b3..53a9cba7 100644 --- a/wordpress/package.json +++ b/wordpress/package.json @@ -1,10 +1,11 @@ { "scripts": { - "copy-src": "cp -r ./node_modules/@simplepdf/web-embed-pdf/src/* ./svn/trunk/src/", + "copy-src": "rm -rf ./svn/trunk/src && cp -r ./node_modules/@simplepdf/web-embed-pdf/src ./svn/trunk/src && rm -rf ./svn/trunk/src/__tests__", + "copy-fixtures": "mkdir -p ./tests/fixtures && cp ./node_modules/@simplepdf/web-embed-pdf/src/__tests__/fixtures/pdf-link-cases.json ./tests/fixtures/", "copy-build": "cp -r ./node_modules/@simplepdf/web-embed-pdf/dist/index.min.js ./svn/trunk/build/web-embed-pdf.js", - "package-plugin": "npm install && npm run copy-src && npm run copy-build" + "package-plugin": "npm install && npm run copy-src && npm run copy-build && npm run copy-fixtures" }, "dependencies": { - "@simplepdf/web-embed-pdf": "^1.8.4" + "@simplepdf/web-embed-pdf": "1.9.0" } } diff --git a/wordpress/svn/assets/blueprints/blueprint.json b/wordpress/svn/assets/blueprints/blueprint.json index d568ff31..3050e75a 100644 --- a/wordpress/svn/assets/blueprints/blueprint.json +++ b/wordpress/svn/assets/blueprints/blueprint.json @@ -13,7 +13,7 @@ "step": "installPlugin", "pluginZipFile": { "resource": "url", - "url": "https://downloads.wordpress.org/plugin/simplepdf-embed.1.1.3.zip" + "url": "https://downloads.wordpress.org/plugin/simplepdf-embed.1.2.0.zip" }, "options": { "activate": true diff --git a/wordpress/svn/assets/screenshot-1.png b/wordpress/svn/assets/screenshot-1.png index a37fbfc2..d9f350e0 100644 Binary files a/wordpress/svn/assets/screenshot-1.png and b/wordpress/svn/assets/screenshot-1.png differ diff --git a/wordpress/svn/assets/screenshot-2.png b/wordpress/svn/assets/screenshot-2.png index 95da5743..f8b3f20d 100644 Binary files a/wordpress/svn/assets/screenshot-2.png and b/wordpress/svn/assets/screenshot-2.png differ diff --git a/wordpress/svn/trunk/README.txt b/wordpress/svn/trunk/README.txt index 8daead70..ab7d54fd 100644 --- a/wordpress/svn/trunk/README.txt +++ b/wordpress/svn/trunk/README.txt @@ -1,96 +1,176 @@ === SimplePDF Embed === Contributors: bendersej -Tags: pdf, embed pdf, fill & sign PDF, pdf editor -Tested up to: 6.9.4 -Stable tag: 1.1.3 +Tags: pdf, pdf form, fill pdf, sign pdf, form submissions +Tested up to: 7.1.2 +Stable tag: 1.2.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Requires at least: 5.8 Requires PHP: 5.6.20 -Your visitors can fill & sign PDFs without leaving your website. +Visitors fill and sign your PDFs right on your site. With a SimplePDF account, every filled PDF comes back to you, automatically. == Description == -A lightweight plugin that automatically opens any PDF file with SimplePDF: allowing your visitors to fill and edit PDFs (merge, rotate, delete pages) without leaving your website. +You put a PDF form on your site. Visitors download it, print it, fill it, scan it and email it back, if they remember. Then you retype the answers. -== Try it out! == +SimplePDF Embed turns every PDF link on your site into a form your visitors fill and sign right on the page. Nothing to rebuild: link a PDF the way you always have. -https://wordpress.simplepdf.co/ +**Get every filled PDF back, automatically** + +With a SimplePDF account, visitors click Submit and the filled PDF lands in your dashboard. No chasing. + +* Email alerts on every submission +* Webhooks to send filled PDFs to your own systems +* Export the form data to CSV or Excel +* Required fields, so forms come back complete +* Your logo in the editor (Pro and above) +* Filled PDFs saved to your own storage (S3 or Azure Blob Storage on Pro, SharePoint on Premium) + +Every plan starts with a 7-day free trial: [see the plans](https://simplepdf.com/pricing?ref=wordpress). + +**Free, without an account** + +Visitors fill and sign your PDFs, then download them. The document is filled in their browser. + +**Works the way your site already works** + +* Every PDF link opens in SimplePDF by default, whatever the extension case (`Consent.PDF`) or query string (`form.pdf?ver=2`) +* Or limit it to the pages and posts you pick, and try it on a draft before going live +* The settings page lists the PDF links on your pages and posts, and where each one opens +* Add the `exclude-simplepdf` class to a link to keep the browser's own PDF viewer +* Visitors who browse with an AI assistant (ChatGPT's browser, Chrome with WebMCP) can ask it to fill the form for them, and check every answer before they submit. One checkbox turns it off. + +**The settings page** + +See every PDF link on your pages and posts, and where each one opens: + +![The PDF links on your site and where each one opens](https://cdn.simplepdf.com/simple-pdf/assets/wordpress/plugin-settings-pdf-links.png) + +Try it on one page before going live, and choose whether AI assistants can fill your forms: + +![Where it runs: everywhere, or only on the pages and posts you pick](https://cdn.simplepdf.com/simple-pdf/assets/wordpress/plugin-settings-where-it-runs-and-ai-assistants.png) + +See what an account adds before you sign up: -== Features == -- Any .pdf link on your website is automatically opened with SimplePDF -- Add text, checkboxes, pictures, signatures to PDFs -- Fill fillable form -- Add, delete, rotate, merge PDFs -- Download the resulting PDF -- Works on all browsers and mobile devices -- Works with both Gutenber and the classic editor -- Fully responsive +![Today versus with a SimplePDF account](https://cdn.simplepdf.com/simple-pdf/assets/wordpress/plugin-settings-account-before-after.png) + +**What visitors can do in the editor** + +* Fill fillable forms, or add text, checkboxes, pictures and signatures to any PDF +* Add, delete, rotate and merge pages +* Works on desktop and mobile, in every modern browser +* Works with the block editor and the classic editor + +== Try it out == + +https://wordpress.simplepdf.co/ == Screenshots == -1. SimplePDF Embed -2. Admin settings of SimplePDF Embed -3. Adding a PDF link using the Gutenber editor +1. Filled PDFs land in your SimplePDF dashboard +2. The settings page: the PDF links on your site and where each one opens +3. Adding a PDF link using the block editor 4. Adding a PDF link using the classic editor -5. The PDF is opened on top of the existing website +5. The PDF opens on top of your page == Installation == -This section describes how to install the plugin and get it working. +1. Install the plugin from Plugins > Add New, or upload the zip file to `wp-content/plugins/`. +2. Activate it from the Plugins menu. +3. Go to Settings > SimplePDF Embed: it lists the PDF links on your site and where each one opens. +4. Optional: to get the filled PDFs back, enter your company identifier (for `acme.simplepdf.com`, enter `acme`). -e.g. +== Frequently Asked Questions == -1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the wp-content/plugins/ directory of your WordPress installation. -2. Activate the plugin through the ‘Plugins’ menu in WordPress. -3. Optional: Go to Settings > SimplePDF Embed and enter your "Company Identifier" (requires a SimplePDF account) -4. Now any PDF links in your wordpress pages are opened using SimplePDF (you can disable this behaviour in the settings: see 3.) += What changes with a SimplePDF account? = -== Frequently Asked Questions == -= I have installed the plugin: what should I do next? = +Without an account, visitors fill your PDF and download it. It is then up to them to send it to you. + +With an account, they click Submit and the filled PDF lands in your dashboard, with an email alert or a webhook if you want one. You can export the answers to CSV or Excel, make fields required, and add your logo. [See the plans](https://simplepdf.com/pricing?ref=wordpress). + += Where do the filled PDFs go? = + +Without an account, the visitor downloads the filled PDF: it is not sent to SimplePDF. + +With an account, submitted PDFs are stored in your SimplePDF dashboard, or in your own storage (S3, Azure Blob Storage or SharePoint) on the plans that include it. + += Do I need a SimplePDF account? = + +No. Visitors can fill, sign and download PDFs without one. An account is what brings the filled PDFs back to you. -All the existing PDF files will now open with SimplePDF. += Can I try it on one page first? = -If you wish to add new PDFs to your website, simply upload them to your Wordpress, copy the link and add it as a link to any page or paragraph in your wordpress. +Yes. In Settings > SimplePDF Embed, set "Where it runs" to "Only on pages and posts I pick" and pick a draft or private page. Every other PDF link keeps opening in the browser. -= The PDF is not opened with SimplePDF = += I installed the plugin: what next? = -Make sure that the link ends with ".pdf". +Every PDF link on your site now opens in SimplePDF. Open Settings > SimplePDF Embed to see which pages link a PDF and where each link opens. To add a new form, upload the PDF to your Media Library and link to it from any page or post. -Example: https://wordpress.simplepdf.co/wp-content/uploads/2024/01/example_wordpress.pdf += A PDF link does not open in SimplePDF = -= Do I need a SimplePDF account to use this plugin? = +Settings > SimplePDF Embed lists the PDF links on your pages and posts, with the reason next to any link that opens in the browser. The usual causes: -No: the plugin does not require an account to work: all features are available without any account. +* The link does not point to a `.pdf` file +* The link has the `exclude-simplepdf` class +* The page is not picked in "Where it runs" -= What are the differences between using the plugin without and with a SimplePDF account? = +Links added by a page builder, a menu or a widget open the same way but are not listed. -Without an account, the plugin will open the PDF editor allowing your visitors to fill in documents and download them. += How do I keep one PDF in the browser's viewer? = -With an account, the filled in documents will be automatically transmitted to you. You can configure to receive email notifications as well as use your own logo and loading animation. +Add the `exclude-simplepdf` class to that link. -= Where should I submit my feature request or bug report? = += Can AI assistants fill my forms? = -Feel free to reach out to us at wordpress@simplepdf.com! +Yes, when a visitor browses with one (ChatGPT's browser, Chrome with WebMCP). The assistant fills the form in the editor on your page, where the visitor checks every answer, and required and read-only fields still apply. To turn it off, untick "Give AI assistants direct access to your forms" in Settings > SimplePDF Embed. Assistants that click and type like a person can still fill your forms, as on any website. + += Where do I send a feature request or a bug report? = + +Email us at wordpress@simplepdf.com. = Where can I see the code? = -Our Github repository contains both the code for the Wordpress plugin as well as the underlying @simplepdf/web-embed-pdf code upon which it relies: -- [Wordpress plugin source code](https://github.com/SimplePDF/simplepdf-embed/tree/main/wordpress) -- [@simplepdf/web-embed-pdf](https://github.com/SimplePDF/simplepdf-embed/tree/main/web) +The plugin and the script it bundles are open source: + +* [WordPress plugin](https://github.com/SimplePDF/simplepdf-embed/tree/main/wordpress) +* [@simplepdf/web-embed-pdf](https://github.com/SimplePDF/simplepdf-embed/tree/main/web) + +== External services == + +This plugin connects to SimplePDF (https://simplepdf.com) in two ways. + +**The PDF editor.** When a visitor clicks a PDF link, the plugin opens the SimplePDF editor from `https://.simplepdf.com` (`wordpress.simplepdf.com` without an account) in a frame on your page. The visitor's browser loads the PDF and hands it to the editor (or passes the PDF's address when it cannot load it), and the PDF is filled in the browser. When the visitor submits a filled PDF to your SimplePDF account, the filled PDF is sent to SimplePDF, or to your own storage if you set one up. Nothing is sent before a visitor clicks a PDF link. + +**The account check.** On the plugin's settings page only, the plugin sends one request to `https://.simplepdf.com` to check that the account exists. It sends the plugin's version and nothing about your site or your visitors, and the result is cached for up to an hour. + +* [Terms of service](https://simplepdf.com/terms-of-service) +* [Privacy policy](https://simplepdf.com/privacy-policy) == Changelog == -= 1.0.0 = -* Initial release -= 1.1.0 = -* Add support for SimplePDF form links -= 1.1.1 = -* Move to SimplePDF.com (from SimplePDF.eu) -= 1.1.2 = -* Plugin tested with the latest wordpress version (6.7.1) += 1.2.0 = +* New settings page: see every PDF link on your pages and posts, and where each one opens +* Choose where it runs: everywhere, or only on the pages and posts you pick, drafts included +* Your company identifier is checked, so a typo shows up right away +* PDF links open in SimplePDF whatever the extension case (`Consent.PDF`), query string or `#page` fragment +* AI assistants in your visitors' browser can now fill your forms (WebMCP). This is on after the update: to turn it off, untick "Give AI assistants direct access to your forms" in Settings > SimplePDF Embed +* Uninstalling the plugin removes its settings +* Update web-embed-pdf to 1.9.0 +* Plugin tested with the latest WordPress version (7.1.2) + = 1.1.3 = * Update web-embed-pdf to 1.8.4 -* Plugin tested with the latest wordpress version (6.9.4) +* Plugin tested with the latest WordPress version (6.9.4) += 1.1.2 = +* Plugin tested with the latest WordPress version (6.7.1) + += 1.1.1 = +* Move to SimplePDF.com (from SimplePDF.eu) + += 1.1.0 = +* Add support for SimplePDF form links + += 1.0.0 = +* Initial release diff --git a/wordpress/svn/trunk/assets/icon-128x128.png b/wordpress/svn/trunk/assets/icon-128x128.png new file mode 100644 index 00000000..9692f213 Binary files /dev/null and b/wordpress/svn/trunk/assets/icon-128x128.png differ diff --git a/wordpress/svn/trunk/build/web-embed-pdf.js b/wordpress/svn/trunk/build/web-embed-pdf.js index be5da99c..c1292f8b 100644 --- a/wordpress/svn/trunk/build/web-embed-pdf.js +++ b/wordpress/svn/trunk/build/web-embed-pdf.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e,n,t,o){return new(t||(t=Promise))((function(i,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function l(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}c((o=o.apply(e,n||[])).next())}))}function n(e,n){var t,o,i,r,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(l){return function(c){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(a=0)),a;)try{if(t=1,o&&(i=2&l[0]?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,o=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]\n .simplePDF_container {\n user-select: none;\n position: fixed;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n justify-content: center;\n\n height: 100vh;\n width: 100%;\n z-index: 2147483647;\n padding: 16px;\n top: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.4);\n }\n\n .simplePDF_content {\n width: 100%;\n height: 100%;\n position: relative;\n box-sizing: border-box;\n }\n\n .simplePDF_iframeContainer {\n overflow: hidden;\n background: #f1f7ff;\n border-radius: 6px;\n width: 100%;\n height: 100%;\n }\n\n .simplePDF_iframe {\n border: none;\n border-radius: 6px;\n width: 100%;\n height: 100%;\n }\n\n .simplePDF_close {\n z-index: 1;\n position: absolute;\n top: -12px;\n right: -12px;\n\n border: none;\n padding: 6px;\n border-radius: 50px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n box-shadow: 0 1px 3px rgb(0 0 0 / 10%), 0 1px 2px rgb(0 0 0 / 24%);\n\n cursor: pointer;\n background: #ff5959;\n text-shadow: 1px 1px #243889;\n }\n\n .simplePDF_close svg {\n fill: white;\n width: 14px;\n height: 14px;\n }\n\n .simplePDF_close:hover {\n box-shadow: 0 2px 4px rgb(0 0 0 / 10%), 0 4px 4px rgb(0 0 0 / 24%);\n }\n \n
\n
\n \n
\n