PageCollection

interface PageCollection

Page management API with navigation, duplication, and visibility. Exposes reactive state and typed lookup of page editors.

Properties

Link copied to clipboard
abstract val state: Live<PageCollectionState>

Reactive state of pages, including active page and visibility.

Functions

Link copied to clipboard
abstract fun all(): List<PageEditor>

All page editors for current pages.

Link copied to clipboard
abstract fun at(index: Int): PageEditor?

Page editor at a given index, or null.

Link copied to clipboard
abstract fun duplicate(page: Page?, newName: String): Page?

Duplicate a page instance with a new name.

abstract fun duplicate(page: String?, newName: String): Page?

Duplicate a page addressed by key with a new name.

Link copied to clipboard
abstract fun find(key: String?): PageEditor?

Find a page editor by id or name, or return null if missing.

Link copied to clipboard
abstract fun navigate(page: Page?): Page?

Navigate to a page instance and return it.

abstract fun navigate(page: String?): Page?

Navigate to a page by id/name and return the resolved page.

Link copied to clipboard
abstract fun raw(): List<Page>

Raw underlying pages in source order.

Link copied to clipboard
abstract fun setHidden(key: String?, value: Boolean): Page?

Set hidden flag on a page by key; returns the updated page or null.