diff --git a/README.md b/README.md index a09f600..fbc9b33 100644 --- a/README.md +++ b/README.md @@ -66,10 +66,10 @@ Properties you can pass to the console element | Member | Type | Description | ---- | ---- | ---- -| log | (...messages: any)=>void | Log messages to the console. If string, print the value, otherwise, print the JSON value of the message. +| log | (...messages: any)=>void | Log messages to the console. If string, print the value, otherwise, print the JSON value of the message. Objects with `type: 'link'` will be output as links using the objects `href`, `target`, and `text` properties. | updateLastLog| (...messages: any)=>void | Replace the last message in the console. Useful for progress indicators. | logX | (type: string, ...messages: any)=>void | Log messages of a particular type to the console. The messages will be given the class `react-console-message-{type}`. -| logTable | (tableObject: Object[, type: string])=>void | Log tabular data to the console. `tableObject` has the format `{ headers: ['header 1', 'header 2'], rows: [['row 1, col 1', 'row 1, col 2'], ['row 2, col 1', 'row 2, col 2']]}`. `headers` is optional. The optional `type` argument will be handled the same as in `logX` +| logTable | (tableObject: Object[, type: string])=>void | Log tabular data to the console. `tableObject` has the format `{ headers: ['header 1', 'header 2'], rows: [['row 1, col 1', 'row 1, col 2'], ['row 2, col 1', 'row 2, col 2']]}`. `headers` is optional. Rows can also contain objects which will be output as JSON strings or according to the `type: link` rules listed above. The optional `type` argument will be handled the same as in `logX` | return | ()=>void | Signal the current command has finished and a new prompt should be displayed. | clearScreen | ()=>void | Clear the visible log in the console. Does not clear command history. diff --git a/dist/dist-min.tar.gz b/dist/dist-min.tar.gz index 75126e4..c0d78d8 100644 Binary files a/dist/dist-min.tar.gz and b/dist/dist-min.tar.gz differ diff --git a/dist/dist-min.zip b/dist/dist-min.zip index 4a796ca..da893cc 100644 Binary files a/dist/dist-min.zip and b/dist/dist-min.zip differ diff --git a/dist/dist-min/react-console.min.js b/dist/dist-min/react-console.min.js index d4f60a8..6c57577 100644 --- a/dist/dist-min/react-console.min.js +++ b/dist/dist-min/react-console.min.js @@ -1,2 +1,2 @@ -var Console=function(t){function e(s){if(o[s])return o[s].exports;var r=o[s]={exports:{},id:s,loaded:!1};return t[s].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var s=this&&this.__extends||function(t,e){function o(){this.constructor=t}for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)},r=o(2);o(1);var n=function(t){function e(){t.apply(this,arguments),this.child={},this.updateSemaphore=0}return s(e,t),e.prototype.componentDidMount=function(){this.idle()},e.prototype.componentDidUpdate=function(){this.idle()},e.prototype.idle=function(){var t=this;this.child.cursor&&(0==this.updateSemaphore&&(this.child.cursor.className="react-console-cursor"),this.updateSemaphore++,window.setTimeout(function(){t.updateSemaphore--,0==t.updateSemaphore&&t.child.cursor&&(t.child.cursor.className="react-console-cursor react-console-cursor-idle")},1e3))},e.prototype.renderValue=function(){var t=this;return this.props.point<0?[this.props.value]:this.props.point==this.props.value.length?[this.props.value,r.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"}," ")]:[this.props.value.substring(0,this.props.point),r.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"},this.props.value.substring(this.props.point,this.props.point+1)),this.props.value.substring(this.props.point+1)]},e.prototype.render=function(){var t=this.props.label;if(this.props.argument){var e=t.lastIndexOf("\n");t=e>=0?t.substring(0,e+1):""}return r.createElement("div",{className:"react-console-prompt-box"},r.createElement("span",{className:"react-console-prompt-label"},t),r.createElement("span",{className:"react-console-prompt-argument"},this.props.argument),r.createElement("span",{className:"react-console-prompt"},this.renderValue()))},e.defaultProps={point:-1,value:"",label:"> ",argument:null},e}(r.Component),a=function(t){return t.headers?r.createElement("thead",null,r.createElement("tr",null,t.headers.map(function(t){return r.createElement("th",{scope:"col",key:t},t)}))):null},l=function(t){if(t.isTable){var e=t.value[0];return r.createElement("div",{className:"react-console-message react-console-table"+(t.type?" react-console-message-"+t.type:"")},r.createElement("table",null,r.createElement(a,{headers:e.headers}),r.createElement("tbody",null,e.rows&&e.rows.map(function(t,e){return r.createElement("tr",{key:e},t.map(function(t,e){return r.createElement("td",{key:e},t)}))}))))}return r.createElement("div",{className:"react-console-message"+(t.type?" react-console-message-"+t.type:"")},t.value.map(function(t){return"string"==typeof t?t:JSON.stringify(t)}).join("\n"))};l.defaultProps={type:null,value:[],isTable:!1};var i=function(t){function e(e){var o=this;t.call(this,e),this.child={},this.updateLastLog=function(){for(var t=[],e=0;e0?s[o.state.log.length-1].message.length-1:0;s[o.state.log.length-1].message[r]={value:t},o.setState({log:s},o.scrollIfBottom())},this.log=function(){for(var t=[],e=0;e0&&o.setState({point:o.movePoint(-1),promptText:o.state.promptText.substring(0,o.state.point-1)+o.state.promptText.substring(o.state.point),argument:null,lastCommand:0},o.scrollToBottom)},this.killLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText.substring(o.state.point)),o.setState({promptText:o.state.promptText.substring(0,o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]:t.unshift(o.state.promptText.substring(0,o.state.point)),o.setState({point:0,promptText:o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWholeLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText),o.setState({point:0,promptText:"",kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point,o.nextWord()):t.unshift(o.state.promptText.substring(o.state.point,o.nextWord())),o.setState({promptText:o.state.promptText.substring(0,o.state.point)+o.state.promptText.substring(o.nextWord()),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(o.previousWord(),o.state.point)+t[0]:t.unshift(o.state.promptText.substring(o.previousWord(),o.state.point)),o.setState({point:o.previousWord(),promptText:o.state.promptText.substring(0,o.previousWord())+o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.yank=function(){o.setState(Object.assign(o.consoleInsert(o.state.kill[o.state.killn]),{lastCommand:3}),o.scrollToBottom)},this.yankPop=function(){if(3==o.state.lastCommand){var t=o.rotateRing(1,o.state.killn,o.state.kill.length);o.setState(Object.assign(o.consoleInsert(o.state.kill[t],o.state.kill[o.state.killn].length),{killn:t,lastCommand:3}),o.scrollToBottom)}},this.complete=function(){if(o.props.complete){for(var t=o.state.promptText.split(" "),e=0,s=t[0].length;s1){var l=o.state.log;l.push({label:o.state.currLabel,command:o.state.promptText,message:[{type:"completion",value:[r.join("\t")]}]}),o.setState({currLabel:o.nextLabel(),log:l,argument:null,lastCommand:0},o.scrollToBottom)}}},this.prefixMeta=function(){1==o.state.lastCommand&&o.setState({argument:null,lastCommand:0})},this.cancelCommand=function(){if(o.state.acceptInput){o.child.typer.value="";var t=o.state.log;t.push({label:o.state.currLabel,command:o.state.promptText,message:[]}),o.setState({typer:"",point:0,promptText:"",restoreText:"",log:t,historyn:0,argument:null,lastCommand:0},o.scrollToBottom)}else o.props.cancel()},this.textInsert=function(t,e,o,s){return void 0===o&&(o=0),void 0===s&&(s=e.length),e.substring(0,s-o)+t+e.substring(s)},this.consoleInsert=function(t,e){void 0===e&&(e=0);var s=o.textInsert(t,o.state.promptText,e,o.state.point);return{point:o.movePoint(t.length-e,t.length-e+o.state.promptText.length),promptText:s,restoreText:s,argument:null,lastCommand:0}},this.movePoint=function(t,e){void 0===e&&(e=o.state.promptText.length);var s=o.state.point+t;return s<0?0:s>e?e:s},this.rotateRing=function(t,e,o,s){return void 0===s&&(s=!0),0==o?0:s?(o+(e+t)%o)%o:(e-=t,e<0?0:e>=o?o:e)},this.rotateHistory=function(t){var e=o.rotateRing(t,o.state.historyn,o.state.history.length,!1);if(0==e)o.setState({point:o.state.restoreText.length,promptText:o.state.restoreText,historyn:e,argument:null,lastCommand:0},o.scrollToBottom);else{var s=o.state.history[o.state.history.length-e];o.setState({point:s.length,promptText:s,historyn:e,argument:null,lastCommand:0},o.scrollToBottom)}},this.searchHistory=function(t,e){void 0===t&&(t=o.state.searchDirection),void 0===e&&(e=!1);var s=o.state.historyn,r=0==t?1:-1;for(e&&(s+=r);s>0&&s<=o.state.history.length;s+=r){var n=o.state.history[o.state.history.length-s],a=n.indexOf(o.state.searchText);if(a>-1)return{point:a,promptText:n,searchDirection:t,searchInit:!1,historyn:s}}return{searchDirection:t,searchInit:!1}},this.scrollSemaphore=0,this.scrollIfBottom=function(){return o.scrollSemaphore>0||o.child.container.scrollTop==o.child.container.scrollHeight-o.child.container.offsetHeight?(o.scrollSemaphore++,o.scrollIfBottomTrue):null},this.scrollIfBottomTrue=function(){o.scrollToBottom(),o.scrollSemaphore--},this.scrollToBottom=function(){o.child.container.scrollTop=o.child.container.scrollHeight;var t=o.child.focus.getBoundingClientRect();(t.top<0||t.left<0||t.bottom>(window.innerHeight||document.documentElement.clientHeight)||t.right>(window.innerWidth||document.documentElement.clientWidth))&&o.child.typer.scrollIntoView(!1)},this.nextLabel=function(){return"string"==typeof o.props.promptLabel?o.props.promptLabel:o.props.promptLabel()},this.state={focus:!1,acceptInput:!0,typer:"",point:0,currLabel:this.nextLabel(),promptText:"",restoreText:"",searchText:"",searchDirection:null,searchInit:!1,log:[],history:[],historyn:0,kill:[],killn:0,argument:null,lastCommand:0}}return s(e,t),e.prototype.componentDidMount=function(){this.props.autofocus&&this.focus()},e.prototype.nextWord=function(){var t=/\W\w/.exec(this.state.promptText.substring(this.state.point));return t?t.index+this.state.point+1:this.state.promptText.length},e.prototype.previousWord=function(){var t=/\W\w(?!.*\W\w)/.exec(this.state.promptText.substring(0,this.state.point-1));return t?t.index+1:0},e.prototype.render=function(){var t=this;return r.createElement("div",{ref:function(e){return t.child.container=e},className:"react-console-container "+(this.state.focus?"react-console-focus":"react-console-nofocus"),onClick:this.focus},this.props.welcomeMessage?r.createElement("div",{className:"react-console-message react-console-welcome"},this.props.welcomeMessage):null,this.state.log.map(function(t){return[r.createElement(n,{label:t.label,value:t.command})].concat(t.message.map(function(t,e){return r.createElement(l,{key:e,type:t.type,value:t.value,isTable:t.isTable})}))}),this.state.acceptInput?r.createElement(n,{label:this.state.currLabel,value:this.state.promptText,point:this.state.point,argument:this.state.argument}):null,r.createElement("div",{style:{overflow:"hidden",height:1,width:1}},r.createElement("textarea",{ref:function(e){return t.child.typer=e},className:"react-console-typer",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",style:{outline:"none",color:"transparent",backgroundColor:"transparent",border:"none",resize:"none",overflow:"hidden"},onBlur:this.blur,onKeyDown:this.keyDown,onChange:this.change,onPaste:this.paste})),r.createElement("div",{ref:function(e){return t.child.focus=e}}," "))},e.defaultProps={promptLabel:"> ",continue:function(){return!1},cancel:function(){}},e}(r.Component);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){},function(t,e){t.exports=React}]); +var Console=function(t){function e(r){if(o[r])return o[r].exports;var s=o[r]={exports:{},id:r,loaded:!1};return t[r].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";var r=this&&this.__extends||function(t,e){function o(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)},s=o(2);o(1);var n=function(t){function e(){t.apply(this,arguments),this.child={},this.updateSemaphore=0}return r(e,t),e.prototype.componentDidMount=function(){this.idle()},e.prototype.componentDidUpdate=function(){this.idle()},e.prototype.idle=function(){var t=this;this.child.cursor&&(0==this.updateSemaphore&&(this.child.cursor.className="react-console-cursor"),this.updateSemaphore++,window.setTimeout(function(){t.updateSemaphore--,0==t.updateSemaphore&&t.child.cursor&&(t.child.cursor.className="react-console-cursor react-console-cursor-idle")},1e3))},e.prototype.renderValue=function(){var t=this;return this.props.point<0?[this.props.value]:this.props.point==this.props.value.length?[this.props.value,s.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"}," ")]:[this.props.value.substring(0,this.props.point),s.createElement("span",{ref:function(e){return t.child.cursor=e},key:"cursor",className:"react-console-cursor"},this.props.value.substring(this.props.point,this.props.point+1)),this.props.value.substring(this.props.point+1)]},e.prototype.render=function(){var t=this.props.label;if(this.props.argument){var e=t.lastIndexOf("\n");t=e>=0?t.substring(0,e+1):""}return s.createElement("div",{className:"react-console-prompt-box"},s.createElement("span",{className:"react-console-prompt-label"},t),s.createElement("span",{className:"react-console-prompt-argument"},this.props.argument),s.createElement("span",{className:"react-console-prompt"},this.renderValue()))},e.defaultProps={point:-1,value:"",label:"> ",argument:null},e}(s.Component),a=function(t){return t.headers?s.createElement("thead",null,s.createElement("tr",null,t.headers.map(function(t){return s.createElement("th",{scope:"col",key:t},t)}))):null},l=function(t){if(t.isTable){var e=t.value[0];return s.createElement("div",{className:"react-console-message react-console-table"+(t.type?" react-console-message-"+t.type:"")},s.createElement("table",null,s.createElement(a,{headers:e.headers}),s.createElement("tbody",null,e.rows&&e.rows.map(function(t,e){return s.createElement("tr",{key:e},t.map(function(t,e){return"string"==typeof t?s.createElement("td",{key:e},t):"object"==typeof t&&"link"===t.type?s.createElement("td",{key:e},s.createElement("a",{href:t.href,target:t.target?t.target:""},t.text)):s.createElement("td",{key:e},JSON.stringify(t))}))}))))}return s.createElement("div",{className:"react-console-message"+(t.type?" react-console-message-"+t.type:"")},t.value.map(function(t,e){return"string"==typeof t?s.createElement("div",{key:e},t):"object"==typeof t&&"link"===t.type?s.createElement("div",{key:e},s.createElement("a",{href:t.href,target:t.target?t.target:""},t.text)):s.createElement("div",{key:e},JSON.stringify(t))}))};l.defaultProps={type:null,value:[],isTable:!1};var i=function(t){function e(e){var o=this;t.call(this,e),this.child={},this.updateLastLog=function(){for(var t=[],e=0;e0?r[o.state.log.length-1].message.length-1:0;r[o.state.log.length-1].message[s]={value:t},o.setState({log:r},o.scrollIfBottom())},this.log=function(){for(var t=[],e=0;e0&&o.setState({point:o.movePoint(-1),promptText:o.state.promptText.substring(0,o.state.point-1)+o.state.promptText.substring(o.state.point),argument:null,lastCommand:0},o.scrollToBottom)},this.killLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText.substring(o.state.point)),o.setState({promptText:o.state.promptText.substring(0,o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]:t.unshift(o.state.promptText.substring(0,o.state.point)),o.setState({point:0,promptText:o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWholeLine=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(0,o.state.point)+t[0]+o.state.promptText.substring(o.state.point):t.unshift(o.state.promptText),o.setState({point:0,promptText:"",kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.killWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=t[0]+o.state.promptText.substring(o.state.point,o.nextWord()):t.unshift(o.state.promptText.substring(o.state.point,o.nextWord())),o.setState({promptText:o.state.promptText.substring(0,o.state.point)+o.state.promptText.substring(o.nextWord()),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.backwardKillWord=function(){var t=o.state.kill;2==o.state.lastCommand?t[0]=o.state.promptText.substring(o.previousWord(),o.state.point)+t[0]:t.unshift(o.state.promptText.substring(o.previousWord(),o.state.point)),o.setState({point:o.previousWord(),promptText:o.state.promptText.substring(0,o.previousWord())+o.state.promptText.substring(o.state.point),kill:t,killn:0,argument:null,lastCommand:2},o.scrollToBottom)},this.yank=function(){o.setState(Object.assign(o.consoleInsert(o.state.kill[o.state.killn]),{lastCommand:3}),o.scrollToBottom)},this.yankPop=function(){if(3==o.state.lastCommand){var t=o.rotateRing(1,o.state.killn,o.state.kill.length);o.setState(Object.assign(o.consoleInsert(o.state.kill[t],o.state.kill[o.state.killn].length),{killn:t,lastCommand:3}),o.scrollToBottom)}},this.complete=function(){if(o.props.complete){for(var t=o.state.promptText.split(" "),e=0,r=t[0].length;r1){var l=o.state.log;l.push({label:o.state.currLabel,command:o.state.promptText,message:[{type:"completion",value:[s.join("\t")]}]}),o.setState({currLabel:o.nextLabel(),log:l,argument:null,lastCommand:0},o.scrollToBottom)}}},this.prefixMeta=function(){1==o.state.lastCommand&&o.setState({argument:null,lastCommand:0})},this.cancelCommand=function(){if(o.state.acceptInput){o.child.typer.value="";var t=o.state.log;t.push({label:o.state.currLabel,command:o.state.promptText,message:[]}),o.setState({typer:"",point:0,promptText:"",restoreText:"",log:t,historyn:0,argument:null,lastCommand:0},o.scrollToBottom)}else o.props.cancel()},this.textInsert=function(t,e,o,r){return void 0===o&&(o=0),void 0===r&&(r=e.length),e.substring(0,r-o)+t+e.substring(r)},this.consoleInsert=function(t,e){void 0===e&&(e=0);var r=o.textInsert(t,o.state.promptText,e,o.state.point);return{point:o.movePoint(t.length-e,t.length-e+o.state.promptText.length),promptText:r,restoreText:r,argument:null,lastCommand:0}},this.movePoint=function(t,e){void 0===e&&(e=o.state.promptText.length);var r=o.state.point+t;return r<0?0:r>e?e:r},this.rotateRing=function(t,e,o,r){return void 0===r&&(r=!0),0==o?0:r?(o+(e+t)%o)%o:(e-=t,e<0?0:e>=o?o:e)},this.rotateHistory=function(t){var e=o.rotateRing(t,o.state.historyn,o.state.history.length,!1);if(0==e)o.setState({point:o.state.restoreText.length,promptText:o.state.restoreText,historyn:e,argument:null,lastCommand:0},o.scrollToBottom);else{var r=o.state.history[o.state.history.length-e];o.setState({point:r.length,promptText:r,historyn:e,argument:null,lastCommand:0},o.scrollToBottom)}},this.searchHistory=function(t,e){void 0===t&&(t=o.state.searchDirection),void 0===e&&(e=!1);var r=o.state.historyn,s=0==t?1:-1;for(e&&(r+=s);r>0&&r<=o.state.history.length;r+=s){var n=o.state.history[o.state.history.length-r],a=n.indexOf(o.state.searchText);if(a>-1)return{point:a,promptText:n,searchDirection:t,searchInit:!1,historyn:r}}return{searchDirection:t,searchInit:!1}},this.scrollSemaphore=0,this.scrollIfBottom=function(){return o.scrollSemaphore>0||o.child.container.scrollTop==o.child.container.scrollHeight-o.child.container.offsetHeight?(o.scrollSemaphore++,o.scrollIfBottomTrue):null},this.scrollIfBottomTrue=function(){o.scrollToBottom(),o.scrollSemaphore--},this.scrollToBottom=function(){o.child.container.scrollTop=o.child.container.scrollHeight;var t=o.child.focus.getBoundingClientRect();(t.top<0||t.left<0||t.bottom>(window.innerHeight||document.documentElement.clientHeight)||t.right>(window.innerWidth||document.documentElement.clientWidth))&&o.child.typer.scrollIntoView(!1)},this.nextLabel=function(){return"string"==typeof o.props.promptLabel?o.props.promptLabel:o.props.promptLabel()},this.state={focus:!1,acceptInput:!0,typer:"",point:0,currLabel:this.nextLabel(),promptText:"",restoreText:"",searchText:"",searchDirection:null,searchInit:!1,log:[],history:[],historyn:0,kill:[],killn:0,argument:null,lastCommand:0}}return r(e,t),e.prototype.componentDidMount=function(){this.props.autofocus&&this.focus()},e.prototype.nextWord=function(){var t=/\W\w/.exec(this.state.promptText.substring(this.state.point));return t?t.index+this.state.point+1:this.state.promptText.length},e.prototype.previousWord=function(){var t=/\W\w(?!.*\W\w)/.exec(this.state.promptText.substring(0,this.state.point-1));return t?t.index+1:0},e.prototype.render=function(){var t=this;return s.createElement("div",{ref:function(e){return t.child.container=e},className:"react-console-container "+(this.state.focus?"react-console-focus":"react-console-nofocus"),onClick:this.focus},this.props.welcomeMessage?s.createElement("div",{className:"react-console-message react-console-welcome"},this.props.welcomeMessage):null,this.state.log.map(function(t){return[s.createElement(n,{label:t.label,value:t.command})].concat(t.message.map(function(t,e){return s.createElement(l,{key:e,type:t.type,value:t.value,isTable:t.isTable})}))}),this.state.acceptInput?s.createElement(n,{label:this.state.currLabel,value:this.state.promptText,point:this.state.point,argument:this.state.argument}):null,s.createElement("div",{style:{overflow:"hidden",height:1,width:1}},s.createElement("textarea",{ref:function(e){return t.child.typer=e},className:"react-console-typer",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",style:{outline:"none",color:"transparent",backgroundColor:"transparent",border:"none",resize:"none",overflow:"hidden"},onBlur:this.blur,onKeyDown:this.keyDown,onChange:this.change,onPaste:this.paste})),s.createElement("div",{ref:function(e){return t.child.focus=e}}," "))},e.defaultProps={promptLabel:"> ",continue:function(){return!1},cancel:function(){}},e}(s.Component);Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e){},function(t,e){t.exports=React}]); //# sourceMappingURL=react-console.min.js.map \ No newline at end of file diff --git a/dist/dist-min/react-console.min.js.map b/dist/dist-min/react-console.min.js.map index 481399a..75e38f6 100644 --- a/dist/dist-min/react-console.min.js.map +++ b/dist/dist-min/react-console.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///react-console.min.js","webpack:///webpack/bootstrap 6620d61878a57e14e7ae","webpack:///./react-console.tsx","webpack:///external \"React\""],"names":["Console","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","__extends","this","d","b","__","constructor","hasOwnProperty","prototype","Object","create","React","ConsolePrompt","_super","apply","arguments","child","updateSemaphore","componentDidMount","idle","componentDidUpdate","_this","cursor","className","window","setTimeout","renderValue","props","point","value","length","createElement","ref","key","substring","render","label","argument","idx","lastIndexOf","defaultProps","Component","ConsoleTableHeader","headers","map","header","scope","ConsoleMessage","isTable","data","type","rows","row","index","cell","cellIndex","val","JSON","stringify","join","default_1","updateLastLog","messages","_i","log","state","push","command","message","indexToReplace","setState","scrollIfBottom","logX","logTable","tableData","return","acceptInput","currLabel","nextLabel","focus","getSelection","toString","typer","scrollToBottom","blur","keyDown","e","keyCodes","13","acceptLine","37","backwardChar","39","forwardChar","38","previousHistory","40","nextHistory","8","backwardDeleteChar","46","deleteChar","35","endOfLine","36","beginningOfLine","9","complete","27","prefixMeta","ctrlCodes","65","69","70","66","76","clearScreen","80","78","82","reverseSearchHistory","83","forwardSearchHistory","68","75","killLine","85","backwardKillLine","89","yank","67","cancelCommand","metaCodes","forwardWord","backwardWord","nonIncrementalReverseSearchHistory","nonIncrementalForwardSearchHistory","190","yankLastArg","killWord","backwardKillWord","yankPop","metaShiftCodes","188","beginningOfHistory","endOfHistory","189","metaCtrlCodes","yankNthArg","altKey","ctrlKey","keyCode","preventDefault","shiftKey","change","insert","replace","lastCommand","searchText","searchInit","textInsert","triggerSearch","assign","consoleInsert","paste","clipboardData","getData","promptText","movePoint","nextWord","previousWord","continue","command_1","history_1","history","restoreText","historyn","handler","rotateHistory","searchDirection","searchHistory","historySearchBackward","historySearchForward","historySubstringSearchBackward","historySubstringSearchForward","kill","unshift","killn","killWholeLine","rotateRing","words","split","curr","completions","i","cancel","text","n","max","pos","ringn","ring","circular","direction","next","inc","entry","indexOf","scrollSemaphore","container","scrollTop","scrollHeight","offsetHeight","scrollIfBottomTrue","rect","getBoundingClientRect","top","left","bottom","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","scrollIntoView","promptLabel","autofocus","search","exec","onClick","welcomeMessage","concat","style","overflow","height","width","autoComplete","autoCorrect","autoCapitalize","spellCheck","outline","color","backgroundColor","border","resize","onBlur","onKeyDown","onChange","onPaste","defineProperty","default"],"mappings":"AAAA,GAAIA,SACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,E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F0yBCpC,EAAQmQ,QAAUhM,GAKb,SAAUlE,EAAQD,KAMlB,SAAUC,EAAQD,GG5+BxBC,EAAAD,QAAAkB","file":"react-console.min.js","sourcesContent":["var Console =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar __extends = (this && this.__extends) || function (d, b) {\n\t for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n\t function __() { this.constructor = d; }\n\t d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n\t};\n\tvar React = __webpack_require__(2);\n\t__webpack_require__(1);\n\tvar ConsolePrompt = (function (_super) {\n\t __extends(ConsolePrompt, _super);\n\t function ConsolePrompt() {\n\t _super.apply(this, arguments);\n\t this.child = {};\n\t // DOM Management\n\t this.updateSemaphore = 0;\n\t }\n\t // Component Lifecycle\n\t ConsolePrompt.prototype.componentDidMount = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.componentDidUpdate = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.idle = function () {\n\t var _this = this;\n\t // Blink cursor when idle\n\t if (this.child.cursor) {\n\t if (this.updateSemaphore == 0) {\n\t this.child.cursor.className = \"react-console-cursor\";\n\t }\n\t this.updateSemaphore++;\n\t window.setTimeout(function () {\n\t _this.updateSemaphore--;\n\t if (_this.updateSemaphore == 0 && _this.child.cursor) {\n\t _this.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t }\n\t }, 1000);\n\t }\n\t };\n\t ConsolePrompt.prototype.renderValue = function () {\n\t var _this = this;\n\t if (this.props.point < 0) {\n\t return [this.props.value];\n\t }\n\t else if (this.props.point == this.props.value.length) {\n\t return [this.props.value, React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, \" \")];\n\t }\n\t else {\n\t return [this.props.value.substring(0, this.props.point),\n\t React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, this.props.value.substring(this.props.point, this.props.point + 1)),\n\t this.props.value.substring(this.props.point + 1)];\n\t }\n\t };\n\t ConsolePrompt.prototype.render = function () {\n\t var label = this.props.label;\n\t if (this.props.argument) {\n\t var idx = label.lastIndexOf(\"\\n\");\n\t if (idx >= 0) {\n\t label = label.substring(0, idx + 1);\n\t }\n\t else {\n\t label = '';\n\t }\n\t }\n\t return React.createElement(\"div\", {className: \"react-console-prompt-box\"}, React.createElement(\"span\", {className: \"react-console-prompt-label\"}, label), React.createElement(\"span\", {className: \"react-console-prompt-argument\"}, this.props.argument), React.createElement(\"span\", {className: \"react-console-prompt\"}, this.renderValue()));\n\t };\n\t ConsolePrompt.defaultProps = {\n\t point: -1,\n\t value: \"\",\n\t label: \"> \",\n\t argument: null,\n\t };\n\t return ConsolePrompt;\n\t}(React.Component));\n\tvar ConsoleTableHeader = function (props) {\n\t if (props.headers) {\n\t return React.createElement(\"thead\", null, React.createElement(\"tr\", null, props.headers.map(function (header) {\n\t return React.createElement(\"th\", {scope: \"col\", key: header}, header);\n\t })));\n\t }\n\t return null;\n\t};\n\tvar ConsoleMessage = function (props) {\n\t if (props.isTable) {\n\t var data = props.value[0];\n\t return React.createElement(\"div\", {className: \"react-console-message react-console-table\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, React.createElement(\"table\", null, React.createElement(ConsoleTableHeader, {headers: data.headers}), React.createElement(\"tbody\", null, data.rows && data.rows.map(function (row, index) {\n\t return React.createElement(\"tr\", {key: index}, row.map(function (cell, cellIndex) {\n\t return React.createElement(\"td\", {key: cellIndex}, cell);\n\t }));\n\t }))));\n\t }\n\t else {\n\t return React.createElement(\"div\", {className: \"react-console-message\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, props.value.map(function (val) {\n\t if (typeof val == 'string') {\n\t return val;\n\t }\n\t else {\n\t return JSON.stringify(val);\n\t }\n\t }).join(\"\\n\"));\n\t }\n\t};\n\tConsoleMessage.defaultProps = {\n\t type: null,\n\t value: [],\n\t isTable: false\n\t};\n\t;\n\t;\n\tvar default_1 = (function (_super) {\n\t __extends(default_1, _super);\n\t function default_1(props) {\n\t var _this = this;\n\t _super.call(this, props);\n\t this.child = {};\n\t // Command API\n\t this.updateLastLog = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.state.log;\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t var indexToReplace = log[_this.state.log.length - 1].message.length > 0 ? log[_this.state.log.length - 1].message.length - 1 : 0;\n\t log[_this.state.log.length - 1].message[indexToReplace] = { value: messages };\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.log = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.state.log;\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t log[_this.state.log.length - 1].message.push({ value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logX = function (type) {\n\t var messages = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t messages[_i - 1] = arguments[_i];\n\t }\n\t var log = _this.state.log;\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t log[_this.state.log.length - 1].message.push({ type: type, value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logTable = function (tableData, type) {\n\t var log = _this.state.log;\n\t if (type) {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, type: type, value: [tableData] });\n\t }\n\t else {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, value: [tableData] });\n\t }\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.return = function () {\n\t _this.setState({\n\t acceptInput: true,\n\t currLabel: _this.nextLabel(),\n\t }, _this.scrollIfBottom());\n\t };\n\t // Event Handlers\n\t this.focus = function () {\n\t if (!window.getSelection().toString()) {\n\t _this.child.typer.focus();\n\t _this.setState({ focus: true }, _this.scrollToBottom);\n\t }\n\t };\n\t this.blur = function () {\n\t _this.setState({ focus: false });\n\t };\n\t this.keyDown = function (e) {\n\t var keyCodes = {\n\t // return\n\t 13: _this.acceptLine,\n\t // left\n\t 37: _this.backwardChar,\n\t // right\n\t 39: _this.forwardChar,\n\t // up\n\t 38: _this.previousHistory,\n\t // down\n\t 40: _this.nextHistory,\n\t // backspace\n\t 8: _this.backwardDeleteChar,\n\t // delete\n\t 46: _this.deleteChar,\n\t // end\n\t 35: _this.endOfLine,\n\t // start\n\t 36: _this.beginningOfLine,\n\t // tab\n\t 9: _this.complete,\n\t // esc\n\t 27: _this.prefixMeta,\n\t };\n\t var ctrlCodes = {\n\t // C-a\n\t 65: _this.beginningOfLine,\n\t // C-e\n\t 69: _this.endOfLine,\n\t // C-f\n\t 70: _this.forwardChar,\n\t // C-b\n\t 66: _this.backwardChar,\n\t // C-l\n\t 76: _this.clearScreen,\n\t // C-p\n\t 80: _this.previousHistory,\n\t // C-n\n\t 78: _this.nextHistory,\n\t // C-r\n\t 82: _this.reverseSearchHistory,\n\t // C-s\n\t 83: _this.forwardSearchHistory,\n\t // C-d\n\t 68: _this.deleteChar,\n\t // C-q TODO\n\t //81: this.quotedInsert,\n\t // C-v TODO\n\t //86: this.quotedInsert,\n\t // C-t TODO\n\t //84: this.transposeChars,\n\t // C-k\n\t 75: _this.killLine,\n\t // C-u\n\t 85: _this.backwardKillLine,\n\t // C-y TODO\n\t 89: _this.yank,\n\t // C-c\n\t 67: _this.cancelCommand,\n\t };\n\t var ctrlXCodes = {\n\t // C-x Rubout\n\t 8: _this.backwardKillLine,\n\t };\n\t var ctrlShiftCodes = {};\n\t var metaCodes = {\n\t // M-f\n\t 70: _this.forwardWord,\n\t // M-b\n\t 66: _this.backwardWord,\n\t // M-p\n\t 80: _this.nonIncrementalReverseSearchHistory,\n\t // M-n\n\t 78: _this.nonIncrementalForwardSearchHistory,\n\t // M-.\n\t 190: _this.yankLastArg,\n\t // M-TAB TODO\n\t //9: this.tabInsert,\n\t // M-t TODO\n\t //84: this.transposeWords,\n\t // M-u TODO\n\t //85: this.upcaseWord,\n\t // M-l TODO\n\t //76: this.downcaseWord,\n\t // M-c TODO\n\t //67: this.capitalizeWord,\n\t // M-d\n\t 68: _this.killWord,\n\t // M-backspace\n\t 8: _this.backwardKillWord,\n\t // M-w TODO\n\t //87: this.unixWordRubout,\n\t // M-\\ TODO\n\t //220: this.deleteHorizontalSpace,\n\t // M-y\n\t 89: _this.yankPop,\n\t };\n\t var metaShiftCodes = {\n\t // M-<\n\t 188: _this.beginningOfHistory,\n\t // M->\n\t 190: _this.endOfHistory,\n\t // M-_\n\t 189: _this.yankLastArg,\n\t };\n\t var metaCtrlCodes = {\n\t // M-C-y\n\t 89: _this.yankNthArg,\n\t };\n\t if (_this.state.acceptInput) {\n\t if (e.altKey) {\n\t if (e.ctrlKey) {\n\t if (e.keyCode in metaCtrlCodes) {\n\t metaCtrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.shiftKey) {\n\t if (e.keyCode in metaShiftCodes) {\n\t metaShiftCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.keyCode in metaCodes) {\n\t metaCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.ctrlKey) {\n\t if (e.keyCode in ctrlCodes) {\n\t ctrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.keyCode in keyCodes) {\n\t keyCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t };\n\t this.change = function () {\n\t var idx = 0;\n\t for (; idx < _this.state.typer.length && idx < _this.child.typer.value.length; idx++) {\n\t if (_this.state.typer[idx] != _this.child.typer.value[idx]) {\n\t break;\n\t }\n\t }\n\t var insert = _this.child.typer.value.substring(idx);\n\t var replace = _this.state.typer.length - idx;\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText, replace),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert, replace), {\n\t typer: _this.child.typer.value,\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t this.paste = function (e) {\n\t var insert = e.clipboardData.getData('text');\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert), {\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t e.preventDefault();\n\t };\n\t // Commands for Moving\n\t this.beginningOfLine = function () {\n\t _this.setState({\n\t point: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.endOfLine = function () {\n\t _this.setState({\n\t point: _this.state.promptText.length,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardWord = function () {\n\t _this.setState({\n\t point: _this.nextWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardWord = function () {\n\t _this.setState({\n\t point: _this.previousWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t // Commands for Manipulating the History\n\t this.acceptLine = function () {\n\t _this.child.typer.value = \"\";\n\t if (_this.props.continue(_this.state.promptText)) {\n\t _this.setState(Object.assign(_this.consoleInsert(\"\\n\"), {\n\t typer: \"\",\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t var command_1 = _this.state.promptText;\n\t var history_1 = _this.state.history;\n\t var log = _this.state.log;\n\t if (!history_1 || history_1[history_1.length - 1] != command_1) {\n\t history_1.push(command_1);\n\t }\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: command_1,\n\t message: []\n\t });\n\t _this.setState({\n\t acceptInput: false,\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t history: history_1,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, function () {\n\t _this.scrollToBottom();\n\t if (_this.props.handler) {\n\t _this.props.handler(command_1);\n\t }\n\t else {\n\t _this.return();\n\t }\n\t });\n\t }\n\t };\n\t this.previousHistory = function () {\n\t _this.rotateHistory(-1);\n\t };\n\t this.nextHistory = function () {\n\t _this.rotateHistory(1);\n\t };\n\t this.beginningOfHistory = function () {\n\t _this.rotateHistory(-_this.state.history.length);\n\t };\n\t this.endOfHistory = function () {\n\t _this.rotateHistory(_this.state.history.length);\n\t };\n\t this.triggerSearch = function () {\n\t if (_this.state.searchDirection == 0 /* Reverse */) {\n\t _this.reverseSearchHistory();\n\t }\n\t else {\n\t _this.forwardSearchHistory();\n\t }\n\t };\n\t this.reverseSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(0 /* Reverse */, true), {\n\t argument: \"(reverse-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 0 /* Reverse */,\n\t searchInit: true,\n\t argument: \"(reverse-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.forwardSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(1 /* Forward */, true), {\n\t argument: \"(forward-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 1 /* Forward */,\n\t searchInit: true,\n\t argument: \"(forward-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.clearScreen = function () {\n\t _this.setState({ log: [] });\n\t };\n\t this.nonIncrementalReverseSearchHistory = function () {\n\t // TODO\n\t };\n\t this.nonIncrementalForwardSearchHistory = function () {\n\t // TODO\n\t };\n\t this.historySearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySearchForward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchForward = function () {\n\t // TODO\n\t };\n\t this.yankNthArg = function () {\n\t // TODO\n\t };\n\t this.yankLastArg = function () {\n\t // TODO\n\t };\n\t // Commands for Changing Text\n\t this.deleteChar = function () {\n\t if (_this.state.point < _this.state.promptText.length) {\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.state.point + 1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.backwardDeleteChar = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchText.substring(0, _this.state.searchText.length - 1),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else if (_this.state.point > 0) {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t promptText: _this.state.promptText.substring(0, _this.state.point - 1)\n\t + _this.state.promptText.substring(_this.state.point),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t // Killing and Yanking\n\t this.killLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(0, _this.state.point));\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWholeLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point)\n\t + kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText);\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: '',\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point, _this.nextWord());\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point, _this.nextWord()));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.nextWord()),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(_this.previousWord(), _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.previousWord(), _this.state.point));\n\t }\n\t _this.setState({\n\t point: _this.previousWord(),\n\t promptText: _this.state.promptText.substring(0, _this.previousWord())\n\t + _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.yank = function () {\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[_this.state.killn]), {\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t };\n\t this.yankPop = function () {\n\t if (_this.state.lastCommand == 3 /* Yank */) {\n\t var killn = _this.rotateRing(1, _this.state.killn, _this.state.kill.length);\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[killn], _this.state.kill[_this.state.killn].length), {\n\t killn: killn,\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t // Numeric Arguments\n\t // Completing\n\t this.complete = function () {\n\t if (_this.props.complete) {\n\t // Split text and find current word\n\t var words = _this.state.promptText.split(\" \");\n\t var curr = 0;\n\t var idx = words[0].length;\n\t while (idx < _this.state.point && curr + 1 < words.length) {\n\t idx += words[++curr].length + 1;\n\t }\n\t var completions = _this.props.complete(words, curr, _this.state.promptText);\n\t if (completions.length == 1) {\n\t // Perform completion\n\t words[curr] = completions[0];\n\t var point = -1;\n\t for (var i = 0; i <= curr; i++) {\n\t point += words[i].length + 1;\n\t }\n\t _this.setState({\n\t point: point,\n\t promptText: words.join(\" \"),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else if (completions.length > 1) {\n\t // show completions\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: [{\n\t type: \"completion\",\n\t value: [completions.join(\"\\t\")],\n\t }]\n\t });\n\t _this.setState({\n\t currLabel: _this.nextLabel(),\n\t log: log,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t }\n\t };\n\t // Keyboard Macros\n\t // Miscellaneous\n\t this.prefixMeta = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t });\n\t }\n\t // TODO Meta prefixed state\n\t };\n\t this.cancelCommand = function () {\n\t if (_this.state.acceptInput) {\n\t _this.child.typer.value = \"\";\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: []\n\t });\n\t _this.setState({\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t _this.props.cancel();\n\t }\n\t };\n\t // Helper functions\n\t this.textInsert = function (insert, text, replace, point) {\n\t if (replace === void 0) { replace = 0; }\n\t if (point === void 0) { point = text.length; }\n\t return text.substring(0, point - replace) + insert + text.substring(point);\n\t };\n\t this.consoleInsert = function (insert, replace) {\n\t if (replace === void 0) { replace = 0; }\n\t var promptText = _this.textInsert(insert, _this.state.promptText, replace, _this.state.point);\n\t return {\n\t point: _this.movePoint(insert.length - replace, insert.length - replace + _this.state.promptText.length),\n\t promptText: promptText,\n\t restoreText: promptText,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t };\n\t this.movePoint = function (n, max) {\n\t if (max === void 0) { max = _this.state.promptText.length; }\n\t var pos = _this.state.point + n;\n\t if (pos < 0) {\n\t return 0;\n\t }\n\t if (pos > max) {\n\t return max;\n\t }\n\t else {\n\t return pos;\n\t }\n\t };\n\t this.rotateRing = function (n, ringn, ring, circular) {\n\t if (circular === void 0) { circular = true; }\n\t if (ring == 0)\n\t return 0;\n\t if (circular) {\n\t return (ring + (ringn + n) % ring) % ring;\n\t }\n\t else {\n\t ringn = ringn - n;\n\t if (ringn < 0) {\n\t return 0;\n\t }\n\t else if (ringn >= ring) {\n\t return ring;\n\t }\n\t else {\n\t return ringn;\n\t }\n\t }\n\t };\n\t this.rotateHistory = function (n) {\n\t var historyn = _this.rotateRing(n, _this.state.historyn, _this.state.history.length, false);\n\t if (historyn == 0) {\n\t _this.setState({\n\t point: _this.state.restoreText.length,\n\t promptText: _this.state.restoreText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t var promptText = _this.state.history[_this.state.history.length - historyn];\n\t _this.setState({\n\t point: promptText.length,\n\t promptText: promptText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.searchHistory = function (direction, next) {\n\t if (direction === void 0) { direction = _this.state.searchDirection; }\n\t if (next === void 0) { next = false; }\n\t var idx = _this.state.historyn;\n\t var inc = (direction == 0 /* Reverse */) ? 1 : -1;\n\t if (next) {\n\t idx = idx + inc;\n\t }\n\t for (; idx > 0 && idx <= _this.state.history.length; idx = idx + inc) {\n\t var entry = _this.state.history[_this.state.history.length - idx];\n\t var point = entry.indexOf(_this.state.searchText);\n\t if (point > -1) {\n\t return {\n\t point: point,\n\t promptText: entry,\n\t searchDirection: direction,\n\t searchInit: false,\n\t historyn: idx,\n\t };\n\t }\n\t }\n\t return {\n\t searchDirection: direction,\n\t searchInit: false,\n\t };\n\t };\n\t // DOM management\n\t this.scrollSemaphore = 0;\n\t this.scrollIfBottom = function () {\n\t if (_this.scrollSemaphore > 0 || _this.child.container.scrollTop == _this.child.container.scrollHeight - _this.child.container.offsetHeight) {\n\t _this.scrollSemaphore++;\n\t return _this.scrollIfBottomTrue;\n\t }\n\t else {\n\t return null;\n\t }\n\t };\n\t this.scrollIfBottomTrue = function () {\n\t _this.scrollToBottom();\n\t _this.scrollSemaphore--;\n\t };\n\t this.scrollToBottom = function () {\n\t _this.child.container.scrollTop = _this.child.container.scrollHeight;\n\t var rect = _this.child.focus.getBoundingClientRect();\n\t if (rect.top < 0 || rect.left < 0 ||\n\t rect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t rect.right > (window.innerWidth || document.documentElement.clientWidth)) {\n\t _this.child.typer.scrollIntoView(false);\n\t }\n\t };\n\t this.nextLabel = function () {\n\t if (typeof _this.props.promptLabel === \"string\") {\n\t return _this.props.promptLabel;\n\t }\n\t else {\n\t return _this.props.promptLabel();\n\t }\n\t };\n\t this.state = {\n\t focus: false,\n\t acceptInput: true,\n\t typer: '',\n\t point: 0,\n\t currLabel: this.nextLabel(),\n\t promptText: '',\n\t restoreText: '',\n\t searchText: '',\n\t searchDirection: null,\n\t searchInit: false,\n\t log: [],\n\t history: [],\n\t historyn: 0,\n\t kill: [],\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t }\n\t // Component Lifecycle\n\t default_1.prototype.componentDidMount = function () {\n\t if (this.props.autofocus) {\n\t this.focus();\n\t }\n\t };\n\t default_1.prototype.nextWord = function () {\n\t // Find first alphanumeric char after first non-alphanumeric char\n\t var search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t if (search) {\n\t return search.index + this.state.point + 1;\n\t }\n\t else {\n\t return this.state.promptText.length;\n\t }\n\t };\n\t default_1.prototype.previousWord = function () {\n\t // Find first non-alphanumeric char after first alphanumeric char in reverse\n\t var search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0, this.state.point - 1));\n\t if (search) {\n\t return search.index + 1;\n\t }\n\t else {\n\t return 0;\n\t }\n\t };\n\t default_1.prototype.render = function () {\n\t var _this = this;\n\t return React.createElement(\"div\", {ref: function (ref) { return _this.child.container = ref; }, className: \"react-console-container \" + (this.state.focus ? \"react-console-focus\" : \"react-console-nofocus\"), onClick: this.focus}, this.props.welcomeMessage ?\n\t React.createElement(\"div\", {className: \"react-console-message react-console-welcome\"}, this.props.welcomeMessage)\n\t : null, this.state.log.map(function (val) {\n\t return [\n\t React.createElement(ConsolePrompt, {label: val.label, value: val.command})\n\t ].concat(val.message.map(function (val, idx) {\n\t return React.createElement(ConsoleMessage, {key: idx, type: val.type, value: val.value, isTable: val.isTable});\n\t }));\n\t }), this.state.acceptInput ?\n\t React.createElement(ConsolePrompt, {label: this.state.currLabel, value: this.state.promptText, point: this.state.point, argument: this.state.argument})\n\t : null, React.createElement(\"div\", {style: { overflow: \"hidden\", height: 1, width: 1 }}, React.createElement(\"textarea\", {ref: function (ref) { return _this.child.typer = ref; }, className: \"react-console-typer\", autoComplete: \"off\", autoCorrect: \"off\", autoCapitalize: \"off\", spellCheck: \"false\", style: { outline: \"none\",\n\t color: \"transparent\",\n\t backgroundColor: \"transparent\",\n\t border: \"none\",\n\t resize: \"none\",\n\t overflow: \"hidden\",\n\t }, onBlur: this.blur, onKeyDown: this.keyDown, onChange: this.change, onPaste: this.paste})), React.createElement(\"div\", {ref: function (ref) { return _this.child.focus = ref; }}, \" \"));\n\t };\n\t default_1.defaultProps = {\n\t promptLabel: '> ',\n\t continue: function () { return false; },\n\t cancel: function () { },\n\t };\n\t return default_1;\n\t}(React.Component));\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = default_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = React;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// react-console.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6620d61878a57e14e7ae","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: string[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: string, cellIndex: number) => { \n\t\t\t\t\t\t\t\treturn ; })\n\t\t\t\t\t\t\t};\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn val;\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}).join(\"\\n\")}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.state.log;\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///react-console.min.js","webpack:///webpack/bootstrap 32c572a60155f66562e7","webpack:///./react-console.tsx","webpack:///external \"React\""],"names":["Console","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","__extends","this","d","b","__","constructor","hasOwnProperty","prototype","Object","create","React","ConsolePrompt","_super","apply","arguments","child","updateSemaphore","componentDidMount","idle","componentDidUpdate","_this","cursor","className","window","setTimeout","renderValue","props","point","value","length","createElement","ref","key","substring","render","label","argument","idx","lastIndexOf","defaultProps","Component","ConsoleTableHeader","headers","map","header","scope","ConsoleMessage","isTable","data","type","rows","row","index","cell","cellIndex","href","target","text","JSON","stringify","val","i","default_1","updateLastLog","messages","_i","log","state","push","command","message","indexToReplace","setState","scrollIfBottom","logX","logTable","tableData","return","acceptInput","currLabel","nextLabel","focus","getSelection","toString","typer","scrollToBottom","blur","keyDown","e","keyCodes","13","acceptLine","37","backwardChar","39","forwardChar","38","previousHistory","40","nextHistory","8","backwardDeleteChar","46","deleteChar","35","endOfLine","36","beginningOfLine","9","complete","27","prefixMeta","ctrlCodes","65","69","70","66","76","clearScreen","80","78","82","reverseSearchHistory","83","forwardSearchHistory","68","75","killLine","85","backwardKillLine","89","yank","67","cancelCommand","metaCodes","forwardWord","backwardWord","nonIncrementalReverseSearchHistory","nonIncrementalForwardSearchHistory","190","yankLastArg","killWord","backwardKillWord","yankPop","metaShiftCodes","188","beginningOfHistory","endOfHistory","189","metaCtrlCodes","yankNthArg","altKey","ctrlKey","keyCode","preventDefault","shiftKey","change","insert","replace","lastCommand","searchText","searchInit","textInsert","triggerSearch","assign","consoleInsert","paste","clipboardData","getData","promptText","movePoint","nextWord","previousWord","continue","command_1","history_1","history","restoreText","historyn","handler","rotateHistory","searchDirection","searchHistory","historySearchBackward","historySearchForward","historySubstringSearchBackward","historySubstringSearchForward","kill","unshift","killn","killWholeLine","rotateRing","words","split","curr","completions","join","cancel","n","max","pos","ringn","ring","circular","direction","next","inc","entry","indexOf","scrollSemaphore","container","scrollTop","scrollHeight","offsetHeight","scrollIfBottomTrue","rect","getBoundingClientRect","top","left","bottom","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","scrollIntoView","promptLabel","autofocus","search","exec","onClick","welcomeMessage","concat","style","overflow","height","width","autoComplete","autoCorrect","autoCapitalize","spellCheck","outline","color","backgroundColor","border","resize","onBlur","onKeyDown","onChange","onPaste","defineProperty","default"],"mappings":"AAAA,GAAIA,SACK,SAAUC,GCGnB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDOM,SAAUI,EAAQD,EAASH,GE7CjC,YFgDC,IAAIW,GAAaC,MAAQA,KAAKD,WAAc,SAAUE,EAAGC,GAErD,QAASC,KAAOH,KAAKI,YAAcH,EADnC,IAAK,GAAIH,KAAKI,GAAOA,EAAEG,eAAeP,KAAIG,EAAEH,GAAKI,EAAEJ,GAEnDG,GAAEK,UAAkB,OAANJ,EAAaK,OAAOC,OAAON,IAAMC,EAAGG,UAAYJ,EAAEI,UAAW,GAAIH,KEjDxEM,EAAKrB,EAAM,EAEvBA,GAAO,EAQP,IAAAsB,GAAA,SAAAC,GAAA,QAAAD,KAA4BC,EAAAC,MAAAZ,KAAAa,WAO3Bb,KAAAc,SAWAd,KAAAe,gBAA0B,EA2C3B,MA7D4BhB,GAAAW,EAAAC,GAW3BD,EAAAJ,UAAAU,kBAAA,WACChB,KAAKiB,QAENP,EAAAJ,UAAAY,mBAAA,WACClB,KAAKiB,QAINP,EAAAJ,UAAAW,KAAA,cAAAE,GAAAnB,IAEIA,MAAKc,MAAMM,SACc,GAAxBpB,KAAKe,kBACPf,KAAKc,MAAMM,OAAOC,UAA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B,EAAiBvB,GACrC,MAAO3B,GAAAoB,cAACgB,GAAed,IAAKK,EAAKY,KAAMW,EAAIX,KAAMrB,MAAOgC,EAAIhC,MAAOmB,QAASa,EAAIb,eAIlF9C,KAAKkE,MAAMW,YACXpE,EAAAoB,cAACnB,GACAwB,MAAOlC,KAAKkE,MAAMY,UAClBnD,MAAO3B,KAAKkE,MAAMsG,WAClB9I,MAAO1B,KAAKkE,MAAMxC,MAClBS,SAAUnC,KAAKkE,MAAM/B,WAEpB,KAEH1B,EAAAoB,cAAA,OAAK6M,OAASC,SAAU,SAAUC,OAAQ,EAAGC,MAAO,IACnDpO,EAAAoB,cAAA,YACCC,IAAK,SAAAA,GAAO,MAAAX,GAAKL,MAAMqE,MAAQrD,GAC/BT,UAAU,sBACVyN,aAAa,MACbC,YAAY,MACZC,eAAe,MACfC,WAAW,QACXP,OAASQ,QAAS,OACjBC,MAAO,cACPC,gBAAiB,cACjBC,OAAQ,OACRC,OAAQ,OACRX,SAAU,UAEXY,OAAQvP,KAAKqF,KACbmK,UAAWxP,KAAKsF,QAChBmK,SAAUzP,KAAK2J,OACf+F,QAAS1P,KAAKqK,SAGhB5J,EAAAoB,cAAA,OAAKC,IAAK,SAAAA,GAAO,MAAAX,GAAKL,MAAMkE,MAAQlD,IAAI,OAl2BnC+B,EAAAvB,cACN6L,YAAa,KACbvD,SAAU,WAAa,OAAO,GAC9BwB,OAAQ,cAk2BVvI,GA53B6BpD,EAAM8B,UAAnChC,QAAAoP,eAAApQ,EAAA,cAAAoC,OAAA,IF0yBCpC,EAAQqQ,QAAU/L,GAKb,SAAUrE,EAAQD,KAMlB,SAAUC,EAAQD,GGv/BxBC,EAAAD,QAAAkB","file":"react-console.min.js","sourcesContent":["var Console =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\tvar __extends = (this && this.__extends) || function (d, b) {\n\t for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n\t function __() { this.constructor = d; }\n\t d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n\t};\n\tvar React = __webpack_require__(2);\n\t__webpack_require__(1);\n\tvar ConsolePrompt = (function (_super) {\n\t __extends(ConsolePrompt, _super);\n\t function ConsolePrompt() {\n\t _super.apply(this, arguments);\n\t this.child = {};\n\t // DOM Management\n\t this.updateSemaphore = 0;\n\t }\n\t // Component Lifecycle\n\t ConsolePrompt.prototype.componentDidMount = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.componentDidUpdate = function () {\n\t this.idle();\n\t };\n\t ConsolePrompt.prototype.idle = function () {\n\t var _this = this;\n\t // Blink cursor when idle\n\t if (this.child.cursor) {\n\t if (this.updateSemaphore == 0) {\n\t this.child.cursor.className = \"react-console-cursor\";\n\t }\n\t this.updateSemaphore++;\n\t window.setTimeout(function () {\n\t _this.updateSemaphore--;\n\t if (_this.updateSemaphore == 0 && _this.child.cursor) {\n\t _this.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t }\n\t }, 1000);\n\t }\n\t };\n\t ConsolePrompt.prototype.renderValue = function () {\n\t var _this = this;\n\t if (this.props.point < 0) {\n\t return [this.props.value];\n\t }\n\t else if (this.props.point == this.props.value.length) {\n\t return [this.props.value, React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, \" \")];\n\t }\n\t else {\n\t return [this.props.value.substring(0, this.props.point),\n\t React.createElement(\"span\", {ref: function (ref) { return _this.child.cursor = ref; }, key: \"cursor\", className: \"react-console-cursor\"}, this.props.value.substring(this.props.point, this.props.point + 1)),\n\t this.props.value.substring(this.props.point + 1)];\n\t }\n\t };\n\t ConsolePrompt.prototype.render = function () {\n\t var label = this.props.label;\n\t if (this.props.argument) {\n\t var idx = label.lastIndexOf(\"\\n\");\n\t if (idx >= 0) {\n\t label = label.substring(0, idx + 1);\n\t }\n\t else {\n\t label = '';\n\t }\n\t }\n\t return React.createElement(\"div\", {className: \"react-console-prompt-box\"}, React.createElement(\"span\", {className: \"react-console-prompt-label\"}, label), React.createElement(\"span\", {className: \"react-console-prompt-argument\"}, this.props.argument), React.createElement(\"span\", {className: \"react-console-prompt\"}, this.renderValue()));\n\t };\n\t ConsolePrompt.defaultProps = {\n\t point: -1,\n\t value: \"\",\n\t label: \"> \",\n\t argument: null,\n\t };\n\t return ConsolePrompt;\n\t}(React.Component));\n\tvar ConsoleTableHeader = function (props) {\n\t if (props.headers) {\n\t return React.createElement(\"thead\", null, React.createElement(\"tr\", null, props.headers.map(function (header) {\n\t return React.createElement(\"th\", {scope: \"col\", key: header}, header);\n\t })));\n\t }\n\t return null;\n\t};\n\tvar ConsoleMessage = function (props) {\n\t if (props.isTable) {\n\t var data = props.value[0];\n\t return React.createElement(\"div\", {className: \"react-console-message react-console-table\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, React.createElement(\"table\", null, React.createElement(ConsoleTableHeader, {headers: data.headers}), React.createElement(\"tbody\", null, data.rows && data.rows.map(function (row, index) {\n\t return React.createElement(\"tr\", {key: index}, row.map(function (cell, cellIndex) {\n\t if (typeof cell === 'string') {\n\t return React.createElement(\"td\", {key: cellIndex}, cell);\n\t }\n\t else if (typeof cell === 'object' && cell.type === 'link') {\n\t return React.createElement(\"td\", {key: cellIndex}, React.createElement(\"a\", {href: cell.href, target: cell.target ? cell.target : ''}, cell.text));\n\t }\n\t else {\n\t return React.createElement(\"td\", {key: cellIndex}, JSON.stringify(cell));\n\t }\n\t }));\n\t }))));\n\t }\n\t else {\n\t return React.createElement(\"div\", {className: \"react-console-message\" + (props.type ? \" react-console-message-\" + props.type : \"\")}, props.value.map(function (val, i) {\n\t if (typeof val == 'string') {\n\t return React.createElement(\"div\", {key: i}, val);\n\t }\n\t else if (typeof val === 'object' && val.type === 'link') {\n\t return React.createElement(\"div\", {key: i}, React.createElement(\"a\", {href: val.href, target: val.target ? val.target : ''}, val.text));\n\t }\n\t else {\n\t return React.createElement(\"div\", {key: i}, JSON.stringify(val));\n\t }\n\t }));\n\t }\n\t};\n\tConsoleMessage.defaultProps = {\n\t type: null,\n\t value: [],\n\t isTable: false\n\t};\n\t;\n\t;\n\tvar default_1 = (function (_super) {\n\t __extends(default_1, _super);\n\t function default_1(props) {\n\t var _this = this;\n\t _super.call(this, props);\n\t this.child = {};\n\t // Command API\n\t this.updateLastLog = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.state.log;\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t var indexToReplace = log[_this.state.log.length - 1].message.length > 0 ? log[_this.state.log.length - 1].message.length - 1 : 0;\n\t log[_this.state.log.length - 1].message[indexToReplace] = { value: messages };\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.log = function () {\n\t var messages = [];\n\t for (var _i = 0; _i < arguments.length; _i++) {\n\t messages[_i - 0] = arguments[_i];\n\t }\n\t var log = _this.state.log;\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t log[_this.state.log.length - 1].message.push({ value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logX = function (type) {\n\t var messages = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t messages[_i - 1] = arguments[_i];\n\t }\n\t var log = _this.state.log;\n\t if (!log.length) {\n\t log.push({ label: '', command: '', message: [] });\n\t }\n\t log[_this.state.log.length - 1].message.push({ type: type, value: messages });\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.logTable = function (tableData, type) {\n\t var log = _this.state.log;\n\t if (type) {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, type: type, value: [tableData] });\n\t }\n\t else {\n\t log[_this.state.log.length - 1].message.push({ isTable: true, value: [tableData] });\n\t }\n\t _this.setState({\n\t log: log,\n\t }, _this.scrollIfBottom());\n\t };\n\t this.return = function () {\n\t _this.setState({\n\t acceptInput: true,\n\t currLabel: _this.nextLabel(),\n\t }, _this.scrollIfBottom());\n\t };\n\t // Event Handlers\n\t this.focus = function () {\n\t if (!window.getSelection().toString()) {\n\t _this.child.typer.focus();\n\t _this.setState({ focus: true }, _this.scrollToBottom);\n\t }\n\t };\n\t this.blur = function () {\n\t _this.setState({ focus: false });\n\t };\n\t this.keyDown = function (e) {\n\t var keyCodes = {\n\t // return\n\t 13: _this.acceptLine,\n\t // left\n\t 37: _this.backwardChar,\n\t // right\n\t 39: _this.forwardChar,\n\t // up\n\t 38: _this.previousHistory,\n\t // down\n\t 40: _this.nextHistory,\n\t // backspace\n\t 8: _this.backwardDeleteChar,\n\t // delete\n\t 46: _this.deleteChar,\n\t // end\n\t 35: _this.endOfLine,\n\t // start\n\t 36: _this.beginningOfLine,\n\t // tab\n\t 9: _this.complete,\n\t // esc\n\t 27: _this.prefixMeta,\n\t };\n\t var ctrlCodes = {\n\t // C-a\n\t 65: _this.beginningOfLine,\n\t // C-e\n\t 69: _this.endOfLine,\n\t // C-f\n\t 70: _this.forwardChar,\n\t // C-b\n\t 66: _this.backwardChar,\n\t // C-l\n\t 76: _this.clearScreen,\n\t // C-p\n\t 80: _this.previousHistory,\n\t // C-n\n\t 78: _this.nextHistory,\n\t // C-r\n\t 82: _this.reverseSearchHistory,\n\t // C-s\n\t 83: _this.forwardSearchHistory,\n\t // C-d\n\t 68: _this.deleteChar,\n\t // C-q TODO\n\t //81: this.quotedInsert,\n\t // C-v TODO\n\t //86: this.quotedInsert,\n\t // C-t TODO\n\t //84: this.transposeChars,\n\t // C-k\n\t 75: _this.killLine,\n\t // C-u\n\t 85: _this.backwardKillLine,\n\t // C-y TODO\n\t 89: _this.yank,\n\t // C-c\n\t 67: _this.cancelCommand,\n\t };\n\t var ctrlXCodes = {\n\t // C-x Rubout\n\t 8: _this.backwardKillLine,\n\t };\n\t var ctrlShiftCodes = {};\n\t var metaCodes = {\n\t // M-f\n\t 70: _this.forwardWord,\n\t // M-b\n\t 66: _this.backwardWord,\n\t // M-p\n\t 80: _this.nonIncrementalReverseSearchHistory,\n\t // M-n\n\t 78: _this.nonIncrementalForwardSearchHistory,\n\t // M-.\n\t 190: _this.yankLastArg,\n\t // M-TAB TODO\n\t //9: this.tabInsert,\n\t // M-t TODO\n\t //84: this.transposeWords,\n\t // M-u TODO\n\t //85: this.upcaseWord,\n\t // M-l TODO\n\t //76: this.downcaseWord,\n\t // M-c TODO\n\t //67: this.capitalizeWord,\n\t // M-d\n\t 68: _this.killWord,\n\t // M-backspace\n\t 8: _this.backwardKillWord,\n\t // M-w TODO\n\t //87: this.unixWordRubout,\n\t // M-\\ TODO\n\t //220: this.deleteHorizontalSpace,\n\t // M-y\n\t 89: _this.yankPop,\n\t };\n\t var metaShiftCodes = {\n\t // M-<\n\t 188: _this.beginningOfHistory,\n\t // M->\n\t 190: _this.endOfHistory,\n\t // M-_\n\t 189: _this.yankLastArg,\n\t };\n\t var metaCtrlCodes = {\n\t // M-C-y\n\t 89: _this.yankNthArg,\n\t };\n\t if (_this.state.acceptInput) {\n\t if (e.altKey) {\n\t if (e.ctrlKey) {\n\t if (e.keyCode in metaCtrlCodes) {\n\t metaCtrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.shiftKey) {\n\t if (e.keyCode in metaShiftCodes) {\n\t metaShiftCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t else if (e.keyCode in metaCodes) {\n\t metaCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.ctrlKey) {\n\t if (e.keyCode in ctrlCodes) {\n\t ctrlCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t e.preventDefault();\n\t }\n\t else if (e.keyCode in keyCodes) {\n\t keyCodes[e.keyCode]();\n\t e.preventDefault();\n\t }\n\t }\n\t };\n\t this.change = function () {\n\t var idx = 0;\n\t for (; idx < _this.state.typer.length && idx < _this.child.typer.value.length; idx++) {\n\t if (_this.state.typer[idx] != _this.child.typer.value[idx]) {\n\t break;\n\t }\n\t }\n\t var insert = _this.child.typer.value.substring(idx);\n\t var replace = _this.state.typer.length - idx;\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText, replace),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert, replace), {\n\t typer: _this.child.typer.value,\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t this.paste = function (e) {\n\t var insert = e.clipboardData.getData('text');\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchInit ? insert : _this.textInsert(insert, _this.state.searchText),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else {\n\t _this.setState(Object.assign(_this.consoleInsert(insert), {\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t e.preventDefault();\n\t };\n\t // Commands for Moving\n\t this.beginningOfLine = function () {\n\t _this.setState({\n\t point: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.endOfLine = function () {\n\t _this.setState({\n\t point: _this.state.promptText.length,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardChar = function () {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.forwardWord = function () {\n\t _this.setState({\n\t point: _this.nextWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardWord = function () {\n\t _this.setState({\n\t point: _this.previousWord(),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t };\n\t // Commands for Manipulating the History\n\t this.acceptLine = function () {\n\t _this.child.typer.value = \"\";\n\t if (_this.props.continue(_this.state.promptText)) {\n\t _this.setState(Object.assign(_this.consoleInsert(\"\\n\"), {\n\t typer: \"\",\n\t lastCommand: 0 /* Default */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t var command_1 = _this.state.promptText;\n\t var history_1 = _this.state.history;\n\t var log = _this.state.log;\n\t if (!history_1 || history_1[history_1.length - 1] != command_1) {\n\t history_1.push(command_1);\n\t }\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: command_1,\n\t message: []\n\t });\n\t _this.setState({\n\t acceptInput: false,\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t history: history_1,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, function () {\n\t _this.scrollToBottom();\n\t if (_this.props.handler) {\n\t _this.props.handler(command_1);\n\t }\n\t else {\n\t _this.return();\n\t }\n\t });\n\t }\n\t };\n\t this.previousHistory = function () {\n\t _this.rotateHistory(-1);\n\t };\n\t this.nextHistory = function () {\n\t _this.rotateHistory(1);\n\t };\n\t this.beginningOfHistory = function () {\n\t _this.rotateHistory(-_this.state.history.length);\n\t };\n\t this.endOfHistory = function () {\n\t _this.rotateHistory(_this.state.history.length);\n\t };\n\t this.triggerSearch = function () {\n\t if (_this.state.searchDirection == 0 /* Reverse */) {\n\t _this.reverseSearchHistory();\n\t }\n\t else {\n\t _this.forwardSearchHistory();\n\t }\n\t };\n\t this.reverseSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(0 /* Reverse */, true), {\n\t argument: \"(reverse-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 0 /* Reverse */,\n\t searchInit: true,\n\t argument: \"(reverse-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.forwardSearchHistory = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState(Object.assign(_this.searchHistory(1 /* Forward */, true), {\n\t argument: \"(forward-i-search)`\" + _this.state.searchText + \"': \",\n\t lastCommand: 1 /* Search */,\n\t }), _this.scrollToBottom);\n\t }\n\t else {\n\t _this.setState({\n\t searchDirection: 1 /* Forward */,\n\t searchInit: true,\n\t argument: \"(forward-i-search)`': \",\n\t lastCommand: 1 /* Search */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.clearScreen = function () {\n\t _this.setState({ log: [] });\n\t };\n\t this.nonIncrementalReverseSearchHistory = function () {\n\t // TODO\n\t };\n\t this.nonIncrementalForwardSearchHistory = function () {\n\t // TODO\n\t };\n\t this.historySearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySearchForward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchBackward = function () {\n\t // TODO\n\t };\n\t this.historySubstringSearchForward = function () {\n\t // TODO\n\t };\n\t this.yankNthArg = function () {\n\t // TODO\n\t };\n\t this.yankLastArg = function () {\n\t // TODO\n\t };\n\t // Commands for Changing Text\n\t this.deleteChar = function () {\n\t if (_this.state.point < _this.state.promptText.length) {\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.state.point + 1),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.backwardDeleteChar = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t searchText: _this.state.searchText.substring(0, _this.state.searchText.length - 1),\n\t typer: _this.child.typer.value,\n\t }, _this.triggerSearch);\n\t }\n\t else if (_this.state.point > 0) {\n\t _this.setState({\n\t point: _this.movePoint(-1),\n\t promptText: _this.state.promptText.substring(0, _this.state.point - 1)\n\t + _this.state.promptText.substring(_this.state.point),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t // Killing and Yanking\n\t this.killLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(0, _this.state.point));\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWholeLine = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(0, _this.state.point)\n\t + kill[0] + _this.state.promptText.substring(_this.state.point);\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText);\n\t }\n\t _this.setState({\n\t point: 0,\n\t promptText: '',\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.killWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = kill[0] + _this.state.promptText.substring(_this.state.point, _this.nextWord());\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.state.point, _this.nextWord()));\n\t }\n\t _this.setState({\n\t promptText: _this.state.promptText.substring(0, _this.state.point)\n\t + _this.state.promptText.substring(_this.nextWord()),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.backwardKillWord = function () {\n\t var kill = _this.state.kill;\n\t if (_this.state.lastCommand == 2 /* Kill */) {\n\t kill[0] = _this.state.promptText.substring(_this.previousWord(), _this.state.point) + kill[0];\n\t }\n\t else {\n\t kill.unshift(_this.state.promptText.substring(_this.previousWord(), _this.state.point));\n\t }\n\t _this.setState({\n\t point: _this.previousWord(),\n\t promptText: _this.state.promptText.substring(0, _this.previousWord())\n\t + _this.state.promptText.substring(_this.state.point),\n\t kill: kill,\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 2 /* Kill */,\n\t }, _this.scrollToBottom);\n\t };\n\t this.yank = function () {\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[_this.state.killn]), {\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t };\n\t this.yankPop = function () {\n\t if (_this.state.lastCommand == 3 /* Yank */) {\n\t var killn = _this.rotateRing(1, _this.state.killn, _this.state.kill.length);\n\t _this.setState(Object.assign(_this.consoleInsert(_this.state.kill[killn], _this.state.kill[_this.state.killn].length), {\n\t killn: killn,\n\t lastCommand: 3 /* Yank */,\n\t }), _this.scrollToBottom);\n\t }\n\t };\n\t // Numeric Arguments\n\t // Completing\n\t this.complete = function () {\n\t if (_this.props.complete) {\n\t // Split text and find current word\n\t var words = _this.state.promptText.split(\" \");\n\t var curr = 0;\n\t var idx = words[0].length;\n\t while (idx < _this.state.point && curr + 1 < words.length) {\n\t idx += words[++curr].length + 1;\n\t }\n\t var completions = _this.props.complete(words, curr, _this.state.promptText);\n\t if (completions.length == 1) {\n\t // Perform completion\n\t words[curr] = completions[0];\n\t var point = -1;\n\t for (var i = 0; i <= curr; i++) {\n\t point += words[i].length + 1;\n\t }\n\t _this.setState({\n\t point: point,\n\t promptText: words.join(\" \"),\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else if (completions.length > 1) {\n\t // show completions\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: [{\n\t type: \"completion\",\n\t value: [completions.join(\"\\t\")],\n\t }]\n\t });\n\t _this.setState({\n\t currLabel: _this.nextLabel(),\n\t log: log,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t }\n\t };\n\t // Keyboard Macros\n\t // Miscellaneous\n\t this.prefixMeta = function () {\n\t if (_this.state.lastCommand == 1 /* Search */) {\n\t _this.setState({\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t });\n\t }\n\t // TODO Meta prefixed state\n\t };\n\t this.cancelCommand = function () {\n\t if (_this.state.acceptInput) {\n\t _this.child.typer.value = \"\";\n\t var log = _this.state.log;\n\t log.push({\n\t label: _this.state.currLabel,\n\t command: _this.state.promptText,\n\t message: []\n\t });\n\t _this.setState({\n\t typer: \"\",\n\t point: 0,\n\t promptText: \"\",\n\t restoreText: \"\",\n\t log: log,\n\t historyn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t _this.props.cancel();\n\t }\n\t };\n\t // Helper functions\n\t this.textInsert = function (insert, text, replace, point) {\n\t if (replace === void 0) { replace = 0; }\n\t if (point === void 0) { point = text.length; }\n\t return text.substring(0, point - replace) + insert + text.substring(point);\n\t };\n\t this.consoleInsert = function (insert, replace) {\n\t if (replace === void 0) { replace = 0; }\n\t var promptText = _this.textInsert(insert, _this.state.promptText, replace, _this.state.point);\n\t return {\n\t point: _this.movePoint(insert.length - replace, insert.length - replace + _this.state.promptText.length),\n\t promptText: promptText,\n\t restoreText: promptText,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t };\n\t this.movePoint = function (n, max) {\n\t if (max === void 0) { max = _this.state.promptText.length; }\n\t var pos = _this.state.point + n;\n\t if (pos < 0) {\n\t return 0;\n\t }\n\t if (pos > max) {\n\t return max;\n\t }\n\t else {\n\t return pos;\n\t }\n\t };\n\t this.rotateRing = function (n, ringn, ring, circular) {\n\t if (circular === void 0) { circular = true; }\n\t if (ring == 0)\n\t return 0;\n\t if (circular) {\n\t return (ring + (ringn + n) % ring) % ring;\n\t }\n\t else {\n\t ringn = ringn - n;\n\t if (ringn < 0) {\n\t return 0;\n\t }\n\t else if (ringn >= ring) {\n\t return ring;\n\t }\n\t else {\n\t return ringn;\n\t }\n\t }\n\t };\n\t this.rotateHistory = function (n) {\n\t var historyn = _this.rotateRing(n, _this.state.historyn, _this.state.history.length, false);\n\t if (historyn == 0) {\n\t _this.setState({\n\t point: _this.state.restoreText.length,\n\t promptText: _this.state.restoreText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t else {\n\t var promptText = _this.state.history[_this.state.history.length - historyn];\n\t _this.setState({\n\t point: promptText.length,\n\t promptText: promptText,\n\t historyn: historyn,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t }, _this.scrollToBottom);\n\t }\n\t };\n\t this.searchHistory = function (direction, next) {\n\t if (direction === void 0) { direction = _this.state.searchDirection; }\n\t if (next === void 0) { next = false; }\n\t var idx = _this.state.historyn;\n\t var inc = (direction == 0 /* Reverse */) ? 1 : -1;\n\t if (next) {\n\t idx = idx + inc;\n\t }\n\t for (; idx > 0 && idx <= _this.state.history.length; idx = idx + inc) {\n\t var entry = _this.state.history[_this.state.history.length - idx];\n\t var point = entry.indexOf(_this.state.searchText);\n\t if (point > -1) {\n\t return {\n\t point: point,\n\t promptText: entry,\n\t searchDirection: direction,\n\t searchInit: false,\n\t historyn: idx,\n\t };\n\t }\n\t }\n\t return {\n\t searchDirection: direction,\n\t searchInit: false,\n\t };\n\t };\n\t // DOM management\n\t this.scrollSemaphore = 0;\n\t this.scrollIfBottom = function () {\n\t if (_this.scrollSemaphore > 0 || _this.child.container.scrollTop == _this.child.container.scrollHeight - _this.child.container.offsetHeight) {\n\t _this.scrollSemaphore++;\n\t return _this.scrollIfBottomTrue;\n\t }\n\t else {\n\t return null;\n\t }\n\t };\n\t this.scrollIfBottomTrue = function () {\n\t _this.scrollToBottom();\n\t _this.scrollSemaphore--;\n\t };\n\t this.scrollToBottom = function () {\n\t _this.child.container.scrollTop = _this.child.container.scrollHeight;\n\t var rect = _this.child.focus.getBoundingClientRect();\n\t if (rect.top < 0 || rect.left < 0 ||\n\t rect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t rect.right > (window.innerWidth || document.documentElement.clientWidth)) {\n\t _this.child.typer.scrollIntoView(false);\n\t }\n\t };\n\t this.nextLabel = function () {\n\t if (typeof _this.props.promptLabel === \"string\") {\n\t return _this.props.promptLabel;\n\t }\n\t else {\n\t return _this.props.promptLabel();\n\t }\n\t };\n\t this.state = {\n\t focus: false,\n\t acceptInput: true,\n\t typer: '',\n\t point: 0,\n\t currLabel: this.nextLabel(),\n\t promptText: '',\n\t restoreText: '',\n\t searchText: '',\n\t searchDirection: null,\n\t searchInit: false,\n\t log: [],\n\t history: [],\n\t historyn: 0,\n\t kill: [],\n\t killn: 0,\n\t argument: null,\n\t lastCommand: 0 /* Default */,\n\t };\n\t }\n\t // Component Lifecycle\n\t default_1.prototype.componentDidMount = function () {\n\t if (this.props.autofocus) {\n\t this.focus();\n\t }\n\t };\n\t default_1.prototype.nextWord = function () {\n\t // Find first alphanumeric char after first non-alphanumeric char\n\t var search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t if (search) {\n\t return search.index + this.state.point + 1;\n\t }\n\t else {\n\t return this.state.promptText.length;\n\t }\n\t };\n\t default_1.prototype.previousWord = function () {\n\t // Find first non-alphanumeric char after first alphanumeric char in reverse\n\t var search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0, this.state.point - 1));\n\t if (search) {\n\t return search.index + 1;\n\t }\n\t else {\n\t return 0;\n\t }\n\t };\n\t default_1.prototype.render = function () {\n\t var _this = this;\n\t return React.createElement(\"div\", {ref: function (ref) { return _this.child.container = ref; }, className: \"react-console-container \" + (this.state.focus ? \"react-console-focus\" : \"react-console-nofocus\"), onClick: this.focus}, this.props.welcomeMessage ?\n\t React.createElement(\"div\", {className: \"react-console-message react-console-welcome\"}, this.props.welcomeMessage)\n\t : null, this.state.log.map(function (val) {\n\t return [\n\t React.createElement(ConsolePrompt, {label: val.label, value: val.command})\n\t ].concat(val.message.map(function (val, idx) {\n\t return React.createElement(ConsoleMessage, {key: idx, type: val.type, value: val.value, isTable: val.isTable});\n\t }));\n\t }), this.state.acceptInput ?\n\t React.createElement(ConsolePrompt, {label: this.state.currLabel, value: this.state.promptText, point: this.state.point, argument: this.state.argument})\n\t : null, React.createElement(\"div\", {style: { overflow: \"hidden\", height: 1, width: 1 }}, React.createElement(\"textarea\", {ref: function (ref) { return _this.child.typer = ref; }, className: \"react-console-typer\", autoComplete: \"off\", autoCorrect: \"off\", autoCapitalize: \"off\", spellCheck: \"false\", style: { outline: \"none\",\n\t color: \"transparent\",\n\t backgroundColor: \"transparent\",\n\t border: \"none\",\n\t resize: \"none\",\n\t overflow: \"hidden\",\n\t }, onBlur: this.blur, onKeyDown: this.keyDown, onChange: this.change, onPaste: this.paste})), React.createElement(\"div\", {ref: function (ref) { return _this.child.focus = ref; }}, \" \"));\n\t };\n\t default_1.defaultProps = {\n\t promptLabel: '> ',\n\t continue: function () { return false; },\n\t cancel: function () { },\n\t };\n\t return default_1;\n\t}(React.Component));\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = default_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = React;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// react-console.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 32c572a60155f66562e7","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.state.log;\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/dist.tar.gz b/dist/dist.tar.gz index 31cee25..d18df24 100644 Binary files a/dist/dist.tar.gz and b/dist/dist.tar.gz differ diff --git a/dist/dist.zip b/dist/dist.zip index 1982b81..0828f02 100644 Binary files a/dist/dist.zip and b/dist/dist.zip differ diff --git a/dist/dist/react-console.js b/dist/dist/react-console.js index 0c644e7..450b15a 100644 --- a/dist/dist/react-console.js +++ b/dist/dist/react-console.js @@ -132,19 +132,30 @@ var Console = var data = props.value[0]; return React.createElement("div", {className: "react-console-message react-console-table" + (props.type ? " react-console-message-" + props.type : "")}, React.createElement("table", null, React.createElement(ConsoleTableHeader, {headers: data.headers}), React.createElement("tbody", null, data.rows && data.rows.map(function (row, index) { return React.createElement("tr", {key: index}, row.map(function (cell, cellIndex) { - return React.createElement("td", {key: cellIndex}, cell); + if (typeof cell === 'string') { + return React.createElement("td", {key: cellIndex}, cell); + } + else if (typeof cell === 'object' && cell.type === 'link') { + return React.createElement("td", {key: cellIndex}, React.createElement("a", {href: cell.href, target: cell.target ? cell.target : ''}, cell.text)); + } + else { + return React.createElement("td", {key: cellIndex}, JSON.stringify(cell)); + } })); })))); } else { - return React.createElement("div", {className: "react-console-message" + (props.type ? " react-console-message-" + props.type : "")}, props.value.map(function (val) { + return React.createElement("div", {className: "react-console-message" + (props.type ? " react-console-message-" + props.type : "")}, props.value.map(function (val, i) { if (typeof val == 'string') { - return val; + return React.createElement("div", {key: i}, val); + } + else if (typeof val === 'object' && val.type === 'link') { + return React.createElement("div", {key: i}, React.createElement("a", {href: val.href, target: val.target ? val.target : ''}, val.text)); } else { - return JSON.stringify(val); + return React.createElement("div", {key: i}, JSON.stringify(val)); } - }).join("\n")); + })); } }; ConsoleMessage.defaultProps = { diff --git a/dist/dist/react-console.js.map b/dist/dist/react-console.js.map index 9a5b478..c5388de 100644 --- a/dist/dist/react-console.js.map +++ b/dist/dist/react-console.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 9628d64841ca63a4f97f","webpack:///./react-console.tsx","webpack:///external \"React\"","webpack:///./react-console.scss"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,aAAY,CAAC;;;;;;AAEb,KAAY,KAAK,uBAAM,CAAO,CAAC;AAE/B,qBAAO,CAAsB,CAAC;AAQ9B;KAA4B,iCAAsC;KAAlE;SAA4B,8BAAsC;SAOjE,UAAK,GAED,EAAE,CAAC;SAQP,iBAAiB;SACjB,oBAAe,GAAW,CAAC,CAAC;KA2C7B,CAAC;KAnDA,sBAAsB;KACtB,yCAAiB,GAAjB;SACC,IAAI,CAAC,IAAI,EAAE,CAAC;KACb,CAAC;KACD,0CAAkB,GAAlB;SACC,IAAI,CAAC,IAAI,EAAE,CAAC;KACb,CAAC;KAGD,4BAAI,GAAJ;SAAA,iBAcC;SAbA,yBAAyB;SACzB,EAAE,EAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;aACtB,EAAE,EAAC,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC,CAAC,CAAC;iBAC9B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,sBAAsB,CAAC;aACtD,CAAC;aACD,IAAI,CAAC,eAAe,EAAE,CAAC;aACvB,MAAM,CAAC,UAAU,CAAE;iBAClB,KAAI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,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,OAAa,CAChD,CAAC;KACR,CAAC;KAp2BM,sBAAY,GAAG;SACrB,WAAW,EAAE,IAAI;SACjB,QAAQ,EAAE,cAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtC,MAAM,EAAE,cAAY,CAAC;MACrB,CAAC;KAi2BH,gBAAC;AAAD,EAAC,CA53B4B,KAAK,CAAC,SAAS,GA43B3C;AA53BD;4BA43BC;;;;;;;ACnjCD,wB;;;;;;ACAA,0C","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9628d64841ca63a4f97f","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: string[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: string, cellIndex: number) => { \n\t\t\t\t\t\t\t\treturn ; })\n\t\t\t\t\t\t\t};\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn val;\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}).join(\"\\n\")}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.state.log;\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./react-console.scss\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 6b659ef61b13e2fb3028","webpack:///./react-console.tsx","webpack:///external \"React\"","webpack:///./react-console.scss"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,aAAY,CAAC;;;;;;AAEb,KAAY,KAAK,uBAAM,CAAO,CAAC;AAE/B,qBAAO,CAAsB,CAAC;AAQ9B;KAA4B,iCAAsC;KAAlE;SAA4B,8BAAsC;SAOjE,UAAK,GAED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AAa;aACpB,eAAe,EAAE,aAAa;aAC9B,MAAM,EAAE,MAAM;aACd,MAAM,EAAE,MAAM;aACd,QAAQ,EAAE,QAAQ;UACjB,EACF,MAAM,EAAE,IAAI,CAAC,IAAK,EAClB,SAAS,EAAE,IAAI,CAAC,OAAQ,EACxB,QAAQ,EAAE,IAAI,CAAC,MAAO,EACtB,OAAO,EAAE,IAAI,CAAC,KAAM,EACT,CACP,EACN,qBAAC,GAAG,IAAC,GAAG,EAAE,aAAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,OAAa,CAChD,CAAC;KACR,CAAC;KAp2BM,sBAAY,GAAG;SACrB,WAAW,EAAE,IAAI;SACjB,QAAQ,EAAE,cAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtC,MAAM,EAAE,cAAY,CAAC;MACrB,CAAC;KAi2BH,gBAAC;AAAD,EAAC,CA53B4B,KAAK,CAAC,SAAS,GA43B3C;AA53BD;4BA43BC;;;;;;;AC9jCD,wB;;;;;;ACAA,0C","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6b659ef61b13e2fb3028","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.state.log;\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 1\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./react-console.scss\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/react-console.js b/lib/react-console.js index 758f67c..a72d256 100644 --- a/lib/react-console.js +++ b/lib/react-console.js @@ -132,19 +132,30 @@ module.exports = var data = props.value[0]; return React.createElement("div", {className: "react-console-message react-console-table" + (props.type ? " react-console-message-" + props.type : "")}, React.createElement("table", null, React.createElement(ConsoleTableHeader, {headers: data.headers}), React.createElement("tbody", null, data.rows && data.rows.map(function (row, index) { return React.createElement("tr", {key: index}, row.map(function (cell, cellIndex) { - return React.createElement("td", {key: cellIndex}, cell); + if (typeof cell === 'string') { + return React.createElement("td", {key: cellIndex}, cell); + } + else if (typeof cell === 'object' && cell.type === 'link') { + return React.createElement("td", {key: cellIndex}, React.createElement("a", {href: cell.href, target: cell.target ? cell.target : ''}, cell.text)); + } + else { + return React.createElement("td", {key: cellIndex}, JSON.stringify(cell)); + } })); })))); } else { - return React.createElement("div", {className: "react-console-message" + (props.type ? " react-console-message-" + props.type : "")}, props.value.map(function (val) { + return React.createElement("div", {className: "react-console-message" + (props.type ? " react-console-message-" + props.type : "")}, props.value.map(function (val, i) { if (typeof val == 'string') { - return val; + return React.createElement("div", {key: i}, val); + } + else if (typeof val === 'object' && val.type === 'link') { + return React.createElement("div", {key: i}, React.createElement("a", {href: val.href, target: val.target ? val.target : ''}, val.text)); } else { - return JSON.stringify(val); + return React.createElement("div", {key: i}, JSON.stringify(val)); } - }).join("\n")); + })); } }; ConsoleMessage.defaultProps = { diff --git a/lib/react-console.js.map b/lib/react-console.js.map index aebcf2d..e3d29af 100644 --- a/lib/react-console.js.map +++ b/lib/react-console.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 9342be2e3857029b2d74","webpack:///./react-console.tsx","webpack:///external \"react\"","webp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;;;;ACnjCD,mC;;;;;;ACAA,0C","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9342be2e3857029b2d74","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: string[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: string, cellIndex: number) => { \n\t\t\t\t\t\t\t\treturn ; })\n\t\t\t\t\t\t\t};\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn val;\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}).join(\"\\n\")}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.state.log;\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./react-console.scss\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 2ee4f2e1dc5b22f8df5d","webpack:///./react-console.tsx","webpack:///external \"react\"","webpack:///./react-console.scss"],"names":[],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,aAAY,CAAC;;;;;;AAEb,KAAY,KAAK,uBAAM,CAAO,CAAC;AAE/B,qBAAO,CAAsB,CAAC;AAQ9B;KAA4B,iCAAsC;KAAlE;SAA4B,8BAAsC;SAOjE,UAAK,GAED,EAAE,CAAC;SAQP,iBAAiB;SACjB,oBAAe,GAAW,CAAC,CAAC;KA2C7B,CAAC;KAnDA,sBAAsB;KACtB,yCAAiB,GAAjB;SACC,IAAI,CAAC,IAAI,EAAE,CAAC;KACb,CAAC;KACD,0CAAkB,GAAlB;SACC,IAAI,CAAC,IAAI,EAAE,CAAC;KACb,CAAC;KAGD,4BAAI,GAAJ;SAAA,iBAcC;SAbA,yBAAyB;SACzB,EAAE,EAAC,IAAI,CAAC,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AAG,IAAI,YAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,EAAtB,CAAuB,OAAa,CAChD,CAAC;KACR,CAAC;KAp2BM,sBAAY,GAAG;SACrB,WAAW,EAAE,IAAI;SACjB,QAAQ,EAAE,cAAa,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;SACtC,MAAM,EAAE,cAAY,CAAC;MACrB,CAAC;KAi2BH,gBAAC;AAAD,EAAC,CA53B4B,KAAK,CAAC,SAAS,GA43B3C;AA53BD;4BA43BC;;;;;;;AC9jCD,mC;;;;;;ACAA,0C","file":"react-console.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2ee4f2e1dc5b22f8df5d","\"use strict\";\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport './react-console.scss';\n\ninterface ConsolePromptProps {\n\tpoint?: number;\n\tvalue: string;\n\tlabel: string;\n\targument?: string;\n}\nclass ConsolePrompt extends React.Component {\n\tstatic defaultProps: ConsolePromptProps = {\n\t\tpoint: -1,\n\t\tvalue: \"\",\n\t\tlabel: \"> \",\n\t\targument: null,\n\t}\n\tchild: {\n\t\tcursor?: Element;\n\t} = {};\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tthis.idle();\n\t}\n\tcomponentDidUpdate() {\n\t\tthis.idle();\n\t}\n\t// DOM Management\n\tupdateSemaphore: number = 0;\n\tidle() {\n\t\t// Blink cursor when idle\n\t\tif(this.child.cursor) {\n\t\t\tif(this.updateSemaphore == 0) {\n\t\t\t\tthis.child.cursor.className = \"react-console-cursor\";\n\t\t\t}\n\t\t\tthis.updateSemaphore++;\n\t\t\twindow.setTimeout( () => {\n\t\t\t\tthis.updateSemaphore--;\n\t\t\t\tif(this.updateSemaphore == 0 && this.child.cursor) {\n\t\t\t\t\tthis.child.cursor.className = \"react-console-cursor react-console-cursor-idle\";\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t}\n\t}\n\trenderValue() {\n\t\tif(this.props.point < 0) {\n\t\t\treturn [this.props.value];\n\t\t} else if (this.props.point == this.props.value.length) {\n\t\t\treturn [this.props.value, this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\"> ];\n\t\t} else {\n\t\t\treturn [this.props.value.substring(0,this.props.point),\n\t\t\t\t this.child.cursor = ref} key=\"cursor\" className=\"react-console-cursor\">{this.props.value.substring(this.props.point,this.props.point+1)},\n\t\t\t\tthis.props.value.substring(this.props.point+1)];\n\t\t}\n\t}\n\trender() {\n\t\tlet label = this.props.label;\n\t\tif(this.props.argument) {\n\t\t\tlet idx = label.lastIndexOf(\"\\n\");\n\t\t\tif(idx >= 0) {\n\t\t\t\tlabel = label.substring(0, idx+1);\n\t\t\t} else {\n\t\t\t\tlabel = '';\n\t\t\t}\n\t\t}\n\t\treturn
\n\t\t\t{ label }\n\t\t\t{ this.props.argument }\n\t\t\t{ this.renderValue() }\n\t\t
;\n\t}\n}\n\ninterface ConsoleTableHeaderProps {\n\theaders?: string[];\n}\nlet ConsoleTableHeader: React.SFC = function(props: ConsoleTableHeaderProps){\t\n\tif(props.headers){\n\t\treturn \n\t\t\t\t\t\n\t\t\t\t\t\t{props.headers.map((header: string) => {\n\t\t\t\t\t\t\treturn { header };\n\t\t\t\t\t\t})}\n\t\t\t\t\t\n\t\t\t\t\n\t}\n\treturn null;\n}\n\ninterface ConsoleMessageProps {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nlet ConsoleMessage: React.SFC = function(props: ConsoleMessageProps) {\n\tif(props.isTable){\n\t\tconst data = props.value[0];\n\t\treturn
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t{data.rows && data.rows.map((row: any[], index: number) => {\n\t\t\t\t\t\treturn {row.map((cell: any, cellIndex: number) => {\n\t\t\t\t\t\t\tif(typeof cell === 'string'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else if(typeof cell === 'object' && cell.type === 'link'){\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\treturn ;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t;\n\n\t\t\t\t\t})}\n\t\t\t\t\n\t\t\t
{cell}{cell.text}{JSON.stringify(cell)}
\n\t\t
;\n\t}else{\n\t\treturn
\n\t\t\t{props.value.map((val: any, i: number)=>{\n\t\t\t\tif(typeof val == 'string') {\n\t\t\t\t\treturn
{val}
;\n\t\t\t\t} else if(typeof val === 'object' && val.type === 'link') {\n\t\t\t\t\treturn ;\n\t\t\t\t} else {\n\t\t\t\t\treturn
{JSON.stringify(val)}
;\n\t\t\t\t}\n\t\t\t})}\n\t\t
;\n\t}\n}\nConsoleMessage.defaultProps = {\n\ttype: null,\n\tvalue: [],\n\tisTable: false\n}\n\nexport interface ConsoleTableObject {\n\trows: Array;\n\theaders?: Array;\n}\n\nexport interface LogMessage {\n\ttype?: string;\n\tisTable?: boolean;\n\tvalue: any[];\n}\nexport interface LogEntry {\n\tlabel: string;\n\tcommand: string;\n\tmessage: LogMessage[];\n}\n\nexport interface ConsoleProps{\n\thandler: (command: string)=>any;\n\tcancel?: ()=>any;\n\tcomplete?: (words: string[], curr: number, promptText: string)=>string[];\n\tcontinue?: (promptText: string)=>boolean;\n\tautofocus?: boolean;\n\tpromptLabel?: string | (()=>string);\n\twelcomeMessage?: string;\n}\nexport const enum ConsoleCommand {\n\tDefault,\n\tSearch,\n\tKill,\n\tYank,\n};\nexport const enum SearchDirection {\n\tReverse,\n\tForward,\n}\nexport interface ConsoleState{\n\tfocus?: boolean;\n\tacceptInput?: boolean;\n\ttyper?: string;\n\tpoint?: number;\n\tcurrLabel?: string;\n\tpromptText?: string;\n\trestoreText?: string;\n\tsearchText?: string;\n\tsearchDirection?: SearchDirection;\n\tsearchInit?: boolean;\n\tlog?: LogEntry[];\n\thistory?: string[];\n\thistoryn?: number;\n\tkill?: string[];\n\tkilln?: number;\n\targument?: string;\n\tlastCommand?: ConsoleCommand;\n};\nexport default class extends React.Component {\n\tconstructor(props: ConsoleProps) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tfocus: false,\n\t\t\tacceptInput: true,\n\t\t\ttyper: '',\n\t\t\tpoint: 0,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t\tpromptText: '',\n\t\t\trestoreText: '',\n\t\t\tsearchText: '',\n\t\t\tsearchDirection: null,\n\t\t\tsearchInit: false,\n\t\t\tlog: [],\n\t\t\thistory: [],\n\t\t\thistoryn: 0,\n\t\t\tkill: [],\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tstatic defaultProps = {\n\t\tpromptLabel: '> ',\n\t\tcontinue: function() { return false; },\n\t\tcancel: function() {},\n\t};\n\tchild: {\n\t\ttyper?: HTMLTextAreaElement;\n\t\tcontainer?: HTMLElement;\n\t\tfocus?: HTMLElement;\n\t} = {};\n\t// Command API\n\tupdateLastLog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlet indexToReplace = log[this.state.log.length-1].message.length > 0 ? log[this.state.log.length-1].message.length - 1 : 0;\n\t\tlog[this.state.log.length-1].message[indexToReplace] = {value: messages};\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlog = (...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogX = (type: string, ...messages: any[]) => {\n\t\tlet log = this.state.log;\n\t\tif(!log.length){\n\t\t\tlog.push({label: '', command: '', message: [] });\n\t\t}\n\t\tlog[this.state.log.length-1].message.push({type: type, value: messages});\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\tlogTable = (tableData: ConsoleTableObject, type?: string) => {\n\t\tlet log = this.state.log;\n\t\tif(type){\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, type: type, value: [tableData]});\n\t\t}else{\n\t\t\tlog[this.state.log.length-1].message.push({isTable: true, value: [tableData]});\n\t\t}\n\t\tthis.setState({\n\t\t\tlog: log,\n\t\t}, this.scrollIfBottom() );\n\t}\n\treturn = () => {\n\t\tthis.setState({\n\t\t\tacceptInput: true,\n\t\t\tcurrLabel: this.nextLabel(),\n\t\t}, this.scrollIfBottom() );\n\t}\n\t// Component Lifecycle\n\tcomponentDidMount() {\n\t\tif(this.props.autofocus) {\n\t\t\tthis.focus();\n\t\t}\n\t}\n\t// Event Handlers\n\tfocus = () => {\n\t\tif(!window.getSelection().toString()) {\n\t\t\tthis.child.typer.focus();\n\t\t\tthis.setState({ focus: true }, this.scrollToBottom );\n\t\t}\n\t}\n\tblur = () => {\n\t\tthis.setState({ focus: false });\n\t}\n\tkeyDown = (e: KeyboardEvent) => {\n\t\tinterface keyMap {\n\t\t\t[key: number]: ()=>void\n\t\t}\n\t\tlet keyCodes: keyMap = {\n\t\t\t// return\n\t\t\t13: this.acceptLine,\n\t\t\t// left\n\t\t\t37: this.backwardChar,\n\t\t\t// right\n\t\t\t39: this.forwardChar,\n\t\t\t// up\n\t\t\t38: this.previousHistory,\n\t\t\t// down\n\t\t\t40: this.nextHistory,\n\t\t\t// backspace\n\t\t\t8: this.backwardDeleteChar,\n\t\t\t// delete\n\t\t\t46: this.deleteChar,\n\t\t\t// end\n\t\t\t35: this.endOfLine,\n\t\t\t// start\n\t\t\t36: this.beginningOfLine,\n\t\t\t// tab\n\t\t\t9: this.complete,\n\t\t\t// esc\n\t\t\t27: this.prefixMeta,\n\t\t};\n\t\tvar ctrlCodes: keyMap = {\n\t\t\t// C-a\n\t\t\t65: this.beginningOfLine,\n\t\t\t// C-e\n\t\t\t69: this.endOfLine,\n\t\t\t// C-f\n\t\t\t70: this.forwardChar,\n\t\t\t// C-b\n\t\t\t66: this.backwardChar,\n\t\t\t// C-l\n\t\t\t76: this.clearScreen,\n\t\t\t// C-p\n\t\t\t80: this.previousHistory,\n\t\t\t// C-n\n\t\t\t78: this.nextHistory,\n\t\t\t// C-r\n\t\t\t82: this.reverseSearchHistory,\n\t\t\t// C-s\n\t\t\t83: this.forwardSearchHistory,\n\t\t\t// C-d\n\t\t\t68: this.deleteChar, // TODO EOF\n\t\t\t// C-q TODO\n\t\t\t//81: this.quotedInsert,\n\t\t\t// C-v TODO\n\t\t\t//86: this.quotedInsert,\n\t\t\t// C-t TODO\n\t\t\t//84: this.transposeChars,\n\t\t\t// C-k\n\t\t\t75: this.killLine,\n\t\t\t// C-u\n\t\t\t85: this.backwardKillLine,\n\t\t\t// C-y TODO\n\t\t\t89: this.yank,\n\t\t\t// C-c\n\t\t\t67: this.cancelCommand,\n\t\t\t// C-w TODO\n\t\t\t//87: this.killPreviousWhitespace,\n\t\t\t// C-] TODO\n\t\t\t//221: this.characterSearch,\n\t\t\t// C-x TODO\n\t\t\t//88: this.prefixCtrlX,\n\t\t};\n\t\tvar ctrlXCodes: keyMap = { // TODO state\n\t\t\t// C-x Rubout\n\t\t\t8: this.backwardKillLine,\n\t\t\t// C-x ( TODO\n\t\t\t//57: this.startKbdMacro,\n\t\t\t// C-x ) TODO\n\t\t\t//48: this.endKbdMacro,\n\t\t\t// C-x e TODO\n\t\t\t//69: this.callLastKbdMacro,\n\t\t\t// C-x C-u TODO\n\t\t\t//85: this.undo,\n\t\t\t// C-x C-x TODO\n\t\t\t//88: this.exchangePointAndMark,\n\t\t};\n\t\tvar ctrlShiftCodes: keyMap = {\n\t\t\t// C-_ TODO\n\t\t\t//189: this.undo,\n\t\t\t// C-@ TODO\n\t\t\t//50: this.setMark,\n\t\t};\n\t\tvar metaCodes: keyMap = {\n\t\t\t// M-f\n\t\t\t70: this.forwardWord,\n\t\t\t// M-b\n\t\t\t66: this.backwardWord,\n\t\t\t// M-p\n\t\t\t80: this.nonIncrementalReverseSearchHistory,\n\t\t\t// M-n\n\t\t\t78: this.nonIncrementalForwardSearchHistory,\n\t\t\t// M-.\n\t\t\t190: this.yankLastArg,\n\t\t\t// M-TAB TODO\n\t\t\t//9: this.tabInsert,\n\t\t\t// M-t TODO\n\t\t\t//84: this.transposeWords,\n\t\t\t// M-u TODO\n\t\t\t//85: this.upcaseWord,\n\t\t\t// M-l TODO\n\t\t\t//76: this.downcaseWord,\n\t\t\t// M-c TODO\n\t\t\t//67: this.capitalizeWord,\n\t\t\t// M-d\n\t\t\t68: this.killWord,\n\t\t\t// M-backspace\n\t\t\t8: this.backwardKillWord,\n\t\t\t// M-w TODO\n\t\t\t//87: this.unixWordRubout,\n\t\t\t// M-\\ TODO\n\t\t\t//220: this.deleteHorizontalSpace,\n\t\t\t// M-y\n\t\t\t89: this.yankPop,\n\t\t\t// M-0 TODO\n\t\t\t//48: () => this.digitArgument(0),\n\t\t\t// M-1 TODO\n\t\t\t//49: () => this.digitArgument(1),\n\t\t\t// M-2 TODO\n\t\t\t//50: () => this.digitArgument(2),\n\t\t\t// M-3 TODO\n\t\t\t//51: () => this.digitArgument(3),\n\t\t\t// M-4 TODO\n\t\t\t//52: () => this.digitArgument(4),\n\t\t\t// M-5 TODO\n\t\t\t//53: () => this.digitArgument(5),\n\t\t\t// M-6 TODO\n\t\t\t//54: () => this.digitArgument(6),\n\t\t\t// M-7 TODO\n\t\t\t//55: () => this.digitArgument(7),\n\t\t\t// M-8 TODO\n\t\t\t//56: () => this.digitArgument(8),\n\t\t\t// M-9 TODO\n\t\t\t//57: () => this.digitArgument(9),\n\t\t\t// M-- TODO\n\t\t\t//189: () => this.digitArgument('-'),\n\t\t\t// M-f TODO\n\t\t\t//71: () => this.abort,\n\t\t\t// M-r TODO\n\t\t\t//82: this.revertLine,\n\t\t\t// M-SPACE TODO\n\t\t\t//32: this.setMark,\n\t\t};\n\t\tvar metaShiftCodes: keyMap = { // TODO hook in\n\t\t\t// M-<\n\t\t\t188: this.beginningOfHistory,\n\t\t\t// M->\n\t\t\t190: this.endOfHistory,\n\t\t\t// M-_\n\t\t\t189: this.yankLastArg,\n\t\t\t// M-? TODO\n\t\t\t//191: this.possibleCompletions,\n\t\t\t// M-* TODO\n\t\t\t//56: this.insertCompletions,\n\t\t}\n\t\tvar metaCtrlCodes: keyMap = {\n\t\t\t// M-C-y\n\t\t\t89: this.yankNthArg,\n\t\t\t// M-C-] TODO\n\t\t\t//221: this.characterSearchBackward,\n\t\t\t// M-C-j TODO !!!\n\t\t\t//74: this.viEditingMode,\n\t\t};\n\t\tif(this.state.acceptInput) {\n\t\t\tif (e.altKey) {\n\t\t\t\tif (e.ctrlKey) {\n\t\t\t\t\tif (e.keyCode in metaCtrlCodes) {\n\t\t\t\t\t\tmetaCtrlCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.shiftKey) {\n\t\t\t\t\tif (e.keyCode in metaShiftCodes) {\n\t\t\t\t\t\tmetaShiftCodes[e.keyCode]();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} else if (e.keyCode in metaCodes) {\n\t\t\t\t\tmetaCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.ctrlKey) {\n\t\t\t\tif (e.keyCode in ctrlCodes) {\n\t\t\t\t\tctrlCodes[e.keyCode]();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}\n\t\t\t\te.preventDefault();\n\t\t\t} else if (e.keyCode in keyCodes) {\n\t\t\t\tkeyCodes[e.keyCode]();\n\t\t\t\te.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\tchange = () => {\n\t\tlet idx = 0;\n\t\tfor(;idx < this.state.typer.length && idx < this.child.typer.value.length; idx++) {\n\t\t\tif(this.state.typer[idx] != this.child.typer.value[idx]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tlet insert = this.child.typer.value.substring(idx);\n\t\tlet replace = this.state.typer.length - idx;\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText, replace),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert, replace),{\n\t\t\t\t\ttyper: this.child.typer.value,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\tpaste = (e: ClipboardEvent) => {\n\t\tlet insert = e.clipboardData.getData('text');\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchInit?insert:this.textInsert(insert, this.state.searchText),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(insert),{\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t\te.preventDefault();\n\t}\n\t// Commands for Moving\n\tbeginningOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tendOfLine = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.state.promptText.length,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardChar = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.movePoint(-1),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tforwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.nextWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardWord = () => {\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t}, this.scrollToBottom);\n\t}\n\t// Commands for Manipulating the History\n\tacceptLine = () => {\n\t\tthis.child.typer.value = \"\";\n\t\tif(this.props.continue(this.state.promptText)) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(\"\\n\"),{\n\t\t\t\t\ttyper: \"\",\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tlet command = this.state.promptText;\n\t\t\tlet history = this.state.history;\n\t\t\tlet log = this.state.log;\n\t\t\tif(!history || history[history.length-1] != command) {\n\t\t\t\thistory.push(command);\n\t\t\t}\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: command,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\tacceptInput: false,\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistory: history,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, () => {\n\t\t\t\tthis.scrollToBottom();\n\t\t\t\tif(this.props.handler) {\n\t\t\t\t\tthis.props.handler(command)\n\t\t\t\t} else {\n\t\t\t\t\tthis.return();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tpreviousHistory = () => {\n\t\tthis.rotateHistory(-1);\n\t}\n\tnextHistory = () => {\n\t\tthis.rotateHistory(1);\n\t}\n\tbeginningOfHistory = () => {\n\t\tthis.rotateHistory(-this.state.history.length);\n\t}\n\tendOfHistory = () => {\n\t\tthis.rotateHistory(this.state.history.length);\n\t}\n\ttriggerSearch = () => {\n\t\tif(this.state.searchDirection == SearchDirection.Reverse) {\n\t\t\tthis.reverseSearchHistory();\n\t\t} else {\n\t\t\tthis.forwardSearchHistory();\n\t\t}\n\t}\n\treverseSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Reverse, true),{\n\t\t\t\t\targument: `(reverse-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Reverse,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(reverse-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tforwardSearchHistory = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.searchHistory(SearchDirection.Forward, true),{\n\t\t\t\t\targument: `(forward-i-search)\\`${this.state.searchText}': `,\n\t\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t} else {\n\t\t\tthis.setState({\n\t\t\t\tsearchDirection: SearchDirection.Forward,\n\t\t\t\tsearchInit: true,\n\t\t\t\targument: `(forward-i-search)\\`': `,\n\t\t\t\tlastCommand: ConsoleCommand.Search,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tclearScreen = () => {\n\t\tthis.setState({ log: [] });\n\t}\n\tnonIncrementalReverseSearchHistory = () => {\n\t\t// TODO\n\t}\n\tnonIncrementalForwardSearchHistory = () => {\n\t\t// TODO\n\t}\n\thistorySearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySearchForward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchBackward = () => {\n\t\t// TODO\n\t}\n\thistorySubstringSearchForward = () => {\n\t\t// TODO\n\t}\n\tyankNthArg = () => {\n\t\t// TODO\n\t}\n\tyankLastArg = () => {\n\t\t// TODO\n\t}\n\t// Commands for Changing Text\n\tdeleteChar = () => {\n\t\tif(this.state.point < this.state.promptText.length) {\n\t\t\tthis.setState({\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point+1),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\tbackwardDeleteChar = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\tsearchText: this.state.searchText.substring(0,this.state.searchText.length-1),\n\t\t\t\ttyper: this.child.typer.value,\n\t\t\t}, this.triggerSearch );\n\t\t} else if(this.state.point > 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.movePoint(-1),\n\t\t\t\tpromptText: this.state.promptText.substring(0,this.state.point-1)\n\t\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t}\n\t}\n\t// Killing and Yanking\n\tkillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(0,this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWholeLine = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ kill[0] + this.state.promptText.substring(this.state.point);\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText);\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: 0,\n\t\t\tpromptText: '',\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tkillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = kill[0] + this.state.promptText.substring(this.state.point,this.nextWord());\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.state.point,this.nextWord()));\n\t\t}\n\t\tthis.setState({\n\t\t\tpromptText: this.state.promptText.substring(0,this.state.point)\n\t\t\t\t+ this.state.promptText.substring(this.nextWord()),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tbackwardKillWord = () => {\n\t\tlet kill = this.state.kill;\n\t\tif(this.state.lastCommand == ConsoleCommand.Kill) {\n\t\t\tkill[0] = this.state.promptText.substring(this.previousWord(),this.state.point) + kill[0];\n\t\t} else {\n\t\t\tkill.unshift(this.state.promptText.substring(this.previousWord(),this.state.point));\n\t\t}\n\t\tthis.setState({\n\t\t\tpoint: this.previousWord(),\n\t\t\tpromptText: this.state.promptText.substring(0,this.previousWord())\n\t\t\t\t+ this.state.promptText.substring(this.state.point),\n\t\t\tkill: kill,\n\t\t\tkilln: 0,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Kill,\n\t\t}, this.scrollToBottom);\n\t}\n\tyank = () => {\n\t\tthis.setState(Object.assign(\n\t\t\tthis.consoleInsert(this.state.kill[this.state.killn]),{\n\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t}), this.scrollToBottom\n\t\t);\n\t}\n\tyankPop = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Yank) {\n\t\t\tlet killn = this.rotateRing(1, this.state.killn, this.state.kill.length);\n\t\t\tthis.setState(Object.assign(\n\t\t\t\tthis.consoleInsert(this.state.kill[killn], this.state.kill[this.state.killn].length),{\n\t\t\t\t\tkilln: killn,\n\t\t\t\t\tlastCommand: ConsoleCommand.Yank,\n\t\t\t\t}), this.scrollToBottom\n\t\t\t);\n\t\t}\n\t}\n\t// Numeric Arguments\n\t// Completing\n\tcomplete = () => {\n\t\tif(this.props.complete) {\n\t\t\t// Split text and find current word\n\t\t\tlet words = this.state.promptText.split(\" \");\n\t\t\tlet curr = 0;\n\t\t\tlet idx = words[0].length;\n\t\t\twhile(idx < this.state.point && curr + 1 < words.length) {\n\t\t\t\tidx += words[++curr].length + 1;\n\t\t\t}\n\n\t\t\tlet completions = this.props.complete(words, curr, this.state.promptText);\n\t\t\tif(completions.length == 1) {\n\t\t\t\t// Perform completion\n\t\t\t\twords[curr] = completions[0];\n\t\t\t\tlet point = -1;\n\t\t\t\tfor(let i = 0; i <= curr; i++) {\n\t\t\t\t\tpoint += words[i].length + 1;\n\t\t\t\t}\n\t\t\t\tthis.setState({\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: words.join(\" \"),\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t} else if (completions.length > 1) {\n\t\t\t\t// show completions\n\t\t\t\tlet log = this.state.log;\n\t\t\t\tlog.push({\n\t\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\t\tcommand: this.state.promptText,\n\t\t\t\t\tmessage: [{\n\t\t\t\t\t\ttype: \"completion\",\n\t\t\t\t\t\tvalue: [completions.join(\"\\t\")],\n\t\t\t\t\t}]\n\t\t\t\t});\n\t\t\t\tthis.setState({\n\t\t\t\t\tcurrLabel: this.nextLabel(),\n\t\t\t\t\tlog: log,\n\t\t\t\t\targument: null,\n\t\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t\t}, this.scrollToBottom );\n\t\t\t}\n\t\t}\n\t}\n\t// Keyboard Macros\n\t// Miscellaneous\n\tprefixMeta = () => {\n\t\tif(this.state.lastCommand == ConsoleCommand.Search) {\n\t\t\tthis.setState({\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t});\n\t\t}\n\t\t// TODO Meta prefixed state\n\t}\n\tcancelCommand = () => {\n\t\tif(this.state.acceptInput) { // Typing command\n\t\t\tthis.child.typer.value = \"\";\n\t\t\tlet log = this.state.log;\n\t\t\tlog.push({\n\t\t\t\tlabel: this.state.currLabel,\n\t\t\t\tcommand: this.state.promptText,\n\t\t\t\tmessage: []\n\t\t\t});\n\t\t\tthis.setState({\n\t\t\t\ttyper: \"\",\n\t\t\t\tpoint: 0,\n\t\t\t\tpromptText: \"\",\n\t\t\t\trestoreText: \"\",\n\t\t\t\tlog: log,\n\t\t\t\thistoryn: 0,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom);\n\t\t} else { // command is executing, call handler\n\t\t\tthis.props.cancel();\n\t\t}\n\t}\n\t// Helper functions\n\ttextInsert = (insert: string, text: string, replace: number = 0, point: number = text.length): string => {\n\t\treturn text.substring(0, point - replace) + insert + text.substring(point);\n\t}\n\tconsoleInsert = (insert: string, replace: number = 0): ConsoleState => {\n\t\tlet promptText = this.textInsert(insert, this.state.promptText, replace, this.state.point);\n\t\treturn {\n\t\t\tpoint: this.movePoint(insert.length - replace, insert.length - replace + this.state.promptText.length),\n\t\t\tpromptText: promptText,\n\t\t\trestoreText: promptText,\n\t\t\targument: null,\n\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t};\n\t}\n\tmovePoint = (n: number, max: number = this.state.promptText.length) => {\n\t\tlet pos = this.state.point + n;\n\t\tif (pos < 0) {\n\t\t\treturn 0;\n\t\t} if (pos > max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}\n\tnextWord(): number {\n\t\t// Find first alphanumeric char after first non-alphanumeric char\n\t\tlet search = /\\W\\w/.exec(this.state.promptText.substring(this.state.point));\n\t\tif(search) {\n\t\t\treturn search.index + this.state.point + 1;\n\t\t} else {\n\t\t\treturn this.state.promptText.length;\n\t\t}\n\t}\n\tpreviousWord(): number {\n\t\t// Find first non-alphanumeric char after first alphanumeric char in reverse\n\t\tlet search = /\\W\\w(?!.*\\W\\w)/.exec(this.state.promptText.substring(0,this.state.point-1));\n\t\tif(search) {\n\t\t\treturn search.index + 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\trotateRing = (n: number, ringn: number, ring: number, circular: boolean = true): number => {\n\t\tif(ring == 0) return 0;\n\t\tif(circular) {\n\t\t\treturn (ring + (ringn + n) % ring) % ring;\n\t\t} else {\n\t\t\tringn = ringn - n;\n\t\t\tif(ringn < 0) {\n\t\t\t\treturn 0;\n\t\t\t} else if (ringn >= ring) {\n\t\t\t\treturn ring;\n\t\t\t} else {\n\t\t\t\treturn ringn;\n\t\t\t}\n\t\t}\n\t}\n\trotateHistory = (n: number) => {\n\t\tlet historyn = this.rotateRing(n, this.state.historyn, this.state.history.length, false);\n\t\tif(historyn == 0) {\n\t\t\tthis.setState({\n\t\t\t\tpoint: this.state.restoreText.length,\n\t\t\t\tpromptText: this.state.restoreText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t} else {\n\t\t\tlet promptText = this.state.history[this.state.history.length-historyn];\n\t\t\tthis.setState({\n\t\t\t\tpoint: promptText.length,\n\t\t\t\tpromptText: promptText,\n\t\t\t\thistoryn: historyn,\n\t\t\t\targument: null,\n\t\t\t\tlastCommand: ConsoleCommand.Default,\n\t\t\t}, this.scrollToBottom );\n\t\t}\n\t}\n\tsearchHistory = (direction: SearchDirection = this.state.searchDirection, next: boolean = false): ConsoleState => {\n\t\tlet idx = this.state.historyn;\n\t\tlet inc = (direction == SearchDirection.Reverse)?1:-1;\n\t\tif(next) {\n\t\t\tidx = idx + inc;\n\t\t}\n\t\tfor(;idx > 0 && idx <= this.state.history.length; idx = idx + inc) {\n\t\t\tlet entry = this.state.history[this.state.history.length-idx];\n\t\t\tlet point = entry.indexOf(this.state.searchText);\n\t\t\tif(point > -1) {\n\t\t\t\treturn {\n\t\t\t\t\tpoint: point,\n\t\t\t\t\tpromptText: entry,\n\t\t\t\t\tsearchDirection: direction,\n\t\t\t\t\tsearchInit: false,\n\t\t\t\t\thistoryn: idx,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tsearchDirection: direction,\n\t\t\tsearchInit: false,\n\t\t};\n\t}\n\t// DOM management\n\tscrollSemaphore = 0;\n\tscrollIfBottom = () => {\n\t\tif(this.scrollSemaphore > 0 || this.child.container.scrollTop == this.child.container.scrollHeight - this.child.container.offsetHeight) {\n\t\t\tthis.scrollSemaphore++;\n\t\t\treturn this.scrollIfBottomTrue;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\tscrollIfBottomTrue = () => {\n\t\tthis.scrollToBottom();\n\t\tthis.scrollSemaphore--;\n\t}\n\tscrollToBottom = () => {\n\t\tthis.child.container.scrollTop = this.child.container.scrollHeight;\n\t\tlet rect = this.child.focus.getBoundingClientRect();\n\t\tif(rect.top < 0 || rect.left < 0 ||\n\t\t\trect.bottom > (window.innerHeight || document.documentElement.clientHeight) ||\n\t\t\trect.right > (window.innerWidth || document.documentElement.clientWidth)\n\t\t) { this.child.typer.scrollIntoView(false); }\n\t}\n\tnextLabel = () => {\n\t\tif(typeof this.props.promptLabel === \"string\") {\n\t\t\treturn this.props.promptLabel as string;\n\t\t} else {\n\t\t\treturn (this.props.promptLabel as ()=>string)();\n\t\t}\n\t}\n\trender() {\n\t\treturn
this.child.container = ref}\n\t\t\t\tclassName={\"react-console-container \" + (this.state.focus?\"react-console-focus\":\"react-console-nofocus\")}\n\t\t\t\tonClick={this.focus}\n\t\t\t>\n\t\t\t{this.props.welcomeMessage?\n\t\t\t\t
\n\t\t\t\t\t{this.props.welcomeMessage}\n\t\t\t\t
\n\t\t\t\t: null\n\t\t\t}\n\t\t\t{this.state.log.map( (val: LogEntry) => {\n\t\t\t\treturn [\n\t\t\t\t\t,\n\t\t\t\t\t...val.message.map( (val: LogMessage, idx: number) => {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t})\n\t\t\t\t];\n\t\t\t})}\n\t\t\t{this.state.acceptInput?\n\t\t\t\t\n\t\t\t\t: null\n\t\t\t}\n\t\t\t
\n\t\t\t\t this.child.typer = ref}\n\t\t\t\t\tclassName=\"react-console-typer\"\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tautoCorrect=\"off\"\n\t\t\t\t\tautoCapitalize=\"off\"\n\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\tstyle={{ outline: \"none\",\n\t\t\t\t\t\tcolor: \"transparent\",\n\t\t\t\t\t\tbackgroundColor: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tresize: \"none\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t}}\n\t\t\t\t\tonBlur={this.blur}\n\t\t\t\t\tonKeyDown={this.keyDown}\n\t\t\t\t\tonChange={this.change}\n\t\t\t\t\tonPaste={this.paste}\n\t\t\t\t>\n\t\t\t
\n\t\t\t
this.child.focus = ref}> 
\n\t\t
;\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./react-console.tsx","module.exports = require(\"react\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"react\"\n// module id = 1\n// module chunks = 0","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./react-console.scss\n// module id = 2\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/src/react-console.tsx b/src/react-console.tsx index ee541a4..baf6add 100644 --- a/src/react-console.tsx +++ b/src/react-console.tsx @@ -101,23 +101,34 @@ let ConsoleMessage: React.SFC = function(props: ConsoleMess - {data.rows && data.rows.map((row: string[], index: number) => { - return {row.map((cell: string, cellIndex: number) => { - return ; }) - }; + {data.rows && data.rows.map((row: any[], index: number) => { + return {row.map((cell: any, cellIndex: number) => { + if(typeof cell === 'string'){ + return ; + }else if(typeof cell === 'object' && cell.type === 'link'){ + return ; + }else{ + return ; + } + + })} + ; + })}
{cell}
{cell}{cell.text}{JSON.stringify(cell)}
; }else{ return
- {props.value.map((val: any)=>{ + {props.value.map((val: any, i: number)=>{ if(typeof val == 'string') { - return val; + return
{val}
; + } else if(typeof val === 'object' && val.type === 'link') { + return ; } else { - return JSON.stringify(val); + return
{JSON.stringify(val)}
; } - }).join("\n")} + })}
; } } @@ -128,7 +139,7 @@ ConsoleMessage.defaultProps = { } export interface ConsoleTableObject { - rows: Array; + rows: Array; headers?: Array; }