Documentation
¶
Index ¶
- func ErrorCmd(text string) tea.Cmd
- func InfoCmd(text string) tea.Cmd
- func SuccessCmd(text string) tea.Cmd
- func WarningCmd(text string) tea.Cmd
- type AutoHideMsg
- type DismissMsg
- type HideMsg
- type Manager
- func (n *Manager) BodyHit(x, y int) (uint64, string, bool)
- func (n *Manager) CloseButtonHit(x, y int) (uint64, bool)
- func (n *Manager) CopyHit(x, y int) (uint64, string, bool)
- func (n *Manager) GetLayer() *lipgloss.Layer
- func (n *Manager) HandleClick(x, y int) tea.Cmd
- func (n *Manager) HandleMouseMotion(x, y int) (Manager, tea.Cmd)
- func (n *Manager) MarkCopied(id uint64) Manager
- func (n *Manager) Open() bool
- func (n *Manager) SetSize(width, height int)
- func (n *Manager) Update(msg tea.Msg) (Manager, tea.Cmd)
- func (n *Manager) View() string
- type ShowMsg
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SuccessCmd ¶
func WarningCmd ¶
Types ¶
type AutoHideMsg ¶ added in v1.70.1
AutoHideMsg is sent by a notification timer. The generation field prevents stale timers from hiding notifications after hover pause/restart.
type DismissMsg ¶ added in v1.70.1
type DismissMsg struct {
ID uint64
}
DismissMsg is sent when the user explicitly dismisses a notification.
type HideMsg ¶
type HideMsg struct {
ID uint64 // If 0, hides all notifications (backward compatibility)
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents a notification manager that displays multiple stacked messages in the bottom right corner of the screen.
func (*Manager) BodyHit ¶ added in v1.70.1
BodyHit checks whether the coordinates hit the body of a notification and returns its ID and text. The close button is excluded so dismiss priority can stay separate from click-to-copy behavior.
func (*Manager) CloseButtonHit ¶ added in v1.70.1
CloseButtonHit checks if the given screen coordinates hit a notification close glyph.
func (*Manager) CopyHit ¶ added in v1.70.1
CopyHit checks whether the coordinates hit the currently-hovered notification body and returns its ID and text. The close button is excluded so dismiss priority stays separate from click-to-copy behavior.
func (*Manager) HandleClick ¶ added in v1.41.0
HandleClick checks if the given screen coordinates hit a notification close button and returns a dismiss command when they do. Body clicks do not dismiss; callers can use CopyHit for additional behavior such as click-to-copy.
func (*Manager) HandleMouseMotion ¶ added in v1.70.1
HandleMouseMotion updates hover state. Entering an auto-hide notification invalidates its pending timer; leaving restarts a generation-safe timer.
func (*Manager) MarkCopied ¶ added in v1.70.1
MarkCopied records that the given notification was copied so View can show a transient copied label. The state is cleared when hover moves away or the item is removed.