Kaynağa Gözat

d02 Обновление вендоринга

SVI 3 yıl önce
ebeveyn
işleme
a29b2eff5b
39 değiştirilmiş dosya ile 27 ekleme ve 5854 silme
  1. 0 22
      vendor/github.com/atotto/clipboard/.travis.yml
  2. 0 27
      vendor/github.com/atotto/clipboard/LICENSE
  3. 0 48
      vendor/github.com/atotto/clipboard/README.md
  4. 0 20
      vendor/github.com/atotto/clipboard/clipboard.go
  5. 0 52
      vendor/github.com/atotto/clipboard/clipboard_darwin.go
  6. 0 42
      vendor/github.com/atotto/clipboard/clipboard_plan9.go
  7. 0 149
      vendor/github.com/atotto/clipboard/clipboard_unix.go
  8. 0 157
      vendor/github.com/atotto/clipboard/clipboard_windows.go
  9. 0 21
      vendor/github.com/charmbracelet/bubbles/LICENSE
  10. 0 207
      vendor/github.com/charmbracelet/bubbles/cursor/cursor.go
  11. 0 142
      vendor/github.com/charmbracelet/bubbles/key/key.go
  12. 0 102
      vendor/github.com/charmbracelet/bubbles/runeutil/runeutil.go
  13. 0 721
      vendor/github.com/charmbracelet/bubbles/textinput/textinput.go
  14. 1 1
      vendor/github.com/charmbracelet/bubbletea/LICENSE
  15. 18 14
      vendor/github.com/charmbracelet/bubbletea/tea.go
  16. 0 1
      vendor/github.com/charmbracelet/lipgloss/.gitignore
  17. 0 47
      vendor/github.com/charmbracelet/lipgloss/.golangci-soft.yml
  18. 0 29
      vendor/github.com/charmbracelet/lipgloss/.golangci.yml
  19. 0 21
      vendor/github.com/charmbracelet/lipgloss/LICENSE
  20. 0 458
      vendor/github.com/charmbracelet/lipgloss/README.md
  21. 0 82
      vendor/github.com/charmbracelet/lipgloss/align.go
  22. 0 7
      vendor/github.com/charmbracelet/lipgloss/ansi_unix.go
  23. 0 22
      vendor/github.com/charmbracelet/lipgloss/ansi_windows.go
  24. 0 412
      vendor/github.com/charmbracelet/lipgloss/borders.go
  25. 0 172
      vendor/github.com/charmbracelet/lipgloss/color.go
  26. 0 481
      vendor/github.com/charmbracelet/lipgloss/get.go
  27. 0 175
      vendor/github.com/charmbracelet/lipgloss/join.go
  28. 0 154
      vendor/github.com/charmbracelet/lipgloss/position.go
  29. 0 143
      vendor/github.com/charmbracelet/lipgloss/renderer.go
  30. 0 43
      vendor/github.com/charmbracelet/lipgloss/runes.go
  31. 0 634
      vendor/github.com/charmbracelet/lipgloss/set.go
  32. 0 41
      vendor/github.com/charmbracelet/lipgloss/size.go
  33. 0 497
      vendor/github.com/charmbracelet/lipgloss/style.go
  34. 0 306
      vendor/github.com/charmbracelet/lipgloss/unset.go
  35. 0 83
      vendor/github.com/charmbracelet/lipgloss/whitespace.go
  36. 0 167
      vendor/github.com/muesli/reflow/wordwrap/wordwrap.go
  37. 0 134
      vendor/github.com/muesli/reflow/wrap/wrap.go
  38. 5 3
      vendor/github.com/sirupsen/logrus/README.md
  39. 3 17
      vendor/modules.txt

+ 0 - 22
vendor/github.com/atotto/clipboard/.travis.yml

@@ -1,22 +0,0 @@
-language: go
-
-os:
- - linux
- - osx
- - windows
-
-go:
- - go1.13.x
- - go1.x
-
-services:
- - xvfb
-
-before_install:
- - export DISPLAY=:99.0
-
-script:
- - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install xsel; fi
- - go test -v .
- - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install xclip; fi
- - go test -v .

+ 0 - 27
vendor/github.com/atotto/clipboard/LICENSE

@@ -1,27 +0,0 @@
-Copyright (c) 2013 Ato Araki. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-   * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
-   * Neither the name of @atotto. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 48
vendor/github.com/atotto/clipboard/README.md

