import interface PresentationState; import interface PresentationMount; import interface StateFactory; external atom PresentationMountRecord id "presentation-mount-record"; package PresentationRuntime id "presentation-runtime" revision "presentation-runtime@1" { function createPresentationMount id "presentation-runtime:create" : unit -> interface-ref execution transaction targets [browser,server] requires { creation presentationMount id "presentationMount" : PresentationMountRecord input unit; }; operation attach id "presentation-runtime:attach" : interface-ref -> unit mode call execution transaction targets [browser,server] receiver any requires { edge members id "members" : many-unique interface PresentationState [resolve,connect]; edge root id "root" : optional-one interface PresentationState [resolve,connect]; interface metadata id "state" : PresentationState using [presentationMount.resolve,parent.resolve] from input; }; operation ensure id "presentation-runtime:ensure" : record {presentationMount:interface-ref;occurrence:string;parent:optional>;} -> ref mode call execution transaction targets [browser,server] receiver any requires { edge states id "states" : many-unique object Navigation [resolve,connect]; interface metadata id "state" : PresentationState using [occurrence.get,presentationMount.resolve,parent.resolve] from input; interface presentationMount id "presentationMount" : PresentationMount using [attach.call] from input; interface factory id "factory" : StateFactory using [create.call]; }; function createState id "presentation-runtime:create-state" : record {occurrence:string;parent:optional>;} -> ref execution transaction targets [browser,server] requires { creation navigation id "navigation" : Navigation input record {occurrence:string;parent:optional>;}; }; }