blob: 190ba2ce888456efb8e992872c64ae965447f075 [file] [log] [blame]
{"version":3,"sources":["webpack:///./node_modules/gatsby-plugin-mdx/index.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/gatsby-plugin-mdx/mdx-renderer.js","webpack:///./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","webpack:///./node_modules/@rocketseat/gatsby-theme-docs/src/components/Docs/PostNav/styles.js","webpack:///./node_modules/@rocketseat/gatsby-theme-docs/src/components/Docs/PostNav/index.js","webpack:///./node_modules/@rocketseat/gatsby-theme-docs/src/components/Docs/EditGithub.js","webpack:///./node_modules/@rocketseat/gatsby-theme-docs/src/components/Docs/index.js","webpack:///./node_modules/@rocketseat/gatsby-theme-docs-core/src/templates/docs-query.js","webpack:///./node_modules/@rocketseat/gatsby-theme-docs/src/@rocketseat/gatsby-theme-docs-core/components/Docs.js","webpack:///./node_modules/@babel/runtime/helpers/construct.js"],"names":["MDXRenderer","require","module","exports","TypeError","iter","Symbol","iterator","Object","Array","from","arrayLikeToArray","arr","isArray","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","_setPrototypeOf","o","p","setPrototypeOf","__proto__","React","mdx","useMDXScope","scope","children","props","mdxScope","End","fullScope","keys","values","key","fn","Reflect","construct","sham","Proxy","Date","prototype","toString","call","e","Container","Post","isLeft","theme","colors","text","Docs","prev","next","to","link","label","defaultProps","EditGithub","githubEditUrl","useTheme","href","target","rel","css","style","marginRight","pageContext","frontmatter","title","description","image","disableTableOfContents","headings","body","slug","fields","SEO","Layout","DocsComponent","data","query","isNativeReflectConstruct","_construct","Parent","args","Class","a","push","apply","instance","Function","bind","arguments"],"mappings":"gFAMA,IAAMA,E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C,YAA1DC,EAFyC,EAEzCA,MAAOC,EAFkC,EAElCA,YAAaC,EAFqB,EAErBA,MAAOC,EAFc,EAEdA,uBAC3BC,EAAmBjD,EAAnBiD,SAAUC,EAASlD,EAATkD,KACVC,EAASnD,EAAIoD,OAAbD,KAER,OACE,8BACE,YAACE,EAAA,EAAD,CAAKR,MAAOA,EAAOC,YAAaA,EAAaK,KAAMA,EAAMJ,MAAOA,IAChE,YAACO,EAAA,EAAD,CACEN,uBAAwBA,EACxBH,MAAOA,EACPI,SAAUA,GAEV,YAAC,cAAD,KAAcC,GACd,YAAChB,EAAD,CAAYC,cAAeA,IAC3B,YAAC,EAAD,CAASP,KAAMA,EAAMC,KAAMA,MDcnCK,EAAWD,aAAe,CACxBE,cAAe,MErCFoB,UCCA,YAAmD,IAAvBvD,EAAsB,EAA9BwD,KAAQxD,IAAO2C,EAAe,EAAfA,YAChD,OAAO,YAAC,EAAD,CAAM3C,IAAKA,EAAK2C,YAAaA,KDFvBY,IAEFE,EAAK,c,qBELlB,IAAI5D,EAAiB,EAAQ,QAEzB6D,EAA2B,EAAQ,QAEvC,SAASC,EAAWC,EAAQC,EAAMC,GAchC,OAbIJ,IACFhF,EAAOC,QAAUgF,EAAa/C,QAAQC,UAEtCnC,EAAOC,QAAUgF,EAAa,SAAoBC,EAAQC,EAAMC,GAC9D,IAAIC,EAAI,CAAC,MACTA,EAAEC,KAAKC,MAAMF,EAAGF,GAChB,IACIK,EAAW,IADGC,SAASC,KAAKH,MAAML,EAAQG,IAG9C,OADID,GAAOjE,EAAeqE,EAAUJ,EAAM7C,WACnCiD,GAIJP,EAAWM,MAAM,KAAMI,WAGhC3F,EAAOC,QAAUgF","file":"component---node-modules-rocketseat-gatsby-theme-docs-core-src-templates-docs-query-js-11472d50575b2c48f0f9.js","sourcesContent":["/**\n * Welcome to gatsby-plugin-mdx!\n *\n * Start reading in gatsby-node.js\n */\n\nconst MDXRenderer = require(`./mdx-renderer`)\n\nmodule.exports = {\n MDXRenderer: MDXRenderer,\n}\n","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","const React = require(`react`)\nconst { mdx } = require(`@mdx-js/react`)\nconst { useMDXScope } = require(`./context`)\n\nmodule.exports = function MDXRenderer({\n scope,\n children,\n ...props\n}) {\n const mdxScope = useMDXScope(scope)\n\n // Memoize the compiled component\n const End = React.useMemo(() => {\n if (!children) {\n return null\n }\n\n const fullScope = {\n // React is here just in case the user doesn't pass them in\n // in a manual usage of the renderer\n React,\n mdx,\n ...mdxScope,\n }\n\n const keys = Object.keys(fullScope)\n const values = keys.map(key => fullScope[key])\n const fn = new Function(`_fn`, ...keys, `${children}`)\n\n return fn({}, ...values)\n }, [children, scope])\n\n return React.createElement(End, {...props })\n}\n","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;","import styled from '@emotion/styled';\n\nexport const Container = styled.section`\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n padding: 48px 0;\n width: 100%;\n\n @media (max-width: 780px) {\n flex-direction: column;\n }\n`;\n\nexport const Post = styled.div`\n transition: all 200ms;\n ${({ isLeft }) => !isLeft && 'margin-left: auto;'}\n\n a {\n display: flex;\n text-decoration: none;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n\n svg {\n width: 25px;\n height: 25px;\n color: ${({ theme }) => theme.colors.text};\n\n ${({ isLeft }) => (isLeft ? 'margin-right: 16px' : 'margin-left: 16px')};\n }\n\n p {\n letter-spacing: 0.142em;\n text-transform: uppercase;\n font-size: 12px;\n margin: 0;\n color: ${({ theme }) => theme.colors.text};\n }\n\n h3 {\n color: ${({ theme }) => theme.colors.text};\n border: none;\n margin: 0;\n padding: 0;\n font-size: 16px;\n }\n }\n\n &:hover {\n opacity: 0.8;\n\n a svg {\n opacity: 0.8;\n }\n }\n\n @media (max-width: 780px) {\n width: 100%;\n ${({ isLeft }) => isLeft && 'margin-bottom: 16px'};\n\n a {\n justify-content: ${({ isLeft }) => (isLeft ? 'flex-start' : 'flex-end')};\n }\n }\n`;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Link } from 'gatsby';\nimport { MdKeyboardArrowRight, MdKeyboardArrowLeft } from 'react-icons/md';\n\nimport { Container, Post } from './styles';\n\nexport default function Docs({ prev, next }) {\n return (\n <Container>\n {prev && (\n <Post isLeft>\n <Link to={prev.link}>\n <MdKeyboardArrowLeft />\n <div>\n <p>Prev</p>\n <h3>{prev.label}</h3>\n </div>\n </Link>\n </Post>\n )}\n {next && (\n <Post>\n <Link to={next.link}>\n <div>\n <p>Next</p>\n <h3>{next.label}</h3>\n </div>\n <MdKeyboardArrowRight />\n </Link>\n </Post>\n )}\n </Container>\n );\n}\n\nDocs.propTypes = {\n prev: PropTypes.shape({\n label: PropTypes.string,\n link: PropTypes.string,\n }),\n next: PropTypes.shape({\n label: PropTypes.string,\n link: PropTypes.string,\n }),\n};\n\nDocs.defaultProps = {\n prev: null,\n next: null,\n};\n","/* @jsx jsx */\nimport React from 'react';\nimport { jsx, css } from '@emotion/core';\nimport PropTypes from 'prop-types';\nimport { MdEdit } from 'react-icons/md';\nimport { useTheme } from 'emotion-theming';\n\nexport default function EditGithub({ githubEditUrl }) {\n const theme = useTheme();\n\n if (githubEditUrl) {\n return (\n <a\n href={githubEditUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n css={css`\n display: flex;\n align-items: center;\n text-decoration: none;\n margin-top: 48px;\n color: ${theme.colors.text};\n opacity: 0.8;\n font-size: 14px;\n font-weight: normal;\n `}\n >\n <MdEdit style={{ marginRight: '5px' }} />\n Edit this page on GitHub\n </a>\n );\n }\n return null;\n}\n\nEditGithub.propTypes = {\n githubEditUrl: PropTypes.string,\n};\n\nEditGithub.defaultProps = {\n githubEditUrl: null,\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { MDXRenderer } from 'gatsby-plugin-mdx';\n\nimport Layout from '../Layout';\nimport SEO from '../SEO';\nimport PostNav from './PostNav';\nimport EditGithub from './EditGithub';\n\nexport default function Docs({ mdx, pageContext }) {\n const { prev, next, githubEditUrl } = pageContext;\n const { title, description, image, disableTableOfContents } = mdx.frontmatter;\n const { headings, body } = mdx;\n const { slug } = mdx.fields;\n\n return (\n <>\n <SEO title={title} description={description} slug={slug} image={image} />\n <Layout\n disableTableOfContents={disableTableOfContents}\n title={title}\n headings={headings}\n >\n <MDXRenderer>{body}</MDXRenderer>\n <EditGithub githubEditUrl={githubEditUrl} />\n <PostNav prev={prev} next={next} />\n </Layout>\n </>\n );\n}\n\nDocs.propTypes = {\n mdx: PropTypes.shape({\n body: PropTypes.string,\n headings: PropTypes.array,\n frontmatter: PropTypes.shape({\n title: PropTypes.string,\n description: PropTypes.string,\n image: PropTypes.string,\n disableTableOfContents: PropTypes.bool,\n }),\n fields: PropTypes.shape({\n slug: PropTypes.string,\n }),\n }).isRequired,\n pageContext: PropTypes.shape({\n prev: PropTypes.shape({}),\n next: PropTypes.shape({}),\n githubEditUrl: PropTypes.string,\n }).isRequired,\n};\n","import { graphql } from 'gatsby';\nimport DocsComponent from '../components/Docs';\n\nexport default DocsComponent;\n\nexport const query = graphql`\n query($slug: String!) {\n mdx(fields: { slug: { eq: $slug } }) {\n id\n excerpt(pruneLength: 160)\n fields {\n slug\n }\n frontmatter {\n title\n description\n image\n disableTableOfContents\n }\n body\n headings {\n depth\n value\n }\n }\n }\n`;\n","/* eslint-disable react/prop-types */\nimport React from 'react';\nimport Docs from '../../../components/Docs';\n\nexport default function Docspage({ data: { mdx }, pageContext }) {\n return <Docs mdx={mdx} pageContext={pageContext} />;\n}\n","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;"],"sourceRoot":""}