aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asset-manifest.json6
-rw-r--r--index.html2
-rw-r--r--static/js/main.1bea423d.chunk.js (renamed from static/js/main.9b394787.chunk.js)4
-rw-r--r--static/js/main.1bea423d.chunk.js.map (renamed from static/js/main.9b394787.chunk.js.map)2
4 files changed, 7 insertions, 7 deletions
diff --git a/asset-manifest.json b/asset-manifest.json
index 38b94b2..fee19e7 100644
--- a/asset-manifest.json
+++ b/asset-manifest.json
@@ -1,7 +1,7 @@
{
"files": {
- "main.js": "/react-benzin/static/js/main.9b394787.chunk.js",
- "main.js.map": "/react-benzin/static/js/main.9b394787.chunk.js.map",
+ "main.js": "/react-benzin/static/js/main.1bea423d.chunk.js",
+ "main.js.map": "/react-benzin/static/js/main.1bea423d.chunk.js.map",
"runtime-main.js": "/react-benzin/static/js/runtime-main.9be257cd.js",
"runtime-main.js.map": "/react-benzin/static/js/runtime-main.9be257cd.js.map",
"static/css/2.6bcb1627.chunk.css": "/react-benzin/static/css/2.6bcb1627.chunk.css",
@@ -17,6 +17,6 @@
"static/js/runtime-main.9be257cd.js",
"static/css/2.6bcb1627.chunk.css",
"static/js/2.5b3b7f88.chunk.js",
- "static/js/main.9b394787.chunk.js"
+ "static/js/main.1bea423d.chunk.js"
]
} \ No newline at end of file
diff --git a/index.html b/index.html
index 0cc577f..df70711 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-<!doctype html><html lang="en"><head><title>BENZIN preview</title><link href="/react-benzin/static/css/2.6bcb1627.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],l=r[1],c=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,c||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var l=t[a];0!==o[l]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/react-benzin/";var a=this["webpackJsonpreact-benzin"]=this["webpackJsonpreact-benzin"]||[],l=a.push.bind(a);a.push=r,a=a.slice();for(var c=0;c<a.length;c++)r(a[c]);var f=l;t()}([])</script><script src="/react-benzin/static/js/2.5b3b7f88.chunk.js"></script><script src="/react-benzin/static/js/main.9b394787.chunk.js"></script></body></html> \ No newline at end of file
+<!doctype html><html lang="en"><head><title>BENZIN preview</title><link href="/react-benzin/static/css/2.6bcb1627.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function r(r){for(var n,i,a=r[0],l=r[1],c=r[2],p=0,s=[];p<a.length;p++)i=a[p],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,c||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var l=t[a];0!==o[l]&&(n=!1)}n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={1:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,function(r){return e[r]}.bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="/react-benzin/";var a=this["webpackJsonpreact-benzin"]=this["webpackJsonpreact-benzin"]||[],l=a.push.bind(a);a.push=r,a=a.slice();for(var c=0;c<a.length;c++)r(a[c]);var f=l;t()}([])</script><script src="/react-benzin/static/js/2.5b3b7f88.chunk.js"></script><script src="/react-benzin/static/js/main.1bea423d.chunk.js"></script></body></html> \ No newline at end of file
diff --git a/static/js/main.9b394787.chunk.js b/static/js/main.1bea423d.chunk.js
index e24f9c6..612da37 100644
--- a/static/js/main.9b394787.chunk.js
+++ b/static/js/main.1bea423d.chunk.js
@@ -1,2 +1,2 @@
-(this["webpackJsonpreact-benzin"]=this["webpackJsonpreact-benzin"]||[]).push([[0],{100:function(e,t,n){"use strict";n.r(t);var r=n(22),a=n(2),c=n(0),i=n(10),o=n.n(i),l=n(132),s=n(144),u=n(143),d=n(139),j=n(29),b=n(135),h=n(102),p=n(136),m=Object(l.a)((function(e){var t;return{content:(t={},Object(j.a)(t,e.breakpoints.up("md"),{padding:e.spacing(2,2,1,3)}),Object(j.a)(t,e.breakpoints.down("sm"),{padding:e.spacing(2,0)}),Object(j.a)(t,"marginBottom",e.spacing(1)),t)}})),f=function(e){var t=e.sectionName,n=e.children,r=e.level,c=void 0===r?0:r,i=m(),o=Object(b.a)((function(e){return e.breakpoints.down("sm")})),l=c+2;l>6&&(l=6);var s="h".concat(l);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(h.a,{variant:s,children:t}),Object(a.jsx)(p.a,{variant:o?"fullWidth":"middle"}),Object(a.jsx)(h.a,{component:"div",className:i.content,children:n})]})},v=n(62),O=n.n(v),g=n(63),x=n.n(g),w=n(65),y=n(137),k=n(138),M=(n(80),Object(w.a)({palette:{type:"dark",primary:{main:O.a[400]},secondary:{main:x.a[500]},background:{default:"#121212",paper:"#1e1e1e",elevation1:"#1e1e1e",elevation2:"#232323",elevation3:"#252525"},text:{primary:"#f4f4f4",secondary:"rgba(255, 255, 255, 0.6)"}}})),N=function(e){var t=e.children;return Object(a.jsxs)(y.a,{theme:M,children:[Object(a.jsx)(k.a,{}),t]})},L=n(64),E=n.n(L),R=n(103),I=Object(l.a)((function(e){return{root:{background:e.palette.background.default,padding:e.spacing(1),overflowX:"auto",fontFamily:"Monospace",scrollbarColor:"auto"}}})),F=function(e){var t=e.rawLines,n=I();return Object(a.jsx)(R.a,{variant:"outlined",className:n.root,children:t.map((function(e){return Object(a.jsx)("pre",{children:e})}))})},S=n(42),z=function(e){return{local:new RegExp("".concat(e,"([^").concat(e,"]+)").concat(e)),global:new RegExp("(".concat(e,"[^").concat(e,"]+").concat(e,")"))}},C={conceal:{global:/(!?\[.+?\]\(.+?\))(?!])/g,local:/!?\[(.*\]?.*)\]\((.+?)\)/},rawLink:{global:/((?:(?:[A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)(?:(?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[.!/\\\w]*))?)/,local:/&^/},emoji:z(":"),bold:z("\\*\\*"),italic:z("\\*"),code:z("`"),strikeThrough:z("~~")},D=new RegExp(Object.values(C).map((function(e){return e.global.source})).join("|")),T=[];Object.keys(S.lib).forEach((function(e){return T.push({name:e,char:S.lib[e].char})}));var H=Object(l.a)((function(e){return{code:{background:e.palette.background.default,borderRadius:e.spacing(.5),padding:e.spacing(.5),fontFamily:"Monospace"},image:{maxWidth:"100%",maxHeight:"100%"}}})),B=function e(t){var n=t.span,r=H();if(!n)return null;var c=C.conceal.local.exec(n);if(c)return"!"===n[0]?Object(a.jsx)("img",{src:c[2],alt:c[1],className:r.image}):Object(a.jsx)(d.a,{href:c[2],children:Object(a.jsx)(e,{span:c[1]})});var i=n.match(C.emoji.local);if(i){var o=T.find((function(e){return e.name===i[1]}));return Object(a.jsx)("span",{children:o?o.char:n})}var l=n.match(C.code.local);if(l)return Object(a.jsx)("span",{className:r.code,children:l[1]});var s=n.match(C.bold.local);if(s)return Object(a.jsx)("b",{children:s[1]});var u=n.match(C.italic.local);if(u)return Object(a.jsx)("i",{children:u[1]});var j=n.match(C.strikeThrough.local);return j?Object(a.jsx)("span",{style:{textDecoration:"line-through"},children:j[1]}):n.match(C.rawLink.global)?Object(a.jsx)(d.a,{href:n,children:n}):Object(a.jsx)(a.Fragment,{children:n})},A=function(e){var t=e.line;return Object(a.jsx)(a.Fragment,{children:t.split(D).map((function(e){return Object(a.jsx)(B,{span:e})}))})},$=function(e){return null!==e.match(/^\s*```.*$/)},_=function(e){return null!==e.match(/^ ?[-*] .*$/)},W=function(e,t){var n=new RegExp("</".concat(t,"[^<]*>"));return null!==e.match(n)},Z=function(e){return null!==e.match(/\\\|$/)},P=function e(t){var n=t.rawLines;if(!n.length)return null;var c,i=n.splice(0,1)[0];if($(i)){var o=n.findIndex((function(e){return $(e)})),l=n.splice(0,o+1).slice(0,o);c=Object(a.jsx)(F,{rawLines:l})}else if(_(i)){var s=n.findIndex((function(e){return!_(e)})),u=n.splice(0,s).slice(0,s);u.unshift(i),c=Object(a.jsx)("ul",{children:u.map((function(e){return Object(a.jsx)("li",{children:Object(a.jsx)(A,{line:e.slice(2)})})}))})}else if(c=function(e){var t=/<([^/\s]*)[^<]*[^/]>/g.exec(e);return t?t[1]:""}(i)){var d=c,j=W(i,d)?-1:n.findIndex((function(e){return W(e,d)})),b=n.splice(0,j+1);b.unshift(i),c=Object(a.jsx)("div",{dangerouslySetInnerHTML:{__html:b.join("\n")}})}else if(null!==(c=function(e){return e.match(/(<[^/\s]*[^<]*\/>)/g)}(i))){var h=c[0],p=i.split(h),m=Object(r.a)(p,2),f=m[0],v=m[1];c=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(A,{line:f}),Object(a.jsx)("div",{dangerouslySetInnerHTML:{__html:h}}),Object(a.jsx)(A,{line:v})]})}else if(Z(i)){var O=n.findIndex((function(e){return!Z(e)})),g=n.splice(0,O).map((function(e){return e.slice(0,-2)}));g.unshift(i.slice(0,-2)),g.push(n.splice(0,1)[0]),c=Object(a.jsx)("p",{children:g.map((function(e){return Object(a.jsx)(A,{line:e})}))})}else c=W(i,"")?null:Object(a.jsx)("p",{children:Object(a.jsx)(A,{line:i})});return Object(a.jsxs)(a.Fragment,{children:[c,Object(a.jsx)(e,{rawLines:n})]})},G=function(e){if(!e)return 0;for(var t=0;"#"===e[t];)t+=1;return t},J=function(e){var t=e.rawLines,n=e.level,r=void 0===n?0:n,c=e.SectionComponent,i=t.reduce((function(e,t){return t&&(G(t)===r&&e.push([]),e.length&&e[e.length-1].push(t)),e}),[]).map((function(e){return Object(a.jsx)(c,{rawLines:e,level:r})}));return Object(a.jsx)(a.Fragment,{children:i})},Y=function e(t){var n=t.rawLines,r=t.level,c=void 0===r?0:r,i=n.findIndex((function(e){return e.match("^#{".concat(c+1,",} .*$"))})),o=n.splice(0,i<0?n.length:i);if(!c)return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(h.a,{children:Object(a.jsx)(P,{rawLines:o})}),Object(a.jsx)(J,{rawLines:n,level:G(n[0]),SectionComponent:e})]});var l=o.splice(0,1)[0].slice(c).trim(),s=G(n[0]);return Object(a.jsxs)(f,{sectionName:l,level:c,children:[Object(a.jsx)(P,{rawLines:o}),Object(a.jsx)(J,{rawLines:n,level:s,SectionComponent:e})]})},X=function(e){var t=e.data,n=e.url,i=Object(c.useState)(t||""),o=Object(r.a)(i,2),l=o[0],s=o[1];n&&E.a.get(n).then((function(e){return s(e.data)})),Object(c.useEffect)((function(){n||s(t||"")}),[t,n]);var u=(null===n||void 0===n?void 0:n.slice(0,n.lastIndexOf("/")))||"",d=l.split(/\r?\n/).map((function(e){return function(e,t){return e.replace(/src="(?!http)(.*)"[\s>]/,(function(e,n){return'src="'.concat(t,"/").concat(n,'?sanitize=true"')})).replace(/\[(.*\]?.*)\]\((?!http)(.+?)\)/,(function(e,n,r){return"[".concat(n,"](").concat(t,"/").concat(r,")")}))}(e,u)}));return Object(a.jsx)(Y,{rawLines:d})},q=n(140),K=n(141),Q=n(145),U=n(142),V=Object(l.a)((function(e){return{root:{background:e.palette.background.elevation2,color:e.palette.text.primary,paddingLeft:e.spacing(3)},logo:{margin:e.spacing(0,3,0,1)},tab:{"& .MuiTab-wrapper":{padding:e.spacing(2),flexDirection:"row",fontSize:"0.8125rem","& svg":{marginRight:e.spacing(1),marginBottom:"0 !important"}}}}})),ee=function(e){var t=e.logo,n=e.contents,r=e.page,c=e.setPage,i=V();return Object(a.jsx)(q.a,{position:"sticky",className:i.root,children:Object(a.jsxs)(K.a,{children:[t.icon,Object(a.jsx)(h.a,{variant:"h5",className:i.logo,color:"primary",children:t.title}),Object(a.jsx)(Q.a,{onChange:function(e,t){c(t)},value:r,children:n&&Object.keys(n).map((function(e){return Object(a.jsx)(U.a,{label:e,icon:n[e],value:e,className:i.tab},e)}))})]})})},te=n(43),ne=Object(l.a)((function(e){return{surface:{position:"absolute",display:"flex",flexDirection:"column",overflowY:"auto",scrollbarColor:"".concat(e.palette.secondary.dark," ").concat(e.palette.secondary.light),"& a.MuiTypography-root":{color:e.palette.primary.light}}}})),re=function(e){var t=e.size,n=e.position,r=e.children,c=ne();return Object(a.jsx)(R.a,{variant:"outlined",style:Object(te.a)(Object(te.a)({},t),n),className:c.surface,children:r})},ae=Object(l.a)((function(e){return{header:{padding:e.spacing(1,0,1,2),background:e.palette.background.elevation2}}})),ce=function(e){var t=e.type,n=e.name,r=e.children,c=ae(),i={height:"85vh"},o={bottom:"3vh"};return"primary"===t?(i.width="63vw",o.left="2vw"):"secondary"===t?(i.width="31vw",o.right="2vw"):"mono"===t&&(o.left="2vw",o.right="2vw"),Object(a.jsxs)(re,{size:i,position:o,children:[n&&Object(a.jsxs)("div",{children:[Object(a.jsx)(h.a,{variant:"h5",className:c.header,children:n}),Object(a.jsx)(p.a,{})]}),r]})},ie=n.p+"static/media/icon.50d2b01a.svg",oe=Object(l.a)((function(e){return{window:{padding:e.spacing(4)},promoButton:{display:"flex",justifyContent:"center",marginTop:e.spacing(4)}}})),le=Object(a.jsx)("img",{src:ie,width:"32px",height:"37px",alt:"logo"}),se={home:null,spacevim:null,"material-ui":null,custom:null,"live preview":null},ue={home:"https://raw.githubusercontent.com/eug-vs/react-benzin/develop/README.md",spacevim:"https://raw.githubusercontent.com/spacevim/spacevim/master/README.md","material-ui":"https://raw.githubusercontent.com/mui-org/material-ui/master/README.md"},de=function(){var e=Object(c.useState)(""),t=Object(r.a)(e,2),n=t[0],i=t[1],o=Object(c.useRef)(null);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(f,{sectionName:"Render custom markdown document",level:2,children:[Object(a.jsx)("p",{children:"This should be a link to a valid markdown file. Response should give the file contents. If you copy README file from GitHub, make sure you provide link to raw view."}),Object(a.jsx)("p",{children:Object(a.jsx)(s.a,{fullWidth:!0,inputRef:o,variant:"outlined",color:"secondary",label:"Markdown url"})}),Object(a.jsx)(u.a,{variant:"contained",color:"secondary",onClick:function(){var e;i((null===(e=o.current)||void 0===e?void 0:e.value)||"")},children:"Render!"})]}),Object(a.jsx)(X,{url:n})]})},je=function(e){var t=e.setLivePreviewData,n=Object(c.useRef)(null);return Object(a.jsx)(a.Fragment,{children:Object(a.jsxs)(f,{sectionName:"Markdown live preview",level:2,children:[Object(a.jsxs)("p",{children:["Start typing and see your text rendered on the left window! You can find the list of all Markdown features"," ",Object(a.jsx)(d.a,{href:"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet",children:"here"}),". (some of them are yet in progress). We recommend starting with # Header."]}),Object(a.jsx)("p",{children:Object(a.jsx)(s.a,{fullWidth:!0,multiline:!0,inputRef:n,variant:"outlined",color:"primary",label:"Markdown",onChange:function(){var e;t((null===(e=n.current)||void 0===e?void 0:e.value)||"")}})})]})})},be=function(){var e=oe(),t=Object(c.useState)("home"),n=Object(r.a)(t,2),i=n[0],o=n[1],l=Object(c.useState)(""),s=Object(r.a)(l,2),d=s[0],j=s[1],b=ue[i],h=null===b||void 0===b?void 0:b.slice(b.lastIndexOf("/")+1),p=["## Markdown\n [Markdown file](".concat(b,") *(...").concat(h,")* that you can see on the left was parsed and rendered by **BENZIN**! :rocket:"),"Switch between tabs on the header to explore other markdown templates. :recycle: ","Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen:","## How do I use this feature?","```","import Markdown from 'react-benzin';","const data = '# Header\\nHello, *world!*';","ReactDOM.render(<Markdown data={data}/>, document.getElementById('root'));","```"].join("\n"),m=Object(a.jsx)(X,{url:b});return"custom"===i?m=Object(a.jsx)(de,{}):"live preview"===i&&(m=Object(a.jsx)(X,{data:d||"# Start typing in the right window!"})),Object(a.jsxs)(N,{children:[Object(a.jsx)(ee,{logo:{icon:le,title:"BENZIN"},contents:se,page:i,setPage:o}),Object(a.jsx)(ce,{type:"primary",children:Object(a.jsx)("div",{className:e.window,children:m})}),Object(a.jsx)(ce,{type:"secondary",name:"Feature preview",children:Object(a.jsx)("div",{className:e.window,children:"live preview"===i?Object(a.jsx)(je,{setLivePreviewData:j}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(X,{data:p}),Object(a.jsx)("p",{className:e.promoButton,children:Object(a.jsx)(u.a,{variant:"contained",color:"primary",size:"large",onClick:function(){o("live preview")},children:"Try it yourself!"})})]})})})]})};o.a.render(Object(a.jsx)(be,{}),document.getElementById("root"))}},[[100,1,2]]]);
-//# sourceMappingURL=main.9b394787.chunk.js.map \ No newline at end of file
+(this["webpackJsonpreact-benzin"]=this["webpackJsonpreact-benzin"]||[]).push([[0],{100:function(e,t,n){"use strict";n.r(t);var r=n(22),a=n(2),c=n(0),i=n(10),o=n.n(i),l=n(132),s=n(144),u=n(143),d=n(139),j=n(29),b=n(135),h=n(102),p=n(136),m=Object(l.a)((function(e){var t;return{content:(t={},Object(j.a)(t,e.breakpoints.up("md"),{padding:e.spacing(2,2,1,3)}),Object(j.a)(t,e.breakpoints.down("sm"),{padding:e.spacing(2,0)}),Object(j.a)(t,"marginBottom",e.spacing(1)),t)}})),f=function(e){var t=e.sectionName,n=e.children,r=e.level,c=void 0===r?0:r,i=m(),o=Object(b.a)((function(e){return e.breakpoints.down("sm")})),l=c+2;l>6&&(l=6);var s="h".concat(l);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(h.a,{variant:s,children:t}),Object(a.jsx)(p.a,{variant:o?"fullWidth":"middle"}),Object(a.jsx)(h.a,{component:"div",className:i.content,children:n})]})},v=n(62),O=n.n(v),g=n(63),x=n.n(g),w=n(65),y=n(137),k=n(138),M=(n(80),Object(w.a)({palette:{type:"dark",primary:{main:O.a[400]},secondary:{main:x.a[500]},background:{default:"#121212",paper:"#1e1e1e",elevation1:"#1e1e1e",elevation2:"#232323",elevation3:"#252525"},text:{primary:"#f4f4f4",secondary:"rgba(255, 255, 255, 0.6)"}}})),N=function(e){var t=e.children;return Object(a.jsxs)(y.a,{theme:M,children:[Object(a.jsx)(k.a,{}),t]})},L=n(64),E=n.n(L),R=n(103),I=Object(l.a)((function(e){return{root:{background:e.palette.background.default,padding:e.spacing(1),overflowX:"auto",fontFamily:"Monospace",scrollbarColor:"auto"}}})),F=function(e){var t=e.rawLines,n=I();return Object(a.jsx)(R.a,{variant:"outlined",className:n.root,children:t.map((function(e){return Object(a.jsx)("pre",{children:e})}))})},S=n(42),z=function(e){return{local:new RegExp("".concat(e,"([^").concat(e,"]+)").concat(e)),global:new RegExp("(".concat(e,"[^").concat(e,"]+").concat(e,")"))}},C={conceal:{global:/(!?\[.+?\]\(.+?\))(?!])/g,local:/!?\[(.*\]?.*)\]\((.+?)\)/},rawLink:{global:/((?:(?:[A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)(?:(?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[.!/\\\w]*))?)/,local:/&^/},emoji:z(":"),bold:z("\\*\\*"),italic:z("\\*"),code:z("`"),strikeThrough:z("~~")},D=new RegExp(Object.values(C).map((function(e){return e.global.source})).join("|")),T=[];Object.keys(S.lib).forEach((function(e){return T.push({name:e,char:S.lib[e].char})}));var H=Object(l.a)((function(e){return{code:{background:e.palette.background.default,borderRadius:e.spacing(.5),padding:e.spacing(.5),fontFamily:"Monospace"},image:{maxWidth:"100%",maxHeight:"100%"}}})),B=function e(t){var n=t.span,r=H();if(!n)return null;var c=C.conceal.local.exec(n);if(c)return"!"===n[0]?Object(a.jsx)("img",{src:c[2],alt:c[1],className:r.image}):Object(a.jsx)(d.a,{href:c[2],children:Object(a.jsx)(e,{span:c[1]})});var i=n.match(C.emoji.local);if(i){var o=T.find((function(e){return e.name===i[1]}));return Object(a.jsx)("span",{children:o?o.char:n})}var l=n.match(C.code.local);if(l)return Object(a.jsx)("span",{className:r.code,children:l[1]});var s=n.match(C.bold.local);if(s)return Object(a.jsx)("b",{children:s[1]});var u=n.match(C.italic.local);if(u)return Object(a.jsx)("i",{children:u[1]});var j=n.match(C.strikeThrough.local);return j?Object(a.jsx)("span",{style:{textDecoration:"line-through"},children:j[1]}):n.match(C.rawLink.global)?Object(a.jsx)(d.a,{href:n,children:n}):Object(a.jsx)(a.Fragment,{children:n})},A=function(e){var t=e.line;return Object(a.jsx)(a.Fragment,{children:t.split(D).map((function(e){return Object(a.jsx)(B,{span:e})}))})},$=function(e){return null!==e.match(/^\s*```.*$/)},_=function(e){return null!==e.match(/^ ?[-*] .*$/)},W=function(e,t){var n=new RegExp("</".concat(t,"[^<]*>"));return null!==e.match(n)},Z=function(e){return null!==e.match(/\\\|$/)},P=function e(t){var n=t.rawLines;if(!n.length)return null;var c,i=n.splice(0,1)[0];if($(i)){var o=n.findIndex((function(e){return $(e)})),l=n.splice(0,o+1).slice(0,o);c=Object(a.jsx)(F,{rawLines:l})}else if(_(i)){var s=n.findIndex((function(e){return!_(e)})),u=n.splice(0,s).slice(0,s);u.unshift(i),c=Object(a.jsx)("ul",{children:u.map((function(e){return Object(a.jsx)("li",{children:Object(a.jsx)(A,{line:e.slice(2)})})}))})}else if(c=function(e){var t=/<([^/\s]*)[^<]*[^/]>/g.exec(e);return t?t[1]:""}(i)){var d=c,j=W(i,d)?-1:n.findIndex((function(e){return W(e,d)})),b=n.splice(0,j+1);b.unshift(i),c=Object(a.jsx)("div",{dangerouslySetInnerHTML:{__html:b.join("\n")}})}else if(null!==(c=function(e){return e.match(/(<[^/\s]*[^<]*\/>)/g)}(i))){var h=c[0],p=i.split(h),m=Object(r.a)(p,2),f=m[0],v=m[1];c=Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(A,{line:f}),Object(a.jsx)("div",{dangerouslySetInnerHTML:{__html:h}}),Object(a.jsx)(A,{line:v})]})}else if(Z(i)){var O=n.findIndex((function(e){return!Z(e)})),g=n.splice(0,O).map((function(e){return e.slice(0,-2)}));g.unshift(i.slice(0,-2)),g.push(n.splice(0,1)[0]),c=Object(a.jsx)("p",{children:g.map((function(e){return Object(a.jsx)(A,{line:e})}))})}else c=W(i,"")?null:Object(a.jsx)("p",{children:Object(a.jsx)(A,{line:i})});return Object(a.jsxs)(a.Fragment,{children:[c,Object(a.jsx)(e,{rawLines:n})]})},G=function(e){if(!e)return 0;for(var t=0;"#"===e[t];)t+=1;return t},J=function(e){var t=e.rawLines,n=e.level,r=void 0===n?0:n,c=e.SectionComponent,i=t.reduce((function(e,t){return t&&(G(t)===r&&e.push([]),e.length&&e[e.length-1].push(t)),e}),[]).map((function(e){return Object(a.jsx)(c,{rawLines:e,level:r})}));return Object(a.jsx)(a.Fragment,{children:i})},Y=function e(t){var n=t.rawLines,r=t.level,c=void 0===r?0:r,i=n.findIndex((function(e){return e.match("^#{".concat(c+1,",} .*$"))})),o=n.splice(0,i<0?n.length:i);if(!c)return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(h.a,{children:Object(a.jsx)(P,{rawLines:o})}),Object(a.jsx)(J,{rawLines:n,level:G(n[0]),SectionComponent:e})]});var l=o.splice(0,1)[0].slice(c).trim(),s=G(n[0]);return Object(a.jsxs)(f,{sectionName:l,level:c,children:[Object(a.jsx)(P,{rawLines:o}),Object(a.jsx)(J,{rawLines:n,level:s,SectionComponent:e})]})},X=function(e){var t=e.data,n=e.url,i=Object(c.useState)(t||""),o=Object(r.a)(i,2),l=o[0],s=o[1];n&&E.a.get(n).then((function(e){return s(e.data)})),Object(c.useEffect)((function(){n||s(t||"")}),[t,n]);var u=(null===n||void 0===n?void 0:n.slice(0,n.lastIndexOf("/")))||"",d=l.split(/\r?\n/).map((function(e){return function(e,t){return e.replace(/src="(?!http)(.*)"[\s>]/,(function(e,n){return'src="'.concat(t,"/").concat(n,'?sanitize=true"')})).replace(/\[(.*\]?.*)\]\((?!http)(.+?)\)/,(function(e,n,r){return"[".concat(n,"](").concat(t,"/").concat(r,")")}))}(e,u)}));return Object(a.jsx)(Y,{rawLines:d})},q=n(140),K=n(141),Q=n(145),U=n(142),V=Object(l.a)((function(e){return{root:{background:e.palette.background.elevation2,color:e.palette.text.primary,paddingLeft:e.spacing(3)},logo:{margin:e.spacing(0,3,0,1)},tab:{"& .MuiTab-wrapper":{padding:e.spacing(2),flexDirection:"row",fontSize:"0.8125rem","& svg":{marginRight:e.spacing(1),marginBottom:"0 !important"}}}}})),ee=function(e){var t=e.logo,n=e.contents,r=e.page,c=e.setPage,i=V();return Object(a.jsx)(q.a,{position:"sticky",className:i.root,children:Object(a.jsxs)(K.a,{children:[t.icon,Object(a.jsx)(h.a,{variant:"h5",className:i.logo,color:"primary",children:t.title}),Object(a.jsx)(Q.a,{onChange:function(e,t){c(t)},value:r,children:n&&Object.keys(n).map((function(e){return Object(a.jsx)(U.a,{label:e,icon:n[e],value:e,className:i.tab},e)}))})]})})},te=n(43),ne=Object(l.a)((function(e){return{surface:{position:"absolute",display:"flex",flexDirection:"column",overflowY:"auto",scrollbarColor:"".concat(e.palette.secondary.dark," ").concat(e.palette.secondary.light),"& a.MuiTypography-root":{color:e.palette.primary.light}}}})),re=function(e){var t=e.size,n=e.position,r=e.children,c=ne();return Object(a.jsx)(R.a,{variant:"outlined",style:Object(te.a)(Object(te.a)({},t),n),className:c.surface,children:r})},ae=Object(l.a)((function(e){return{header:{padding:e.spacing(1,0,1,2),background:e.palette.background.elevation2}}})),ce=function(e){var t=e.type,n=e.name,r=e.children,c=ae(),i={height:"85vh"},o={bottom:"3vh"};return"primary"===t?(i.width="63vw",o.left="2vw"):"secondary"===t?(i.width="31vw",o.right="2vw"):"mono"===t&&(o.left="2vw",o.right="2vw"),Object(a.jsxs)(re,{size:i,position:o,children:[n&&Object(a.jsxs)("div",{children:[Object(a.jsx)(h.a,{variant:"h5",className:c.header,children:n}),Object(a.jsx)(p.a,{})]}),r]})},ie=n.p+"static/media/icon.50d2b01a.svg",oe=Object(l.a)((function(e){return{window:{padding:e.spacing(4)},promoButton:{display:"flex",justifyContent:"center",marginTop:e.spacing(4)}}})),le=Object(a.jsx)("img",{src:ie,width:"32px",height:"37px",alt:"logo"}),se={home:null,dotfiles:null,"material-ui":null,custom:null,"live preview":null},ue={home:"https://raw.githubusercontent.com/eug-vs/react-benzin/develop/README.md","material-ui":"https://raw.githubusercontent.com/mui-org/material-ui/master/README.md",dotfiles:"https://raw.githubusercontent.com/eug-vs/dotfiles/master/.github/README.md"},de=function(){var e=Object(c.useState)(""),t=Object(r.a)(e,2),n=t[0],i=t[1],o=Object(c.useRef)(null);return Object(a.jsxs)(a.Fragment,{children:[Object(a.jsxs)(f,{sectionName:"Render custom markdown document",level:2,children:[Object(a.jsx)("p",{children:"This should be a link to a valid markdown file. Response should give the file contents. If you copy README file from GitHub, make sure you provide link to raw view."}),Object(a.jsx)("p",{children:Object(a.jsx)(s.a,{fullWidth:!0,inputRef:o,variant:"outlined",color:"secondary",label:"Markdown url"})}),Object(a.jsx)(u.a,{variant:"contained",color:"secondary",onClick:function(){var e;i((null===(e=o.current)||void 0===e?void 0:e.value)||"")},children:"Render!"})]}),Object(a.jsx)(X,{url:n})]})},je=function(e){var t=e.setLivePreviewData,n=Object(c.useRef)(null);return Object(a.jsx)(a.Fragment,{children:Object(a.jsxs)(f,{sectionName:"Markdown live preview",level:2,children:[Object(a.jsxs)("p",{children:["Start typing and see your text rendered on the left window! You can find the list of all Markdown features"," ",Object(a.jsx)(d.a,{href:"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet",children:"here"}),". (some of them are yet in progress). We recommend starting with # Header."]}),Object(a.jsx)("p",{children:Object(a.jsx)(s.a,{fullWidth:!0,multiline:!0,inputRef:n,variant:"outlined",color:"primary",label:"Markdown",onChange:function(){var e;t((null===(e=n.current)||void 0===e?void 0:e.value)||"")}})})]})})},be=function(){var e=oe(),t=Object(c.useState)("home"),n=Object(r.a)(t,2),i=n[0],o=n[1],l=Object(c.useState)(""),s=Object(r.a)(l,2),d=s[0],j=s[1],b=ue[i],h=null===b||void 0===b?void 0:b.slice(b.lastIndexOf("/")+1),p=["## Markdown\n [Markdown file](".concat(b,") *(...").concat(h,")* that you can see on the left was parsed and rendered by **BENZIN**! :rocket:"),"Switch between tabs on the header to explore other markdown templates. :recycle: ","Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen:","## How do I use this feature?","```","import Markdown from 'react-benzin';","const data = '# Header\\nHello, *world!*';","ReactDOM.render(<Markdown data={data}/>, document.getElementById('root'));","```"].join("\n"),m=Object(a.jsx)(X,{url:b});return"custom"===i?m=Object(a.jsx)(de,{}):"live preview"===i&&(m=Object(a.jsx)(X,{data:d||"# Start typing in the right window!"})),Object(a.jsxs)(N,{children:[Object(a.jsx)(ee,{logo:{icon:le,title:"BENZIN"},contents:se,page:i,setPage:o}),Object(a.jsx)(ce,{type:"primary",children:Object(a.jsx)("div",{className:e.window,children:m})}),Object(a.jsx)(ce,{type:"secondary",name:"Feature preview",children:Object(a.jsx)("div",{className:e.window,children:"live preview"===i?Object(a.jsx)(je,{setLivePreviewData:j}):Object(a.jsxs)(a.Fragment,{children:[Object(a.jsx)(X,{data:p}),Object(a.jsx)("p",{className:e.promoButton,children:Object(a.jsx)(u.a,{variant:"contained",color:"primary",size:"large",onClick:function(){o("live preview")},children:"Try it yourself!"})})]})})})]})};o.a.render(Object(a.jsx)(be,{}),document.getElementById("root"))}},[[100,1,2]]]);
+//# sourceMappingURL=main.1bea423d.chunk.js.map \ No newline at end of file
diff --git a/static/js/main.9b394787.chunk.js.map b/static/js/main.1bea423d.chunk.js.map
index e0c99c7..8f7df6b 100644
--- a/static/js/main.9b394787.chunk.js.map
+++ b/static/js/main.1bea423d.chunk.js.map
@@ -1 +1 @@
-{"version":3,"sources":["lib/ContentSection/ContentSection.tsx","lib/Benzin/Benzin.tsx","lib/Markdown/CodeBlock.tsx","lib/Markdown/SyntacticSpan.tsx","lib/Markdown/Text.tsx","lib/Markdown/Content.tsx","lib/Markdown/Section.tsx","lib/Markdown/Markdown.tsx","demo/Header/Header.tsx","demo/Window/WindowSurface.tsx","demo/Window/Window.tsx","assets/icon.svg","index.tsx"],"names":["useStyles","makeStyles","theme","content","breakpoints","up","padding","spacing","down","ContentSection","sectionName","children","level","classes","isMobile","useMediaQuery","adjustedLevel","variant","Typography","Divider","component","className","benzinTheme","createMuiTheme","palette","type","primary","main","orange","secondary","purple","background","default","paper","elevation1","elevation2","elevation3","text","Benzin","ThemeProvider","CssBaseline","root","overflowX","fontFamily","scrollbarColor","CodeBlock","rawLines","Paper","map","line","enclosureRegex","e","local","RegExp","global","regex","conceal","rawLink","emoji","bold","italic","code","strikeThrough","splitter","Object","values","pair","source","join","emojiList","keys","emojiLib","forEach","name","push","char","borderRadius","image","maxWidth","maxHeight","SyntacticSpan","span","matchConceal","exec","src","alt","Link","href","matchEmoji","match","find","matchCode","matchBold","matchItalic","matchStrikeThrough","style","textDecoration","Text","split","denotesCodeBlock","denotesDottedList","denotesClosingHtml","tag","declaresNoLineBreak","Content","length","buffer","splice","closeIndex","findIndex","rawLine","codeBlockLines","slice","dottedListLines","unshift","li","denotesOpenHtml","htmlLines","dangerouslySetInnerHTML","__html","denotesSelfClosingHtml","before","after","lineBreakLines","lineBreakLine","getHeaderLevel","header","SectionMapper","SectionComponent","reduce","sections","sectionLines","Section","deeperLevelIndex","rawContent","trim","deeperLevel","Markdown","data","url","useState","markdown","setMarkdown","axios","get","then","response","useEffect","baseUrl","lastIndexOf","lines","replace","resolveUrls","color","paddingLeft","logo","margin","tab","flexDirection","fontSize","marginRight","marginBottom","Header","contents","page","setPage","AppBar","position","Toolbar","icon","title","Tabs","onChange","event","newPage","value","item","Tab","label","surface","display","overflowY","dark","light","WindowSurface","size","Window","height","bottom","width","left","right","window","promoButton","justifyContent","marginTop","Icon","headerContents","home","spacevim","custom","pageMap","CustomPage","setUrl","inputEl","useRef","TextField","fullWidth","inputRef","Button","onClick","current","LivePreviewPage","setLivePreviewData","multiline","App","livePreviewData","fileName","info","primaryWindowContent","ReactDOM","render","document","getElementById"],"mappings":"6OAgBMA,EAAYC,aAAW,SAAAC,GAAK,YAAK,CACrCC,SAAO,mBACJD,EAAME,YAAYC,GAAG,MAAQ,CAC5BC,QAASJ,EAAMK,QAAQ,EAAG,EAAG,EAAG,KAF7B,cAIJL,EAAME,YAAYI,KAAK,MAAQ,CAC9BF,QAASJ,EAAMK,QAAQ,EAAG,KALvB,6BAOSL,EAAMK,QAAQ,IAPvB,OAiCME,EAtB6B,SAAC,GAA0C,IAAxCC,EAAuC,EAAvCA,YAAaC,EAA0B,EAA1BA,SAA0B,IAAhBC,aAAgB,MAAR,EAAQ,EAC9EC,EAAUb,IACVc,EAAWC,aAAc,SAACb,GAAD,OAAkBA,EAAME,YAAYI,KAAK,SAEpEQ,EAAgBJ,EAAQ,EACxBI,EAAgB,IAAGA,EAAgB,GAGvC,IAAMC,EAAgB,WAAOD,GAE7B,OACE,qCACE,cAACE,EAAA,EAAD,CAAYD,QAASA,EAArB,SAA+BP,IAC/B,cAACS,EAAA,EAAD,CAASF,QAASH,EAAW,YAAc,WAC3C,cAACI,EAAA,EAAD,CAAYE,UAAU,MAAMC,UAAWR,EAAQV,QAA/C,SACGQ,Q,4DC1BHW,G,MAAcC,YAAe,CACjCC,QAAS,CACPC,KAAM,OACNC,QAAS,CACPC,KAAMC,IAAO,MAEfC,UAAW,CACTF,KAAMG,IAAO,MAEfC,WAAY,CACVC,QAAS,UACTC,MAAO,UACPC,WAAY,UACZC,WAAY,UACZC,WAAY,WAEdC,KAAM,CACJX,QAAS,UACTG,UAAW,gCAcFS,EARU,SAAC,GAAD,IAAG3B,EAAH,EAAGA,SAAH,OACvB,eAAC4B,EAAA,EAAD,CAAerC,MAAOoB,EAAtB,UACE,cAACkB,EAAA,EAAD,IACC7B,M,0BCtCCX,EAAYC,aAAW,SAAAC,GAAK,MAAK,CACrCuC,KAAM,CACJV,WAAY7B,EAAMsB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B,QAFf,mBAEnBwB,EAFmB,KAEbC,EAFa,OAGoBzB,mBAAiB,IAHrC,mBAGnB4E,EAHmB,KAGFH,EAHE,KASpB1E,EAAM8D,GAAQrC,GACdqD,EAAQ,OAAG9E,QAAH,IAAGA,OAAH,EAAGA,EAAK3B,MAAM2B,EAAIU,YAAY,KAAO,GAC7CqE,EAAO,yCAEsB/E,EAFtB,kBAEmC8E,EAFnC,mFAGX,oFACA,oIACA,gCACA,MACA,uCACA,6CACA,6EACA,OAEArJ,KAAK,MAEHuJ,EAAuB,cAAC,EAAD,CAAUhF,IAAKA,IAM1C,MALa,WAATyB,EAAmBuD,EAAuB,cAAC,GAAD,IAC5B,iBAATvD,IACPuD,EAAuB,cAAC,EAAD,CAAUjF,KAAM8E,GAAmB,yCAI1D,eAAC,EAAD,WACE,cAAC,GAAD,CACE7D,KAAM,CACJc,KAAM2B,GACN1B,MAAO,UAETP,SAAUkC,GACVjC,KAAMA,EACNC,QAASA,IAEX,cAAC,GAAD,CAAQ5I,KAAK,UAAb,SACE,qBAAKJ,UAAWR,EAAQmL,OAAxB,SAAiC2B,MAEnC,cAAC,GAAD,CAAQlM,KAAK,YAAYgD,KAAK,kBAA9B,SACE,qBAAKpD,UAAWR,EAAQmL,OAAxB,SAEc,iBAAT5B,EACG,cAAC,GAAD,CAAiBiD,mBAAoBA,IAErC,qCACE,cAAC,EAAD,CAAU3E,KAAMgF,IAChB,mBAAGrM,UAAWR,EAAQoL,YAAtB,SACE,cAACgB,EAAA,EAAD,CACEhM,QAAQ,YACRwI,MAAM,UACNgC,KAAK,QACLyB,QArDQ,WAC1B7C,EAAQ,iBAgDQ,2CAmBpBuD,IAASC,OAAO,cAAC,GAAD,IAASC,SAASC,eAAe,W","file":"static/js/main.9b394787.chunk.js","sourcesContent":["import React from 'react';\n\nimport {\n Typography,\n Divider,\n makeStyles,\n useMediaQuery,\n Theme,\n} from '@material-ui/core';\n\n\ninterface PropTypes {\n sectionName: string;\n level?: number;\n}\n\nconst useStyles = makeStyles(theme => ({\n content: {\n [theme.breakpoints.up('md')]: {\n padding: theme.spacing(2, 2, 1, 3),\n },\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(2, 0),\n },\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst ContentSection: React.FC<PropTypes> = ({ sectionName, children, level = 0 }) => {\n const classes = useStyles();\n const isMobile = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'));\n\n let adjustedLevel = level + 2; // Make everything smaller\n if (adjustedLevel > 6) adjustedLevel = 6;\n\n type Variant = 'h3' | 'h4' | 'h5' | 'h6';\n const variant: Variant = `h${adjustedLevel}` as Variant;\n\n return (\n <>\n <Typography variant={variant}>{sectionName}</Typography>\n <Divider variant={isMobile ? 'fullWidth' : 'middle'} />\n <Typography component=\"div\" className={classes.content}>\n {children}\n </Typography>\n </>\n );\n};\n\n\nexport default ContentSection;\n","import React from 'react';\nimport orange from '@material-ui/core/colors/orange';\nimport purple from '@material-ui/core/colors/purple';\nimport { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';\nimport { CssBaseline } from '@material-ui/core';\nimport 'typeface-roboto';\n\n\ndeclare module '@material-ui/core/styles/createPalette' {\n interface TypeBackground {\n elevation1: string;\n elevation2: string;\n elevation3: string;\n }\n}\n\n\nconst benzinTheme = createMuiTheme({\n palette: {\n type: 'dark',\n primary: {\n main: orange[400],\n },\n secondary: {\n main: purple[500],\n },\n background: {\n default: '#121212',\n paper: '#1e1e1e',\n elevation1: '#1e1e1e',\n elevation2: '#232323',\n elevation3: '#252525',\n },\n text: {\n primary: '#f4f4f4',\n secondary: 'rgba(255, 255, 255, 0.6)',\n },\n },\n});\n\n\nconst Benzin: React.FC = ({ children }) => (\n <ThemeProvider theme={benzinTheme}>\n <CssBaseline />\n {children}\n </ThemeProvider>\n);\n\n\nexport default Benzin;\n\n","import React from 'react';\nimport { Paper } from '@material-ui/core';\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ParserPropTypes } from './types';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n background: theme.palette.background.default,\n padding: theme.spacing(1),\n overflowX: 'auto',\n fontFamily: 'Monospace',\n scrollbarColor: 'auto',\n },\n}));\n\nconst CodeBlock: React.FC<ParserPropTypes> = ({ rawLines }) => {\n const classes = useStyles();\n return (\n <Paper variant=\"outlined\" className={classes.root}>\n {rawLines.map(line => <pre>{line}</pre>)}\n </Paper>\n );\n};\n\nexport default CodeBlock;\n\n","import React from 'react';\nimport { Link, makeStyles } from '@material-ui/core';\n\nimport { lib as emojiLib } from 'emojilib';\n\ninterface PropTypes {\n span: string;\n}\n\ninterface RegexPair {\n global: RegExp;\n local: RegExp;\n}\n\ninterface Emoji {\n name: string;\n char: string;\n}\n\nconst enclosureRegex = (e: string): RegexPair => ({\n local: new RegExp(`${e}([^${e}]+)${e}`),\n global: new RegExp(`(${e}[^${e}]+${e})`),\n});\n\nconst regex: Record<string, RegexPair> = {\n conceal: {\n global: /(!?\\[.+?\\]\\(.+?\\))(?!])/g,\n local: /!?\\[(.*\\]?.*)\\]\\((.+?)\\)/,\n },\n rawLink: {\n // eslint-disable-next-line max-len\n global: /((?:(?:[A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z0-9.-]+|(?:www\\.|[-;:&=+$,\\w]+@)[A-Za-z0-9.-]+)(?:(?:\\/[+~%/.\\w-_]*)?\\??(?:[-+=&;%@.\\w_]*)#?(?:[.!/\\\\\\w]*))?)/,\n local: /&^/,\n },\n emoji: enclosureRegex(':'),\n bold: enclosureRegex('\\\\*\\\\*'),\n italic: enclosureRegex('\\\\*'),\n code: enclosureRegex('`'),\n strikeThrough: enclosureRegex('~~'),\n};\n\nconst splitter = new RegExp(Object.values(regex).map(pair => pair.global.source).join('|'));\n\nconst emojiList: Emoji[] = [];\nObject.keys(emojiLib).forEach(name => emojiList.push({ name, char: emojiLib[name].char }));\n\nconst useStyles = makeStyles(theme => ({\n code: {\n background: theme.palette.background.default,\n borderRadius: theme.spacing(0.5),\n padding: theme.spacing(0.5),\n fontFamily: 'Monospace',\n },\n image: {\n maxWidth: '100%',\n maxHeight: '100%',\n },\n}));\n\nconst SyntacticSpan: React.FC<PropTypes> = ({ span }) => {\n const classes = useStyles();\n if (!span) return null;\n\n const matchConceal = regex.conceal.local.exec(span);\n if (matchConceal) {\n if (span[0] === '!') return <img src={matchConceal[2]} alt={matchConceal[1]} className={classes.image} />;\n return <Link href={matchConceal[2]}><SyntacticSpan span={matchConceal[1]} /></Link>;\n }\n\n const matchEmoji = span.match(regex.emoji.local);\n if (matchEmoji) {\n const emoji = emojiList.find(e => e.name === matchEmoji[1]);\n return <span>{emoji ? emoji.char : span}</span>;\n }\n\n const matchCode = span.match(regex.code.local);\n if (matchCode) return <span className={classes.code}>{matchCode[1]}</span>;\n\n const matchBold = span.match(regex.bold.local);\n if (matchBold) return <b>{matchBold[1]}</b>;\n\n const matchItalic = span.match(regex.italic.local);\n if (matchItalic) return <i>{matchItalic[1]}</i>;\n\n const matchStrikeThrough = span.match(regex.strikeThrough.local);\n if (matchStrikeThrough) return <span style={{ textDecoration: 'line-through' }}>{matchStrikeThrough[1]}</span>;\n\n if (span.match(regex.rawLink.global)) return <Link href={span}>{span}</Link>;\n\n return <>{span}</>;\n};\n\n\nexport { splitter };\nexport default SyntacticSpan;\n\n","import React from 'react';\nimport SyntacticSpan, { splitter } from './SyntacticSpan';\n\ninterface PropTypes {\n line: string;\n}\n\nconst Text: React.FC<PropTypes> = ({ line }) => {\n return <>{line.split(splitter).map(span => <SyntacticSpan span={span} />)}</>;\n};\n\nexport default Text;\n\n","import React from 'react';\n\nimport CodeBlock from './CodeBlock';\nimport Text from './Text';\nimport { ParserPropTypes } from './types';\n\n\nconst denotesCodeBlock = (line: string): boolean => {\n return line.match(/^\\s*```.*$/) !== null;\n};\n\nconst denotesDottedList = (line: string): boolean => {\n return line.match(/^ ?[-*] .*$/) !== null;\n};\n\nconst denotesOpenHtml = (line: string): string => {\n const regex = /<([^/\\s]*)[^<]*[^/]>/g;\n const match = regex.exec(line);\n return match ? match[1] : '';\n};\n\nconst denotesClosingHtml = (line: string, tag: string): boolean => {\n const regex = new RegExp(`</${tag}[^<]*>`);\n return line.match(regex) !== null;\n};\n\nconst denotesSelfClosingHtml = (line: string): string[] | null => {\n const regex = /(<[^/\\s]*[^<]*\\/>)/g;\n return line.match(regex);\n};\n\nconst declaresNoLineBreak = (line: string): boolean => {\n return line.match(/\\\\\\|$/) !== null;\n};\n\nconst Content: React.FC<ParserPropTypes> = ({ rawLines }) => {\n if (!rawLines.length) return null;\n\n const line = rawLines.splice(0, 1)[0];\n\n let buffer;\n if (denotesCodeBlock(line)) {\n const closeIndex = rawLines.findIndex(rawLine => denotesCodeBlock(rawLine));\n const codeBlockLines = rawLines.splice(0, closeIndex + 1).slice(0, closeIndex);\n buffer = <CodeBlock rawLines={codeBlockLines} />;\n } else if (denotesDottedList(line)) {\n const closeIndex = rawLines.findIndex(rawLine => !denotesDottedList(rawLine));\n const dottedListLines = rawLines.splice(0, closeIndex).slice(0, closeIndex);\n dottedListLines.unshift(line);\n buffer = <ul>{dottedListLines.map(li => <li><Text line={li.slice(2)} /></li>)}</ul>;\n } else if ((buffer = denotesOpenHtml(line))) {\n const tag = buffer;\n const closeIndex = denotesClosingHtml(line, tag) ? -1 : rawLines.findIndex(\n rawLine => denotesClosingHtml(rawLine, tag),\n );\n const htmlLines = rawLines.splice(0, closeIndex + 1);\n htmlLines.unshift(line);\n buffer = <div dangerouslySetInnerHTML={{ __html: htmlLines.join('\\n') }} />;\n } else if ((buffer = denotesSelfClosingHtml(line)) !== null) {\n const match = buffer[0];\n const [before, after] = line.split(match);\n buffer = (\n <>\n <Text line={before} />\n <div dangerouslySetInnerHTML={{ __html: match }} />\n <Text line={after} />\n </>\n );\n } else if (declaresNoLineBreak(line)) {\n const closeIndex = rawLines.findIndex(rawLine => !declaresNoLineBreak(rawLine));\n const lineBreakLines = rawLines.splice(0, closeIndex).map(rawLine => rawLine.slice(0, -2));\n lineBreakLines.unshift(line.slice(0, -2));\n lineBreakLines.push(rawLines.splice(0, 1)[0]);\n buffer = <p>{lineBreakLines.map(lineBreakLine => <Text line={lineBreakLine} />)}</p>;\n } else if (denotesClosingHtml(line, '')) {\n buffer = null;\n } else {\n buffer = <p><Text line={line} /></p>;\n }\n\n return (\n <>\n { buffer }\n <Content rawLines={rawLines} />\n </>\n );\n};\n\nexport default Content;\n\n","import React from 'react';\nimport { Typography } from '@material-ui/core';\nimport ContentSection from '../ContentSection/ContentSection';\nimport Content from './Content';\nimport { ParserPropTypes } from './types';\n\ninterface PropTypes extends ParserPropTypes {\n level?: number;\n}\n\ninterface MapperPropTypes extends PropTypes {\n SectionComponent: React.FC<PropTypes>;\n}\n\nconst getHeaderLevel = (header: string): number => {\n if (!header) return 0;\n let level = 0;\n while (header[level] === '#') level += 1;\n return level;\n};\n\nconst SectionMapper: React.FC<MapperPropTypes> = ({ rawLines, level = 0, SectionComponent }) => {\n const children = rawLines\n .reduce((sections: string[][], line: string) => {\n if (line) {\n if (getHeaderLevel(line) === level) sections.push([]);\n if (sections.length) sections[sections.length - 1].push(line);\n }\n return sections;\n }, [])\n .map(sectionLines => <SectionComponent rawLines={sectionLines} level={level} />);\n\n return <>{children}</>;\n};\n\n\nconst Section: React.FC<PropTypes> = ({ rawLines, level = 0 }) => {\n const deeperLevelIndex = rawLines.findIndex(line => line.match(`^#{${level + 1},} .*$`));\n const rawContent = rawLines.splice(0, (deeperLevelIndex < 0) ? rawLines.length : deeperLevelIndex);\n\n if (!level) {\n return (\n <>\n <Typography><Content rawLines={rawContent} /></Typography>\n <SectionMapper rawLines={rawLines} level={getHeaderLevel(rawLines[0])} SectionComponent={Section} />\n </>\n );\n }\n\n const sectionName = rawContent.splice(0, 1)[0].slice(level).trim();\n const deeperLevel = getHeaderLevel(rawLines[0]);\n return (\n <ContentSection sectionName={sectionName} level={level}>\n <Content rawLines={rawContent} />\n <SectionMapper rawLines={rawLines} level={deeperLevel} SectionComponent={Section} />\n </ContentSection>\n );\n};\n\nexport default Section;\n\n","import React, { useState, useEffect } from 'react';\nimport axios from 'axios';\n\nimport Section from './Section';\n\ninterface PropTypes {\n data?: string;\n url?: string;\n}\n\nconst resolveUrls = (line: string, baseUrl: string): string => line.replace(\n /src=\"(?!http)(.*)\"[\\s>]/,\n (match, url) => `src=\"${baseUrl}/${url}?sanitize=true\"`,\n).replace(\n /\\[(.*\\]?.*)\\]\\((?!http)(.+?)\\)/,\n (match, text, url) => `[${text}](${baseUrl}/${url})`,\n);\n\nconst Markdown: React.FC<PropTypes> = ({ data, url }) => {\n const [markdown, setMarkdown] = useState<string>(data || '');\n\n if (url) axios.get(url).then(response => setMarkdown(response.data));\n\n useEffect(() => {\n if (!url) setMarkdown(data || '');\n }, [data, url]);\n\n const baseUrl = url?.slice(0, url.lastIndexOf('/')) || '';\n const lines = markdown.split(/\\r?\\n/).map(line => resolveUrls(line, baseUrl));\n return <Section rawLines={lines} />;\n};\n\n\nexport default Markdown;\n\n","import React from 'react';\n\nimport {\n AppBar,\n Tabs,\n Tab,\n Typography,\n Toolbar,\n} from '@material-ui/core';\n\nimport { makeStyles } from '@material-ui/core/styles';\n\n\ninterface PropTypes {\n logo: {\n icon: React.ReactNode;\n title: string;\n };\n contents: {\n [key: string]: React.ReactNode | null;\n };\n page: string;\n setPage: (newPage: string) => void;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n background: theme.palette.background.elevation2,\n color: theme.palette.text.primary,\n paddingLeft: theme.spacing(3),\n },\n logo: {\n margin: theme.spacing(0, 3, 0, 1),\n },\n tab: {\n '& .MuiTab-wrapper': {\n padding: theme.spacing(2),\n flexDirection: 'row',\n fontSize: '0.8125rem',\n '& svg': {\n marginRight: theme.spacing(1),\n marginBottom: '0 !important',\n },\n },\n },\n}));\n\n\nconst Header: React.FC<PropTypes> = ({\n logo, contents, page, setPage,\n}) => {\n const classes = useStyles();\n\n const handleChange = (event: React.ChangeEvent<unknown>, newPage: string): void => {\n setPage(newPage);\n };\n\n return (\n <AppBar position=\"sticky\" className={classes.root}>\n <Toolbar>\n {logo.icon}\n <Typography variant=\"h5\" className={classes.logo} color=\"primary\">\n {logo.title}\n </Typography>\n <Tabs onChange={handleChange} value={page}>\n {contents && Object.keys(contents).map((item: string) => (\n <Tab\n label={item}\n icon={contents[item] as JSX.Element}\n value={item}\n className={classes.tab}\n key={item}\n />\n ))}\n </Tabs>\n </Toolbar>\n </AppBar>\n );\n};\n\nexport default Header;\n","import React from 'react';\n\nimport { Paper, makeStyles } from '@material-ui/core';\n\nimport { SurfaceSize, SurfacePosition } from './types';\n\n\ninterface PropTypes {\n size: SurfaceSize;\n position: SurfacePosition;\n}\n\n\nconst useStyles = makeStyles(theme => ({\n surface: {\n position: 'absolute',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n scrollbarColor: `${theme.palette.secondary.dark} ${theme.palette.secondary.light}`,\n\n '& a.MuiTypography-root': {\n color: theme.palette.primary.light,\n },\n },\n}));\n\n\nconst WindowSurface: React.FC<PropTypes> = ({ size, position, children }) => {\n const classes = useStyles();\n\n return (\n <Paper\n variant=\"outlined\"\n style={{ ...size, ...position }}\n className={classes.surface}\n >\n {children}\n </Paper>\n );\n};\n\n\nexport default WindowSurface;\n","import React from 'react';\n\nimport { Typography, Divider, makeStyles } from '@material-ui/core';\n\nimport WindowSurface from './WindowSurface';\nimport { SurfaceSize, SurfacePosition } from './types';\n\n\ninterface PropTypes {\n type: 'primary' | 'secondary' | 'mono';\n name?: string;\n}\n\n\nconst useStyles = makeStyles(theme => ({\n header: {\n padding: theme.spacing(1, 0, 1, 2),\n background: theme.palette.background.elevation2,\n },\n}));\n\n\nconst Window: React.FC<PropTypes> = ({ type, name, children }) => {\n const classes = useStyles();\n\n const size: SurfaceSize = {\n height: '85vh',\n };\n\n const position: SurfacePosition = {\n bottom: '3vh',\n };\n\n if (type === 'primary') {\n size.width = '63vw';\n position.left = '2vw';\n } else if (type === 'secondary') {\n size.width = '31vw';\n position.right = '2vw';\n } else if (type === 'mono') {\n position.left = '2vw';\n position.right = '2vw';\n }\n\n return (\n <WindowSurface\n size={size}\n position={position}\n >\n {name\n && (\n <div>\n <Typography variant=\"h5\" className={classes.header}>{name}</Typography>\n <Divider />\n </div>\n )}\n {children}\n </WindowSurface>\n );\n};\n\nexport default Window;\n","export default __webpack_public_path__ + \"static/media/icon.50d2b01a.svg\";","import React, { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport {\n makeStyles,\n TextField,\n Button,\n Link,\n} from '@material-ui/core';\nimport {\n Benzin,\n Markdown,\n ContentSection,\n} from './lib';\n\nimport Header from './demo/Header/Header';\nimport Window from './demo/Window/Window';\nimport icon from './assets/icon.svg';\n\nconst useStyles = makeStyles(theme => ({\n window: {\n padding: theme.spacing(4),\n },\n promoButton: {\n display: 'flex',\n justifyContent: 'center',\n marginTop: theme.spacing(4),\n },\n}));\n\n\nconst Icon = <img src={icon} width=\"32px\" height=\"37px\" alt=\"logo\" />;\n\nconst headerContents = {\n home: null,\n spacevim: null,\n 'material-ui': null,\n custom: null,\n 'live preview': null,\n};\n\nconst pageMap: Record<string, string> = {\n home: 'https://raw.githubusercontent.com/eug-vs/react-benzin/develop/README.md',\n spacevim: 'https://raw.githubusercontent.com/spacevim/spacevim/master/README.md',\n 'material-ui': 'https://raw.githubusercontent.com/mui-org/material-ui/master/README.md',\n};\n\n\nconst CustomPage: React.FC = () => {\n const [url, setUrl] = useState<string>('');\n const inputEl = useRef<HTMLInputElement>(null);\n\n const handleParseUrl = (): void => {\n setUrl(inputEl.current?.value || '');\n };\n\n return (\n <>\n <ContentSection sectionName=\"Render custom markdown document\" level={2}>\n <p>\n This should be a link to a valid markdown file. Response should give the file contents.\n If you copy README file from GitHub, make sure you provide link to raw view.\n </p>\n <p>\n <TextField\n fullWidth\n inputRef={inputEl}\n variant=\"outlined\"\n color=\"secondary\"\n label=\"Markdown url\"\n />\n </p>\n <Button variant=\"contained\" color=\"secondary\" onClick={handleParseUrl}>\n Render!\n </Button>\n </ContentSection>\n <Markdown url={url} />\n </>\n );\n};\n\ninterface LivePropTypes {\n setLivePreviewData: (livePreviewData: string) => void;\n}\n\nconst LivePreviewPage: React.FC<LivePropTypes> = ({ setLivePreviewData }) => {\n const inputEl = useRef<HTMLInputElement>(null);\n\n const handleRender = (): void => {\n setLivePreviewData(inputEl.current?.value || '');\n };\n\n return (\n <>\n <ContentSection sectionName=\"Markdown live preview\" level={2}>\n <p>\n Start typing and see your text rendered on the left window!\n You can find the list of all Markdown features\n {' '}\n <Link href=\"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet\">\n here\n </Link>\n . (some of them are yet in progress).\n We recommend starting with # Header.\n </p>\n <p>\n <TextField\n fullWidth\n multiline\n inputRef={inputEl}\n variant=\"outlined\"\n color=\"primary\"\n label=\"Markdown\"\n onChange={handleRender}\n />\n </p>\n </ContentSection>\n </>\n );\n};\n\n\nconst App: React.FC = () => {\n const classes = useStyles();\n const [page, setPage] = useState<string>('home');\n const [livePreviewData, setLivePreviewData] = useState<string>('');\n\n const handleGoLivePreview = (): void => {\n setPage('live preview');\n };\n\n const url = pageMap[page];\n const fileName = url?.slice(url.lastIndexOf('/') + 1);\n const info = [\n /* eslint-disable max-len */\n `## Markdown\\n [Markdown file](${url}) *(...${fileName})* that you can see on the left was parsed and rendered by **BENZIN**! :rocket:`,\n 'Switch between tabs on the header to explore other markdown templates. :recycle: ',\n 'Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen:',\n '## How do I use this feature?',\n '```',\n 'import Markdown from \\'react-benzin\\';',\n 'const data = \\'# Header\\\\nHello, *world!*\\';',\n 'ReactDOM.render(<Markdown data={data}/>, document.getElementById(\\'root\\'));',\n '```',\n /* eslint-enable max-len */\n ].join('\\n');\n\n let primaryWindowContent = <Markdown url={url} />;\n if (page === 'custom') primaryWindowContent = <CustomPage />;\n else if (page === 'live preview') {\n primaryWindowContent = <Markdown data={livePreviewData || '# Start typing in the right window!'} />;\n }\n\n return (\n <Benzin>\n <Header\n logo={{\n icon: Icon,\n title: 'BENZIN',\n }}\n contents={headerContents}\n page={page}\n setPage={setPage}\n />\n <Window type=\"primary\">\n <div className={classes.window}>{primaryWindowContent}</div>\n </Window>\n <Window type=\"secondary\" name=\"Feature preview\">\n <div className={classes.window}>\n {\n (page === 'live preview')\n ? <LivePreviewPage setLivePreviewData={setLivePreviewData} />\n : (\n <>\n <Markdown data={info} />\n <p className={classes.promoButton}>\n <Button\n variant=\"contained\"\n color=\"primary\"\n size=\"large\"\n onClick={handleGoLivePreview}\n >\n Try it yourself!\n </Button>\n </p>\n </>\n )\n }\n </div>\n </Window>\n </Benzin>\n );\n};\n\n\nReactDOM.render(<App />, document.getElementById('root'));\n\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["lib/ContentSection/ContentSection.tsx","lib/Benzin/Benzin.tsx","lib/Markdown/CodeBlock.tsx","lib/Markdown/SyntacticSpan.tsx","lib/Markdown/Text.tsx","lib/Markdown/Content.tsx","lib/Markdown/Section.tsx","lib/Markdown/Markdown.tsx","demo/Header/Header.tsx","demo/Window/WindowSurface.tsx","demo/Window/Window.tsx","assets/icon.svg","index.tsx"],"names":["useStyles","makeStyles","theme","content","breakpoints","up","padding","spacing","down","ContentSection","sectionName","children","level","classes","isMobile","useMediaQuery","adjustedLevel","variant","Typography","Divider","component","className","benzinTheme","createMuiTheme","palette","type","primary","main","orange","secondary","purple","background","default","paper","elevation1","elevation2","elevation3","text","Benzin","ThemeProvider","CssBaseline","root","overflowX","fontFamily","scrollbarColor","CodeBlock","rawLines","Paper","map","line","enclosureRegex","e","local","RegExp","global","regex","conceal","rawLink","emoji","bold","italic","code","strikeThrough","splitter","Object","values","pair","source","join","emojiList","keys","emojiLib","forEach","name","push","char","borderRadius","image","maxWidth","maxHeight","SyntacticSpan","span","matchConceal","exec","src","alt","Link","href","matchEmoji","match","find","matchCode","matchBold","matchItalic","matchStrikeThrough","style","textDecoration","Text","split","denotesCodeBlock","denotesDottedList","denotesClosingHtml","tag","declaresNoLineBreak","Content","length","buffer","splice","closeIndex","findIndex","rawLine","codeBlockLines","slice","dottedListLines","unshift","li","denotesOpenHtml","htmlLines","dangerouslySetInnerHTML","__html","denotesSelfClosingHtml","before","after","lineBreakLines","lineBreakLine","getHeaderLevel","header","SectionMapper","SectionComponent","reduce","sections","sectionLines","Section","deeperLevelIndex","rawContent","trim","deeperLevel","Markdown","data","url","useState","markdown","setMarkdown","axios","get","then","response","useEffect","baseUrl","lastIndexOf","lines","replace","resolveUrls","color","paddingLeft","logo","margin","tab","flexDirection","fontSize","marginRight","marginBottom","Header","contents","page","setPage","AppBar","position","Toolbar","icon","title","Tabs","onChange","event","newPage","value","item","Tab","label","surface","display","overflowY","dark","light","WindowSurface","size","Window","height","bottom","width","left","right","window","promoButton","justifyContent","marginTop","Icon","headerContents","home","dotfiles","custom","pageMap","CustomPage","setUrl","inputEl","useRef","TextField","fullWidth","inputRef","Button","onClick","current","LivePreviewPage","setLivePreviewData","multiline","App","livePreviewData","fileName","info","primaryWindowContent","ReactDOM","render","document","getElementById"],"mappings":"6OAgBMA,EAAYC,aAAW,SAAAC,GAAK,YAAK,CACrCC,SAAO,mBACJD,EAAME,YAAYC,GAAG,MAAQ,CAC5BC,QAASJ,EAAMK,QAAQ,EAAG,EAAG,EAAG,KAF7B,cAIJL,EAAME,YAAYI,KAAK,MAAQ,CAC9BF,QAASJ,EAAMK,QAAQ,EAAG,KALvB,6BAOSL,EAAMK,QAAQ,IAPvB,OAiCME,EAtB6B,SAAC,GAA0C,IAAxCC,EAAuC,EAAvCA,YAAaC,EAA0B,EAA1BA,SAA0B,IAAhBC,aAAgB,MAAR,EAAQ,EAC9EC,EAAUb,IACVc,EAAWC,aAAc,SAACb,GAAD,OAAkBA,EAAME,YAAYI,KAAK,SAEpEQ,EAAgBJ,EAAQ,EACxBI,EAAgB,IAAGA,EAAgB,GAGvC,IAAMC,EAAgB,WAAOD,GAE7B,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GAAD,CAAQ5I,KAAK,UAAb,SACE,qBAAKJ,UAAWR,EAAQmL,OAAxB,SAAiC2B,MAEnC,cAAC,GAAD,CAAQlM,KAAK,YAAYgD,KAAK,kBAA9B,SACE,qBAAKpD,UAAWR,EAAQmL,OAAxB,SAEc,iBAAT5B,EACG,cAAC,GAAD,CAAiBiD,mBAAoBA,IAErC,qCACE,cAAC,EAAD,CAAU3E,KAAMgF,IAChB,mBAAGrM,UAAWR,EAAQoL,YAAtB,SACE,cAACgB,EAAA,EAAD,CACEhM,QAAQ,YACRwI,MAAM,UACNgC,KAAK,QACLyB,QArDQ,WAC1B7C,EAAQ,iBAgDQ,2CAmBpBuD,IAASC,OAAO,cAAC,GAAD,IAASC,SAASC,eAAe,W","file":"static/js/main.1bea423d.chunk.js","sourcesContent":["import React from 'react';\n\nimport {\n Typography,\n Divider,\n makeStyles,\n useMediaQuery,\n Theme,\n} from '@material-ui/core';\n\n\ninterface PropTypes {\n sectionName: string;\n level?: number;\n}\n\nconst useStyles = makeStyles(theme => ({\n content: {\n [theme.breakpoints.up('md')]: {\n padding: theme.spacing(2, 2, 1, 3),\n },\n [theme.breakpoints.down('sm')]: {\n padding: theme.spacing(2, 0),\n },\n marginBottom: theme.spacing(1),\n },\n}));\n\nconst ContentSection: React.FC<PropTypes> = ({ sectionName, children, level = 0 }) => {\n const classes = useStyles();\n const isMobile = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'));\n\n let adjustedLevel = level + 2; // Make everything smaller\n if (adjustedLevel > 6) adjustedLevel = 6;\n\n type Variant = 'h3' | 'h4' | 'h5' | 'h6';\n const variant: Variant = `h${adjustedLevel}` as Variant;\n\n return (\n <>\n <Typography variant={variant}>{sectionName}</Typography>\n <Divider variant={isMobile ? 'fullWidth' : 'middle'} />\n <Typography component=\"div\" className={classes.content}>\n {children}\n </Typography>\n </>\n );\n};\n\n\nexport default ContentSection;\n","import React from 'react';\nimport orange from '@material-ui/core/colors/orange';\nimport purple from '@material-ui/core/colors/purple';\nimport { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';\nimport { CssBaseline } from '@material-ui/core';\nimport 'typeface-roboto';\n\n\ndeclare module '@material-ui/core/styles/createPalette' {\n interface TypeBackground {\n elevation1: string;\n elevation2: string;\n elevation3: string;\n }\n}\n\n\nconst benzinTheme = createMuiTheme({\n palette: {\n type: 'dark',\n primary: {\n main: orange[400],\n },\n secondary: {\n main: purple[500],\n },\n background: {\n default: '#121212',\n paper: '#1e1e1e',\n elevation1: '#1e1e1e',\n elevation2: '#232323',\n elevation3: '#252525',\n },\n text: {\n primary: '#f4f4f4',\n secondary: 'rgba(255, 255, 255, 0.6)',\n },\n },\n});\n\n\nconst Benzin: React.FC = ({ children }) => (\n <ThemeProvider theme={benzinTheme}>\n <CssBaseline />\n {children}\n </ThemeProvider>\n);\n\n\nexport default Benzin;\n\n","import React from 'react';\nimport { Paper } from '@material-ui/core';\n\nimport { makeStyles } from '@material-ui/core/styles';\nimport { ParserPropTypes } from './types';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n background: theme.palette.background.default,\n padding: theme.spacing(1),\n overflowX: 'auto',\n fontFamily: 'Monospace',\n scrollbarColor: 'auto',\n },\n}));\n\nconst CodeBlock: React.FC<ParserPropTypes> = ({ rawLines }) => {\n const classes = useStyles();\n return (\n <Paper variant=\"outlined\" className={classes.root}>\n {rawLines.map(line => <pre>{line}</pre>)}\n </Paper>\n );\n};\n\nexport default CodeBlock;\n\n","import React from 'react';\nimport { Link, makeStyles } from '@material-ui/core';\n\nimport { lib as emojiLib } from 'emojilib';\n\ninterface PropTypes {\n span: string;\n}\n\ninterface RegexPair {\n global: RegExp;\n local: RegExp;\n}\n\ninterface Emoji {\n name: string;\n char: string;\n}\n\nconst enclosureRegex = (e: string): RegexPair => ({\n local: new RegExp(`${e}([^${e}]+)${e}`),\n global: new RegExp(`(${e}[^${e}]+${e})`),\n});\n\nconst regex: Record<string, RegexPair> = {\n conceal: {\n global: /(!?\\[.+?\\]\\(.+?\\))(?!])/g,\n local: /!?\\[(.*\\]?.*)\\]\\((.+?)\\)/,\n },\n rawLink: {\n // eslint-disable-next-line max-len\n global: /((?:(?:[A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z0-9.-]+|(?:www\\.|[-;:&=+$,\\w]+@)[A-Za-z0-9.-]+)(?:(?:\\/[+~%/.\\w-_]*)?\\??(?:[-+=&;%@.\\w_]*)#?(?:[.!/\\\\\\w]*))?)/,\n local: /&^/,\n },\n emoji: enclosureRegex(':'),\n bold: enclosureRegex('\\\\*\\\\*'),\n italic: enclosureRegex('\\\\*'),\n code: enclosureRegex('`'),\n strikeThrough: enclosureRegex('~~'),\n};\n\nconst splitter = new RegExp(Object.values(regex).map(pair => pair.global.source).join('|'));\n\nconst emojiList: Emoji[] = [];\nObject.keys(emojiLib).forEach(name => emojiList.push({ name, char: emojiLib[name].char }));\n\nconst useStyles = makeStyles(theme => ({\n code: {\n background: theme.palette.background.default,\n borderRadius: theme.spacing(0.5),\n padding: theme.spacing(0.5),\n fontFamily: 'Monospace',\n },\n image: {\n maxWidth: '100%',\n maxHeight: '100%',\n },\n}));\n\nconst SyntacticSpan: React.FC<PropTypes> = ({ span }) => {\n const classes = useStyles();\n if (!span) return null;\n\n const matchConceal = regex.conceal.local.exec(span);\n if (matchConceal) {\n if (span[0] === '!') return <img src={matchConceal[2]} alt={matchConceal[1]} className={classes.image} />;\n return <Link href={matchConceal[2]}><SyntacticSpan span={matchConceal[1]} /></Link>;\n }\n\n const matchEmoji = span.match(regex.emoji.local);\n if (matchEmoji) {\n const emoji = emojiList.find(e => e.name === matchEmoji[1]);\n return <span>{emoji ? emoji.char : span}</span>;\n }\n\n const matchCode = span.match(regex.code.local);\n if (matchCode) return <span className={classes.code}>{matchCode[1]}</span>;\n\n const matchBold = span.match(regex.bold.local);\n if (matchBold) return <b>{matchBold[1]}</b>;\n\n const matchItalic = span.match(regex.italic.local);\n if (matchItalic) return <i>{matchItalic[1]}</i>;\n\n const matchStrikeThrough = span.match(regex.strikeThrough.local);\n if (matchStrikeThrough) return <span style={{ textDecoration: 'line-through' }}>{matchStrikeThrough[1]}</span>;\n\n if (span.match(regex.rawLink.global)) return <Link href={span}>{span}</Link>;\n\n return <>{span}</>;\n};\n\n\nexport { splitter };\nexport default SyntacticSpan;\n\n","import React from 'react';\nimport SyntacticSpan, { splitter } from './SyntacticSpan';\n\ninterface PropTypes {\n line: string;\n}\n\nconst Text: React.FC<PropTypes> = ({ line }) => {\n return <>{line.split(splitter).map(span => <SyntacticSpan span={span} />)}</>;\n};\n\nexport default Text;\n\n","import React from 'react';\n\nimport CodeBlock from './CodeBlock';\nimport Text from './Text';\nimport { ParserPropTypes } from './types';\n\n\nconst denotesCodeBlock = (line: string): boolean => {\n return line.match(/^\\s*```.*$/) !== null;\n};\n\nconst denotesDottedList = (line: string): boolean => {\n return line.match(/^ ?[-*] .*$/) !== null;\n};\n\nconst denotesOpenHtml = (line: string): string => {\n const regex = /<([^/\\s]*)[^<]*[^/]>/g;\n const match = regex.exec(line);\n return match ? match[1] : '';\n};\n\nconst denotesClosingHtml = (line: string, tag: string): boolean => {\n const regex = new RegExp(`</${tag}[^<]*>`);\n return line.match(regex) !== null;\n};\n\nconst denotesSelfClosingHtml = (line: string): string[] | null => {\n const regex = /(<[^/\\s]*[^<]*\\/>)/g;\n return line.match(regex);\n};\n\nconst declaresNoLineBreak = (line: string): boolean => {\n return line.match(/\\\\\\|$/) !== null;\n};\n\nconst Content: React.FC<ParserPropTypes> = ({ rawLines }) => {\n if (!rawLines.length) return null;\n\n const line = rawLines.splice(0, 1)[0];\n\n let buffer;\n if (denotesCodeBlock(line)) {\n const closeIndex = rawLines.findIndex(rawLine => denotesCodeBlock(rawLine));\n const codeBlockLines = rawLines.splice(0, closeIndex + 1).slice(0, closeIndex);\n buffer = <CodeBlock rawLines={codeBlockLines} />;\n } else if (denotesDottedList(line)) {\n const closeIndex = rawLines.findIndex(rawLine => !denotesDottedList(rawLine));\n const dottedListLines = rawLines.splice(0, closeIndex).slice(0, closeIndex);\n dottedListLines.unshift(line);\n buffer = <ul>{dottedListLines.map(li => <li><Text line={li.slice(2)} /></li>)}</ul>;\n } else if ((buffer = denotesOpenHtml(line))) {\n const tag = buffer;\n const closeIndex = denotesClosingHtml(line, tag) ? -1 : rawLines.findIndex(\n rawLine => denotesClosingHtml(rawLine, tag),\n );\n const htmlLines = rawLines.splice(0, closeIndex + 1);\n htmlLines.unshift(line);\n buffer = <div dangerouslySetInnerHTML={{ __html: htmlLines.join('\\n') }} />;\n } else if ((buffer = denotesSelfClosingHtml(line)) !== null) {\n const match = buffer[0];\n const [before, after] = line.split(match);\n buffer = (\n <>\n <Text line={before} />\n <div dangerouslySetInnerHTML={{ __html: match }} />\n <Text line={after} />\n </>\n );\n } else if (declaresNoLineBreak(line)) {\n const closeIndex = rawLines.findIndex(rawLine => !declaresNoLineBreak(rawLine));\n const lineBreakLines = rawLines.splice(0, closeIndex).map(rawLine => rawLine.slice(0, -2));\n lineBreakLines.unshift(line.slice(0, -2));\n lineBreakLines.push(rawLines.splice(0, 1)[0]);\n buffer = <p>{lineBreakLines.map(lineBreakLine => <Text line={lineBreakLine} />)}</p>;\n } else if (denotesClosingHtml(line, '')) {\n buffer = null;\n } else {\n buffer = <p><Text line={line} /></p>;\n }\n\n return (\n <>\n { buffer }\n <Content rawLines={rawLines} />\n </>\n );\n};\n\nexport default Content;\n\n","import React from 'react';\nimport { Typography } from '@material-ui/core';\nimport ContentSection from '../ContentSection/ContentSection';\nimport Content from './Content';\nimport { ParserPropTypes } from './types';\n\ninterface PropTypes extends ParserPropTypes {\n level?: number;\n}\n\ninterface MapperPropTypes extends PropTypes {\n SectionComponent: React.FC<PropTypes>;\n}\n\nconst getHeaderLevel = (header: string): number => {\n if (!header) return 0;\n let level = 0;\n while (header[level] === '#') level += 1;\n return level;\n};\n\nconst SectionMapper: React.FC<MapperPropTypes> = ({ rawLines, level = 0, SectionComponent }) => {\n const children = rawLines\n .reduce((sections: string[][], line: string) => {\n if (line) {\n if (getHeaderLevel(line) === level) sections.push([]);\n if (sections.length) sections[sections.length - 1].push(line);\n }\n return sections;\n }, [])\n .map(sectionLines => <SectionComponent rawLines={sectionLines} level={level} />);\n\n return <>{children}</>;\n};\n\n\nconst Section: React.FC<PropTypes> = ({ rawLines, level = 0 }) => {\n const deeperLevelIndex = rawLines.findIndex(line => line.match(`^#{${level + 1},} .*$`));\n const rawContent = rawLines.splice(0, (deeperLevelIndex < 0) ? rawLines.length : deeperLevelIndex);\n\n if (!level) {\n return (\n <>\n <Typography><Content rawLines={rawContent} /></Typography>\n <SectionMapper rawLines={rawLines} level={getHeaderLevel(rawLines[0])} SectionComponent={Section} />\n </>\n );\n }\n\n const sectionName = rawContent.splice(0, 1)[0].slice(level).trim();\n const deeperLevel = getHeaderLevel(rawLines[0]);\n return (\n <ContentSection sectionName={sectionName} level={level}>\n <Content rawLines={rawContent} />\n <SectionMapper rawLines={rawLines} level={deeperLevel} SectionComponent={Section} />\n </ContentSection>\n );\n};\n\nexport default Section;\n\n","import React, { useState, useEffect } from 'react';\nimport axios from 'axios';\n\nimport Section from './Section';\n\ninterface PropTypes {\n data?: string;\n url?: string;\n}\n\nconst resolveUrls = (line: string, baseUrl: string): string => line.replace(\n /src=\"(?!http)(.*)\"[\\s>]/,\n (match, url) => `src=\"${baseUrl}/${url}?sanitize=true\"`,\n).replace(\n /\\[(.*\\]?.*)\\]\\((?!http)(.+?)\\)/,\n (match, text, url) => `[${text}](${baseUrl}/${url})`,\n);\n\nconst Markdown: React.FC<PropTypes> = ({ data, url }) => {\n const [markdown, setMarkdown] = useState<string>(data || '');\n\n if (url) axios.get(url).then(response => setMarkdown(response.data));\n\n useEffect(() => {\n if (!url) setMarkdown(data || '');\n }, [data, url]);\n\n const baseUrl = url?.slice(0, url.lastIndexOf('/')) || '';\n const lines = markdown.split(/\\r?\\n/).map(line => resolveUrls(line, baseUrl));\n return <Section rawLines={lines} />;\n};\n\n\nexport default Markdown;\n\n","import React from 'react';\n\nimport {\n AppBar,\n Tabs,\n Tab,\n Typography,\n Toolbar,\n} from '@material-ui/core';\n\nimport { makeStyles } from '@material-ui/core/styles';\n\n\ninterface PropTypes {\n logo: {\n icon: React.ReactNode;\n title: string;\n };\n contents: {\n [key: string]: React.ReactNode | null;\n };\n page: string;\n setPage: (newPage: string) => void;\n}\n\nconst useStyles = makeStyles(theme => ({\n root: {\n background: theme.palette.background.elevation2,\n color: theme.palette.text.primary,\n paddingLeft: theme.spacing(3),\n },\n logo: {\n margin: theme.spacing(0, 3, 0, 1),\n },\n tab: {\n '& .MuiTab-wrapper': {\n padding: theme.spacing(2),\n flexDirection: 'row',\n fontSize: '0.8125rem',\n '& svg': {\n marginRight: theme.spacing(1),\n marginBottom: '0 !important',\n },\n },\n },\n}));\n\n\nconst Header: React.FC<PropTypes> = ({\n logo, contents, page, setPage,\n}) => {\n const classes = useStyles();\n\n const handleChange = (event: React.ChangeEvent<unknown>, newPage: string): void => {\n setPage(newPage);\n };\n\n return (\n <AppBar position=\"sticky\" className={classes.root}>\n <Toolbar>\n {logo.icon}\n <Typography variant=\"h5\" className={classes.logo} color=\"primary\">\n {logo.title}\n </Typography>\n <Tabs onChange={handleChange} value={page}>\n {contents && Object.keys(contents).map((item: string) => (\n <Tab\n label={item}\n icon={contents[item] as JSX.Element}\n value={item}\n className={classes.tab}\n key={item}\n />\n ))}\n </Tabs>\n </Toolbar>\n </AppBar>\n );\n};\n\nexport default Header;\n","import React from 'react';\n\nimport { Paper, makeStyles } from '@material-ui/core';\n\nimport { SurfaceSize, SurfacePosition } from './types';\n\n\ninterface PropTypes {\n size: SurfaceSize;\n position: SurfacePosition;\n}\n\n\nconst useStyles = makeStyles(theme => ({\n surface: {\n position: 'absolute',\n display: 'flex',\n flexDirection: 'column',\n overflowY: 'auto',\n scrollbarColor: `${theme.palette.secondary.dark} ${theme.palette.secondary.light}`,\n\n '& a.MuiTypography-root': {\n color: theme.palette.primary.light,\n },\n },\n}));\n\n\nconst WindowSurface: React.FC<PropTypes> = ({ size, position, children }) => {\n const classes = useStyles();\n\n return (\n <Paper\n variant=\"outlined\"\n style={{ ...size, ...position }}\n className={classes.surface}\n >\n {children}\n </Paper>\n );\n};\n\n\nexport default WindowSurface;\n","import React from 'react';\n\nimport { Typography, Divider, makeStyles } from '@material-ui/core';\n\nimport WindowSurface from './WindowSurface';\nimport { SurfaceSize, SurfacePosition } from './types';\n\n\ninterface PropTypes {\n type: 'primary' | 'secondary' | 'mono';\n name?: string;\n}\n\n\nconst useStyles = makeStyles(theme => ({\n header: {\n padding: theme.spacing(1, 0, 1, 2),\n background: theme.palette.background.elevation2,\n },\n}));\n\n\nconst Window: React.FC<PropTypes> = ({ type, name, children }) => {\n const classes = useStyles();\n\n const size: SurfaceSize = {\n height: '85vh',\n };\n\n const position: SurfacePosition = {\n bottom: '3vh',\n };\n\n if (type === 'primary') {\n size.width = '63vw';\n position.left = '2vw';\n } else if (type === 'secondary') {\n size.width = '31vw';\n position.right = '2vw';\n } else if (type === 'mono') {\n position.left = '2vw';\n position.right = '2vw';\n }\n\n return (\n <WindowSurface\n size={size}\n position={position}\n >\n {name\n && (\n <div>\n <Typography variant=\"h5\" className={classes.header}>{name}</Typography>\n <Divider />\n </div>\n )}\n {children}\n </WindowSurface>\n );\n};\n\nexport default Window;\n","export default __webpack_public_path__ + \"static/media/icon.50d2b01a.svg\";","import React, { useState, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport {\n makeStyles,\n TextField,\n Button,\n Link,\n} from '@material-ui/core';\nimport {\n Benzin,\n Markdown,\n ContentSection,\n} from './lib';\n\nimport Header from './demo/Header/Header';\nimport Window from './demo/Window/Window';\nimport icon from './assets/icon.svg';\n\nconst useStyles = makeStyles(theme => ({\n window: {\n padding: theme.spacing(4),\n },\n promoButton: {\n display: 'flex',\n justifyContent: 'center',\n marginTop: theme.spacing(4),\n },\n}));\n\n\nconst Icon = <img src={icon} width=\"32px\" height=\"37px\" alt=\"logo\" />;\n\nconst headerContents = {\n home: null,\n dotfiles: null,\n 'material-ui': null,\n custom: null,\n 'live preview': null,\n};\n\nconst pageMap: Record<string, string> = {\n home: 'https://raw.githubusercontent.com/eug-vs/react-benzin/develop/README.md',\n 'material-ui': 'https://raw.githubusercontent.com/mui-org/material-ui/master/README.md',\n dotfiles: 'https://raw.githubusercontent.com/eug-vs/dotfiles/master/.github/README.md',\n};\n\n\nconst CustomPage: React.FC = () => {\n const [url, setUrl] = useState<string>('');\n const inputEl = useRef<HTMLInputElement>(null);\n\n const handleParseUrl = (): void => {\n setUrl(inputEl.current?.value || '');\n };\n\n return (\n <>\n <ContentSection sectionName=\"Render custom markdown document\" level={2}>\n <p>\n This should be a link to a valid markdown file. Response should give the file contents.\n If you copy README file from GitHub, make sure you provide link to raw view.\n </p>\n <p>\n <TextField\n fullWidth\n inputRef={inputEl}\n variant=\"outlined\"\n color=\"secondary\"\n label=\"Markdown url\"\n />\n </p>\n <Button variant=\"contained\" color=\"secondary\" onClick={handleParseUrl}>\n Render!\n </Button>\n </ContentSection>\n <Markdown url={url} />\n </>\n );\n};\n\ninterface LivePropTypes {\n setLivePreviewData: (livePreviewData: string) => void;\n}\n\nconst LivePreviewPage: React.FC<LivePropTypes> = ({ setLivePreviewData }) => {\n const inputEl = useRef<HTMLInputElement>(null);\n\n const handleRender = (): void => {\n setLivePreviewData(inputEl.current?.value || '');\n };\n\n return (\n <>\n <ContentSection sectionName=\"Markdown live preview\" level={2}>\n <p>\n Start typing and see your text rendered on the left window!\n You can find the list of all Markdown features\n {' '}\n <Link href=\"https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet\">\n here\n </Link>\n . (some of them are yet in progress).\n We recommend starting with # Header.\n </p>\n <p>\n <TextField\n fullWidth\n multiline\n inputRef={inputEl}\n variant=\"outlined\"\n color=\"primary\"\n label=\"Markdown\"\n onChange={handleRender}\n />\n </p>\n </ContentSection>\n </>\n );\n};\n\n\nconst App: React.FC = () => {\n const classes = useStyles();\n const [page, setPage] = useState<string>('home');\n const [livePreviewData, setLivePreviewData] = useState<string>('');\n\n const handleGoLivePreview = (): void => {\n setPage('live preview');\n };\n\n const url = pageMap[page];\n const fileName = url?.slice(url.lastIndexOf('/') + 1);\n const info = [\n /* eslint-disable max-len */\n `## Markdown\\n [Markdown file](${url}) *(...${fileName})* that you can see on the left was parsed and rendered by **BENZIN**! :rocket:`,\n 'Switch between tabs on the header to explore other markdown templates. :recycle: ',\n 'Templates on the left are being loaded from the [GitHub](https://github.com), though this pane is generated from plaintext. :pen:',\n '## How do I use this feature?',\n '```',\n 'import Markdown from \\'react-benzin\\';',\n 'const data = \\'# Header\\\\nHello, *world!*\\';',\n 'ReactDOM.render(<Markdown data={data}/>, document.getElementById(\\'root\\'));',\n '```',\n /* eslint-enable max-len */\n ].join('\\n');\n\n let primaryWindowContent = <Markdown url={url} />;\n if (page === 'custom') primaryWindowContent = <CustomPage />;\n else if (page === 'live preview') {\n primaryWindowContent = <Markdown data={livePreviewData || '# Start typing in the right window!'} />;\n }\n\n return (\n <Benzin>\n <Header\n logo={{\n icon: Icon,\n title: 'BENZIN',\n }}\n contents={headerContents}\n page={page}\n setPage={setPage}\n />\n <Window type=\"primary\">\n <div className={classes.window}>{primaryWindowContent}</div>\n </Window>\n <Window type=\"secondary\" name=\"Feature preview\">\n <div className={classes.window}>\n {\n (page === 'live preview')\n ? <LivePreviewPage setLivePreviewData={setLivePreviewData} />\n : (\n <>\n <Markdown data={info} />\n <p className={classes.promoButton}>\n <Button\n variant=\"contained\"\n color=\"primary\"\n size=\"large\"\n onClick={handleGoLivePreview}\n >\n Try it yourself!\n </Button>\n </p>\n </>\n )\n }\n </div>\n </Window>\n </Benzin>\n );\n};\n\n\nReactDOM.render(<App />, document.getElementById('root'));\n\n"],"sourceRoot":""} \ No newline at end of file