Package-level declarations

Self-contained sections of content — a shelf of issues, a list of articles — for building a screen of your own. A source says what a block shows and a layout how it is arranged; the block loads, paginates, retries and collapses on its own, and reports taps through a sealed event type without ever navigating. BlockPage stacks several blocks into one scrolling screen, with a single retry, empty state and pull-to-refresh across them.

Types

Link copied to clipboard
sealed interface ArticlesBlockEvent

What a user did in an articles block. The block never navigates, never opens a player and never mutates anything on the host's behalf: it reports, the host decides.

Link copied to clipboard

Which articles an ArticlesBlock shows.

Link copied to clipboard

How an ArticlesBlock arranges its articles — and with which cell, since not every cell suits every arrangement, so the two are chosen together and an impossible pair cannot be asked for.

Link copied to clipboard

Where a tapped item sat in its block, so the host can attribute the interaction without having to look the item up in a list it does not own.

Link copied to clipboard
annotation class BlockPageDsl

Restricts the block declaration DSL to its own scope.

Link copied to clipboard
interface BlockPageScope

Declares the blocks of a BlockPage.

Link copied to clipboard

How a cover cell of an IssuesBlock is drawn, in a carousel or a grid.

Link copied to clipboard
sealed interface IssuesBlockEvent

What a user did in an issues block. The block never navigates and never mutates anything on the host's behalf: it reports, the host decides. Downloading an issue or saving it for later are not reported — the SDK owns those records, so the cells' controls act on them directly, the way every SDK screen does.

Link copied to clipboard

Which issues an IssuesBlock shows.

Link copied to clipboard

How an IssuesBlock arranges its issues — and with which cell, since not every cell suits every arrangement, so the two are chosen together and an impossible pair cannot be asked for.

Functions

Link copied to clipboard
fun ArticlesBlock(onEvent: (ArticlesBlockEvent) -> Unit, modifier: Modifier = Modifier, source: ArticlesBlockSource = ArticlesBlockSource.all(), layout: ArticlesLayout = ArticlesLayout.list(), title: String? = null, showHeaderAction: Boolean = false, limit: Int? = null, header: @Composable () -> Unit? = null, footer: @Composable () -> Unit? = null)

A list of articles as a self-contained section: the whole catalogue, a publication's, an issue's.

Link copied to clipboard
fun BlockPage(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), onRefresh: suspend () -> Unit? = null, empty: @Composable () -> Unit? = null, content: BlockPageScope.() -> Unit)

A full screen composed of several blocks, scrolling as one.

Link copied to clipboard
fun IssuesBlock(onEvent: (IssuesBlockEvent) -> Unit, modifier: Modifier = Modifier, source: IssuesBlockSource = IssuesBlockSource.all(), layout: IssuesLayout = IssuesLayout.horizontal(), title: String? = null, showHeaderAction: Boolean = false, limit: Int? = null, header: @Composable () -> Unit? = null, footer: @Composable () -> Unit? = null)

A shelf of issues as a self-contained section: the whole catalogue, a publication's archives, one year of them.