packages feed

brick 0.68 → 0.68.1

raw patch · 4 files changed

+18/−13 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Brick.BorderMap: eBottomL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.BorderMap: eBottomL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.BorderMap: eLeftL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.BorderMap: eLeftL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.BorderMap: eRightL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.BorderMap: eRightL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.BorderMap: eTopL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.BorderMap: eTopL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.Types: availHeightL :: forall n_awxa. Lens' (Context n_awxa) Int
+ Brick.Types: availHeightL :: forall n_awxV. Lens' (Context n_awxV) Int
- Brick.Types: availWidthL :: forall n_awxa. Lens' (Context n_awxa) Int
+ Brick.Types: availWidthL :: forall n_awxV. Lens' (Context n_awxV) Int
- Brick.Types: bordersL :: forall n_awxe. Lens' (Result n_awxe) (BorderMap DynBorder)
+ Brick.Types: bordersL :: forall n_awxZ. Lens' (Result n_awxZ) (BorderMap DynBorder)
- Brick.Types: ctxAttrMapL :: forall n_awxa. Lens' (Context n_awxa) AttrMap
+ Brick.Types: ctxAttrMapL :: forall n_awxV. Lens' (Context n_awxV) AttrMap
- Brick.Types: ctxAttrNameL :: forall n_awxa. Lens' (Context n_awxa) AttrName
+ Brick.Types: ctxAttrNameL :: forall n_awxV. Lens' (Context n_awxV) AttrName
- Brick.Types: ctxBorderStyleL :: forall n_awxa. Lens' (Context n_awxa) BorderStyle
+ Brick.Types: ctxBorderStyleL :: forall n_awxV. Lens' (Context n_awxV) BorderStyle
- Brick.Types: ctxDynBordersL :: forall n_awxa. Lens' (Context n_awxa) Bool
+ Brick.Types: ctxDynBordersL :: forall n_awxV. Lens' (Context n_awxV) Bool
- Brick.Types: ctxHScrollBarOrientationL :: forall n_awxa. Lens' (Context n_awxa) (Maybe HScrollBarOrientation)
+ Brick.Types: ctxHScrollBarOrientationL :: forall n_awxV. Lens' (Context n_awxV) (Maybe HScrollBarOrientation)
- Brick.Types: ctxHScrollBarRendererL :: forall n_awxa. Lens' (Context n_awxa) (Maybe (ScrollbarRenderer n_awxa))
+ Brick.Types: ctxHScrollBarRendererL :: forall n_awxV. Lens' (Context n_awxV) (Maybe (ScrollbarRenderer n_awxV))
- Brick.Types: ctxVScrollBarOrientationL :: forall n_awxa. Lens' (Context n_awxa) (Maybe VScrollBarOrientation)
+ Brick.Types: ctxVScrollBarOrientationL :: forall n_awxV. Lens' (Context n_awxV) (Maybe VScrollBarOrientation)
- Brick.Types: ctxVScrollBarRendererL :: forall n_awxa. Lens' (Context n_awxa) (Maybe (ScrollbarRenderer n_awxa))
+ Brick.Types: ctxVScrollBarRendererL :: forall n_awxV. Lens' (Context n_awxV) (Maybe (ScrollbarRenderer n_awxV))
- Brick.Types: cursorLocationL :: forall n_awxf. Lens' (CursorLocation n_awxf) Location
+ Brick.Types: cursorLocationL :: forall n_awy0. Lens' (CursorLocation n_awy0) Location
- Brick.Types: cursorLocationNameL :: forall n_awxf n_ayFi. Lens (CursorLocation n_awxf) (CursorLocation n_ayFi) (Maybe n_awxf) (Maybe n_ayFi)
+ Brick.Types: cursorLocationNameL :: forall n_awy0 n_ayG3. Lens (CursorLocation n_awy0) (CursorLocation n_ayG3) (Maybe n_awy0) (Maybe n_ayG3)
- Brick.Types: cursorsL :: forall n_awxe. Lens' (Result n_awxe) [CursorLocation n_awxe]
+ Brick.Types: cursorsL :: forall n_awxZ. Lens' (Result n_awxZ) [CursorLocation n_awxZ]
- Brick.Types: eBottomL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.Types: eBottomL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.Types: eLeftL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.Types: eLeftL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.Types: eRightL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.Types: eRightL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.Types: eTopL :: forall a_acHl. Lens' (Edges a_acHl) a_acHl
+ Brick.Types: eTopL :: forall a_acIa. Lens' (Edges a_acIa) a_acIa
- Brick.Types: extentsL :: forall n_awxe. Lens' (Result n_awxe) [Extent n_awxe]
+ Brick.Types: extentsL :: forall n_awxZ. Lens' (Result n_awxZ) [Extent n_awxZ]
- Brick.Types: imageL :: forall n_awxe. Lens' (Result n_awxe) Image
+ Brick.Types: imageL :: forall n_awxZ. Lens' (Result n_awxZ) Image
- Brick.Types: visibilityRequestsL :: forall n_awxe. Lens' (Result n_awxe) [VisibilityRequest]
+ Brick.Types: visibilityRequestsL :: forall n_awxZ. Lens' (Result n_awxZ) [VisibilityRequest]
- Brick.Types: windowHeightL :: forall n_awxa. Lens' (Context n_awxa) Int
+ Brick.Types: windowHeightL :: forall n_awxV. Lens' (Context n_awxV) Int
- Brick.Types: windowWidthL :: forall n_awxa. Lens' (Context n_awxa) Int
+ Brick.Types: windowWidthL :: forall n_awxV. Lens' (Context n_awxV) Int
- Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1eOX a_a1ePB. Lens (Dialog a_a1eOX) (Dialog a_a1ePB) [(String, a_a1eOX)] [(String, a_a1ePB)]
+ Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1eOw a_a1ePa. Lens (Dialog a_a1eOw) (Dialog a_a1ePa) [(String, a_a1eOw)] [(String, a_a1ePa)]
- Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1eOX. Lens' (Dialog a_a1eOX) (Maybe Int)
+ Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1eOw. Lens' (Dialog a_a1eOw) (Maybe Int)
- Brick.Widgets.Dialog: dialogTitleL :: forall a_a1eOX. Lens' (Dialog a_a1eOX) (Maybe String)
+ Brick.Widgets.Dialog: dialogTitleL :: forall a_a1eOw. Lens' (Dialog a_a1eOw) (Maybe String)
- Brick.Widgets.Dialog: dialogWidthL :: forall a_a1eOX. Lens' (Dialog a_a1eOX) Int
+ Brick.Widgets.Dialog: dialogWidthL :: forall a_a1eOw. Lens' (Dialog a_a1eOw) Int
- Brick.Widgets.Edit: editContentsL :: forall t_a195u n_a195v t_a1969. Lens (Editor t_a195u n_a195v) (Editor t_a1969 n_a195v) (TextZipper t_a195u) (TextZipper t_a1969)
+ Brick.Widgets.Edit: editContentsL :: forall t_a194P n_a194Q t_a195u. Lens (Editor t_a194P n_a194Q) (Editor t_a195u n_a194Q) (TextZipper t_a194P) (TextZipper t_a195u)
- Brick.Widgets.FileBrowser: fileBrowserEntriesG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) (List n_a1p9v FileInfo)
+ Brick.Widgets.FileBrowser: fileBrowserEntriesG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) (List n_a1p94 FileInfo)
- Brick.Widgets.FileBrowser: fileBrowserEntryFilterG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) (Maybe (FileInfo -> Bool))
+ Brick.Widgets.FileBrowser: fileBrowserEntryFilterG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) (Maybe (FileInfo -> Bool))
- Brick.Widgets.FileBrowser: fileBrowserExceptionG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) (Maybe IOException)
+ Brick.Widgets.FileBrowser: fileBrowserExceptionG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) (Maybe IOException)
- Brick.Widgets.FileBrowser: fileBrowserLatestResultsG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) [FileInfo]
+ Brick.Widgets.FileBrowser: fileBrowserLatestResultsG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) [FileInfo]
- Brick.Widgets.FileBrowser: fileBrowserNameG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) n_a1p9v
+ Brick.Widgets.FileBrowser: fileBrowserNameG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) n_a1p94
- Brick.Widgets.FileBrowser: fileBrowserSearchStringG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) (Maybe Text)
+ Brick.Widgets.FileBrowser: fileBrowserSearchStringG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) (Maybe Text)
- Brick.Widgets.FileBrowser: fileBrowserSelectableG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) (FileInfo -> Bool)
+ Brick.Widgets.FileBrowser: fileBrowserSelectableG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) (FileInfo -> Bool)
- Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1p9v. Lens' (FileBrowser n_a1p9v) (FileInfo -> Bool)
+ Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1p94. Lens' (FileBrowser n_a1p94) (FileInfo -> Bool)
- Brick.Widgets.FileBrowser: fileBrowserSelectedFilesG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) (Set String)
+ Brick.Widgets.FileBrowser: fileBrowserSelectedFilesG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) (Set String)
- Brick.Widgets.FileBrowser: fileBrowserWorkingDirectoryG :: forall n_a1p9v. SimpleGetter (FileBrowser n_a1p9v) FilePath
+ Brick.Widgets.FileBrowser: fileBrowserWorkingDirectoryG :: forall n_a1p94. SimpleGetter (FileBrowser n_a1p94) FilePath
- Brick.Widgets.List: listElementsL :: forall n_a1jXD t_a1jXE e_a1jXF t_a1kbJ e_a1kbK. Lens (GenericList n_a1jXD t_a1jXE e_a1jXF) (GenericList n_a1jXD t_a1kbJ e_a1kbK) (t_a1jXE e_a1jXF) (t_a1kbJ e_a1kbK)
+ Brick.Widgets.List: listElementsL :: forall n_a1jXc t_a1jXd e_a1jXe t_a1kbi e_a1kbj. Lens (GenericList n_a1jXc t_a1jXd e_a1jXe) (GenericList n_a1jXc t_a1kbi e_a1kbj) (t_a1jXd e_a1jXe) (t_a1kbi e_a1kbj)
- Brick.Widgets.List: listItemHeightL :: forall n_a1jXD t_a1jXE e_a1jXF. Lens' (GenericList n_a1jXD t_a1jXE e_a1jXF) Int
+ Brick.Widgets.List: listItemHeightL :: forall n_a1jXc t_a1jXd e_a1jXe. Lens' (GenericList n_a1jXc t_a1jXd e_a1jXe) Int
- Brick.Widgets.List: listNameL :: forall n_a1jXD t_a1jXE e_a1jXF n_a1kbL. Lens (GenericList n_a1jXD t_a1jXE e_a1jXF) (GenericList n_a1kbL t_a1jXE e_a1jXF) n_a1jXD n_a1kbL
+ Brick.Widgets.List: listNameL :: forall n_a1jXc t_a1jXd e_a1jXe n_a1kbk. Lens (GenericList n_a1jXc t_a1jXd e_a1jXe) (GenericList n_a1kbk t_a1jXd e_a1jXe) n_a1jXc n_a1kbk
- Brick.Widgets.List: listSelectedL :: forall n_a1jXD t_a1jXE e_a1jXF. Lens' (GenericList n_a1jXD t_a1jXE e_a1jXF) (Maybe Int)
+ Brick.Widgets.List: listSelectedL :: forall n_a1jXc t_a1jXd e_a1jXe. Lens' (GenericList n_a1jXc t_a1jXd e_a1jXe) (Maybe Int)

