preview

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

func New

func New() Model

func (*Model) Apply added in v1.5.0

func (m *Model) Apply(msg UpdateMsg)

func (*Model) CleanUp added in v1.5.0

func (m *Model) CleanUp()

func (*Model) Close

func (m *Model) Close()

func (*Model) GetContent

func (m *Model) GetContent() string

func (*Model) GetContentHeight added in v1.5.0

func (m *Model) GetContentHeight() int

func (*Model) GetContentWidth added in v1.5.0

func (m *Model) GetContentWidth() int

func (*Model) GetLocation

func (m *Model) GetLocation() string

func (*Model) IsLoading added in v1.5.0

func (m *Model) IsLoading() bool

func (*Model) IsOpen

func (m *Model) IsOpen() bool

func (*Model) Open

func (m *Model) Open()

func (*Model) RenderText

func (m *Model) RenderText(text string) string

Only use this when height and width are synced with filemodel's expectations

func (*Model) RenderTextWithDimension added in v1.5.0

func (m *Model) RenderTextWithDimension(text string, height int, width int) string

func (*Model) RenderWithPath

func (m *Model) RenderWithPath(
	itemPath string,
	previewWidth int,
	previewHeight int,
	fullModelWidth int,
) (string, string)

RenderWithPath returns (render, rawTransmit). rawTransmit is non-empty for Kitty images (transmit data) or when clearing Kitty images (delete-all). It must be sent via tea.Raw().

func (*Model) SetEmptyWithDimensions added in v1.5.0

func (m *Model) SetEmptyWithDimensions(width int, height int)

func (*Model) SetLoading added in v1.5.0

func (m *Model) SetLoading()

func (*Model) SetLocation

func (m *Model) SetLocation(location string)

func (*Model) SetOpen

func (m *Model) SetOpen(open bool)

func (*Model) ToggleOpen

func (m *Model) ToggleOpen()

type UpdateMsg added in v1.5.0

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

func NewUpdateMsg added in v1.5.0

func NewUpdateMsg(location string, content string, rawTransmit string, width int, height int, reqID int) UpdateMsg

func (UpdateMsg) GetContentHeight added in v1.5.0

func (msg UpdateMsg) GetContentHeight() int

func (UpdateMsg) GetContentWidth added in v1.5.0

func (msg UpdateMsg) GetContentWidth() int

func (UpdateMsg) GetLocation added in v1.5.0

func (msg UpdateMsg) GetLocation() string

func (UpdateMsg) GetRawTransmit added in v1.6.0

func (msg UpdateMsg) GetRawTransmit() string

func (UpdateMsg) GetReqID added in v1.5.0

func (msg UpdateMsg) GetReqID() int

Jump to

Keyboard shortcuts

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