packages feed

brick 0.29 → 0.29.1

raw patch · 4 files changed

+15/−7 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Brick.Types: cursorLocationL :: forall n_aCI3. Lens' (CursorLocation n_aCI3) Location
+ Brick.Types: cursorLocationL :: forall n_aCKm. Lens' (CursorLocation n_aCKm) Location
- Brick.Types: cursorLocationNameL :: forall n_aCI3 n_aD57. Lens (CursorLocation n_aCI3) (CursorLocation n_aD57) (Maybe n_aCI3) (Maybe n_aD57)
+ Brick.Types: cursorLocationNameL :: forall n_aCKm n_aD7K. Lens (CursorLocation n_aCKm) (CursorLocation n_aD7K) (Maybe n_aCKm) (Maybe n_aD7K)
- Brick.Types: cursorsL :: forall n_aCI2. Lens' (Result n_aCI2) [CursorLocation n_aCI2]
+ Brick.Types: cursorsL :: forall n_aCKl. Lens' (Result n_aCKl) [CursorLocation n_aCKl]
- Brick.Types: extentsL :: forall n_aCI2. Lens' (Result n_aCI2) [Extent n_aCI2]
+ Brick.Types: extentsL :: forall n_aCKl. Lens' (Result n_aCKl) [Extent n_aCKl]
- Brick.Types: imageL :: forall n_aCI2. Lens' (Result n_aCI2) Image
+ Brick.Types: imageL :: forall n_aCKl. Lens' (Result n_aCKl) Image
- Brick.Types: visibilityRequestsL :: forall n_aCI2. Lens' (Result n_aCI2) [VisibilityRequest]
+ Brick.Types: visibilityRequestsL :: forall n_aCKl. Lens' (Result n_aCKl) [VisibilityRequest]
- Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1i0I a_a1i1i. Lens (Dialog a_a1i0I) (Dialog a_a1i1i) [(String, a_a1i0I)] [(String, a_a1i1i)]
+ Brick.Widgets.Dialog: dialogButtonsL :: forall a_a1hBV a_a1hCv. Lens (Dialog a_a1hBV) (Dialog a_a1hCv) [(String, a_a1hBV)] [(String, a_a1hCv)]
- Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1i0I. Lens' (Dialog a_a1i0I) (Maybe Int)
+ Brick.Widgets.Dialog: dialogSelectedIndexL :: forall a_a1hBV. Lens' (Dialog a_a1hBV) (Maybe Int)
- Brick.Widgets.Dialog: dialogTitleL :: forall a_a1i0I. Lens' (Dialog a_a1i0I) (Maybe String)
+ Brick.Widgets.Dialog: dialogTitleL :: forall a_a1hBV. Lens' (Dialog a_a1hBV) (Maybe String)
- Brick.Widgets.Dialog: dialogWidthL :: forall a_a1i0I. Lens' (Dialog a_a1i0I) Int
+ Brick.Widgets.Dialog: dialogWidthL :: forall a_a1hBV. Lens' (Dialog a_a1hBV) Int
- Brick.Widgets.Edit: editContentsL :: forall t_a1jLA n_a1jLB t_a1jMc. Lens (Editor t_a1jLA n_a1jLB) (Editor t_a1jMc n_a1jLB) (TextZipper t_a1jLA) (TextZipper t_a1jMc)
+ Brick.Widgets.Edit: editContentsL :: forall t_a1jmN n_a1jmO t_a1jnp. Lens (Editor t_a1jmN n_a1jmO) (Editor t_a1jnp n_a1jmO) (TextZipper t_a1jmN) (TextZipper t_a1jnp)
- Brick.Widgets.List: listElementsL :: forall n_a1lE8 e_a1lE9 e_a1lO4. Lens (List n_a1lE8 e_a1lE9) (List n_a1lE8 e_a1lO4) (Vector e_a1lE9) (Vector e_a1lO4)
+ Brick.Widgets.List: listElementsL :: forall n_a1lb3 e_a1lb4 e_a1lkY. Lens (List n_a1lb3 e_a1lb4) (List n_a1lb3 e_a1lkY) (Vector e_a1lb4) (Vector e_a1lkY)
- Brick.Widgets.List: listItemHeightL :: forall n_a1lE8 e_a1lE9. Lens' (List n_a1lE8 e_a1lE9) Int
+ Brick.Widgets.List: listItemHeightL :: forall n_a1lb3 e_a1lb4. Lens' (List n_a1lb3 e_a1lb4) Int
- Brick.Widgets.List: listNameL :: forall n_a1lE8 e_a1lE9 n_a1lO5. Lens (List n_a1lE8 e_a1lE9) (List n_a1lO5 e_a1lE9) n_a1lE8 n_a1lO5
+ Brick.Widgets.List: listNameL :: forall n_a1lb3 e_a1lb4 n_a1lkZ. Lens (List n_a1lb3 e_a1lb4) (List n_a1lkZ e_a1lb4) n_a1lb3 n_a1lkZ
- Brick.Widgets.List: listSelectedL :: forall n_a1lE8 e_a1lE9. Lens' (List n_a1lE8 e_a1lE9) (Maybe Int)
+ Brick.Widgets.List: listSelectedL :: forall n_a1lb3 e_a1lb4. Lens' (List n_a1lb3 e_a1lb4) (Maybe Int)

Files

CHANGELOG.md view
@@ -2,6 +2,13 @@ Brick changelog --------------- +0.29.1+------++Bug fixes:+ * Mixed-case color names like "brightBlue" can now be parsed in theme+   customization files.+ 0.29 ---- 
brick.cabal view
@@ -1,5 +1,5 @@ name:                brick-version:             0.29+version:             0.29.1 synopsis:            A declarative terminal user interface library description:   Write terminal applications painlessly with 'brick'! You write an
docs/guide.rst view
@@ -784,7 +784,7 @@ the theme -- ``someAttribute`` and ``otherAttribute`` -- are also customized. This example shows that styles can be customized, too, and that a custom style can either be a single style (in this example,-``underline``) or a collection of styles to be applied simutaneously+``underline``) or a collection of styles to be applied simultaneously (in this example, ``underline`` and ``bold``). Lastly, the hierarchical attribute name ``otherAttribute.inner`` refers to an attribute name with two components, ``otherAttribute <> inner``, similar to the@@ -832,9 +832,9 @@        customizedTheme <- loadCustomizations "custom.ini" defaultTheme        let mapping = themeToAttrMap customizedTheme -The resulting ``AttrMap`` can then be returned by ``appAttrMap`` as-described in (see `How Attributes Work`_ and `appAttrMap: Managing-Attributes`_).+The resulting ``AttrMap`` can then be returned by ``appAttrMap``+as described in `How Attributes Work`_ and `appAttrMap: Managing+Attributes`_.  If the theme is further customized at runtime, any changes can be saved with ``Brick.Themes.saveCustomizations``.
src/Brick/Themes.hs view
@@ -191,10 +191,11 @@ parseColor :: T.Text -> Either String (MaybeDefault Color) parseColor s =     let stripped = T.strip $ T.toLower s+        normalize (t, c) = (T.toLower t, c)     in if stripped == "default"        then Right Default-       else maybe (Left $ "Invalid color: " <> show s) (Right . SetTo) $-                  lookup stripped (swap <$> allColors)+       else maybe (Left $ "Invalid color: " <> show stripped) (Right . SetTo) $+                  lookup stripped (normalize <$> swap <$> allColors)  allColors :: [(Color, T.Text)] allColors =