Repository navigation
Export actually exports: PDF by printing, PPTX as native objects - #17
Merged
Merged
Conversation
… objects
The button was dead. downloadExport still called the hosted product's
${SL_API}/v1/sl/decks/{id}/export.{kind}, and SL_API stopped existing when the
app was ported — so the click threw ReferenceError on the first line of the
try and the catch turned it into console.error. A silent no-op, and there is no
export service in this deployment for it to have called anyway.
PDF prints #/print. That is not a compromise: it renders through the SAME
components the canvas uses, so text stays selectable vector and charts stay
vector (the chart element already renders SVG). Every library that could
produce a file instead rasterises the slide, costs 120-240KB gzipped, and
looks worse. The honest cost is that it opens the system print dialog — we
cannot name the file or choose the destination — so the menu says
"Print to PDF…", not "download", and the print bar says to keep Margins on
Default because Chrome only honours @page size while it is.
The print surface waits on a condition derived from the deck (how many SVG
roots and highlighted blocks it MUST produce) rather than a fixed timer, and
if they never arrive it does NOT print — it says how many are missing and
offers Print anyway. A timer here either prints empty chart boxes or makes
everyone wait for the slowest imaginable deck.
PPTX maps the deck to native, editable PowerPoint objects: text boxes,
autoshapes, tables. Only what PowerPoint genuinely cannot express — charts,
diagrams, SVG embeds — becomes an image, and the person is told exactly which
and how many. pptxgenjs is imported by that module alone, so it is a lazy
364KB chunk and the entry is unchanged: verified, zero occurrences of
PptxGenJS or echarts in the entry bundle.
Role defaults come from reifyui's exported ROLE_STYLE (0.4.2) rather than a
copy, because a second copy of that table is the divergence this project has
already had to delete once.
Also: highlight.js had no theme loaded at all, so every code element rendered
dark-on-dark — on screen today, and into every PDF.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DCjqvx3L4VKAPnFaPe7YJ
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.
The button was dead — it called the hosted product's endpoint via
SL_API, which stopped existing when the app was ported, so the click threwReferenceErrorand the catch swallowed it.PDF prints
#/print, which renders through the same components as the canvas: selectable vector text, vector charts, zero bytes of dependency. It waits on a condition derived from the deck rather than a timer, and refuses to print if elements are still missing. Honest cost: it is the system print dialog, so the label says "Print to PDF…".PPTX maps to native editable text boxes, shapes and tables; only charts/diagrams/SVG embeds rasterise, and the counts are reported.
pptxgenjsis a lazy chunk — entry bundle unchanged (verified: zeroPptxGenJS/echartsoccurrences in the entry).Role defaults now come from
reifyui@0.4.2's exportedROLE_STYLEinstead of a second copy.🤖 Generated with Claude Code
https://claude.ai/code/session_013DCjqvx3L4VKAPnFaPe7YJ