@thi.ng/blurhash 0.1.5 → 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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-06T23:18:11Z
3
+ - **Last updated**: 2024-02-10T08:59:56Z
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.
package/README.md CHANGED
@@ -1,5 +1,15 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
  <!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
+ > [!IMPORTANT]
4
+ > ‼️ Announcing the thi.ng user survey 2024 📋
5
+ >
6
+ > [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
7
+ > (open until end of February)
8
+ >
9
+ > **To achieve a better sample size, I'd highly appreciate if you could
10
+ > circulate the link to this survey in your own networks.**
11
+ >
12
+ > [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
3
13
 
4
14
  # ![@thi.ng/blurhash](https://media.thi.ng/umbrella/banners-20230807/thing-blurhash.svg?f3b5be72)
5
15
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure.d.ts","sourceRoot":"","sources":["../src/internal/ensure.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,YAAa,MAAM,WAAW,MAAM,SAI7D,CAAC;AAEH,eAAO,MAAM,YAAY,WAChB,WAAW,SACZ,MAAM,UACL,MAAM,SAKb,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../src/internal/linear.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,UAAU,MAAO,MAAM,2BACC,CAAC;AAEtC;;;;GAIG;AACH,eAAO,MAAM,YAAY,MAAO,MAAM,2BACC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/blurhash",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Fast, optimized TS implementation of the Wolt Blurhash algorithm",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,18 +35,18 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.22",
39
- "@thi.ng/base-n": "^2.7.0",
40
- "@thi.ng/canvas": "^0.2.4",
41
- "@thi.ng/errors": "^2.4.15",
42
- "@thi.ng/math": "^5.9.0"
38
+ "@thi.ng/api": "^8.9.23",
39
+ "@thi.ng/base-n": "^2.7.1",
40
+ "@thi.ng/canvas": "^0.2.5",
41
+ "@thi.ng/errors": "^2.4.16",
42
+ "@thi.ng/math": "^5.10.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@microsoft/api-extractor": "^7.39.0",
46
- "esbuild": "^0.19.10",
45
+ "@microsoft/api-extractor": "^7.40.1",
46
+ "esbuild": "^0.20.0",
47
47
  "rimraf": "^5.0.5",
48
48
  "tools": "^0.0.1",
49
- "typedoc": "^0.25.4",
49
+ "typedoc": "^0.25.7",
50
50
  "typescript": "^5.3.3"
51
51
  },
52
52
  "keywords": [
@@ -91,5 +91,5 @@
91
91
  "status": "alpha",
92
92
  "year": 2023
93
93
  },
94
- "gitHead": "ce8202c237a367c4038d41919a8acf75e1122507\n"
94
+ "gitHead": "25ee18f7db6d03f0b76787267ab071d16df94888\n"
95
95
  }
package/utils.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const sRGBToLinear: (x: number) => number;
2
- export declare const linearTosRGB: (x: number) => number;
3
- export declare const signPow: (val: number, exp: number) => number;
4
- //# sourceMappingURL=utils.d.ts.map
package/utils.js DELETED
@@ -1,22 +0,0 @@
1
- const sRGBToLinear = (x) => {
2
- x /= 255;
3
- if (x <= 0.04045) {
4
- return x / 12.92;
5
- } else {
6
- return Math.pow((x + 0.055) / 1.055, 2.4);
7
- }
8
- };
9
- const linearTosRGB = (x) => {
10
- x = Math.max(0, Math.min(1, x));
11
- if (x <= 31308e-7) {
12
- return Math.trunc(x * 12.92 * 255 + 0.5);
13
- } else {
14
- return Math.trunc((1.055 * Math.pow(x, 1 / 2.4) - 0.055) * 255 + 0.5);
15
- }
16
- };
17
- const signPow = (val, exp) => Math.sign(val) * Math.abs(val) ** exp;
18
- export {
19
- linearTosRGB,
20
- sRGBToLinear,
21
- signPow
22
- };