Skip to content

v0.13.0

Latest

Choose a tag to compare

@github-actions github-actions released this 11 Aug 12:38
· 20 commits to master since this release
fd28583

The release that makes PDFs look like PDFs. A page is drawn on paper now, embedded images render, and there's a light theme to view it all in.

Pages are drawn on paper

A PDF page renders on a bounded white sheet, the way Acrobat and Preview show it.

Before, page content sat directly on the dark canvas. A typical print file only looked right because its artwork carried its own white background — a vector-only or transparent-background file, like a dieline, rendered against near-black, and soft-mask fades dissolved into the viewer chrome instead of fading into paper.

The sheet follows the page's CropBox, which is the finished page a file declares when it's been imposed on oversized media. Zoom-to-fit frames the page rather than the ink on it, so a logo in the corner of an A4 sheet now opens showing the sheet instead of the corner.

Trim and bleed guides

The two boxes a print operator actually works to — where the knife falls, and how far artwork must run past it — now draw as dashed guides on the sheet.

They stay one pixel wide at every zoom level. A guide that thickened as you zoomed in would compete with the linework it exists to measure.

A light theme

The whole viewer switches between dark and light: a toggle in the demo, a theme-mode attribute on the embeddable components.

It's a real second palette rather than an inverted one. Every text pairing clears WCAG AA on all three surfaces text can land on — panel, canvas, and paper.

CAD colours don't survive a light background on their own. The default AutoCAD palette was designed for a black screen, and its yellow sits at 1.3:1 against a light canvas — effectively invisible. Pen colours are now darkened just enough to stay readable while keeping their hue, and the default pen resolves to ink black, the way every CAD tool renders it.

PDF colours are never touched. A dieline authored in 100% cyan renders as 100% cyan in either theme. A DXF pen colour is a display convention; PDF colour is ink, and the two are treated differently on purpose.

Images inside PDFs

PDFs with embedded raster images — scanned drawings, photographic artwork under a dieline — now render them, decoding Flate and baseline JPEG.

Spot colours resolve to their real ink values instead of washing out to white, and images sit correctly beneath the vector linework drawn over them. Hover highlights and selection outlines draw above artwork rather than disappearing behind it.

Content is also clipped to the clipping paths a file declares, so artwork no longer spills past where the file says it should stop.

Multi-page drawings

Entity counts and the layer list now describe the page or sheet you're looking at, rather than the whole document — page 3 no longer shows page 1's figures. A page that draws nothing explains itself instead of leaving a silent blank canvas.

Demo

  • A drawing URL in the query string (?src=…) raises a confirmation prompt naming the file and the site it would come from, instead of being silently ignored.
  • Popovers and panels dismiss consistently on Escape.
  • Analytics run behind a consent banner.

For developers

All additions — nothing was removed from any published export, so upgrading from 0.12.0 needs no code changes.

@aspicio/core

  • PageGeometry on spaces, with spacePage(doc, name) to read it — a space either declares paper or it doesn't.
  • Viewer options: sheet, sheetEdge, select, selectOnSheet, legibleOn, ink.
  • setCanvasColors() re-colours a live viewer without recreating it, for theme switching.
  • Colour helpers: contrastRatio, relativeLuminance, darkenForLegibility.
  • IMAGE entities carrying decoded raster images, on every surface.

@aspicio/elements, @aspicio/react, @aspicio/vue, @aspicio/svelte

  • theme-mode / themeMode: "dark" (default) or "light".
  • aspicioLightTokens and aspicioCanvasColors alongside the existing aspicioTokens.

Canvas colours that the renderer needs as numbers (paper, sheet edge, selection) live in aspicioCanvasColors; CSS custom properties cover the chrome. They can't be interchanged — the sheet is WebGL geometry, not a DOM surface.


What's Changed

  • Fix the Dependabot config that has never run by @korya in #154
  • Move CI actions off the deprecated Node 20 runtime by @korya in #155
  • Add GA4 to the demo behind a Consent Mode v2 banner by @korya in #159
  • chore(deps): Bump the minor-and-patch group with 11 updates by @dependabot[bot] in #156
  • chore(deps-dev): Bump bumpp from 11.1.0 to 12.1.1 by @dependabot[bot] in #157
  • chore(deps-dev): Bump typescript from 6.0.3 to 7.0.2 by @dependabot[bot] in #158
  • fix(core): Resolve PDF colour spaces so spot colours keep their ink colours by @korya in #160
  • Draw PDF raster images: IMAGE entities on every surface (PDF-9) by @korya in #167
  • feat(demo): Explain a load that draws nothing (DEMO-20) by @korya in #168
  • chore(ci): Bump actions/checkout from 5 to 7 by @dependabot[bot] in #179
  • chore(ci): Bump actions/setup-node from 5 to 7 by @dependabot[bot] in #180
  • chore(ci): Bump actions/cache from 5 to 6 by @dependabot[bot] in #182
  • fix(demo): Dismiss transient surfaces on Escape and when modals open by @korya in #183
  • Draw hover and selection overlays above raster images by @korya in #184
  • Scope entity counts to a space, not a document by @korya in #186
  • chore(deps): Bump the minor-and-patch group across 1 directory with 5 updates by @dependabot[bot] in #185
  • Draw PDF pages on paper, with a light theme and page guides by @korya in #195
  • Crop PDF content to clipping paths and form /BBox by @korya in #196
  • Make light-canvas linework and selection actually legible by @korya in #197
  • Confirm a query-string source instead of ignoring it by @korya in #200
  • chore(release): 0.13.0 by @korya in #202

New Contributors

Full Changelog: v0.12.0...v0.13.0