@manamerge/mana-atomic-ui 1.0.2 → 1.0.3

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.
@@ -1,21 +0,0 @@
1
- (function () {
2
- 'use strict';
3
-
4
- var q=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],x=t=>{let e=0;for(let r=0;r<t.length;r++){let n=t[r],l=q.indexOf(n);e=e*83+l;}return e};var f=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},h=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(e*12.92*255+.5):Math.trunc((1.055*Math.pow(e,.4166666666666667)-.055)*255+.5)},F=t=>t<0?-1:1,M=(t,e)=>F(t)*Math.pow(Math.abs(t),e);var d=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e;}};var C=t=>{if(!t||t.length<6)throw new d("The blurhash string must be at least 6 characters");let e=x(t[0]),r=Math.floor(e/9)+1,n=e%9+1;if(t.length!==4+2*n*r)throw new d(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*n*r}`)},z=t=>{let e=t>>16,r=t>>8&255,n=t&255;return [f(e),f(r),f(n)]},L=(t,e)=>{let r=Math.floor(t/361),n=Math.floor(t/19)%19,l=t%19;return [M((r-9)/9,2)*e,M((n-9)/9,2)*e,M((l-9)/9,2)*e]},U=(t,e,r,n)=>{C(t),n=n|1;let l=x(t[0]),m=Math.floor(l/9)+1,b=l%9+1,i=(x(t[1])+1)/166,u=new Array(b*m);for(let o=0;o<u.length;o++)if(o===0){let a=x(t.substring(2,6));u[o]=z(a);}else {let a=x(t.substring(4+o*2,6+o*2));u[o]=L(a,i*n);}let c=e*4,s=new Uint8ClampedArray(c*r);for(let o=0;o<r;o++)for(let a=0;a<e;a++){let y=0,B=0,R=0;for(let w=0;w<m;w++)for(let P=0;P<b;P++){let G=Math.cos(Math.PI*a*P/e)*Math.cos(Math.PI*o*w/r),T=u[P+w*b];y+=T[0]*G,B+=T[1]*G,R+=T[2]*G;}let V=h(y),I=h(B),E=h(R);s[4*a+0+o*c]=V,s[4*a+1+o*c]=I,s[4*a+2+o*c]=E,s[4*a+3+o*c]=255;}return s},j=U;
5
-
6
- // blurhash.worker.ts
7
- self.onmessage = (e) => {
8
- const { hash, width, height } = e.data;
9
- const pixels = j(hash, width, height);
10
- self.postMessage(pixels.buffer, [pixels.buffer]); // transfere memória
11
- };
12
- // blurhash.worker.js
13
- // import { decode } from "blurhash";
14
- // self.onmessage = (e) => {
15
- // const { hash, width, height } = e.data;
16
- // const pixels = decode(hash, width, height);
17
- // self.postMessage(pixels.buffer, [pixels.buffer]); // transfere memória
18
- // };
19
-
20
- })();
21
- //# sourceMappingURL=blurhash.worker.js.map
@@ -1,8 +0,0 @@
1
- // blurhash.worker.ts
2
- import { decode } from "blurhash";
3
-
4
- self.onmessage = (e: MessageEvent) => {
5
- const { hash, width, height } = e.data;
6
- const pixels = decode(hash, width, height);
7
- (self as unknown as Worker).postMessage(pixels.buffer, [pixels.buffer]); // transfere memória
8
- };