[
  {
    "path": ".babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"babel-preset-gatsby-package\",\n      {\n        \"browser\": true\n      }\n    ]\n  ]\n}\n"
  },
  {
    "path": ".circleci/config.yml",
    "content": "version: 2.1\n\naliases:\n  node-executor: &node-executor\n    docker:\n      - image: circleci/node:14\n\n  e2e-executor: &e2e-executor\n    docker:\n      - image: cypress/browsers:node14.15.0-chrome86-ff82\n\n  restore_cache: &restore_cache\n    restore_cache:\n      name: Restore node_modules cache\n      keys:\n        - yarn-cypress-cache-{{ checksum \"yarn.lock\" }}\n\n  install_node_modules: &install_node_modules\n    run:\n      name: Install node modules\n      command: yarn --frozen-lockfile\n\n  persist_cache: &persist_cache\n    save_cache:\n      name: Save node modules cache\n      key: yarn-cypress-cache-{{ checksum \"yarn.lock\" }}\n      paths:\n        - ~/.cache\n\n  attach_to_bootstrap: &attach_to_bootstrap\n    attach_workspace:\n      at: gatsby-plugin-material-ui\n\n  e2e-test-workflow: &e2e-test-workflow\n    filters:\n      branches:\n        ignore:\n          - master\n    requires:\n      - bootstrap\n\njobs:\n  bootstrap:\n    <<: *node-executor\n    steps:\n      - checkout\n      - <<: *restore_cache\n      - <<: *install_node_modules\n      - <<: *persist_cache\n      - persist_to_workspace:\n          root: gatsby-plugin-material-ui\n          paths:\n            - \"*\"\n\n  lint:\n    <<: *node-executor\n    steps:\n      - checkout\n      - <<: *restore_cache\n      - <<: *install_node_modules\n      - <<: *persist_cache\n      - run: yarn lint\n\n  e2e_tests_development_runtime:\n    <<: *e2e-executor\n    steps:\n      - checkout\n      - <<: *restore_cache\n      - <<: *install_node_modules\n      - <<: *persist_cache\n      - <<: *attach_to_bootstrap\n      - run: yarn test:development-runtime\n\n  e2e_tests_production_runtime:\n    <<: *e2e-executor\n    steps:\n      - checkout\n      - <<: *restore_cache\n      - <<: *install_node_modules\n      - <<: *persist_cache\n      - <<: *attach_to_bootstrap\n      - run: yarn test:production-runtime\n\nworkflows:\n  version: 2\n  build-test:\n    jobs:\n      - bootstrap\n      - lint\n      - e2e_tests_development_runtime:\n          <<: *e2e-test-workflow\n      - e2e_tests_production_runtime:\n          <<: *e2e-test-workflow\n"
  },
  {
    "path": ".eslintignore",
    "content": "/.git\n/coverage\n/e2e-tests/**/public/\n\n/gatsby-plugin-material-ui/**/*.js\n!/gatsby-plugin-material-ui/src/**/*.js\n\nnode_modules"
  },
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  parser: `@babel/eslint-parser`,\n  extends: [`eslint:recommended`, `plugin:react/recommended`],\n  parserOptions: {\n    ecmaVersion: 2016,\n    sourceType: `module`,\n    ecmaFeatures: {\n      jsx: true,\n    },\n    babelOptions: {\n      configFile: `./gatsby-plugin-material-ui/.babelrc`,\n    },\n  },\n  env: {\n    browser: true,\n    es6: true,\n    node: true,\n    jest: true,\n  },\n  settings: {\n    react: {\n      version: `detect`,\n    },\n  },\n  rules: {\n    quotes: [`error`, `backtick`],\n  },\n  overrides: [\n    {\n      files: [`**/cypress/integration/**/*`, `**/cypress/support/**/*`],\n      globals: {\n        cy: false,\n        Cypress: false,\n      },\n    },\n  ],\n};\n"
  },
  {
    "path": ".github/stale.yml",
    "content": "# Number of days of inactivity before an issue becomes stale\ndaysUntilStale: 30\n# Number of days of inactivity before a stale issue is closed\ndaysUntilClose: 7\n# Issues with these labels will never be considered stale\nexemptLabels:\n  - pinned\n  - security\n  - feature-request\n# Label to use when marking an issue as stale\nstaleLabel: pending-close-response-required\n# Comment to post when marking an issue as stale. Set to `false` to disable\nmarkComment: >\n  This issue has been automatically marked as stale because it has not had\n  recent activity. It will be closed if no further activity occurs. Thank you\n  for your contributions.\n# Comment to post when closing a stale issue. Set to `false` to disable\ncloseComment: >\n  This issue has been automatically closed because of inactivity.\n  Please open a new issue if are still encountering problems."
  },
  {
    "path": ".gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# next.js build output\n.next\n\n# Lib folder\nlib\n\n.DS_Store\n\n"
  },
  {
    "path": ".prettierrc.js",
    "content": "module.exports = {\n  semi: true,\n  singleQuote: false,\n  tabWidth: 2,\n  trailingComma: `all`,\n};\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# gatsby-plugin-material-ui\n\n> A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for [@material-ui](https://github.com/mui-org/material-ui) with built-in server-side rendering support.\n\nThis is the plugin for Material-UI v5 (emotion). The plugin for v4 can be found [here](https://github.com/hupe1980/gatsby-plugin-material-ui/tree/v3.0.1).\n\n## Documentation\n\n[Read the documentation](/gatsby-plugin-material-ui/README.md).\n"
  },
  {
    "path": "e2e-tests/development-runtime/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (http://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# dotenv environment variables file\n.env\n\n# gatsby files\n.cache/\npublic\n\n# Mac files\n.DS_Store\n\n# Yarn\nyarn-error.log\n.pnp/\n.pnp.js\n# Yarn Integrity file\n.yarn-integrity\n"
  },
  {
    "path": "e2e-tests/development-runtime/README.md",
    "content": "# gatsby-plugin-material-ui\n"
  },
  {
    "path": "e2e-tests/development-runtime/cypress/fixtures/example.json",
    "content": "{\n  \"name\": \"Using fixtures to represent data\",\n  \"email\": \"hello@cypress.io\",\n  \"body\": \"Fixtures are a great way to mock data for responses to routes\"\n}"
  },
  {
    "path": "e2e-tests/development-runtime/cypress/integration/navigation.js",
    "content": "describe(`navigation`, () => {\n  beforeEach(() => {\n    cy.visit(`/`).waitForRouteChange();\n  });\n\n  it(`displays content from other pages`, () => {\n    cy.visit(`/about`).waitForRouteChange();\n\n    cy.getTestElement(`about-message`)\n      .invoke(`text`)\n      .should(`equal`, `Gatsby example`);\n  });\n});\n"
  },
  {
    "path": "e2e-tests/development-runtime/cypress/plugins/index.js",
    "content": "// ***********************************************************\n// This example plugins/index.js can be used to load plugins\n//\n// You can change the location of this file or turn off loading\n// the plugins file with the 'pluginsFile' configuration option.\n//\n// You can read more here:\n// https://on.cypress.io/plugins-guide\n// ***********************************************************\n\n// This function is called when a project is opened or re-opened (e.g. due to\n// the project's config changing)\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = (on, config) => {\n  // `on` is used to hook into various events Cypress emits\n  // `config` is the resolved Cypress config\n};\n"
  },
  {
    "path": "e2e-tests/development-runtime/cypress/support/commands.js",
    "content": "import \"@testing-library/cypress/add-commands\";\n\nCypress.Commands.add(`lifecycleCallCount`, (action) =>\n  cy\n    .window()\n    .then(\n      (win) =>\n        win.___PageComponentLifecycleCallsLog.filter(\n          (entry) => entry.action === action,\n        ).length,\n    ),\n);\n"
  },
  {
    "path": "e2e-tests/development-runtime/cypress/support/index.js",
    "content": "import \"gatsby-cypress\";\nimport \"./commands\";\n"
  },
  {
    "path": "e2e-tests/development-runtime/cypress.json",
    "content": "{\n  \"baseUrl\": \"http://localhost:8000\",\n  \"failOnStatusCode\": false,\n  \"video\": false\n}\n"
  },
  {
    "path": "e2e-tests/development-runtime/gatsby-config.js",
    "content": "module.exports = {\n  plugins: [\n    `gatsby-plugin-top-layout`,\n    `gatsby-plugin-react-helmet`,\n    `gatsby-plugin-material-ui`,\n  ],\n  siteMetadata: {\n    title: `My page`,\n  },\n};\n"
  },
  {
    "path": "e2e-tests/development-runtime/package.json",
    "content": "{\n  \"name\": \"development-runtime\",\n  \"private\": true,\n  \"version\": \"4.1.0\",\n  \"dependencies\": {\n    \"@emotion/react\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@mui/material\": \"latest\",\n    \"gatsby\": \"latest\",\n    \"gatsby-plugin-react-helmet\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"react-helmet\": \"latest\"\n  },\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"gatsby build\",\n    \"develop\": \"gatsby develop\",\n    \"format\": \"prettier --write src/**/*.{js,jsx}\",\n    \"start\": \"yarn develop\",\n    \"serve\": \"gatsby serve\",\n    \"cy:open\": \"cypress open\",\n    \"cy:run\": \"cypress run --browser chrome\",\n    \"start-server-and-test\": \"start-server-and-test develop http://localhost:8000 cy:run\",\n    \"test\": \"cross-env CYPRESS_SUPPORT=y yarn start-server-and-test \"\n  },\n  \"devDependencies\": {\n    \"@testing-library/cypress\": \"^8.0.0\",\n    \"cross-env\": \"^7.0.3\",\n    \"cypress\": \"^9.0.0\",\n    \"gatsby-cypress\": \"^2.2.0\",\n    \"start-server-and-test\": \"^1.9.1\"\n  }\n}\n"
  },
  {
    "path": "e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js",
    "content": "import React from \"react\";\nimport TopLayout from \"./top-layout\";\n\nexport const onClientEntry = () => {\n  const head = document.head;\n  const injectFirstNode = document.createComment(`mui-inject-first`);\n  head.insertBefore(injectFirstNode, head.firstChild);\n};\n\nexport const wrapRootElement = ({ element }) => {\n  return <TopLayout>{element}</TopLayout>;\n};\n"
  },
  {
    "path": "e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js",
    "content": "import React from \"react\";\nimport TopLayout from \"./top-layout\";\n\nexport const wrapRootElement = ({ element }) => {\n  return <TopLayout>{element}</TopLayout>;\n};\n"
  },
  {
    "path": "e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/package.json",
    "content": "{\n  \"name\": \"gatsby-plugin-top-layout\"\n}\n"
  },
  {
    "path": "e2e-tests/development-runtime/plugins/gatsby-plugin-top-layout/top-layout.js",
    "content": "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Helmet } from \"react-helmet\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport { ThemeProvider } from \"@mui/material/styles\";\nimport theme from \"../../src/theme\";\n\nexport default function TopLayout(props) {\n  return (\n    <>\n      <Helmet>\n        <meta\n          name=\"viewport\"\n          content=\"minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no\"\n        />\n        <link\n          href=\"https://fonts.googleapis.com/css?family=Roboto:400,500,700\"\n          rel=\"stylesheet\"\n        />\n      </Helmet>\n      <ThemeProvider theme={theme}>\n        {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}\n        <CssBaseline />\n        {props.children}\n      </ThemeProvider>\n    </>\n  );\n}\n\nTopLayout.propTypes = {\n  children: PropTypes.node,\n};\n"
  },
  {
    "path": "e2e-tests/development-runtime/src/components/link.js",
    "content": "import * as React from \"react\";\nimport MuiLink from \"@mui/material/Link\";\nimport { Link as GatsbyLink } from \"gatsby\";\n\nconst Link = React.forwardRef(function Link(props, ref) {\n  return <MuiLink component={GatsbyLink} ref={ref} {...props} />;\n});\n\nexport default Link;\n"
  },
  {
    "path": "e2e-tests/development-runtime/src/components/pro-tip.js",
    "content": "import * as React from \"react\";\nimport Link from \"@mui/material/Link\";\nimport SvgIcon from \"@mui/material/SvgIcon\";\nimport Typography from \"@mui/material/Typography\";\n\nfunction LightBulbIcon(props) {\n  return (\n    <SvgIcon {...props}>\n      <path d=\"M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z\" />\n    </SvgIcon>\n  );\n}\n\nexport default function ProTip() {\n  return (\n    <Typography sx={{ mt: 6, mb: 3 }} color=\"text.secondary\">\n      <LightBulbIcon sx={{ mr: 1, verticalAlign: `middle` }} />\n      Pro tip: See more{` `}\n      <Link href=\"https://material-ui.com/getting-started/templates/\">\n        templates\n      </Link>\n      {` `}\n      on the Material-UI documentation.\n    </Typography>\n  );\n}\n"
  },
  {
    "path": "e2e-tests/development-runtime/src/pages/about.js",
    "content": "import React from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport MuiLink from \"@mui/material/Link\";\n\nimport ProTip from \"../components/pro-tip\";\nimport Link from \"../components/link\";\n\nfunction MadeWithLove() {\n  return (\n    <Typography variant=\"body2\" color=\"textSecondary\" align=\"center\">\n      {`Built with love by the `}\n      <MuiLink color=\"inherit\" href=\"https://material-ui.com/\">\n        Material-UI\n      </MuiLink>\n      {` team.`}\n    </Typography>\n  );\n}\n\nexport default function App() {\n  return (\n    <Container maxWidth=\"sm\">\n      <Box my={4}>\n        <Typography\n          data-testid=\"about-message\"\n          variant=\"h4\"\n          component=\"h1\"\n          gutterBottom\n        >\n          Gatsby example\n        </Typography>\n        <Link to=\"/\">Go to the main page</Link>\n        <ProTip />\n        <MadeWithLove />\n      </Box>\n    </Container>\n  );\n}\n"
  },
  {
    "path": "e2e-tests/development-runtime/src/pages/index.js",
    "content": "import React from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport MuiLink from \"@mui/material/Link\";\n\nimport ProTip from \"../components/pro-tip\";\nimport Link from \"../components/link\";\n\nfunction MadeWithLove() {\n  return (\n    <Typography variant=\"body2\" color=\"textSecondary\" align=\"center\">\n      {`Built with love by the `}\n      <MuiLink color=\"inherit\" href=\"https://material-ui.com/\">\n        Material-UI\n      </MuiLink>\n      {` team.`}\n    </Typography>\n  );\n}\n\nexport default function App() {\n  return (\n    <Container maxWidth=\"sm\">\n      <Box my={4}>\n        <Typography variant=\"h4\" component=\"h1\" gutterBottom>\n          Gatsby example\n        </Typography>\n        <Link to=\"/about\" color=\"secondary\">\n          Go to the about page\n        </Link>\n        <ProTip />\n        <MadeWithLove />\n      </Box>\n    </Container>\n  );\n}\n"
  },
  {
    "path": "e2e-tests/development-runtime/src/theme.js",
    "content": "import red from \"@mui/material/colors/red\";\nimport { createTheme } from \"@mui/material/styles\";\n\n// A custom theme for this app\nconst theme = createTheme({\n  palette: {\n    primary: {\n      main: `#556cd6`,\n    },\n    secondary: {\n      main: `#19857b`,\n    },\n    error: {\n      main: red.A400,\n    },\n    background: {\n      default: `#fff`,\n    },\n  },\n});\n\nexport default theme;\n"
  },
  {
    "path": "e2e-tests/production-runtime/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (http://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# dotenv environment variables file\n.env\n\n# gatsby files\n.cache/\npublic\n\n# Mac files\n.DS_Store\n\n# Yarn\nyarn-error.log\n.pnp/\n.pnp.js\n# Yarn Integrity file\n.yarn-integrity\n"
  },
  {
    "path": "e2e-tests/production-runtime/README.md",
    "content": "# gatsby-plugin-material-ui\n"
  },
  {
    "path": "e2e-tests/production-runtime/cypress/fixtures/example.json",
    "content": "{\n  \"name\": \"Using fixtures to represent data\",\n  \"email\": \"hello@cypress.io\",\n  \"body\": \"Fixtures are a great way to mock data for responses to routes\"\n}"
  },
  {
    "path": "e2e-tests/production-runtime/cypress/integration/navigation.js",
    "content": "describe(`navigation`, () => {\n  beforeEach(() => {\n    cy.visit(`/`).waitForRouteChange();\n  });\n\n  it(`displays content from other pages`, () => {\n    cy.visit(`/about`).waitForRouteChange();\n\n    cy.getTestElement(`about-message`)\n      .invoke(`text`)\n      .should(`equal`, `Gatsby example`);\n  });\n});\n"
  },
  {
    "path": "e2e-tests/production-runtime/cypress/plugins/index.js",
    "content": "// ***********************************************************\n// This example plugins/index.js can be used to load plugins\n//\n// You can change the location of this file or turn off loading\n// the plugins file with the 'pluginsFile' configuration option.\n//\n// You can read more here:\n// https://on.cypress.io/plugins-guide\n// ***********************************************************\n\n// This function is called when a project is opened or re-opened (e.g. due to\n// the project's config changing)\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = (on, config) => {\n  // `on` is used to hook into various events Cypress emits\n  // `config` is the resolved Cypress config\n};\n"
  },
  {
    "path": "e2e-tests/production-runtime/cypress/support/commands.js",
    "content": "import \"@testing-library/cypress/add-commands\";\n\nCypress.Commands.add(`lifecycleCallCount`, (action) =>\n  cy\n    .window()\n    .then(\n      (win) =>\n        win.___PageComponentLifecycleCallsLog.filter(\n          (entry) => entry.action === action,\n        ).length,\n    ),\n);\n"
  },
  {
    "path": "e2e-tests/production-runtime/cypress/support/index.js",
    "content": "import \"gatsby-cypress\";\nimport \"./commands\";\n"
  },
  {
    "path": "e2e-tests/production-runtime/cypress.json",
    "content": "{\n  \"baseUrl\": \"http://localhost:9000\",\n  \"failOnStatusCode\": false,\n  \"video\": false\n}\n"
  },
  {
    "path": "e2e-tests/production-runtime/gatsby-config.js",
    "content": "module.exports = {\n  plugins: [\n    `gatsby-plugin-top-layout`,\n    `gatsby-plugin-react-helmet`,\n    {\n      resolve: `gatsby-plugin-material-ui`,\n      options: {\n        pathToEmotionCacheProps: `src/emotion-cache-props`,\n      },\n    },\n  ],\n  siteMetadata: {\n    title: `My page`,\n  },\n};\n"
  },
  {
    "path": "e2e-tests/production-runtime/package.json",
    "content": "{\n  \"name\": \"production-runtime\",\n  \"private\": true,\n  \"version\": \"4.1.0\",\n  \"dependencies\": {\n    \"@emotion/react\": \"latest\",\n    \"@emotion/styled\": \"latest\",\n    \"@mui/material\": \"latest\",\n    \"cross-env\": \"latest\",\n    \"gatsby\": \"latest\",\n    \"gatsby-plugin-react-helmet\": \"latest\",\n    \"react\": \"latest\",\n    \"react-dom\": \"latest\",\n    \"react-helmet\": \"latest\"\n  },\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"gatsby build\",\n    \"develop\": \"gatsby develop\",\n    \"format\": \"prettier --write src/**/*.{js,jsx}\",\n    \"start\": \"yarn develop\",\n    \"serve\": \"gatsby serve\",\n    \"cy:open\": \"cypress open\",\n    \"cy:run\": \"cypress run --browser chrome\",\n    \"start-server-and-test\": \"start-server-and-test serve http://localhost:9000 cy:run\",\n    \"test\": \"cross-env CYPRESS_SUPPORT=y yarn build && yarn start-server-and-test \"\n  },\n  \"devDependencies\": {\n    \"@testing-library/cypress\": \"^8.0.0\",\n    \"cypress\": \"^9.0.0\",\n    \"gatsby-cypress\": \"^2.2.0\",\n    \"start-server-and-test\": \"^1.9.1\"\n  }\n}\n"
  },
  {
    "path": "e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-browser.js",
    "content": "import React from \"react\";\nimport TopLayout from \"./top-layout\";\n\nexport const onClientEntry = () => {\n  const head = document.head;\n  const injectFirstNode = document.createComment(`mui-inject-first`);\n  head.insertBefore(injectFirstNode, head.firstChild);\n};\n\nexport const wrapRootElement = ({ element }) => {\n  return <TopLayout>{element}</TopLayout>;\n};\n"
  },
  {
    "path": "e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/gatsby-ssr.js",
    "content": "import React from \"react\";\nimport TopLayout from \"./top-layout\";\n\nexport const wrapRootElement = ({ element }) => {\n  return <TopLayout>{element}</TopLayout>;\n};\n"
  },
  {
    "path": "e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/package.json",
    "content": "{\n  \"name\": \"gatsby-plugin-top-layout\"\n}\n"
  },
  {
    "path": "e2e-tests/production-runtime/plugins/gatsby-plugin-top-layout/top-layout.js",
    "content": "import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Helmet } from \"react-helmet\";\nimport CssBaseline from \"@mui/material/CssBaseline\";\nimport { ThemeProvider } from \"@mui/material/styles\";\nimport theme from \"../../src/theme\";\n\nexport default function TopLayout(props) {\n  return (\n    <>\n      <Helmet>\n        <meta\n          name=\"viewport\"\n          content=\"minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no\"\n        />\n        <link\n          href=\"https://fonts.googleapis.com/css?family=Roboto:400,500,700\"\n          rel=\"stylesheet\"\n        />\n      </Helmet>\n      <ThemeProvider theme={theme}>\n        {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}\n        <CssBaseline />\n        {props.children}\n      </ThemeProvider>\n    </>\n  );\n}\n\nTopLayout.propTypes = {\n  children: PropTypes.node,\n};\n"
  },
  {
    "path": "e2e-tests/production-runtime/src/components/link.js",
    "content": "import * as React from \"react\";\nimport MuiLink from \"@mui/material/Link\";\nimport { Link as GatsbyLink } from \"gatsby\";\n\nconst Link = React.forwardRef(function Link(props, ref) {\n  return <MuiLink component={GatsbyLink} ref={ref} {...props} />;\n});\n\nexport default Link;\n"
  },
  {
    "path": "e2e-tests/production-runtime/src/components/pro-tip.js",
    "content": "import * as React from \"react\";\nimport Link from \"@mui/material/Link\";\nimport SvgIcon from \"@mui/material/SvgIcon\";\nimport Typography from \"@mui/material/Typography\";\n\nfunction LightBulbIcon(props) {\n  return (\n    <SvgIcon {...props}>\n      <path d=\"M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z\" />\n    </SvgIcon>\n  );\n}\n\nexport default function ProTip() {\n  return (\n    <Typography sx={{ mt: 6, mb: 3 }} color=\"text.secondary\">\n      <LightBulbIcon sx={{ mr: 1, verticalAlign: `middle` }} />\n      Pro tip: See more{` `}\n      <Link href=\"https://material-ui.com/getting-started/templates/\">\n        templates\n      </Link>\n      {` `}\n      on the Material-UI documentation.\n    </Typography>\n  );\n}\n"
  },
  {
    "path": "e2e-tests/production-runtime/src/emotion-cache-props.js",
    "content": "const emotionCacheProps = {\n  key: `xyz`,\n  nonce: `XXXYYYZZZ`\n};\n\nexport default emotionCacheProps;\n"
  },
  {
    "path": "e2e-tests/production-runtime/src/pages/about.js",
    "content": "import React from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport MuiLink from \"@mui/material/Link\";\n\nimport ProTip from \"../components/pro-tip\";\nimport Link from \"../components/link\";\n\nfunction MadeWithLove() {\n  return (\n    <Typography variant=\"body2\" color=\"textSecondary\" align=\"center\">\n      {`Built with love by the `}\n      <MuiLink color=\"inherit\" href=\"https://material-ui.com/\">\n        Material-UI\n      </MuiLink>\n      {` team.`}\n    </Typography>\n  );\n}\n\nexport default function App() {\n  return (\n    <Container maxWidth=\"sm\">\n      <Box my={4}>\n        <Typography\n          data-testid=\"about-message\"\n          variant=\"h4\"\n          component=\"h1\"\n          gutterBottom\n        >\n          Gatsby example\n        </Typography>\n        <Link to=\"/\">Go to the main page</Link>\n        <ProTip />\n        <MadeWithLove />\n      </Box>\n    </Container>\n  );\n}\n"
  },
  {
    "path": "e2e-tests/production-runtime/src/pages/index.js",
    "content": "import React from \"react\";\nimport Container from \"@mui/material/Container\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport MuiLink from \"@mui/material/Link\";\n\nimport ProTip from \"../components/pro-tip\";\nimport Link from \"../components/link\";\n\nfunction MadeWithLove() {\n  return (\n    <Typography variant=\"body2\" color=\"textSecondary\" align=\"center\">\n      {`Built with love by the `}\n      <MuiLink color=\"inherit\" href=\"https://material-ui.com/\">\n        Material-UI\n      </MuiLink>\n      {` team.`}\n    </Typography>\n  );\n}\n\nexport default function App() {\n  return (\n    <Container maxWidth=\"sm\">\n      <Box my={4}>\n        <Typography variant=\"h4\" component=\"h1\" gutterBottom>\n          Gatsby example\n        </Typography>\n        <Link to=\"/about\" color=\"secondary\">\n          Go to the about page\n        </Link>\n        <ProTip />\n        <MadeWithLove />\n      </Box>\n    </Container>\n  );\n}\n"
  },
  {
    "path": "e2e-tests/production-runtime/src/theme.js",
    "content": "import red from \"@mui/material/colors/red\";\nimport { createTheme } from \"@mui/material/styles\";\n\n// A custom theme for this app\nconst theme = createTheme({\n  palette: {\n    primary: {\n      main: `#556cd6`,\n    },\n    secondary: {\n      main: `#19857b`,\n    },\n    error: {\n      main: red.A400,\n    },\n    background: {\n      default: `#fff`,\n    },\n  },\n});\n\nexport default theme;\n"
  },
  {
    "path": "gatsby-plugin-material-ui/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"babel-preset-gatsby-package\",\n      {\n        \"browser\": true\n      }\n    ]\n  ]\n}\n"
  },
  {
    "path": "gatsby-plugin-material-ui/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# next.js build output\n.next\n\n# Lib folder\nlib\n\n.DS_Store\n\n/*.js\n!index.js\n"
  },
  {
    "path": "gatsby-plugin-material-ui/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "gatsby-plugin-material-ui/README.md",
    "content": "# gatsby-plugin-material-ui\n\n> A [Gatsby](https://github.com/gatsbyjs/gatsby) plugin for [@material-ui](https://github.com/mui-org/material-ui) with built-in server-side rendering support.\n\nThis is the plugin for Material-UI v5 (emotion). The plugin for v4 can be found [here](https://github.com/hupe1980/gatsby-plugin-material-ui/tree/v3.0.1).\n\n## Install\n```sh\nnpm install gatsby-plugin-material-ui@next @emotion/react\n```\n\n## Theme vs. Plugin\n- `gatsby-plugin-material-ui` solves FOUC, auto prefixing and minification.\n- `gatsby-theme-material-ui` uses the plugin under the hood, adds web fonts, meta-viewport, CSS baseline and mui theme support and has material ui styled gatsby link components\n\n## How to use\n\nThe default options should be enough to cover the most common use cases.\n\n```js\n// gatsby-config.js\n\nmodule.exports = {\n  plugins: [`gatsby-plugin-material-ui`],\n};\n```\n\n## Advanced\n\nYou can use the `pathToEmotionCacheProps` option for low level customization of how styles get inserted by [emotion](https://emotion.sh/docs/@emotion/cache#createcache).\n\n```js\n// gatsby-config.js\n\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-plugin-material-ui`,\n      options: {\n        pathToEmotionCacheProps: `src/emotion-cache-props`,\n      },\n    },\n  ],\n};\n```\n\n```js\n// src/emotion-cache-props.js\nconst emotionCacheProps = {\n  key: `xyz`,\n  nonce: `XXXYYYZZZ`\n};\n\nexport default emotionCacheProps;\n```\n\n## Examples\n\nYou can find an official integration example of this plugin [on the Material-UI site](https://github.com/mui-org/material-ui/tree/master/examples/gatsby), then you can pick one of the [Page Layout Examples](https://material-ui.com/getting-started/page-layout-examples/).\n\nIf you want to save time with a more opinionated solution. You can start with [a premade theme](https://github.com/hupe1980/gatsby-theme-material-ui).\n"
  },
  {
    "path": "gatsby-plugin-material-ui/index.js",
    "content": "// noop\n"
  },
  {
    "path": "gatsby-plugin-material-ui/package.json",
    "content": "{\n  \"name\": \"gatsby-plugin-material-ui\",\n  \"version\": \"4.1.0\",\n  \"description\": \"Gatsby plugin for Material-UI with built-in server-side rendering support\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/hupe1980/gatsby-plugin-material-ui\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"gatsby\",\n    \"gatsby-plugin\",\n    \"material-ui\",\n    \"emotion\"\n  ],\n  \"main\": \"index.js\",\n  \"files\": [\n    \"index.js\",\n    \"gatsby-browser.js\",\n    \"gatsby-node.js\",\n    \"gatsby-ssr.js\",\n    \"get-emotion-cache.js\"\n  ],\n  \"scripts\": {\n    \"build\": \"babel src --out-dir .\",\n    \"build:watch\": \"babel -w src --out-dir .\",\n    \"prepare\": \"cross-env NODE_ENV=production npm run build\"\n  },\n  \"dependencies\": {\n    \"@emotion/cache\": \"^11.4.0\",\n    \"@emotion/server\": \"^11.4.0\"\n  },\n  \"peerDependencies\": {\n    \"@emotion/react\": \"^11.4.0\",\n    \"gatsby\": \"^3.0.0 || ^4.0.0\"\n  },\n  \"devDependencies\": {\n    \"@babel/cli\": \"^7.12.1\",\n    \"@babel/core\": \"^7.12.3\",\n    \"@emotion/react\": \"^11.4.0\",\n    \"babel-preset-gatsby-package\": \"^2.2.0\",\n    \"cross-env\": \"^7.0.3\"\n  }\n}\n"
  },
  {
    "path": "gatsby-plugin-material-ui/src/gatsby-browser.js",
    "content": "import React from \"react\";\nimport { CacheProvider } from \"@emotion/react\";\n\nimport emotionCacheProps from \"material-ui-plugin-cache-endpoint\";\n\nimport getEmotionCache from \"./get-emotion-cache\";\n\nconst cache = getEmotionCache(emotionCacheProps);\n\nexport const wrapRootElement = ({ element }) => {\n  return <CacheProvider value={cache}>{element}</CacheProvider>;\n};\n"
  },
  {
    "path": "gatsby-plugin-material-ui/src/gatsby-node.js",
    "content": "const fs = require(`fs`);\nconst path = require(`path`);\nconst os = require(`os`);\n\nlet didRunAlready = false;\n\nexports.onPreInit = () => {\n    if (didRunAlready) {\n        throw new Error(\n            `You can only have a single instance of gatsby-plugin-material-ui in your gatsby-config.js`,\n        );\n    }\n\n    didRunAlready = true;\n};\n\nexports.pluginOptionsSchema = ({ Joi }) => {\n    return Joi.object({\n        pathToEmotionCacheProps: Joi.string()\n            .default(``)\n            .description(\n                `The path to the emotion cache props (See https://emotion.sh/docs/@emotion/cache#createcache).`\n            ),\n    })\n}\n\n// Copy and past from https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typography\nexports.onPreBootstrap = ({ store, cache }, pluginOptions) => {\n    const program = store.getState().program;\n\n    let module;\n    if (pluginOptions.pathToEmotionCacheProps) {\n        module = `module.exports = require(\"${path.isAbsolute(pluginOptions.pathToEmotionCacheProps)\n            ? pluginOptions.pathToEmotionCacheProps\n            : path.join(program.directory, pluginOptions.pathToEmotionCacheProps)\n            }\")`;\n        if (os.platform() === `win32`) {\n            module = module.split(`\\\\`).join(`\\\\\\\\`);\n        }\n    } else {\n        module = `module.exports = null`;\n    }\n\n    const dir = cache.directory;\n\n    if (!fs.existsSync(dir)) {\n        fs.mkdirSync(dir);\n    }\n\n    fs.writeFileSync(path.join(dir, `emotion-cache-props.js`), module);\n};\n\n// Copy and past from https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typography\nexports.onCreateWebpackConfig = ({ actions, cache }) => {\n    const cacheFile = path.join(cache.directory, `emotion-cache-props.js`);\n    const { setWebpackConfig } = actions;\n    setWebpackConfig({\n        resolve: {\n            alias: {\n                \"material-ui-plugin-cache-endpoint\": cacheFile,\n            },\n        },\n    });\n};"
  },
  {
    "path": "gatsby-plugin-material-ui/src/gatsby-ssr.js",
    "content": "import * as React from \"react\";\nimport { CacheProvider } from \"@emotion/react\";\nimport createEmotionServer from \"@emotion/server/create-instance\";\nimport { renderToString } from \"react-dom/server\";\n\nimport emotionCacheProps from \"material-ui-plugin-cache-endpoint\";\n\nimport getEmotionCache from \"./get-emotion-cache\";\n\nexport const replaceRenderer = ({\n  bodyComponent,\n  setHeadComponents,\n  replaceBodyHTMLString,\n}) => {\n  const cache = getEmotionCache(emotionCacheProps);\n  const { extractCriticalToChunks } = createEmotionServer(cache);\n\n  const emotionStyles = extractCriticalToChunks(\n    renderToString(\n      <CacheProvider value={cache}>{bodyComponent}</CacheProvider>,\n    ),\n  );\n\n  setHeadComponents(\n    emotionStyles.styles.map((style) => (\n      <style\n        data-emotion={`${style.key} ${style.ids.join(` `)}`}\n        key={style.key}\n        dangerouslySetInnerHTML={{ __html: style.css }}\n      />\n    )),\n  );\n\n  // render the result from `extractCritical`\n  replaceBodyHTMLString(emotionStyles.html);\n};\n"
  },
  {
    "path": "gatsby-plugin-material-ui/src/get-emotion-cache.js",
    "content": "import createCache from \"@emotion/cache\";\n\nexport default function getEmotionCache(props) {\n  return createCache(props ?? { key: `css` });\n}\n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"npmClient\": \"yarn\",\n  \"useWorkspaces\": true,\n  \"version\": \"4.1.0\"\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"root\",\n  \"private\": true,\n  \"description\": \"Gatsby plugin for Material-UI with built-in server-side rendering support\",\n  \"license\": \"MIT\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/hupe1980/gatsby-plugin-material-ui\"\n  },\n  \"keywords\": [\n    \"react\",\n    \"gatsby\",\n    \"gatsby-plugin\",\n    \"material-ui\"\n  ],\n  \"workspaces\": [\n    \"e2e-tests/*\",\n    \"gatsby-plugin-material-ui\"\n  ],\n  \"scripts\": {\n    \"test:development-runtime\": \"yarn workspace development-runtime test\",\n    \"test:production-runtime\": \"yarn workspace production-runtime test\",\n    \"prepare\": \"lerna run prepare\",\n    \"lint\": \"eslint . --report-unused-disable-directives\"\n  },\n  \"devDependencies\": {\n    \"@babel/eslint-parser\": \"^7.15.0\",\n    \"eslint\": \"^7.32.0\",\n    \"eslint-plugin-react\": \"^7.14.3\",\n    \"lerna\": \"^4.0.0\"\n  }\n}\n"
  }
]