Package-level declarations

Types

Link copied to clipboard

How a node lays out and sizes itself, derived from the user-agent default for its type.

Link copied to clipboard
value class NodePath(val value: String)

A stable, structural identity for a node within the resolved tree.

Link copied to clipboard

The viewport orientation, matched against CSS orientation media-query conditions.

Link copied to clipboard
sealed interface ResolvedChild

A single entry in a node's resolved child list.

Link copied to clipboard
data class ResolvedNode(val type: String, val path: NodePath, val props: <Error class: unknown class>, val style: ResolvedStyle, val intrinsicLayout: IntrinsicLayout, val replaced: Boolean, extras: Map<String, <Error class: unknown class>>, val children: List<ResolvedChild>) : Map<String, <Error class: unknown class>>

A resolved node. The Map view exposes the node-level custom keys (unknown keys sitting next to type/props/children in the source JSON), so node["custom-key"] reads a custom attribute — the same approach as com.j0y.joy.dom.serialization.Node.

Link copied to clipboard
data class ResolvedSpec(val viewport: Viewport, val root: ResolvedNode)

The fully-resolved document produced by resolve, ready for a renderer to walk.

Link copied to clipboard
data class ResolvedStyle(val direct: <Error class: unknown class>, val text: TextContext)

The fully-resolved style for a node.

Link copied to clipboard
data class TextContext(val color: <Error class: unknown class>, val fontFamily: String, val fontSize: <Error class: unknown class>, val fontWeight: <Error class: unknown class>, val fontStyle: <Error class: unknown class>, val lineHeight: Double, val letterSpacing: <Error class: unknown class>, val textAlign: <Error class: unknown class>, val textTransform: <Error class: unknown class>, val textDecoration: <Error class: unknown class>, val whiteSpace: <Error class: unknown class>)

Fully-resolved set of inherited text properties.

Link copied to clipboard
data class UaRule(val style: <Error class: unknown class>, val replaced: Boolean = false, val intrinsicLayout: IntrinsicLayout = IntrinsicLayout.Flex)

A user-agent (browser-default) style rule for one HTML element type, as held in UaStylesheet.rules. Forms the lowest layer of the cascade, before element/class/id and inline styles.

Link copied to clipboard
data class Viewport(val widthPx: Double, val heightPx: Double, val orientation: Orientation, val isPrint: Boolean = false)

The dimensions and media characteristics that breakpoints (media queries) are evaluated against.

Functions

Link copied to clipboard
fun resolve(spec: <Error class: unknown class>, viewport: Viewport): ResolvedSpec

Resolves a Spec for the given viewport into a fully-resolved ResolvedSpec.