@thi.ng/blurhash 0.2.8 → 0.2.10
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 +1 -1
- package/decode.d.ts +1 -1
- package/encode.js +0 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
package/decode.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { type Canvas2DOpts } from "@thi.ng/canvas";
|
|
|
17
17
|
* @param contrast
|
|
18
18
|
* @param pixels
|
|
19
19
|
*/
|
|
20
|
-
export declare const decode: (hash: string, width: number, height: number, contrast?: number, pixels?: Uint32Array) => Uint32Array
|
|
20
|
+
export declare const decode: (hash: string, width: number, height: number, contrast?: number, pixels?: Uint32Array) => Uint32Array<ArrayBufferLike>;
|
|
21
21
|
/**
|
|
22
22
|
* Similar to {@link decode}, but also creates a canvas of given size and writes
|
|
23
23
|
* the decoded image into it. Returns canvas element.
|
package/encode.js
CHANGED
|
@@ -46,7 +46,6 @@ const encode = (pixels, width, height, detailX = 4, detailY = detailX) => {
|
|
|
46
46
|
const encodeFromCanvas = (canvas, detailX, detailY) => {
|
|
47
47
|
return encode(
|
|
48
48
|
new Uint32Array(
|
|
49
|
-
// TODO remove cast again - temp workaround for TS5.6.2?
|
|
50
49
|
canvas.getContext("2d").getImageData(
|
|
51
50
|
0,
|
|
52
51
|
0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/blurhash",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "Fast, optimized TS implementation of the Wolt Blurhash algorithm",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"build:decl": "tsc --declaration --emitDeclarationOnly",
|
|
29
29
|
"build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
|
|
30
30
|
"clean": "bun ../../tools/src/clean-package.ts",
|
|
31
|
-
"doc": "typedoc --
|
|
31
|
+
"doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
|
|
32
32
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
33
33
|
"doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
|
|
34
34
|
"pub": "yarn npm publish --access public",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
40
|
-
"@thi.ng/base-n": "^2.7.
|
|
41
|
-
"@thi.ng/canvas": "^0.5.
|
|
42
|
-
"@thi.ng/errors": "^2.5.
|
|
43
|
-
"@thi.ng/math": "^5.11.
|
|
39
|
+
"@thi.ng/api": "^8.11.13",
|
|
40
|
+
"@thi.ng/base-n": "^2.7.25",
|
|
41
|
+
"@thi.ng/canvas": "^0.5.6",
|
|
42
|
+
"@thi.ng/errors": "^2.5.19",
|
|
43
|
+
"@thi.ng/math": "^5.11.13"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@microsoft/api-extractor": "^7.
|
|
46
|
+
"@microsoft/api-extractor": "^7.48.0",
|
|
47
47
|
"esbuild": "^0.24.0",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.26.
|
|
50
|
-
"typescript": "^5.
|
|
49
|
+
"typedoc": "^0.26.11",
|
|
50
|
+
"typescript": "^5.7.2"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"blur",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"year": 2023,
|
|
93
93
|
"screenshot": "blurhash/thumb.png"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "85e2f0935b58bde5d165fbe754fafec5da0b731e\n"
|
|
96
96
|
}
|