@@ -1,48 +0,0 @@
-[![Build Status](https://travis-ci.org/atotto/clipboard.svg?branch=master)](https://travis-ci.org/atotto/clipboard)
-
-[![GoDoc](https://godoc.org/github.com/atotto/clipboard?status.svg)](http://godoc.org/github.com/atotto/clipboard)
-
-# Clipboard for Go
-
-Provide copying and pasting to the Clipboard for Go.
-
-Build:
-
-    $ go get github.com/atotto/clipboard
-
-Platforms:
-
-* OSX
-* Windows 7 (probably work on other Windows)
-* Linux, Unix (requires 'xclip' or 'xsel' command to be installed)
-
-
-Document: 
-
-* http://godoc.org/github.com/atotto/clipboard
-
-Notes:
-
-* Text string only
-* UTF-8 text encoding only (no conversion)
-
-TODO:
-
-* Clipboard watcher(?)
-
-## Commands:
-
-paste shell command:
-
-    $ go get github.com/atotto/clipboard/cmd/gopaste
-    $ # example:
-    $ gopaste > document.txt
-
-copy shell command:
-
-    $ go get github.com/atotto/clipboard/cmd/gocopy
-    $ # example:
-    $ cat document.txt | gocopy
-
-
-

+ 0 - 20
vendor/github.com/atotto/clipboard/clipboard.go

@@ -1,20 +0,0 @@
-// Copyright 2013 @atotto. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package clipboard read/write on clipboard
-package clipboard
-
-// ReadAll read string from clipboard
-func ReadAll() (string, error) {
-	return readAll()
-}
-
-// WriteAll write string to clipboard
-func WriteAll(text string) error {
-	return writeAll(text)
-}
-
-// Unsupported might be set true during clipboard init, to help callers decide
-// whether or not to offer clipboard options.
-var Unsupported bool

+ 0 - 52
vendor/github.com/atotto/clipboard/clipboard_darwin.go

@@ -1,52 +0,0 @@
-// Copyright 2013 @atotto. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin
-
-package clipboard
-
-import (
-	"os/exec"
-)
-
-var (
-	pasteCmdArgs = "pbpaste"
-	copyCmdArgs  = "pbcopy"
-)
-
-func getPasteCommand() *exec.Cmd {
-	return exec.Command(pasteCmdArgs)
-}
-
-func getCopyCommand() *exec.Cmd {
-	return exec.Command(copyCmdArgs)
-}
-
-func readAll() (string, error) {
-	pasteCmd := getPasteCommand()
-	out, err := pasteCmd.Output()
-	if err != nil {
-		return "", err
-	}
-	return string(out), nil
-}
-
-func writeAll(text string) error {
-	copyCmd := getCopyCommand()
-	in, err := copyCmd.StdinPipe()
-	if err != nil {
-		return err
-	}
-
-	if err := copyCmd.Start(); err != nil {
-		return err
-	}
-	if _, err := in.Write([]byte(text)); err != nil {
-		return err
-	}
-	if err := in.Close(); err != nil {
-		return err
-	}
-	return copyCmd.Wait()
-}

+ 0 - 42
vendor/github.com/atotto/clipboard/clipboard_plan9.go

@@ -1,42 +0,0 @@
-// Copyright 2013 @atotto. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build plan9
-
-package clipboard
-
-import (
-	"os"
-	"io/ioutil"
-)
-
-func readAll() (string, error) {
-	f, err := os.Open("/dev/snarf")
-	if err != nil {
-		return "", err
-	}
-	defer f.Close()
-
-	str, err := ioutil.ReadAll(f)
-	if err != nil {
-		return "", err
-	}
-	
-	return string(str), nil
-}
-
-func writeAll(text string) error {
-	f, err := os.OpenFile("/dev/snarf", os.O_WRONLY, 0666)
-	if err != nil {
-		return err
-	}
-	defer f.Close()
-	
-	_, err = f.Write([]byte(text))
-	if err != nil {
-		return err
-	}
-	
-	return nil
-}

+ 0 - 149
vendor/github.com/atotto/clipboard/clipboard_unix.go

@@ -1,149 +0,0 @@
-// Copyright 2013 @atotto. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd linux netbsd openbsd solaris dragonfly
-
-package clipboard
-
-import (
-	"errors"
-	"os"
-	"os/exec"
-)
-
-const (
-	xsel               = "xsel"
-	xclip              = "xclip"
-	powershellExe      = "powershell.exe"
-	clipExe            = "clip.exe"
-	wlcopy             = "wl-copy"
-	wlpaste            = "wl-paste"
-	termuxClipboardGet = "termux-clipboard-get"
-	termuxClipboardSet = "termux-clipboard-set"
-)
-
-var (
-	Primary bool
-	trimDos bool
-
-	pasteCmdArgs []string
-	copyCmdArgs  []string
-
-	xselPasteArgs = []string{xsel, "--output", "--clipboard"}
-	xselCopyArgs  = []string{xsel, "--input", "--clipboard"}
-
-	xclipPasteArgs = []string{xclip, "-out", "-selection", "clipboard"}
-	xclipCopyArgs  = []string{xclip, "-in", "-selection", "clipboard"}
-
-	powershellExePasteArgs = []string{powershellExe, "Get-Clipboard"}
-	clipExeCopyArgs        = []string{clipExe}
-
-	wlpasteArgs = []string{wlpaste, "--no-newline"}
-	wlcopyArgs  = []string{wlcopy}
-
-	termuxPasteArgs = []string{termuxClipboardGet}
-	termuxCopyArgs  = []string{termuxClipboardSet}
-
-	missingCommands = errors.New("No clipboard utilities available. Please install xsel, xclip, wl-clipboard or Termux:API add-on for termux-clipboard-get/set.")
-)
-
-func init() {
-	if os.Getenv("WAYLAND_DISPLAY") != "" {
-		pasteCmdArgs = wlpasteArgs
-		copyCmdArgs = wlcopyArgs
-
-		if _, err := exec.LookPath(wlcopy); err == nil {
-			if _, err := exec.LookPath(wlpaste); err == nil {
-				return
-			}
-		}
-	}
-
-	pasteCmdArgs = xclipPasteArgs
-	copyCmdArgs = xclipCopyArgs
-
-	if _, err := exec.LookPath(xclip); err == nil {
-		return
-	}
-
-	pasteCmdArgs = xselPasteArgs
-	copyCmdArgs = xselCopyArgs
-
-	if _, err := exec.LookPath(xsel); err == nil {
-		return
-	}
-
-	pasteCmdArgs = termuxPasteArgs
-	copyCmdArgs = termuxCopyArgs
-
-	if _, err := exec.LookPath(termuxClipboardSet); err == nil {
-		if _, err := exec.LookPath(termuxClipboardGet); err == nil {
-			return
-		}
-	}
-
-	pasteCmdArgs = powershellExePasteArgs
-	copyCmdArgs = clipExeCopyArgs
-	trimDos = true
-
-	if _, err := exec.LookPath(clipExe); err == nil {
-		if _, err := exec.LookPath(powershellExe); err == nil {
-			return
-		}
-	}
-
-	Unsupported = true
-}
-
-func getPasteCommand() *exec.Cmd {
-	if Primary {
-		pasteCmdArgs = pasteCmdArgs[:1]
-	}
-	return exec.Command(pasteCmdArgs[0], pasteCmdArgs[1:]...)
-}
-
-func getCopyCommand() *exec.Cmd {
-	if Primary {
-		copyCmdArgs = copyCmdArgs[:1]
-	}
-	return exec.Command(copyCmdArgs[0], copyCmdArgs[1:]...)
-}
-
-func readAll() (string, error) {
-	if Unsupported {
-		return "", missingCommands
-	}
-	pasteCmd := getPasteCommand()
-	out, err := pasteCmd.Output()
-	if err != nil {
-		return "", err
-	}
-	result := string(out)
-	if trimDos && len(result) > 1 {
-		result = result[:len(result)-2]
-	}
-	return result, nil
-}
-
-func writeAll(text string) error {
-	if Unsupported {
-		return missingCommands
-	}
-	copyCmd := getCopyCommand()
-	in, err := copyCmd.StdinPipe()
-	if err != nil {
-		return err
-	}
-
-	if err := copyCmd.Start(); err != nil {
-		return err
-	}
-	if _, err := in.Write([]byte(text)); err != nil {
-		return err
-	}
-	if err := in.Close(); err != nil {
-		return err
-	}
-	return copyCmd.Wait()
-}

+ 0 - 157
vendor/github.com/atotto/clipboard/clipboard_windows.go

@@ -1,157 +0,0 @@
-// Copyright 2013 @atotto. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package clipboard
-
-import (
-	"runtime"
-	"syscall"
-	"time"
-	"unsafe"
-)
-
-const (
-	cfUnicodetext = 13
-	gmemMoveable  = 0x0002
-)
-
-var (
-	user32                     = syscall.MustLoadDLL("user32")
-	isClipboardFormatAvailable = user32.MustFindProc("IsClipboardFormatAvailable")
-	openClipboard              = user32.MustFindProc("OpenClipboard")
-	closeClipboard             = user32.MustFindProc("CloseClipboard")
-	emptyClipboard             = user32.MustFindProc("EmptyClipboard")
-	getClipboardData           = user32.MustFindProc("GetClipboardData")
-	setClipboardData           = user32.MustFindProc("SetClipboardData")
-
-	kernel32     = syscall.NewLazyDLL("kernel32")
-	globalAlloc  = kernel32.NewProc("GlobalAlloc")
-	globalFree   = kernel32.NewProc("GlobalFree")
-	globalLock   = kernel32.NewProc("GlobalLock")
-	globalUnlock = kernel32.NewProc("GlobalUnlock")
-	lstrcpy      = kernel32.NewProc("lstrcpyW")
-)
-
-// waitOpenClipboard opens the clipboard, waiting for up to a second to do so.
-func waitOpenClipboard() error {
-	started := time.Now()
-	limit := started.Add(time.Second)
-	var r uintptr
-	var err error
-	for time.Now().Before(limit) {
-		r, _, err = openClipboard.Call(0)
-		if r != 0 {
-			return nil
-		}
-		time.Sleep(time.Millisecond)
-	}
-	return err
-}
-
-func readAll() (string, error) {
-	// LockOSThread ensure that the whole method will keep executing on the same thread from begin to end (it actually locks the goroutine thread attribution).
-	// Otherwise if the goroutine switch thread during execution (which is a common practice), the OpenClipboard and CloseClipboard will happen on two different threads, and it will result in a clipboard deadlock.
-	runtime.LockOSThread()
-	defer runtime.UnlockOSThread()
-	if formatAvailable, _, err := isClipboardFormatAvailable.Call(cfUnicodetext); formatAvailable == 0 {
-		return "", err
-	}
-	err := waitOpenClipboard()
-	if err != nil {
-		return "", err
-	}
-
-	h, _, err := getClipboardData.Call(cfUnicodetext)
-	if h == 0 {
-		_, _, _ = closeClipboard.Call()
-		return "", err
-	}
-
-	l, _, err := globalLock.Call(h)
-	if l == 0 {
-		_, _, _ = closeClipboard.Call()
-		return "", err
-	}
-
-	text := syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(l))[:])
-
-	r, _, err := globalUnlock.Call(h)
-	if r == 0 {
-		_, _, _ = closeClipboard.Call()
-		return "", err
-	}
-
-	closed, _, err := closeClipboard.Call()
-	if closed == 0 {
-		return "", err
-	}
-	return text, nil
-}
-
-func writeAll(text string) error {
-	// LockOSThread ensure that the whole method will keep executing on the same thread from begin to end (it actually locks the goroutine thread attribution).
-	// Otherwise if the goroutine switch thread during execution (which is a common practice), the OpenClipboard and CloseClipboard will happen on two different threads, and it will result in a clipboard deadlock.
-	runtime.LockOSThread()
-	defer runtime.UnlockOSThread()
-
-	err := waitOpenClipboard()
-	if err != nil {
-		return err
-	}
-
-	r, _, err := emptyClipboard.Call(0)
-	if r == 0 {
-		_, _, _ = closeClipboard.Call()
-		return err
-	}
-
-	data := syscall.StringToUTF16(text)
-
-	// "If the hMem parameter identifies a memory object, the object must have
-	// been allocated using the function with the GMEM_MOVEABLE flag."
-	h, _, err := globalAlloc.Call(gmemMoveable, uintptr(len(data)*int(unsafe.Sizeof(data[0]))))
-	if h == 0 {
-		_, _, _ = closeClipboard.Call()
-		return err
-	}
-	defer func() {
-		if h != 0 {
-			globalFree.Call(h)
-		}
-	}()
-
-	l, _, err := globalLock.Call(h)
-	if l == 0 {
-		_, _, _ = closeClipboard.Call()
-		return err
-	}
-
-	r, _, err = lstrcpy.Call(l, uintptr(unsafe.Pointer(&data[0])))
-	if r == 0 {
-		_, _, _ = closeClipboard.Call()
-		return err
-	}
-
-	r, _, err = globalUnlock.Call(h)
-	if r == 0 {
-		if err.(syscall.Errno) != 0 {
-			_, _, _ = closeClipboard.Call()
-			return err
-		}
-	}
-
-	r, _, err = setClipboardData.Call(cfUnicodetext, h)
-	if r == 0 {
-		_, _, _ = closeClipboard.Call()
-		return err
-	}
-	h = 0 // suppress deferred cleanup
-	closed, _, err := closeClipboard.Call()
-	if closed == 0 {
-		return err
-	}
-	return nil
-}

+ 0 - 21
vendor/github.com/charmbracelet/bubbles/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 Charmbracelet, Inc
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 207
vendor/github.com/charmbracelet/bubbles/cursor/cursor.go

@@ -1,207 +0,0 @@
-package cursor
-
-import (
-	"context"
-	"time"
-
-	tea "github.com/charmbracelet/bubbletea"
-	"github.com/charmbracelet/lipgloss"
-)
-
-const defaultBlinkSpeed = time.Millisecond * 530
-
-// initialBlinkMsg initializes cursor blinking.
-type initialBlinkMsg struct{}
-
-// BlinkMsg signals that the cursor should blink. It contains metadata that
-// allows us to tell if the blink message is the one we're expecting.
-type BlinkMsg struct {
-	id  int
-	tag int
-}
-
-// blinkCanceled is sent when a blink operation is canceled.
-type blinkCanceled struct{}
-
-// blinkCtx manages cursor blinking.
-type blinkCtx struct {
-	ctx    context.Context
-	cancel context.CancelFunc
-}
-
-// Mode describes the behavior of the cursor.
-type Mode int
-
-// Available cursor modes.
-const (
-	CursorBlink Mode = iota
-	CursorStatic
-	CursorHide
-)
-
-// String returns the cursor mode in a human-readable format. This method is
-// provisional and for informational purposes only.
-func (c Mode) String() string {
-	return [...]string{
-		"blink",
-		"static",
-		"hidden",
-	}[c]
-}
-
-// Model is the Bubble Tea model for this cursor element.
-type Model struct {
-	BlinkSpeed time.Duration
-	// Style for styling the cursor block.
-	Style lipgloss.Style
-	// TextStyle is the style used for the cursor when it is hidden (when blinking).
-	// I.e. displaying normal text.
-	TextStyle lipgloss.Style
-
-	// char is the character under the cursor
-	char string
-	// The ID of this Model as it relates to other cursors
-	id int
-	// focus indicates whether the containing input is focused
-	focus bool
-	// Cursor Blink state.
-	Blink bool
-	// Used to manage cursor blink
-	blinkCtx *blinkCtx
-	// The ID of the blink message we're expecting to receive.
-	blinkTag int
-	// mode determines the behavior of the cursor
-	mode Mode
-}
-
-// New creates a new model with default settings.
-func New() Model {
-	return Model{
-		BlinkSpeed: defaultBlinkSpeed,
-
-		Blink: true,
-		mode:  CursorBlink,
-
-		blinkCtx: &blinkCtx{
-			ctx: context.Background(),
-		},
-	}
-}
-
-// Update updates the cursor.
-func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
-	switch msg := msg.(type) {
-	case initialBlinkMsg:
-		// We accept all initialBlinkMsgs generated by the Blink command.
-
-		if m.mode != CursorBlink || !m.focus {
-			return m, nil
-		}
-
-		cmd := m.BlinkCmd()
-		return m, cmd
-
-	case BlinkMsg:
-		// We're choosy about whether to accept blinkMsgs so that our cursor
-		// only exactly when it should.
-
-		// Is this model blink-able?
-		if m.mode != CursorBlink || !m.focus {
-			return m, nil
-		}
-
-		// Were we expecting this blink message?
-		if msg.id != m.id || msg.tag != m.blinkTag {
-			return m, nil
-		}
-
-		var cmd tea.Cmd
-		if m.mode == CursorBlink {
-			m.Blink = !m.Blink
-			cmd = m.BlinkCmd()
-		}
-		return m, cmd
-
-	case blinkCanceled: // no-op
-		return m, nil
-	}
-	return m, nil
-}
-
-// Mode returns the model's cursor mode. For available cursor modes, see
-// type Mode.
-func (m Model) Mode() Mode {
-	return m.mode
-}
-
-// SetMode sets the model's cursor mode. This method returns a command.
-//
-// For available cursor modes, see type CursorMode.
-func (m *Model) SetMode(mode Mode) tea.Cmd {
-	m.mode = mode
-	m.Blink = m.mode == CursorHide || !m.focus
-	if mode == CursorBlink {
-		return Blink
-	}
-	return nil
-}
-
-// BlinkCmd is an command used to manage cursor blinking.
-func (m *Model) BlinkCmd() tea.Cmd {
-	if m.mode != CursorBlink {
-		return nil
-	}
-
-	if m.blinkCtx != nil && m.blinkCtx.cancel != nil {
-		m.blinkCtx.cancel()
-	}
-
-	ctx, cancel := context.WithTimeout(m.blinkCtx.ctx, m.BlinkSpeed)
-	m.blinkCtx.cancel = cancel
-
-	m.blinkTag++
-
-	return func() tea.Msg {
-		defer cancel()
-		<-ctx.Done()
-		if ctx.Err() == context.DeadlineExceeded {
-			return BlinkMsg{id: m.id, tag: m.blinkTag}
-		}
-		return blinkCanceled{}
-	}
-}
-
-// Blink is a command used to initialize cursor blinking.
-func Blink() tea.Msg {
-	return initialBlinkMsg{}
-}
-
-// Focus focuses the cursor to allow it to blink if desired.
-func (m *Model) Focus() tea.Cmd {
-	m.focus = true
-	m.Blink = m.mode == CursorHide // show the cursor unless we've explicitly hidden it
-
-	if m.mode == CursorBlink && m.focus {
-		return m.BlinkCmd()
-	}
-	return nil
-}
-
-// Blur blurs the cursor.
-func (m *Model) Blur() {
-	m.focus = false
-	m.Blink = true
-}
-
-// SetChar sets the character under the cursor.
-func (m *Model) SetChar(char string) {
-	m.char = char
-}
-
-// View displays the cursor.
-func (m Model) View() string {
-	if m.Blink {
-		return m.TextStyle.Inline(true).Render(m.char)
-	}
-	return m.Style.Inline(true).Reverse(true).Render(m.char)
-}

+ 0 - 142
vendor/github.com/charmbracelet/bubbles/key/key.go

@@ -1,142 +0,0 @@
-// Package key provides some types and functions for generating user-definable
-// keymappings useful in Bubble Tea components. There are a few different ways
-// you can define a keymapping with this package. Here's one example:
-//
-//	type KeyMap struct {
-//	    Up key.Binding
-//	    Down key.Binding
-//	}
-//
-//	var DefaultKeyMap = KeyMap{
-//	    Up: key.NewBinding(
-//	        key.WithKeys("k", "up"),        // actual keybindings
-//	        key.WithHelp("↑/k", "move up"), // corresponding help text
-//	    ),
-//	    Down: key.NewBinding(
-//	        key.WithKeys("j", "down"),
-//	        key.WithHelp("↓/j", "move down"),
-//	    ),
-//	}
-//
-//	func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
-//	    switch msg := msg.(type) {
-//	    case tea.KeyMsg:
-//	        switch {
-//	        case key.Matches(msg, DefaultKeyMap.Up):
-//	            // The user pressed up
-//	        case key.Matches(msg, DefaultKeyMap.Down):
-//	            // The user pressed down
-//	        }
-//	    }
-//
-//	    // ...
-//	}
-//
-// The help information, which is not used in the example above, can be used
-// to render help text for keystrokes in your views.
-package key
-
-import (
-	tea "github.com/charmbracelet/bubbletea"
-)
-
-// Binding describes a set of keybindings and, optionally, their associated
-// help text.
-type Binding struct {
-	keys     []string
-	help     Help
-	disabled bool
-}
-
-// BindingOpt is an initialization option for a keybinding. It's used as an
-// argument to NewBinding.
-type BindingOpt func(*Binding)
-
-// NewBinding returns a new keybinding from a set of BindingOpt options.
-func NewBinding(opts ...BindingOpt) Binding {
-	b := &Binding{}
-	for _, opt := range opts {
-		opt(b)
-	}
-	return *b
-}
-
-// WithKeys initializes a keybinding with the given keystrokes.
-func WithKeys(keys ...string) BindingOpt {
-	return func(b *Binding) {
-		b.keys = keys
-	}
-}
-
-// WithHelp initializes a keybinding with the given help text.
-func WithHelp(key, desc string) BindingOpt {
-	return func(b *Binding) {
-		b.help = Help{Key: key, Desc: desc}
-	}
-}
-
-// WithDisabled initializes a disabled keybinding.
-func WithDisabled() BindingOpt {
-	return func(b *Binding) {
-		b.disabled = true
-	}
-}
-
-// SetKeys sets the keys for the keybinding.
-func (b *Binding) SetKeys(keys ...string) {
-	b.keys = keys
-}
-
-// Keys returns the keys for the keybinding.
-func (b Binding) Keys() []string {
-	return b.keys
-}
-
-// SetHelp sets the help text for the keybinding.
-func (b *Binding) SetHelp(key, desc string) {
-	b.help = Help{Key: key, Desc: desc}
-}
-
-// Help returns the Help information for the keybinding.
-func (b Binding) Help() Help {
-	return b.help
-}
-
-// Enabled returns whether or not the keybinding is enabled. Disabled
-// keybindings won't be activated and won't show up in help. Keybindings are
-// enabled by default.
-func (b Binding) Enabled() bool {
-	return !b.disabled && b.keys != nil
-}
-
-// SetEnabled enables or disables the keybinding.
-func (b *Binding) SetEnabled(v bool) {
-	b.disabled = !v
-}
-
-// Unbind removes the keys and help from this binding, effectively nullifying
-// it. This is a step beyond disabling it, since applications can enable
-// or disable key bindings based on application state.
-func (b *Binding) Unbind() {
-	b.keys = nil
-	b.help = Help{}
-}
-
-// Help is help information for a given keybinding.
-type Help struct {
-	Key  string
-	Desc string
-}
-
-// Matches checks if the given KeyMsg matches the given bindings.
-func Matches(k tea.KeyMsg, b ...Binding) bool {
-	keys := k.String()
-	for _, binding := range b {
-		for _, v := range binding.keys {
-			if keys == v && binding.Enabled() {
-				return true
-			}
-		}
-	}
-	return false
-}

+ 0 - 102
vendor/github.com/charmbracelet/bubbles/runeutil/runeutil.go

@@ -1,102 +0,0 @@
-// Package runeutil provides a utility function for use in Bubbles
-// that can process Key messages containing runes.
-package runeutil
-
-import (
-	"unicode"
-	"unicode/utf8"
-)
-
-// Sanitizer is a helper for bubble widgets that want to process
-// Runes from input key messages.
-type Sanitizer interface {
-	// Sanitize removes control characters from runes in a KeyRunes
-	// message, and optionally replaces newline/carriage return/tabs by a
-	// specified character.
-	//
-	// The rune array is modified in-place if possible. In that case, the
-	// returned slice is the original slice shortened after the control
-	// characters have been removed/translated.
-	Sanitize(runes []rune) []rune
-}
-
-// NewSanitizer constructs a rune sanitizer.
-func NewSanitizer(opts ...Option) Sanitizer {
-	s := sanitizer{
-		replaceNewLine: []rune("\n"),
-		replaceTab:     []rune("    "),
-	}
-	for _, o := range opts {
-		s = o(s)
-	}
-	return &s
-}
-
-// Option is the type of an option that can be passed to Sanitize().
-type Option func(sanitizer) sanitizer
-
-// ReplaceTabs replaces tabs by the specified string.
-func ReplaceTabs(tabRepl string) Option {
-	return func(s sanitizer) sanitizer {
-		s.replaceTab = []rune(tabRepl)
-		return s
-	}
-}
-
-// ReplaceNewlines replaces newline characters by the specified string.
-func ReplaceNewlines(nlRepl string) Option {
-	return func(s sanitizer) sanitizer {
-		s.replaceNewLine = []rune(nlRepl)
-		return s
-	}
-}
-
-func (s *sanitizer) Sanitize(runes []rune) []rune {
-	// dstrunes are where we are storing the result.
-	dstrunes := runes[:0:len(runes)]
-	// copied indicates whether dstrunes is an alias of runes
-	// or a copy. We need a copy when dst moves past src.
-	// We use this as an optimization to avoid allocating
-	// a new rune slice in the common case where the output
-	// is smaller or equal to the input.
-	copied := false
-
-	for src := 0; src < len(runes); src++ {
-		r := runes[src]
-		switch {
-		case r == utf8.RuneError:
-			// skip
-
-		case r == '\r' || r == '\n':
-			if len(dstrunes)+len(s.replaceNewLine) > src && !copied {
-				dst := len(dstrunes)
-				dstrunes = make([]rune, dst, len(runes)+len(s.replaceNewLine))
-				copy(dstrunes, runes[:dst])
-				copied = true
-			}
-			dstrunes = append(dstrunes, s.replaceNewLine...)
-
-		case r == '\t':
-			if len(dstrunes)+len(s.replaceTab) > src && !copied {
-				dst := len(dstrunes)
-				dstrunes = make([]rune, dst, len(runes)+len(s.replaceTab))
-				copy(dstrunes, runes[:dst])
-				copied = true
-			}
-			dstrunes = append(dstrunes, s.replaceTab...)
-
-		case unicode.IsControl(r):
-			// Other control characters: skip.
-
-		default:
-			// Keep the character.
-			dstrunes = append(dstrunes, runes[src])
-		}
-	}
-	return dstrunes
-}
-
-type sanitizer struct {
-	replaceNewLine []rune
-	replaceTab     []rune
-}

+ 0 - 721
vendor/github.com/charmbracelet/bubbles/textinput/textinput.go

@@ -1,721 +0,0 @@
-package textinput
-
-import (
-	"strings"
-	"time"
-	"unicode"
-
-	"github.com/atotto/clipboard"
-	"github.com/charmbracelet/bubbles/cursor"
-	"github.com/charmbracelet/bubbles/key"
-	"github.com/charmbracelet/bubbles/runeutil"
-	tea "github.com/charmbracelet/bubbletea"
-	"github.com/charmbracelet/lipgloss"
-	rw "github.com/mattn/go-runewidth"
-)
-
-// Internal messages for clipboard operations.
-type pasteMsg string
-type pasteErrMsg struct{ error }
-
-// EchoMode sets the input behavior of the text input field.
-type EchoMode int
-
-const (
-	// EchoNormal displays text as is. This is the default behavior.
-	EchoNormal EchoMode = iota
-
-	// EchoPassword displays the EchoCharacter mask instead of actual
-	// characters.  This is commonly used for password fields.
-	EchoPassword
-
-	// EchoNone displays nothing as characters are entered. This is commonly
-	// seen for password fields on the command line.
-	EchoNone
-
-	// EchoOnEdit.
-)
-
-// ValidateFunc is a function that returns an error if the input is invalid.
-type ValidateFunc func(string) error
-
-// KeyMap is the key bindings for different actions within the textinput.
-type KeyMap struct {
-	CharacterForward        key.Binding
-	CharacterBackward       key.Binding
-	WordForward             key.Binding
-	WordBackward            key.Binding
-	DeleteWordBackward      key.Binding
-	DeleteWordForward       key.Binding
-	DeleteAfterCursor       key.Binding
-	DeleteBeforeCursor      key.Binding
-	DeleteCharacterBackward key.Binding
-	DeleteCharacterForward  key.Binding
-	LineStart               key.Binding
-	LineEnd                 key.Binding
-	Paste                   key.Binding
-}
-
-// DefaultKeyMap is the default set of key bindings for navigating and acting
-// upon the textinput.
-var DefaultKeyMap = KeyMap{
-	CharacterForward:        key.NewBinding(key.WithKeys("right", "ctrl+f")),
-	CharacterBackward:       key.NewBinding(key.WithKeys("left", "ctrl+b")),
-	WordForward:             key.NewBinding(key.WithKeys("alt+right", "alt+f")),
-	WordBackward:            key.NewBinding(key.WithKeys("alt+left", "alt+b")),
-	DeleteWordBackward:      key.NewBinding(key.WithKeys("alt+backspace", "ctrl+w")),
-	DeleteWordForward:       key.NewBinding(key.WithKeys("alte+delete", "alt+d")),
-	DeleteAfterCursor:       key.NewBinding(key.WithKeys("ctrl+k")),
-	DeleteBeforeCursor:      key.NewBinding(key.WithKeys("ctrl+u")),
-	DeleteCharacterBackward: key.NewBinding(key.WithKeys("backspace", "ctrl+h")),
-	DeleteCharacterForward:  key.NewBinding(key.WithKeys("delete", "ctrl+d")),
-	LineStart:               key.NewBinding(key.WithKeys("home", "ctrl+a")),
-	LineEnd:                 key.NewBinding(key.WithKeys("end", "ctrl+e")),
-	Paste:                   key.NewBinding(key.WithKeys("ctrl+v")),
-}
-
-// Model is the Bubble Tea model for this text input element.
-type Model struct {
-	Err error
-
-	// General settings.
-	Prompt        string
-	Placeholder   string
-	EchoMode      EchoMode
-	EchoCharacter rune
-	Cursor        cursor.Model
-
-	// Deprecated: use [cursor.BlinkSpeed] instead.
-	BlinkSpeed time.Duration
-
-	// Styles. These will be applied as inline styles.
-	//
-	// For an introduction to styling with Lip Gloss see:
-	// https://github.com/charmbracelet/lipgloss
-	PromptStyle      lipgloss.Style
-	TextStyle        lipgloss.Style
-	BackgroundStyle  lipgloss.Style
-	PlaceholderStyle lipgloss.Style
-	CursorStyle      lipgloss.Style
-
-	// CharLimit is the maximum amount of characters this input element will
-	// accept. If 0 or less, there's no limit.
-	CharLimit int
-
-	// Width is the maximum number of characters that can be displayed at once.
-	// It essentially treats the text field like a horizontally scrolling
-	// viewport. If 0 or less this setting is ignored.
-	Width int
-
-	// KeyMap encodes the keybindings recognized by the widget.
-	KeyMap KeyMap
-
-	// Underlying text value.
-	value []rune
-
-	// focus indicates whether user input focus should be on this input
-	// component. When false, ignore keyboard input and hide the cursor.
-	focus bool
-
-	// Cursor position.
-	pos int
-
-	// Used to emulate a viewport when width is set and the content is
-	// overflowing.
-	offset      int
-	offsetRight int
-
-	// Validate is a function that checks whether or not the text within the
-	// input is valid. If it is not valid, the `Err` field will be set to the
-	// error returned by the function. If the function is not defined, all
-	// input is considered valid.
-	Validate ValidateFunc
-
-	// rune sanitizer for input.
-	rsan runeutil.Sanitizer
-}
-
-// New creates a new model with default settings.
-func New() Model {
-	return Model{
-		Prompt:           "> ",
-		EchoCharacter:    '*',
-		CharLimit:        0,
-		PlaceholderStyle: lipgloss.NewStyle().Foreground(lipgloss.Color("240")),
-		Cursor:           cursor.New(),
-		KeyMap:           DefaultKeyMap,
-
-		value: nil,
-		focus: false,
-		pos:   0,
-	}
-}
-
-// NewModel creates a new model with default settings.
-//
-// Deprecated: Use [New] instead.
-var NewModel = New
-
-// SetValue sets the value of the text input.
-func (m *Model) SetValue(s string) {
-	// Clean up any special characters in the input provided by the
-	// caller. This avoids bugs due to e.g. tab characters and whatnot.
-	runes := m.san().Sanitize([]rune(s))
-	m.setValueInternal(runes)
-}
-
-func (m *Model) setValueInternal(runes []rune) {
-	if m.Validate != nil {
-		if err := m.Validate(string(runes)); err != nil {
-			m.Err = err
-			return
-		}
-	}
-
-	empty := len(m.value) == 0
-	m.Err = nil
-
-	if m.CharLimit > 0 && len(runes) > m.CharLimit {
-		m.value = runes[:m.CharLimit]
-	} else {
-		m.value = runes
-	}
-	if (m.pos == 0 && empty) || m.pos > len(m.value) {
-		m.SetCursor(len(m.value))
-	}
-	m.handleOverflow()
-}
-
-// Value returns the value of the text input.
-func (m Model) Value() string {
-	return string(m.value)
-}
-
-// Position returns the cursor position.
-func (m Model) Position() int {
-	return m.pos
-}
-
-// SetCursor moves the cursor to the given position. If the position is
-// out of bounds the cursor will be moved to the start or end accordingly.
-func (m *Model) SetCursor(pos int) {
-	m.pos = clamp(pos, 0, len(m.value))
-	m.handleOverflow()
-}
-
-// CursorStart moves the cursor to the start of the input field.
-func (m *Model) CursorStart() {
-	m.SetCursor(0)
-}
-
-// CursorEnd moves the cursor to the end of the input field.
-func (m *Model) CursorEnd() {
-	m.SetCursor(len(m.value))
-}
-
-// Focused returns the focus state on the model.
-func (m Model) Focused() bool {
-	return m.focus
-}
-
-// Focus sets the focus state on the model. When the model is in focus it can
-// receive keyboard input and the cursor will be shown.
-func (m *Model) Focus() tea.Cmd {
-	m.focus = true
-	return m.Cursor.Focus()
-}
-
-// Blur removes the focus state on the model.  When the model is blurred it can
-// not receive keyboard input and the cursor will be hidden.
-func (m *Model) Blur() {
-	m.focus = false
-	m.Cursor.Blur()
-}
-
-// Reset sets the input to its default state with no input.
-func (m *Model) Reset() {
-	m.value = nil
-	m.SetCursor(0)
-}
-
-// rsan initializes or retrieves the rune sanitizer.
-func (m *Model) san() runeutil.Sanitizer {
-	if m.rsan == nil {
-		// Textinput has all its input on a single line so collapse
-		// newlines/tabs to single spaces.
-		m.rsan = runeutil.NewSanitizer(
-			runeutil.ReplaceTabs(" "), runeutil.ReplaceNewlines(" "))
-	}
-	return m.rsan
-}
-
-func (m *Model) insertRunesFromUserInput(v []rune) {
-	// Clean up any special characters in the input provided by the
-	// clipboard. This avoids bugs due to e.g. tab characters and
-	// whatnot.
-	paste := m.san().Sanitize(v)
-
-	var availSpace int
-	if m.CharLimit > 0 {
-		availSpace = m.CharLimit - len(m.value)
-
-		// If the char limit's been reached, cancel.
-		if availSpace <= 0 {
-			return
-		}
-
-		// If there's not enough space to paste the whole thing cut the pasted
-		// runes down so they'll fit.
-		if availSpace < len(paste) {
-			paste = paste[:len(paste)-availSpace]
-		}
-	}
-
-	// Stuff before and after the cursor
-	head := m.value[:m.pos]
-	tailSrc := m.value[m.pos:]
-	tail := make([]rune, len(tailSrc))
-	copy(tail, tailSrc)
-
-	oldPos := m.pos
-
-	// Insert pasted runes
-	for _, r := range paste {
-		head = append(head, r)
-		m.pos++
-		if m.CharLimit > 0 {
-			availSpace--
-			if availSpace <= 0 {
-				break
-			}
-		}
-	}
-
-	// Put it all back together
-	value := append(head, tail...)
-	m.setValueInternal(value)
-
-	if m.Err != nil {
-		m.pos = oldPos
-	}
-}
-
-// If a max width is defined, perform some logic to treat the visible area
-// as a horizontally scrolling viewport.
-func (m *Model) handleOverflow() {
-	if m.Width <= 0 || rw.StringWidth(string(m.value)) <= m.Width {
-		m.offset = 0
-		m.offsetRight = len(m.value)
-		return
-	}
-
-	// Correct right offset if we've deleted characters
-	m.offsetRight = min(m.offsetRight, len(m.value))
-
-	if m.pos < m.offset {
-		m.offset = m.pos
-
-		w := 0
-		i := 0
-		runes := m.value[m.offset:]
-
-		for i < len(runes) && w <= m.Width {
-			w += rw.RuneWidth(runes[i])
-			if w <= m.Width+1 {
-				i++
-			}
-		}
-
-		m.offsetRight = m.offset + i
-	} else if m.pos >= m.offsetRight {
-		m.offsetRight = m.pos
-
-		w := 0
-		runes := m.value[:m.offsetRight]
-		i := len(runes) - 1
-
-		for i > 0 && w < m.Width {
-			w += rw.RuneWidth(runes[i])
-			if w <= m.Width {
-				i--
-			}
-		}
-
-		m.offset = m.offsetRight - (len(runes) - 1 - i)
-	}
-}
-
-// deleteBeforeCursor deletes all text before the cursor.
-func (m *Model) deleteBeforeCursor() {
-	m.value = m.value[m.pos:]
-	m.offset = 0
-	m.SetCursor(0)
-}
-
-// deleteAfterCursor deletes all text after the cursor. If input is masked
-// delete everything after the cursor so as not to reveal word breaks in the
-// masked input.
-func (m *Model) deleteAfterCursor() {
-	m.value = m.value[:m.pos]
-	m.SetCursor(len(m.value))
-}
-
-// deleteWordBackward deletes the word left to the cursor.
-func (m *Model) deleteWordBackward() {
-	if m.pos == 0 || len(m.value) == 0 {
-		return
-	}
-
-	if m.EchoMode != EchoNormal {
-		m.deleteBeforeCursor()
-		return
-	}
-
-	// Linter note: it's critical that we acquire the initial cursor position
-	// here prior to altering it via SetCursor() below. As such, moving this
-	// call into the corresponding if clause does not apply here.
-	oldPos := m.pos //nolint:ifshort
-
-	m.SetCursor(m.pos - 1)
-	for unicode.IsSpace(m.value[m.pos]) {
-		if m.pos <= 0 {
-			break
-		}
-		// ignore series of whitespace before cursor
-		m.SetCursor(m.pos - 1)
-	}
-
-	for m.pos > 0 {
-		if !unicode.IsSpace(m.value[m.pos]) {
-			m.SetCursor(m.pos - 1)
-		} else {
-			if m.pos > 0 {
-				// keep the previous space
-				m.SetCursor(m.pos + 1)
-			}
-			break
-		}
-	}
-
-	if oldPos > len(m.value) {
-		m.value = m.value[:m.pos]
-	} else {
-		m.value = append(m.value[:m.pos], m.value[oldPos:]...)
-	}
-}
-
-// deleteWordForward deletes the word right to the cursor If input is masked
-// delete everything after the cursor so as not to reveal word breaks in the
-// masked input.
-func (m *Model) deleteWordForward() {
-	if m.pos >= len(m.value) || len(m.value) == 0 {
-		return
-	}
-
-	if m.EchoMode != EchoNormal {
-		m.deleteAfterCursor()
-		return
-	}
-
-	oldPos := m.pos
-	m.SetCursor(m.pos + 1)
-	for unicode.IsSpace(m.value[m.pos]) {
-		// ignore series of whitespace after cursor
-		m.SetCursor(m.pos + 1)
-
-		if m.pos >= len(m.value) {
-			break
-		}
-	}
-
-	for m.pos < len(m.value) {
-		if !unicode.IsSpace(m.value[m.pos]) {
-			m.SetCursor(m.pos + 1)
-		} else {
-			break
-		}
-	}
-
-	if m.pos > len(m.value) {
-		m.value = m.value[:oldPos]
-	} else {
-		m.value = append(m.value[:oldPos], m.value[m.pos:]...)
-	}
-
-	m.SetCursor(oldPos)
-}
-
-// wordBackward moves the cursor one word to the left. If input is masked, move
-// input to the start so as not to reveal word breaks in the masked input.
-func (m *Model) wordBackward() {
-	if m.pos == 0 || len(m.value) == 0 {
-		return
-	}
-
-	if m.EchoMode != EchoNormal {
-		m.CursorStart()
-		return
-	}
-
-	i := m.pos - 1
-	for i >= 0 {
-		if unicode.IsSpace(m.value[i]) {
-			m.SetCursor(m.pos - 1)
-			i--
-		} else {
-			break
-		}
-	}
-
-	for i >= 0 {
-		if !unicode.IsSpace(m.value[i]) {
-			m.SetCursor(m.pos - 1)
-			i--
-		} else {
-			break
-		}
-	}
-}
-
-// wordForward moves the cursor one word to the right. If the input is masked,
-// move input to the end so as not to reveal word breaks in the masked input.
-func (m *Model) wordForward() {
-	if m.pos >= len(m.value) || len(m.value) == 0 {
-		return
-	}
-
-	if m.EchoMode != EchoNormal {
-		m.CursorEnd()
-		return
-	}
-
-	i := m.pos
-	for i < len(m.value) {
-		if unicode.IsSpace(m.value[i]) {
-			m.SetCursor(m.pos + 1)
-			i++
-		} else {
-			break
-		}
-	}
-
-	for i < len(m.value) {
-		if !unicode.IsSpace(m.value[i]) {
-			m.SetCursor(m.pos + 1)
-			i++
-		} else {
-			break
-		}
-	}
-}
-
-func (m Model) echoTransform(v string) string {
-	switch m.EchoMode {
-	case EchoPassword:
-		return strings.Repeat(string(m.EchoCharacter), rw.StringWidth(v))
-	case EchoNone:
-		return ""
-
-	default:
-		return v
-	}
-}
-
-// Update is the Bubble Tea update loop.
-func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
-	if !m.focus {
-		return m, nil
-	}
-
-	// Let's remember where the position of the cursor currently is so that if
-	// the cursor position changes, we can reset the blink.
-	oldPos := m.pos //nolint
-
-	switch msg := msg.(type) {
-	case tea.KeyMsg:
-		switch {
-		case key.Matches(msg, m.KeyMap.DeleteWordBackward):
-			m.Err = nil
-			m.deleteWordBackward()
-		case key.Matches(msg, m.KeyMap.DeleteCharacterBackward):
-			m.Err = nil
-			if len(m.value) > 0 {
-				m.value = append(m.value[:max(0, m.pos-1)], m.value[m.pos:]...)
-				if m.pos > 0 {
-					m.SetCursor(m.pos - 1)
-				}
-			}
-		case key.Matches(msg, m.KeyMap.WordBackward):
-			m.wordBackward()
-		case key.Matches(msg, m.KeyMap.CharacterBackward):
-			if m.pos > 0 {
-				m.SetCursor(m.pos - 1)
-			}
-		case key.Matches(msg, m.KeyMap.WordForward):
-			m.wordForward()
-		case key.Matches(msg, m.KeyMap.CharacterForward):
-			if m.pos < len(m.value) {
-				m.SetCursor(m.pos + 1)
-			}
-		case key.Matches(msg, m.KeyMap.DeleteWordBackward):
-			m.deleteWordBackward()
-		case key.Matches(msg, m.KeyMap.LineStart):
-			m.CursorStart()
-		case key.Matches(msg, m.KeyMap.DeleteCharacterForward):
-			if len(m.value) > 0 && m.pos < len(m.value) {
-				m.value = append(m.value[:m.pos], m.value[m.pos+1:]...)
-			}
-		case key.Matches(msg, m.KeyMap.LineEnd):
-			m.CursorEnd()
-		case key.Matches(msg, m.KeyMap.DeleteAfterCursor):
-			m.deleteAfterCursor()
-		case key.Matches(msg, m.KeyMap.DeleteBeforeCursor):
-			m.deleteBeforeCursor()
-		case key.Matches(msg, m.KeyMap.Paste):
-			return m, Paste
-		case key.Matches(msg, m.KeyMap.DeleteWordForward):
-			m.deleteWordForward()
-		default:
-			// Input one or more regular characters.
-			m.insertRunesFromUserInput(msg.Runes)
-		}
-
-	case pasteMsg:
-		m.insertRunesFromUserInput([]rune(msg))
-
-	case pasteErrMsg:
-		m.Err = msg
-	}
-
-	var cmds []tea.Cmd
-	var cmd tea.Cmd
-
-	m.Cursor, cmd = m.Cursor.Update(msg)
-	cmds = append(cmds, cmd)
-
-	if oldPos != m.pos {
-		m.Cursor.Blink = false
-		cmds = append(cmds, m.Cursor.BlinkCmd())
-	}
-
-	m.handleOverflow()
-	return m, tea.Batch(cmds...)
-}
-
-// View renders the textinput in its current state.
-func (m Model) View() string {
-	// Placeholder text
-	if len(m.value) == 0 && m.Placeholder != "" {
-		return m.placeholderView()
-	}
-
-	styleText := m.TextStyle.Inline(true).Render
-
-	value := m.value[m.offset:m.offsetRight]
-	pos := max(0, m.pos-m.offset)
-	v := styleText(m.echoTransform(string(value[:pos])))
-
-	if pos < len(value) {
-		char := m.echoTransform(string(value[pos]))
-		m.Cursor.SetChar(char)
-		v += m.Cursor.View()                                   // cursor and text under it
-		v += styleText(m.echoTransform(string(value[pos+1:]))) // text after cursor
-	} else {
-		m.Cursor.SetChar(" ")
-		v += m.Cursor.View()
-	}
-
-	// If a max width and background color were set fill the empty spaces with
-	// the background color.
-	valWidth := rw.StringWidth(string(value))
-	if m.Width > 0 && valWidth <= m.Width {
-		padding := max(0, m.Width-valWidth)
-		if valWidth+padding <= m.Width && pos < len(value) {
-			padding++
-		}
-		v += styleText(strings.Repeat(" ", padding))
-	}
-
-	return m.PromptStyle.Render(m.Prompt) + v
-}
-
-// placeholderView returns the prompt and placeholder view, if any.
-func (m Model) placeholderView() string {
-	var (
-		v     string
-		p     = m.Placeholder
-		style = m.PlaceholderStyle.Inline(true).Render
-	)
-
-	m.Cursor.TextStyle = m.PlaceholderStyle
-	m.Cursor.SetChar(p[:1])
-	v += m.Cursor.View()
-
-	// The rest of the placeholder text
-	v += style(p[1:])
-
-	return m.PromptStyle.Render(m.Prompt) + v
-}
-
-// Blink is a command used to initialize cursor blinking.
-func Blink() tea.Msg {
-	return cursor.Blink()
-}
-
-// Paste is a command for pasting from the clipboard into the text input.
-func Paste() tea.Msg {
-	str, err := clipboard.ReadAll()
-	if err != nil {
-		return pasteErrMsg{err}
-	}
-	return pasteMsg(str)
-}
-
-func clamp(v, low, high int) int {
-	if high < low {
-		low, high = high, low
-	}
-	return min(high, max(low, v))
-}
-
-func min(a, b int) int {
-	if a < b {
-		return a
-	}
-	return b
-}
-
-func max(a, b int) int {
-	if a > b {
-		return a
-	}
-	return b
-}
-
-// Deprecated.
-
-// Deprecated: use cursor.Mode.
-type CursorMode int
-
-const (
-	// Deprecated: use cursor.CursorBlink.
-	CursorBlink = CursorMode(cursor.CursorBlink)
-	// Deprecated: use cursor.CursorStatic.
-	CursorStatic = CursorMode(cursor.CursorStatic)
-	// Deprecated: use cursor.CursorHide.
-	CursorHide = CursorMode(cursor.CursorHide)
-)
-
-func (c CursorMode) String() string {
-	return cursor.Mode(c).String()
-}
-
-// Deprecated: use cursor.Mode().
-func (m Model) CursorMode() CursorMode {
-	return CursorMode(m.Cursor.Mode())
-}
-
-// Deprecated: use cursor.SetMode().
-func (m *Model) SetCursorMode(mode CursorMode) tea.Cmd {
-	return m.Cursor.SetMode(cursor.Mode(mode))
-}

