Skip to content

Imposia 0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Aug 00:35
· 13 commits to main since this release

Imposia 0.5.0

Imposia 0.5.0 parses HTML with the browser's own parser, cuts layout-measurement
work on long documents, and patches two vulnerable dependencies that were
bundled into the Core browser artifact.

This release contains one breaking change. Read
the migration note
before upgrading — most applications need no code change, but warning order,
PAGE_RULE_UNSUPPORTED.sourceIndex, and Node-side prepareDocument calls can
be affected.

Security

  • postcss 8.5.26 and its transitive nanoid 3.3.18. Both are bundled into
    @imposia/core, so the exposure reached consumers rather than staying in the
    toolchain — a consumer on 0.4.1 cannot fix this through their own lockfile.
    Upgrading is the delivery path.

Breaking

  • Core parses the string domain with the browser-native parser (DOMParser,
    template fragment parsing, native serialization) instead of parse5, and
    nodeOrder became a strided document-order slot. parse5 and entities
    left the Core bundle. Warnings are now ordered by post-recovery document
    order, PAGE_RULE_UNSUPPORTED.sourceIndex takes different numeric values,
    and prepareDocument requires a DOM.

Highlights

  • Sibling runs are placed as chunks and bisected only on overflow, replacing a
    forced synchronous reflow and an inline-overflow check per node.
  • Page-crossing text splits derive rendered-line boundaries from line-box rects
    plus a verified search instead of one Range.getClientRects() call per
    grapheme. On long-paragraph fixtures, getClientRects calls fell 98.1%
    (English) and 95.9% (CJK).
  • Break-constraint capture skips the interior of atomic subtrees when the CSS
    provably contains no fragmentation-relevant declarations. A heavy-SVG fixture
    skipped 21,240 interior captures per pass.
  • Same-URL assets within one generation share a single resolver call, decode
    validation, and Blob URL, without changing per-occurrence byte accounting or
    the extension allowAsset veto.
  • Viewer no longer throws canonical page markers do not match pageCount when a
    host updates a document under load. The commit was always atomic and no stale
    generation was ever rendered; the transient between a commit landing and the
    host delivering the new PageDocument was being classified as corruption.
    Present since at least 0.4.1 and reproduced there.
  • Core · PageDocument is 60.0 KiB gzip — 43.6 KiB below the pre-0.5.0 route,
    even though this release ships three performance escape hatches beside the
    fast paths they guard.
  • The spread-cover visual gate compares structural geometry on all three engines
    instead of checked-in Chromium/Darwin PNG baselines, which always skipped in
    CI and always failed locally.

Temporary options, removed next minor

experimental.forceSequentialPlacement, experimental.forceLegacyLineEnds,
and experimental.forceFullConstraintCapture restore the implementations the
new fast paths replaced. They exist for one release so a fast path can be
disabled in the field, and they are removed in the next minor — which is why
the Core bundle carries both paths right now. If one of them is load-bearing
for your application, say so on the issue that owns its removal before that
release ships. See
the 0.x API change policy.

Install

pnpm add @imposia/react@0.5.0

Framework-neutral consumers can install the package that matches their layer:

pnpm add @imposia/core@0.5.0
pnpm add @imposia/viewer@0.5.0
pnpm add @imposia/client@0.5.0

All four packages move together. Mixing a 0.5.0 package with a 0.4.1 one is
not a supported combination.

Packages

Each attached .tgz is the package tarball submitted to npm. SHA256SUMS
records the matching GitHub Release asset checksums.