Renamed to elm-messenger/messenger-core. That is where the repository lives now. It has not been published as a package under the new name.
Versions published as linsyking/messenger-core still install under that name. 34 versions of 52 come from the new location (see their notes). 7 versions could not be recovered and cannot be installed.
General Model and Helper functions for Layers.
Abstract Layer Model.
Cannot be directedly modified. Used for storage.
Generate abstract layer by a concrete layer.
Initialize it with env and msg. Not very likely to be used. The messenger template will handle this for you automatically.
Handler Type.
A handler is used to handle the Component Msg sent to the layer.
Make handler for every type of component msg.
Handle a list of component msgs.
Note that for several list of component msgs with different types, you may have to use this function repeatedly.
init type sugar The initializing function for layer. It receives the environment, the initializing message, and returns the layer's data.
update type sugar
Determines the behaviour when a UserEvent is sent to the layer. This could include, but not limited to, a mouse click, a keyboard press, or most commonly a time tick (which means a specific amount of time has passed, see the manual). In most cases you should distribute the events to the components belonging to the group.
Receives the environment env, the UserEvent evnt, the currect data of the layer ,and returns a structure in (Data ,List Msg, (Env, Bool)).
updaterec type sugar
Determines the behaviour when other components or layers sends messages to the layer. The layer then use the message to change its state, initializing components and/or send relavent message to its component.
Receives the environment env, the layer messages (defined in LayerBase.elm), the currect data, and returns a structure in (Data,List Msg, Env).
view type sugar Renders the layer. Note that there is no need for you to render the components of the layer. Instead, you can render the background of the map or the decoration of the windows here.
Receives the environment and the data of the layer.
Layer Storage
Not very likely to be used. The messenger template will handle this for you automatically.
This is a type sugar for dividing a long update function into smaller pieces to enhance code quality. It receives a ((Data,BaseData),List Msg, (Env,bool)) and returns a tuple of same kind. It is really similar to UpdateMiddleStep(which is in Component.elm), see the examples there.
This is a type sugar for dividing a long updateRec function into smaller pieces to enhance code quality. It receives a ((Data,BaseData),List Msg, Env) and returns a tuple of same kind. It is really similar to UpdateMiddleStep(which is in Component.elm), see the examples there.
Concrete Layer Model
Users deal with the fields in concrete model.