Package de.peekandpoke.kraft.components

Types

Link copied to clipboard
abstract class Component<PROPS>(val ctx: Ctx<PROPS>)

Base class of all Components

Link copied to clipboard
interface ComponentRef<C : Component<*>>
Link copied to clipboard
data class Ctx<out PROPS>(    val engine: VDomEngine,     val parent: Component<*>?,     val props: PROPS)
Link copied to clipboard
class InlineStateForStreamSubscription<T>(    val component: Component<*>,     val stream: Stream<T>,     val type: KType) : ReadOnlyProperty<Any?, T>
Link copied to clipboard
class InlineStateForValue<P>(    val component: Component<*>,     val initial: P,     val type: KType) : ObservableProperty<P>
Link copied to clipboard
typealias NoProps = Ctx<Any?>
Link copied to clipboard
class ObservableComponentProperty<T>(    component: Component<*>,     initialValue: T,     onChange: (T) -> Unit? = null) : ObservableProperty<T>
Link copied to clipboard
class ObservableStreamProperty<T>(val component: Component<*>, val stream: StreamSource<T>) : ObservableProperty<T>
Link copied to clipboard
abstract class PureComponent(ctx: NoProps) : Component<Any?>

Base component that has no props and no state

Functions

Link copied to clipboard
inline fun <C : Component<Any?>> Tag.comp(noinline component: (NoProps) -> C): ComponentRef<C>

Adds a parameterless child component to the current tag

inline fun <P, C : Component<P>> Tag.comp(props: P, noinline component: (Ctx<P>) -> C): ComponentRef<C>

Adds a child component to the current tag

Link copied to clipboard
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9> component(func: VDom.(P1, P2, P3, P4, P5, P6, P7, P8, P9) -> Unit): Tag.(P1, P2, P3, P4, P5, P6, P7, P8, P9) -> Unit
fun <P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> component(func: VDom.(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> Unit): Tag.(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) -> Unit

Creates a functional component with 9 parameters

fun component(func: VDom.() -> Unit): Tag.() -> Unit

Creates a functional component with no parameters

fun <P1> component(func: VDom.(P1) -> Unit): Tag.(P1) -> Unit

Creates a functional component with 1 parameter

fun <P1, P2> component(func: VDom.(P1, P2) -> Unit): Tag.(P1, P2) -> Unit

Creates a functional component with 2 parameters

fun <P1, P2, P3> component(func: VDom.(P1, P2, P3) -> Unit): Tag.(P1, P2, P3) -> Unit

Creates a functional component with 3 parameters

fun <P1, P2, P3, P4> component(func: VDom.(P1, P2, P3, P4) -> Unit): Tag.(P1, P2, P3, P4) -> Unit

Creates a functional component with 4 parameters

fun <P1, P2, P3, P4, P5> component(func: VDom.(P1, P2, P3, P4, P5) -> Unit): Tag.(P1, P2, P3, P4, P5) -> Unit

Creates a functional component with 5 parameters

fun <P1, P2, P3, P4, P5, P6> component(func: VDom.(P1, P2, P3, P4, P5, P6) -> Unit): Tag.(P1, P2, P3, P4, P5, P6) -> Unit

Creates a functional component with 6 parameters

fun <P1, P2, P3, P4, P5, P6, P7> component(func: VDom.(P1, P2, P3, P4, P5, P6, P7) -> Unit): Tag.(P1, P2, P3, P4, P5, P6, P7) -> Unit

Creates a functional component with 7 parameters

fun <P1, P2, P3, P4, P5, P6, P7, P8> component(func: VDom.(P1, P2, P3, P4, P5, P6, P7, P8) -> Unit): Tag.(P1, P2, P3, P4, P5, P6, P7, P8) -> Unit

Creates a functional component with 8 parameters

Link copied to clipboard
fun CommonAttributeGroupFacade.data(id: String): String?

Gets the "data-id" attribute

fun CommonAttributeGroupFacade.data(id: String, value: String)

Sets the "data-id" attribute to value

Link copied to clipboard
fun CommonAttributeGroupFacade.debugId(): String?

Gets the "debug-id" attribute

fun CommonAttributeGroupFacade.debugId(id: String)

Sets the "debug-id" attribute to id

Link copied to clipboard
fun CommonAttributeGroupFacade.onAnimationEnd(handler: (Event) -> Unit)

Adds an onAnimationEnd handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onBlur(handler: (Event) -> Unit)

Adds an onBlur handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onChange(handler: (Event) -> Unit)

Adds an onChange handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onClick(handler: (MouseEvent) -> Unit)

Adds an onClick handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onError(handler: (Event) -> Unit)

Adds an onClick handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onFocus(handler: (FocusEvent) -> Unit)

Adds an onFocus handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onFocusIn(handler: (FocusEvent) -> Unit)

Add an onFocusIn handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onFocusOut(handler: (FocusEvent) -> Unit)

Add an onFocusOut handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onInput(handler: (InputEvent) -> Unit)

Adds an onInput handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onKeyDown(handler: (KeyboardEvent) -> Unit)

Adds an onKeyDown handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onKeyPress(handler: (KeyboardEvent) -> Unit)

Adds an onKeyPress handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onKeyUp(handler: (KeyboardEvent) -> Unit)

Adds an onKeyUp handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseDown(handler: (MouseEvent) -> Unit)

Adds an onMouseDown handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseEnter(handler: (MouseEvent) -> Unit)

Adds an onMouseDown handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseLeave(handler: (MouseEvent) -> Unit)

Adds an onMouseDown handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseMove(handler: (MouseEvent) -> Unit)

Adds an onMouseMove handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseOut(handler: (MouseEvent) -> Unit)

Adds an onMouseOut handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseOver(handler: (MouseEvent) -> Unit)

Adds an onMouseOver handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onMouseUp(handler: (MouseEvent) -> Unit)

Adds an onMouseUp handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onSelect(handler: (InputEvent) -> Unit)

Add an onSelect handler.

Link copied to clipboard
fun CommonAttributeGroupFacade.onSubmit(handler: (Event) -> Unit)

onSubmit handler

Link copied to clipboard
inline fun <P> VDom.subscribingTo(stream: Stream<P>): ReadOnlyProperty<Any?, P>
Link copied to clipboard
inline fun <P> VDom.value(initial: P): ObservableProperty<P>

Properties

Link copied to clipboard
var CommonAttributeGroupFacade.key: String

Markup Element key