Skip to content

chore(deps): update dependency @takumi-rs/core to v2 - #324

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/takumi-rs-core-2.x
Open

chore(deps): update dependency @takumi-rs/core to v2#324
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/takumi-rs-core-2.x

Conversation

@renovate

@renovate renovate Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
@takumi-rs/core (source) ^1.8.7^2.12.0 age confidence

Release Notes

kane50613/takumi (@​takumi-rs/core)

v2.12.0

Support the legacy page-break-* properties

Print stylesheets written for page-break-before, page-break-after, and page-break-inside had those declarations dropped. They now drive the same pagination as break-before, break-after, and break-inside, and the forced-break keywords always, left, and right are accepted alongside page.

Support table-layout: fixed and border-spacing

border-spacing was a hardcoded 2px gap with no way to change it, and table-layout did nothing. Column widths now come from the first row under table-layout: fixed and the rest of the width is shared evenly, while border-spacing sets both the gap between cells and the inset from the table's own edges. On a three-column table measured against headless Chrome, auto columns land 67px to 136px away and fixed columns land within 2px.

border-spacing starts at 0 as CSS defines it, and the HTML and JSX element presets give <table> the 2px browsers apply, so a display: table box no longer gets a gap it never asked for.

Support border-collapse: collapse

Neighbouring cells each painted their own border either side of the border-spacing gap. A collapsing table now resolves every shared line once: the wider border wins, hidden clears the line, and a row's borders reach its cells the way its background already did.

v2.11.0

Align table cell content with vertical-align

vertical-align: middle on a table cell now centers its content in the cell, and bottom pushes it to the cell's bottom edge. baseline still renders as top.

A row's element children that are not table-cell, such as a <td style="display: flex">, are now laid out in the row instead of dropped. Text sitting directly in a row is still dropped: it has no anonymous cell to go into.

Start backwards-filled step animations on the first step

An animation with animation-fill-mode: backwards or both and a positive delay held the second step during the delay when its timing function was steps(n, jump-start) or steps(n, jump-both). Samples taken before the active phase now land on the step below the jump, as the CSS easing algorithm requires.

steps() also serializes the way the spec asks: steps(4, end) and steps(4, jump-end) both print as steps(4), since an end position is the default.

Store calc() as its non-zero terms

Length shrinks from 84 to 20 bytes, and a computed style from 5.9KB to 2.3KB. A calc() expression mixing more than four distinct units now fails to parse.

Sample background-clip text at pixel centres

Text clipped to a background or mask image sampled that image at pixel corners rather than centres, blending every pixel with its neighbour. The clip is now read exactly where it should be, so a background-clip: text fill is half a pixel sharper, and drawing one is about a third faster.

Animate WebP image sources

An animated WebP used as an image source now plays through its frames, the same way an animated GIF does. Before, decoding one threw WebP encode failed and took the whole render down with it. The still-image paths, which the SVG backend and the size cache go through, fall back to the first frame instead of failing.

ImageSource::Gif is now ImageSource::Animated, and GifSource is now AnimatedSource, since both carry GIF and WebP animations. ImageError::InvalidGif is now ImageError::InvalidAnimation for the same reason.

An animated source keeps only its encoded bytes and a frame timing table. It used to hold a decoded full-size copy of the first frame as well, which also meant the first frame ignored the draw box it was scaled into.

Reuse layout styles across sizing passes

Layout runs several sizing passes over each node, and each pass rebuilt that node's layout style from scratch. Only container query units (cqw, cqh, cqmin, cqmax) can change between passes, so a style using none of them is now built once and reused. A deeply nested flex tree lays out about 36% faster.

Support the full steps() step position syntax

steps() now accepts jump-start, jump-end, jump-none, and jump-both, and the position argument is optional, so steps(4) means steps(4, jump-end). Only start and end parsed before, so a declaration like steps(4, jump-none) was dropped as invalid and the animation fell back to ease, drawing a smooth curve instead of a staircase.

Undo premultiplication in integers

Converting the finished canvas back to straight alpha now divides in integers rather than f64. Rendering any image is a few percent faster, and pixels land on the same value on every target instead of depending on the platform's float division. Semi-transparent pixels can differ by one from previous output, which is where the float landed a hair under a rounding step.

