Package-level declarations

Types

Link copied to clipboard
data class CardDimensions(val width: Double, val height: Double, val xOffset: Double)

Computed dimensions and horizontal offset for a card in the layout.

Link copied to clipboard
data class CardLayoutItem(val identifier: String, val aspectRatio: Double = DEFAULT_ASPECT_RATIO)

Information about a card required for layout and positioning calculations.

Link copied to clipboard
data class CardListLayout(val cardDimensionsMap: Map<String, CardDimensions>, val defaultCardDimensions: CardDimensions, val listTopOffset: Double, val totalHeight: Double, val maxStackIndex: Int, val maxVisibleStackOffsets: Int, val detailBottomPadding: Double, val isTopContentEffectivelyVisible: Boolean, val effectiveTopContentHeight: Double)

Computed layout metadata for a card list container.

Link copied to clipboard

Pure, deterministic layout and visual state calculator for card lists.

Link copied to clipboard
data class CardListLayoutParameters(val viewportWidth: Double, val viewportHeight: Double, val cardMaxHeight: Double? = null, val paddingTop: Double = 16.0, val paddingBottom: Double = 16.0, val paddingHorizontal: Double = 16.0, val unfocusedVisiblePercent: Int = 25, val showStackWhileFocused: Boolean = true, val topContentHeight: Double = 0.0, val isTopContentVisible: Boolean = true, val topContentProgress: Double = 1.0, val scrollOffset: Double = 0.0, val stackOffset: Double = 14.0, val maxVisibleCardsInStack: Int = 5, val frontCardVisibleHeightFraction: Double = 0.25, val spacing: Double = 16.0)

Parameters configuring the layout calculations for a vertical card list.

Link copied to clipboard
sealed interface CardTapAction

Result of handling a tap on a card item.

Link copied to clipboard
data class CardVisualState(val y: Double, val scale: Double, val elevation: Double, val zIndex: Double, val alpha: Double)

Visual presentation state for a card at a given layout/interaction frame.

Link copied to clipboard
data class DragEndResult(val cardIdentifier: String, val newIndex: Int)

Result of completing a drag gesture.

Link copied to clipboard
data class DragUpdateResult(val reordered: Boolean, val fromIndex: Int = -1, val toIndex: Int = -1)

Result of updating a drag gesture.

Link copied to clipboard
class VerticalCardListModel(displayOrderIdentifiers: List<String> = emptyList(), draggedCardIdentifier: String? = null, dragCurrentY: Double = 0.0, dragJustEnded: Boolean = false, lastFocusedCardIdentifier: String? = null, animateListTransitions: Boolean = false, showTopContent: Boolean = true, showPlaceholderWhenEmpty: Boolean = true, topContentHeight: Double = 0.0, scrollOffset: Double = 0.0)

State model and interaction coordinator for a vertical card list.