From 8de6f6619ec7d4ba66bb1859ec530f7b5668b459 Mon Sep 17 00:00:00 2001 From: Lazaro Alonso Date: Thu, 25 Jun 2026 09:09:51 +0200 Subject: [PATCH 1/3] rm baseUrl --- tsconfig.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index faf7c619..8cc17e88 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,13 +22,12 @@ "name": "next" } ], - "baseUrl": ".", "paths": { "@/*": [ - "src/*" + "./src/*" ], "@/components/*": [ - "src/components/*" + "./src/components/*" ] } }, From 5f82c34890da27cee722c10104c0e120fbfe6d61 Mon Sep 17 00:00:00 2001 From: Lazaro Alonso Date: Thu, 25 Jun 2026 09:31:42 +0200 Subject: [PATCH 2/3] icechunk 0.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 217ced4f..565e69fd 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "embla-carousel-react": "^8.6.0", "fflate": "^0.8.2", "gsap": "^3.13.0", - "icechunk-js": "^0.4.0", + "icechunk-js": "^0.6.0", "input-otp": "^1.4.2", "js-colormaps-es": "^0.0.5", "lucide-react": "^0.562.0", From 984a726456719360939dc196fe564b9f8159f920 Mon Sep 17 00:00:00 2001 From: Lazaro Alonso Date: Thu, 25 Jun 2026 10:36:18 +0200 Subject: [PATCH 3/3] copy over and rm import --- src/components/ui/Elements/HomeButton.tsx | 5 ++-- src/components/zarr/ZarrParser.ts | 29 ++++++++++++++++++++++- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/components/ui/Elements/HomeButton.tsx b/src/components/ui/Elements/HomeButton.tsx index 2cb5cf1d..4900c46f 100644 --- a/src/components/ui/Elements/HomeButton.tsx +++ b/src/components/ui/Elements/HomeButton.tsx @@ -2,7 +2,6 @@ import Image from "next/image"; import Link from "next/link"; -import logoHome from "public/logo-light.svg"; import { Button } from "@/components/ui/button-enhanced"; import { Tooltip, @@ -10,6 +9,8 @@ import { TooltipTrigger, } from "@/components/ui/tooltip"; +const logoHome = "/logo-light.svg"; + export default function HomeButton() { return ( @@ -20,7 +21,7 @@ export default function HomeButton() { size="icon" className="cursor-pointer hover:scale-90 transition-transform duration-100 ease-out" > - logoMPI + logoMPI diff --git a/src/components/zarr/ZarrParser.ts b/src/components/zarr/ZarrParser.ts index a8cdef0d..61f8d8fd 100644 --- a/src/components/zarr/ZarrParser.ts +++ b/src/components/zarr/ZarrParser.ts @@ -1,6 +1,33 @@ import * as zarr from 'zarrita' -import { jsonDecodeObject, jsonEncodeObject } from 'node_modules/zarrita/dist/src/util'; +import { InvalidMetadataError } from 'zarrita'; +// jsonEncodeObject and jsonDecodeObject +// From zarrita/src/util.ts, better this, than rely on internals +export function jsonEncodeObject(o: Record): Uint8Array { + const str = JSON.stringify( + o, + (_key, value) => { + // JSON.stringify converts NaN/Infinity/-Infinity to null. + // Zarr v3 spec requires these as string representations. + if (typeof value === "number") { + if (Number.isNaN(value)) return "NaN"; + if (value === Infinity) return "Infinity"; + if (value === -Infinity) return "-Infinity"; + } + return value; + }, + 2, + ); + return new TextEncoder().encode(str); +} +export function jsonDecodeObject(bytes: Uint8Array) { + const str = new TextDecoder().decode(bytes); + try { + return JSON.parse(str); + } catch (cause) { + throw new InvalidMetadataError("Failed to decode JSON", { cause }); + } +} function is_meta_key(key: string) { return (key.endsWith(".zarray") || key.endsWith(".zgroup") ||