Export the current slide as an image, or all main slides as one ZIP - #306
Open
lazyeo wants to merge 7 commits into
Open
Export the current slide as an image, or all main slides as one ZIP#306lazyeo wants to merge 7 commits into
lazyeo wants to merge 7 commits into
Conversation
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.
Closes #261. This also implements the workflow requested in discussion #243.
What & why
Save ▾ now includes Export slides as images…:
slide-01.png,slide-02.png, …);The implementation uses a document snapshot and the shared renderer. Export is read-only except that an active text edit is committed after the user confirms the dialog. It does not regenerate
docId, change#bento-doc, invoke save/update code, or overwrite the deck. It adds no feature dependencies.The export remains self-contained and offline. Resource preflight accepts only bounded, supported embedded static images and fonts, refuses linked or unsupported resources before mounting a render, and re-checks the selected slide immediately before rasterization. Application CSS is restricted to explicitly app-owned stylesheets, while author CSS animation, transitions, and SMIL motion are frozen at their base frame for deterministic output. Dimension, payload, decoded-pixel, and archive budgets fail closed.
Password-protected decks show an explicit warning that exported images and ZIP files are plaintext; the original encrypted
.bento.html, document identity, and model remain unchanged.Tests are split by responsibility:
file://rasterization;The compressed shipped file is 716,123 bytes versus 694,151 bytes for current upstream
main, an increase of 21,972 bytes (3.2%) with the same feature dependencies.Current browser measurements use Chrome. Safari/Firefox, the native OS save panel, and tray/WebExtension writeback are outside this PR's automated coverage.
How I verified it
npm run build:singlefromslides/node scripts/shell-gate.mjs slides/dist-single/Bento_Slides.bento.htmlscripts/test-slide-image-export.ts: 204/204scripts/test-slide-image-export-browser.ts: 66/66 in Chrome 152 viafile://scripts/test-slide-image-export-acceptance.ts: 23/23 against the shipped filescripts/test-sanitize.ts: 140/140 in Chromenode scripts/test-preview.ts: 28/28node scripts/test-export-secrets.ts: 57/57node scripts/test-offline.ts: 33/33node scripts/test-sync.ts: 45,368 checksChecklist
CLAUDE.mdand the platform/collaboration docsnpm run build:singlesucceeds fromslides/packed.tsis current