beautiful-image 0.1.6 → 0.1.7

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.
package/README.md CHANGED
@@ -24,11 +24,10 @@ npm i beautiful-image
24
24
 
25
25
  ## Usage
26
26
 
27
- ```javascript
28
- import init, { optimizeImage, ResizeMode } from "beautiful-image";
27
+ Works with any modern bundler (Vite, Webpack, Rollup) and framework (React, Vue, Angular, Svelte).
29
28
 
30
- // Initialize WASM (call once at app startup)
31
- await init();
29
+ ```javascript
30
+ import { optimizeImage, ResizeMode } from "beautiful-image";
32
31
  ```
33
32
 
34
33
  ### API
@@ -48,10 +47,7 @@ optimizeImage(bytes, width, quality, mode)
48
47
  ### Examples
49
48
 
50
49
  ```javascript
51
- import init, { optimizeImage, ResizeMode } from "beautiful-image";
52
-
53
- // Initialize WASM
54
- await init();
50
+ import { optimizeImage, ResizeMode } from "beautiful-image";
55
51
 
56
52
  // Get image bytes from a file input
57
53
  const file = document.getElementById('upload').files[0];
@@ -78,7 +74,7 @@ If you want to build the package yourself:
78
74
 
79
75
  ```bash
80
76
  cargo install wasm-pack
81
- wasm-pack build --target web
77
+ wasm-pack build --target bundler --release
82
78
  ```
83
79
 
84
80
  ## License
@@ -85,10 +85,6 @@ export function __wbg___wbindgen_throw_dd24417ed36fc46e(arg0, arg1) {
85
85
  throw new Error(getStringFromWasm0(arg0, arg1));
86
86
  };
87
87
 
88
- export function __wbg_log_15eeaabaa0fe989d(arg0, arg1) {
89
- console.log(getStringFromWasm0(arg0, arg1));
90
- };
91
-
92
88
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
93
89
  // Cast intrinsic for `Ref(String) -> Externref`.
94
90
  const ret = getStringFromWasm0(arg0, arg1);
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "beautiful-image",
3
3
  "type": "module",
4
4
  "description": "A Rust library for optimizing images for the web",
5
- "version": "0.1.6",
5
+ "version": "0.1.7",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",