wasm-html-to-image 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +11 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dw/wasm-html-to-image.svg)](https://www.npmjs.com/package/wasm-html-to-image)
5
5
  [![license](https://img.shields.io/npm/l/wasm-html-to-image.svg)](https://github.com/SoraKumo001/wasm-html-to-image/blob/master/LICENSE)
6
6
  [![Playground](https://img.shields.io/badge/Demo-Playground-blueviolet)](https://sorakumo001.github.io/wasm-html-to-image/master)
7
- [![Documentation](https://img.shields.io/badge/Docs-Docusaurus-blue)](https://sorakumo001.github.io/wasm-html-to-image/)
7
+ [![Documentation](https://img.shields.io/badge/Docs-Docusaurus-blue)](https://sorakumo001.github.io/wasm-html-to-image/master/docs)
8
8
 
9
9
  A high-performance, WebAssembly-powered HTML-to-image renderer and image optimization engine. It consolidates HTML rendering (**Satoru** / **Skia** / **litehtml**) and native image encoding (**WebP / AVIF / JPEG**) into a single, unified WASM binary.
10
10
 
@@ -142,17 +142,16 @@ await fs.writeFile("animation.webp", Buffer.from(animatedWebp.data));
142
142
 
143
143
  All formats return a `RenderResult<T>` object containing `.data` (`Uint8Array` or `string` for SVG) and metadata (`width`, `height`, `originalWidth`, `originalHeight`, `format`, `isAnimated`):
144
144
 
145
- | Format | `result.data` Type | HTML Input | Image Input |
146
- | ----------- | ------------------ | ---------------------------------------------- | --------------------------------------------- |
147
- | `png` | `Uint8Array` | Skia render → PNG encode | Decodes and converts to PNG |
148
- | `jpeg` | `Uint8Array` | Skia render → JPEG encode (`quality`) | Decodes and compresses JPEG |
149
- | `webp` | `Uint8Array` | Skia render → WebP encode (`quality`) | Decodes and compresses WebP |
150
- | `avif` | `Uint8Array` | Skia render → AVIF encode (`quality`, `speed`) | Decodes and compresses AVIF |
151
- | `raw` | `Uint8Array` | Uncompressed RGBA pixel bytes | Uncompressed RGBA pixel bytes |
152
- | `thumbhash` | `Uint8Array` | Computes ThumbHash from render | Computes ThumbHash from image |
153
- | `svg` | `string` | Skia vector drawing stream | Single `<image>` wrapper SVG |
154
- | `pdf` | `Uint8Array` | SkPDFDocument vector PDF | Single-page centered PDF |
155
- | `none` | `Uint8Array` | N/A (throws error) | Passthrough original bytes + extract metadata |
145
+ | Format | `result.data` Type | HTML Input | Image Input |
146
+ | ----------- | ------------------ | ---------------------------------------------- | ----------------------------- |
147
+ | `png` | `Uint8Array` | Skia render → PNG encode | Decodes and converts to PNG |
148
+ | `jpeg` | `Uint8Array` | Skia render → JPEG encode (`quality`) | Decodes and compresses JPEG |
149
+ | `webp` | `Uint8Array` | Skia render → WebP encode (`quality`) | Decodes and compresses WebP |
150
+ | `avif` | `Uint8Array` | Skia render → AVIF encode (`quality`, `speed`) | Decodes and compresses AVIF |
151
+ | `raw` | `Uint8Array` | Uncompressed RGBA pixel bytes | Uncompressed RGBA pixel bytes |
152
+ | `thumbhash` | `Uint8Array` | Computes ThumbHash from render | Computes ThumbHash from image |
153
+ | `svg` | `string` | Skia vector drawing stream | Single `<image>` wrapper SVG |
154
+ | `pdf` | `Uint8Array` | SkPDFDocument vector PDF | Single-page centered PDF |
156
155
 
157
156
  ---
158
157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wasm-html-to-image",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "HTML to image converter on a single unified WASM module",
5
5
  "type": "module",
6
6
  "main": "./dist/single.js",