+ 1 - 1
vendor/github.com/charmbracelet/bubbletea/LICENSE

@@ -1,6 +1,6 @@
 MIT License
 
-Copyright (c) 2020 Charmbracelet, Inc
+Copyright (c) 2020-2023 Charmbracelet, Inc
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

+ 18 - 14
vendor/github.com/charmbracelet/bubbletea/tea.go

@@ -392,20 +392,12 @@ func (p *Program) Run() (Model, error) {
 	case defaultInput:
 		p.input = os.Stdin
 
-	case ttyInput:
-		// Open a new TTY, by request
-		f, err := openInputTTY()
-		if err != nil {
-			return p.initialModel, err
-		}
-		defer f.Close() //nolint:errcheck
-		p.input = f
-
-	case customInput:
-		// If the user hasn't set a custom input, and input's not a terminal,
-		// open a TTY so we can capture input as normal. This will allow things
-		// to "just work" in cases where data was piped or redirected into this
-		// application.
+		// The user has not set a custom input, so we need to check whether or
+		// not standard input is a terminal. If it's not, we open a new TTY for
+		// input. This will allow things to "just work" in cases where data was
+		// piped in or redirected to the application.
+		//
+		// To disable input entirely pass nil to the [WithInput] program option.
 		f, isFile := p.input.(*os.File)
 		if !isFile {
 			break
@@ -420,6 +412,18 @@ func (p *Program) Run() (Model, error) {
 		}
 		defer f.Close() //nolint:errcheck
 		p.input = f
+
+	case ttyInput:
+		// Open a new TTY, by request
+		f, err := openInputTTY()
+		if err != nil {
+			return p.initialModel, err
+		}
+		defer f.Close() //nolint:errcheck
+		p.input = f
+
+	case customInput:
+		// (There is nothing extra to do.)
 	}
 
 	// Handle signals.

+ 0 - 1
vendor/github.com/charmbracelet/lipgloss/.gitignore

@@ -1 +0,0 @@
-ssh_example_ed25519*

+ 0 - 47
vendor/github.com/charmbracelet/lipgloss/.golangci-soft.yml

@@ -1,47 +0,0 @@
-run:
-  tests: false
-
-issues:
-  include:
-    - EXC0001
-    - EXC0005
-    - EXC0011
-    - EXC0012
-    - EXC0013
-
-  max-issues-per-linter: 0
-  max-same-issues: 0
-
-linters:
-  enable:
-    # - dupl
-    - exhaustive
-    # - exhaustivestruct
-    - goconst
-    - godot
-    - godox
-    - gomnd
-    - gomoddirectives
-    - goprintffuncname
-    - ifshort
-    # - lll
-    - misspell
-    - nakedret
-    - nestif
-    - noctx
-    - nolintlint
-    - prealloc
-    - wrapcheck
-
-  # disable default linters, they are already enabled in .golangci.yml
-  disable:
-    - deadcode
-    - errcheck
-    - gosimple
-    - govet
-    - ineffassign
-    - staticcheck
-    - structcheck
-    - typecheck
-    - unused
-    - varcheck

+ 0 - 29
vendor/github.com/charmbracelet/lipgloss/.golangci.yml

@@ -1,29 +0,0 @@
-run:
-  tests: false
-
-issues:
-  include:
-    - EXC0001
-    - EXC0005
-    - EXC0011
-    - EXC0012
-    - EXC0013
-
-  max-issues-per-linter: 0
-  max-same-issues: 0
-
-linters:
-  enable:
-    - bodyclose
-    - exportloopref
-    - goimports
-    - gosec
-    - nilerr
-    - predeclared
-    - revive
-    - rowserrcheck
-    - sqlclosecheck
-    - tparallel
-    - unconvert
-    - unparam
-    - whitespace

+ 0 - 21
vendor/github.com/charmbracelet/lipgloss/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Charmbracelet, Inc
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 458
vendor/github.com/charmbracelet/lipgloss/README.md

@@ -1,458 +0,0 @@
-Lip Gloss
-=========
-
-<p>
-    <img src="https://stuff.charm.sh/lipgloss/lipgloss-header-github.png" width="340" alt="Lip Gloss Title Treatment"><br>
-    <a href="https://github.com/charmbracelet/lipgloss/releases"><img src="https://img.shields.io/github/release/charmbracelet/lipgloss.svg" alt="Latest Release"></a>
-    <a href="https://pkg.go.dev/github.com/charmbracelet/lipgloss?tab=doc"><img src="https://godoc.org/github.com/golang/gddo?status.svg" alt="GoDoc"></a>
-    <a href="https://github.com/charmbracelet/lipgloss/actions"><img src="https://github.com/charmbracelet/lipgloss/workflows/build/badge.svg" alt="Build Status"></a>
-</p>
-
-Style definitions for nice terminal layouts. Built with TUIs in mind.
-
-![Lip Gloss example](https://stuff.charm.sh/lipgloss/lipgloss-example.png)
-
-Lip Gloss takes an expressive, declarative approach to terminal rendering.
-Users familiar with CSS will feel at home with Lip Gloss.
-
-```go
-
-import "github.com/charmbracelet/lipgloss"
-
-var style = lipgloss.NewStyle().
-    Bold(true).
-    Foreground(lipgloss.Color("#FAFAFA")).
-    Background(lipgloss.Color("#7D56F4")).
-    PaddingTop(2).
-    PaddingLeft(4).
-    Width(22)
-
-fmt.Println(style.Render("Hello, kitty"))
-```
-
-## Colors
-
-Lip Gloss supports the following color profiles:
-
-### ANSI 16 colors (4-bit)
-
-```go
-lipgloss.Color("5")  // magenta
-lipgloss.Color("9")  // red
-lipgloss.Color("12") // light blue
-```
-
-### ANSI 256 Colors (8-bit)
-
-```go
-lipgloss.Color("86")  // aqua
-lipgloss.Color("201") // hot pink
-lipgloss.Color("202") // orange
-```
-
-### True Color (16,777,216 colors; 24-bit)
-
-```go
-lipgloss.Color("#0000FF") // good ol' 100% blue
-lipgloss.Color("#04B575") // a green
-lipgloss.Color("#3C3C3C") // a dark gray
-```
-
-...as well as a 1-bit ASCII profile, which is black and white only.
-
-The terminal's color profile will be automatically detected, and colors outside
-the gamut of the current palette will be automatically coerced to their closest
-available value.
-
-
-### Adaptive Colors
-
-You can also specify color options for light and dark backgrounds:
-
-```go
-lipgloss.AdaptiveColor{Light: "236", Dark: "248"}
-```
-
-The terminal's background color will automatically be detected and the
-appropriate color will be chosen at runtime.
-
-### Complete Colors
-
-CompleteColor specifies exact values for truecolor, ANSI256, and ANSI color
-profiles.
-
-```go
-lipgloss.CompleteColor{True: "#0000FF", ANSI256: "86", ANSI: "5"}
-```
-
-Automatic color degradation will not be performed in this case and it will be
-based on the color specified.
-
-### Complete Adaptive Colors
-
-You can use CompleteColor with AdaptiveColor to specify the exact values for
-light and dark backgrounds without automatic color degradation.
-
-```go
-lipgloss.CompleteAdaptiveColor{
-    Light: CompleteColor{TrueColor: "#d7ffae", ANSI256: "193", ANSI: "11"},
-    Dark:  CompleteColor{TrueColor: "#d75fee", ANSI256: "163", ANSI: "5"},
-}
-```
-
-## Inline Formatting
-
-Lip Gloss supports the usual ANSI text formatting options:
-
-```go
-var style = lipgloss.NewStyle().
-    Bold(true).
-    Italic(true).
-    Faint(true).
-    Blink(true).
-    Strikethrough(true).
-    Underline(true).
-    Reverse(true)
-```
-
-
-## Block-Level Formatting
-
-Lip Gloss also supports rules for block-level formatting:
-
-```go
-// Padding
-var style = lipgloss.NewStyle().
-    PaddingTop(2).
-    PaddingRight(4).
-    PaddingBottom(2).
-    PaddingLeft(4)
-
-// Margins
-var style = lipgloss.NewStyle().
-    MarginTop(2).
-    MarginRight(4).
-    MarginBottom(2).
-    MarginLeft(4)
-```
-
-There is also shorthand syntax for margins and padding, which follows the same
-format as CSS:
-
-```go
-// 2 cells on all sides
-lipgloss.NewStyle().Padding(2)
-
-// 2 cells on the top and bottom, 4 cells on the left and right
-lipgloss.NewStyle().Margin(2, 4)
-
-// 1 cell on the top, 4 cells on the sides, 2 cells on the bottom
-lipgloss.NewStyle().Padding(1, 4, 2)
-
-// Clockwise, starting from the top: 2 cells on the top, 4 on the right, 3 on
-// the bottom, and 1 on the left
-lipgloss.NewStyle().Margin(2, 4, 3, 1)
-```
-
-
-## Aligning Text
-
-You can align paragraphs of text to the left, right, or center.
-
-```go
-var style = lipgloss.NewStyle().
-    Width(24).
-    Align(lipgloss.Left).  // align it left
-    Align(lipgloss.Right). // no wait, align it right
-    Align(lipgloss.Center) // just kidding, align it in the center
-```
-
-
-## Width and Height
-
-Setting a minimum width and height is simple and straightforward.
-
-```go
-var style = lipgloss.NewStyle().
-    SetString("What’s for lunch?").
-    Width(24).
-    Height(32).
-    Foreground(lipgloss.Color("63"))
-```
-
-
-## Borders
-
-Adding borders is easy:
-
-```go
-// Add a purple, rectangular border
-var style = lipgloss.NewStyle().
-    BorderStyle(lipgloss.NormalBorder()).
-    BorderForeground(lipgloss.Color("63"))
-
-// Set a rounded, yellow-on-purple border to the top and left
-var anotherStyle = lipgloss.NewStyle().
-    BorderStyle(lipgloss.RoundedBorder()).
-    BorderForeground(lipgloss.Color("228")).
-    BorderBackground(lipgloss.Color("63")).
-    BorderTop(true).
-    BorderLeft(true)
-
-// Make your own border
-var myCuteBorder = lipgloss.Border{
-    Top:         "._.:*:",
-    Bottom:      "._.:*:",
-    Left:        "|*",
-    Right:       "|*",
-    TopLeft:     "*",
-    TopRight:    "*",
-    BottomLeft:  "*",
-    BottomRight: "*",
-}
-```
-
-There are also shorthand functions for defining borders, which follow a similar
-pattern to the margin and padding shorthand functions.
-
-```go
-// Add a thick border to the top and bottom
-lipgloss.NewStyle().
-    Border(lipgloss.ThickBorder(), true, false)
-
-// Add a thick border to the right and bottom sides. Rules are set clockwise
-// from top.
-lipgloss.NewStyle().
-    Border(lipgloss.DoubleBorder(), true, false, false, true)
-```
-
-For more on borders see [the docs][docs].
-
-
-## Copying Styles
-
-Just use `Copy()`:
-
-```go
-var style = lipgloss.NewStyle().Foreground(lipgloss.Color("219"))
-
-var wildStyle = style.Copy().Blink(true)
-```
-
-`Copy()` performs a copy on the underlying data structure ensuring that you get
-a true, dereferenced copy of a style. Without copying, it's possible to mutate
-styles.
-
-
-## Inheritance
-
-Styles can inherit rules from other styles. When inheriting, only unset rules
-on the receiver are inherited.
-
-```go
-var styleA = lipgloss.NewStyle().
-    Foreground(lipgloss.Color("229")).
-    Background(lipgloss.Color("63"))
-
-// Only the background color will be inherited here, because the foreground
-// color will have been already set:
-var styleB = lipgloss.NewStyle().
-    Foreground(lipgloss.Color("201")).
-    Inherit(styleA)
-```
-
-
-## Unsetting Rules
-
-All rules can be unset:
-
-```go
-var style = lipgloss.NewStyle().
-    Bold(true).                        // make it bold
-    UnsetBold().                       // jk don't make it bold
-    Background(lipgloss.Color("227")). // yellow background
-    UnsetBackground()                  // never mind
-```
-
-When a rule is unset, it won't be inherited or copied.
-
-
-## Enforcing Rules
-
-Sometimes, such as when developing a component, you want to make sure style
-definitions respect their intended purpose in the UI. This is where `Inline`
-and `MaxWidth`, and `MaxHeight` come in:
-
-```go
-// Force rendering onto a single line, ignoring margins, padding, and borders.
-someStyle.Inline(true).Render("yadda yadda")
-
-// Also limit rendering to five cells
-someStyle.Inline(true).MaxWidth(5).Render("yadda yadda")
-
-// Limit rendering to a 5x5 cell block
-someStyle.MaxWidth(5).MaxHeight(5).Render("yadda yadda")
-```
-
-## Rendering
-
-Generally, you just call the `Render(string...)` method on a `lipgloss.Style`:
-
-```go
-style := lipgloss.NewStyle().Bold(true).SetString("Hello,")
-fmt.Println(style.Render("kitty.")) // Hello, kitty.
-fmt.Println(style.Render("puppy.")) // Hello, puppy.
-```
-
-But you could also use the Stringer interface:
-
-```go
-var style = lipgloss.NewStyle().SetString("你好,猫咪。").Bold(true)
-fmt.Println(style) // 你好,猫咪。
-```
-
-### Custom Renderers
-
-Custom renderers allow you to render to a specific outputs. This is
-particularly important when you want to render to different outputs and
-correctly detect the color profile and dark background status for each, such as
-in a server-client situation.
-
-```go
-func myLittleHandler(sess ssh.Session) {
-    // Create a renderer for the client.
-    renderer := lipgloss.NewRenderer(sess)
-
-    // Create a new style on the renderer.
-    style := renderer.NewStyle().Background(lipgloss.AdaptiveColor{Light: "63", Dark: "228"})
-
-    // Render. The color profile and dark background state will be correctly detected.
-    io.WriteString(sess, style.Render("Heyyyyyyy"))
-}
-```
-
-For an example on using a custom renderer over SSH with [Wish][wish] see the
-[SSH example][ssh-example].
-
-## Utilities
-
-In addition to pure styling, Lip Gloss also ships with some utilities to help
-assemble your layouts.
-
-
-### Joining Paragraphs
-
-Horizontally and vertically joining paragraphs is a cinch.
-
-```go
-// Horizontally join three paragraphs along their bottom edges
-lipgloss.JoinHorizontal(lipgloss.Bottom, paragraphA, paragraphB, paragraphC)
-
-// Vertically join two paragraphs along their center axes
-lipgloss.JoinVertical(lipgloss.Center, paragraphA, paragraphB)
-
-// Horizontally join three paragraphs, with the shorter ones aligning 20%
-// from the top of the tallest
-lipgloss.JoinHorizontal(0.2, paragraphA, paragraphB, paragraphC)
-```
-
-
-### Measuring Width and Height
-
-Sometimes you’ll want to know the width and height of text blocks when building
-your layouts.
-
-```go
-// Render a block of text.
-var style = lipgloss.NewStyle().
-    Width(40).
-    Padding(2)
-var block string = style.Render(someLongString)
-
-// Get the actual, physical dimensions of the text block.
-width := lipgloss.Width(block)
-height := lipgloss.Height(block)
-
-// Here's a shorthand function.
-w, h := lipgloss.Size(block)
-```
-
-
-### Placing Text in Whitespace
-
-Sometimes you’ll simply want to place a block of text in whitespace.
-
-```go
-// Center a paragraph horizontally in a space 80 cells wide. The height of
-// the block returned will be as tall as the input paragraph.
-block := lipgloss.PlaceHorizontal(80, lipgloss.Center, fancyStyledParagraph)
-
-// Place a paragraph at the bottom of a space 30 cells tall. The width of
-// the text block returned will be as wide as the input paragraph.
-block := lipgloss.PlaceVertical(30, lipgloss.Bottom, fancyStyledParagraph)
-
-// Place a paragraph in the bottom right corner of a 30x80 cell space.
-block := lipgloss.Place(30, 80, lipgloss.Right, lipgloss.Bottom, fancyStyledParagraph)
-```
-
-You can also style the whitespace. For details, see [the docs][docs].
-
-
-***
-
-
-## What about [Bubble Tea][tea]?
-
-Lip Gloss doesn’t replace Bubble Tea. Rather, it is an excellent Bubble Tea
-companion. It was designed to make assembling terminal user interface views as
-simple and fun as possible so that you can focus on building your application
-instead of concerning yourself with low-level layout details.
-
-In simple terms, you can use Lip Gloss to help build your Bubble Tea views.
-
-[tea]: https://github.com/charmbracelet/tea
-
-
-## Under the Hood
-
-Lip Gloss is built on the excellent [Termenv][termenv] and [Reflow][reflow]
-libraries which deal with color and ANSI-aware text operations, respectively.
-For many use cases Termenv and Reflow will be sufficient for your needs.
-
-[termenv]: https://github.com/muesli/termenv
-[reflow]: https://github.com/muesli/reflow
-
-
-## Rendering Markdown
-
-For a more document-centric rendering solution with support for things like
-lists, tables, and syntax-highlighted code have a look at [Glamour][glamour],
-the stylesheet-based Markdown renderer.
-
-[glamour]: https://github.com/charmbracelet/glamour
-
-
-## Feedback
-
-We’d love to hear your thoughts on this project. Feel free to drop us a note!
-
-* [Twitter](https://twitter.com/charmcli)
-* [The Fediverse](https://mastodon.social/@charmcli)
-* [Discord](https://charm.sh/chat)
-
-## License
-
-[MIT](https://github.com/charmbracelet/lipgloss/raw/master/LICENSE)
-
-***
-
-Part of [Charm](https://charm.sh).
-
-<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a>
-
-Charm热爱开源 • Charm loves open source
-
-
-[docs]: https://pkg.go.dev/github.com/charmbracelet/lipgloss?tab=doc
-[wish]: https://github.com/charmbracelet/wish
-[ssh-example]: examples/ssh

+ 0 - 82
vendor/github.com/charmbracelet/lipgloss/align.go

@@ -1,82 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-
-	"github.com/muesli/reflow/ansi"
-	"github.com/muesli/termenv"
-)
-
-// Perform text alignment. If the string is multi-lined, we also make all lines
-// the same width by padding them with spaces. If a termenv style is passed,
-// use that to style the spaces added.
-func alignTextHorizontal(str string, pos Position, width int, style *termenv.Style) string {
-	lines, widestLine := getLines(str)
-	var b strings.Builder
-
-	for i, l := range lines {
-		lineWidth := ansi.PrintableRuneWidth(l)
-
-		shortAmount := widestLine - lineWidth                // difference from the widest line
-		shortAmount += max(0, width-(shortAmount+lineWidth)) // difference from the total width, if set
-
-		if shortAmount > 0 {
-			switch pos {
-			case Right:
-				s := strings.Repeat(" ", shortAmount)
-				if style != nil {
-					s = style.Styled(s)
-				}
-				l = s + l
-			case Center:
-				left := shortAmount / 2
-				right := left + shortAmount%2 // note that we put the remainder on the right
-
-				leftSpaces := strings.Repeat(" ", left)
-				rightSpaces := strings.Repeat(" ", right)
-
-				if style != nil {
-					leftSpaces = style.Styled(leftSpaces)
-					rightSpaces = style.Styled(rightSpaces)
-				}
-				l = leftSpaces + l + rightSpaces
-			default: // Left
-				s := strings.Repeat(" ", shortAmount)
-				if style != nil {
-					s = style.Styled(s)
-				}
-				l += s
-			}
-		}
-
-		b.WriteString(l)
-		if i < len(lines)-1 {
-			b.WriteRune('\n')
-		}
-	}
-
-	return b.String()
-}
-
-func alignTextVertical(str string, pos Position, height int, _ *termenv.Style) string {
-	strHeight := strings.Count(str, "\n") + 1
-	if height < strHeight {
-		return str
-	}
-
-	switch pos {
-	case Top:
-		return str + strings.Repeat("\n", height-strHeight)
-	case Center:
-		var topPadding, bottomPadding = (height - strHeight) / 2, (height - strHeight) / 2
-		if strHeight+topPadding+bottomPadding > height {
-			topPadding--
-		} else if strHeight+topPadding+bottomPadding < height {
-			bottomPadding++
-		}
-		return strings.Repeat("\n", topPadding) + str + strings.Repeat("\n", bottomPadding)
-	case Bottom:
-		return strings.Repeat("\n", height-strHeight) + str
-	}
-	return str
-}

+ 0 - 7
vendor/github.com/charmbracelet/lipgloss/ansi_unix.go

@@ -1,7 +0,0 @@
-//go:build !windows
-// +build !windows
-
-package lipgloss
-
-// enableLegacyWindowsANSI is only needed on Windows.
-func enableLegacyWindowsANSI() {}

+ 0 - 22
vendor/github.com/charmbracelet/lipgloss/ansi_windows.go

@@ -1,22 +0,0 @@
-//go:build windows
-// +build windows
-
-package lipgloss
-
-import (
-	"sync"
-
-	"github.com/muesli/termenv"
-)
-
-var enableANSI sync.Once
-
-// enableANSIColors enables support for ANSI color sequences in the Windows
-// default console (cmd.exe and the PowerShell application). Note that this
-// only works with Windows 10. Also note that Windows Terminal supports colors
-// by default.
-func enableLegacyWindowsANSI() {
-	enableANSI.Do(func() {
-		_, _ = termenv.EnableWindowsANSIConsole()
-	})
-}

+ 0 - 412
vendor/github.com/charmbracelet/lipgloss/borders.go

@@ -1,412 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-
-	"github.com/mattn/go-runewidth"
-	"github.com/muesli/reflow/ansi"
-	"github.com/muesli/termenv"
-)
-
-// Border contains a series of values which comprise the various parts of a
-// border.
-type Border struct {
-	Top         string
-	Bottom      string
-	Left        string
-	Right       string
-	TopLeft     string
-	TopRight    string
-	BottomRight string
-	BottomLeft  string
-}
-
-// GetTopSize returns the width of the top border. If borders contain runes of
-// varying widths, the widest rune is returned. If no border exists on the top
-// edge, 0 is returned.
-func (b Border) GetTopSize() int {
-	return getBorderEdgeWidth(b.TopLeft, b.Top, b.TopRight)
-}
-
-// GetRightSize returns the width of the right border. If borders contain
-// runes of varying widths, the widest rune is returned. If no border exists on
-// the right edge, 0 is returned.
-func (b Border) GetRightSize() int {
-	return getBorderEdgeWidth(b.TopRight, b.Top, b.BottomRight)
-}
-
-// GetBottomSize returns the width of the bottom border. If borders contain
-// runes of varying widths, the widest rune is returned. If no border exists on
-// the bottom edge, 0 is returned.
-func (b Border) GetBottomSize() int {
-	return getBorderEdgeWidth(b.BottomLeft, b.Bottom, b.BottomRight)
-}
-
-// GetLeftSize returns the width of the left border. If borders contain runes
-// of varying widths, the widest rune is returned. If no border exists on the
-// left edge, 0 is returned.
-func (b Border) GetLeftSize() int {
-	return getBorderEdgeWidth(b.TopLeft, b.Left, b.TopRight)
-}
-
-func getBorderEdgeWidth(borderParts ...string) (maxWidth int) {
-	for _, piece := range borderParts {
-		w := maxRuneWidth(piece)
-		if w > maxWidth {
-			maxWidth = w
-		}
-	}
-	return maxWidth
-}
-
-var (
-	noBorder = Border{}
-
-	normalBorder = Border{
-		Top:         "─",
-		Bottom:      "─",
-		Left:        "│",
-		Right:       "│",
-		TopLeft:     "┌",
-		TopRight:    "┐",
-		BottomLeft:  "└",
-		BottomRight: "┘",
-	}
-
-	roundedBorder = Border{
-		Top:         "─",
-		Bottom:      "─",
-		Left:        "│",
-		Right:       "│",
-		TopLeft:     "╭",
-		TopRight:    "╮",
-		BottomLeft:  "╰",
-		BottomRight: "╯",
-	}
-
-	blockBorder = Border{
-		Top:         "█",
-		Bottom:      "█",
-		Left:        "█",
-		Right:       "█",
-		TopLeft:     "█",
-		TopRight:    "█",
-		BottomLeft:  "█",
-		BottomRight: "█",
-	}
-
-	outerHalfBlockBorder = Border{
-		Top:         "▀",
-		Bottom:      "▄",
-		Left:        "▌",
-		Right:       "▐",
-		TopLeft:     "▛",
-		TopRight:    "▜",
-		BottomLeft:  "▙",
-		BottomRight: "▟",
-	}
-
-	innerHalfBlockBorder = Border{
-		Top:         "▄",
-		Bottom:      "▀",
-		Left:        "▐",
-		Right:       "▌",
-		TopLeft:     "▗",
-		TopRight:    "▖",
-		BottomLeft:  "▝",
-		BottomRight: "▘",
-	}
-
-	thickBorder = Border{
-		Top:         "━",
-		Bottom:      "━",
-		Left:        "┃",
-		Right:       "┃",
-		TopLeft:     "┏",
-		TopRight:    "┓",
-		BottomLeft:  "┗",
-		BottomRight: "┛",
-	}
-
-	doubleBorder = Border{
-		Top:         "═",
-		Bottom:      "═",
-		Left:        "║",
-		Right:       "║",
-		TopLeft:     "╔",
-		TopRight:    "╗",
-		BottomLeft:  "╚",
-		BottomRight: "╝",
-	}
-
-	hiddenBorder = Border{
-		Top:         " ",
-		Bottom:      " ",
-		Left:        " ",
-		Right:       " ",
-		TopLeft:     " ",
-		TopRight:    " ",
-		BottomLeft:  " ",
-		BottomRight: " ",
-	}
-)
-
-// NormalBorder returns a standard-type border with a normal weight and 90
-// degree corners.
-func NormalBorder() Border {
-	return normalBorder
-}
-
-// RoundedBorder returns a border with rounded corners.
-func RoundedBorder() Border {
-	return roundedBorder
-}
-
-// BlockBorder returns a border that takes the whole block.
-func BlockBorder() Border {
-	return blockBorder
-}
-
-// OuterHalfBlockBorder returns a half-block border that sits outside the frame.
-func OuterHalfBlockBorder() Border {
-	return outerHalfBlockBorder
-}
-
-// InnerHalfBlockBorder returns a half-block border that sits inside the frame.
-func InnerHalfBlockBorder() Border {
-	return innerHalfBlockBorder
-}
-
-// ThickBorder returns a border that's thicker than the one returned by
-// NormalBorder.
-func ThickBorder() Border {
-	return thickBorder
-}
-
-// DoubleBorder returns a border comprised of two thin strokes.
-func DoubleBorder() Border {
-	return doubleBorder
-}
-
-// HiddenBorder returns a border that renders as a series of single-cell
-// spaces. It's useful for cases when you want to remove a standard border but
-// maintain layout positioning. This said, you can still apply a background
-// color to a hidden border.
-func HiddenBorder() Border {
-	return hiddenBorder
-}
-
-func (s Style) applyBorder(str string) string {
-	var (
-		topSet    = s.isSet(borderTopKey)
-		rightSet  = s.isSet(borderRightKey)
-		bottomSet = s.isSet(borderBottomKey)
-		leftSet   = s.isSet(borderLeftKey)
-
-		border    = s.getBorderStyle()
-		hasTop    = s.getAsBool(borderTopKey, false)
-		hasRight  = s.getAsBool(borderRightKey, false)
-		hasBottom = s.getAsBool(borderBottomKey, false)
-		hasLeft   = s.getAsBool(borderLeftKey, false)
-
-		topFG    = s.getAsColor(borderTopForegroundKey)
-		rightFG  = s.getAsColor(borderRightForegroundKey)
-		bottomFG = s.getAsColor(borderBottomForegroundKey)
-		leftFG   = s.getAsColor(borderLeftForegroundKey)
-
-		topBG    = s.getAsColor(borderTopBackgroundKey)
-		rightBG  = s.getAsColor(borderRightBackgroundKey)
-		bottomBG = s.getAsColor(borderBottomBackgroundKey)
-		leftBG   = s.getAsColor(borderLeftBackgroundKey)
-	)
-
-	// If a border is set and no sides have been specifically turned on or off
-	// render borders on all sides.
-	if border != noBorder && !(topSet || rightSet || bottomSet || leftSet) {
-		hasTop = true
-		hasRight = true
-		hasBottom = true
-		hasLeft = true
-	}
-
-	// If no border is set or all borders are been disabled, abort.
-	if border == noBorder || (!hasTop && !hasRight && !hasBottom && !hasLeft) {
-		return str
-	}
-
-	lines, width := getLines(str)
-
-	if hasLeft {
-		if border.Left == "" {
-			border.Left = " "
-		}
-		width += maxRuneWidth(border.Left)
-	}
-
-	if hasRight && border.Right == "" {
-		border.Right = " "
-	}
-
-	// If corners should be rendered but are set with the empty string, fill them
-	// with a single space.
-	if hasTop && hasLeft && border.TopLeft == "" {
-		border.TopLeft = " "
-	}
-	if hasTop && hasRight && border.TopRight == "" {
-		border.TopRight = " "
-	}
-	if hasBottom && hasLeft && border.BottomLeft == "" {
-		border.BottomLeft = " "
-	}
-	if hasBottom && hasRight && border.BottomRight == "" {
-		border.BottomRight = " "
-	}
-
-	// Figure out which corners we should actually be using based on which
-	// sides are set to show.
-	if hasTop {
-		switch {
-		case !hasLeft && !hasRight:
-			border.TopLeft = ""
-			border.TopRight = ""
-		case !hasLeft:
-			border.TopLeft = ""
-		case !hasRight:
-			border.TopRight = ""
-		}
-	}
-	if hasBottom {
-		switch {
-		case !hasLeft && !hasRight:
-			border.BottomLeft = ""
-			border.BottomRight = ""
-		case !hasLeft:
-			border.BottomLeft = ""
-		case !hasRight:
-			border.BottomRight = ""
-		}
-	}
-
-	// For now, limit corners to one rune.
-	border.TopLeft = getFirstRuneAsString(border.TopLeft)
-	border.TopRight = getFirstRuneAsString(border.TopRight)
-	border.BottomRight = getFirstRuneAsString(border.BottomRight)
-	border.BottomLeft = getFirstRuneAsString(border.BottomLeft)
-
-	var out strings.Builder
-
-	// Render top
-	if hasTop {
-		top := renderHorizontalEdge(border.TopLeft, border.Top, border.TopRight, width)
-		top = s.styleBorder(top, topFG, topBG)
-		out.WriteString(top)
-		out.WriteRune('\n')
-	}
-
-	leftRunes := []rune(border.Left)
-	leftIndex := 0
-
-	rightRunes := []rune(border.Right)
-	rightIndex := 0
-
-	// Render sides
-	for i, l := range lines {
-		if hasLeft {
-			r := string(leftRunes[leftIndex])
-			leftIndex++
-			if leftIndex >= len(leftRunes) {
-				leftIndex = 0
-			}
-			out.WriteString(s.styleBorder(r, leftFG, leftBG))
-		}
-		out.WriteString(l)
-		if hasRight {
-			r := string(rightRunes[rightIndex])
-			rightIndex++
-			if rightIndex >= len(rightRunes) {
-				rightIndex = 0
-			}
-			out.WriteString(s.styleBorder(r, rightFG, rightBG))
-		}
-		if i < len(lines)-1 {
-			out.WriteRune('\n')
-		}
-	}
-
-	// Render bottom
-	if hasBottom {
-		bottom := renderHorizontalEdge(border.BottomLeft, border.Bottom, border.BottomRight, width)
-		bottom = s.styleBorder(bottom, bottomFG, bottomBG)
-		out.WriteRune('\n')
-		out.WriteString(bottom)
-	}
-
-	return out.String()
-}
-
-// Render the horizontal (top or bottom) portion of a border.
-func renderHorizontalEdge(left, middle, right string, width int) string {
-	if width < 1 {
-		return ""
-	}
-
-	if middle == "" {
-		middle = " "
-	}
-
-	leftWidth := ansi.PrintableRuneWidth(left)
-	rightWidth := ansi.PrintableRuneWidth(right)
-
-	runes := []rune(middle)
-	j := 0
-
-	out := strings.Builder{}
-	out.WriteString(left)
-	for i := leftWidth + rightWidth; i < width+rightWidth; {
-		out.WriteRune(runes[j])
-		j++
-		if j >= len(runes) {
-			j = 0
-		}
-		i += ansi.PrintableRuneWidth(string(runes[j]))
-	}
-	out.WriteString(right)
-
-	return out.String()
-}
-
-// Apply foreground and background styling to a border.
-func (s Style) styleBorder(border string, fg, bg TerminalColor) string {
-	if fg == noColor && bg == noColor {
-		return border
-	}
-
-	var style = termenv.Style{}
-
-	if fg != noColor {
-		style = style.Foreground(fg.color(s.r))
-	}
-	if bg != noColor {
-		style = style.Background(bg.color(s.r))
-	}
-
-	return style.Styled(border)
-}
-
-func maxRuneWidth(str string) (width int) {
-	for _, r := range str {
-		w := runewidth.RuneWidth(r)
-		if w > width {
-			width = w
-		}
-	}
-	return width
-}
-
-func getFirstRuneAsString(str string) string {
-	if str == "" {
-		return str
-	}
-	r := []rune(str)
-	return string(r[0])
-}

+ 0 - 172
vendor/github.com/charmbracelet/lipgloss/color.go

@@ -1,172 +0,0 @@
-package lipgloss
-
-import (
-	"strconv"
-
-	"github.com/muesli/termenv"
-)
-
-// TerminalColor is a color intended to be rendered in the terminal.
-type TerminalColor interface {
-	color(*Renderer) termenv.Color
-	RGBA() (r, g, b, a uint32)
-}
-
-var noColor = NoColor{}
-
-// NoColor is used to specify the absence of color styling. When this is active
-// foreground colors will be rendered with the terminal's default text color,
-// and background colors will not be drawn at all.
-//
-// Example usage:
-//
-//	var style = someStyle.Copy().Background(lipgloss.NoColor{})
-type NoColor struct{}
-
-func (NoColor) color(*Renderer) termenv.Color {
-	return termenv.NoColor{}
-}
-
-// RGBA returns the RGBA value of this color. Because we have to return
-// something, despite this color being the absence of color, we're returning
-// black with 100% opacity.
-//
-// Red: 0x0, Green: 0x0, Blue: 0x0, Alpha: 0xFFFF.
-//
-// Deprecated.
-func (n NoColor) RGBA() (r, g, b, a uint32) {
-	return 0x0, 0x0, 0x0, 0xFFFF
-}
-
-// Color specifies a color by hex or ANSI value. For example:
-//
-//	ansiColor := lipgloss.Color("21")
-//	hexColor := lipgloss.Color("#0000ff")
-type Color string
-
-func (c Color) color(r *Renderer) termenv.Color {
-	return r.ColorProfile().Color(string(c))
-}
-
-// RGBA returns the RGBA value of this color. This satisfies the Go Color
-// interface. Note that on error we return black with 100% opacity, or:
-//
-// Red: 0x0, Green: 0x0, Blue: 0x0, Alpha: 0xFFFF.
-//
-// Deprecated.
-func (c Color) RGBA() (r, g, b, a uint32) {
-	return termenv.ConvertToRGB(c.color(renderer)).RGBA()
-}
-
-// ANSIColor is a color specified by an ANSI color value. It's merely syntactic
-// sugar for the more general Color function. Invalid colors will render as
-// black.
-//
-// Example usage:
-//
-//	// These two statements are equivalent.
-//	colorA := lipgloss.ANSIColor(21)
-//	colorB := lipgloss.Color("21")
-type ANSIColor uint
-
-func (ac ANSIColor) color(r *Renderer) termenv.Color {
-	return Color(strconv.FormatUint(uint64(ac), 10)).color(r)
-}
-
-// RGBA returns the RGBA value of this color. This satisfies the Go Color
-// interface. Note that on error we return black with 100% opacity, or:
-//
-// Red: 0x0, Green: 0x0, Blue: 0x0, Alpha: 0xFFFF.
-//
-// Deprecated.
-func (ac ANSIColor) RGBA() (r, g, b, a uint32) {
-	cf := Color(strconv.FormatUint(uint64(ac), 10))
-	return cf.RGBA()
-}
-
-// AdaptiveColor provides color options for light and dark backgrounds. The
-// appropriate color will be returned at runtime based on the darkness of the
-// terminal background color.
-//
-// Example usage:
-//
-//	color := lipgloss.AdaptiveColor{Light: "#0000ff", Dark: "#000099"}
-type AdaptiveColor struct {
-	Light string
-	Dark  string
-}
-
-func (ac AdaptiveColor) color(r *Renderer) termenv.Color {
-	if r.HasDarkBackground() {
-		return Color(ac.Dark).color(r)
-	}
-	return Color(ac.Light).color(r)
-}
-
-// RGBA returns the RGBA value of this color. This satisfies the Go Color
-// interface. Note that on error we return black with 100% opacity, or:
-//
-// Red: 0x0, Green: 0x0, Blue: 0x0, Alpha: 0xFFFF.
-//
-// Deprecated.
-func (ac AdaptiveColor) RGBA() (r, g, b, a uint32) {
-	return termenv.ConvertToRGB(ac.color(renderer)).RGBA()
-}
-
-// CompleteColor specifies exact values for truecolor, ANSI256, and ANSI color
-// profiles. Automatic color degradation will not be performed.
-type CompleteColor struct {
-	TrueColor string
-	ANSI256   string
-	ANSI      string
-}
-
-func (c CompleteColor) color(r *Renderer) termenv.Color {
-	p := r.ColorProfile()
-	switch p {
-	case termenv.TrueColor:
-		return p.Color(c.TrueColor)
-	case termenv.ANSI256:
-		return p.Color(c.ANSI256)
-	case termenv.ANSI:
-		return p.Color(c.ANSI)
-	default:
-		return termenv.NoColor{}
-	}
-}
-
-// RGBA returns the RGBA value of this color. This satisfies the Go Color
-// interface. Note that on error we return black with 100% opacity, or:
-//
-// Red: 0x0, Green: 0x0, Blue: 0x0, Alpha: 0xFFFF.
-// CompleteAdaptiveColor specifies exact values for truecolor, ANSI256, and ANSI color
-//
-// Deprecated.
-func (c CompleteColor) RGBA() (r, g, b, a uint32) {
-	return termenv.ConvertToRGB(c.color(renderer)).RGBA()
-}
-
-// CompleteColor specifies exact values for truecolor, ANSI256, and ANSI color
-// profiles, with separate options for light and dark backgrounds. Automatic
-// color degradation will not be performed.
-type CompleteAdaptiveColor struct {
-	Light CompleteColor
-	Dark  CompleteColor
-}
-
-func (cac CompleteAdaptiveColor) color(r *Renderer) termenv.Color {
-	if r.HasDarkBackground() {
-		return cac.Dark.color(r)
-	}
-	return cac.Light.color(r)
-}
-
-// RGBA returns the RGBA value of this color. This satisfies the Go Color
-// interface. Note that on error we return black with 100% opacity, or:
-//
-// Red: 0x0, Green: 0x0, Blue: 0x0, Alpha: 0xFFFF.
-//
-// Deprecated.
-func (cac CompleteAdaptiveColor) RGBA() (r, g, b, a uint32) {
-	return termenv.ConvertToRGB(cac.color(renderer)).RGBA()
-}

+ 0 - 481
vendor/github.com/charmbracelet/lipgloss/get.go

@@ -1,481 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-
-	"github.com/muesli/reflow/ansi"
-)
-
-// GetBold returns the style's bold value. If no value is set false is returned.
-func (s Style) GetBold() bool {
-	return s.getAsBool(boldKey, false)
-}
-
-// GetItalic returns the style's italic value. If no value is set false is
-// returned.
-func (s Style) GetItalic() bool {
-	return s.getAsBool(italicKey, false)
-}
-
-// GetUnderline returns the style's underline value. If no value is set false is
-// returned.
-func (s Style) GetUnderline() bool {
-	return s.getAsBool(underlineKey, false)
-}
-
-// GetStrikethrough returns the style's strikethrough value. If no value is set false
-// is returned.
-func (s Style) GetStrikethrough() bool {
-	return s.getAsBool(strikethroughKey, false)
-}
-
-// GetReverse returns the style's reverse value. If no value is set false is
-// returned.
-func (s Style) GetReverse() bool {
-	return s.getAsBool(reverseKey, false)
-}
-
-// GetBlink returns the style's blink value. If no value is set false is
-// returned.
-func (s Style) GetBlink() bool {
-	return s.getAsBool(blinkKey, false)
-}
-
-// GetFaint returns the style's faint value. If no value is set false is
-// returned.
-func (s Style) GetFaint() bool {
-	return s.getAsBool(faintKey, false)
-}
-
-// GetForeground returns the style's foreground color. If no value is set
-// NoColor{} is returned.
-func (s Style) GetForeground() TerminalColor {
-	return s.getAsColor(foregroundKey)
-}
-
-// GetBackground returns the style's back color. If no value is set
-// NoColor{} is returned.
-func (s Style) GetBackground() TerminalColor {
-	return s.getAsColor(backgroundKey)
-}
-
-// GetWidth returns the style's width setting. If no width is set 0 is
-// returned.
-func (s Style) GetWidth() int {
-	return s.getAsInt(widthKey)
-}
-
-// GetHeight returns the style's height setting. If no height is set 0 is
-// returned.
-func (s Style) GetHeight() int {
-	return s.getAsInt(heightKey)
-}
-
-// GetAlign returns the style's implicit horizontal alignment setting.
-// If no alignment is set Position.Left is returned.
-func (s Style) GetAlign() Position {
-	v := s.getAsPosition(alignHorizontalKey)
-	if v == Position(0) {
-		return Left
-	}
-	return v
-}
-
-// GetAlignHorizontal returns the style's implicit horizontal alignment setting.
-// If no alignment is set Position.Left is returned.
-func (s Style) GetAlignHorizontal() Position {
-	v := s.getAsPosition(alignHorizontalKey)
-	if v == Position(0) {
-		return Left
-	}
-	return v
-}
-
-// GetAlignVertical returns the style's implicit vertical alignment setting.
-// If no alignment is set Position.Top is returned.
-func (s Style) GetAlignVertical() Position {
-	v := s.getAsPosition(alignVerticalKey)
-	if v == Position(0) {
-		return Top
-	}
-	return v
-}
-
-// GetPadding returns the style's top, right, bottom, and left padding values,
-// in that order. 0 is returned for unset values.
-func (s Style) GetPadding() (top, right, bottom, left int) {
-	return s.getAsInt(paddingTopKey),
-		s.getAsInt(paddingRightKey),
-		s.getAsInt(paddingBottomKey),
-		s.getAsInt(paddingLeftKey)
-}
-
-// GetPaddingTop returns the style's top padding. If no value is set 0 is
-// returned.
-func (s Style) GetPaddingTop() int {
-	return s.getAsInt(paddingTopKey)
-}
-
-// GetPaddingRight returns the style's right padding. If no value is set 0 is
-// returned.
-func (s Style) GetPaddingRight() int {
-	return s.getAsInt(paddingRightKey)
-}
-
-// GetPaddingBottom returns the style's bottom padding. If no value is set 0 is
-// returned.
-func (s Style) GetPaddingBottom() int {
-	return s.getAsInt(paddingBottomKey)
-}
-
-// GetPaddingLeft returns the style's left padding. If no value is set 0 is
-// returned.
-func (s Style) GetPaddingLeft() int {
-	return s.getAsInt(paddingLeftKey)
-}
-
-// GetHorizontalPadding returns the style's left and right padding. Unset
-// values are measured as 0.
-func (s Style) GetHorizontalPadding() int {
-	return s.getAsInt(paddingLeftKey) + s.getAsInt(paddingRightKey)
-}
-
-// GetVerticalPadding returns the style's top and bottom padding. Unset values
-// are measured as 0.
-func (s Style) GetVerticalPadding() int {
-	return s.getAsInt(paddingTopKey) + s.getAsInt(paddingBottomKey)
-}
-
-// GetColorWhitespace returns the style's whitespace coloring setting. If no
-// value is set false is returned.
-func (s Style) GetColorWhitespace() bool {
-	return s.getAsBool(colorWhitespaceKey, false)
-}
-
-// GetMargin returns the style's top, right, bottom, and left margins, in that
-// order. 0 is returned for unset values.
-func (s Style) GetMargin() (top, right, bottom, left int) {
-	return s.getAsInt(marginTopKey),
-		s.getAsInt(marginRightKey),
-		s.getAsInt(marginBottomKey),
-		s.getAsInt(marginLeftKey)
-}
-
-// GetMarginTop returns the style's top margin. If no value is set 0 is
-// returned.
-func (s Style) GetMarginTop() int {
-	return s.getAsInt(marginTopKey)
-}
-
-// GetMarginRight returns the style's right margin. If no value is set 0 is
-// returned.
-func (s Style) GetMarginRight() int {
-	return s.getAsInt(marginRightKey)
-}
-
-// GetMarginBottom returns the style's bottom margin. If no value is set 0 is
-// returned.
-func (s Style) GetMarginBottom() int {
-	return s.getAsInt(marginBottomKey)
-}
-
-// GetMarginLeft returns the style's left margin. If no value is set 0 is
-// returned.
-func (s Style) GetMarginLeft() int {
-	return s.getAsInt(marginLeftKey)
-}
-
-// GetHorizontalMargins returns the style's left and right margins. Unset
-// values are measured as 0.
-func (s Style) GetHorizontalMargins() int {
-	return s.getAsInt(marginLeftKey) + s.getAsInt(marginRightKey)
-}
-
-// GetVerticalMargins returns the style's top and bottom padding. Unset values
-// are measured as 0.
-func (s Style) GetVerticalMargins() int {
-	return s.getAsInt(marginTopKey) + s.getAsInt(marginBottomKey)
-}
-
-// GetBorder returns the style's border style (type Border) and value for the
-// top, right, bottom, and left in that order. If no value is set for the
-// border style, Border{} is returned. For all other unset values false is
-// returned.
-func (s Style) GetBorder() (b Border, top, right, bottom, left bool) {
-	return s.getBorderStyle(),
-		s.getAsBool(borderTopKey, false),
-		s.getAsBool(borderRightKey, false),
-		s.getAsBool(borderBottomKey, false),
-		s.getAsBool(borderLeftKey, false)
-}
-
-// GetBorderStyle returns the style's border style (type Border). If no value
-// is set Border{} is returned.
-func (s Style) GetBorderStyle() Border {
-	return s.getBorderStyle()
-}
-
-// GetBorderTop returns the style's top border setting. If no value is set
-// false is returned.
-func (s Style) GetBorderTop() bool {
-	return s.getAsBool(borderTopKey, false)
-}
-
-// GetBorderRight returns the style's right border setting. If no value is set
-// false is returned.
-func (s Style) GetBorderRight() bool {
-	return s.getAsBool(borderRightKey, false)
-}
-
-// GetBorderBottom returns the style's bottom border setting. If no value is
-// set false is returned.
-func (s Style) GetBorderBottom() bool {
-	return s.getAsBool(borderBottomKey, false)
-}
-
-// GetBorderLeft returns the style's left border setting. If no value is
-// set false is returned.
-func (s Style) GetBorderLeft() bool {
-	return s.getAsBool(borderLeftKey, false)
-}
-
-// GetBorderTopForeground returns the style's border top foreground color. If
-// no value is set NoColor{} is returned.
-func (s Style) GetBorderTopForeground() TerminalColor {
-	return s.getAsColor(borderTopForegroundKey)
-}
-
-// GetBorderRightForeground returns the style's border right foreground color.
-// If no value is set NoColor{} is returned.
-func (s Style) GetBorderRightForeground() TerminalColor {
-	return s.getAsColor(borderRightForegroundKey)
-}
-
-// GetBorderBottomForeground returns the style's border bottom foreground
-// color.  If no value is set NoColor{} is returned.
-func (s Style) GetBorderBottomForeground() TerminalColor {
-	return s.getAsColor(borderBottomForegroundKey)
-}
-
-// GetBorderLeftForeground returns the style's border bottom foreground
-// color.  If no value is set NoColor{} is returned.
-func (s Style) GetBorderLeftForeground() TerminalColor {
-	return s.getAsColor(borderLeftForegroundKey)
-}
-
-// GetBorderTopBackground returns the style's border top background color. If
-// no value is set NoColor{} is returned.
-func (s Style) GetBorderTopBackground() TerminalColor {
-	return s.getAsColor(borderTopBackgroundKey)
-}
-
-// GetBorderRightBackground returns the style's border right background color.
-// If no value is set NoColor{} is returned.
-func (s Style) GetBorderRightBackground() TerminalColor {
-	return s.getAsColor(borderRightBackgroundKey)
-}
-
-// GetBorderBottomBackground returns the style's border bottom background
-// color.  If no value is set NoColor{} is returned.
-func (s Style) GetBorderBottomBackground() TerminalColor {
-	return s.getAsColor(borderBottomBackgroundKey)
-}
-
-// GetBorderLeftBackground returns the style's border bottom background
-// color.  If no value is set NoColor{} is returned.
-func (s Style) GetBorderLeftBackground() TerminalColor {
-	return s.getAsColor(borderLeftBackgroundKey)
-}
-
-// GetBorderTopWidth returns the width of the top border. If borders contain
-// runes of varying widths, the widest rune is returned. If no border exists on
-// the top edge, 0 is returned.
-//
-// Deprecated: This function simply calls Style.GetBorderTopSize.
-func (s Style) GetBorderTopWidth() int {
-	return s.GetBorderTopSize()
-}
-
-// GetBorderTopSize returns the width of the top border. If borders contain
-// runes of varying widths, the widest rune is returned. If no border exists on
-// the top edge, 0 is returned.
-func (s Style) GetBorderTopSize() int {
-	if !s.getAsBool(borderTopKey, false) {
-		return 0
-	}
-	return s.getBorderStyle().GetTopSize()
-}
-
-// GetBorderLeftSize returns the width of the left border. If borders contain
-// runes of varying widths, the widest rune is returned. If no border exists on
-// the left edge, 0 is returned.
-func (s Style) GetBorderLeftSize() int {
-	if !s.getAsBool(borderLeftKey, false) {
-		return 0
-	}
-	return s.getBorderStyle().GetLeftSize()
-}
-
-// GetBorderBottomSize returns the width of the bottom border. If borders
-// contain runes of varying widths, the widest rune is returned. If no border
-// exists on the left edge, 0 is returned.
-func (s Style) GetBorderBottomSize() int {
-	if !s.getAsBool(borderBottomKey, false) {
-		return 0
-	}
-	return s.getBorderStyle().GetBottomSize()
-}
-
-// GetBorderRightSize returns the width of the right border. If borders
-// contain runes of varying widths, the widest rune is returned. If no border
-// exists on the right edge, 0 is returned.
-func (s Style) GetBorderRightSize() int {
-	if !s.getAsBool(borderRightKey, false) {
-		return 0
-	}
-	return s.getBorderStyle().GetBottomSize()
-}
-
-// GetHorizontalBorderSize returns the width of the horizontal borders. If
-// borders contain runes of varying widths, the widest rune is returned. If no
-// border exists on the horizontal edges, 0 is returned.
-func (s Style) GetHorizontalBorderSize() int {
-	b := s.getBorderStyle()
-	return b.GetLeftSize() + b.GetRightSize()
-}
-
-// GetVerticalBorderSize returns the width of the horizontal borders. If
-// borders contain runes of varying widths, the widest rune is returned. If no
-// border exists on the horizontal edges, 0 is returned.
-func (s Style) GetVerticalBorderSize() int {
-	b := s.getBorderStyle()
-	return b.GetTopSize() + b.GetBottomSize()
-}
-
-// GetInline returns the style's inline setting. If no value is set false is
-// returned.
-func (s Style) GetInline() bool {
-	return s.getAsBool(inlineKey, false)
-}
-
-// GetMaxWidth returns the style's max width setting. If no value is set 0 is
-// returned.
-func (s Style) GetMaxWidth() int {
-	return s.getAsInt(maxWidthKey)
-}
-
-// GetMaxHeight returns the style's max width setting. If no value is set 0 is
-// returned.
-func (s Style) GetMaxHeight() int {
-	return s.getAsInt(maxHeightKey)
-}
-
-// GetUnderlineSpaces returns whether or not the style is set to underline
-// spaces. If not value is set false is returned.
-func (s Style) GetUnderlineSpaces() bool {
-	return s.getAsBool(underlineSpacesKey, false)
-}
-
-// GetStrikethroughSpaces returns whether or not the style is set to underline
-// spaces. If not value is set false is returned.
-func (s Style) GetStrikethroughSpaces() bool {
-	return s.getAsBool(strikethroughSpacesKey, false)
-}
-
-// GetHorizontalFrameSize returns the sum of the style's horizontal margins, padding
-// and border widths.
-//
-// Provisional: this method may be renamed.
-func (s Style) GetHorizontalFrameSize() int {
-	return s.GetHorizontalMargins() + s.GetHorizontalPadding() + s.GetHorizontalBorderSize()
-}
-
-// GetVerticalFrameSize returns the sum of the style's horizontal margins, padding
-// and border widths.
-//
-// Provisional: this method may be renamed.
-func (s Style) GetVerticalFrameSize() int {
-	return s.GetVerticalMargins() + s.GetVerticalPadding() + s.GetVerticalBorderSize()
-}
-
-// GetFrameSize returns the sum of the margins, padding and border width for
-// both the horizontal and vertical margins.
-func (s Style) GetFrameSize() (x, y int) {
-	return s.GetHorizontalFrameSize(), s.GetVerticalFrameSize()
-}
-
-// Returns whether or not the given property is set.
-func (s Style) isSet(k propKey) bool {
-	_, exists := s.rules[k]
-	return exists
-}
-
-func (s Style) getAsBool(k propKey, defaultVal bool) bool {
-	v, ok := s.rules[k]
-	if !ok {
-		return defaultVal
-	}
-	if b, ok := v.(bool); ok {
-		return b
-	}
-	return defaultVal
-}
-
-func (s Style) getAsColor(k propKey) TerminalColor {
-	v, ok := s.rules[k]
-	if !ok {
-		return noColor
-	}
-	if c, ok := v.(TerminalColor); ok {
-		return c
-	}
-	return noColor
-}
-
-func (s Style) getAsInt(k propKey) int {
-	v, ok := s.rules[k]
-	if !ok {
-		return 0
-	}
-	if i, ok := v.(int); ok {
-		return i
-	}
-	return 0
-}
-
-func (s Style) getAsPosition(k propKey) Position {
-	v, ok := s.rules[k]
-	if !ok {
-		return Position(0)
-	}
-	if p, ok := v.(Position); ok {
-		return p
-	}
-	return Position(0)
-}
-
-func (s Style) getBorderStyle() Border {
-	v, ok := s.rules[borderStyleKey]
-	if !ok {
-		return noBorder
-	}
-	if b, ok := v.(Border); ok {
-		return b
-	}
-	return noBorder
-}
-
-// Split a string into lines, additionally returning the size of the widest
-// line.
-func getLines(s string) (lines []string, widest int) {
-	lines = strings.Split(s, "\n")
-
-	for _, l := range lines {
-		w := ansi.PrintableRuneWidth(l)
-		if widest < w {
-			widest = w
-		}
-	}
-
-	return lines, widest
-}

+ 0 - 175
vendor/github.com/charmbracelet/lipgloss/join.go

@@ -1,175 +0,0 @@
-package lipgloss
-
-import (
-	"math"
-	"strings"
-
-	"github.com/muesli/reflow/ansi"
-)
-
-// JoinHorizontal is a utility function for horizontally joining two
-// potentially multi-lined strings along a vertical axis. The first argument is
-// the position, with 0 being all the way at the top and 1 being all the way
-// at the bottom.
-//
-// If you just want to align to the left, right or center you may as well just
-// use the helper constants Top, Center, and Bottom.
-//
-// Example:
-//
-//	blockB := "...\n...\n..."
-//	blockA := "...\n...\n...\n...\n..."
-//
-//	// Join 20% from the top
-//	str := lipgloss.JoinHorizontal(0.2, blockA, blockB)
-//
-//	// Join on the top edge
-//	str := lipgloss.JoinHorizontal(lipgloss.Top, blockA, blockB)
-func JoinHorizontal(pos Position, strs ...string) string {
-	if len(strs) == 0 {
-		return ""
-	}
-	if len(strs) == 1 {
-		return strs[0]
-	}
-
-	var (
-		// Groups of strings broken into multiple lines
-		blocks = make([][]string, len(strs))
-
-		// Max line widths for the above text blocks
-		maxWidths = make([]int, len(strs))
-
-		// Height of the tallest block
-		maxHeight int
-	)
-
-	// Break text blocks into lines and get max widths for each text block
-	for i, str := range strs {
-		blocks[i], maxWidths[i] = getLines(str)
-		if len(blocks[i]) > maxHeight {
-			maxHeight = len(blocks[i])
-		}
-	}
-
-	// Add extra lines to make each side the same height
-	for i := range blocks {
-		if len(blocks[i]) >= maxHeight {
-			continue
-		}
-
-		extraLines := make([]string, maxHeight-len(blocks[i]))
-
-		switch pos {
-		case Top:
-			blocks[i] = append(blocks[i], extraLines...)
-
-		case Bottom:
-			blocks[i] = append(extraLines, blocks[i]...)
-
-		default: // Somewhere in the middle
-			n := len(extraLines)
-			split := int(math.Round(float64(n) * pos.value()))
-			top := n - split
-			bottom := n - top
-
-			blocks[i] = append(extraLines[top:], blocks[i]...)
-			blocks[i] = append(blocks[i], extraLines[bottom:]...)
-		}
-	}
-
-	// Merge lines
-	var b strings.Builder
-	for i := range blocks[0] { // remember, all blocks have the same number of members now
-		for j, block := range blocks {
-			b.WriteString(block[i])
-
-			// Also make lines the same length
-			b.WriteString(strings.Repeat(" ", maxWidths[j]-ansi.PrintableRuneWidth(block[i])))
-		}
-		if i < len(blocks[0])-1 {
-			b.WriteRune('\n')
-		}
-	}
-
-	return b.String()
-}
-
-// JoinVertical is a utility function for vertically joining two potentially
-// multi-lined strings along a horizontal axis. The first argument is the
-// position, with 0 being all the way to the left and 1 being all the way to
-// the right.
-//
-// If you just want to align to the left, right or center you may as well just
-// use the helper constants Left, Center, and Right.
-//
-// Example:
-//
-//	blockB := "...\n...\n..."
-//	blockA := "...\n...\n...\n...\n..."
-//
-//	// Join 20% from the top
-//	str := lipgloss.JoinVertical(0.2, blockA, blockB)
-//
-//	// Join on the right edge
-//	str := lipgloss.JoinVertical(lipgloss.Right, blockA, blockB)
-func JoinVertical(pos Position, strs ...string) string {
-	if len(strs) == 0 {
-		return ""
-	}
-	if len(strs) == 1 {
-		return strs[0]
-	}
-
-	var (
-		blocks   = make([][]string, len(strs))
-		maxWidth int
-	)
-
-	for i := range strs {
-		var w int
-		blocks[i], w = getLines(strs[i])
-		if w > maxWidth {
-			maxWidth = w
-		}
-	}
-
-	var b strings.Builder
-	for i, block := range blocks {
-		for j, line := range block {
-			w := maxWidth - ansi.PrintableRuneWidth(line)
-
-			switch pos {
-			case Left:
-				b.WriteString(line)
-				b.WriteString(strings.Repeat(" ", w))
-
-			case Right:
-				b.WriteString(strings.Repeat(" ", w))
-				b.WriteString(line)
-
-			default: // Somewhere in the middle
-				if w < 1 {
-					b.WriteString(line)
-					break
-				}
-
-				split := int(math.Round(float64(w) * pos.value()))
-				right := w - split
-				left := w - right
-
-				b.WriteString(strings.Repeat(" ", left))
-				b.WriteString(line)
-				b.WriteString(strings.Repeat(" ", right))
-			}
-
-			// Write a newline as long as we're not on the last line of the
-			// last block.
-			if !(i == len(blocks)-1 && j == len(block)-1) {
-				b.WriteRune('\n')
-			}
-		}
-	}
-
-	return b.String()
-}

+ 0 - 154
vendor/github.com/charmbracelet/lipgloss/position.go

@@ -1,154 +0,0 @@
-package lipgloss
-
-import (
-	"math"
-	"strings"
-
-	"github.com/muesli/reflow/ansi"
-)
-
-// Position represents a position along a horizontal or vertical axis. It's in
-// situations where an axis is involved, like alignment, joining, placement and
-// so on.
-//
-// A value of 0 represents the start (the left or top) and 1 represents the end
-// (the right or bottom). 0.5 represents the center.
-//
-// There are constants Top, Bottom, Center, Left and Right in this package that
-// can be used to aid readability.
-type Position float64
-
-func (p Position) value() float64 {
-	return math.Min(1, math.Max(0, float64(p)))
-}
-
-// Position aliases.
-const (
-	Top    Position = 0.0
-	Bottom Position = 1.0
-	Center Position = 0.5
-	Left   Position = 0.0
-	Right  Position = 1.0
-)
-
-// Place places a string or text block vertically in an unstyled box of a given
-// width or height.
-func Place(width, height int, hPos, vPos Position, str string, opts ...WhitespaceOption) string {
-	return renderer.Place(width, height, hPos, vPos, str, opts...)
-}
-
-// Place places a string or text block vertically in an unstyled box of a given
-// width or height.
-func (r *Renderer) Place(width, height int, hPos, vPos Position, str string, opts ...WhitespaceOption) string {
-	return r.PlaceVertical(height, vPos, r.PlaceHorizontal(width, hPos, str, opts...), opts...)
-}
-
-// PlaceHorizontal places a string or text block horizontally in an unstyled
-// block of a given width. If the given width is shorter than the max width of
-// the string (measured by its longest line) this will be a noop.
-func PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOption) string {
-	return renderer.PlaceHorizontal(width, pos, str, opts...)
-}
-
-// PlaceHorizontal places a string or text block horizontally in an unstyled
-// block of a given width. If the given width is shorter than the max width of
-// the string (measured by it's longest line) this will be a noöp.
-func (r *Renderer) PlaceHorizontal(width int, pos Position, str string, opts ...WhitespaceOption) string {
-	lines, contentWidth := getLines(str)
-	gap := width - contentWidth
-
-	if gap <= 0 {
-		return str
-	}
-
-	ws := newWhitespace(r, opts...)
-
-	var b strings.Builder
-	for i, l := range lines {
-		// Is this line shorter than the longest line?
-		short := max(0, contentWidth-ansi.PrintableRuneWidth(l))
-
-		switch pos {
-		case Left:
-			b.WriteString(l)
-			b.WriteString(ws.render(gap + short))
-
-		case Right:
-			b.WriteString(ws.render(gap + short))
-			b.WriteString(l)
-
-		default: // somewhere in the middle
-			totalGap := gap + short
-
-			split := int(math.Round(float64(totalGap) * pos.value()))
-			left := totalGap - split
-			right := totalGap - left
-
-			b.WriteString(ws.render(left))
-			b.WriteString(l)
-			b.WriteString(ws.render(right))
-		}
-
-		if i < len(lines)-1 {
-			b.WriteRune('\n')
-		}
-	}
-
-	return b.String()
-}
-
-// PlaceVertical places a string or text block vertically in an unstyled block
-// of a given height. If the given height is shorter than the height of the
-// string (measured by its newlines) then this will be a noop.
-func PlaceVertical(height int, pos Position, str string, opts ...WhitespaceOption) string {
-	return renderer.PlaceVertical(height, pos, str, opts...)
-}
-
-// PlaceVertical places a string or text block vertically in an unstyled block
-// of a given height. If the given height is shorter than the height of the
-// string (measured by it's newlines) then this will be a noöp.
-func (r *Renderer) PlaceVertical(height int, pos Position, str string, opts ...WhitespaceOption) string {
-	contentHeight := strings.Count(str, "\n") + 1
-	gap := height - contentHeight
-
-	if gap <= 0 {
-		return str
-	}
-
-	ws := newWhitespace(r, opts...)
-
-	_, width := getLines(str)
-	emptyLine := ws.render(width)
-	b := strings.Builder{}
-
-	switch pos {
-	case Top:
-		b.WriteString(str)
-		b.WriteRune('\n')
-		for i := 0; i < gap; i++ {
-			b.WriteString(emptyLine)
-			if i < gap-1 {
-				b.WriteRune('\n')
-			}
-		}
-
-	case Bottom:
-		b.WriteString(strings.Repeat(emptyLine+"\n", gap))
-		b.WriteString(str)
-
-	default: // Somewhere in the middle
-		split := int(math.Round(float64(gap) * pos.value()))
-		top := gap - split
-		bottom := gap - top
-
-		b.WriteString(strings.Repeat(emptyLine+"\n", top))
-		b.WriteString(str)
-
-		for i := 0; i < bottom; i++ {
-			b.WriteRune('\n')
-			b.WriteString(emptyLine)
-		}
-	}
-
-	return b.String()
-}

+ 0 - 143
vendor/github.com/charmbracelet/lipgloss/renderer.go

@@ -1,143 +0,0 @@
-package lipgloss
-
-import (
-	"io"
-
-	"github.com/muesli/termenv"
-)
-
-// We're manually creating the struct here to avoid initializing the output and
-// query the terminal multiple times.
-var renderer = &Renderer{
-	output: termenv.DefaultOutput(),
-}
-
-// Renderer is a lipgloss terminal renderer.
-type Renderer struct {
-	output            *termenv.Output
-	hasDarkBackground *bool
-}
-
-// RendererOption is a function that can be used to configure a [Renderer].
-type RendererOption func(r *Renderer)
-
-// DefaultRenderer returns the default renderer.
-func DefaultRenderer() *Renderer {
-	return renderer
-}
-
-// SetDefaultRenderer sets the default global renderer.
-func SetDefaultRenderer(r *Renderer) {
-	renderer = r
-}
-
-// NewRenderer creates a new Renderer.
-//
-// w will be used to determine the terminal's color capabilities.
-func NewRenderer(w io.Writer, opts ...termenv.OutputOption) *Renderer {
-	r := &Renderer{
-		output: termenv.NewOutput(w, opts...),
-	}
-	return r
-}
-
-// Output returns the termenv output.
-func (r *Renderer) Output() *termenv.Output {
-	return r.output
-}
-
-// SetOutput sets the termenv output.
-func (r *Renderer) SetOutput(o *termenv.Output) {
-	r.output = o
-}
-
-// ColorProfile returns the detected termenv color profile.
-func (r *Renderer) ColorProfile() termenv.Profile {
-	return r.output.Profile
-}
-
-// ColorProfile returns the detected termenv color profile.
-func ColorProfile() termenv.Profile {
-	return renderer.ColorProfile()
-}
-
-// SetColorProfile sets the color profile on the renderer. This function exists
-// mostly for testing purposes so that you can assure you're testing against
-// a specific profile.
-//
-// Outside of testing you likely won't want to use this function as the color
-// profile will detect and cache the terminal's color capabilities and choose
-// the best available profile.
-//
-// Available color profiles are:
-//
-//	termenv.Ascii     // no color, 1-bit
-//	termenv.ANSI      //16 colors, 4-bit
-//	termenv.ANSI256   // 256 colors, 8-bit
-//	termenv.TrueColor // 16,777,216 colors, 24-bit
-//
-// This function is thread-safe.
-func (r *Renderer) SetColorProfile(p termenv.Profile) {
-	r.output.Profile = p
-}
-
-// SetColorProfile sets the color profile on the default renderer. This
-// function exists mostly for testing purposes so that you can assure you're
-// testing against a specific profile.
-//
-// Outside of testing you likely won't want to use this function as the color
-// profile will detect and cache the terminal's color capabilities and choose
-// the best available profile.
-//
-// Available color profiles are:
-//
-//	termenv.Ascii     // no color, 1-bit
-//	termenv.ANSI      //16 colors, 4-bit
-//	termenv.ANSI256   // 256 colors, 8-bit
-//	termenv.TrueColor // 16,777,216 colors, 24-bit
-//
-// This function is thread-safe.
-func SetColorProfile(p termenv.Profile) {
-	renderer.SetColorProfile(p)
-}
-
-// HasDarkBackground returns whether or not the terminal has a dark background.
-func HasDarkBackground() bool {
-	return renderer.HasDarkBackground()
-}
-
-// HasDarkBackground returns whether or not the renderer will render to a dark
-// background. A dark background can either be auto-detected, or set explicitly
-// on the renderer.
-func (r *Renderer) HasDarkBackground() bool {
-	if r.hasDarkBackground != nil {
-		return *r.hasDarkBackground
-	}
-	return r.output.HasDarkBackground()
-}
-
-// SetHasDarkBackground sets the background color detection value for the
-// default renderer. This function exists mostly for testing purposes so that
-// you can assure you're testing against a specific background color setting.
-//
-// Outside of testing you likely won't want to use this function as the
-// backgrounds value will be automatically detected and cached against the
-// terminal's current background color setting.
-//
-// This function is thread-safe.
-func SetHasDarkBackground(b bool) {
-	renderer.SetHasDarkBackground(b)
-}
-
-// SetHasDarkBackground sets the background color detection value on the
-// renderer. This function exists mostly for testing purposes so that you can
-// assure you're testing against a specific background color setting.
-//
-// Outside of testing you likely won't want to use this function as the
-// backgrounds value will be automatically detected and cached against the
-// terminal's current background color setting.
-//
-// This function is thread-safe.
-func (r *Renderer) SetHasDarkBackground(b bool) {
-	r.hasDarkBackground = &b
-}

+ 0 - 43
vendor/github.com/charmbracelet/lipgloss/runes.go

@@ -1,43 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-)
-
-// StyleRunes apply a given style to runes at the given indices in the string.
-// Note that you must provide styling options for both matched and unmatched
-// runes. Indices out of bounds will be ignored.
-func StyleRunes(str string, indices []int, matched, unmatched Style) string {
-	// Convert slice of indices to a map for easier lookups
-	m := make(map[int]struct{})
-	for _, i := range indices {
-		m[i] = struct{}{}
-	}
-
-	var (
-		out   strings.Builder
-		group strings.Builder
-		style Style
-		runes = []rune(str)
-	)
-
-	for i, r := range runes {
-		group.WriteRune(r)
-
-		_, matches := m[i]
-		_, nextMatches := m[i+1]
-
-		if matches != nextMatches || i == len(runes)-1 {
-			// Flush
-			if matches {
-				style = matched
-			} else {
-				style = unmatched
-			}
-			out.WriteString(style.Render(group.String()))
-			group.Reset()
-		}
-	}
-
-	return out.String()
-}

+ 0 - 634
vendor/github.com/charmbracelet/lipgloss/set.go

@@ -1,634 +0,0 @@
-package lipgloss
-
-// This could (should) probably just be moved into NewStyle(). We've broken it
-// out, so we can call it in a lazy way.
-func (s *Style) init() {
-	if s.rules == nil {
-		s.rules = make(rules)
-	}
-}
-
-// Set a value on the underlying rules map.
-func (s *Style) set(key propKey, value interface{}) {
-	s.init()
-
-	switch v := value.(type) {
-	case int:
-		// We don't allow negative integers on any of our values, so just keep
-		// them at zero or above. We could use uints instead, but the
-		// conversions are a little tedious, so we're sticking with ints for
-		// sake of usability.
-		s.rules[key] = max(0, v)
-	default:
-		s.rules[key] = v
-	}
-}
-
-// Bold sets a bold formatting rule.
-func (s Style) Bold(v bool) Style {
-	s.set(boldKey, v)
-	return s
-}
-
-// Italic sets an italic formatting rule. In some terminal emulators this will
-// render with "reverse" coloring if not italic font variant is available.
-func (s Style) Italic(v bool) Style {
-	s.set(italicKey, v)
-	return s
-}
-
-// Underline sets an underline rule. By default, underlines will not be drawn on
-// whitespace like margins and padding. To change this behavior set
-// UnderlineSpaces.
-func (s Style) Underline(v bool) Style {
-	s.set(underlineKey, v)
-	return s
-}
-
-// Strikethrough sets a strikethrough rule. By default, strikes will not be
-// drawn on whitespace like margins and padding. To change this behavior set
-// StrikethroughSpaces.
-func (s Style) Strikethrough(v bool) Style {
-	s.set(strikethroughKey, v)
-	return s
-}
-
-// Reverse sets a rule for inverting foreground and background colors.
-func (s Style) Reverse(v bool) Style {
-	s.set(reverseKey, v)
-	return s
-}
-
-// Blink sets a rule for blinking foreground text.
-func (s Style) Blink(v bool) Style {
-	s.set(blinkKey, v)
-	return s
-}
-
-// Faint sets a rule for rendering the foreground color in a dimmer shade.
-func (s Style) Faint(v bool) Style {
-	s.set(faintKey, v)
-	return s
-}
-
-// Foreground sets a foreground color.
-//
-//	// Sets the foreground to blue
-//	s := lipgloss.NewStyle().Foreground(lipgloss.Color("#0000ff"))
-//
-//	// Removes the foreground color
-//	s.Foreground(lipgloss.NoColor)
-func (s Style) Foreground(c TerminalColor) Style {
-	s.set(foregroundKey, c)
-	return s
-}
-
-// Background sets a background color.
-func (s Style) Background(c TerminalColor) Style {
-	s.set(backgroundKey, c)
-	return s
-}
-
-// Width sets the width of the block before applying margins. The width, if
-// set, also determines where text will wrap.
-func (s Style) Width(i int) Style {
-	s.set(widthKey, i)
-	return s
-}
-
-// Height sets the height of the block before applying margins. If the height of
-// the text block is less than this value after applying padding (or not), the
-// block will be set to this height.
-func (s Style) Height(i int) Style {
-	s.set(heightKey, i)
-	return s
-}
-
-// Align is a shorthand method for setting horizontal and vertical alignment.
-//
-// With one argument, the position value is applied to the horizontal alignment.
-//
-// With two arguments, the value is applied to the vertical and horizontal
-// alignments, in that order.
-func (s Style) Align(p ...Position) Style {
-	if len(p) > 0 {
-		s.set(alignHorizontalKey, p[0])
-	}
-	if len(p) > 1 {
-		s.set(alignVerticalKey, p[1])
-	}
-	return s
-}
-
-// AlignHorizontal sets a horizontal text alignment rule.
-func (s Style) AlignHorizontal(p Position) Style {
-	s.set(alignHorizontalKey, p)
-	return s
-}
-
-// AlignVertical sets a text alignment rule.
-func (s Style) AlignVertical(p Position) Style {
-	s.set(alignVerticalKey, p)
-	return s
-}
-
-// Padding is a shorthand method for setting padding on all sides at once.
-//
-// With one argument, the value is applied to all sides.
-//
-// With two arguments, the value is applied to the vertical and horizontal
-// sides, in that order.
-//
-// With three arguments, the value is applied to the top side, the horizontal
-// sides, and the bottom side, in that order.
-//
-// With four arguments, the value is applied clockwise starting from the top
-// side, followed by the right side, then the bottom, and finally the left.
-//
-// With more than four arguments no padding will be added.
-func (s Style) Padding(i ...int) Style {
-	top, right, bottom, left, ok := whichSidesInt(i...)
-	if !ok {
-		return s
-	}
-
-	s.set(paddingTopKey, top)
-	s.set(paddingRightKey, right)
-	s.set(paddingBottomKey, bottom)
-	s.set(paddingLeftKey, left)
-	return s
-}
-
-// PaddingLeft adds padding on the left.
-func (s Style) PaddingLeft(i int) Style {
-	s.set(paddingLeftKey, i)
-	return s
-}
-
-// PaddingRight adds padding on the right.
-func (s Style) PaddingRight(i int) Style {
-	s.set(paddingRightKey, i)
-	return s
-}
-
-// PaddingTop adds padding to the top of the block.
-func (s Style) PaddingTop(i int) Style {
-	s.set(paddingTopKey, i)
-	return s
-}
-
-// PaddingBottom adds padding to the bottom of the block.
-func (s Style) PaddingBottom(i int) Style {
-	s.set(paddingBottomKey, i)
-	return s
-}
-
-// ColorWhitespace determines whether or not the background color should be
-// applied to the padding. This is true by default as it's more than likely the
-// desired and expected behavior, but it can be disabled for certain graphic
-// effects.
-func (s Style) ColorWhitespace(v bool) Style {
-	s.set(colorWhitespaceKey, v)
-	return s
-}
-
-// Margin is a shorthand method for setting margins on all sides at once.
-//
-// With one argument, the value is applied to all sides.
-//
-// With two arguments, the value is applied to the vertical and horizontal
-// sides, in that order.
-//
-// With three arguments, the value is applied to the top side, the horizontal
-// sides, and the bottom side, in that order.
-//
-// With four arguments, the value is applied clockwise starting from the top
-// side, followed by the right side, then the bottom, and finally the left.
-//
-// With more than four arguments no margin will be added.
-func (s Style) Margin(i ...int) Style {
-	top, right, bottom, left, ok := whichSidesInt(i...)
-	if !ok {
-		return s
-	}
-
-	s.set(marginTopKey, top)
-	s.set(marginRightKey, right)
-	s.set(marginBottomKey, bottom)
-	s.set(marginLeftKey, left)
-	return s
-}
-
-// MarginLeft sets the value of the left margin.
-func (s Style) MarginLeft(i int) Style {
-	s.set(marginLeftKey, i)
-	return s
-}
-
-// MarginRight sets the value of the right margin.
-func (s Style) MarginRight(i int) Style {
-	s.set(marginRightKey, i)
-	return s
-}
-
-// MarginTop sets the value of the top margin.
-func (s Style) MarginTop(i int) Style {
-	s.set(marginTopKey, i)
-	return s
-}
-
-// MarginBottom sets the value of the bottom margin.
-func (s Style) MarginBottom(i int) Style {
-	s.set(marginBottomKey, i)
-	return s
-}
-
-// MarginBackground sets the background color of the margin. Note that this is
-// also set when inheriting from a style with a background color. In that case
-// the background color on that style will set the margin color on this style.
-func (s Style) MarginBackground(c TerminalColor) Style {
-	s.set(marginBackgroundKey, c)
-	return s
-}
-
-// Border is shorthand for setting the border style and which sides should
-// have a border at once. The variadic argument sides works as follows:
-//
-// With one value, the value is applied to all sides.
-//
-// With two values, the values are applied to the vertical and horizontal
-// sides, in that order.
-//
-// With three values, the values are applied to the top side, the horizontal
-// sides, and the bottom side, in that order.
-//
-// With four values, the values are applied clockwise starting from the top
-// side, followed by the right side, then the bottom, and finally the left.
-//
-// With more than four arguments the border will be applied to all sides.
-//
-// Examples:
-//
-//	// Applies borders to the top and bottom only
-//	lipgloss.NewStyle().Border(lipgloss.NormalBorder(), true, false)
-//
-//	// Applies rounded borders to the right and bottom only
-//	lipgloss.NewStyle().Border(lipgloss.RoundedBorder(), false, true, true, false)
-func (s Style) Border(b Border, sides ...bool) Style {
-	s.set(borderStyleKey, b)
-
-	top, right, bottom, left, ok := whichSidesBool(sides...)
-	if !ok {
-		top = true
-		right = true
-		bottom = true
-		left = true
-	}
-
-	s.set(borderTopKey, top)
-	s.set(borderRightKey, right)
-	s.set(borderBottomKey, bottom)
-	s.set(borderLeftKey, left)
-
-	return s
-}
-
-// BorderStyle defines the Border on a style. A Border contains a series of
-// definitions for the sides and corners of a border.
-//
-// Note that if border visibility has not been set for any sides when setting
-// the border style, the border will be enabled for all sides during rendering.
-//
-// You can define border characters as you'd like, though several default
-// styles are included: NormalBorder(), RoundedBorder(), BlockBorder(),
-// OuterHalfBlockBorder(), InnerHalfBlockBorder(), ThickBorder(),
-// and DoubleBorder().
-//
-// Example:
-//
-//	lipgloss.NewStyle().BorderStyle(lipgloss.ThickBorder())
-func (s Style) BorderStyle(b Border) Style {
-	s.set(borderStyleKey, b)
-	return s
-}
-
-// BorderTop determines whether or not to draw a top border.
-func (s Style) BorderTop(v bool) Style {
-	s.set(borderTopKey, v)
-	return s
-}
-
-// BorderRight determines whether or not to draw a right border.
-func (s Style) BorderRight(v bool) Style {
-	s.set(borderRightKey, v)
-	return s
-}
-
-// BorderBottom determines whether or not to draw a bottom border.
-func (s Style) BorderBottom(v bool) Style {
-	s.set(borderBottomKey, v)
-	return s
-}
-
-// BorderLeft determines whether or not to draw a left border.
-func (s Style) BorderLeft(v bool) Style {
-	s.set(borderLeftKey, v)
-	return s
-}
-
-// BorderForeground is a shorthand function for setting all of the
-// foreground colors of the borders at once. The arguments work as follows:
-//
-// With one argument, the argument is applied to all sides.
-//
-// With two arguments, the arguments are applied to the vertical and horizontal
-// sides, in that order.
-//
-// With three arguments, the arguments are applied to the top side, the
-// horizontal sides, and the bottom side, in that order.
-//
-// With four arguments, the arguments are applied clockwise starting from the
-// top side, followed by the right side, then the bottom, and finally the left.
-//
-// With more than four arguments nothing will be set.
-func (s Style) BorderForeground(c ...TerminalColor) Style {
-	if len(c) == 0 {
-		return s
-	}
-
-	top, right, bottom, left, ok := whichSidesColor(c...)
-	if !ok {
-		return s
-	}
-
-	s.set(borderTopForegroundKey, top)
-	s.set(borderRightForegroundKey, right)
-	s.set(borderBottomForegroundKey, bottom)
-	s.set(borderLeftForegroundKey, left)
-
-	return s
-}
-
-// BorderTopForeground set the foreground color for the top of the border.
-func (s Style) BorderTopForeground(c TerminalColor) Style {
-	s.set(borderTopForegroundKey, c)
-	return s
-}
-
-// BorderRightForeground sets the foreground color for the right side of the
-// border.
-func (s Style) BorderRightForeground(c TerminalColor) Style {
-	s.set(borderRightForegroundKey, c)
-	return s
-}
-
-// BorderBottomForeground sets the foreground color for the bottom of the
-// border.
-func (s Style) BorderBottomForeground(c TerminalColor) Style {
-	s.set(borderBottomForegroundKey, c)
-	return s
-}
-
-// BorderLeftForeground sets the foreground color for the left side of the
-// border.
-func (s Style) BorderLeftForeground(c TerminalColor) Style {
-	s.set(borderLeftForegroundKey, c)
-	return s
-}
-
-// BorderBackground is a shorthand function for setting all of the
-// background colors of the borders at once. The arguments work as follows:
-//
-// With one argument, the argument is applied to all sides.
-//
-// With two arguments, the arguments are applied to the vertical and horizontal
-// sides, in that order.
-//
-// With three arguments, the arguments are applied to the top side, the
-// horizontal sides, and the bottom side, in that order.
-//
-// With four arguments, the arguments are applied clockwise starting from the
-// top side, followed by the right side, then the bottom, and finally the left.
-//
-// With more than four arguments nothing will be set.
-func (s Style) BorderBackground(c ...TerminalColor) Style {
-	if len(c) == 0 {
-		return s
-	}
-
-	top, right, bottom, left, ok := whichSidesColor(c...)
-	if !ok {
-		return s
-	}
-
-	s.set(borderTopBackgroundKey, top)
-	s.set(borderRightBackgroundKey, right)
-	s.set(borderBottomBackgroundKey, bottom)
-	s.set(borderLeftBackgroundKey, left)
-
-	return s
-}
-
-// BorderTopBackground sets the background color of the top of the border.
-func (s Style) BorderTopBackground(c TerminalColor) Style {
-	s.set(borderTopBackgroundKey, c)
-	return s
-}
-
-// BorderRightBackground sets the background color of right side the border.
-func (s Style) BorderRightBackground(c TerminalColor) Style {
-	s.set(borderRightBackgroundKey, c)
-	return s
-}
-
-// BorderBottomBackground sets the background color of the bottom of the
-// border.
-func (s Style) BorderBottomBackground(c TerminalColor) Style {
-	s.set(borderBottomBackgroundKey, c)
-	return s
-}
-
-// BorderLeftBackground set the background color of the left side of the
-// border.
-func (s Style) BorderLeftBackground(c TerminalColor) Style {
-	s.set(borderLeftBackgroundKey, c)
-	return s
-}
-
-// Inline makes rendering output one line and disables the rendering of
-// margins, padding and borders. This is useful when you need a style to apply
-// only to font rendering and don't want it to change any physical dimensions.
-// It works well with Style.MaxWidth.
-//
-// Because this in intended to be used at the time of render, this method will
-// not mutate the style and instead return a copy.
-//
-// Example:
-//
-//	var userInput string = "..."
-//	var userStyle = text.Style{ /* ... */ }
-//	fmt.Println(userStyle.Inline(true).Render(userInput))
-func (s Style) Inline(v bool) Style {
-	o := s.Copy()
-	o.set(inlineKey, v)
-	return o
-}
-
-// MaxWidth applies a max width to a given style. This is useful in enforcing
-// a certain width at render time, particularly with arbitrary strings and
-// styles.
-//
-// Because this in intended to be used at the time of render, this method will
-// not mutate the style and instead return a copy.
-//
-// Example:
-//
-//	var userInput string = "..."
-//	var userStyle = text.Style{ /* ... */ }
-//	fmt.Println(userStyle.MaxWidth(16).Render(userInput))
-func (s Style) MaxWidth(n int) Style {
-	o := s.Copy()
-	o.set(maxWidthKey, n)
-	return o
-}
-
-// MaxHeight applies a max height to a given style. This is useful in enforcing
-// a certain height at render time, particularly with arbitrary strings and
-// styles.
-//
-// Because this in intended to be used at the time of render, this method will
-// not mutate the style and instead return a copy.
-func (s Style) MaxHeight(n int) Style {
-	o := s.Copy()
-	o.set(maxHeightKey, n)
-	return o
-}
-
-// UnderlineSpaces determines whether to underline spaces between words. By
-// default, this is true. Spaces can also be underlined without underlining the
-// text itself.
-func (s Style) UnderlineSpaces(v bool) Style {
-	s.set(underlineSpacesKey, v)
-	return s
-}
-
-// StrikethroughSpaces determines whether to apply strikethroughs to spaces
-// between words. By default, this is true. Spaces can also be struck without
-// underlining the text itself.
-func (s Style) StrikethroughSpaces(v bool) Style {
-	s.set(strikethroughSpacesKey, v)
-	return s
-}
-
-// Renderer sets the renderer for the style. This is useful for changing the
-// renderer for a style that is being used in a different context.
-func (s Style) Renderer(r *Renderer) Style {
-	s.r = r
-	return s
-}
-
-// whichSidesInt is a helper method for setting values on sides of a block based
-// on the number of arguments. It follows the CSS shorthand rules for blocks
-// like margin, padding. and borders. Here are how the rules work:
-//
-// 0 args:  do nothing
-// 1 arg:   all sides
-// 2 args:  top -> bottom
-// 3 args:  top -> horizontal -> bottom
-// 4 args:  top -> right -> bottom -> left
-// 5+ args: do nothing.
-func whichSidesInt(i ...int) (top, right, bottom, left int, ok bool) {
-	switch len(i) {
-	case 1:
-		top = i[0]
-		bottom = i[0]
-		left = i[0]
-		right = i[0]
-		ok = true
-	case 2:
-		top = i[0]
-		bottom = i[0]
-		left = i[1]
-		right = i[1]
-		ok = true
-	case 3:
-		top = i[0]
-		left = i[1]
-		right = i[1]
-		bottom = i[2]
-		ok = true
-	case 4:
-		top = i[0]
-		right = i[1]
-		bottom = i[2]
-		left = i[3]
-		ok = true
-	}
-	return top, right, bottom, left, ok
-}
-
-// whichSidesBool is like whichSidesInt, except it operates on a series of
-// boolean values. See the comment on whichSidesInt for details on how this
-// works.
-func whichSidesBool(i ...bool) (top, right, bottom, left bool, ok bool) {
-	switch len(i) {
-	case 1:
-		top = i[0]
-		bottom = i[0]
-		left = i[0]
-		right = i[0]
-		ok = true
-	case 2:
-		top = i[0]
-		bottom = i[0]
-		left = i[1]
-		right = i[1]
-		ok = true
-	case 3:
-		top = i[0]
-		left = i[1]
-		right = i[1]
-		bottom = i[2]
-		ok = true
-	case 4:
-		top = i[0]
-		right = i[1]
-		bottom = i[2]
-		left = i[3]
-		ok = true
-	}
-	return top, right, bottom, left, ok
-}
-
-// whichSidesColor is like whichSides, except it operates on a series of
-// boolean values. See the comment on whichSidesInt for details on how this
-// works.
-func whichSidesColor(i ...TerminalColor) (top, right, bottom, left TerminalColor, ok bool) {
-	switch len(i) {
-	case 1:
-		top = i[0]
-		bottom = i[0]
-		left = i[0]
-		right = i[0]
-		ok = true
-	case 2:
-		top = i[0]
-		bottom = i[0]
-		left = i[1]
-		right = i[1]
-		ok = true
-	case 3:
-		top = i[0]
-		left = i[1]
-		right = i[1]
-		bottom = i[2]
-		ok = true
-	case 4:
-		top = i[0]
-		right = i[1]
-		bottom = i[2]
-		left = i[3]
-		ok = true
-	}
-	return top, right, bottom, left, ok
-}

+ 0 - 41
vendor/github.com/charmbracelet/lipgloss/size.go

@@ -1,41 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-
-	"github.com/muesli/reflow/ansi"
-)
-
-// Width returns the cell width of characters in the string. ANSI sequences are
-// ignored and characters wider than one cell (such as Chinese characters and
-// emojis) are appropriately measured.
-//
-// You should use this instead of len(string) len([]rune(string) as neither
-// will give you accurate results.
-func Width(str string) (width int) {
-	for _, l := range strings.Split(str, "\n") {
-		w := ansi.PrintableRuneWidth(l)
-		if w > width {
-			width = w
-		}
-	}
-
-	return width
-}
-
-// Height returns height of a string in cells. This is done simply by
-// counting \n characters. If your strings use \r\n for newlines you should
-// convert them to \n first, or simply write a separate function for measuring
-// height.
-func Height(str string) int {
-	return strings.Count(str, "\n") + 1
-}
-
-// Size returns the width and height of the string in cells. ANSI sequences are
-// ignored and characters wider than one cell (such as Chinese characters and
-// emojis) are appropriately measured.
-func Size(str string) (width, height int) {
-	width = Width(str)
-	height = Height(str)
-	return width, height
-}

+ 0 - 497
vendor/github.com/charmbracelet/lipgloss/style.go

@@ -1,497 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-	"unicode"
-
-	"github.com/muesli/reflow/truncate"
-	"github.com/muesli/reflow/wordwrap"
-	"github.com/muesli/reflow/wrap"
-	"github.com/muesli/termenv"
-)
-
-// Property for a key.
-type propKey int
-
-// Available properties.
-const (
-	boldKey propKey = iota
-	italicKey
-	underlineKey
-	strikethroughKey
-	reverseKey
-	blinkKey
-	faintKey
-	foregroundKey
-	backgroundKey
-	widthKey
-	heightKey
-	alignHorizontalKey
-	alignVerticalKey
-
-	// Padding.
-	paddingTopKey
-	paddingRightKey
-	paddingBottomKey
-	paddingLeftKey
-
-	colorWhitespaceKey
-
-	// Margins.
-	marginTopKey
-	marginRightKey
-	marginBottomKey
-	marginLeftKey
-	marginBackgroundKey
-
-	// Border runes.
-	borderStyleKey
-
-	// Border edges.
-	borderTopKey
-	borderRightKey
-	borderBottomKey
-	borderLeftKey
-
-	// Border foreground colors.
-	borderTopForegroundKey
-	borderRightForegroundKey
-	borderBottomForegroundKey
-	borderLeftForegroundKey
-
-	// Border background colors.
-	borderTopBackgroundKey
-	borderRightBackgroundKey
-	borderBottomBackgroundKey
-	borderLeftBackgroundKey
-
-	inlineKey
-	maxWidthKey
-	maxHeightKey
-	underlineSpacesKey
-	strikethroughSpacesKey
-)
-
-// A set of properties.
-type rules map[propKey]interface{}
-
-// NewStyle returns a new, empty Style. While it's syntactic sugar for the
-// Style{} primitive, it's recommended to use this function for creating styles
-// in case the underlying implementation changes. It takes an optional string
-// value to be set as the underlying string value for this style.
-func NewStyle() Style {
-	return renderer.NewStyle()
-}
-
-// NewStyle returns a new, empty Style. While it's syntactic sugar for the
-// Style{} primitive, it's recommended to use this function for creating styles
-// in case the underlying implementation changes. It takes an optional string
-// value to be set as the underlying string value for this style.
-func (r *Renderer) NewStyle() Style {
-	s := Style{r: r}
-	return s
-}
-
-// Style contains a set of rules that comprise a style as a whole.
-type Style struct {
-	r     *Renderer
-	rules map[propKey]interface{}
-	value string
-}
-
-// joinString joins a list of strings into a single string separated with a
-// space.
-func joinString(strs ...string) string {
-	return strings.Join(strs, " ")
-}
-
-// SetString sets the underlying string value for this style. To render once
-// the underlying string is set, use the Style.String. This method is
-// a convenience for cases when having a stringer implementation is handy, such
-// as when using fmt.Sprintf. You can also simply define a style and render out
-// strings directly with Style.Render.
-func (s Style) SetString(strs ...string) Style {
-	s.value = joinString(strs...)
-	return s
-}
-
-// Value returns the raw, unformatted, underlying string value for this style.
-func (s Style) Value() string {
-	return s.value
-}
-
-// String implements stringer for a Style, returning the rendered result based
-// on the rules in this style. An underlying string value must be set with
-// Style.SetString prior to using this method.
-func (s Style) String() string {
-	return s.Render()
-}
-
-// Copy returns a copy of this style, including any underlying string values.
-func (s Style) Copy() Style {
-	o := NewStyle()
-	o.init()
-	for k, v := range s.rules {
-		o.rules[k] = v
-	}
-	o.r = s.r
-	o.value = s.value
-	return o
-}
-
-// Inherit overlays the style in the argument onto this style by copying each explicitly
-// set value from the argument style onto this style if it is not already explicitly set.
-// Existing set values are kept intact and not overwritten.
-//
-// Margins, padding, and underlying string values are not inherited.
-func (s Style) Inherit(i Style) Style {
-	s.init()
-
-	for k, v := range i.rules {
-		switch k {
-		case marginTopKey, marginRightKey, marginBottomKey, marginLeftKey:
-			// Margins are not inherited
-			continue
-		case paddingTopKey, paddingRightKey, paddingBottomKey, paddingLeftKey:
-			// Padding is not inherited
-			continue
-		case backgroundKey:
-			// The margins also inherit the background color
-			if !s.isSet(marginBackgroundKey) && !i.isSet(marginBackgroundKey) {
-				s.rules[marginBackgroundKey] = v
-			}
-		}
-
-		if _, exists := s.rules[k]; exists {
-			continue
-		}
-		s.rules[k] = v
-	}
-	return s
-}
-
-// Render applies the defined style formatting to a given string.
-func (s Style) Render(strs ...string) string {
-	if s.r == nil {
-		s.r = renderer
-	}
-	if s.value != "" {
-		strs = append([]string{s.value}, strs...)
-	}
-
-	var (
-		str = joinString(strs...)
-
-		te           = s.r.ColorProfile().String()
-		teSpace      = s.r.ColorProfile().String()
-		teWhitespace = s.r.ColorProfile().String()
-
-		bold          = s.getAsBool(boldKey, false)
-		italic        = s.getAsBool(italicKey, false)
-		underline     = s.getAsBool(underlineKey, false)
-		strikethrough = s.getAsBool(strikethroughKey, false)
-		reverse       = s.getAsBool(reverseKey, false)
-		blink         = s.getAsBool(blinkKey, false)
-		faint         = s.getAsBool(faintKey, false)
-
-		fg = s.getAsColor(foregroundKey)
-		bg = s.getAsColor(backgroundKey)
-
-		width           = s.getAsInt(widthKey)
-		height          = s.getAsInt(heightKey)
-		horizontalAlign = s.getAsPosition(alignHorizontalKey)
-		verticalAlign   = s.getAsPosition(alignVerticalKey)
-
-		topPadding    = s.getAsInt(paddingTopKey)
-		rightPadding  = s.getAsInt(paddingRightKey)
-		bottomPadding = s.getAsInt(paddingBottomKey)
-		leftPadding   = s.getAsInt(paddingLeftKey)
-
-		colorWhitespace = s.getAsBool(colorWhitespaceKey, true)
-		inline          = s.getAsBool(inlineKey, false)
-		maxWidth        = s.getAsInt(maxWidthKey)
-		maxHeight       = s.getAsInt(maxHeightKey)
-
-		underlineSpaces     = underline && s.getAsBool(underlineSpacesKey, true)
-		strikethroughSpaces = strikethrough && s.getAsBool(strikethroughSpacesKey, true)
-
-		// Do we need to style whitespace (padding and space outside
-		// paragraphs) separately?
-		styleWhitespace = reverse
-
-		// Do we need to style spaces separately?
-		useSpaceStyler = underlineSpaces || strikethroughSpaces
-	)
-
-	if len(s.rules) == 0 {
-		return str
-	}
-
-	// Enable support for ANSI on the legacy Windows cmd.exe console. This is a
-	// no-op on non-Windows systems and on Windows runs only once.
-	enableLegacyWindowsANSI()
-
-	if bold {
-		te = te.Bold()
-	}
-	if italic {
-		te = te.Italic()
-	}
-	if underline {
-		te = te.Underline()
-	}
-	if reverse {
-		if reverse {
-			teWhitespace = teWhitespace.Reverse()
-		}
-		te = te.Reverse()
-	}
-	if blink {
-		te = te.Blink()
-	}
-	if faint {
-		te = te.Faint()
-	}
-
-	if fg != noColor {
-		te = te.Foreground(fg.color(s.r))
-		if styleWhitespace {
-			teWhitespace = teWhitespace.Foreground(fg.color(s.r))
-		}
-		if useSpaceStyler {
-			teSpace = teSpace.Foreground(fg.color(s.r))
-		}
-	}
-
-	if bg != noColor {
-		te = te.Background(bg.color(s.r))
-		if colorWhitespace {
-			teWhitespace = teWhitespace.Background(bg.color(s.r))
-		}
-		if useSpaceStyler {
-			teSpace = teSpace.Background(bg.color(s.r))
-		}
-	}
-
-	if underline {
-		te = te.Underline()
-	}
-	if strikethrough {
-		te = te.CrossOut()
-	}
-
-	if underlineSpaces {
-		teSpace = teSpace.Underline()
-	}
-	if strikethroughSpaces {
-		teSpace = teSpace.CrossOut()
-	}
-
-	// Strip newlines in single line mode
-	if inline {
-		str = strings.ReplaceAll(str, "\n", "")
-	}
-
-	// Word wrap
-	if !inline && width > 0 {
-		wrapAt := width - leftPadding - rightPadding
-		str = wordwrap.String(str, wrapAt)
-		str = wrap.String(str, wrapAt) // force-wrap long strings
-	}
-
-	// Render core text
-	{
-		var b strings.Builder
-
-		l := strings.Split(str, "\n")
-		for i := range l {
-			if useSpaceStyler {
-				// Look for spaces and apply a different styler
-				for _, r := range l[i] {
-					if unicode.IsSpace(r) {
-						b.WriteString(teSpace.Styled(string(r)))
-						continue
-					}
-					b.WriteString(te.Styled(string(r)))
-				}
-			} else {
-				b.WriteString(te.Styled(l[i]))
-			}
-			if i != len(l)-1 {
-				b.WriteRune('\n')
-			}
-		}
-
-		str = b.String()
-	}
-
-	// Padding
-	if !inline {
-		if leftPadding > 0 {
-			var st *termenv.Style
-			if colorWhitespace || styleWhitespace {
-				st = &teWhitespace
-			}
-			str = padLeft(str, leftPadding, st)
-		}
-
-		if rightPadding > 0 {
-			var st *termenv.Style
-			if colorWhitespace || styleWhitespace {
-				st = &teWhitespace
-			}
-			str = padRight(str, rightPadding, st)
-		}
-
-		if topPadding > 0 {
-			str = strings.Repeat("\n", topPadding) + str
-		}
-
-		if bottomPadding > 0 {
-			str += strings.Repeat("\n", bottomPadding)
-		}
-	}
-
-	// Height
-	if height > 0 {
-		str = alignTextVertical(str, verticalAlign, height, nil)
-	}
-
-	// Set alignment. This will also pad short lines with spaces so that all
-	// lines are the same length, so we run it under a few different conditions
-	// beyond alignment.
-	{
-		numLines := strings.Count(str, "\n")
-
-		if !(numLines == 0 && width == 0) {
-			var st *termenv.Style
-			if colorWhitespace || styleWhitespace {
-				st = &teWhitespace
-			}
-			str = alignTextHorizontal(str, horizontalAlign, width, st)
-		}
-	}
-
-	if !inline {
-		str = s.applyBorder(str)
-		str = s.applyMargins(str, inline)
-	}
-
-	// Truncate according to MaxWidth
-	if maxWidth > 0 {
-		lines := strings.Split(str, "\n")
-
-		for i := range lines {
-			lines[i] = truncate.String(lines[i], uint(maxWidth))
-		}
-
-		str = strings.Join(lines, "\n")
-	}
-
-	// Truncate according to MaxHeight
-	if maxHeight > 0 {
-		lines := strings.Split(str, "\n")
-		str = strings.Join(lines[:min(maxHeight, len(lines))], "\n")
-	}
-
-	return str
-}
-
-func (s Style) applyMargins(str string, inline bool) string {
-	var (
-		topMargin    = s.getAsInt(marginTopKey)
-		rightMargin  = s.getAsInt(marginRightKey)
-		bottomMargin = s.getAsInt(marginBottomKey)
-		leftMargin   = s.getAsInt(marginLeftKey)
-
-		styler termenv.Style
-	)
-
-	bgc := s.getAsColor(marginBackgroundKey)
-	if bgc != noColor {
-		styler = styler.Background(bgc.color(s.r))
-	}
-
-	// Add left and right margin
-	str = padLeft(str, leftMargin, &styler)
-	str = padRight(str, rightMargin, &styler)
-
-	// Top/bottom margin
-	if !inline {
-		_, width := getLines(str)
-		spaces := strings.Repeat(" ", width)
-
-		if topMargin > 0 {
-			str = styler.Styled(strings.Repeat(spaces+"\n", topMargin)) + str
-		}
-		if bottomMargin > 0 {
-			str += styler.Styled(strings.Repeat("\n"+spaces, bottomMargin))
-		}
-	}
-
-	return str
-}
-
-// Apply left padding.
-func padLeft(str string, n int, style *termenv.Style) string {
-	if n == 0 {
-		return str
-	}
-
-	sp := strings.Repeat(" ", n)
-	if style != nil {
-		sp = style.Styled(sp)
-	}
-
-	b := strings.Builder{}
-	l := strings.Split(str, "\n")
-
-	for i := range l {
-		b.WriteString(sp)
-		b.WriteString(l[i])
-		if i != len(l)-1 {
-			b.WriteRune('\n')
-		}
-	}
-
-	return b.String()
-}
-
-// Apply right padding.
-func padRight(str string, n int, style *termenv.Style) string {
-	if n == 0 || str == "" {
-		return str
-	}
-
-	sp := strings.Repeat(" ", n)
-	if style != nil {
-		sp = style.Styled(sp)
-	}
-
-	b := strings.Builder{}
-	l := strings.Split(str, "\n")
-
-	for i := range l {
-		b.WriteString(l[i])
-		b.WriteString(sp)
-		if i != len(l)-1 {
-			b.WriteRune('\n')
-		}
-	}
-
-	return b.String()
-}
-
-func max(a, b int) int {
-	if a > b {
-		return a
-	}
-	return b
-}
-
-func min(a, b int) int {
-	if a < b {
-		return a
-	}
-	return b
-}

