Milano Host
fun MilanoHost(builder: MilanoViewBuilder, loading: @Composable () -> Unit = {}, failure: @Composable (Throwable) -> Unit = {})
The hosting container, for hosts that want the swap managed for them: presents the loading content immediately, awaits the build, replaces it with the MilanoView's content on success or the failure content on failure. Building starts once per composition lifetime; recompose a new MilanoHost to retry.
fun MilanoHost(documentText: String, vocabularyJson: String, renderers: Map<String, MilanoRenderer>, context: Map<String, MilanoValue> = emptyMap(), state: Map<String, MilanoValue> = emptyMap(), onAction: suspend (MilanoAction) -> MilanoValue?? = null, loading: @Composable () -> Unit = {}, failure: @Composable (Throwable) -> Unit = {})
The quick path: one composable from raw document and vocabulary text. Engine, registry, and builder are created inside; declared state is synthesized as zero-values (overridable via state); engine and build failures both land in the failure content. Ideal for a first integration or a simple embed; real apps share one engine and use the builder overload.