on main help sign in
chore: update vendors
0a5339aAyman Bagabas
vendor/github.com/charmbracelet/bubbletea/v2/tea.go−2
@@ -320,12 +320,10 @@ type Program struct {
320
320
321 // where to read inputs from, this will usually be os.Stdin.
321 // where to read inputs from, this will usually be os.Stdin.
322 input io.Reader
322 input io.Reader
323− mu sync.Mutex
324 // ttyInput is null if input is not a TTY.
323 // ttyInput is null if input is not a TTY.
325 ttyInput term.File
324 ttyInput term.File
326 previousTtyInputState *term.State
325 previousTtyInputState *term.State
327 inputReader *uv.TerminalReader
326 inputReader *uv.TerminalReader
328− traceInput bool // true if input should be traced
329 readLoopDone chan struct{}
327 readLoopDone chan struct{}
330 mouseMode bool // indicates whether we should enable mouse on Windows
328 mouseMode bool // indicates whether we should enable mouse on Windows
331
329
vendor/github.com/charmbracelet/lipgloss/v2/canvas.go+45−14
@@ -1,6 +1,7 @@
1package lipgloss
1package lipgloss
2
2
3import (
3import (
4+ "fmt"
4 "image"
5 "image"
5 "sort"
6 "sort"
6
7
@@ -94,17 +95,14 @@ type Layer struct {
94 zIndex int
95 zIndex int
95 children []*Layer
96 children []*Layer
96 id string
97 id string
97− content string
98+ content uv.Drawable
98}
99}
99
100
100// NewLayer creates a new Layer with the given content. It calculates the size
101// NewLayer creates a new Layer with the given content. It calculates the size
101// based on the widest line and the number of lines in the content.
102// based on the widest line and the number of lines in the content.
102−func NewLayer(content string) (l *Layer) {
103+func NewLayer(content any) (l *Layer) {
103 l = new(Layer)
104 l = new(Layer)
104− l.content = content
105− height := Height(content)
106− width := Width(content)
105+ l.SetContent(content)
107− l.rect = image.Rect(0, 0, width, height)
108 return l
106 return l
109}
107}
110
108
@@ -216,23 +214,56 @@ func (l *Layer) AddLayers(layers ...*Layer) *Layer {
216}
214}
217
215
218// SetContent sets the content of the Layer.
216// SetContent sets the content of the Layer.
219−func (l *Layer) SetContent(content string) *Layer {
217+func (l *Layer) SetContent(content any) *Layer {
218+ var drawable uv.Drawable
219+ var rect image.Rectangle
220+ switch c := content.(type) {
221+ case uv.Drawable:
222+ drawable = c
223+ switch c := c.(type) {
224+ case interface{ Bounds() image.Rectangle }:
225+ rect.Max.X = c.Bounds().Dx()
226+ rect.Max.Y = c.Bounds().Dy()
227+ case interface {
228+ Width() int
229+ Height() int
230+ }:
231+ rect.Max.X = c.Width()
232+ rect.Max.Y = c.Height()
233+ }
234+ case fmt.Stringer:
235+ s := c.String()
236+ drawable = uv.NewStyledString(s)
237+ rect = image.Rect(0, 0, Width(s), Height(s))
238+ case string:
239+ drawable = uv.NewStyledString(c)
240+ rect = image.Rect(0, 0, Width(c), Height(c))
241+ default:
242+ s := fmt.Sprint(content)
243+ drawable = uv.NewStyledString(s)
244+ rect = image.Rect(0, 0, Width(s), Height(s))
245+ }
220− l.content = content
246+ l.content = drawable
247+ l.rect = rect
221 return l
248 return l
222}
249}
223
250
224// Content returns the content of the Layer.
251// Content returns the content of the Layer.
225−func (l *Layer) Content() string {
252+func (l *Layer) Content() any {
226 return l.content
253 return l.content
227}
254}
228
255
229// Draw draws the Layer onto the given screen buffer.
256// Draw draws the Layer onto the given screen buffer.
230−func (l *Layer) Draw(scr uv.Screen, _ image.Rectangle) {
257+func (l *Layer) Draw(scr uv.Screen, area image.Rectangle) {
231− ss := uv.NewStyledString(l.content)
258+ if l.content == nil {
259+ return
260+ }
232− ss.Draw(scr, l.Bounds())
261+ l.content.Draw(scr, area.Intersect(l.Bounds()))
233 for _, child := range l.children {
262 for _, child := range l.children {
234− ss := uv.NewStyledString(child.content)
263+ if child.content == nil {
264+ continue
265+ }
235− ss.Draw(scr, child.Bounds())
266+ child.content.Draw(scr, area.Intersect(child.Bounds()))
236 }
267 }
237}
268}
238
269
vendor/modules.txt+4−4
@@ -253,7 +253,7 @@ github.com/charmbracelet/bubbles/v2/spinner
253github.com/charmbracelet/bubbles/v2/textarea
253github.com/charmbracelet/bubbles/v2/textarea
254github.com/charmbracelet/bubbles/v2/textinput
254github.com/charmbracelet/bubbles/v2/textinput
255github.com/charmbracelet/bubbles/v2/viewport
255github.com/charmbracelet/bubbles/v2/viewport
256−# github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.1 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595
256+# github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.1 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2
257## explicit; go 1.24.0
257## explicit; go 1.24.0
258github.com/charmbracelet/bubbletea/v2
258github.com/charmbracelet/bubbletea/v2
259# github.com/charmbracelet/colorprofile v0.3.1
259# github.com/charmbracelet/colorprofile v0.3.1
@@ -268,7 +268,7 @@ github.com/charmbracelet/glamour/v2
268github.com/charmbracelet/glamour/v2/ansi
268github.com/charmbracelet/glamour/v2/ansi
269github.com/charmbracelet/glamour/v2/internal/autolink
269github.com/charmbracelet/glamour/v2/internal/autolink
270github.com/charmbracelet/glamour/v2/styles
270github.com/charmbracelet/glamour/v2/styles
271−# github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb
271+# github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679
272## explicit; go 1.24.2
272## explicit; go 1.24.2
273github.com/charmbracelet/lipgloss/v2
273github.com/charmbracelet/lipgloss/v2
274github.com/charmbracelet/lipgloss/v2/table
274github.com/charmbracelet/lipgloss/v2/table
@@ -837,5 +837,5 @@ mvdan.cc/sh/v3/fileutil
837mvdan.cc/sh/v3/interp
837mvdan.cc/sh/v3/interp
838mvdan.cc/sh/v3/pattern
838mvdan.cc/sh/v3/pattern
839mvdan.cc/sh/v3/syntax
839mvdan.cc/sh/v3/syntax
840−# github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250710185017-3c0ffd25e595
840+# github.com/charmbracelet/bubbletea/v2 => github.com/charmbracelet/bubbletea-internal/v2 v2.0.0-20250716142813-5d1379f56ba2
841−# github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250710185058-03664cb9cecb
841+# github.com/charmbracelet/lipgloss/v2 => github.com/charmbracelet/lipgloss-internal/v2 v2.0.0-20250716143013-48f34cb75679