+ 0 - 306
vendor/github.com/charmbracelet/lipgloss/unset.go

@@ -1,306 +0,0 @@
-package lipgloss
-
-// UnsetBold removes the bold style rule, if set.
-func (s Style) UnsetBold() Style {
-	delete(s.rules, boldKey)
-	return s
-}
-
-// UnsetItalic removes the italic style rule, if set.
-func (s Style) UnsetItalic() Style {
-	delete(s.rules, italicKey)
-	return s
-}
-
-// UnsetUnderline removes the underline style rule, if set.
-func (s Style) UnsetUnderline() Style {
-	delete(s.rules, underlineKey)
-	return s
-}
-
-// UnsetStrikethrough removes the strikethrough style rule, if set.
-func (s Style) UnsetStrikethrough() Style {
-	delete(s.rules, strikethroughKey)
-	return s
-}
-
-// UnsetReverse removes the reverse style rule, if set.
-func (s Style) UnsetReverse() Style {
-	delete(s.rules, reverseKey)
-	return s
-}
-
-// UnsetBlink removes the bold style rule, if set.
-func (s Style) UnsetBlink() Style {
-	delete(s.rules, blinkKey)
-	return s
-}
-
-// UnsetFaint removes the faint style rule, if set.
-func (s Style) UnsetFaint() Style {
-	delete(s.rules, faintKey)
-	return s
-}
-
-// UnsetForeground removes the foreground style rule, if set.
-func (s Style) UnsetForeground() Style {
-	delete(s.rules, foregroundKey)
-	return s
-}
-
-// UnsetBackground removes the background style rule, if set.
-func (s Style) UnsetBackground() Style {
-	delete(s.rules, backgroundKey)
-	return s
-}
-
-// UnsetWidth removes the width style rule, if set.
-func (s Style) UnsetWidth() Style {
-	delete(s.rules, widthKey)
-	return s
-}
-
-// UnsetHeight removes the height style rule, if set.
-func (s Style) UnsetHeight() Style {
-	delete(s.rules, heightKey)
-	return s
-}
-
-// UnsetAlign removes the horizontal and vertical text alignment style rule, if set.
-func (s Style) UnsetAlign() Style {
-	delete(s.rules, alignHorizontalKey)
-	delete(s.rules, alignVerticalKey)
-	return s
-}
-
-// UnsetAlignHorizontal removes the horizontal text alignment style rule, if set.
-func (s Style) UnsetAlignHorizontal() Style {
-	delete(s.rules, alignHorizontalKey)
-	return s
-}
-
-// UnsetAlignVertical removes the vertical text alignment style rule, if set.
-func (s Style) UnsetAlignVertical() Style {
-	delete(s.rules, alignVerticalKey)
-	return s
-}
-
-// UnsetPadding removes all padding style rules.
-func (s Style) UnsetPadding() Style {
-	delete(s.rules, paddingLeftKey)
-	delete(s.rules, paddingRightKey)
-	delete(s.rules, paddingTopKey)
-	delete(s.rules, paddingBottomKey)
-	return s
-}
-
-// UnsetPaddingLeft removes the left padding style rule, if set.
-func (s Style) UnsetPaddingLeft() Style {
-	delete(s.rules, paddingLeftKey)
-	return s
-}
-
-// UnsetPaddingRight removes the right padding style rule, if set.
-func (s Style) UnsetPaddingRight() Style {
-	delete(s.rules, paddingRightKey)
-	return s
-}
-
-// UnsetPaddingTop removes the top padding style rule, if set.
-func (s Style) UnsetPaddingTop() Style {
-	delete(s.rules, paddingTopKey)
-	return s
-}
-
-// UnsetPaddingBottom removes the bottom style rule, if set.
-func (s Style) UnsetPaddingBottom() Style {
-	delete(s.rules, paddingBottomKey)
-	return s
-}
-
-// UnsetColorWhitespace removes the rule for coloring padding, if set.
-func (s Style) UnsetColorWhitespace() Style {
-	delete(s.rules, colorWhitespaceKey)
-	return s
-}
-
-// UnsetMargins removes all margin style rules.
-func (s Style) UnsetMargins() Style {
-	delete(s.rules, marginLeftKey)
-	delete(s.rules, marginRightKey)
-	delete(s.rules, marginTopKey)
-	delete(s.rules, marginBottomKey)
-	return s
-}
-
-// UnsetMarginLeft removes the left margin style rule, if set.
-func (s Style) UnsetMarginLeft() Style {
-	delete(s.rules, marginLeftKey)
-	return s
-}
-
-// UnsetMarginRight removes the right margin style rule, if set.
-func (s Style) UnsetMarginRight() Style {
-	delete(s.rules, marginRightKey)
-	return s
-}
-
-// UnsetMarginTop removes the top margin style rule, if set.
-func (s Style) UnsetMarginTop() Style {
-	delete(s.rules, marginTopKey)
-	return s
-}
-
-// UnsetMarginBottom removes the bottom margin style rule, if set.
-func (s Style) UnsetMarginBottom() Style {
-	delete(s.rules, marginBottomKey)
-	return s
-}
-
-// UnsetMarginBackground removes the margin's background color. Note that the
-// margin's background color can be set from the background color of another
-// style during inheritance.
-func (s Style) UnsetMarginBackground() Style {
-	delete(s.rules, marginBackgroundKey)
-	return s
-}
-
-// UnsetBorderStyle removes the border style rule, if set.
-func (s Style) UnsetBorderStyle() Style {
-	delete(s.rules, borderStyleKey)
-	return s
-}
-
-// UnsetBorderTop removes the border top style rule, if set.
-func (s Style) UnsetBorderTop() Style {
-	delete(s.rules, borderTopKey)
-	return s
-}
-
-// UnsetBorderRight removes the border right style rule, if set.
-func (s Style) UnsetBorderRight() Style {
-	delete(s.rules, borderRightKey)
-	return s
-}
-
-// UnsetBorderBottom removes the border bottom style rule, if set.
-func (s Style) UnsetBorderBottom() Style {
-	delete(s.rules, borderBottomKey)
-	return s
-}
-
-// UnsetBorderLeft removes the border left style rule, if set.
-func (s Style) UnsetBorderLeft() Style {
-	delete(s.rules, borderLeftKey)
-	return s
-}
-
-// UnsetBorderForeground removes all border foreground color styles, if set.
-func (s Style) UnsetBorderForeground() Style {
-	delete(s.rules, borderTopForegroundKey)
-	delete(s.rules, borderRightForegroundKey)
-	delete(s.rules, borderBottomForegroundKey)
-	delete(s.rules, borderLeftForegroundKey)
-	return s
-}
-
-// UnsetBorderTopForeground removes the top border foreground color rule,
-// if set.
-func (s Style) UnsetBorderTopForeground() Style {
-	delete(s.rules, borderTopForegroundKey)
-	return s
-}
-
-// UnsetBorderRightForeground removes the right border foreground color rule,
-// if set.
-func (s Style) UnsetBorderRightForeground() Style {
-	delete(s.rules, borderRightForegroundKey)
-	return s
-}
-
-// UnsetBorderBottomForeground removes the bottom border foreground color
-// rule, if set.
-func (s Style) UnsetBorderBottomForeground() Style {
-	delete(s.rules, borderBottomForegroundKey)
-	return s
-}
-
-// UnsetBorderLeftForeground removes the left border foreground color rule,
-// if set.
-func (s Style) UnsetBorderLeftForeground() Style {
-	delete(s.rules, borderLeftForegroundKey)
-	return s
-}
-
-// UnsetBorderBackground removes all border background color styles, if
-// set.
-func (s Style) UnsetBorderBackground() Style {
-	delete(s.rules, borderTopBackgroundKey)
-	delete(s.rules, borderRightBackgroundKey)
-	delete(s.rules, borderBottomBackgroundKey)
-	delete(s.rules, borderLeftBackgroundKey)
-	return s
-}
-
-// UnsetBorderTopBackgroundColor removes the top border background color rule,
-// if set.
-func (s Style) UnsetBorderTopBackgroundColor() Style {
-	delete(s.rules, borderTopBackgroundKey)
-	return s
-}
-
-// UnsetBorderRightBackground removes the right border background color
-// rule, if set.
-func (s Style) UnsetBorderRightBackground() Style {
-	delete(s.rules, borderRightBackgroundKey)
-	return s
-}
-
-// UnsetBorderBottomBackground removes the bottom border background color
-// rule, if set.
-func (s Style) UnsetBorderBottomBackground() Style {
-	delete(s.rules, borderBottomBackgroundKey)
-	return s
-}
-
-// UnsetBorderLeftBackground removes the left border color rule, if set.
-func (s Style) UnsetBorderLeftBackground() Style {
-	delete(s.rules, borderLeftBackgroundKey)
-	return s
-}
-
-// UnsetInline removes the inline style rule, if set.
-func (s Style) UnsetInline() Style {
-	delete(s.rules, inlineKey)
-	return s
-}
-
-// UnsetMaxWidth removes the max width style rule, if set.
-func (s Style) UnsetMaxWidth() Style {
-	delete(s.rules, maxWidthKey)
-	return s
-}
-
-// UnsetMaxHeight removes the max height style rule, if set.
-func (s Style) UnsetMaxHeight() Style {
-	delete(s.rules, maxHeightKey)
-	return s
-}
-
-// UnsetUnderlineSpaces removes the value set by UnderlineSpaces.
-func (s Style) UnsetUnderlineSpaces() Style {
-	delete(s.rules, underlineSpacesKey)
-	return s
-}
-
-// UnsetStrikethroughSpaces removes the value set by StrikethroughSpaces.
-func (s Style) UnsetStrikethroughSpaces() Style {
-	delete(s.rules, strikethroughSpacesKey)
-	return s
-}
-
-// UnsetString sets the underlying string value to the empty string.
-func (s Style) UnsetString() Style {
-	s.value = ""
-	return s
-}

