ui

package
v0.0.0-...-b830f6f Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const RaceEnabled = false

RaceEnabled is false when not built with -race

Variables

This section is empty.

Functions

func AssertKeyHandled

func AssertKeyHandled(t *testing.T, setup *ModeTestSetup, keyType tea.KeyType, runes []rune, expectHandled bool, description string)

AssertKeyHandled checks if a key was handled as expected

func AssertModeChanged

func AssertModeChanged(t *testing.T, app *App, expectedMode ScreenModeType, description string)

AssertModeChanged checks if the mode changed as expected

func CreateKeyBinding

func CreateKeyBinding(keyType tea.KeyType, runes string) tea.KeyMsg

CreateKeyBinding is a helper to create key messages for testing

func EaseInBounce

func EaseInBounce(t float64) float64

func EaseInCubic

func EaseInCubic(t float64) float64

func EaseInOutCubic

func EaseInOutCubic(t float64) float64

func EaseInOutQuad

func EaseInOutQuad(t float64) float64

func EaseInQuad

func EaseInQuad(t float64) float64

func EaseOutBounce

func EaseOutBounce(t float64) float64

func EaseOutCubic

func EaseOutCubic(t float64) float64

func EaseOutQuad

func EaseOutQuad(t float64) float64

func Linear

func Linear(t float64) float64

Easing functions

func SimulateSelectedResource

func SimulateSelectedResource(app *App, resourceName string)

SimulateSelectedResource mocks having a selected resource in list mode

func TestKeyHandling

func TestKeyHandling(t *testing.T, setup *ModeTestSetup, keyType tea.KeyType, runes []rune) (bool, tea.Cmd)

TestKeyHandling tests a key press and returns whether it was handled

Types

type Animation

type Animation struct {
	ID         string
	StartTime  time.Time
	Duration   time.Duration
	Easing     EasingFunction
	From       interface{}
	To         interface{}
	Current    interface{}
	OnUpdate   func(interface{})
	OnComplete func()
	Completed  bool
}

Animation represents an ongoing animation

type AnimationManager

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

AnimationManager handles smooth transitions and animations

func NewAnimationManager

func NewAnimationManager() *AnimationManager

NewAnimationManager creates a new animation manager

func (*AnimationManager) Animate

func (am *AnimationManager) Animate(id string, from, to interface{}, onUpdate func(interface{}), onComplete func()) tea.Cmd

Animate starts a new animation

func (*AnimationManager) AnimateWithOptions

func (am *AnimationManager) AnimateWithOptions(id string, from, to interface{}, duration time.Duration, easing EasingFunction, onUpdate func(interface{}), onComplete func()) tea.Cmd

AnimateWithOptions starts an animation with custom options

func (*AnimationManager) Enable

func (am *AnimationManager) Enable(enabled bool)

Enable enables or disables animations

func (*AnimationManager) GetActiveAnimations

func (am *AnimationManager) GetActiveAnimations() []string

GetActiveAnimations returns the IDs of all active animations

func (*AnimationManager) IsAnimating

func (am *AnimationManager) IsAnimating(id string) bool

IsAnimating returns whether an animation is running

func (*AnimationManager) SetDuration

func (am *AnimationManager) SetDuration(duration time.Duration)

SetDuration sets the default animation duration

func (*AnimationManager) SetEasing

func (am *AnimationManager) SetEasing(easing EasingFunction)

SetEasing sets the default easing function

func (*AnimationManager) StopAllAnimations

func (am *AnimationManager) StopAllAnimations()

StopAllAnimations stops all animations

func (*AnimationManager) StopAnimation

func (am *AnimationManager) StopAnimation(id string)

StopAnimation stops an animation

func (*AnimationManager) Update

func (am *AnimationManager) Update(msg tea.Msg) tea.Cmd

Update processes animation messages

type AnimationMsg

type AnimationMsg struct {
	ID    string
	Value interface{}
	Done  bool
}

AnimationMsg represents an animation frame update

type App

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

App represents the main application model

func NewApp

