Build a new `json-view` component under `packages/base/data/` that behaves similarly to `vue-json-pretty`, with strong support for large payloads via virtual scrolling and a more DOM-efficient rendering strategy.
## Requirements
- Create a new base component alongside `list-table-v2.vue`.
- Render formatted JSON objects/arrays/primitives in an interactive tree viewer.
- Keep the supported public API close to `vue-json-pretty` where practical.
- Support most `vue-json-pretty` viewer features except:
- selector
- inline editing
- Support expand/collapse interactions.
- Support virtual scrolling for large JSON trees.
- Reuse and adapt relevant pretext-based utilities from `packages/base/data/list-table-v2/` where useful.
- Optimize DOM output aggressively compared with `vue-json-pretty`, including:
- sharing one indentation element across multiple contiguous lines of the same level where possible
- using CSS pseudo-elements for affordances such as expand/collapse icons
- Place the component implementation under `packages/base/data/`, near `list-table-v2.vue`.
## Feature Targets Compared to `vue-json-pretty`
- Tree expansion/collapse
- Key/value display for objects
- Array index display
- Primitive type styling
- Empty object/array handling
- Path-aware rendering as needed for stable keys and interactions
@ -212,7 +256,7 @@ function countValueLines(value: unknown, ancestors = new WeakSet<object>()): num
@@ -212,7 +256,7 @@ function countValueLines(value: unknown, ancestors = new WeakSet<object>()): num
return1;
}
ancestors.add(reference);
ancestors.set(reference,true);
consttotal=
kind==="array"
@ -232,7 +276,7 @@ function countValueLines(value: unknown, ancestors = new WeakSet<object>()): num
@@ -232,7 +276,7 @@ function countValueLines(value: unknown, ancestors = new WeakSet<object>()): num