You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b7b5d35
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -44,9 +45,11 @@ JavaScript data is a graph. Dates, collections, undefined values, symbols and ob
44
45
}
45
46
```
46
47
48
+
Prefer quoted keys and object-viewer syntax? Set `presentation="classic"`; see [presentation modes](https://react-data-inspector.nipesolutions.com/guides/presentation).
49
+
47
50
See the [compiled customization examples](examples/customization.tsx), [API reference](docs/api.md), [architecture and type matrix](docs/architecture.md), and [performance methodology](benchmarks/README.md).
48
51
49
-
The first alpha is read-only. Editing will emit immutable change proposals; it will never mutate application data. Getters are not evaluated, promises are not awaited, functions are not executed, and WeakMap/WeakSet contents remain opaque. Collection paths are not presented as JSON Pointers.
52
+
The alpha is read-only; editing is not part of the public API. Getters are not evaluated, promises are not awaited, functions are not executed, and WeakMap/WeakSet contents remain opaque. Collection paths are not presented as JSON Pointers.
Copy file name to clipboardExpand all lines: benchmarks/README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,3 +7,9 @@ Each synchronous case has one warmup and ten measured runs; raw samples, median
7
7
`npm run benchmark:memory` runs a forced-GC model-lifetime experiment. It reports observed collection, not a deterministic guarantee or a browser retained-heap audit. `npm run benchmark:browser` records Chromium UI timing samples against the local site, including expansion, collapse, selection reveal and scrolling. Browser fixture state and timings are in its JSON output.
8
8
9
9
Do not compare these numbers to a competitor without matching fixtures, expansion state, browser, production mode and work limits. No comparative speed claim is published. Wide-object property enumeration is synchronous and should be measured separately. Search and default rendering intentionally perform different amounts of work.
10
+
11
+
## Presentation comparison
12
+
13
+
Run `npx tsx benchmarks/presentation.ts > /tmp/rdi-presentation-results.json` to compare inspector and classic server rendering over identical datasets: a 100k-property object, a 200-level object (subject to the inspection depth limit), 1k records, and a grouped 500k array with ranges closed and open. The harness alternates order, warms up both modes, records ten samples, and asserts identical data-row counts. Output includes Node/React versions and hardware details.
14
+
15
+
This measures SSR traversal and markup generation, not browser frame rate. Classic emits additional decorative markup; equal row counts do not imply equal rendering cost. Browser tests separately cover uniform row heights, bounded mounted nodes and navigation in both presentations.
throwError(`Presentation changed data row count for ${name}`)
58
+
constsummarize=(values: number[])=>{
59
+
constsorted=[...values].sort((a,b)=>a-b)
60
+
return{
61
+
samplesMs: values,
62
+
medianMs: (sorted[4]!+sorted[5]!)/2,
63
+
p95Ms: sorted[9],
64
+
}
65
+
}
66
+
return{
67
+
name,
68
+
dataRows: rowCounts.inspector,
69
+
inspector: summarize(timings.inspector),
70
+
classic: summarize(timings.classic),
71
+
}
72
+
})
73
+
process.stdout.write(
74
+
JSON.stringify(
75
+
{
76
+
date: newDate().toISOString(),
77
+
environment: {
78
+
node: process.version,
79
+
react: reactVersion,
80
+
platform: platform(),
81
+
arch: arch(),
82
+
cpu: cpus()[0]?.model,
83
+
},
84
+
methodology:
85
+
'Paired in-process React SSR; one warmup per mode and fixture, ten measured samples, alternating mode order. Dataset construction excluded. Each render creates the same model and visible rows. No client windowing, scrolling, or browser timings. Deep fixture reaches the default maximum depth (100); wide and 500k cases use default grouping. Open-range fixture explicitly expands the first 10k range and first 100-value subrange. Customization, themes, and actions use defaults. Samples are descriptive, not timing assertions.',
| presentation | inspector, classic / inspector | Visual notation only; shared inspection model and meaningful rows. |
28
29
| theme | light, dark, system / system | CSS-only color preference. |
29
30
| density | compact, comfortable / compact | Default 28px or 36px rows; 40px on coarse pointers. |
30
31
| unstyled | boolean / false | Omit all default appearance selectors; keep behavior and attributes. |
@@ -41,7 +42,19 @@ The application must rerender when input changes. A parent rerender re-inspects
41
42
42
43
`inspectionOptions` supports `includeNonEnumerable` (false), `includeSymbols` (true for enumerable own symbols), `sortKeys` (false, true, or string comparator), `maxDepth` (100, maximum 200), `stringLimit` (200 characters, maximum 100,000), and `onInspectionError(error, path)`. Sorting never reorders Map/Set entries. Error detail adapters include non-enumerable own error properties.
43
44
44
-
`searchOptions` supports `scope: 'keys' | 'values' | 'keys-and-values'` (last by default), `debounce` (150 ms), `maxNodes` (100,000, maximum 1,000,000), `maxResults` (1,000, maximum 10,000), and `stringLimit` (65,536). Work yields between bounded tasks. A search can be limited by depth, collections, nodes, result count or string truncation. Search enumerates hidden branches; normal collapsed rendering does not. Counts indicate incomplete results. Search can revisit a shared subtree at a shallower path to inspect descendants previously hidden by the depth limit. Query changes cancel previous scans. Data updates coalesce without restarting the query debounce; completed results remain usable while the localizable `refreshing` status reports “Updating results…”. Matches can lag live data, and reveal checks the current value. Mutating the same object does not provide an atomic search snapshot.
Search yields between bounded tasks and visits hidden branches. Depth, collection, node, result-count, and string limits can make counts incomplete. Query changes cancel earlier scans; data updates coalesce into a follow-up scan while completed results remain available.
56
+
57
+
See [search behavior](https://react-data-inspector.nipesolutions.com/docs/search) for shared-path revisits, refresh state, controlled queries, and reveal against changing data. A scan is not an atomic snapshot, and synchronous application callbacks cannot be preempted.
45
58
46
59
## Paths
47
60
@@ -82,24 +95,10 @@ Use `defineInspectorType<T>` to preserve inference while combining heterogeneous
82
95
83
96
## Styling contract
84
97
85
-
Styles are scoped with zero-specificity selectors rooted in `[data-rdi-root]:not([data-rdi-unstyled])`. No global reset or CSS-in-JS runtime. Consumer CSS variables override defaults without specificity escalation.
Stable state attributes: `data-type`, `data-depth` (zero-based display depth), `data-expanded`, `data-selected`, `data-focused` (string true/false), `data-theme`, `data-density`. DOM nesting and private CSS class names are not a styling contract. Logical padding supports RTL. Search matches are underlined, focus is outlined, selection has its own fill.
98
+
The canonical [styling reference](https://react-data-inspector.nipesolutions.com/reference/styling) lists CSS variables, stable presence/state attributes, theme and density defaults, and unstyled responsibilities. Styles remain scoped with zero-specificity selectors; no global reset or CSS-in-JS runtime is required. DOM nesting and implementation class names are private.
100
99
101
-
In unstyled mode, provide your own tree overflow, single-line row geometry, indentation, focus and selection appearance. The current virtualizer requires uniform row heights; use `virtualization={false}` for wrapping or variable-height custom rows. Even without virtualization, grouping and the row limit remain active.
100
+
## Presentation
102
101
103
-
## Editing design
102
+
`presentation="inspector"` is the default. `presentation="classic"` changes built-in visual notation using quoted property keys and balanced inline container delimiters. It adds no closing-delimiter rows or selectable synthetic punctuation. Both presentations share paths, graph identity, search, selection, expansion, actions, grouping, virtualization, and SSR behavior.
104
103
105
-
No editing prop is exported in this alpha. The next editing stage proposes a readonly replace/add/remove union with `path`, `value`, and `previousValue` where applicable. The application decides whether to apply a proposal. Initial string/number/boolean/null input will use deterministic parsing and normal form controls; any later JSON text mode uses JSON.parse. JSON Patch conversion will be restricted to compatible paths and values, not used as the internal model.
104
+
Classic output is not serialized JSON or executable JavaScript. Non-JSON type summaries and separately addressed Map key/value rows retain their meaning. See [presentation modes](https://react-data-inspector.nipesolutions.com/guides/presentation) for examples and customization boundaries.
0 commit comments