Share inherited font lists across nodes

font-family, font-variation-settings, and font-feature-settings lists are now Arc-shared, so inheriting them no longer copies the list per node.

Keep direction: ltr blocks left-to-right

Blocks with direction: ltr now keep an LTR layout when text starts with an RTL script. The bidi base direction follows direction, matching browsers.

Composite opaque effect layers without resampling them

A blur, shadow or opacity group that is fully opaque and composites normally is copied onto its parent row by row instead of going through the sampling pipeline. Such a drop shadow is about 40% faster to render, such a blur about 30%. A group with partial opacity or a blend mode is unaffected.

Keep degenerate CSS values out of layout

aspect-ratio with a zero, negative, or non-finite ratio (such as 1/0) now behaves as auto, and an infinite percentage length is clamped instead of feeding infinity into layout.

Draw animated frames without replaying the ones before them

A frame that covers the whole canvas and replaces what is under it does not depend on the frames before it, so it is now decoded on its own. Reaching the last frame of a 300-frame animation drops from 16.6ms to 0.13ms for GIF, 158ms to 0.39ms for APNG, and 97ms to 0.05ms for WebP. Frames that do blend onto their predecessors still replay, as they must.

Render list markers on the right under direction: rtl

A direction: rtl list item now places its marker at the right edge and mirrors the counter suffix, matching Chrome. RTL blocks also force the right-to-left base direction instead of inferring it from the first strong character, so their text aligns to the right regardless of content.

Draw whole-pixel images without resampling them

An image placed at a whole-pixel offset is copied row by row instead of going through the sampling pipeline. Drawing one into a node is about three times faster; clips, shadows and blurs that composite an image get a few percent.

Share custom property maps across nodes

ComputedStyle::custom_properties and registered_custom_properties are now Arc-shared, so inheriting them no longer copies the maps per node.

Animate APNG image sources

An animated PNG used as an image source now plays through its frames, the same way an animated GIF or WebP does. Before, only the default image was decoded and the render held that one frame for the whole animation, with nothing to signal the rest had been dropped. Subframes composite through the fcTL dispose and blend operations, and a default image that no fcTL claims stays out of the timeline.

Match selectors against the rules that could apply

Stylesheet rules are grouped by what their rightmost selector requires, so a node only runs the matcher against rules naming one of its classes, its id or its tag. Rendering 800 nodes against 800 rules drops from 67ms to 2.5ms; the cost now grows with the rules that could match rather than with the whole stylesheet.

v2.10.0

Update the font stack

parley 0.11.1, skrifa 0.44, and write-fonts 0.50, with the hinting-gate fork rebased so a single fontations version serves layout and subsetting.

Lay out tables on the grid algorithm

A <table> used to fall back to block layout, so cells stacked instead of forming columns. Table boxes now lower onto a grid whose column tracks are shared by every row. Header groups render first, footer groups last. colspan and rowspan span tracks, captions render on the side caption-side picks, and a row's background lands on its cells. HTML and JSX gain element presets for table, thead, tbody, tfoot, tr, td, th, and caption.

Count the pages a repeated box prints on

A page counter filled only inside a header or footer band. A footer written into the document itself, as a fixed box, printed empty hooks, so the numbers had to come from a render option standing beside the document. A repeated box now lays out again for every page it draws on, with that page's numbers, so a component can carry its own footer.

Match Blink's spacing between a bullet marker and its item

An outside bullet keeps Blink's fixed 7px gap on top of its suffix space, an inside bullet separates with 1em, and the square style draws , approximating Blink's painted size.

Drop reversed, gradient marker images, and menu/dir list counting

An <ol reversed> now counts up, a gradient list-style-image falls back to the counter style, and only ul/ol scope a list's count.

v2.9.2

Treat the synthetic HTML root as a block container

Markup written in a template literal carries whitespace either side, which parsed into text roots. The synthetic root that holds them was inline, so the leading one kept a line box and pushed the content down the page. It is a block container now, the way <body> is, and fromHtml drops the whitespace roots the way the Rust crate already did.

v2.9.1

Close the gap between two boxes on a fractional parent

