wasm-html-to-image 0.1.3 → 0.1.4

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.
@@ -427,14 +427,6 @@ function resetWorkerLib() {
427
427
  }
428
428
  //#endregion
429
429
  //#region src/diagnostics.ts
430
- /**
431
- * Playground-parity diagnostics (satoru-compatible shapes).
432
- *
433
- * `LogLevel` mirrors `satoru/log-level.ts` verbatim (numeric levels shared
434
- * with the WASM `set_log_level` binding). `RenderDiagnostics` mirrors
435
- * satoru's `RenderDiagnostics` so playground-style consumers can switch
436
- * imports without reshaping reports.
437
- */
438
430
  /** Log severity, shared with the WASM `set_log_level` binding. */
439
431
  let LogLevel = /* @__PURE__ */ function(LogLevel) {
440
432
  LogLevel[LogLevel["None"] = 0] = "None";
package/llms.txt CHANGED
@@ -49,7 +49,7 @@ const result = await render({
49
49
  <h1 style="margin: 0; font-size: 24px;">Hello World</h1>
50
50
  </div>`,
51
51
  width: 800,
52
- format: "png", // 'png' | 'jpeg' | 'webp' | 'avif' | 'svg' | 'pdf' | 'raw' | 'thumbhash'
52
+ format: "png", // 'png' | 'jpeg' | 'webp' | 'avif' | 'jxl' | 'svg' | 'pdf' | 'raw' | 'thumbhash'
53
53
  });
54
54
 
55
55
  console.log(result.data); // Uint8Array (or string for format: 'svg')
@@ -189,7 +189,7 @@ app.get("/ogp", async (req, res) => {
189
189
  | `url` | `string` | - | Remote URL to fetch and render (alternative to `value`) |
190
190
  | `width` | `number` | `800` | Target viewport / output width in pixels |
191
191
  | `height` | `number` | auto / content | Target viewport / output height in pixels |
192
- | `format` | `string` | `"png"` | Output format: `"png"`, `"jpeg"`, `"webp"`, `"avif"`, `"svg"`, `"pdf"`, `"raw"`, `"thumbhash"`, `"none"` |
192
+ | `format` | `string` | `"png"` | Output format: `"png"`, `"jpeg"`, `"webp"`, `"avif"`, `"jxl"`, `"svg"`, `"pdf"`, `"raw"`, `"thumbhash"`, `"none"` |
193
193
  | `quality` | `number` | `85` | Compression quality (0-100) for JPEG, WebP, and AVIF |
194
194
  | `speed` | `number` | `6` | CPU effort/speed (0=best quality/slowest, 10=fastest) for AVIF |
195
195
  | `scale` | `number` | `1.0` | Device pixel ratio / render scaling factor |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wasm-html-to-image",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "HTML to image converter on a single unified WASM module",
5
5
  "type": "module",
6
6
  "main": "./dist/single.js",
@@ -29,6 +29,8 @@
29
29
  "screenshot",
30
30
  "ogp",
31
31
  "avif",
32
+ "jxl",
33
+ "jpeg-xl",
32
34
  "webp",
33
35
  "pdf",
34
36
  "thumbhash",
@@ -38,12 +40,6 @@
38
40
  "engines": {
39
41
  "node": ">=20.0.0"
40
42
  },
41
- "scripts": {
42
- "build": "tsc -b && node scripts/compress-wasm.mjs && rolldown -c rolldown.config.js",
43
- "prepublishOnly": "npm run build",
44
- "test": "vitest run",
45
- "example:cli": "tsx src/cli.ts --help"
46
- },
47
43
  "exports": {
48
44
  ".": {
49
45
  "workerd": {
@@ -164,5 +160,10 @@
164
160
  "tsx": "^4.23.13",
165
161
  "typescript": "^7.0.2",
166
162
  "vitest": "^5.0.0"
163
+ },
164
+ "scripts": {
165
+ "build": "tsc -b && node scripts/compress-wasm.mjs && rolldown -c rolldown.config.js",
166
+ "test": "vitest run",
167
+ "example:cli": "tsx src/cli.ts --help"
167
168
  }
168
- }
169
+ }