From 2124e18f0f57c6e227214c583690a86825b57fa2 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 14 Jan 2021 16:58:52 +0000 Subject: Updates --- static/js/main.697aa37d.chunk.js.map | 1 - 1 file changed, 1 deletion(-) delete mode 100644 static/js/main.697aa37d.chunk.js.map (limited to 'static/js/main.697aa37d.chunk.js.map') diff --git a/static/js/main.697aa37d.chunk.js.map b/static/js/main.697aa37d.chunk.js.map deleted file mode 100644 index 303860a..0000000 --- a/static/js/main.697aa37d.chunk.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["lib/Benzin/Benzin.tsx","lib/Markdown/CodeBlock.tsx","lib/Markdown/InlineCode.tsx","lib/Markdown/Heading.tsx","lib/Markdown/Image.tsx","lib/Markdown/Markdown.tsx","demo/Header/Header.tsx","demo/Window/WindowSurface.tsx","demo/Window/Window.tsx","demo/content.md","assets/icon.svg","index.tsx"],"names":["benzinTheme","createMuiTheme","palette","type","primary","main","orange","secondary","purple","background","default","paper","elevation1","elevation2","elevation3","text","Benzin","children","ThemeProvider","theme","CssBaseline","useStyles","makeStyles","root","padding","spacing","overflowX","fontFamily","scrollbarColor","CodeBlock","value","classes","Paper","variant","className","borderRadius","InlineCode","Heading","level","adjustedLevel","Typography","Divider","Image","src","alt","style","maxWidth","maxHeight","Markdown","data","url","context","useState","markdown","setMarkdown","axios","get","then","response","useEffect","sanitized","line","baseUrl","replace","match","resolveUrls","slice","lastIndexOf","renderers","heading","code","link","Link","image","inlineCode","startsWith","symbol","source","plugins","emoji","allowDangerousHtml","color","paddingLeft","logo","margin","tab","flexDirection","fontSize","marginRight","marginBottom","Header","contents","page","setPage","AppBar","position","Toolbar","icon","title","Tabs","onChange","event","newPage","Object","keys","map","item","Tab","label","surface","display","overflowY","dark","light","WindowSurface","size","header","Window","name","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","href","multiline","App","livePreviewData","fileName","primaryWindowContent","tryButton","content","ReactDOM","render","document","getElementById"],"mappings":"sQAiBMA,G,OAAcC,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,IAAGC,EAAH,EAAGA,SAAH,OACvB,eAACC,EAAA,EAAD,CAAeC,MAAOnB,EAAtB,UACE,cAACoB,EAAA,EAAD,IACCH,M,qECrCCI,EAAYC,aAAW,SAAAH,GAAK,MAAK,CACrCI,KAAM,CACJd,WAAYU,EAAMjB,QAAQO,WAAWC,QACrCc,QAASL,EAAMM,QAAQ,GACvBC,UAAW,OACXC,WAAY,YACZC,eAAgB,YAeLC,EAXwB,SAAC,GAAe,IAAbC,EAAY,EAAZA,MAClCC,EAAUV,IAChB,OACE,cAACW,EAAA,EAAD,CAAOC,QAAQ,WAAWC,UAAWH,EAAQR,KAA7C,SACE,8BACGO,OCnBHT,EAAYC,aAAW,SAAAH,GAAK,MAAK,CACrCI,KAAM,CACJd,WAAYU,EAAMjB,QAAQO,WAAWC,QACrCyB,aAAchB,EAAMM,QAAQ,IAC5BD,QAASL,EAAMM,QAAQ,IACvBE,WAAY,iBASDS,EALc,SAAC,GAAkB,IAAhBnB,EAAe,EAAfA,SACxBc,EAAUV,IAChB,OAAO,sBAAMa,UAAWH,EAAQR,KAAzB,SAAgCN,K,SCLnCI,EAAYC,aAAW,SAAAH,GAAK,MAAK,CACrCI,KAAM,CACJC,QAASL,EAAMM,QAAQ,EAAG,EAAG,EAAG,QAoBrBY,EAhBsB,SAAC,GAAyB,IAAvBpB,EAAsB,EAAtBA,SAAUqB,EAAY,EAAZA,MAC1CP,EAAUV,I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ACd0D,EAAQ,OAAGpG,QAAH,IAAGA,OAAH,EAAGA,EAAKgB,MAAMhB,EAAIiB,YAAY,KAAO,GAE/CoF,EAAuB,cAAC,EAAD,CAAUrG,IAAKA,IAC7B,WAAT0C,EAAmB2D,EAAuB,cAAC,GAAD,IAC5B,iBAAT3D,IACP2D,EAAuB,cAAC,EAAD,CAAUtG,KAAMoG,GAAmB,yCAG5D,IAAMG,EACJ,mBAAGtH,UAAWH,EAAQ8F,YAAtB,SACE,cAACgB,EAAA,EAAD,CACE5G,QAAQ,YACRgD,MAAM,UACNkC,KAAK,QACL2B,QAnBsB,WAC1BjD,EAAQ,iBAcN,gCAWJ,OACE,eAAC,EAAD,WACE,cAAC,EAAD,CACEV,KAAM,CACJc,KAAM+B,EACN9B,MAAO,UAETP,SAAUsC,EACVrC,KAAMA,EACNC,QAASA,IAEX,cAAC,EAAD,CAAQ1F,KAAK,UAAb,SACE,qBAAK+B,UAAWH,EAAQ6F,OAAxB,SAAiC2B,MAEnC,cAAC,EAAD,CAAQpJ,KAAK,YAAYmH,KAAK,kBAA9B,SACE,qBAAKpF,UAAWH,EAAQ6F,OAAxB,SAEc,iBAAThC,EACG,cAAC,GAAD,CAAiBqD,mBAAoBA,IACrC,cAAC,EAAD,CAAU/F,IAAKuG,EAAStG,QAAS,CAAEqG,YAAWF,sBAS9DI,IAASC,OAAO,cAAC,GAAD,IAASC,SAASC,eAAe,W","file":"static/js/main.697aa37d.chunk.js","sourcesContent":["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 \n \n {children}\n \n);\n\n\nexport default Benzin;\n\n","import React from 'react';\nimport { Paper, makeStyles } from '@material-ui/core';\n\ninterface PropTypes {\n value: string;\n}\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 = ({ value }) => {\n const classes = useStyles();\n return (\n \n
\n        {value}\n      
\n
\n );\n};\n\nexport default CodeBlock;\n\n","import React from 'react';\nimport { makeStyles } from '@material-ui/core';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n background: theme.palette.background.default,\n borderRadius: theme.spacing(0.5),\n padding: theme.spacing(0.5),\n fontFamily: 'Monospace',\n },\n}));\n\nconst InlineCode: React.FC = ({ children }) => {\n const classes = useStyles();\n return {children};\n};\n\nexport default InlineCode;\n","import React from 'react';\nimport { Typography, Divider, makeStyles } from '@material-ui/core';\n\ninterface PropTypes {\n level: number;\n}\n\ntype Variant = 'h3' | 'h4' | 'h5' | 'h6';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n padding: theme.spacing(2, 0, 1, 0),\n },\n}));\n\nconst Heading: React.FC = ({ children, level }) => {\n const classes = useStyles();\n\n let adjustedLevel = level + 2; // Make everything smaller\n if (adjustedLevel > 6) adjustedLevel = 6;\n\n const variant: Variant = `h${adjustedLevel}` as Variant;\n\n return (\n
\n {children}\n \n
\n );\n};\n\nexport default Heading;\n\n","import React from 'react';\n\ninterface PropTypes {\n src: string;\n alt: string;\n}\n\nconst Image: React.FC = ({ src, alt }) => {\n return {alt};\n};\n\nexport default Image;\n","import React, { useState, useEffect } from 'react';\nimport { Link, Typography } from '@material-ui/core';\nimport axios from 'axios';\nimport ReactMarkdown from 'react-markdown';\nimport emoji from 'remark-gemoji';\n\nimport CodeBlock from './CodeBlock';\nimport InlineCode from './InlineCode';\nimport Heading from './Heading';\nimport Image from './Image';\n\ninterface PropTypes {\n data?: string;\n url?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n context?: Record;\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)(.+?)\\)/g,\n (match, text, url) => `[${text}](${baseUrl}/${url})`,\n);\n\n\nconst Markdown: React.FC = ({ data, url, context = {} }) => {\n const [markdown, setMarkdown] = useState(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 sanitized = resolveUrls(markdown, baseUrl);\n\n const WrappedInlineCode: React.FC = ({ children }) => {\n if (typeof children === 'string' && children?.startsWith('$')) {\n const symbol = children.slice(1);\n return context[symbol] || null;\n }\n return {children};\n };\n\n const renderers = {\n heading: Heading,\n code: CodeBlock,\n link: Link,\n image: Image,\n inlineCode: WrappedInlineCode,\n };\n\n return (\n \n \n \n );\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 = ({\n logo, contents, page, setPage,\n}) => {\n const classes = useStyles();\n\n const handleChange = (event: React.ChangeEvent, newPage: string): void => {\n setPage(newPage);\n };\n\n return (\n \n \n {logo.icon}\n \n {logo.title}\n \n \n {contents && Object.keys(contents).map((item: string) => (\n \n ))}\n \n \n \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 = ({ size, position, children }) => {\n const classes = useStyles();\n\n return (\n \n {children}\n \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 = ({ 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 \n {name\n && (\n
\n {name}\n \n
\n )}\n {children}\n \n );\n};\n\nexport default Window;\n","export default __webpack_public_path__ + \"static/media/content.013c8163.md\";","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 Heading,\n} from './lib';\n\nimport Header from './demo/Header/Header';\nimport Window from './demo/Window/Window';\nimport content from './demo/content.md';\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 = \"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 = {\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('');\n const inputEl = useRef(null);\n\n const handleParseUrl = (): void => {\n setUrl(inputEl.current?.value || '');\n };\n\n return (\n <>\n Render custom markdown document\n

\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

\n

\n \n

\n \n \n \n );\n};\n\ninterface LivePropTypes {\n setLivePreviewData: (livePreviewData: string) => void;\n}\n\nconst LivePreviewPage: React.FC = ({ setLivePreviewData }) => {\n const inputEl = useRef(null);\n\n const handleRender = (): void => {\n setLivePreviewData(inputEl.current?.value || '');\n };\n\n return (\n <>\n Markdown live preview\n

\n Start typing and see your text rendered on the left window!\n You can find the list of all Markdown features\n {' '}\n \n here\n \n . (some of them are yet in progress).\n We recommend starting with # Header.\n

\n

\n \n

\n \n );\n};\n\n\nconst App: React.FC = () => {\n const classes = useStyles();\n const [page, setPage] = useState('home');\n const [livePreviewData, setLivePreviewData] = useState('');\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\n let primaryWindowContent = ;\n if (page === 'custom') primaryWindowContent = ;\n else if (page === 'live preview') {\n primaryWindowContent = ;\n }\n\n const tryButton = (\n

\n \n Try it yourself!\n \n

\n );\n\n return (\n \n \n \n
{primaryWindowContent}
\n
\n \n
\n {\n (page === 'live preview')\n ? \n : \n }\n
\n
\n
\n );\n};\n\n\nReactDOM.render(, document.getElementById('root'));\n\n"],"sourceRoot":""} \ No newline at end of file -- cgit v1.2.3