A box's position snapped to the pixel grid against its parent while its size snapped against the page. A parent sitting on a fraction, such as a container padded in points, pushed the two apart and left a hairline of background between boxes that should meet.

v2.7.0

Restore JPEG, WebP and GIF decoding

takumi disables takumi-core's default features and never re-enables image decoding, so every build decoded PNG and ICO only. A WebP source failed with The image format could not be determined. image-decoding is now a takumi feature as well, on by default, and it splits into jpeg, webp and gif for a build that wants one format and not the others. The napi and wasm bindings turn it on too.

v2.6.0

Route shared codepoints to the subset that declares them

A Google Fonts subset encodes more than the unicode-range it was cut for, and the Cyrillic and Greek ones also carry the ASCII space and the Latin capitals. Selection took the first subset whose glyphs covered a character, in family-name order, so those codepoints left the Latin subset and every word split into separate runs. Subsets now rank by the range they declare, lowest first.

v2.5.5

Type render output as backed by ArrayBuffer

render and renderAnimation declared their output as Buffer / Uint8Array over ArrayBufferLike, so passing the bytes straight to new Response(...) failed to typecheck. They now declare Buffer<ArrayBuffer> / Uint8Array<ArrayBuffer>, which BodyInit accepts.

v2.5.0

Add setGlyphCacheMaxBytes

The resolved-glyph and glyph-mask caches share an 8 MiB budget that no binding exposed. cacheMaxBytes looks like the knob for it but covers a different set of caches: decoded images, SVG rasters, and parsed stylesheets.

setGlyphCacheMaxBytes sets the glyph budget. It is a module-level function rather than a Renderer option because those caches live in the module and are shared by every renderer, and the budget is read the first time a cache is used, so the call has to come before the first render.

The default suits Latin text. A CJK outline runs a few kilobytes, so 8 MiB holds on the order of a thousand of them and a page of Chinese re-rasterizes glyphs it evicted a moment earlier.

takumi-js forwards it too. That one records the budget and hands it to the backend as it loads, so it stays synchronous and cannot race the resolution.

v2.4.2

Stop copying Uint8Array font and image inputs on the native binding

Buffer inputs were already passed to render tasks as ref-counted views, but Uint8Array inputs went through a full to_vec copy first. Both now cross into the async tasks zero-copy; only bare ArrayBuffer inputs still copy.

v2.4.0

Unify decoded resources behind one budgeted cache

Decoded images had a byte budget, but each SVG kept up to 32 rasterized pixmaps outside it, and every render re-parsed its stylesheets from scratch. ImageCache is now ResourceCache: SVG sources, their rasterized pixmaps, and parsed stylesheets all weigh against the same budget as decoded images. The default budget drops from 64 MiB to 16 MiB and becomes configurable — new Renderer({ cacheMaxBytes }) in the bindings, ResourceCache::new(max_bytes) in Rust, with 0 disabling caching. SVG rasters and parsed stylesheets now also survive across renders, so a server re-rendering the same template stops re-rasterizing and re-parsing per request. Rust callers: RenderOptions.stylesheet is now Arc<StyleSheet>; pass sheet.into().

Return an error for viewports too large to allocate

A viewport whose pixel buffer overflowed the backing allocation used to fall back to a 1x1 canvas, so the render produced a valid-looking but wrong tiny image with no error. The root canvas is now built through a fallible path that surfaces the allocation failure as an InvalidViewport error instead. Internal offscreen canvases keep their bounded sizes and are unaffected.

Blend animated WebP frames by default on the native binding

AnimatedWebpOptions::builder() left blend and dispose unset, so they fell back to false while the type's Default and the wasm backend use blend: true. Native animated WebP now alpha-blends frames over prior content like wasm does, so animations with partially transparent later frames render the same on both backends. The builder defaults are pinned to the Default values.

Convert native panics into catchable errors instead of aborting the process

The published napi artifacts are now built with unwind panics, so a Rust panic reached through malformed input surfaces as a JS error rather than killing the host process. Wasm keeps abort panics by design.

v2.3.0

Accept raw RGBA pixels as an image source

