chore: pnpm format
📊 Benchmark the Runtime / benchmark (pull_request) Successful in 1m2s
🚀 Lint & Test & Deploy / quality (pull_request) Successful in 2m30s
🚀 Lint & Test & Deploy / test-unit (pull_request) Successful in 32s
🚀 Lint & Test & Deploy / test-e2e (pull_request) Failing after 33s
🚀 Lint & Test & Deploy / deploy (pull_request) Has been skipped
📊 Benchmark the Runtime / benchmark (pull_request) Successful in 1m2s
🚀 Lint & Test & Deploy / quality (pull_request) Successful in 2m30s
🚀 Lint & Test & Deploy / test-unit (pull_request) Successful in 32s
🚀 Lint & Test & Deploy / test-e2e (pull_request) Failing after 33s
🚀 Lint & Test & Deploy / deploy (pull_request) Has been skipped
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<script module>
|
||||
<script module lang="ts">
|
||||
import { SvelteMap } from 'svelte/reactivity';
|
||||
const cache = new SvelteMap<string, Record<string, boolean>>();
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
return [] as [string, unknown][];
|
||||
});
|
||||
const showKeys = $derived(!isArr || typeof items[0]?.[1] === "object")
|
||||
const showKeys = $derived(!isArr || typeof items[0]?.[1] === 'object');
|
||||
|
||||
function toggle(next: boolean) {
|
||||
open = next;
|
||||
@@ -92,8 +92,10 @@
|
||||
<button
|
||||
class="text-text hover:bg-layer-3 cursor-pointer"
|
||||
title="Copy value"
|
||||
onclick={() => navigator.clipboard.writeText(JSON.stringify({[key]: value}, null, 2))}
|
||||
>{key}</button><span class="text-text/40">: </span>
|
||||
onclick={() => navigator.clipboard.writeText(JSON.stringify({ [key]: value }, null, 2))}
|
||||
>
|
||||
{key}
|
||||
</button><span class="text-text/40">: </span>
|
||||
{/if}
|
||||
|
||||
{#if isExpandable}
|
||||
@@ -111,7 +113,7 @@
|
||||
<div>
|
||||
<JsonViewer
|
||||
value={v}
|
||||
key={showKeys ? k : undefined }
|
||||
key={showKeys ? k : undefined}
|
||||
depth={depth + 1}
|
||||
path={path ? `${path}/${k}` : k}
|
||||
/>{#if i < items.length - 1}<span class="text-text/20">,</span>{/if}
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
let { options = [], value = $bindable(0), id = '' }: Props = $props();
|
||||
|
||||
const normalized = $derived(
|
||||
options.map((opt, i) =>
|
||||
typeof opt === 'string' ? { value: i, label: opt } : opt
|
||||
)
|
||||
options.map((opt, i) => typeof opt === 'string' ? { value: i, label: opt } : opt)
|
||||
);
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user