Prove PresentationMount with authored generic graph operations
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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<PresentationMount> execution transaction targets [browser,server] requires {
|
||||
creation presentationMount id "presentationMount" : PresentationMountRecord input unit;
|
||||
};
|
||||
operation attach id "presentation-runtime:attach" : interface-ref<PresentationState> -> 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<object Navigation implements PresentationState> id "presentation-runtime:ensure" : record {presentationMount:interface-ref<PresentationMount>;occurrence:string;parent:optional<interface-ref<PresentationState>>;} -> ref<Navigation> 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<Navigation> using [create.call];
|
||||
};
|
||||
function createState<object Navigation> id "presentation-runtime:create-state" : record {occurrence:string;parent:optional<interface-ref<PresentationState>>;} -> ref<Navigation> execution transaction targets [browser,server] requires {
|
||||
creation navigation id "navigation" : Navigation input record {occurrence:string;parent:optional<interface-ref<PresentationState>>;};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user