+ 0 - 83
vendor/github.com/charmbracelet/lipgloss/whitespace.go

@@ -1,83 +0,0 @@
-package lipgloss
-
-import (
-	"strings"
-
-	"github.com/muesli/reflow/ansi"
-	"github.com/muesli/termenv"
-)
-
-// whitespace is a whitespace renderer.
-type whitespace struct {
-	re    *Renderer
-	style termenv.Style
-	chars string
-}
-
-// newWhitespace creates a new whitespace renderer. The order of the options
-// matters, it you'r using WithWhitespaceRenderer, make sure it comes first as
-// other options might depend on it.
-func newWhitespace(r *Renderer, opts ...WhitespaceOption) *whitespace {
-	w := &whitespace{
-		re:    r,
-		style: r.ColorProfile().String(),
-	}
-	for _, opt := range opts {
-		opt(w)
-	}
-	return w
-}
-
-// Render whitespaces.
-func (w whitespace) render(width int) string {
-	if w.chars == "" {
-		w.chars = " "
-	}
-
-	r := []rune(w.chars)
-	j := 0
-	b := strings.Builder{}
-
-	// Cycle through runes and print them into the whitespace.
-	for i := 0; i < width; {
-		b.WriteRune(r[j])
-		j++
-		if j >= len(r) {
-			j = 0
-		}
-		i += ansi.PrintableRuneWidth(string(r[j]))
-	}
-
-	// Fill any extra gaps white spaces. This might be necessary if any runes
-	// are more than one cell wide, which could leave a one-rune gap.
-	short := width - ansi.PrintableRuneWidth(b.String())
-	if short > 0 {
-		b.WriteString(strings.Repeat(" ", short))
-	}
-
-	return w.style.Styled(b.String())
-}
-
-// WhitespaceOption sets a styling rule for rendering whitespace.
-type WhitespaceOption func(*whitespace)
-
-// WithWhitespaceForeground sets the color of the characters in the whitespace.
-func WithWhitespaceForeground(c TerminalColor) WhitespaceOption {
-	return func(w *whitespace) {
-		w.style = w.style.Foreground(c.color(w.re))
-	}
-}
-
-// WithWhitespaceBackground sets the background color of the whitespace.
-func WithWhitespaceBackground(c TerminalColor) WhitespaceOption {
-	return func(w *whitespace) {
-		w.style = w.style.Background(c.color(w.re))
-	}
-}
-
-// WithWhitespaceChars sets the characters to be rendered in the whitespace.
-func WithWhitespaceChars(s string) WhitespaceOption {
-	return func(w *whitespace) {
-		w.chars = s
-	}
-}

