OptionalclassOptionalselectedOptionalsummaryPer-shape totals keyed by shape id. When a shape has an entry it
takes precedence over counting validationResults, so a host
with an aggregated report need not invent one placeholder result
per passing focus node to get the totals right.
OptionalonCalled when the user picks (or, controlled, collapses) a shape.
Uncontrolled: fires with the id on expand only, the original
contract. Controlled: also fires with null when the selected
shape is collapsed, so the host can clear its state.
Declared as a method signature on purpose: method parameters are
bivariant under strictFunctionTypes, so a host that typed its
handler as (id: string) => void before null existed keeps
compiling. Uncontrolled hosts never receive null.
Controlled selection: the shape to show as selected and expanded (a deep link, for instance).
nullmeans none. When this prop is present the browser never keeps its own expanded state; passonSelectShapeand feed the id back. Absent, the browser is uncontrolled, as before.