brick 0.50.1 → 0.51
raw patch · 32 files changed
+139/−7 lines, 32 filesbinary-addedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +15/−0
- README.md +1/−1
- brick.cabal +27/−2
- docs/programs-screenshots.md +73/−0
- docs/programs-screenshots/brick-attr-demo.png binary
- docs/programs-screenshots/brick-border-demo.png binary
- docs/programs-screenshots/brick-cache-demo.png binary
- docs/programs-screenshots/brick-custom-event-demo.png binary
- docs/programs-screenshots/brick-dialog-demo.png binary
- docs/programs-screenshots/brick-dynamic-border-demo.png binary
- docs/programs-screenshots/brick-edit-demo.png binary
- docs/programs-screenshots/brick-file-browser-demo.png binary
- docs/programs-screenshots/brick-fill-demo.png binary
- docs/programs-screenshots/brick-form-demo.png binary
- docs/programs-screenshots/brick-hello-world-demo.png binary
- docs/programs-screenshots/brick-layer-demo.png binary
- docs/programs-screenshots/brick-list-demo.png binary
- docs/programs-screenshots/brick-list-vi-demo.png binary
- docs/programs-screenshots/brick-markup-demo.png binary
- docs/programs-screenshots/brick-mouse-demo.png binary
- docs/programs-screenshots/brick-padding-demo.png binary
- docs/programs-screenshots/brick-progressbar-demo.png binary
- docs/programs-screenshots/brick-readme-demo.png binary
- docs/programs-screenshots/brick-suspend-resume-demo.png binary
- docs/programs-screenshots/brick-text-wrap-demo.png binary
- docs/programs-screenshots/brick-theme-demo.png binary
- docs/programs-screenshots/brick-viewport-scroll-demo.png binary
- docs/programs-screenshots/brick-visibility-demo.png binary
- src/Brick/Focus.hs +9/−0
- src/Brick/Widgets/Core.hs +1/−1
- src/Brick/Widgets/FileBrowser.hs +12/−2
- src/Brick/Widgets/List.hs +1/−1
@@ -2,6 +2,21 @@ Brick changelog --------------- +0.51+----++API changes:+ * Added Brick.Focus.focusRingToList, which returns all of the elements+ in a focus ring as a list, starting with the focused entry and+ wrapping around (#257; thanks @4eUeP)++Bug fixes:+ * Fix Brick.Widgets.FileBrowser.fileExtensionMatch to match directories+ and also match symlinks that link to directories (thanks @YVee1)++Other changes:+ * Added demonstration program screenshot gallery (thanks @drola)+ 0.50.1 ------
@@ -94,7 +94,7 @@ * [The official brick user guide](https://github.com/jtdaugherty/brick/blob/master/docs/guide.rst) * [Samuel Tay's brick tutorial](https://github.com/jtdaugherty/brick/blob/master/docs/samtay-tutorial.md) * Haddock (all modules)-* [Demo programs](https://github.com/jtdaugherty/brick/blob/master/programs)+* [Demo programs](https://github.com/jtdaugherty/brick/blob/master/programs) ([Screenshots](https://github.com/jtdaugherty/brick/blob/master/docs/programs-screenshots.md)) * [FAQ](https://github.com/jtdaugherty/brick/blob/master/FAQ.md) Feature Overview
@@ -1,5 +1,5 @@ name: brick-version: 0.50.1+version: 0.51 synopsis: A declarative terminal user interface library description: Write terminal applications painlessly with 'brick'! You write an@@ -43,7 +43,32 @@ docs/guide.rst, docs/samtay-tutorial.md, docs/snake-demo.gif,- CHANGELOG.md+ CHANGELOG.md,+ docs/programs-screenshots.md,+ docs/programs-screenshots/brick-attr-demo.png,+ docs/programs-screenshots/brick-border-demo.png,+ docs/programs-screenshots/brick-cache-demo.png,+ docs/programs-screenshots/brick-custom-event-demo.png,+ docs/programs-screenshots/brick-dialog-demo.png,+ docs/programs-screenshots/brick-dynamic-border-demo.png,+ docs/programs-screenshots/brick-edit-demo.png,+ docs/programs-screenshots/brick-file-browser-demo.png,+ docs/programs-screenshots/brick-fill-demo.png,+ docs/programs-screenshots/brick-form-demo.png,+ docs/programs-screenshots/brick-hello-world-demo.png,+ docs/programs-screenshots/brick-layer-demo.png,+ docs/programs-screenshots/brick-list-demo.png,+ docs/programs-screenshots/brick-list-vi-demo.png,+ docs/programs-screenshots/brick-markup-demo.png,+ docs/programs-screenshots/brick-mouse-demo.png,+ docs/programs-screenshots/brick-padding-demo.png,+ docs/programs-screenshots/brick-progressbar-demo.png,+ docs/programs-screenshots/brick-readme-demo.png,+ docs/programs-screenshots/brick-suspend-resume-demo.png,+ docs/programs-screenshots/brick-text-wrap-demo.png,+ docs/programs-screenshots/brick-theme-demo.png,+ docs/programs-screenshots/brick-viewport-scroll-demo.png,+ docs/programs-screenshots/brick-visibility-demo.png Source-Repository head type: git
@@ -0,0 +1,73 @@+# Demo program screenshots++## [AttrDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/AttrDemo.hs)+++## [BorderDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/BorderDemo.hs)+++## [CacheDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/CacheDemo.hs)+++## [CustomEventDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/CustomEventDemo.hs)+++## [DialogDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/DialogDemo.hs)+++## [DynamicBorderDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/DynamicBorderDemo.hs)+++## [EditDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/EditDemo.hs)+++## [FileBrowserDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/FileBrowserDemo.hs)+++## [FillDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/FillDemo.hs)+++## [FormDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/FormDemo.hs)+++## [HelloWorldDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/HelloWorldDemo.hs)+++## [LayerDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/LayerDemo.hs)+++## [ListDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/ListDemo.hs)+++## [ListViDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/ListViDemo.hs)+++## [MarkupDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/MarkupDemo.hs)+++## [MouseDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/MouseDemo.hs)+++## [PaddingDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/PaddingDemo.hs)+++## [ProgressBarDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/ProgressBarDemo.hs)+++## [ReadmeDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/ReadmeDemo.hs)+++## [SuspendAndResumeDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/SuspendAndResumeDemo.hs)+++## [TextWrapDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/TextWrapDemo.hs)+++## [ThemeDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/ThemeDemo.hs)+++## [ViewportScrollDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/ViewportScrollDemo.hs)+++## [VisibilityDemo.hs](https://github.com/jtdaugherty/brick/blob/master/programs/VisibilityDemo.hs)+
binary file changed (absent → 52808 bytes)
binary file changed (absent → 19670 bytes)
binary file changed (absent → 44698 bytes)
binary file changed (absent → 12081 bytes)
binary file changed (absent → 14232 bytes)
binary file changed (absent → 25746 bytes)
binary file changed (absent → 18668 bytes)
binary file changed (absent → 43038 bytes)
binary file changed (absent → 12794 bytes)
binary file changed (absent → 20724 bytes)
binary file changed (absent → 10794 bytes)
binary file changed (absent → 22655 bytes)
binary file changed (absent → 18011 bytes)
binary file changed (absent → 18448 bytes)
binary file changed (absent → 12852 bytes)
binary file changed (absent → 35768 bytes)
binary file changed (absent → 22308 bytes)
binary file changed (absent → 16385 bytes)
binary file changed (absent → 11141 bytes)
binary file changed (absent → 12771 bytes)
binary file changed (absent → 27669 bytes)
binary file changed (absent → 13429 bytes)
binary file changed (absent → 32432 bytes)
binary file changed (absent → 50627 bytes)
@@ -10,6 +10,7 @@ , focusGetCurrent , focusSetCurrent , focusRingLength+ , focusRingToList , focusRingCursor , withFocusRing , focusRingModify@@ -80,6 +81,14 @@ -- | Get the size of the FocusRing. focusRingLength :: FocusRing n -> Int focusRingLength (FocusRing l) = C.size l++-- | Return all of the entries in the focus ring, starting with the+-- currently-focused entry and wrapping around the ring.+--+-- For example, if a ring contains A, B, C, and D, and the current entry+-- is B, the result will be [B, C, D, A].+focusRingToList :: FocusRing n -> [n]+focusRingToList (FocusRing l) = C.rightElements l -- | Modify the internal circular list structure of a focus ring -- directly. This function permits modification of the circular list
@@ -660,7 +660,7 @@ catDynBorder towardsA towardsB a b -- Currently, we check if the 'BorderStyle's are exactly the same. In the -- future, it might be nice to relax this restriction. For example, if a- -- horizontal border is being rewritten to accomodate a neighboring+ -- horizontal border is being rewritten to accommodate a neighboring -- vertical border, all we care about is that the two 'bsVertical's line up -- sanely. After all, if the horizontal border's 'bsVertical' is the same -- as the vertical one's, and the horizontal border's 'BorderStyle' is
@@ -777,6 +777,16 @@ -- regular file with the specified extension. For example, an extension -- argument of @"xml"@ would match regular files @test.xml@ and -- @TEST.XML@ and it will match directories regardless of name.+--+-- This matcher also matches symlinks if and only if their targets are+-- directories. This is intended to make it possible to use this matcher+-- to find files with certain extensions, but also support directory+-- traversal via symlinks. fileExtensionMatch :: String -> FileInfo -> Bool-fileExtensionMatch ext i =- ('.' : (toLower <$> ext)) `isSuffixOf` (toLower <$> fileInfoFilename i)+fileExtensionMatch ext i = case fileInfoFileType i of+ Just Directory -> True+ Just RegularFile -> ('.' : (toLower <$> ext)) `isSuffixOf` (toLower <$> fileInfoFilename i)+ Just SymbolicLink -> case fileInfoLinkTargetType i of+ Just Directory -> True+ _ -> False+ _ -> False
@@ -561,7 +561,7 @@ clamp 0 (if null t then length l - 1 else i) i -- | Set the selected index for a list to the index of the first--- occurence of the specified element if it is in the list, or leave+-- occurrence of the specified element if it is in the list, or leave -- the list unmodified otherwise. -- -- /O(n)/. Only evaluates as much of the container as needed.