ilyakooo0 / airlock / Ur.Run

This module contains functions to run your application with Urbit integration.

element : { init : ( model, Ur.Cmd.Cmd msg ), view : model -> Html msg, update : msg -> model -> ( model, Ur.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg, urbitSubscriptions : model -> Ur.Sub.Sub msg, createEventSource : String -> Platform.Cmd.Cmd (Msg msg), onEventSourceMsg : (Json.Decode.Value -> Msg msg) -> Platform.Sub.Sub (Msg msg), urbitUrl : model -> String } -> Program model msg

The same as Browser.element but with urbit stuff added around it.

document : { init : ( model, Ur.Cmd.Cmd msg ), view : model -> Browser.Document msg, update : msg -> model -> ( model, Ur.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg, urbitSubscriptions : model -> Ur.Sub.Sub msg, createEventSource : String -> Platform.Cmd.Cmd (Msg msg), onEventSourceMsg : (Json.Decode.Value -> Msg msg) -> Platform.Sub.Sub (Msg msg), urbitUrl : model -> String } -> Program model msg

The same as Browser.element but with urbit stuff added around it.

application : { init : Url -> Browser.Navigation.Key -> ( model, Ur.Cmd.Cmd msg ), view : model -> Browser.Document msg, update : msg -> model -> ( model, Ur.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg, urbitSubscriptions : model -> Ur.Sub.Sub msg, onUrlRequest : Browser.UrlRequest -> msg, onUrlChange : Url -> msg, createEventSource : String -> Platform.Cmd.Cmd (Msg msg), onEventSourceMsg : (Json.Decode.Value -> Msg msg) -> Platform.Sub.Sub (Msg msg), urbitUrl : model -> String } -> Program model msg

The same as Browser.element but with urbit stuff added around it.


type alias Program model msg =
Platform.Program Flags (Model model msg) (Msg msg)

A wrapper around your application Program.


type alias Model app msg =
{ subscriptions : SubDict msg
, subscriptionIntMapping : Dict Basics.Int ( String
, String
, List String )
, app : app
, connected : Basics.Bool
, eventId : Basics.Int
, flags : Flags
, requestsToRetry : List Ur.Requests.UrbitRequest
, sinks : Dict Basics.Int Ur.Types.Noun 
}

An Urbit wrapper around your application model.


type Msg msg

An Urbit wrapper around your application messages.