+ 0 - 167
vendor/github.com/muesli/reflow/wordwrap/wordwrap.go

@@ -1,167 +0,0 @@
-package wordwrap
-
-import (
-	"bytes"
-	"strings"
-	"unicode"
-
-	"github.com/muesli/reflow/ansi"
-)
-
-var (
-	defaultBreakpoints = []rune{'-'}
-	defaultNewline     = []rune{'\n'}
-)
-
-// WordWrap contains settings and state for customisable text reflowing with
-// support for ANSI escape sequences. This means you can style your terminal
-// output without affecting the word wrapping algorithm.
-type WordWrap struct {
-	Limit        int
-	Breakpoints  []rune
-	Newline      []rune
-	KeepNewlines bool
-
-	buf   bytes.Buffer
-	space bytes.Buffer
-	word  ansi.Buffer
-
-	lineLen int
-	ansi    bool
-}
-
-// NewWriter returns a new instance of a word-wrapping writer, initialized with
-// default settings.
-func NewWriter(limit int) *WordWrap {
-	return &WordWrap{
-		Limit:        limit,
-		Breakpoints:  defaultBreakpoints,
-		Newline:      defaultNewline,
-		KeepNewlines: true,
-	}
-}
-
-// Bytes is shorthand for declaring a new default WordWrap instance,
-// used to immediately word-wrap a byte slice.
-func Bytes(b []byte, limit int) []byte {
-	f := NewWriter(limit)
-	_, _ = f.Write(b)
-	_ = f.Close()
-
-	return f.Bytes()
-}
-
-// String is shorthand for declaring a new default WordWrap instance,
-// used to immediately word-wrap a string.
-func String(s string, limit int) string {
-	return string(Bytes([]byte(s), limit))
-}
-
-func (w *WordWrap) addSpace() {
-	w.lineLen += w.space.Len()
-	_, _ = w.buf.Write(w.space.Bytes())
-	w.space.Reset()
-}
-
-func (w *WordWrap) addWord() {
-	if w.word.Len() > 0 {
-		w.addSpace()
-		w.lineLen += w.word.PrintableRuneWidth()
-		_, _ = w.buf.Write(w.word.Bytes())
-		w.word.Reset()
-	}
-}
-
-func (w *WordWrap) addNewLine() {
-	_, _ = w.buf.WriteRune('\n')
-	w.lineLen = 0
-	w.space.Reset()
-}
-
-func inGroup(a []rune, c rune) bool {
-	for _, v := range a {
-		if v == c {
-			return true
-		}
-	}
-	return false
-}
-
-// Write is used to write more content to the word-wrap buffer.
-func (w *WordWrap) Write(b []byte) (int, error) {
-	if w.Limit == 0 {
-		return w.buf.Write(b)
-	}
-
-	s := string(b)
-	if !w.KeepNewlines {
-		s = strings.Replace(strings.TrimSpace(s), "\n", " ", -1)
-	}
-
-	for _, c := range s {
-		if c == '\x1B' {
-			// ANSI escape sequence
-			_, _ = w.word.WriteRune(c)
-			w.ansi = true
-		} else if w.ansi {
-			_, _ = w.word.WriteRune(c)
-			if (c >= 0x40 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a) {
-				// ANSI sequence terminated
-				w.ansi = false
-			}
-		} else if inGroup(w.Newline, c) {
-			// end of current line
-			// see if we can add the content of the space buffer to the current line
-			if w.word.Len() == 0 {
-				if w.lineLen+w.space.Len() > w.Limit {
-					w.lineLen = 0
-				} else {
-					// preserve whitespace
-					_, _ = w.buf.Write(w.space.Bytes())
-				}
-				w.space.Reset()
-			}
-
-			w.addWord()
-			w.addNewLine()
-		} else if unicode.IsSpace(c) {
-			// end of current word
-			w.addWord()
-			_, _ = w.space.WriteRune(c)
-		} else if inGroup(w.Breakpoints, c) {
-			// valid breakpoint
-			w.addSpace()
-			w.addWord()
-			_, _ = w.buf.WriteRune(c)
-		} else {
-			// any other character
-			_, _ = w.word.WriteRune(c)
-
-			// add a line break if the current word would exceed the line's
-			// character limit
-			if w.lineLen+w.space.Len()+w.word.PrintableRuneWidth() > w.Limit &&
-				w.word.PrintableRuneWidth() < w.Limit {
-				w.addNewLine()
-			}
-		}
-	}
-
-	return len(b), nil
-}
-
-// Close will finish the word-wrap operation. Always call it before trying to
-// retrieve the final result.
-func (w *WordWrap) Close() error {
-	w.addWord()
-	return nil
-}
-
-// Bytes returns the word-wrapped result as a byte slice.
-func (w *WordWrap) Bytes() []byte {
-	return w.buf.Bytes()
-}
-
-// String returns the word-wrapped result as a string.
-func (w *WordWrap) String() string {
-	return w.buf.String()
-}

