Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .changeset/render-image-bg-valid-svg.md

This file was deleted.

21 changes: 21 additions & 0 deletions packages/slidewise/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @textcortex/slidewise

## 1.21.1

### Patch Changes

- 94e348b: fix(render): emit a valid SVG `<image>` for image-fill backgrounds

`renderDeckToSvg` rendered a slide's image-fill background as a CSS `background`
shorthand inside an SVG `fill="…"` attribute — `fill="center / cover no-repeat
url("data:image…")"`. That is not valid SVG (a non-paint value plus nested
unescaped quotes); browsers tolerate it, but strict rasterisers
(`@resvg/resvg-js`, librsvg, batik) reject it, blocking a Chromium-free
`parsePptx → renderDeckToSvg → resvg → PNG` path.

The pptx importer stores image backgrounds as a CSS shorthand, but the
renderer's image-ref detection only inspected the _start_ of the value, so the
shorthand fell through to the `fill` path. The renderer now recognises a
`url(...)` anywhere in the value and emits a real `<image>` element
(`preserveAspectRatio` = `slice` for `cover`, `meet` for `contain`). A lock-in
test asserts every rendered slide is valid SVG a strict XML parser accepts,
with an image-background slide as the regression case.

## 1.21.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/slidewise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@textcortex/slidewise",
"version": "1.21.0",
"version": "1.21.1",
"description": "Embeddable React PPTX editor.",
"license": "MIT",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions website/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# website

## 0.0.36

### Patch Changes

- Updated dependencies [94e348b]
- @textcortex/slidewise@1.21.1

## 0.0.35

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"version": "0.0.35",
"version": "0.0.36",
"private": true,
"type": "module",
"scripts": {
Expand Down
Loading