Prove PresentationMount with authored generic graph operations

This commit is contained in:
Timothy J. Aveni
2026-09-25 11:30:14 -07:00
parent 73148d76e1
commit a83239892c
14 changed files with 244 additions and 0 deletions
+23
View File
@@ -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>>;};
};
}