chore(deps): update dependency @takumi-rs/core to v2#242
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
renovate
Bot
force-pushed
the
renovate/takumi-rs-core-2.x
branch
4 times, most recently
from
July 19, 2026 16:11
4e11da8 to
f4ed6ac
Compare
renovate
Bot
force-pushed
the
renovate/takumi-rs-core-2.x
branch
from
July 20, 2026 22:38
f4ed6ac to
648df25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.7.0→^2.0.0Release Notes
kane50613/takumi (@takumi-rs/core)
v2.4.0Unify 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.
ImageCacheis nowResourceCache: 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, with0disabling 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.stylesheetis nowArc<StyleSheet>; passsheet.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
InvalidViewporterror instead. Internal offscreen canvases keep their bounded sizes and are unaffected.Blend animated WebP frames by default on the native binding
AnimatedWebpOptions::builder()leftblendanddisposeunset, so they fell back tofalsewhile the type'sDefaultand the wasm backend useblend: 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 theDefaultvalues.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.0Accept raw RGBA pixels as an image source
An image node's
srctakes{ width, height, data, premultiplied? }and renders the pixels without decoding; theBitmapJSX helper wraps it as an<img>.v2.2.0Extend the built-in Geist to weight 300
The embedded last-resort font covers
wght300..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'sfont-monoresolve to registered fonts without naming the family.v2.0.2Accept a promise in the
fontsoptionfontsnow takesPromise<FontLoader[]>as well as the plain list, sogoogleFontsresults pass straight through withoutawait.Extend the embedded font weight axis to 800
The embedded last-resort Geist subset now covers weights 400 to 800.
v2.0.0Make 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-serifgeneric family and always sorts after registered fonts infallback selection, so generic families and unstyled text resolve to the fonts
you load. The new
FontResource::last_resortmarks a font's families to sortafter 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_animationnow rejects a frame rateabove
AnimationFormat::max_fpswith the newAnimationFrameRateTooHigherror:90 fps for WebP and APNG, 50 fps for GIF (centisecond delays). The napi and WASM
renderAnimationbindings surface the error.Apply structured keyframes in
renderAnimationrenderAnimationaccepted akeyframesoption but never registered it, sostructured keyframes animated with
renderyet stayed static in animations. Itnow 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_dirtyreserves beforeset_len. A pooled buffer can no longer belengthened 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 keptin 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 andselection 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
Rendererwrappers now build on a sharedprepareRenderInputhelper in
@takumi-rs/helpers/renderer, so their option types and render bodieslive in one place. Both backends check
signalbefore and after resolvingfonts 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
encodeFramesRenderer.encodeFramesand itsEncodeFramesOptions/AnimationFrameSourcetypes are gone.
renderAnimationcovers scene-based animation; pre-renderedframe encoding had no callers.
Replace
fetchResources/extractResourceUrlswithprepareImages@takumi-rs/helpersexportsprepareImages({ node, sources?, fetchCache?, fetch?, timeout? }),which collects a node tree's remote images and fetches the ones not already supplied. Pass a
fetchCache(aMap<string, Promise<ArrayBuffer>>, or anyMap-like store) to coalesceconcurrent fetches of the same URL and reuse the bytes across renders; a failed fetch is
evicted so a later call retries.
The
extractResourceUrlsandfetchResourceshelpers are removed. Theimagesrender optiontakes 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 theencoder as it arrives, holding one raw frame at a time instead of the whole
sequence. Both the napi and WASM
renderAnimationbindings use it, so a highframe 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
u32shadow-buffer area and panic orover-allocate. Sizing now uses saturating math and skips shadows above a 256
Mi-pixel budget.
Type keyframe declarations with
csstypeinstead of DOM'sCSSStyleDeclarationKeyframesMapandKeyframeRuletyped each keyframe's declarations asRecord<string, CSSStyleDeclaration>, requiring every CSS property on a singleoffset and needing the
DOMlib. Declarations are now typed withcsstype'sProperties, an optional peer dependency, so a single offset only needs theproperties it sets and consumers without the
DOMlib still typecheck.Accept a bare URL string in
fontsfontsentries 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
fontFromUrlto@takumi-rs/helpers.Cap image decode dimensions and GIF frame volume
Decoders reject images beyond 8192x8192 (via
image::Limitsfor PNG and JPEG,dimension checks for WebP) and GIFs beyond a total-frame pixel budget, stopping
decode-bomb OOM.
Configuration
📅 Schedule: (UTC)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.