Skip to content

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

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

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

Conversation

@dependabot

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

Copy link
Copy Markdown
Contributor

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

Release notes

Sourced from @​takumi-rs/core'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/core's changelog.

@​takumi-rs/core@​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);

unregisterFont leaves the built-in Geist in place

unregisterFont now removes only the fonts you registered. Before, unregistering Geist also removed the built-in Geist, so text that no registered font covered drew nothing.

// @takumi-rs/core and @takumi-rs/wasm. Use `new Painter()` in takumi-paint and `new PdfRenderer()` in takumi-pdf.
const renderer = new Renderer();
// Before: true, and the built-in Geist is gone
// After: false, since no registered font is named Geist
renderer.unregisterFont({ name: "Geist" });

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.

... (truncated)

Commits
  • 52254bd Version Packages (#2675)
  • ef9dfd3 Version Packages (#2653)
  • c57ddb6 Version Packages (#2500)
  • 60deffd Style: list the CSS declarations a render dropped in its needs and paint tree...
  • e67cfb8 JS: rename onMissingGlyphs to loadFallbackFonts (#2639)
  • 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)
  • e80624e Core: share one Cache across renders (#2540)
  • fe44b83 Deps: bump JS dependencies and share more versions through the catalog (#2628)
  • 37a91cb Style: ignore a style value Takumi cannot read, and warn through the log (#2350)
  • 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/core](https://github.com/kane50613/takumi/tree/HEAD/takumi-napi) 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-napi/CHANGELOG.md)
- [Commits](https://github.com/kane50613/takumi/commits/takumi@2.22.1/takumi-napi)

---
updated-dependencies:
- dependency-name: "@takumi-rs/core"
  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