packages feed

brick 0.62 → 0.63

raw patch · 6 files changed

+17/−3 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Brick.Types: [_vpContentSize] :: Viewport -> DisplayRegion
+ Brick.Types: vpContentSize :: Lens' Viewport DisplayRegion
- Brick.BorderMap: eBottomL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.BorderMap: eBottomL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.BorderMap: eLeftL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.BorderMap: eLeftL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.BorderMap: eRightL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.BorderMap: eRightL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.BorderMap: eTopL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.BorderMap: eTopL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.Types: VP :: Int -> Int -> DisplayRegion -> Viewport
+ Brick.Types: VP :: Int -> Int -> DisplayRegion -> DisplayRegion -> Viewport
- Brick.Types: bordersL :: forall n_axVH. Lens' (Result n_axVH) (BorderMap DynBorder)
+ Brick.Types: bordersL :: forall n_axXs. Lens' (Result n_axXs) (BorderMap DynBorder)
- Brick.Types: cursorLocationL :: forall n_awIf. Lens' (CursorLocation n_awIf) Location
+ Brick.Types: cursorLocationL :: forall n_awIU. Lens' (CursorLocation n_awIU) Location
- Brick.Types: cursorLocationNameL :: forall n_awIf n_ayzf. Lens (CursorLocation n_awIf) (CursorLocation n_ayzf) (Maybe n_awIf) (Maybe n_ayzf)
+ Brick.Types: cursorLocationNameL :: forall n_awIU n_ayB0. Lens (CursorLocation n_awIU) (CursorLocation n_ayB0) (Maybe n_awIU) (Maybe n_ayB0)
- Brick.Types: cursorsL :: forall n_axVH. Lens' (Result n_axVH) [CursorLocation n_axVH]
+ Brick.Types: cursorsL :: forall n_axXs. Lens' (Result n_axXs) [CursorLocation n_axXs]
- Brick.Types: eBottomL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.Types: eBottomL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.Types: eLeftL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.Types: eLeftL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.Types: eRightL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.Types: eRightL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.Types: eTopL :: forall a_acVj. Lens' (Edges a_acVj) a_acVj
+ Brick.Types: eTopL :: forall a_acVX. Lens' (Edges a_acVX) a_acVX
- Brick.Types: extentsL :: forall n_axVH. Lens' (Result n_axVH) [Extent n_axVH]
+ Brick.Types: extentsL :: forall n_axXs. Lens' (Result n_axXs) [Extent n_axXs]
- Brick.Types: imageL :: forall n_axVH. Lens' (Result n_axVH) Image
+ Brick.Types: imageL :: forall n_axXs. Lens' (Result n_axXs) Image
- Brick.Types: visibilityRequestsL :: forall n_axVH. Lens' (Result n_axVH) [VisibilityRequest]
+ Brick.Types: visibilityRequestsL :: forall n_axXs. Lens' (Result n_axXs) [VisibilityRequest]
- Brick.Widgets.Dialog: dialogButtonsL :: forall a_a19Cy a_a19Dc. Lens (Dialog a_a19Cy) (Dialog a_a19Dc) [(String, a_a19Cy)] [(String, a_a19Dc)]
+ Brick.Widgets.Dialog: dialogButtonsL :: forall a_a19Tc a_a19TQ. Lens (Dialog a_a19Tc) (Dialog a_a19TQ) [(String, a_a19Tc)] [(String, a_a19TQ)]
- Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a19Cy. Lens' (Dialog a_a19Cy) (Maybe Int)
+ Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a19Tc. Lens' (Dialog a_a19Tc) (Maybe Int)
- Brick.Widgets.Dialog: dialogTitleL :: forall a_a19Cy. Lens' (Dialog a_a19Cy) (Maybe String)
+ Brick.Widgets.Dialog: dialogTitleL :: forall a_a19Tc. Lens' (Dialog a_a19Tc) (Maybe String)
- Brick.Widgets.Dialog: dialogWidthL :: forall a_a19Cy. Lens' (Dialog a_a19Cy) Int
+ Brick.Widgets.Dialog: dialogWidthL :: forall a_a19Tc. Lens' (Dialog a_a19Tc) Int
- Brick.Widgets.Edit: editContentsL :: forall t_a1489 n_a148a t_a148O. Lens (Editor t_a1489 n_a148a) (Editor t_a148O n_a148a) (TextZipper t_a1489) (TextZipper t_a148O)
+ Brick.Widgets.Edit: editContentsL :: forall t_a14oN n_a14oO t_a14ps. Lens (Editor t_a14oN n_a14oO) (Editor t_a14ps n_a14oO) (TextZipper t_a14oN) (TextZipper t_a14ps)
- Brick.Widgets.FileBrowser: fileBrowserEntryFilterL :: forall n_a1jJp. Lens' (FileBrowser n_a1jJp) (Maybe (FileInfo -> Bool))
+ Brick.Widgets.FileBrowser: fileBrowserEntryFilterL :: forall n_a1k03. Lens' (FileBrowser n_a1k03) (Maybe (FileInfo -> Bool))
- Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1jJp. Lens' (FileBrowser n_a1jJp) (FileInfo -> Bool)
+ Brick.Widgets.FileBrowser: fileBrowserSelectableL :: forall n_a1k03. Lens' (FileBrowser n_a1k03) (FileInfo -> Bool)
- Brick.Widgets.List: listElementsL :: forall n_a1eyP t_a1eyQ e_a1eyR t_a1eMW e_a1eMX. Lens (GenericList n_a1eyP t_a1eyQ e_a1eyR) (GenericList n_a1eyP t_a1eMW e_a1eMX) (t_a1eyQ e_a1eyR) (t_a1eMW e_a1eMX)
+ Brick.Widgets.List: listElementsL :: forall n_a1ePt t_a1ePu e_a1ePv t_a1f3A e_a1f3B. Lens (GenericList n_a1ePt t_a1ePu e_a1ePv) (GenericList n_a1ePt t_a1f3A e_a1f3B) (t_a1ePu e_a1ePv) (t_a1f3A e_a1f3B)
- Brick.Widgets.List: listItemHeightL :: forall n_a1eyP t_a1eyQ e_a1eyR. Lens' (GenericList n_a1eyP t_a1eyQ e_a1eyR) Int
+ Brick.Widgets.List: listItemHeightL :: forall n_a1ePt t_a1ePu e_a1ePv. Lens' (GenericList n_a1ePt t_a1ePu e_a1ePv) Int
- Brick.Widgets.List: listNameL :: forall n_a1eyP t_a1eyQ e_a1eyR n_a1eMY. Lens (GenericList n_a1eyP t_a1eyQ e_a1eyR) (GenericList n_a1eMY t_a1eyQ e_a1eyR) n_a1eyP n_a1eMY
+ Brick.Widgets.List: listNameL :: forall n_a1ePt t_a1ePu e_a1ePv n_a1f3C. Lens (GenericList n_a1ePt t_a1ePu e_a1ePv) (GenericList n_a1f3C t_a1ePu e_a1ePv) n_a1ePt n_a1f3C
- Brick.Widgets.List: listSelectedL :: forall n_a1eyP t_a1eyQ e_a1eyR. Lens' (GenericList n_a1eyP t_a1eyQ e_a1eyR) (Maybe Int)
+ Brick.Widgets.List: listSelectedL :: forall n_a1ePt t_a1ePu e_a1ePv. Lens' (GenericList n_a1ePt t_a1ePu e_a1ePv) (Maybe Int)

Files

CHANGELOG.md view
@@ -2,6 +2,14 @@ Brick changelog --------------- +0.63+----++API changes:+ * The `Viewport` type got a new field, `_vpContentSize` (and a+   corresponding lens `vpContentSize`) to get the size of the viewport's+   contents.+ 0.62 ---- 
README.md view
@@ -75,6 +75,7 @@ | [`maze`](https://github.com/benjaminselfridge/maze) | A Brick-based maze game | | [`pboy`](https://github.com/2mol/pboy) | A tiny PDF organizer | | [`hyahtzee2`](https://github.com/DamienCassou/hyahtzee2#readme) | Famous Yahtzee dice game |+| [`brewsage`](https://github.com/gerdreiss/brewsage#readme) | A TUI for Homebrew |  These third-party packages also extend `brick`: 
brick.cabal view
@@ -1,5 +1,5 @@ name:                brick-version:             0.62+version:             0.63 synopsis:            A declarative terminal user interface library description:   Write terminal user interfaces (TUIs) painlessly with 'brick'! You
src/Brick/Types.hs view
@@ -21,6 +21,7 @@   , vpSize   , vpTop   , vpLeft+  , vpContentSize    -- * Event-handling types   , EventM(..)
src/Brick/Types/Internal.hs view
@@ -42,6 +42,7 @@   , vpSize   , vpLeft   , vpTop+  , vpContentSize   , imageL   , cursorsL   , extentsL@@ -97,6 +98,8 @@        -- ^ The row offset of the top of the viewport.        , _vpSize :: DisplayRegion        -- ^ The size of the viewport.+       , _vpContentSize :: DisplayRegion+       -- ^ The size of the contents of the viewport.        }        deriving (Show, Read, Generic, NFData) 
src/Brick/Widgets/Core.hs view
@@ -1102,7 +1102,7 @@        -- Update the viewport size.       c <- getContext-      let newVp = VP 0 0 newSize+      let newVp = VP 0 0 newSize (0, 0)           newSize = (c^.availWidthL, c^.availHeightL)           doInsert (Just vp) = Just $ vp & vpSize .~ newSize           doInsert Nothing = Just newVp@@ -1178,7 +1178,8 @@           fixLeft v = if V.imageWidth img < v^.vpSize._1                    then v & vpLeft .~ 0                    else v-          updateVp = case typ of+          updateContentSize v = v & vpContentSize .~ (V.imageWidth img, V.imageHeight img)+          updateVp = updateContentSize . case typ of               Both -> fixLeft . fixTop               Horizontal -> fixLeft               Vertical -> fixTop