feat: upgrade bubbletea, bubbles, and lipgloss to v2
SonarQube Scan / SonarQube Trigger (push) Successful in 5m41s
SonarQube Scan / SonarQube Trigger (push) Successful in 5m41s
- Migrate import paths from github.com/charmbracelet/* to charm.land/*/v2
- Replace tea.KeyMsg with tea.KeyPressMsg in all update handlers and tests
- Replace View() string return type with tea.View using declarative AltScreen
and MouseMode instead of tea.WithAltScreen()/tea.WithMouseCellMotion()
- Replace tea.WindowSize() with tea.RequestWindowSize in Init()
- Remove tea.ClearScreen from all tea.Batch() calls (removed in v2)
- Replace lipgloss.SetColorProfile(termenv.TrueColor) with
tea.WithColorProfile(colorprofile.TrueColor) in NewProgram options
- Replace ti.Width assignments with ti.SetWidth() method calls
- Update Redraw() to send tea.WindowSizeMsg{} instead of removed tea.ClearScreen
- Update test assertions to check view.Content instead of view directly
- Remove github.com/muesli/termenv dependency
This commit is contained in:
@@ -6,11 +6,11 @@ import (
|
||||
"tunnel_pls/internal/random"
|
||||
"tunnel_pls/types"
|
||||
|
||||
"github.com/charmbracelet/bubbles/help"
|
||||
"github.com/charmbracelet/bubbles/key"
|
||||
"github.com/charmbracelet/bubbles/list"
|
||||
"github.com/charmbracelet/bubbles/textinput"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"charm.land/bubbles/v2/help"
|
||||
"charm.land/bubbles/v2/key"
|
||||
"charm.land/bubbles/v2/list"
|
||||
"charm.land/bubbles/v2/textinput"
|
||||
tea "charm.land/bubbletea/v2"
|
||||
)
|
||||
|
||||
type commandItem struct {
|
||||
@@ -77,7 +77,7 @@ type keymap struct {
|
||||
type tickMsg time.Time
|
||||
|
||||
func (m *model) Init() tea.Cmd {
|
||||
return tea.Batch(textinput.Blink, tea.WindowSize())
|
||||
return tea.Batch(textinput.Blink, tea.RequestWindowSize)
|
||||
}
|
||||
|
||||
func getResponsiveWidth(screenWidth, padding, minWidth, maxWidth int) int {
|
||||
|
||||
Reference in New Issue
Block a user