+ 0 - 134
vendor/github.com/muesli/reflow/wrap/wrap.go

@@ -1,134 +0,0 @@
-package wrap
-
-import (
-	"bytes"
-	"strings"
-	"unicode"
-
-	"github.com/mattn/go-runewidth"
-	"github.com/muesli/reflow/ansi"
-)
-
-var (
-	defaultNewline  = []rune{'\n'}
-	defaultTabWidth = 4
-)
-
-type Wrap struct {
-	Limit         int
-	Newline       []rune
-	KeepNewlines  bool
-	PreserveSpace bool
-	TabWidth      int
-
-	buf             *bytes.Buffer
-	lineLen         int
-	ansi            bool
-	forcefulNewline bool
-}
-
-// NewWriter returns a new instance of a wrapping writer, initialized with
-// default settings.
-func NewWriter(limit int) *Wrap {
-	return &Wrap{
-		Limit:        limit,
-		Newline:      defaultNewline,
-		KeepNewlines: true,
-		// Keep whitespaces following a forceful line break. If disabled,
-		// leading whitespaces in a line are only kept if the line break
-		// was not forceful, meaning a line break that was already present
-		// in the input
-		PreserveSpace: false,
-		TabWidth:      defaultTabWidth,
-
-		buf: &bytes.Buffer{},
-	}
-}
-
-// Bytes is shorthand for declaring a new default Wrap instance,
-// used to immediately wrap a byte slice.
-func Bytes(b []byte, limit int) []byte {
-	f := NewWriter(limit)
-	_, _ = f.Write(b)
-
-	return f.buf.Bytes()
-}
-
-func (w *Wrap) addNewLine() {
-	_, _ = w.buf.WriteRune('\n')
-	w.lineLen = 0
-}
-
-// String is shorthand for declaring a new default Wrap instance,
-// used to immediately wrap a string.
-func String(s string, limit int) string {
-	return string(Bytes([]byte(s), limit))
-}
-
-func (w *Wrap) Write(b []byte) (int, error) {
-	s := strings.Replace(string(b), "\t", strings.Repeat(" ", w.TabWidth), -1)
-	if !w.KeepNewlines {
-		s = strings.Replace(s, "\n", "", -1)
-	}
-
-	width := ansi.PrintableRuneWidth(s)
-
-	if w.Limit <= 0 || w.lineLen+width <= w.Limit {
-		w.lineLen += width
-		return w.buf.Write(b)
-	}
-
-	for _, c := range s {
-		if c == ansi.Marker {
-			w.ansi = true
-		} else if w.ansi {
-			if ansi.IsTerminator(c) {
-				w.ansi = false
-			}
-		} else if inGroup(w.Newline, c) {
-			w.addNewLine()
-			w.forcefulNewline = false
-			continue
-		} else {
-			width := runewidth.RuneWidth(c)
-
-			if w.lineLen+width > w.Limit {
-				w.addNewLine()
-				w.forcefulNewline = true
-			}
-
-			if w.lineLen == 0 {
-				if w.forcefulNewline && !w.PreserveSpace && unicode.IsSpace(c) {
-					continue
-				}
-			} else {
-				w.forcefulNewline = false
-			}
-
-			w.lineLen += width
-		}
-
-		_, _ = w.buf.WriteRune(c)
-	}
-
-	return len(b), nil
-}
-
-// Bytes returns the wrapped result as a byte slice.
-func (w *Wrap) Bytes() []byte {
-	return w.buf.Bytes()
-}
-
-// String returns the wrapped result as a string.
-func (w *Wrap) String() string {
-	return w.buf.String()
-}
-
-func inGroup(a []rune, c rune) bool {
-	for _, v := range a {
-		if v == c {
-			return true
-		}
-	}
-	return false
-}

