import JsonView from "@uiw/react-json-view"; import { darkTheme } from "@uiw/react-json-view/dark"; import { lightTheme } from "@uiw/react-json-view/light"; import { useTheme } from "../theme.jsx"; /** * Collapsible JSON tree using @uiw/react-json-view. * Docs: value (JSON), keyName (root label), collapsed (depth), * enableClipboard, displayObjectSize, displayDataTypes, style theme vars. */ export function JsonViewBlock({ title, value }) { const { theme } = useTheme() ?? { theme: "light" }; if (value === undefined) return null; const isTree = value != null && typeof value === "object"; return (
{title}
); }