Skip to content

Commit

Permalink
chore(examples): use lipgloss/v2 in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 29, 2024
1 parent e87602b commit 64329a9
Show file tree
Hide file tree
Showing 33 changed files with 39 additions and 36 deletions.
2 changes: 1 addition & 1 deletion examples/altscreen-toggle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

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

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/autocomplete/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/charmbracelet/bubbles/v2/key"
"github.com/charmbracelet/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/capability/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

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

type model struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/chat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/charmbracelet/bubbles/v2/textarea"
"github.com/charmbracelet/bubbles/v2/viewport"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/composable-views/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/charmbracelet/bubbles/v2/spinner"
"github.com/charmbracelet/bubbles/v2/timer"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

/*
Expand Down
2 changes: 1 addition & 1 deletion examples/credit-card-form/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/glamour/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/charmbracelet/bubbles/v2/viewport"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/glamour"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

const content = `
Expand Down
5 changes: 3 additions & 2 deletions examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module examples
go 1.23.1

require (
github.com/charmbracelet/bubbles/v2 v2.0.0-alpha.1.0.20241024212941-12271df0271a
github.com/charmbracelet/bubbles/v2 v2.0.0-alpha.1.0.20241029195424-db64e3cd782c
github.com/charmbracelet/bubbletea/v2 v2.0.0-alpha.1.0.20241024164833-a31857d07198
github.com/charmbracelet/colorprofile v0.1.3
github.com/charmbracelet/glamour v0.8.0
github.com/charmbracelet/harmonica v0.2.0
github.com/charmbracelet/lipgloss v0.13.2-0.20241023173701-23b08d1d3588
github.com/charmbracelet/lipgloss/v2 v2.0.0-20241029194924-049a2d260c67
github.com/charmbracelet/x/ansi v0.4.0
github.com/charmbracelet/x/exp/teatest/v2 v2.0.0-20241016014612-3b4d04043233
github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776
Expand All @@ -22,6 +22,7 @@ require (
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymanbagabas/go-udiff v0.2.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/charmbracelet/lipgloss v0.13.2-0.20241023173701-23b08d1d3588 // indirect
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 // indirect
github.com/charmbracelet/x/input v0.2.0 // indirect
github.com/charmbracelet/x/term v0.2.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWp
github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/charmbracelet/bubbles/v2 v2.0.0-alpha.1.0.20241024212941-12271df0271a h1:HhnouTclU//H0P7ec2mtiMhlWL7zCfFgcrWruvVIv0Y=
github.com/charmbracelet/bubbles/v2 v2.0.0-alpha.1.0.20241024212941-12271df0271a/go.mod h1:VEdxVsfMDila6ynCQhmhBLsQK2KCpI1sItJKi92aANQ=
github.com/charmbracelet/bubbles/v2 v2.0.0-alpha.1.0.20241029195424-db64e3cd782c h1:GQXDDexYp4Y0tPLMPT2UCdOvEt1eX125BlU2KaJ+AtA=
github.com/charmbracelet/bubbles/v2 v2.0.0-alpha.1.0.20241029195424-db64e3cd782c/go.mod h1:m1OsgLhZIiKx3O0R51XwnXwwm9vP/LFa8IBUMQiiZmw=
github.com/charmbracelet/colorprofile v0.1.3 h1:8l1qSZyfr/36f4ouijjpvMsbsIPzVrSC3q/XWoWQSDc=
github.com/charmbracelet/colorprofile v0.1.3/go.mod h1:1htIKZYeI4TQs+OykPvpuBTUbUJxBYeSYBDIZuejMj0=
github.com/charmbracelet/glamour v0.8.0 h1:tPrjL3aRcQbn++7t18wOpgLyl8wrOHUEDS7IZ68QtZs=
Expand All @@ -24,6 +24,8 @@ github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG
github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao=
github.com/charmbracelet/lipgloss v0.13.2-0.20241023173701-23b08d1d3588 h1:P0eMGSpqhHhVEN9HRD9Dl0ZaXIJWHINkW4DjPC/0EIQ=
github.com/charmbracelet/lipgloss v0.13.2-0.20241023173701-23b08d1d3588/go.mod h1:S+zi6HCChYq08TKQZpf3KEi7D/RO62JjxwNXbv6KVxA=
github.com/charmbracelet/lipgloss/v2 v2.0.0-20241029194924-049a2d260c67 h1:t/4KovO/31pdh9e74EVGVSbIlcY3bG4lmtrL3pD4fgU=
github.com/charmbracelet/lipgloss/v2 v2.0.0-20241029194924-049a2d260c67/go.mod h1:EcAf9+4/UeilG4rNQmiRzrou258LAVjVK4YUh+BvfqQ=
github.com/charmbracelet/x/ansi v0.4.0 h1:NqwHA4B23VwsDn4H3VcNX1W1tOmgnvY1NDx5tOXdnOU=
github.com/charmbracelet/x/ansi v0.4.0/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw=
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ=
Expand Down
2 changes: 1 addition & 1 deletion examples/help/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/charmbracelet/bubbles/v2/help"
"github.com/charmbracelet/bubbles/v2/key"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

// keyMap defines a set of keybindings. To work for help it must satisfy
Expand Down
2 changes: 1 addition & 1 deletion examples/list-default/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

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

var docStyle = lipgloss.NewStyle().Margin(1, 2)
Expand Down
2 changes: 1 addition & 1 deletion examples/list-fancy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/charmbracelet/bubbles/v2/key"
"github.com/charmbracelet/bubbles/v2/list"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

type styles struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/list-simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

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

const listHeight = 14
Expand Down
2 changes: 1 addition & 1 deletion examples/package-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/charmbracelet/bubbles/v2/progress"
"github.com/charmbracelet/bubbles/v2/spinner"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

type model struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/pager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

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

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/paginator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/charmbracelet/bubbles/v2/paginator"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"

tea "github.com/charmbracelet/bubbletea/v2"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/pipe/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

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

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/prevent-quit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/charmbracelet/bubbles/v2/key"
"github.com/charmbracelet/bubbles/v2/textarea"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/progress-animated/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

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

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/progress-download/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

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

var helpStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#626262")).Render
Expand Down
2 changes: 1 addition & 1 deletion examples/progress-static/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

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

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/send-msg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

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

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/set-terminal-color/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/charmbracelet/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
"github.com/lucasb-eyer/go-colorful"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/set-window-title/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"

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

const windowTitle = "Hello, Bubble Tea"
Expand Down
2 changes: 1 addition & 1 deletion examples/spinner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

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

type errMsg error
Expand Down
2 changes: 1 addition & 1 deletion examples/spinners/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

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

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/split-editors/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/charmbracelet/bubbles/v2/key"
"github.com/charmbracelet/bubbles/v2/textarea"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions examples/table-resize/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"

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

// Pokemon types.
Expand Down
2 changes: 1 addition & 1 deletion examples/table/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

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

var baseStyle = lipgloss.NewStyle().
Expand Down
2 changes: 1 addition & 1 deletion examples/tabs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

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

type styles struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/textinputs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/charmbracelet/bubbles/v2/cursor"
"github.com/charmbracelet/bubbles/v2/textinput"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/tui-daemon-combo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/charmbracelet/bubbles/v2/spinner"
tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
"github.com/mattn/go-isatty"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/views/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

tea "github.com/charmbracelet/bubbletea/v2"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/lipgloss/v2"
"github.com/fogleman/ease"
"github.com/lucasb-eyer/go-colorful"
)
Expand Down

0 comments on commit 64329a9

Please sign in to comment.