import { PptxSlide } from 'pptx-viewer-core'; import { CanvasSize, PrintSettings } from 'pptx-viewer-shared'; import { RasterizeSlide } from './export-controller.svelte'; /** * Print flow: assemble the shared print document (slides / notes / handouts / * outline) and hand it to a print surface. All the pure logic is shared and * DOMPurify-hardened: `validatePrintSettings` normalises the caller's partial * settings, `computeSlideIndices` / `computeColorFilter` resolve the range and * colour mode, the `build*Html` helpers produce the escaped body markup, and * `buildPrintHtmlDocument` sanitises + assembles the final document. This * module (the Svelte counterpart of Vue's `usePrint`) exports direct slide * pages as vector SVG, rasterises notes/handout thumbnails, and opens the * print surface. * * **Print surface / popup-blocker caveats:** the default opener renders the * document into a hidden same-origin `