Repository navigation
npm-v0.5.0
·
245 commits
to main
since this release
Added
convert-html: CSSconic-gradientis converted to vector geometry. Pie and donut charts in Claude Design decks are drawn as aconic-gradienton aborder-radius: 50%element — there is no SVG to extract. Previously the layer was skipped, and because such elements usually have a transparentbackground-color, nothing at all was emitted for them: the chart vanished silently. Cones are now emitted as wedge paths and routed through the SVG pipeline, so each slice becomes a selectable Figma VECTOR node with crisp edges at any zoom. Hard stops produce one exact wedge per segment; genuine colour ramps are subdivided. Handlesfrom <angle>,at <position>, and stop positions in%,deg,turn,rad, andgrad.convert-html: unsupportedbackground-imagefunctions now warn. Previously any layer that was notlinear-gradient,radial-gradient, orurl()was dropped without a word, so a missing visual looked like a clean conversion.
Fixed
- SVG element and group transforms are applied instead of discarded. The shape parser never read
transformattributes and did not descend into<g>at all, so geometry under<g transform="translate(...)">or a per-pathmatrix(...)collapsed toward the SVG origin — icons rendered mangled, or disappeared. Enclosing group transforms are now recovered and composed with each element's own transform, then baked into the shape's coordinates. Affects every.deckand.figconversion that vectorizes SVG. convert-html: slides are measured at true 1920×1080 scale. A standalone whose viewer renders the slide inside a scaling stage (fitting it beside presenter chrome) yielded geometry at roughly 90% of true size — every coordinate uniformly wrong, with the error growing away from the origin. The converter now grows the measurement viewport until the slide reports its own CSS size 1:1.convert-html: fonts bundled in the export now load. Asset URLs were rewritten for<img>elements only, never for@font-facerules, so every bundled face failed to load and Chromium silently substituted. Text was measured in the wrong typeface, producing subtly wrong wrap points and box heights.
Changed
convert-htmlloads the standalone as authored rather than replaying its tweak state. 0.4.7 reproduced the export's runtime in Node — thequoteStyle/dividerBg/ icon-visibility mapping and the--t-icon-*variables. That mapping was written against one deck's markup and encoded its class names and section titles, so it did not generalise. The converter now runs the page's own runtime, which applies the same tweaks in the page's own vocabulary, and the hardcoded replay is gone. The saved tweak state is still honoured;__bundler/ext_resourcesand__bundler/page_orderare now handled too, as a side effect of letting the page rehydrate itself.
npm install -g openfig-cli