@thi.ng/blurhash 0.1.29 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-07-19T14:56:21Z
3
+ - **Last updated**: 2024-08-01T16:32:31Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/blurhash@0.2.0) (2024-08-01)
13
+
14
+ #### 🚀 Features
15
+
16
+ - support OffscreenCanvas in encodeFromCanvas function to enhance compatibility with different rendering contexts ([294b650](https://github.com/thi-ng/umbrella/commit/294b650))
17
+
12
18
  ### [0.1.11](https://github.com/thi-ng/umbrella/tree/@thi.ng/blurhash@0.1.11) (2024-02-27)
13
19
 
14
20
  #### 🩹 Bug fixes
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 189 standalone projects, maintained as part
10
+ > This is one of 198 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
@@ -88,6 +88,8 @@ Package sizes (brotli'd, pre-treeshake): ESM: 1.21 KB
88
88
  - [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
89
89
  - [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/develop/packages/math)
90
90
 
91
+ Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
92
+
91
93
  ## Usage examples
92
94
 
93
95
  One project in this repo's
package/decode.d.ts CHANGED
@@ -29,5 +29,5 @@ export declare const decode: (hash: string, width: number, height: number, contr
29
29
  * @param parent
30
30
  * @param opts
31
31
  */
32
- export declare const decodeToCanvas: (hash: string, width: number, height: number, contrast?: number, parent?: HTMLElement, opts?: Partial<Canvas2DOpts>) => HTMLCanvasElement;
32
+ export declare const decodeToCanvas: (hash: string, width: number, height: number, contrast?: number, parent?: HTMLElement, opts?: Partial<Canvas2DOpts>) => HTMLCanvasElement | OffscreenCanvas;
33
33
  //# sourceMappingURL=decode.d.ts.map
package/encode.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare const encode: (pixels: Uint32Array, width: number, height: number
18
18
  * @param detailX
19
19
  * @param detailY
20
20
  */
21
- export declare const encodeFromCanvas: (canvas: HTMLCanvasElement, detailX?: number, detailY?: number) => string;
21
+ export declare const encodeFromCanvas: (canvas: HTMLCanvasElement | OffscreenCanvas, detailX?: number, detailY?: number) => string;
22
22
  /**
23
23
  * Syntax sugar for {@link encodeFromCanvas}. Creates a canvas and draws given
24
24
  * image into it. `width` and `height` default to the actual image size, but can be
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/blurhash",
3
- "version": "0.1.29",
3
+ "version": "0.2.0",
4
4
  "description": "Fast, optimized TS implementation of the Wolt Blurhash algorithm",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,11 +36,11 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.11.6",
40
- "@thi.ng/base-n": "^2.7.18",
41
- "@thi.ng/canvas": "^0.2.23",
42
- "@thi.ng/errors": "^2.5.12",
43
- "@thi.ng/math": "^5.11.4"
39
+ "@thi.ng/api": "^8.11.7",
40
+ "@thi.ng/base-n": "^2.7.19",
41
+ "@thi.ng/canvas": "^0.3.0",
42
+ "@thi.ng/errors": "^2.5.13",
43
+ "@thi.ng/math": "^5.11.5"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@microsoft/api-extractor": "^7.47.0",
@@ -92,5 +92,5 @@
92
92
  "status": "alpha",
93
93
  "year": 2023
94
94
  },
95
- "gitHead": "c7aaa453b01a45e5235517db9d2a283b97abac96\n"
95
+ "gitHead": "5b6de5f99277b244646722a40ea787971c6ffd05\n"
96
96
  }