This version of the module is deprecated: This package is deprecated. moonbit-community/proton should be preferred.

    #proton/manifest

    justjavac/proton/manifest defines the runtime manifest types shared by bootstrap, native handoff, and the root facade.

    It is a data package. Parsing belongs in bootstrap; application lifecycle belongs in the root proton facade.

    AppEntry

    pub(all) enum AppEntry {
    Html(String)
    Url(String)
    File(String)
    Asset(String)
    } derive(Eq,
    Debug
    )

    Declarative entry content loaded into a Proton application window.
    impl Show for AppEntry

    AppManifest

    pub struct AppManifest {
    window : WindowManifest
    entry : AppEntry
    windows : Array[AppWindowManifest]
    debug : Int
    extensions : Map[String, ExtensionSetting]
    }

    Declarative application manifest consumed by the runtime.

    AppManifest::extension_setting

    fn AppManifest::extension_setting(self : AppManifest, name : String) -> ExtensionSetting?

    Returns one configured extension setting, if present in the manifest. It returns None when the manifest does not mention the extension key at all.

    AppManifest::extension_settings

    fn AppManifest::extension_settings(self : AppManifest) -> Array[(String, ExtensionSetting)]

    Returns the configured extension entries as name/setting pairs. Each pair contains the manifest key together with its normalized declarative enablement state and optional JSON options.

    AppManifest::new

    fn AppManifest::new(window : WindowManifest, entry : AppEntry, debug? : Int, windows? : Array[AppWindowManifest], extensions? : Map[String, ExtensionSetting]) -> AppManifest

    Builds an app manifest. The defaults match the minimal declarative shape accepted by bootstrap so callers can opt into debug, extra windows, or extensions incrementally.

    AppWindowManifest

    pub struct AppWindowManifest {
    id : String
    window : WindowManifest
    entry : AppEntry
    } derive(Eq,
    Debug
    )

    Declarative secondary window entry consumed by runtime manifests.

    AppWindowManifest::new

    fn AppWindowManifest::new(id : String, window : WindowManifest, entry : AppEntry) -> AppWindowManifest

    Builds a declarative secondary window entry. Secondary windows keep their own id, window settings, and entry payload in the manifest document.

    ExtensionSetting

    pub(all) enum ExtensionSetting {
    Disabled
    Enabled(Json?)
    } derive(Eq,
    Debug
    )

    Runtime extension setting produced from MoonBit app code.

    ExtensionSetting::disabled

    Builds a disabled extension setting. Use this when the manifest should preserve an explicit opt-out entry.

    ExtensionSetting::enabled

    fn ExtensionSetting::enabled(options? : Json?) -> ExtensionSetting

    Builds an enabled extension setting with optional JSON options. Pass Some(json) when the extension needs structured manifest-time configuration.

    ExtensionSetting::is_enabled

    fn ExtensionSetting::is_enabled(self : ExtensionSetting) -> Bool

    Returns whether this setting enables an extension. This treats every Enabled(...) variant as active regardless of whether it also carries JSON options.

    ExtensionSetting::options

    fn ExtensionSetting::options(self : ExtensionSetting) -> Json?

    Returns the optional JSON options carried by an enabled extension setting. Disabled settings always return None so callers can branch on one accessor.

    TitlebarStyle

    pub(all) enum TitlebarStyle {
    Default
    Overlay
    } derive(Eq,
    Debug
    )

    Controls whether web content remains below or extends beneath the native titlebar. Platforms without overlay support keep the default titlebar.

    WindowManifest

    pub struct WindowManifest {
    title : String
    width : Int
    height : Int
    size_hint : WindowSizeHint
    titlebar_style : TitlebarStyle
    } derive(Eq,
    Debug
    )

    Declarative window settings consumed by runtime manifests.

    WindowManifest::new

    fn WindowManifest::new(title : String, width : Int, height : Int, size_hint? : WindowSizeHint, titlebar_style? : TitlebarStyle) -> WindowManifest

    Builds a manifest window configuration. This is the declarative window shape consumed by bootstrap and later turned into runtime WindowConfig values.

    WindowSizeHint

    pub(all) enum WindowSizeHint {
    None
    Fixed
    Min
    Max
    } derive(Eq,
    Debug
    )

    Declarative sizing hint used by manifest windows.