'use client'; /** JSON block — thin chat wrapper around `JsonTree`. */ import { LazyJsonTree } from '../../../../data/JsonTree/lazy'; import type { JsonBlock } from '../../../types/block'; import type { BlockRendererProps } from './types'; export default function JsonBlockRenderer({ block, ctx }: BlockRendererProps) { // Compact appearance (block.mode === 'compact' or compact chat) → hide // the toolbar, collapse depth, drop the card frame. Full appearance → // hover-revealed toolbar + card. const mode = block.mode ?? (ctx.appearance === 'compact' ? 'compact' : 'full'); const compact = mode !== 'full'; // The outer card (radius / border / shadow) comes from the shared // `BLOCK_SURFACE`; the tree itself is unbordered with a little padding so // it doesn't sit flush against the frame. return (
); }