Commit Graph
644 Commits
Author SHA1 Message Date
Carlos Alexandro Becker 4286c736cd Merge remote-tracking branch 'origin/master' into v2-exp
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-03-27 16:17:34 -03:00
Carlos Alexandro BeckerandGitHub 39668ec629 fix(viewport): normalize method names (#763)
* Reapply "fix(viewport): normalize method names"

This reverts commit f2434c374b.

* test: fixes

* fix: lint

* fix: disable horizontal scroll on v1

it might be a breaking change.

let's enable it by default on v2, and remove the deprecated methods as
well.

cc/ @meowgorithm

* fix: simplify
2025-03-27 16:11:34 -03:00
Carlos Alexandro Becker f2434c374b Revert "fix(viewport): normalize method names"
This reverts commit c7f889e364.

accidental push to master
2025-03-26 17:07:26 -03:00
Carlos Alexandro Becker c7f889e364 fix(viewport): normalize method names 2025-03-26 17:07:04 -03:00
Ayman Bagabas 601039139c test(table): update golden files for alignment tests v2.0.0-beta.1 2025-03-26 21:53:03 +03:00
Ayman Bagabas 4d1c64f836 chore: upgrade to beta.1 of lipgloss and bubbletea 2025-03-26 21:52:49 +03:00
Ayman BagabasandGitHub c860c661e1 Merge pull request #756 from charmbracelet/v2-exp-update
feat(v2): merge master into v2-exp
2025-03-26 21:19:59 +03:00
Ayman BagabasandGitHub 88ad104822 Merge branch 'v2-exp' into v2-exp-update 2025-03-26 21:16:48 +03:00
Ayman Bagabas d179ef712d chore: upgrade dependencies and go.mod 2025-03-26 21:15:16 +03:00
Carlos Alexandro Becker acc929c43e fix: lint
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-03-25 13:42:02 -03:00
Carlos Alexandro Becker d5bc1ac332 Merge remote-tracking branch 'origin/master' into v2-exp-update
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-03-25 11:31:38 -03:00
bashbunniandGitHub 9e5365e0ec docs: add example for ValidateFunc (#705)
* docs(textinput): add ValidateFunc example

* chore: remove print statement

* chore: rename the -> this anonymous func
2025-03-25 10:51:14 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c814ac75c3 chore(deps): bump github.com/charmbracelet/lipgloss from 1.0.0 to 1.1.0 (#751)
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Changelog](https://github.com/charmbracelet/lipgloss/blob/master/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/lipgloss/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/lipgloss
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 10:42:23 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3befcccf87 chore(deps): bump github.com/muesli/termenv from 0.15.2 to 0.16.0 (#740)
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.15.2 to 0.16.0.
- [Release notes](https://github.com/muesli/termenv/releases)
- [Commits](https://github.com/muesli/termenv/compare/v0.15.2...v0.16.0)

---
updated-dependencies:
- dependency-name: github.com/muesli/termenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 10:42:12 -03:00
Carlos Alexandro BeckerandGitHub 0305695768 ci: test on oldstable and stable go versions, automerge dependabot (#755) 2025-03-25 10:41:59 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4e8b6b2043 chore(deps): bump github.com/charmbracelet/bubbletea from 1.1.2 to 1.3.4 (#745)
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 1.1.2 to 1.3.4.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Changelog](https://github.com/charmbracelet/bubbletea/blob/main/.goreleaser.yml)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v1.1.2...v1.3.4)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 10:25:04 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
43aa82c87e feat(deps): bump github.com/charmbracelet/x/ansi (#716)
Bumps [github.com/charmbracelet/x/ansi](https://github.com/charmbracelet/x) from 0.6.1-0.20250107110353-48b574af22a5 to 0.8.0.
- [Release notes](https://github.com/charmbracelet/x/releases)
- [Commits](https://github.com/charmbracelet/x/commits/ansi/v0.8.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/x/ansi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 10:24:46 -03:00
d58217bded ci: sync golangci-lint config (#750)
Co-authored-by: aymanbagabas <3187948+aymanbagabas@users.noreply.github.com>
2025-03-25 10:24:22 -03:00
Carlos Alexandro Becker d91c9aa894 ci: rm .golangci-soft.yml 2025-03-25 10:23:38 -03:00
Carlos Alexandro BeckerandGitHub 54f28b6501 fix(filepicker): properly scrolling filepicker (#753)
* fix(filepicker): properly scrolling filepicker

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: SetHeight

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-03-20 14:00:29 -03:00
Andrey Nering fff86382cc chore(lint): remove custom min and max functions
These are now available as builtins.
2025-03-20 10:42:52 -03:00
Andrey Nering 76433f7143 ci: fix linting on windows 2025-03-20 10:42:52 -03:00
Andrey Nering 976d9a1108 chore(go.mod): update to go 1.23 2025-03-20 10:42:52 -03:00
Andrey Nering 06824cb77d chore: add taskfile 2025-03-20 10:42:52 -03:00
Carlos Alexandro Becker bd20b89a3e fix(viewport): remove LineNumbersGutter
closes #738
2025-03-18 10:22:16 -03:00
Carlos Alexandro Becker 71493456d9 Merge remote-tracking branch 'origin/master' into v2-exp 2025-03-13 16:55:11 -03:00
Ayman Bagabas 59511a71e0 fix(textinput): account for width when calculating cursor position 2025-03-10 15:18:55 -04:00
Ayman Bagabas 6af59e6ea4 fix(textarea): cursor position calculation 2025-03-10 15:12:52 -04:00
Michał KotowskiandChristian Rocha cdc743f1f4 chore(links): switch bubbletea links to use main
Cosmetic change.

Old links used `master` as the main branch. Resulting in GitHub
redirecting to the correct default branch and displaying:

> Branch not found, redirected to default branch.

Signed-off-by: Michał Kotowski <dev@mkotowski.dev>
2025-03-05 06:57:17 -05:00
Christian Rocha 739fec5f64 chore(input,textarea): return nil for cursors when using virtual cursors 2025-03-01 10:10:36 -05:00
CharmandGitHub 7a6b190840 ci: sync dependabot config (#736) 2025-02-13 11:29:08 -03:00
CharmandGitHub 2f4944346f ci: sync dependabot config (#734) 2025-02-13 10:58:35 -03:00
Carlos Alexandro BeckerandGitHub 4491afa808 feat(viewport): SetLines (#728) 2025-02-11 14:07:51 -03:00
Carlos Alexandro BeckerandGitHub c20ae83e2f fix: lint issues (#730) 2025-02-10 16:00:55 -03:00
Andrey Nering c5b76847ca chore(go.mod): update github.com/charmbracelet/x/exp/golden 2025-02-07 13:13:47 -03:00
Carlos Alexandro BeckerandGitHub 605d06c42b feat: real cursor in textinput (#727) 2025-02-07 10:48:26 -03:00
Carlos Alexandro BeckerandGitHub 64c16e990e feat(v2)!: update to go 1.22 (#724)
* feat(v2)!: update to go 1.22

* fix: ci

* fix: more
2025-02-05 10:00:01 -03:00
Ayman Bagabas a7783a1a58 chore: go mod tidy 2025-02-04 14:45:04 -05:00
Ayman BagabasandGitHub 3961136a13 fix(viewport): handle nil LeftGutterFunc (#723)
Since LeftGutterFunc is public, it can be nil if viewport is
instantiated without using `viewport.New()`. This commit adds nil
checks to handle this case.
2025-02-04 16:26:33 -03:00
Ayman Bagabas 3b1b9248be fix(table): crlf on windows 2025-02-04 13:27:29 -05:00
Ayman Bagabas 061e464a70 refactor!: restore bubbletea model interface 2025-02-04 13:01:13 -05:00
edbb81c136 feat(viewport)!: gutter column, soft wrap, search highlight (#697)
* horizontal scroll

* rebase branch

* add tests

* add tests with 2 cells symbols

* trimLeft, move to charmbracelete/x/ansi lib

* up ansi package

* Update viewport/viewport.go

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: do not navigate out to the right

* fix: cache line width on setcontent

* fix tests

* fix viewport tests

* add test for preventing right overscroll

* chore(viewport): increase horizontal step to 6

* chore(viewport): make horizontal scroll API better match vertical scroll API

* fix: nolint

* fix: use ansi.Cut

* perf: do not cut anything if not needed

* feat: expose HorizontalScrollPercent

* fix: do not scroll if width is 0

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: visible lines take frame into account

* feat(viewport): column sign

* feat: gutter, soft wrap

* wip: search

* wip: search

* wip: search

* fix: perf

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: rename

* wip

* wip

* refactor: viewport highlight ranges

* fix: ligloss update

* doc: godoc

* feat: fill height optional

* fix: handle no content

* fix: empty lines

* wip

* wip

* Revert "wip"

This reverts commit 933f181e88405c21d65a08b816a88030806ca03e.

* Reapply "wip"

This reverts commit 0e3e31b70f53d93250a1474547cc5157d50e9237.

* fix: wide

* fix: wide, find

* still not quite there

* fix: grapheme width

* fix: cleanups

* fix: refactors, improves highlight visibility

* docs: godoc

* chore: lipgloss update

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: x/ansi update

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: typos, godocs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: rename

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: typo

* fix: scroll when soft-wrapping

* fix: soft wrap adjustments

* fix: update

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: deps

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Roman Suvorov <suvorov83@gmail.com>
Co-authored-by: Roman Suvorov <tty2.rs@gmail.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2025-02-04 13:15:40 -03:00
Christian Rocha b2e3cc5371 chore(textarea): account for margins and padding in cursor offsets 2025-01-31 16:21:17 -05:00
Christian Rocha 841c9ce98c chore(textarea): comments and cleanup 2025-01-31 16:21:17 -05:00
Christian Rocha 2824966855 feat(textarea): auto-calculate inner X/Y cursor offset 2025-01-31 16:21:17 -05:00
Christian Rocha 78262b85c3 chore(textarea): make placeholder rendering more readable 2025-01-31 16:21:17 -05:00
Christian Rocha a6b8a4559c chore(textarea): consolidate prompt rendering in a method 2025-01-31 16:21:17 -05:00
Christian Rocha 63fb8c67e7 fix(textarea): don't hardcode line number gutter width 2025-01-31 16:21:17 -05:00
Christian Rocha de97754f09 fix(textarea): infer if we should use focused or blurred styles 2025-01-31 16:21:17 -05:00
Christian Rocha 24016e6ce4 chore(textarea): consolidate line number rendering into a method 2025-01-31 16:21:17 -05:00