func NewApp(ctx context.Context, k8sClient *k8s.Client, state *core.State, config *core.Config) *App

NewApp creates a new application instance

func NewAppWithMultiContext

func NewAppWithMultiContext(ctx context.Context, multiClient *k8s.MultiContextClient, state *core.State, config *core.Config) *App

NewAppWithMultiContext creates a new application instance with multi-context support

func (*App) Init

func (a *App) Init() tea.Cmd

Init initializes the application

func (*App) Update

func (a *App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles messages

func (*App) View

func (a *App) View() string

View renders the application

type BaseMode

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

BaseMode provides common functionality for screen modes

func (*BaseMode) GetTitle

func (m *BaseMode) GetTitle() string

func (*BaseMode) GetType

func (m *BaseMode) GetType() ScreenModeType

type ConfirmDialogMode

type ConfirmDialogMode struct {
	BaseMode
}

ConfirmDialogMode handles confirmation dialogs

func NewConfirmDialogMode

func NewConfirmDialogMode() *ConfirmDialogMode

func (*ConfirmDialogMode) GetHelpSections

func (m *ConfirmDialogMode) GetHelpSections() map[string][]KeyBinding

func (*ConfirmDialogMode) GetKeyBindings

func (m *ConfirmDialogMode) GetKeyBindings() map[string]KeyBinding

func (*ConfirmDialogMode) HandleKey

func (m *ConfirmDialogMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type ContainerSimulator

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

ContainerSimulator simulates a single container

type ContextSelectorMode

type ContextSelectorMode struct {
	BaseMode
}

ContextSelectorMode handles context selection

func NewContextSelectorMode

func NewContextSelectorMode() *ContextSelectorMode

func (*ContextSelectorMode) GetHelpSections

func (m *ContextSelectorMode) GetHelpSections() map[string][]KeyBinding

func (*ContextSelectorMode) GetKeyBindings

func (m *ContextSelectorMode) GetKeyBindings() map[string]KeyBinding

func (*ContextSelectorMode) HandleKey

func (m *ContextSelectorMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type DeploymentLogSimulator

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

DeploymentLogSimulator simulates logs for all pods in a deployment

func NewDeploymentLogSimulator

func NewDeploymentLogSimulator(name, namespace string, replicas int) *DeploymentLogSimulator

NewDeploymentLogSimulator creates a deployment log simulator

func (*DeploymentLogSimulator) StreamAllPodLogs

func (d *DeploymentLogSimulator) StreamAllPodLogs(ctx context.Context) map[string]<-chan string

StreamAllPodLogs streams logs from all pods in the deployment

type DescribeMode

type DescribeMode struct {
	BaseMode
}

DescribeMode handles the kubectl describe view

func NewDescribeMode

func NewDescribeMode() *DescribeMode

func (*DescribeMode) GetHelpSections

func (m *DescribeMode) GetHelpSections() map[string][]KeyBinding

func (*DescribeMode) GetKeyBindings

func (m *DescribeMode) GetKeyBindings() map[string]KeyBinding

func (*DescribeMode) HandleKey

func (m *DescribeMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type EasingFunction

type EasingFunction func(t float64) float64

EasingFunction defines animation easing

type HelpMode

type HelpMode struct {
	BaseMode
}

HelpMode handles the help view

func NewHelpMode

func NewHelpMode() *HelpMode

func (*HelpMode) GetHelpSections

func (m *HelpMode) GetHelpSections() map[string][]KeyBinding

func (*HelpMode) GetKeyBindings

func (m *HelpMode) GetKeyBindings() map[string]KeyBinding

func (*HelpMode) HandleKey

func (m *HelpMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type KeyBinding

type KeyBinding struct {
	Key         key.Binding
	Description string
	Section     string // For grouping in help
}

KeyBinding represents a key binding with help text

func NewKeyBinding

func NewKeyBinding(keys []string, help string, description string, section string) KeyBinding

Helper function to create key bindings

type KeyMap

type KeyMap struct {
	Up            key.Binding
	Down          key.Binding
	Left          key.Binding
	Right         key.Binding
	Enter         key.Binding
	Space         key.Binding
	Tab           key.Binding
	ShiftTab      key.Binding
	Delete        key.Binding
	Logs          key.Binding
	Help          key.Binding
	Quit          key.Binding
	Refresh       key.Binding
	ContextSwitch key.Binding
	SortToggle    key.Binding
}

KeyMap defines the key bindings

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings

type ListMode

type ListMode struct {
	BaseMode
}

ListMode handles the main resource list view

func NewListMode

func NewListMode() *ListMode

func (*ListMode) GetHelpSections

func (m *ListMode) GetHelpSections() map[string][]KeyBinding

func (*ListMode) GetKeyBindings

func (m *ListMode) GetKeyBindings() map[string]KeyBinding

func (*ListMode) HandleKey

func (m *ListMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type LoadingIndicator

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

LoadingIndicator provides animated loading states

func NewLoadingIndicator

func NewLoadingIndicator() *LoadingIndicator

NewLoadingIndicator creates a new loading indicator

func (*LoadingIndicator) SetFrames

func (li *LoadingIndicator) SetFrames(frames []string)

SetFrames sets custom loading frames

func (*LoadingIndicator) SetMessage

func (li *LoadingIndicator) SetMessage(message string)

SetMessage sets the loading message

func (*LoadingIndicator) SetStyle

func (li *LoadingIndicator) SetStyle(style lipgloss.Style)

SetStyle sets the loading indicator style

func (*LoadingIndicator) Start

func (li *LoadingIndicator) Start()

Start starts the loading animation

func (*LoadingIndicator) Stop

func (li *LoadingIndicator) Stop()

Stop stops the loading animation

func (*LoadingIndicator) Update

func (li *LoadingIndicator) Update() tea.Cmd

Update updates the loading indicator

func (*LoadingIndicator) View

func (li *LoadingIndicator) View() string

View renders the loading indicator

type LoadingTickMsg

type LoadingTickMsg struct{}

LoadingTickMsg represents a loading animation tick

type LogMode

type LogMode struct {
	BaseMode
}

LogMode handles the log view

func NewLogMode

func NewLogMode() *LogMode

func (*LogMode) GetHelpSections

func (m *LogMode) GetHelpSections() map[string][]KeyBinding

func (*LogMode) GetKeyBindings

func (m *LogMode) GetKeyBindings() map[string]KeyBinding

func (*LogMode) HandleKey

func (m *LogMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type LogStreamSimulator

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

LogStreamSimulator simulates log streaming for testing

func NewLogStreamSimulator

func NewLogStreamSimulator() *LogStreamSimulator

NewLogStreamSimulator creates a new log stream simulator

func (*LogStreamSimulator) AddPod

func (s *LogStreamSimulator) AddPod(name, namespace string, containers map[string][]string)

AddPod adds a pod with containers to the simulator

func (*LogStreamSimulator) SimulateError

func (s *LogStreamSimulator) SimulateError(podName string, err error)

SimulateError simulates an error for a specific pod

func (*LogStreamSimulator) SimulateMultiPodLogs

func (s *LogStreamSimulator) SimulateMultiPodLogs(ctx context.Context, deployment string, podLogs map[string][]string) map[string]<-chan string

SimulateMultiPodLogs simulates logs from multiple pods (e.g., deployment)

func (*LogStreamSimulator) SimulatePodLogs

func (s *LogStreamSimulator) SimulatePodLogs(ctx context.Context, podName, container string, logs []string) (<-chan string, <-chan error)

SimulatePodLogs simulates streaming logs for a specific pod/container

func (*LogStreamSimulator) VerifyStreamingBehavior

func (s *LogStreamSimulator) VerifyStreamingBehavior(t *testing.T, expected StreamingExpectation)

VerifyStreamingBehavior verifies that streaming behaves as expected

type LogStreamTestHelper

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

LogStreamTestHelper provides utilities for testing log streaming

func NewLogStreamTestHelper

func NewLogStreamTestHelper(t *testing.T) *LogStreamTestHelper

NewLogStreamTestHelper creates a new test helper

func (*LogStreamTestHelper) AssertLogsReceived

func (h *LogStreamTestHelper) AssertLogsReceived(logCh <-chan string, expected []string, timeout time.Duration)

AssertLogsReceived asserts that expected logs are received from a channel

func (*LogStreamTestHelper) AssertNoErrors

func (h *LogStreamTestHelper) AssertNoErrors(errCh <-chan error, timeout time.Duration)

AssertNoErrors asserts that no errors are received from error channel

func (*LogStreamTestHelper) AssertStreamingStops

func (h *LogStreamTestHelper) AssertStreamingStops(logCh <-chan string, timeout time.Duration)

AssertStreamingStops asserts that streaming stops within timeout

type MockK8sClient

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

MockK8sClient is a mock implementation of the K8s client for testing

func (*MockK8sClient) DeletePod

func (m *MockK8sClient) DeletePod(ctx context.Context, namespace, name string) error

DeletePod deletes a mock pod

func (*MockK8sClient) DescribePod

func (m *MockK8sClient) DescribePod(ctx context.Context, namespace, name string) (string, error)

DescribePod returns mock pod description

func (*MockK8sClient) GetContexts

func (m *MockK8sClient) GetContexts() ([]string, error)

GetContexts returns mock contexts

func (*MockK8sClient) GetCurrentContext

func (m *MockK8sClient) GetCurrentContext() string

GetCurrentContext returns the current mock context

func (*MockK8sClient) GetDeployments

func (m *MockK8sClient) GetDeployments(ctx context.Context, namespace string) ([]*appsv1.Deployment, error)

GetDeployments returns mock deployments

func (*MockK8sClient) GetNamespaces

func (m *MockK8sClient) GetNamespaces(ctx context.Context) ([]string, error)

GetNamespaces returns mock namespaces

func (*MockK8sClient) GetPodLogs

func (m *MockK8sClient) GetPodLogs(ctx context.Context, namespace, podName, containerName string, follow bool, tailLines int64) (io.ReadCloser, error)

GetPodLogs returns mock logs for a pod

func (*MockK8sClient) GetPods

func (m *MockK8sClient) GetPods(ctx context.Context, namespace string) ([]*v1.Pod, error)

GetPods returns mock pods

func (*MockK8sClient) GetServices

func (m *MockK8sClient) GetServices(ctx context.Context, namespace string) ([]*v1.Service, error)

GetServices returns mock services

func (*MockK8sClient) StreamPodLogs

func (m *MockK8sClient) StreamPodLogs(ctx context.Context, namespace, podName, containerName string) (<-chan string, <-chan error, error)

StreamPodLogs streams mock logs for a pod

func (*MockK8sClient) SwitchContext

func (m *MockK8sClient) SwitchContext(context string) error

SwitchContext switches to a different context

type MockLogViewSearchMode

type MockLogViewSearchMode struct {
	OriginalLogView *views.LogView
	InSearchMode    bool
}

MockLogViewSearchMode is a helper to simulate search mode in log view Since we can't directly access private fields, this is a best-effort approach

func SetupLogViewForSearchTest

func SetupLogViewForSearchTest(app *App) *MockLogViewSearchMode

SetupLogViewForSearchTest prepares log view for search mode testing

type MockMultiClient

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

MockMultiClient is a mock implementation of the multi-client for testing

func (*MockMultiClient) GetActiveContexts

func (m *MockMultiClient) GetActiveContexts() []string

GetActiveContexts returns the active contexts

func (*MockMultiClient) GetClientForContext

func (m *MockMultiClient) GetClientForContext(context string) (*k8s.Client, error)

GetClientForContext returns a mock client for a specific context

func (*MockMultiClient) GetPodsFromAllContexts

func (m *MockMultiClient) GetPodsFromAllContexts(ctx context.Context, namespace string) (map[string][]*v1.Pod, map[string]error)

GetPodsFromAllContexts returns pods from all contexts

func (*MockMultiClient) StreamLogsFromAllContexts

func (m *MockMultiClient) StreamLogsFromAllContexts(ctx context.Context, namespace, podName, containerName string) (map[string]<-chan string, map[string]<-chan error, map[string]error)

StreamLogsFromAllContexts streams logs from all contexts

type ModeTestSetup

type ModeTestSetup struct {
	App  *App
	Mode ScreenMode
}

ModeTestSetup provides utilities for setting up mode tests

func NewModeTestSetup

func NewModeTestSetup(t *testing.T, modeType ScreenModeType) *ModeTestSetup

NewModeTestSetup creates a test setup for a specific mode

type MultiContainerPodSimulator

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

MultiContainerPodSimulator simulates a pod with multiple containers

func NewMultiContainerPodSimulator

func NewMultiContainerPodSimulator(name, namespace string, containerNames []string) *MultiContainerPodSimulator

NewMultiContainerPodSimulator creates a simulator for multi-container pods

func (*MultiContainerPodSimulator) AddContainerLogs

func (m *MultiContainerPodSimulator) AddContainerLogs(containerName string, logs []string)

AddContainerLogs adds logs to a specific container

func (*MultiContainerPodSimulator) StreamContainerLogs

func (m *MultiContainerPodSimulator) StreamContainerLogs(ctx context.Context, containerName string) (<-chan string, error)

StreamContainerLogs streams logs for a specific container

type MultiContextLogSimulator

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

MultiContextLogSimulator simulates log streaming across multiple contexts

func NewMultiContextLogSimulator

func NewMultiContextLogSimulator(contexts []string) *MultiContextLogSimulator

NewMultiContextLogSimulator creates a multi-context log simulator

func (*MultiContextLogSimulator) AddPodToContext

func (m *MultiContextLogSimulator) AddPodToContext(context, podName, namespace string, containers map[string][]string)

AddPodToContext adds a pod to a specific context

func (*MultiContextLogSimulator) StreamLogsFromAllContexts

func (m *MultiContextLogSimulator) StreamLogsFromAllContexts(ctx context.Context, podName, container string) map[string]<-chan string

StreamLogsFromAllContexts streams logs from all contexts

func (*MultiContextLogSimulator) StreamLogsFromContext

func (m *MultiContextLogSimulator) StreamLogsFromContext(ctx context.Context, contextName, podName, container string) (<-chan string, <-chan error, error)

StreamLogsFromContext streams logs from a specific context

type NamespaceSelectorMode

type NamespaceSelectorMode struct {
	BaseMode
}

NamespaceSelectorMode handles namespace selection

func NewNamespaceSelectorMode

func NewNamespaceSelectorMode() *NamespaceSelectorMode

func (*NamespaceSelectorMode) GetHelpSections

func (m *NamespaceSelectorMode) GetHelpSections() map[string][]KeyBinding

func (*NamespaceSelectorMode) GetKeyBindings

func (m *NamespaceSelectorMode) GetKeyBindings() map[string]KeyBinding

func (*NamespaceSelectorMode) HandleKey

func (m *NamespaceSelectorMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type Notification

type Notification struct {
	ID       string
	Type     NotificationType
	Title    string
	Message  string
	Duration time.Duration
	ShowTime time.Time
	Style    lipgloss.Style
}

Notification represents a user notification

type NotificationManager

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

NotificationManager handles user notifications

func NewNotificationManager

func NewNotificationManager() *NotificationManager

NewNotificationManager creates a new notification manager

func (*NotificationManager) Clear

func (nm *NotificationManager) Clear()

Clear removes all notifications

func (*NotificationManager) Remove

func (nm *NotificationManager) Remove(id string)

Remove removes a notification by ID

func (*NotificationManager) Show

func (nm *NotificationManager) Show(notificationType NotificationType, title, message string, duration time.Duration)

Show displays a notification

func (*NotificationManager) View

func (nm *NotificationManager) View() string

View renders all visible notifications

type NotificationPosition

type NotificationPosition int

NotificationPosition defines where notifications appear

const (
	NotificationTopRight NotificationPosition = iota
	NotificationTopLeft
	NotificationBottomRight
	NotificationBottomLeft
	NotificationCenter
)

type NotificationType

type NotificationType int

NotificationType defines notification types

const (
	NotificationInfo NotificationType = iota
	NotificationSuccess
	NotificationWarning
	NotificationError
)

type PodLogSimulator

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

PodLogSimulator simulates logs for a single pod

type ProgressBar

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

ProgressBar provides animated progress indication

func NewProgressBar

func NewProgressBar(width int) *ProgressBar

NewProgressBar creates a new progress bar

func (*ProgressBar) SetProgress

func (pb *ProgressBar) SetProgress(progress float64)

SetProgress sets the progress value (0.0 to 1.0)

func (*ProgressBar) SetShowText

func (pb *ProgressBar) SetShowText(show bool)

SetShowText enables or disables progress text

func (*ProgressBar) SetText

func (pb *ProgressBar) SetText(text string)

SetText sets custom progress text

func (*ProgressBar) View

func (pb *ProgressBar) View() string

View renders the progress bar

type ResourceSelectorMode

type ResourceSelectorMode struct {
	BaseMode
}

ResourceSelectorMode handles resource type selection

func NewResourceSelectorMode

func NewResourceSelectorMode() *ResourceSelectorMode

func (*ResourceSelectorMode) GetHelpSections

func (m *ResourceSelectorMode) GetHelpSections() map[string][]KeyBinding

func (*ResourceSelectorMode) GetKeyBindings

func (m *ResourceSelectorMode) GetKeyBindings() map[string]KeyBinding

func (*ResourceSelectorMode) HandleKey

func (m *ResourceSelectorMode) HandleKey(msg tea.KeyMsg, app *App) (bool, tea.Cmd)

type ScreenMode

type ScreenMode interface {
	// GetType returns the mode type
	GetType() ScreenModeType

	// GetKeyBindings returns the key bindings for this mode
	GetKeyBindings() map[string]KeyBinding

	// HandleKey processes a key message and returns whether it was handled
	HandleKey(msg tea.KeyMsg, app *App) (handled bool, cmd tea.Cmd)

	// GetHelpSections returns organized help sections for this mode
	GetHelpSections() map[string][]KeyBinding

	// GetTitle returns the title for this mode (used in help)
	GetTitle() string
}

ScreenMode defines the interface for different screen modes

type ScreenModeType

type ScreenModeType int

ScreenModeType represents different screen modes

const (
	ModeList ScreenModeType = iota
	ModeLog
	ModeDescribe
	ModeHelp
	ModeContextSelector
	ModeNamespaceSelector
	ModeConfirmDialog
	ModeResourceSelector
)

type StreamingExpectation

type StreamingExpectation struct {
	ShouldStream       bool
	ExpectedPods       []string
	ExpectedContainers []string
	ExpectedLogLines   []string
	ExpectedErrors     []string
}

StreamingExpectation defines expected streaming behavior

type TransitionManager

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

TransitionManager handles view transitions

func NewTransitionManager

func NewTransitionManager(animationManager *AnimationManager) *TransitionManager

NewTransitionManager creates a new transition manager

func (*TransitionManager) GetCurrentView

func (tm *TransitionManager) GetCurrentView() string

GetCurrentView returns the current view ID

func (*TransitionManager) IsTransitioning

func (tm *TransitionManager) IsTransitioning() bool

IsTransitioning returns whether a transition is in progress

func (*TransitionManager) TransitionTo

func (tm *TransitionManager) TransitionTo(viewID string, transitionType TransitionType, onComplete func()) tea.Cmd

TransitionTo transitions to a new view

type TransitionType

type TransitionType int

TransitionType defines the type of transition

const (
	TransitionFade TransitionType = iota
	TransitionSlideLeft
	TransitionSlideRight
	TransitionSlideUp
	TransitionSlideDown
	TransitionZoom
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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