UNPKG

3.22 kBMarkdownView Raw
1# Blessed v0.1.0 - new terminal goodies for node.js
2
3![blessed](https://raw.githubusercontent.com/chjj/blessed/master/img/v0.1.0-3.gif)
4
5The features demonstrated in the above gif __element transparency/shadow__ and
6__border docking__.
7
8## New useful options for your typewriter application:
9
10- __`transparent` option__ - Lower element opacity to 50%. This will display
11 dimmed elements and content behind the foreground element using a naive color
12 blending function (good enough for a terminal's limited amount of colors).
13 works best with 256color terminals. (see widget-shadow.js)
14
15- __`shadow` option__ - Give the element a translucent shadow. Automatically
16 darkens the background behind it. (see widget-shadow.js)
17
18- __`dockBorders` option__ - Element borders will automatically "dock" to each
19 other. Instead of overlapping the borders end up connecting. (see
20 widget-dock.js)
21
22- __`autoPadding` default__ - Auto padding is now enabled by default, meaning
23 blessed will automatically position elements inside their parent's border.
24
25- __`rleft` property__ - Relative offsets are now default element properties
26 (`left` instead of `rleft`).
27
28- __`draggable` property__ - Make any element draggable with the mouse. (see
29 widget-shadow.js or widget-dock.js)
30
31- __`Table` and `ListTable` elements__ - Tables with a high quality rendering.
32 (see widget-table.js and widget-listtable.js)
33
34- __`Log` element__ - A top to bottom logger box with scrollback and other
35 features. (see widget-log.js)
36
37- __Obscurable borders__ - In addition to docking borders, it's possible to
38 obscure borders by sliding them off the screen with negative offsets. (see
39 widget-dock.js)
40
41- __Percentage expressions__ - Like CSS, arithmetic can now be performed on
42 percentages. e.g. `width: '50%-1'`. This is useful for overlapping borders on
43 elements with a percentage width. (see widget-dock.js)
44
45## Other features that weren't mentioned before:
46
47- __`setHover` option__ - Set a hover text box to follow cursor on mouseover,
48 similar to how a web browser handles the "title" attribute. (see widget.js)
49
50- __`Terminal` element__ - Spin up a pseudo terminal as a blessed element.
51 useful for writing a terminal multiplexer. (requires term.js and pty.js as
52 optional dependencies). (see example/multiplex.js)
53
54- __`Image` element__ - Uses `w3mimgdisplay` to draw real images your terminal.
55 this is much easier than calling w3mimgdisplay by hand. Image elements behave
56 like any other element, although it is wise to use `width: 'shrink', height:
57 'shrink'`. (see widget-image.js)
58
59---
60
61The major things that justified the 0.1.0 release were fixes and stabilization
62of api (`autoPadding`/`rleft`/`left`). Scrolling boxes were almost completely
63revamped to work a bit smarter.
64
65---
66
67## Things yet to come:
68
69- __@secrettriangle's [improvements](https://github.com/slap-editor/slap) for
70 textareas__ - This allows for real text navigation.
71
72- __Gravity and margin layouts__
73
74This is something that's been in the idea bin for a while. Every element could
75potentially have properties like:
76
77```
78 gravity: 'bottomleft',
79 margin: 5,
80``
81
82In other words, just a more complex `float` system than what the CSSOM is used
83to.
84
\No newline at end of file