@biongff/vizarr 1.3.1 → 1.4.1
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/dist/biongff-vizarr.cjs.js +1 -1
- package/dist/biongff-vizarr.es.js +10 -6
- package/dist/{deflate-D4fVjT8X.cjs → deflate-CDNKi0Ty.cjs} +1 -1
- package/dist/{deflate-B6UWtjyo.js → deflate-EUCpoeLy.js} +1 -1
- package/dist/index-BDDvUFxc.cjs +3752 -0
- package/dist/{index-CGjf_l_H.js → index-DmU6w2ak.js} +18263 -14904
- package/dist/index.d.ts +117 -1
- package/dist/{jpeg-B4oirkAG.cjs → jpeg-DNqKm07P.cjs} +1 -1
- package/dist/{jpeg-CH3LeEWt.js → jpeg-D_Y1H-gH.js} +1 -1
- package/dist/{lerc-DLV5-j0k.js → lerc-Ck7Ojtbb.js} +1 -1
- package/dist/{lerc-BYe2-QJc.cjs → lerc-pt3_s-G2.cjs} +1 -1
- package/dist/{lzw-CdTlawLU.js → lzw-5ykdy138.js} +1 -1
- package/dist/{lzw-DOv7FpJp.cjs → lzw-CZPfIBvk.cjs} +1 -1
- package/dist/{packbits-YFbkocqj.cjs → packbits-Dcq9Xl8T.cjs} +1 -1
- package/dist/{packbits-C7gCMjHU.js → packbits-TnW7FncW.js} +1 -1
- package/dist/{raw-Cd_Yrlnj.js → raw-C6DT0DTv.js} +1 -1
- package/dist/{raw-GJmfvqqS.cjs → raw-CHi7PjRk.cjs} +1 -1
- package/dist/{ref-D7n2xWdV.js → ref-C6Hx8q8u.js} +1 -1
- package/dist/{ref-B0_Wl0Bd.cjs → ref-DDcdpHul.cjs} +1 -1
- package/dist/{webimage-D2mauvJo.js → webimage-CoKhxnYQ.js} +1 -1
- package/dist/{webimage-DACySx-6.cjs → webimage-Df8qZG7_.cjs} +1 -1
- package/package.json +7 -7
- package/dist/index-BgZ4M3d8.cjs +0 -3815
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=t=>{throw TypeError(t)};var x=(t,r,n)=>r.has(t)||b("Cannot "+n);var m=(t,r,n)=>(x(t,r,"read from private field"),n?n.call(t):r.get(t)),y=(t,r,n)=>r.has(t)?b("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),p=(t,r,n,e)=>(x(t,r,"write to private field"),e?e.call(t,n):r.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-
|
|
1
|
+
"use strict";var b=t=>{throw TypeError(t)};var x=(t,r,n)=>r.has(t)||b("Cannot "+n);var m=(t,r,n)=>(x(t,r,"read from private field"),n?n.call(t):r.get(t)),y=(t,r,n)=>r.has(t)?b("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),p=(t,r,n,e)=>(x(t,r,"write to private field"),e?e.call(t,n):r.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./index-BDDvUFxc.cjs");function j(t,r=/{{(.*?)}}/){let n=r.exec(t);const e=[];let o;for(;n;)o=n.index,o!==0&&(e.push({match:!1,str:t.substring(0,o)}),t=t.slice(o)),e.push({match:!0,str:n[0]}),t=t.slice(n[0].length),n=r.exec(t);return t&&e.push({match:!1,str:t}),e}function O(t){const r=t.match(/(?<fname>[A-Z_][A-Z_1-9]*)\((?<args>[^)]+)\)/i);if(!(r!=null&&r.groups))return;const{fname:n,args:e}=r.groups,o=Object.fromEntries(e.split(",").map(f=>{var a;const{key:i,num:s,str:c}=((a=f.match(/(?<key>[a-z_0-9]*)\s*=\s*((?<num>[0-9.]+)|('|")(?<str>.*)('|"))/i))==null?void 0:a.groups)??{};if(!i||!(s||c))throw Error(`Failed to match fn kwarg: ${f}`);return[i,s?Number(s):c]}));return{fname:n,ctx:o}}const E="abcdefghijklmnopqrstuvwxyz",$="01234569789",U="()*/+-",_=" ",z=new Set(E+E.toUpperCase()+$+U+_);function M(t){for(let r=0;r<t.length;r++)if(!z.has(t.charAt(r)))return;return j(t,/[A-Za-z_][A-Za-z0-9_]*/gi)}function S(t,r){return j(t).map(e=>{if(!e.match)return e.str;let o=e.str.split(/{{|}}/).filter(Boolean)[0].trim();if(o in r)return r[o];const f=O(o);if(f){const{fname:s,ctx:c}=f,a=r[s];if(typeof a=="function")return a(c);throw Error(`Cannot find function named ${s} in rendering context.`)}const i=M(o);if(i){const s=i.map(c=>{if(!c.match)return c.str;const a=r[c.str];if(a==null)throw Error(`Cannot find number named ${c.str} in rendering context.`);if(typeof a!="number")throw Error(`The provided value for ${c.str} must be a number.`);return a});return Function('"use strict";return ('+s.join("")+")")()}throw new Error(`Unable to match ${e.str}`)}).join("")}function P(t,r=S){return"version"in t?Z(t,r):T(t)}function T(t){return new Map(Object.entries(t))}function Z(t,r){var f;const n={};for(const[i,s]of Object.entries(t.templates??{}))s.includes("{{")?n[i]=c=>r(s,c):n[i]=s;const e=(i,s)=>r(i,{...n,...s}),o=new Map;for(const[i,s]of Object.entries(t.refs??{}))if(typeof s=="string")o.set(i,s);else{const c=(f=s[0])!=null&&f.includes("{{")?e(s[0]):s[0];o.set(i,s.length===1?[c]:[c,s[1],s[2]])}for(const i of t.gen??[])for(const s of q(i.dimensions)){const c=e(i.key,s),a=e(i.url,s);if("offset"in i&&"length"in i){const v=e(i.offset,s),k=e(i.length,s);o.set(c,[a,parseInt(v),parseInt(k)])}else o.set(c,[a])}return o}function*q(t){const r=Object.keys(t),n=Object.values(t).map(e=>Array.isArray(e)?e:[...I(e)]);for(const e of F(...n))yield Object.fromEntries(r.map((o,f)=>[o,e[f]]))}function*F(...t){if(t.length===0)return;const r=t.map(e=>e[Symbol.iterator]()),n=r.map(e=>e.next());if(n.some(e=>e.done))throw new Error("Input contains an empty iterator.");for(let e=0;;){if(n[e].done){if(r[e]=t[e][Symbol.iterator](),n[e]=r[e].next(),++e>=r.length)return}else yield n.map(({value:o})=>o),e=0;n[e]=r[e].next()}}function*I({stop:t,start:r=0,step:n=1}){for(let e=r;e<t;e+=n)yield e}(()=>{for(var t=new Uint8Array(128),r=0;r<64;r++)t[r<26?r+65:r<52?r+71:r<62?r-4:r*4-205]=r;return n=>{for(var e=n.length,o=new Uint8Array((e-(n[e-1]=="=")-(n[e-2]=="="))*3/4|0),f=0,i=0;f<e;){var s=t[n.charCodeAt(f++)],c=t[n.charCodeAt(f++)],a=t[n.charCodeAt(f++)],v=t[n.charCodeAt(f++)];o[i++]=s<<2|c>>4,o[i++]=c<<4|a>>2,o[i++]=a<<6|v}return o}})();new TextEncoder;let u=new Uint8Array(128);for(let t=0;t<64;t++)u[t<26?t+65:t<52?t+71:t<62?t-4:t*4-205]=t;function C(t){const r=t.length,n=new Uint8Array((r-(t[r-1]==="=")-(t[r-2]==="="))*3/4|0);for(let e=0,o=0;e<r;){const f=u[t.charCodeAt(e++)],i=u[t.charCodeAt(e++)],s=u[t.charCodeAt(e++)],c=u[t.charCodeAt(e++)];n[o++]=f<<2|i>>4,n[o++]=i<<4|s>>2,n[o++]=s<<6|c}return n}var l,h,d;const w=class w{constructor(r,n={}){y(this,l);y(this,h);y(this,d);p(this,l,Promise.resolve(r)),p(this,h,n),p(this,d,n.overrides||{})}async get(r,n={}){let e=(await m(this,l)).get(g.strip_prefix(r));if(!e)return;if(typeof e=="string")return e.startsWith("base64:")?C(e.slice(7)):new TextEncoder().encode(e);let[o,f,i]=e,s=o??m(this,h).target;if(!s)throw Error(`No url for key ${r}, and no target url provided.`);let c=await g.fetch_range(g.uri2href(s),f,i,g.merge_init(m(this,d),n));if(c.status===200||c.status===206)return new Uint8Array(await c.arrayBuffer());throw new Error(`Request unsuccessful for key ${r}. Response status: ${c.status}.`)}static fromSpec(r,n){let e=Promise.resolve(r).then(o=>P(o));return new w(e,n)}static fromUrl(r,n){let e=fetch(r,n==null?void 0:n.overrides).then(o=>o.json());return w.fromSpec(e,n)}};l=new WeakMap,h=new WeakMap,d=new WeakMap;let A=w;exports.default=A;exports.to_binary=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BDDvUFxc.cjs");class i extends r.BaseDecoder{constructor(){if(super(),typeof createImageBitmap>"u")throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if(typeof document>"u"&&typeof OffscreenCanvas>"u")throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available")}async decode(c,n){const o=new Blob([n]),e=await createImageBitmap(o);let t;typeof document<"u"?(t=document.createElement("canvas"),t.width=e.width,t.height=e.height):t=new OffscreenCanvas(e.width,e.height);const a=t.getContext("2d");return a.drawImage(e,0,0),a.getImageData(0,0,e.width,e.height).data.buffer}}exports.default=i;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biongff/vizarr",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/BioNGFF/vizarr"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@deck.gl/geo-layers": "~9.0.0",
|
|
25
25
|
"@deck.gl/layers": "~9.0.0",
|
|
26
26
|
"@hms-dbmi/viv": "~0.17.2",
|
|
27
|
+
"@vivjs/loaders": "0.17.2",
|
|
27
28
|
"@vivjs/types": "~0.17.0",
|
|
28
29
|
"@zarrita/storage": "0.1.4",
|
|
29
30
|
"deck.gl": "~9.0.0",
|
|
@@ -33,8 +34,10 @@
|
|
|
33
34
|
"p-map": "^7.0.3",
|
|
34
35
|
"quick-lru": "^7.0.0",
|
|
35
36
|
"react-is": "18.3.1",
|
|
37
|
+
"xml-js": "1.6.11",
|
|
36
38
|
"yaml": "^2.8.2",
|
|
37
|
-
"zarrita": "0.
|
|
39
|
+
"zarrita": "0.6.2",
|
|
40
|
+
"zod-ome-ngff": "github:biongff/zod-ome-ngff#dev"
|
|
38
41
|
},
|
|
39
42
|
"peerDependencies": {
|
|
40
43
|
"@emotion/react": "^11.14.0",
|
|
@@ -46,18 +49,15 @@
|
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@types/node": "^24.3.0",
|
|
49
|
-
"@types/react": "^18.3.
|
|
52
|
+
"@types/react": "^18.3.18",
|
|
50
53
|
"@types/react-dom": "^18.2.18",
|
|
51
54
|
"@vitejs/plugin-react": "^4.3.4",
|
|
55
|
+
"happy-dom": "^20.14.5",
|
|
52
56
|
"typescript": "^5.8.2",
|
|
53
57
|
"vite": "^6.2.7",
|
|
54
58
|
"vite-plugin-dts": "^4.5.4",
|
|
55
|
-
"zod-ome-ngff": "^0.3.0",
|
|
56
59
|
"zod": "3.21.0"
|
|
57
60
|
},
|
|
58
|
-
"overrides": {
|
|
59
|
-
"react-is": "^18.3.1"
|
|
60
|
-
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"dev": "vite",
|
|
63
63
|
"build": "npm run check && vite build",
|