Package-level declarations

Types

Link copied to clipboard
abstract class LifecycleViewModel(val subscribables: List<LifecycleSubscribable> = emptyList()) : ViewModel

Optional Compose-Multiplatform ViewModel base class for Kaluga lifecycle-aware features. Holds an opt-in list of LifecycleSubscribables; the screen-side @Composable calls AttachToCompose once and all of them get wired to the current Compose host's lifecycle.

Properties

Link copied to clipboard

Composition local exposing the macOS host's NSWindow. CMP 1.11+ provides WindowScope.window as a receiver only — there is no built-in composition local — so the host has to install one for any code below it that needs the window. Use ProvideNSWindow inside a Window { … } block:

Functions

Link copied to clipboard

Binds this subscribable to the current Compose host's lifecycle. Each platform actual dispatches based on the concrete subtype:

Drives every LifecycleSubscribable held by this view model from the current Compose host. Returns the receiver so call sites can chain: val vm = viewModel<X>().AttachToCompose().

Binds this subscribable to the current Compose host's lifecycle. Each platform actual dispatches based on the concrete subtype:

Binds this subscribable to the current Compose host's lifecycle. Each platform actual dispatches based on the concrete subtype:

Binds this subscribable to the current Compose host's lifecycle. Each platform actual dispatches based on the concrete subtype:

The web has no platform lifecycle owner (Activity/UIViewController/NSWindow) to bind to, so any LifecycleSubscribable is a no-op here — matching the documented behaviour for unrecognised subtypes.

Link copied to clipboard

Helper that lifts the WindowScope.window receiver onto LocalNSWindow so children can read it without being inside a WindowScope.