Renders a trace as a readable causal tree.
The output is deliberately a text tree rather than a graphical inspector. A causal trace is a tree of short lines — that is its natural shape — and a tree in a terminal is diffable, pasteable into an issue, greppable, and available the moment a developer wants it.
Reading order follows causality, not time: each node is printed under the thing that caused it, so the answer to "why did this DOM node change" is always the line above it.
- Source:
Members
(static, constant) REASON_DESCRIPTIONS :Object:.<string:, string:>
Human-readable explanations for each NonDeterminismReason.
These live here rather than in schema.js because they are presentation,
not structure — and because schema.js is in the runtime's import graph,
where a block of prose no application will ever render would be dead weight
in every bundle.
Type:
- Source:
Methods
(static) formatDeterminism(trace) → {string}
Renders a trace's determinism verdict and, when relevant, why it was downgraded.
Parameters:
| Name | Type | Description |
|---|---|---|
trace |
object | The trace. |
- Source:
Returns:
The summary.
- Type
- string
(static) formatNode(node) → {string}
Renders one node as a single line, without its children.
Parameters:
| Name | Type | Description |
|---|---|---|
node |
object | The node. |
- Source:
Returns:
The line.
- Type
- string
(static) formatTrace(trace, optionsopt) → {string}
Renders a whole trace as a causal tree, with a determinism summary.
Parameters:
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
trace |
object | The trace. |
|||||||||
options |
object |
<optional> |
Rendering options. Properties
|
- Source:
Returns:
The rendered trace.
- Type
- string
(static) summarizeTrace(trace) → {Object}
Summarises a trace for a listing row.
Parameters:
| Name | Type | Description |
|---|---|---|
trace |
object | The trace. |
- Source:
Returns:
- Type
- Object
(inner) renderSubtree(node, children, prefix, isLast, out, seen)
Renders the subtree under a node using box-drawing connectors.
Parameters:
- Source: