Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bubble/bubble.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"clx/favorites"
"clx/settings"

tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss/v2"
)

var docStyle = lipgloss.NewStyle()
Expand Down
6 changes: 3 additions & 3 deletions bubble/list/defaultitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

"github.com/nleeper/goment"

"github.com/charmbracelet/bubbles/key"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/bubbles/v2/key"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss/v2"
"github.com/muesli/reflow/truncate"
)

Expand Down
29 changes: 11 additions & 18 deletions bubble/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"clx/app"

"github.com/charmbracelet/bubbles/viewport"
"github.com/charmbracelet/bubbles/v2/viewport"

"clx/reader"

Expand All @@ -33,10 +33,10 @@ import (
"clx/tree"
"clx/validator"

"github.com/charmbracelet/bubbles/paginator"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/bubbles/v2/paginator"
"github.com/charmbracelet/bubbles/v2/spinner"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss/v2"
)

const (
Expand Down Expand Up @@ -153,11 +153,6 @@ func New(delegate ItemDelegate, config *settings.Config, cat *categories.Categor
p.Type = paginator.Dots
p.ActiveDot = styles.ActivePaginationDot.String()
p.InactiveDot = styles.InactivePaginationDot.String()
p.UseHLKeys = false
p.UseJKKeys = false
p.UseLeftRightKeys = false
p.UsePgUpPgDownKeys = false
p.UseUpDownKeys = false

bufferCategory := 1
items := make([][]*item.Item, numberOfCategories+bufferCategory)
Expand Down Expand Up @@ -449,9 +444,7 @@ func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd) {

heightOfHeaderAndStatusLine := 4

m.viewport = viewport.New(windowSizeMsg.Width, windowSizeMsg.Height-heightOfHeaderAndStatusLine)
m.viewport.YPosition = 2
m.viewport.HighPerformanceRendering = false
m.viewport = viewport.New(viewport.WithWidth(windowSizeMsg.Width), viewport.WithHeight(windowSizeMsg.Height-heightOfHeaderAndStatusLine))

content := lipgloss.NewStyle().
Width(windowSizeMsg.Width).
Expand Down Expand Up @@ -502,8 +495,8 @@ func (m *Model) Update(msg tea.Msg) (*Model, tea.Cmd) {
footerHeight := 2
verticalMarginHeight := headerHeight + footerHeight

m.viewport.Width = msg.Width
m.viewport.Height = msg.Height - verticalMarginHeight
m.viewport.SetWidth(msg.Width)
m.viewport.SetHeight(msg.Height - verticalMarginHeight)

m.width = msg.Width
m.height = msg.Height
Expand Down Expand Up @@ -648,8 +641,8 @@ func (m *Model) updateHelpScreen(msg tea.Msg) (*Model, tea.Cmd) {
footerHeight := lipgloss.Height("")
verticalMarginHeight := headerHeight + footerHeight

m.viewport.Width = msg.Width
m.viewport.Height = msg.Height - verticalMarginHeight
m.viewport.SetWidth(msg.Width)
m.viewport.SetHeight(msg.Height - verticalMarginHeight)

m.width = msg.Width
m.height = msg.Height
Expand All @@ -661,7 +654,7 @@ func (m *Model) updateHelpScreen(msg tea.Msg) (*Model, tea.Cmd) {

m.viewport.SetContent(content.String())

return m, viewport.Sync(m.viewport)
return m, nil

}

Expand Down
13 changes: 7 additions & 6 deletions bubble/list/style.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package list
import (
"time"

"github.com/charmbracelet/bubbles/spinner"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/bubbles/v2/spinner"
"github.com/charmbracelet/lipgloss/v2"
"github.com/charmbracelet/lipgloss/v2/compat"
)

const (
Expand Down Expand Up @@ -61,10 +62,10 @@ func DefaultStyles() (s Styles) {
// Faint(true)

s.FilterPrompt = lipgloss.NewStyle().
Foreground(lipgloss.AdaptiveColor{Light: "#04B575", Dark: "#ECFD65"})
Foreground(compat.AdaptiveColor{Light: lipgloss.Color("#04B575"), Dark: lipgloss.Color("#ECFD65")})

s.FilterCursor = lipgloss.NewStyle().
Foreground(lipgloss.AdaptiveColor{Light: "#EE6FF8", Dark: "#EE6FF8"})
Foreground(compat.AdaptiveColor{Light: lipgloss.Color("#EE6FF8"), Dark: lipgloss.Color("#EE6FF8")})

s.DefaultFilterCharacterMatch = lipgloss.NewStyle().Underline(true)

Expand All @@ -75,12 +76,12 @@ func DefaultStyles() (s Styles) {
s.StatusEmpty = lipgloss.NewStyle()

s.StatusBarActiveFilter = lipgloss.NewStyle().
Foreground(lipgloss.AdaptiveColor{Light: "#1a1a1a", Dark: "#dddddd"})
Foreground(compat.AdaptiveColor{Light: lipgloss.Color("#1a1a1a"), Dark: lipgloss.Color("#dddddd")})

s.StatusBarFilterCount = lipgloss.NewStyle()

s.NoItems = lipgloss.NewStyle().
Foreground(lipgloss.AdaptiveColor{Light: "#909090", Dark: "#626262"})
Foreground(compat.AdaptiveColor{Light: lipgloss.Color("#909090"), Dark: lipgloss.Color("#626262")})

s.ArabicPagination = lipgloss.NewStyle()

Expand Down
2 changes: 1 addition & 1 deletion bubble/ranking/ranking.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strconv"
"strings"

"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
"github.com/logrusorgru/aurora/v3"
)

Expand Down
39 changes: 20 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/MichaelMure/go-term-text v0.3.1
github.com/PuerkitoBio/goquery v1.10.3
github.com/bobesa/go-domain-util v0.0.0-20250410211237-17ab3b2f4a95
github.com/charmbracelet/bubbles v0.21.0
github.com/charmbracelet/bubbletea v1.3.10
github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1
github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.3
github.com/charmbracelet/glamour v0.10.0
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.1
github.com/go-resty/resty/v2 v2.16.5
github.com/go-shiori/go-readability v0.0.0-20250217085726-9f5bf5ca7612
github.com/jedib0t/go-pretty/v6 v6.6.8
Expand All @@ -24,41 +24,42 @@ require (
)

require (
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
github.com/andybalholm/cascadia v1.3.3 // indirect
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/charmbracelet/colorprofile v0.3.2 // indirect
github.com/charmbracelet/x/ansi v0.10.1 // indirect
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
github.com/charmbracelet/x/exp/slice v0.0.0-20250814162307-57b675fecd71 // indirect
github.com/charmbracelet/colorprofile v0.3.1 // indirect
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 // indirect
github.com/charmbracelet/x/ansi v0.8.0 // indirect
github.com/charmbracelet/x/cellbuf v0.0.14-0.20250501183327-ad3bc78c6a81 // indirect
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
github.com/charmbracelet/x/input v0.3.5-0.20250424101541-abb4d9a9b197 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/charmbracelet/x/windows v0.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.11.5 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c // indirect
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/spf13/pflag v1.0.9 // indirect
github.com/tkuchiki/go-timezone v0.2.3 // indirect
github.com/tkuchiki/go-timezone v0.2.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/yuin/goldmark v1.7.13 // indirect
github.com/yuin/goldmark-emoji v1.0.6 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.34.0 // indirect
golang.org/x/text v0.28.0 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.5 // indirect
golang.org/x/net v0.39.0 // indirect
golang.org/x/sync v0.13.0 // indirect
golang.org/x/sys v0.32.0 // indirect
golang.org/x/term v0.31.0 // indirect
golang.org/x/text v0.24.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading