diff options
Diffstat (limited to 'static/js/main.697aa37d.chunk.js')
-rw-r--r-- | static/js/main.697aa37d.chunk.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/static/js/main.697aa37d.chunk.js b/static/js/main.697aa37d.chunk.js deleted file mode 100644 index 72c3896..0000000 --- a/static/js/main.697aa37d.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(this["webpackJsonpreact-benzin"]=this["webpackJsonpreact-benzin"]||[]).push([[0],{205:function(e,t,n){"use strict";n.r(t);var a=n(38),r=n(4),i=n(0),c=n(10),o=n.n(c),l=n(241),s=n(248),d=n(247),u=n(243),j=n(90),b=n.n(j),p=n(91),h=n.n(p),v=n(96),m=n(237),g=n(238),f=(n(110),Object(v.a)({palette:{type:"dark",primary:{main:b.a[400]},secondary:{main:h.a[500]},background:{default:"#121212",paper:"#1e1e1e",elevation1:"#1e1e1e",elevation2:"#232323",elevation3:"#252525"},text:{primary:"#f4f4f4",secondary:"rgba(255, 255, 255, 0.6)"}}})),O=function(e){var t=e.children;return Object(r.jsxs)(m.a,{theme:f,children:[Object(r.jsx)(g.a,{}),t]})},x=n(207),w=n(93),y=n.n(w),k=n(94),N=n.n(k),M=n(95),R=n.n(M),E=n(206),C=Object(l.a)((function(e){return{root:{background:e.palette.background.default,padding:e.spacing(1),overflowX:"auto",fontFamily:"Monospace",scrollbarColor:"auto"}}})),D=function(e){var t=e.value,n=C();return Object(r.jsx)(E.a,{variant:"outlined",className:n.root,children:Object(r.jsx)("pre",{children:t})})},z=Object(l.a)((function(e){return{root:{background:e.palette.background.default,borderRadius:e.spacing(.5),padding:e.spacing(.5),fontFamily:"Monospace"}}})),S=function(e){var t=e.children,n=z();return Object(r.jsx)("span",{className:n.root,children:t})},B=n(242),F=Object(l.a)((function(e){return{root:{padding:e.spacing(2,0,1,0)}}})),I=function(e){var t=e.children,n=e.level,a=F(),i=n+2;i>6&&(i=6);var c="h".concat(i);return Object(r.jsxs)("div",{className:a.root,children:[Object(r.jsx)(x.a,{variant:c,children:t}),Object(r.jsx)(B.a,{variant:"middle"})]})},T=function(e){var t=e.src,n=e.alt;return Object(r.jsx)("img",{src:t,alt:n,style:{maxWidth:"100%",maxHeight:"100%"}})},W=function(e){var t=e.data,n=e.url,c=e.context,o=void 0===c?{}:c,l=Object(i.useState)(t||""),s=Object(a.a)(l,2),d=s[0],j=s[1];n&&y.a.get(n).then((function(e){return j(e.data)})),Object(i.useEffect)((function(){n||j(t||"")}),[t,n]);var b=function(e,t){return e.replace(/src="(?!http)(.*)"[\s>]/,(function(e,n){return'src="'.concat(t,"/").concat(n,'?sanitize=true"')})).replace(/\[(.*\]?.*)\]\((?!http)(.+?)\)/g,(function(e,n,a){return"[".concat(n,"](").concat(t,"/").concat(a,")")}))}(d,(null===n||void 0===n?void 0:n.slice(0,n.lastIndexOf("/")))||""),p={heading:I,code:D,link:u.a,image:T,inlineCode:function(e){var t=e.children;if("string"===typeof t&&(null===t||void 0===t?void 0:t.startsWith("$"))){var n=t.slice(1);return o[n]||null}return Object(r.jsx)(S,{children:t})}};return Object(r.jsx)(x.a,{children:Object(r.jsx)(N.a,{source:b,renderers:p,plugins:[R.a],allowDangerousHtml:!0})})},A=n(244),H=n(245),P=n(249),L=n(246),J=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"}}}}})),Y=function(e){var t=e.logo,n=e.contents,a=e.page,i=e.setPage,c=J();return Object(r.jsx)(A.a,{position:"sticky",className:c.root,children:Object(r.jsxs)(H.a,{children:[t.icon,Object(r.jsx)(x.a,{variant:"h5",className:c.logo,color:"primary",children:t.title}),Object(r.jsx)(P.a,{onChange:function(e,t){i(t)},value:a,children:n&&Object.keys(n).map((function(e){return Object(r.jsx)(L.a,{label:e,icon:n[e],value:e,className:c.tab},e)}))})]})})},G=n(61),X=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}}}})),Z=function(e){var t=e.size,n=e.position,a=e.children,i=X();return Object(r.jsx)(E.a,{variant:"outlined",style:Object(G.a)(Object(G.a)({},t),n),className:i.surface,children:a})},$=Object(l.a)((function(e){return{header:{padding:e.spacing(1,0,1,2),background:e.palette.background.elevation2}}})),q=function(e){var t=e.type,n=e.name,a=e.children,i=$(),c={height:"85vh"},o={bottom:"3vh"};return"primary"===t?(c.width="63vw",o.left="2vw"):"secondary"===t?(c.width="31vw",o.right="2vw"):"mono"===t&&(o.left="2vw",o.right="2vw"),Object(r.jsxs)(Z,{size:c,position:o,children:[n&&Object(r.jsxs)("div",{children:[Object(r.jsx)(x.a,{variant:"h5",className:i.header,children:n}),Object(r.jsx)(B.a,{})]}),a]})},K=n.p+"static/media/content.013c8163.md",Q=n.p+"static/media/icon.50d2b01a.svg",U=Object(l.a)((function(e){return{window:{padding:e.spacing(4)},promoButton:{display:"flex",justifyContent:"center",marginTop:e.spacing(4)}}})),V=Object(r.jsx)("img",{src:Q,width:"32px",height:"37px",alt:"logo"}),_={home:null,dotfiles:null,"material-ui":null,custom:null,"live preview":null},ee={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"},te=function(){var e=Object(i.useState)(""),t=Object(a.a)(e,2),n=t[0],c=t[1],o=Object(i.useRef)(null);return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(I,{level:2,children:"Render custom markdown document"}),Object(r.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(r.jsx)("p",{children:Object(r.jsx)(s.a,{fullWidth:!0,inputRef:o,variant:"outlined",color:"secondary",label:"Markdown url"})}),Object(r.jsx)(d.a,{variant:"contained",color:"secondary",onClick:function(){var e;c((null===(e=o.current)||void 0===e?void 0:e.value)||"")},children:"Render!"}),Object(r.jsx)(W,{url:n})]})},ne=function(e){var t=e.setLivePreviewData,n=Object(i.useRef)(null);return Object(r.jsxs)(r.Fragment,{children:[Object(r.jsx)(I,{level:2,children:"Markdown live preview"}),Object(r.jsxs)("p",{children:["Start typing and see your text rendered on the left window! You can find the list of all Markdown features"," ",Object(r.jsx)(u.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(r.jsx)("p",{children:Object(r.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)||"")}})})]})},ae=function(){var e=U(),t=Object(i.useState)("home"),n=Object(a.a)(t,2),c=n[0],o=n[1],l=Object(i.useState)(""),s=Object(a.a)(l,2),u=s[0],j=s[1],b=ee[c],p=null===b||void 0===b?void 0:b.slice(b.lastIndexOf("/")+1),h=Object(r.jsx)(W,{url:b});"custom"===c?h=Object(r.jsx)(te,{}):"live preview"===c&&(h=Object(r.jsx)(W,{data:u||"# Start typing in the right window!"}));var v=Object(r.jsx)("p",{className:e.promoButton,children:Object(r.jsx)(d.a,{variant:"contained",color:"primary",size:"large",onClick:function(){o("live preview")},children:"Try it yourself!"})});return Object(r.jsxs)(O,{children:[Object(r.jsx)(Y,{logo:{icon:V,title:"BENZIN"},contents:_,page:c,setPage:o}),Object(r.jsx)(q,{type:"primary",children:Object(r.jsx)("div",{className:e.window,children:h})}),Object(r.jsx)(q,{type:"secondary",name:"Feature preview",children:Object(r.jsx)("div",{className:e.window,children:"live preview"===c?Object(r.jsx)(ne,{setLivePreviewData:j}):Object(r.jsx)(W,{url:K,context:{tryButton:v,fileName:p}})})})]})};o.a.render(Object(r.jsx)(ae,{}),document.getElementById("root"))}},[[205,1,2]]]); -//# sourceMappingURL=main.697aa37d.chunk.js.map
\ No newline at end of file |