An image node's src takes { width, height, data, premultiplied? } and renders the pixels without decoding; the Bitmap JSX helper wraps it as an <img>.

v2.2.0

Extend the built-in Geist to weight 300

The embedded last-resort font covers wght 300..800 and trims unused stylistic sets, ending up slightly smaller than before.

Claim generic font families from the JS font API

Font descriptors accept generic (e.g. "monospace"), so stacks like Tailwind's font-mono resolve to registered fonts without naming the family.

v2.0.2

Accept a promise in the fonts option

fonts now takes Promise<FontLoader[]> as well as the plain list, so
googleFonts results pass straight through without await.

Extend the embedded font weight axis to 800

The embedded last-resort Geist subset now covers weights 400 to 800.

v2.0.0

Make the embedded font a true last resort

Both bindings now embed one font: a Latin Geist subset with a 400 to 700
weight axis (Geist Mono and Manrope are gone). It no longer claims the
sans-serif generic family and always sorts after registered fonts in
fallback selection, so generic families and unstyled text resolve to the fonts
you load. The new FontResource::last_resort marks a font's families to sort
after every normal registration.

Cap animation frame rate per format

Browsers clamp any animation frame of 10ms or less to 100ms, so a high frame
rate stalls instead of playing fast. write_animation now rejects a frame rate
above AnimationFormat::max_fps with the new AnimationFrameRateTooHigh error:
90 fps for WebP and APNG, 50 fps for GIF (centisecond delays). The napi and WASM
renderAnimation bindings surface the error.

Apply structured keyframes in renderAnimation

renderAnimation accepted a keyframes option but never registered it, so
structured keyframes animated with render yet stayed static in animations. It
now extends the stylesheet with them like the other entry points.

Fix buffer pool bucket capacity invariant

Release now buckets a buffer by the floor power of two its capacity guarantees,
and acquire_dirty reserves before set_len. A pooled buffer can no longer be
lengthened past its allocation.

Skip mask copies and per-pixel mask lookups in canvas fast paths

Borrow the combined constraint mask directly when it already matches the
canvas viewport instead of copying it per draw, and hoist mask lookups out of
the per-pixel blit loops. Output is unchanged.

Make subset-group font selection deterministic

Subsets registered under one logical family (via FontResource::subset_of) were kept
in registration order. Callers commonly register fonts concurrently, so that order — and
therefore which subset won for a codepoint covered by more than one (e.g. overlapping
weight subsets, where the loser is faux-bolded) — varied per process. Identical input
could render to different bytes run to run.

Subsets are now held in a BTreeSet, ordered by their family name, so expansion and
selection no longer depend on registration timing. Same input renders identically.

Shrink the published binaries

Size-optimize the layout and shaping crates that never run per pixel, cutting
the published WASM and native binary size.

Share the renderer facade between the napi and wasm bindings

The napi and wasm Renderer wrappers now build on a shared prepareRenderInput
helper in @takumi-rs/helpers/renderer, so their option types and render bodies
live in one place. Both backends check signal before and after resolving
fonts and images: on native, an already-aborted signal now throws before any
resource fetch.

Fix gradient stop snapping panic for oversized stop lists

Gradients with more color stops than the LUT can hold no longer panic. The
sample-index clamp and normalization passes stay within LUT bounds.

Reuse per-scene state across animation frames

Compute each scene's font snapshot once and share its image and stylesheet
handles across frames instead of re-snapshotting and deep-cloning the whole
option tree per frame. Frame output is unchanged.

Remove encodeFrames

Renderer.encodeFrames and its EncodeFramesOptions / AnimationFrameSource
types are gone. renderAnimation covers scene-based animation; pre-rendered
frame encoding had no callers.

Replace fetchResources/extractResourceUrls with prepareImages

@takumi-rs/helpers exports prepareImages({ node, sources?, fetchCache?, fetch?, timeout? }),
which collects a node tree's remote images and fetches the ones not already supplied. Pass a
fetchCache (a Map<string, Promise<ArrayBuffer>>, or any Map-like store) to coalesce
concurrent fetches of the same URL and reuse the bytes across renders; a failed fetch is
evicted so a later call retries.

