Facet

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a facet reader for this facet.

Functions

Link copied to clipboard
Link copied to clipboard
fun compute(deps: List<Slot>, get: (EditorState) -> Input): Extension

Create an extension that computes a value for the facet from a state.

Link copied to clipboard
fun computeN(deps: List<Slot>, get: (EditorState) -> List<Input>): Extension

Create an extension that computes zero or more values for this facet from a state.

Link copied to clipboard
fun <T> from(field: StateField<T>, get: (T) -> Input? = null): Extension

Shorthand method for registering a facet source with a state field as input.

Link copied to clipboard
fun of(value: Input): Extension

Returns an extension that adds the given value to this facet.

Link copied to clipboard
operator fun Extension.plus(other: Extension): ExtensionList

Combine two extensions into an ExtensionList.