diff --git a/README.md b/README.md index f994fe35bd..50c4c6e89c 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) ``` diff --git a/examples/altscreen-toggle/main.go b/examples/altscreen-toggle/main.go index cbdf131ed5..e4607f067b 100644 --- a/examples/altscreen-toggle/main.go +++ b/examples/altscreen-toggle/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/autocomplete/main.go b/examples/autocomplete/main.go index 30339e1e59..e11106ce63 100644 --- a/examples/autocomplete/main.go +++ b/examples/autocomplete/main.go @@ -7,10 +7,10 @@ import ( "log" "net/http" - "github.com/charmbracelet/bubbles/help" - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/help" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/capability/main.go b/examples/capability/main.go index 85ca44edd4..299b19a623 100644 --- a/examples/capability/main.go +++ b/examples/capability/main.go @@ -3,8 +3,8 @@ package main import ( "log" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct { diff --git a/examples/cellbuffer/main.go b/examples/cellbuffer/main.go index 269105a0e2..74d607b8db 100644 --- a/examples/cellbuffer/main.go +++ b/examples/cellbuffer/main.go @@ -10,7 +10,7 @@ import ( "strings" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/harmonica" ) diff --git a/examples/chat/main.go b/examples/chat/main.go index 5a8f1c604b..5505875c3b 100644 --- a/examples/chat/main.go +++ b/examples/chat/main.go @@ -8,10 +8,10 @@ import ( "os" "strings" - "github.com/charmbracelet/bubbles/cursor" - "github.com/charmbracelet/bubbles/textarea" - "github.com/charmbracelet/bubbles/viewport" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/cursor" + "github.com/charmbracelet/bubbles/v2/textarea" + "github.com/charmbracelet/bubbles/v2/viewport" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/composable-views/main.go b/examples/composable-views/main.go index 019fa30eef..5f24501b02 100644 --- a/examples/composable-views/main.go +++ b/examples/composable-views/main.go @@ -5,9 +5,9 @@ import ( "log" "time" - "github.com/charmbracelet/bubbles/spinner" - "github.com/charmbracelet/bubbles/timer" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/spinner" + "github.com/charmbracelet/bubbles/v2/timer" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/credit-card-form/main.go b/examples/credit-card-form/main.go index 6d94257fdb..54d012ccc2 100644 --- a/examples/credit-card-form/main.go +++ b/examples/credit-card-form/main.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/debounce/main.go b/examples/debounce/main.go index 185185c0c1..8672ba7db5 100644 --- a/examples/debounce/main.go +++ b/examples/debounce/main.go @@ -15,7 +15,7 @@ import ( "os" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) const debounceDuration = time.Second diff --git a/examples/exec/main.go b/examples/exec/main.go index a7b9bca7f2..6f0bce418d 100644 --- a/examples/exec/main.go +++ b/examples/exec/main.go @@ -5,7 +5,7 @@ import ( "os" "os/exec" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type editorFinishedMsg struct{ err error } diff --git a/examples/file-picker/main.go b/examples/file-picker/main.go index e1363ba000..b4d53e2064 100644 --- a/examples/file-picker/main.go +++ b/examples/file-picker/main.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "github.com/charmbracelet/bubbles/filepicker" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/filepicker" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct { diff --git a/examples/focus-blur/main.go b/examples/focus-blur/main.go index 9bc8568a6d..3bf30f712f 100644 --- a/examples/focus-blur/main.go +++ b/examples/focus-blur/main.go @@ -5,7 +5,7 @@ package main import ( "log" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) func main() { diff --git a/examples/fullscreen/main.go b/examples/fullscreen/main.go index 73403253e0..734373af61 100644 --- a/examples/fullscreen/main.go +++ b/examples/fullscreen/main.go @@ -8,7 +8,7 @@ import ( "log" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model int diff --git a/examples/glamour/main.go b/examples/glamour/main.go index 6b5887a449..0ae6b0d9f8 100644 --- a/examples/glamour/main.go +++ b/examples/glamour/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/charmbracelet/bubbles/viewport" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/viewport" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/glamour" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/go.mod b/examples/go.mod index 0e8d888f65..4252ae4013 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -5,12 +5,12 @@ go 1.21 toolchain go1.22.5 require ( - github.com/charmbracelet/bubbles v0.20.1-0.20240910180436-8972b56c9dde - github.com/charmbracelet/bubbletea v1.1.2-0.20240911170800-098540620292 + github.com/charmbracelet/bubbles/v2 v2.0.0-20240918181255-a2602f85093b + github.com/charmbracelet/bubbletea/v2 v2.0.0-20240918180721-14cb6b5de1d2 github.com/charmbracelet/glamour v0.8.0 github.com/charmbracelet/harmonica v0.2.0 github.com/charmbracelet/lipgloss v0.13.0 - github.com/charmbracelet/x/exp/teatest v0.0.0-20240912153648-d6041061ead9 + github.com/charmbracelet/x/exp/teatest/v2 v2.0.0-20240918160051-227168dc0568 github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 github.com/lucasb-eyer/go-colorful v1.2.0 github.com/mattn/go-isatty v0.0.20 @@ -22,7 +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/x/ansi v0.3.1 // indirect + github.com/charmbracelet/x/ansi v0.3.2 // indirect github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b // indirect github.com/charmbracelet/x/term v0.2.0 // indirect github.com/charmbracelet/x/windows v0.2.0 // indirect @@ -46,4 +46,4 @@ require ( golang.org/x/term v0.22.0 // indirect ) -replace github.com/charmbracelet/bubbletea => ../ +replace github.com/charmbracelet/bubbletea/v2 => ../ diff --git a/examples/go.sum b/examples/go.sum index 39015a0f11..4cf13472e6 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -14,20 +14,20 @@ 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 v0.20.1-0.20240910180436-8972b56c9dde h1:/u+F3xZsfJYhEQ3MjKvqiXb2Y6LV8/4YHAMICxjGVhY= -github.com/charmbracelet/bubbles v0.20.1-0.20240910180436-8972b56c9dde/go.mod h1:M5Z4yZGaxq8TZoEY2rs529UxFTeZLnAhmAzqd2wd48M= +github.com/charmbracelet/bubbles/v2 v2.0.0-20240918181255-a2602f85093b h1:HhlZVQiYb1ckEdKcjnRQ/6qEORD20rFMoyemyhI/QKQ= +github.com/charmbracelet/bubbles/v2 v2.0.0-20240918181255-a2602f85093b/go.mod h1:tpX2o5sLWCF5tbBWZaJGx3mbjFIrupeAEbfWEiZXy+A= github.com/charmbracelet/glamour v0.8.0 h1:tPrjL3aRcQbn++7t18wOpgLyl8wrOHUEDS7IZ68QtZs= github.com/charmbracelet/glamour v0.8.0/go.mod h1:ViRgmKkf3u5S7uakt2czJ272WSg2ZenlYEZXT2x7Bjw= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= github.com/charmbracelet/lipgloss v0.13.0 h1:4X3PPeoWEDCMvzDvGmTajSyYPcZM4+y8sCA/SsA3cjw= github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDUxr8Lw7dvFrAIbbY= -github.com/charmbracelet/x/ansi v0.3.1 h1:CRO6lc/6HCx2/D6S/GZ87jDvRvk6GtPyFP+IljkNtqI= -github.com/charmbracelet/x/ansi v0.3.1/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/ansi v0.3.2 h1:wsEwgAN+C9U06l9dCVMX0/L3x7ptvY1qmjMwyfE6USY= +github.com/charmbracelet/x/ansi v0.3.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b h1:MnAMdlwSltxJyULnrYbkZpp4k58Co7Tah3ciKhSNo0Q= github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= -github.com/charmbracelet/x/exp/teatest v0.0.0-20240912153648-d6041061ead9 h1:2q41wBBupsw4GATbF/C3NZ3JtccZ/iYu7cL3doHOnuo= -github.com/charmbracelet/x/exp/teatest v0.0.0-20240912153648-d6041061ead9/go.mod h1:WPIoTqLbtPGmiv83mabqvIYOrwa1vUZMdp3urF4gQrk= +github.com/charmbracelet/x/exp/teatest/v2 v2.0.0-20240918160051-227168dc0568 h1:AetludS3JErnyz60TL6F2wKtbS+1CZMz1dRjOiRbtNM= +github.com/charmbracelet/x/exp/teatest/v2 v2.0.0-20240918160051-227168dc0568/go.mod h1:GjX2v3oH9MpfcsHPu8uYdYfsq34S04hY5PaIP8Gl52A= github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0= github.com/charmbracelet/x/term v0.2.0/go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0= github.com/charmbracelet/x/windows v0.2.0 h1:ilXA1GJjTNkgOm94CLPeSz7rar54jtFatdmoiONPuEw= diff --git a/examples/help/main.go b/examples/help/main.go index 5cddb10828..7a50ef1015 100644 --- a/examples/help/main.go +++ b/examples/help/main.go @@ -5,9 +5,9 @@ import ( "os" "strings" - "github.com/charmbracelet/bubbles/help" - "github.com/charmbracelet/bubbles/key" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/help" + "github.com/charmbracelet/bubbles/v2/key" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/http/main.go b/examples/http/main.go index 88cbc88d32..21589c6774 100644 --- a/examples/http/main.go +++ b/examples/http/main.go @@ -8,7 +8,7 @@ import ( "net/http" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) const url = "https://charm.sh/" diff --git a/examples/list-default/main.go b/examples/list-default/main.go index 4671ac80f1..d093631164 100644 --- a/examples/list-default/main.go +++ b/examples/list-default/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/charmbracelet/bubbles/list" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/list" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/list-fancy/delegate.go b/examples/list-fancy/delegate.go index e332b83c31..f78722211a 100644 --- a/examples/list-fancy/delegate.go +++ b/examples/list-fancy/delegate.go @@ -1,9 +1,9 @@ package main import ( - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/list" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/list" + tea "github.com/charmbracelet/bubbletea/v2" ) func newItemDelegate(keys *delegateKeyMap) list.DefaultDelegate { diff --git a/examples/list-fancy/main.go b/examples/list-fancy/main.go index a91b9bdb48..8cbece22b8 100644 --- a/examples/list-fancy/main.go +++ b/examples/list-fancy/main.go @@ -6,9 +6,9 @@ import ( "os" "time" - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/list" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/list" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/list-simple/main.go b/examples/list-simple/main.go index 9c306a8a89..bba19c7f87 100644 --- a/examples/list-simple/main.go +++ b/examples/list-simple/main.go @@ -6,8 +6,8 @@ import ( "os" "strings" - "github.com/charmbracelet/bubbles/list" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/list" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/mouse/main.go b/examples/mouse/main.go index ba39f8af3e..422ea86099 100644 --- a/examples/mouse/main.go +++ b/examples/mouse/main.go @@ -6,7 +6,7 @@ package main import ( "log" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) func main() { diff --git a/examples/package-manager/main.go b/examples/package-manager/main.go index 10120f0f35..c22d0480f5 100644 --- a/examples/package-manager/main.go +++ b/examples/package-manager/main.go @@ -7,9 +7,9 @@ import ( "strings" "time" - "github.com/charmbracelet/bubbles/progress" - "github.com/charmbracelet/bubbles/spinner" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/progress" + "github.com/charmbracelet/bubbles/v2/spinner" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/pager/main.go b/examples/pager/main.go index 3e6b63fad8..bc227d64ac 100644 --- a/examples/pager/main.go +++ b/examples/pager/main.go @@ -8,8 +8,8 @@ import ( "os" "strings" - "github.com/charmbracelet/bubbles/viewport" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/viewport" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/paginator/main.go b/examples/paginator/main.go index dfcf6ddc20..663326b145 100644 --- a/examples/paginator/main.go +++ b/examples/paginator/main.go @@ -8,10 +8,10 @@ import ( "log" "strings" - "github.com/charmbracelet/bubbles/paginator" + "github.com/charmbracelet/bubbles/v2/paginator" "github.com/charmbracelet/lipgloss" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) func newModel() model { diff --git a/examples/panic/go.mod b/examples/panic/go.mod new file mode 100644 index 0000000000..4d61a4b866 --- /dev/null +++ b/examples/panic/go.mod @@ -0,0 +1,25 @@ +module main + +go 1.23.1 + +require github.com/charmbracelet/bubbletea v1.1.0 + +require ( + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/charmbracelet/lipgloss v0.13.0 // indirect + github.com/charmbracelet/x/ansi v0.2.3 // indirect + github.com/charmbracelet/x/term v0.2.0 // indirect + github.com/charmbracelet/x/windows v0.2.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-runewidth v0.0.16 // indirect + github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect + github.com/muesli/cancelreader v0.2.2 // indirect + github.com/muesli/termenv v0.15.2 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.24.0 // indirect +) + +replace github.com/charmbracelet/bubbletea => ../../ diff --git a/examples/panic/go.sum b/examples/panic/go.sum new file mode 100644 index 0000000000..af1dc94a3d --- /dev/null +++ b/examples/panic/go.sum @@ -0,0 +1,34 @@ +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/charmbracelet/lipgloss v0.13.0 h1:4X3PPeoWEDCMvzDvGmTajSyYPcZM4+y8sCA/SsA3cjw= +github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDUxr8Lw7dvFrAIbbY= +github.com/charmbracelet/x/ansi v0.2.3 h1:VfFN0NUpcjBRd4DnKfRaIRo53KRgey/nhOoEqosGDEY= +github.com/charmbracelet/x/ansi v0.2.3/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0= +github.com/charmbracelet/x/term v0.2.0/go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0= +github.com/charmbracelet/x/windows v0.2.0 h1:ilXA1GJjTNkgOm94CLPeSz7rar54jtFatdmoiONPuEw= +github.com/charmbracelet/x/windows v0.2.0/go.mod h1:ZibNFR49ZFqCXgP76sYanisxRyC+EYrBE7TTknD8s1s= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= +github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= +github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= +github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561 h1:MDc5xs78ZrZr3HMQugiXOAkSZtfTpbJLDr/lwfgO53E= +golang.org/x/exp v0.0.0-20220909182711-5c715a9e8561/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= diff --git a/examples/panic/main.go b/examples/panic/main.go index 00df0732e1..c4db34f17c 100644 --- a/examples/panic/main.go +++ b/examples/panic/main.go @@ -3,7 +3,7 @@ package main import ( "log" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct{} diff --git a/examples/pipe/main.go b/examples/pipe/main.go index 1d7eb2242b..1139111219 100644 --- a/examples/pipe/main.go +++ b/examples/pipe/main.go @@ -12,8 +12,8 @@ import ( "os" "strings" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/prevent-quit/main.go b/examples/prevent-quit/main.go index 791d41e5e4..184d99b89f 100644 --- a/examples/prevent-quit/main.go +++ b/examples/prevent-quit/main.go @@ -6,10 +6,10 @@ import ( "fmt" "log" - "github.com/charmbracelet/bubbles/help" - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/textarea" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/help" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/textarea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/print-key/main.go b/examples/print-key/main.go index 801b5ac1f6..eb1c27cc4c 100644 --- a/examples/print-key/main.go +++ b/examples/print-key/main.go @@ -3,7 +3,7 @@ package main import ( "log" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct{} diff --git a/examples/progress-animated/main.go b/examples/progress-animated/main.go index d7c8a31030..88853191fe 100644 --- a/examples/progress-animated/main.go +++ b/examples/progress-animated/main.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/charmbracelet/bubbles/progress" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/progress" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/progress-download/main.go b/examples/progress-download/main.go index 018b29f14f..c61897eb0b 100644 --- a/examples/progress-download/main.go +++ b/examples/progress-download/main.go @@ -9,8 +9,8 @@ import ( "os" "path/filepath" - "github.com/charmbracelet/bubbles/progress" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/progress" + tea "github.com/charmbracelet/bubbletea/v2" ) var p *tea.Program diff --git a/examples/progress-download/tui.go b/examples/progress-download/tui.go index f5256e1aaf..4be338b1d4 100644 --- a/examples/progress-download/tui.go +++ b/examples/progress-download/tui.go @@ -4,8 +4,8 @@ import ( "strings" "time" - "github.com/charmbracelet/bubbles/progress" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/progress" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/progress-static/main.go b/examples/progress-static/main.go index 040e44c56d..96519dc598 100644 --- a/examples/progress-static/main.go +++ b/examples/progress-static/main.go @@ -22,8 +22,8 @@ import ( "strings" "time" - "github.com/charmbracelet/bubbles/progress" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/progress" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/query-term/main.go b/examples/query-term/main.go index 28e8aa1a4d..d7faf9c5aa 100644 --- a/examples/query-term/main.go +++ b/examples/query-term/main.go @@ -11,8 +11,8 @@ import ( "strings" "unicode" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" ) func newModel() model { diff --git a/examples/realtime/main.go b/examples/realtime/main.go index 1a6d31027e..3b0eb6ef84 100644 --- a/examples/realtime/main.go +++ b/examples/realtime/main.go @@ -9,8 +9,8 @@ import ( "os" "time" - "github.com/charmbracelet/bubbles/spinner" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/spinner" + tea "github.com/charmbracelet/bubbletea/v2" ) // A message used to indicate that activity has occurred. In the real world (for diff --git a/examples/result/main.go b/examples/result/main.go index 9bd1123f61..63290b43c3 100644 --- a/examples/result/main.go +++ b/examples/result/main.go @@ -8,7 +8,7 @@ import ( "os" "strings" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) var choices = []string{"Taro", "Coffee", "Lychee"} diff --git a/examples/send-msg/main.go b/examples/send-msg/main.go index d546c3505e..97d4f33fc8 100644 --- a/examples/send-msg/main.go +++ b/examples/send-msg/main.go @@ -10,8 +10,8 @@ import ( "strings" "time" - "github.com/charmbracelet/bubbles/spinner" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/spinner" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/sequence/main.go b/examples/sequence/main.go index 36dbc30818..1507f62292 100644 --- a/examples/sequence/main.go +++ b/examples/sequence/main.go @@ -6,7 +6,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct{} diff --git a/examples/set-terminal-color/main.go b/examples/set-terminal-color/main.go index bf66c041e0..4668ca74de 100644 --- a/examples/set-terminal-color/main.go +++ b/examples/set-terminal-color/main.go @@ -4,8 +4,8 @@ import ( "log" "strings" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/lucasb-eyer/go-colorful" ) diff --git a/examples/set-window-title/main.go b/examples/set-window-title/main.go index d01cfc4d4d..5fbfb4b414 100644 --- a/examples/set-window-title/main.go +++ b/examples/set-window-title/main.go @@ -6,7 +6,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct{} diff --git a/examples/simple/main.go b/examples/simple/main.go index 86f351ae59..db84748781 100644 --- a/examples/simple/main.go +++ b/examples/simple/main.go @@ -8,7 +8,7 @@ import ( "os" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) func main() { diff --git a/examples/simple/main_test.go b/examples/simple/main_test.go index a8bb8ef152..ab1baf5298 100644 --- a/examples/simple/main_test.go +++ b/examples/simple/main_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - tea "github.com/charmbracelet/bubbletea" - "github.com/charmbracelet/x/exp/teatest" + tea "github.com/charmbracelet/bubbletea/v2" + "github.com/charmbracelet/x/exp/teatest/v2" ) func TestApp(t *testing.T) { diff --git a/examples/spinner/main.go b/examples/spinner/main.go index 3a9ec7e500..fc4f8dae51 100644 --- a/examples/spinner/main.go +++ b/examples/spinner/main.go @@ -7,8 +7,8 @@ import ( "fmt" "os" - "github.com/charmbracelet/bubbles/spinner" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/spinner" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/spinners/main.go b/examples/spinners/main.go index 774058adf9..d284d8aa9e 100644 --- a/examples/spinners/main.go +++ b/examples/spinners/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/charmbracelet/bubbles/spinner" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/spinner" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/split-editors/main.go b/examples/split-editors/main.go index f3cd0b1c69..6052a3c2b2 100644 --- a/examples/split-editors/main.go +++ b/examples/split-editors/main.go @@ -4,10 +4,10 @@ import ( "fmt" "os" - "github.com/charmbracelet/bubbles/help" - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/textarea" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/help" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/textarea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/stopwatch/main.go b/examples/stopwatch/main.go index b77ec93e49..710e4ab7ab 100644 --- a/examples/stopwatch/main.go +++ b/examples/stopwatch/main.go @@ -5,10 +5,10 @@ import ( "os" "time" - "github.com/charmbracelet/bubbles/help" - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/stopwatch" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/help" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/stopwatch" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct { diff --git a/examples/suspend/main.go b/examples/suspend/main.go index a55f211ecd..3b3481fb55 100644 --- a/examples/suspend/main.go +++ b/examples/suspend/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct { diff --git a/examples/table-resize/main.go b/examples/table-resize/main.go index 2089e7fa6b..83bba15d4d 100644 --- a/examples/table-resize/main.go +++ b/examples/table-resize/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/charmbracelet/lipgloss/table" ) diff --git a/examples/table/main.go b/examples/table/main.go index 61a1698278..2b3c11954f 100644 --- a/examples/table/main.go +++ b/examples/table/main.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/charmbracelet/bubbles/table" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/table" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/tabs/main.go b/examples/tabs/main.go index 07edce3a8d..719837c69e 100644 --- a/examples/tabs/main.go +++ b/examples/tabs/main.go @@ -5,7 +5,7 @@ import ( "os" "strings" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/textarea/main.go b/examples/textarea/main.go index c2eca4e756..d0b69135bf 100644 --- a/examples/textarea/main.go +++ b/examples/textarea/main.go @@ -7,8 +7,8 @@ import ( "fmt" "log" - "github.com/charmbracelet/bubbles/textarea" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textarea" + tea "github.com/charmbracelet/bubbletea/v2" ) func main() { diff --git a/examples/textinput/main.go b/examples/textinput/main.go index 754c11066d..f2121c8e37 100644 --- a/examples/textinput/main.go +++ b/examples/textinput/main.go @@ -7,8 +7,8 @@ import ( "fmt" "log" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" ) func main() { diff --git a/examples/textinputs/main.go b/examples/textinputs/main.go index 6e64c2b082..6ae56f77e2 100644 --- a/examples/textinputs/main.go +++ b/examples/textinputs/main.go @@ -8,9 +8,9 @@ import ( "os" "strings" - "github.com/charmbracelet/bubbles/cursor" - "github.com/charmbracelet/bubbles/textinput" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/cursor" + "github.com/charmbracelet/bubbles/v2/textinput" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" ) diff --git a/examples/timer/main.go b/examples/timer/main.go index 189221cc76..ba612d8652 100644 --- a/examples/timer/main.go +++ b/examples/timer/main.go @@ -5,10 +5,10 @@ import ( "os" "time" - "github.com/charmbracelet/bubbles/help" - "github.com/charmbracelet/bubbles/key" - "github.com/charmbracelet/bubbles/timer" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/help" + "github.com/charmbracelet/bubbles/v2/key" + "github.com/charmbracelet/bubbles/v2/timer" + tea "github.com/charmbracelet/bubbletea/v2" ) const timeout = time.Second * 5 diff --git a/examples/tui-daemon-combo/main.go b/examples/tui-daemon-combo/main.go index 91f79d2c51..3581dff845 100644 --- a/examples/tui-daemon-combo/main.go +++ b/examples/tui-daemon-combo/main.go @@ -9,8 +9,8 @@ import ( "os" "time" - "github.com/charmbracelet/bubbles/spinner" - tea "github.com/charmbracelet/bubbletea" + "github.com/charmbracelet/bubbles/v2/spinner" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/mattn/go-isatty" ) diff --git a/examples/views/main.go b/examples/views/main.go index e63b907961..2e0a19c7c2 100644 --- a/examples/views/main.go +++ b/examples/views/main.go @@ -13,7 +13,7 @@ import ( "strings" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" "github.com/charmbracelet/lipgloss" "github.com/fogleman/ease" "github.com/lucasb-eyer/go-colorful" diff --git a/examples/window-size/main.go b/examples/window-size/main.go index 3e701958b4..ccd428b763 100644 --- a/examples/window-size/main.go +++ b/examples/window-size/main.go @@ -5,7 +5,7 @@ package main import ( "log" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) func main() { diff --git a/tutorials/basics/README.md b/tutorials/basics/README.md index d3bdeba7c5..2d6ed6b693 100644 --- a/tutorials/basics/README.md +++ b/tutorials/basics/README.md @@ -27,7 +27,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) ``` diff --git a/tutorials/basics/main.go b/tutorials/basics/main.go index 293e284361..6417b2e8e6 100644 --- a/tutorials/basics/main.go +++ b/tutorials/basics/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) type model struct { diff --git a/tutorials/commands/README.md b/tutorials/commands/README.md index 259df4ed0d..1d2d700ad6 100644 --- a/tutorials/commands/README.md +++ b/tutorials/commands/README.md @@ -27,7 +27,7 @@ import ( "os" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) const url = "https://charm.sh/" diff --git a/tutorials/commands/main.go b/tutorials/commands/main.go index 2c3643da10..e1f5a52a11 100644 --- a/tutorials/commands/main.go +++ b/tutorials/commands/main.go @@ -6,7 +6,7 @@ import ( "os" "time" - tea "github.com/charmbracelet/bubbletea" + tea "github.com/charmbracelet/bubbletea/v2" ) const url = "https://charm.sh/" diff --git a/tutorials/go.mod b/tutorials/go.mod index 31da069dd2..2640c519a8 100644 --- a/tutorials/go.mod +++ b/tutorials/go.mod @@ -2,12 +2,12 @@ module tutorial go 1.18 -require github.com/charmbracelet/bubbletea v0.25.0 +require github.com/charmbracelet/bubbletea/v2 v2.0.0-20240918180721-14cb6b5de1d2 require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/charmbracelet/lipgloss v0.13.0 // indirect - github.com/charmbracelet/x/ansi v0.2.3 // indirect + github.com/charmbracelet/x/ansi v0.3.2 // indirect github.com/charmbracelet/x/term v0.2.0 // indirect github.com/charmbracelet/x/windows v0.2.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect @@ -22,4 +22,4 @@ require ( golang.org/x/sys v0.25.0 // indirect ) -replace github.com/charmbracelet/bubbletea => ../ +replace github.com/charmbracelet/bubbletea/v2 => ../ diff --git a/tutorials/go.sum b/tutorials/go.sum index 248a7e7736..e284990f57 100644 --- a/tutorials/go.sum +++ b/tutorials/go.sum @@ -2,8 +2,8 @@ github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiE github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/charmbracelet/lipgloss v0.13.0 h1:4X3PPeoWEDCMvzDvGmTajSyYPcZM4+y8sCA/SsA3cjw= github.com/charmbracelet/lipgloss v0.13.0/go.mod h1:nw4zy0SBX/F/eAO1cWdcvy6qnkDUxr8Lw7dvFrAIbbY= -github.com/charmbracelet/x/ansi v0.2.3 h1:VfFN0NUpcjBRd4DnKfRaIRo53KRgey/nhOoEqosGDEY= -github.com/charmbracelet/x/ansi v0.2.3/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/ansi v0.3.2 h1:wsEwgAN+C9U06l9dCVMX0/L3x7ptvY1qmjMwyfE6USY= +github.com/charmbracelet/x/ansi v0.3.2/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= github.com/charmbracelet/x/term v0.2.0 h1:cNB9Ot9q8I711MyZ7myUR5HFWL/lc3OpU8jZ4hwm0x0= github.com/charmbracelet/x/term v0.2.0/go.mod h1:GVxgxAbjUrmpvIINHIQnJJKpMlHiZ4cktEQCN6GWyF0= github.com/charmbracelet/x/windows v0.2.0 h1:ilXA1GJjTNkgOm94CLPeSz7rar54jtFatdmoiONPuEw=