Qualify typed presentation factories through public state interfaces
This commit is contained in:
@@ -6,6 +6,9 @@ import interface PresentationMount;
|
|||||||
import interface StateFactory;
|
import interface StateFactory;
|
||||||
external atom PresentationMountRecord id "presentation-mount-record";
|
external atom PresentationMountRecord id "presentation-mount-record";
|
||||||
package PresentationRuntime id "presentation-runtime" revision "presentation-runtime@1" {
|
package PresentationRuntime id "presentation-runtime" revision "presentation-runtime@1" {
|
||||||
|
function createReaderState id "presentation-runtime:create-reader-state" : record {occurrence:string;parent:optional<interface-ref<PresentationState>>;} -> interface-ref<ReaderNavigation> execution transaction targets [browser,server] requires {
|
||||||
|
creation navigation id "navigation" : ReaderNavigationRecord input record {occurrence:string;parent:optional<interface-ref<PresentationState>>;};
|
||||||
|
};
|
||||||
function createPresentationMount id "presentation-runtime:create" : unit -> interface-ref<PresentationMount> execution transaction targets [browser,server] requires {
|
function createPresentationMount id "presentation-runtime:create" : unit -> interface-ref<PresentationMount> execution transaction targets [browser,server] requires {
|
||||||
creation presentationMount id "presentationMount" : PresentationMountRecord input unit;
|
creation presentationMount id "presentationMount" : PresentationMountRecord input unit;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ workspace Example id "presentation-example" revision "presentation-example@1" co
|
|||||||
atom PresentationMountRecord id "presentation-mount-record";
|
atom PresentationMountRecord id "presentation-mount-record";
|
||||||
atom Library id "library";
|
atom Library id "library";
|
||||||
atom OtherLibrary id "other-library";
|
atom OtherLibrary id "other-library";
|
||||||
|
atom PublicLibrary id "public-library";
|
||||||
atom Document id "document";
|
atom Document id "document";
|
||||||
atom ReaderNavigationRecord id "reader-navigation-record";
|
atom ReaderNavigationRecord id "reader-navigation-record";
|
||||||
atom DocumentNavigationRecord id "document-navigation-record";
|
atom DocumentNavigationRecord id "document-navigation-record";
|
||||||
@@ -85,4 +86,10 @@ workspace Example id "presentation-example" revision "presentation-example@1" co
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
conform OtherLibrary as Presentation<atom ReaderNavigationRecord> id "other-library:presentation" {}
|
conform OtherLibrary as Presentation<atom ReaderNavigationRecord> id "other-library:presentation" {}
|
||||||
|
conform PublicLibrary as StateFactory<interface ReaderNavigation> id "public-reader:factory" {
|
||||||
|
bind create.call to package PresentationRuntime.createReaderState with {
|
||||||
|
navigation to creation ReaderNavigationRecord with {PresentationState from input;};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
conform PublicLibrary as Presentation<interface ReaderNavigation> id "public-library:presentation" {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user