diff --git a/src/JsonBrowser/DetailsPrePanel.svelte b/src/JsonBrowser/DetailsPrePanel.svelte new file mode 100644 index 0000000..3eb68ed --- /dev/null +++ b/src/JsonBrowser/DetailsPrePanel.svelte @@ -0,0 +1,30 @@ + + + + +
+ {summary} +
{JSON.stringify(jsonData, null, 2)}
+
+ + + \ No newline at end of file diff --git a/src/JsonValidator/MultiscaleArrays/ZarrArray/index.svelte b/src/JsonValidator/MultiscaleArrays/ZarrArray/index.svelte index 7e9cb45..379ac15 100644 --- a/src/JsonValidator/MultiscaleArrays/ZarrArray/index.svelte +++ b/src/JsonValidator/MultiscaleArrays/ZarrArray/index.svelte @@ -2,6 +2,7 @@ import { getJson, formatBytes, getChunkAndShardShapes, getArrayDtype } from "../../../utils"; import Cube3D from "./Cube3D.svelte"; import ChunkLoader from "./ChunkLoader.svelte"; + import DetailsPrePanel from "../../../JsonBrowser/DetailsPrePanel.svelte"; export let source; export let path; @@ -82,10 +83,9 @@ -
- {path} -
{JSON.stringify(zarray, null, 2)}
-
+
+ +
{:catch error}

{error.message}

{/await} @@ -101,13 +101,6 @@ text-align: center; } - pre { - color: #faebd7; - background-color: #2c3e50; - padding: 10px; - font-size: 14px; - } - table { background-color: white; font-size: 14px; @@ -133,18 +126,4 @@ a:visited { color: #ff512f; } - - details { - font-size: 1.1em; - margin: 0 15px; - text-align: left; - } - pre { - margin-top: 10px; - color: #faebd7; - background-color: #2c3e50; - padding: 10px; - font-size: 14px; - border-radius: 10px; - } diff --git a/src/JsonValidator/RoCrate/index.svelte b/src/JsonValidator/RoCrate/index.svelte new file mode 100644 index 0000000..9a19696 --- /dev/null +++ b/src/JsonValidator/RoCrate/index.svelte @@ -0,0 +1,18 @@ + + +{#await promise} +

Loading ro-crate-metadata.json...

+{:then jsonData} + {#if jsonData} + + {/if} +{:catch error} +

No ro-crate-metadata.json found

+{/await} diff --git a/src/JsonValidator/index.svelte b/src/JsonValidator/index.svelte index 52e008a..75e9778 100644 --- a/src/JsonValidator/index.svelte +++ b/src/JsonValidator/index.svelte @@ -1,6 +1,7 @@