package cc.unitmesh.xuiper.render.stateful import cc.unitmesh.xuiper.ir.NanoActionIR import cc.unitmesh.xuiper.ir.NanoIR /** * Optional shared recursion skeleton for stateful renderers. * * Why it exists: * - Compose / Jewel / HTML renderers all need the same pattern: * snapshot + action dispatcher + recursive node traversal. * - UI-specific concerns (e.g., Compose Modifier) are modeled as [P] (payload). */ class StatefulNanoTreeDispatcher
(
private val dispatch: (
node: NanoIR,
state: Map