attachments

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachments

type Attachments struct {
	// contains filtered or unexported fields
}

func New

func New(renderer *Renderer, keyMap Keymap) *Attachments

func (*Attachments) HandleClick

func (m *Attachments) HandleClick(x, y, width int) bool

func (*Attachments) List

func (m *Attachments) List() []message.Attachment

func (*Attachments) Render

func (m *Attachments) Render(width int) string

func (*Attachments) Renderer

func (m *Attachments) Renderer() *Renderer

Renderer returns the attachment renderer so callers can update its styles in place.

func (*Attachments) Reset

func (m *Attachments) Reset()

func (*Attachments) Update

func (m *Attachments) Update(msg tea.Msg) bool

type Keymap

type Keymap struct {
	DeleteMode,
	DeleteAll,
	Escape key.Binding
}

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer(normalStyle, deletingStyle, imageStyle, textStyle, skillStyle lipgloss.Style) *Renderer

func (*Renderer) DeleteHit

func (r *Renderer) DeleteHit(attachments []message.Attachment, deleting bool, width, x, y int) (int, bool)

func (*Renderer) Render

func (r *Renderer) Render(attachments []message.Attachment, deleting bool, width int) string

func (*Renderer) RenderComposer

func (r *Renderer) RenderComposer(attachments []message.Attachment, deleting bool, width int) string

func (*Renderer) SetStyles

func (r *Renderer) SetStyles(normalStyle, deletingStyle, imageStyle, textStyle, skillStyle lipgloss.Style)

SetStyles updates the renderer styles in place.

Jump to

Keyboard shortcuts

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