Skip to content

Releases: kane50613/takumi

takumi@2.10.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 12:54
e9ea593
  • @takumi-rs/image-response@2.10.0
  • @takumi-rs/core@2.10.0
  • @takumi-rs/helpers@2.10.0
  • @takumi-rs/wasm@2.10.0
  • takumi-js@2.10.0
  • takumi@2.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.

Render HTML and CSS list markers in PDF

Paint generated list markers in PDF output, including nested, paginated, and tagged (Lbl) lists. Font subsetting counts the characters the predefined marker styles generate in every backend.

takumi-pdf@0.11.1

Choose a tag to compare

@kane50613 kane50613 released this 17 Aug 15:19
6372e02

Type tw from the primitives entry

Move the tw JSX attribute augmentation into takumi-pdf/primitives, so importing only the primitives types it too.

takumi-pdf@0.11.0

Choose a tag to compare

@github-actions github-actions released this 17 Aug 12:54
e9ea593

Measure a band with the page count the cut produced

A header or footer band was measured once with three-digit stand-in counters, so a counter wider than three digits could wrap and get clipped, and a narrow band reserved margin it never used. The band now re-measures with the real page count until its height settles, up to three passes, the same way content counters already converge.

Type the bundler entries' default export

export * does not forward a default export, so the wasm init default was untyped on every bundler entry.

Add page counter primitives

PageNumber, TotalPages, and TargetPageNumber components wrap the counter class hooks, with a typed format prop for the supported @counter-style names.

Repeat a table's header rows on every page

A <thead> paints again at the top of each page its table continues onto, per css-tables-3 repeated headers; a header taller than a quarter of the page does not repeat.

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.

Render HTML and CSS list markers in PDF

Paint generated list markers in PDF output, including nested, paginated, and tagged (Lbl) lists. Font subsetting counts the characters the predefined marker styles generate in every backend.

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.

Fill a page counter in the content

A pageNumber or totalPages hook outside a band stayed empty, and nothing said why. It now takes the page its box lands on, and a hook laid out inline takes the page of the box that holds it. Numbering the content lays the document out a second time, since the page a hook sits on is only known once the content is cut into pages. A document without such a hook pays nothing.

takumi@2.9.2

Choose a tag to compare

@github-actions github-actions released this 14 Aug 19:37
4c00bf7
  • @takumi-rs/core@2.9.2
  • takumi-js@2.9.2
  • @takumi-rs/helpers@2.9.2
  • @takumi-rs/wasm@2.9.2
  • @takumi-rs/image-response@2.9.2
  • takumi@2.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.

takumi@2.9.1

Choose a tag to compare

@github-actions github-actions released this 14 Aug 16:47
ef2157e
  • @takumi-rs/image-response@2.9.1
  • takumi-js@2.9.1
  • @takumi-rs/wasm@2.9.1
  • @takumi-rs/core@2.9.1
  • @takumi-rs/helpers@2.9.1
  • takumi@2.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.

Place an inset box-shadow in the padding box

An inset box-shadow was placed against the border box instead of the padding box. On a box with a border the shadow fell at the border's position, where the opaque border covered it. The shadow is now placed against the padding box and appears just inside the border.

takumi@2.9.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 10:59
a1dfebd
  • @takumi-rs/wasm@2.9.0
  • @takumi-rs/helpers@2.9.0
  • @takumi-rs/image-response@2.9.0
  • @takumi-rs/core@2.9.0
  • takumi-js@2.9.0
  • takumi@2.9.0

Load the wasm binary in a browser bundle

Vite, webpack and Turbopack set the same export conditions for a browser build. All three resolved the Vite entry, whose ?url import only works in Vite. Each package now exports wasm-url, which resolves the binary through new URL(specifier, import.meta.url), the call Vite, webpack and Turbopack rewrite to the asset they emit. Pair it with takumi-pdf/no-init, or with the new takumi-js/wasm/no-init, which keeps the auto-init entry out of the bundle.

Pick the Node entry when webpack targets Node

A webpack build for Node resolved the Vite entry, because both environments set the module condition and it is listed first. The build then failed on that entry's ?url import, which only Vite reads. A webpack condition now routes webpack's Node target to the Node entry, and every other bundler keeps the entry it already resolved.

takumi@2.8.1

Choose a tag to compare

@github-actions github-actions released this 14 Aug 06:35
aa594da
  • @takumi-rs/wasm@2.8.1
  • @takumi-rs/helpers@2.8.1
  • @takumi-rs/core@2.8.1
  • @takumi-rs/image-response@2.8.1
  • takumi-js@2.8.1
  • takumi@2.8.1

Ship without skrifa's hinting interpreter

Every draw is unhinted, but skrifa's TrueType hinting interpreter and autohinter survived dead-code elimination through runtime branches. A patched skrifa gates them behind a hinting feature, cutting ~240KB from the wasm binaries with identical rendering.

takumi@2.8.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 06:12
fcee3bb
  • @takumi-rs/wasm@2.8.0
  • @takumi-rs/image-response@2.8.0
  • @takumi-rs/helpers@2.8.0
  • takumi-js@2.8.0
  • @takumi-rs/core@2.8.0
  • takumi@2.8.0

Find the WASM asset when Vite emits it beside the server bundle

A plain vite build --ssr with ssrEmitAssets writes the asset to assets/ under the same outDir as the server chunk. The SSR read looked next to the chunk and in a framework's client/ directory, missed both, and threw Unable to locate Takumi WASM asset for SSR.

Render fragment, memo and forwardRef children inside <svg>

Inline SVG silently dropped any child it could not map to a tag name. Fragments, memo and forwardRef components now serialize the same way React does.

Draw list markers for <ol> and <ul>

List items rendered with no bullet or number. A display: list-item box now generates a marker: list-style-type, list-style-position and list-style-image pick what it draws and where it sits, and <ol start> and <li value> set the count.

takumi-svg@0.3.19

Choose a tag to compare

@github-actions github-actions released this 14 Aug 16:47
ef2157e

Place an inset box-shadow in the padding box

An inset box-shadow was placed against the border box instead of the padding box. On a box with a border the shadow fell at the border's position, where the opaque border covered it. The shadow is now placed against the padding box and appears just inside the border.

takumi-svg@0.3.18

Choose a tag to compare

@github-actions github-actions released this 14 Aug 06:12
72ebc4e

Published takumi-svg@0.3.18.