Comparing version 0.1.60 to 0.1.61
@@ -97,3 +97,3 @@ /** | ||
helpers.parseTags = function(text) { | ||
return Element.prototype._parseTags.call( | ||
return helpers.Element.prototype._parseTags.call( | ||
{ parseTags: true, screen: Screen.global }, text); | ||
@@ -132,3 +132,3 @@ }; | ||
helpers.attrToBinary = function(style, element) { | ||
return Element.prototype.sattr.call(element || {}, style); | ||
return helpers.Element.prototype.sattr.call(element || {}, style); | ||
}; | ||
@@ -154,1 +154,8 @@ | ||
}; | ||
helpers.__defineGetter__('Element', function() { | ||
if (!helpers._element) { | ||
helpers._element = require('./widgets/element'); | ||
} | ||
return helpers._element; | ||
}); |
@@ -5,3 +5,3 @@ { | ||
"author": "Christopher Jeffrey", | ||
"version": "0.1.60", | ||
"version": "0.1.61", | ||
"main": "./lib/blessed.js", | ||
@@ -8,0 +8,0 @@ "bin": "./bin/tput.js", |
@@ -1594,3 +1594,3 @@ # blessed | ||
``` | ||
``` js | ||
box.setContent('hello {red-fg}{green-bg}{bold}world{/bold}{/green-bg}{/red-fg}'); | ||
@@ -1601,6 +1601,13 @@ ``` | ||
``` | ||
``` js | ||
box.setContent('hello {red-fg}{green-bg}{bold}world{/}'); | ||
``` | ||
Tags can also use hex colors (which will be reduced to the most accurate | ||
terminal color): | ||
``` js | ||
box.setContent('{#ff0000-fg}{bold}red and bold{/}'); | ||
``` | ||
Newlines and alignment are also possible in content. | ||
@@ -1611,3 +1618,4 @@ | ||
+ '{right}world{/right}\n' | ||
+ '{center}foo{/center}'); | ||
+ '{center}foo{/center}\n'); | ||
+ 'left{|}right'); | ||
``` | ||
@@ -1621,2 +1629,3 @@ | ||
| foo | | ||
| left right | | ||
``` | ||
@@ -1765,3 +1774,3 @@ | ||
2. Why do vertical lines look chopped up in iTerm2? | ||
- All ACS vertical lines look this way in iTerm2. | ||
- All ACS vertical lines look this way in iTerm2 with the default font. | ||
3. Why can't I use my mouse in Terminal.app? | ||
@@ -1772,8 +1781,8 @@ - Terminal.app does not support mouse events. | ||
X11+xterm/urxvt, but it _may_ work on other unix terminals. | ||
5. Why can't my mouse clicks register beyond 255-287 cells? | ||
5. Why can't my mouse clicks register beyond 255 cells? | ||
- Older versions of VTE do not support any modern mouse protocol. On top of | ||
that, the old x10 protocol it does implement is bugged. Through several | ||
workarounds we've managed to get the cell limit from 127 to 255/287. If | ||
you're not happy with this, you may want to look into using xterm or | ||
urxvt, or a terminal which uses a modern VTE, like gnome-terminal. | ||
that, the old X10 protocol it _does_ implement is bugged. Through several | ||
workarounds we've managed to get the cell limit from `127` to `255`. If | ||
you're not happy with this, you may want to look into using xterm or urxvt, | ||
or a terminal which uses a modern VTE, like gnome-terminal. | ||
6. Is blessed efficient? | ||
@@ -1790,12 +1799,13 @@ - Yes. Blessed implements CSR and uses the painter's algorithm to render the | ||
- ["curses"][curses] was an old library written in the early days of unix | ||
which allowed a programmer to not have to worry about terminal | ||
compatibility. ["ncurses"][ncurses] is a free reimplementation of curses. | ||
It improved upon it quite a bit and is now the standard library for | ||
implementing terminal programs. Blessed uses neither of these, and instead | ||
handles terminal compatibility itself. | ||
which allowed a programmer to easily manipulate the cursor in order to | ||
render the screen. ["ncurses"][ncurses] is a free reimplementation of | ||
curses. It improved upon it quite a bit by focusing more on terminal | ||
compatibility and is now the standard library for implementing terminal | ||
programs. Blessed uses neither of these, and instead handles terminal | ||
compatibility itself. | ||
9. What is the difference between blessed and blessed-contrib? | ||
- blessed is a major piece of code which reimplements curses from the ground | ||
up. A UI API is then layered on top of this. blessed-contrib is a popular | ||
library built on top of blessed which makes clever use of modules to | ||
implement useful widgets like graphs, ascii art, and so on. | ||
up. A UI API is then layered on top of this. [blessed-contrib][contrib] is | ||
a popular library built on top of blessed which makes clever use of modules | ||
to implement useful widgets like graphs, ascii art, and so on. | ||
10. Are there blessed-like solutions for non-javascript platforms? | ||
@@ -1802,0 +1812,0 @@ - Yes. There are some fantastic solutions out there. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
904492
1832
19281