Commit Graph
595 Commits
Author SHA1 Message Date
Ayman Bagabas 9ce937da3b chore: revert: v2-real-textarea 2025-01-22 16:08:38 -05:00
Ayman Bagabas b19b908da7 chore: revert "wip"
This reverts commit d020289a27, reversing
changes made to c288adf7ab.
2025-01-22 15:48:48 -05:00
Christian Rocha 6abd576e36 chore(merge): branch 'v2-exp' into v2-area 2025-01-22 09:11:21 -05:00
Carlos Alexandro Becker 0c83e6f4c8 chore(deps): update
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-01-15 12:25:09 -03:00
Carlos Alexandro Becker fbe642df17 chore(deps): update 2025-01-14 15:34:37 -03:00
Carlos Alexandro Becker 3487634e4d chore(deps): update ansi
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2025-01-14 14:26:31 -03:00
Carlos Alexandro Becker f28e78e6ab Merge remote-tracking branch 'origin/master' into v2-exp 2025-01-14 14:22:36 -03:00
2d53a618a9 feat(viewport): horizontal scroll (#240)
* 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

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
2025-01-10 08:38:48 -03:00
2e3a42396e chore(progress)!: migrate progress to lipgloss (#676)
* chore(progress)!: migrate progress to lipgloss

This removes the dependency on termenv and replaces it with lipgloss. This
change also removes the WithColorProfile option, as it is no longer needed.
The new API uses `color.Color` types for colors, which are more flexible and
allow for more advanced color manipulation.

* Update progress/progress_test.go

Co-authored-by: Christian Rocha <christian@rocha.is>

* Update progress/progress_test.go

Co-authored-by: Christian Rocha <christian@rocha.is>

* chore: go mod tidy

---------

Co-authored-by: Christian Rocha <christian@rocha.is>
2024-12-12 10:51:23 -05:00
8624776d45 fix(textinput): slicing outside cap (#532)
* textinput: fix slicing outside cap

* textinput: add test that makes slicing outside cap occur

* chore: tidy with gofmt

---------

Co-authored-by: bashbunni <bunni@bashbunni.dev>
2024-12-05 13:40:33 -08:00
Ayman Bagabas d020289a27 wip 2024-11-26 15:00:40 -05:00
Carlos Alexandro BeckerandChristian Rocha c288adf7ab fix: fmt 2024-11-26 14:17:28 -05:00
Ayman BagabasandChristian Rocha afbb7bc049 feat(textarea): add SetOffset and CursorPosition methods 2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha 4c214e0848 feat: formatter 2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha 56f7197cd3 fix: move to last line on accept 2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha 4755f88132 fix: comp 2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha ca9cbbc99e wip
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha 8789a984d8 wip
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha 2ec013be27 wip
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-26 14:17:28 -05:00
Carlos Alexandro BeckerandChristian Rocha 7073d1abc8 wip: area
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-26 14:17:28 -05:00
Ayman Bagabas eb9b6c5a06 chore: merge branch 'v2-exp' into v2-real-textarea 2024-11-26 14:13:07 -05:00
Ayman Bagabas bd415b4eba chore: update dependencies and fix colors 2024-11-21 12:20:47 -05:00
Carlos Alexandro BeckerandGitHub e5296a2b0f ci: fix goreleaser config (#668)
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2024-11-15 19:00:41 -03:00
Christian Rocha 0a6b6e6fd7 chore(merge): branch 'master' into v2-exp 2024-11-15 08:38:55 -05:00
Christian Rocha 398e92c5ae fix: remove default character limit 2024-11-15 08:30:03 -05:00
Christian Rocha f439d83043 fix(textarea): max height should not determine max lines
Fixes #671.
2024-11-15 08:30:03 -05:00
Ayman Bagabas 804c370801 fix(textarea): respect double-width characters in real cursor position 2024-11-13 13:28:48 -05:00
Ayman Bagabas c350e79209 fix(textarea): reset real cursor position on Reset 2024-11-13 13:13:55 -05:00
Ayman Bagabas 8c3085a6cd feat(textarea): use a real cursor position
This sets the real cursor to its correct position when the cursor is moved.
2024-11-13 13:09:40 -05:00
Ayman Bagabas 0719711142 chore: merge branch 'master' into v2-exp v2.0.0-alpha.2 2024-11-12 17:05:54 -05:00
Ayman Bagabas aa74e9fb07 chore: update dependencies to use v2-alpha.2 2024-11-12 17:05:10 -05:00
Ayman Bagabas cc009fb401 chore: merge branch 'master' into v2-exp 2024-11-12 17:04:33 -05:00
Ayman Bagabas 812f74ffff chore: remove unused YPosition field from viewport.Model 2024-11-06 18:26:15 -05:00
Christian Rocha 730f5a29e2 fix: debounce stopwatch and timer
This keeps them from ticking too fast.

Fixes #661.
2024-11-05 22:06:53 -05:00
Christian Rocha fc0fa7807e feat(textarea): add helpers for default light and dark styles 2024-11-05 21:38:29 -05:00
Christian Rocha 148439f15d feat(help): expose function for choosing light or dark styles 2024-11-05 13:46:33 -05:00
aymanbagabasandChristian Rocha 20a65e5655 chore(ci): sync golangci-lint config 2024-11-04 09:07:12 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
db3514caa7 feat(deps): bump github.com/charmbracelet/lipgloss from 0.13.1 to 1.0.0 (#655)
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.13.1 to 1.0.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/v0.13.1...v1.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-01 15:07:07 -03:00
Christian Rocha cc9a727028 fix(timer): restore 1s default interval 2024-10-31 15:58:35 -04:00
Christian Rocha 591dfd528e chore(textinput): use a getter and setter for width 2024-10-31 15:02:05 -04:00
Christian Rocha 52bd03ed5b feat!(viewport): use getters and setters for width and height 2024-10-31 15:02:05 -04:00
Christian Rocha 3b879e7694 feat!(viewport): width and height are now optional args in New() 2024-10-31 15:02:05 -04:00
Christian Rocha 241db06b4a feat!(paginator): DefaultKeyMap is now a func instead of a global 2024-10-31 15:02:05 -04:00
Christian Rocha 4b0f9c8282 feat!(progress): width now uses getters and setters 2024-10-31 15:02:05 -04:00
Christian Rocha e8ba813a88 feat!(filepicker): use getters and setters for height 2024-10-31 15:02:05 -04:00
Christian Rocha 6415ecbfef feat!(stopwatch): add WithInterval(duration) option, drop NewWithInterval()
This also adds an Option type for arguments to New()
2024-10-31 15:02:05 -04:00
Christian Rocha 4ce3faadcf feat!(textarea): DefaultKeyMap is now a func instead of a global 2024-10-31 15:02:05 -04:00
Christian Rocha 73fe314cc6 feat!(textinput): DefaultKeyMap is now a function; was formerly a global 2024-10-31 15:02:05 -04:00
Christian Rocha c560f6a021 feat!(timer): add WithInterval(duration) option, drop NewWithInterval()
This also adds an Option type for arguments to New()
2024-10-31 15:02:05 -04:00
Ayman Bagabas db64e3cd78 feat: update lipgloss to v2 2024-10-29 15:54:24 -04:00