123456789101112131415161718192021222324252627282930313233343536373839404142434445464748open!Coreopen!Async_kernelopen!Bonsaiopen!ImportmoduletypeS=sigmoduleInput:TmoduleModel:sigtypet[@@derivingequal,sexp]valdefault:tendmoduleExtra:TmoduleAction:sigtypet[@@derivingsexp_of]endmoduleState:sigtypetvalcreate:unit->tendtypet=(Action.t,Model.t,State.t,Extra.t)Incr_dom.Component.with_extravalcreate:input:Input.tIncr.t->old_model:Model.toptionIncr.t->model:Model.tIncr.t->inject:(Action.t->unitVdom.Effect.t)->tIncr.tendmoduletypeTo_incr_dom=sig(** A wrapper to use Bonsai components in Incr_dom apps. *)moduletypeS=Svalconvert:('inputValue.t->Vdom.Node.tComputation.t)->(moduleSwithtypeInput.t='inputandtypeExtra.t=unit)valconvert_with_extra:('inputValue.t->(Vdom.Node.t*'extra)Computation.t)->(moduleSwithtypeInput.t='inputandtypeExtra.t='extra)end