Modal-overlay payload for the dashboard home screen.
Wraps the existing MingaEditor.Dashboard.state() map (cursor + items)
with the metadata every ModalOverlay variant carries. The dashboard is
global UX, so owner defaults to :global.
Scoped to the Traditional shell. Shell.Board.State declares
dashboard: nil in its typespec because Board does not surface the
dashboard; opening this variant while the active shell is Board would
violate that type. Callers that want a dashboard-style affordance on
Board should add a Board-specific variant rather than reusing this one.
Summary
Functions
Builds a dashboard payload wrapping the given dashboard state map.
Replaces the inner dashboard state on the payload, preserving owner and
opened_at. The only sanctioned way to update the inner state from
outside this module (Rule 2: state ownership).
Types
@type owner() :: term()
@type t() :: %MingaEditor.State.ModalOverlay.Dashboard{ opened_at: integer(), owner: owner(), state: MingaEditor.Dashboard.state() }
Functions
@spec new( MingaEditor.Dashboard.state(), keyword() ) :: t()
Builds a dashboard payload wrapping the given dashboard state map.
@spec put_state(t(), MingaEditor.Dashboard.state()) :: t()
Replaces the inner dashboard state on the payload, preserving owner and
opened_at. The only sanctioned way to update the inner state from
outside this module (Rule 2: state ownership).