{"_id":"node-term-ui","_rev":"10-068110ebd12376bf5a76f66f9128fa2a","name":"node-term-ui","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"node-term-ui","version":"0.0.1","dependencies":{"underscore":"","underscore.string":""},"_npmJsonOpts":{"file":"/Users/jfaul/.npm/node-term-ui/0.0.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"node-term-ui@0.0.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.26","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"870ba7793dfb4bce60042a11b27eb190f0b27f2d","tarball":"https://registry.npmjs.org/node-term-ui/-/node-term-ui-0.0.1.tgz","integrity":"sha512-EQHZpW+x3W2voWr6Y7JekgolcoPVdITieGk54lwLn54TdAEcYmzoqca5N4muoBddkKn/yq7AIKtqZoR6qOoUnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeh/6HuAoulEFJAe+Uclt1JWK9ZhenWtmWwj4prMNRLAiA6X44YCSmmdb+sxi5aBj+LYqfoS/BwSZBJPtL48UbAnQ=="}]},"scripts":{},"maintainers":[{"name":"jocafa","email":"josh.faul@gmail.com"}]},"0.0.2":{"name":"node-term-ui","version":"0.0.2","main":"TermUI.coffee","dependencies":{"underscore":"","underscore.string":""},"_npmJsonOpts":{"file":"/Users/jfaul/.npm/node-term-ui/0.0.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"node-term-ui@0.0.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.26","_nodeVersion":"v0.4.11","_defaultsLoaded":true,"dist":{"shasum":"ba3092c3af6e8e858b629605c29f5400b72b9a15","tarball":"https://registry.npmjs.org/node-term-ui/-/node-term-ui-0.0.2.tgz","integrity":"sha512-+uN8RB+m2PrepQwqL9O6f/H+UC7hQh/g0lRroKa4j96pdL4RwFLU9WN+dYIC2A2AYQfs2YdtKBq7mlOgU41I3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIymo4TM9xYuNuhXN3Brm3AFIOT81p5RVgZOA2wZ/JTAIgF37ZTu7UvtWznAAFM8acZKBYj9ZCZJCK0vRxNCgvWSk="}]},"scripts":{},"maintainers":[{"name":"jocafa","email":"josh.faul@gmail.com"}]},"0.0.5":{"name":"node-term-ui","version":"0.0.5","main":"TermUI.coffee","dependencies":{"underscore":"","underscore.string":""},"devDependencies":{},"engines":{"node":"*"},"author":{"name":"Josh Faul","email":"josh.faul@gmail.com","url":"jocafa.com"},"description":"UI Toolkit for node.js console apps","homepage":"https://github.com/jocafa/node-term-ui","repository":{"type":"git","url":"git://github.com/jocafa/node-term-ui.git"},"_npmUser":{"name":"jocafa","email":"josh.faul@gmail.com"},"_id":"node-term-ui@0.0.5","_engineSupported":true,"_npmVersion":"1.1.0-beta-4","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"3a1a250ed7be8b62170132207bc753ddbaf1ea6b","tarball":"https://registry.npmjs.org/node-term-ui/-/node-term-ui-0.0.5.tgz","integrity":"sha512-PSZZqyQoN0DuAD/zFRHoKFtW5ybL4zOtNigOwJJ7aZhLdmv8aOzVZXuNAg29rDfIi0krZQKZiEXuFtgEBTEWfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1BM6uOcJGvFXEKpMQ0lgtLkQx+yHDX6a16NFUs8A94AiAwnBjCfqsjZyd7YwlvkKPokM//ekrW7gpOdGELqRg6Wg=="}]},"maintainers":[{"name":"jocafa","email":"josh.faul@gmail.com"}]}},"maintainers":[{"name":"jocafa","email":"josh.faul@gmail.com"}],"time":{"modified":"2022-06-21T22:32:14.555Z","created":"2011-08-31T00:09:25.547Z","0.0.1":"2011-08-31T00:09:26.337Z","0.0.2":"2011-08-31T00:42:10.314Z","0.0.5":"2012-01-03T17:42:28.502Z"},"description":"UI Toolkit for node.js console apps","author":{"name":"Josh Faul","email":"josh.faul@gmail.com","url":"jocafa.com"},"repository":{"type":"git","url":"git://github.com/jocafa/node-term-ui.git"},"readme":"TermUI\n======\n\nTermUI is a library for Node.js that makes it easier to create rich console\ninterfaces.\n\n## General Usage\n\n### Rendering\n\n  - `out(text)` - prints text to the screen from the current cursor position\n  - `clear()` - clears the screen\n  - `pos(x,y)` - positions the cursor\n  - `home()` - sends the cursor to the top left corner\n  - `end()` - sends the cursor to the bottom right corner\n  - `fg(color)` - sets the foreground color\n  - `bg(color)` - sets the background color\n  - `hifg(color)` - sets the foreground color for 256 color terminals\n  - `hibg(color)` - sets the background color for 256 color terminals\n  - `enableMouse()` - enables mouse event handling\n  - `disableMouse()` - disables mouse event handling\n  - `eraseLine()` - erases the entire line that the cursor is on\n  - `hideCursor()` - hides the cursor\n  - `showCursor()` - shows the cursor\n\nThe following will print \"Hello, world!\" at 10, 20 in the terminal in white text\non a red background:\n\n```coffeescript\n  TermUI.pos(10,20).fg(TermUI.C.w).bg(TermUI.C.w).out(\"Hello, world!\")\n```\n\nAs you can see, pretty much everything is chainable.\n\n### Handy Rendering Shortcuts\nThe `C` object contains definitions for common colors so that you don't have\nto remember the numeric values.\n\n  - k: black\n  - r: red\n  - g: green\n  - y: yellow\n  - b: blue\n  - m: magenta\n  - c: cyan\n  - w: white\n  - x: the terminal's default color\n\nThe `S` object is similar: it contains the text style definitions -- normal,\nbold, underline, blink, and inverse.\n\nThe `SYM` object contains shortcuts for some handy UTF8 characters: star, check\nx, triUp, triDown, triLeft, triRight, fn, arrowUp, arrowDown, arrowLeft, and\narrowRight.\n\n### Events\n`resize` is fired when the user resizes their terminal. The listener receives\nan object with 'w' and 'h' properties set to the new width and height of the\nterminal.\n\n`keypress` is fired when a key is pressed. This works just like the `keypress`\nevent on `process.stdin`\n\n`mousedown, mouseup, drag, wheel` are all the mouse events that are fired. The\nreceiver is sent an object that contains which button was pressed, which direction\nthe wheel scrolled, the x/y location, and whether or not shift was pressed.\n\n\n## Widgets\n\n### Button\n\nButtons are simply clickable rectangular areas that can have a label on them.\nHere's how to use one...\n\n```coffeescript\n\tTermUI = require 'TermUI'\n\n\tTermUI.enableMouse()\n\n\tbutton = new TermUI.Button\n\t\tbounds:\n\t\t\tx: 0\n\t\t\ty: 0\n\t\t\tw: 30\n\t\t\th: 3\n\t\t\tlabel: 'I am a banana!'\n\t\t\tlabelAnchor: 5\n\n\tbutton.on 'mousedown', ->\n\t\tbutton.bg = TermUI.C.y\n\t\tbutton.draw()\n\n\tbutton.on 'mouseup', ->\n\t\tbutton.bg = TermUI.C.b\n\t\tbutton.draw()\n\n\tbutton.draw()\n```\n","readmeFilename":""}