The extractResourceUrls and fetchResources helpers are removed. The images render option
takes the same group form: { sources, fetchCache, fetch, timeout }.

Stream animation frames straight into the encoder

Add write_animation, which renders a timeline and feeds each frame to the
encoder as it arrives, holding one raw frame at a time instead of the whole
sequence. Both the napi and WASM renderAnimation bindings use it, so a high
frame rate or a long duration no longer exhausts memory. On native the WebP
encoder still runs frames in parallel, now over bounded chunks. The WASM WebP
encoder now merges runs of identical frames like the native one, so a static or
slow animation encodes and stores far less. The eager render_animation +
write_animated_* path stays for callers that want every frame at once.

Guard shadow and blur buffer sizing against overflow

Extreme blur radii could overflow the u32 shadow-buffer area and panic or
over-allocate. Sizing now uses saturating math and skips shadows above a 256
Mi-pixel budget.

Type keyframe declarations with csstype instead of DOM's CSSStyleDeclaration

KeyframesMap and KeyframeRule typed each keyframe's declarations as
Record<string, CSSStyleDeclaration>, requiring every CSS property on a single
offset and needing the DOM lib. Declarations are now typed with csstype's
Properties, an optional peer dependency, so a single offset only needs the
properties it sets and consumers without the DOM lib still typecheck.

Accept a bare URL string in fonts

fonts entries can now be a URL string, e.g. fonts: ["https://example.com/Inter.woff2"].
The bytes are fetched on demand and keyed by the URL; family name, weight, and style come
from the font file. The object form stays for overriding those. Adds fontFromUrl to
@takumi-rs/helpers.

Cap image decode dimensions and GIF frame volume

Decoders reject images beyond 8192x8192 (via image::Limits for PNG and JPEG,
dimension checks for WebP) and GIFs beyond a total-frame pixel budget, stopping
decode-bomb OOM.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "on Monday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 9b52972 to e97fd05 Compare July 13, 2026 16:58
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from e97fd05 to 762ef90 Compare July 14, 2026 16:08
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 762ef90 to a10a1e3 Compare July 15, 2026 12:50
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from a10a1e3 to fa05e7c Compare July 17, 2026 08:55
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from fa05e7c to 80c5fd6 Compare July 17, 2026 10:25
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 80c5fd6 to 28c4864 Compare July 17, 2026 22:09
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 28c4864 to 112e731 Compare July 18, 2026 16:32
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 112e731 to 28d68b9 Compare July 20, 2026 20:00
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 28d68b9 to c4dabaf Compare July 21, 2026 11:34
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from c4dabaf to f73a0ef Compare July 21, 2026 23:15
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from f73a0ef to bc71e7f Compare July 23, 2026 11:04
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from bc71e7f to 5d096c1 Compare July 24, 2026 20:41
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 5d096c1 to 2c3ae19 Compare July 26, 2026 16:51
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 2c3ae19 to 20ca2b3 Compare July 27, 2026 09:38
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 20ca2b3 to d0f4b70 Compare July 28, 2026 18:43
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 7d3848b to c1e5920 Compare August 5, 2026 11:26
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from c1e5920 to d56ae8c Compare August 6, 2026 05:32
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from d56ae8c to b0894e9 Compare August 6, 2026 17:55
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from b0894e9 to e8ecf7e Compare August 7, 2026 11:16
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from e8ecf7e to 18b3bf6 Compare August 8, 2026 09:06
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 18b3bf6 to daad396 Compare August 10, 2026 13:50
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from daad396 to 5047a37 Compare August 10, 2026 17:05
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 5047a37 to 4ae32e0 Compare August 11, 2026 00:50
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 4ae32e0 to 713130d Compare August 11, 2026 21:48
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 713130d to c6996f8 Compare August 13, 2026 12:18
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from c6996f8 to a4707bd Compare August 14, 2026 17:18
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from a4707bd to ed2451c Compare August 15, 2026 04:45
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from ed2451c to 4ea0388 Compare August 15, 2026 08:57
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from 4ea0388 to d37cc09 Compare August 15, 2026 12:24
@renovate
renovate Bot force-pushed the renovate/takumi-rs-core-2.x branch from d37cc09 to 520eb8e Compare August 15, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants