Package-level declarations

Types

Link copied to clipboard
class CheckboxState(initialChecked: Boolean = false)

Caller-owned owner-thread selected state for one Checkbox.

Link copied to clipboard
sealed class ColumnScope : UiScope

Callback-lifetime scope for emitting and configuring direct column children.

Link copied to clipboard

Privileged idempotent release for one retained component-state observer.

Link copied to clipboard
class CycleButtonState<T : Any>(values: List<T>, initialValue: T)

Caller-owned selected value and display conversion for one generic CycleButton.

Link copied to clipboard
sealed class GridScope : UiScope

Callback-lifetime scope for emitting and configuring direct grid children.

Link copied to clipboard

Typed nearest-sampled mapping from one immutable image to destination bounds.

Link copied to clipboard
sealed interface ImageSource

Platform-neutral source for an image component or image-backed modifier.

Link copied to clipboard
sealed interface NineSliceCenterMode

Immutable nearest-sampled mapping policy for expandable nine-slice segments.

Link copied to clipboard
sealed interface PlayerSkinSource

Platform-neutral source for a player skin used by PlayerHead.

Link copied to clipboard
sealed class RowScope : UiScope

Callback-lifetime scope for emitting and configuring direct row children.

Link copied to clipboard
data class ScrollMetrics(val offset: Double = 0.0, val viewportExtent: Int = 0, val contentExtent: Int = 0)

Immutable geometry snapshot shared by one scroll area and any linked scrollbars.

Link copied to clipboard
class ScrollState(initialOffset: Double = 0.0)

Caller-owned mutable position shared by a scroll area and zero or more independent scrollbars.

Link copied to clipboard

Privileged owner-thread observer identity shared with one retained scroll node.

Link copied to clipboard
class SelectionListState<K : Any>(val listState: VirtualListState<K> = VirtualListState(), initialSelection: K? = null)

Caller-owned owner-thread selection and navigation state for a generic SelectionList.

Link copied to clipboard
class SliderState(initialValue: Double, val range: ClosedFloatingPointRange<Double> = 0.0..1.0, val steps: Int = 0)

Caller-owned owner-thread numeric state for one Slider.

Link copied to clipboard
sealed interface SlotBinding

Immutable declarative locator for one synchronized inventory slot.

Link copied to clipboard
object Slots

Creates immutable synchronized slot locators without retaining a player, menu, or platform.

Link copied to clipboard
sealed class StackScope : UiScope

Callback-lifetime scope for emitting and configuring direct stack children.

Link copied to clipboard

Marks the receiver scopes that participate in the Strata declarative UI builder. The marker prevents declarations from unrelated nested Strata scopes from being used accidentally through an outer receiver.

Link copied to clipboard
sealed interface TabSelectionIndicator

Visual indicator rendered by a selected Tab.

Link copied to clipboard
class TextFieldState(initialValue: String = "", val maxLength: Int = 32)

Owner-thread mutable value for one single-line text field.

Link copied to clipboard

Closed profile-backed color and shadow policy for text components.

Link copied to clipboard
sealed class UiScope

Callback-lifetime scope used to emit immutable element descriptions. A scope is confined to the thread that constructs it and remains valid only while its enclosing component callback is running. The scope temporarily retains references to caller-owned immutable Element instances and the builder returns the exact single root instance. The protected constructor is reserved for scope implementations in this module and package, as required by Kotlin's sealed hierarchy rules. Application code cannot construct or implement this sealed scope.

Link copied to clipboard
class VirtualListState<K : Any>(val scrollState: ScrollState = ScrollState(), initialIndex: Int? = null)

Caller-owned owner-thread navigation state shared by one VirtualList and optional independent Scrollbar.

Functions

Link copied to clipboard
fun UiScope.Button(label: UiText, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one fixed-height profile-backed pointer button.

fun UiScope.Button(label: String, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one literal fixed-height profile-backed pointer button.

Link copied to clipboard
fun UiScope.Checkbox(label: UiText, state: CheckboxState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one Minecraft-profile Checkbox backed by caller-owned state.

fun UiScope.Checkbox(label: String, state: CheckboxState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Literal-label overload of Checkbox.

Link copied to clipboard
fun UiScope.Column(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, spacing: Int = 0, verticalArrangement: Arrangement = Arrangement.Start, horizontalAlignment: HorizontalAlignment = HorizontalAlignment.Start, content: ColumnScope.() -> Unit)

Emits one column container with the descriptions produced by its callback.

Link copied to clipboard
fun <T : Any> UiScope.CycleButton(state: CycleButtonState<T>, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, label: (T) -> UiText = { value -> UiText.Literal(state.formatKnownMember(value)) })

Emits one finite-option Minecraft-profile CycleButton.

Link copied to clipboard

Evaluates one component callback without installing a profile runtime.

Link copied to clipboard
fun UiScope.Grid(columns: Int, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, horizontalSpacing: Int = 0, verticalSpacing: Int = 0, contentAlignment: Alignment = Alignment.TopStart, content: GridScope.() -> Unit)

Emits one fixed-column grid with the descriptions produced by its callback.

Link copied to clipboard
fun UiScope.Image(source: ImageSource, size: IntSize? = null, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one immutable nearest-sampled image component.

fun UiScope.Image(source: ImageSource, sourceRegion: IntRect, size: IntSize = IntSize(sourceRegion.width, sourceRegion.height), modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one immutable nearest-sampled source region from an image.

Link copied to clipboard
fun UiScope.LoadingIndicator(size: IntSize = IntSize(10, 4), modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits the active Minecraft profile's discrete loading animation.

Link copied to clipboard
fun UiScope.PlayerHead(source: PlayerSkinSource = PlayerSkinSource.CurrentPlayer, size: Int = 24, showHat: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, loadingContent: UiScope.() -> Unit? = null, failureContent: UiScope.() -> Unit? = null)

Emits one square layered player head.

Link copied to clipboard
fun UiScope.ProgressBar(progress: Double, size: IntSize = IntSize(100, 12), modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one determinate Minecraft-profile progress bar.

Link copied to clipboard
fun UiScope.Row(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, spacing: Int = 0, horizontalArrangement: Arrangement = Arrangement.Start, verticalAlignment: VerticalAlignment = VerticalAlignment.Top, content: RowScope.() -> Unit)

Emits one row container with the descriptions produced by its callback.

Link copied to clipboard
fun UiScope.ScrollArea(state: ScrollState, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, scrollRate: Int = 9, content: UiScope.() -> Unit)

Emits one profile-backed scroll viewport containing exactly one root.

Link copied to clipboard
fun UiScope.Scrollbar(state: ScrollState, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one independently placed profile-backed vertical scrollbar linked to state.

Link copied to clipboard
fun <T : Any, K : Any> UiScope.SelectionList(items: List<T>, keyOf: (T) -> K, state: SelectionListState<K>, viewportSize: IntSize, rowHeight: Int, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, scrollRate: Int = 10, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a selectable fixed-row virtual list backed by an immutable in-memory snapshot.

Link copied to clipboard
fun UiScope.Slider(label: UiText, state: SliderState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one horizontal Minecraft-profile Slider backed by caller-owned state.

fun UiScope.Slider(label: String, state: SliderState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Literal-label overload of Slider.

Link copied to clipboard
fun UiScope.Slot(bind: SlotBinding? = null, highlightable: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.() -> Unit? = null)

Emits one 18 by 18 inventory slot with an optional item root or synchronized binding.

Link copied to clipboard
fun UiScope.Spacer(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one empty spacer component.

Link copied to clipboard
fun UiScope.Stack(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, contentAlignment: Alignment = Alignment.TopStart, content: StackScope.() -> Unit)

Emits one overlay stack with the descriptions produced by its callback.

Link copied to clipboard
fun UiScope.Tab(label: UiText, selected: Boolean, width: Int = 150, enabled: Boolean = true, indicator: TabSelectionIndicator = TabSelectionIndicator.Underline, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one externally controlled tab.

fun UiScope.Tab(label: String, selected: Boolean, width: Int = 150, enabled: Boolean = true, indicator: TabSelectionIndicator = TabSelectionIndicator.Underline, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Literal overload of Tab with the same ownership and failure contract.

Link copied to clipboard
fun UiScope.Text(text: UiText, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one single-line profile-backed text component.

fun UiScope.Text(text: String, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one literal single-line profile-backed text component.

Link copied to clipboard
fun UiScope.TextField(state: TextFieldState, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one 200 by 20 single-line text field.

fun UiScope.TextField(state: TextFieldState, size: IntSize, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one explicitly sized single-line text field.

Link copied to clipboard
fun <T : Any, K : Any> UiScope.VirtualList(items: List<T>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a fixed-row virtual viewport backed by an immutable in-memory list.

fun <T : Any, K : Any> UiScope.VirtualList(itemCount: () -> Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int?? = null, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a fixed-row virtual viewport backed by a caller-owned dynamic indexed source.

fun <T : Any, K : Any> UiScope.VirtualList(itemCount: Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int? = { target -> (0 until itemCount).firstOrNull { index -> keyAt(index) == target } }, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a fixed-row virtual viewport backed by a known finite indexed source.