Files

CHANGELOG.md view
@@ -2,6 +2,14 @@ Brick changelog --------------- +0.68.1+------++Bug fixes:+ * Brick's internal book-keeping got a bug fix that caused mouse-click+   coordinates to be wrong for clickable regions that were translated+   partially off of the left or top edges of a rendered region.+ 0.68 ---- 
README.md view
@@ -82,6 +82,7 @@ | [`hledger-ui`](https://github.com/simonmichael/hledger) | A terminal UI for the hledger accounting system. | | [`hledger-iadd`](http://github.com/rootzlevel/hledger-iadd) | An interactive terminal UI for adding hledger journal entries | | [`wordle`](https://github.com/ivanjermakov/wordle) | An implementation of the Wordle game |+| [`kpxhs`](https://github.com/akazukin5151/kpxhs) | An interactive [Keepass](https://github.com/keepassxreboot/keepassxc/) database viewer |  These third-party packages also extend `brick`: 
brick.cabal view
@@ -1,5 +1,5 @@ name:                brick-version:             0.68+version:             0.68.1 synopsis:            A declarative terminal user interface library description:   Write terminal user interfaces (TUIs) painlessly with 'brick'! You
src/Brick/Widgets/Internal.hs view
@@ -99,25 +99,21 @@         --         -- If its entirety is outside the context region, it is dropped.         ---        -- Otherwise its size and upper left corner are adjusted so that-        -- they are contained within the context region.+        -- Otherwise its size is adjusted so that it is contained within+        -- the context region.         cropExtent (Extent n (Location (c, r)) (w, h)) =-            -- First, clamp the upper-left corner to at least (0, 0).-            let c' = max c 0-                r' = max r 0-                -- Then, determine the new lower-right corner based on-                -- the clamped corner.-                endCol = c' + w-                endRow = r' + h+            -- Determine the new lower-right corner+            let endCol = c + w+                endRow = r + h                 -- Then clamp the lower-right corner based on the                 -- context                 endCol' = min (ctx^.availWidthL) endCol                 endRow' = min (ctx^.availHeightL) endRow                 -- Then compute the new width and height from the                 -- clamped lower-right corner.-                w' = endCol' - c'-                h' = endRow' - r'-                e = Extent n (Location (c', r')) (w', h')+                w' = endCol' - c+                h' = endRow' - r+                e = Extent n (Location (c, r)) (w', h')             in if w' < 0 || h' < 0                then Nothing                else Just e