fix(pdf): bundle the branding assets into the app (no fetch at export), export returns its warnings and the editor reports missing elements

This commit is contained in:
bchanot committed 2026-10-11 16:09:39 +02:00
1 parent 80e95ca61d
commit 293a6e0b36
22 files changed
+199 -185

No files matched your search

+3 -3
View File
@@ -33,7 +33,7 @@ import { addLinkAnnotation } from '../src/render/linkAnnotation'
import { parseSvg, serializeSvg } from '../src/svg/parse'
import { sanitizeSvgRoot } from '../src/svg/sanitize'
import { rasterSizeOf } from '../src/svg/view'
import { DRAFT_DIR, PUBLIC_DIR } from './helpers/draft'
import { BRAND_ASSETS_DIR, DRAFT_DIR, PUBLIC_DIR } from './helpers/draft'
import {
FIXED_EXPORTED_AT,
logosBranding,
@@ -391,10 +391,10 @@ describe('hostile SVG assets', () => {
expect(sizes[0]).toEqual({ widthPx: 1200, heightPx: 2400 })
})
it('horse.svg and Paws_in_harmony.svg pass with nothing removed and an identical serialisation', () => {
it('horse.svg and paws-in-harmony.svg pass with nothing removed and an identical serialisation', () => {
for (const file of [
resolve(DRAFT_DIR, 'assets/horse.svg'),
resolve(PUBLIC_DIR, 'Paws_in_harmony.svg'),
resolve(BRAND_ASSETS_DIR, 'paws-in-harmony.svg'),
]) {
const text = readFileSync(file, 'utf8')
const pristine = serializeSvg(parseSvg(text))