chore: migrated tui to charmbracelet v2
ebc919a8
10 file(s) · +125 −112
| 1 | 1 | module github.com/stevedylandev/andromeda/apps/jotts-go |
|
| 2 | 2 | ||
| 3 | - | go 1.25.0 |
|
| 3 | + | go 1.25.8 |
|
| 4 | 4 | ||
| 5 | 5 | require ( |
|
| 6 | + | charm.land/bubbles/v2 v2.1.0 |
|
| 7 | + | charm.land/bubbletea/v2 v2.0.6 |
|
| 8 | + | charm.land/glamour/v2 v2.0.0 |
|
| 9 | + | charm.land/lipgloss/v2 v2.0.3 |
|
| 6 | 10 | github.com/BurntSushi/toml v1.6.0 |
|
| 7 | 11 | github.com/atotto/clipboard v0.1.4 |
|
| 8 | - | github.com/charmbracelet/bubbles v1.0.0 |
|
| 9 | - | github.com/charmbracelet/bubbletea v1.3.10 |
|
| 10 | - | github.com/charmbracelet/glamour v1.0.0 |
|
| 11 | - | github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 |
|
| 12 | + | github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c |
|
| 12 | 13 | github.com/stevedylandev/andromeda/crates-go/auth v0.0.0 |
|
| 13 | 14 | github.com/stevedylandev/andromeda/crates-go/config v0.0.0 |
|
| 14 | 15 | github.com/stevedylandev/andromeda/crates-go/darkmatter v0.0.0 |
|
| 28 | 29 | ||
| 29 | 30 | require ( |
|
| 30 | 31 | github.com/alecthomas/chroma/v2 v2.20.0 // indirect |
|
| 31 | - | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect |
|
| 32 | 32 | github.com/aymerick/douceur v0.2.0 // indirect |
|
| 33 | - | github.com/charmbracelet/colorprofile v0.4.1 // indirect |
|
| 34 | - | github.com/charmbracelet/x/ansi v0.11.6 // indirect |
|
| 35 | - | github.com/charmbracelet/x/cellbuf v0.0.15 // indirect |
|
| 33 | + | github.com/charmbracelet/colorprofile v0.4.3 // indirect |
|
| 34 | + | github.com/charmbracelet/ultraviolet v0.0.0-20260416155717-489999b90468 // indirect |
|
| 35 | + | github.com/charmbracelet/x/ansi v0.11.7 // indirect |
|
| 36 | 36 | github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect |
|
| 37 | 37 | github.com/charmbracelet/x/term v0.2.2 // indirect |
|
| 38 | - | github.com/clipperhouse/displaywidth v0.9.0 // indirect |
|
| 39 | - | github.com/clipperhouse/stringish v0.1.1 // indirect |
|
| 40 | - | github.com/clipperhouse/uax29/v2 v2.5.0 // indirect |
|
| 38 | + | github.com/charmbracelet/x/termios v0.1.1 // indirect |
|
| 39 | + | github.com/charmbracelet/x/windows v0.2.2 // indirect |
|
| 40 | + | github.com/clipperhouse/displaywidth v0.11.0 // indirect |
|
| 41 | + | github.com/clipperhouse/uax29/v2 v2.7.0 // indirect |
|
| 41 | 42 | github.com/dlclark/regexp2 v1.11.5 // indirect |
|
| 42 | 43 | github.com/dustin/go-humanize v1.0.1 // indirect |
|
| 43 | - | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect |
|
| 44 | 44 | github.com/google/uuid v1.6.0 // indirect |
|
| 45 | 45 | github.com/gorilla/css v1.0.1 // indirect |
|
| 46 | - | github.com/lucasb-eyer/go-colorful v1.3.0 // indirect |
|
| 46 | + | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect |
|
| 47 | 47 | github.com/mattn/go-isatty v0.0.20 // indirect |
|
| 48 | - | github.com/mattn/go-localereader v0.0.1 // indirect |
|
| 49 | - | github.com/mattn/go-runewidth v0.0.19 // indirect |
|
| 48 | + | github.com/mattn/go-runewidth v0.0.23 // indirect |
|
| 50 | 49 | github.com/microcosm-cc/bluemonday v1.0.27 // indirect |
|
| 51 | - | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect |
|
| 52 | 50 | github.com/muesli/cancelreader v0.2.2 // indirect |
|
| 53 | - | github.com/muesli/reflow v0.3.0 // indirect |
|
| 54 | - | github.com/muesli/termenv v0.16.0 // indirect |
|
| 55 | 51 | github.com/ncruces/go-strftime v0.1.9 // indirect |
|
| 56 | - | github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect |
|
| 57 | 52 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect |
|
| 58 | 53 | github.com/rivo/uniseg v0.4.7 // indirect |
|
| 59 | 54 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect |
|
| 60 | 55 | github.com/yuin/goldmark-emoji v1.0.6 // indirect |
|
| 61 | 56 | golang.org/x/crypto v0.39.0 // indirect |
|
| 62 | 57 | golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect |
|
| 63 | - | golang.org/x/net v0.38.0 // indirect |
|
| 58 | + | golang.org/x/net v0.39.0 // indirect |
|
| 59 | + | golang.org/x/sync v0.20.0 // indirect |
|
| 64 | 60 | golang.org/x/sys v0.44.0 // indirect |
|
| 65 | 61 | golang.org/x/text v0.30.0 // indirect |
|
| 66 | 62 | modernc.org/libc v1.65.7 // indirect |
|
| 1 | + | charm.land/bubbles/v2 v2.1.0 h1:YSnNh5cPYlYjPxRrzs5VEn3vwhtEn3jVGRBT3M7/I0g= |
|
| 2 | + | charm.land/bubbles/v2 v2.1.0/go.mod h1:l97h4hym2hvWBVfmJDtrEHHCtkIKeTEb3TTJ4ZOB3wY= |
|
| 3 | + | charm.land/bubbletea/v2 v2.0.6 h1:UHN/91OyuhaOFGSrBXQ/hMZD8IO1Uc4BvHlgHXL2WJo= |
|
| 4 | + | charm.land/bubbletea/v2 v2.0.6/go.mod h1:MH/D8ZLlN3op37vQvijKuU29g3rqTp+aQapURFonF9g= |
|
| 5 | + | charm.land/glamour/v2 v2.0.0 h1:IDBoqLEy7Hdpb9VOXN+khLP/XSxtJy1VsHuW/yF87+U= |
|
| 6 | + | charm.land/glamour/v2 v2.0.0/go.mod h1:kjq9WB0s8vuUYZNYey2jp4Lgd9f4cKdzAw88FZtpj/w= |
|
| 7 | + | charm.land/lipgloss/v2 v2.0.3 h1:yM2zJ4Cf5Y51b7RHIwioil4ApI/aypFXXVHSwlM6RzU= |
|
| 8 | + | charm.land/lipgloss/v2 v2.0.3/go.mod h1:7myLU9iG/3xluAWzpY/fSxYYHCgoKTie7laxk6ATwXA= |
|
| 1 | 9 | github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= |
|
| 2 | 10 | github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= |
|
| 3 | 11 | github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= |
|
| 10 | 18 | github.com/alecthomas/repr v0.5.1/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= |
|
| 11 | 19 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= |
|
| 12 | 20 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= |
|
| 13 | - | github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= |
|
| 14 | - | github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= |
|
| 15 | - | github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY= |
|
| 16 | - | github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E= |
|
| 21 | + | github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ12Gv5o= |
|
| 22 | + | github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w= |
|
| 17 | 23 | github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= |
|
| 18 | 24 | github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= |
|
| 19 | - | github.com/charmbracelet/bubbles v1.0.0 h1:12J8/ak/uCZEMQ6KU7pcfwceyjLlWsDLAxB5fXonfvc= |
|
| 20 | - | github.com/charmbracelet/bubbles v1.0.0/go.mod h1:9d/Zd5GdnauMI5ivUIVisuEm3ave1XwXtD1ckyV6r3E= |
|
| 21 | - | github.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw= |
|
| 22 | - | github.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4= |
|
| 23 | - | github.com/charmbracelet/colorprofile v0.4.1 h1:a1lO03qTrSIRaK8c3JRxJDZOvhvIeSco3ej+ngLk1kk= |
|
| 24 | - | github.com/charmbracelet/colorprofile v0.4.1/go.mod h1:U1d9Dljmdf9DLegaJ0nGZNJvoXAhayhmidOdcBwAvKk= |
|
| 25 | - | github.com/charmbracelet/glamour v1.0.0 h1:AWMLOVFHTsysl4WV8T8QgkQ0s/ZNZo7CiE4WKhk8l08= |
|
| 26 | - | github.com/charmbracelet/glamour v1.0.0/go.mod h1:DSdohgOBkMr2ZQNhw4LZxSGpx3SvpeujNoXrQyH2hxo= |
|
| 27 | - | github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834 h1:ZR7e0ro+SZZiIZD7msJyA+NjkCNNavuiPBLgerbOziE= |
|
| 28 | - | github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834/go.mod h1:aKC/t2arECF6rNOnaKaVU6y4t4ZeHQzqfxedE/VkVhA= |
|
| 29 | - | github.com/charmbracelet/x/ansi v0.11.6 h1:GhV21SiDz/45W9AnV2R61xZMRri5NlLnl6CVF7ihZW8= |
|
| 30 | - | github.com/charmbracelet/x/ansi v0.11.6/go.mod h1:2JNYLgQUsyqaiLovhU2Rv/pb8r6ydXKS3NIttu3VGZQ= |
|
| 31 | - | github.com/charmbracelet/x/cellbuf v0.0.15 h1:ur3pZy0o6z/R7EylET877CBxaiE1Sp1GMxoFPAIztPI= |
|
| 32 | - | github.com/charmbracelet/x/cellbuf v0.0.15/go.mod h1:J1YVbR7MUuEGIFPCaaZ96KDl5NoS0DAWkskup+mOY+Q= |
|
| 33 | - | github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ= |
|
| 34 | - | github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U= |
|
| 25 | + | github.com/charmbracelet/colorprofile v0.4.3 h1:QPa1IWkYI+AOB+fE+mg/5/4HRMZcaXex9t5KX76i20Q= |
|
| 26 | + | github.com/charmbracelet/colorprofile v0.4.3/go.mod h1:/zT4BhpD5aGFpqQQqw7a+VtHCzu+zrQtt1zhMt9mR4Q= |
|
| 27 | + | github.com/charmbracelet/ultraviolet v0.0.0-20260416155717-489999b90468 h1:Q9fO0y1Zo5KB/5Vu8JZoLGm1N3RzF9bNj3Ao3xoR+Ac= |
|
| 28 | + | github.com/charmbracelet/ultraviolet v0.0.0-20260416155717-489999b90468/go.mod h1:bAAz7dh/FTYfC+oiHavL4mX1tOIBZ0ZwYjSi3qE6ivM= |
|
| 29 | + | github.com/charmbracelet/x/ansi v0.11.7 h1:kzv1kJvjg2S3r9KHo8hDdHFQLEqn4RBCb39dAYC84jI= |
|
| 30 | + | github.com/charmbracelet/x/ansi v0.11.7/go.mod h1:9qGpnAVYz+8ACONkZBUWPtL7lulP9No6p1epAihUZwQ= |
|
| 31 | + | github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f h1:pk6gmGpCE7F3FcjaOEKYriCvpmIN4+6OS/RD0vm4uIA= |
|
| 32 | + | github.com/charmbracelet/x/exp/golden v0.0.0-20250806222409-83e3a29d542f/go.mod h1:IfZAMTHB6XkZSeXUqriemErjAWCCzT0LwjKFYCZyw0I= |
|
| 35 | 33 | github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf h1:rLG0Yb6MQSDKdB52aGX55JT1oi0P0Kuaj7wi1bLUpnI= |
|
| 36 | 34 | github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf/go.mod h1:B3UgsnsBZS/eX42BlaNiJkD1pPOUa+oF1IYC6Yd2CEU= |
|
| 37 | 35 | github.com/charmbracelet/x/term v0.2.2 h1:xVRT/S2ZcKdhhOuSP4t5cLi5o+JxklsoEObBSgfgZRk= |
|
| 38 | 36 | github.com/charmbracelet/x/term v0.2.2/go.mod h1:kF8CY5RddLWrsgVwpw4kAa6TESp6EB5y3uxGLeCqzAI= |
|
| 39 | - | github.com/clipperhouse/displaywidth v0.9.0 h1:Qb4KOhYwRiN3viMv1v/3cTBlz3AcAZX3+y9OLhMtAtA= |
|
| 40 | - | github.com/clipperhouse/displaywidth v0.9.0/go.mod h1:aCAAqTlh4GIVkhQnJpbL0T/WfcrJXHcj8C0yjYcjOZA= |
|
| 41 | - | github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs= |
|
| 42 | - | github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA= |
|
| 43 | - | github.com/clipperhouse/uax29/v2 v2.5.0 h1:x7T0T4eTHDONxFJsL94uKNKPHrclyFI0lm7+w94cO8U= |
|
| 44 | - | github.com/clipperhouse/uax29/v2 v2.5.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= |
|
| 37 | + | github.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY= |
|
| 38 | + | github.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo= |
|
| 39 | + | github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2/jYn2GuM= |
|
| 40 | + | github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k= |
|
| 41 | + | github.com/clipperhouse/displaywidth v0.11.0 h1:lBc6kY44VFw+TDx4I8opi/EtL9m20WSEFgwIwO+UVM8= |
|
| 42 | + | github.com/clipperhouse/displaywidth v0.11.0/go.mod h1:bkrFNkf81G8HyVqmKGxsPufD3JhNl3dSqnGhOoSD/o0= |
|
| 43 | + | github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= |
|
| 44 | + | github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= |
|
| 45 | 45 | github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= |
|
| 46 | 46 | github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= |
|
| 47 | 47 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= |
|
| 48 | 48 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= |
|
| 49 | - | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= |
|
| 50 | - | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= |
|
| 51 | 49 | github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs= |
|
| 52 | 50 | github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= |
|
| 53 | 51 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= |
|
| 56 | 54 | github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= |
|
| 57 | 55 | github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= |
|
| 58 | 56 | github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= |
|
| 59 | - | github.com/lucasb-eyer/go-colorful v1.3.0 h1:2/yBRLdWBZKrf7gB40FoiKfAWYQ0lqNcbuQwVHXptag= |
|
| 60 | - | github.com/lucasb-eyer/go-colorful v1.3.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= |
|
| 57 | + | github.com/lucasb-eyer/go-colorful v1.4.0 h1:UtrWVfLdarDgc44HcS7pYloGHJUjHV/4FwW4TvVgFr4= |
|
| 58 | + | github.com/lucasb-eyer/go-colorful v1.4.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= |
|
| 61 | 59 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= |
|
| 62 | 60 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= |
|
| 63 | - | github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= |
|
| 64 | - | github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= |
|
| 65 | - | github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= |
|
| 66 | - | github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= |
|
| 67 | - | github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= |
|
| 61 | + | github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw= |
|
| 62 | + | github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= |
|
| 68 | 63 | github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk= |
|
| 69 | 64 | github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= |
|
| 70 | - | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= |
|
| 71 | - | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= |
|
| 72 | 65 | github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= |
|
| 73 | 66 | github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= |
|
| 74 | - | github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= |
|
| 75 | - | github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= |
|
| 76 | - | github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= |
|
| 77 | - | github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= |
|
| 78 | 67 | github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= |
|
| 79 | 68 | github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= |
|
| 80 | 69 | github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= |
|
| 81 | 70 | github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= |
|
| 82 | 71 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= |
|
| 83 | 72 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= |
|
| 84 | - | github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= |
|
| 85 | - | github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= |
|
| 86 | 73 | github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= |
|
| 87 | 74 | github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= |
|
| 88 | 75 | github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= |
|
| 97 | 84 | golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= |
|
| 98 | 85 | golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U= |
|
| 99 | 86 | golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI= |
|
| 100 | - | golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= |
|
| 101 | - | golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= |
|
| 102 | - | golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= |
|
| 103 | - | golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= |
|
| 104 | - | golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|
| 87 | + | golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY= |
|
| 88 | + | golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E= |
|
| 89 | + | golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= |
|
| 90 | + | golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= |
|
| 105 | 91 | golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|
| 106 | 92 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
|
| 107 | 93 | golang.org/x/sys v0.44.0 h1:ildZl3J4uzeKP07r2F++Op7E9B29JRUy+a27EibtBTQ= |
|
| 5 | 5 | "os" |
|
| 6 | 6 | ||
| 7 | 7 | "github.com/stevedylandev/andromeda/apps/jotts-go/tui" |
|
| 8 | - | "github.com/stevedylandev/andromeda/crates-go/config" |
|
| 9 | 8 | ) |
|
| 10 | 9 | ||
| 11 | 10 | func main() { |
|
| 12 | - | config.LoadDotEnv(".env") |
|
| 13 | - | ||
| 14 | 11 | args := os.Args[1:] |
|
| 15 | 12 | if len(args) == 0 { |
|
| 16 | 13 | runTUI(nil) |
| 4 | 4 | "os" |
|
| 5 | 5 | "os/exec" |
|
| 6 | 6 | ||
| 7 | - | tea "github.com/charmbracelet/bubbletea" |
|
| 7 | + | tea "charm.land/bubbletea/v2" |
|
| 8 | 8 | ) |
|
| 9 | 9 | ||
| 10 | 10 | func openExternalEditor(shortID, content string) tea.Cmd { |
| 1 | 1 | package tui |
|
| 2 | 2 | ||
| 3 | - | import "github.com/charmbracelet/bubbles/key" |
|
| 3 | + | import "charm.land/bubbles/v2/key" |
|
| 4 | 4 | ||
| 5 | 5 | type keyMap struct { |
|
| 6 | 6 | Up key.Binding |
| 4 | 4 | "strings" |
|
| 5 | 5 | "time" |
|
| 6 | 6 | ||
| 7 | - | "github.com/charmbracelet/bubbles/help" |
|
| 8 | - | "github.com/charmbracelet/bubbles/textarea" |
|
| 9 | - | "github.com/charmbracelet/bubbles/textinput" |
|
| 10 | - | "github.com/charmbracelet/bubbles/viewport" |
|
| 11 | - | tea "github.com/charmbracelet/bubbletea" |
|
| 7 | + | "charm.land/bubbles/v2/help" |
|
| 8 | + | "charm.land/bubbles/v2/textarea" |
|
| 9 | + | "charm.land/bubbles/v2/textinput" |
|
| 10 | + | "charm.land/bubbles/v2/viewport" |
|
| 11 | + | tea "charm.land/bubbletea/v2" |
|
| 12 | 12 | ) |
|
| 13 | 13 | ||
| 14 | 14 | type Focus int |
|
| 71 | 71 | si.Placeholder = "search titles" |
|
| 72 | 72 | si.Prompt = "/ " |
|
| 73 | 73 | ||
| 74 | - | vp := viewport.New(0, 0) |
|
| 74 | + | vp := viewport.New() |
|
| 75 | 75 | ||
| 76 | 76 | m := Model{ |
|
| 77 | 77 | backend: backend, |
|
| 94 | 94 | } |
|
| 95 | 95 | ||
| 96 | 96 | func (m Model) Init() tea.Cmd { |
|
| 97 | - | return tea.WindowSize() |
|
| 97 | + | return tea.RequestWindowSize |
|
| 98 | 98 | } |
|
| 99 | 99 | ||
| 100 | 100 | func (m *Model) visibleNotes() []Note { |
|
| 3 | 3 | import ( |
|
| 4 | 4 | "fmt" |
|
| 5 | 5 | ||
| 6 | - | "github.com/charmbracelet/glamour" |
|
| 7 | - | "github.com/charmbracelet/glamour/ansi" |
|
| 6 | + | "charm.land/glamour/v2" |
|
| 7 | + | "charm.land/glamour/v2/ansi" |
|
| 8 | 8 | ) |
|
| 9 | 9 | ||
| 10 | 10 | type mdRenderer struct { |
| 3 | 3 | import ( |
|
| 4 | 4 | "os" |
|
| 5 | 5 | ||
| 6 | - | tea "github.com/charmbracelet/bubbletea" |
|
| 6 | + | tea "charm.land/bubbletea/v2" |
|
| 7 | 7 | "golang.org/x/term" |
|
| 8 | 8 | ) |
|
| 9 | 9 | ||
| 24 | 24 | width, height = w, h |
|
| 25 | 25 | } |
|
| 26 | 26 | ||
| 27 | - | p := tea.NewProgram(newModel(backend, notes, width, height), tea.WithAltScreen()) |
|
| 27 | + | p := tea.NewProgram(newModel(backend, notes, width, height)) |
|
| 28 | 28 | _, err = p.Run() |
|
| 29 | 29 | return err |
|
| 30 | 30 | } |
|
| 4 | 4 | "strings" |
|
| 5 | 5 | ||
| 6 | 6 | "github.com/atotto/clipboard" |
|
| 7 | - | "github.com/charmbracelet/bubbles/key" |
|
| 8 | - | tea "github.com/charmbracelet/bubbletea" |
|
| 7 | + | "charm.land/bubbles/v2/key" |
|
| 8 | + | tea "charm.land/bubbletea/v2" |
|
| 9 | 9 | ) |
|
| 10 | 10 | ||
| 11 | 11 | func loadNotesCmd(b Backend) tea.Cmd { |
|
| 105 | 105 | m.status = "" |
|
| 106 | 106 | return m, nil |
|
| 107 | 107 | ||
| 108 | - | case tea.KeyMsg: |
|
| 108 | + | case tea.KeyPressMsg: |
|
| 109 | 109 | return m.handleKey(msg) |
|
| 110 | 110 | } |
|
| 111 | 111 | ||
| 122 | 122 | contentInnerW := maxInt(contentOuterW-paneFrameWidth(), 20) |
|
| 123 | 123 | contentInnerH := maxInt(bodyOuterH-paneFrameHeight(), 3) |
|
| 124 | 124 | ||
| 125 | - | m.contentVP.Width = maxInt(contentInnerW, 1) |
|
| 126 | - | m.contentVP.Height = maxInt(contentInnerH-1, 1) |
|
| 125 | + | m.contentVP.SetWidth(maxInt(contentInnerW, 1)) |
|
| 126 | + | m.contentVP.SetHeight(maxInt(contentInnerH-1, 1)) |
|
| 127 | 127 | ||
| 128 | - | m.titleInput.Width = maxInt(contentInnerW-4, 1) |
|
| 128 | + | m.titleInput.SetWidth(maxInt(contentInnerW-4, 1)) |
|
| 129 | 129 | m.contentArea.SetWidth(maxInt(contentInnerW-2, 1)) |
|
| 130 | 130 | m.contentArea.SetHeight(maxInt(contentInnerH-6, 1)) |
|
| 131 | 131 | ||
| 132 | 132 | listOuterW, _ := splitWidths(m.width) |
|
| 133 | 133 | listInnerW := maxInt(listOuterW-paneFrameWidth(), 1) |
|
| 134 | - | m.searchInput.Width = maxInt(listInnerW-2, 1) |
|
| 134 | + | m.searchInput.SetWidth(maxInt(listInnerW-2, 1)) |
|
| 135 | 135 | ||
| 136 | 136 | if m.renderer == nil { |
|
| 137 | 137 | m.renderer = newRenderer(contentInnerW) |
|
| 159 | 159 | m.contentVP.SetContent(m.renderer.render(n.ShortID, body)) |
|
| 160 | 160 | } |
|
| 161 | 161 | ||
| 162 | - | func (m Model) handleKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) { |
|
| 162 | + | func (m Model) handleKey(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { |
|
| 163 | 163 | if m.confirmDelete { |
|
| 164 | 164 | switch msg.String() { |
|
| 165 | 165 | case "y", "Y": |
|
| 196 | 196 | return m, nil |
|
| 197 | 197 | } |
|
| 198 | 198 | ||
| 199 | - | func (m Model) keyList(msg tea.KeyMsg) (tea.Model, tea.Cmd) { |
|
| 199 | + | func (m Model) keyList(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { |
|
| 200 | 200 | notes := m.visibleNotes() |
|
| 201 | 201 | switch { |
|
| 202 | 202 | case key.Matches(msg, m.keys.Quit): |
|
| 282 | 282 | return m, nil |
|
| 283 | 283 | } |
|
| 284 | 284 | ||
| 285 | - | func (m Model) keyContent(msg tea.KeyMsg) (tea.Model, tea.Cmd) { |
|
| 285 | + | func (m Model) keyContent(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { |
|
| 286 | 286 | switch { |
|
| 287 | 287 | case key.Matches(msg, m.keys.Quit), key.Matches(msg, m.keys.Back): |
|
| 288 | 288 | m.focus = FocusList |
|
| 289 | 289 | return m, nil |
|
| 290 | 290 | case key.Matches(msg, m.keys.Down): |
|
| 291 | - | m.contentVP.LineDown(1) |
|
| 291 | + | m.contentVP.ScrollDown(1) |
|
| 292 | 292 | case key.Matches(msg, m.keys.Up): |
|
| 293 | - | m.contentVP.LineUp(1) |
|
| 293 | + | m.contentVP.ScrollUp(1) |
|
| 294 | 294 | case key.Matches(msg, m.keys.Edit): |
|
| 295 | 295 | n := m.currentNote() |
|
| 296 | 296 | if n != nil { |
|
| 334 | 334 | return m, cmd |
|
| 335 | 335 | } |
|
| 336 | 336 | ||
| 337 | - | func (m Model) keyForm(msg tea.KeyMsg) (tea.Model, tea.Cmd) { |
|
| 337 | + | func (m Model) keyForm(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { |
|
| 338 | 338 | switch { |
|
| 339 | 339 | case key.Matches(msg, m.keys.Cancel): |
|
| 340 | 340 | m.focus = FocusList |
|
| 386 | 386 | } |
|
| 387 | 387 | } |
|
| 388 | 388 | ||
| 389 | - | func (m Model) keySearch(msg tea.KeyMsg) (tea.Model, tea.Cmd) { |
|
| 389 | + | func (m Model) keySearch(msg tea.KeyPressMsg) (tea.Model, tea.Cmd) { |
|
| 390 | 390 | switch msg.String() { |
|
| 391 | 391 | case "esc": |
|
| 392 | 392 | m.searchInput.SetValue("") |
|
| 4 | 4 | "fmt" |
|
| 5 | 5 | "strings" |
|
| 6 | 6 | ||
| 7 | - | "github.com/charmbracelet/lipgloss" |
|
| 7 | + | tea "charm.land/bubbletea/v2" |
|
| 8 | + | "charm.land/lipgloss/v2" |
|
| 8 | 9 | ) |
|
| 9 | 10 | ||
| 10 | 11 | var ( |
|
| 37 | 38 | Padding(1, 2) |
|
| 38 | 39 | ) |
|
| 39 | 40 | ||
| 40 | - | func (m Model) View() string { |
|
| 41 | + | func (m Model) View() tea.View { |
|
| 41 | 42 | listW, contentW := splitWidths(m.width) |
|
| 42 | 43 | bodyH := splitBodyHeight(m.height) |
|
| 43 | 44 | ||
| 44 | 45 | left := m.renderList(listW, bodyH) |
|
| 45 | 46 | right := m.renderRight(contentW, bodyH) |
|
| 46 | 47 | ||
| 47 | - | view := lipgloss.JoinHorizontal(lipgloss.Top, left, right) |
|
| 48 | + | base := lipgloss.JoinHorizontal(lipgloss.Top, left, right) |
|
| 48 | 49 | ||
| 50 | + | var overlays []*lipgloss.Layer |
|
| 49 | 51 | if m.showHelp { |
|
| 50 | - | view = lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, |
|
| 51 | - | modalStyle.Render(m.help.FullHelpView(m.keys.FullHelp())), |
|
| 52 | - | lipgloss.WithWhitespaceChars(" ")) |
|
| 52 | + | overlays = append(overlays, centerLayer(m.width, m.height, |
|
| 53 | + | modalStyle.Render(m.help.FullHelpView(m.keys.FullHelp())), 1)) |
|
| 53 | 54 | } |
|
| 54 | 55 | if m.confirmDelete { |
|
| 55 | 56 | n := m.currentNote() |
|
| 57 | 58 | if n != nil { |
|
| 58 | 59 | title = n.Title |
|
| 59 | 60 | } |
|
| 60 | - | view = lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Center, |
|
| 61 | - | modalStyle.Render(fmt.Sprintf("Delete %q?\n\ny / n", title)), |
|
| 62 | - | lipgloss.WithWhitespaceChars(" ")) |
|
| 61 | + | overlays = append(overlays, centerLayer(m.width, m.height, |
|
| 62 | + | modalStyle.Render(fmt.Sprintf("Delete %q?\n\ny / n", title)), 2)) |
|
| 63 | 63 | } |
|
| 64 | 64 | if m.status != "" { |
|
| 65 | 65 | st := statusOK |
|
| 66 | 66 | if !m.statusOK { |
|
| 67 | 67 | st = statusErr |
|
| 68 | 68 | } |
|
| 69 | - | view = lipgloss.Place(m.width, m.height, lipgloss.Center, lipgloss.Bottom, |
|
| 70 | - | modalStyle.Render(st.Render(m.status)), |
|
| 71 | - | lipgloss.WithWhitespaceChars(" ")) |
|
| 69 | + | overlays = append(overlays, bottomCenterLayer(m.width, m.height, |
|
| 70 | + | modalStyle.Render(st.Render(m.status)), 3)) |
|
| 72 | 71 | } |
|
| 73 | - | return view |
|
| 72 | + | ||
| 73 | + | content := base |
|
| 74 | + | if len(overlays) > 0 { |
|
| 75 | + | layers := append([]*lipgloss.Layer{lipgloss.NewLayer(base)}, overlays...) |
|
| 76 | + | canvas := lipgloss.NewCanvas(m.width, m.height) |
|
| 77 | + | canvas.Compose(lipgloss.NewCompositor(layers...)) |
|
| 78 | + | content = canvas.Render() |
|
| 79 | + | } |
|
| 80 | + | ||
| 81 | + | return tea.View{Content: content, AltScreen: true} |
|
| 82 | + | } |
|
| 83 | + | ||
| 84 | + | func centerLayer(w, h int, content string, z int) *lipgloss.Layer { |
|
| 85 | + | cw, ch := lipgloss.Width(content), lipgloss.Height(content) |
|
| 86 | + | x := (w - cw) / 2 |
|
| 87 | + | y := (h - ch) / 2 |
|
| 88 | + | if x < 0 { |
|
| 89 | + | x = 0 |
|
| 90 | + | } |
|
| 91 | + | if y < 0 { |
|
| 92 | + | y = 0 |
|
| 93 | + | } |
|
| 94 | + | return lipgloss.NewLayer(content).X(x).Y(y).Z(z) |
|
| 95 | + | } |
|
| 96 | + | ||
| 97 | + | func bottomCenterLayer(w, h int, content string, z int) *lipgloss.Layer { |
|
| 98 | + | cw, ch := lipgloss.Width(content), lipgloss.Height(content) |
|
| 99 | + | x := (w - cw) / 2 |
|
| 100 | + | y := h - ch - 1 |
|
| 101 | + | if x < 0 { |
|
| 102 | + | x = 0 |
|
| 103 | + | } |
|
| 104 | + | if y < 0 { |
|
| 105 | + | y = 0 |
|
| 106 | + | } |
|
| 107 | + | return lipgloss.NewLayer(content).X(x).Y(y).Z(z) |
|
| 74 | 108 | } |
|
| 75 | 109 | ||
| 76 | 110 | func (m Model) renderList(w, h int) string { |
|