Skip to content

chore(deps): bump @takumi-rs/helpers from 2.20.0 to 2.22.1 - #854

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/takumi-rs/helpers-2.22.1
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/takumi-rs/helpers-2.22.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 1, 2026

Copy link
Copy Markdown
Contributor

Bumps @takumi-rs/helpers from 2.20.0 to 2.22.1.

Release notes

Sourced from @​takumi-rs/helpers's releases.

takumi@2.22.1

  • @​takumi-rs/core@​2.22.1
  • @​takumi-rs/helpers@​2.22.1
  • @​takumi-rs/wasm@​2.22.1
  • @​takumi-rs/image-response@​2.22.1
  • takumi-js@2.22.1
  • takumi@2.22.1

takumi@2.22.0

  • @​takumi-rs/image-response@​2.22.0
  • @​takumi-rs/helpers@​2.22.0
  • @​takumi-rs/wasm@​2.22.0
  • @​takumi-rs/core@​2.22.0
  • takumi-js@2.22.0
  • takumi@2.22.0

@media (prefers-color-scheme) matches, and takumi --color-scheme dark renders the dark variant

prefers-color-scheme used to match nothing. It now matches light by default, and dark when the viewport asks for it, so a page that keeps its dark colors in a prefers-color-scheme: dark rule renders them.

takumi image email.html -o email-dark.png --width 600 --color-scheme dark
let viewport = Viewport::new((600, 400)).with_color_scheme(ColorScheme::Dark);
  • takumi image and takumi paint take --color-scheme light or dark.
  • In Rust, Viewport::with_color_scheme sets it, and ColorScheme is in the prelude. Viewport gains the color_scheme field, so a Viewport { .. } literal needs it. Viewport::new and its with_* methods need no change.
  • A rule under prefers-color-scheme: light now applies by default, as in a browser.
  • light-dark() still takes its first color.

Migration

A Viewport struct literal names the new field, unless it copies the rest with ..:

  let viewport = Viewport {
    size: (1200, 630).into(),
    font_size: 16.0,
    device_pixel_ratio: 1.0,
    media_target: MediaTarget::Screen,
    unit_reference: None,
+   color_scheme: ColorScheme::Light,
  };

takumi@2.21.0

  • @​takumi-rs/helpers@​2.21.0

... (truncated)

Changelog

Sourced from @​takumi-rs/helpers's changelog.

@​takumi-rs/helpers@​2.21.0

Reuse downloaded bytes across renders, and load Google Fonts for known text

Renderers now keep the images, @font-face files, and font URLs they download in a 32 MiB store keyed by URL, so a later render skips the download. A render that passes its own fetch skips the store, since that fetch may send credentials.

import { googleFonts } from "takumi-js/helpers";
const fonts = googleFonts({ families: ["Noto Sans JP"], text: "東京の夜景" });

  • googleFonts takes text to load one file holding just those characters.
  • A font in a render's fonts list takes cache: "none", which drops the font once the render settles. googleFonts sets it on every subset through cacheMode: "none".
  • Under the default "auto", a googleFonts subset loaded for text drops once its render settles too, since another render rarely asks for the same characters. Range subsets and other fonts stay as before.
  • CacheMode names the "auto" | "none" policy that images and fonts share. ImageCacheMode stays as a deprecated alias.

Migration

images.fetchCache is deprecated, since renders keep their downloads without it.

- await renderer.render(node, { images: { fetchCache } });
+ await renderer.render(node);

See what a renderer's cache holds

Renderer, PdfRenderer, and Painter have cacheStats(), which reports the bytes the pool holds and how lookups of each kind went.

const { memory, images } = renderer.cacheStats();
console.log(memory.current, memory.high);
console.log(images.hits, images.misses, images.evictions);

takumi-js exports cacheStats for the renderer that render and the other functions share. It returns undefined until the first render creates that renderer. In Rust, Cache::stats does the same for a Cache.

fromJsx renders what StrictMode, Suspense, and Profiler wrap

A tree wrapped in <StrictMode>, <Suspense>, or <Profiler> rendered nothing through fromJsx. So did a tree built by a JSX runtime whose fragment is not React's Fragment. These elements now render their children, as <> already did.

JSX renders React class components

A component written as a class that extends Component or PureComponent threw Class constructor cannot be invoked without 'new' when rendered. It now renders as React mounts it: defaultProps fill missing props, getDerivedStateFromProps sets the first state, and render draws the element. This covers a class wrapped in memo and a class inside an inline <svg>.

A JSX <svg> or <img> sized with "100%" or "24px" draws at that size

A JSX <svg> or <img> whose width or height was a string with a unit, such as "100%", "2em", or "24px", drew nothing. It now draws at that size, as the same markup passed as HTML does.

... (truncated)

Commits
  • 52254bd Version Packages (#2675)
  • ef9dfd3 Version Packages (#2653)
  • c57ddb6 Version Packages (#2500)
  • b138f7f Bindings: scope a render to its listed fonts and load them like its images (#...
  • 94058b5 Bindings: share one cache pool across every kind of data (#2546)
  • fe44b83 Deps: bump JS dependencies and share more versions through the catalog (#2628)
  • 84d21f8 Helpers: leave out an emoji image that fails to fetch instead of rejecting th...
  • 6321bbf Core: draw a JSX svg with a percentage width (#2567)
  • 047a45a Helpers: render the children of StrictMode, Suspense, and other symbol types ...
  • 28681cc Helpers: write JSX SVG attributes the way React DOM does (#2568)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@takumi-rs/helpers](https://github.com/kane50613/takumi/tree/HEAD/takumi-helpers) from 2.20.0 to 2.22.1.
- [Release notes](https://github.com/kane50613/takumi/releases)
- [Changelog](https://github.com/kane50613/takumi/blob/master/takumi-helpers/CHANGELOG.md)
- [Commits](https://github.com/kane50613/takumi/commits/takumi@2.22.1/takumi-helpers)

---
updated-dependencies:
- dependency-name: "@takumi-rs/helpers"
  dependency-version: 2.22.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants