packages feed

reflex-vty 0.1.2.0 → 0.1.2.1

raw patch · 5 files changed

+20/−3 lines, 5 files

Files

ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for reflex-vty +## Unreleased++* Add `keyCombo` function (single-key-combination version of `keyCombos`)+* Use upstream `NotReady` instances instead of orphans defined in this package if reflex-0.6.3 is available+ ## 0.1.2.0 * Allow TextZipper contents to be tranformed before being displayed * Fix bug in `row` orientation
reflex-vty.cabal view
@@ -1,5 +1,5 @@ name: reflex-vty-version: 0.1.2.0+version: 0.1.2.1 synopsis: Reflex FRP host and widgets for vty applications description:   Host and widget library for Reflex-based FRP applications@@ -10,6 +10,7 @@ license-file: LICENSE author: Obsidian Systems LLC maintainer: maintainer@obsidian.systems+copyright: 2020 Obsidian Systems LLC category: FRP build-type: Simple cabal-version: >=1.18
src/Reflex/Spider/Orphans.hs view
@@ -2,15 +2,17 @@ Module: Reflex.Spider.Orphans Description: Orphan instances for SpiderTimeline and SpiderHost -}+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Reflex.Spider.Orphans where +#if MIN_VERSION_reflex(0,6,3)+#else import Reflex import Reflex.Spider.Internal --- TODO move this to reflex instance NotReady (SpiderTimeline x) (SpiderHost x) where   notReadyUntil _ = pure ()   notReady = pure ()@@ -18,3 +20,4 @@ instance HasSpiderTimeline x => NotReady (SpiderTimeline x) (PerformEventT (SpiderTimeline x) (SpiderHost x)) where   notReadyUntil _ = pure ()   notReady = pure ()+#endif
src/Reflex/Vty/Widget.hs view
@@ -59,6 +59,7 @@   , KeyCombo   , key   , keys+  , keyCombo   , keyCombos   , blank   ) where@@ -402,6 +403,13 @@ -- | Emits an event that fires on particular key presses (without modifiers) keys :: (Monad m, Reflex t) => [V.Key] -> VtyWidget t m (Event t KeyCombo) keys = keyCombos . Set.fromList . fmap (,[])++-- | Emit an event that fires whenever the provided key combination occurs+keyCombo+  :: (Reflex t, Monad m)+  => KeyCombo+  -> VtyWidget t m (Event t KeyCombo)+keyCombo = keyCombos . Set.singleton  -- | Emit an event that fires whenever any of the provided key combinations occur keyCombos
src/Reflex/Vty/Widget/Layout.hs view
@@ -186,7 +186,7 @@   { _tileConfig_constraint :: Dynamic t Constraint     -- ^ 'Constraint' on the tile's size   , _tileConfig_focusable :: Dynamic t Bool-    -- ^ Whether the tile is focusable       data TileConfig t = TileConfig+    -- ^ Whether the tile is focusable   }  instance Reflex t => Default (TileConfig t) where