From d710b84d1923a9e8a8bdf2107a8ca2cd0df1427c Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Fri, 29 May 2026 13:51:09 -0400 Subject: [PATCH] PPTX import Phase 0: plumbing + lazy-load shell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sets up the import-pipeline plumbing without doing any actual PPTX parsing yet. Acceptance criteria from the spec's Phase 0: - Vendor fflate (0.8.2 UMD) at src/vendor/fflate.min.js so the importer can unzip .pptx packages without a build step. fflate exposes window.fflate via the UMD shim. - Add src/pptx-importer.js exposing window.ArtstrPptxImporter with PPTX_IMAGE_PLACEHOLDER_URL, makePptxImportReport, and a stub importPptxFile that throws "not implemented yet — Phase 1 lands the deck-shell parser." Phase 1 will fill this out. - Wire loadScriptOnce + ensurePptxImporterLoaded in index.html. Both fflate and pptx-importer.js are lazy-loaded on the first click of Import PPTX so the main bundle stays lean for users who never use this path. Subsequent clicks are no-ops. - Add an Import PowerPoint (.pptx) button + hidden file input to the Deck Builder's Slides fieldset, next to the existing Import slide buttons. Click flow: button click -> ensurePptxImporterLoaded (with a "Loading…" label on the button while scripts arrive) -> hidden file input click -> change -> onPptxFileChosen -> import + report. - Add the pptxImportReportModal shell with file name, summary counts, placeholder note, and a collapsible warnings list. Render is driven by the report data shape defined in spec section 13. Close on background click or Close button. Smoke-tested via CDP: first click lazy-loads fflate + pptx-importer; subsequent calls reuse cached promises; file picker triggers; Phase 0 stub returns the expected not-implemented error which surfaces as a toast. --- src/index.html | 406 ++++++++++++++++++++++++++++++++++++--- src/pptx-importer.js | 56 ++++++ src/vendor/fflate.min.js | 1 + 3 files changed, 440 insertions(+), 23 deletions(-) create mode 100644 src/pptx-importer.js create mode 100644 src/vendor/fflate.min.js diff --git a/src/index.html b/src/index.html index 6c1da66..ed36df6 100644 --- a/src/index.html +++ b/src/index.html @@ -3038,6 +3038,10 @@ +
+ +
+

No slides yet — add one to start your deck.

Click a slide thumbnail to edit it. Drag thumbnails to reorder.

@@ -4581,6 +4585,25 @@ + +