msg

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package msg holds the decoupled messages that components emit through returned commands. Components never call app or domain logic directly; they announce intent here and the composition layer decides what to do.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivatedMsg

type ActivatedMsg struct {
	ID    string
	Index int
}

ActivatedMsg is emitted when the user activates the current selection (e.g. presses enter on a list row or menu item).

type ConfirmMsg

type ConfirmMsg struct {
	ID string
}

ConfirmMsg is emitted when a modal confirmation is accepted.

type DismissMsg

type DismissMsg struct {
	ID string
}

DismissMsg is emitted when a popup is dismissed or cancelled.

type SelectedMsg

type SelectedMsg struct {
	ID    string // identifies the emitting component
	Index int
}

SelectedMsg is emitted when a list-like component's selection changes.

type SubViewPoppedMsg

type SubViewPoppedMsg struct {
	ID    string // identifies the emitting container
	Depth int    // remaining drill depth after the pop (0 at the base view)
}

SubViewPoppedMsg is emitted when a multi-view container pops back out of an unnamed sub-view (a drill-down cascade), e.g. on esc.

type SubmitMsg

type SubmitMsg struct {
	ID    string
	Value string
}

SubmitMsg is emitted when an editor component submits its value.

type ViewSelectedMsg

type ViewSelectedMsg struct {
	ID    string // identifies the emitting container
	Index int    // position of the now-active view
	Name  string // name of the now-active view
}

ViewSelectedMsg is emitted when a multi-view container switches its active named view (e.g. the user cycles the tabs with [ or ]).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL