ChildReference

sealed interface ChildReference

A reference from one component to another, as the catalog declares it.

The protocol reserves the shapes — common_types.json defines Child and ChildList — but not the property names carrying them. Card puts its child under child, Column puts its children under children, Modal has two (trigger and content), and Tabs nests one inside each element of a tabs array. Only the catalog knows which of a component's properties are child references, so resolving them is a ChildResolver's job, not this model's.

Inheritors

Types

Link copied to clipboard
data class Fixed(val property: String, val ids: List<ComponentId>) : ChildReference

A fixed list of children.

Link copied to clipboard
data class Single(val property: String, val id: ComponentId) : ChildReference

A reference to exactly one component.

Link copied to clipboard
data class Template(val property: String, val componentId: ComponentId, val path: JsonPointer) : ChildReference

A template instantiated once per item of the array at path.

Properties

Link copied to clipboard
abstract val property: String

The property this reference was found under, for error reporting.