+ 5 - 3
vendor/github.com/sirupsen/logrus/README.md

@@ -9,7 +9,7 @@ the last thing you want from your Logging library (again...).
 
 This does not mean Logrus is dead. Logrus will continue to be maintained for
 security, (backwards compatible) bug fixes, and performance (where we are
-limited by the interface). 
+limited by the interface).
 
 I believe Logrus' biggest contribution is to have played a part in today's
 widespread use of structured logging in Golang. There doesn't seem to be a
@@ -43,7 +43,7 @@ plain text):
 With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash
 or Splunk:
 
-```json
+```text
 {"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
 ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
 
@@ -99,7 +99,7 @@ time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcr
 ```
 Note that this does add measurable overhead - the cost will depend on the version of Go, but is
 between 20 and 40% in recent tests with 1.6 and 1.7.  You can validate this in your
-environment via benchmarks: 
+environment via benchmarks:
 ```
 go test -bench=.*CallerTracing
 ```
@@ -317,6 +317,8 @@ log.SetLevel(log.InfoLevel)
 It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
 environment if your application has that.
 
+Note: If you want different log levels for global (`log.SetLevel(...)`) and syslog logging, please check the [syslog hook README](hooks/syslog/README.md#different-log-levels-for-local-and-remote-logging).
+
 #### Entries
 
 Besides the fields added with `WithField` or `WithFields` some fields are

+ 3 - 17
vendor/modules.txt

@@ -1,21 +1,9 @@
-# github.com/atotto/clipboard v0.1.4
-## explicit
-github.com/atotto/clipboard
 # github.com/aymanbagabas/go-osc52/v2 v2.0.1
 ## explicit; go 1.16
 github.com/aymanbagabas/go-osc52/v2
-# github.com/charmbracelet/bubbles v0.15.0
-## explicit; go 1.13
-github.com/charmbracelet/bubbles/cursor
-github.com/charmbracelet/bubbles/key
-github.com/charmbracelet/bubbles/runeutil
-github.com/charmbracelet/bubbles/textinput
-# github.com/charmbracelet/bubbletea v0.24.0
+# github.com/charmbracelet/bubbletea v0.24.1
 ## explicit; go 1.17
 github.com/charmbracelet/bubbletea
-# github.com/charmbracelet/lipgloss v0.7.1
-## explicit; go 1.17
-github.com/charmbracelet/lipgloss
 # github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81
 ## explicit; go 1.13
 github.com/containerd/console
@@ -25,7 +13,7 @@ github.com/golang/snappy
 # github.com/lucasb-eyer/go-colorful v1.2.0
 ## explicit; go 1.12
 github.com/lucasb-eyer/go-colorful
-# github.com/mattn/go-isatty v0.0.18
+# github.com/mattn/go-isatty v0.0.19
 ## explicit; go 1.15
 github.com/mattn/go-isatty
 # github.com/mattn/go-localereader v0.0.1
@@ -45,15 +33,13 @@ github.com/muesli/cancelreader
 ## explicit; go 1.13
 github.com/muesli/reflow/ansi
 github.com/muesli/reflow/truncate
-github.com/muesli/reflow/wordwrap
-github.com/muesli/reflow/wrap
 # github.com/muesli/termenv v0.15.1
 ## explicit; go 1.17
 github.com/muesli/termenv
 # github.com/rivo/uniseg v0.4.4
 ## explicit; go 1.18
 github.com/rivo/uniseg
-# github.com/sirupsen/logrus v1.9.0
+# github.com/sirupsen/logrus v1.9.2
 ## explicit; go 1.13
 github.com/sirupsen/logrus
 # github.com/stretchr/testify v1.7.1