diff --git a/dist/runtime.js b/dist/runtime.js index a0adb5b..6d7dfad 100644 --- a/dist/runtime.js +++ b/dist/runtime.js @@ -1,8 +1,8 @@ (function (rxjs,$,CodeMirror) { 'use strict'; -$ = $ && 'default' in $ ? $['default'] : $; -CodeMirror = CodeMirror && 'default' in CodeMirror ? CodeMirror['default'] : CodeMirror; +$ = $ && $.hasOwnProperty('default') ? $['default'] : $; +CodeMirror = CodeMirror && CodeMirror.hasOwnProperty('default') ? CodeMirror['default'] : CodeMirror; /** * RxJS in action @@ -95,6 +95,123 @@ function consoleProxy() { } } +var asyncGenerator = function () { + function AwaitValue(value) { + this.value = value; + } + + function AsyncGenerator(gen) { + var front, back; + + function send(key, arg) { + return new Promise(function (resolve, reject) { + var request = { + key: key, + arg: arg, + resolve: resolve, + reject: reject, + next: null + }; + + if (back) { + back = back.next = request; + } else { + front = back = request; + resume(key, arg); + } + }); + } + + function resume(key, arg) { + try { + var result = gen[key](arg); + var value = result.value; + + if (value instanceof AwaitValue) { + Promise.resolve(value.value).then(function (arg) { + resume("next", arg); + }, function (arg) { + resume("throw", arg); + }); + } else { + settle(result.done ? "return" : "normal", result.value); + } + } catch (err) { + settle("throw", err); + } + } + + function settle(type, value) { + switch (type) { + case "return": + front.resolve({ + value: value, + done: true + }); + break; + + case "throw": + front.reject(value); + break; + + default: + front.resolve({ + value: value, + done: false + }); + break; + } + + front = front.next; + + if (front) { + resume(front.key, front.arg); + } else { + back = null; + } + } + + this._invoke = send; + + if (typeof gen.return !== "function") { + this.return = undefined; + } + } + + if (typeof Symbol === "function" && Symbol.asyncIterator) { + AsyncGenerator.prototype[Symbol.asyncIterator] = function () { + return this; + }; + } + + AsyncGenerator.prototype.next = function (arg) { + return this._invoke("next", arg); + }; + + AsyncGenerator.prototype.throw = function (arg) { + return this._invoke("throw", arg); + }; + + AsyncGenerator.prototype.return = function (arg) { + return this._invoke("return", arg); + }; + + return { + wrap: function (fn) { + return function () { + return new AsyncGenerator(fn.apply(this, arguments)); + }; + }, + await: function (value) { + return new AwaitValue(value); + } + }; +}(); + + + + + var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); @@ -255,6 +372,8 @@ var cookies = new CookieManager(); * @author Paul Daniels * @author Luis Atencio */ +'use strict'; + cookies.watchCookie('example').subscribe(function (x) { return console.log('Cookie is ' + x); }); @@ -272,8 +391,7 @@ rxjs.Observable.of('css', 'html', 'javascript').flatMap(function (tag) { }).subscribe(function (_ref) { var el = _ref.el, tag = _ref.tag; - var classList = el.classList, - id = el.id; + var classList = el.classList; classList.toggle('btn-primary'); @@ -430,7 +548,8 @@ var runtime$ = update$.debounceTime(1000).do(onCodeChange('combined')).map(funct * @author Paul Daniels * @author Luis Atencio */ -// Get the contents of the iframe +'use strict'; + var doc = $('#output').contents(); runtime$.subscribe(function (content) { diff --git a/dist/runtime.js.map b/dist/runtime.js.map index 21337b5..5ff2a6e 100644 --- a/dist/runtime.js.map +++ b/dist/runtime.js.map @@ -1 +1 @@ -{"version":3,"file":"runtime.js","sources":["utils/url.js","utils/tag.js","initial.js","console.js","utils/cookies.js","editors.js","runtime.js"],"sourcesContent":["/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\nexport function getUrlParams(url) {\r\n let match,\r\n pl = /\\+/g, // Regex for replacing addition symbol with a space\r\n search = /([^&=]+)=?([^&]*)/g,\r\n decode = function (s) { return decodeURIComponent(s.replace(pl, \" \")); },\r\n query = url.substring(1);\r\n\r\n const urlParams = {};\r\n while (match = search.exec(query))\r\n urlParams[decode(match[1])] = decode(match[2]);\r\n\r\n return urlParams;\r\n}","/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\nexport function buildTag(tagName, options, transform = x => x) {\r\n return (source) => {\r\n const attrs = [];\r\n for (let k in options) {\r\n options.hasOwnProperty(k) && attrs.push(`${k}=\"${options[k]}\"`);\r\n }\r\n\r\n return `<${tagName} ${attrs.join(' ')}>${transform(source)}${tagName}>`;\r\n };\r\n}","/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\nexport const defaultHtml =\r\n `\r\n\r\n\r\n
\r\n \r\n \r\n');\r\n\r\n const beforeCss = html.substring(0, endOfHead);\r\n const afterCss = html.substring(endOfHead, endOfBody);\r\n const afterJs = html.substring(endOfBody);\r\n\r\n builder.push(beforeCss);\r\n builder.push(css);\r\n builder.push(afterCss);\r\n\r\n builder.push(javascript);\r\n builder.push(afterJs);\r\n } catch (e) {\r\n console.log('Could not render content! ', e);\r\n }\r\n\r\n return builder.join('\\n');\r\n });\r\n","/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\n'use strict';\r\n\r\nimport {runtime$} from './editors';\r\nimport $ from 'jquery';\r\n\r\n// Get the contents of the iframe\r\nconst doc = $('#output').contents();\r\n\r\nruntime$.subscribe(\r\n content => {\r\n // Rewrites the contents of the iframe\r\n // Prevents carry over from previous examples\r\n doc[0].open();\r\n doc[0].write(content);\r\n doc[0].close();\r\n },\r\n err => {\r\n console.warn(\"Something went wrong! Please refresh the page.\", err)\r\n });\r\n"],"names":["getUrlParams","url","match","pl","decode","s","decodeURIComponent","replace","query","substring","urlParams","search","exec","buildTag","tagName","options","transform","x","source","attrs","k","hasOwnProperty","push","join","defaultHtml","trim","consoleProxy","console","window","log","iframe","parent","document","getElementById","consoleFrame","contentWindow","contentDocument","write","open","content","close","val","previous","body","innerHTML","CookieManager","_changed","Subject","key","next","value","opts","path","expires","cookie","_notifyChanged","Observable","defer","cookies","cookieStart","indexOf","empty","valueStart","cookieEnd","length","of","asObservable","filter","startWith","flatMapTo","getCookie","watchCookie","subscribe","setCookie","flatMap","fromEvent","tag","el","target","classList","id","toggle","jsEditor","CodeMirror","fromTextArea","htmlEditor","setValue","cssEditor","exampleSelector","location","from","getElementsByTagName","take","selected","startWithIfPresent","e","let","map","split","chapter","$","getJSON","js","css","html","onCodeChange","Date","now","html$","doc","instance","change","getValue","do","debounceTime","compile$","js$","combineLatest","code","Babel","warn","type","toString","css$","update$","javascript","runtime$","contents","builder","endOfHead","endOfBody","beforeCss","afterCss","afterJs","err"],"mappings":";;;;;;AAAA;;;;;;AAMA,AAAO,SAASA,YAAT,CAAsBC,GAAtB,EAA2B;MAC5BC,cAAJ;MACEC,KAAS,KADX;;WAEW,oBAFX;MAGEC,SAAS,SAATA,MAAS,CAAUC,CAAV,EAAa;WAASC,mBAAmBD,EAAEE,OAAF,CAAUJ,EAAV,EAAc,GAAd,CAAnB,CAAP;GAH1B;MAIEK,QAASP,IAAIQ,SAAJ,CAAc,CAAd,CAJX;;MAMMC,YAAY,EAAlB;SACOR,QAAQS,OAAOC,IAAP,CAAYJ,KAAZ,CAAf;cACYJ,OAAOF,MAAM,CAAN,CAAP,CAAV,IAA8BE,OAAOF,MAAM,CAAN,CAAP,CAA9B;GAEF,OAAOQ,SAAP;;;ACjBF;;;;;;AAMA,AAAO,SAASG,QAAT,CAAkBC,OAAlB,EAA2BC,OAA3B,EAAwD;MAApBC,SAAoB,uEAAR;WAAKC,CAAL;GAAQ;;SACtD,UAACC,MAAD,EAAY;QACXC,QAAQ,EAAd;SACK,IAAIC,CAAT,IAAcL,OAAd,EAAuB;cACbM,cAAR,CAAuBD,CAAvB,KAA6BD,MAAMG,IAAN,CAAcF,CAAd,UAAoBL,QAAQK,CAAR,CAApB,OAA7B;;;iBAGSN,OAAX,SAAsBK,MAAMI,IAAN,CAAW,GAAX,CAAtB,SAAyCP,UAAUE,MAAV,CAAzC,UAA+DJ,OAA/D;GANF;;;ACPF;;;;;;AAMA,AAAO,IAAMU,cACX,2MAUAC,IAVA,EADK;;ACNP;;;;;;AAMA,AAAO,SAASC,YAAT,GAAgD;MAA1BC,OAA0B,uEAAhBC,OAAOD,OAAS;;MAClDA,WAAWA,QAAQE,GAAtB,EAA2B;;QAErBC,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zs7TUFHTCxDQUFKLEVBQU9sQyxJQUFQO01BQ0ksQ0FBSixFQUFPRCxLQUFQLENBQWFFLE9BQWI7TUFDSSxDQUFKLEVBQU9DLEtBQVA7Q0FOSixFQVFFLGVBQU87VUFDR2dGLElBQVIsQ0FBYSxnREFBYixFQUErRGMsR0FBL0Q7Q0FUSjs7OzsifQ=="} \ No newline at end of file +{"version":3,"file":"runtime.js","sources":["utils/url.js","utils/tag.js","initial.js","console.js","utils/cookies.js","editors.js","runtime.js"],"sourcesContent":["/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\nexport function getUrlParams(url) {\r\n let match,\r\n pl = /\\+/g, // Regex for replacing addition symbol with a space\r\n search = /([^&=]+)=?([^&]*)/g,\r\n decode = function (s) { return decodeURIComponent(s.replace(pl, \" \")); },\r\n query = url.substring(1);\r\n\r\n const urlParams = {};\r\n while (match = search.exec(query))\r\n urlParams[decode(match[1])] = decode(match[2]);\r\n\r\n return urlParams;\r\n}","/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\nexport function buildTag(tagName, options, transform = x => x) {\r\n return (source) => {\r\n const attrs = [];\r\n for (let k in options) {\r\n options.hasOwnProperty(k) && attrs.push(`${k}=\"${options[k]}\"`);\r\n }\r\n\r\n return `<${tagName} ${attrs.join(' ')}>${transform(source)}${tagName}>`;\r\n };\r\n}","/**\r\n * RxJS in action\r\n * Chapter #\r\n * @author Paul Daniels\r\n * @author Luis Atencio\r\n */\r\nexport const defaultHtml =\r\n `\r\n\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n